1eb8dc403SDave CobbleyINHIBIT_SYSROOT_STRIP = "1" 2eb8dc403SDave Cobbley 37e0e3c0cSAndrew GeisslerPACKAGES = "${PN}-dbg sln nscd ldconfig ldd ldso tzcode glibc-thread-db ${PN}-pic libmemusage malloc-debug libnss-db ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src" 4eb8dc403SDave Cobbley 5eb8dc403SDave Cobbley# The ld.so in this glibc supports the GNU_HASH 6213cb269SPatrick WilliamsRPROVIDES:${PN} = "eglibc rtld(GNU_HASH)" 7213cb269SPatrick WilliamsRPROVIDES:${PN}-utils = "eglibc-utils" 8213cb269SPatrick WilliamsRPROVIDES:${PN}-mtrace = "eglibc-mtrace libc-mtrace" 9213cb269SPatrick WilliamsRPROVIDES:${PN}-pic = "eglibc-pic" 10213cb269SPatrick WilliamsRPROVIDES:${PN}-dev = "eglibc-dev libc6-dev virtual-libc-dev" 11213cb269SPatrick WilliamsRPROVIDES:${PN}-staticdev = "eglibc-staticdev" 12213cb269SPatrick WilliamsRPROVIDES:${PN}-doc = "eglibc-doc" 13213cb269SPatrick WilliamsRPROVIDES:glibc-extra-nss = "eglibc-extra-nss" 14213cb269SPatrick WilliamsRPROVIDES:glibc-thread-db = "eglibc-thread-db" 15213cb269SPatrick WilliamsRPROVIDES:${PN}-pcprofile = "eglibc-pcprofile" 16213cb269SPatrick WilliamsRPROVIDES:${PN}-dbg = "eglibc-dbg" 171a4b7ee2SBrad Bishoplibc_baselibs = "${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/libmvec-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" 1819323693SBrad BishopARCH_DYNAMIC_LOADER = "" 1919323693SBrad Bishop# The aarch64 ABI says the dynamic linker -must- be 2019323693SBrad Bishop# /lib/ld-linux-aarch64{,_be}.so.1. With usrmerge, that may mean that 2119323693SBrad Bishop# we need to install it in /usr/lib. 22213cb269SPatrick WilliamsARCH_DYNAMIC_LOADER:aarch64 = "ld-linux-${TARGET_ARCH}.so.1" 23213cb269SPatrick Williamslibc_baselibs:append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}" 24213cb269SPatrick WilliamsINSANE_SKIP:${PN}:append:aarch64 = " libdir" 25d159c7fbSAndrew GeisslerINSANE_SKIP:${PN}-dev += "staticdev" 267e0e3c0cSAndrew GeisslerINSANE_SKIP:${MLPREFIX}ldso:append = " dev-so libdir" 27eb8dc403SDave Cobbley 28213cb269SPatrick WilliamsFILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf" 29213cb269SPatrick WilliamsRRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}" 30213cb269SPatrick WilliamsFILES:ldconfig = "${base_sbindir}/ldconfig" 31213cb269SPatrick WilliamsFILES:ldd = "${bindir}/ldd" 327e0e3c0cSAndrew GeisslerFILES:ldso = "${bindir}/${MLPREFIX}ld.so" 33213cb269SPatrick WilliamsFILES:libmemusage = "${base_libdir}/libmemusage.so" 340ca19ccfSPatrick WilliamsFILES:malloc-debug = "${base_libdir}/libc_malloc_debug.so.0" 35213cb269SPatrick WilliamsFILES:libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile ${localstatedir}/db/makedbs.sh" 36213cb269SPatrick WilliamsRDEPENDS:libnss-db = "${PN}-utils" 37213cb269SPatrick WilliamsFILES:glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*" 38213cb269SPatrick WilliamsFILES:sln = "${base_sbindir}/sln" 39213cb269SPatrick WilliamsFILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o" 40213cb269SPatrick WilliamsFILES:libsotruss = "${libdir}/audit/sotruss-lib.so" 41eb8dc403SDave CobbleyFILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" 42d159c7fbSAndrew GeisslerFILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" 43db4c27eeSPatrick WilliamsRDEPENDS:${PN}-dev = "linux-libc-headers-dev" 44213cb269SPatrick WilliamsFILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" 45*ac13d5f3SPatrick WilliamsFILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdir}/nscd* ${nonarch_libdir}/tmpfiles.d/nscd.conf \ 46eb8dc403SDave Cobbley ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd" 47213cb269SPatrick WilliamsFILES:${PN}-mtrace = "${bindir}/mtrace" 48213cb269SPatrick WilliamsFILES:tzcode = "${bindir}/tzselect ${sbindir}/zic ${bindir}/zdump" 49213cb269SPatrick WilliamsFILES:${PN}-utils = "${bindir}/* ${sbindir}/*" 50213cb269SPatrick WilliamsFILES:${PN}-pcprofile = "${base_libdir}/libpcprofile.so" 51213cb269SPatrick WilliamsFILES:glibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so" 52213cb269SPatrick WilliamsRPROVIDES:${PN}-dev += "libc-dev" 53213cb269SPatrick WilliamsRPROVIDES:${PN}-staticdev += "libc-staticdev" 54eb8dc403SDave Cobbley 55213cb269SPatrick WilliamsSUMMARY:sln = "The static ln" 56213cb269SPatrick WilliamsDESCRIPTION:sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional." 57213cb269SPatrick WilliamsSUMMARY:nscd = "Name service cache daemon" 58213cb269SPatrick WilliamsDESCRIPTION:nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services." 59213cb269SPatrick WilliamsSUMMARY:glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries" 60213cb269SPatrick WilliamsDESCRIPTION:glibc-extra-nss = "glibc: nis, nisplus and hesiod search services." 61213cb269SPatrick WilliamsSUMMARY:ldd = "print shared library dependencies" 62213cb269SPatrick WilliamsDESCRIPTION:ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line." 63213cb269SPatrick WilliamsSUMMARY:${PN}-utils = "Miscellaneous utilities provided by glibc" 64213cb269SPatrick WilliamsDESCRIPTION:${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, ..." 65213cb269SPatrick WilliamsDESCRIPTION:libsotruss = "Library to support sotruss which traces calls through PLTs" 66213cb269SPatrick WilliamsDESCRIPTION:tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" 67eb8dc403SDave Cobbley 6882c905dcSAndrew Geisslerinherit multilib_header 69eb8dc403SDave Cobbley 7082c905dcSAndrew Geisslerdo_install() { 7182c905dcSAndrew Geissler oe_runmake install_root=${D} install 7282c905dcSAndrew Geissler install -Dm 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf 7382c905dcSAndrew Geissler install -d ${D}${localedir} 7482c905dcSAndrew Geissler make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" 7582c905dcSAndrew Geissler # get rid of some broken files... 7682c905dcSAndrew Geissler for i in ${GLIBC_BROKEN_LOCALES}; do 7782c905dcSAndrew Geissler sed -i "/$i/d" ${WORKDIR}/SUPPORTED 7882c905dcSAndrew Geissler done 7982c905dcSAndrew Geissler rm -f ${D}${sysconfdir}/rpc 8082c905dcSAndrew Geissler rm -rf ${D}${datadir}/zoneinfo 8182c905dcSAndrew Geissler rm -rf ${D}${libexecdir}/getconf 8282c905dcSAndrew Geissler 83eb8dc403SDave Cobbley rm -f ${D}${sysconfdir}/localtime 84eb8dc403SDave Cobbley 85eb8dc403SDave Cobbley # remove empty glibc dir 86eb8dc403SDave Cobbley if [ -d ${D}${libexecdir} ]; then 87eb8dc403SDave Cobbley rmdir --ignore-fail-on-non-empty ${D}${libexecdir} 88eb8dc403SDave Cobbley fi 89eb8dc403SDave Cobbley 905082cc7fSAndrew Geissler oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h bits/endianness.h bits/struct_rwlock.h bits/math-vector.h 91eb8dc403SDave Cobbley 92eb8dc403SDave Cobbley if [ -f ${D}${bindir}/mtrace ]; then 93eb8dc403SDave Cobbley sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace 94eb8dc403SDave Cobbley fi 95eb8dc403SDave Cobbley # Info dir listing isn't interesting at this point so remove it if it exists. 96eb8dc403SDave Cobbley if [ -e "${D}${infodir}/dir" ]; then 97eb8dc403SDave Cobbley rm -f ${D}${infodir}/dir 98eb8dc403SDave Cobbley fi 99eb8dc403SDave Cobbley 100eb8dc403SDave Cobbley install -d ${D}${sysconfdir}/init.d 101eb8dc403SDave Cobbley install -d ${D}${localstatedir}/db/nscd 102eb8dc403SDave Cobbley install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd 103eb8dc403SDave Cobbley install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf 1041a4b7ee2SBrad Bishop install -m 0755 ${WORKDIR}/makedbs.sh ${D}${localstatedir}/db 105eb8dc403SDave Cobbley sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd 106eb8dc403SDave Cobbley sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf 107eb8dc403SDave Cobbley 1085199d831SAndrew Geissler install -d ${D}${systemd_system_unitdir} 1095199d831SAndrew Geissler install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_system_unitdir}/ 110eb8dc403SDave Cobbley 11119323693SBrad Bishop # The dynamic loader will have been installed into 11219323693SBrad Bishop # ${base_libdir}. However, if that isn't going to end up being 11319323693SBrad Bishop # available in the ABI-mandated location, then a symlink must 11419323693SBrad Bishop # be created. 11519323693SBrad Bishop 11619323693SBrad Bishop if [ -n "${ARCH_DYNAMIC_LOADER}" -a ! -e "${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then 11719323693SBrad Bishop install -d ${D}${root_prefix}/lib 11819323693SBrad Bishop ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \ 11919323693SBrad Bishop ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} 12019323693SBrad Bishop fi 121595f6308SAndrew Geissler ln -rs ${D}${base_libdir}/libpthread.so.0 ${D}${libdir}/libpthread.so 122595f6308SAndrew Geissler ln -rs ${D}${base_libdir}/librt.so.1 ${D}${libdir}/librt.so 1237e0e3c0cSAndrew Geissler if [ -n "${MLPREFIX}" ]; then 1247e0e3c0cSAndrew Geissler mv ${D}${bindir}/ld.so ${D}${bindir}/${MLPREFIX}ld.so 1257e0e3c0cSAndrew Geissler fi 126eb8dc403SDave Cobbley} 127eb8dc403SDave Cobbley 12882c905dcSAndrew Geisslerdef get_libc_fpu_setting(bb, d): 12982c905dcSAndrew Geissler if d.getVar('TARGET_FPU') in [ 'soft', 'ppc-efd' ]: 13082c905dcSAndrew Geissler return "--without-fp" 13182c905dcSAndrew Geissler return "" 13282c905dcSAndrew Geissler 133213cb269SPatrick Williamsdo_install:append:class-target() { 134a34c030eSBrad Bishop if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 135*ac13d5f3SPatrick Williams install -d ${D}${nonarch_libdir}/tmpfiles.d 136a34c030eSBrad Bishop echo "d /run/nscd 755 root root -" \ 137*ac13d5f3SPatrick Williams > ${D}${nonarch_libdir}/tmpfiles.d/nscd.conf 138a34c030eSBrad Bishop fi 139a34c030eSBrad Bishop 140a34c030eSBrad Bishop if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 141a34c030eSBrad Bishop install -d ${D}${sysconfdir}/default/volatiles 142a34c030eSBrad Bishop echo "d root root 0755 /var/run/nscd none" \ 143a34c030eSBrad Bishop > ${D}${sysconfdir}/default/volatiles/98_nscd 144a34c030eSBrad Bishop fi 145a34c030eSBrad Bishop 146a34c030eSBrad Bishop} 147213cb269SPatrick Williamsdo_install:append:aarch64 () { 148eb8dc403SDave Cobbley do_install_armmultilib 149eb8dc403SDave Cobbley} 150eb8dc403SDave Cobbley 151213cb269SPatrick Williamsdo_install:append:arm () { 152eb8dc403SDave Cobbley do_install_armmultilib 153eb8dc403SDave Cobbley} 154eb8dc403SDave Cobbley 155213cb269SPatrick Williamsdo_install:append:armeb () { 156eb8dc403SDave Cobbley do_install_armmultilib 157eb8dc403SDave Cobbley} 158eb8dc403SDave Cobbley 159eb8dc403SDave Cobbleydo_install_armmultilib () { 1601e34c2d0SAndrew Geissler oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h 161eb8dc403SDave Cobbley oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h bits/pthreadtypes.h bits/pthreadtypes-arch.h bits/sem.h bits/semaphore.h bits/setjmp.h 162eb8dc403SDave Cobbley oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h bits/typesizes.h 16319323693SBrad Bishop oe_multilib_header bits/procfs-id.h bits/procfs.h bits/shmlba.h 164d159c7fbSAndrew Geissler oe_multilib_header bits/struct_stat.h bits/pthread_stack_min.h 1657e0e3c0cSAndrew Geissler oe_multilib_header bits/dl_find_object.h bits/rseq.h bits/timesize.h 166eb8dc403SDave Cobbley 167eb8dc403SDave Cobbley oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h 168eb8dc403SDave Cobbley 169eb8dc403SDave Cobbley oe_multilib_header sys/elf.h sys/procfs.h sys/ptrace.h sys/ucontext.h sys/user.h 170eb8dc403SDave Cobbley} 171eb8dc403SDave Cobbley 172eb8dc403SDave Cobbley 173eb8dc403SDave CobbleyLOCALESTASH = "${WORKDIR}/stashed-locale" 174eb8dc403SDave Cobbleybashscripts = "mtrace sotruss xtrace" 175eb8dc403SDave Cobbley 176eb8dc403SDave Cobbleydo_stash_locale () { 177eb8dc403SDave Cobbley dest=${LOCALESTASH} 17896ff1984SBrad Bishop install -d $dest${base_libdir} $dest${bindir} $dest${libdir} $dest${datadir} 17996ff1984SBrad Bishop # Hide away the locale data from the deployment 180eb8dc403SDave Cobbley if [ -e ${D}${bindir}/localedef ]; then 18196ff1984SBrad Bishop cp -a ${D}${bindir}/localedef $dest${bindir} 182eb8dc403SDave Cobbley fi 183eb8dc403SDave Cobbley if [ -e ${D}${libdir}/gconv ]; then 18496ff1984SBrad Bishop cp -a ${D}${libdir}/gconv $dest${libdir} 185eb8dc403SDave Cobbley fi 186eb8dc403SDave Cobbley if [ -e ${D}${datadir}/i18n ]; then 18796ff1984SBrad Bishop cp -a ${D}${datadir}/i18n $dest${datadir} 188eb8dc403SDave Cobbley fi 189eb8dc403SDave Cobbley 19096ff1984SBrad Bishop # Make a copy of all the libraries into the locale stash 19196ff1984SBrad Bishop cp -fpPR ${D}${libdir}/* $dest${libdir} 19296ff1984SBrad Bishop if [ "${base_libdir}" != "${libdir}" ]; then 19396ff1984SBrad Bishop cp -fpPR ${D}${base_libdir}/* $dest${base_libdir} 19496ff1984SBrad Bishop fi 19596ff1984SBrad Bishop if [ -e ${D}${exec_prefix}/lib ]; then 19696ff1984SBrad Bishop if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then 19796ff1984SBrad Bishop cp -fpPR ${D}${exec_prefix}/lib $dest${exec_prefix} 19896ff1984SBrad Bishop fi 19996ff1984SBrad Bishop fi 20096ff1984SBrad Bishop 20196ff1984SBrad Bishop cp -fpPR ${D}${datadir}/* $dest${datadir} 20296ff1984SBrad Bishop cp -fpPR ${WORKDIR}/SUPPORTED $dest 20396ff1984SBrad Bishop 20496ff1984SBrad Bishop target=$dest/scripts 205eb8dc403SDave Cobbley mkdir -p $target 206eb8dc403SDave Cobbley for i in ${bashscripts}; do 207eb8dc403SDave Cobbley if [ -f ${D}${bindir}/$i ]; then 208eb8dc403SDave Cobbley cp ${D}${bindir}/$i $target/ 209eb8dc403SDave Cobbley fi 210eb8dc403SDave Cobbley done 211eb8dc403SDave Cobbley} 212eb8dc403SDave Cobbley 213eb8dc403SDave Cobbleyaddtask do_stash_locale after do_install before do_populate_sysroot do_package 214eb8dc403SDave Cobbleydo_stash_locale[dirs] = "${B}" 215eb8dc403SDave Cobbleydo_stash_locale[cleandirs] = "${LOCALESTASH}" 216eb8dc403SDave CobbleySSTATETASKS += "do_stash_locale" 217eb8dc403SDave Cobbleydo_stash_locale[sstate-inputdirs] = "${LOCALESTASH}" 218eb8dc403SDave Cobbleydo_stash_locale[sstate-outputdirs] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" 219eb8dc403SDave Cobbleydo_stash_locale[sstate-fixmedir] = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" 220eb8dc403SDave Cobbley 221eb8dc403SDave Cobbleypython do_stash_locale_setscene () { 222eb8dc403SDave Cobbley sstate_setscene(d) 223eb8dc403SDave Cobbley} 224eb8dc403SDave Cobbleyaddtask do_stash_locale_setscene 225eb8dc403SDave Cobbley 22696ff1984SBrad BishopPACKAGE_PREPROCESS_FUNCS += "stash_locale_package_cleanup" 22796ff1984SBrad BishopSYSROOT_PREPROCESS_FUNCS += "stash_locale_sysroot_cleanup" 22896ff1984SBrad Bishopstash_locale_cleanup () { 22996ff1984SBrad Bishop cleanupdir=$1 23096ff1984SBrad Bishop # Remove all files which do_stash_locale() copies 231eb8dc403SDave Cobbley for i in ${bashscripts}; do 23296ff1984SBrad Bishop rm -f $cleanupdir${bindir}/$i 233eb8dc403SDave Cobbley done 23496ff1984SBrad Bishop rm -f $cleanupdir${bindir}/localedef 23596ff1984SBrad Bishop rm -rf $cleanupdir${datadir}/i18n 23696ff1984SBrad Bishop rm -rf $cleanupdir${libdir}/gconv 23796ff1984SBrad Bishop rm -rf $cleanupdir${localedir} 23896ff1984SBrad Bishop rm -rf $cleanupdir${datadir}/locale 23982c905dcSAndrew Geissler rmdir --ignore-fail-on-non-empty $cleanupdir${datadir} 24082c905dcSAndrew Geissler 24196ff1984SBrad Bishop if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then 24296ff1984SBrad Bishop if [ -d "$cleanupdir${exec_prefix}/lib" ]; then 24319323693SBrad Bishop if [ -z "${ARCH_DYNAMIC_LOADER}" -o \ 24496ff1984SBrad Bishop ! -e "$cleanupdir${exec_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then 245eb8dc403SDave Cobbley # error out if directory isn't empty 2461a4b7ee2SBrad Bishop # this dir should only contain locale dir 2471a4b7ee2SBrad Bishop # which has been deleted in the previous step 24896ff1984SBrad Bishop rmdir $cleanupdir${exec_prefix}/lib 249eb8dc403SDave Cobbley fi 250eb8dc403SDave Cobbley fi 25119323693SBrad Bishop fi 252eb8dc403SDave Cobbley} 25396ff1984SBrad Bishop 25496ff1984SBrad Bishopstash_locale_sysroot_cleanup() { 25596ff1984SBrad Bishop stash_locale_cleanup ${SYSROOT_DESTDIR} 25696ff1984SBrad Bishop} 25796ff1984SBrad Bishopstash_locale_package_cleanup() { 25896ff1984SBrad Bishop stash_locale_cleanup ${PKGD} 25996ff1984SBrad Bishop} 260eb8dc403SDave Cobbley 261213cb269SPatrick Williamspython populate_packages:prepend () { 26282c905dcSAndrew Geissler if d.getVar('DEBIAN_NAMES'): 26382c905dcSAndrew Geissler pkgs = d.getVar('PACKAGES').split() 26482c905dcSAndrew Geissler bpn = d.getVar('BPN') 26582c905dcSAndrew Geissler prefix = d.getVar('MLPREFIX') or "" 26682c905dcSAndrew Geissler # Set the base package... 267213cb269SPatrick Williams d.setVar('PKG:' + prefix + bpn, prefix + 'libc6') 26882c905dcSAndrew Geissler libcprefix = prefix + bpn + '-' 26982c905dcSAndrew Geissler for p in pkgs: 27082c905dcSAndrew Geissler # And all the subpackages. 27182c905dcSAndrew Geissler if p.startswith(libcprefix): 27282c905dcSAndrew Geissler renamed = p.replace(bpn, 'libc6', 1) 273213cb269SPatrick Williams d.setVar('PKG:' + p, renamed) 27482c905dcSAndrew Geissler # For backward compatibility with old -dbg package 275213cb269SPatrick Williams d.appendVar('RPROVIDES:' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') 276213cb269SPatrick Williams d.appendVar('RCONFLICTS:' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') 277213cb269SPatrick Williams d.appendVar('RREPLACES:' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg') 27882c905dcSAndrew Geissler} 27982c905dcSAndrew Geissler 280213cb269SPatrick Williamspkg_postinst:nscd () { 281eb8dc403SDave Cobbley if [ -z "$D" ]; then 282eb8dc403SDave Cobbley if command -v systemd-tmpfiles >/dev/null; then 283*ac13d5f3SPatrick Williams systemd-tmpfiles --create ${nonarch_libdir}/tmpfiles.d/nscd.conf 284eb8dc403SDave Cobbley elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then 285eb8dc403SDave Cobbley ${sysconfdir}/init.d/populate-volatile.sh update 286eb8dc403SDave Cobbley fi 287eb8dc403SDave Cobbley fi 288eb8dc403SDave Cobbley} 289213cb269SPatrick WilliamsCONFFILES:nscd="${sysconfdir}/nscd.conf" 290eb8dc403SDave Cobbley 291eb8dc403SDave CobbleySYSTEMD_PACKAGES = "nscd" 292213cb269SPatrick WilliamsSYSTEMD_SERVICE:nscd = "nscd.service" 293