The suppress_hostname patch in BLFS broke with the new suppress_uptime_kill_su patch which prompted me to see why. The reason was obvious and the workaround simple, but while looking through the new patch, I realized it was extremely bloated. The -2 patch in the book is 272 lines long (counting the header). The attached patch is only 62 lines long (also counting the header). The size difference is 14 kB versus 3.1 kB.
Here's a quick rundown of the files changed in the -2 patch, but left untouched in the attached patch: - Makefile.in: none of the binary targets are specified here - AUTHORS: The authors still wrote the code whether we compile it or not - README: The heading immediately above where the changes took place in the -2 patch says, "The programs that can be built with this package are:". Since they can still be built, it is incorrect to change it. All other changes are to overcome an overly aggresive attempt to remove all instances of the keywords instead of just changing the targets. Unless someone has a reason this patch should not be in the book, please speak up or else I will commit it in a day or two. For blfs-dev: ------------- The net-tools note about suppressing hostname will have to be changed whether -2 or this proposed -3 patch is used. A more flexible workaround that is agnostic about the order in which the patches are applied is simply: sed -i 's/hostname$(EXEEXT) //' src/Makefile.in && sed -i 's/hostname.1 //' man/Makefile.in && -- Archaic Want control, education, and security from your operating system? Hardened Linux From Scratch http://www.linuxfromscratch.org/hlfs
Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org) Date: 2006-03-22 Initial Package Version: 5.94 Origin: me Upstream Status: Not submitted (LFS specific) Description: This patch supresses the building of uptime and kill. su is needed only for the coreutils testsuite so it is built but not installed. diff -Naur coreutils-5.94.orig/configure coreutils-5.94/configure --- coreutils-5.94.orig/configure 2006-02-13 12:52:04.000000000 +0000 +++ coreutils-5.94/configure 2006-03-22 07:30:02.000000000 +0000 @@ -50418,8 +50418,7 @@ { echo "$as_me:$LINENO: result: $gnulib_cv_have_boot_time" >&5 echo "${ECHO_T}$gnulib_cv_have_boot_time" >&6; } if test $gnulib_cv_have_boot_time = yes; then - OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime\$(EXEEXT)" - MAN="$MAN uptime.1" + echo "uptime is suppressed" fi diff -Naur coreutils-5.94.orig/man/Makefile.in coreutils-5.94/man/Makefile.in --- coreutils-5.94.orig/man/Makefile.in 2006-02-13 12:51:58.000000000 +0000 +++ coreutils-5.94/man/Makefile.in 2006-03-22 07:30:02.000000000 +0000 @@ -303,13 +303,13 @@ basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \ cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \ echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 \ - head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 \ + head.1 hostid.1 hostname.1 id.1 install.1 join.1 \ link.1 ln.1 logname.1 \ ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \ paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \ rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \ - su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \ - tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \ + sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \ + tty.1 uname.1 unexpand.1 uniq.1 unlink.1 users.1 vdir.1 wc.1 \ who.1 whoami.1 yes.1 man_aux = $(dist_man_MANS:.1=.x) diff -Naur coreutils-5.94.orig/src/Makefile.in coreutils-5.94/src/Makefile.in --- coreutils-5.94.orig/src/Makefile.in 2006-02-13 13:08:11.000000000 +0000 +++ coreutils-5.94/src/Makefile.in 2006-03-22 07:30:02.000000000 +0000 @@ -56,7 +56,7 @@ uniq$(EXEEXT) wc$(EXEEXT) basename$(EXEEXT) date$(EXEEXT) \ dirname$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) expr$(EXEEXT) \ factor$(EXEEXT) false$(EXEEXT) hostname$(EXEEXT) id$(EXEEXT) \ - kill$(EXEEXT) logname$(EXEEXT) pathchk$(EXEEXT) \ + logname$(EXEEXT) pathchk$(EXEEXT) \ printenv$(EXEEXT) printf$(EXEEXT) pwd$(EXEEXT) seq$(EXEEXT) \ sleep$(EXEEXT) tee$(EXEEXT) test$(EXEEXT) true$(EXEEXT) \ tty$(EXEEXT) whoami$(EXEEXT) yes$(EXEEXT) $(am__EXEEXT_1) \ @@ -1606,7 +1606,7 @@ && can_create_suid_root_executable=yes; \ rm -f $$TMPFILE; \ if test $$can_create_suid_root_executable = yes; then \ - $(INSTALL_SU); \ + echo "Installation of su is suppressed"; \ else \ echo "WARNING: insufficient access; not installing su"; \ echo "NOTE: to install su, run 'make install-root' as root"; \
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page