Merge pull request #1686 from MilhouseVH/glibc_add_progs

glibc: re-enable programs, remove those we don't want
This commit is contained in:
Lukas Rusak 2017-06-14 13:05:54 -07:00 committed by GitHub
commit 9fdb1b0805

View File

@ -111,13 +111,28 @@ echo "libdir=/usr/lib" >> configparms
echo "slibdir=/usr/lib" >> configparms
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
echo "build-programs=no" >> configparms
echo "build-programs=yes" >> configparms
GLIBC_INCLUDE_BIN="getent ldd locale"
}
post_makeinstall_target() {
# we are linking against ld.so, so symlink
ln -sf $(basename $INSTALL/usr/lib/ld-*.so) $INSTALL/usr/lib/ld.so
# cleanup
# remove any programs we don't want/need, keeping only those we want
for f in $(find $INSTALL/usr/bin -type f); do
fb="$(basename "${f}")"
for ib in $GLIBC_INCLUDE_BIN; do
if [ "${ib}" == "${fb}" ]; then
fb=
break
fi
done
[ -n "${fb}" ] && rm -rf ${f}
done
rm -rf $INSTALL/usr/lib/audit
rm -rf $INSTALL/usr/lib/glibc
rm -rf $INSTALL/usr/lib/libc_pic