Revision: 6854 http://ipcop.svn.sourceforge.net/ipcop/?rev=6854&view=rev Author: gespinasse Date: 2012-11-18 19:10:29 +0000 (Sun, 18 Nov 2012) Log Message: ----------- Upgrade coreutils to 8.20
Backport upstream fix for test-getlogin and mountlist test issues Avoid error in make check-root adding SUBDIRS= to avoid recursion in gnulib-test directory that should not happen. Shift nobody setting in lfs/fixup since it is used by util-linux and coreutils now. I tested in su noboby line to replace $(PATH) by ${PATH}. That form work and is better to set variables. You could use the exact same line when running the command by hand as $() that work in Makefile fail as it run a command. Modified Paths: -------------- ipcop/trunk/lfs/coreutils ipcop/trunk/lfs/fix-up ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0 ipcop/trunk/updates/2.1.0/information.xml Added Paths: ----------- ipcop/trunk/src/patches/coreutils-8.20_mountlist.patch ipcop/trunk/src/patches/coreutils-8.20_tests-getlogin.patch Modified: ipcop/trunk/lfs/coreutils =================================================================== --- ipcop/trunk/lfs/coreutils 2012-11-18 14:03:03 UTC (rev 6853) +++ ipcop/trunk/lfs/coreutils 2012-11-18 19:10:29 UTC (rev 6854) @@ -33,7 +33,7 @@ include Config PKG_NAME = coreutils -VER = 8.19 +VER = 8.20 HOST_ARCH = all OTHER_SRC = yes @@ -50,7 +50,7 @@ $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 1a01231a2f3ed37c0efc073ccdda9375 +$(DL_FILE)_MD5 = 3d69af8f561fce512538a9fe85f147ff install : $(TARGET) @@ -81,8 +81,9 @@ @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xf $(DIR_DL)/$(DL_FILE) - # Fix a 8.{16,17,18,19} test issue - cd $(DIR_APP) && sed -i -e 's/! isatty/isatty/' -e '45i\ || errno == ENOENT' gnulib-tests/test-getlogin.c + # Apply upstream fixes, remove after 8.20 + cd $(DIR_APP) && patch -p1 -i $(DIR_PATCHES)/$(THISAPP)_mountlist.patch + cd $(DIR_APP)/gnulib-tests && patch -p2 -i $(DIR_PATCHES)/$(THISAPP)_tests-getlogin.patch ifeq "$(STAGE)" "toolchain" # hostname is used on base stage by coreutils configure and perl base tests @@ -97,9 +98,11 @@ sed -i -e '/\.\/bin\/cat$$/d' -e '/\/echo$$/d' -e '/\/pwd$$/d' /usr/src/lsalr # no hostname here since we use hostname from net-tools in ISO cd $(DIR_APP) && FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr --disable-nls --enable-no-install-program=kill,uptime - # doc and manpage generation is causing trouble when building with full hardening, so completely remove it - cd $(DIR_APP) && sed -i 's/doc man//' Makefile - cd $(DIR_APP) && make -j $(PARALLELISM) + + # check after 8.20 where some issues with perl and parallel build get fixed for the doc + # doc and manpage generation is causing trouble when building with full hardening, so completely remove it + cd $(DIR_APP) && sed -i 's/doc man//' Makefile + cd $(DIR_APP) && make -j $(PARALLELISM) V=1 ifeq "$(RUNNING_TEST)" "yes" # To run just one test, add TESTS=[full-test-name] VERBOSE=yes @@ -112,17 +115,14 @@ # Commented for now. Never certain to restore permission if you stop during tests and restart the tests from another tty. #chmod o+r `tty` - -cd $(DIR_APP) && make -j 1 NON_ROOT_USERNAME=nobody check-root &> $(DIR_TEST)/$(THISAPP)-$(STAGE_ORDER).log + # Add SUBDIRS= for 8.20 to avoid undue recursion in gnulib directory that create errors + -cd $(DIR_APP) && make -j 1 NON_ROOT_USERNAME=nobody SUBDIRS= check-root &> $(DIR_TEST)/$(THISAPP)-$(STAGE_ORDER).log - # Temporary during tests - echo "dummy:x:1000:nobody" >> /etc/group # To be able to run non-root tests as nobody chown -R nobody $(DIR_APP) - -cd $(DIR_APP) && su nobody -s /bin/bash -c "PATH=$(PATH) make -j 1 -k RUN_EXPENSIVE_TESTS=yes check" \ + -cd $(DIR_APP) && su nobody -s /bin/bash -c "PATH=${PATH} make -j 1 -k RUN_EXPENSIVE_TESTS=yes check" \ >> $(DIR_TEST)/$(THISAPP)-$(STAGE_ORDER).log 2>&1 endif - # need to be outside ifeq/endif in case a test fail and you recompile without test - -sed -i '/dummy/d' /etc/group rm -f /tmp/root-owned /foo #chmod o-r `tty` Modified: ipcop/trunk/lfs/fix-up =================================================================== --- ipcop/trunk/lfs/fix-up 2012-11-18 14:03:03 UTC (rev 6853) +++ ipcop/trunk/lfs/fix-up 2012-11-18 19:10:29 UTC (rev 6854) @@ -57,6 +57,8 @@ # Reset settings made just for build (at every stage as easier to add later from a know content) # Remove fqdn localhost alias entire line and full IPv6 localhost sed -i -e 's/localhost.*/localhost/' -e '/^127.0.1.1.*$$/d' -e '/^::1.*\|fe00::0.*\|ff00::0.*\|ff02::.*/d' /etc/hosts + # Needed for util-linux and coreutils tests + sed -i '/dummy/d' /etc/group ifeq "$(STAGE)" "base" # Initialize settings needed during build, but not include in .iso @@ -68,4 +70,6 @@ echo 'ff02::1 ipv6-allnodes' >>/etc/hosts echo 'ff02::2 ipv6-allrouters' >>/etc/hosts echo 'ff02::3 ipv6-allhostsf' >>/etc/hosts + + echo "dummy:x:1000:nobody" >> /etc/group endif Added: ipcop/trunk/src/patches/coreutils-8.20_mountlist.patch =================================================================== --- ipcop/trunk/src/patches/coreutils-8.20_mountlist.patch (rev 0) +++ ipcop/trunk/src/patches/coreutils-8.20_mountlist.patch 2012-11-18 19:10:29 UTC (rev 6854) @@ -0,0 +1,53 @@ +# from gnulib tree, git diff 51e801f2f297e45a24004ee6256dd1a6c7389074.. + +diff --git a/lib/mountlist.c b/lib/mountlist.c +index 67154b8..d0fe1b2 100644 +--- a/lib/mountlist.c ++++ b/lib/mountlist.c +@@ -149,16 +149,27 @@ + #undef opendir + #undef closedir + +-#ifndef ME_DUMMY +-# define ME_DUMMY(Fs_name, Fs_type) \ +- (strcmp (Fs_type, "autofs") == 0 \ +- || strcmp (Fs_type, "none") == 0 \ +- || strcmp (Fs_type, "proc") == 0 \ +- || strcmp (Fs_type, "subfs") == 0 \ +- /* for NetBSD 3.0 */ \ +- || strcmp (Fs_type, "kernfs") == 0 \ +- /* for Irix 6.5 */ \ +- || strcmp (Fs_type, "ignore") == 0) ++#define ME_DUMMY_0(Fs_name, Fs_type) \ ++ (strcmp (Fs_type, "autofs") == 0 \ ++ || strcmp (Fs_type, "proc") == 0 \ ++ || strcmp (Fs_type, "subfs") == 0 \ ++ /* for NetBSD 3.0 */ \ ++ || strcmp (Fs_type, "kernfs") == 0 \ ++ /* for Irix 6.5 */ \ ++ || strcmp (Fs_type, "ignore") == 0) ++ ++/* Historically, we have marked as "dummy" any file system of type "none", ++ but now that programs like du need to know about bind-mounted directories, ++ we grant an exception to any with "bind" in its list of mount options. ++ I.e., those are *not* dummy entries. */ ++#ifdef MOUNTED_GETMNTENT1 ++# define ME_DUMMY(Fs_name, Fs_type, Fs_ent) \ ++ (ME_DUMMY_0 (Fs_name, Fs_type) \ ++ || (strcmp (Fs_type, "none") == 0 \ ++ && !hasmntopt (Fs_ent, "bind"))) ++#else ++# define ME_DUMMY(Fs_name, Fs_type) \ ++ (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0) + #endif + + #ifdef __CYGWIN__ +@@ -419,7 +430,7 @@ read_file_system_list (bool need_fs_type) + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; +- me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); ++ me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, mnt); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = dev_from_mount_options (mnt->mnt_opts); + Added: ipcop/trunk/src/patches/coreutils-8.20_tests-getlogin.patch =================================================================== --- ipcop/trunk/src/patches/coreutils-8.20_tests-getlogin.patch (rev 0) +++ ipcop/trunk/src/patches/coreutils-8.20_tests-getlogin.patch 2012-11-18 19:10:29 UTC (rev 6854) @@ -0,0 +1,96 @@ +From 4f81aa5778dc88b99d21ad8d04a4bc9401366311 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <egg...@cs.ucla.edu> +Date: Fri, 9 Nov 2012 01:03:33 -0800 +Subject: [PATCH] getlogin-tests: allow errno == ENOENT + +* tests/test-getlogin.c (main): Skip tests if getlogin fails +with errno == ENOENT. This happened to me on Ubuntu 12.04.1 x86, +when running a test in an Emacs shell buffer. +--- + ChangeLog | 7 +++++++ + tests/test-getlogin.c | 7 +++++++ + 2 files changed, 14 insertions(+), 0 deletions(-) + +#diff --git a/ChangeLog b/ChangeLog +#index 7e0129e..cca6c07 100644 +#--- a/ChangeLog +#+++ b/ChangeLog +#@@ -1,3 +1,10 @@ +#+2012-11-09 Paul Eggert <egg...@cs.ucla.edu> +#+ +#+ getlogin-tests: allow errno == ENOENT +#+ * tests/test-getlogin.c (main): Skip tests if getlogin fails +#+ with errno == ENOENT. This happened to me on Ubuntu 12.04.1 x86, +#+ when running a test in an Emacs shell buffer. +#+ + 2012-11-08 Jim Meyering <j...@meyering.net> + + tests/nap.h: avoid warning about unused variable +diff --git a/tests/test-getlogin.c b/tests/test-getlogin.c +index 449ceaa..d86fec2 100644 +--- a/tests/test-getlogin.c ++++ b/tests/test-getlogin.c +@@ -39,6 +39,13 @@ main (void) + buf = getlogin (); + if (buf == NULL) + { ++ if (errno == ENOENT) ++ { ++ /* This can happen on GNU/Linux. */ ++ fprintf (stderr, "Skipping test: no entry in utmp file.\n"); ++ return 77; ++ } ++ + /* getlogin() fails when stdin is not connected to a tty. */ + ASSERT (errno == ENOTTY + || errno == EINVAL /* seen on Linux/SPARC */ +-- + +From bfe5b0dfd062fb9ffbc61b27a0d750c41abc1a8e Mon Sep 17 00:00:00 2001 +From: =?utf8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com> +Date: Fri, 9 Nov 2012 11:55:25 +0000 +Subject: [PATCH] getlogin_r-tests: allow errno == ENXIO or ENOENT + +* tests/test-getlogin.c (main): Skip tests if getlogin fails +with errno == ENXIO (No controlling tty). +* tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails +with errno == ENOENT. This was reported to happen in various +situations on GNU/Linux. +--- + ChangeLog | 10 ++++++++++ + tests/test-getlogin.c | 1 + + tests/test-getlogin_r.c | 8 ++++++++ + 3 files changed, 19 insertions(+), 0 deletions(-) + +#diff --git a/ChangeLog b/ChangeLog +#index cca6c07..67e0342 100644 +#--- a/ChangeLog +#+++ b/ChangeLog +#@@ -1,3 +1,13 @@ +#+2012-11-09 Pádraig Brady <p...@draigbrady.com> +#+ +#+ getlogin-tests: allow errno == ENXIO +#+ * tests/test-getlogin.c (main): Skip tests if getlogin fails +#+ with errno == ENXIO (No controlling tty). +#+ getlogin_r-tests: Likewise. Also allow errno == ENOENT +#+ * tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails +#+ with errno == ENOENT. This was reported to happen in various +#+ situations on GNU/Linux. +#+ +# 2012-11-09 Paul Eggert <egg...@cs.ucla.edu> +# +# getlogin-tests: allow errno == ENOENT +diff --git a/tests/test-getlogin.c b/tests/test-getlogin.c +index d86fec2..f7903ae 100644 +--- a/tests/test-getlogin.c ++++ b/tests/test-getlogin.c +@@ -49,6 +49,7 @@ main (void) + /* getlogin() fails when stdin is not connected to a tty. */ + ASSERT (errno == ENOTTY + || errno == EINVAL /* seen on Linux/SPARC */ ++ || errno == ENXIO + ); + #if !defined __hpux /* On HP-UX 11.11 it fails anyway. */ + ASSERT (! isatty (0)); + +# troncated to the only part (test-getlogin.c) that apply in coreutils Modified: ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0 =================================================================== --- ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0 2012-11-18 14:03:03 UTC (rev 6853) +++ ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0 2012-11-18 19:10:29 UTC (rev 6854) @@ -132,7 +132,7 @@ /usr/sbin/conntrack /usr/sbin/nfct ## -## coreutils-8.19 +## coreutils-8.20 /bin/cat /bin/chgrp /bin/chmod Modified: ipcop/trunk/updates/2.1.0/information.xml =================================================================== --- ipcop/trunk/updates/2.1.0/information.xml 2012-11-18 14:03:03 UTC (rev 6853) +++ ipcop/trunk/updates/2.1.0/information.xml 2012-11-18 19:10:29 UTC (rev 6854) @@ -8,7 +8,7 @@ Add xz-5.0.4<br /> Language updates.<br /> Upgrade acpid to 2.0.17, arping to 2.12, bash to 4.2.39, bind to 9.8.4, CnxADSL to ..PIM-2.6-2.7 - conntrack-tools to 1.2.2, coreutils to 8.19, dhcpcd to 5.6.3, dnsmasq to 2.63, + conntrack-tools to 1.2.2, coreutils to 8.20, dhcpcd to 5.6.3, dnsmasq to 2.63, e2fsprogs to 1.42.5, ethtool to 3.2, expat to 2.1.0, freetype to 2.4.10, fontconfig to 2.9, gawk to 4.0.1, glib to 2.30.3, gmp to 5.0.5, gnupg to 1.4.12, grep to 2.14, gzip to 1.5, iproute2 to 3.6.0, iptables to 1.4.16.3, iptstate to 2.2.5, iputils to s20121011, iw to 3.7, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn