From b247b29d81d0d284665f14ec2c226579818c81a3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 10 Dec 2007 22:01:38 +0000 Subject: [PATCH 01/86] Initialize branch OLPC-2 for util-linux-ng --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..a62db9e --- /dev/null +++ b/branch @@ -0,0 +1 @@ +OLPC-2 From 92483e58f53bf52fb00d166a55dda3f6b219f05c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 11 Dec 2007 17:58:53 +0000 Subject: [PATCH 02/86] BuildRequires popt not popt-devel --- util-linux-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3918669..cac0639 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -33,7 +33,7 @@ BuildRequires: pam-devel BuildRequires: slang-devel BuildRequires: texinfo BuildRequires: zlib-devel -BuildRequires: popt-devel +BuildRequires: popt ### Sources #Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.tar.bz2 @@ -525,6 +525,9 @@ exit 0 /sbin/losetup %changelog +* Tue Dec 11 2007 Dennis Gilmore 2.13.1-0.2 +- BR popt since popt-devel does not exist on F-7 which olpc is based on + * Sun Dec 9 2007 Karel Zak 2.13.1-0.1 - update to the latest upstream stable branch (commit: fda9d11739ee88c3b2f22a73f12ec019bd3b8335) From 5721e3ad7afc5375d23f5cc307d47f9336a9482e Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 12 Dec 2007 14:35:35 +0000 Subject: [PATCH 03/86] - remove viwp and vigr (in favour of shadow-utils) --- util-linux-ng.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3918669..78c471b 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -245,13 +245,14 @@ rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_ # deprecated commands for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /sbin/shutdown %{_bindir}/scriptreplay; do + /sbin/shutdown %{_bindir}/scriptreplay /usr/sbin/vipw /usr/sbin/vigr; do rm -f $RPM_BUILD_ROOT$I done # deprecated man pages for I in man1/chkdupexe.1 man1/line.1 man1/pg.1 man1/newgrp.1 \ - man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 man1/scriptreplay.1; do + man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 man1/scriptreplay.1 \ + man8/vipw.8 man8/vigr; do rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* done @@ -446,8 +447,6 @@ exit 0 %ifnarch s390 s390x %{_sbindir}/tunelp %endif -%{_sbindir}/vipw -%{_sbindir}/vigr %{_sbindir}/rtcwake %{_infodir}/ipc.info* @@ -507,8 +506,6 @@ exit 0 %ifnarch s390 s390x %{_mandir}/man8/tunelp.8* %endif -%{_mandir}/man8/vigr.8* -%{_mandir}/man8/vipw.8* %{_mandir}/man8/setarch.8* %{_mandir}/man8/rtcwake.8* @@ -525,6 +522,9 @@ exit 0 /sbin/losetup %changelog +* Wed Dec 12 2007 Karel Zak 2.13.1-0.2 +- remove viwp and vigr (in favour of shadow-utils) + * Sun Dec 9 2007 Karel Zak 2.13.1-0.1 - update to the latest upstream stable branch (commit: fda9d11739ee88c3b2f22a73f12ec019bd3b8335) From ddac4121eda58134bcb9eb5b26d90184160bc95a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 12 Dec 2007 21:45:28 +0000 Subject: [PATCH 04/86] - Fix pam files so that pam_keyinit happens after pam_selinux.so --- util-linux-ng-login.pamd | 5 +++-- util-linux-ng-remote.pamd | 6 +++--- util-linux-ng.spec | 5 ++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/util-linux-ng-login.pamd b/util-linux-ng-login.pamd index 9e8ca3b..ccaae25 100644 --- a/util-linux-ng-login.pamd +++ b/util-linux-ng-login.pamd @@ -6,10 +6,11 @@ account include system-auth password include system-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close -session optional pam_keyinit.so force revoke -session include system-auth session required pam_loginuid.so session optional pam_console.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open +session required pam_namespace.so +session optional pam_keyinit.so force revoke session optional pam_ck_connector.so +session include system-auth diff --git a/util-linux-ng-remote.pamd b/util-linux-ng-remote.pamd index 705203e..24fc8b7 100644 --- a/util-linux-ng-remote.pamd +++ b/util-linux-ng-remote.pamd @@ -6,10 +6,10 @@ account include system-auth password include system-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close -session optional pam_keyinit.so force revoke -session include system-auth session required pam_loginuid.so session optional pam_console.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open - +session required pam_namespace.so +session optional pam_keyinit.so force revoke +session include system-auth diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 78c471b..c61d07b 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -522,6 +522,9 @@ exit 0 /sbin/losetup %changelog +* Wed Dec 12 2007 Dan Walsh 2.13.1-0.3 +- Fix pam files so that pam_keyinit happens after pam_selinux.so + * Wed Dec 12 2007 Karel Zak 2.13.1-0.2 - remove viwp and vigr (in favour of shadow-utils) From d24ef33bc41c437d223dfd959c781398a2947d26 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 12 Dec 2007 22:06:53 +0000 Subject: [PATCH 05/86] fix ordering of pam_ck_connector --- util-linux-ng-login.pamd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux-ng-login.pamd b/util-linux-ng-login.pamd index ccaae25..2c0c0b2 100644 --- a/util-linux-ng-login.pamd +++ b/util-linux-ng-login.pamd @@ -12,5 +12,5 @@ session optional pam_console.so session required pam_selinux.so open session required pam_namespace.so session optional pam_keyinit.so force revoke -session optional pam_ck_connector.so session include system-auth +session optional pam_ck_connector.so From fb66c6b778c54b980c9f8f107221fa90f4a1e7d1 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 2 Jan 2008 14:27:25 +0000 Subject: [PATCH 06/86] - update to upstream 2.13.1-rc2 --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.cvsignore b/.cvsignore index abb94ad..7d2e78f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.13.1-rc1.20071204git.tar.bz2 +util-linux-ng-2.13.1-rc2.tar.bz2 diff --git a/sources b/sources index 6700307..b9b8f62 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -f7fec981f29ee28efb2b048562f3348b util-linux-ng-2.13.1-rc1.20071204git.tar.bz2 +1c0e6cd22a4cc1ee6a6c6a2f36a679f2 util-linux-ng-2.13.1-rc2.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index c61d07b..001356c 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -36,8 +36,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -#Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.tar.bz2 -Source0: util-linux-ng-2.13.1-rc1.20071204git.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.1-rc2.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -113,7 +112,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 -n util-linux-ng-2.13.1-rc1 +%setup -q -a 11 -n util-linux-ng-2.13.1-rc2 cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 @@ -522,7 +521,10 @@ exit 0 /sbin/losetup %changelog -* Wed Dec 12 2007 Dan Walsh 2.13.1-0.3 +* Wed Jan 2 2008 Karel Zak 2.13.1-2 +- update to upstream 2.13.1-rc2 + +* Wed Dec 12 2007 Dan Walsh 2.13.1-1 - Fix pam files so that pam_keyinit happens after pam_selinux.so * Wed Dec 12 2007 Karel Zak 2.13.1-0.2 From 4357e7635a6f9d1840e432387205dc32214b48a4 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 28 Jan 2008 13:50:47 +0000 Subject: [PATCH 07/86] - upgrade to new upstream release - fix #427874 - util-linux-ng gets "excess command line argument" on update --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7d2e78f..6837dd2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.13.1-rc2.tar.bz2 +util-linux-ng-2.13.1.tar.bz2 diff --git a/sources b/sources index b9b8f62..6e1d8d9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -1c0e6cd22a4cc1ee6a6c6a2f36a679f2 util-linux-ng-2.13.1-rc2.tar.bz2 +424badc1832e4b5291a2ec04e9e244f4 util-linux-ng-2.13.1.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 001356c..84216e4 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -36,7 +36,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.1-rc2.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.1.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -112,7 +112,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 -n util-linux-ng-2.13.1-rc2 +%setup -q -a 11 cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 @@ -313,7 +313,7 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post -/sbin/install-info %{_infodir}/ipc.info* %{_infodir}/dir +/sbin/install-info %{_infodir}/ipc.info %{_infodir}/dir # only for minimal buildroots without /var/log [ -d /var/log ] || /bin/mkdir -p /var/log /bin/touch /var/log/lastlog @@ -333,7 +333,7 @@ fi %preun if [ "$1" = 0 ]; then - /sbin/install-info --del %{_infodir}/ipc.info* %{_infodir}/dir + /sbin/install-info --del %{_infodir}/ipc.info %{_infodir}/dir fi exit 0 @@ -521,6 +521,10 @@ exit 0 /sbin/losetup %changelog +* Mon Jan 28 2008 Karel Zak 2.13.1-3 +- upgrade to new upstream release +- fix #427874 - util-linux-ng gets "excess command line argument" on update + * Wed Jan 2 2008 Karel Zak 2.13.1-2 - update to upstream 2.13.1-rc2 From 314efc77804f73527567b64c5c898401b73ef2fb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 10:38:02 +0000 Subject: [PATCH 08/86] - Autorebuild for GCC 4.3 --- util-linux-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 84216e4..e9f13d9 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -521,6 +521,9 @@ exit 0 /sbin/losetup %changelog +* Tue Feb 19 2008 Fedora Release Engineering - 2.13.1-4 +- Autorebuild for GCC 4.3 + * Mon Jan 28 2008 Karel Zak 2.13.1-3 - upgrade to new upstream release - fix #427874 - util-linux-ng gets "excess command line argument" on update From de2a7463943c4bc8292f3bba51a607c16fa2ef2b Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 26 Mar 2008 15:30:40 +0000 Subject: [PATCH 09/86] clean up sparc conditionals --- util-linux-ng.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index e9f13d9..95adfae 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -17,7 +17,7 @@ URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng ### Macros %define floppyver 0.16 %define no_hwclock_archs s390 s390x -%define no_cfsfdisk_archs sparc ssparc64 +%define no_cfsfdisk_archs sparc sparcv9 sparc64 %define cytune_archs %{ix86} alpha armv4l ### Paths @@ -62,7 +62,7 @@ Obsoletes: util-linux < 2.13.1 Provides: util-linux = %{version}-%{release} # setarch merge in util-linux-ng-2.13 -%ifarch sparc sparc64 +%ifarch sparc sparcv9 sparc64 Obsoletes: sparc32 %endif Obsoletes: setarch < 2.1 @@ -521,6 +521,9 @@ exit 0 /sbin/losetup %changelog +* Wed Mar 26 2008 Tom "spot" Callaway - 2.13.1-5 +- clean up sparc conditionals + * Tue Feb 19 2008 Fedora Release Engineering - 2.13.1-4 - Autorebuild for GCC 4.3 From 60528e2a988bebe92400f2fdbd9781bb108a6e1d Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 2 Apr 2008 14:12:59 +0000 Subject: [PATCH 10/86] - fix 439984 - backport mkswap -U --- util-linux-ng-2.13-mkswap-uuid.patch | 73 +++++++++++++++++++++++ util-linux-ng-2.13-swapon-swsuspend.patch | 56 ++++++++--------- util-linux-ng.spec | 8 ++- 3 files changed, 105 insertions(+), 32 deletions(-) create mode 100644 util-linux-ng-2.13-mkswap-uuid.patch diff --git a/util-linux-ng-2.13-mkswap-uuid.patch b/util-linux-ng-2.13-mkswap-uuid.patch new file mode 100644 index 0000000..49c8b2d --- /dev/null +++ b/util-linux-ng-2.13-mkswap-uuid.patch @@ -0,0 +1,73 @@ +diff -up util-linux-ng-2.13.1/disk-utils/mkswap.c.uuid util-linux-ng-2.13.1/disk-utils/mkswap.c +--- util-linux-ng-2.13.1/disk-utils/mkswap.c.uuid 2008-01-16 10:31:41.000000000 +0100 ++++ util-linux-ng-2.13.1/disk-utils/mkswap.c 2008-04-02 16:07:47.000000000 +0200 +@@ -351,7 +351,7 @@ bit_test_and_clear (unsigned long *addr, + static void + usage(void) { + fprintf(stderr, +- _("Usage: %s [-c] [-v0|-v1] [-pPAGESZ] [-L label] /dev/name [blocks]\n"), ++ _("Usage: %s [-c] [-v0|-v1] [-pPAGESZ] [-L label] [-U UUID] /dev/name [blocks]\n"), + program_name); + exit(1); + } +@@ -502,6 +502,7 @@ main(int argc, char ** argv) { + char *opt_label = NULL; + unsigned char *uuid = NULL; + #ifdef HAVE_LIBUUID ++ unsigned char *opt_uuid = NULL; + uuid_t uuid_dat; + #endif + +@@ -546,6 +547,16 @@ main(int argc, char ** argv) { + case 'v': + version = atoi(argv[i]+2); + break; ++ case 'U': ++#ifdef HAVE_LIBUUID ++ opt_uuid = argv[i]+2; ++ if (!*opt_uuid && i+1 < argc) ++ opt_uuid = argv[++i]; ++#else ++ fprintf(stderr, _("%1$s: warning: ignore -U (UUIDs are unsupported by %1$s)\n"), ++ program_name); ++#endif ++ break; + default: + usage(); + } +@@ -558,7 +569,11 @@ main(int argc, char ** argv) { + } + + #ifdef HAVE_LIBUUID +- uuid_generate(uuid_dat); ++ if(opt_uuid) { ++ if (uuid_parse(opt_uuid, uuid_dat) != 0) ++ die(_("error: UUID parsing failed")); ++ } else ++ uuid_generate(uuid_dat); + uuid = uuid_dat; + #endif + +diff -up util-linux-ng-2.13.1/disk-utils/mkswap.8.uuid util-linux-ng-2.13.1/disk-utils/mkswap.8 +--- util-linux-ng-2.13.1/disk-utils/mkswap.8.uuid 2007-08-27 15:00:34.000000000 +0200 ++++ util-linux-ng-2.13.1/disk-utils/mkswap.8 2008-04-02 16:07:47.000000000 +0200 +@@ -7,7 +7,7 @@ + .SH NAME + mkswap \- set up a Linux swap area + .SH SYNOPSIS +-.BI "mkswap [\-c] [\-v" N "] [\-f] [\-p " PSZ "] [\-L " label "] " device " [" size "]" ++.BI "mkswap [\-c] [\-v" N "] [\-f] [\-p " PSZ "] [\-L " label "] [\-U " uuid "] " device " [" size "]" + .SH DESCRIPTION + .B mkswap + sets up a Linux swap area on a device or in a file. +@@ -156,6 +156,10 @@ when creating the swapspace. + + Version 0 (-v0) swap space format is no longer supported in 2.5+ kernels. + ++.TP ++.B \-U uuid ++Specify the uuid to use. The default is to generate UUIDs. ++ + .SH "SEE ALSO" + .BR fdisk (8), + .BR swapon (8) diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch index 28b7ce3..5a39b06 100644 --- a/util-linux-ng-2.13-swapon-swsuspend.patch +++ b/util-linux-ng-2.13-swapon-swsuspend.patch @@ -1,21 +1,6 @@ -From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 30 May 2007 13:22:51 +0200 -Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data - -We have to reinitialize swap area with old (=useless) software suspend -data. The problem is that if we don't do it, then we get data -corruption the next time with suspended on. - -Signed-off-by: Karel Zak ---- - mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 63 insertions(+), 0 deletions(-) - -diff --git a/mount/swapon.c b/mount/swapon.c -index ed91afc..3f9b442 100644 ---- a/mount/swapon.c -+++ b/mount/swapon.c +diff -up util-linux-ng-2.13.1/mount/swapon.c.reinit util-linux-ng-2.13.1/mount/swapon.c +--- util-linux-ng-2.13.1/mount/swapon.c.reinit 2008-01-16 10:31:41.000000000 +0100 ++++ util-linux-ng-2.13.1/mount/swapon.c 2008-04-02 16:00:24.000000000 +0200 @@ -10,6 +10,9 @@ #include #include @@ -35,22 +20,25 @@ index ed91afc..3f9b442 100644 #ifdef HAVE_SYS_SWAP_H # include #endif -@@ -158,6 +163,52 @@ display_summary(void) +@@ -158,6 +163,64 @@ display_summary(void) } static int -+swap_is_swsuspend(const char *device) { ++swap_is_suspend(const char *device) { + const char *type = fsprobe_get_fstype_by_devname(device); + -+ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; ++ return (type && strcmp(type, "suspend") == 0) ? 1 : 0; +} + +/* calls mkswap */ +static int +swap_reinitialize(const char *device) { + const char *label = fsprobe_get_label_by_devname(device); ++ const char *uuid = fsprobe_get_uuid_by_devname(device); + pid_t pid; + int status, ret; ++ char *cmd[7]; ++ int idx=0; + + switch((pid=fork())) { + case -1: /* fork error */ @@ -59,10 +47,19 @@ index ed91afc..3f9b442 100644 + return -1; + + case 0: /* child */ -+ if (label && *label) -+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL); -+ else -+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL); ++ cmd[idx++] = PATH_MKSWAP; ++ if (label && *label) { ++ cmd[idx++] = "-L"; ++ cmd[idx++] = (char *) label; ++ } ++ if (uuid && *uuid) { ++ cmd[idx++] = "-U"; ++ cmd[idx++] = (char *) uuid; ++ } ++ cmd[idx++] = (char *) device; ++ cmd[idx++] = NULL; ++ execv(cmd[0], cmd); ++ perror("execv"); + exit(1); /* error */ + + default: /* parent */ @@ -88,15 +85,15 @@ index ed91afc..3f9b442 100644 do_swapon(const char *orig_special, int prio, int canonic) { int status; struct stat st; -@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) { +@@ -179,6 +242,18 @@ do_swapon(const char *orig_special, int return -1; } + /* We have to reinitialize swap with old (=useless) software suspend + * data. The problem is that if we don't do it, then we get data -+ * corruption the next time with suspended on. ++ * corruption the next time an attempt at unsuspending is made. + */ -+ if (swap_is_swsuspend(special)) { ++ if (swap_is_suspend(special)) { + fprintf(stdout, _("%s: %s: software suspend data detected. " + "Reinitializing the swap.\n"), + progname, special); @@ -107,6 +104,3 @@ index ed91afc..3f9b442 100644 /* people generally dislike this warning - now it is printed only when `verbose' is set */ if (verbose) { --- -1.5.2.2 - diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 95adfae..05872d9 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -104,6 +104,8 @@ Patch10: util-linux-ng-2.13-swapon-swsuspend.patch Patch11: util-linux-ng-2.13-floppy-locale.patch # remove partitions Patch12: util-linux-ng-2.13-blockdev-rmpart.patch +# 439984 - backport mkswap -U +Patch13: util-linux-ng-2.13-mkswap-uuid.patch %description The util-linux-ng package contains a large variety of low-level system @@ -128,6 +130,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -521,6 +524,9 @@ exit 0 /sbin/losetup %changelog +* Wed Apr 2 2008 Karel Zak 2.13.1-6 +- fix 439984 - backport mkswap -U + * Wed Mar 26 2008 Tom "spot" Callaway - 2.13.1-5 - clean up sparc conditionals From eb6c545ff2cb1a79570c4199c91187478bd32d1b Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 15 Apr 2008 21:26:19 +0000 Subject: [PATCH 11/86] - fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND --- util-linux-ng-2.13-swapon-swsuspend.patch | 2 +- util-linux-ng.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch index 5a39b06..17ae0f4 100644 --- a/util-linux-ng-2.13-swapon-swsuspend.patch +++ b/util-linux-ng-2.13-swapon-swsuspend.patch @@ -27,7 +27,7 @@ diff -up util-linux-ng-2.13.1/mount/swapon.c.reinit util-linux-ng-2.13.1/mount/s +swap_is_suspend(const char *device) { + const char *type = fsprobe_get_fstype_by_devname(device); + -+ return (type && strcmp(type, "suspend") == 0) ? 1 : 0; ++ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; +} + +/* calls mkswap */ diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 05872d9..b69ada0 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -524,6 +524,9 @@ exit 0 /sbin/losetup %changelog +* Tue Apr 15 2008 Karel Zak 2.13.1-7 +- fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND + * Wed Apr 2 2008 Karel Zak 2.13.1-6 - fix 439984 - backport mkswap -U From 87a1058ffc1bf9b900e94bb36e101efa2848a81c Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 16 Apr 2008 23:01:27 +0000 Subject: [PATCH 12/86] - fix location of the command raw(8) --- util-linux-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b69ada0..7ed5e22 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -290,7 +290,7 @@ done # /sbin -> /bin for I in raw; do if [ -e $RPM_BUILD_ROOT/sbin/$I ]; then - mv $RPM_BUILD_ROOT/sbin/$I $RPM_BUILD_ROOT/$I + mv $RPM_BUILD_ROOT/sbin/$I $RPM_BUILD_ROOT/bin/$I fi done @@ -524,6 +524,9 @@ exit 0 /sbin/losetup %changelog +* Thu Apr 17 2008 Karel Zak 2.13.1-8 +- fix location of the command raw(8) + * Tue Apr 15 2008 Karel Zak 2.13.1-7 - fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND From 384230c51df8669aa7cfd0903f0e520d61825ace Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 22 Apr 2008 19:35:02 +0000 Subject: [PATCH 13/86] - fix audit log injection attack via login --- util-linux-ng-2.13-login-audit.patch | 51 ++++++++++++++++++++++++++++ util-linux-ng.spec | 8 ++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.13-login-audit.patch diff --git a/util-linux-ng-2.13-login-audit.patch b/util-linux-ng-2.13-login-audit.patch new file mode 100644 index 0000000..d564577 --- /dev/null +++ b/util-linux-ng-2.13-login-audit.patch @@ -0,0 +1,51 @@ +From 8ccf0b253ac0f4f58d64bc9674de18bff5a88782 Mon Sep 17 00:00:00 2001 +From: Steve Grubb +Date: Sat, 19 Apr 2008 11:49:02 -0400 +Subject: [PATCH] login: audit log injection attack via login + +A while back I found a couple audit log injection attacks which became +CVE-2007-3102. I forgot to look at login to see if its vulnerable and Mirek +found that it is. To verify the problem, type: + +root addr=xyz.com + +for the account name while logging in. It will look like root logged in with +an address of xyz.com. + +Signed-off-by: Steve Grubb +--- + login-utils/login.c | 10 +++------- + 1 files changed, 3 insertions(+), 7 deletions(-) + +diff --git a/login-utils/login.c b/login-utils/login.c +index aad2779..2301213 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -324,7 +324,6 @@ static void + logaudit(const char *tty, const char *username, const char *hostname, + struct passwd *pwd, int status) + { +- char buf[64]; + int audit_fd; + + audit_fd = audit_open(); +@@ -332,13 +331,10 @@ logaudit(const char *tty, const char *username, const char *hostname, + return; + if (!pwd && username) + pwd = getpwnam(username); +- if (pwd) +- snprintf(buf, sizeof(buf), "uid=%d", pwd->pw_uid); +- else +- snprintf(buf, sizeof(buf), "acct=%s", username ? username : "(unknown)"); + +- audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, +- buf, hostname, NULL, tty, status); ++ audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN, ++ NULL, "login", username ? username : "(unknown)", ++ pwd ? pwd->pw_uid : -1, hostname, NULL, tty, status); + + close(audit_fd); + } +-- +1.5.4.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 7ed5e22..80a2d88 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.13.1 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -106,6 +106,8 @@ Patch11: util-linux-ng-2.13-floppy-locale.patch Patch12: util-linux-ng-2.13-blockdev-rmpart.patch # 439984 - backport mkswap -U Patch13: util-linux-ng-2.13-mkswap-uuid.patch +# CVE-2007-3102 +Patch14: util-linux-ng-2.13-login-audit.patch %description The util-linux-ng package contains a large variety of low-level system @@ -131,6 +133,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build unset LINGUAS || : @@ -524,6 +527,9 @@ exit 0 /sbin/losetup %changelog +* Tue Apr 22 2008 Karel Zak 2.13.1-9 +- fix audit log injection attack via login + * Thu Apr 17 2008 Karel Zak 2.13.1-8 - fix location of the command raw(8) From 6c46b9e220eb3e352353f23799894755a9be1970 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 19 May 2008 11:48:40 +0000 Subject: [PATCH 14/86] - upgrade to 2.14-rc3 - remove arch(8) (deprecated in favor of uname(1) or arch(1) from coreutils) - add a new command ldattach(8) - cfdisk(8) linked with libncursesw --- util-linux-ng-2.13-mkswap-uuid.patch | 73 ------------ util-linux-ng-2.13-mount-twiceloop.patch | 71 ------------ util-linux-ng-2.13-swapon-swsuspend.patch | 106 ------------------ ...> util-linux-ng-2.14-blockdev-rmpart.patch | 42 +++---- ... => util-linux-ng-2.14-mount-managed.patch | 9 +- util-linux-ng.spec | 41 +++---- 6 files changed, 36 insertions(+), 306 deletions(-) delete mode 100644 util-linux-ng-2.13-mkswap-uuid.patch delete mode 100644 util-linux-ng-2.13-mount-twiceloop.patch delete mode 100644 util-linux-ng-2.13-swapon-swsuspend.patch rename util-linux-ng-2.13-blockdev-rmpart.patch => util-linux-ng-2.14-blockdev-rmpart.patch (61%) rename util-linux-ng-2.13-mount-managed.patch => util-linux-ng-2.14-mount-managed.patch (50%) diff --git a/util-linux-ng-2.13-mkswap-uuid.patch b/util-linux-ng-2.13-mkswap-uuid.patch deleted file mode 100644 index 49c8b2d..0000000 --- a/util-linux-ng-2.13-mkswap-uuid.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -up util-linux-ng-2.13.1/disk-utils/mkswap.c.uuid util-linux-ng-2.13.1/disk-utils/mkswap.c ---- util-linux-ng-2.13.1/disk-utils/mkswap.c.uuid 2008-01-16 10:31:41.000000000 +0100 -+++ util-linux-ng-2.13.1/disk-utils/mkswap.c 2008-04-02 16:07:47.000000000 +0200 -@@ -351,7 +351,7 @@ bit_test_and_clear (unsigned long *addr, - static void - usage(void) { - fprintf(stderr, -- _("Usage: %s [-c] [-v0|-v1] [-pPAGESZ] [-L label] /dev/name [blocks]\n"), -+ _("Usage: %s [-c] [-v0|-v1] [-pPAGESZ] [-L label] [-U UUID] /dev/name [blocks]\n"), - program_name); - exit(1); - } -@@ -502,6 +502,7 @@ main(int argc, char ** argv) { - char *opt_label = NULL; - unsigned char *uuid = NULL; - #ifdef HAVE_LIBUUID -+ unsigned char *opt_uuid = NULL; - uuid_t uuid_dat; - #endif - -@@ -546,6 +547,16 @@ main(int argc, char ** argv) { - case 'v': - version = atoi(argv[i]+2); - break; -+ case 'U': -+#ifdef HAVE_LIBUUID -+ opt_uuid = argv[i]+2; -+ if (!*opt_uuid && i+1 < argc) -+ opt_uuid = argv[++i]; -+#else -+ fprintf(stderr, _("%1$s: warning: ignore -U (UUIDs are unsupported by %1$s)\n"), -+ program_name); -+#endif -+ break; - default: - usage(); - } -@@ -558,7 +569,11 @@ main(int argc, char ** argv) { - } - - #ifdef HAVE_LIBUUID -- uuid_generate(uuid_dat); -+ if(opt_uuid) { -+ if (uuid_parse(opt_uuid, uuid_dat) != 0) -+ die(_("error: UUID parsing failed")); -+ } else -+ uuid_generate(uuid_dat); - uuid = uuid_dat; - #endif - -diff -up util-linux-ng-2.13.1/disk-utils/mkswap.8.uuid util-linux-ng-2.13.1/disk-utils/mkswap.8 ---- util-linux-ng-2.13.1/disk-utils/mkswap.8.uuid 2007-08-27 15:00:34.000000000 +0200 -+++ util-linux-ng-2.13.1/disk-utils/mkswap.8 2008-04-02 16:07:47.000000000 +0200 -@@ -7,7 +7,7 @@ - .SH NAME - mkswap \- set up a Linux swap area - .SH SYNOPSIS --.BI "mkswap [\-c] [\-v" N "] [\-f] [\-p " PSZ "] [\-L " label "] " device " [" size "]" -+.BI "mkswap [\-c] [\-v" N "] [\-f] [\-p " PSZ "] [\-L " label "] [\-U " uuid "] " device " [" size "]" - .SH DESCRIPTION - .B mkswap - sets up a Linux swap area on a device or in a file. -@@ -156,6 +156,10 @@ when creating the swapspace. - - Version 0 (-v0) swap space format is no longer supported in 2.5+ kernels. - -+.TP -+.B \-U uuid -+Specify the uuid to use. The default is to generate UUIDs. -+ - .SH "SEE ALSO" - .BR fdisk (8), - .BR swapon (8) diff --git a/util-linux-ng-2.13-mount-twiceloop.patch b/util-linux-ng-2.13-mount-twiceloop.patch deleted file mode 100644 index fd8858c..0000000 --- a/util-linux-ng-2.13-mount-twiceloop.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- util-linux-ng-2.13-rc3/mount/fstab.c.kzak 2007-07-31 12:39:42.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/fstab.c 2007-08-13 12:24:40.000000000 +0200 -@@ -264,6 +264,27 @@ - return (ct == 1); - } - -+/* -+ * Given the loop file LOOPFILE, and the mount point DIR, check that -+ * same file is already mounted on same directory -+ * -+ * Don't forget there's -+ * /path/loopfile /path/dir loop=/dev/loop0 -+ * in mtab for loop devices. -+ */ -+int -+is_mounted_same_loopfile(const char *loopfile, const char *dir) { -+ struct mntentchn *mc, *mc0; -+ int ct = 0; -+ -+ mc0 = mtab_head(); -+ for (mc = mc0->prev; mc && mc != mc0; mc = mc->prev) -+ if (streq(mc->m.mnt_fsname, loopfile) && -+ streq(mc->m.mnt_dir, dir)) -+ ct++; -+ return (ct == 1); -+} -+ - /* Given the name FILE, try to find the option "loop=FILE" in mtab. */ - struct mntentchn * - getmntoptfile (const char *file) { ---- util-linux-ng-2.13-rc3/mount/fstab.h.kzak 2007-05-30 10:18:12.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/fstab.h 2007-08-13 12:24:40.000000000 +0200 -@@ -5,6 +5,7 @@ - int mtab_is_writable(void); - int mtab_does_not_exist(void); - int is_mounted_once(const char *name); -+int is_mounted_same_loopfile(const char *loopfile, const char *dir); - - struct mntentchn { - struct mntentchn *nxt, *prev; ---- util-linux-ng-2.13-rc3/mount/mount.c.kzak 2007-08-13 12:23:13.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/mount.c 2007-08-13 12:29:01.000000000 +0200 -@@ -853,7 +853,7 @@ - - static int - loop_check(const char **spec, const char **type, int *flags, -- int *loop, const char **loopdev, const char **loopfile) { -+ int *loop, const char **loopdev, const char **loopfile, const char *dir) { - int looptype; - unsigned long long offset; - -@@ -894,6 +894,10 @@ - - offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0; - -+ if (is_mounted_same_loopfile(*loopfile, dir)) { -+ error(_("mount: %s already mounted on %s"), *loopfile, dir); -+ return EX_FAIL; -+ } - do { - if (!*loopdev || !**loopdev) - *loopdev = find_unused_loop_device(); -@@ -1079,7 +1083,7 @@ - * stale assignments of files to loop devices. Nasty when used for - * encryption. - */ -- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile); -+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node); - if (res) - goto out; - } diff --git a/util-linux-ng-2.13-swapon-swsuspend.patch b/util-linux-ng-2.13-swapon-swsuspend.patch deleted file mode 100644 index 17ae0f4..0000000 --- a/util-linux-ng-2.13-swapon-swsuspend.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -up util-linux-ng-2.13.1/mount/swapon.c.reinit util-linux-ng-2.13.1/mount/swapon.c ---- util-linux-ng-2.13.1/mount/swapon.c.reinit 2008-01-16 10:31:41.000000000 +0100 -+++ util-linux-ng-2.13.1/mount/swapon.c 2008-04-02 16:00:24.000000000 +0200 -@@ -10,6 +10,9 @@ - #include - #include - #include -+#include -+#include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "nls.h" -@@ -17,6 +20,8 @@ - #include "realpath.h" - #include "mount_paths.h" - -+#define PATH_MKSWAP "/sbin/mkswap" -+ - #ifdef HAVE_SYS_SWAP_H - # include - #endif -@@ -158,6 +163,64 @@ display_summary(void) - } - - static int -+swap_is_suspend(const char *device) { -+ const char *type = fsprobe_get_fstype_by_devname(device); -+ -+ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0; -+} -+ -+/* calls mkswap */ -+static int -+swap_reinitialize(const char *device) { -+ const char *label = fsprobe_get_label_by_devname(device); -+ const char *uuid = fsprobe_get_uuid_by_devname(device); -+ pid_t pid; -+ int status, ret; -+ char *cmd[7]; -+ int idx=0; -+ -+ switch((pid=fork())) { -+ case -1: /* fork error */ -+ fprintf(stderr, _("%s: cannot fork: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ -+ case 0: /* child */ -+ cmd[idx++] = PATH_MKSWAP; -+ if (label && *label) { -+ cmd[idx++] = "-L"; -+ cmd[idx++] = (char *) label; -+ } -+ if (uuid && *uuid) { -+ cmd[idx++] = "-U"; -+ cmd[idx++] = (char *) uuid; -+ } -+ cmd[idx++] = (char *) device; -+ cmd[idx++] = NULL; -+ execv(cmd[0], cmd); -+ perror("execv"); -+ exit(1); /* error */ -+ -+ default: /* parent */ -+ do { -+ if ((ret = waitpid(pid, &status, 0)) < 0 -+ && errno == EINTR) -+ continue; -+ else if (ret < 0) { -+ fprintf(stderr, _("%s: waitpid: %s\n"), -+ progname, strerror(errno)); -+ return -1; -+ } -+ } while (0); -+ -+ /* mkswap returns: 0=suss, 1=error */ -+ if (WIFEXITED(status) && WEXITSTATUS(status)==0) -+ return 0; /* ok */ -+ } -+ return -1; /* error */ -+} -+ -+static int - do_swapon(const char *orig_special, int prio, int canonic) { - int status; - struct stat st; -@@ -179,6 +242,18 @@ do_swapon(const char *orig_special, int - return -1; - } - -+ /* We have to reinitialize swap with old (=useless) software suspend -+ * data. The problem is that if we don't do it, then we get data -+ * corruption the next time an attempt at unsuspending is made. -+ */ -+ if (swap_is_suspend(special)) { -+ fprintf(stdout, _("%s: %s: software suspend data detected. " -+ "Reinitializing the swap.\n"), -+ progname, special); -+ if (swap_reinitialize(special) < 0) -+ return -1; -+ } -+ - /* people generally dislike this warning - now it is printed - only when `verbose' is set */ - if (verbose) { diff --git a/util-linux-ng-2.13-blockdev-rmpart.patch b/util-linux-ng-2.14-blockdev-rmpart.patch similarity index 61% rename from util-linux-ng-2.13-blockdev-rmpart.patch rename to util-linux-ng-2.14-blockdev-rmpart.patch index f05edb0..a907a06 100644 --- a/util-linux-ng-2.13-blockdev-rmpart.patch +++ b/util-linux-ng-2.14-blockdev-rmpart.patch @@ -1,6 +1,6 @@ -diff -up util-linux-ng-2.13/disk-utils/blockdev.c.kzak util-linux-ng-2.13/disk-utils/blockdev.c ---- util-linux-ng-2.13/disk-utils/blockdev.c.kzak 2007-09-04 15:43:33.000000000 +0200 -+++ util-linux-ng-2.13/disk-utils/blockdev.c 2007-10-31 11:14:32.000000000 +0100 +diff -up util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm util-linux-ng-2.14-rc3/disk-utils/blockdev.c +--- util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm 2008-04-22 10:59:53.000000000 +0200 ++++ util-linux-ng-2.14-rc3/disk-utils/blockdev.c 2008-05-19 12:31:52.000000000 +0200 @@ -10,6 +10,7 @@ #include #include @@ -8,26 +8,14 @@ diff -up util-linux-ng-2.13/disk-utils/blockdev.c.kzak util-linux-ng-2.13/disk-u +#include #include "nls.h" - -@@ -32,6 +33,14 @@ - #define BLKGETSIZE64 _IOR(0x12,114,size_t) - #endif - -+#ifndef BLKPG -+#define BLKPG _IO(0x12,105) -+#define BLKPG_DEL_PARTITION 2 -+#define BLKPG_DEVNAMELTH 64 -+#define BLKPG_VOLNAMELTH 64 -+ -+#endif -+ - /* Maybe could be included */ - #ifndef HDIO_GETGEO - #define HDIO_GETGEO 0x0301 -@@ -104,6 +113,10 @@ struct bdc { - { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, - N_("reread partition table") }, - #endif + #include "blkdev.h" +@@ -47,8 +48,11 @@ struct bdc { + { "--setfra", "BLKFRASET", BLKFRASET, ARGINTA, 0, "FSREADAHEAD", N_("set filesystem readahead") }, + { "--getfra", "BLKFRAGET", BLKFRAGET, ARGLINTG, -1, NULL, N_("get filesystem readahead") }, + { "--flushbufs", "BLKFLSBUF", BLKFLSBUF, ARGNONE, 0, NULL, N_("flush buffers") }, +- { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, +- N_("reread partition table") }, ++ { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, N_("reread partition table") }, +#ifdef BLKPG + { "--rmpart", "BLKPG", BLKPG, ARGINTAP, 0, "PARTNO", N_("disable partition") }, + { "--rmparts", "BLKPG", BLKPG, ARGNONE, 0, NULL, N_("disable all partitions") }, @@ -35,8 +23,8 @@ diff -up util-linux-ng-2.13/disk-utils/blockdev.c.kzak util-linux-ng-2.13/disk-u }; #define SIZE(a) (sizeof(a)/sizeof((a)[0])) -@@ -163,6 +176,40 @@ getsize(int fd, long long *sectors) { - return 0; +@@ -89,6 +93,40 @@ find_cmd(char *s) { + return -1; } +#ifdef BLKPG @@ -76,7 +64,7 @@ diff -up util-linux-ng-2.13/disk-utils/blockdev.c.kzak util-linux-ng-2.13/disk-u void do_commands(int fd, char **argv, int d); void report_header(void); void report_device(char *device, int quiet); -@@ -280,6 +327,12 @@ do_commands(int fd, char **argv, int d) +@@ -206,6 +244,12 @@ do_commands(int fd, char **argv, int d) switch(bdcms[j].argtype) { default: case ARGNONE: @@ -89,7 +77,7 @@ diff -up util-linux-ng-2.13/disk-utils/blockdev.c.kzak util-linux-ng-2.13/disk-u res = ioctl(fd, bdcms[j].ioc, 0); break; case ARGINTA: -@@ -297,6 +350,13 @@ do_commands(int fd, char **argv, int d) +@@ -223,6 +267,13 @@ do_commands(int fd, char **argv, int d) bdcms[j].name); usage(); } diff --git a/util-linux-ng-2.13-mount-managed.patch b/util-linux-ng-2.14-mount-managed.patch similarity index 50% rename from util-linux-ng-2.13-mount-managed.patch rename to util-linux-ng-2.14-mount-managed.patch index 4f9c6f0..50a601d 100644 --- a/util-linux-ng-2.13-mount-managed.patch +++ b/util-linux-ng-2.14-mount-managed.patch @@ -1,11 +1,12 @@ ---- util-linux-ng-2.13-rc3/mount/mount.c.xxx 2007-08-07 01:20:15.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/mount.c 2007-08-13 11:58:45.000000000 +0200 -@@ -182,6 +182,8 @@ +diff -up util-linux-ng-2.14-rc3/mount/mount.c.mng util-linux-ng-2.14-rc3/mount/mount.c +--- util-linux-ng-2.14-rc3/mount/mount.c.mng 2008-05-14 12:55:32.000000000 +0200 ++++ util-linux-ng-2.14-rc3/mount/mount.c 2008-05-19 12:11:39.000000000 +0200 +@@ -176,6 +176,8 @@ static const struct opt_map opt_map[] = { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard to mtime/ctime */ #endif + { "kudzu", 0, 0, MS_COMMENT }, /* Silently remove this option (backwards compat use only - deprecated) */ + { "managed", 0, 0, MS_COMMENT }, /* Silently remove this option */ + { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */ { NULL, 0, 0, 0 } }; - diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 80a2d88..dca2ba1 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.13.1 -Release: 9%{?dist} +Version: 2.14 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -30,13 +30,12 @@ BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: ncurses-devel BuildRequires: pam-devel -BuildRequires: slang-devel BuildRequires: texinfo BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.1.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14-rc3.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -81,7 +80,7 @@ Requires: udev # 91174 - Patch to enabled remote service for login/pam Patch0: util-linux-ng-2.13-login-pamstart.patch # RHEL/Fedora specific mount options -Patch1: util-linux-ng-2.13-mount-managed.patch +Patch1: util-linux-ng-2.14-mount-managed.patch Patch2: util-linux-ng-2.13-mount-pamconsole.patch # add note about ATAPI IDE floppy to fdformat.8 Patch3: util-linux-ng-2.13-fdformat-man-ide.patch @@ -95,19 +94,10 @@ Patch6: util-linux-ng-2.13-ctrlaltdel-man.patch Patch7: util-linux-ng-2.13-fdisk-b-4096.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.13-ipcs-32bit.patch -# 174111 - mount allows loopback devices to be mounted more than once to the -# same mount point (move to upstream?) -Patch9: util-linux-ng-2.13-mount-twiceloop.patch -# 165863 - swsusp swaps should be reinitialized -Patch10: util-linux-ng-2.13-swapon-swsuspend.patch # add a missing header -Patch11: util-linux-ng-2.13-floppy-locale.patch +Patch9: util-linux-ng-2.13-floppy-locale.patch # remove partitions -Patch12: util-linux-ng-2.13-blockdev-rmpart.patch -# 439984 - backport mkswap -U -Patch13: util-linux-ng-2.13-mkswap-uuid.patch -# CVE-2007-3102 -Patch14: util-linux-ng-2.13-login-audit.patch +Patch10: util-linux-ng-2.14-blockdev-rmpart.patch %description The util-linux-ng package contains a large variety of low-level system @@ -116,7 +106,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 +%setup -q -a 11 -n util-linux-ng-2.14-rc3 cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 @@ -130,10 +120,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 %build unset LINGUAS || : @@ -149,7 +135,6 @@ export SUID_LDFLAGS="-pie" --enable-login-utils \ --enable-kill \ --enable-write \ - --enable-arch \ %if %{include_raw} --enable-raw \ %endif @@ -348,7 +333,6 @@ exit 0 %doc */README.* NEWS AUTHORS licenses/* README* %doc getopt/getopt-*.{bash,tcsh} -/bin/arch /bin/dmesg %attr(755,root,root) /bin/login /bin/more @@ -414,7 +398,7 @@ exit 0 %endif %{_bindir}/ddate %ifnarch s390 s390x -%{_bindir}/fdformat +%{_sbindir}/fdformat %endif %{_bindir}/flock %{_bindir}/getopt @@ -453,10 +437,10 @@ exit 0 %{_sbindir}/tunelp %endif %{_sbindir}/rtcwake +%{_sbindir}/ldattach %{_infodir}/ipc.info* -%{_mandir}/man1/arch.1* %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/chsh.1* @@ -513,6 +497,7 @@ exit 0 %endif %{_mandir}/man8/setarch.8* %{_mandir}/man8/rtcwake.8* +%{_mandir}/man8/ldattach.8* %attr(4755,root,root) /bin/mount %attr(4755,root,root) /bin/umount @@ -527,6 +512,12 @@ exit 0 /sbin/losetup %changelog +* Mon May 19 2008 Karel Zak 2.14-0.1 +- upgrade to 2.14-rc3 +- remove arch(8) (deprecated in favor of uname(1) or arch(1) from coreutils) +- add a new command ldattach(8) +- cfdisk(8) linked with libncursesw + * Tue Apr 22 2008 Karel Zak 2.13.1-9 - fix audit log injection attack via login From 19c3281b6a69301c7d7ddb8f1c2ded89a7fb1164 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 19 May 2008 12:14:00 +0000 Subject: [PATCH 15/86] uplead new upstream tarball --- .cvsignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6837dd2..767d8e1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.13.1.tar.bz2 +util-linux-ng-2.14-rc3.tar.bz2 diff --git a/sources b/sources index 6e1d8d9..2c08046 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -424badc1832e4b5291a2ec04e9e244f4 util-linux-ng-2.13.1.tar.bz2 +3d1e28088bdb71dbfd4faa7980b2ced7 util-linux-ng-2.14-rc3.tar.bz2 From 583551c607d4b8fdb28c44a1d51eaad1e31cbeb9 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 9 Jun 2008 13:21:22 +0000 Subject: [PATCH 16/86] - upgrade to stable util-linux-ng release --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 767d8e1..bfb4844 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ +util-linux-ng-2.14.tar.bz2 floppy-0.16.tar.bz2 -util-linux-ng-2.14-rc3.tar.bz2 diff --git a/sources b/sources index 2c08046..07fcb82 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +23f227da49df36f33fe47e917e332cd8 util-linux-ng-2.14.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -3d1e28088bdb71dbfd4faa7980b2ced7 util-linux-ng-2.14-rc3.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index dca2ba1..33b9ae7 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -35,7 +35,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14-rc3.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -106,7 +106,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 -n util-linux-ng-2.14-rc3 +%setup -q -a 11 cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 @@ -512,6 +512,9 @@ exit 0 /sbin/losetup %changelog +* Mon Jun 9 2008 Karel Zak 2.14-1 +- upgrade to stable util-linux-ng release + * Mon May 19 2008 Karel Zak 2.14-0.1 - upgrade to 2.14-rc3 - remove arch(8) (deprecated in favor of uname(1) or arch(1) from coreutils) From 8e2ed634852a4290cb480c8b17c0d58fb1ca64c6 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 1 Jul 2008 12:53:26 +0000 Subject: [PATCH 17/86] - fix #390691 - mount should check selinux context on mount, and warn on file_t --- util-linux-ng-2.13-login-audit.patch | 51 ------------------- util-linux-ng-2.14-mount-file_t.patch | 73 +++++++++++++++++++++++++++ util-linux-ng.spec | 8 ++- 3 files changed, 80 insertions(+), 52 deletions(-) delete mode 100644 util-linux-ng-2.13-login-audit.patch create mode 100644 util-linux-ng-2.14-mount-file_t.patch diff --git a/util-linux-ng-2.13-login-audit.patch b/util-linux-ng-2.13-login-audit.patch deleted file mode 100644 index d564577..0000000 --- a/util-linux-ng-2.13-login-audit.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8ccf0b253ac0f4f58d64bc9674de18bff5a88782 Mon Sep 17 00:00:00 2001 -From: Steve Grubb -Date: Sat, 19 Apr 2008 11:49:02 -0400 -Subject: [PATCH] login: audit log injection attack via login - -A while back I found a couple audit log injection attacks which became -CVE-2007-3102. I forgot to look at login to see if its vulnerable and Mirek -found that it is. To verify the problem, type: - -root addr=xyz.com - -for the account name while logging in. It will look like root logged in with -an address of xyz.com. - -Signed-off-by: Steve Grubb ---- - login-utils/login.c | 10 +++------- - 1 files changed, 3 insertions(+), 7 deletions(-) - -diff --git a/login-utils/login.c b/login-utils/login.c -index aad2779..2301213 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -324,7 +324,6 @@ static void - logaudit(const char *tty, const char *username, const char *hostname, - struct passwd *pwd, int status) - { -- char buf[64]; - int audit_fd; - - audit_fd = audit_open(); -@@ -332,13 +331,10 @@ logaudit(const char *tty, const char *username, const char *hostname, - return; - if (!pwd && username) - pwd = getpwnam(username); -- if (pwd) -- snprintf(buf, sizeof(buf), "uid=%d", pwd->pw_uid); -- else -- snprintf(buf, sizeof(buf), "acct=%s", username ? username : "(unknown)"); - -- audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -- buf, hostname, NULL, tty, status); -+ audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN, -+ NULL, "login", username ? username : "(unknown)", -+ pwd ? pwd->pw_uid : -1, hostname, NULL, tty, status); - - close(audit_fd); - } --- -1.5.4.1 - diff --git a/util-linux-ng-2.14-mount-file_t.patch b/util-linux-ng-2.14-mount-file_t.patch new file mode 100644 index 0000000..a3e55d8 --- /dev/null +++ b/util-linux-ng-2.14-mount-file_t.patch @@ -0,0 +1,73 @@ +From 4edebc1486133231e38b3881325c374eda567f74 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 23 Jun 2008 13:00:00 +0200 +Subject: [PATCH] mount: warn on "file_t" selinux context + +Currently if I mount a file system without labels, it works fine, but +later or SELinux will start printing denials and stopping certain +applications from working. It would be nice if the mount command +checked it in selinux mode. + +Addresses-Red-Hat-Bugzilla: #390691 +Signed-off-by: Karel Zak +--- + mount/mount.c | 29 ++++++++++++++++++++++++++--- + 1 files changed, 26 insertions(+), 3 deletions(-) + +diff --git a/mount/mount.c b/mount/mount.c +index bed792d..30688ac 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -327,7 +327,7 @@ append_context(const char *optname, char *optdata, char **extra_opts) + security_context_t raw = NULL; + char *data = NULL; + +- if (!is_selinux_enabled()) ++ if (is_selinux_enabled() != 1) + /* ignore the option if we running without selinux */ + return 0; + +@@ -338,8 +338,8 @@ append_context(const char *optname, char *optdata, char **extra_opts) + data = *optdata =='"' ? strip_quotes(optdata) : optdata; + + if (selinux_trans_to_raw_context( +- (security_context_t) data, &raw)==-1 || +- raw==NULL) ++ (security_context_t) data, &raw) == -1 || ++ raw == NULL) + return -1; + + if (verbose) +@@ -1370,6 +1370,29 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + res = EX_FAIL; + + out: ++ ++#ifdef HAVE_LIBSELINUX ++ if (res != EX_FAIL && is_selinux_enabled() > 0) { ++ security_context_t raw = NULL, def = NULL; ++ ++ if (getfilecon(node, &raw) > 0 && ++ security_get_initial_context("file", &def) == 0) { ++ ++ if (!selinux_file_context_cmp(raw, def)) ++ printf(_("mount: %s does not contain SELinux labels.\n" ++ " You just mounted an file system that supports labels which does not\n" ++ " contain labels, onto an SELinux box. It is likely that confined\n" ++ " applications will generate AVC messages and not be allowed access to\n" ++ " this file system. You can add labels to this file system by executing\n" ++ " restorecon(8). If you do not want to add labels to this file system,\n" ++ " you should mount the file system using one of the \"context\" mount\n" ++ " option."), node); ++ } ++ freecon(raw); ++ freecon(def); ++ } ++#endif ++ + my_free(extra_opts1); + my_free(spec1); + my_free(node1); +-- +1.5.4.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 33b9ae7..b652e1c 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -98,6 +98,8 @@ Patch8: util-linux-ng-2.13-ipcs-32bit.patch Patch9: util-linux-ng-2.13-floppy-locale.patch # remove partitions Patch10: util-linux-ng-2.14-blockdev-rmpart.patch +# 390691: mount should check selinux context on mount, and warn on file_t +Patch11: util-linux-ng-2.14-mount-file_t.patch %description The util-linux-ng package contains a large variety of low-level system @@ -120,6 +122,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -512,6 +515,9 @@ exit 0 /sbin/losetup %changelog +* Tue Jul 1 2008 Karel Zak 2.14-2 +- fix #390691 - mount should check selinux context on mount, and warn on file_t + * Mon Jun 9 2008 Karel Zak 2.14-1 - upgrade to stable util-linux-ng release From 1027fb9d77ca319c35926a21b37fe34372d89299 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 23 Jul 2008 23:44:27 +0000 Subject: [PATCH 18/86] - update util-linux-ng-2.14-mount-file_t.patch to make the SELinux warning optional (verbose mode is required) --- util-linux-ng-2.14-mount-file_t.patch | 40 ++++++--------------------- util-linux-ng.spec | 8 ++++-- 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/util-linux-ng-2.14-mount-file_t.patch b/util-linux-ng-2.14-mount-file_t.patch index a3e55d8..d506d9f 100644 --- a/util-linux-ng-2.14-mount-file_t.patch +++ b/util-linux-ng-2.14-mount-file_t.patch @@ -1,24 +1,7 @@ -From 4edebc1486133231e38b3881325c374eda567f74 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 23 Jun 2008 13:00:00 +0200 -Subject: [PATCH] mount: warn on "file_t" selinux context - -Currently if I mount a file system without labels, it works fine, but -later or SELinux will start printing denials and stopping certain -applications from working. It would be nice if the mount command -checked it in selinux mode. - -Addresses-Red-Hat-Bugzilla: #390691 -Signed-off-by: Karel Zak ---- - mount/mount.c | 29 ++++++++++++++++++++++++++--- - 1 files changed, 26 insertions(+), 3 deletions(-) - -diff --git a/mount/mount.c b/mount/mount.c -index bed792d..30688ac 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -327,7 +327,7 @@ append_context(const char *optname, char *optdata, char **extra_opts) +diff -up util-linux-ng-2.14/mount/mount.c.kzak util-linux-ng-2.14/mount/mount.c +--- util-linux-ng-2.14/mount/mount.c.kzak 2008-07-24 01:26:39.000000000 +0200 ++++ util-linux-ng-2.14/mount/mount.c 2008-07-24 01:27:56.000000000 +0200 +@@ -332,7 +332,7 @@ append_context(const char *optname, char security_context_t raw = NULL; char *data = NULL; @@ -27,7 +10,7 @@ index bed792d..30688ac 100644 /* ignore the option if we running without selinux */ return 0; -@@ -338,8 +338,8 @@ append_context(const char *optname, char *optdata, char **extra_opts) +@@ -343,8 +343,8 @@ append_context(const char *optname, char data = *optdata =='"' ? strip_quotes(optdata) : optdata; if (selinux_trans_to_raw_context( @@ -38,13 +21,13 @@ index bed792d..30688ac 100644 return -1; if (verbose) -@@ -1370,6 +1370,29 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, +@@ -1397,6 +1397,27 @@ try_mount_one (const char *spec0, const res = EX_FAIL; out: + +#ifdef HAVE_LIBSELINUX -+ if (res != EX_FAIL && is_selinux_enabled() > 0) { ++ if (res != EX_FAIL && verbose && is_selinux_enabled() > 0) { + security_context_t raw = NULL, def = NULL; + + if (getfilecon(node, &raw) > 0 && @@ -55,10 +38,8 @@ index bed792d..30688ac 100644 + " You just mounted an file system that supports labels which does not\n" + " contain labels, onto an SELinux box. It is likely that confined\n" + " applications will generate AVC messages and not be allowed access to\n" -+ " this file system. You can add labels to this file system by executing\n" -+ " restorecon(8). If you do not want to add labels to this file system,\n" -+ " you should mount the file system using one of the \"context\" mount\n" -+ " option."), node); ++ " this file system. For more details see restorecon(8) and mount(8).\n"), ++ node); + } + freecon(raw); + freecon(def); @@ -68,6 +49,3 @@ index bed792d..30688ac 100644 my_free(extra_opts1); my_free(spec1); my_free(node1); --- -1.5.4.1 - diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b652e1c..22b05a0 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -122,7 +122,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 +%patch11 -p1 -b .kzak %build unset LINGUAS || : @@ -515,6 +515,10 @@ exit 0 /sbin/losetup %changelog +* Thu Jul 24 2008 Karel Zak 2.14-3 +- update util-linux-ng-2.14-mount-file_t.patch to make + the SELinux warning optional (verbose mode is required) + * Tue Jul 1 2008 Karel Zak 2.14-2 - fix #390691 - mount should check selinux context on mount, and warn on file_t From 795ab70db1566b3b3feeeb9abfa54c28def090f0 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 14 Aug 2008 00:37:00 +0000 Subject: [PATCH 19/86] - upgrade to 2.14.1-rc1 - refresh old patches --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.13-fdisk-b-4096.patch | 8 +++-- util-linux-ng-2.13-login-pamstart.patch | 12 ++++--- util-linux-ng-2.13-mount-pamconsole.patch | 38 +++++++++++++---------- util-linux-ng-2.14-mount-file_t.patch | 7 +++-- util-linux-ng.spec | 15 ++++++--- 7 files changed, 50 insertions(+), 34 deletions(-) diff --git a/.cvsignore b/.cvsignore index bfb4844..fce7e7c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.14.tar.bz2 +util-linux-ng-2.14.1-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 07fcb82..d0d922c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -23f227da49df36f33fe47e917e332cd8 util-linux-ng-2.14.tar.bz2 +1af388cc2d5d2d2c7266267796116cea util-linux-ng-2.14.1-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.13-fdisk-b-4096.patch b/util-linux-ng-2.13-fdisk-b-4096.patch index 0eb0149..8f35c18 100644 --- a/util-linux-ng-2.13-fdisk-b-4096.patch +++ b/util-linux-ng-2.13-fdisk-b-4096.patch @@ -1,6 +1,8 @@ ---- util-linux-ng-2.13-rc3/fdisk/fdisk.c.kzak 2007-07-16 23:15:33.000000000 +0200 -+++ util-linux-ng-2.13-rc3/fdisk/fdisk.c 2007-08-13 12:15:42.000000000 +0200 -@@ -2588,7 +2588,7 @@ +Index: util-linux-ng-2.14.1-rc1/fdisk/fdisk.c +=================================================================== +--- util-linux-ng-2.14.1-rc1.orig/fdisk/fdisk.c ++++ util-linux-ng-2.14.1-rc1/fdisk/fdisk.c +@@ -2589,7 +2589,7 @@ main(int argc, char **argv) { */ sector_size = atoi(optarg); if (sector_size != 512 && sector_size != 1024 && diff --git a/util-linux-ng-2.13-login-pamstart.patch b/util-linux-ng-2.13-login-pamstart.patch index 7938f7f..90a67b5 100644 --- a/util-linux-ng-2.13-login-pamstart.patch +++ b/util-linux-ng-2.13-login-pamstart.patch @@ -1,11 +1,13 @@ ---- util-linux-ng-2.13-rc3/login-utils/login.c.kzak 2007-06-29 01:13:51.000000000 +0200 -+++ util-linux-ng-2.13-rc3/login-utils/login.c 2007-08-13 11:32:10.000000000 +0200 -@@ -546,7 +546,7 @@ +Index: util-linux-ng-2.14.1-rc1/login-utils/login.c +=================================================================== +--- util-linux-ng-2.14.1-rc1.orig/login-utils/login.c ++++ util-linux-ng-2.14.1-rc1/login-utils/login.c +@@ -542,7 +542,7 @@ main(int argc, char **argv) * Therefore, we are safe not setting it to anything */ - retcode = pam_start("login",username, &conv, &pamh); + retcode = pam_start(hflag?"remote":"login",username, &conv, &pamh); if(retcode != PAM_SUCCESS) { - fprintf(stderr, _("login: PAM Failure, aborting: %s\n"), - pam_strerror(pamh, retcode)); + fprintf(stderr, _("%s: PAM failure, aborting: %s\n"), + "login", pam_strerror(pamh, retcode)); diff --git a/util-linux-ng-2.13-mount-pamconsole.patch b/util-linux-ng-2.13-mount-pamconsole.patch index dc512b0..ee28552 100644 --- a/util-linux-ng-2.13-mount-pamconsole.patch +++ b/util-linux-ng-2.13-mount-pamconsole.patch @@ -1,6 +1,8 @@ ---- util-linux-ng-2.13-rc3/mount/umount.c.xxx 2007-05-30 10:18:12.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/umount.c 2007-08-13 12:02:07.000000000 +0200 -@@ -434,7 +434,7 @@ +Index: util-linux-ng-2.14.1-rc1/mount/umount.c +=================================================================== +--- util-linux-ng-2.14.1-rc1.orig/mount/umount.c ++++ util-linux-ng-2.14.1-rc1/mount/umount.c +@@ -461,7 +461,7 @@ static int umount_file (char *arg) { struct mntentchn *mc, *fs; const char *file, *options; @@ -9,7 +11,7 @@ int ok; if (!*arg) { /* "" would be expanded to `pwd` */ -@@ -521,13 +521,16 @@ +@@ -548,13 +548,16 @@ umount_file (char *arg) { fstab_has_users = contains(options, "users"); fstab_has_owner = contains(options, "owner"); fstab_has_group = contains(options, "group"); @@ -27,7 +29,7 @@ char *user = getusername(); options = mc->m.mnt_opts; -@@ -537,6 +540,14 @@ +@@ -564,6 +567,14 @@ umount_file (char *arg) { if (user && mtab_user && streq (user, mtab_user)) ok = 1; @@ -42,9 +44,11 @@ } if (!ok) die (2, _("umount: only %s can unmount %s from %s"), ---- util-linux-ng-2.13-rc3/mount/fstab.5.xxx 2007-07-03 01:56:04.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/fstab.5 2007-08-13 12:02:07.000000000 +0200 -@@ -156,10 +156,10 @@ +Index: util-linux-ng-2.14.1-rc1/mount/fstab.5 +=================================================================== +--- util-linux-ng-2.14.1-rc1.orig/mount/fstab.5 ++++ util-linux-ng-2.14.1-rc1/mount/fstab.5 +@@ -159,10 +159,10 @@ For documentation on all nfs-specific op .BR nfs (5). Common for all types of file system are the options ``noauto'' (do not mount when "mount -a" is given, e.g., at boot time), ``user'' @@ -58,9 +62,11 @@ For more details, see .BR mount (8). ---- util-linux-ng-2.13-rc3/mount/mount.c.xxx 2007-08-13 12:00:15.000000000 +0200 -+++ util-linux-ng-2.13-rc3/mount/mount.c 2007-08-13 12:05:15.000000000 +0200 -@@ -108,14 +108,15 @@ +Index: util-linux-ng-2.14.1-rc1/mount/mount.c +=================================================================== +--- util-linux-ng-2.14.1-rc1.orig/mount/mount.c ++++ util-linux-ng-2.14.1-rc1/mount/mount.c +@@ -102,14 +102,15 @@ struct opt_map { #define MS_USER 0x20000000 #define MS_OWNER 0x10000000 #define MS_GROUP 0x08000000 @@ -78,7 +84,7 @@ #define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE) -@@ -155,6 +156,8 @@ +@@ -149,6 +150,8 @@ static const struct opt_map opt_map[] = { "comment", 0, 0, MS_COMMENT}, /* fstab comment only (kudzu,_netdev)*/ /* add new options here */ @@ -87,7 +93,7 @@ #ifdef MS_NOSUB { "sub", 0, 1, MS_NOSUB }, /* allow submounts */ { "nosub", 0, 0, MS_NOSUB }, /* don't allow submounts */ -@@ -379,7 +382,7 @@ +@@ -371,7 +374,7 @@ parse_opt(char *opt, int *mask, char **e *mask &= ~om->mask; else *mask |= om->mask; @@ -96,7 +102,7 @@ && !om->inv) *mask |= MS_SECURE; if ((om->mask == MS_OWNER || om->mask == MS_GROUP) -@@ -807,7 +810,29 @@ +@@ -810,7 +813,29 @@ suid_check(const char *spec, const char } } @@ -127,7 +133,7 @@ allow an arbitrary user to mount when he is the owner of the mount-point and has write-access to the device. This is even less secure. Let me skip it for the time being; -@@ -823,7 +848,7 @@ +@@ -826,7 +851,7 @@ suid_check(const char *spec, const char *user = getusername(); } @@ -135,4 +141,4 @@ + *flags &= ~(MS_OWNER | MS_GROUP | MS_PAMCONSOLE); } - static int + /* Check, if there already exists a mounted loop device on the mountpoint node diff --git a/util-linux-ng-2.14-mount-file_t.patch b/util-linux-ng-2.14-mount-file_t.patch index d506d9f..05ea722 100644 --- a/util-linux-ng-2.14-mount-file_t.patch +++ b/util-linux-ng-2.14-mount-file_t.patch @@ -1,6 +1,7 @@ -diff -up util-linux-ng-2.14/mount/mount.c.kzak util-linux-ng-2.14/mount/mount.c ---- util-linux-ng-2.14/mount/mount.c.kzak 2008-07-24 01:26:39.000000000 +0200 -+++ util-linux-ng-2.14/mount/mount.c 2008-07-24 01:27:56.000000000 +0200 +Index: util-linux-ng-2.14.1-rc1/mount/mount.c +=================================================================== +--- util-linux-ng-2.14.1-rc1.orig/mount/mount.c ++++ util-linux-ng-2.14.1-rc1/mount/mount.c @@ -332,7 +332,7 @@ append_context(const char *optname, char security_context_t raw = NULL; char *data = NULL; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 22b05a0..e3e09be 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,8 +1,9 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.14 -Release: 3%{?dist} +Version: 2.14.1 +Release: 0.1%{?dist} +%define upstream_suffix -rc1 License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -35,7 +36,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-2.14.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{version}%{upstream_suffix}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -108,7 +109,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 +%setup -q -a 11 -n %{name}-%{version}%{upstream_suffix} cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 @@ -122,7 +123,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 -b .kzak +%patch11 -p1 %build unset LINGUAS || : @@ -515,6 +516,10 @@ exit 0 /sbin/losetup %changelog +* Thu Aug 14 2008 Karel Zak 2.14.1-0.1 +- upgrade to 2.14.1-rc1 +- refresh old patches + * Thu Jul 24 2008 Karel Zak 2.14-3 - update util-linux-ng-2.14-mount-file_t.patch to make the SELinux warning optional (verbose mode is required) From f5ea4d01a349fd6ecc7ed9ac3bfa0d4e3c5cffca Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 10 Sep 2008 11:47:47 +0000 Subject: [PATCH 20/86] - upgrade to stable 2.14.1 --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index fce7e7c..43d86fd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.14.1-rc1.tar.bz2 +util-linux-ng-2.14.1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index d0d922c..369f3b3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1af388cc2d5d2d2c7266267796116cea util-linux-ng-2.14.1-rc1.tar.bz2 +9aab772ee9b1f4e67dff98169f3cb380 util-linux-ng-2.14.1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index e3e09be..aec5283 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,8 +2,8 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 -Release: 0.1%{?dist} -%define upstream_suffix -rc1 +Release: 1%{?dist} +#%define upstream_suffix -rc1 License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -516,6 +516,9 @@ exit 0 /sbin/losetup %changelog +* Wed Sep 10 2008 Karel Zak 2.14.1-1 +- upgrade to stable 2.14.1 + * Thu Aug 14 2008 Karel Zak 2.14.1-0.1 - upgrade to 2.14.1-rc1 - refresh old patches From 9cdcf099de472b0fadb6497291ae4f4502f2bcf8 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 10 Sep 2008 12:29:01 +0000 Subject: [PATCH 21/86] fix spec file --- util-linux-ng.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index aec5283..18a3188 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -3,7 +3,6 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 Release: 1%{?dist} -#%define upstream_suffix -rc1 License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -36,7 +35,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{version}%{upstream_suffix}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -109,7 +108,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 -n %{name}-%{version}%{upstream_suffix} +%setup -q -a 11 -n %{name}-%{version} cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 From ac6a14fbcac1d7ac3b85e83acf0e24f86f636fe3 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 10 Sep 2008 22:00:29 +0000 Subject: [PATCH 22/86] - remove obsolete pam-console support --- util-linux-ng.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 18a3188..36d08ae 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -81,7 +81,6 @@ Requires: udev Patch0: util-linux-ng-2.13-login-pamstart.patch # RHEL/Fedora specific mount options Patch1: util-linux-ng-2.14-mount-managed.patch -Patch2: util-linux-ng-2.13-mount-pamconsole.patch # add note about ATAPI IDE floppy to fdformat.8 Patch3: util-linux-ng-2.13-fdformat-man-ide.patch # 169628 - /usr/bin/floppy doesn't work with /dev/fd0 @@ -113,7 +112,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 @@ -515,6 +513,9 @@ exit 0 /sbin/losetup %changelog +* Wed Sep 10 2008 Karel Zak 2.14.1-2 +- remove obsolete pam-console support + * Wed Sep 10 2008 Karel Zak 2.14.1-1 - upgrade to stable 2.14.1 From ab782e1206d24706ed7c7165a793d2085a972da7 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 11 Sep 2008 09:13:25 +0000 Subject: [PATCH 23/86] remove unused patch --- util-linux-ng-2.13-mount-pamconsole.patch | 144 ---------------------- 1 file changed, 144 deletions(-) delete mode 100644 util-linux-ng-2.13-mount-pamconsole.patch diff --git a/util-linux-ng-2.13-mount-pamconsole.patch b/util-linux-ng-2.13-mount-pamconsole.patch deleted file mode 100644 index ee28552..0000000 --- a/util-linux-ng-2.13-mount-pamconsole.patch +++ /dev/null @@ -1,144 +0,0 @@ -Index: util-linux-ng-2.14.1-rc1/mount/umount.c -=================================================================== ---- util-linux-ng-2.14.1-rc1.orig/mount/umount.c -+++ util-linux-ng-2.14.1-rc1/mount/umount.c -@@ -461,7 +461,7 @@ static int - umount_file (char *arg) { - struct mntentchn *mc, *fs; - const char *file, *options; -- int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; -+ int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group, fstab_has_pamconsole; - int ok; - - if (!*arg) { /* "" would be expanded to `pwd` */ -@@ -548,13 +548,16 @@ umount_file (char *arg) { - fstab_has_users = contains(options, "users"); - fstab_has_owner = contains(options, "owner"); - fstab_has_group = contains(options, "group"); -+ fstab_has_pamconsole = contains(options, "pamconsole"); - ok = 0; - - if (fstab_has_users) - ok = 1; - - if (!ok && (fstab_has_user || fstab_has_owner || -- fstab_has_group)) { -+ fstab_has_group || fstab_has_pamconsole)) { -+ char pamconsole_file_name[256]; -+ struct stat sb; - char *user = getusername(); - - options = mc->m.mnt_opts; -@@ -564,6 +567,14 @@ umount_file (char *arg) { - - if (user && mtab_user && streq (user, mtab_user)) - ok = 1; -+ -+ /*pam_console user check*/ -+ if (user && fstab_has_pamconsole) { -+ snprintf (pamconsole_file_name, sizeof (pamconsole_file_name), "/var/run/console/%s", user); -+ if (stat (pamconsole_file_name, &sb) == 0) { -+ ok = 1; -+ } -+ } - } - if (!ok) - die (2, _("umount: only %s can unmount %s from %s"), -Index: util-linux-ng-2.14.1-rc1/mount/fstab.5 -=================================================================== ---- util-linux-ng-2.14.1-rc1.orig/mount/fstab.5 -+++ util-linux-ng-2.14.1-rc1/mount/fstab.5 -@@ -159,10 +159,10 @@ For documentation on all nfs-specific op - .BR nfs (5). - Common for all types of file system are the options ``noauto'' - (do not mount when "mount -a" is given, e.g., at boot time), ``user'' --(allow a user to mount), and ``owner'' --(allow device owner to mount), and ``comment'' -+(allow a user to mount), ``owner'' -+(allow device owner to mount), ``pamconsole'' (allow a user at the console to mount), and ``comment'' - (e.g., for use by fstab-maintaining programs). --The ``owner'' and ``comment'' options are Linux-specific. -+The ``owner'', ``pamconsole'' and ``comment'' options are Linux-specific. - For more details, see - .BR mount (8). - -Index: util-linux-ng-2.14.1-rc1/mount/mount.c -=================================================================== ---- util-linux-ng-2.14.1-rc1.orig/mount/mount.c -+++ util-linux-ng-2.14.1-rc1/mount/mount.c -@@ -102,14 +102,15 @@ struct opt_map { - #define MS_USER 0x20000000 - #define MS_OWNER 0x10000000 - #define MS_GROUP 0x08000000 -+#define MS_PAMCONSOLE 0x04000000 - #define MS_COMMENT 0x02000000 - #define MS_LOOP 0x00010000 - - /* Options that we keep the mount system call from seeing. */ --#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP) -+#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP|MS_PAMCONSOLE) - - /* Options that we keep from appearing in the options field in the mtab. */ --#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER) -+#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER|MS_PAMCONSOLE) - - #define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE) - -@@ -149,6 +150,8 @@ static const struct opt_map opt_map[] = - { "comment", 0, 0, MS_COMMENT}, /* fstab comment only (kudzu,_netdev)*/ - - /* add new options here */ -+ { "pamconsole", 0, 0, MS_PAMCONSOLE }, /* Allow users at console to mount */ -+ { "nopamconsole", 0, 1, MS_PAMCONSOLE }, /* Console user has no special privs */ - #ifdef MS_NOSUB - { "sub", 0, 1, MS_NOSUB }, /* allow submounts */ - { "nosub", 0, 0, MS_NOSUB }, /* don't allow submounts */ -@@ -371,7 +374,7 @@ parse_opt(char *opt, int *mask, char **e - *mask &= ~om->mask; - else - *mask |= om->mask; -- if ((om->mask == MS_USER || om->mask == MS_USERS) -+ if ((om->mask == MS_USER || om->mask == MS_USERS || om->mask == MS_PAMCONSOLE) - && !om->inv) - *mask |= MS_SECURE; - if ((om->mask == MS_OWNER || om->mask == MS_GROUP) -@@ -810,7 +813,29 @@ suid_check(const char *spec, const char - } - } - -- /* James Kehl came with a similar patch: -+ /* Red Hat patch: allow users at console to mount when fstab -+ contains the console option. This option should not be used -+ in a high security environment but is useful to give console -+ users the possibility of using locally attached devices -+ such as USB keychains and USB harddisks where it is now suitable -+ to give the console owner write access to the device node */ -+ if (*flags & MS_PAMCONSOLE) { -+ char *username; -+ char pamconsole_file_name[256]; -+ struct stat sb; -+ -+ username = getusername (); -+ -+ if (username != NULL) { -+ snprintf (pamconsole_file_name, sizeof (pamconsole_file_name), -+ "/var/run/console/%s", username); -+ if (stat (pamconsole_file_name, &sb) == 0) { -+ *flags |= MS_USER; -+ } -+ } -+ } -+ -+ /* James Kehl came with a similar patch: - allow an arbitrary user to mount when he is the owner of - the mount-point and has write-access to the device. - This is even less secure. Let me skip it for the time being; -@@ -826,7 +851,7 @@ suid_check(const char *spec, const char - *user = getusername(); - } - -- *flags &= ~(MS_OWNER | MS_GROUP); -+ *flags &= ~(MS_OWNER | MS_GROUP | MS_PAMCONSOLE); - } - - /* Check, if there already exists a mounted loop device on the mountpoint node From 391e7e1b6c62980b8eba0e0e3de74d30d92432fc Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 6 Oct 2008 11:21:32 +0000 Subject: [PATCH 24/86] - fix #465761 - mount manpage is missing uid/gid mount options for tmpfs - refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0) --- util-linux-ng-2.14-mount-file_t.patch | 12 +-- util-linux-ng-2.14-mount-man-tmpfs.patch | 104 +++++++++++++++++++++++ util-linux-ng.spec | 9 +- 3 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 util-linux-ng-2.14-mount-man-tmpfs.patch diff --git a/util-linux-ng-2.14-mount-file_t.patch b/util-linux-ng-2.14-mount-file_t.patch index 05ea722..c7e0e0d 100644 --- a/util-linux-ng-2.14-mount-file_t.patch +++ b/util-linux-ng-2.14-mount-file_t.patch @@ -1,8 +1,8 @@ -Index: util-linux-ng-2.14.1-rc1/mount/mount.c +Index: util-linux-ng-2.14.1/mount/mount.c =================================================================== ---- util-linux-ng-2.14.1-rc1.orig/mount/mount.c -+++ util-linux-ng-2.14.1-rc1/mount/mount.c -@@ -332,7 +332,7 @@ append_context(const char *optname, char +--- util-linux-ng-2.14.1.orig/mount/mount.c ++++ util-linux-ng-2.14.1/mount/mount.c +@@ -329,7 +329,7 @@ append_context(const char *optname, char security_context_t raw = NULL; char *data = NULL; @@ -11,7 +11,7 @@ Index: util-linux-ng-2.14.1-rc1/mount/mount.c /* ignore the option if we running without selinux */ return 0; -@@ -343,8 +343,8 @@ append_context(const char *optname, char +@@ -340,8 +340,8 @@ append_context(const char *optname, char data = *optdata =='"' ? strip_quotes(optdata) : optdata; if (selinux_trans_to_raw_context( @@ -22,7 +22,7 @@ Index: util-linux-ng-2.14.1-rc1/mount/mount.c return -1; if (verbose) -@@ -1397,6 +1397,27 @@ try_mount_one (const char *spec0, const +@@ -1372,6 +1372,27 @@ try_mount_one (const char *spec0, const res = EX_FAIL; out: diff --git a/util-linux-ng-2.14-mount-man-tmpfs.patch b/util-linux-ng-2.14-mount-man-tmpfs.patch new file mode 100644 index 0000000..6ed7a81 --- /dev/null +++ b/util-linux-ng-2.14-mount-man-tmpfs.patch @@ -0,0 +1,104 @@ +From b9f2b3de43c820a4259ec8855359a2d8d18abe01 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 6 Oct 2008 12:56:37 +0200 +Subject: [PATCH] mount: sync tmpfs info in mount.8 with Documentation/filesystems/tmpfs.txt + +Addresses-Red-Hat-Bugzilla: #465761 +Signed-off-by: Karel Zak +--- + mount/mount.8 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++------- + 1 files changed, 62 insertions(+), 9 deletions(-) + +Index: util-linux-ng-2.14.1/mount/mount.8 +=================================================================== +--- util-linux-ng-2.14.1.orig/mount/mount.8 ++++ util-linux-ng-2.14.1/mount/mount.8 +@@ -1607,26 +1607,79 @@ and the current version of + None. + + .SH "Mount options for tmpfs" +-The following parameters accept a suffix +-.BR k , +-.B m +-or +-.B g +-for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount. + .TP + .BI size= nbytes + Override default maximum size of the filesystem. + The size is given in bytes, and rounded down to entire pages. +-The default is half of the memory. ++The default is half of the memory. The size parameter also accepts a suffix % ++to limit this tmpfs instance to that percentage of your physical RAM: ++the default, when neither size nor nr_blocks is specified, is size=50% + .TP + .B nr_blocks= +-Set number of blocks. ++The same as size, but in blocks of PAGE_CACHE_SIZE + .TP + .B nr_inodes= +-Set number of inodes. ++The maximum number of inodes for this instance. The default ++is half of the number of your physical RAM pages, or (on a ++machine with highmem) the number of lowmem RAM pages, ++whichever is the lower. ++.PP ++The tmpfs mount options for sizing ( ++.BR size , ++.BR nr_blocks , ++and ++.BR nr_inodes ) ++accept a suffix ++.BR k , ++.B m ++or ++.B g ++for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount. ++ + .TP + .B mode= + Set initial permissions of the root directory. ++.TP ++.B uid= ++The user id. ++.TP ++.B gid= ++The group id. ++.TP ++.B mpol=[default|prefer:Node|bind:NodeList|interleave|interleave:NodeList] ++Set the NUMA memory allocation policy for all files in that ++instance (if the kernel CONFIG_NUMA is enabled) - which can be adjusted on the ++fly via 'mount -o remount ...' ++.RS ++.TP ++.B default ++prefers to allocate memory from the local node ++.TP ++.B prefer:Node ++prefers to allocate memory from the given Node ++.TP ++.B bind:NodeList ++allocates memory only from nodes in NodeList ++.TP ++.B interleave ++prefers to allocate from each node in turn ++.TP ++.B interleave:NodeList ++allocates from each node of NodeList in turn. ++.PP ++The NodeList format is a comma-separated list of decimal numbers and ranges, a ++range being two hyphen-separated decimal numbers, the smallest and largest node ++numbers in the range. For example, mpol=bind:0-3,5,7,9-15 ++ ++Note that trying to mount a tmpfs with an mpol option will fail if the ++running kernel does not support NUMA; and will fail if its nodelist ++specifies a node which is not online. If your system relies on that ++tmpfs being mounted, but from time to time runs a kernel built without ++NUMA capability (perhaps a safe recovery kernel), or with fewer nodes ++online, then it is advisable to omit the mpol option from automatic ++mount options. It can be added later, when the tmpfs is already mounted ++on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'. ++.PE + + .SH "Mount options for udf" + udf is the "Universal Disk Format" filesystem defined by the Optical diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 36d08ae..b7ce91c 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -99,6 +99,8 @@ Patch9: util-linux-ng-2.13-floppy-locale.patch Patch10: util-linux-ng-2.14-blockdev-rmpart.patch # 390691: mount should check selinux context on mount, and warn on file_t Patch11: util-linux-ng-2.14-mount-file_t.patch +# 465761: mount manpage is missing uid/gid mount options for tmpfs (upstream patch) +Patch12: util-linux-ng-2.14-mount-man-tmpfs.patch %description The util-linux-ng package contains a large variety of low-level system @@ -121,6 +123,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build unset LINGUAS || : @@ -513,6 +516,10 @@ exit 0 /sbin/losetup %changelog +* Mon Oct 6 2008 Karel Zak 2.14.1-3 +- fix #465761 - mount manpage is missing uid/gid mount options for tmpfs +- refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0) + * Wed Sep 10 2008 Karel Zak 2.14.1-2 - remove obsolete pam-console support From d3778b553184915ae61d749673b9519afec8133c Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 21 Nov 2008 14:23:00 +0000 Subject: [PATCH 25/86] - fix #472502 - problem with fdisk and use +sectors for the end of partition --- util-linux-ng-2.14-fdisk-cylinder.patch | 30 +++++++++++++++++++++++++ util-linux-ng.spec | 8 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.14-fdisk-cylinder.patch diff --git a/util-linux-ng-2.14-fdisk-cylinder.patch b/util-linux-ng-2.14-fdisk-cylinder.patch new file mode 100644 index 0000000..98891f3 --- /dev/null +++ b/util-linux-ng-2.14-fdisk-cylinder.patch @@ -0,0 +1,30 @@ + + Upstream patch: + + commit 5ea8931c95b2e0b1663f28591d2c721f07a88181 + Author: Karel Zak + Date: Thu Nov 13 23:08:34 2008 +0100 + +diff -up util-linux-ng-2.14.1/fdisk/fdisk.c.kzak util-linux-ng-2.14.1/fdisk/fdisk.c +--- util-linux-ng-2.14.1/fdisk/fdisk.c.kzak 2008-11-21 14:27:19.000000000 +0100 ++++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-21 15:10:07.000000000 +0100 +@@ -1193,7 +1193,8 @@ read_int(unsigned int low, unsigned int + */ + if (!display_in_cyl_units) + i *= heads * sectors; +- } else if (*(line_ptr + 1) == 'B' && ++ } else if (*line_ptr && ++ *(line_ptr + 1) == 'B' && + *(line_ptr + 2) == '\0') { + /* + * 10^N +@@ -1206,7 +1207,8 @@ read_int(unsigned int low, unsigned int + absolute = 1000000000; + else + absolute = -1; +- } else if (*(line_ptr + 1) == '\0') { ++ } else if (*line_ptr && ++ *(line_ptr + 1) == '\0') { + /* + * 2^N + */ diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b7ce91c..6106b07 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -101,6 +101,8 @@ Patch10: util-linux-ng-2.14-blockdev-rmpart.patch Patch11: util-linux-ng-2.14-mount-file_t.patch # 465761: mount manpage is missing uid/gid mount options for tmpfs (upstream patch) Patch12: util-linux-ng-2.14-mount-man-tmpfs.patch +# 472502: Problem with fdisk and use +sectors for the end of partition (upstream patch) +Patch13: util-linux-ng-2.14-fdisk-cylinder.patch %description The util-linux-ng package contains a large variety of low-level system @@ -124,6 +126,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -516,6 +519,9 @@ exit 0 /sbin/losetup %changelog +* Fri Nov 21 2008 Karel Zak 2.14.1-4 +- fix #472502 - problem with fdisk and use +sectors for the end of partition + * Mon Oct 6 2008 Karel Zak 2.14.1-3 - fix #465761 - mount manpage is missing uid/gid mount options for tmpfs - refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0) From 42ac52b8840d7a49baa0e7776abbf5d5d164b789 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 21 Nov 2008 14:47:23 +0000 Subject: [PATCH 26/86] release++ ... because we don't have "make force-tag" any more :-( --- util-linux-ng.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 6106b07..5ea6e92 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -519,7 +519,7 @@ exit 0 /sbin/losetup %changelog -* Fri Nov 21 2008 Karel Zak 2.14.1-4 +* Fri Nov 21 2008 Karel Zak 2.14.1-5 - fix #472502 - problem with fdisk and use +sectors for the end of partition * Mon Oct 6 2008 Karel Zak 2.14.1-3 From 6a4bb2607ce1a1730f5f9ecab84c1f141776cc7a Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 23 Dec 2008 00:12:56 +0000 Subject: [PATCH 27/86] - upgrade to 2.14.2-rc1 - refresh old patches --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.13-fdisk-b-4096.patch | 8 +- util-linux-ng-2.13-login-lastlog.patch | 8 +- util-linux-ng-2.13-login-pamstart.patch | 8 +- util-linux-ng-2.14-fdisk-cylinder.patch | 30 ----- ...tch => util-linux-ng-2.14-ipcs-32bit.patch | 15 +-- util-linux-ng-2.14-mount-file_t.patch | 52 --------- util-linux-ng-2.14-mount-man-tmpfs.patch | 104 ------------------ util-linux-ng-2.14-mount-managed.patch | 9 +- util-linux-ng.spec | 25 ++--- 11 files changed, 39 insertions(+), 224 deletions(-) delete mode 100644 util-linux-ng-2.14-fdisk-cylinder.patch rename util-linux-ng-2.13-ipcs-32bit.patch => util-linux-ng-2.14-ipcs-32bit.patch (69%) delete mode 100644 util-linux-ng-2.14-mount-file_t.patch delete mode 100644 util-linux-ng-2.14-mount-man-tmpfs.patch diff --git a/.cvsignore b/.cvsignore index 43d86fd..99baa84 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.14.1.tar.bz2 +util-linux-ng-2.14.2-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 369f3b3..f90d28e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9aab772ee9b1f4e67dff98169f3cb380 util-linux-ng-2.14.1.tar.bz2 +620a0b46dd7a98d541299ac5a8772d98 util-linux-ng-2.14.2-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.13-fdisk-b-4096.patch b/util-linux-ng-2.13-fdisk-b-4096.patch index 8f35c18..d0046a7 100644 --- a/util-linux-ng-2.13-fdisk-b-4096.patch +++ b/util-linux-ng-2.13-fdisk-b-4096.patch @@ -1,8 +1,8 @@ -Index: util-linux-ng-2.14.1-rc1/fdisk/fdisk.c +Index: util-linux-ng-2.14.2-rc1/fdisk/fdisk.c =================================================================== ---- util-linux-ng-2.14.1-rc1.orig/fdisk/fdisk.c -+++ util-linux-ng-2.14.1-rc1/fdisk/fdisk.c -@@ -2589,7 +2589,7 @@ main(int argc, char **argv) { +--- util-linux-ng-2.14.2-rc1.orig/fdisk/fdisk.c ++++ util-linux-ng-2.14.2-rc1/fdisk/fdisk.c +@@ -2591,7 +2591,7 @@ main(int argc, char **argv) { */ sector_size = atoi(optarg); if (sector_size != 512 && sector_size != 1024 && diff --git a/util-linux-ng-2.13-login-lastlog.patch b/util-linux-ng-2.13-login-lastlog.patch index a99e510..548b99d 100644 --- a/util-linux-ng-2.13-login-lastlog.patch +++ b/util-linux-ng-2.13-login-lastlog.patch @@ -1,6 +1,8 @@ ---- util-linux-ng-2.13-rc3/login-utils/login.c.xxx 2007-08-13 12:11:14.000000000 +0200 -+++ util-linux-ng-2.13-rc3/login-utils/login.c 2007-08-13 12:12:24.000000000 +0200 -@@ -1402,7 +1402,7 @@ +Index: util-linux-ng-2.14.2-rc1/login-utils/login.c +=================================================================== +--- util-linux-ng-2.14.2-rc1.orig/login-utils/login.c ++++ util-linux-ng-2.14.2-rc1/login-utils/login.c +@@ -1415,7 +1415,7 @@ dolastlog(int quiet) { struct lastlog ll; int fd; diff --git a/util-linux-ng-2.13-login-pamstart.patch b/util-linux-ng-2.13-login-pamstart.patch index 90a67b5..31d14af 100644 --- a/util-linux-ng-2.13-login-pamstart.patch +++ b/util-linux-ng-2.13-login-pamstart.patch @@ -1,8 +1,8 @@ -Index: util-linux-ng-2.14.1-rc1/login-utils/login.c +Index: util-linux-ng-2.14.2-rc1/login-utils/login.c =================================================================== ---- util-linux-ng-2.14.1-rc1.orig/login-utils/login.c -+++ util-linux-ng-2.14.1-rc1/login-utils/login.c -@@ -542,7 +542,7 @@ main(int argc, char **argv) +--- util-linux-ng-2.14.2-rc1.orig/login-utils/login.c ++++ util-linux-ng-2.14.2-rc1/login-utils/login.c +@@ -555,7 +555,7 @@ main(int argc, char **argv) * Therefore, we are safe not setting it to anything */ diff --git a/util-linux-ng-2.14-fdisk-cylinder.patch b/util-linux-ng-2.14-fdisk-cylinder.patch deleted file mode 100644 index 98891f3..0000000 --- a/util-linux-ng-2.14-fdisk-cylinder.patch +++ /dev/null @@ -1,30 +0,0 @@ - - Upstream patch: - - commit 5ea8931c95b2e0b1663f28591d2c721f07a88181 - Author: Karel Zak - Date: Thu Nov 13 23:08:34 2008 +0100 - -diff -up util-linux-ng-2.14.1/fdisk/fdisk.c.kzak util-linux-ng-2.14.1/fdisk/fdisk.c ---- util-linux-ng-2.14.1/fdisk/fdisk.c.kzak 2008-11-21 14:27:19.000000000 +0100 -+++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-21 15:10:07.000000000 +0100 -@@ -1193,7 +1193,8 @@ read_int(unsigned int low, unsigned int - */ - if (!display_in_cyl_units) - i *= heads * sectors; -- } else if (*(line_ptr + 1) == 'B' && -+ } else if (*line_ptr && -+ *(line_ptr + 1) == 'B' && - *(line_ptr + 2) == '\0') { - /* - * 10^N -@@ -1206,7 +1207,8 @@ read_int(unsigned int low, unsigned int - absolute = 1000000000; - else - absolute = -1; -- } else if (*(line_ptr + 1) == '\0') { -+ } else if (*line_ptr && -+ *(line_ptr + 1) == '\0') { - /* - * 2^N - */ diff --git a/util-linux-ng-2.13-ipcs-32bit.patch b/util-linux-ng-2.14-ipcs-32bit.patch similarity index 69% rename from util-linux-ng-2.13-ipcs-32bit.patch rename to util-linux-ng-2.14-ipcs-32bit.patch index 6bdca88..55c52dd 100644 --- a/util-linux-ng-2.13-ipcs-32bit.patch +++ b/util-linux-ng-2.14-ipcs-32bit.patch @@ -1,6 +1,7 @@ ---- util-linux-ng-2.13-rc3/sys-utils/ipcs.c.kzak 2007-04-25 14:43:38.000000000 +0200 -+++ util-linux-ng-2.13-rc3/sys-utils/ipcs.c 2007-08-13 12:21:15.000000000 +0200 -@@ -253,6 +253,26 @@ +diff -up util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c +--- util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak 2008-12-22 18:53:06.000000000 +0100 ++++ util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c 2008-12-22 19:31:20.000000000 +0100 +@@ -253,6 +253,26 @@ print_perms (int id, struct ipc_perm *ip printf(" %-10d\n", ipcp->gid); } @@ -27,7 +28,7 @@ void do_shm (char format) { -@@ -268,7 +288,7 @@ +@@ -268,7 +288,7 @@ void do_shm (char format) printf (_("kernel not configured for shared memory\n")); return; } @@ -36,7 +37,7 @@ switch (format) { case LIMITS: printf (_("------ Shared Memory Limits --------\n")); -@@ -276,12 +296,12 @@ +@@ -276,12 +296,12 @@ void do_shm (char format) return; /* glibc 2.1.3 and all earlier libc's have ints as fields of struct shminfo; glibc 2.1.91 has unsigned long; ach */ @@ -49,8 +50,8 @@ + printf (_("max seg size (kbytes) = %llu\n"), + (shminfo_from_proc("shmmax", shminfo.shmmax) >> 10)); printf (_("max total shared memory (kbytes) = %llu\n"), -- sysconf(_SC_PAGESIZE) / 1024 * (unsigned long long) shminfo.shmall); -+ sysconf(_SC_PAGESIZE) / 1024 * shminfo_from_proc("shmall", shminfo.shmall)); +- getpagesize() / 1024 * (unsigned long long) shminfo.shmall); ++ getpagesize() / 1024 * shminfo_from_proc("shmall", shminfo.shmall)); printf (_("min seg size (bytes) = %lu\n"), (unsigned long) shminfo.shmmin); return; diff --git a/util-linux-ng-2.14-mount-file_t.patch b/util-linux-ng-2.14-mount-file_t.patch deleted file mode 100644 index c7e0e0d..0000000 --- a/util-linux-ng-2.14-mount-file_t.patch +++ /dev/null @@ -1,52 +0,0 @@ -Index: util-linux-ng-2.14.1/mount/mount.c -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/mount.c -+++ util-linux-ng-2.14.1/mount/mount.c -@@ -329,7 +329,7 @@ append_context(const char *optname, char - security_context_t raw = NULL; - char *data = NULL; - -- if (!is_selinux_enabled()) -+ if (is_selinux_enabled() != 1) - /* ignore the option if we running without selinux */ - return 0; - -@@ -340,8 +340,8 @@ append_context(const char *optname, char - data = *optdata =='"' ? strip_quotes(optdata) : optdata; - - if (selinux_trans_to_raw_context( -- (security_context_t) data, &raw)==-1 || -- raw==NULL) -+ (security_context_t) data, &raw) == -1 || -+ raw == NULL) - return -1; - - if (verbose) -@@ -1372,6 +1372,27 @@ try_mount_one (const char *spec0, const - res = EX_FAIL; - - out: -+ -+#ifdef HAVE_LIBSELINUX -+ if (res != EX_FAIL && verbose && is_selinux_enabled() > 0) { -+ security_context_t raw = NULL, def = NULL; -+ -+ if (getfilecon(node, &raw) > 0 && -+ security_get_initial_context("file", &def) == 0) { -+ -+ if (!selinux_file_context_cmp(raw, def)) -+ printf(_("mount: %s does not contain SELinux labels.\n" -+ " You just mounted an file system that supports labels which does not\n" -+ " contain labels, onto an SELinux box. It is likely that confined\n" -+ " applications will generate AVC messages and not be allowed access to\n" -+ " this file system. For more details see restorecon(8) and mount(8).\n"), -+ node); -+ } -+ freecon(raw); -+ freecon(def); -+ } -+#endif -+ - my_free(extra_opts1); - my_free(spec1); - my_free(node1); diff --git a/util-linux-ng-2.14-mount-man-tmpfs.patch b/util-linux-ng-2.14-mount-man-tmpfs.patch deleted file mode 100644 index 6ed7a81..0000000 --- a/util-linux-ng-2.14-mount-man-tmpfs.patch +++ /dev/null @@ -1,104 +0,0 @@ -From b9f2b3de43c820a4259ec8855359a2d8d18abe01 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 6 Oct 2008 12:56:37 +0200 -Subject: [PATCH] mount: sync tmpfs info in mount.8 with Documentation/filesystems/tmpfs.txt - -Addresses-Red-Hat-Bugzilla: #465761 -Signed-off-by: Karel Zak ---- - mount/mount.8 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++------- - 1 files changed, 62 insertions(+), 9 deletions(-) - -Index: util-linux-ng-2.14.1/mount/mount.8 -=================================================================== ---- util-linux-ng-2.14.1.orig/mount/mount.8 -+++ util-linux-ng-2.14.1/mount/mount.8 -@@ -1607,26 +1607,79 @@ and the current version of - None. - - .SH "Mount options for tmpfs" --The following parameters accept a suffix --.BR k , --.B m --or --.B g --for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount. - .TP - .BI size= nbytes - Override default maximum size of the filesystem. - The size is given in bytes, and rounded down to entire pages. --The default is half of the memory. -+The default is half of the memory. The size parameter also accepts a suffix % -+to limit this tmpfs instance to that percentage of your physical RAM: -+the default, when neither size nor nr_blocks is specified, is size=50% - .TP - .B nr_blocks= --Set number of blocks. -+The same as size, but in blocks of PAGE_CACHE_SIZE - .TP - .B nr_inodes= --Set number of inodes. -+The maximum number of inodes for this instance. The default -+is half of the number of your physical RAM pages, or (on a -+machine with highmem) the number of lowmem RAM pages, -+whichever is the lower. -+.PP -+The tmpfs mount options for sizing ( -+.BR size , -+.BR nr_blocks , -+and -+.BR nr_inodes ) -+accept a suffix -+.BR k , -+.B m -+or -+.B g -+for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount. -+ - .TP - .B mode= - Set initial permissions of the root directory. -+.TP -+.B uid= -+The user id. -+.TP -+.B gid= -+The group id. -+.TP -+.B mpol=[default|prefer:Node|bind:NodeList|interleave|interleave:NodeList] -+Set the NUMA memory allocation policy for all files in that -+instance (if the kernel CONFIG_NUMA is enabled) - which can be adjusted on the -+fly via 'mount -o remount ...' -+.RS -+.TP -+.B default -+prefers to allocate memory from the local node -+.TP -+.B prefer:Node -+prefers to allocate memory from the given Node -+.TP -+.B bind:NodeList -+allocates memory only from nodes in NodeList -+.TP -+.B interleave -+prefers to allocate from each node in turn -+.TP -+.B interleave:NodeList -+allocates from each node of NodeList in turn. -+.PP -+The NodeList format is a comma-separated list of decimal numbers and ranges, a -+range being two hyphen-separated decimal numbers, the smallest and largest node -+numbers in the range. For example, mpol=bind:0-3,5,7,9-15 -+ -+Note that trying to mount a tmpfs with an mpol option will fail if the -+running kernel does not support NUMA; and will fail if its nodelist -+specifies a node which is not online. If your system relies on that -+tmpfs being mounted, but from time to time runs a kernel built without -+NUMA capability (perhaps a safe recovery kernel), or with fewer nodes -+online, then it is advisable to omit the mpol option from automatic -+mount options. It can be added later, when the tmpfs is already mounted -+on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'. -+.PE - - .SH "Mount options for udf" - udf is the "Universal Disk Format" filesystem defined by the Optical diff --git a/util-linux-ng-2.14-mount-managed.patch b/util-linux-ng-2.14-mount-managed.patch index 50a601d..f7e93e7 100644 --- a/util-linux-ng-2.14-mount-managed.patch +++ b/util-linux-ng-2.14-mount-managed.patch @@ -1,7 +1,8 @@ -diff -up util-linux-ng-2.14-rc3/mount/mount.c.mng util-linux-ng-2.14-rc3/mount/mount.c ---- util-linux-ng-2.14-rc3/mount/mount.c.mng 2008-05-14 12:55:32.000000000 +0200 -+++ util-linux-ng-2.14-rc3/mount/mount.c 2008-05-19 12:11:39.000000000 +0200 -@@ -176,6 +176,8 @@ static const struct opt_map opt_map[] = +Index: util-linux-ng-2.14.2-rc1/mount/mount.c +=================================================================== +--- util-linux-ng-2.14.2-rc1.orig/mount/mount.c ++++ util-linux-ng-2.14.2-rc1/mount/mount.c +@@ -180,6 +180,8 @@ static const struct opt_map opt_map[] = { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard to mtime/ctime */ #endif diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 5ea6e92..88e35bf 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,12 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.14.1 -Release: 5%{?dist} +Version: 2.14.2 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng +%define upstream_version %{version}-rc1 + ### Features %if 0%{?rhel} %define include_raw 1 @@ -35,7 +37,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -92,17 +94,11 @@ Patch6: util-linux-ng-2.13-ctrlaltdel-man.patch # 218915 - fdisk -b 4K (move to upstream?) Patch7: util-linux-ng-2.13-fdisk-b-4096.patch # 231192 - ipcs is not printing correct values on pLinux -Patch8: util-linux-ng-2.13-ipcs-32bit.patch +Patch8: util-linux-ng-2.14-ipcs-32bit.patch # add a missing header Patch9: util-linux-ng-2.13-floppy-locale.patch # remove partitions Patch10: util-linux-ng-2.14-blockdev-rmpart.patch -# 390691: mount should check selinux context on mount, and warn on file_t -Patch11: util-linux-ng-2.14-mount-file_t.patch -# 465761: mount manpage is missing uid/gid mount options for tmpfs (upstream patch) -Patch12: util-linux-ng-2.14-mount-man-tmpfs.patch -# 472502: Problem with fdisk and use +sectors for the end of partition (upstream patch) -Patch13: util-linux-ng-2.14-fdisk-cylinder.patch %description The util-linux-ng package contains a large variety of low-level system @@ -111,7 +107,7 @@ others, Util-linux contains the fdisk configuration tool and the login program. %prep -%setup -q -a 11 -n %{name}-%{version} +%setup -q -a 11 -n %{name}-%{upstream_version} cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 @@ -124,9 +120,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 %build unset LINGUAS || : @@ -519,6 +512,10 @@ exit 0 /sbin/losetup %changelog +* Mon Dec 22 2008 Karel Zak 2.14.2-0.1 +- upgrade to 2.14.2-rc1 +- refresh old patches + * Fri Nov 21 2008 Karel Zak 2.14.1-5 - fix #472502 - problem with fdisk and use +sectors for the end of partition From 70f497f2914db9fd3f73641af3d5eecea5644fac Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 22 Jan 2009 14:39:44 +0000 Subject: [PATCH 28/86] - fix #480413 - util-linux-ng doesn't include scriptreplay - fix #479002 - remove dependency on ConsoleKit-libs - upgrade to 2.14.2-rc2 --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-login.pamd | 2 +- util-linux-ng.spec | 18 ++++++++++++------ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.cvsignore b/.cvsignore index 99baa84..e74d18a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.14.2-rc1.tar.bz2 +util-linux-ng-2.14.2-rc2.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index f90d28e..be054cb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -620a0b46dd7a98d541299ac5a8772d98 util-linux-ng-2.14.2-rc1.tar.bz2 +880fff92b554b4980a8ef3a9c881ce68 util-linux-ng-2.14.2-rc2.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-login.pamd b/util-linux-ng-login.pamd index 2c0c0b2..2c9a3a2 100644 --- a/util-linux-ng-login.pamd +++ b/util-linux-ng-login.pamd @@ -13,4 +13,4 @@ session required pam_selinux.so open session required pam_namespace.so session optional pam_keyinit.so force revoke session include system-auth -session optional pam_ck_connector.so +-session optional pam_ck_connector.so diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 88e35bf..6582dcb 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Features %if 0%{?rhel} @@ -72,9 +72,8 @@ Provides: setarch = %{version}-%{release} Requires(preun): /sbin/install-info Requires(post): /sbin/install-info Requires(post): coreutils -Requires: pam >= 0.66-4, /etc/pam.d/system-auth +Requires: pam >= 1.0.90, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 -Requires: ConsoleKit-libs %if %{include_raw} Requires: udev %endif @@ -235,13 +234,13 @@ rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_ # deprecated commands for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /sbin/shutdown %{_bindir}/scriptreplay /usr/sbin/vipw /usr/sbin/vigr; do + /sbin/shutdown /usr/sbin/vipw /usr/sbin/vigr; do rm -f $RPM_BUILD_ROOT$I done # deprecated man pages for I in man1/chkdupexe.1 man1/line.1 man1/pg.1 man1/newgrp.1 \ - man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 man1/scriptreplay.1 \ + man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 \ man8/vipw.8 man8/vigr; do rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* done @@ -421,6 +420,7 @@ exit 0 %{_bindir}/renice %{_bindir}/rev %{_bindir}/script +%{_bindir}/scriptreplay %{_bindir}/setarch %{_bindir}/setsid %{_bindir}/setterm @@ -463,6 +463,7 @@ exit 0 %{_mandir}/man1/rename.1* %{_mandir}/man1/rev.1* %{_mandir}/man1/script.1* +%{_mandir}/man1/scriptreplay.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/tailf.1* %{_mandir}/man1/ul.1* @@ -512,6 +513,11 @@ exit 0 /sbin/losetup %changelog +* Thu Jan 22 2009 Karel Zak 2.14.2-0.2 +- fix #480413 - util-linux-ng doesn't include scriptreplay +- fix #479002 - remove dependency on ConsoleKit-libs +- upgrade to 2.14.2-rc2 + * Mon Dec 22 2008 Karel Zak 2.14.2-0.1 - upgrade to 2.14.2-rc1 - refresh old patches From 7987ff85b89f9976bd15f779752d0c0be34f7778 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 9 Feb 2009 14:16:06 +0000 Subject: [PATCH 29/86] - upgrade to stable 2.14.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/v2.14.2-Releas eNotes --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index e74d18a..cf7a49d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.14.2-rc2.tar.bz2 +util-linux-ng-2.14.2.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index be054cb..932e879 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -880fff92b554b4980a8ef3a9c881ce68 util-linux-ng-2.14.2-rc2.tar.bz2 +b9d0053a22cfcbf0b9c0aa6d6eccfbc8 util-linux-ng-2.14.2.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 6582dcb..50cc2df 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -513,6 +513,10 @@ exit 0 /sbin/losetup %changelog +* Mon Feb 9 2009 Karel Zak 2.14.2-1 +- upgrade to stable 2.14.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/v2.14.2-ReleaseNotes + * Thu Jan 22 2009 Karel Zak 2.14.2-0.2 - fix #480413 - util-linux-ng doesn't include scriptreplay - fix #479002 - remove dependency on ConsoleKit-libs From c3563524aa7ce734d878db666f8f12eb7c05270a Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 9 Feb 2009 15:34:53 +0000 Subject: [PATCH 30/86] - fix typo in spec file --- util-linux-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 50cc2df..c353abd 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -513,6 +513,9 @@ exit 0 /sbin/losetup %changelog +* Mon Feb 9 2009 Karel Zak 2.14.2-2 +- fix typo in spec file + * Mon Feb 9 2009 Karel Zak 2.14.2-1 - upgrade to stable 2.14.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/v2.14.2-ReleaseNotes From 66c91f0320ebed7c1de85c9830275023e8b6c925 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 20 Feb 2009 08:20:28 +0000 Subject: [PATCH 31/86] - add -r option to dmesg(1) --- util-linux-ng.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index c353abd..86463e3 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -98,6 +98,8 @@ Patch8: util-linux-ng-2.14-ipcs-32bit.patch Patch9: util-linux-ng-2.13-floppy-locale.patch # remove partitions Patch10: util-linux-ng-2.14-blockdev-rmpart.patch +# Add -r options to dmesg (upstream patch) +Patch11: util-linux-ng-2.14-dmesg-r.patch %description The util-linux-ng package contains a large variety of low-level system @@ -119,6 +121,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -513,6 +516,9 @@ exit 0 /sbin/losetup %changelog +* Fri Feb 20 2009 Karel Zak 2.14.2-3 +- add -r option to dmesg(1) + * Mon Feb 9 2009 Karel Zak 2.14.2-2 - fix typo in spec file From 9c96631083347f346689d9a3ccc4e4f6e3cd75bc Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 20 Feb 2009 09:23:39 +0000 Subject: [PATCH 32/86] - add a missing patch --- util-linux-ng-2.14-dmesg-r.patch | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 util-linux-ng-2.14-dmesg-r.patch diff --git a/util-linux-ng-2.14-dmesg-r.patch b/util-linux-ng-2.14-dmesg-r.patch new file mode 100644 index 0000000..0e4a065 --- /dev/null +++ b/util-linux-ng-2.14-dmesg-r.patch @@ -0,0 +1,79 @@ +From 11ea22d5a3dbb69557a4e1c7e3c862b0765102b5 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Thu, 8 Jan 2009 11:44:27 -0500 +Subject: [PATCH] dmesg: Add -r (raw) option. + +Useful for debugging which kernel messages are ruining your quiet +bootup. + +Signed-off-by: Adam Jackson +--- + sys-utils/dmesg.1 | 5 ++++- + sys-utils/dmesg.c | 8 ++++++-- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/sys-utils/dmesg.1 b/sys-utils/dmesg.1 +index d5dfa9d..33fd8b0 100644 +--- a/sys-utils/dmesg.1 ++++ b/sys-utils/dmesg.1 +@@ -4,7 +4,7 @@ + .SH NAME + dmesg \- print or control the kernel ring buffer + .SH SYNOPSIS +-.BI "dmesg [ \-c ] [ \-n " level " ] [ \-s " bufsize " ]" ++.BI "dmesg [ \-c ] [ -r ] [ \-n " level " ] [ \-s " bufsize " ]" + .SH DESCRIPTION + .B dmesg + is used to examine or control the kernel ring buffer. +@@ -22,6 +22,9 @@ file to whoever can debug their problem. + .B \-c + Clear the ring buffer contents after printing. + .TP ++.B \-r ++Print the raw message buffer, i.e., don't strip the log level prefixes. ++.TP + .BI \-s bufsize + Use a buffer of size + .I bufsize +diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c +index ac0535d..b634d86 100644 +--- a/sys-utils/dmesg.c ++++ b/sys-utils/dmesg.c +@@ -56,13 +56,14 @@ main(int argc, char *argv[]) { + int level = 0; + int lastc; + int cmd = 3; /* Read all messages in the ring buffer */ ++ int raw = 0; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + progname = argv[0]; +- while ((c = getopt(argc, argv, "cn:s:")) != -1) { ++ while ((c = getopt(argc, argv, "crn:s:")) != -1) { + switch (c) { + case 'c': + cmd = 4; /* Read and clear all messages */ +@@ -71,6 +72,9 @@ main(int argc, char *argv[]) { + cmd = 8; /* Set level of messages */ + level = atoi(optarg); + break; ++ case 'r': ++ raw = 1; ++ break; + case 's': + bufsize = atoi(optarg); + if (bufsize < 4096) +@@ -131,7 +135,7 @@ main(int argc, char *argv[]) { + + lastc = '\n'; + for (i = 0; i < n; i++) { +- if ((i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { ++ if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { + i++; + while (buf[i] >= '0' && buf[i] <= '9') + i++; +-- +1.6.0.6 + From 0e1be0445efe0a1928109b38067c657c7856c264 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 23:34:24 +0000 Subject: [PATCH 33/86] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- util-linux-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 86463e3..fd741c4 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -516,6 +516,9 @@ exit 0 /sbin/losetup %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 2.14.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Fri Feb 20 2009 Karel Zak 2.14.2-3 - add -r option to dmesg(1) From 24912fbd9dc7ef65f373c32a0a62bb72309db061 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 19 Mar 2009 10:11:58 +0000 Subject: [PATCH 34/86] - fix #489672 - flock segfaults when file name is not given (upstream) - fix #476964 - Mount /var/tmp with tmpfs creates denials - fix #487227 - fdisk 4KiB hw sectors support (upstream) - fix #477303 - renice doesn't support -n option (upstream) --- mount.tmpfs | 16 +++++ util-linux-ng-2.13-fdisk-b-4096.patch | 13 ---- util-linux-ng-2.13-login-pamstart.patch | 13 ---- util-linux-ng-2.14-fdisk-4k-I.patch | 70 ++++++++++++++++++++ util-linux-ng-2.14-fdisk-4k-II.patch | 63 ++++++++++++++++++ util-linux-ng-2.14-fdisk-4k-III.patch | 44 +++++++++++++ util-linux-ng-2.14-flock-segfaults.patch | 54 +++++++++++++++ util-linux-ng-2.14-login-remote.patch | 55 ++++++++++++++++ util-linux-ng-2.14-renice-n.patch | 83 ++++++++++++++++++++++++ util-linux-ng.spec | 74 +++++++++++++++------ 10 files changed, 439 insertions(+), 46 deletions(-) create mode 100644 mount.tmpfs delete mode 100644 util-linux-ng-2.13-fdisk-b-4096.patch delete mode 100644 util-linux-ng-2.13-login-pamstart.patch create mode 100644 util-linux-ng-2.14-fdisk-4k-I.patch create mode 100644 util-linux-ng-2.14-fdisk-4k-II.patch create mode 100644 util-linux-ng-2.14-fdisk-4k-III.patch create mode 100644 util-linux-ng-2.14-flock-segfaults.patch create mode 100644 util-linux-ng-2.14-login-remote.patch create mode 100644 util-linux-ng-2.14-renice-n.patch diff --git a/mount.tmpfs b/mount.tmpfs new file mode 100644 index 0000000..8bcfb99 --- /dev/null +++ b/mount.tmpfs @@ -0,0 +1,16 @@ +#! /bin/bash +# +# Copyright (C) 2009 Eric Paris +# Daniel Walsh +# +# http://bugzilla.redhat.com/show_bug.cgi?id=476964 +# + +if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then + if con=$(ls -Zd "$2" | cut -f 5 -d ' '); then + /bin/mount "$@" -o rootcontext=\"$con\" -i -t tmpfs + exit $? + fi +fi + +/bin/mount "$@" -i -t tmpfs diff --git a/util-linux-ng-2.13-fdisk-b-4096.patch b/util-linux-ng-2.13-fdisk-b-4096.patch deleted file mode 100644 index d0046a7..0000000 --- a/util-linux-ng-2.13-fdisk-b-4096.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.14.2-rc1/fdisk/fdisk.c -=================================================================== ---- util-linux-ng-2.14.2-rc1.orig/fdisk/fdisk.c -+++ util-linux-ng-2.14.2-rc1/fdisk/fdisk.c -@@ -2591,7 +2591,7 @@ main(int argc, char **argv) { - */ - sector_size = atoi(optarg); - if (sector_size != 512 && sector_size != 1024 && -- sector_size != 2048) -+ sector_size != 2048 && sector_size != 4096) - fatal(usage); - sector_offset = 2; - user_set_sector_size = 1; diff --git a/util-linux-ng-2.13-login-pamstart.patch b/util-linux-ng-2.13-login-pamstart.patch deleted file mode 100644 index 31d14af..0000000 --- a/util-linux-ng-2.13-login-pamstart.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.14.2-rc1/login-utils/login.c -=================================================================== ---- util-linux-ng-2.14.2-rc1.orig/login-utils/login.c -+++ util-linux-ng-2.14.2-rc1/login-utils/login.c -@@ -555,7 +555,7 @@ main(int argc, char **argv) - * Therefore, we are safe not setting it to anything - */ - -- retcode = pam_start("login",username, &conv, &pamh); -+ retcode = pam_start(hflag?"remote":"login",username, &conv, &pamh); - if(retcode != PAM_SUCCESS) { - fprintf(stderr, _("%s: PAM failure, aborting: %s\n"), - "login", pam_strerror(pamh, retcode)); diff --git a/util-linux-ng-2.14-fdisk-4k-I.patch b/util-linux-ng-2.14-fdisk-4k-I.patch new file mode 100644 index 0000000..f21b661 --- /dev/null +++ b/util-linux-ng-2.14-fdisk-4k-I.patch @@ -0,0 +1,70 @@ +From 10e3d0319a009a86a92c26da274e50850da0a9b3 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Thu, 26 Feb 2009 09:53:09 +0100 +Subject: [PATCH] fdisk: doesn't handle large (4KiB) sectors properly + +fdisk (at least with the -u option) does not handle sector sizes other +than 512. + +Address-Red-Hat-Bugzilla: #487227 +Signed-off-by: Eric Sandeen +Signed-off-by: Karel Zak +--- + fdisk/fdisk.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c +index 9504e7a..0c83747 100644 +--- a/fdisk/fdisk.c ++++ b/fdisk/fdisk.c +@@ -212,6 +212,7 @@ unsigned long long sector_offset = 1, extended_offset = 0, sectors; + unsigned int heads, + cylinders, + sector_size = DEFAULT_SECTOR_SIZE, ++ sector_factor = 1, + user_set_sector_size = 0, + units_per_sector = 1, + display_in_cyl_units = 1; +@@ -905,11 +906,10 @@ get_partition_table_geometry(void) { + + void + get_geometry(int fd, struct geom *g) { +- int sec_fac; + unsigned long long llsectors, llcyls; + + get_sectorsize(fd); +- sec_fac = sector_size / 512; ++ sector_factor = sector_size / 512; + guess_device_type(fd); + heads = cylinders = sectors = 0; + kern_heads = kern_sectors = 0; +@@ -934,7 +934,7 @@ get_geometry(int fd, struct geom *g) { + if (dos_compatible_flag) + sector_offset = sectors; + +- llcyls = total_number_of_sectors / (heads * sectors * sec_fac); ++ llcyls = total_number_of_sectors / (heads * sectors * sector_factor); + cylinders = llcyls; + if (cylinders != llcyls) /* truncated? */ + cylinders = ~0; +@@ -1640,7 +1640,7 @@ list_disk_geometry(void) { + heads, sectors, cylinders); + if (units_per_sector == 1) + printf(_(", total %llu sectors"), +- total_number_of_sectors / (sector_size/512)); ++ total_number_of_sectors / sector_factor); + printf("\n"); + printf(_("Units = %s of %d * %d = %d bytes\n"), + str_units(PLURAL), +@@ -2030,7 +2030,7 @@ add_partition(int n, int sys) { + if (display_in_cyl_units || !total_number_of_sectors) + llimit = heads * sectors * cylinders - 1; + else +- llimit = total_number_of_sectors - 1; ++ llimit = (total_number_of_sectors / sector_factor) - 1; + limit = llimit; + if (limit != llimit) + limit = 0x7fffffff; +-- +1.6.0.6 + diff --git a/util-linux-ng-2.14-fdisk-4k-II.patch b/util-linux-ng-2.14-fdisk-4k-II.patch new file mode 100644 index 0000000..1aac5ff --- /dev/null +++ b/util-linux-ng-2.14-fdisk-4k-II.patch @@ -0,0 +1,63 @@ +diff -up util-linux-ng-2.14.2/fdisk/fdisk.c.kzak util-linux-ng-2.14.2/fdisk/fdisk.c +--- util-linux-ng-2.14.2/fdisk/fdisk.c.kzak 2009-03-19 09:59:50.000000000 +0100 ++++ util-linux-ng-2.14.2/fdisk/fdisk.c 2009-03-19 09:59:50.000000000 +0100 +@@ -216,7 +216,7 @@ unsigned int heads, + units_per_sector = 1, + display_in_cyl_units = 1; + +-unsigned long long total_number_of_sectors; ++unsigned long long total_number_of_sectors; /* (!) 512-byte sectors */ + + #define dos_label (!sun_label && !sgi_label && !aix_label && !mac_label && !osf_label) + int sun_label = 0; /* looking at sun disklabel */ +@@ -892,7 +892,7 @@ get_partition_table_geometry(void) { + + void + get_geometry(int fd, struct geom *g) { +- unsigned long long llsectors, llcyls; ++ unsigned long long llcyls; + + get_sectorsize(fd); + sector_factor = sector_size / 512; +@@ -911,10 +911,8 @@ get_geometry(int fd, struct geom *g) { + pt_sectors ? pt_sectors : + kern_sectors ? kern_sectors : 63; + +- if (blkdev_get_sectors(fd, &llsectors) == -1) +- llsectors = 0; +- +- total_number_of_sectors = llsectors; ++ if (blkdev_get_sectors(fd, &total_number_of_sectors) == -1) ++ total_number_of_sectors = 0; + + sector_offset = 1; + if (dos_compatible_flag) +@@ -1922,7 +1920,8 @@ check(int n, unsigned int h, unsigned in + static void + verify(void) { + int i, j; +- unsigned long total = 1; ++ unsigned long long total = 1; ++ unsigned long long n_sectors = (total_number_of_sectors / sector_factor); + unsigned long long first[partitions], last[partitions]; + struct partition *p; + +@@ -1985,12 +1984,12 @@ verify(void) { + } + } + +- if (total > total_number_of_sectors) +- printf(_("Total allocated sectors %ld greater than the maximum" +- " %lld\n"), total, total_number_of_sectors); +- else if (total < total_number_of_sectors) +- printf(_("%lld unallocated sectors\n"), +- total_number_of_sectors - total); ++ if (total > n_sectors) ++ printf(_("Total allocated sectors %llu greater than the maximum" ++ " %llu\n"), total, n_sectors); ++ else if (total < n_sectors) ++ printf(_("%lld unallocated %d-byte sectors\n"), ++ n_sectors - total, sector_size); + } + + static void diff --git a/util-linux-ng-2.14-fdisk-4k-III.patch b/util-linux-ng-2.14-fdisk-4k-III.patch new file mode 100644 index 0000000..bb5e70a --- /dev/null +++ b/util-linux-ng-2.14-fdisk-4k-III.patch @@ -0,0 +1,44 @@ +From 8905beda2abb59b48ba00c5d521c934ead4df80b Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 9 Mar 2009 09:52:08 +0100 +Subject: [PATCH] fdisk: support "-b 4096" option + +The fdisk code is more ready for 4kB sectors and it makes sense to +support such sectr size for "-b" option. + +Address-Red-Hat-Bugzilla: #218915 +Signed-off-by: Karel Zak +--- + fdisk/fdisk.8 | 2 +- + fdisk/fdisk.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fdisk/fdisk.8 b/fdisk/fdisk.8 +index aea8820..30ee9d4 100644 +--- a/fdisk/fdisk.8 ++++ b/fdisk/fdisk.8 +@@ -166,7 +166,7 @@ program and Linux partitions with the Linux fdisk or Linux cfdisk program. + .SH OPTIONS + .TP + .BI "\-b " sectorsize +-Specify the sector size of the disk. Valid values are 512, 1024, or 2048. ++Specify the sector size of the disk. Valid values are 512, 1024, 2048 or 4096. + (Recent kernels know the sector size. Use this only on old kernels or + to override the kernel's ideas.) + .TP +diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c +index b7e517a..5593503 100644 +--- a/fdisk/fdisk.c ++++ b/fdisk/fdisk.c +@@ -2612,7 +2612,7 @@ main(int argc, char **argv) { + */ + sector_size = atoi(optarg); + if (sector_size != 512 && sector_size != 1024 && +- sector_size != 2048) ++ sector_size != 2048 && sector_size != 4096) + fatal(usage); + sector_offset = 2; + user_set_sector_size = 1; +-- +1.6.0.6 + diff --git a/util-linux-ng-2.14-flock-segfaults.patch b/util-linux-ng-2.14-flock-segfaults.patch new file mode 100644 index 0000000..9320739 --- /dev/null +++ b/util-linux-ng-2.14-flock-segfaults.patch @@ -0,0 +1,54 @@ +From 841f86dbc2e35166fd43341c8eb144680b0c7ece Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 11 Mar 2009 12:49:50 +0100 +Subject: [PATCH] flockc: segfaults when file name is not given + +$ flock -s +Segmentation fault + +ltrace: +__libc_start_main(0x8048870, 2, 0xbfe9f404, 0x8049070, 0x8049060 +getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = 115 +getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = -1 +strtol(0, 0xbfe9f34c, 10, 0x80494e0, 0xbfe9f354 +--- SIGSEGV (Segmentation fault) --- ++++ killed by SIGSEGV +++ + +Addresses-Red-Had-Bugzilla: #489672 +Signed-off-by: Karel Zak +--- + sys-utils/flock.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/sys-utils/flock.c b/sys-utils/flock.c +index 029e436..3386e15 100644 +--- a/sys-utils/flock.c ++++ b/sys-utils/flock.c +@@ -217,7 +217,7 @@ int main(int argc, char *argv[]) + EX_NOINPUT); + } + +- } else { ++ } else if (optind < argc) { + /* Use provided file descriptor */ + + fd = (int)strtol(argv[optind], &eon, 10); +@@ -226,8 +226,15 @@ int main(int argc, char *argv[]) + exit(EX_USAGE); + } + ++ } else { ++ /* Bad options */ ++ ++ fprintf(stderr, "%s: requires file descriptor, file or directory\n", ++ program); ++ exit(EX_USAGE); + } + ++ + if ( have_timeout ) { + if ( timeout.it_value.tv_sec == 0 && + timeout.it_value.tv_usec == 0 ) { +-- +1.6.0.6 + diff --git a/util-linux-ng-2.14-login-remote.patch b/util-linux-ng-2.14-login-remote.patch new file mode 100644 index 0000000..f073e15 --- /dev/null +++ b/util-linux-ng-2.14-login-remote.patch @@ -0,0 +1,55 @@ +From 067f5343c86ed6dd135cdf57eb99aa3f982fceed Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 17 Mar 2009 21:00:42 +0100 +Subject: [PATCH] login: use "remote" as a PAM service name for "login -h" + +Signed-off-by: Karel Zak +--- + login-utils/login.1 | 10 ++++++++++ + login-utils/login.c | 2 +- + 2 files changed, 11 insertions(+), 1 deletions(-) + +diff --git a/login-utils/login.1 b/login-utils/login.1 +index 9ddf25b..1227381 100644 +--- a/login-utils/login.1 ++++ b/login-utils/login.1 +@@ -105,6 +105,14 @@ to pass the name of the remote host to + so that it may be placed in utmp and wtmp. Only the superuser may use + this option. + ++Note that the \fB-h\fP option has impact on the \fBPAM service name\fP. The standard ++service name is "login", with the \fB-h\fP option the name is "remote". It's ++necessary to create a proper PAM config files (e.g. ++.I /etc/pam.d/login ++and ++.I /etc/pam.d/remote ++). ++ + .SH "SPECIAL ACCESS RESTRICTIONS" + The file + .I /etc/securetty +@@ -297,6 +305,8 @@ are allowed to log in from anywhere as is standard behavior. + .I /etc/passwd + .I /etc/nologin + .I /etc/usertty ++.I /etc/pam.d/login ++.I /etc/pam.d/remote + .I .hushlogin + .fi + .SH "SEE ALSO" +diff --git a/login-utils/login.c b/login-utils/login.c +index d362113..c924a1f 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -552,7 +552,7 @@ main(int argc, char **argv) + * Therefore, we are safe not setting it to anything + */ + +- retcode = pam_start("login",username, &conv, &pamh); ++ retcode = pam_start(hflag?"remote":"login",username, &conv, &pamh); + if(retcode != PAM_SUCCESS) { + fprintf(stderr, _("%s: PAM failure, aborting: %s\n"), + "login", pam_strerror(pamh, retcode)); +-- +1.6.0.6 + diff --git a/util-linux-ng-2.14-renice-n.patch b/util-linux-ng-2.14-renice-n.patch new file mode 100644 index 0000000..149304a --- /dev/null +++ b/util-linux-ng-2.14-renice-n.patch @@ -0,0 +1,83 @@ +From 7cfbafda9c484a8cadefc47ee115086e803d9391 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 9 Mar 2009 21:09:50 +0100 +Subject: [PATCH] renice: add -n option for compatibility with POSIX + +The -n option is required by POSIX.1-200x. + +Signed-off-by: Karel Zak +--- + sys-utils/renice.1 | 7 ++++++- + sys-utils/renice.c | 12 +++++++++--- + 2 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/sys-utils/renice.1 b/sys-utils/renice.1 +index 3c20d6e..32a23e1 100644 +--- a/sys-utils/renice.1 ++++ b/sys-utils/renice.1 +@@ -29,7 +29,7 @@ + .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + .\" SUCH DAMAGE. + .\" +-.\" @(#)renice.8 8.1 (Berkeley) 6/9/93 ++.\" @(#)renice.8 8.1 (Berkeley) 6/9/93 + .\" + .Dd June 9, 1993 + .Dt RENICE 1 +@@ -39,6 +39,7 @@ + .Nd alter priority of running processes + .Sh SYNOPSIS + .Nm renice ++.Op Fl n + .Ar priority + .Oo + .Op Fl p +@@ -74,6 +75,10 @@ their process ID's. + Options supported by + .Nm renice : + .Bl -tag -width Ds ++.It Fl n, Fl Fl priority ++The scheduling ++.Ar priority ++of the process, process group, or user. + .It Fl g, Fl Fl pgrp + Force + .Ar who +diff --git a/sys-utils/renice.c b/sys-utils/renice.c +index ac05d25..879e8bd 100644 +--- a/sys-utils/renice.c ++++ b/sys-utils/renice.c +@@ -51,14 +51,15 @@ int donice(int,int,int); + void usage(int rc) + { + printf( _("\nUsage:\n" +- " renice priority [-p|--pid] pid [... pid]\n" +- " renice priority -g|--pgrp pgrp [... pgrp]\n" +- " renice priority -u|--user user [... user]\n" ++ " renice [-n] priority [-p|--pid] pid [... pid]\n" ++ " renice [-n] priority -g|--pgrp pgrp [... pgrp]\n" ++ " renice [-n] priority -u|--user user [... user]\n" + " renice -h | --help\n" + " renice -v | --version\n\n")); + + exit(rc); + } ++ + /* + * Change the priority (nice) of processes + * or groups of processes which are already +@@ -93,6 +94,11 @@ main(int argc, char **argv) + if (argc < 2) + usage(EXIT_FAILURE); + ++ if (strcmp(*argv, "-n") == 0 || strcmp(*argv, "--priority") == 0) { ++ argc--; ++ argv++; ++ } ++ + prio = strtol(*argv, &endptr, 10); + if (*endptr) + usage(EXIT_FAILURE); +-- +1.6.0.6 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index fd741c4..30ba3a5 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -42,6 +42,7 @@ Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd Source4: util-linux-ng-60-raw.rules +Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 @@ -78,28 +79,45 @@ Requires: audit-libs >= 1.0.6 Requires: udev %endif -# 91174 - Patch to enabled remote service for login/pam -Patch0: util-linux-ng-2.13-login-pamstart.patch -# RHEL/Fedora specific mount options -Patch1: util-linux-ng-2.14-mount-managed.patch -# add note about ATAPI IDE floppy to fdformat.8 -Patch3: util-linux-ng-2.13-fdformat-man-ide.patch -# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 -Patch4: util-linux-ng-2.13-floppy-generic.patch -# 151635 - makeing /var/log/lastlog -Patch5: util-linux-ng-2.13-login-lastlog.patch -# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) -Patch6: util-linux-ng-2.13-ctrlaltdel-man.patch -# 218915 - fdisk -b 4K (move to upstream?) -Patch7: util-linux-ng-2.13-fdisk-b-4096.patch -# 231192 - ipcs is not printing correct values on pLinux -Patch8: util-linux-ng-2.14-ipcs-32bit.patch +### Floppy patches (Fedora/RHEL specific) +### # add a missing header -Patch9: util-linux-ng-2.13-floppy-locale.patch +Patch0: util-linux-ng-2.13-floppy-locale.patch +# add note about ATAPI IDE floppy to fdformat.8 +Patch1: util-linux-ng-2.13-fdformat-man-ide.patch +# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 +Patch2: util-linux-ng-2.13-floppy-generic.patch + +### Fedora/RHEL specific patches -- need to die! +### # remove partitions -Patch10: util-linux-ng-2.14-blockdev-rmpart.patch +Patch3: util-linux-ng-2.14-blockdev-rmpart.patch +# RHEL/Fedora specific mount options +Patch4: util-linux-ng-2.14-mount-managed.patch +# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) +Patch5: util-linux-ng-2.13-ctrlaltdel-man.patch + +### Ready for upstream? +### +# 231192 - ipcs is not printing correct values on pLinux +Patch6: util-linux-ng-2.14-ipcs-32bit.patch +# 151635 - makeing /var/log/lastlog +Patch7: util-linux-ng-2.13-login-lastlog.patch + +### Upstream patches (backported to the current Fedora/RHEL) +### +# 91174 - Patch to enabled remote service for login/pam +Patch8: util-linux-ng-2.14-login-remote.patch +# 218915, 487227 - fdisk 4KiB hw sectors support +Patch9: util-linux-ng-2.14-fdisk-4k-I.patch +Patch10: util-linux-ng-2.14-fdisk-4k-II.patch +Patch11: util-linux-ng-2.14-fdisk-4k-III.patch # Add -r options to dmesg (upstream patch) -Patch11: util-linux-ng-2.14-dmesg-r.patch +Patch12: util-linux-ng-2.14-dmesg-r.patch +# 489672 - flock segfaults when file name is not given +Patch13: util-linux-ng-2.14-flock-segfaults.patch +# 477303 - renice doesn't support -n option +Patch14: util-linux-ng-2.14-renice-n.patch %description The util-linux-ng package contains a large variety of low-level system @@ -122,6 +140,9 @@ cp %{SOURCE8} %{SOURCE9} . %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 %build unset LINGUAS || : @@ -222,6 +243,10 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock +# install tmpfs mount helper +pushd ${RPM_BUILD_ROOT}/sbin +install -m 755 %{SOURCE5} ./mount.tmpfs +popd # Final cleanup %ifnarch %cytune_archs @@ -505,6 +530,9 @@ exit 0 %attr(4755,root,root) /bin/mount %attr(4755,root,root) /bin/umount + +%attr(755,root,root) /sbin/mount.tmpfs + /sbin/swapon /sbin/swapoff %{_mandir}/man5/fstab.5* @@ -516,6 +544,12 @@ exit 0 /sbin/losetup %changelog +* Thu Mar 19 2009 Karel Zak 2.14.2-5 +- fix #489672 - flock segfaults when file name is not given (upstream) +- fix #476964 - Mount /var/tmp with tmpfs creates denials +- fix #487227 - fdisk 4KiB hw sectors support (upstream) +- fix #477303 - renice doesn't support -n option (upstream) + * Wed Feb 25 2009 Fedora Release Engineering - 2.14.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 04b6f2378045592637840f8f57cb94ee4f369f07 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 20 Mar 2009 08:16:20 +0000 Subject: [PATCH 35/86] - fix #491175 - mount of tmpfs FSs fail at boot --- mount.tmpfs | 7 ++++++- util-linux-ng.spec | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index 8bcfb99..533beb3 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -2,12 +2,17 @@ # # Copyright (C) 2009 Eric Paris # Daniel Walsh +# Karel Zak # # http://bugzilla.redhat.com/show_bug.cgi?id=476964 # +# Usage: +# /sbin/mount.tmpfs spec dir [-sfnv] [-o options] +# if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then - if con=$(ls -Zd "$2" | cut -f 5 -d ' '); then + con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') + if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then /bin/mount "$@" -o rootcontext=\"$con\" -i -t tmpfs exit $? fi diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 30ba3a5..e6ce95d 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -544,6 +544,9 @@ exit 0 /sbin/losetup %changelog +* Fri Mar 20 2009 Karel Zak 2.14.2-6 +- fix #491175 - mount of tmpfs FSs fail at boot + * Thu Mar 19 2009 Karel Zak 2.14.2-5 - fix #489672 - flock segfaults when file name is not given (upstream) - fix #476964 - Mount /var/tmp with tmpfs creates denials From 6d31d39936ec897a242eabffb132f77dbdfce10d Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 20 Mar 2009 09:13:48 +0000 Subject: [PATCH 36/86] - fix some nits in mount.tmpfs --- mount.tmpfs | 5 ++--- util-linux-ng.spec | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index 533beb3..f862c03 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -13,9 +13,8 @@ if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then - /bin/mount "$@" -o rootcontext=\"$con\" -i -t tmpfs - exit $? + exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs fi fi -/bin/mount "$@" -i -t tmpfs +exec /bin/mount "$@" -i -t tmpfs diff --git a/util-linux-ng.spec b/util-linux-ng.spec index e6ce95d..56f6250 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -544,6 +544,9 @@ exit 0 /sbin/losetup %changelog +* Fri Mar 20 2009 Karel Zak 2.14.2-7 +- fix some nits in mount.tmpfs + * Fri Mar 20 2009 Karel Zak 2.14.2-6 - fix #491175 - mount of tmpfs FSs fail at boot From 05a0394dee57b71eb93ad38d8e3fe679f9419b81 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 2 Apr 2009 20:25:26 +0000 Subject: [PATCH 37/86] - fix #490769 - %post scriptlet failed (thanks to Dan Horak) Fri Mar 20 2009 Karel Zak 2.14.2-7 - fix some nits in mount.tmpfs --- util-linux-ng.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 56f6250..bb51498 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.2 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -331,7 +331,7 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post -/sbin/install-info %{_infodir}/ipc.info %{_infodir}/dir +/sbin/install-info %{_infodir}/ipc.info %{_infodir}/dir || : # only for minimal buildroots without /var/log [ -d /var/log ] || /bin/mkdir -p /var/log /bin/touch /var/log/lastlog @@ -345,13 +345,13 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then # without selinux stuff on host machine with enabled selinux. # We don't want to use any RPM dependence on selinux policy for # matchpathcon(2). SELinux policy should be optional. - /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 + /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : fi fi %preun if [ "$1" = 0 ]; then - /sbin/install-info --del %{_infodir}/ipc.info %{_infodir}/dir + /sbin/install-info --del %{_infodir}/ipc.info %{_infodir}/dir || : fi exit 0 @@ -544,13 +544,16 @@ exit 0 /sbin/losetup %changelog -* Fri Mar 20 2009 Karel Zak 2.14.2-7 +* Thu Apr 2 2009 Karel Zak 2.14.2-8 +- fix #490769 - %post scriptlet failed (thanks to Dan Horak) + +* Fri Mar 20 2009 Karel Zak 2.14.2-7 - fix some nits in mount.tmpfs -* Fri Mar 20 2009 Karel Zak 2.14.2-6 +* Fri Mar 20 2009 Karel Zak 2.14.2-6 - fix #491175 - mount of tmpfs FSs fail at boot -* Thu Mar 19 2009 Karel Zak 2.14.2-5 +* Thu Mar 19 2009 Karel Zak 2.14.2-5 - fix #489672 - flock segfaults when file name is not given (upstream) - fix #476964 - Mount /var/tmp with tmpfs creates denials - fix #487227 - fdisk 4KiB hw sectors support (upstream) From 46df5ca3c5b3b910a6419b585cbe2393583f2e52 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 4 Jun 2009 15:12:50 +0000 Subject: [PATCH 38/86] - upgrade to 2.15.1-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15-ReleaseN otes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15.1-rc1-Ch angeLog - merged patches: util-linux-ng-2.14-login-remote.patch util-linux-ng-2.14-fdisk-4k-I.patch util-linux-ng-2.14-fdisk-4k-II.patch util-linux-ng-2.14-fdisk-4k-III.patch util-linux-ng-2.14-dmesg-r.patch util-linux-ng-2.14-flock-segfaults.patch util-linux-ng-2.14-renice-n.patch - new commands: lscpu, ipcmk - remove support for "managed" and "kudzu" mount options - cleanup spec file - enable built-in libblkid (replacement for the old blkid from e2fsprogs) --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.14-dmesg-r.patch | 79 ---- util-linux-ng-2.14-fdisk-4k-I.patch | 70 ---- util-linux-ng-2.14-fdisk-4k-II.patch | 63 ---- util-linux-ng-2.14-fdisk-4k-III.patch | 44 --- util-linux-ng-2.14-flock-segfaults.patch | 54 --- util-linux-ng-2.14-login-remote.patch | 55 --- util-linux-ng-2.14-mount-managed.patch | 13 - util-linux-ng-2.14-renice-n.patch | 83 ---- util-linux-ng-2.15-blkid-cachefile.patch | 75 ++++ ...tch => util-linux-ng-2.15-ipcs-32bit.patch | 19 +- util-linux-ng.spec | 354 +++++++++++------- 13 files changed, 292 insertions(+), 621 deletions(-) delete mode 100644 util-linux-ng-2.14-dmesg-r.patch delete mode 100644 util-linux-ng-2.14-fdisk-4k-I.patch delete mode 100644 util-linux-ng-2.14-fdisk-4k-II.patch delete mode 100644 util-linux-ng-2.14-fdisk-4k-III.patch delete mode 100644 util-linux-ng-2.14-flock-segfaults.patch delete mode 100644 util-linux-ng-2.14-login-remote.patch delete mode 100644 util-linux-ng-2.14-mount-managed.patch delete mode 100644 util-linux-ng-2.14-renice-n.patch create mode 100644 util-linux-ng-2.15-blkid-cachefile.patch rename util-linux-ng-2.14-ipcs-32bit.patch => util-linux-ng-2.15-ipcs-32bit.patch (68%) diff --git a/.cvsignore b/.cvsignore index cf7a49d..c23b19c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.14.2.tar.bz2 +util-linux-ng-2.15.1-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 932e879..57d5844 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -b9d0053a22cfcbf0b9c0aa6d6eccfbc8 util-linux-ng-2.14.2.tar.bz2 +dc5eb45e38ea335fdca80aa488fffc48 util-linux-ng-2.15.1-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.14-dmesg-r.patch b/util-linux-ng-2.14-dmesg-r.patch deleted file mode 100644 index 0e4a065..0000000 --- a/util-linux-ng-2.14-dmesg-r.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 11ea22d5a3dbb69557a4e1c7e3c862b0765102b5 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Thu, 8 Jan 2009 11:44:27 -0500 -Subject: [PATCH] dmesg: Add -r (raw) option. - -Useful for debugging which kernel messages are ruining your quiet -bootup. - -Signed-off-by: Adam Jackson ---- - sys-utils/dmesg.1 | 5 ++++- - sys-utils/dmesg.c | 8 ++++++-- - 2 files changed, 10 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/dmesg.1 b/sys-utils/dmesg.1 -index d5dfa9d..33fd8b0 100644 ---- a/sys-utils/dmesg.1 -+++ b/sys-utils/dmesg.1 -@@ -4,7 +4,7 @@ - .SH NAME - dmesg \- print or control the kernel ring buffer - .SH SYNOPSIS --.BI "dmesg [ \-c ] [ \-n " level " ] [ \-s " bufsize " ]" -+.BI "dmesg [ \-c ] [ -r ] [ \-n " level " ] [ \-s " bufsize " ]" - .SH DESCRIPTION - .B dmesg - is used to examine or control the kernel ring buffer. -@@ -22,6 +22,9 @@ file to whoever can debug their problem. - .B \-c - Clear the ring buffer contents after printing. - .TP -+.B \-r -+Print the raw message buffer, i.e., don't strip the log level prefixes. -+.TP - .BI \-s bufsize - Use a buffer of size - .I bufsize -diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c -index ac0535d..b634d86 100644 ---- a/sys-utils/dmesg.c -+++ b/sys-utils/dmesg.c -@@ -56,13 +56,14 @@ main(int argc, char *argv[]) { - int level = 0; - int lastc; - int cmd = 3; /* Read all messages in the ring buffer */ -+ int raw = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - - progname = argv[0]; -- while ((c = getopt(argc, argv, "cn:s:")) != -1) { -+ while ((c = getopt(argc, argv, "crn:s:")) != -1) { - switch (c) { - case 'c': - cmd = 4; /* Read and clear all messages */ -@@ -71,6 +72,9 @@ main(int argc, char *argv[]) { - cmd = 8; /* Set level of messages */ - level = atoi(optarg); - break; -+ case 'r': -+ raw = 1; -+ break; - case 's': - bufsize = atoi(optarg); - if (bufsize < 4096) -@@ -131,7 +135,7 @@ main(int argc, char *argv[]) { - - lastc = '\n'; - for (i = 0; i < n; i++) { -- if ((i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { -+ if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { - i++; - while (buf[i] >= '0' && buf[i] <= '9') - i++; --- -1.6.0.6 - diff --git a/util-linux-ng-2.14-fdisk-4k-I.patch b/util-linux-ng-2.14-fdisk-4k-I.patch deleted file mode 100644 index f21b661..0000000 --- a/util-linux-ng-2.14-fdisk-4k-I.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 10e3d0319a009a86a92c26da274e50850da0a9b3 Mon Sep 17 00:00:00 2001 -From: Eric Sandeen -Date: Thu, 26 Feb 2009 09:53:09 +0100 -Subject: [PATCH] fdisk: doesn't handle large (4KiB) sectors properly - -fdisk (at least with the -u option) does not handle sector sizes other -than 512. - -Address-Red-Hat-Bugzilla: #487227 -Signed-off-by: Eric Sandeen -Signed-off-by: Karel Zak ---- - fdisk/fdisk.c | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c -index 9504e7a..0c83747 100644 ---- a/fdisk/fdisk.c -+++ b/fdisk/fdisk.c -@@ -212,6 +212,7 @@ unsigned long long sector_offset = 1, extended_offset = 0, sectors; - unsigned int heads, - cylinders, - sector_size = DEFAULT_SECTOR_SIZE, -+ sector_factor = 1, - user_set_sector_size = 0, - units_per_sector = 1, - display_in_cyl_units = 1; -@@ -905,11 +906,10 @@ get_partition_table_geometry(void) { - - void - get_geometry(int fd, struct geom *g) { -- int sec_fac; - unsigned long long llsectors, llcyls; - - get_sectorsize(fd); -- sec_fac = sector_size / 512; -+ sector_factor = sector_size / 512; - guess_device_type(fd); - heads = cylinders = sectors = 0; - kern_heads = kern_sectors = 0; -@@ -934,7 +934,7 @@ get_geometry(int fd, struct geom *g) { - if (dos_compatible_flag) - sector_offset = sectors; - -- llcyls = total_number_of_sectors / (heads * sectors * sec_fac); -+ llcyls = total_number_of_sectors / (heads * sectors * sector_factor); - cylinders = llcyls; - if (cylinders != llcyls) /* truncated? */ - cylinders = ~0; -@@ -1640,7 +1640,7 @@ list_disk_geometry(void) { - heads, sectors, cylinders); - if (units_per_sector == 1) - printf(_(", total %llu sectors"), -- total_number_of_sectors / (sector_size/512)); -+ total_number_of_sectors / sector_factor); - printf("\n"); - printf(_("Units = %s of %d * %d = %d bytes\n"), - str_units(PLURAL), -@@ -2030,7 +2030,7 @@ add_partition(int n, int sys) { - if (display_in_cyl_units || !total_number_of_sectors) - llimit = heads * sectors * cylinders - 1; - else -- llimit = total_number_of_sectors - 1; -+ llimit = (total_number_of_sectors / sector_factor) - 1; - limit = llimit; - if (limit != llimit) - limit = 0x7fffffff; --- -1.6.0.6 - diff --git a/util-linux-ng-2.14-fdisk-4k-II.patch b/util-linux-ng-2.14-fdisk-4k-II.patch deleted file mode 100644 index 1aac5ff..0000000 --- a/util-linux-ng-2.14-fdisk-4k-II.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -up util-linux-ng-2.14.2/fdisk/fdisk.c.kzak util-linux-ng-2.14.2/fdisk/fdisk.c ---- util-linux-ng-2.14.2/fdisk/fdisk.c.kzak 2009-03-19 09:59:50.000000000 +0100 -+++ util-linux-ng-2.14.2/fdisk/fdisk.c 2009-03-19 09:59:50.000000000 +0100 -@@ -216,7 +216,7 @@ unsigned int heads, - units_per_sector = 1, - display_in_cyl_units = 1; - --unsigned long long total_number_of_sectors; -+unsigned long long total_number_of_sectors; /* (!) 512-byte sectors */ - - #define dos_label (!sun_label && !sgi_label && !aix_label && !mac_label && !osf_label) - int sun_label = 0; /* looking at sun disklabel */ -@@ -892,7 +892,7 @@ get_partition_table_geometry(void) { - - void - get_geometry(int fd, struct geom *g) { -- unsigned long long llsectors, llcyls; -+ unsigned long long llcyls; - - get_sectorsize(fd); - sector_factor = sector_size / 512; -@@ -911,10 +911,8 @@ get_geometry(int fd, struct geom *g) { - pt_sectors ? pt_sectors : - kern_sectors ? kern_sectors : 63; - -- if (blkdev_get_sectors(fd, &llsectors) == -1) -- llsectors = 0; -- -- total_number_of_sectors = llsectors; -+ if (blkdev_get_sectors(fd, &total_number_of_sectors) == -1) -+ total_number_of_sectors = 0; - - sector_offset = 1; - if (dos_compatible_flag) -@@ -1922,7 +1920,8 @@ check(int n, unsigned int h, unsigned in - static void - verify(void) { - int i, j; -- unsigned long total = 1; -+ unsigned long long total = 1; -+ unsigned long long n_sectors = (total_number_of_sectors / sector_factor); - unsigned long long first[partitions], last[partitions]; - struct partition *p; - -@@ -1985,12 +1984,12 @@ verify(void) { - } - } - -- if (total > total_number_of_sectors) -- printf(_("Total allocated sectors %ld greater than the maximum" -- " %lld\n"), total, total_number_of_sectors); -- else if (total < total_number_of_sectors) -- printf(_("%lld unallocated sectors\n"), -- total_number_of_sectors - total); -+ if (total > n_sectors) -+ printf(_("Total allocated sectors %llu greater than the maximum" -+ " %llu\n"), total, n_sectors); -+ else if (total < n_sectors) -+ printf(_("%lld unallocated %d-byte sectors\n"), -+ n_sectors - total, sector_size); - } - - static void diff --git a/util-linux-ng-2.14-fdisk-4k-III.patch b/util-linux-ng-2.14-fdisk-4k-III.patch deleted file mode 100644 index bb5e70a..0000000 --- a/util-linux-ng-2.14-fdisk-4k-III.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 8905beda2abb59b48ba00c5d521c934ead4df80b Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 9 Mar 2009 09:52:08 +0100 -Subject: [PATCH] fdisk: support "-b 4096" option - -The fdisk code is more ready for 4kB sectors and it makes sense to -support such sectr size for "-b" option. - -Address-Red-Hat-Bugzilla: #218915 -Signed-off-by: Karel Zak ---- - fdisk/fdisk.8 | 2 +- - fdisk/fdisk.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fdisk/fdisk.8 b/fdisk/fdisk.8 -index aea8820..30ee9d4 100644 ---- a/fdisk/fdisk.8 -+++ b/fdisk/fdisk.8 -@@ -166,7 +166,7 @@ program and Linux partitions with the Linux fdisk or Linux cfdisk program. - .SH OPTIONS - .TP - .BI "\-b " sectorsize --Specify the sector size of the disk. Valid values are 512, 1024, or 2048. -+Specify the sector size of the disk. Valid values are 512, 1024, 2048 or 4096. - (Recent kernels know the sector size. Use this only on old kernels or - to override the kernel's ideas.) - .TP -diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c -index b7e517a..5593503 100644 ---- a/fdisk/fdisk.c -+++ b/fdisk/fdisk.c -@@ -2612,7 +2612,7 @@ main(int argc, char **argv) { - */ - sector_size = atoi(optarg); - if (sector_size != 512 && sector_size != 1024 && -- sector_size != 2048) -+ sector_size != 2048 && sector_size != 4096) - fatal(usage); - sector_offset = 2; - user_set_sector_size = 1; --- -1.6.0.6 - diff --git a/util-linux-ng-2.14-flock-segfaults.patch b/util-linux-ng-2.14-flock-segfaults.patch deleted file mode 100644 index 9320739..0000000 --- a/util-linux-ng-2.14-flock-segfaults.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 841f86dbc2e35166fd43341c8eb144680b0c7ece Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 11 Mar 2009 12:49:50 +0100 -Subject: [PATCH] flockc: segfaults when file name is not given - -$ flock -s -Segmentation fault - -ltrace: -__libc_start_main(0x8048870, 2, 0xbfe9f404, 0x8049070, 0x8049060 -getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = 115 -getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = -1 -strtol(0, 0xbfe9f34c, 10, 0x80494e0, 0xbfe9f354 ---- SIGSEGV (Segmentation fault) --- -+++ killed by SIGSEGV +++ - -Addresses-Red-Had-Bugzilla: #489672 -Signed-off-by: Karel Zak ---- - sys-utils/flock.c | 9 ++++++++- - 1 files changed, 8 insertions(+), 1 deletions(-) - -diff --git a/sys-utils/flock.c b/sys-utils/flock.c -index 029e436..3386e15 100644 ---- a/sys-utils/flock.c -+++ b/sys-utils/flock.c -@@ -217,7 +217,7 @@ int main(int argc, char *argv[]) - EX_NOINPUT); - } - -- } else { -+ } else if (optind < argc) { - /* Use provided file descriptor */ - - fd = (int)strtol(argv[optind], &eon, 10); -@@ -226,8 +226,15 @@ int main(int argc, char *argv[]) - exit(EX_USAGE); - } - -+ } else { -+ /* Bad options */ -+ -+ fprintf(stderr, "%s: requires file descriptor, file or directory\n", -+ program); -+ exit(EX_USAGE); - } - -+ - if ( have_timeout ) { - if ( timeout.it_value.tv_sec == 0 && - timeout.it_value.tv_usec == 0 ) { --- -1.6.0.6 - diff --git a/util-linux-ng-2.14-login-remote.patch b/util-linux-ng-2.14-login-remote.patch deleted file mode 100644 index f073e15..0000000 --- a/util-linux-ng-2.14-login-remote.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 067f5343c86ed6dd135cdf57eb99aa3f982fceed Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 17 Mar 2009 21:00:42 +0100 -Subject: [PATCH] login: use "remote" as a PAM service name for "login -h" - -Signed-off-by: Karel Zak ---- - login-utils/login.1 | 10 ++++++++++ - login-utils/login.c | 2 +- - 2 files changed, 11 insertions(+), 1 deletions(-) - -diff --git a/login-utils/login.1 b/login-utils/login.1 -index 9ddf25b..1227381 100644 ---- a/login-utils/login.1 -+++ b/login-utils/login.1 -@@ -105,6 +105,14 @@ to pass the name of the remote host to - so that it may be placed in utmp and wtmp. Only the superuser may use - this option. - -+Note that the \fB-h\fP option has impact on the \fBPAM service name\fP. The standard -+service name is "login", with the \fB-h\fP option the name is "remote". It's -+necessary to create a proper PAM config files (e.g. -+.I /etc/pam.d/login -+and -+.I /etc/pam.d/remote -+). -+ - .SH "SPECIAL ACCESS RESTRICTIONS" - The file - .I /etc/securetty -@@ -297,6 +305,8 @@ are allowed to log in from anywhere as is standard behavior. - .I /etc/passwd - .I /etc/nologin - .I /etc/usertty -+.I /etc/pam.d/login -+.I /etc/pam.d/remote - .I .hushlogin - .fi - .SH "SEE ALSO" -diff --git a/login-utils/login.c b/login-utils/login.c -index d362113..c924a1f 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -552,7 +552,7 @@ main(int argc, char **argv) - * Therefore, we are safe not setting it to anything - */ - -- retcode = pam_start("login",username, &conv, &pamh); -+ retcode = pam_start(hflag?"remote":"login",username, &conv, &pamh); - if(retcode != PAM_SUCCESS) { - fprintf(stderr, _("%s: PAM failure, aborting: %s\n"), - "login", pam_strerror(pamh, retcode)); --- -1.6.0.6 - diff --git a/util-linux-ng-2.14-mount-managed.patch b/util-linux-ng-2.14-mount-managed.patch deleted file mode 100644 index f7e93e7..0000000 --- a/util-linux-ng-2.14-mount-managed.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.14.2-rc1/mount/mount.c -=================================================================== ---- util-linux-ng-2.14.2-rc1.orig/mount/mount.c -+++ util-linux-ng-2.14.2-rc1/mount/mount.c -@@ -180,6 +180,8 @@ static const struct opt_map opt_map[] = - { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard - to mtime/ctime */ - #endif -+ { "kudzu", 0, 0, MS_COMMENT }, /* Silently remove this option (backwards compat use only - deprecated) */ -+ { "managed", 0, 0, MS_COMMENT }, /* Silently remove this option */ - { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */ - { NULL, 0, 0, 0 } - }; diff --git a/util-linux-ng-2.14-renice-n.patch b/util-linux-ng-2.14-renice-n.patch deleted file mode 100644 index 149304a..0000000 --- a/util-linux-ng-2.14-renice-n.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 7cfbafda9c484a8cadefc47ee115086e803d9391 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 9 Mar 2009 21:09:50 +0100 -Subject: [PATCH] renice: add -n option for compatibility with POSIX - -The -n option is required by POSIX.1-200x. - -Signed-off-by: Karel Zak ---- - sys-utils/renice.1 | 7 ++++++- - sys-utils/renice.c | 12 +++++++++--- - 2 files changed, 15 insertions(+), 4 deletions(-) - -diff --git a/sys-utils/renice.1 b/sys-utils/renice.1 -index 3c20d6e..32a23e1 100644 ---- a/sys-utils/renice.1 -+++ b/sys-utils/renice.1 -@@ -29,7 +29,7 @@ - .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - .\" SUCH DAMAGE. - .\" --.\" @(#)renice.8 8.1 (Berkeley) 6/9/93 -+.\" @(#)renice.8 8.1 (Berkeley) 6/9/93 - .\" - .Dd June 9, 1993 - .Dt RENICE 1 -@@ -39,6 +39,7 @@ - .Nd alter priority of running processes - .Sh SYNOPSIS - .Nm renice -+.Op Fl n - .Ar priority - .Oo - .Op Fl p -@@ -74,6 +75,10 @@ their process ID's. - Options supported by - .Nm renice : - .Bl -tag -width Ds -+.It Fl n, Fl Fl priority -+The scheduling -+.Ar priority -+of the process, process group, or user. - .It Fl g, Fl Fl pgrp - Force - .Ar who -diff --git a/sys-utils/renice.c b/sys-utils/renice.c -index ac05d25..879e8bd 100644 ---- a/sys-utils/renice.c -+++ b/sys-utils/renice.c -@@ -51,14 +51,15 @@ int donice(int,int,int); - void usage(int rc) - { - printf( _("\nUsage:\n" -- " renice priority [-p|--pid] pid [... pid]\n" -- " renice priority -g|--pgrp pgrp [... pgrp]\n" -- " renice priority -u|--user user [... user]\n" -+ " renice [-n] priority [-p|--pid] pid [... pid]\n" -+ " renice [-n] priority -g|--pgrp pgrp [... pgrp]\n" -+ " renice [-n] priority -u|--user user [... user]\n" - " renice -h | --help\n" - " renice -v | --version\n\n")); - - exit(rc); - } -+ - /* - * Change the priority (nice) of processes - * or groups of processes which are already -@@ -93,6 +94,11 @@ main(int argc, char **argv) - if (argc < 2) - usage(EXIT_FAILURE); - -+ if (strcmp(*argv, "-n") == 0 || strcmp(*argv, "--priority") == 0) { -+ argc--; -+ argv++; -+ } -+ - prio = strtol(*argv, &endptr, 10); - if (*endptr) - usage(EXIT_FAILURE); --- -1.6.0.6 - diff --git a/util-linux-ng-2.15-blkid-cachefile.patch b/util-linux-ng-2.15-blkid-cachefile.patch new file mode 100644 index 0000000..13342d9 --- /dev/null +++ b/util-linux-ng-2.15-blkid-cachefile.patch @@ -0,0 +1,75 @@ +diff -up util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8.kzak util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8 +--- util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8.kzak 2009-06-04 15:37:18.000000000 +0200 ++++ util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8 2009-06-04 15:40:18.000000000 +0200 +@@ -64,7 +64,7 @@ more devices. + Read from + .I cachefile + instead of reading from the default cache file +-.IR /etc/blkid.tab . ++.IR /etc/blkid/blkid.tab . + If you want to start with a clean cache (i.e. don't report devices previously + scanned but not necessarily available at this time), specify + .IR /dev/null . +@@ -179,7 +179,7 @@ Display version number and exit. + Write the device cache to + .I writecachefile + instead of writing it to the default cache file +-.IR /etc/blkid.tab . ++.IR /etc/blkid/blkid.tab . + If you don't want to save the cache to the default file, specify + .IR /dev/null. + If not specified it will be the same file as that given by the +diff -up util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c.kzak util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c +--- util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c.kzak 2009-06-04 15:40:32.000000000 +0200 ++++ util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c 2009-06-04 15:40:55.000000000 +0200 +@@ -60,7 +60,7 @@ static void usage(int error) + " [-t ] [-w ] [dev ...]\n\n" + " %1$s -p [-O ] [-S ] [-o format] [dev ...]\n\n" + "Options:\n" +- " -c cache file (default: /etc/blkid.tab, /dev/null = none)\n" ++ " -c cache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n" + " -h print this usage message and exit\n" + " -g garbage collect the blkid cache\n" + " -o output format; can be one of:\n" +diff -up util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3.kzak util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3 +--- util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3.kzak 2009-06-04 15:42:38.000000000 +0200 ++++ util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3 2009-06-04 15:43:20.000000000 +0200 +@@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a + specific block device names into configuration files. + .P + Block device information is normally kept in a cache file +-.I /etc/blkid.tab ++.I /etc/blkid/blkid.tab + and is verified to still be valid before being returned to the user + (if the user has read permission on the raw block device, otherwise not). + The cache file also allows unprivileged users (normally anyone other +@@ -59,7 +59,7 @@ symlink does not match with LABEL or UUI + .I CACHE_FILE= + Overrides the standard location of the cache file. This setting can be + overridden by the environment variable BLKID_FILE. Default is +-.I /etc/blkid.tab. ++.I /etc/blkid/blkid.tab. + .TP + .I EVALUATE= + Defines LABEL and UUID evaluation method(s). Currently, the libblkid library +@@ -77,7 +77,7 @@ from Ted Ts'o. The library was subseque + The low-level probing code was rewritten by Karel Zak. + .SH FILES + .TP 18 +-.I /etc/blkid.tab ++.I /etc/blkid/blkid.tab + caches data extracted from each recognized block device + .TP + .I /etc/blkid.conf +diff -up util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h.kzak util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h +--- util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h.kzak 2009-06-04 15:38:32.000000000 +0200 ++++ util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h 2009-06-04 15:39:14.000000000 +0200 +@@ -222,7 +222,7 @@ struct blkid_struct_cache + extern char *blkid_strdup(const char *s); + extern char *blkid_strndup(const char *s, const int length); + +-#define BLKID_CACHE_FILE "/etc/blkid.tab" ++#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" + #define BLKID_CONFIG_FILE "/etc/blkid.conf" + + #define BLKID_ERR_IO 5 diff --git a/util-linux-ng-2.14-ipcs-32bit.patch b/util-linux-ng-2.15-ipcs-32bit.patch similarity index 68% rename from util-linux-ng-2.14-ipcs-32bit.patch rename to util-linux-ng-2.15-ipcs-32bit.patch index 55c52dd..c3860f1 100644 --- a/util-linux-ng-2.14-ipcs-32bit.patch +++ b/util-linux-ng-2.15-ipcs-32bit.patch @@ -1,7 +1,7 @@ -diff -up util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c ---- util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak 2008-12-22 18:53:06.000000000 +0100 -+++ util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c 2008-12-22 19:31:20.000000000 +0100 -@@ -253,6 +253,26 @@ print_perms (int id, struct ipc_perm *ip +diff -up util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c +--- util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak 2009-03-25 13:19:08.000000000 +0100 ++++ util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c 2009-06-04 15:22:48.000000000 +0200 +@@ -243,6 +243,26 @@ print_perms (int id, struct ipc_perm *ip printf(" %-10d\n", ipcp->gid); } @@ -28,16 +28,7 @@ diff -up util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.14.2-rc1 void do_shm (char format) { -@@ -268,7 +288,7 @@ void do_shm (char format) - printf (_("kernel not configured for shared memory\n")); - return; - } -- -+ - switch (format) { - case LIMITS: - printf (_("------ Shared Memory Limits --------\n")); -@@ -276,12 +296,12 @@ void do_shm (char format) +@@ -266,12 +286,12 @@ void do_shm (char format) return; /* glibc 2.1.3 and all earlier libc's have ints as fields of struct shminfo; glibc 2.1.91 has unsigned long; ach */ diff --git a/util-linux-ng.spec b/util-linux-ng.spec index bb51498..1101b91 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.14.2 -Release: 8%{?dist} +Version: 2.15.1 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -18,8 +18,6 @@ URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng ### Macros %define floppyver 0.16 -%define no_hwclock_archs s390 s390x -%define no_cfsfdisk_archs sparc sparcv9 sparc64 %define cytune_archs %{ix86} alpha armv4l ### Paths @@ -92,32 +90,17 @@ Patch2: util-linux-ng-2.13-floppy-generic.patch ### # remove partitions Patch3: util-linux-ng-2.14-blockdev-rmpart.patch -# RHEL/Fedora specific mount options -Patch4: util-linux-ng-2.14-mount-managed.patch # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) -Patch5: util-linux-ng-2.13-ctrlaltdel-man.patch +Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch +# /etc/blkid.tab --> /etc/blkid/blkid.tab +Patch5: util-linux-ng-2.15-blkid-cachefile.patch ### Ready for upstream? ### -# 231192 - ipcs is not printing correct values on pLinux -Patch6: util-linux-ng-2.14-ipcs-32bit.patch # 151635 - makeing /var/log/lastlog -Patch7: util-linux-ng-2.13-login-lastlog.patch - -### Upstream patches (backported to the current Fedora/RHEL) -### -# 91174 - Patch to enabled remote service for login/pam -Patch8: util-linux-ng-2.14-login-remote.patch -# 218915, 487227 - fdisk 4KiB hw sectors support -Patch9: util-linux-ng-2.14-fdisk-4k-I.patch -Patch10: util-linux-ng-2.14-fdisk-4k-II.patch -Patch11: util-linux-ng-2.14-fdisk-4k-III.patch -# Add -r options to dmesg (upstream patch) -Patch12: util-linux-ng-2.14-dmesg-r.patch -# 489672 - flock segfaults when file name is not given -Patch13: util-linux-ng-2.14-flock-segfaults.patch -# 477303 - renice doesn't support -n option -Patch14: util-linux-ng-2.14-renice-n.patch +Patch6: util-linux-ng-2.13-login-lastlog.patch +# 231192 - ipcs is not printing correct values on pLinux +Patch7: util-linux-ng-2.15-ipcs-32bit.patch %description The util-linux-ng package contains a large variety of low-level system @@ -125,24 +108,40 @@ utilities that are necessary for a Linux system to function. Among others, Util-linux contains the fdisk configuration tool and the login program. + +%package -n libblkid +Summary: Block device ID library +Group: Development/Libraries +License: LGPLv2+ + +%description -n libblkid +This is block device identification library, part of util-linux-ng. + + +%package -n libblkid-devel +Summary: Block device ID library +Group: Development/Libraries +License: LGPLv2+ +Requires: libblkid = %{version}-%{release} +Requires: pkgconfig + +%description -n libblkid-devel +This is the block device identification development library and headers, +part of util-linux-ng. + + %prep %setup -q -a 11 -n %{name}-%{upstream_version} cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 %build unset LINGUAS || : @@ -153,6 +152,7 @@ export SUID_LDFLAGS="-pie" %configure \ --bindir=/bin \ --sbindir=/sbin \ + --libdir=/%{_lib} \ --disable-wall \ --enable-partx \ --enable-login-utils \ @@ -163,7 +163,7 @@ export SUID_LDFLAGS="-pie" %endif --with-selinux \ --with-audit \ - --with-fsprobe=blkid \ + --with-fsprobe=builtin \ --disable-makeinstall-chown # build util-linux-ng @@ -185,7 +185,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_infodir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps} +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps,blkid} mkdir -p ${RPM_BUILD_ROOT}/var/log touch ${RPM_BUILD_ROOT}/var/log/lastlog chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog @@ -243,20 +243,48 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock + +# remove libtool junk (TODO) +rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la + +# libtool installs all libraries to --libdir=/lib, but we need +# devel stuff in /usr/lib (TODO) +rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.so +mv ${RPM_BUILD_ROOT}/%{_lib}/libblkid.a ${RPM_BUILD_ROOT}%{_libdir}/ +ln -sf ../../%{_lib}/libblkid.so.1 ${RPM_BUILD_ROOT}%{_libdir}/libblkid.so + # install tmpfs mount helper pushd ${RPM_BUILD_ROOT}/sbin install -m 755 %{SOURCE5} ./mount.tmpfs popd -# Final cleanup +# unsupported on %{ix86} alpha armv4l %ifnarch %cytune_archs rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* %endif -%ifarch %no_hwclock_archs -rm -f $RPM_BUILD_ROOT/sbin/{hwclock,clock} $RPM_BUILD_ROOT%{_mandir}/man8/hwclock.8* $RPM_BUILD_ROOT/usr/sbin/{hwclock,clock} -%endif + +# unsupported on s390 %ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_mandir}/man8/{fdformat,tunelp,floppy}.8* +for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ + %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ + /sbin/{hwclock,clock} \ + /usr/sbin/hwclock \ + %{_mandir}/man8/hwclock.8*; do + + rm -f $RPM_BUILD_ROOT$I +done +%endif + +# unsupported on SPARCs +%ifarch sparc sparcv9 sparc64 +for I in /sbin/sfdisk \ + %{_mandir}/man8/sfdisk.8* \ + %doc fdisk/sfdisk.examples \ + /sbin/cfdisk \ + %{_mandir}/man8/cfdisk.8*; do + + rm -f $RPM_BUILD_ROOT$I +done %endif # deprecated commands @@ -312,6 +340,7 @@ done # omit info/dir file rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir + # find MO files %find_lang %name @@ -355,94 +384,78 @@ if [ "$1" = 0 ]; then fi exit 0 + +%post -n libblkid +/sbin/ldconfig +[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /etc/blkid/blkid.tab || : +[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /etc/blkid/blkid.tab.old || : + +%postun -n libblkid -p /sbin/ldconfig + + %files -f %{name}.files %defattr(-,root,root) %doc */README.* NEWS AUTHORS licenses/* README* %doc getopt/getopt-*.{bash,tcsh} -/bin/dmesg -%attr(755,root,root) /bin/login -/bin/more -/bin/kill -/bin/taskset -%if %{include_raw} -/bin/raw -%config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules -%endif - %config(noreplace) %{_sysconfdir}/pam.d/chfn %config(noreplace) %{_sysconfdir}/pam.d/chsh %config(noreplace) %{_sysconfdir}/pam.d/login %config(noreplace) %{_sysconfdir}/pam.d/remote -/sbin/agetty -%{_mandir}/man8/agetty.8* -/sbin/blockdev -/sbin/pivot_root -/sbin/ctrlaltdel -/sbin/addpart -/sbin/delpart -/sbin/partx -%{_mandir}/man8/partx.8* -%{_mandir}/man8/addpart.8* -%{_mandir}/man8/delpart.8* - -%ifnarch %no_cfsfdisk_archs -/sbin/sfdisk -%{_mandir}/man8/sfdisk.8* -%doc fdisk/sfdisk.examples -/sbin/cfdisk -%{_mandir}/man8/cfdisk.8* -%endif -/sbin/fdisk -%{_mandir}/man8/fdisk.8* - -%ifnarch %no_hwclock_archs -/sbin/clock -/sbin/hwclock -/usr/sbin/hwclock -%{_mandir}/man8/hwclock.8* -%endif -/sbin/mkfs -/sbin/mkswap -/sbin/nologin -%{_mandir}/man8/nologin.8* -%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog - -%{_bindir}/chrt -%{_bindir}/ionice - -%{_bindir}/cal +%attr(4755,root,root) /bin/mount +%attr(4755,root,root) /bin/umount +%attr(755,root,root) /sbin/mount.tmpfs +%attr(755,root,root) /bin/login %attr(4711,root,root) %{_bindir}/chfn %attr(4711,root,root) %{_bindir}/chsh +%attr(2755,root,tty) %{_bindir}/write + +%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog + +/bin/dmesg +/bin/kill +/bin/more +/bin/taskset +/sbin/addpart +/sbin/agetty +/sbin/blkid +/sbin/blockdev +/sbin/ctrlaltdel +/sbin/delpart +/sbin/fdisk +/sbin/findfs +/sbin/fsck.cramfs +/sbin/losetup +/sbin/mkfs +/sbin/mkfs.cramfs +/sbin/mkswap +/sbin/nologin +/sbin/partx +/sbin/pivot_root +/sbin/swapoff +/sbin/swapon + +%{_bindir}/cal +%{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column -%ifarch %cytune_archs -%{_bindir}/cytune -%{_mandir}/man8/cytune.8* -%endif %{_bindir}/ddate -%ifnarch s390 s390x -%{_sbindir}/fdformat -%endif %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump +%{_bindir}/ionice +%{_bindir}/ipcmk %{_bindir}/ipcrm %{_bindir}/ipcs %{_bindir}/isosize %{_bindir}/kill %{_bindir}/logger %{_bindir}/look +%{_bindir}/lscpu %{_bindir}/mcookie -/sbin/fsck.cramfs -/sbin/mkfs.cramfs -%ifnarch s390 s390x -%{_bindir}/floppy -%{_mandir}/man8/floppy.8* -%endif %{_bindir}/namei %{_bindir}/rename %{_bindir}/renice @@ -452,98 +465,151 @@ exit 0 %{_bindir}/setarch %{_bindir}/setsid %{_bindir}/setterm -%ifarch sparc sparc64 sparcv9 -%{_bindir}/sunhostid -%endif %{_bindir}/tailf %{_bindir}/ul %{_bindir}/whereis -%attr(2755,root,tty) %{_bindir}/write -%{_sbindir}/readprofile -%ifnarch s390 s390x -%{_sbindir}/tunelp -%endif -%{_sbindir}/rtcwake %{_sbindir}/ldattach +%{_sbindir}/readprofile +%{_sbindir}/rtcwake %{_infodir}/ipc.info* %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* +%{_mandir}/man1/chrt.1* %{_mandir}/man1/chsh.1* %{_mandir}/man1/col.1* %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* %{_mandir}/man1/ddate.1* +%{_mandir}/man1/dmesg.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* %{_mandir}/man1/hexdump.1* +%{_mandir}/man1/ionice.1* +%{_mandir}/man1/ipcmk.1* +%{_mandir}/man1/ipcrm.1* +%{_mandir}/man1/ipcs.1* %{_mandir}/man1/kill.1* %{_mandir}/man1/logger.1* %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* +%{_mandir}/man1/lscpu.1* %{_mandir}/man1/mcookie.1* %{_mandir}/man1/more.1* %{_mandir}/man1/namei.1* %{_mandir}/man1/readprofile.1* %{_mandir}/man1/rename.1* +%{_mandir}/man1/renice.1* %{_mandir}/man1/rev.1* %{_mandir}/man1/script.1* %{_mandir}/man1/scriptreplay.1* +%{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/tailf.1* +%{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* -%{_mandir}/man1/chrt.1* -%{_mandir}/man1/ionice.1* -%{_mandir}/man1/taskset.1* -%{_mandir}/man1/renice.1* - -%{_mandir}/man1/ipcrm.1* -%{_mandir}/man1/ipcs.1* -%{_mandir}/man1/setsid.1* -%{_mandir}/man1/dmesg.1* +%{_mandir}/man5/fstab.5* +%{_mandir}/man8/addpart.8* +%{_mandir}/man8/agetty.8* +%{_mandir}/man8/blkid.8* %{_mandir}/man8/blockdev.8* %{_mandir}/man8/ctrlaltdel.8* -%ifnarch s390 s390x -%{_mandir}/man8/fdformat.8* -%endif +%{_mandir}/man8/delpart.8* +%{_mandir}/man8/fdisk.8* +%{_mandir}/man8/findfs.8* %{_mandir}/man8/isosize.8* +%{_mandir}/man8/ldattach.8* +%{_mandir}/man8/losetup.8* %{_mandir}/man8/mkfs.8* %{_mandir}/man8/mkswap.8* -%{_mandir}/man8/pivot_root.8* -%if %{include_raw} -%{_mandir}/man8/raw.8* -%{_mandir}/man8/rawdevices.8* -%endif -%ifnarch s390 s390x -%{_mandir}/man8/tunelp.8* -%endif -%{_mandir}/man8/setarch.8* -%{_mandir}/man8/rtcwake.8* -%{_mandir}/man8/ldattach.8* - -%attr(4755,root,root) /bin/mount -%attr(4755,root,root) /bin/umount - -%attr(755,root,root) /sbin/mount.tmpfs - -/sbin/swapon -/sbin/swapoff -%{_mandir}/man5/fstab.5* %{_mandir}/man8/mount.8* +%{_mandir}/man8/nologin.8* +%{_mandir}/man8/partx.8* +%{_mandir}/man8/pivot_root.8* +%{_mandir}/man8/rtcwake.8* +%{_mandir}/man8/setarch.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/umount.8* -%{_mandir}/man8/losetup.8* -/sbin/losetup + +%if %{include_raw} +/bin/raw +%config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules +%{_mandir}/man8/raw.8* +%{_mandir}/man8/rawdevices.8* +%endif + +%ifnarch s390 s390x +/sbin/clock +/sbin/hwclock +%{_bindir}/floppy +%{_sbindir}/fdformat +%{_sbindir}/hwclock +%{_sbindir}/tunelp +%{_mandir}/man8/fdformat.8* +%{_mandir}/man8/floppy.8* +%{_mandir}/man8/hwclock.8* +%{_mandir}/man8/tunelp.8* +%endif + +%ifnarch sparc sparcv9 sparc64 +%doc fdisk/sfdisk.examples +/sbin/cfdisk +/sbin/sfdisk +%{_mandir}/man8/cfdisk.8* +%{_mandir}/man8/sfdisk.8* +%endif + +%ifarch sparc sparc64 sparcv9 +%{_bindir}/sunhostid +%endif + +%ifarch %cytune_archs +%{_bindir}/cytune +%{_mandir}/man8/cytune.8* +%endif + + +%files -n libblkid +%defattr(-,root,root) +%dir /etc/blkid +/%{_lib}/libblkid.so.* + + +%files -n libblkid-devel +%defattr(-,root,root) +%{_libdir}/libblkid.a +%{_libdir}/libblkid.so +%{_includedir}/blkid +%{_mandir}/man3/libblkid.3* +%{_libdir}/pkgconfig/blkid.pc + %changelog +* Thu Jun 4 2009 Karel Zak 2.15.1-0.1 +- upgrade to 2.15.1-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15.1-rc1-ChangeLog +- merged patches: + util-linux-ng-2.14-login-remote.patch + util-linux-ng-2.14-fdisk-4k-I.patch + util-linux-ng-2.14-fdisk-4k-II.patch + util-linux-ng-2.14-fdisk-4k-III.patch + util-linux-ng-2.14-dmesg-r.patch + util-linux-ng-2.14-flock-segfaults.patch + util-linux-ng-2.14-renice-n.patch +- new commands: lscpu, ipcmk +- remove support for "managed" and "kudzu" mount options +- cleanup spec file +- enable built-in libblkid (replacement for the old blkid from e2fsprogs) + * Thu Apr 2 2009 Karel Zak 2.14.2-8 - fix #490769 - %post scriptlet failed (thanks to Dan Horak) From a5cc6153d97cfec04c389a3ca5a9d7c9d1a1b0f9 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 4 Jun 2009 19:44:35 +0000 Subject: [PATCH 39/86] Fix conflicts/requires and temporary disable dependency on libuuid (e2fsprogs). --- util-linux-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 1101b91..c781689 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -25,7 +25,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root ### Dependences BuildRequires: audit-libs-devel >= 1.0.6 -BuildRequires: e2fsprogs-devel >= 1.36 +# temporary disable dependence on libuuid (UUID stuff is optional for u-l-ng) +#BuildRequires: e2fsprogs-devel >= 1.41.6-1 BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: ncurses-devel @@ -50,6 +51,8 @@ Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 Conflicts: initscripts <= 4.58 %endif Conflicts: kernel < 2.2.12-7 +# old versions of e2fsprogs provides libblkid +Conflicts: e2fsprogs < 1.41.6-2 # old versions of util-linux have been splited to more sub-packages Obsoletes: mount < 2.11, losetup < 2.11 @@ -590,7 +593,7 @@ exit 0 %{_includedir}/blkid %{_mandir}/man3/libblkid.3* %{_libdir}/pkgconfig/blkid.pc - +%{_includedir}/blkid %changelog * Thu Jun 4 2009 Karel Zak 2.15.1-0.1 From db3827f5dee66a1463a59eda54a3980538426e43 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 8 Jun 2009 13:29:54 +0000 Subject: [PATCH 40/86] - set BuildRequires: e2fsprogs-devel - add Requires: e2fsprogs-devel to libblkid-devel --- util-linux-ng.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index c781689..f03a307 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.15.1 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -25,8 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root ### Dependences BuildRequires: audit-libs-devel >= 1.0.6 -# temporary disable dependence on libuuid (UUID stuff is optional for u-l-ng) -#BuildRequires: e2fsprogs-devel >= 1.41.6-1 +BuildRequires: e2fsprogs-devel BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: ncurses-devel @@ -127,6 +126,8 @@ Group: Development/Libraries License: LGPLv2+ Requires: libblkid = %{version}-%{release} Requires: pkgconfig +# for libuuid and uuid.pc +Requires: e2fsprogs-devel %description -n libblkid-devel This is the block device identification development library and headers, @@ -596,6 +597,10 @@ exit 0 %{_includedir}/blkid %changelog +* Mon Jun 8 2009 Karel Zak 2.15.1-0.2 +- set BuildRequires: e2fsprogs-devel +- add Requires: e2fsprogs-devel to libblkid-devel + * Thu Jun 4 2009 Karel Zak 2.15.1-0.1 - upgrade to 2.15.1-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15-ReleaseNotes From 0b806dd6f2c67a21669ce46153b0e1a400763566 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 10 Jun 2009 13:10:27 +0000 Subject: [PATCH 41/86] - upgrade to 2.15.1 --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index c23b19c..17dffe9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.15.1-rc1.tar.bz2 +util-linux-ng-2.15.1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 57d5844..ee72c71 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -dc5eb45e38ea335fdca80aa488fffc48 util-linux-ng-2.15.1-rc1.tar.bz2 +a06d94c4dc94c56a636c6e456698e40d util-linux-ng-2.15.1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f03a307..b47faa7 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.15.1 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc1 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -597,6 +597,9 @@ exit 0 %{_includedir}/blkid %changelog +* Wed Jun 10 2009 Karel Zak 2.15.1-1 +- upgrade to 2.15.1 + * Mon Jun 8 2009 Karel Zak 2.15.1-0.2 - set BuildRequires: e2fsprogs-devel - add Requires: e2fsprogs-devel to libblkid-devel From 70c61db8623174771f70820def7f18022c942b23 Mon Sep 17 00:00:00 2001 From: kzak Date: Sat, 25 Jul 2009 20:18:47 +0000 Subject: [PATCH 42/86] - upgrade to 2.16 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16-ReleaseN otes - enable built-in libuuid (replacement for the old uuid stuff from e2fsprogs) - new commands switch_root, uuidgen and uuidd (subpackage) --- .cvsignore | 2 +- sources | 2 +- ...> util-linux-ng-2.16-blkid-cachefile.patch | 26 ++-- util-linux-ng.spec | 141 ++++++++++++++++-- uuidd.init | 74 +++++++++ 5 files changed, 218 insertions(+), 27 deletions(-) rename util-linux-ng-2.15-blkid-cachefile.patch => util-linux-ng-2.16-blkid-cachefile.patch (67%) create mode 100755 uuidd.init diff --git a/.cvsignore b/.cvsignore index 17dffe9..df25c4e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.15.1.tar.bz2 +util-linux-ng-2.16.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index ee72c71..f0be7b2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -a06d94c4dc94c56a636c6e456698e40d util-linux-ng-2.15.1.tar.bz2 +9623380641b0c2e0449f5b1ecc567663 util-linux-ng-2.16.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.15-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch similarity index 67% rename from util-linux-ng-2.15-blkid-cachefile.patch rename to util-linux-ng-2.16-blkid-cachefile.patch index 13342d9..9e1df11 100644 --- a/util-linux-ng-2.15-blkid-cachefile.patch +++ b/util-linux-ng-2.16-blkid-cachefile.patch @@ -1,6 +1,6 @@ -diff -up util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8.kzak util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8 ---- util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8.kzak 2009-06-04 15:37:18.000000000 +0200 -+++ util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8 2009-06-04 15:40:18.000000000 +0200 +diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-utils/blkid.8 +--- util-linux-ng-2.16/misc-utils/blkid.8.kzak 2009-07-04 01:20:01.000000000 +0200 ++++ util-linux-ng-2.16/misc-utils/blkid.8 2009-07-16 00:41:28.000000000 +0200 @@ -64,7 +64,7 @@ more devices. Read from .I cachefile @@ -19,9 +19,9 @@ diff -up util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.8.kzak util-linux-ng-2.15 If you don't want to save the cache to the default file, specify .IR /dev/null. If not specified it will be the same file as that given by the -diff -up util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c.kzak util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c ---- util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c.kzak 2009-06-04 15:40:32.000000000 +0200 -+++ util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c 2009-06-04 15:40:55.000000000 +0200 +diff -up util-linux-ng-2.16/misc-utils/blkid.c.kzak util-linux-ng-2.16/misc-utils/blkid.c +--- util-linux-ng-2.16/misc-utils/blkid.c.kzak 2009-07-04 01:20:01.000000000 +0200 ++++ util-linux-ng-2.16/misc-utils/blkid.c 2009-07-16 00:41:28.000000000 +0200 @@ -60,7 +60,7 @@ static void usage(int error) " [-t ] [-w ] [dev ...]\n\n" " %1$s -p [-O ] [-S ] [-o format] [dev ...]\n\n" @@ -31,9 +31,9 @@ diff -up util-linux-ng-2.15.1-rc1/libs/blkid/bin/blkid.c.kzak util-linux-ng-2.15 " -h print this usage message and exit\n" " -g garbage collect the blkid cache\n" " -o output format; can be one of:\n" -diff -up util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3.kzak util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3 ---- util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3.kzak 2009-06-04 15:42:38.000000000 +0200 -+++ util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3 2009-06-04 15:43:20.000000000 +0200 +diff -up util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.16/shlibs/blkid/libblkid.3 +--- util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/libblkid.3 2009-07-16 00:40:13.000000000 +0200 @@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a specific block device names into configuration files. .P @@ -61,10 +61,10 @@ diff -up util-linux-ng-2.15.1-rc1/libs/blkid/libblkid.3.kzak util-linux-ng-2.15. caches data extracted from each recognized block device .TP .I /etc/blkid.conf -diff -up util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h.kzak util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h ---- util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h.kzak 2009-06-04 15:38:32.000000000 +0200 -+++ util-linux-ng-2.15.1-rc1/libs/blkid/src/blkidP.h 2009-06-04 15:39:14.000000000 +0200 -@@ -222,7 +222,7 @@ struct blkid_struct_cache +diff -up util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.16/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak 2009-07-13 20:30:36.000000000 +0200 ++++ util-linux-ng-2.16/shlibs/blkid/src/blkidP.h 2009-07-16 00:40:13.000000000 +0200 +@@ -223,7 +223,7 @@ struct blkid_struct_cache extern char *blkid_strdup(const char *s); extern char *blkid_strndup(const char *s, const int length); diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b47faa7..df7427f 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.15.1 +Version: 2.16 Release: 1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -43,6 +43,7 @@ Source4: util-linux-ng-60-raw.rules Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 +Source10: uuidd.init Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides @@ -95,7 +96,7 @@ Patch3: util-linux-ng-2.14-blockdev-rmpart.patch # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch # /etc/blkid.tab --> /etc/blkid/blkid.tab -Patch5: util-linux-ng-2.15-blkid-cachefile.patch +Patch5: util-linux-ng-2.16-blkid-cachefile.patch ### Ready for upstream? ### @@ -124,16 +125,67 @@ This is block device identification library, part of util-linux-ng. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ +Provides: libblkid-static = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: pkgconfig -# for libuuid and uuid.pc -Requires: e2fsprogs-devel %description -n libblkid-devel This is the block device identification development library and headers, part of util-linux-ng. +%package -n libuuid +Summary: Universally unique ID library +Group: Development/Libraries +License: BSD + +%description -n libuuid +This is the universally unique ID library, part of e2fsprogs. + +The libuuid library generates and parses 128-bit universally unique +id's (UUID's). A UUID is an identifier that is unique across both +space and time, with respect to the space of all UUIDs. A UUID can +be used for multiple purposes, from tagging objects with an extremely +short lifetime, to reliably identifying very persistent objects +across a network. + +See also the "uuid" package, which is a separate implementation. + +%package -n libuuid-devel +Summary: Universally unique ID library +Group: Development/Libraries +License: BSD +Provides: libuuid-static = %{version}-%{release} +Requires: libuuid = %{version}-%{release} +Requires: pkgconfig + +%description -n libuuid-devel +This is the universally unique ID development library and headers, +part of e2fsprogs. + +The libuuid library generates and parses 128-bit universally unique +id's (UUID's). A UUID is an identifier that is unique across both +space and time, with respect to the space of all UUIDs. A UUID can +be used for multiple purposes, from tagging objects with an extremely +short lifetime, to reliably identifying very persistent objects +across a network. + +See also the "uuid-devel" package, which is a separate implementation. + + +%package -n uuidd +Summary: Helper daemon to guarantee uniqueness of time-based UUIDs +Group: System Environment/Daemons +Requires: libuuid = %{version}-%{release} +License: GPLv2 +Requires(pre): shadow-utils + +%description -n uuidd +The uuidd package contains a userspace daemon (uuidd) which guarantees +uniqueness of time-based UUID generation even at very high rates on +SMP systems. + + %prep %setup -q -a 11 -n %{name}-%{upstream_version} cp %{SOURCE8} %{SOURCE9} . @@ -217,6 +269,15 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 } %endif +# Our own initscript for uuidd +install -D -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/uuidd +# And a dirs uuidd needs that the makefiles don't create +install -d ${RPM_BUILD_ROOT}/var/run/uuidd +install -d ${RPM_BUILD_ROOT}/var/lib/libuuid + +# libtool junk +rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la + %ifarch sparc sparc64 sparcv9 rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid cat << E-O-F > ${RPM_BUILD_ROOT}%{_bindir}/sunhostid @@ -249,13 +310,7 @@ ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock # remove libtool junk (TODO) -rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la - -# libtool installs all libraries to --libdir=/lib, but we need -# devel stuff in /usr/lib (TODO) -rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.so -mv ${RPM_BUILD_ROOT}/%{_lib}/libblkid.a ${RPM_BUILD_ROOT}%{_libdir}/ -ln -sf ../../%{_lib}/libblkid.so.1 ${RPM_BUILD_ROOT}%{_libdir}/libblkid.so +#rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la # install tmpfs mount helper pushd ${RPM_BUILD_ROOT}/sbin @@ -396,6 +451,24 @@ exit 0 %postun -n libblkid -p /sbin/ldconfig +%post -n libuuid -p /sbin/ldconfig +%postun -n libuuid -p /sbin/ldconfig + +%pre -n uuidd +getent group uuidd >/dev/null || groupadd -r uuidd +getent passwd uuidd >/dev/null || \ +useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ + -c "UUID generator helper daemon" uuidd +exit 0 + +%post -n uuidd +/sbin/chkconfig --add uuidd + +%preun -n uuidd +if [ "$1" = 0 ]; then + /sbin/service uuidd stop > /dev/null 2>&1 || : + /sbin/chkconfig --del uuidd +fi %files -f %{name}.files %defattr(-,root,root) @@ -429,6 +502,7 @@ exit 0 /sbin/delpart /sbin/fdisk /sbin/findfs +/sbin/fsck /sbin/fsck.cramfs /sbin/losetup /sbin/mkfs @@ -439,6 +513,7 @@ exit 0 /sbin/pivot_root /sbin/swapoff /sbin/swapon +/sbin/switch_root %{_bindir}/cal %{_bindir}/chrt @@ -471,6 +546,7 @@ exit 0 %{_bindir}/setterm %{_bindir}/tailf %{_bindir}/ul +%{_bindir}/uuidgen %{_bindir}/whereis %{_sbindir}/ldattach @@ -515,6 +591,7 @@ exit 0 %{_mandir}/man1/tailf.1* %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* +%{_mandir}/man1/uuidgen.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* @@ -528,6 +605,7 @@ exit 0 %{_mandir}/man8/delpart.8* %{_mandir}/man8/fdisk.8* %{_mandir}/man8/findfs.8* +%{_mandir}/man8/fsck.8* %{_mandir}/man8/isosize.8* %{_mandir}/man8/ldattach.8* %{_mandir}/man8/losetup.8* @@ -541,6 +619,7 @@ exit 0 %{_mandir}/man8/setarch.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* +%{_mandir}/man8/switch_root.8* %{_mandir}/man8/umount.8* %if %{include_raw} @@ -581,6 +660,15 @@ exit 0 %endif +%files -n uuidd +%defattr(-,root,root) +/etc/rc.d/init.d/uuidd +%{_mandir}/man8/uuidd.8* +%attr(-, uuidd, uuidd) %{_sbindir}/uuidd +%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid +%dir %attr(2775, uuidd, uuidd) /var/run/uuidd + + %files -n libblkid %defattr(-,root,root) %dir /etc/blkid @@ -594,9 +682,38 @@ exit 0 %{_includedir}/blkid %{_mandir}/man3/libblkid.3* %{_libdir}/pkgconfig/blkid.pc -%{_includedir}/blkid + + +%files -n libuuid +%defattr(-,root,root) +/%{_lib}/libuuid.so.* + +%files -n libuuid-devel +%defattr(-,root,root) +%{_libdir}/libuuid.a +%{_libdir}/libuuid.so +%{_includedir}/uuid +%{_mandir}/man3/uuid.3* +%{_mandir}/man3/uuid_clear.3* +%{_mandir}/man3/uuid_compare.3* +%{_mandir}/man3/uuid_copy.3* +%{_mandir}/man3/uuid_generate.3* +%{_mandir}/man3/uuid_generate_random.3* +%{_mandir}/man3/uuid_generate_time.3* +%{_mandir}/man3/uuid_is_null.3* +%{_mandir}/man3/uuid_parse.3* +%{_mandir}/man3/uuid_time.3* +%{_mandir}/man3/uuid_unparse.3* +%{_libdir}/pkgconfig/uuid.pc + %changelog +* Sat Jul 25 2009 Karel Zak 2.16-1 +- upgrade to 2.16 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16-ReleaseNotes +- enable built-in libuuid (replacement for the old uuid stuff from e2fsprogs) +- new commands switch_root, uuidgen and uuidd (subpackage) + * Wed Jun 10 2009 Karel Zak 2.15.1-1 - upgrade to 2.15.1 diff --git a/uuidd.init b/uuidd.init new file mode 100755 index 0000000..4494388 --- /dev/null +++ b/uuidd.init @@ -0,0 +1,74 @@ +#!/bin/bash +# +# uuidd uuidd daemon for unique time-based UUID generation +# +# Author: Eric Sandeen +# +# chkconfig: - 60 99 +# +# description: uuidd is a helper daemon to guarantee uniqueness of \ +# time-based UUIDs when using libuuid. +# processname: uuidd +# pidfile: /var/lib/libuuid/uuidd.pid +# + +### BEGIN INIT INFO +# Provides: uuidd +# Required-Start: $time $local_fs +# Required-Stop: $time $local_fs +# Default-Stop: 0 1 6 +# Short-Description: UUID daemon +# Description: Daemon which guarantees uniqueness of time-based UUIDS +# when using libuuid. +### END INIT INFO + + +# source function library +. /etc/rc.d/init.d/functions + +RETVAL=0 +DAEMON=uuidd + +start() { + echo -n $"Starting uuidd: " + daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid /usr/sbin/uuidd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd +} + +stop() { + echo -n $"Stopping uuidd: " + killproc uuidd + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/uuidd +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|force-reload|reload) + restart + ;; + condrestart) + [ -f /var/lock/subsys/uuidd ] && restart + ;; + status) + status -p /var/run/uuidid/uuidd.pid uuidd uuidd + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" + exit 1 +esac + +exit $RETVAL From dad65a571ad925c309c3dc1ba9eff5531b5bab13 Mon Sep 17 00:00:00 2001 From: kzak Date: Sat, 25 Jul 2009 20:20:55 +0000 Subject: [PATCH 43/86] remove obsolete build requires --- util-linux-ng.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index df7427f..ff9d341 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -25,7 +25,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root ### Dependences BuildRequires: audit-libs-devel >= 1.0.6 -BuildRequires: e2fsprogs-devel BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: ncurses-devel From 2cdb3efbb13fb8970e55c72678e81ec76521b45e Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 27 Jul 2009 21:11:14 +0000 Subject: [PATCH 44/86] - fix #214891 - add mount.conf and MTAB_LOCK_DIR= option --- util-linux-ng-2.16-mount-conf.patch | 348 ++++++++++++++++++++++++++++ util-linux-ng.spec | 14 +- 2 files changed, 358 insertions(+), 4 deletions(-) create mode 100644 util-linux-ng-2.16-mount-conf.patch diff --git a/util-linux-ng-2.16-mount-conf.patch b/util-linux-ng-2.16-mount-conf.patch new file mode 100644 index 0000000..ffd885c --- /dev/null +++ b/util-linux-ng-2.16-mount-conf.patch @@ -0,0 +1,348 @@ +From 47cd680cc6cbbfc42f0fe4dd5833a36859ca310a Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 27 Jul 2009 21:15:27 +0200 +Subject: [PATCH] mount(8): add mount.conf and MTAB_LOCK_DIR= + +The /etc directory is a really bad place for lock files on systems +with read-only root FS. + +This patch introduces the /etc/mount.conf file where is possible to +define MTAB_LOCK_DIR=. + +Signed-off-by: Karel Zak +--- + example.files/mount.conf | 20 +++++++ + include/pathnames.h | 7 ++- + mount/fstab.c | 142 +++++++++++++++++++++++++++++++++++++--------- + mount/fstab.h | 1 + + mount/mount.c | 6 ++- + 5 files changed, 147 insertions(+), 29 deletions(-) + create mode 100644 example.files/mount.conf + +diff --git a/example.files/mount.conf b/example.files/mount.conf +new file mode 100644 +index 0000000..7813eba +--- /dev/null ++++ b/example.files/mount.conf +@@ -0,0 +1,20 @@ ++# ++# This is mount(8) config file ++# ++ ++# MTAB_LOCK_DIR is a directory where mount(8) stores "mtab~" and "mtab~. ++# lock files. It's recommended to use the root filesystem for mount(8) lock ++# files. ++# ++# The default is /etc. ++# ++# WARNING: If you want to use a directory on stand-alone filesystem you have to ++# be very careful about your init scripts. ++# ++# For example use stand-alone /var for lock files and run "mount -a ++# -F" (-F means fork()) in init scripts is really bad idea. ++# ++# Solution is to use "mount -n" to mount the filesystem and then "mount -f" ++# to create proper /etc/mtab. ++# ++MTAB_LOCK_DIR=/etc +diff --git a/include/pathnames.h b/include/pathnames.h +index ead448e..e449c9d 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -90,7 +90,12 @@ + # endif + #endif + +-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" ++#define _PATH_MOUNT_CONF "/etc/mount.conf" ++ ++#define _PATH_MOUNTED_LOCKDIR "/etc/" ++#define _MOUNTED_LOCK_FILENAME "mtab~" ++#define _PATH_MOUNTED_LOCK _PATH_MOUNTED_LOCKDIR _MOUNTED_LOCK_FILENAME ++ + #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" + + #ifndef _PATH_DEV +diff --git a/mount/fstab.c b/mount/fstab.c +index 82e90f3..8b1b244 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -12,6 +12,8 @@ + #include + #include + #include ++#include ++ + #include "mount_mntent.h" + #include "fstab.h" + #include "sundries.h" +@@ -481,6 +483,7 @@ getfs_by_label (const char *label) { + + /* Flag for already existing lock file. */ + static int we_created_lockfile = 0; ++static DIR *lockdir; + static int lockfile_fd = -1; + + /* Flag to indicate that signals have been set up. */ +@@ -499,14 +502,85 @@ setlkw_timeout (int sig) { + /* nothing, fcntl will fail anyway */ + } + ++static char * ++get_next_line(FILE *f, char *buf, size_t bufsz) ++{ ++ char *s; ++ ++ do { ++ if (!fgets(buf, bufsz, f)) ++ goto err; ++ s = strchr(buf, '\n'); ++ if (!s) { ++ /* Missing final newline? Otherwise extremely */ ++ /* long line - assume file was corrupted */ ++ if (feof(f)) ++ s = index(buf, '\0'); ++ else { ++ if (verbose) ++ printf(_("%s: missing newline at line '%s'.\n"), ++ _PATH_MOUNT_CONF, buf); ++ goto err; ++ } ++ } ++ *s = '\0'; ++ if (--s >= buf && *s == '\r') ++ *s = '\0'; ++ ++ s = buf; ++ while (*s == ' ' || *s == '\t') /* skip space */ ++ s++; ++ } while (*s == '\0' || *s == '#'); ++ ++ return s; ++err: ++ return NULL; ++} ++ ++char * ++get_lock_dirname(char *buf, size_t bufsz) ++{ ++ FILE *f; ++ char *s; ++ ++ f = fopen(_PATH_MOUNT_CONF, "r"); ++ if (!f) ++ goto err; ++ ++ while((s = get_next_line(f, buf, bufsz))) { ++ if (!strncmp(s, "MTAB_LOCK_DIR=", 14)) { ++ s += 14; ++ break; ++ } ++ } ++ fclose(f); ++ if (s) { ++ size_t sz = strlen(s); ++ char *end = sz > 1 ? s + (sz - 1) : NULL; ++ ++ if (end && *end != '/') { ++ *++end = '/'; ++ *++end = '\0'; ++ } ++ return s; ++ } ++err: ++ /* fallback */ ++ strncpy(buf, _PATH_MOUNTED_LOCKDIR, bufsz); ++ buf[bufsz - 1] = '\0'; ++ return buf; ++} ++ + /* Remove lock file. */ + void + unlock_mtab (void) { + if (we_created_lockfile) { ++ int lockdir_fd = dirfd(lockdir); + close(lockfile_fd); + lockfile_fd = -1; +- unlink (_PATH_MOUNTED_LOCK); ++ unlinkat(lockdir_fd, _MOUNTED_LOCK_FILENAME, 0); + we_created_lockfile = 0; ++ closedir(lockdir); + } + } + +@@ -527,8 +601,6 @@ unlock_mtab (void) { + /* Where does the link point to? Obvious choices are mtab and mtab~~. + HJLu points out that the latter leads to races. Right now we use + mtab~. instead. Use 20 as upper bound for the length of %d. */ +-#define MOUNTLOCK_LINKTARGET _PATH_MOUNTED_LOCK "%d" +-#define MOUNTLOCK_LINKTARGET_LTH (sizeof(_PATH_MOUNTED_LOCK)+20) + + /* + * The original mount locking code has used sleep(1) between attempts and +@@ -556,7 +628,10 @@ lock_mtab (void) { + int i; + struct timespec waittime; + struct timeval maxtime; +- char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; ++ const char *lockdirname; ++ char buf[BUFSIZ]; ++ char linktargetfile[PATH_MAX]; ++ int lockdir_fd; + + if (!signals_have_been_setup) { + int sig = 0; +@@ -577,18 +652,28 @@ lock_mtab (void) { + signals_have_been_setup = 1; + } + +- sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); ++ lockdirname = get_lock_dirname(buf, sizeof(buf)); ++ ++ lockdir = opendir(lockdirname); ++ if (!lockdir) { ++ die (EX_FILEIO, _("can't open %s: %s "), ++ lockdirname, strerror(errno)); ++ } ++ lockdir_fd = dirfd(lockdir); ++ ++ snprintf(linktargetfile, sizeof(linktargetfile), "%s.%d", ++ _MOUNTED_LOCK_FILENAME, getpid ()); + +- i = open (linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); ++ i = openat(lockdir_fd, linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); + if (i < 0) { + int errsv = errno; + /* linktargetfile does not exist (as a file) + and we cannot create it. Read-only filesystem? + Too many files open in the system? + Filesystem full? */ +- die (EX_FILEIO, _("can't create lock file %s: %s " ++ die (EX_FILEIO, _("can't create lock file %s%s: %s " + "(use -n flag to override)"), +- linktargetfile, strerror (errsv)); ++ lockdirname, linktargetfile, strerror(errsv)); + } + close(i); + +@@ -604,20 +689,22 @@ lock_mtab (void) { + struct flock flock; + int errsv, j; + +- j = link(linktargetfile, _PATH_MOUNTED_LOCK); ++ j = linkat(lockdir_fd, linktargetfile, ++ lockdir_fd, _MOUNTED_LOCK_FILENAME, 0); + errsv = errno; + + if (j == 0) + we_created_lockfile = 1; + + if (j < 0 && errsv != EEXIST) { +- (void) unlink(linktargetfile); +- die (EX_FILEIO, _("can't link lock file %s: %s " ++ unlinkat(lockdir_fd, linktargetfile, 0); ++ die (EX_FILEIO, _("can't link lock file %s%s: %s " + "(use -n flag to override)"), +- _PATH_MOUNTED_LOCK, strerror (errsv)); ++ lockdirname, _MOUNTED_LOCK_FILENAME, strerror(errsv)); + } + +- lockfile_fd = open (_PATH_MOUNTED_LOCK, O_WRONLY); ++ lockfile_fd = openat(lockdir_fd, ++ _MOUNTED_LOCK_FILENAME, O_WRONLY); + + if (lockfile_fd < 0) { + /* Strange... Maybe the file was just deleted? */ +@@ -627,10 +714,10 @@ lock_mtab (void) { + we_created_lockfile = 0; + continue; + } +- (void) unlink(linktargetfile); +- die (EX_FILEIO, _("can't open lock file %s: %s " ++ unlinkat(lockdir_fd, linktargetfile, 0); ++ die (EX_FILEIO, _("can't open lock file %s%s: %s " + "(use -n flag to override)"), +- _PATH_MOUNTED_LOCK, strerror (errsv)); ++ lockdirname, _MOUNTED_LOCK_FILENAME, strerror(errsv)); + } + + flock.l_type = F_WRLCK; +@@ -643,12 +730,13 @@ lock_mtab (void) { + if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) { + if (verbose) { + int errsv = errno; +- printf(_("Can't lock lock file %s: %s\n"), +- _PATH_MOUNTED_LOCK, strerror (errsv)); ++ printf(_("Can't lock lock file %s%s: %s\n"), ++ lockdirname, _MOUNTED_LOCK_FILENAME, ++ strerror(errsv)); + } + /* proceed, since it was us who created the lockfile anyway */ + } +- (void) unlink(linktargetfile); ++ unlinkat(lockdir_fd, linktargetfile, 0); + } else { + /* Someone else made the link. Wait. */ + gettimeofday(&now, NULL); +@@ -656,19 +744,19 @@ lock_mtab (void) { + alarm(maxtime.tv_sec - now.tv_sec); + if (fcntl (lockfile_fd, F_SETLKW, &flock) == -1) { + int errsv = errno; +- (void) unlink(linktargetfile); +- die (EX_FILEIO, _("can't lock lock file %s: %s"), +- _PATH_MOUNTED_LOCK, (errno == EINTR) ? +- _("timed out") : strerror (errsv)); ++ unlinkat(lockdir_fd, linktargetfile, 0); ++ die (EX_FILEIO, _("can't lock lock file %s%s: %s"), ++ lockdirname, _MOUNTED_LOCK_FILENAME, ++ (errno == EINTR) ? ++ _("timed out") : strerror(errsv)); + } + alarm(0); +- + nanosleep(&waittime, NULL); + } else { +- (void) unlink(linktargetfile); +- die (EX_FILEIO, _("Cannot create link %s\n" ++ unlinkat(lockdir_fd, linktargetfile, 0); ++ die (EX_FILEIO, _("Cannot create link %s%s\n" + "Perhaps there is a stale lock file?\n"), +- _PATH_MOUNTED_LOCK); ++ lockdirname, _MOUNTED_LOCK_FILENAME); + } + close(lockfile_fd); + } +diff --git a/mount/fstab.h b/mount/fstab.h +index 8fc8fd4..b5bb5d9 100644 +--- a/mount/fstab.h ++++ b/mount/fstab.h +@@ -26,6 +26,7 @@ struct mntentchn *getfs_by_devdir (const char *dev, const char *dir); + struct mntentchn *getfs_by_uuid (const char *uuid); + struct mntentchn *getfs_by_label (const char *label); + ++char *get_lock_dirname(char *buf, size_t bufsz); + void lock_mtab (void); + void unlock_mtab (void); + void update_mtab (const char *special, struct my_mntent *with); +diff --git a/mount/mount.c b/mount/mount.c +index ef478c7..09086a8 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -2178,9 +2178,13 @@ main(int argc, char *argv[]) { + } + + if (verbose > 2) { ++ char buf[BUFSIZ]; ++ + printf("mount: fstab path: \"%s\"\n", _PATH_MNTTAB); + printf("mount: mtab path: \"%s\"\n", _PATH_MOUNTED); +- printf("mount: lock path: \"%s\"\n", _PATH_MOUNTED_LOCK); ++ printf("mount: lock path: \"%s%s\"\n", ++ get_lock_dirname(buf, sizeof(buf)), ++ _MOUNTED_LOCK_FILENAME); + printf("mount: temp path: \"%s\"\n", _PATH_MOUNTED_TMP); + printf("mount: UID: %d\n", getuid()); + printf("mount: eUID: %d\n", geteuid()); +-- +1.6.2.5 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ff9d341..63c9d38 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -96,13 +96,15 @@ Patch3: util-linux-ng-2.14-blockdev-rmpart.patch Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch # /etc/blkid.tab --> /etc/blkid/blkid.tab Patch5: util-linux-ng-2.16-blkid-cachefile.patch +# 214891 - mount: move mtab locks to /var/lock +Patch6: util-linux-ng-2.16-mount-conf.patch ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch6: util-linux-ng-2.13-login-lastlog.patch +Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux -Patch7: util-linux-ng-2.15-ipcs-32bit.patch +Patch8: util-linux-ng-2.15-ipcs-32bit.patch %description The util-linux-ng package contains a large variety of low-level system @@ -197,6 +199,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build unset LINGUAS || : @@ -471,7 +474,7 @@ fi %files -f %{name}.files %defattr(-,root,root) -%doc */README.* NEWS AUTHORS licenses/* README* +%doc */README.* NEWS AUTHORS licenses/* README* example.files/mount.conf %doc getopt/getopt-*.{bash,tcsh} %config(noreplace) %{_sysconfdir}/pam.d/chfn @@ -707,6 +710,9 @@ fi %changelog +* Mon Jul 27 2009 Karel Zak 2.16-2 +- fix #214891 - add mount.conf and MTAB_LOCK_DIR= option + * Sat Jul 25 2009 Karel Zak 2.16-1 - upgrade to 2.16 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16-ReleaseNotes From dfa8a7f8fdc5c30eb43806cbdf30f33e5c4f5b7d Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 30 Jul 2009 21:29:42 +0000 Subject: [PATCH 45/86] - remove the mount.conf support (see #214891) --- util-linux-ng-2.16-mount-conf.patch | 348 ---------------------------- util-linux-ng.spec | 10 +- 2 files changed, 5 insertions(+), 353 deletions(-) delete mode 100644 util-linux-ng-2.16-mount-conf.patch diff --git a/util-linux-ng-2.16-mount-conf.patch b/util-linux-ng-2.16-mount-conf.patch deleted file mode 100644 index ffd885c..0000000 --- a/util-linux-ng-2.16-mount-conf.patch +++ /dev/null @@ -1,348 +0,0 @@ -From 47cd680cc6cbbfc42f0fe4dd5833a36859ca310a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 27 Jul 2009 21:15:27 +0200 -Subject: [PATCH] mount(8): add mount.conf and MTAB_LOCK_DIR= - -The /etc directory is a really bad place for lock files on systems -with read-only root FS. - -This patch introduces the /etc/mount.conf file where is possible to -define MTAB_LOCK_DIR=. - -Signed-off-by: Karel Zak ---- - example.files/mount.conf | 20 +++++++ - include/pathnames.h | 7 ++- - mount/fstab.c | 142 +++++++++++++++++++++++++++++++++++++--------- - mount/fstab.h | 1 + - mount/mount.c | 6 ++- - 5 files changed, 147 insertions(+), 29 deletions(-) - create mode 100644 example.files/mount.conf - -diff --git a/example.files/mount.conf b/example.files/mount.conf -new file mode 100644 -index 0000000..7813eba ---- /dev/null -+++ b/example.files/mount.conf -@@ -0,0 +1,20 @@ -+# -+# This is mount(8) config file -+# -+ -+# MTAB_LOCK_DIR is a directory where mount(8) stores "mtab~" and "mtab~. -+# lock files. It's recommended to use the root filesystem for mount(8) lock -+# files. -+# -+# The default is /etc. -+# -+# WARNING: If you want to use a directory on stand-alone filesystem you have to -+# be very careful about your init scripts. -+# -+# For example use stand-alone /var for lock files and run "mount -a -+# -F" (-F means fork()) in init scripts is really bad idea. -+# -+# Solution is to use "mount -n" to mount the filesystem and then "mount -f" -+# to create proper /etc/mtab. -+# -+MTAB_LOCK_DIR=/etc -diff --git a/include/pathnames.h b/include/pathnames.h -index ead448e..e449c9d 100644 ---- a/include/pathnames.h -+++ b/include/pathnames.h -@@ -90,7 +90,12 @@ - # endif - #endif - --#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" -+#define _PATH_MOUNT_CONF "/etc/mount.conf" -+ -+#define _PATH_MOUNTED_LOCKDIR "/etc/" -+#define _MOUNTED_LOCK_FILENAME "mtab~" -+#define _PATH_MOUNTED_LOCK _PATH_MOUNTED_LOCKDIR _MOUNTED_LOCK_FILENAME -+ - #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" - - #ifndef _PATH_DEV -diff --git a/mount/fstab.c b/mount/fstab.c -index 82e90f3..8b1b244 100644 ---- a/mount/fstab.c -+++ b/mount/fstab.c -@@ -12,6 +12,8 @@ - #include - #include - #include -+#include -+ - #include "mount_mntent.h" - #include "fstab.h" - #include "sundries.h" -@@ -481,6 +483,7 @@ getfs_by_label (const char *label) { - - /* Flag for already existing lock file. */ - static int we_created_lockfile = 0; -+static DIR *lockdir; - static int lockfile_fd = -1; - - /* Flag to indicate that signals have been set up. */ -@@ -499,14 +502,85 @@ setlkw_timeout (int sig) { - /* nothing, fcntl will fail anyway */ - } - -+static char * -+get_next_line(FILE *f, char *buf, size_t bufsz) -+{ -+ char *s; -+ -+ do { -+ if (!fgets(buf, bufsz, f)) -+ goto err; -+ s = strchr(buf, '\n'); -+ if (!s) { -+ /* Missing final newline? Otherwise extremely */ -+ /* long line - assume file was corrupted */ -+ if (feof(f)) -+ s = index(buf, '\0'); -+ else { -+ if (verbose) -+ printf(_("%s: missing newline at line '%s'.\n"), -+ _PATH_MOUNT_CONF, buf); -+ goto err; -+ } -+ } -+ *s = '\0'; -+ if (--s >= buf && *s == '\r') -+ *s = '\0'; -+ -+ s = buf; -+ while (*s == ' ' || *s == '\t') /* skip space */ -+ s++; -+ } while (*s == '\0' || *s == '#'); -+ -+ return s; -+err: -+ return NULL; -+} -+ -+char * -+get_lock_dirname(char *buf, size_t bufsz) -+{ -+ FILE *f; -+ char *s; -+ -+ f = fopen(_PATH_MOUNT_CONF, "r"); -+ if (!f) -+ goto err; -+ -+ while((s = get_next_line(f, buf, bufsz))) { -+ if (!strncmp(s, "MTAB_LOCK_DIR=", 14)) { -+ s += 14; -+ break; -+ } -+ } -+ fclose(f); -+ if (s) { -+ size_t sz = strlen(s); -+ char *end = sz > 1 ? s + (sz - 1) : NULL; -+ -+ if (end && *end != '/') { -+ *++end = '/'; -+ *++end = '\0'; -+ } -+ return s; -+ } -+err: -+ /* fallback */ -+ strncpy(buf, _PATH_MOUNTED_LOCKDIR, bufsz); -+ buf[bufsz - 1] = '\0'; -+ return buf; -+} -+ - /* Remove lock file. */ - void - unlock_mtab (void) { - if (we_created_lockfile) { -+ int lockdir_fd = dirfd(lockdir); - close(lockfile_fd); - lockfile_fd = -1; -- unlink (_PATH_MOUNTED_LOCK); -+ unlinkat(lockdir_fd, _MOUNTED_LOCK_FILENAME, 0); - we_created_lockfile = 0; -+ closedir(lockdir); - } - } - -@@ -527,8 +601,6 @@ unlock_mtab (void) { - /* Where does the link point to? Obvious choices are mtab and mtab~~. - HJLu points out that the latter leads to races. Right now we use - mtab~. instead. Use 20 as upper bound for the length of %d. */ --#define MOUNTLOCK_LINKTARGET _PATH_MOUNTED_LOCK "%d" --#define MOUNTLOCK_LINKTARGET_LTH (sizeof(_PATH_MOUNTED_LOCK)+20) - - /* - * The original mount locking code has used sleep(1) between attempts and -@@ -556,7 +628,10 @@ lock_mtab (void) { - int i; - struct timespec waittime; - struct timeval maxtime; -- char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; -+ const char *lockdirname; -+ char buf[BUFSIZ]; -+ char linktargetfile[PATH_MAX]; -+ int lockdir_fd; - - if (!signals_have_been_setup) { - int sig = 0; -@@ -577,18 +652,28 @@ lock_mtab (void) { - signals_have_been_setup = 1; - } - -- sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); -+ lockdirname = get_lock_dirname(buf, sizeof(buf)); -+ -+ lockdir = opendir(lockdirname); -+ if (!lockdir) { -+ die (EX_FILEIO, _("can't open %s: %s "), -+ lockdirname, strerror(errno)); -+ } -+ lockdir_fd = dirfd(lockdir); -+ -+ snprintf(linktargetfile, sizeof(linktargetfile), "%s.%d", -+ _MOUNTED_LOCK_FILENAME, getpid ()); - -- i = open (linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); -+ i = openat(lockdir_fd, linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); - if (i < 0) { - int errsv = errno; - /* linktargetfile does not exist (as a file) - and we cannot create it. Read-only filesystem? - Too many files open in the system? - Filesystem full? */ -- die (EX_FILEIO, _("can't create lock file %s: %s " -+ die (EX_FILEIO, _("can't create lock file %s%s: %s " - "(use -n flag to override)"), -- linktargetfile, strerror (errsv)); -+ lockdirname, linktargetfile, strerror(errsv)); - } - close(i); - -@@ -604,20 +689,22 @@ lock_mtab (void) { - struct flock flock; - int errsv, j; - -- j = link(linktargetfile, _PATH_MOUNTED_LOCK); -+ j = linkat(lockdir_fd, linktargetfile, -+ lockdir_fd, _MOUNTED_LOCK_FILENAME, 0); - errsv = errno; - - if (j == 0) - we_created_lockfile = 1; - - if (j < 0 && errsv != EEXIST) { -- (void) unlink(linktargetfile); -- die (EX_FILEIO, _("can't link lock file %s: %s " -+ unlinkat(lockdir_fd, linktargetfile, 0); -+ die (EX_FILEIO, _("can't link lock file %s%s: %s " - "(use -n flag to override)"), -- _PATH_MOUNTED_LOCK, strerror (errsv)); -+ lockdirname, _MOUNTED_LOCK_FILENAME, strerror(errsv)); - } - -- lockfile_fd = open (_PATH_MOUNTED_LOCK, O_WRONLY); -+ lockfile_fd = openat(lockdir_fd, -+ _MOUNTED_LOCK_FILENAME, O_WRONLY); - - if (lockfile_fd < 0) { - /* Strange... Maybe the file was just deleted? */ -@@ -627,10 +714,10 @@ lock_mtab (void) { - we_created_lockfile = 0; - continue; - } -- (void) unlink(linktargetfile); -- die (EX_FILEIO, _("can't open lock file %s: %s " -+ unlinkat(lockdir_fd, linktargetfile, 0); -+ die (EX_FILEIO, _("can't open lock file %s%s: %s " - "(use -n flag to override)"), -- _PATH_MOUNTED_LOCK, strerror (errsv)); -+ lockdirname, _MOUNTED_LOCK_FILENAME, strerror(errsv)); - } - - flock.l_type = F_WRLCK; -@@ -643,12 +730,13 @@ lock_mtab (void) { - if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) { - if (verbose) { - int errsv = errno; -- printf(_("Can't lock lock file %s: %s\n"), -- _PATH_MOUNTED_LOCK, strerror (errsv)); -+ printf(_("Can't lock lock file %s%s: %s\n"), -+ lockdirname, _MOUNTED_LOCK_FILENAME, -+ strerror(errsv)); - } - /* proceed, since it was us who created the lockfile anyway */ - } -- (void) unlink(linktargetfile); -+ unlinkat(lockdir_fd, linktargetfile, 0); - } else { - /* Someone else made the link. Wait. */ - gettimeofday(&now, NULL); -@@ -656,19 +744,19 @@ lock_mtab (void) { - alarm(maxtime.tv_sec - now.tv_sec); - if (fcntl (lockfile_fd, F_SETLKW, &flock) == -1) { - int errsv = errno; -- (void) unlink(linktargetfile); -- die (EX_FILEIO, _("can't lock lock file %s: %s"), -- _PATH_MOUNTED_LOCK, (errno == EINTR) ? -- _("timed out") : strerror (errsv)); -+ unlinkat(lockdir_fd, linktargetfile, 0); -+ die (EX_FILEIO, _("can't lock lock file %s%s: %s"), -+ lockdirname, _MOUNTED_LOCK_FILENAME, -+ (errno == EINTR) ? -+ _("timed out") : strerror(errsv)); - } - alarm(0); -- - nanosleep(&waittime, NULL); - } else { -- (void) unlink(linktargetfile); -- die (EX_FILEIO, _("Cannot create link %s\n" -+ unlinkat(lockdir_fd, linktargetfile, 0); -+ die (EX_FILEIO, _("Cannot create link %s%s\n" - "Perhaps there is a stale lock file?\n"), -- _PATH_MOUNTED_LOCK); -+ lockdirname, _MOUNTED_LOCK_FILENAME); - } - close(lockfile_fd); - } -diff --git a/mount/fstab.h b/mount/fstab.h -index 8fc8fd4..b5bb5d9 100644 ---- a/mount/fstab.h -+++ b/mount/fstab.h -@@ -26,6 +26,7 @@ struct mntentchn *getfs_by_devdir (const char *dev, const char *dir); - struct mntentchn *getfs_by_uuid (const char *uuid); - struct mntentchn *getfs_by_label (const char *label); - -+char *get_lock_dirname(char *buf, size_t bufsz); - void lock_mtab (void); - void unlock_mtab (void); - void update_mtab (const char *special, struct my_mntent *with); -diff --git a/mount/mount.c b/mount/mount.c -index ef478c7..09086a8 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -2178,9 +2178,13 @@ main(int argc, char *argv[]) { - } - - if (verbose > 2) { -+ char buf[BUFSIZ]; -+ - printf("mount: fstab path: \"%s\"\n", _PATH_MNTTAB); - printf("mount: mtab path: \"%s\"\n", _PATH_MOUNTED); -- printf("mount: lock path: \"%s\"\n", _PATH_MOUNTED_LOCK); -+ printf("mount: lock path: \"%s%s\"\n", -+ get_lock_dirname(buf, sizeof(buf)), -+ _MOUNTED_LOCK_FILENAME); - printf("mount: temp path: \"%s\"\n", _PATH_MOUNTED_TMP); - printf("mount: UID: %d\n", getuid()); - printf("mount: eUID: %d\n", geteuid()); --- -1.6.2.5 - diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 63c9d38..fb07971 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -96,8 +96,6 @@ Patch3: util-linux-ng-2.14-blockdev-rmpart.patch Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch # /etc/blkid.tab --> /etc/blkid/blkid.tab Patch5: util-linux-ng-2.16-blkid-cachefile.patch -# 214891 - mount: move mtab locks to /var/lock -Patch6: util-linux-ng-2.16-mount-conf.patch ### Ready for upstream? ### @@ -197,7 +195,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 %patch7 -p1 %patch8 -p1 @@ -474,7 +471,7 @@ fi %files -f %{name}.files %defattr(-,root,root) -%doc */README.* NEWS AUTHORS licenses/* README* example.files/mount.conf +%doc */README.* NEWS AUTHORS licenses/* README* %doc getopt/getopt-*.{bash,tcsh} %config(noreplace) %{_sysconfdir}/pam.d/chfn @@ -710,6 +707,9 @@ fi %changelog +* Thu Jul 30 2009 Karel Zak 2.16-3 +- remove the mount.conf support (see #214891) + * Mon Jul 27 2009 Karel Zak 2.16-2 - fix #214891 - add mount.conf and MTAB_LOCK_DIR= option From 5cb38df8b7347bc9d8236109a767fcb718c12be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Kasal?= Date: Wed, 5 Aug 2009 07:45:59 +0000 Subject: [PATCH 46/86] - set conflict with versions of e2fsprogs containing fsck --- util-linux-ng.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index fb07971..66f9523 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -50,8 +50,8 @@ Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 Conflicts: initscripts <= 4.58 %endif Conflicts: kernel < 2.2.12-7 -# old versions of e2fsprogs provides libblkid -Conflicts: e2fsprogs < 1.41.6-2 +# old versions of e2fsprogs contain fsck, uuidgen +Conflicts: e2fsprogs < 1.41.8-5 # old versions of util-linux have been splited to more sub-packages Obsoletes: mount < 2.11, losetup < 2.11 @@ -707,6 +707,9 @@ fi %changelog +* Wed Aug 5 2009 Stepan Kasal 2.16-4 +- set conflict with versions of e2fsprogs containing fsck + * Thu Jul 30 2009 Karel Zak 2.16-3 - remove the mount.conf support (see #214891) From 203ba3aecbe5096ace76a0d454f81bef5bf3e611 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 13 Aug 2009 22:22:43 +0000 Subject: [PATCH 47/86] - fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded --- util-linux-ng-2.16-libblkid-ext2.patch | 51 ++++++++++++++++++++++++++ util-linux-ng.spec | 8 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-libblkid-ext2.patch diff --git a/util-linux-ng-2.16-libblkid-ext2.patch b/util-linux-ng-2.16-libblkid-ext2.patch new file mode 100644 index 0000000..85cb6e0 --- /dev/null +++ b/util-linux-ng-2.16-libblkid-ext2.patch @@ -0,0 +1,51 @@ +From 92cf3ab964266603cf36272d0eec96cd07fa083c Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 13 Aug 2009 21:55:43 +0200 +Subject: [PATCH] libblkid: fix ext2 detection on systems with ext4 only + +Address-Red-Hat-Bug: #513104 +Signed-off-by: Karel Zak +--- + shlibs/blkid/src/probers/ext.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c +index 671e556..a4d35d1 100644 +--- a/shlibs/blkid/src/probers/ext.c ++++ b/shlibs/blkid/src/probers/ext.c +@@ -483,11 +483,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) + if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) + return -BLKID_ERR_PARAM; + +- /* Ext4 has at least one feature which ext3 doesn't understand */ +- if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && +- !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) +- return -BLKID_ERR_PARAM; +- + /* + * If the filesystem does not have a journal and ext2 is not + * present, then force this to be detected as an ext2 +@@ -498,6 +493,12 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) + get_linux_version() >= EXT4_SUPPORTS_EXT2) + goto force_ext4; + ++ /* Ext4 has at least one feature which ext3 doesn't understand */ ++ if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && ++ !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) ++ return -BLKID_ERR_PARAM; ++ ++force_ext4: + /* + * If the filesystem is a OK for use by in-development + * filesystem code, and ext4dev is supported or ext4 is not +@@ -513,7 +514,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) + return -BLKID_ERR_PARAM; + } + +-force_ext4: + ext_get_info(pr, 4, es); + return 0; + } +-- +1.6.2.5 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 66f9523..37e2161 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -103,6 +103,8 @@ Patch5: util-linux-ng-2.16-blkid-cachefile.patch Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch +# 513104 - blkid returns no fstype for ext2 device when ext2 module not loaded +Patch9: util-linux-ng-2.16-libblkid-ext2.patch %description The util-linux-ng package contains a large variety of low-level system @@ -197,6 +199,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build unset LINGUAS || : @@ -707,6 +710,9 @@ fi %changelog +* Thu Aug 13 2009 Karel Zak 2.16-5 +- fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded + * Wed Aug 5 2009 Stepan Kasal 2.16-4 - set conflict with versions of e2fsprogs containing fsck From a462526bed7eb21c48e749c9519c6969e42227a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Fri, 21 Aug 2009 11:21:10 +0000 Subject: [PATCH 48/86] - rebuilt with new audit --- util-linux-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 37e2161..8004f0b 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -710,6 +710,9 @@ fi %changelog +* Fri Aug 21 2009 Tomas Mraz - 2.16-6 +- rebuilt with new audit + * Thu Aug 13 2009 Karel Zak 2.16-5 - fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded From 0c627b12a604bd51409b914ddafea9ff3ac6b3ea Mon Sep 17 00:00:00 2001 From: kzak Date: Sun, 23 Aug 2009 19:25:24 +0000 Subject: [PATCH 49/86] - fix #518572 - blkid requires ext2.ko to be decompressed on installation media --- util-linux-ng-2.16-libblkid-compression.patch | 57 +++++++++++++++++++ util-linux-ng.spec | 11 +++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-libblkid-compression.patch diff --git a/util-linux-ng-2.16-libblkid-compression.patch b/util-linux-ng-2.16-libblkid-compression.patch new file mode 100644 index 0000000..111d793 --- /dev/null +++ b/util-linux-ng-2.16-libblkid-compression.patch @@ -0,0 +1,57 @@ +From e94e99523d8a3d0218fe16b0a7a2c5886ccbc652 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Sun, 23 Aug 2009 20:33:10 +0200 +Subject: [PATCH] libblkid: add *.ko.gz support to modules.dep parser + +Address-Red-Hat-Bug: #518572 +Signed-off-by: Karel Zak +--- + shlibs/blkid/src/probers/ext.c | 18 +++++++++--------- + 1 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c +index a4d35d1..c27411d 100644 +--- a/shlibs/blkid/src/probers/ext.c ++++ b/shlibs/blkid/src/probers/ext.c +@@ -224,8 +224,8 @@ static int check_for_modules(const char *fs_name) + #ifdef __linux__ + struct utsname uts; + FILE *f; +- char buf[1024], *cp, *t; +- int i; ++ char buf[1024], *cp; ++ int namesz; + + if (uname(&uts)) + return 0; +@@ -234,6 +234,9 @@ static int check_for_modules(const char *fs_name) + f = fopen(buf, "r"); + if (!f) + return 0; ++ ++ namesz = strlen(fs_name); ++ + while (!feof(f)) { + if (!fgets(buf, sizeof(buf), f)) + break; +@@ -244,13 +247,10 @@ static int check_for_modules(const char *fs_name) + if ((cp = strrchr(buf, '/')) == NULL) + continue; + cp++; +- i = strlen(cp); +- if (i > 3) { +- t = cp + i - 3; +- if (!strcmp(t, ".ko")) +- *t = 0; +- } +- if (!strcmp(cp, fs_name)) { ++ ++ if (!strncmp(cp, fs_name, namesz) && ++ (!strcmp(cp + namesz, ".ko") || ++ !strcmp(cp + namesz, ".ko.gz"))) { + fclose(f); + return 1; + } +-- +1.6.2.5 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 8004f0b..a95384e 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -103,8 +103,13 @@ Patch5: util-linux-ng-2.16-blkid-cachefile.patch Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch + +### Upstream patches +### # 513104 - blkid returns no fstype for ext2 device when ext2 module not loaded Patch9: util-linux-ng-2.16-libblkid-ext2.patch +# 518572 - blkid requires ext2.ko to be decompressed on installation media +Patch10: util-linux-ng-2.16-libblkid-compression.patch %description The util-linux-ng package contains a large variety of low-level system @@ -200,6 +205,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build unset LINGUAS || : @@ -710,6 +716,9 @@ fi %changelog +* Sun Aug 23 2009 Karel Zak 2.16-7 +- fix #518572 - blkid requires ext2.ko to be decompressed on installation media + * Fri Aug 21 2009 Tomas Mraz - 2.16-6 - rebuilt with new audit From e9e0efc157e4913658b0d13c235edca34b2c839b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Wed, 26 Aug 2009 16:05:05 +0000 Subject: [PATCH 50/86] - rebuilt with new audit --- util-linux-ng.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index a95384e..479b316 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -716,12 +716,12 @@ fi %changelog +* Wed Aug 26 2009 Tomas Mraz - 2.16-8 +- rebuilt with new audit + * Sun Aug 23 2009 Karel Zak 2.16-7 - fix #518572 - blkid requires ext2.ko to be decompressed on installation media -* Fri Aug 21 2009 Tomas Mraz - 2.16-6 -- rebuilt with new audit - * Thu Aug 13 2009 Karel Zak 2.16-5 - fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded From 2b1c901a2fea633d4fe8874f497763c8acdccb8a Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 14 Sep 2009 08:40:51 +0000 Subject: [PATCH 51/86] - fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set - fix typo in swsuspend detection --- util-linux-ng-2.14-sfdisk-dump.patch | 54 ++++++++++++++++++++++++ util-linux-ng-2.16-blkid-swsuspend.patch | 26 ++++++++++++ util-linux-ng.spec | 12 +++++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.14-sfdisk-dump.patch create mode 100644 util-linux-ng-2.16-blkid-swsuspend.patch diff --git a/util-linux-ng-2.14-sfdisk-dump.patch b/util-linux-ng-2.14-sfdisk-dump.patch new file mode 100644 index 0000000..89a644c --- /dev/null +++ b/util-linux-ng-2.14-sfdisk-dump.patch @@ -0,0 +1,54 @@ +From 1f1614f6a89de4b06e1843d0fadbca3f8a5521fe Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 11 Sep 2009 14:00:50 +0200 +Subject: [PATCH 1/2] sfdisk: dump has to be $LANG insensitive + +This stupid bug has been introduced by: + + commit add5133f4ad5136aac3ce7627e615d14893d0aeb + Author: Pedro Ribeiro + Date: Fri Oct 3 08:52:35 2008 +0200 + fdisk: several strings without gettext calls + +... so it shows that we need to improve our review process... :-( + +Address-Red-Hat-Bug: #522718 +Signed-off-by: Karel Zak +--- + fdisk/sfdisk.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c +index 8fae5bb..427cb40 100644 +--- a/fdisk/sfdisk.c ++++ b/fdisk/sfdisk.c +@@ -930,8 +930,8 @@ get_disksize(int format) { + static void + out_partition_header(char *dev, int format, struct geometry G) { + if (dump) { +- printf(_("# partition table of %s\n"), dev); +- printf(_("unit: sectors\n\n")); ++ printf("# partition table of %s\n", dev); ++ printf("unit: sectors\n\n"); + return; + } + +@@ -1059,12 +1059,12 @@ out_partition(char *dev, int format, struct part_desc *p, + size = p->size; + + if (dump) { +- printf(_(" start=%9lu"), start); +- printf(_(", size=%9lu"), size); ++ printf(" start=%9lu", start); ++ printf(", size=%9lu", size); + if (p->ptype == DOS_TYPE) { + printf(", Id=%2x", p->p.sys_type); + if (p->p.bootable == 0x80) +- printf(_(", bootable")); ++ printf(", bootable"); + } + printf("\n"); + return; +-- +1.6.2.5 + diff --git a/util-linux-ng-2.16-blkid-swsuspend.patch b/util-linux-ng-2.16-blkid-swsuspend.patch new file mode 100644 index 0000000..f9f4bf1 --- /dev/null +++ b/util-linux-ng-2.16-blkid-swsuspend.patch @@ -0,0 +1,26 @@ +From 71cd5d8a775d98e93f7583210a5b53c52b4ec34f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 14 Sep 2009 10:24:07 +0200 +Subject: [PATCH] libblkid: fix typo (swsupend -> swsuspend) + +Signed-off-by: Karel Zak +--- + shlibs/blkid/src/probers/swap.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/shlibs/blkid/src/probers/swap.c b/shlibs/blkid/src/probers/swap.c +index 86eb94c..c289488 100644 +--- a/shlibs/blkid/src/probers/swap.c ++++ b/shlibs/blkid/src/probers/swap.c +@@ -118,7 +118,7 @@ const struct blkid_idinfo swap_idinfo = + + const struct blkid_idinfo swsuspend_idinfo = + { +- .name = "swsupend", ++ .name = "swsuspend", + .usage = BLKID_USAGE_OTHER, + .probefunc = probe_swsuspend, + .magics = +-- +1.6.2.5 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 479b316..2654063 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -110,6 +110,10 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch Patch9: util-linux-ng-2.16-libblkid-ext2.patch # 518572 - blkid requires ext2.ko to be decompressed on installation media Patch10: util-linux-ng-2.16-libblkid-compression.patch +# 522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set +Patch11: util-linux-ng-2.14-sfdisk-dump.patch +# Swsuspend does not work +Patch12: util-linux-ng-2.16-blkid-swsuspend.patch %description The util-linux-ng package contains a large variety of low-level system @@ -206,6 +210,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 %build unset LINGUAS || : @@ -716,6 +722,10 @@ fi %changelog +* Mon Sep 14 2009 Karel Zak 2.16-9 +- fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set +- fix typo in swsuspend detection + * Wed Aug 26 2009 Tomas Mraz - 2.16-8 - rebuilt with new audit From fdc66c57dc3ee90ff6b9ca34df762f70c81d5646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Wed, 16 Sep 2009 19:04:11 +0000 Subject: [PATCH 52/86] - use password-auth common PAM configuration instead of system-auth and drop pam_console.so call from the remote PAM config file --- util-linux-ng-remote.pamd | 9 ++++----- util-linux-ng.spec | 6 +++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/util-linux-ng-remote.pamd b/util-linux-ng-remote.pamd index 24fc8b7..d8f83f3 100644 --- a/util-linux-ng-remote.pamd +++ b/util-linux-ng-remote.pamd @@ -1,15 +1,14 @@ #%PAM-1.0 auth required pam_securetty.so -auth include system-auth +auth include password-auth account required pam_nologin.so -account include system-auth -password include system-auth +account include password-auth +password include password-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close session required pam_loginuid.so -session optional pam_console.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open session required pam_namespace.so session optional pam_keyinit.so force revoke -session include system-auth +session include password-auth diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 2654063..ff059b5 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -722,6 +722,10 @@ fi %changelog +* Wed Sep 16 2009 Tomas Mraz - 2.16-10 +- use password-auth common PAM configuration instead of system-auth and + drop pam_console.so call from the remote PAM config file + * Mon Sep 14 2009 Karel Zak 2.16-9 - fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set - fix typo in swsuspend detection From 3d39c82c099f568b1c70984d53beed6a56e84035 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 1 Oct 2009 19:05:20 +0000 Subject: [PATCH 53/86] - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device --- util-linux-ng-2.16-switchroot-tty.patch | 17 +++++++++++++++++ util-linux-ng.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.16-switchroot-tty.patch diff --git a/util-linux-ng-2.16-switchroot-tty.patch b/util-linux-ng-2.16-switchroot-tty.patch new file mode 100644 index 0000000..14ee89f --- /dev/null +++ b/util-linux-ng-2.16-switchroot-tty.patch @@ -0,0 +1,17 @@ +diff -up util-linux-ng-2.16/sys-utils/switch_root.c.kzak util-linux-ng-2.16/sys-utils/switch_root.c +--- util-linux-ng-2.16/sys-utils/switch_root.c.kzak 2009-10-01 21:01:31.000000000 +0200 ++++ util-linux-ng-2.16/sys-utils/switch_root.c 2009-10-01 21:01:52.000000000 +0200 +@@ -267,13 +267,6 @@ int main(int argc, char *argv[]) + if (access(init, X_OK)) + warn("cannot access %s", init); + +- /* get session leader */ +- setsid(); +- +- /* set controlling terminal */ +- if (ioctl (0, TIOCSCTTY, 1)) +- warn("failed to TIOCSCTTY"); +- + execv(init, initargs); + err(EXIT_FAILURE, "failed to execute %s", init); + } diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ff059b5..27eb962 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -114,6 +114,8 @@ Patch10: util-linux-ng-2.16-libblkid-compression.patch Patch11: util-linux-ng-2.14-sfdisk-dump.patch # Swsuspend does not work Patch12: util-linux-ng-2.16-blkid-swsuspend.patch +# 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device +Patch13: util-linux-ng-2.16-switchroot-tty.patch %description The util-linux-ng package contains a large variety of low-level system @@ -722,6 +724,9 @@ fi %changelog +* Thu Oct 1 2009 Karel Zak 2.16-11 +- fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device + * Wed Sep 16 2009 Tomas Mraz - 2.16-10 - use password-auth common PAM configuration instead of system-auth and drop pam_console.so call from the remote PAM config file From 54801c4aa369ef4c45dbd3fb45da1cd47396f4b5 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 2 Oct 2009 08:46:21 +0000 Subject: [PATCH 54/86] - release++ --- util-linux-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 27eb962..de0183d 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -724,6 +724,9 @@ fi %changelog +* Fri Oct 2 2009 Karel Zak 2.16-12 +- release++ + * Thu Oct 1 2009 Karel Zak 2.16-11 - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device From 65b849d1614074015eda83924458e1caded79704 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 5 Oct 2009 07:25:54 +0000 Subject: [PATCH 55/86] - fix spec file --- util-linux-ng.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index de0183d..3580539 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.16 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -214,6 +214,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -724,6 +725,9 @@ fi %changelog +* Mon Oct 5 2009 Karel Zak 2.16-13 +- fix spec file + * Fri Oct 2 2009 Karel Zak 2.16-12 - release++ From 9cc0805afcb149dfb80d248e3b165a53f00d387c Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 19 Oct 2009 12:51:04 +0000 Subject: [PATCH 56/86] - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) - new commands: fallocate, unshare, wipefs - libblkid supports topology and partitions probing - remove support for --rmpart[s] from blockdev(8) (util-linux-ng-2.14-blockdev-rmpart.patch) - merged upstream: util-linux-ng-2.14-sfdisk-dump.patch util-linux-ng-2.16-blkid-swsuspend.patch util-linux-ng-2.16-libblkid-compression.patch util-linux-ng-2.16-libblkid-ext2.patch util-linux-ng-2.16-switchroot-tty.patch --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.14-blockdev-rmpart.patch | 93 ------------------- util-linux-ng-2.14-sfdisk-dump.patch | 54 ----------- util-linux-ng-2.16-blkid-cachefile.patch | 36 +++---- util-linux-ng-2.16-blkid-swsuspend.patch | 26 ------ util-linux-ng-2.16-libblkid-compression.patch | 57 ------------ util-linux-ng-2.16-libblkid-ext2.patch | 51 ---------- util-linux-ng-2.16-switchroot-tty.patch | 17 ---- util-linux-ng.spec | 50 +++++----- 10 files changed, 44 insertions(+), 344 deletions(-) delete mode 100644 util-linux-ng-2.14-blockdev-rmpart.patch delete mode 100644 util-linux-ng-2.14-sfdisk-dump.patch delete mode 100644 util-linux-ng-2.16-blkid-swsuspend.patch delete mode 100644 util-linux-ng-2.16-libblkid-compression.patch delete mode 100644 util-linux-ng-2.16-libblkid-ext2.patch delete mode 100644 util-linux-ng-2.16-switchroot-tty.patch diff --git a/.cvsignore b/.cvsignore index df25c4e..63a7a76 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.16.tar.bz2 +util-linux-ng-2.17-git5e51568.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index f0be7b2..7ea3e08 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9623380641b0c2e0449f5b1ecc567663 util-linux-ng-2.16.tar.bz2 +d17141b5dabf4605b1c1db4cf8cff38a util-linux-ng-2.17-git5e51568.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng-2.14-blockdev-rmpart.patch b/util-linux-ng-2.14-blockdev-rmpart.patch deleted file mode 100644 index a907a06..0000000 --- a/util-linux-ng-2.14-blockdev-rmpart.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -up util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm util-linux-ng-2.14-rc3/disk-utils/blockdev.c ---- util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm 2008-04-22 10:59:53.000000000 +0200 -+++ util-linux-ng-2.14-rc3/disk-utils/blockdev.c 2008-05-19 12:31:52.000000000 +0200 -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "nls.h" - #include "blkdev.h" -@@ -47,8 +48,11 @@ struct bdc { - { "--setfra", "BLKFRASET", BLKFRASET, ARGINTA, 0, "FSREADAHEAD", N_("set filesystem readahead") }, - { "--getfra", "BLKFRAGET", BLKFRAGET, ARGLINTG, -1, NULL, N_("get filesystem readahead") }, - { "--flushbufs", "BLKFLSBUF", BLKFLSBUF, ARGNONE, 0, NULL, N_("flush buffers") }, -- { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, -- N_("reread partition table") }, -+ { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, N_("reread partition table") }, -+#ifdef BLKPG -+ { "--rmpart", "BLKPG", BLKPG, ARGINTAP, 0, "PARTNO", N_("disable partition") }, -+ { "--rmparts", "BLKPG", BLKPG, ARGNONE, 0, NULL, N_("disable all partitions") }, -+#endif - }; - - #define SIZE(a) (sizeof(a)/sizeof((a)[0])) -@@ -89,6 +93,40 @@ find_cmd(char *s) { - return -1; - } - -+#ifdef BLKPG -+static int -+disable_partition(int fd, int partno) { -+ struct blkpg_partition part = { -+ .pno = partno, -+ .start = 0, -+ .length = 0, -+ .devname[0] = 0, -+ .volname[0] = 0, -+ }; -+ struct blkpg_ioctl_arg io = { -+ .op = BLKPG_DEL_PARTITION, -+ .datalen = sizeof(part), -+ .data = &part, -+ .flags = 0, -+ }; -+ int res; -+ -+ res = ioctl(fd, BLKPG, &io); -+ if (res < 0) -+ return 0; -+ return 1; -+} -+ -+static int -+disable_partitions(int fd) { -+ int p, res = 0; -+ -+ for (p = 1; p <= 256; p++) -+ res += disable_partition(fd, p); -+ return res ? 0 : -1; -+} -+#endif -+ - void do_commands(int fd, char **argv, int d); - void report_header(void); - void report_device(char *device, int quiet); -@@ -206,6 +244,12 @@ do_commands(int fd, char **argv, int d) - switch(bdcms[j].argtype) { - default: - case ARGNONE: -+#ifdef BLKPG -+ if (bdcms[j].ioc == BLKPG) { -+ res = disable_partitions(fd); -+ break; -+ } -+#endif - res = ioctl(fd, bdcms[j].ioc, 0); - break; - case ARGINTA: -@@ -223,6 +267,13 @@ do_commands(int fd, char **argv, int d) - bdcms[j].name); - usage(); - } -+#ifdef BLKPG -+ if (bdcms[j].ioc == BLKPG) { -+ iarg = atoi(argv[++i]); -+ res = disable_partition(fd, iarg) ? 0 : -1; -+ break; -+ } -+#endif - iarg = atoi(argv[++i]); - res = ioctl(fd, bdcms[j].ioc, &iarg); - break; diff --git a/util-linux-ng-2.14-sfdisk-dump.patch b/util-linux-ng-2.14-sfdisk-dump.patch deleted file mode 100644 index 89a644c..0000000 --- a/util-linux-ng-2.14-sfdisk-dump.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1f1614f6a89de4b06e1843d0fadbca3f8a5521fe Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 11 Sep 2009 14:00:50 +0200 -Subject: [PATCH 1/2] sfdisk: dump has to be $LANG insensitive - -This stupid bug has been introduced by: - - commit add5133f4ad5136aac3ce7627e615d14893d0aeb - Author: Pedro Ribeiro - Date: Fri Oct 3 08:52:35 2008 +0200 - fdisk: several strings without gettext calls - -... so it shows that we need to improve our review process... :-( - -Address-Red-Hat-Bug: #522718 -Signed-off-by: Karel Zak ---- - fdisk/sfdisk.c | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c -index 8fae5bb..427cb40 100644 ---- a/fdisk/sfdisk.c -+++ b/fdisk/sfdisk.c -@@ -930,8 +930,8 @@ get_disksize(int format) { - static void - out_partition_header(char *dev, int format, struct geometry G) { - if (dump) { -- printf(_("# partition table of %s\n"), dev); -- printf(_("unit: sectors\n\n")); -+ printf("# partition table of %s\n", dev); -+ printf("unit: sectors\n\n"); - return; - } - -@@ -1059,12 +1059,12 @@ out_partition(char *dev, int format, struct part_desc *p, - size = p->size; - - if (dump) { -- printf(_(" start=%9lu"), start); -- printf(_(", size=%9lu"), size); -+ printf(" start=%9lu", start); -+ printf(", size=%9lu", size); - if (p->ptype == DOS_TYPE) { - printf(", Id=%2x", p->p.sys_type); - if (p->p.bootable == 0x80) -- printf(_(", bootable")); -+ printf(", bootable"); - } - printf("\n"); - return; --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch index 9e1df11..5cff6d7 100644 --- a/util-linux-ng-2.16-blkid-cachefile.patch +++ b/util-linux-ng-2.16-blkid-cachefile.patch @@ -1,7 +1,7 @@ -diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-utils/blkid.8 ---- util-linux-ng-2.16/misc-utils/blkid.8.kzak 2009-07-04 01:20:01.000000000 +0200 -+++ util-linux-ng-2.16/misc-utils/blkid.8 2009-07-16 00:41:28.000000000 +0200 -@@ -64,7 +64,7 @@ more devices. +diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 +--- util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 2009-10-19 14:31:10.000000000 +0200 +@@ -67,7 +67,7 @@ more devices. Read from .I cachefile instead of reading from the default cache file @@ -10,7 +10,7 @@ diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-util If you want to start with a clean cache (i.e. don't report devices previously scanned but not necessarily available at this time), specify .IR /dev/null . -@@ -179,7 +179,7 @@ Display version number and exit. +@@ -190,7 +190,7 @@ Display version number and exit. Write the device cache to .I writecachefile instead of writing it to the default cache file @@ -19,10 +19,10 @@ diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-util If you don't want to save the cache to the default file, specify .IR /dev/null. If not specified it will be the same file as that given by the -diff -up util-linux-ng-2.16/misc-utils/blkid.c.kzak util-linux-ng-2.16/misc-utils/blkid.c ---- util-linux-ng-2.16/misc-utils/blkid.c.kzak 2009-07-04 01:20:01.000000000 +0200 -+++ util-linux-ng-2.16/misc-utils/blkid.c 2009-07-16 00:41:28.000000000 +0200 -@@ -60,7 +60,7 @@ static void usage(int error) +diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.c +--- util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.c 2009-10-19 14:31:10.000000000 +0200 +@@ -62,7 +62,7 @@ static void usage(int error) " [-t ] [-w ] [dev ...]\n\n" " %1$s -p [-O ] [-S ] [-o format] [dev ...]\n\n" "Options:\n" @@ -31,9 +31,9 @@ diff -up util-linux-ng-2.16/misc-utils/blkid.c.kzak util-linux-ng-2.16/misc-util " -h print this usage message and exit\n" " -g garbage collect the blkid cache\n" " -o output format; can be one of:\n" -diff -up util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.16/shlibs/blkid/libblkid.3 ---- util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak 2009-07-04 01:20:03.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/libblkid.3 2009-07-16 00:40:13.000000000 +0200 +diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 +--- util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 2009-10-19 14:31:10.000000000 +0200 @@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a specific block device names into configuration files. .P @@ -61,12 +61,12 @@ diff -up util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.16/shli caches data extracted from each recognized block device .TP .I /etc/blkid.conf -diff -up util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.16/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak 2009-07-13 20:30:36.000000000 +0200 -+++ util-linux-ng-2.16/shlibs/blkid/src/blkidP.h 2009-07-16 00:40:13.000000000 +0200 -@@ -223,7 +223,7 @@ struct blkid_struct_cache - extern char *blkid_strdup(const char *s); - extern char *blkid_strndup(const char *s, const int length); +diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak 2009-10-16 22:50:03.000000000 +0200 ++++ util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h 2009-10-19 14:32:03.000000000 +0200 +@@ -267,7 +267,7 @@ extern char *blkid_strconcat(const char + extern int blkid_fstatat(DIR *dir, const char *dirname, const char *filename, + struct stat *st, int nofollow); -#define BLKID_CACHE_FILE "/etc/blkid.tab" +#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" diff --git a/util-linux-ng-2.16-blkid-swsuspend.patch b/util-linux-ng-2.16-blkid-swsuspend.patch deleted file mode 100644 index f9f4bf1..0000000 --- a/util-linux-ng-2.16-blkid-swsuspend.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 71cd5d8a775d98e93f7583210a5b53c52b4ec34f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 14 Sep 2009 10:24:07 +0200 -Subject: [PATCH] libblkid: fix typo (swsupend -> swsuspend) - -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/swap.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/shlibs/blkid/src/probers/swap.c b/shlibs/blkid/src/probers/swap.c -index 86eb94c..c289488 100644 ---- a/shlibs/blkid/src/probers/swap.c -+++ b/shlibs/blkid/src/probers/swap.c -@@ -118,7 +118,7 @@ const struct blkid_idinfo swap_idinfo = - - const struct blkid_idinfo swsuspend_idinfo = - { -- .name = "swsupend", -+ .name = "swsuspend", - .usage = BLKID_USAGE_OTHER, - .probefunc = probe_swsuspend, - .magics = --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-compression.patch b/util-linux-ng-2.16-libblkid-compression.patch deleted file mode 100644 index 111d793..0000000 --- a/util-linux-ng-2.16-libblkid-compression.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e94e99523d8a3d0218fe16b0a7a2c5886ccbc652 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Sun, 23 Aug 2009 20:33:10 +0200 -Subject: [PATCH] libblkid: add *.ko.gz support to modules.dep parser - -Address-Red-Hat-Bug: #518572 -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/ext.c | 18 +++++++++--------- - 1 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c -index a4d35d1..c27411d 100644 ---- a/shlibs/blkid/src/probers/ext.c -+++ b/shlibs/blkid/src/probers/ext.c -@@ -224,8 +224,8 @@ static int check_for_modules(const char *fs_name) - #ifdef __linux__ - struct utsname uts; - FILE *f; -- char buf[1024], *cp, *t; -- int i; -+ char buf[1024], *cp; -+ int namesz; - - if (uname(&uts)) - return 0; -@@ -234,6 +234,9 @@ static int check_for_modules(const char *fs_name) - f = fopen(buf, "r"); - if (!f) - return 0; -+ -+ namesz = strlen(fs_name); -+ - while (!feof(f)) { - if (!fgets(buf, sizeof(buf), f)) - break; -@@ -244,13 +247,10 @@ static int check_for_modules(const char *fs_name) - if ((cp = strrchr(buf, '/')) == NULL) - continue; - cp++; -- i = strlen(cp); -- if (i > 3) { -- t = cp + i - 3; -- if (!strcmp(t, ".ko")) -- *t = 0; -- } -- if (!strcmp(cp, fs_name)) { -+ -+ if (!strncmp(cp, fs_name, namesz) && -+ (!strcmp(cp + namesz, ".ko") || -+ !strcmp(cp + namesz, ".ko.gz"))) { - fclose(f); - return 1; - } --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-libblkid-ext2.patch b/util-linux-ng-2.16-libblkid-ext2.patch deleted file mode 100644 index 85cb6e0..0000000 --- a/util-linux-ng-2.16-libblkid-ext2.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 92cf3ab964266603cf36272d0eec96cd07fa083c Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 13 Aug 2009 21:55:43 +0200 -Subject: [PATCH] libblkid: fix ext2 detection on systems with ext4 only - -Address-Red-Hat-Bug: #513104 -Signed-off-by: Karel Zak ---- - shlibs/blkid/src/probers/ext.c | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c -index 671e556..a4d35d1 100644 ---- a/shlibs/blkid/src/probers/ext.c -+++ b/shlibs/blkid/src/probers/ext.c -@@ -483,11 +483,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) - return -BLKID_ERR_PARAM; - -- /* Ext4 has at least one feature which ext3 doesn't understand */ -- if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && -- !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -- return -BLKID_ERR_PARAM; -- - /* - * If the filesystem does not have a journal and ext2 is not - * present, then force this to be detected as an ext2 -@@ -498,6 +493,12 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - get_linux_version() >= EXT4_SUPPORTS_EXT2) - goto force_ext4; - -+ /* Ext4 has at least one feature which ext3 doesn't understand */ -+ if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) && -+ !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) -+ return -BLKID_ERR_PARAM; -+ -+force_ext4: - /* - * If the filesystem is a OK for use by in-development - * filesystem code, and ext4dev is supported or ext4 is not -@@ -513,7 +514,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag) - return -BLKID_ERR_PARAM; - } - --force_ext4: - ext_get_info(pr, 4, es); - return 0; - } --- -1.6.2.5 - diff --git a/util-linux-ng-2.16-switchroot-tty.patch b/util-linux-ng-2.16-switchroot-tty.patch deleted file mode 100644 index 14ee89f..0000000 --- a/util-linux-ng-2.16-switchroot-tty.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up util-linux-ng-2.16/sys-utils/switch_root.c.kzak util-linux-ng-2.16/sys-utils/switch_root.c ---- util-linux-ng-2.16/sys-utils/switch_root.c.kzak 2009-10-01 21:01:31.000000000 +0200 -+++ util-linux-ng-2.16/sys-utils/switch_root.c 2009-10-01 21:01:52.000000000 +0200 -@@ -267,13 +267,6 @@ int main(int argc, char *argv[]) - if (access(init, X_OK)) - warn("cannot access %s", init); - -- /* get session leader */ -- setsid(); -- -- /* set controlling terminal */ -- if (ioctl (0, TIOCSCTTY, 1)) -- warn("failed to TIOCSCTTY"); -- - execv(init, initargs); - err(EXIT_FAILURE, "failed to execute %s", init); - } diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3580539..af96755 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,14 +1,15 @@ +%define snapshot_hash git5e51568 +%define upstream_version %{version}-%{snapshot_hash} + ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.16 -Release: 13%{?dist} +Version: 2.17 +Release: 0.1.%{snapshot_hash}%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} - ### Features %if 0%{?rhel} %define include_raw 1 @@ -90,8 +91,6 @@ Patch2: util-linux-ng-2.13-floppy-generic.patch ### Fedora/RHEL specific patches -- need to die! ### -# remove partitions -Patch3: util-linux-ng-2.14-blockdev-rmpart.patch # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch # /etc/blkid.tab --> /etc/blkid/blkid.tab @@ -104,19 +103,6 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch -### Upstream patches -### -# 513104 - blkid returns no fstype for ext2 device when ext2 module not loaded -Patch9: util-linux-ng-2.16-libblkid-ext2.patch -# 518572 - blkid requires ext2.ko to be decompressed on installation media -Patch10: util-linux-ng-2.16-libblkid-compression.patch -# 522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set -Patch11: util-linux-ng-2.14-sfdisk-dump.patch -# Swsuspend does not work -Patch12: util-linux-ng-2.16-blkid-swsuspend.patch -# 519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device -Patch13: util-linux-ng-2.16-switchroot-tty.patch - %description The util-linux-ng package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -205,16 +191,10 @@ cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 %build unset LINGUAS || : @@ -236,7 +216,6 @@ export SUID_LDFLAGS="-pie" %endif --with-selinux \ --with-audit \ - --with-fsprobe=builtin \ --disable-makeinstall-chown # build util-linux-ng @@ -531,6 +510,7 @@ fi /sbin/swapoff /sbin/swapon /sbin/switch_root +/sbin/wipefs %{_bindir}/cal %{_bindir}/chrt @@ -539,6 +519,7 @@ fi %{_bindir}/colrm %{_bindir}/column %{_bindir}/ddate +%{_bindir}/fallocate %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump @@ -563,6 +544,7 @@ fi %{_bindir}/setterm %{_bindir}/tailf %{_bindir}/ul +%{_bindir}/unshare %{_bindir}/uuidgen %{_bindir}/whereis @@ -582,6 +564,7 @@ fi %{_mandir}/man1/column.1* %{_mandir}/man1/ddate.1* %{_mandir}/man1/dmesg.1* +%{_mandir}/man1/fallocate.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* %{_mandir}/man1/hexdump.1* @@ -608,6 +591,7 @@ fi %{_mandir}/man1/tailf.1* %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* +%{_mandir}/man1/unshare.1* %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* @@ -638,6 +622,7 @@ fi %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* %{_mandir}/man8/umount.8* +%{_mandir}/man8/wipefs.8* %if %{include_raw} /bin/raw @@ -725,6 +710,19 @@ fi %changelog +* Mon Oct 19 2009 Karel Zak 2.17-0.1.git5e51568 +- upgrade to pre-release snapshot (official changelog not available yet, see + http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) +- new commands: fallocate, unshare, wipefs +- libblkid supports topology and partitions probing +- remove support for --rmpart[s] from blockdev(8) (util-linux-ng-2.14-blockdev-rmpart.patch) +- merged upstream: + util-linux-ng-2.14-sfdisk-dump.patch + util-linux-ng-2.16-blkid-swsuspend.patch + util-linux-ng-2.16-libblkid-compression.patch + util-linux-ng-2.16-libblkid-ext2.patch + util-linux-ng-2.16-switchroot-tty.patch + * Mon Oct 5 2009 Karel Zak 2.16-13 - fix spec file From ad52cd8da8a9160dc14c01d92651b3dafdee90c8 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 10 Nov 2009 21:53:41 +0000 Subject: [PATCH 57/86] - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 63a7a76..1429709 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-git5e51568.tar.bz2 +util-linux-ng-2.17-git10dfc39.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 7ea3e08..bc6eca5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -d17141b5dabf4605b1c1db4cf8cff38a util-linux-ng-2.17-git5e51568.tar.bz2 +58b7042930a754edd9979228f0b174be util-linux-ng-2.17-git10dfc39.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index af96755..f5cca87 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,11 +1,11 @@ -%define snapshot_hash git5e51568 +%define snapshot_hash git10dfc39 %define upstream_version %{version}-%{snapshot_hash} ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.1.%{snapshot_hash}%{?dist} +Release: 0.2.%{snapshot_hash}%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -710,6 +710,10 @@ fi %changelog +* Tue Nov 10 2009 Karel Zak 2.17-0.2.git10dfc39 +- upgrade to pre-release snapshot (official changelog not available yet, see + http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) + * Mon Oct 19 2009 Karel Zak 2.17-0.1.git5e51568 - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) From ad59cd7228043a6b79b1fa43be80ff582849b4db Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 23 Nov 2009 12:34:10 +0000 Subject: [PATCH 58/86] - upgrade to 2.17-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 1429709..eb48652 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-git10dfc39.tar.bz2 +util-linux-ng-2.17-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index bc6eca5..a5e41cf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -58b7042930a754edd9979228f0b174be util-linux-ng-2.17-git10dfc39.tar.bz2 +320a6bab5cc8f70f6b9ad0c05a6fe67f util-linux-ng-2.17-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f5cca87..833ced1 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,11 +1,10 @@ -%define snapshot_hash git10dfc39 -%define upstream_version %{version}-%{snapshot_hash} +%define upstream_version %{version}-rc1 ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.2.%{snapshot_hash}%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -206,6 +205,7 @@ export SUID_LDFLAGS="-pie" --bindir=/bin \ --sbindir=/sbin \ --libdir=/%{_lib} \ + --disable-silent-rules \ --disable-wall \ --enable-partx \ --enable-login-utils \ @@ -710,6 +710,10 @@ fi %changelog +* Mon Nov 23 2009 Karel Zak 2.17-0.3 +- upgrade to 2.17-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog + * Tue Nov 10 2009 Karel Zak 2.17-0.2.git10dfc39 - upgrade to pre-release snapshot (official changelog not available yet, see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) From 0b5b5047d566325af70296108db3832b7c3d487b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:48 +0000 Subject: [PATCH 59/86] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c0f296d..c5d5fa9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: util-linux-ng -# $Id$ +# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ NAME := util-linux-ng SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From fb9e3b99b47a0d5e8ebc5614e5fad742f8a67396 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:16:36 +0000 Subject: [PATCH 60/86] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c0f296d..c5d5fa9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: util-linux-ng -# $Id$ +# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ NAME := util-linux-ng SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 8e0edf304511367c254a63ce9ab8a4464fac2b01 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 7 Dec 2009 11:17:37 +0000 Subject: [PATCH 61/86] - add clock.8 man page (manlink to hwclock) - add --help to mount.tmpfs --- mount.tmpfs | 8 ++++++++ util-linux-ng.spec | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index f862c03..e37f735 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -10,6 +10,14 @@ # /sbin/mount.tmpfs spec dir [-sfnv] [-o options] # +case $1 in + -h|--help|-?) + echo "mount.tmpfs is a private mount(8) wrapper for tmpfs." + echo "Don't use it directly!" + exit 1 + ;; +esac + if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 833ced1..76ca1cc 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -4,7 +4,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -303,7 +303,7 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock - +echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 # remove libtool junk (TODO) #rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la @@ -324,7 +324,7 @@ for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ /sbin/{hwclock,clock} \ /usr/sbin/hwclock \ - %{_mandir}/man8/hwclock.8*; do + %{_mandir}/man8/{hwclock,clock}.8*; do rm -f $RPM_BUILD_ROOT$I done @@ -641,6 +641,7 @@ fi %{_mandir}/man8/fdformat.8* %{_mandir}/man8/floppy.8* %{_mandir}/man8/hwclock.8* +%{_mandir}/man8/clock.8* %{_mandir}/man8/tunelp.8* %endif @@ -710,6 +711,10 @@ fi %changelog +* Mon Dec 7 2009 Karel Zak 2.17-0.4 +- add clock.8 man page (manlink to hwclock) +- add --help to mount.tmpfs + * Mon Nov 23 2009 Karel Zak 2.17-0.3 - upgrade to 2.17-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog From 68cfaf1c07c4a133159ce2a87c0f37b73d603ba0 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 9 Dec 2009 12:52:55 +0000 Subject: [PATCH 62/86] - upgrade to 2.17-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index eb48652..70995c2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-rc1.tar.bz2 +util-linux-ng-2.17-rc2.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index a5e41cf..ddc2bf4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -320a6bab5cc8f70f6b9ad0c05a6fe67f util-linux-ng-2.17-rc1.tar.bz2 +e8410e61fced33c6978c86c5b409f8c8 util-linux-ng-2.17-rc2.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 76ca1cc..8c9f220 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,10 +1,10 @@ -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -711,11 +711,15 @@ fi %changelog -* Mon Dec 7 2009 Karel Zak 2.17-0.4 +* Wed Dec 9 2009 Karel Zak 2.17-0.5 +- upgrade to 2.17-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-ChangeLog + +* Mon Dec 7 2009 Karel Zak 2.17-0.4 - add clock.8 man page (manlink to hwclock) - add --help to mount.tmpfs -* Mon Nov 23 2009 Karel Zak 2.17-0.3 +* Mon Nov 23 2009 Karel Zak 2.17-0.3 - upgrade to 2.17-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog From 508868f4718c0cbd5155980ccf0cc4dab9cfc138 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 14 Dec 2009 11:50:10 +0000 Subject: [PATCH 63/86] - minor fixes in spec file (fix URL, add Requires, add LGPLv2+) --- util-linux-ng.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 8c9f220..bcf1c92 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -4,8 +4,8 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.5%{?dist} -License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain +Release: 0.6%{?dist} +License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -34,7 +34,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/util-linux-ng-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -75,6 +75,8 @@ Requires(post): /sbin/install-info Requires(post): coreutils Requires: pam >= 1.0.90, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 +Requires: libuuid = %{version}-%{release} +Requires: libblkid = %{version}-%{release} %if %{include_raw} Requires: udev %endif @@ -711,6 +713,9 @@ fi %changelog +* Mon Dec 14 2009 Karel Zak 2.17-0.6 +- minor fixes in spec file (fix URL, add Requires, add LGPLv2+) + * Wed Dec 9 2009 Karel Zak 2.17-0.5 - upgrade to 2.17-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-ChangeLog From 23fc39cc0af8b68f1519a45a412d4b394a7e705b Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 8 Jan 2010 11:22:22 +0000 Subject: [PATCH 64/86] - upgrade to the final 2.17 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseN otes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLo g - fix #545147 - util-linux-ng : Violation of the Packaging Guidelines (remove uuid and blkid static libs) --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 21 +++++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index 70995c2..87044f2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17-rc2.tar.bz2 +util-linux-ng-2.17.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index ddc2bf4..964e6d2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -e8410e61fced33c6978c86c5b409f8c8 util-linux-ng-2.17-rc2.tar.bz2 +11cc8a0138019e7060dd275d47dbc096 util-linux-ng-2.17.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index bcf1c92..00cd090 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,14 +1,14 @@ -%define upstream_version %{version}-rc2 - ### Header Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 0.6%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng +%define upstream_version %{version} + ### Features %if 0%{?rhel} %define include_raw 1 @@ -43,7 +43,7 @@ Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 +Source11: http://sourceforge.net/projects/floppyutil/files/floppy/%{floppyver}/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides %ifarch alpha @@ -397,6 +397,8 @@ done # omit info/dir file rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir +# remove static libs +rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid}.a # find MO files %find_lang %name @@ -682,7 +684,7 @@ fi %files -n libblkid-devel %defattr(-,root,root) -%{_libdir}/libblkid.a +#%{_libdir}/libblkid.a %{_libdir}/libblkid.so %{_includedir}/blkid %{_mandir}/man3/libblkid.3* @@ -695,7 +697,7 @@ fi %files -n libuuid-devel %defattr(-,root,root) -%{_libdir}/libuuid.a +#%{_libdir}/libuuid.a %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -713,6 +715,13 @@ fi %changelog +* Thu Jan 8 2010 Karel Zak 2.17-1 +- upgrade to the final 2.17 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLog +- fix #545147 - util-linux-ng : Violation of the Packaging Guidelines + (remove uuid and blkid static libs) + * Mon Dec 14 2009 Karel Zak 2.17-0.6 - minor fixes in spec file (fix URL, add Requires, add LGPLv2+) From f2798a3ae7bf993765af6fa1738e49497e9126ea Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 8 Jan 2010 14:01:57 +0000 Subject: [PATCH 65/86] - remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) - remove useless URL to sf.net --- util-linux-ng.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 00cd090..1ec0563 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -43,7 +43,7 @@ Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: http://sourceforge.net/projects/floppyutil/files/floppy/%{floppyver}/floppy-%{floppyver}.tar.bz2 +Source11: floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides %ifarch alpha @@ -124,7 +124,7 @@ This is block device identification library, part of util-linux-ng. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ -Provides: libblkid-static = %{version}-%{release} +#Provides: libblkid-static = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: pkgconfig @@ -154,7 +154,7 @@ See also the "uuid" package, which is a separate implementation. Summary: Universally unique ID library Group: Development/Libraries License: BSD -Provides: libuuid-static = %{version}-%{release} +#Provides: libuuid-static = %{version}-%{release} Requires: libuuid = %{version}-%{release} Requires: pkgconfig @@ -715,6 +715,10 @@ fi %changelog +* Fri Jan 8 2010 Karel Zak 2.17-2 +- remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) +- remove useless URL to sf.net + * Thu Jan 8 2010 Karel Zak 2.17-1 - upgrade to the final 2.17 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseNotes From 895e26434c3afa63a9a31f73c6e4d0457fbef27e Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 12 Feb 2010 19:30:23 +0000 Subject: [PATCH 66/86] - fix #541402 - uuidd initscript lsb compliance --- util-linux-ng.spec | 5 +++- uuidd.init | 69 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 1ec0563..fddde80 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -715,6 +715,9 @@ fi %changelog +* Fri Feb 12 2010 Karel Zak 2.17-3 +- fix #541402 - uuidd initscript lsb compliance + * Fri Jan 8 2010 Karel Zak 2.17-2 - remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) - remove useless URL to sf.net diff --git a/uuidd.init b/uuidd.init index 4494388..e8de8aa 100755 --- a/uuidd.init +++ b/uuidd.init @@ -25,23 +25,30 @@ # source function library . /etc/rc.d/init.d/functions +[ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd -RETVAL=0 -DAEMON=uuidd +DAEMON=/usr/sbin/uuidd +LOCKFILE=/var/lock/subsys/uuidd start() { + [ -x $DAEMON ] || exit 5 + [ -w $LOCKFILE ] || exit 4 echo -n $"Starting uuidd: " - daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid /usr/sbin/uuidd - RETVAL=$? + daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid $DAEMON + retval=$? echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd + [ $retval -eq 0 ] && touch $LOCKFILE + return $retval } stop() { + [ -w $LOCKFILE ] || exit 4 echo -n $"Stopping uuidd: " killproc uuidd + retval=$? echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/uuidd + [ $retval -eq 0 ] && rm -f $LOCKFILE + return $retval } restart() { @@ -49,26 +56,52 @@ restart() { start } +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status $DAEMON +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + case "$1" in start) - start + rh_status_q && exit 0 + $1 ;; stop) - stop + rh_status_q || exit 0 + $1 ;; - restart|force-reload|reload) - restart + restart) + $1 ;; - condrestart) - [ -f /var/lock/subsys/uuidd ] && restart + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload ;; status) - status -p /var/run/uuidid/uuidd.pid uuidd uuidd - RETVAL=$? + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart ;; *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" - exit 1 + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 esac - -exit $RETVAL +exit $? From ebf27ef6b1ef36ea4a4a8ab5082d6fabafdfe783 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 16 Feb 2010 14:29:21 +0000 Subject: [PATCH 67/86] - fix uuidd init script --- util-linux-ng.spec | 5 ++++- uuidd.init | 48 ++++++++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index fddde80..02e5a18 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -715,6 +715,9 @@ fi %changelog +* Tue Feb 16 2010 Karel Zak 2.17-4 +- fix uuidd init script + * Fri Feb 12 2010 Karel Zak 2.17-3 - fix #541402 - uuidd initscript lsb compliance diff --git a/uuidd.init b/uuidd.init index e8de8aa..9fba666 100755 --- a/uuidd.init +++ b/uuidd.init @@ -22,32 +22,43 @@ # when using libuuid. ### END INIT INFO - # source function library . /etc/rc.d/init.d/functions + [ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd -DAEMON=/usr/sbin/uuidd -LOCKFILE=/var/lock/subsys/uuidd +DAEMON=uuidd +exec=/usr/sbin/uuidd +prog=uuidd +user=uuidd +lockfile=/var/lock/subsys/$DAEMON +pidfile=/var/run/uuidd/uuidd.pid -start() { - [ -x $DAEMON ] || exit 5 - [ -w $LOCKFILE ] || exit 4 - echo -n $"Starting uuidd: " - daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid $DAEMON - retval=$? - echo - [ $retval -eq 0 ] && touch $LOCKFILE - return $retval +check() { + # Check that we're a privileged user + [ $(id -u) -eq 0 ] || exit 4 + + # Check if daemon binary is executable + [ -x $exec ] || exit 5 } -stop() { - [ -w $LOCKFILE ] || exit 4 - echo -n $"Stopping uuidd: " - killproc uuidd +start () { + check + echo -n $"Starting $prog: " + daemon --user $user --pidfile $pidfile $DAEMON + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop () { + check + echo -n $"Stopping $prog: " + killproc $DAEMON retval=$? echo - [ $retval -eq 0 ] && rm -f $LOCKFILE + [ $retval -eq 0 ] && rm -f $lockfile return $retval } @@ -65,8 +76,7 @@ force_reload() { } rh_status() { - # run checks to determine if the service is running or use generic status - status $DAEMON + status -p $pidfile $DAEMON } rh_status_q() { From 3469b9156ce3b634895b39c6f7ed2115a165d4d7 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 16 Feb 2010 15:07:47 +0000 Subject: [PATCH 68/86] - upgrade to 2.17.1-rc1 --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 87044f2..291fb7f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17.tar.bz2 +util-linux-ng-2.17.1-rc1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 964e6d2..95d2f4f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -11cc8a0138019e7060dd275d47dbc096 util-linux-ng-2.17.tar.bz2 +2fb632d41d4bb47b02a41ced45e4649f util-linux-ng-2.17.1-rc1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 02e5a18..e07f111 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.17 -Release: 4%{?dist} +Version: 2.17.1 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -34,7 +34,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/util-linux-ng-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -715,6 +715,9 @@ fi %changelog +* Tue Feb 16 2010 Karel Zak 2.17.1-0.1 +- upgrade to 2.17.1-rc1 + * Tue Feb 16 2010 Karel Zak 2.17-4 - fix uuidd init script From b160158d1defb50a557122770bc5ebe74481f69b Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 22 Feb 2010 12:05:05 +0000 Subject: [PATCH 69/86] - upgrade to the final 2.17.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-Releas eNotes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-Change Log --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 291fb7f..0e8589b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17.1-rc1.tar.bz2 +util-linux-ng-2.17.1.tar.bz2 floppy-0.16.tar.bz2 diff --git a/sources b/sources index 95d2f4f..609226f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -2fb632d41d4bb47b02a41ced45e4649f util-linux-ng-2.17.1-rc1.tar.bz2 +1771802e8f4c795f72f06efb1fc61587 util-linux-ng-2.17.1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index e07f111..91b031c 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17.1 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -715,6 +715,11 @@ fi %changelog +* Mon Feb 22 2010 Karel Zak 2.17.1-1 +- upgrade to the final 2.17.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ChangeLog + * Tue Feb 16 2010 Karel Zak 2.17.1-0.1 - upgrade to 2.17.1-rc1 From c5424ee0fef357e9159b5a76fc7a2e5b96054022 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 22 Feb 2010 12:19:28 +0000 Subject: [PATCH 70/86] fix typo in spec file --- util-linux-ng.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 91b031c..decaa6a 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -7,7 +7,7 @@ License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Pu Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc1 +%define upstream_version %{version} ### Features %if 0%{?rhel} From ad3276c60edc555c50209cd7dce23ade5c36f0e0 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 11 Mar 2010 22:10:59 +0000 Subject: [PATCH 71/86] - fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) --- util-linux-ng-2.17-blkid-removable.patch | 302 +++++++++++++++++++++++ util-linux-ng.spec | 10 +- 2 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 util-linux-ng-2.17-blkid-removable.patch diff --git a/util-linux-ng-2.17-blkid-removable.patch b/util-linux-ng-2.17-blkid-removable.patch new file mode 100644 index 0000000..86c0669 --- /dev/null +++ b/util-linux-ng-2.17-blkid-removable.patch @@ -0,0 +1,302 @@ +diff -up util-linux-ng-2.17.1/include/pathnames.h.kzak util-linux-ng-2.17.1/include/pathnames.h +--- util-linux-ng-2.17.1/include/pathnames.h.kzak 2010-02-22 09:41:10.000000000 +0100 ++++ util-linux-ng-2.17.1/include/pathnames.h 2010-02-23 10:25:52.000000000 +0100 +@@ -76,6 +76,8 @@ + #define _PATH_PROC_PARTITIONS "/proc/partitions" + #define _PATH_PROC_DEVICES "/proc/devices" + ++#define _PATH_SYS_BLOCK "/sys/block" ++ + #ifndef _PATH_MOUNTED + # ifdef MOUNTED /* deprecated */ + # define _PATH_MOUNTED MOUNTED +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak 2010-02-22 09:41:11.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in 2010-02-23 10:25:52.000000000 +0100 +@@ -142,6 +142,7 @@ extern int blkid_devno_to_wholedisk(dev_ + /* devname.c */ + extern int blkid_probe_all(blkid_cache cache); + extern int blkid_probe_all_new(blkid_cache cache); ++extern int blkid_probe_all_removable(blkid_cache cache); + extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, + int flags); + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-02-23 10:21:19.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-02-23 10:25:52.000000000 +0100 +@@ -51,6 +51,7 @@ struct blkid_struct_dev + + #define BLKID_BID_FL_VERIFIED 0x0001 /* Device data validated from disk */ + #define BLKID_BID_FL_INVALID 0x0004 /* Device is invalid */ ++#define BLKID_BID_FL_REMOVABLE 0x0008 /* Device added by blkid_probe_all_removable() */ + + /* + * Each tag defines a NAME=value pair for a particular device. The tags +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak 2010-02-22 09:41:11.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym 2010-02-23 10:25:52.000000000 +0100 +@@ -114,3 +114,11 @@ global: + blkid_topology_get_optimal_io_size; + blkid_topology_get_physical_sector_size; + } BLKID_2.15; ++ ++/* ++ * version(s) since util-linux-ng 2.18 ++ */ ++BLKID_2.18 { ++global: ++ blkid_probe_all_removable; ++} BLKID_2.17; +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devname.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/devname.c 2010-02-23 10:25:52.000000000 +0100 +@@ -21,6 +21,7 @@ + #endif + #include + #include ++#include + #if HAVE_SYS_TYPES_H + #include + #endif +@@ -37,7 +38,9 @@ + #include + + #include "blkidP.h" ++ + #include "canonicalize.h" /* $(top_srcdir)/include */ ++#include "pathnames.h" + + /* + * Find a dev struct in the cache by device name, if available. +@@ -156,7 +159,7 @@ static int is_dm_leaf(const char *devnam + * Probe a single block device to add to the device cache. + */ + static void probe_one(blkid_cache cache, const char *ptname, +- dev_t devno, int pri, int only_if_new) ++ dev_t devno, int pri, int only_if_new, int removable) + { + blkid_dev dev = NULL; + struct list_head *p, *pnext; +@@ -236,6 +239,8 @@ set_pri: + dev->bid_pri += 5; + } else if (!strncmp(ptname, "md", 2)) + dev->bid_pri = BLKID_PRI_MD; ++ if (removable) ++ dev->bid_flags |= BLKID_BID_FL_REMOVABLE; + } + return; + } +@@ -327,7 +332,7 @@ static void lvm_probe_all(blkid_cache ca + lvm_device, + (unsigned int) dev)); + probe_one(cache, lvm_device, dev, BLKID_PRI_LVM, +- only_if_new); ++ only_if_new, 0); + free(lvm_device); + } + closedir(lv_list); +@@ -359,7 +364,7 @@ evms_probe_all(blkid_cache cache, int on + device, ma, mi)); + + probe_one(cache, device, makedev(ma, mi), BLKID_PRI_EVMS, +- only_if_new); ++ only_if_new, 0); + num++; + } + fclose(procpt); +@@ -407,7 +412,7 @@ ubi_probe_all(blkid_cache cache, int onl + continue; + DBG(DEBUG_DEVNAME, printf("UBI vol %s/%s: devno 0x%04X\n", + *dirname, name, (int) dev)); +- probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new); ++ probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new, 0); + } + closedir(dir); + } +@@ -484,7 +489,7 @@ static int probe_all(blkid_cache cache, + + if (sz > 1) + probe_one(cache, ptname, devs[which], 0, +- only_if_new); ++ only_if_new, 0); + lens[which] = 0; /* mark as checked */ + } + +@@ -521,20 +526,81 @@ static int probe_all(blkid_cache cache, + printf("whole dev %s, devno 0x%04X\n", + ptnames[last], (unsigned int) devs[last])); + probe_one(cache, ptnames[last], devs[last], 0, +- only_if_new); ++ only_if_new, 0); + lens[last] = 0; + } + } + + /* Handle the last device if it wasn't partitioned */ + if (lens[which]) +- probe_one(cache, ptname, devs[which], 0, only_if_new); ++ probe_one(cache, ptname, devs[which], 0, only_if_new, 0); + + fclose(proc); + blkid_flush_cache(cache); + return 0; + } + ++/* Don't use it by default -- it's pretty slow (because cdroms, floppy, ...) ++ */ ++static int probe_all_removable(blkid_cache cache) ++{ ++ DIR *dir; ++ struct dirent *d; ++ char buf[PATH_MAX]; ++ ++ if (!cache) ++ return -BLKID_ERR_PARAM; ++ ++ dir = opendir(_PATH_SYS_BLOCK); ++ if (!dir) ++ return -BLKID_ERR_PROC; ++ ++ while((d = readdir(dir))) { ++ int fd, rc, ma, mi; ++ ++#ifdef _DIRENT_HAVE_D_TYPE ++ if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) ++ continue; ++#endif ++ if (d->d_name[0] == '.' && ++ ((d->d_name[1] == 0) || ++ ((d->d_name[1] == '.') && (d->d_name[2] == 0)))) ++ continue; ++ ++ snprintf(buf, sizeof(buf), "%s/removable", d->d_name); ++ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); ++ if (fd < 0) ++ continue; ++ ++ rc = read(fd, buf, 1); ++ close(fd); ++ ++ if (rc != 1 || *buf != '1') ++ continue; /* not removable device */ ++ ++ /* get devno */ ++ snprintf(buf, sizeof(buf), "%s/dev", d->d_name); ++ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); ++ if (fd < 0) ++ continue; ++ ++ rc = read(fd, buf, sizeof(buf)); ++ close(fd); ++ ++ if (rc < 3) ++ continue; /* M:N */ ++ buf[rc] = '\0'; ++ if (sscanf(buf, "%d:%d", &ma, &mi) != 2) ++ continue; ++ ++ probe_one(cache, d->d_name, makedev(ma, mi), 0, 0, 1); ++ } ++ ++ closedir(dir); ++ return 0; ++} ++ ++ + /** + * blkid_probe_all: + * @cache: cache handler +@@ -573,6 +639,33 @@ int blkid_probe_all_new(blkid_cache cach + return ret; + } + ++/** ++ * blkid_probe_all_removable: ++ * @cache: cache handler ++ * ++ * The libblkid probing is based on devices from /proc/partitions by default. ++ * This file usually does not contain removable devices (e.g. CDROMs) and this kind ++ * of devices are invisible for libblkid. ++ * ++ * This function adds removable block devices to @cache (probing is based on ++ * information from the /sys directory). Don't forget that removable devices ++ * (floppies, CDROMs, ...) could be pretty slow. It's very bad idea to call ++ * this function by default. ++ * ++ * Note that devices which were detected by this function won't be written to ++ * blkid.tab cache file. ++ * ++ * Returns: 0 on success, or number less than zero in case of error. ++ */ ++int blkid_probe_all_removable(blkid_cache cache) ++{ ++ int ret; ++ ++ DBG(DEBUG_PROBE, printf("Begin blkid_probe_all_removable()\n")); ++ ret = probe_all_removable(cache); ++ DBG(DEBUG_PROBE, printf("End blkid_probe_all_removable()\n")); ++ return ret; ++} + + #ifdef TEST_PROGRAM + int main(int argc, char **argv) +@@ -594,6 +687,9 @@ int main(int argc, char **argv) + if (blkid_probe_all(cache) < 0) + printf("%s: error probing devices\n", argv[0]); + ++ if (blkid_probe_all_removable(cache) < 0) ++ printf("%s: error probing removable devices\n", argv[0]); ++ + blkid_put_cache(cache); + return (0); + } +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devno.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/devno.c 2010-02-23 10:25:52.000000000 +0100 +@@ -95,14 +95,30 @@ int blkid_fstatat(DIR *dir, const char * + return fstatat(dirfd(dir), filename, st, + nofollow ? AT_SYMLINK_NOFOLLOW : 0); + #else +- char device[PATH_MAX]; ++ char path[PATH_MAX]; ++ int len; ++ ++ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); ++ if (len < 0 || len + 1 > sizeof(path)) ++ return -1; ++ ++ return nofollow ? lstat(path, st) : stat(path, st); ++#endif ++} ++ ++int blkid_openat(DIR *dir, const char *dirname, const char *filename, int flags) ++{ ++#ifdef HAVE_FSTATAT ++ return openat(dirfd(dir), filename, flags); ++#else ++ char path[PATH_MAX]; + int len; + +- len = snprintf(device, sizeof(device), "%s/%s", dirname, filename); +- if (len < 0 || len + 1 > sizeof(device)) ++ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); ++ if (len < 0 || len + 1 > sizeof(path)) + return -1; + +- return nofollow ? lstat(device, st) : stat(device, st); ++ return open(path, flags); + #endif + } + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-02-23 10:25:52.000000000 +0100 +@@ -119,7 +119,7 @@ int blkid_flush_cache(blkid_cache cache) + + list_for_each(p, &cache->bic_devs) { + blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); +- if (!dev->bid_type) ++ if (!dev->bid_type || (dev->bid_flags & BLKID_BID_FL_REMOVABLE)) + continue; + if ((ret = save_dev(dev, file)) < 0) + break; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index decaa6a..3b902b7 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,8 +2,8 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.17.1 -Release: 1%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain +Release: 2%{?dist} +License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and MIT and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -103,6 +103,8 @@ Patch5: util-linux-ng-2.16-blkid-cachefile.patch Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch +# 533874 - RFE: libblkid should allow the developer to ask for scanning of slow devices (eg. cdroms) +Patch9: util-linux-ng-2.17-blkid-removable.patch %description The util-linux-ng package contains a large variety of low-level system @@ -196,6 +198,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build unset LINGUAS || : @@ -715,6 +718,9 @@ fi %changelog +* Thu Mar 11 2010 Karel Zak 2.17.1-2 +- fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) + * Mon Feb 22 2010 Karel Zak 2.17.1-1 - upgrade to the final 2.17.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ReleaseNotes From ac8c6510b05b9435d1c62fe2d9669ac444de899f Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Apr 2010 15:02:58 +0000 Subject: [PATCH 72/86] - fix #581252 - remounting tmpfs fails because of hidden rootcontext= - fix #580296 - "rtcwake" does miss the "off" option - fix #575734 - use microsecond resolution for blkid cache entries - upgrade to the bugfix release 2.17.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-Releas eNotes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-Change Log - minor fixed in spec file --- .cvsignore | 2 +- mount.tmpfs | 15 +- sources | 2 +- util-linux-ng-2.17-blkid-usec.patch | 221 +++++++++++++++++++++++++++ util-linux-ng-2.17-rtcwake-off.patch | 71 +++++++++ util-linux-ng.spec | 24 ++- 6 files changed, 326 insertions(+), 9 deletions(-) create mode 100644 util-linux-ng-2.17-blkid-usec.patch create mode 100644 util-linux-ng-2.17-rtcwake-off.patch diff --git a/.cvsignore b/.cvsignore index 0e8589b..d5e246a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -util-linux-ng-2.17.1.tar.bz2 floppy-0.16.tar.bz2 +util-linux-ng-2.17.2.tar.bz2 diff --git a/mount.tmpfs b/mount.tmpfs index e37f735..c0862eb 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -18,11 +18,18 @@ case $1 in ;; esac -if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then - con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') - if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then - exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs +# Remount with context mount options is unsupported +# http://bugzilla.redhat.com/show_bug.cgi?id=563267 +# +if ! echo "$@" | grep -q -E '\-o.*remount'; then + + if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then + con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') + if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then + exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs + fi fi + fi exec /bin/mount "$@" -i -t tmpfs diff --git a/sources b/sources index 609226f..53ca2bc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1771802e8f4c795f72f06efb1fc61587 util-linux-ng-2.17.1.tar.bz2 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 +4635725a3eef1c57090bac8ea5e082e6 util-linux-ng-2.17.2.tar.bz2 diff --git a/util-linux-ng-2.17-blkid-usec.patch b/util-linux-ng-2.17-blkid-usec.patch new file mode 100644 index 0000000..8070d51 --- /dev/null +++ b/util-linux-ng-2.17-blkid-usec.patch @@ -0,0 +1,221 @@ + +This is backport from upstream, this version of the patch requires glibc and +kernel >= 2.5.48. The stat.st_mtim availability is not checked to avoid changes +to ./configure script. It should be fine for Fedora/RHEL. --kzak 18-Mar-2010 + + +commit message from the original patch: + +commit 6c2f2b9d62b196296e827f8bb7336a39e80695a9 +Author: Karel Zak +Date: Wed Mar 17 14:49:14 2010 +0100 + + libblkid: add microsecond resolution for cache entries + + The libblkid library uses stat.st_mtine to detect changes on the + device. The last update time of of the device in the cache is stored + as TIME= tag in the /etc/blkid.tab file. + + Linux since 2.5.48 supports nanosecond resolution and more precise + time is available in the stat.st_mtim timespec struct. + + This patch add microsecond precision to TIME= tag in the cache file, + old format: + + TIME="" + + the new format: + + TIME="." + + This change is backwardly compatible. + + Now, the blkid_verify() function checks stat.st_mtime and + stat.st_mtim.tv_nsec/1000. + + Test: + + # e2label /dev/sdb1 AAAA + + old version: + + # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 + /dev/sdb1: LABEL="AAAA" + /dev/sdb1: LABEL="AAAA" + + new version: + + # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 + /dev/sdb1: LABEL="AAAA" + /dev/sdb1: LABEL="BBBB" + + Signed-off-by: Karel Zak + + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h +--- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-03-18 14:48:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-03-18 15:01:36.000000000 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -28,6 +29,9 @@ + #include "blkid.h" + #include "list.h" + ++/* enable microsecond resolution for the cache */ ++#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 ++ + /* + * This describes the attributes of a specific device. + * We can traverse all of the tags by bid_tags (linking to the tag bit_names). +@@ -44,6 +48,7 @@ struct blkid_struct_dev + int bid_pri; /* Device priority */ + dev_t bid_devno; /* Device major/minor number */ + time_t bid_time; /* Last update time of device */ ++ suseconds_t bid_utime; /* Last update time (microseconds) */ + unsigned int bid_flags; /* Device status bitflags */ + char *bid_label; /* Shortcut to device LABEL */ + char *bid_uuid; /* Shortcut to binary UUID */ +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/dev.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak 2010-02-04 12:53:58.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/dev.c 2010-03-18 14:58:23.000000000 +0100 +@@ -84,7 +84,7 @@ void blkid_debug_dump_dev(blkid_dev dev) + + printf(" dev: name = %s\n", dev->bid_name); + printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); +- printf(" dev: TIME=\"%ld\"\n", (long)dev->bid_time); ++ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); + printf(" dev: PRI=\"%d\"\n", dev->bid_pri); + printf(" dev: flags = 0x%08X\n", dev->bid_flags); + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/read.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak 2010-02-04 12:53:58.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/read.c 2010-03-18 14:58:23.000000000 +0100 +@@ -49,7 +49,8 @@ static void debug_dump_dev(blkid_dev dev + * + * The following tags are required for each entry: + * unique (within this file) ID number of this device +- * (ascii time_t) time this entry was last read from disk ++ * (time_t and suseconds_t) time this entry was last ++ * read from disk + * (detected) type of filesystem/data for this partition + * + * The following tags may be present, depending on the device contents +@@ -318,9 +319,12 @@ static int parse_tag(blkid_cache cache, + dev->bid_devno = STRTOULL(value, 0, 0); + else if (!strcmp(name, "PRI")) + dev->bid_pri = strtol(value, 0, 0); +- else if (!strcmp(name, "TIME")) +- dev->bid_time = STRTOULL(value, 0, 0); +- else ++ else if (!strcmp(name, "TIME")) { ++ char *end = NULL; ++ dev->bid_time = STRTOULL(value, &end, 0); ++ if (end && *end == '.') ++ dev->bid_utime = STRTOULL(end + 1, 0, 0); ++ } else + ret = blkid_set_tag(dev, name, value, strlen(value)); + + DBG(DEBUG_READ, printf(" tag: %s=\"%s\"\n", name, value)); +@@ -455,7 +459,7 @@ static void debug_dump_dev(blkid_dev dev + + printf(" dev: name = %s\n", dev->bid_name); + printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); +- printf(" dev: TIME=\"%lld\"\n", (long long)dev->bid_time); ++ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); + printf(" dev: PRI=\"%d\"\n", dev->bid_pri); + printf(" dev: flags = 0x%08X\n", dev->bid_flags); + +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-03-18 14:58:23.000000000 +0100 +@@ -37,9 +37,11 @@ static int save_dev(blkid_dev dev, FILE + printf("device %s, type %s\n", dev->bid_name, dev->bid_type ? + dev->bid_type : "(null)")); + +- fprintf(file, +- "bid_devno, (long) dev->bid_time); ++ fprintf(file, "bid_devno, ++ (long) dev->bid_time, ++ (long) dev->bid_utime); ++ + if (dev->bid_pri) + fprintf(file, " PRI=\"%d\"", dev->bid_pri); + list_for_each(p, &dev->bid_tags) { +diff -up util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/verify.c +--- util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak 2010-02-04 12:53:58.000000000 +0100 ++++ util-linux-ng-2.17.1/shlibs/blkid/src/verify.c 2010-03-18 14:58:23.000000000 +0100 +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #ifdef HAVE_SYS_STAT_H + #include +@@ -73,19 +74,34 @@ blkid_dev blkid_verify(blkid_cache cache + return NULL; + } + +- if ((now >= dev->bid_time) && +- (st.st_mtime <= dev->bid_time) && +- ((diff < BLKID_PROBE_MIN) || +- (dev->bid_flags & BLKID_BID_FL_VERIFIED && +- diff < BLKID_PROBE_INTERVAL))) ++ if (now >= dev->bid_time && ++#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC ++ (st.st_mtime < dev->bid_time || ++ (st.st_mtime == dev->bid_time && ++ st.st_mtim.tv_nsec / 1000 <= dev->bid_utime)) && ++#else ++ st.st_mtime <= dev->bid_time && ++#endif ++ (diff < BLKID_PROBE_MIN || ++ (dev->bid_flags & BLKID_BID_FL_VERIFIED && ++ diff < BLKID_PROBE_INTERVAL))) + return dev; + ++#ifndef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC + DBG(DEBUG_PROBE, + printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t" + "time since last check %lu)\n", + dev->bid_name, (unsigned long)dev->bid_time, + (unsigned long)st.st_mtime, (unsigned long)diff)); +- ++#else ++ DBG(DEBUG_PROBE, ++ printf("need to revalidate %s (cache time %lu.%lu, stat time %lu.%lu,\n\t" ++ "time since last check %lu)\n", ++ dev->bid_name, ++ (unsigned long)dev->bid_time, (unsigned long)dev->bid_utime, ++ (unsigned long)st.st_mtime, (unsigned long)st.st_mtim.tv_nsec / 1000, ++ (unsigned long)diff)); ++#endif + + if (!cache->probe) { + cache->probe = blkid_new_probe(); +@@ -156,8 +172,16 @@ blkid_dev blkid_verify(blkid_cache cache + + found_type: + if (dev) { ++#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC ++ struct timeval tv; ++ if (!gettimeofday(&tv, NULL)) { ++ dev->bid_time = tv.tv_sec; ++ dev->bid_utime = tv.tv_usec; ++ } else ++#endif ++ dev->bid_time = time(0); ++ + dev->bid_devno = st.st_rdev; +- dev->bid_time = time(0); + dev->bid_flags |= BLKID_BID_FL_VERIFIED; + cache->bic_flags |= BLKID_BIC_FL_CHANGED; + diff --git a/util-linux-ng-2.17-rtcwake-off.patch b/util-linux-ng-2.17-rtcwake-off.patch new file mode 100644 index 0000000..473c7ef --- /dev/null +++ b/util-linux-ng-2.17-rtcwake-off.patch @@ -0,0 +1,71 @@ +From ecd55f9647d139784857df994d0f5b965d164547 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 8 Apr 2010 08:51:00 +0200 +Subject: [PATCH 1/2] rtcwake: does miss the "off" option + +Reported-by: Piergiorgio Sartor +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=580296 +Signed-off-by: Karel Zak +--- + sys-utils/rtcwake.c | 24 +++++++++++++++++++----- + 1 files changed, 19 insertions(+), 5 deletions(-) + +diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c +index 7b2df26..344fed7 100644 +--- a/sys-utils/rtcwake.c ++++ b/sys-utils/rtcwake.c +@@ -468,15 +468,19 @@ int main(int argc, char **argv) + fflush(stdout); + usleep(10 * 1000); + +- if (strcmp(suspend, "no") == 0) ++ if (strcmp(suspend, "no") == 0) { ++ if (verbose) ++ printf(_("suspend mode: no; leaving\n")); ++ close(fd); + exit(EXIT_SUCCESS); +- else if (strcmp(suspend, "on") != 0) { +- sync(); +- suspend_system(suspend); ++ + } else if (strcmp(suspend, "off") == 0) { + char *arg[4]; + int i = 0; + ++ if (verbose) ++ printf(_("suspend mode: off; executing %s\n"), ++ _PATH_SHUTDOWN); + arg[i++] = _PATH_SHUTDOWN; + arg[i++] = "-P"; + arg[i++] = "now"; +@@ -487,9 +491,13 @@ int main(int argc, char **argv) + fprintf(stderr, _("%s: unable to execute %s: %s\n"), + progname, _PATH_SHUTDOWN, strerror(errno)); + rc = EXIT_FAILURE; +- } else { ++ ++ } else if (strcmp(suspend, "on") == 0) { + unsigned long data; + ++ if (verbose) ++ printf(_("suspend mode: on; reading rtc\n")); ++ + do { + t = read(fd, &data, sizeof data); + if (t < 0) { +@@ -499,6 +507,12 @@ int main(int argc, char **argv) + if (verbose) + printf("... %s: %03lx\n", devname, data); + } while (!(data & RTC_AF)); ++ ++ } else { ++ if (verbose) ++ printf(_("suspend mode: %s; suspending system\n"), suspend); ++ sync(); ++ suspend_system(suspend); + } + + if (ioctl(fd, RTC_AIE_OFF, 0) < 0) +-- +1.6.6 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3b902b7..3ec3fbb 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,9 +1,9 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.17.1 -Release: 2%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and MIT and BSD with advertising and Public Domain +Version: 2.17.2 +Release: 1%{?dist} +License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -103,8 +103,15 @@ Patch5: util-linux-ng-2.16-blkid-cachefile.patch Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch + +### Upstream Patches +### # 533874 - RFE: libblkid should allow the developer to ask for scanning of slow devices (eg. cdroms) Patch9: util-linux-ng-2.17-blkid-removable.patch +# 575734 - use microsecond resolution for blkid cache entries +Patch10: util-linux-ng-2.17-blkid-usec.patch +# 580296 - "rtcwake" does miss the "off" option +Patch11: util-linux-ng-2.17-rtcwake-off.patch %description The util-linux-ng package contains a large variety of low-level system @@ -199,6 +206,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -718,6 +727,15 @@ fi %changelog +* Mon Apr 12 2010 Karel Zak 2.17.2-1 +- fix #581252 - remounting tmpfs fails because of hidden rootcontext= +- fix #580296 - "rtcwake" does miss the "off" option +- fix #575734 - use microsecond resolution for blkid cache entries +- upgrade to the bugfix release 2.17.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ChangeLog +- minor fixed in spec file + * Thu Mar 11 2010 Karel Zak 2.17.1-2 - fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) From b5c0655ff7acbc922ef7c1d6f29e86cb01eb2ee2 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 8 Jun 2010 08:06:15 +0000 Subject: [PATCH 73/86] - upgrade to the release 2.18-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseN otes ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.16-blkid-cachefile.patch | 43 +++++++++++++----------- util-linux-ng.spec | 40 ++++++++++------------ 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/.cvsignore b/.cvsignore index d5e246a..ea3ac53 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.17.2.tar.bz2 +util-linux-ng-2.18-rc1.tar.bz2 diff --git a/sources b/sources index 53ca2bc..395b4d2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -4635725a3eef1c57090bac8ea5e082e6 util-linux-ng-2.17.2.tar.bz2 +b52575b0ce729d5e8ab50fa56877d28f util-linux-ng-2.18-rc1.tar.bz2 diff --git a/util-linux-ng-2.16-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch index 5cff6d7..7edd4e9 100644 --- a/util-linux-ng-2.16-blkid-cachefile.patch +++ b/util-linux-ng-2.16-blkid-cachefile.patch @@ -1,7 +1,13 @@ -diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 ---- util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.8 2009-10-19 14:31:10.000000000 +0200 -@@ -67,7 +67,7 @@ more devices. +--- + misc-utils/blkid.8 | 4 ++-- + misc-utils/blkid.c | 2 +- + shlibs/blkid/libblkid.3 | 6 +++--- + shlibs/blkid/src/blkidP.h | 2 +- + 4 files changed, 7 insertions(+), 7 deletions(-) + +--- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.8 ++++ util-linux-ng-2.18-rc1/misc-utils/blkid.8 +@@ -81,7 +81,7 @@ same meaning as "KiB") or decimal (10^N) Read from .I cachefile instead of reading from the default cache file @@ -10,7 +16,7 @@ diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.1 If you want to start with a clean cache (i.e. don't report devices previously scanned but not necessarily available at this time), specify .IR /dev/null . -@@ -190,7 +190,7 @@ Display version number and exit. +@@ -228,7 +228,7 @@ Display version number and exit. Write the device cache to .I writecachefile instead of writing it to the default cache file @@ -19,21 +25,19 @@ diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.8.kzak util-linux-ng-2.1 If you don't want to save the cache to the default file, specify .IR /dev/null. If not specified it will be the same file as that given by the -diff -up util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak util-linux-ng-2.17-git5e51568/misc-utils/blkid.c ---- util-linux-ng-2.17-git5e51568/misc-utils/blkid.c.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/misc-utils/blkid.c 2009-10-19 14:31:10.000000000 +0200 -@@ -62,7 +62,7 @@ static void usage(int error) - " [-t ] [-w ] [dev ...]\n\n" - " %1$s -p [-O ] [-S ] [-o format] [dev ...]\n\n" +--- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.c ++++ util-linux-ng-2.18-rc1/misc-utils/blkid.c +@@ -65,7 +65,7 @@ static void usage(int error) + " [-o format] [dev ...]\n\n" + " %1$s -i [-s ] [-o format] [dev ...]\n\n" "Options:\n" - " -c cache file (default: /etc/blkid.tab, /dev/null = none)\n" + " -c cache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n" " -h print this usage message and exit\n" " -g garbage collect the blkid cache\n" " -o output format; can be one of:\n" -diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 ---- util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3 2009-10-19 14:31:10.000000000 +0200 +--- util-linux-ng-2.18-rc1.orig/shlibs/blkid/libblkid.3 ++++ util-linux-ng-2.18-rc1/shlibs/blkid/libblkid.3 @@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a specific block device names into configuration files. .P @@ -61,12 +65,11 @@ diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/libblkid.3.kzak util-linux-n caches data extracted from each recognized block device .TP .I /etc/blkid.conf -diff -up util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h.kzak 2009-10-16 22:50:03.000000000 +0200 -+++ util-linux-ng-2.17-git5e51568/shlibs/blkid/src/blkidP.h 2009-10-19 14:32:03.000000000 +0200 -@@ -267,7 +267,7 @@ extern char *blkid_strconcat(const char - extern int blkid_fstatat(DIR *dir, const char *dirname, const char *filename, - struct stat *st, int nofollow); +--- util-linux-ng-2.18-rc1.orig/shlibs/blkid/src/blkidP.h ++++ util-linux-ng-2.18-rc1/shlibs/blkid/src/blkidP.h +@@ -279,7 +279,7 @@ extern int blkid_fstatat(DIR *dir, const + extern int blkid_openat(DIR *dir, const char *dirname, const char *filename, + int flags); -#define BLKID_CACHE_FILE "/etc/blkid.tab" +#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 3ec3fbb..b4c266b 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.17.2 -Release: 1%{?dist} +Version: 2.18 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -32,9 +32,10 @@ BuildRequires: pam-devel BuildRequires: texinfo BuildRequires: zlib-devel BuildRequires: popt-devel +BuildRequires: libutempter-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/util-linux-ng-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -43,7 +44,7 @@ Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: floppy-%{floppyver}.tar.bz2 +Source11: http://dl.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides %ifarch alpha @@ -104,15 +105,6 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch -### Upstream Patches -### -# 533874 - RFE: libblkid should allow the developer to ask for scanning of slow devices (eg. cdroms) -Patch9: util-linux-ng-2.17-blkid-removable.patch -# 575734 - use microsecond resolution for blkid cache entries -Patch10: util-linux-ng-2.17-blkid-usec.patch -# 580296 - "rtcwake" does miss the "off" option -Patch11: util-linux-ng-2.17-rtcwake-off.patch - %description The util-linux-ng package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -124,6 +116,7 @@ program. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ +Requires: libuuid = %{version}-%{release} %description -n libblkid This is block device identification library, part of util-linux-ng. @@ -133,7 +126,6 @@ This is block device identification library, part of util-linux-ng. Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ -#Provides: libblkid-static = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: pkgconfig @@ -163,7 +155,6 @@ See also the "uuid" package, which is a separate implementation. Summary: Universally unique ID library Group: Development/Libraries License: BSD -#Provides: libuuid-static = %{version}-%{release} Requires: libuuid = %{version}-%{release} Requires: pkgconfig @@ -205,9 +196,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 %build unset LINGUAS || : @@ -230,6 +218,7 @@ export SUID_LDFLAGS="-pie" %endif --with-selinux \ --with-audit \ + --with-utempter \ --disable-makeinstall-chown # build util-linux-ng @@ -335,10 +324,10 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* # unsupported on s390 %ifarch s390 s390x for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ - %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ - /sbin/{hwclock,clock} \ - /usr/sbin/hwclock \ - %{_mandir}/man8/{hwclock,clock}.8*; do + %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ + /sbin/{hwclock,clock} \ + /usr/sbin/hwclock \ + %{_mandir}/man8/{hwclock,clock}.8*; do rm -f $RPM_BUILD_ROOT$I done @@ -727,6 +716,11 @@ fi %changelog +* Tue Jun 8 2010 Karel Zak 2.18-0.1 +- upgrade to the release 2.18-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-ChangeLog + * Mon Apr 12 2010 Karel Zak 2.17.2-1 - fix #581252 - remounting tmpfs fails because of hidden rootcontext= - fix #580296 - "rtcwake" does miss the "off" option From 719e877065ddf54762feb46197abb64a6d0d0ea5 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 8 Jun 2010 08:08:50 +0000 Subject: [PATCH 74/86] remove unused patches --- util-linux-ng-2.17-blkid-removable.patch | 302 ----------------------- util-linux-ng-2.17-blkid-usec.patch | 221 ----------------- util-linux-ng-2.17-rtcwake-off.patch | 71 ------ 3 files changed, 594 deletions(-) delete mode 100644 util-linux-ng-2.17-blkid-removable.patch delete mode 100644 util-linux-ng-2.17-blkid-usec.patch delete mode 100644 util-linux-ng-2.17-rtcwake-off.patch diff --git a/util-linux-ng-2.17-blkid-removable.patch b/util-linux-ng-2.17-blkid-removable.patch deleted file mode 100644 index 86c0669..0000000 --- a/util-linux-ng-2.17-blkid-removable.patch +++ /dev/null @@ -1,302 +0,0 @@ -diff -up util-linux-ng-2.17.1/include/pathnames.h.kzak util-linux-ng-2.17.1/include/pathnames.h ---- util-linux-ng-2.17.1/include/pathnames.h.kzak 2010-02-22 09:41:10.000000000 +0100 -+++ util-linux-ng-2.17.1/include/pathnames.h 2010-02-23 10:25:52.000000000 +0100 -@@ -76,6 +76,8 @@ - #define _PATH_PROC_PARTITIONS "/proc/partitions" - #define _PATH_PROC_DEVICES "/proc/devices" - -+#define _PATH_SYS_BLOCK "/sys/block" -+ - #ifndef _PATH_MOUNTED - # ifdef MOUNTED /* deprecated */ - # define _PATH_MOUNTED MOUNTED -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in.kzak 2010-02-22 09:41:11.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.h.in 2010-02-23 10:25:52.000000000 +0100 -@@ -142,6 +142,7 @@ extern int blkid_devno_to_wholedisk(dev_ - /* devname.c */ - extern int blkid_probe_all(blkid_cache cache); - extern int blkid_probe_all_new(blkid_cache cache); -+extern int blkid_probe_all_removable(blkid_cache cache); - extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, - int flags); - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-02-23 10:21:19.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-02-23 10:25:52.000000000 +0100 -@@ -51,6 +51,7 @@ struct blkid_struct_dev - - #define BLKID_BID_FL_VERIFIED 0x0001 /* Device data validated from disk */ - #define BLKID_BID_FL_INVALID 0x0004 /* Device is invalid */ -+#define BLKID_BID_FL_REMOVABLE 0x0008 /* Device added by blkid_probe_all_removable() */ - - /* - * Each tag defines a NAME=value pair for a particular device. The tags -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym.kzak 2010-02-22 09:41:11.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkid.sym 2010-02-23 10:25:52.000000000 +0100 -@@ -114,3 +114,11 @@ global: - blkid_topology_get_optimal_io_size; - blkid_topology_get_physical_sector_size; - } BLKID_2.15; -+ -+/* -+ * version(s) since util-linux-ng 2.18 -+ */ -+BLKID_2.18 { -+global: -+ blkid_probe_all_removable; -+} BLKID_2.17; -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devname.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/devname.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/devname.c 2010-02-23 10:25:52.000000000 +0100 -@@ -21,6 +21,7 @@ - #endif - #include - #include -+#include - #if HAVE_SYS_TYPES_H - #include - #endif -@@ -37,7 +38,9 @@ - #include - - #include "blkidP.h" -+ - #include "canonicalize.h" /* $(top_srcdir)/include */ -+#include "pathnames.h" - - /* - * Find a dev struct in the cache by device name, if available. -@@ -156,7 +159,7 @@ static int is_dm_leaf(const char *devnam - * Probe a single block device to add to the device cache. - */ - static void probe_one(blkid_cache cache, const char *ptname, -- dev_t devno, int pri, int only_if_new) -+ dev_t devno, int pri, int only_if_new, int removable) - { - blkid_dev dev = NULL; - struct list_head *p, *pnext; -@@ -236,6 +239,8 @@ set_pri: - dev->bid_pri += 5; - } else if (!strncmp(ptname, "md", 2)) - dev->bid_pri = BLKID_PRI_MD; -+ if (removable) -+ dev->bid_flags |= BLKID_BID_FL_REMOVABLE; - } - return; - } -@@ -327,7 +332,7 @@ static void lvm_probe_all(blkid_cache ca - lvm_device, - (unsigned int) dev)); - probe_one(cache, lvm_device, dev, BLKID_PRI_LVM, -- only_if_new); -+ only_if_new, 0); - free(lvm_device); - } - closedir(lv_list); -@@ -359,7 +364,7 @@ evms_probe_all(blkid_cache cache, int on - device, ma, mi)); - - probe_one(cache, device, makedev(ma, mi), BLKID_PRI_EVMS, -- only_if_new); -+ only_if_new, 0); - num++; - } - fclose(procpt); -@@ -407,7 +412,7 @@ ubi_probe_all(blkid_cache cache, int onl - continue; - DBG(DEBUG_DEVNAME, printf("UBI vol %s/%s: devno 0x%04X\n", - *dirname, name, (int) dev)); -- probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new); -+ probe_one(cache, name, dev, BLKID_PRI_UBI, only_if_new, 0); - } - closedir(dir); - } -@@ -484,7 +489,7 @@ static int probe_all(blkid_cache cache, - - if (sz > 1) - probe_one(cache, ptname, devs[which], 0, -- only_if_new); -+ only_if_new, 0); - lens[which] = 0; /* mark as checked */ - } - -@@ -521,20 +526,81 @@ static int probe_all(blkid_cache cache, - printf("whole dev %s, devno 0x%04X\n", - ptnames[last], (unsigned int) devs[last])); - probe_one(cache, ptnames[last], devs[last], 0, -- only_if_new); -+ only_if_new, 0); - lens[last] = 0; - } - } - - /* Handle the last device if it wasn't partitioned */ - if (lens[which]) -- probe_one(cache, ptname, devs[which], 0, only_if_new); -+ probe_one(cache, ptname, devs[which], 0, only_if_new, 0); - - fclose(proc); - blkid_flush_cache(cache); - return 0; - } - -+/* Don't use it by default -- it's pretty slow (because cdroms, floppy, ...) -+ */ -+static int probe_all_removable(blkid_cache cache) -+{ -+ DIR *dir; -+ struct dirent *d; -+ char buf[PATH_MAX]; -+ -+ if (!cache) -+ return -BLKID_ERR_PARAM; -+ -+ dir = opendir(_PATH_SYS_BLOCK); -+ if (!dir) -+ return -BLKID_ERR_PROC; -+ -+ while((d = readdir(dir))) { -+ int fd, rc, ma, mi; -+ -+#ifdef _DIRENT_HAVE_D_TYPE -+ if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) -+ continue; -+#endif -+ if (d->d_name[0] == '.' && -+ ((d->d_name[1] == 0) || -+ ((d->d_name[1] == '.') && (d->d_name[2] == 0)))) -+ continue; -+ -+ snprintf(buf, sizeof(buf), "%s/removable", d->d_name); -+ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); -+ if (fd < 0) -+ continue; -+ -+ rc = read(fd, buf, 1); -+ close(fd); -+ -+ if (rc != 1 || *buf != '1') -+ continue; /* not removable device */ -+ -+ /* get devno */ -+ snprintf(buf, sizeof(buf), "%s/dev", d->d_name); -+ fd = blkid_openat(dir, _PATH_SYS_BLOCK, buf, O_RDONLY); -+ if (fd < 0) -+ continue; -+ -+ rc = read(fd, buf, sizeof(buf)); -+ close(fd); -+ -+ if (rc < 3) -+ continue; /* M:N */ -+ buf[rc] = '\0'; -+ if (sscanf(buf, "%d:%d", &ma, &mi) != 2) -+ continue; -+ -+ probe_one(cache, d->d_name, makedev(ma, mi), 0, 0, 1); -+ } -+ -+ closedir(dir); -+ return 0; -+} -+ -+ - /** - * blkid_probe_all: - * @cache: cache handler -@@ -573,6 +639,33 @@ int blkid_probe_all_new(blkid_cache cach - return ret; - } - -+/** -+ * blkid_probe_all_removable: -+ * @cache: cache handler -+ * -+ * The libblkid probing is based on devices from /proc/partitions by default. -+ * This file usually does not contain removable devices (e.g. CDROMs) and this kind -+ * of devices are invisible for libblkid. -+ * -+ * This function adds removable block devices to @cache (probing is based on -+ * information from the /sys directory). Don't forget that removable devices -+ * (floppies, CDROMs, ...) could be pretty slow. It's very bad idea to call -+ * this function by default. -+ * -+ * Note that devices which were detected by this function won't be written to -+ * blkid.tab cache file. -+ * -+ * Returns: 0 on success, or number less than zero in case of error. -+ */ -+int blkid_probe_all_removable(blkid_cache cache) -+{ -+ int ret; -+ -+ DBG(DEBUG_PROBE, printf("Begin blkid_probe_all_removable()\n")); -+ ret = probe_all_removable(cache); -+ DBG(DEBUG_PROBE, printf("End blkid_probe_all_removable()\n")); -+ return ret; -+} - - #ifdef TEST_PROGRAM - int main(int argc, char **argv) -@@ -594,6 +687,9 @@ int main(int argc, char **argv) - if (blkid_probe_all(cache) < 0) - printf("%s: error probing devices\n", argv[0]); - -+ if (blkid_probe_all_removable(cache) < 0) -+ printf("%s: error probing removable devices\n", argv[0]); -+ - blkid_put_cache(cache); - return (0); - } -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/devno.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/devno.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/devno.c 2010-02-23 10:25:52.000000000 +0100 -@@ -95,14 +95,30 @@ int blkid_fstatat(DIR *dir, const char * - return fstatat(dirfd(dir), filename, st, - nofollow ? AT_SYMLINK_NOFOLLOW : 0); - #else -- char device[PATH_MAX]; -+ char path[PATH_MAX]; -+ int len; -+ -+ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); -+ if (len < 0 || len + 1 > sizeof(path)) -+ return -1; -+ -+ return nofollow ? lstat(path, st) : stat(path, st); -+#endif -+} -+ -+int blkid_openat(DIR *dir, const char *dirname, const char *filename, int flags) -+{ -+#ifdef HAVE_FSTATAT -+ return openat(dirfd(dir), filename, flags); -+#else -+ char path[PATH_MAX]; - int len; - -- len = snprintf(device, sizeof(device), "%s/%s", dirname, filename); -- if (len < 0 || len + 1 > sizeof(device)) -+ len = snprintf(path, sizeof(path), "%s/%s", dirname, filename); -+ if (len < 0 || len + 1 > sizeof(path)) - return -1; - -- return nofollow ? lstat(device, st) : stat(device, st); -+ return open(path, flags); - #endif - } - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-02-23 10:25:52.000000000 +0100 -@@ -119,7 +119,7 @@ int blkid_flush_cache(blkid_cache cache) - - list_for_each(p, &cache->bic_devs) { - blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); -- if (!dev->bid_type) -+ if (!dev->bid_type || (dev->bid_flags & BLKID_BID_FL_REMOVABLE)) - continue; - if ((ret = save_dev(dev, file)) < 0) - break; diff --git a/util-linux-ng-2.17-blkid-usec.patch b/util-linux-ng-2.17-blkid-usec.patch deleted file mode 100644 index 8070d51..0000000 --- a/util-linux-ng-2.17-blkid-usec.patch +++ /dev/null @@ -1,221 +0,0 @@ - -This is backport from upstream, this version of the patch requires glibc and -kernel >= 2.5.48. The stat.st_mtim availability is not checked to avoid changes -to ./configure script. It should be fine for Fedora/RHEL. --kzak 18-Mar-2010 - - -commit message from the original patch: - -commit 6c2f2b9d62b196296e827f8bb7336a39e80695a9 -Author: Karel Zak -Date: Wed Mar 17 14:49:14 2010 +0100 - - libblkid: add microsecond resolution for cache entries - - The libblkid library uses stat.st_mtine to detect changes on the - device. The last update time of of the device in the cache is stored - as TIME= tag in the /etc/blkid.tab file. - - Linux since 2.5.48 supports nanosecond resolution and more precise - time is available in the stat.st_mtim timespec struct. - - This patch add microsecond precision to TIME= tag in the cache file, - old format: - - TIME="" - - the new format: - - TIME="." - - This change is backwardly compatible. - - Now, the blkid_verify() function checks stat.st_mtime and - stat.st_mtim.tv_nsec/1000. - - Test: - - # e2label /dev/sdb1 AAAA - - old version: - - # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 - /dev/sdb1: LABEL="AAAA" - /dev/sdb1: LABEL="AAAA" - - new version: - - # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1 - /dev/sdb1: LABEL="AAAA" - /dev/sdb1: LABEL="BBBB" - - Signed-off-by: Karel Zak - - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h ---- util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h.kzak 2010-03-18 14:48:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/blkidP.h 2010-03-18 15:01:36.000000000 +0100 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -28,6 +29,9 @@ - #include "blkid.h" - #include "list.h" - -+/* enable microsecond resolution for the cache */ -+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 -+ - /* - * This describes the attributes of a specific device. - * We can traverse all of the tags by bid_tags (linking to the tag bit_names). -@@ -44,6 +48,7 @@ struct blkid_struct_dev - int bid_pri; /* Device priority */ - dev_t bid_devno; /* Device major/minor number */ - time_t bid_time; /* Last update time of device */ -+ suseconds_t bid_utime; /* Last update time (microseconds) */ - unsigned int bid_flags; /* Device status bitflags */ - char *bid_label; /* Shortcut to device LABEL */ - char *bid_uuid; /* Shortcut to binary UUID */ -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/dev.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/dev.c.kzak 2010-02-04 12:53:58.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/dev.c 2010-03-18 14:58:23.000000000 +0100 -@@ -84,7 +84,7 @@ void blkid_debug_dump_dev(blkid_dev dev) - - printf(" dev: name = %s\n", dev->bid_name); - printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); -- printf(" dev: TIME=\"%ld\"\n", (long)dev->bid_time); -+ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); - printf(" dev: PRI=\"%d\"\n", dev->bid_pri); - printf(" dev: flags = 0x%08X\n", dev->bid_flags); - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/read.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/read.c.kzak 2010-02-04 12:53:58.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/read.c 2010-03-18 14:58:23.000000000 +0100 -@@ -49,7 +49,8 @@ static void debug_dump_dev(blkid_dev dev - * - * The following tags are required for each entry: - * unique (within this file) ID number of this device -- * (ascii time_t) time this entry was last read from disk -+ * (time_t and suseconds_t) time this entry was last -+ * read from disk - * (detected) type of filesystem/data for this partition - * - * The following tags may be present, depending on the device contents -@@ -318,9 +319,12 @@ static int parse_tag(blkid_cache cache, - dev->bid_devno = STRTOULL(value, 0, 0); - else if (!strcmp(name, "PRI")) - dev->bid_pri = strtol(value, 0, 0); -- else if (!strcmp(name, "TIME")) -- dev->bid_time = STRTOULL(value, 0, 0); -- else -+ else if (!strcmp(name, "TIME")) { -+ char *end = NULL; -+ dev->bid_time = STRTOULL(value, &end, 0); -+ if (end && *end == '.') -+ dev->bid_utime = STRTOULL(end + 1, 0, 0); -+ } else - ret = blkid_set_tag(dev, name, value, strlen(value)); - - DBG(DEBUG_READ, printf(" tag: %s=\"%s\"\n", name, value)); -@@ -455,7 +459,7 @@ static void debug_dump_dev(blkid_dev dev - - printf(" dev: name = %s\n", dev->bid_name); - printf(" dev: DEVNO=\"0x%0llx\"\n", (long long)dev->bid_devno); -- printf(" dev: TIME=\"%lld\"\n", (long long)dev->bid_time); -+ printf(" dev: TIME=\"%ld.%ld\"\n", (long)dev->bid_time, (long)dev->bid_utime); - printf(" dev: PRI=\"%d\"\n", dev->bid_pri); - printf(" dev: flags = 0x%08X\n", dev->bid_flags); - -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/save.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/save.c.kzak 2010-02-22 09:41:12.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/save.c 2010-03-18 14:58:23.000000000 +0100 -@@ -37,9 +37,11 @@ static int save_dev(blkid_dev dev, FILE - printf("device %s, type %s\n", dev->bid_name, dev->bid_type ? - dev->bid_type : "(null)")); - -- fprintf(file, -- "bid_devno, (long) dev->bid_time); -+ fprintf(file, "bid_devno, -+ (long) dev->bid_time, -+ (long) dev->bid_utime); -+ - if (dev->bid_pri) - fprintf(file, " PRI=\"%d\"", dev->bid_pri); - list_for_each(p, &dev->bid_tags) { -diff -up util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak util-linux-ng-2.17.1/shlibs/blkid/src/verify.c ---- util-linux-ng-2.17.1/shlibs/blkid/src/verify.c.kzak 2010-02-04 12:53:58.000000000 +0100 -+++ util-linux-ng-2.17.1/shlibs/blkid/src/verify.c 2010-03-18 14:58:23.000000000 +0100 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #ifdef HAVE_SYS_STAT_H - #include -@@ -73,19 +74,34 @@ blkid_dev blkid_verify(blkid_cache cache - return NULL; - } - -- if ((now >= dev->bid_time) && -- (st.st_mtime <= dev->bid_time) && -- ((diff < BLKID_PROBE_MIN) || -- (dev->bid_flags & BLKID_BID_FL_VERIFIED && -- diff < BLKID_PROBE_INTERVAL))) -+ if (now >= dev->bid_time && -+#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -+ (st.st_mtime < dev->bid_time || -+ (st.st_mtime == dev->bid_time && -+ st.st_mtim.tv_nsec / 1000 <= dev->bid_utime)) && -+#else -+ st.st_mtime <= dev->bid_time && -+#endif -+ (diff < BLKID_PROBE_MIN || -+ (dev->bid_flags & BLKID_BID_FL_VERIFIED && -+ diff < BLKID_PROBE_INTERVAL))) - return dev; - -+#ifndef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - DBG(DEBUG_PROBE, - printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t" - "time since last check %lu)\n", - dev->bid_name, (unsigned long)dev->bid_time, - (unsigned long)st.st_mtime, (unsigned long)diff)); -- -+#else -+ DBG(DEBUG_PROBE, -+ printf("need to revalidate %s (cache time %lu.%lu, stat time %lu.%lu,\n\t" -+ "time since last check %lu)\n", -+ dev->bid_name, -+ (unsigned long)dev->bid_time, (unsigned long)dev->bid_utime, -+ (unsigned long)st.st_mtime, (unsigned long)st.st_mtim.tv_nsec / 1000, -+ (unsigned long)diff)); -+#endif - - if (!cache->probe) { - cache->probe = blkid_new_probe(); -@@ -156,8 +172,16 @@ blkid_dev blkid_verify(blkid_cache cache - - found_type: - if (dev) { -+#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -+ struct timeval tv; -+ if (!gettimeofday(&tv, NULL)) { -+ dev->bid_time = tv.tv_sec; -+ dev->bid_utime = tv.tv_usec; -+ } else -+#endif -+ dev->bid_time = time(0); -+ - dev->bid_devno = st.st_rdev; -- dev->bid_time = time(0); - dev->bid_flags |= BLKID_BID_FL_VERIFIED; - cache->bic_flags |= BLKID_BIC_FL_CHANGED; - diff --git a/util-linux-ng-2.17-rtcwake-off.patch b/util-linux-ng-2.17-rtcwake-off.patch deleted file mode 100644 index 473c7ef..0000000 --- a/util-linux-ng-2.17-rtcwake-off.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ecd55f9647d139784857df994d0f5b965d164547 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 8 Apr 2010 08:51:00 +0200 -Subject: [PATCH 1/2] rtcwake: does miss the "off" option - -Reported-by: Piergiorgio Sartor -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=580296 -Signed-off-by: Karel Zak ---- - sys-utils/rtcwake.c | 24 +++++++++++++++++++----- - 1 files changed, 19 insertions(+), 5 deletions(-) - -diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c -index 7b2df26..344fed7 100644 ---- a/sys-utils/rtcwake.c -+++ b/sys-utils/rtcwake.c -@@ -468,15 +468,19 @@ int main(int argc, char **argv) - fflush(stdout); - usleep(10 * 1000); - -- if (strcmp(suspend, "no") == 0) -+ if (strcmp(suspend, "no") == 0) { -+ if (verbose) -+ printf(_("suspend mode: no; leaving\n")); -+ close(fd); - exit(EXIT_SUCCESS); -- else if (strcmp(suspend, "on") != 0) { -- sync(); -- suspend_system(suspend); -+ - } else if (strcmp(suspend, "off") == 0) { - char *arg[4]; - int i = 0; - -+ if (verbose) -+ printf(_("suspend mode: off; executing %s\n"), -+ _PATH_SHUTDOWN); - arg[i++] = _PATH_SHUTDOWN; - arg[i++] = "-P"; - arg[i++] = "now"; -@@ -487,9 +491,13 @@ int main(int argc, char **argv) - fprintf(stderr, _("%s: unable to execute %s: %s\n"), - progname, _PATH_SHUTDOWN, strerror(errno)); - rc = EXIT_FAILURE; -- } else { -+ -+ } else if (strcmp(suspend, "on") == 0) { - unsigned long data; - -+ if (verbose) -+ printf(_("suspend mode: on; reading rtc\n")); -+ - do { - t = read(fd, &data, sizeof data); - if (t < 0) { -@@ -499,6 +507,12 @@ int main(int argc, char **argv) - if (verbose) - printf("... %s: %03lx\n", devname, data); - } while (!(data & RTC_AF)); -+ -+ } else { -+ if (verbose) -+ printf(_("suspend mode: %s; suspending system\n"), suspend); -+ sync(); -+ suspend_system(suspend); - } - - if (ioctl(fd, RTC_AIE_OFF, 0) < 0) --- -1.6.6 - From aaefb1b1e98f24da1aaf35844c19c2a1a4856be6 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 8 Jun 2010 10:27:29 +0000 Subject: [PATCH 75/86] fix spec file, new tarball --- sources | 2 +- util-linux-ng.spec | 50 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 395b4d2..442ae15 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -b52575b0ce729d5e8ab50fa56877d28f util-linux-ng-2.18-rc1.tar.bz2 +0cc60971007daec02e0e841702dc056b util-linux-ng-2.18-rc1.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b4c266b..cec6cb3 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -78,6 +78,8 @@ Requires: pam >= 1.0.90, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} +Requires: libmount = %{version}-%{release} + %if %{include_raw} Requires: udev %endif @@ -112,6 +114,28 @@ others, Util-linux contains the fdisk configuration tool and the login program. +%package -n libmount +Summary: Device mounting library +Group: Development/Libraries +License: LGPLv2+ +Requires: libblkid = %{version}-%{release} + +%description -n libmount +This is the device mounting library, part of util-linux-ng. + + +%package -n libmount-devel +Summary: Device mounting library +Group: Development/Libraries +License: LGPLv2+ +Requires: libmount = %{version}-%{release} +Requires: pkgconfig + +%description -n libmount-devel +This is the device mounting development library and headers, +part of util-linux-ng. + + %package -n libblkid Summary: Block device ID library Group: Development/Libraries @@ -308,9 +332,6 @@ ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 -# remove libtool junk (TODO) -#rm -f ${RPM_BUILD_ROOT}/%{_lib}/libblkid.la - # install tmpfs mount helper pushd ${RPM_BUILD_ROOT}/sbin install -m 755 %{SOURCE5} ./mount.tmpfs @@ -399,7 +420,7 @@ done rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir # remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid}.a +rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a # find MO files %find_lang %name @@ -455,6 +476,9 @@ exit 0 %post -n libuuid -p /sbin/ldconfig %postun -n libuuid -p /sbin/ldconfig +%post -n libmount -p /sbin/ldconfig +%postun -n libmount -p /sbin/ldconfig + %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -492,6 +516,7 @@ fi %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog /bin/dmesg +/bin/findmnt /bin/kill /bin/more /bin/taskset @@ -505,6 +530,7 @@ fi /sbin/findfs /sbin/fsck /sbin/fsck.cramfs +/sbin/fsfreeze /sbin/losetup /sbin/mkfs /sbin/mkfs.cramfs @@ -512,6 +538,7 @@ fi /sbin/nologin /sbin/partx /sbin/pivot_root +/sbin/swaplabel /sbin/swapoff /sbin/swapon /sbin/switch_root @@ -611,7 +638,9 @@ fi %{_mandir}/man8/delpart.8* %{_mandir}/man8/fdisk.8* %{_mandir}/man8/findfs.8* +%{_mandir}/man8/findmnt.8* %{_mandir}/man8/fsck.8* +%{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/isosize.8* %{_mandir}/man8/ldattach.8* %{_mandir}/man8/losetup.8* @@ -623,6 +652,7 @@ fi %{_mandir}/man8/pivot_root.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* +%{_mandir}/man8/swaplabel.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* @@ -677,12 +707,22 @@ fi %dir %attr(2775, uuidd, uuidd) /var/run/uuidd +%files -n libmount +%defattr(-,root,root) +/%{_lib}/libmount.so.* + +%files -n libmount-devel +%defattr(-,root,root) +%{_libdir}/libmount.so +%{_includedir}/mount +%{_libdir}/pkgconfig/mount.pc + + %files -n libblkid %defattr(-,root,root) %dir /etc/blkid /%{_lib}/libblkid.so.* - %files -n libblkid-devel %defattr(-,root,root) #%{_libdir}/libblkid.a From c8f122a16e8ebd94fd8c6019f9d0df3e4941a810 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 18 Jun 2010 11:24:07 +0000 Subject: [PATCH 76/86] - upgrade to 2.18-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index ea3ac53..2e451ae 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.18-rc1.tar.bz2 +util-linux-ng-2.18-rc2.tar.bz2 diff --git a/sources b/sources index 442ae15..71c40af 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -0cc60971007daec02e0e841702dc056b util-linux-ng-2.18-rc1.tar.bz2 +2abe61d15b3c2bc0d882df32ba8ba1f7 util-linux-ng-2.18-rc2.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index cec6cb3..f9910f5 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Features %if 0%{?rhel} @@ -756,6 +756,10 @@ fi %changelog +* Fri Jun 18 2010 Karel Zak 2.18-0.2 +- upgrade to 2.18-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-ChangeLog + * Tue Jun 8 2010 Karel Zak 2.18-0.1 - upgrade to the release 2.18-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes From a668ec573265aa8996ab0764d0ab95aeebafbae4 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 30 Jun 2010 13:46:30 +0000 Subject: [PATCH 77/86] - upgrade to the final 2.18 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseN otes Fri Jun 18 2010 Karel Zak 2.18-0.2 - upgrade to 2.18-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-Chan geLog --- .cvsignore | 2 +- sources | 2 +- util-linux-ng.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2e451ae..e3f316a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.18-rc2.tar.bz2 +util-linux-ng-2.18.tar.bz2 diff --git a/sources b/sources index 71c40af..0384138 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -2abe61d15b3c2bc0d882df32ba8ba1f7 util-linux-ng-2.18-rc2.tar.bz2 +2f5f71e6af969d041d73ab778c141a77 util-linux-ng-2.18.tar.bz2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f9910f5..186d248 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -756,6 +756,10 @@ fi %changelog +* Wed Jun 30 2010 Karel Zak 2.18-1 +- upgrade to the final 2.18 + ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes + * Fri Jun 18 2010 Karel Zak 2.18-0.2 - upgrade to 2.18-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-ChangeLog From bda4dc30594c4cd8bc988e3f9813e6b3a679726d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:49:58 +0000 Subject: [PATCH 78/86] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c5d5fa9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: util-linux-ng -# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ -NAME := util-linux-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index a62db9e..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -OLPC-2 From 84c61844a034d0e897cf15c58ff7c7515f1200f9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:50:12 +0000 Subject: [PATCH 79/86] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c5d5fa9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: util-linux-ng -# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ -NAME := util-linux-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From ad6c4cead9151213db5306321fa37087d73ed2d2 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 20 Jul 2010 08:38:50 +0000 Subject: [PATCH 80/86] - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A-D don't work --- mount.tmpfs | 18 ++++++++++++++++ util-linux-ng-2.17-agetty-clocal.patch | 30 ++++++++++++++++++++++++++ util-linux-ng.spec | 12 ++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.17-agetty-clocal.patch diff --git a/mount.tmpfs b/mount.tmpfs index c0862eb..4fc7e60 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -18,6 +18,24 @@ case $1 in ;; esac +restricted=1 +ruid=$(id --user --real) +euid=$(id --user) + +if [ $ruid -eq 0 ] && [ $ruid -eq $euid ]; then + restricted=0 +fi + +# mount(8) in restricted mode (for non-root users) does not allow to use any +# mount options, types or so on command line. We have to call mount(8) with +# mountpoint only. All necessary options have to be defined in /etc/fstab. +# +# https://bugzilla.redhat.com/show_bug.cgi?id=615719 +# +if [ $restricted -eq 1 ]; then + exec /bin/mount -i "$2" +fi + # Remount with context mount options is unsupported # http://bugzilla.redhat.com/show_bug.cgi?id=563267 # diff --git a/util-linux-ng-2.17-agetty-clocal.patch b/util-linux-ng-2.17-agetty-clocal.patch new file mode 100644 index 0000000..9429a23 --- /dev/null +++ b/util-linux-ng-2.17-agetty-clocal.patch @@ -0,0 +1,30 @@ +From 9fcaa8826c180273829cf03e5fe34e08daef721f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 12 Jul 2010 11:57:55 +0200 +Subject: [PATCH] aggety: don't wipe CLOCAL flag + +gettey should not clear the flag. It seems that the flag is +automatically enabled for serial consoles tht don't use CD signal. + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 +Signed-off-by: Karel Zak +--- + login-utils/agetty.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/login-utils/agetty.c b/login-utils/agetty.c +index 39a1fd3..0cb00db 100644 +--- a/login-utils/agetty.c ++++ b/login-utils/agetty.c +@@ -706,7 +706,7 @@ termio_init(tp, speed, op) + /* flush input and output queues, important for modems! */ + (void) tcflush(0, TCIOFLUSH); + +- tp->c_cflag = CS8 | HUPCL | CREAD; ++ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); + cfsetispeed(tp, speed); + cfsetospeed(tp, speed); + if (op->flags & F_LOCAL) { +-- +1.6.6.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 186d248..ed242b1 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -107,6 +107,11 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.15-ipcs-32bit.patch +### Upstream Patches +### +# 598631 - shutdown, reboot, halt and C-A-D don't work +Patch9: util-linux-ng-2.17-agetty-clocal.patch + %description The util-linux-ng package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -220,6 +225,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build unset LINGUAS || : @@ -756,6 +762,10 @@ fi %changelog +* Mon Aug 2 2010 Karel Zak 2.18-2 +- fix #615719 - tmpfs mount fails with 'user' option. +- fix #598631 - shutdown, reboot, halt and C-A-D don't work + * Wed Jun 30 2010 Karel Zak 2.18-1 - upgrade to the final 2.18 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes From f5b82120dc1743e2b446dd2934b20f4b4fdcab9d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 2 Aug 2010 10:52:05 +0200 Subject: [PATCH 81/86] - fix #618957 - ISO images listed in fstab are mounted twice at boot Signed-off-by: Karel Zak --- util-linux-ng-2.17-mount-loopdev.patch | 83 ++++++++++++++++++++++++++ util-linux-ng.spec | 4 ++ 2 files changed, 87 insertions(+) create mode 100644 util-linux-ng-2.17-mount-loopdev.patch diff --git a/util-linux-ng-2.17-mount-loopdev.patch b/util-linux-ng-2.17-mount-loopdev.patch new file mode 100644 index 0000000..e898b3e --- /dev/null +++ b/util-linux-ng-2.17-mount-loopdev.patch @@ -0,0 +1,83 @@ +diff -up util-linux-ng-2.17.2/mount/mount.c.kzak util-linux-ng-2.17.2/mount/mount.c +--- util-linux-ng-2.17.2/mount/mount.c.kzak 2010-03-22 09:10:56.000000000 +0100 ++++ util-linux-ng-2.17.2/mount/mount.c 2010-07-29 16:15:28.000000000 +0200 +@@ -1090,7 +1090,8 @@ loop_check(const char **spec, const char + if (verbose) + printf(_("mount: skipping the setup of a loop device\n")); + } else { +- int loop_opts = SETLOOP_AUTOCLEAR; /* always attempt autoclear */ ++ /* use autoclear loopdev on system without regular mtab only */ ++ int loop_opts = mtab_is_writable() ? 0 : SETLOOP_AUTOCLEAR; + int res; + + if (*flags & MS_RDONLY) +@@ -1759,6 +1760,50 @@ mounted (const char *spec0, const char * + return ret; + } + ++/* returns 0 if not mounted, 1 if mounted and -1 in case of error */ ++static int ++is_fstab_entry_mounted(struct mntentchn *mc, int verbose) ++{ ++ struct stat st; ++ ++ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir)) ++ goto yes; ++ ++ /* extra care for loop devices */ ++ if ((strstr(mc->m.mnt_opts, "loop=") || ++ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) { ++ ++ char *p = strstr(mc->m.mnt_opts, "offset="); ++ uintmax_t offset = 0; ++ ++ if (p && *(p + 7)) { ++ char *end = NULL; ++ ++ p += 7; ++ errno = 0; ++ offset = strtoumax(p, &end, 0); ++ ++ if (end == p || (errno != 0 && ++ (offset == UINTMAX_MAX || offset == 0))) { ++ if (verbose) ++ printf(_("mount: ignore %s " ++ "(unparsable offset= option)\n"), ++ mc->m.mnt_fsname); ++ return -1; ++ } ++ } ++ if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) ++ goto yes; ++ } ++ ++ return 0; ++yes: ++ if (verbose) ++ printf(_("mount: %s already mounted on %s\n"), ++ mc->m.mnt_fsname, mc->m.mnt_dir); ++ return 1; ++} ++ + /* avoid using stat() on things we are not going to mount anyway.. */ + static int + has_noauto (const char *opts) { +@@ -1804,16 +1849,8 @@ do_mount_all (char *types, char *options + if (matching_type (mc->m.mnt_type, types) + && matching_opts (mc->m.mnt_opts, test_opts) + && !streq (mc->m.mnt_dir, "/") +- && !streq (mc->m.mnt_dir, "root")) { +- +- if (mounted (mc->m.mnt_fsname, mc->m.mnt_dir)) { +- if (verbose) +- printf(_("mount: %s already mounted " +- "on %s\n"), +- mc->m.mnt_fsname, +- mc->m.mnt_dir); +- continue; +- } ++ && !streq (mc->m.mnt_dir, "root") ++ && !is_fstab_entry_mounted(mc, verbose)) { + + mtmp = (struct mntentchn *) xmalloc(sizeof(*mtmp)); + *mtmp = *mc; diff --git a/util-linux-ng.spec b/util-linux-ng.spec index ed242b1..eb112ea 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -111,6 +111,8 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### # 598631 - shutdown, reboot, halt and C-A-D don't work Patch9: util-linux-ng-2.17-agetty-clocal.patch +# 618957 - ISO images listed in fstab are mounted twice at boot +Patch10: util-linux-ng-2.17-mount-loopdev.patch %description The util-linux-ng package contains a large variety of low-level system @@ -226,6 +228,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build unset LINGUAS || : @@ -765,6 +768,7 @@ fi * Mon Aug 2 2010 Karel Zak 2.18-2 - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A-D don't work +- fix #618957 - ISO images listed in fstab are mounted twice at boot * Wed Jun 30 2010 Karel Zak 2.18-1 - upgrade to the final 2.18 From f5753f26bf819b2610b302d343e283e3e2d4b705 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Aug 2010 11:47:58 +0200 Subject: [PATCH 82/86] 2.18-3: fix #620924 Signed-off-by: Karel Zak --- mount.tmpfs | 4 +--- util-linux-ng.spec | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mount.tmpfs b/mount.tmpfs index 4fc7e60..5495c9d 100644 --- a/mount.tmpfs +++ b/mount.tmpfs @@ -19,10 +19,8 @@ case $1 in esac restricted=1 -ruid=$(id --user --real) -euid=$(id --user) -if [ $ruid -eq 0 ] && [ $ruid -eq $euid ]; then +if [ $UID -eq 0 ] && [ $UID -eq $EUID ]; then restricted=0 fi diff --git a/util-linux-ng.spec b/util-linux-ng.spec index eb112ea..846dbe9 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -765,6 +765,9 @@ fi %changelog +* Thu Aug 5 2010 Karel Zak 2.18-3 +- fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id + * Mon Aug 2 2010 Karel Zak 2.18-2 - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A-D don't work From 39ece656f36c1c4e06930d776e20ac63a9ac5ef1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Aug 2010 10:16:07 +0200 Subject: [PATCH 83/86] 2.18-4: fix #623685 Signed-off-by: Karel Zak --- .gitignore | 3 + util-linux-ng-2.18-agetty-baudrate.patch | 147 ++++++++++++++++++ ... => util-linux-ng-2.18-agetty-clocal.patch | 14 +- util-linux-ng.spec | 12 +- 4 files changed, 166 insertions(+), 10 deletions(-) create mode 100644 util-linux-ng-2.18-agetty-baudrate.patch rename util-linux-ng-2.17-agetty-clocal.patch => util-linux-ng-2.18-agetty-clocal.patch (76%) diff --git a/.gitignore b/.gitignore index e3f316a..d0444d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ floppy-0.16.tar.bz2 util-linux-ng-2.18.tar.bz2 +*~ +*.rpm +*.log diff --git a/util-linux-ng-2.18-agetty-baudrate.patch b/util-linux-ng-2.18-agetty-baudrate.patch new file mode 100644 index 0000000..68397dd --- /dev/null +++ b/util-linux-ng-2.18-agetty-baudrate.patch @@ -0,0 +1,147 @@ +From 848e5e6ce3978d921366b799d907a78a12299924 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 18 Aug 2010 09:02:03 +0200 +Subject: [PATCH] agetty: add -s to reuse existing baud rate + +For example: + + /sbin/agetty -s /dev/ttyS0 9600 + +will reuse the speed the kernel configured on the port. If the setting +from kernel is useless (tty returns BREAK character) then the baud +rate from command line (9600) is used. + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 +Signed-off-by: Karel Zak +--- + login-utils/agetty.8 | 16 +++++----------- + login-utils/agetty.c | 22 ++++++++++++++-------- + 2 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/login-utils/agetty.8 b/login-utils/agetty.8 +index 8761374..53037dd 100644 +--- a/login-utils/agetty.8 ++++ b/login-utils/agetty.8 +@@ -3,7 +3,7 @@ + agetty \- alternative Linux getty + + .SH SYNOPSIS +-.BR "agetty " [\-8ihLmnUw] ++.BR "agetty " [\-8ihLmnsUw] + .RI "[-f " issue_file ] + .RI "[-l " login_program ] + .RI "[-I " init ] +@@ -12,16 +12,6 @@ agetty \- alternative Linux getty + .I port + .I baud_rate,... + .RI [ term ] +-.br +-.BR "agetty " [\-8ihLmnw] +-.RI "[-f " issue_file ] +-.RI "[-l " login_program ] +-.RI "[-I " init ] +-.RI "[-t " timeout ] +-.RI "[-H " login_host ] +-.I baud_rate,... +-.I port +-.RI [ term ] + + .SH DESCRIPTION + .ad +@@ -163,6 +153,10 @@ Force the line to be a local line with no need for carrier detect. This can + be useful when you have a locally attached terminal where the serial line + does not set the carrier detect signal. + .TP ++\-s ++Try to keep the existing baud rate. The baud rates from ++the command line are used when agetty receives a BREAK character. ++.TP + \-U + Turn on support for detecting an uppercase only terminal. This setting will + detect a login name containing only capitals as indicating an uppercase +diff --git a/login-utils/agetty.c b/login-utils/agetty.c +index 39a1fd3..9fc389b 100644 +--- a/login-utils/agetty.c ++++ b/login-utils/agetty.c +@@ -133,6 +133,7 @@ struct options { + #define F_CUSTISSUE (1<<6) /* give alternative issue file */ + #define F_NOPROMPT (1<<7) /* don't ask for login name! */ + #define F_LCUC (1<<8) /* Support for *LCUC stty modes */ ++#define F_KEEPSPEED (1<<9) /* Follow baud rate from kernel */ + + /* Storage for things detected while the login name was read. */ + +@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **argv, struct options *op)); + void parse_speeds P_((struct options *op, char *arg)); + void update_utmp P_((char *line)); + void open_tty P_((char *tty, struct termios *tp, int local)); +-void termio_init P_((struct termios *tp, int speed, struct options *op)); ++void termio_init P_((struct termios *tp, struct options *op)); + void auto_baud P_((struct termios *tp)); + void do_prompt P_((struct options *op, struct termios *tp)); + void next_speed P_((struct termios *tp, struct options *op)); +@@ -297,7 +298,7 @@ main(argc, argv) + tcsetpgrp(0, getpid()); + /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ + debug("calling termio_init\n"); +- termio_init(&termios, options.speeds[FIRST_SPEED], &options); ++ termio_init(&termios, &options); + + /* write the modem init string and DON'T flush the buffers */ + if (options.flags & F_INITSTRING) { +@@ -373,7 +374,7 @@ parse_args(argc, argv, op) + extern int optind; /* getopt */ + int c; + +- while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wUn"))) { ++ while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mst:wUn"))) { + switch (c) { + case '8': + op->eightbits = 1; +@@ -443,6 +444,9 @@ parse_args(argc, argv, op) + case 'n': + op->flags |= F_NOPROMPT; + break; ++ case 's': ++ op->flags |= F_KEEPSPEED; /* keep kernel defined speed */ ++ break; + case 't': /* time out */ + if ((op->timeout = atoi(optarg)) <= 0) + error(_("bad timeout value: %s"), optarg); +@@ -691,9 +695,8 @@ char gbuf[1024]; + char area[1024]; + + void +-termio_init(tp, speed, op) ++termio_init(tp, op) + struct termios *tp; +- int speed; + struct options *op; + { + +@@ -707,8 +710,11 @@ termio_init(tp, speed, op) + (void) tcflush(0, TCIOFLUSH); + + tp->c_cflag = CS8 | HUPCL | CREAD; +- cfsetispeed(tp, speed); +- cfsetospeed(tp, speed); ++ ++ if (!(op->flags & F_KEEPSPEED)) { ++ cfsetispeed(tp, op->speeds[FIRST_SPEED]); ++ cfsetospeed(tp, op->speeds[FIRST_SPEED]); ++ } + if (op->flags & F_LOCAL) { + tp->c_cflag |= CLOCAL; + } +@@ -1203,7 +1209,7 @@ bcode(s) + void + usage() + { +- fprintf(stderr, _("Usage: %s [-8hiLmUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); ++ fprintf(stderr, _("Usage: %s [-8hiLmsUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); + exit(1); + } + +-- +1.7.2 + diff --git a/util-linux-ng-2.17-agetty-clocal.patch b/util-linux-ng-2.18-agetty-clocal.patch similarity index 76% rename from util-linux-ng-2.17-agetty-clocal.patch rename to util-linux-ng-2.18-agetty-clocal.patch index 9429a23..1708e4d 100644 --- a/util-linux-ng-2.17-agetty-clocal.patch +++ b/util-linux-ng-2.18-agetty-clocal.patch @@ -1,4 +1,4 @@ -From 9fcaa8826c180273829cf03e5fe34e08daef721f Mon Sep 17 00:00:00 2001 +From e143d1f00497f0178a1febec8fb4aa7c842fa35a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 Jul 2010 11:57:55 +0200 Subject: [PATCH] aggety: don't wipe CLOCAL flag @@ -13,18 +13,18 @@ Signed-off-by: Karel Zak 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 39a1fd3..0cb00db 100644 +index 9fc389b..2541948 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c -@@ -706,7 +706,7 @@ termio_init(tp, speed, op) +@@ -709,7 +709,7 @@ termio_init(tp, op) /* flush input and output queues, important for modems! */ (void) tcflush(0, TCIOFLUSH); - tp->c_cflag = CS8 | HUPCL | CREAD; + tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); - cfsetispeed(tp, speed); - cfsetospeed(tp, speed); - if (op->flags & F_LOCAL) { + + if (!(op->flags & F_KEEPSPEED)) { + cfsetispeed(tp, op->speeds[FIRST_SPEED]); -- -1.6.6.1 +1.7.2 diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 846dbe9..af7f369 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -109,10 +109,12 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream Patches ### +# 623685 - please extend agetty to not require a baud rate to be specified +Patch9: util-linux-ng-2.18-agetty-baudrate.patch # 598631 - shutdown, reboot, halt and C-A-D don't work -Patch9: util-linux-ng-2.17-agetty-clocal.patch +Patch10: util-linux-ng-2.18-agetty-clocal.patch # 618957 - ISO images listed in fstab are mounted twice at boot -Patch10: util-linux-ng-2.17-mount-loopdev.patch +Patch11: util-linux-ng-2.17-mount-loopdev.patch %description The util-linux-ng package contains a large variety of low-level system @@ -229,6 +231,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build unset LINGUAS || : @@ -765,6 +768,9 @@ fi %changelog +* Wed Aug 18 2010 Karel Zak 2.18-4 +- fix #623685 - please extend agetty to not require a baud rate to be specified + * Thu Aug 5 2010 Karel Zak 2.18-3 - fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id From 334e0e7abe683e5df22777c8f0f5f8b2631b51b5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 26 Oct 2010 23:39:38 +0200 Subject: [PATCH 84/86] 2.18-5: fix agetty -s (#645640) Signed-off-by: Karel Zak --- util-linux-ng-2.18-agetty-baudrate.patch | 127 +++++++++++++++++------ util-linux-ng-2.18-agetty-clocal.patch | 42 ++++---- util-linux-ng.spec | 6 +- 3 files changed, 117 insertions(+), 58 deletions(-) diff --git a/util-linux-ng-2.18-agetty-baudrate.patch b/util-linux-ng-2.18-agetty-baudrate.patch index 68397dd..72dc257 100644 --- a/util-linux-ng-2.18-agetty-baudrate.patch +++ b/util-linux-ng-2.18-agetty-baudrate.patch @@ -1,27 +1,50 @@ -From 848e5e6ce3978d921366b799d907a78a12299924 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 18 Aug 2010 09:02:03 +0200 -Subject: [PATCH] agetty: add -s to reuse existing baud rate -For example: + based on upstream patch: + + commit 848e5e6ce3978d921366b799d907a78a12299924 + Author: Karel Zak + Date: Wed Aug 18 09:02:03 2010 +0200 + + agetty: add -s to reuse existing baud rate + + For example: /sbin/agetty -s /dev/ttyS0 9600 -will reuse the speed the kernel configured on the port. If the setting -from kernel is useless (tty returns BREAK character) then the baud -rate from command line (9600) is used. + will reuse the speed the kernel configured on the port. If the setting + from kernel is useless (tty returns BREAK character) then the baud + rate from command line (9600) is used. -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 -Signed-off-by: Karel Zak ---- - login-utils/agetty.8 | 16 +++++----------- - login-utils/agetty.c | 22 ++++++++++++++-------- - 2 files changed, 19 insertions(+), 19 deletions(-) + Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 + Signed-off-by: Karel Zak -diff --git a/login-utils/agetty.8 b/login-utils/agetty.8 -index 8761374..53037dd 100644 ---- a/login-utils/agetty.8 -+++ b/login-utils/agetty.8 + and + + commit e98f4af950a64db188e0a9f3eed20fefaa463a99 + Author: Karel Zak + Date: Fri Oct 22 21:24:50 2010 +0200 + + agetty: fix -s option (baud rate setup) + + The problem is pretty visible in strace output: + + broken version: + ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 + [...] + ioctl(0, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 + ^^^ + fixed version: + ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 + [...] + ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 + + Reported-by: Jon Masters + Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=645640 + Signed-off-by: Karel Zak + +diff -up util-linux-ng-2.18/login-utils/agetty.8.kzak util-linux-ng-2.18/login-utils/agetty.8 +--- util-linux-ng-2.18/login-utils/agetty.8.kzak 2010-02-04 12:53:56.000000000 +0100 ++++ util-linux-ng-2.18/login-utils/agetty.8 2010-10-22 22:07:43.000000000 +0200 @@ -3,7 +3,7 @@ agetty \- alternative Linux getty @@ -48,7 +71,7 @@ index 8761374..53037dd 100644 .SH DESCRIPTION .ad -@@ -163,6 +153,10 @@ Force the line to be a local line with no need for carrier detect. This can +@@ -163,6 +153,10 @@ Force the line to be a local line with n be useful when you have a locally attached terminal where the serial line does not set the carrier detect signal. .TP @@ -59,10 +82,9 @@ index 8761374..53037dd 100644 \-U Turn on support for detecting an uppercase only terminal. This setting will detect a login name containing only capitals as indicating an uppercase -diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 39a1fd3..9fc389b 100644 ---- a/login-utils/agetty.c -+++ b/login-utils/agetty.c +diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c +--- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-04-01 16:11:56.000000000 +0200 ++++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 22:15:40.000000000 +0200 @@ -133,6 +133,7 @@ struct options { #define F_CUSTISSUE (1<<6) /* give alternative issue file */ #define F_NOPROMPT (1<<7) /* don't ask for login name! */ @@ -71,7 +93,7 @@ index 39a1fd3..9fc389b 100644 /* Storage for things detected while the login name was read. */ -@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **argv, struct options *op)); +@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **arg void parse_speeds P_((struct options *op, char *arg)); void update_utmp P_((char *line)); void open_tty P_((char *tty, struct termios *tp, int local)); @@ -108,7 +130,7 @@ index 39a1fd3..9fc389b 100644 case 't': /* time out */ if ((op->timeout = atoi(optarg)) <= 0) error(_("bad timeout value: %s"), optarg); -@@ -691,9 +695,8 @@ char gbuf[1024]; +@@ -691,11 +695,17 @@ char gbuf[1024]; char area[1024]; void @@ -118,22 +140,62 @@ index 39a1fd3..9fc389b 100644 - int speed; struct options *op; { ++ speed_t ispeed, ospeed; ++ ++ if (op->flags & F_KEEPSPEED) { ++ ispeed = cfgetispeed(tp); /* save the original setting */ ++ ospeed = cfgetospeed(tp); ++ } else ++ ospeed = ispeed = op->speeds[FIRST_SPEED]; -@@ -707,8 +710,11 @@ termio_init(tp, speed, op) + /* + * Initial termios settings: 8-bit characters, raw-mode, blocking i/o. +@@ -706,14 +716,20 @@ termio_init(tp, speed, op) + /* flush input and output queues, important for modems! */ (void) tcflush(0, TCIOFLUSH); ++ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; ++ tp->c_cflag = CS8 | HUPCL | CREAD; - cfsetispeed(tp, speed); - cfsetospeed(tp, speed); + -+ if (!(op->flags & F_KEEPSPEED)) { -+ cfsetispeed(tp, op->speeds[FIRST_SPEED]); -+ cfsetospeed(tp, op->speeds[FIRST_SPEED]); -+ } ++ /* Note that the speed is stored in the c_cflag termios field, so we have ++ * set the speed always when the cflag se reseted. ++ */ ++ cfsetispeed(tp, ispeed); ++ cfsetospeed(tp, ospeed); ++ if (op->flags & F_LOCAL) { tp->c_cflag |= CLOCAL; } -@@ -1203,7 +1209,7 @@ bcode(s) + +- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; + #ifdef HAVE_STRUCT_TERMIOS_C_LINE + tp->c_line = 0; + #endif +@@ -973,9 +989,18 @@ next_speed(tp, op) + struct termios *tp; + struct options *op; + { +- static int baud_index = FIRST_SPEED;/* current speed index */ ++ static int baud_index = -1; ++ ++ if (baud_index == -1) ++ /* ++ * if the F_KEEPSPEED flags is set then the FIRST_SPEED is not ++ * tested yet (see termio_init()). ++ */ ++ baud_index = (op->flags & F_KEEPSPEED) ? FIRST_SPEED : ++ 1 % op->numspeed; ++ else ++ baud_index = (baud_index + 1) % op->numspeed; + +- baud_index = (baud_index + 1) % op->numspeed; + cfsetispeed(tp, op->speeds[baud_index]); + cfsetospeed(tp, op->speeds[baud_index]); + (void) tcsetattr(0, TCSANOW, tp); +@@ -1203,7 +1228,7 @@ bcode(s) void usage() { @@ -142,6 +204,3 @@ index 39a1fd3..9fc389b 100644 exit(1); } --- -1.7.2 - diff --git a/util-linux-ng-2.18-agetty-clocal.patch b/util-linux-ng-2.18-agetty-clocal.patch index 1708e4d..5d0b677 100644 --- a/util-linux-ng-2.18-agetty-clocal.patch +++ b/util-linux-ng-2.18-agetty-clocal.patch @@ -1,30 +1,26 @@ -From e143d1f00497f0178a1febec8fb4aa7c842fa35a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 12 Jul 2010 11:57:55 +0200 -Subject: [PATCH] aggety: don't wipe CLOCAL flag -gettey should not clear the flag. It seems that the flag is -automatically enabled for serial consoles tht don't use CD signal. + backport of upstream patch: -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 -Signed-off-by: Karel Zak ---- - login-utils/agetty.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Commit: e143d1f00497f0178a1febec8fb4aa7c842fa35a + From: Karel Zak + Date: Mon, 12 Jul 2010 11:57:55 +0200 + Subject: [PATCH] aggety: don't wipe CLOCAL flag -diff --git a/login-utils/agetty.c b/login-utils/agetty.c -index 9fc389b..2541948 100644 ---- a/login-utils/agetty.c -+++ b/login-utils/agetty.c -@@ -709,7 +709,7 @@ termio_init(tp, op) - /* flush input and output queues, important for modems! */ - (void) tcflush(0, TCIOFLUSH); + gettey should not clear the flag. It seems that the flag is + automatically enabled for serial consoles tht don't use CD signal. + + Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 + Signed-off-by: Karel Zak + +diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c +--- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-10-22 21:51:31.000000000 +0200 ++++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 21:51:31.000000000 +0200 +@@ -715,7 +715,7 @@ termio_init(tp, speed, op) + + tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - tp->c_cflag = CS8 | HUPCL | CREAD; + tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); - if (!(op->flags & F_KEEPSPEED)) { - cfsetispeed(tp, op->speeds[FIRST_SPEED]); --- -1.7.2 - + /* Note that the speed is stored in the c_cflag termios field, so we have + * set the speed always when the cflag se reseted. diff --git a/util-linux-ng.spec b/util-linux-ng.spec index af7f369..f30a19e 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.18 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -110,6 +110,7 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.patch ### Upstream Patches ### # 623685 - please extend agetty to not require a baud rate to be specified +# 645640 - new "-s" parameter parsing in agetty does not work Patch9: util-linux-ng-2.18-agetty-baudrate.patch # 598631 - shutdown, reboot, halt and C-A-D don't work Patch10: util-linux-ng-2.18-agetty-clocal.patch @@ -768,6 +769,9 @@ fi %changelog +* Tue Oct 26 2010 Karel Zak 2.18-5 +- fix #645640 - new "-s" parameter parsing in agetty does not work + * Wed Aug 18 2010 Karel Zak 2.18-4 - fix #623685 - please extend agetty to not require a baud rate to be specified From 6c69926dbfca8b07bd2f93b56bc8e7c54c7b227d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Oct 2010 00:18:01 +0200 Subject: [PATCH 85/86] 2.18-5: add -l (lock) support to fsck Signed-off-by: Karel Zak --- util-linux-ng-2.18-fsck-wholedisk.patch | 510 ++++++++++++++++++++++++ util-linux-ng.spec | 4 + 2 files changed, 514 insertions(+) create mode 100644 util-linux-ng-2.18-fsck-wholedisk.patch diff --git a/util-linux-ng-2.18-fsck-wholedisk.patch b/util-linux-ng-2.18-fsck-wholedisk.patch new file mode 100644 index 0000000..3718255 --- /dev/null +++ b/util-linux-ng-2.18-fsck-wholedisk.patch @@ -0,0 +1,510 @@ +diff -up util-linux-ng-2.18/fsck/fsck.8.kzak util-linux-ng-2.18/fsck/fsck.8 +--- util-linux-ng-2.18/fsck/fsck.8.kzak 2010-06-30 12:51:35.000000000 +0200 ++++ util-linux-ng-2.18/fsck/fsck.8 2010-10-26 23:55:30.000000000 +0200 +@@ -7,7 +7,7 @@ + fsck \- check and repair a Linux file system + .SH SYNOPSIS + .B fsck +-.RB [ \-sAVRTMNP ] ++.RB [ \-lsAVRTMNP ] + .RB [ \-C + .RI [ fd ]] + .RB [ \-t +@@ -80,6 +80,17 @@ variable. Please see the file system-sp + further details. + .SH OPTIONS + .TP ++.B \-l ++Lock whole-disk device by exclusive ++.BR flock (2). ++This option can be used with one device only (e.g. -A and -l are mutually ++exclusive). This option is recommended when more ++.B fsck (8) ++instances are executed in the same time. The option is ignored when used for ++multiple devices or for non-rotating disk. The fsck does not lock underlying ++devices if executed to check stacked devices (e.g. MD or DM) -- this feature is ++not implemented yet. ++.TP + .B \-s + Serialize + .B fsck +@@ -200,6 +211,11 @@ If there are multiple filesystems with t + fsck will attempt to check them in parallel, although it will avoid running + multiple filesystem checks on the same physical disk. + .sp ++.B fsck ++does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other ++device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is ++used to detemine dependencies between devices. ++.sp + Hence, a very common configuration in + .I /etc/fstab + files is to set the root filesystem to have a +@@ -366,10 +382,10 @@ program's behavior is affected by the fo + .B FSCK_FORCE_ALL_PARALLEL + If this environment variable is set, + .B fsck +-will attempt to run all of the specified filesystems in parallel, +-regardless of whether the filesystems appear to be on the same +-device. (This is useful for RAID systems or high-end storage systems +-such as those sold by companies such as IBM or EMC.) ++will attempt to run all of the specified filesystems in parallel, regardless of ++whether the filesystems appear to be on the same device. (This is useful for ++RAID systems or high-end storage systems such as those sold by companies such ++as IBM or EMC.) Note that the fs_passno value is still used. + .TP + .B FSCK_MAX_INST + This environment variable will limit the maximum number of file system +diff -up util-linux-ng-2.18/fsck/fsck.c.kzak util-linux-ng-2.18/fsck/fsck.c +--- util-linux-ng-2.18/fsck/fsck.c.kzak 2010-05-19 23:36:23.000000000 +0200 ++++ util-linux-ng-2.18/fsck/fsck.c 2010-10-26 23:55:30.000000000 +0200 +@@ -31,6 +31,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -42,6 +44,8 @@ + #include + #include + #include ++#include ++#include + + #include "fsprobe.h" + +@@ -85,6 +89,7 @@ char *devices[MAX_DEVICES]; + char *args[MAX_ARGS]; + int num_devices, num_args; + ++int lockdisk = 0; + int verbose = 0; + int doall = 0; + int noexecute = 0; +@@ -214,11 +219,97 @@ static void parse_escape(char *word) + *q = 0; + } + ++static dev_t get_disk(const char *device) ++{ ++ struct stat st; ++ dev_t disk; ++ ++ if (!stat(device, &st) && ++ !blkid_devno_to_wholedisk(st.st_rdev, NULL, 0, &disk)) ++ return disk; ++ ++ return 0; ++} ++ ++static int is_irrotational_disk(dev_t disk) ++{ ++ char path[PATH_MAX]; ++ FILE *f; ++ int rc, x; ++ ++ rc = snprintf(path, sizeof(path), ++ "/sys/dev/block/%d:%d/queue/rotational", ++ major(disk), minor(disk)); ++ ++ if (rc < 0 || rc + 1 > sizeof(path)) ++ return 0; ++ ++ f = fopen(path, "r"); ++ if (!f) ++ return 0; ++ ++ rc = fscanf(f, "%u", &x); ++ fclose(f); ++ ++ return rc == 1 ? !x : 0; ++} ++ ++static void lock_disk(struct fsck_instance *inst) ++{ ++ dev_t disk = inst->fs->disk ? : get_disk(inst->fs->device); ++ char *diskname; ++ ++ if (!disk || is_irrotational_disk(disk)) ++ return; ++ ++ diskname = blkid_devno_to_devname(disk); ++ if (!diskname) ++ return; ++ ++ if (verbose) ++ printf(_("Locking disk %s ... "), diskname); ++ ++ inst->lock = open(diskname, O_CLOEXEC | O_RDONLY); ++ if (inst->lock >= 0) { ++ int rc = -1; ++ ++ /* inform users that we're waiting on the lock */ ++ if (verbose && ++ (rc = flock(inst->lock, LOCK_EX | LOCK_NB)) != 0 && ++ errno == EWOULDBLOCK) ++ printf(_("(waiting) ")); ++ ++ if (rc != 0 && flock(inst->lock, LOCK_EX) != 0) { ++ close(inst->lock); /* failed */ ++ inst->lock = -1; ++ } ++ } ++ ++ if (verbose) ++ printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed")); ++ ++ free(diskname); ++ return; ++} ++ ++static void unlock_disk(struct fsck_instance *inst) ++{ ++ if (inst->lock >= 0) { ++ /* explicitly unlock, don't rely on close(), maybe some library ++ * (e.g. liblkid) has still open the device. ++ */ ++ flock(inst->lock, LOCK_UN); ++ close(inst->lock); ++ } ++} ++ ++ ++ + static void free_instance(struct fsck_instance *i) + { ++ if (lockdisk) ++ unlock_disk(i); + free(i->prog); +- free(i->device); +- free(i->base_device); + free(i); + return; + } +@@ -240,6 +331,8 @@ static struct fs_info *create_fs_device( + fs->passno = passno; + fs->flags = 0; + fs->next = NULL; ++ fs->disk = 0; ++ fs->stacked = 0; + + if (!filesys_info) + filesys_info = fs; +@@ -414,8 +507,7 @@ static int progress_active(NOARGS) + * Execute a particular fsck program, and link it into the list of + * child processes we are waiting for. + */ +-static int execute(const char *type, const char *device, const char *mntpt, +- int interactive) ++static int execute(const char *type, struct fs_info *fs, int interactive) + { + char *s, *argv[80], prog[80]; + int argc, i; +@@ -452,7 +544,7 @@ static int execute(const char *type, con + } + } + +- argv[argc++] = string_copy(device); ++ argv[argc++] = string_copy(fs->device); + argv[argc] = 0; + + s = find_fsck(prog); +@@ -464,12 +556,19 @@ static int execute(const char *type, con + + if (verbose || noexecute) { + printf("[%s (%d) -- %s] ", s, num_running, +- mntpt ? mntpt : device); ++ fs->mountpt ? fs->mountpt : fs->device); + for (i=0; i < argc; i++) + printf("%s ", argv[i]); + printf("\n"); + } + ++ ++ inst->fs = fs; ++ inst->lock = -1; ++ ++ if (lockdisk) ++ lock_disk(inst); ++ + /* Fork and execute the correct program. */ + if (noexecute) + pid = -1; +@@ -492,8 +591,6 @@ static int execute(const char *type, con + inst->pid = pid; + inst->prog = string_copy(prog); + inst->type = string_copy(type); +- inst->device = string_copy(device); +- inst->base_device = base_device(device); + inst->start_time = time(0); + inst->next = NULL; + +@@ -597,12 +694,12 @@ static struct fsck_instance *wait_one(in + } else { + printf(_("Warning... %s for device %s exited " + "with signal %d.\n"), +- inst->prog, inst->device, sig); ++ inst->prog, inst->fs->device, sig); + status = EXIT_ERROR; + } + } else { + printf(_("%s %s: status is %x, should never happen.\n"), +- inst->prog, inst->device, status); ++ inst->prog, inst->fs->device, status); + status = EXIT_ERROR; + } + inst->exit_status = status; +@@ -641,7 +738,7 @@ ret_inst: + instance_list = inst->next; + if (verbose > 1) + printf(_("Finished with %s (exit status %d)\n"), +- inst->device, inst->exit_status); ++ inst->fs->device, inst->exit_status); + num_running--; + return inst; + } +@@ -698,7 +795,7 @@ static void fsck_device(struct fs_info * + type = DEFAULT_FSTYPE; + + num_running++; +- retval = execute(type, fs->device, fs->mountpt, interactive); ++ retval = execute(type, fs, interactive); + if (retval) { + fprintf(stderr, _("%s: Error %d while executing fsck.%s " + "for %s\n"), progname, retval, type, fs->device); +@@ -924,40 +1021,70 @@ static int ignore(struct fs_info *fs) + return 0; + } + ++static int count_slaves(dev_t disk) ++{ ++ DIR *dir; ++ struct dirent *dp; ++ char dirname[PATH_MAX]; ++ int count = 0; ++ ++ snprintf(dirname, sizeof(dirname), ++ "/sys/dev/block/%u:%u/slaves/", ++ major(disk), minor(disk)); ++ ++ if (!(dir = opendir(dirname))) ++ return -1; ++ ++ while ((dp = readdir(dir)) != 0) { ++#ifdef _DIRENT_HAVE_D_TYPE ++ if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_LNK) ++ continue; ++#endif ++ if (dp->d_name[0] == '.' && ++ ((dp->d_name[1] == 0) || ++ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0)))) ++ continue; ++ ++ count++; ++ } ++ closedir(dir); ++ return count; ++} ++ + /* + * Returns TRUE if a partition on the same disk is already being + * checked. + */ +-static int device_already_active(char *device) ++static int disk_already_active(struct fs_info *fs) + { + struct fsck_instance *inst; +- char *base; + + if (force_all_parallel) + return 0; + +-#ifdef BASE_MD +- /* Don't check a soft raid disk with any other disk */ +- if (instance_list && +- (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) || +- !strncmp(device, BASE_MD, sizeof(BASE_MD)-1))) ++ if (instance_list && instance_list->fs->stacked) ++ /* any instance for a stacked device is already running */ + return 1; +-#endif + +- base = base_device(device); ++ if (!fs->disk) { ++ fs->disk = get_disk(fs->device); ++ if (fs->disk) ++ fs->stacked = count_slaves(fs->disk); ++ } ++ + /* + * If we don't know the base device, assume that the device is + * already active if there are any fsck instances running. ++ * ++ * Don't check a stacked device with any other disk too. + */ +- if (!base) ++ if (!fs->disk || fs->stacked) + return (instance_list != 0); ++ + for (inst = instance_list; inst; inst = inst->next) { +- if (!inst->base_device || !strcmp(base, inst->base_device)) { +- free(base); ++ if (!inst->fs->disk || fs->disk == inst->fs->disk) + return 1; +- } + } +- free(base); + return 0; + } + +@@ -1038,7 +1165,7 @@ static int check_all(NOARGS) + * already been spawned, then we need to defer + * this to another pass. + */ +- if (device_already_active(fs->device)) { ++ if (disk_already_active(fs)) { + pass_done = 0; + continue; + } +@@ -1188,6 +1315,9 @@ static void PRS(int argc, char *argv[]) + } + } + break; ++ case 'l': ++ lockdisk++; ++ break; + case 'V': + verbose++; + break; +@@ -1298,6 +1428,12 @@ int main(int argc, char *argv[]) + if ((num_devices == 1) || (serialize)) + interactive = 1; + ++ if (lockdisk && (doall || num_devices > 1)) { ++ fprintf(stderr, _("%s: the -l option can be used with one " ++ "device only -- ignore\n"), progname); ++ lockdisk = 0; ++ } ++ + /* If -A was specified ("check all"), do that! */ + if (doall) + return check_all(); +diff -up util-linux-ng-2.18/fsck/fsck.h.kzak util-linux-ng-2.18/fsck/fsck.h +--- util-linux-ng-2.18/fsck/fsck.h.kzak 2010-03-18 23:11:23.000000000 +0100 ++++ util-linux-ng-2.18/fsck/fsck.h 2010-10-26 23:55:30.000000000 +0200 +@@ -44,6 +44,8 @@ struct fs_info { + int freq; + int passno; + int flags; ++ dev_t disk; ++ int stacked; + struct fs_info *next; + }; + +@@ -56,12 +58,12 @@ struct fs_info { + struct fsck_instance { + int pid; + int flags; ++ int lock; /* flock()ed whole disk file descriptor or -1 */ + int exit_status; + time_t start_time; + char * prog; + char * type; +- char * device; +- char * base_device; ++ struct fs_info *fs; + struct fsck_instance *next; + }; + +diff -up util-linux-ng-2.18/fsck/Makefile.am.kzak util-linux-ng-2.18/fsck/Makefile.am +--- util-linux-ng-2.18/fsck/Makefile.am.kzak 2010-05-24 12:33:46.000000000 +0200 ++++ util-linux-ng-2.18/fsck/Makefile.am 2010-10-26 23:55:30.000000000 +0200 +@@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Mak + sbin_PROGRAMS = fsck + dist_man_MANS = fsck.8 + +-fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ ++fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ + $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c + fsck_LDADD = + fsck_CFLAGS = $(AM_CFLAGS) +diff -up util-linux-ng-2.18/fsck/Makefile.in.kzak util-linux-ng-2.18/fsck/Makefile.in +--- util-linux-ng-2.18/fsck/Makefile.in.kzak 2010-10-26 23:56:04.000000000 +0200 ++++ util-linux-ng-2.18/fsck/Makefile.in 2010-10-26 23:56:15.000000000 +0200 +@@ -62,9 +62,8 @@ CONFIG_CLEAN_FILES = + CONFIG_CLEAN_VPATH_FILES = + am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" + PROGRAMS = $(sbin_PROGRAMS) +-am_fsck_OBJECTS = fsck-base_device.$(OBJEXT) fsck-fsck.$(OBJEXT) \ +- fsck-ismounted.$(OBJEXT) fsck-fsprobe.$(OBJEXT) \ +- fsck-canonicalize.$(OBJEXT) ++am_fsck_OBJECTS = fsck-fsck.$(OBJEXT) fsck-ismounted.$(OBJEXT) \ ++ fsck-fsprobe.$(OBJEXT) fsck-canonicalize.$(OBJEXT) + fsck_OBJECTS = $(am_fsck_OBJECTS) + am__DEPENDENCIES_1 = + @BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +@@ -204,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PERL = @PERL@ +@@ -315,7 +315,7 @@ ul_libmount_la = $(top_builddir)/shlibs/ + # mount.h is generated by ./configure script and stored in build directory + ul_libmount_incdir = $(ul_libmount_builddir) + dist_man_MANS = fsck.8 +-fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ ++fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ + $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c + + fsck_LDADD = $(am__append_1) $(am__append_3) +@@ -407,7 +407,6 @@ mostlyclean-compile: + distclean-compile: + -rm -f *.tab.c + +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-base_device.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-canonicalize.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsck.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsprobe.Po@am__quote@ +@@ -437,22 +436,6 @@ distclean-compile: + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +-fsck-base_device.o: base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.o -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po +-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c +- +-fsck-base_device.obj: base_device.c +-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.obj -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` +-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po +-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` +- + fsck-fsck.o: fsck.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-fsck.o -MD -MP -MF $(DEPDIR)/fsck-fsck.Tpo -c -o fsck-fsck.o `test -f 'fsck.c' || echo '$(srcdir)/'`fsck.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-fsck.Tpo $(DEPDIR)/fsck-fsck.Po +diff -up util-linux-ng-2.18/Makefile.am.kzak util-linux-ng-2.18/Makefile.am +--- util-linux-ng-2.18/Makefile.am.kzak 2010-03-18 23:11:23.000000000 +0100 ++++ util-linux-ng-2.18/Makefile.am 2010-10-26 23:55:30.000000000 +0200 +@@ -30,8 +30,10 @@ SUBDIRS += mount + endif + + if BUILD_FSCK ++if BUILD_LIBBLKID + SUBDIRS += fsck + endif ++endif + + ACLOCAL_AMFLAGS = -I m4 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index f30a19e..b71bacf 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -116,6 +116,8 @@ Patch9: util-linux-ng-2.18-agetty-baudrate.patch Patch10: util-linux-ng-2.18-agetty-clocal.patch # 618957 - ISO images listed in fstab are mounted twice at boot Patch11: util-linux-ng-2.17-mount-loopdev.patch +# backport from upstream, add -l (lock) support to fsck, requested by systemd +Patch12: util-linux-ng-2.18-fsck-wholedisk.patch %description The util-linux-ng package contains a large variety of low-level system @@ -233,6 +235,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build unset LINGUAS || : @@ -771,6 +774,7 @@ fi %changelog * Tue Oct 26 2010 Karel Zak 2.18-5 - fix #645640 - new "-s" parameter parsing in agetty does not work +- add -l (lock) support to fsck * Wed Aug 18 2010 Karel Zak 2.18-4 - fix #623685 - please extend agetty to not require a baud rate to be specified From d59979fa05e2402ffa389c4362d1cbcce0e55582 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Jan 2011 10:13:23 +0100 Subject: [PATCH 86/86] retired Signed-off-by: Karel Zak --- dead.package | 2 + mount.tmpfs | 51 - nologin.8 | 63 - nologin.c | 58 - sources | 2 - util-linux-ng-2.13-ctrlaltdel-man.patch | 10 - util-linux-ng-2.13-fdformat-man-ide.patch | 23 - util-linux-ng-2.13-floppy-generic.patch | 102 - util-linux-ng-2.13-floppy-locale.patch | 10 - util-linux-ng-2.13-login-lastlog.patch | 13 - util-linux-ng-2.15-ipcs-32bit.patch | 48 - util-linux-ng-2.16-blkid-cachefile.patch | 78 - util-linux-ng-2.17-mount-loopdev.patch | 83 - util-linux-ng-2.18-agetty-baudrate.patch | 206 -- util-linux-ng-2.18-agetty-clocal.patch | 26 - util-linux-ng-2.18-fsck-wholedisk.patch | 510 ----- util-linux-ng-60-raw.rules | 11 - util-linux-ng-chsh-chfn.pamd | 6 - util-linux-ng-login.pamd | 16 - util-linux-ng-remote.pamd | 14 - util-linux-ng.spec | 2314 --------------------- uuidd.init | 117 -- 22 files changed, 2 insertions(+), 3761 deletions(-) create mode 100644 dead.package delete mode 100644 mount.tmpfs delete mode 100644 nologin.8 delete mode 100644 nologin.c delete mode 100644 sources delete mode 100644 util-linux-ng-2.13-ctrlaltdel-man.patch delete mode 100644 util-linux-ng-2.13-fdformat-man-ide.patch delete mode 100644 util-linux-ng-2.13-floppy-generic.patch delete mode 100644 util-linux-ng-2.13-floppy-locale.patch delete mode 100644 util-linux-ng-2.13-login-lastlog.patch delete mode 100644 util-linux-ng-2.15-ipcs-32bit.patch delete mode 100644 util-linux-ng-2.16-blkid-cachefile.patch delete mode 100644 util-linux-ng-2.17-mount-loopdev.patch delete mode 100644 util-linux-ng-2.18-agetty-baudrate.patch delete mode 100644 util-linux-ng-2.18-agetty-clocal.patch delete mode 100644 util-linux-ng-2.18-fsck-wholedisk.patch delete mode 100644 util-linux-ng-60-raw.rules delete mode 100644 util-linux-ng-chsh-chfn.pamd delete mode 100644 util-linux-ng-login.pamd delete mode 100644 util-linux-ng-remote.pamd delete mode 100644 util-linux-ng.spec delete mode 100755 uuidd.init diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..aca69ac --- /dev/null +++ b/dead.package @@ -0,0 +1,2 @@ + + util-linux-ng has been renamed to util-linux diff --git a/mount.tmpfs b/mount.tmpfs deleted file mode 100644 index 5495c9d..0000000 --- a/mount.tmpfs +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/bash -# -# Copyright (C) 2009 Eric Paris -# Daniel Walsh -# Karel Zak -# -# http://bugzilla.redhat.com/show_bug.cgi?id=476964 -# -# Usage: -# /sbin/mount.tmpfs spec dir [-sfnv] [-o options] -# - -case $1 in - -h|--help|-?) - echo "mount.tmpfs is a private mount(8) wrapper for tmpfs." - echo "Don't use it directly!" - exit 1 - ;; -esac - -restricted=1 - -if [ $UID -eq 0 ] && [ $UID -eq $EUID ]; then - restricted=0 -fi - -# mount(8) in restricted mode (for non-root users) does not allow to use any -# mount options, types or so on command line. We have to call mount(8) with -# mountpoint only. All necessary options have to be defined in /etc/fstab. -# -# https://bugzilla.redhat.com/show_bug.cgi?id=615719 -# -if [ $restricted -eq 1 ]; then - exec /bin/mount -i "$2" -fi - -# Remount with context mount options is unsupported -# http://bugzilla.redhat.com/show_bug.cgi?id=563267 -# -if ! echo "$@" | grep -q -E '\-o.*remount'; then - - if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then - con=$(ls --scontext -d "$2" | cut -f 1 -d ' ') - if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then - exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs - fi - fi - -fi - -exec /bin/mount "$@" -i -t tmpfs diff --git a/nologin.8 b/nologin.8 deleted file mode 100644 index 5cb1601..0000000 --- a/nologin.8 +++ /dev/null @@ -1,63 +0,0 @@ -.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $ -.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $ -.\" -.\" Copyright (c) 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93 -.\" -.Dd February 15, 1997 -.Dt NOLOGIN 8 -.Os -.Sh NAME -.Nm nologin -.Nd politely refuse a login -.Sh SYNOPSIS -.Nm nologin -.Sh DESCRIPTION -.Nm -displays a message that an account is not available and -exits non-zero. -It is intended as a replacement shell field for accounts that -have been disabled. -.Pp -If the file -.Pa /etc/nologin.txt -exists, -.Nm -displays its contents to the user instead of the default message. -.Sh SEE ALSO -.Xr login 1 -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.4 . diff --git a/nologin.c b/nologin.c deleted file mode 100644 index 8a51ba9..0000000 --- a/nologin.c +++ /dev/null @@ -1,58 +0,0 @@ -/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */ - -/* - * Copyright (c) 1997, Jason Downs. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include - -/* Distinctly different from _PATH_NOLOGIN. */ -#define _PATH_NOLOGIN_TXT "/etc/nologin.txt" - -#define DEFAULT_MESG "This account is currently not available.\n" - -/*ARGSUSED*/ -int main(argc, argv) - int argc; - char *argv[]; -{ - int nfd, nrd; - char nbuf[128]; - - nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY); - if (nfd < 0) { - write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG)); - exit (1); - } - - while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0) - write(STDOUT_FILENO, nbuf, nrd); - close (nfd); - - exit (1); -} diff --git a/sources b/sources deleted file mode 100644 index 0384138..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -2f5f71e6af969d041d73ab778c141a77 util-linux-ng-2.18.tar.bz2 diff --git a/util-linux-ng-2.13-ctrlaltdel-man.patch b/util-linux-ng-2.13-ctrlaltdel-man.patch deleted file mode 100644 index ab7c6bd..0000000 --- a/util-linux-ng-2.13-ctrlaltdel-man.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- util-linux-2.13-pre6/sys-utils/ctrlaltdel.8.kzak 2006-08-10 12:23:53.000000000 +0200 -+++ util-linux-2.13-pre6/sys-utils/ctrlaltdel.8 2006-08-10 12:24:08.000000000 +0200 -@@ -32,7 +32,6 @@ - .SH FILES - .I /etc/rc.local - .SH "SEE ALSO" --.BR simpleinit (8), - .BR init (8) - .SH AUTHOR - Peter Orbaek (poe@daimi.aau.dk) diff --git a/util-linux-ng-2.13-fdformat-man-ide.patch b/util-linux-ng-2.13-fdformat-man-ide.patch deleted file mode 100644 index 1116641..0000000 --- a/util-linux-ng-2.13-fdformat-man-ide.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- util-linux-ng-2.13-rc3/disk-utils/fdformat.8.xxx 2007-07-03 01:56:04.000000000 +0200 -+++ util-linux-ng-2.13-rc3/disk-utils/fdformat.8 2007-08-13 12:07:58.000000000 +0200 -@@ -45,6 +45,10 @@ - .BR setfdprm (8) - to load the disk parameters. - -+For ATAPI IDE floppy driver (also known as LS-120 drives or "Superdisk" -+drives) you have to use the -+.BR floppy (8). -+ - .SH OPTIONS - .TP - .B \-n -@@ -54,7 +58,8 @@ - .BR fd (4), - .BR setfdprm (8), - .BR mkfs (8), --.BR emkfs (8) -+.BR emkfs (8), -+.BR floppy (8) - .SH AUTHOR - Werner Almesberger (almesber@nessie.cs.id.ethz.ch) - .SH AVAILABILITY diff --git a/util-linux-ng-2.13-floppy-generic.patch b/util-linux-ng-2.13-floppy-generic.patch deleted file mode 100644 index ffc4750..0000000 --- a/util-linux-ng-2.13-floppy-generic.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- util-linux-2.12p/floppy-0.16/floppyfloppy.c.generic 2001-02-13 01:15:38.000000000 +0100 -+++ util-linux-2.12p/floppy-0.16/floppyfloppy.c 2005-09-30 15:38:08.000000000 +0200 -@@ -264,6 +264,33 @@ - #endif - } - -+/* -1=error, 1=true, 0=false */ -+static int check_generic(const char *dev, int n) -+{ -+ struct floppy_struct param; -+ int fd; -+ -+ if ((fd=open(dev, O_RDONLY)) < 0) -+ { -+ perror(dev); -+ return -1; -+ } -+ if (ioctl(fd,FDGETPRM,(long) ¶m) < 0) -+ { -+ perror(dev); -+ close(fd); -+ return -1; -+ } -+ close(fd); -+ -+ if (param.sect==floppy_type[n].sectors && -+ param.head==floppy_type[n].heads && -+ param.track==floppy_type[n].tracks) -+ /* generic device uses expected format */ -+ return 1; -+ -+ return 0; -+} - - static int do_format(const char *dev, int fmtnum, - int (*fmt_func)(const char *, int), int flags) -@@ -275,6 +302,7 @@ - struct format_descr curtrack; - int pct; - struct stat stat_buf; -+ int gen = 0; - - int i, j; - char *devname; -@@ -297,23 +325,52 @@ - - strcat(strcpy(devname, dev), floppy_type[fmtnum].dev); - -+ if (stat(devname, &stat_buf)==-1 && errno==ENOENT) -+ { -+ /* /dev/fd0xxxxx doesn't exist ...try to use generic device -+ * -+ * Note: we needn't size specific device if the generic device uses -+ * right floppy format (FDGETPRM). -- Karel Zak [30/09/2005] -+ */ -+ if ((gen = check_generic(dev, fmtnum))==1) /* true */ -+ { -+ fprintf(stderr, _("WARNING: size specific device %s doesn't exist, using generic device: %s\n"), -+ devname, dev); -+ strcpy(devname, dev); -+ } -+ else if (gen==0) /* false */ -+ { -+ fprintf(stderr, _("ERROR: size specific device %1$s doesn't exist. Use \"MAKEDEV %1$s\" and try it again.\n"), devname); -+ return (1); -+ } -+ else /* error -- no floppy medium or device? */ -+ return(1); -+ } - fd=open(devname, O_WRONLY); - if (fd < 0) - { - perror(devname); - return (1); - } -- -- if (fstat(fd, &stat_buf) || -- !S_ISBLK(stat_buf.st_mode) || -- MINOR_DEV(stat_buf.st_rdev) != fmtnum) -+ if (fstat(fd, &stat_buf) < 0) -+ { -+ perror(devname); -+ close(fd); -+ return (1); -+ } -+ if (!S_ISBLK(stat_buf.st_mode)) -+ { -+ fprintf(stderr,_("%s: not a block device\n"), devname); -+ close(fd); -+ return (1); -+ } -+ if (gen==0 && MINOR_DEV(stat_buf.st_rdev) != fmtnum) - { - errno=EINVAL; - perror(devname); - close(fd); - return (1); - } -- - if (ioctl(fd, FDGETPRM, &geo) < 0) - { - perror(devname); diff --git a/util-linux-ng-2.13-floppy-locale.patch b/util-linux-ng-2.13-floppy-locale.patch deleted file mode 100644 index 9b8142f..0000000 --- a/util-linux-ng-2.13-floppy-locale.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- util-linux-ng-2.13-rc3/floppy-0.16/superfloppy.c.kzak 2001-07-14 05:26:16.000000000 +0200 -+++ util-linux-ng-2.13-rc3/floppy-0.16/superfloppy.c 2007-08-13 13:14:53.000000000 +0200 -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/util-linux-ng-2.13-login-lastlog.patch b/util-linux-ng-2.13-login-lastlog.patch deleted file mode 100644 index 548b99d..0000000 --- a/util-linux-ng-2.13-login-lastlog.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-linux-ng-2.14.2-rc1/login-utils/login.c -=================================================================== ---- util-linux-ng-2.14.2-rc1.orig/login-utils/login.c -+++ util-linux-ng-2.14.2-rc1/login-utils/login.c -@@ -1415,7 +1415,7 @@ dolastlog(int quiet) { - struct lastlog ll; - int fd; - -- if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) { -+ if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) { - lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET); - if (!quiet) { - if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) && diff --git a/util-linux-ng-2.15-ipcs-32bit.patch b/util-linux-ng-2.15-ipcs-32bit.patch deleted file mode 100644 index c3860f1..0000000 --- a/util-linux-ng-2.15-ipcs-32bit.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -up util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c ---- util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak 2009-03-25 13:19:08.000000000 +0100 -+++ util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c 2009-06-04 15:22:48.000000000 +0200 -@@ -243,6 +243,26 @@ print_perms (int id, struct ipc_perm *ip - printf(" %-10d\n", ipcp->gid); - } - -+static unsigned long long -+shminfo_from_proc(const char *name, unsigned long def) -+{ -+ char path[256]; -+ char buf[64]; -+ FILE *f; -+ unsigned long long res = def; -+ -+ if (!name) -+ return res; -+ -+ snprintf(path, sizeof(path), "/proc/sys/kernel/%s", name); -+ -+ if (!(f = fopen(path, "r"))) -+ return res; -+ if (fgets(buf, sizeof(buf), f)) -+ res = atoll(buf); -+ fclose(f); -+ return res; -+} - - void do_shm (char format) - { -@@ -266,12 +286,12 @@ void do_shm (char format) - return; - /* glibc 2.1.3 and all earlier libc's have ints as fields - of struct shminfo; glibc 2.1.91 has unsigned long; ach */ -- printf (_("max number of segments = %lu\n"), -- (unsigned long) shminfo.shmmni); -- printf (_("max seg size (kbytes) = %lu\n"), -- (unsigned long) (shminfo.shmmax >> 10)); -+ printf (_("max number of segments = %llu\n"), -+ shminfo_from_proc("shmmni", shminfo.shmmni)); -+ printf (_("max seg size (kbytes) = %llu\n"), -+ (shminfo_from_proc("shmmax", shminfo.shmmax) >> 10)); - printf (_("max total shared memory (kbytes) = %llu\n"), -- getpagesize() / 1024 * (unsigned long long) shminfo.shmall); -+ getpagesize() / 1024 * shminfo_from_proc("shmall", shminfo.shmall)); - printf (_("min seg size (bytes) = %lu\n"), - (unsigned long) shminfo.shmmin); - return; diff --git a/util-linux-ng-2.16-blkid-cachefile.patch b/util-linux-ng-2.16-blkid-cachefile.patch deleted file mode 100644 index 7edd4e9..0000000 --- a/util-linux-ng-2.16-blkid-cachefile.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- - misc-utils/blkid.8 | 4 ++-- - misc-utils/blkid.c | 2 +- - shlibs/blkid/libblkid.3 | 6 +++--- - shlibs/blkid/src/blkidP.h | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - ---- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.8 -+++ util-linux-ng-2.18-rc1/misc-utils/blkid.8 -@@ -81,7 +81,7 @@ same meaning as "KiB") or decimal (10^N) - Read from - .I cachefile - instead of reading from the default cache file --.IR /etc/blkid.tab . -+.IR /etc/blkid/blkid.tab . - If you want to start with a clean cache (i.e. don't report devices previously - scanned but not necessarily available at this time), specify - .IR /dev/null . -@@ -228,7 +228,7 @@ Display version number and exit. - Write the device cache to - .I writecachefile - instead of writing it to the default cache file --.IR /etc/blkid.tab . -+.IR /etc/blkid/blkid.tab . - If you don't want to save the cache to the default file, specify - .IR /dev/null. - If not specified it will be the same file as that given by the ---- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.c -+++ util-linux-ng-2.18-rc1/misc-utils/blkid.c -@@ -65,7 +65,7 @@ static void usage(int error) - " [-o format] [dev ...]\n\n" - " %1$s -i [-s ] [-o format] [dev ...]\n\n" - "Options:\n" -- " -c cache file (default: /etc/blkid.tab, /dev/null = none)\n" -+ " -c cache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n" - " -h print this usage message and exit\n" - " -g garbage collect the blkid cache\n" - " -o output format; can be one of:\n" ---- util-linux-ng-2.18-rc1.orig/shlibs/blkid/libblkid.3 -+++ util-linux-ng-2.18-rc1/shlibs/blkid/libblkid.3 -@@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a - specific block device names into configuration files. - .P - Block device information is normally kept in a cache file --.I /etc/blkid.tab -+.I /etc/blkid/blkid.tab - and is verified to still be valid before being returned to the user - (if the user has read permission on the raw block device, otherwise not). - The cache file also allows unprivileged users (normally anyone other -@@ -59,7 +59,7 @@ symlink does not match with LABEL or UUI - .I CACHE_FILE= - Overrides the standard location of the cache file. This setting can be - overridden by the environment variable BLKID_FILE. Default is --.I /etc/blkid.tab. -+.I /etc/blkid/blkid.tab. - .TP - .I EVALUATE= - Defines LABEL and UUID evaluation method(s). Currently, the libblkid library -@@ -77,7 +77,7 @@ from Ted Ts'o. The library was subseque - The low-level probing code was rewritten by Karel Zak. - .SH FILES - .TP 18 --.I /etc/blkid.tab -+.I /etc/blkid/blkid.tab - caches data extracted from each recognized block device - .TP - .I /etc/blkid.conf ---- util-linux-ng-2.18-rc1.orig/shlibs/blkid/src/blkidP.h -+++ util-linux-ng-2.18-rc1/shlibs/blkid/src/blkidP.h -@@ -279,7 +279,7 @@ extern int blkid_fstatat(DIR *dir, const - extern int blkid_openat(DIR *dir, const char *dirname, const char *filename, - int flags); - --#define BLKID_CACHE_FILE "/etc/blkid.tab" -+#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab" - #define BLKID_CONFIG_FILE "/etc/blkid.conf" - - #define BLKID_ERR_IO 5 diff --git a/util-linux-ng-2.17-mount-loopdev.patch b/util-linux-ng-2.17-mount-loopdev.patch deleted file mode 100644 index e898b3e..0000000 --- a/util-linux-ng-2.17-mount-loopdev.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -up util-linux-ng-2.17.2/mount/mount.c.kzak util-linux-ng-2.17.2/mount/mount.c ---- util-linux-ng-2.17.2/mount/mount.c.kzak 2010-03-22 09:10:56.000000000 +0100 -+++ util-linux-ng-2.17.2/mount/mount.c 2010-07-29 16:15:28.000000000 +0200 -@@ -1090,7 +1090,8 @@ loop_check(const char **spec, const char - if (verbose) - printf(_("mount: skipping the setup of a loop device\n")); - } else { -- int loop_opts = SETLOOP_AUTOCLEAR; /* always attempt autoclear */ -+ /* use autoclear loopdev on system without regular mtab only */ -+ int loop_opts = mtab_is_writable() ? 0 : SETLOOP_AUTOCLEAR; - int res; - - if (*flags & MS_RDONLY) -@@ -1759,6 +1760,50 @@ mounted (const char *spec0, const char * - return ret; - } - -+/* returns 0 if not mounted, 1 if mounted and -1 in case of error */ -+static int -+is_fstab_entry_mounted(struct mntentchn *mc, int verbose) -+{ -+ struct stat st; -+ -+ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir)) -+ goto yes; -+ -+ /* extra care for loop devices */ -+ if ((strstr(mc->m.mnt_opts, "loop=") || -+ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) { -+ -+ char *p = strstr(mc->m.mnt_opts, "offset="); -+ uintmax_t offset = 0; -+ -+ if (p && *(p + 7)) { -+ char *end = NULL; -+ -+ p += 7; -+ errno = 0; -+ offset = strtoumax(p, &end, 0); -+ -+ if (end == p || (errno != 0 && -+ (offset == UINTMAX_MAX || offset == 0))) { -+ if (verbose) -+ printf(_("mount: ignore %s " -+ "(unparsable offset= option)\n"), -+ mc->m.mnt_fsname); -+ return -1; -+ } -+ } -+ if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) -+ goto yes; -+ } -+ -+ return 0; -+yes: -+ if (verbose) -+ printf(_("mount: %s already mounted on %s\n"), -+ mc->m.mnt_fsname, mc->m.mnt_dir); -+ return 1; -+} -+ - /* avoid using stat() on things we are not going to mount anyway.. */ - static int - has_noauto (const char *opts) { -@@ -1804,16 +1849,8 @@ do_mount_all (char *types, char *options - if (matching_type (mc->m.mnt_type, types) - && matching_opts (mc->m.mnt_opts, test_opts) - && !streq (mc->m.mnt_dir, "/") -- && !streq (mc->m.mnt_dir, "root")) { -- -- if (mounted (mc->m.mnt_fsname, mc->m.mnt_dir)) { -- if (verbose) -- printf(_("mount: %s already mounted " -- "on %s\n"), -- mc->m.mnt_fsname, -- mc->m.mnt_dir); -- continue; -- } -+ && !streq (mc->m.mnt_dir, "root") -+ && !is_fstab_entry_mounted(mc, verbose)) { - - mtmp = (struct mntentchn *) xmalloc(sizeof(*mtmp)); - *mtmp = *mc; diff --git a/util-linux-ng-2.18-agetty-baudrate.patch b/util-linux-ng-2.18-agetty-baudrate.patch deleted file mode 100644 index 72dc257..0000000 --- a/util-linux-ng-2.18-agetty-baudrate.patch +++ /dev/null @@ -1,206 +0,0 @@ - - based on upstream patch: - - commit 848e5e6ce3978d921366b799d907a78a12299924 - Author: Karel Zak - Date: Wed Aug 18 09:02:03 2010 +0200 - - agetty: add -s to reuse existing baud rate - - For example: - - /sbin/agetty -s /dev/ttyS0 9600 - - will reuse the speed the kernel configured on the port. If the setting - from kernel is useless (tty returns BREAK character) then the baud - rate from command line (9600) is used. - - Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 - Signed-off-by: Karel Zak - - and - - commit e98f4af950a64db188e0a9f3eed20fefaa463a99 - Author: Karel Zak - Date: Fri Oct 22 21:24:50 2010 +0200 - - agetty: fix -s option (baud rate setup) - - The problem is pretty visible in strace output: - - broken version: - ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 - [...] - ioctl(0, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 - ^^^ - fixed version: - ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 - [...] - ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 - - Reported-by: Jon Masters - Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=645640 - Signed-off-by: Karel Zak - -diff -up util-linux-ng-2.18/login-utils/agetty.8.kzak util-linux-ng-2.18/login-utils/agetty.8 ---- util-linux-ng-2.18/login-utils/agetty.8.kzak 2010-02-04 12:53:56.000000000 +0100 -+++ util-linux-ng-2.18/login-utils/agetty.8 2010-10-22 22:07:43.000000000 +0200 -@@ -3,7 +3,7 @@ - agetty \- alternative Linux getty - - .SH SYNOPSIS --.BR "agetty " [\-8ihLmnUw] -+.BR "agetty " [\-8ihLmnsUw] - .RI "[-f " issue_file ] - .RI "[-l " login_program ] - .RI "[-I " init ] -@@ -12,16 +12,6 @@ agetty \- alternative Linux getty - .I port - .I baud_rate,... - .RI [ term ] --.br --.BR "agetty " [\-8ihLmnw] --.RI "[-f " issue_file ] --.RI "[-l " login_program ] --.RI "[-I " init ] --.RI "[-t " timeout ] --.RI "[-H " login_host ] --.I baud_rate,... --.I port --.RI [ term ] - - .SH DESCRIPTION - .ad -@@ -163,6 +153,10 @@ Force the line to be a local line with n - be useful when you have a locally attached terminal where the serial line - does not set the carrier detect signal. - .TP -+\-s -+Try to keep the existing baud rate. The baud rates from -+the command line are used when agetty receives a BREAK character. -+.TP - \-U - Turn on support for detecting an uppercase only terminal. This setting will - detect a login name containing only capitals as indicating an uppercase -diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c ---- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-04-01 16:11:56.000000000 +0200 -+++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 22:15:40.000000000 +0200 -@@ -133,6 +133,7 @@ struct options { - #define F_CUSTISSUE (1<<6) /* give alternative issue file */ - #define F_NOPROMPT (1<<7) /* don't ask for login name! */ - #define F_LCUC (1<<8) /* Support for *LCUC stty modes */ -+#define F_KEEPSPEED (1<<9) /* Follow baud rate from kernel */ - - /* Storage for things detected while the login name was read. */ - -@@ -203,7 +204,7 @@ void parse_args P_((int argc, char **arg - void parse_speeds P_((struct options *op, char *arg)); - void update_utmp P_((char *line)); - void open_tty P_((char *tty, struct termios *tp, int local)); --void termio_init P_((struct termios *tp, int speed, struct options *op)); -+void termio_init P_((struct termios *tp, struct options *op)); - void auto_baud P_((struct termios *tp)); - void do_prompt P_((struct options *op, struct termios *tp)); - void next_speed P_((struct termios *tp, struct options *op)); -@@ -297,7 +298,7 @@ main(argc, argv) - tcsetpgrp(0, getpid()); - /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ - debug("calling termio_init\n"); -- termio_init(&termios, options.speeds[FIRST_SPEED], &options); -+ termio_init(&termios, &options); - - /* write the modem init string and DON'T flush the buffers */ - if (options.flags & F_INITSTRING) { -@@ -373,7 +374,7 @@ parse_args(argc, argv, op) - extern int optind; /* getopt */ - int c; - -- while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wUn"))) { -+ while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mst:wUn"))) { - switch (c) { - case '8': - op->eightbits = 1; -@@ -443,6 +444,9 @@ parse_args(argc, argv, op) - case 'n': - op->flags |= F_NOPROMPT; - break; -+ case 's': -+ op->flags |= F_KEEPSPEED; /* keep kernel defined speed */ -+ break; - case 't': /* time out */ - if ((op->timeout = atoi(optarg)) <= 0) - error(_("bad timeout value: %s"), optarg); -@@ -691,11 +695,17 @@ char gbuf[1024]; - char area[1024]; - - void --termio_init(tp, speed, op) -+termio_init(tp, op) - struct termios *tp; -- int speed; - struct options *op; - { -+ speed_t ispeed, ospeed; -+ -+ if (op->flags & F_KEEPSPEED) { -+ ispeed = cfgetispeed(tp); /* save the original setting */ -+ ospeed = cfgetospeed(tp); -+ } else -+ ospeed = ispeed = op->speeds[FIRST_SPEED]; - - /* - * Initial termios settings: 8-bit characters, raw-mode, blocking i/o. -@@ -706,14 +716,20 @@ termio_init(tp, speed, op) - /* flush input and output queues, important for modems! */ - (void) tcflush(0, TCIOFLUSH); - -+ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; -+ - tp->c_cflag = CS8 | HUPCL | CREAD; -- cfsetispeed(tp, speed); -- cfsetospeed(tp, speed); -+ -+ /* Note that the speed is stored in the c_cflag termios field, so we have -+ * set the speed always when the cflag se reseted. -+ */ -+ cfsetispeed(tp, ispeed); -+ cfsetospeed(tp, ospeed); -+ - if (op->flags & F_LOCAL) { - tp->c_cflag |= CLOCAL; - } - -- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - #ifdef HAVE_STRUCT_TERMIOS_C_LINE - tp->c_line = 0; - #endif -@@ -973,9 +989,18 @@ next_speed(tp, op) - struct termios *tp; - struct options *op; - { -- static int baud_index = FIRST_SPEED;/* current speed index */ -+ static int baud_index = -1; -+ -+ if (baud_index == -1) -+ /* -+ * if the F_KEEPSPEED flags is set then the FIRST_SPEED is not -+ * tested yet (see termio_init()). -+ */ -+ baud_index = (op->flags & F_KEEPSPEED) ? FIRST_SPEED : -+ 1 % op->numspeed; -+ else -+ baud_index = (baud_index + 1) % op->numspeed; - -- baud_index = (baud_index + 1) % op->numspeed; - cfsetispeed(tp, op->speeds[baud_index]); - cfsetospeed(tp, op->speeds[baud_index]); - (void) tcsetattr(0, TCSANOW, tp); -@@ -1203,7 +1228,7 @@ bcode(s) - void - usage() - { -- fprintf(stderr, _("Usage: %s [-8hiLmUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); -+ fprintf(stderr, _("Usage: %s [-8hiLmsUw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]\n"), progname); - exit(1); - } - diff --git a/util-linux-ng-2.18-agetty-clocal.patch b/util-linux-ng-2.18-agetty-clocal.patch deleted file mode 100644 index 5d0b677..0000000 --- a/util-linux-ng-2.18-agetty-clocal.patch +++ /dev/null @@ -1,26 +0,0 @@ - - backport of upstream patch: - - Commit: e143d1f00497f0178a1febec8fb4aa7c842fa35a - From: Karel Zak - Date: Mon, 12 Jul 2010 11:57:55 +0200 - Subject: [PATCH] aggety: don't wipe CLOCAL flag - - gettey should not clear the flag. It seems that the flag is - automatically enabled for serial consoles tht don't use CD signal. - - Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 - Signed-off-by: Karel Zak - -diff -up util-linux-ng-2.18/login-utils/agetty.c.kzak util-linux-ng-2.18/login-utils/agetty.c ---- util-linux-ng-2.18/login-utils/agetty.c.kzak 2010-10-22 21:51:31.000000000 +0200 -+++ util-linux-ng-2.18/login-utils/agetty.c 2010-10-22 21:51:31.000000000 +0200 -@@ -715,7 +715,7 @@ termio_init(tp, speed, op) - - tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; - -- tp->c_cflag = CS8 | HUPCL | CREAD; -+ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); - - /* Note that the speed is stored in the c_cflag termios field, so we have - * set the speed always when the cflag se reseted. diff --git a/util-linux-ng-2.18-fsck-wholedisk.patch b/util-linux-ng-2.18-fsck-wholedisk.patch deleted file mode 100644 index 3718255..0000000 --- a/util-linux-ng-2.18-fsck-wholedisk.patch +++ /dev/null @@ -1,510 +0,0 @@ -diff -up util-linux-ng-2.18/fsck/fsck.8.kzak util-linux-ng-2.18/fsck/fsck.8 ---- util-linux-ng-2.18/fsck/fsck.8.kzak 2010-06-30 12:51:35.000000000 +0200 -+++ util-linux-ng-2.18/fsck/fsck.8 2010-10-26 23:55:30.000000000 +0200 -@@ -7,7 +7,7 @@ - fsck \- check and repair a Linux file system - .SH SYNOPSIS - .B fsck --.RB [ \-sAVRTMNP ] -+.RB [ \-lsAVRTMNP ] - .RB [ \-C - .RI [ fd ]] - .RB [ \-t -@@ -80,6 +80,17 @@ variable. Please see the file system-sp - further details. - .SH OPTIONS - .TP -+.B \-l -+Lock whole-disk device by exclusive -+.BR flock (2). -+This option can be used with one device only (e.g. -A and -l are mutually -+exclusive). This option is recommended when more -+.B fsck (8) -+instances are executed in the same time. The option is ignored when used for -+multiple devices or for non-rotating disk. The fsck does not lock underlying -+devices if executed to check stacked devices (e.g. MD or DM) -- this feature is -+not implemented yet. -+.TP - .B \-s - Serialize - .B fsck -@@ -200,6 +211,11 @@ If there are multiple filesystems with t - fsck will attempt to check them in parallel, although it will avoid running - multiple filesystem checks on the same physical disk. - .sp -+.B fsck -+does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other -+device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is -+used to detemine dependencies between devices. -+.sp - Hence, a very common configuration in - .I /etc/fstab - files is to set the root filesystem to have a -@@ -366,10 +382,10 @@ program's behavior is affected by the fo - .B FSCK_FORCE_ALL_PARALLEL - If this environment variable is set, - .B fsck --will attempt to run all of the specified filesystems in parallel, --regardless of whether the filesystems appear to be on the same --device. (This is useful for RAID systems or high-end storage systems --such as those sold by companies such as IBM or EMC.) -+will attempt to run all of the specified filesystems in parallel, regardless of -+whether the filesystems appear to be on the same device. (This is useful for -+RAID systems or high-end storage systems such as those sold by companies such -+as IBM or EMC.) Note that the fs_passno value is still used. - .TP - .B FSCK_MAX_INST - This environment variable will limit the maximum number of file system -diff -up util-linux-ng-2.18/fsck/fsck.c.kzak util-linux-ng-2.18/fsck/fsck.c ---- util-linux-ng-2.18/fsck/fsck.c.kzak 2010-05-19 23:36:23.000000000 +0200 -+++ util-linux-ng-2.18/fsck/fsck.c 2010-10-26 23:55:30.000000000 +0200 -@@ -31,6 +31,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -42,6 +44,8 @@ - #include - #include - #include -+#include -+#include - - #include "fsprobe.h" - -@@ -85,6 +89,7 @@ char *devices[MAX_DEVICES]; - char *args[MAX_ARGS]; - int num_devices, num_args; - -+int lockdisk = 0; - int verbose = 0; - int doall = 0; - int noexecute = 0; -@@ -214,11 +219,97 @@ static void parse_escape(char *word) - *q = 0; - } - -+static dev_t get_disk(const char *device) -+{ -+ struct stat st; -+ dev_t disk; -+ -+ if (!stat(device, &st) && -+ !blkid_devno_to_wholedisk(st.st_rdev, NULL, 0, &disk)) -+ return disk; -+ -+ return 0; -+} -+ -+static int is_irrotational_disk(dev_t disk) -+{ -+ char path[PATH_MAX]; -+ FILE *f; -+ int rc, x; -+ -+ rc = snprintf(path, sizeof(path), -+ "/sys/dev/block/%d:%d/queue/rotational", -+ major(disk), minor(disk)); -+ -+ if (rc < 0 || rc + 1 > sizeof(path)) -+ return 0; -+ -+ f = fopen(path, "r"); -+ if (!f) -+ return 0; -+ -+ rc = fscanf(f, "%u", &x); -+ fclose(f); -+ -+ return rc == 1 ? !x : 0; -+} -+ -+static void lock_disk(struct fsck_instance *inst) -+{ -+ dev_t disk = inst->fs->disk ? : get_disk(inst->fs->device); -+ char *diskname; -+ -+ if (!disk || is_irrotational_disk(disk)) -+ return; -+ -+ diskname = blkid_devno_to_devname(disk); -+ if (!diskname) -+ return; -+ -+ if (verbose) -+ printf(_("Locking disk %s ... "), diskname); -+ -+ inst->lock = open(diskname, O_CLOEXEC | O_RDONLY); -+ if (inst->lock >= 0) { -+ int rc = -1; -+ -+ /* inform users that we're waiting on the lock */ -+ if (verbose && -+ (rc = flock(inst->lock, LOCK_EX | LOCK_NB)) != 0 && -+ errno == EWOULDBLOCK) -+ printf(_("(waiting) ")); -+ -+ if (rc != 0 && flock(inst->lock, LOCK_EX) != 0) { -+ close(inst->lock); /* failed */ -+ inst->lock = -1; -+ } -+ } -+ -+ if (verbose) -+ printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed")); -+ -+ free(diskname); -+ return; -+} -+ -+static void unlock_disk(struct fsck_instance *inst) -+{ -+ if (inst->lock >= 0) { -+ /* explicitly unlock, don't rely on close(), maybe some library -+ * (e.g. liblkid) has still open the device. -+ */ -+ flock(inst->lock, LOCK_UN); -+ close(inst->lock); -+ } -+} -+ -+ -+ - static void free_instance(struct fsck_instance *i) - { -+ if (lockdisk) -+ unlock_disk(i); - free(i->prog); -- free(i->device); -- free(i->base_device); - free(i); - return; - } -@@ -240,6 +331,8 @@ static struct fs_info *create_fs_device( - fs->passno = passno; - fs->flags = 0; - fs->next = NULL; -+ fs->disk = 0; -+ fs->stacked = 0; - - if (!filesys_info) - filesys_info = fs; -@@ -414,8 +507,7 @@ static int progress_active(NOARGS) - * Execute a particular fsck program, and link it into the list of - * child processes we are waiting for. - */ --static int execute(const char *type, const char *device, const char *mntpt, -- int interactive) -+static int execute(const char *type, struct fs_info *fs, int interactive) - { - char *s, *argv[80], prog[80]; - int argc, i; -@@ -452,7 +544,7 @@ static int execute(const char *type, con - } - } - -- argv[argc++] = string_copy(device); -+ argv[argc++] = string_copy(fs->device); - argv[argc] = 0; - - s = find_fsck(prog); -@@ -464,12 +556,19 @@ static int execute(const char *type, con - - if (verbose || noexecute) { - printf("[%s (%d) -- %s] ", s, num_running, -- mntpt ? mntpt : device); -+ fs->mountpt ? fs->mountpt : fs->device); - for (i=0; i < argc; i++) - printf("%s ", argv[i]); - printf("\n"); - } - -+ -+ inst->fs = fs; -+ inst->lock = -1; -+ -+ if (lockdisk) -+ lock_disk(inst); -+ - /* Fork and execute the correct program. */ - if (noexecute) - pid = -1; -@@ -492,8 +591,6 @@ static int execute(const char *type, con - inst->pid = pid; - inst->prog = string_copy(prog); - inst->type = string_copy(type); -- inst->device = string_copy(device); -- inst->base_device = base_device(device); - inst->start_time = time(0); - inst->next = NULL; - -@@ -597,12 +694,12 @@ static struct fsck_instance *wait_one(in - } else { - printf(_("Warning... %s for device %s exited " - "with signal %d.\n"), -- inst->prog, inst->device, sig); -+ inst->prog, inst->fs->device, sig); - status = EXIT_ERROR; - } - } else { - printf(_("%s %s: status is %x, should never happen.\n"), -- inst->prog, inst->device, status); -+ inst->prog, inst->fs->device, status); - status = EXIT_ERROR; - } - inst->exit_status = status; -@@ -641,7 +738,7 @@ ret_inst: - instance_list = inst->next; - if (verbose > 1) - printf(_("Finished with %s (exit status %d)\n"), -- inst->device, inst->exit_status); -+ inst->fs->device, inst->exit_status); - num_running--; - return inst; - } -@@ -698,7 +795,7 @@ static void fsck_device(struct fs_info * - type = DEFAULT_FSTYPE; - - num_running++; -- retval = execute(type, fs->device, fs->mountpt, interactive); -+ retval = execute(type, fs, interactive); - if (retval) { - fprintf(stderr, _("%s: Error %d while executing fsck.%s " - "for %s\n"), progname, retval, type, fs->device); -@@ -924,40 +1021,70 @@ static int ignore(struct fs_info *fs) - return 0; - } - -+static int count_slaves(dev_t disk) -+{ -+ DIR *dir; -+ struct dirent *dp; -+ char dirname[PATH_MAX]; -+ int count = 0; -+ -+ snprintf(dirname, sizeof(dirname), -+ "/sys/dev/block/%u:%u/slaves/", -+ major(disk), minor(disk)); -+ -+ if (!(dir = opendir(dirname))) -+ return -1; -+ -+ while ((dp = readdir(dir)) != 0) { -+#ifdef _DIRENT_HAVE_D_TYPE -+ if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_LNK) -+ continue; -+#endif -+ if (dp->d_name[0] == '.' && -+ ((dp->d_name[1] == 0) || -+ ((dp->d_name[1] == '.') && (dp->d_name[2] == 0)))) -+ continue; -+ -+ count++; -+ } -+ closedir(dir); -+ return count; -+} -+ - /* - * Returns TRUE if a partition on the same disk is already being - * checked. - */ --static int device_already_active(char *device) -+static int disk_already_active(struct fs_info *fs) - { - struct fsck_instance *inst; -- char *base; - - if (force_all_parallel) - return 0; - --#ifdef BASE_MD -- /* Don't check a soft raid disk with any other disk */ -- if (instance_list && -- (!strncmp(instance_list->device, BASE_MD, sizeof(BASE_MD)-1) || -- !strncmp(device, BASE_MD, sizeof(BASE_MD)-1))) -+ if (instance_list && instance_list->fs->stacked) -+ /* any instance for a stacked device is already running */ - return 1; --#endif - -- base = base_device(device); -+ if (!fs->disk) { -+ fs->disk = get_disk(fs->device); -+ if (fs->disk) -+ fs->stacked = count_slaves(fs->disk); -+ } -+ - /* - * If we don't know the base device, assume that the device is - * already active if there are any fsck instances running. -+ * -+ * Don't check a stacked device with any other disk too. - */ -- if (!base) -+ if (!fs->disk || fs->stacked) - return (instance_list != 0); -+ - for (inst = instance_list; inst; inst = inst->next) { -- if (!inst->base_device || !strcmp(base, inst->base_device)) { -- free(base); -+ if (!inst->fs->disk || fs->disk == inst->fs->disk) - return 1; -- } - } -- free(base); - return 0; - } - -@@ -1038,7 +1165,7 @@ static int check_all(NOARGS) - * already been spawned, then we need to defer - * this to another pass. - */ -- if (device_already_active(fs->device)) { -+ if (disk_already_active(fs)) { - pass_done = 0; - continue; - } -@@ -1188,6 +1315,9 @@ static void PRS(int argc, char *argv[]) - } - } - break; -+ case 'l': -+ lockdisk++; -+ break; - case 'V': - verbose++; - break; -@@ -1298,6 +1428,12 @@ int main(int argc, char *argv[]) - if ((num_devices == 1) || (serialize)) - interactive = 1; - -+ if (lockdisk && (doall || num_devices > 1)) { -+ fprintf(stderr, _("%s: the -l option can be used with one " -+ "device only -- ignore\n"), progname); -+ lockdisk = 0; -+ } -+ - /* If -A was specified ("check all"), do that! */ - if (doall) - return check_all(); -diff -up util-linux-ng-2.18/fsck/fsck.h.kzak util-linux-ng-2.18/fsck/fsck.h ---- util-linux-ng-2.18/fsck/fsck.h.kzak 2010-03-18 23:11:23.000000000 +0100 -+++ util-linux-ng-2.18/fsck/fsck.h 2010-10-26 23:55:30.000000000 +0200 -@@ -44,6 +44,8 @@ struct fs_info { - int freq; - int passno; - int flags; -+ dev_t disk; -+ int stacked; - struct fs_info *next; - }; - -@@ -56,12 +58,12 @@ struct fs_info { - struct fsck_instance { - int pid; - int flags; -+ int lock; /* flock()ed whole disk file descriptor or -1 */ - int exit_status; - time_t start_time; - char * prog; - char * type; -- char * device; -- char * base_device; -+ struct fs_info *fs; - struct fsck_instance *next; - }; - -diff -up util-linux-ng-2.18/fsck/Makefile.am.kzak util-linux-ng-2.18/fsck/Makefile.am ---- util-linux-ng-2.18/fsck/Makefile.am.kzak 2010-05-24 12:33:46.000000000 +0200 -+++ util-linux-ng-2.18/fsck/Makefile.am 2010-10-26 23:55:30.000000000 +0200 -@@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Mak - sbin_PROGRAMS = fsck - dist_man_MANS = fsck.8 - --fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ -+fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c - fsck_LDADD = - fsck_CFLAGS = $(AM_CFLAGS) -diff -up util-linux-ng-2.18/fsck/Makefile.in.kzak util-linux-ng-2.18/fsck/Makefile.in ---- util-linux-ng-2.18/fsck/Makefile.in.kzak 2010-10-26 23:56:04.000000000 +0200 -+++ util-linux-ng-2.18/fsck/Makefile.in 2010-10-26 23:56:15.000000000 +0200 -@@ -62,9 +62,8 @@ CONFIG_CLEAN_FILES = - CONFIG_CLEAN_VPATH_FILES = - am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" - PROGRAMS = $(sbin_PROGRAMS) --am_fsck_OBJECTS = fsck-base_device.$(OBJEXT) fsck-fsck.$(OBJEXT) \ -- fsck-ismounted.$(OBJEXT) fsck-fsprobe.$(OBJEXT) \ -- fsck-canonicalize.$(OBJEXT) -+am_fsck_OBJECTS = fsck-fsck.$(OBJEXT) fsck-ismounted.$(OBJEXT) \ -+ fsck-fsprobe.$(OBJEXT) fsck-canonicalize.$(OBJEXT) - fsck_OBJECTS = $(am_fsck_OBJECTS) - am__DEPENDENCIES_1 = - @BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -@@ -204,6 +203,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PERL = @PERL@ -@@ -315,7 +315,7 @@ ul_libmount_la = $(top_builddir)/shlibs/ - # mount.h is generated by ./configure script and stored in build directory - ul_libmount_incdir = $(ul_libmount_builddir) - dist_man_MANS = fsck.8 --fsck_SOURCES = base_device.c fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ -+fsck_SOURCES = fsck.c fsck.h $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/canonicalize.c - - fsck_LDADD = $(am__append_1) $(am__append_3) -@@ -407,7 +407,6 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-base_device.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-canonicalize.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsck.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsck-fsprobe.Po@am__quote@ -@@ -437,22 +436,6 @@ distclean-compile: - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - --fsck-base_device.o: base_device.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.o -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po --@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.o `test -f 'base_device.c' || echo '$(srcdir)/'`base_device.c -- --fsck-base_device.obj: base_device.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-base_device.obj -MD -MP -MF $(DEPDIR)/fsck-base_device.Tpo -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-base_device.Tpo $(DEPDIR)/fsck-base_device.Po --@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base_device.c' object='fsck-base_device.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -c -o fsck-base_device.obj `if test -f 'base_device.c'; then $(CYGPATH_W) 'base_device.c'; else $(CYGPATH_W) '$(srcdir)/base_device.c'; fi` -- - fsck-fsck.o: fsck.c - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsck_CFLAGS) $(CFLAGS) -MT fsck-fsck.o -MD -MP -MF $(DEPDIR)/fsck-fsck.Tpo -c -o fsck-fsck.o `test -f 'fsck.c' || echo '$(srcdir)/'`fsck.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fsck-fsck.Tpo $(DEPDIR)/fsck-fsck.Po -diff -up util-linux-ng-2.18/Makefile.am.kzak util-linux-ng-2.18/Makefile.am ---- util-linux-ng-2.18/Makefile.am.kzak 2010-03-18 23:11:23.000000000 +0100 -+++ util-linux-ng-2.18/Makefile.am 2010-10-26 23:55:30.000000000 +0200 -@@ -30,8 +30,10 @@ SUBDIRS += mount - endif - - if BUILD_FSCK -+if BUILD_LIBBLKID - SUBDIRS += fsck - endif -+endif - - ACLOCAL_AMFLAGS = -I m4 - diff --git a/util-linux-ng-60-raw.rules b/util-linux-ng-60-raw.rules deleted file mode 100644 index 2279c91..0000000 --- a/util-linux-ng-60-raw.rules +++ /dev/null @@ -1,11 +0,0 @@ -# This file and interface are deprecated. -# Applications needing raw device access should open regular -# block devices with O_DIRECT. -# -# Enter raw device bindings here. -# -# An example would be: -# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N" -# to bind /dev/raw/raw1 to /dev/sda, or -# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m" -# to bind /dev/raw/raw2 to the device with major 8, minor 1. diff --git a/util-linux-ng-chsh-chfn.pamd b/util-linux-ng-chsh-chfn.pamd deleted file mode 100644 index 2dbc0aa..0000000 --- a/util-linux-ng-chsh-chfn.pamd +++ /dev/null @@ -1,6 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth include system-auth -account include system-auth -password include system-auth -session include system-auth diff --git a/util-linux-ng-login.pamd b/util-linux-ng-login.pamd deleted file mode 100644 index 2c9a3a2..0000000 --- a/util-linux-ng-login.pamd +++ /dev/null @@ -1,16 +0,0 @@ -#%PAM-1.0 -auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so -auth include system-auth -account required pam_nologin.so -account include system-auth -password include system-auth -# pam_selinux.so close should be the first session rule -session required pam_selinux.so close -session required pam_loginuid.so -session optional pam_console.so -# pam_selinux.so open should only be followed by sessions to be executed in the user context -session required pam_selinux.so open -session required pam_namespace.so -session optional pam_keyinit.so force revoke -session include system-auth --session optional pam_ck_connector.so diff --git a/util-linux-ng-remote.pamd b/util-linux-ng-remote.pamd deleted file mode 100644 index d8f83f3..0000000 --- a/util-linux-ng-remote.pamd +++ /dev/null @@ -1,14 +0,0 @@ -#%PAM-1.0 -auth required pam_securetty.so -auth include password-auth -account required pam_nologin.so -account include password-auth -password include password-auth -# pam_selinux.so close should be the first session rule -session required pam_selinux.so close -session required pam_loginuid.so -# pam_selinux.so open should only be followed by sessions to be executed in the user context -session required pam_selinux.so open -session required pam_namespace.so -session optional pam_keyinit.so force revoke -session include password-auth diff --git a/util-linux-ng.spec b/util-linux-ng.spec deleted file mode 100644 index b71bacf..0000000 --- a/util-linux-ng.spec +++ /dev/null @@ -1,2314 +0,0 @@ -### Header -Summary: A collection of basic system utilities -Name: util-linux-ng -Version: 2.18 -Release: 5%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain -Group: System Environment/Base -URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng - -%define upstream_version %{version} - -### Features -%if 0%{?rhel} -%define include_raw 1 -%else -%define include_raw 0 -%endif - -### Macros -%define floppyver 0.16 -%define cytune_archs %{ix86} alpha armv4l - -### Paths -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -### Dependences -BuildRequires: audit-libs-devel >= 1.0.6 -BuildRequires: gettext-devel -BuildRequires: libselinux-devel -BuildRequires: ncurses-devel -BuildRequires: pam-devel -BuildRequires: texinfo -BuildRequires: zlib-devel -BuildRequires: popt-devel -BuildRequires: libutempter-devel - -### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-%{upstream_version}.tar.bz2 -Source1: util-linux-ng-login.pamd -Source2: util-linux-ng-remote.pamd -Source3: util-linux-ng-chsh-chfn.pamd -Source4: util-linux-ng-60-raw.rules -Source5: mount.tmpfs -Source8: nologin.c -Source9: nologin.8 -Source10: uuidd.init -Source11: http://dl.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 - -### Obsoletes & Conflicts & Provides -%ifarch alpha -Conflicts: initscripts <= 4.58 -%endif -Conflicts: kernel < 2.2.12-7 -# old versions of e2fsprogs contain fsck, uuidgen -Conflicts: e2fsprogs < 1.41.8-5 - -# old versions of util-linux have been splited to more sub-packages -Obsoletes: mount < 2.11, losetup < 2.11 -Provides: mount = %{version}-%{release}, losetup = %{version}-%{release} -# Robert Love's schedutils have been merged to util-linux-2.13-pre1 -Obsoletes: schedutils < 1.5 -Provides: schedutils = %{version}-%{release} -# fork and rename from util-linux to util-linux-ng -Obsoletes: util-linux < 2.13.1 -Provides: util-linux = %{version}-%{release} - -# setarch merge in util-linux-ng-2.13 -%ifarch sparc sparcv9 sparc64 -Obsoletes: sparc32 -%endif -Obsoletes: setarch < 2.1 -Provides: setarch = %{version}-%{release} - -Requires(preun): /sbin/install-info -Requires(post): /sbin/install-info -Requires(post): coreutils -Requires: pam >= 1.0.90, /etc/pam.d/system-auth -Requires: audit-libs >= 1.0.6 -Requires: libuuid = %{version}-%{release} -Requires: libblkid = %{version}-%{release} -Requires: libmount = %{version}-%{release} - -%if %{include_raw} -Requires: udev -%endif - -### Floppy patches (Fedora/RHEL specific) -### -# add a missing header -Patch0: util-linux-ng-2.13-floppy-locale.patch -# add note about ATAPI IDE floppy to fdformat.8 -Patch1: util-linux-ng-2.13-fdformat-man-ide.patch -# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 -Patch2: util-linux-ng-2.13-floppy-generic.patch - -### Fedora/RHEL specific patches -- need to die! -### -# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) -Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch -# /etc/blkid.tab --> /etc/blkid/blkid.tab -Patch5: util-linux-ng-2.16-blkid-cachefile.patch - -### Ready for upstream? -### -# 151635 - makeing /var/log/lastlog -Patch7: util-linux-ng-2.13-login-lastlog.patch -# 231192 - ipcs is not printing correct values on pLinux -Patch8: util-linux-ng-2.15-ipcs-32bit.patch - -### Upstream Patches -### -# 623685 - please extend agetty to not require a baud rate to be specified -# 645640 - new "-s" parameter parsing in agetty does not work -Patch9: util-linux-ng-2.18-agetty-baudrate.patch -# 598631 - shutdown, reboot, halt and C-A-D don't work -Patch10: util-linux-ng-2.18-agetty-clocal.patch -# 618957 - ISO images listed in fstab are mounted twice at boot -Patch11: util-linux-ng-2.17-mount-loopdev.patch -# backport from upstream, add -l (lock) support to fsck, requested by systemd -Patch12: util-linux-ng-2.18-fsck-wholedisk.patch - -%description -The util-linux-ng package contains a large variety of low-level system -utilities that are necessary for a Linux system to function. Among -others, Util-linux contains the fdisk configuration tool and the login -program. - - -%package -n libmount -Summary: Device mounting library -Group: Development/Libraries -License: LGPLv2+ -Requires: libblkid = %{version}-%{release} - -%description -n libmount -This is the device mounting library, part of util-linux-ng. - - -%package -n libmount-devel -Summary: Device mounting library -Group: Development/Libraries -License: LGPLv2+ -Requires: libmount = %{version}-%{release} -Requires: pkgconfig - -%description -n libmount-devel -This is the device mounting development library and headers, -part of util-linux-ng. - - -%package -n libblkid -Summary: Block device ID library -Group: Development/Libraries -License: LGPLv2+ -Requires: libuuid = %{version}-%{release} - -%description -n libblkid -This is block device identification library, part of util-linux-ng. - - -%package -n libblkid-devel -Summary: Block device ID library -Group: Development/Libraries -License: LGPLv2+ -Requires: libblkid = %{version}-%{release} -Requires: pkgconfig - -%description -n libblkid-devel -This is the block device identification development library and headers, -part of util-linux-ng. - - -%package -n libuuid -Summary: Universally unique ID library -Group: Development/Libraries -License: BSD - -%description -n libuuid -This is the universally unique ID library, part of e2fsprogs. - -The libuuid library generates and parses 128-bit universally unique -id's (UUID's). A UUID is an identifier that is unique across both -space and time, with respect to the space of all UUIDs. A UUID can -be used for multiple purposes, from tagging objects with an extremely -short lifetime, to reliably identifying very persistent objects -across a network. - -See also the "uuid" package, which is a separate implementation. - -%package -n libuuid-devel -Summary: Universally unique ID library -Group: Development/Libraries -License: BSD -Requires: libuuid = %{version}-%{release} -Requires: pkgconfig - -%description -n libuuid-devel -This is the universally unique ID development library and headers, -part of e2fsprogs. - -The libuuid library generates and parses 128-bit universally unique -id's (UUID's). A UUID is an identifier that is unique across both -space and time, with respect to the space of all UUIDs. A UUID can -be used for multiple purposes, from tagging objects with an extremely -short lifetime, to reliably identifying very persistent objects -across a network. - -See also the "uuid-devel" package, which is a separate implementation. - - -%package -n uuidd -Summary: Helper daemon to guarantee uniqueness of time-based UUIDs -Group: System Environment/Daemons -Requires: libuuid = %{version}-%{release} -License: GPLv2 -Requires(pre): shadow-utils - -%description -n uuidd -The uuidd package contains a userspace daemon (uuidd) which guarantees -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - - -%prep -%setup -q -a 11 -n %{name}-%{upstream_version} -cp %{SOURCE8} %{SOURCE9} . - -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 - -%build -unset LINGUAS || : - -export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" -export SUID_CFLAGS="-fpie" -export SUID_LDFLAGS="-pie" -%configure \ - --bindir=/bin \ - --sbindir=/sbin \ - --libdir=/%{_lib} \ - --disable-silent-rules \ - --disable-wall \ - --enable-partx \ - --enable-login-utils \ - --enable-kill \ - --enable-write \ -%if %{include_raw} - --enable-raw \ -%endif - --with-selinux \ - --with-audit \ - --with-utempter \ - --disable-makeinstall-chown - -# build util-linux-ng -make %{?_smp_mflags} - -# build floppy stuff -pushd floppy-%{floppyver} -%configure --disable-gtk2 -make %{?_smp_mflags} -popd - -# build nologin -gcc $CFLAGS -o nologin nologin.c - -%install -rm -rf ${RPM_BUILD_ROOT} -mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin} -mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -mkdir -p ${RPM_BUILD_ROOT}%{_infodir} -mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} -mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps,blkid} -mkdir -p ${RPM_BUILD_ROOT}/var/log -touch ${RPM_BUILD_ROOT}/var/log/lastlog -chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog - -# install util-linux-ng -make install DESTDIR=${RPM_BUILD_ROOT} - -# inslall floppy stuff -pushd floppy-%{floppyver} -make install DESTDIR=${RPM_BUILD_ROOT} -popd - -# install nologin -install -m 755 nologin ${RPM_BUILD_ROOT}/sbin -install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 - -%if %{include_raw} -echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 -{ - # see RH bugzilla #216664 - mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d - pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d - install -m 644 %{SOURCE4} ./60-raw.rules - popd -} -%endif - -# Our own initscript for uuidd -install -D -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/uuidd -# And a dirs uuidd needs that the makefiles don't create -install -d ${RPM_BUILD_ROOT}/var/run/uuidd -install -d ${RPM_BUILD_ROOT}/var/lib/libuuid - -# libtool junk -rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la - -%ifarch sparc sparc64 sparcv9 -rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -cat << E-O-F > ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -#!/bin/sh -# this should be %{_bindir}/sunhostid or somesuch. -# Copyright 1999 Peter Jones, . -# GPL and all that good stuff apply. -( -idprom=\`cat /proc/openprom/idprom\` -echo \$idprom|dd bs=1 skip=2 count=2 -echo \$idprom|dd bs=1 skip=27 count=6 -echo -) 2>/dev/null -E-O-F -chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -%endif - -# PAM settings -{ - pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d - install -m 644 %{SOURCE1} ./login - install -m 644 %{SOURCE2} ./remote - install -m 644 %{SOURCE3} ./chsh - install -m 644 %{SOURCE3} ./chfn - popd -} - -ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock -ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock -echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 - -# install tmpfs mount helper -pushd ${RPM_BUILD_ROOT}/sbin -install -m 755 %{SOURCE5} ./mount.tmpfs -popd - -# unsupported on %{ix86} alpha armv4l -%ifnarch %cytune_archs -rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* -%endif - -# unsupported on s390 -%ifarch s390 s390x -for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ - %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ - /sbin/{hwclock,clock} \ - /usr/sbin/hwclock \ - %{_mandir}/man8/{hwclock,clock}.8*; do - - rm -f $RPM_BUILD_ROOT$I -done -%endif - -# unsupported on SPARCs -%ifarch sparc sparcv9 sparc64 -for I in /sbin/sfdisk \ - %{_mandir}/man8/sfdisk.8* \ - %doc fdisk/sfdisk.examples \ - /sbin/cfdisk \ - %{_mandir}/man8/cfdisk.8*; do - - rm -f $RPM_BUILD_ROOT$I -done -%endif - -# deprecated commands -for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ - /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /sbin/shutdown /usr/sbin/vipw /usr/sbin/vigr; do - rm -f $RPM_BUILD_ROOT$I -done - -# deprecated man pages -for I in man1/chkdupexe.1 man1/line.1 man1/pg.1 man1/newgrp.1 \ - man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 \ - man8/vipw.8 man8/vigr; do - rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* -done - -# deprecated docs -for I in text-utils/README.pg misc-utils/README.reset floppy-%{floppyver}/README.html; do - rm -rf $I -done - -# rename docs -mv floppy-%{floppyver}/README floppy-%{floppyver}/README.floppy - -# we install getopt/getopt-*.{bash,tcsh} as doc files -chmod 644 getopt/getopt-*.{bash,tcsh} -rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* -rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt - -ln -sf ../../bin/kill $RPM_BUILD_ROOT%{_bindir}/kill - -# /usr/sbin -> /sbin -for I in addpart delpart partx; do - if [ -e $RPM_BUILD_ROOT/usr/sbin/$I ]; then - mv $RPM_BUILD_ROOT/usr/sbin/$I $RPM_BUILD_ROOT/sbin/$I - fi -done - -# /usr/bin -> /bin -for I in taskset; do - if [ -e $RPM_BUILD_ROOT/usr/bin/$I ]; then - mv $RPM_BUILD_ROOT/usr/bin/$I $RPM_BUILD_ROOT/bin/$I - fi -done - -# /sbin -> /bin -for I in raw; do - if [ -e $RPM_BUILD_ROOT/sbin/$I ]; then - mv $RPM_BUILD_ROOT/sbin/$I $RPM_BUILD_ROOT/bin/$I - fi -done - -# omit info/dir file -rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir - -# remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a - -# find MO files -%find_lang %name - -# the files section supports only one -f option... -mv %{name}.lang %{name}.files - -# create list of setarch(8) symlinks -find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)$" \ - -printf "%{_bindir}/%f\n" >> %{name}.files - -find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ - -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)\.8.*" \ - -printf "%{_mandir}/man8/%f*\n" >> %{name}.files - -%clean -[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} - -%post -/sbin/install-info %{_infodir}/ipc.info %{_infodir}/dir || : -# only for minimal buildroots without /var/log -[ -d /var/log ] || /bin/mkdir -p /var/log -/bin/touch /var/log/lastlog -/bin/chown root:root /var/log/lastlog -/bin/chmod 0644 /var/log/lastlog -# Fix the file context, do not use restorecon -if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - SECXT=$( /usr/sbin/matchpathcon -n /var/log/lastlog 2> /dev/null ) - if [ -n "$SECXT" ]; then - # Selinux enabled, but without policy? It's true for buildroots - # without selinux stuff on host machine with enabled selinux. - # We don't want to use any RPM dependence on selinux policy for - # matchpathcon(2). SELinux policy should be optional. - /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : - fi -fi - -%preun -if [ "$1" = 0 ]; then - /sbin/install-info --del %{_infodir}/ipc.info %{_infodir}/dir || : -fi -exit 0 - - -%post -n libblkid -/sbin/ldconfig -[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /etc/blkid/blkid.tab || : -[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /etc/blkid/blkid.tab.old || : - -%postun -n libblkid -p /sbin/ldconfig - -%post -n libuuid -p /sbin/ldconfig -%postun -n libuuid -p /sbin/ldconfig - -%post -n libmount -p /sbin/ldconfig -%postun -n libmount -p /sbin/ldconfig - -%pre -n uuidd -getent group uuidd >/dev/null || groupadd -r uuidd -getent passwd uuidd >/dev/null || \ -useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ - -c "UUID generator helper daemon" uuidd -exit 0 - -%post -n uuidd -/sbin/chkconfig --add uuidd - -%preun -n uuidd -if [ "$1" = 0 ]; then - /sbin/service uuidd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del uuidd -fi - -%files -f %{name}.files -%defattr(-,root,root) -%doc */README.* NEWS AUTHORS licenses/* README* -%doc getopt/getopt-*.{bash,tcsh} - -%config(noreplace) %{_sysconfdir}/pam.d/chfn -%config(noreplace) %{_sysconfdir}/pam.d/chsh -%config(noreplace) %{_sysconfdir}/pam.d/login -%config(noreplace) %{_sysconfdir}/pam.d/remote - -%attr(4755,root,root) /bin/mount -%attr(4755,root,root) /bin/umount -%attr(755,root,root) /sbin/mount.tmpfs -%attr(755,root,root) /bin/login -%attr(4711,root,root) %{_bindir}/chfn -%attr(4711,root,root) %{_bindir}/chsh -%attr(2755,root,tty) %{_bindir}/write - -%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog - -/bin/dmesg -/bin/findmnt -/bin/kill -/bin/more -/bin/taskset -/sbin/addpart -/sbin/agetty -/sbin/blkid -/sbin/blockdev -/sbin/ctrlaltdel -/sbin/delpart -/sbin/fdisk -/sbin/findfs -/sbin/fsck -/sbin/fsck.cramfs -/sbin/fsfreeze -/sbin/losetup -/sbin/mkfs -/sbin/mkfs.cramfs -/sbin/mkswap -/sbin/nologin -/sbin/partx -/sbin/pivot_root -/sbin/swaplabel -/sbin/swapoff -/sbin/swapon -/sbin/switch_root -/sbin/wipefs - -%{_bindir}/cal -%{_bindir}/chrt -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%{_bindir}/ddate -%{_bindir}/fallocate -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%{_bindir}/kill -%{_bindir}/logger -%{_bindir}/look -%{_bindir}/lscpu -%{_bindir}/mcookie -%{_bindir}/namei -%{_bindir}/rename -%{_bindir}/renice -%{_bindir}/rev -%{_bindir}/script -%{_bindir}/scriptreplay -%{_bindir}/setarch -%{_bindir}/setsid -%{_bindir}/setterm -%{_bindir}/tailf -%{_bindir}/ul -%{_bindir}/unshare -%{_bindir}/uuidgen -%{_bindir}/whereis - -%{_sbindir}/ldattach -%{_sbindir}/readprofile -%{_sbindir}/rtcwake - -%{_infodir}/ipc.info* - -%{_mandir}/man1/cal.1* -%{_mandir}/man1/chfn.1* -%{_mandir}/man1/chrt.1* -%{_mandir}/man1/chsh.1* -%{_mandir}/man1/col.1* -%{_mandir}/man1/colcrt.1* -%{_mandir}/man1/colrm.1* -%{_mandir}/man1/column.1* -%{_mandir}/man1/ddate.1* -%{_mandir}/man1/dmesg.1* -%{_mandir}/man1/fallocate.1* -%{_mandir}/man1/flock.1* -%{_mandir}/man1/getopt.1* -%{_mandir}/man1/hexdump.1* -%{_mandir}/man1/ionice.1* -%{_mandir}/man1/ipcmk.1* -%{_mandir}/man1/ipcrm.1* -%{_mandir}/man1/ipcs.1* -%{_mandir}/man1/kill.1* -%{_mandir}/man1/logger.1* -%{_mandir}/man1/login.1* -%{_mandir}/man1/look.1* -%{_mandir}/man1/lscpu.1* -%{_mandir}/man1/mcookie.1* -%{_mandir}/man1/more.1* -%{_mandir}/man1/namei.1* -%{_mandir}/man1/readprofile.1* -%{_mandir}/man1/rename.1* -%{_mandir}/man1/renice.1* -%{_mandir}/man1/rev.1* -%{_mandir}/man1/script.1* -%{_mandir}/man1/scriptreplay.1* -%{_mandir}/man1/setsid.1* -%{_mandir}/man1/setterm.1* -%{_mandir}/man1/tailf.1* -%{_mandir}/man1/taskset.1* -%{_mandir}/man1/ul.1* -%{_mandir}/man1/unshare.1* -%{_mandir}/man1/uuidgen.1* -%{_mandir}/man1/whereis.1* -%{_mandir}/man1/write.1* - -%{_mandir}/man5/fstab.5* - -%{_mandir}/man8/addpart.8* -%{_mandir}/man8/agetty.8* -%{_mandir}/man8/blkid.8* -%{_mandir}/man8/blockdev.8* -%{_mandir}/man8/ctrlaltdel.8* -%{_mandir}/man8/delpart.8* -%{_mandir}/man8/fdisk.8* -%{_mandir}/man8/findfs.8* -%{_mandir}/man8/findmnt.8* -%{_mandir}/man8/fsck.8* -%{_mandir}/man8/fsfreeze.8* -%{_mandir}/man8/isosize.8* -%{_mandir}/man8/ldattach.8* -%{_mandir}/man8/losetup.8* -%{_mandir}/man8/mkfs.8* -%{_mandir}/man8/mkswap.8* -%{_mandir}/man8/mount.8* -%{_mandir}/man8/nologin.8* -%{_mandir}/man8/partx.8* -%{_mandir}/man8/pivot_root.8* -%{_mandir}/man8/rtcwake.8* -%{_mandir}/man8/setarch.8* -%{_mandir}/man8/swaplabel.8* -%{_mandir}/man8/swapoff.8* -%{_mandir}/man8/swapon.8* -%{_mandir}/man8/switch_root.8* -%{_mandir}/man8/umount.8* -%{_mandir}/man8/wipefs.8* - -%if %{include_raw} -/bin/raw -%config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules -%{_mandir}/man8/raw.8* -%{_mandir}/man8/rawdevices.8* -%endif - -%ifnarch s390 s390x -/sbin/clock -/sbin/hwclock -%{_bindir}/floppy -%{_sbindir}/fdformat -%{_sbindir}/hwclock -%{_sbindir}/tunelp -%{_mandir}/man8/fdformat.8* -%{_mandir}/man8/floppy.8* -%{_mandir}/man8/hwclock.8* -%{_mandir}/man8/clock.8* -%{_mandir}/man8/tunelp.8* -%endif - -%ifnarch sparc sparcv9 sparc64 -%doc fdisk/sfdisk.examples -/sbin/cfdisk -/sbin/sfdisk -%{_mandir}/man8/cfdisk.8* -%{_mandir}/man8/sfdisk.8* -%endif - -%ifarch sparc sparc64 sparcv9 -%{_bindir}/sunhostid -%endif - -%ifarch %cytune_archs -%{_bindir}/cytune -%{_mandir}/man8/cytune.8* -%endif - - -%files -n uuidd -%defattr(-,root,root) -/etc/rc.d/init.d/uuidd -%{_mandir}/man8/uuidd.8* -%attr(-, uuidd, uuidd) %{_sbindir}/uuidd -%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid -%dir %attr(2775, uuidd, uuidd) /var/run/uuidd - - -%files -n libmount -%defattr(-,root,root) -/%{_lib}/libmount.so.* - -%files -n libmount-devel -%defattr(-,root,root) -%{_libdir}/libmount.so -%{_includedir}/mount -%{_libdir}/pkgconfig/mount.pc - - -%files -n libblkid -%defattr(-,root,root) -%dir /etc/blkid -/%{_lib}/libblkid.so.* - -%files -n libblkid-devel -%defattr(-,root,root) -#%{_libdir}/libblkid.a -%{_libdir}/libblkid.so -%{_includedir}/blkid -%{_mandir}/man3/libblkid.3* -%{_libdir}/pkgconfig/blkid.pc - - -%files -n libuuid -%defattr(-,root,root) -/%{_lib}/libuuid.so.* - -%files -n libuuid-devel -%defattr(-,root,root) -#%{_libdir}/libuuid.a -%{_libdir}/libuuid.so -%{_includedir}/uuid -%{_mandir}/man3/uuid.3* -%{_mandir}/man3/uuid_clear.3* -%{_mandir}/man3/uuid_compare.3* -%{_mandir}/man3/uuid_copy.3* -%{_mandir}/man3/uuid_generate.3* -%{_mandir}/man3/uuid_generate_random.3* -%{_mandir}/man3/uuid_generate_time.3* -%{_mandir}/man3/uuid_is_null.3* -%{_mandir}/man3/uuid_parse.3* -%{_mandir}/man3/uuid_time.3* -%{_mandir}/man3/uuid_unparse.3* -%{_libdir}/pkgconfig/uuid.pc - - -%changelog -* Tue Oct 26 2010 Karel Zak 2.18-5 -- fix #645640 - new "-s" parameter parsing in agetty does not work -- add -l (lock) support to fsck - -* Wed Aug 18 2010 Karel Zak 2.18-4 -- fix #623685 - please extend agetty to not require a baud rate to be specified - -* Thu Aug 5 2010 Karel Zak 2.18-3 -- fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id - -* Mon Aug 2 2010 Karel Zak 2.18-2 -- fix #615719 - tmpfs mount fails with 'user' option. -- fix #598631 - shutdown, reboot, halt and C-A-D don't work -- fix #618957 - ISO images listed in fstab are mounted twice at boot - -* Wed Jun 30 2010 Karel Zak 2.18-1 -- upgrade to the final 2.18 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - -* Fri Jun 18 2010 Karel Zak 2.18-0.2 -- upgrade to 2.18-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-ChangeLog - -* Tue Jun 8 2010 Karel Zak 2.18-0.1 -- upgrade to the release 2.18-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-ChangeLog - -* Mon Apr 12 2010 Karel Zak 2.17.2-1 -- fix #581252 - remounting tmpfs fails because of hidden rootcontext= -- fix #580296 - "rtcwake" does miss the "off" option -- fix #575734 - use microsecond resolution for blkid cache entries -- upgrade to the bugfix release 2.17.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-ChangeLog -- minor fixed in spec file - -* Thu Mar 11 2010 Karel Zak 2.17.1-2 -- fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) - -* Mon Feb 22 2010 Karel Zak 2.17.1-1 -- upgrade to the final 2.17.1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-ChangeLog - -* Tue Feb 16 2010 Karel Zak 2.17.1-0.1 -- upgrade to 2.17.1-rc1 - -* Tue Feb 16 2010 Karel Zak 2.17-4 -- fix uuidd init script - -* Fri Feb 12 2010 Karel Zak 2.17-3 -- fix #541402 - uuidd initscript lsb compliance - -* Fri Jan 8 2010 Karel Zak 2.17-2 -- remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt) -- remove useless URL to sf.net - -* Thu Jan 8 2010 Karel Zak 2.17-1 -- upgrade to the final 2.17 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLog -- fix #545147 - util-linux-ng : Violation of the Packaging Guidelines - (remove uuid and blkid static libs) - -* Mon Dec 14 2009 Karel Zak 2.17-0.6 -- minor fixes in spec file (fix URL, add Requires, add LGPLv2+) - -* Wed Dec 9 2009 Karel Zak 2.17-0.5 -- upgrade to 2.17-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-ChangeLog - -* Mon Dec 7 2009 Karel Zak 2.17-0.4 -- add clock.8 man page (manlink to hwclock) -- add --help to mount.tmpfs - -* Mon Nov 23 2009 Karel Zak 2.17-0.3 -- upgrade to 2.17-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-ChangeLog - -* Tue Nov 10 2009 Karel Zak 2.17-0.2.git10dfc39 -- upgrade to pre-release snapshot (official changelog not available yet, see - http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) - -* Mon Oct 19 2009 Karel Zak 2.17-0.1.git5e51568 -- upgrade to pre-release snapshot (official changelog not available yet, see - http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for now) -- new commands: fallocate, unshare, wipefs -- libblkid supports topology and partitions probing -- remove support for --rmpart[s] from blockdev(8) (util-linux-ng-2.14-blockdev-rmpart.patch) -- merged upstream: - util-linux-ng-2.14-sfdisk-dump.patch - util-linux-ng-2.16-blkid-swsuspend.patch - util-linux-ng-2.16-libblkid-compression.patch - util-linux-ng-2.16-libblkid-ext2.patch - util-linux-ng-2.16-switchroot-tty.patch - -* Mon Oct 5 2009 Karel Zak 2.16-13 -- fix spec file - -* Fri Oct 2 2009 Karel Zak 2.16-12 -- release++ - -* Thu Oct 1 2009 Karel Zak 2.16-11 -- fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device - -* Wed Sep 16 2009 Tomas Mraz - 2.16-10 -- use password-auth common PAM configuration instead of system-auth and - drop pam_console.so call from the remote PAM config file - -* Mon Sep 14 2009 Karel Zak 2.16-9 -- fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when LANG is set -- fix typo in swsuspend detection - -* Wed Aug 26 2009 Tomas Mraz - 2.16-8 -- rebuilt with new audit - -* Sun Aug 23 2009 Karel Zak 2.16-7 -- fix #518572 - blkid requires ext2.ko to be decompressed on installation media - -* Thu Aug 13 2009 Karel Zak 2.16-5 -- fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded - -* Wed Aug 5 2009 Stepan Kasal 2.16-4 -- set conflict with versions of e2fsprogs containing fsck - -* Thu Jul 30 2009 Karel Zak 2.16-3 -- remove the mount.conf support (see #214891) - -* Mon Jul 27 2009 Karel Zak 2.16-2 -- fix #214891 - add mount.conf and MTAB_LOCK_DIR= option - -* Sat Jul 25 2009 Karel Zak 2.16-1 -- upgrade to 2.16 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16-ReleaseNotes -- enable built-in libuuid (replacement for the old uuid stuff from e2fsprogs) -- new commands switch_root, uuidgen and uuidd (subpackage) - -* Wed Jun 10 2009 Karel Zak 2.15.1-1 -- upgrade to 2.15.1 - -* Mon Jun 8 2009 Karel Zak 2.15.1-0.2 -- set BuildRequires: e2fsprogs-devel -- add Requires: e2fsprogs-devel to libblkid-devel - -* Thu Jun 4 2009 Karel Zak 2.15.1-0.1 -- upgrade to 2.15.1-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15-ReleaseNotes - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15.1-rc1-ChangeLog -- merged patches: - util-linux-ng-2.14-login-remote.patch - util-linux-ng-2.14-fdisk-4k-I.patch - util-linux-ng-2.14-fdisk-4k-II.patch - util-linux-ng-2.14-fdisk-4k-III.patch - util-linux-ng-2.14-dmesg-r.patch - util-linux-ng-2.14-flock-segfaults.patch - util-linux-ng-2.14-renice-n.patch -- new commands: lscpu, ipcmk -- remove support for "managed" and "kudzu" mount options -- cleanup spec file -- enable built-in libblkid (replacement for the old blkid from e2fsprogs) - -* Thu Apr 2 2009 Karel Zak 2.14.2-8 -- fix #490769 - %post scriptlet failed (thanks to Dan Horak) - -* Fri Mar 20 2009 Karel Zak 2.14.2-7 -- fix some nits in mount.tmpfs - -* Fri Mar 20 2009 Karel Zak 2.14.2-6 -- fix #491175 - mount of tmpfs FSs fail at boot - -* Thu Mar 19 2009 Karel Zak 2.14.2-5 -- fix #489672 - flock segfaults when file name is not given (upstream) -- fix #476964 - Mount /var/tmp with tmpfs creates denials -- fix #487227 - fdisk 4KiB hw sectors support (upstream) -- fix #477303 - renice doesn't support -n option (upstream) - -* Wed Feb 25 2009 Fedora Release Engineering - 2.14.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Feb 20 2009 Karel Zak 2.14.2-3 -- add -r option to dmesg(1) - -* Mon Feb 9 2009 Karel Zak 2.14.2-2 -- fix typo in spec file - -* Mon Feb 9 2009 Karel Zak 2.14.2-1 -- upgrade to stable 2.14.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/v2.14.2-ReleaseNotes - -* Thu Jan 22 2009 Karel Zak 2.14.2-0.2 -- fix #480413 - util-linux-ng doesn't include scriptreplay -- fix #479002 - remove dependency on ConsoleKit-libs -- upgrade to 2.14.2-rc2 - -* Mon Dec 22 2008 Karel Zak 2.14.2-0.1 -- upgrade to 2.14.2-rc1 -- refresh old patches - -* Fri Nov 21 2008 Karel Zak 2.14.1-5 -- fix #472502 - problem with fdisk and use +sectors for the end of partition - -* Mon Oct 6 2008 Karel Zak 2.14.1-3 -- fix #465761 - mount manpage is missing uid/gid mount options for tmpfs -- refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0) - -* Wed Sep 10 2008 Karel Zak 2.14.1-2 -- remove obsolete pam-console support - -* Wed Sep 10 2008 Karel Zak 2.14.1-1 -- upgrade to stable 2.14.1 - -* Thu Aug 14 2008 Karel Zak 2.14.1-0.1 -- upgrade to 2.14.1-rc1 -- refresh old patches - -* Thu Jul 24 2008 Karel Zak 2.14-3 -- update util-linux-ng-2.14-mount-file_t.patch to make - the SELinux warning optional (verbose mode is required) - -* Tue Jul 1 2008 Karel Zak 2.14-2 -- fix #390691 - mount should check selinux context on mount, and warn on file_t - -* Mon Jun 9 2008 Karel Zak 2.14-1 -- upgrade to stable util-linux-ng release - -* Mon May 19 2008 Karel Zak 2.14-0.1 -- upgrade to 2.14-rc3 -- remove arch(8) (deprecated in favor of uname(1) or arch(1) from coreutils) -- add a new command ldattach(8) -- cfdisk(8) linked with libncursesw - -* Tue Apr 22 2008 Karel Zak 2.13.1-9 -- fix audit log injection attack via login - -* Thu Apr 17 2008 Karel Zak 2.13.1-8 -- fix location of the command raw(8) - -* Tue Apr 15 2008 Karel Zak 2.13.1-7 -- fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND - -* Wed Apr 2 2008 Karel Zak 2.13.1-6 -- fix 439984 - backport mkswap -U - -* Wed Mar 26 2008 Tom "spot" Callaway - 2.13.1-5 -- clean up sparc conditionals - -* Tue Feb 19 2008 Fedora Release Engineering - 2.13.1-4 -- Autorebuild for GCC 4.3 - -* Mon Jan 28 2008 Karel Zak 2.13.1-3 -- upgrade to new upstream release -- fix #427874 - util-linux-ng gets "excess command line argument" on update - -* Wed Jan 2 2008 Karel Zak 2.13.1-2 -- update to upstream 2.13.1-rc2 - -* Wed Dec 12 2007 Dan Walsh 2.13.1-1 -- Fix pam files so that pam_keyinit happens after pam_selinux.so - -* Wed Dec 12 2007 Karel Zak 2.13.1-0.2 -- remove viwp and vigr (in favour of shadow-utils) - -* Sun Dec 9 2007 Karel Zak 2.13.1-0.1 -- update to the latest upstream stable branch - (commit: fda9d11739ee88c3b2f22a73f12ec019bd3b8335) - -* Wed Oct 31 2007 Karel Zak 2.13-4 -- fix #354791 - blockdev command calls the blkpg ioctl with a wrong data structure - -* Tue Oct 16 2007 Karel Zak 2.13-3 -- fix mount -L | -U segfault -- fix script die on SIGWINCH - -* Thu Oct 4 2007 Karel Zak 2.13-2 -- update to the latest upstream stable branch - -* Tue Aug 28 2007 Karel Zak 2.13-1 -- upgrade to stable util-linux-ng release - -* Fri Aug 24 2007 Karel Zak 2.13-0.59 -- add release number to util-linux Provides and increment setarch Obsoletes -- fix #254114 - spec typo -- upgrade to floppy-0.16 -- add BuildRequires: popt-devel - -* Wed Aug 22 2007 Jesse Keating 2.13-0.58 -- Obsolete a sufficiently high enough version of setarch - -* Mon Aug 20 2007 Karel Zak 2.13-0.57 -- fix #253664 - util-linux-ng fails to build on sparc (patch by Dennis Gilmore) -- rebase to new GIT snapshot - -* Mon Aug 20 2007 Karel Zak 2.13-0.56 -- fix obsoletes field - -* Mon Aug 20 2007 Karel Zak 2.13-0.55 -- util-linux-ng includes setarch(1), define relevat Obsoletes+Provides - -* Mon Aug 20 2007 Karel Zak 2.13-0.54 -- port "blockdev --rmpart" patch from util-linux -- use same Provides/Obsoletes setting like in util-linux - -* Wed Aug 15 2007 Karel Zak 2.13-0.53 -- fix #252046 - review Request: util-linux-ng (util-linux replacement) - -* Mon Aug 13 2007 Karel Zak 2.13-0.52 -- rebase to util-linux-ng (new util-linux upstream fork, - based on util-linux 2.13-pre7) -- more than 70 Fedora/RHEL patches have been merged to upstream code - -* Fri Apr 6 2007 Karel Zak 2.13-0.51 -- fix #150493 - hwclock --systohc sets clock 0.5 seconds slow -- fix #220873 - starting RPC idmapd: Error: RPC MTAB does not exist. - (added rpc_pipefs to util-linux-2.13-umount-sysfs.patch) -- fix #227903 - mount -f does not work with NFS-mounted - -* Sat Mar 3 2007 David Zeuthen 2.13-0.50 -- include ConsoleKit session module by default (#229172) - -* Thu Jan 11 2007 Karel Zak 2.13-0.49 -- fix #222293 - undocumented partx,addpart, delpart - -* Sun Dec 17 2006 Karel Zak 2.13-0.48 -- fix paths in po/Makefile.in.in - -* Fri Dec 15 2006 Karel Zak 2.13-0.47 -- fix #217240 - namei ignores non-directory components instead of saying "Not a directory" -- fix #217241 - namei enforces symlink limits inconsistently - -* Wed Dec 14 2006 Karel Zak 2.13-0.46 -- fix leaking file descriptor in the more command (patch by Steve Grubb) - -* Wed Dec 13 2006 Karel Zak 2.13-0.45 -- use ncurses only -- fix #218915 - fdisk -b 4K -- upgrade to -pre7 release -- fix building problem with raw0 patch -- fix #217186 - /bin/sh: @MKINSTALLDIRS@: No such file or directory - (port po/Makefile.in.in from gettext-0.16) -- sync with FC6 and RHEL5: -- fix #216489 - SCHED_BATCH option missing in chrt -- fix #216712 - issues with raw device support ("raw0" is wrong device name) -- fix #216760 - mount with context or fscontext option fails - (temporarily disabled the support for additional contexts -- not supported by kernel yet) -- fix #211827 - Can't mount with additional contexts -- fix #213127 - mount --make-unbindable does not work -- fix #211749 - add -r option to losetup to create a read-only loop - -* Thu Oct 12 2006 Karel Zak 2.13-0.44 -- fix #209911 - losetup.8 updated (use dm-crypt rather than deprecated cryptoloop) -- fix #210338 - spurious error from '/bin/login -h $PHONENUMBER' (bug in IPv6 patch) -- fix #208634 - mkswap "works" without warning on a mounted device - -* Sun Oct 01 2006 Jesse Keating - 2.13-0.43 -- rebuilt for unwind info generation, broken in gcc-4.1.1-21 - -* Wed Sep 20 2006 Karel Zak 2.13-0.42 -- remove obsolete NFS code and patches (we use /sbin/mount.nfs - and /sbin/umount.nfs from nfs-utils now) -- move nfs.5 to nfs-utils - -* Fri Sep 15 2006 Karel Zak 2.13-0.41 -- fix #205038 - mount not allowing sloppy option (exports "-s" - to external /sbin/mount.nfs(4) calls) -- fix minor bug in util-linux-2.13-mount-twiceloop.patch -- fix #188193- util-linux should provide plugin infrastructure for HAL - -* Mon Aug 21 2006 Karel Zak 2.13-0.40 -- fix Makefile.am in util-linux-2.13-mount-context.patch -- fix #201343 - pam_securetty requires known user to work - (split PAM login configuration to two files) -- fix #203358 - change location of taskset binary to allow for early affinity work - -* Fri Aug 11 2006 Karel Zak 2.13-0.39 -- fix #199745 - non-existant simpleinit(8) mentioned in ctrlaltdel(8) - -* Thu Aug 10 2006 Dan Walsh 2.13-0.38 -- Change keycreate line to happen after pam_selinux open call so it gets correct context - -* Thu Aug 10 2006 Karel Zak 2.13-0.37 -- fix #176494 - last -i returns strange IP addresses (patch by Bill Nottingham) - -* Thu Jul 27 2006 Karel Zak 2.13-0.36 -- fix #198300, #199557 - util-linux "post" scriptlet failure - -* Thu Jul 27 2006 Steve Dickson 2.13-0.35 -- Added the -o fsc flag to nfsmount. - -* Wed Jul 26 2006 Karel Zak 2.13-0.34 -- rebuild - -* Tue Jul 18 2006 Karel Zak 2.13-0.33 -- add Requires(post): libselinux - -* Mon Jul 17 2006 Karel Zak 2.13-0.32 -- add IPv6 support to the login command (patch by Milan Zazrivec) -- fix #198626 - add keyinit instructions to the login PAM script - (patch by David Howells) - -* Wed Jul 12 2006 Jesse Keating - 2.13-0.31.1 -- rebuild - -* Tue Jul 11 2006 Karel Zak 2.13-0.31 -- cleanup dependences for post and preun scriptlets - -* Mon Jul 10 2006 Karsten Hopp 2.13-0.30 -- silence install in minimal buildroot without /var/log - -* Fri Jul 7 2006 Karel Zak 2.13-0.29 -- include the raw command for RHELs - -* Mon Jun 26 2006 Florian La Roche 2.13-0.28 -- move install-info parts from postun to preun - -* Wed Jun 21 2006 Dan Walsh 2.13-0.27 -- Only execute chcon on machines with selinux enabled - -* Wed Jun 14 2006 Steve Dickson 2.13-0.26 -- Remove unneeded header files from nfsmount.c - -* Mon Jun 12 2006 Karel Zak 2.13-0.25 -- fix #187014 - umount segfaults for normal user -- fix #183446 - cal not UTF-8-aware -- fix #186915 - mount does not translate SELIinux context options though libselinux -- fix #185500 - Need man page entry for -o context= mount option -- fix #152579 - missing info about /etc/mtab and /proc/mounts mismatch -- fix #183890 - missing info about possible ioctl() and fcntl() problems on NFS filesystem -- fix #191230 - using mount --move results in wrong data in /etc/mtab -- added mount subtrees support -- fdisk: wrong number of sectors for large disks (suse#160822) -- merge fdisk-xvd (#182553) with new fdisk-isfull (#188981) patch -- fix #181549 - raw(8) manpage has old information about dd -- remove asm/page.h usage - -* Wed May 24 2006 Dan Walsh 2.13-0.24 -- Remove requirement on restorecon, since we can do the same thing -- with chcon/matchpathcon, and not add requirement on policycoreutils - -* Wed May 24 2006 Steve Dickson 2.13-0.23 -- Fixed bug in patch for bz183713 which cause nfs4 mounts to fail. - -* Tue May 2 2006 Steve Dickson 2.13-0.22 -- Added syslog logging to background mounts as suggested - by a customer. - -* Mon May 1 2006 Steve Dickson 2.13-0.21 -- fix #183713 - foreground mounts are not retrying as advertised -- fix #151549 - Added 'noacl' mount flag -- fix #169042 - Changed nfsmount to try udp before using tcp when rpc-ing - the remote rpc.mountd (iff -o tcp is not specified). - This drastically increases the total number of tcp mounts - that can happen at once (ala autofs). - -* Wed Mar 9 2006 Jesse Keating 2.13-0.20 -- Better calling of restorecon as suggested by Bill Nottingham -- prereq restorecon to avoid ordering issues - -* Wed Mar 9 2006 Jesse Keating 2.13-0.19 -- restorecon /var/log/lastlog - -* Wed Mar 8 2006 Karel Zak 2.13-0.17 -- fix #181782 - mkswap selinux relabeling (fix util-linux-2.13-mkswap-selinux.patch) - -* Wed Feb 22 2006 Karel Zak 2.13-0.16 -- fix #181782 - mkswap should automatically add selinux label to swapfile -- fix #180730 - col is exiting with 1 (fix util-linux-2.12p-col-EILSEQ.patch) -- fix #181896 - broken example in schedutils man pages -- fix #177331 - login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped. -- fix #177523 - umount -a should not unmount sysfs -- fix #182553 - fdisk -l inside xen guest shows no disks - -* Fri Feb 10 2006 Jesse Keating - 2.13-0.15.1 -- bump again for double-long bug on ppc(64) - -* Wed Feb 8 2006 Peter Jones 2.13-0.15 -- add "blockdev --rmpart N " and "blockdev --rmparts " - -* Tue Feb 07 2006 Jesse Keating - 2.13-0.14.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Thu Jan 19 2006 Steve Dickson 2.13-0.14 -- Updated the gssd_check() and idmapd_check(), used with - nfsv4 mounts, to looked for the correct file in /var/lock/subsys - which stops bogus warnings. - -* Tue Jan 3 2006 Karel Zak 2.13-0.13 -- fix #174676 - hwclock audit return code mismatch -- fix #176441: col truncates data -- fix #174111 - mount allows loopback devices to be mounted more than once to the same mount point -- better wide chars usage in the cal command (based on the old 'moremisc' patch) - -* Mon Dec 12 2005 Karel Zak 2.13-0.12 -- rebuilt - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Fri Nov 25 2005 Karel Zak 2.13-0.11.pre6 -- update to upstream version 2.13-pre6 -- fix #172203 - mount man page in RHEL4 lacks any info on cifs mount options - -* Mon Nov 7 2005 Karel Zak 2.13-0.10.pre5 -- fix #171337 - mkfs.cramfs doesn't work correctly with empty files - -* Fri Oct 28 2005 Karel Zak 2.13-0.9.pre5 -- rebuild - -* Wed Oct 26 2005 Karel Zak 2.13-0.8.pre5 -- updated version of the patch for hwclock audit - -* Thu Oct 20 2005 Karel Zak 2.13-0.7.pre5 -- fix #171337 - mkfs.cramfs dies creating installer image - -* Thu Oct 20 2005 Karel Zak 2.13-0.6.pre5 -- update to upstream 2.13pre5 -- remove separated cramfs1.1 (already in upstream package) -- remove odd symlink /usr/bin/mkcramfs -> ../../sbin/mkfs.cramfs -- fix #170171 - ipcs -lm always report "max total shared memory (kbytes) = 0" - -* Mon Oct 17 2005 Karel Zak 2.13-0.5.pre4 -* fix #170564 - add audit message to login - -* Fri Oct 7 2005 Karel Zak 2.13-0.4.pre4 -- fix #169628 - /usr/bin/floppy doesn't work with /dev/fd0 -- fix #168436 - login will attempt to run if it has no read/write access to its terminal -- fix #168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1) -- fix #165253 - losetup missing option -a [new feature] -- update PAM files (replace pam_stack with new "include" PAM directive) -- remove kbdrate from src.rpm -- update to 2.13pre4 - -* Fri Oct 7 2005 Steve Dickson 2.13-0.3.pre3 -- fix #170110 - Documentation for 'rsize' and 'wsize' NFS mount options - is misleading - -* Fri Sep 2 2005 Karel Zak 2.13-0.3.pre2 -- fix #166923 - hwclock will not run on a non audit-enabled kernel -- fix #159410 - mkswap(8) claims max swap area size is 2 GB -- fix #165863 - swsusp swaps should be reinitialized -- change /var/log/lastlog perms to 0644 - -* Tue Aug 16 2005 Karel Zak 2.13-0.2.pre2 -- /usr/share/misc/getopt/* -move-> /usr/share/doc/util-linux-2.13/getopt-* -- the arch command marked as deprecated -- removed: elvtune, rescuept and setfdprm -- removed: man8/sln.8 (moved to man-pages, see #10601) -- removed REDAME.pg and README.reset -- .spec file cleanup -- added schedutils (commands: chrt, ionice and taskset) - -* Tue Jul 12 2005 Karel Zak 2.12p-9.7 -- fix #159339 - util-linux updates for new audit system -- fix #158737 - sfdisk warning for large partitions, gpt -- fix #150912 - Add ocfs2 support -- NULL is better than zero at end of execl() - -* Thu Jun 16 2005 Karel Zak 2.12p-9.5 -- fix #157656 - CRM 546998: Possible bug in vipw, changes permissions of /etc/shadow and /etc/gshadow -- fix #159339 - util-linux updates for new audit system (pam_loginuid.so added to util-linux-selinux.pamd) -- fix #159418 - sfdisk unusable - crashes immediately on invocation -- fix #157674 - sync option on VFAT mount destroys flash drives -- fix .spec file /usr/sbin/{hwclock,clock} symlinks - -* Wed May 4 2005 Jeremy Katz - 2.12p-9.3 -- rebuild against new libe2fsprogs (and libblkid) to fix cramfs auto-detection - -* Mon May 2 2005 Karel Zak 2.12p-9.2 -- rebuild - -* Mon May 2 2005 Karel Zak 2.12p-9 -- fix #156597 - look - doesn't work with separators - -* Mon Apr 25 2005 Karel Zak 2.12p-8 -- fix #154498 - util-linux login & pam session -- fix #155293 - man 5 nfs should include vers as a mount option -- fix #76467 - At boot time, fsck chokes on LVs listed by label in fstab -- new Source URL -- added note about ATAPI IDE floppy to fdformat.8 -- fix #145355 - Man pages for fstab and fstab-sync in conflict - -* Tue Apr 5 2005 Karel Zak 2.12p-7 -- enable build with libblkid from e2fsprogs-devel -- remove workaround for duplicated labels - -* Thu Mar 31 2005 Steve Dickson 2.12p-5 -- Fixed nfs mount to rollback correctly. - -* Fri Mar 25 2005 Karel Zak 2.12p-4 -- added /var/log/lastlog to util-linux (#151635) -- disabled 'newgrp' in util-linux (enabled in shadow-utils) (#149997, #151613) -- improved mtab lock (#143118) -- fixed ipcs typo (#151156) -- implemented mount workaround for duplicated labels (#116300) - -* Wed Mar 16 2005 Elliot Lee 2.12p-3 -- rebuilt - -* Fri Feb 25 2005 Steve Dickson 2.12p-2 -- Changed nfsmount to only use reserve ports when necessary - (bz# 141773) - -* Thu Dec 23 2004 Elliot Lee 2.12p-1 -- Update to util-linux-2.12p. This changes swap header format - from - you may need to rerun mkswap if you did a clean install of - FC3. - -* Fri Dec 10 2004 Elliot Lee 2.12j-1 -- Update to util-linux-2.12j - -* Tue Dec 7 2004 Steve Dickson 2.12a-20 -- Corrected a buffer overflow problem with nfs mounts. - (bz# 141733) - -* Wed Dec 01 2004 Elliot Lee 2.12a-19 -- Patches for various bugs. - -* Mon Nov 29 2004 Steve Dickson 2.12a-18 -- Made NFS mounts adhere to the IP protocol if specified on - command line as well as made NFS umounts adhere to the - current IP protocol. Fix #140016 - -* Thu Oct 14 2004 Elliot Lee 2.12a-16 -- Add include_raw macro, build with it off for Fedora - -* Wed Oct 13 2004 Stephen C. Tweedie - 2.12a-15 -- Add raw patch to allow binding of devices not yet in /dev - -* Wed Oct 13 2004 John (J5) Palmieri 2.12a-14 -- Add David Zeuthen's patch to enable the pamconsole flag #133941 - -* Wed Oct 13 2004 Stephen C. Tweedie 2.12a-13 -- Restore raw utils (bugzilla #130016) - -* Mon Oct 11 2004 Phil Knirsch 2.12a-12 -- Add the missing remote entry in pam.d - -* Wed Oct 6 2004 Steve Dickson -- Rechecked in some missing NFS mounting code. - -* Wed Sep 29 2004 Elliot Lee 2.12a-10 -- Make swaplabel support work with swapon -a -e - -* Tue Sep 28 2004 Steve Dickson -- Updated the NFS and NFS4 code to the latest CITI patch set - (in which they incorporate a number of our local patches). - -* Wed Sep 15 2004 Nalin Dahybhai 2.12a-8 -- Fix #132196 - turn on SELinux support at build-time. - -* Wed Sep 15 2004 Phil Knirsch 2.12a-7 -- Fix #91174 with pamstart.patch - -* Tue Aug 31 2004 Elliot Lee 2.12a-6 -- Fix #16415, #70616 with rdevman.patch -- Fix #102566 with loginman.patch -- Fix #104321 with rescuept.patch (just use plain lseek - we're in _FILE_OFFSET_BITS=64 land now) -- Fix #130016 - remove raw. -- Re-add agetty (replacing it with mgetty is too much pain, and mgetty is much larger) - -* Thu Aug 26 2004 Steve Dickson -- Made the NFS security checks more explicit to avoid confusion - (an upstream fix) -- Also removed a compilation warning - -* Wed Aug 11 2004 Alasdair Kergon -- Remove unused mount libdevmapper inclusion. - -* Wed Aug 11 2004 Alasdair Kergon -- Add device-mapper mount-by-label support -- Fix segfault in mount-by-label when a device without a label is present. - -* Wed Aug 11 2004 Steve Dickson -- Updated nfs man page to show that intr are on by - default for nfs4 - -* Thu Aug 05 2004 Jindrich Novy -- modified warning causing heart attack for >16 partitions, #107824 - -* Fri Jul 09 2004 Elliot Lee 2.12a-3 -- Fix #126623, #126572 -- Patch cleanup -- Remove agetty (use mgetty, agetty is broken) - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Thu Jun 03 2004 Elliot Lee 2.12a-1 -- Update to 2.12a -- Fix #122448 - -* Thu May 13 2004 Dan Walsh 2.12-19 -- Change pam_selinux to run last - -* Tue May 04 2004 Elliot Lee 2.12-18 -- Fix #122448 (autofs issues) - -* Fri Apr 23 2004 Elliot Lee 2.12-17 -- Fix #119157 by editing the patch -- Add patch145 to fix #119986 - -* Fri Apr 16 2004 Elliot Lee 2.12-16 -- Fix #118803 - -* Tue Mar 23 2004 Jeremy Katz 2.12-15 -- mkcramfs: use PAGE_SIZE for default blocksize (#118681) - -* Sat Mar 20 2004 -- Updated the nfs-mount.patch to correctly - handle the mounthost option and to ignore - servers that do not set auth flavors - -* Tue Mar 16 2004 Dan Walsh 2.12-13 -- Fix selinux ordering or pam for login - -* Tue Mar 16 2004 -- Make RPC error messages displayed with -v argument -- Added two checks to the nfs4 path what will print warnings - when rpc.idmapd and rpc.gssd are not running -- Ping NFS v4 servers before diving into kernel -- Make v4 mount interruptible which also make the intr option on by default - -* Sun Mar 13 2004 -- Reworked how the rpc.idmapd and rpc.gssd checks were - done due to review comments from upstream. -- Added rpc_strerror() so the '-v' flag will show RPC errors. - -* Sat Mar 13 2004 -- Added two checks to the nfs4 path what will print warnings - when rpc.idmapd and rpc.gssd are not running. - -* Thu Mar 11 2004 -- Reworked and updated the nfsv4 patches. - -* Wed Mar 10 2004 Dan Walsh -- Bump version - -* Wed Mar 10 2004 Steve Dickson -- Tried to make nfs error message a bit more meaninful -- Cleaned up some warnings - -* Sun Mar 7 2004 Steve Dickson -- Added pesudo flavors for nfsv4 mounts. -- Added BuildRequires: libselinux-devel and Requires: libselinux - when WITH_SELINUX is set. - -* Fri Feb 27 2004 Dan Walsh 2.12-5 -- check for 2.6.3 kernel in mount options - -* Mon Feb 23 2004 Elliot Lee 2.12-4 -- Remove /bin/kill for #116100 - -* Fri Feb 20 2004 Dan Walsh 2.12-3 -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Thu Feb 12 2004 Elliot Lee 2.12-1 -- Final 2.12 has been out for ages - might as well use it. - -* Wed Jan 28 2004 Steve Dickson 2.12pre-4 -- Added mount patches that have NFS version 4 support - -* Mon Jan 26 2004 Elliot Lee 2.12pre-3 -- Provides: mount losetup - -* Mon Jan 26 2004 Dan Walsh 2.12pre-2 -- Add multiple to /etc/pam.d/login for SELinux - -* Thu Jan 15 2004 Elliot Lee 2.12pre-1 -- 2.12pre-1 -- Merge mount/losetup packages into the main package (#112324) -- Lose separate - -* Mon Nov 3 2003 Dan Walsh 2.11y-35.sel -- remove selinux code from login and use pam_selinux - -* Thu Oct 30 2003 Dan Walsh 2.11y-34.sel -- turn on selinux - -* Fri Oct 24 2003 Elliot Lee 2.11y-34 -- Add BuildRequires: texinfo (from a bug# I don't remember) -- Fix #90588 with mountman patch142. - -* Mon Oct 6 2003 Dan Walsh 2.11y-33 -- turn off selinux - -* Thu Sep 25 2003 Dan Walsh 2.11y-32.sel -- turn on selinux -- remove context selection - -* Fri Sep 19 2003 Elliot Lee 2.11y-31 -- Add patch140 (alldevs) to fix #101772. Printing the total size of - all devices was deemed a lower priority than having all devices - (e.g. /dev/ida/c0d9) displayed. - -* Fri Sep 12 2003 Dan Walsh 2.11y-31 -- turn off selinux - -* Fri Sep 12 2003 Dan Walsh 2.11y-30.sel -- turn on selinux - -* Fri Sep 5 2003 Elliot Lee 2.11y-28 -- Fix #103004, #103954 - -* Fri Sep 5 2003 Dan Walsh 2.11y-27 -- turn off selinux - -* Thu Sep 4 2003 Dan Walsh 2.11y-26.sel -- build with selinux - -* Mon Aug 11 2003 Elliot Lee 2.11y-25 -- Use urandom instead for mkcramfs - -* Tue Jul 29 2003 Dan Walsh 2.11y-24 -- add SELINUX 2.5 support - -* Wed Jul 23 2003 Elliot Lee 2.11y-22 -- #100433 patch - -* Mon Jun 14 2003 Elliot Lee 2.11y-20 -- #97381 patch - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Mon Apr 21 2003 Elliot Lee 2.11y-17 -- Change patch128 to improve ipcs -l - -* Fri Apr 11 2003 Elliot Lee 2.11y-16 -- Fix #85407 - -* Fri Apr 11 2003 Elliot Lee 2.11y-15 -- Change patch128 to util-linux-2.11f-ipcs-84243-86285.patch to get all -ipcs fixes - -* Thu Apr 10 2003 Matt Wilson 2.11y-14 -- fix last login date display on AMD64 (#88574) - -* Mon Apr 7 2003 Jeremy Katz 2.11y-13 -- include sfdisk on ppc - -* Fri Mar 28 2003 Jeremy Katz 2.11y-12 -- add patch from msw to change mkcramfs blocksize with a command line option - -* Tue Mar 25 2003 Phil Knirsch 2.11y-11 -- Fix segfault on s390x due to wrong usage of BLKGETSIZE. - -* Thu Mar 13 2003 Elliot Lee 2.11y-10 -- Really apply the ipcs patch. Doh. - -* Mon Feb 24 2003 Elliot Lee -- rebuilt - -* Wed Feb 19 2003 Elliot Lee 2.11y-8 -- ipcs-84243.patch to fix #84243 - -* Thu Feb 13 2003 Yukihiro Nakai 2.11y-7 -- Update moremisc patch to fix swprintf()'s minimum field (bug #83361). - -* Mon Feb 03 2003 Elliot Lee 2.11y-6 -- Fix mcookie segfault on many 64-bit architectures (bug #83345). - -* Mon Feb 03 2003 Tim Waugh 2.11y-5 -- Fix underlined multibyte characters (bug #83376). - -* Sun Feb 02 2003 Florian La Roche -- rebuild to have again a s390 rpm -- disable some more apps for mainframe - -* Wed Jan 29 2003 Elliot Lee 2.11y-4 -- util-linux-2.11y-umask-82552.patch - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Mon Jan 13 2003 Elliot Lee 2.11y-2 -- Fix #81069, #75421 - -* Mon Jan 13 2003 Elliot Lee 2.11y-1 -- Update to 2.11y -- Fix #80953 -- Update patch0, patch107, patch117, patch120 for 2.11y -- Remove patch60, patch61, patch207, patch211, patch212, patch119, patch121 -- Remove patch122, patch200 - -* Wed Oct 30 2002 Elliot Lee 2.11w-2 -- Remove some crack/unnecessary patches while submitting stuff upstream. -- Build with -D_FILE_OFFSET_BITS=64 - -* Tue Oct 29 2002 Elliot Lee 2.11w-1 -- Update to 2.11w, resolve patch conflicts - -* Tue Oct 08 2002 Phil Knirsch 2.11r-10hammer.3 -- Extended util-linux-2.11b-s390x patch to work again. - -* Thu Oct 03 2002 Elliot Lee 2.11r-10hammer.2 -- Add patch122 for hwclock on x86_64 - -* Thu Sep 12 2002 Than Ngo 2.11r-10hammer.1 -- Fixed pam config files - -* Wed Sep 11 2002 Bernhard Rosenkraenzer 2.11r-10hammer -- Port to hammer - -* Fri Aug 30 2002 Elliot Lee 2.11r-10 -- Patch120 (hwclock) to fix #72140 -- Include isosize util - -* Wed Aug 7 2002 Elliot Lee 2.11r-9 -- Patch120 (skipraid2) to fix #70353, because the original patch was -totally useless. - -* Fri Aug 2 2002 Elliot Lee 2.11r-8 -- Patch119 (fdisk-add-primary) from #67898 - -* Wed Jul 24 2002 Elliot Lee 2.11r-7 -- Really add the gptsize patch, instead of what I think the patch says. -(+1) - -* Tue Jul 23 2002 Elliot Lee 2.11r-6 -- Add the sp[n].size part of the patch from #69603 - -* Mon Jul 22 2002 Florian La Roche -- adjust mainframe patches - -* Tue Jul 2 2002 Bill Nottingham 2.11r-4 -- only require usermode if we're shipping kbdrate here - -* Fri Jun 28 2002 Trond Eivind Glomsrod 2.11r-3 -- Port the large swap patch to new util-linux... the off_t changes - now in main aren't sufficient - -* Thu Jun 27 2002 Elliot Lee 2.11r-2 -- Remove swapondetect (patch301) until it avoids possible false positives. - -* Thu Jun 27 2002 Elliot Lee 2.11r-1 -- Update to 2.11r, wheeee -- Remove unused patches - -* Thu Jun 27 2002 Elliot Lee 2.11n-19 -- Make a note here that this package was the source of the single change -contained in util-linux-2.11f-18 (in 7.2/Alpha), and also contains the -rawman patch from util-linux-2.11f-17.1 (in 2.1AS). -- Package has no runtime deps on slang, so remove the BuildRequires: -slang-devel. - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Thu Jun 20 2002 Elliot Lee 2.11n-17 -- Fix teg's swapondetect patch to not print out the usage message when -'swapon -a -e' is run. (#66690) (edit existing patch) -- Apply hjl's utmp handling patch (#66950) (patch116) -- Fix fdisk man page notes on IDE disk partition limit (#64013) (patch117) -- Fix mount.8 man page notes on vfat shortname option (#65628) (patch117) -- Fix possible cal overflow with widechars (#67090) (patch117) - -* Tue Jun 11 2002 Trond Eivind Glomsrod 2.11n-16 -- support large swap partitions -- add '-d' option to autodetect available swap partitions - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Wed May 15 2002 Elliot Lee 2.11n-14 -- Remove kbdrate (again). - -* Mon Apr 29 2002 Florian La Roche -- adjust mainframe patches to apply to current rpm -- do not include fdisk until it is fixed to work on mainframe - -* Mon Apr 01 2002 Elliot Lee 2.11n-12 -- Don't strip binaries - rpm does it for us. - -* Sun Mar 31 2002 Elliot Lee 2.11n-11 -- Apply patch115 from ejb@ql.org for bug #61868 - -* Wed Mar 27 2002 Elliot Lee 2.11n-10 -- Finish fixing #60675 (ipcrm man page), updated the patch. -- Fix #61203 (patch114 - dumboctal.patch). - -* Tue Mar 12 2002 Elliot Lee 2.11n-9 -- Update ctty3 patch to ignore SIGHUP while dropping controlling terminal - -* Fri Mar 08 2002 Elliot Lee 2.11n-8 -- Update ctty3 patch to drop controlling terminal before forking. - -* Fri Mar 08 2002 Elliot Lee 2.11n-7 - Fix various bugs: -- Add patch110 (skipraid) to properly skip devices that are part of a RAID array. -- Add patch111 (mkfsman) to update the mkfs man page's "SEE ALSO" section. -- remove README.cfdisk -- Include partx -- Fix 54741 and related bugs for good(hah!) with patch113 (ctty3) - -* Wed Mar 06 2002 Elliot Lee 2.11n-6 -- Put kbdrate in, add usermode dep. - -* Tue Feb 26 2002 Elliot Lee 2.11n-5 -- Fix #60363 (tweak raw.8 man page, make rawdevices.8 symlink). - -* Tue Jan 28 2002 Bill Nottingham 2.11n-4 -- remove kbdrate (fixes kbd conflict) - -* Fri Dec 28 2001 Elliot Lee 2.11n-3 -- Add util-linux-2.11n-ownerumount.patch (#56593) -- Add patch102 (util-linux-2.11n-colrm.patch) to fix #51887 -- Fix #53452 nits. -- Fix #56953 (remove tunelp on s390) -- Fix #56459, and in addition switch to using sed instead of perl. -- Fix #58471 -- Fix #57300 -- Fix #37436 -- Fix #32132 - -* Wed Dec 26 2001 Elliot Lee 2.11n-1 -- Update to 2.11n -- Merge mount/losetup back in. - -* Tue Dec 04 2001 Elliot Lee 2.11f-17 -- Add patch38 (util-linux-2.11f-ctty2.patch) to ignore SIGINT/SIGTERM/SIGQUIT in the parent, so that ^\ won't break things. - -* Fri Nov 09 2001 Elliot Lee 2.11f-16 -- Merge patches 36, 75, 76, and 77 into patch #37, to attempt resolve all the remaining issues with #54741. - -* Wed Oct 24 2001 Florian La Roche -- add nologin man-page for s390/s390x - -* Wed Oct 24 2001 Bernhard Rosenkraenzer 2.11f-14 -- Don't build kbdrate on s390/s390x -- Don't make the pivot_root.8 man page executable(!) - -* Tue Oct 23 2001 Elliot Lee 2.11f-13 -- Patch/idea #76 from HJL, fixes bug #54741 (race condition in login -acquisition of controlling terminal). - -* Thu Oct 11 2001 Bill Nottingham -- fix permissions problem with vipw & shadow files, again (doh!) - -* Tue Oct 09 2001 Erik Troan -- added patch from Olaf Kirch to fix possible pwent structure overwriting - -* Fri Sep 28 2001 Elliot Lee 2.11f-10 -- fdisk patch from arjan - -* Sun Aug 26 2001 Elliot Lee 2.11f-9 -- Don't include cfdisk, since it appears to be an even bigger pile of junk than fdisk? :) - -* Wed Aug 1 2001 Tim Powers -- don't require usermode - -* Mon Jul 30 2001 Elliot Lee 2.11f-7 -- Incorporate kbdrate back in. - -* Mon Jul 30 2001 Bill Nottingham -- revert the patch that calls setsid() in login that we had reverted - locally but got integrated upstream (#46223) - -* Tue Jul 24 2001 Florian La Roche -- correct s390x patch - -* Mon Jul 23 2001 Elliot Lee -- Add my megapatch (various bugs) -- Include pivot_root (#44828) - -* Thu Jul 12 2001 Bill Nottingham -- make shadow files 0400, not 0600 - -* Wed Jul 11 2001 Bill Nottingham -- fix permissions problem with vipw & shadow files - -* Mon Jun 18 2001 Florian La Roche -- update to 2.11f, remove any merged patches -- add s390x patches for somewhat larger swap - -* Thu Jun 14 2001 Erik Troan -- added --verbose patch to mkcramfs; it's much quieter by default now - -* Tue May 22 2001 Erik Troan -- removed warning about starting partitions on cylinder 0 -- swap version2 - makes it unnecessary - -* Wed May 9 2001 Bernhard Rosenkraenzer 2.11b-2 -- Fix up s390x support - -* Mon May 7 2001 Bernhard Rosenkraenzer 2.11b-1 -- Fix up login for real (a console session should be the controlling tty) - by reverting to 2.10s code (#36839, #36840, #39237) -- Add man page for agetty (#39287) -- 2.11b, while at it - -* Fri Apr 27 2001 Preston Brown 2.11a-4 -- /sbin/nologin from OpenBSD added. - -* Fri Apr 20 2001 Bernhard Rosenkraenzer 2.11a-3 -- Fix up login - exiting immediately even if the password is correct - is not exactly a nice feature. -- Make definite plans to kill people who update login without checking - if the new version works ;) - -* Tue Apr 17 2001 Erik Troan -- upgraded to 2.11a (kbdrate moved to kbd, among other things) -- turned off ALLOW_VCS_USE -- modified mkcramfs to not use a large number of file descriptors -- include mkfs.bfs - -* Sun Apr 8 2001 Matt Wilson -- changed Requires: kernel >= 2.2.12-7 to Conflicts: kernel < 2.2.12-7 - (fixes a initscripts -> util-linux -> kernel -> initscripts prereq loop) - -* Tue Mar 20 2001 Matt Wilson -- patched mkcramfs to use the PAGE_SIZE from asm/page.h instead of hard - coding 4096 (fixes mkcramfs on alpha...) - -* Mon Mar 19 2001 Matt Wilson -- added mkcramfs (from linux/scripts/mkcramfs) - -* Mon Feb 26 2001 Tim Powers -- fixed bug #29131, where ipc.info didn't have an info dir entry, - added the dir entry to ipc.texi (Patch58) - -* Fri Feb 23 2001 Preston Brown -- use lang finder script -- install info files - -* Thu Feb 08 2001 Erik Troan -- reverted login patch; seems to cause problems -- added agetty - -* Wed Feb 07 2001 Erik Troan -- updated kill man page -- added patch to fix vipw race -- updated vipw to edit /etc/shadow and /etc/gshadow, if appropriate -- added patch to disassociate login from tty, session, and pgrp - -* Tue Feb 06 2001 Erik Troan -- fixed problem w/ empty extended partitions -- added patch to fix the date in the more man page -- set OPT to pass optimization flags to make rather then RPM_OPT_FLAG -- fixed fdisk -l /Proc/partitions parsing -- updated to 2.10s - -* Tue Jan 23 2001 Preston Brown -- danish translations added - -* Mon Jan 15 2001 Nalin Dahyabhai -- fix segfault in login in btmp patch (#24025) - -* Mon Dec 11 2000 Oliver Paukstadt -- ported to s390 - -* Wed Nov 01 2000 Florian La Roche -- update to 2.10p -- update patch37 to newer fdisk version - -* Mon Oct 9 2000 Jeff Johnson -- update to 2.10o -- fdformat: fixed to work with kernel 2.4.0test6 (Marek Wojtowicz) -- login: not installed suid -- getopt: by default install aux files in /usr/share/misc -- update to 2.10n: -- added blockdev.8 -- change to elvtune (andrea) -- fixed overrun in agetty (vii@penguinpowered.com) -- shutdown: prefer umounting by mount point (rgooch) -- fdisk: added plan9 -- fdisk: remove empty links in chain of extended partitions -- hwclock: handle both /dev/rtc and /dev/efirtc (Bill Nottingham) -- script: added -f (flush) option (Ivan Schreter) -- script: added -q (quiet) option (Per Andreas Buer) -- getopt: updated to version 1.1.0 (Frodo Looijaard) -- Czech messages (Jiri Pavlovsky) -- login.1 man page had not /var/spool/mail path (#16998). -- sln.8 man page (but not executable) included (#10601). -- teach fdisk 0xde(Dell), 0xee(EFI GPT), 0xef(EFI FAT) partitions (#17610). - -* Wed Aug 30 2000 Matt Wilson -- rebuild to cope with glibc locale binary incompatibility, again - -* Mon Aug 14 2000 Jeff Johnson -- setfdprm should open with O_WRONLY, not 3. - -* Fri Aug 11 2000 Jeff Johnson -- fdformat should open with O_WRONLY, not 3. - -* Fri Jul 21 2000 Nalin Dahyabhai -- make 'look' look in /usr/share/dict - -* Fri Jul 21 2000 Bill Nottingham -- put /usr/local/sbin:/usr/local/bin in root's path - -* Wed Jul 19 2000 Jakub Jelinek -- rebuild to cope with glibc locale binary incompatibility - -* Thu Jul 13 2000 Prospector -- automatic rebuild - -* Mon Jul 10 2000 Bill Nottingham -- enable hwclock to use /dev/efirtc on ia64 (gettext is fun. :( ) - -* Mon Jul 3 2000 Bill Nottingham -- move cfdisk to /usr/sbin, it depends on /usr stuff -- add rescuept - -* Fri Jun 23 2000 Bernhard Rosenkraenzer -- point more at the correct path to vi (for "v"), Bug #10882 - -* Sun Jun 4 2000 Jeff Johnson -- FHS packaging changes. - -* Thu Jun 1 2000 Nalin Dahyabhai -- modify PAM setup to use system-auth - -* Mon May 1 2000 Bill Nottingham -- eek, where did login go? (specfile tweaks) - -* Mon Apr 17 2000 Bernhard Rosenkraenzer -- 2.10k -- fix compilation with current glibc - -* Tue Mar 21 2000 Bernhard Rosenkraenzer -- 2.10h - -* Tue Mar 7 2000 Jeff Johnson -- rebuild for sparc baud rates > 38400. - -* Sat Mar 4 2000 Matt Wilson -- use snprintf - not sprintf - when doing - sprintf ("%%s\n", _("Some string")) to avoid overflows and - segfaults. - -* Mon Feb 21 2000 Jeff Johnson -- raw control file was /dev/raw, now /dev/rawctl. -- raw access files were /dev/raw*, now /dev/raw/raw*. - -* Thu Feb 17 2000 Erik Troan -- -v argument to mkswap wasn't working - -* Thu Feb 10 2000 Jakub Jelinek -- Recognize 0xfd on Sun disklabels as RAID - -* Tue Feb 8 2000 Bill Nottingham -- more lives in /bin, and was linked against /usr/lib/libnurses. Bad. - -* Thu Feb 03 2000 Jakub Jelinek -- update to 2.10f -- fix issues in the new realpath code, avoid leaking memory - -* Tue Feb 01 2000 Cristian Gafton -- rebuild to fix dependencies -- add NFSv3 patches - -* Fri Jan 28 2000 Bill Nottingham -- don't require csh - -* Mon Jan 24 2000 Nalin Dahyabhai -- update to 2.10e -- add rename - -* Thu Jan 20 2000 Jeff Johnson -- strip newlines in logger input. - -* Mon Jan 10 2000 Jeff Johnson -- rebuild with correct ncurses libs. - -* Tue Dec 7 1999 Matt Wilson -- updated to util-linux 2.10c -- deprecated IMAP login mail notification patch17 -- deprecated raw patch22 -- depricated readprofile patch24 - -* Tue Dec 7 1999 Bill Nottingham -- add patch for readprofile - -* Thu Nov 18 1999 Michael K. Johnson -- tunelp should come from util-linux - -* Tue Nov 9 1999 Jakub Jelinek -- kbdrate cannot use /dev/port on sparc. - -* Wed Nov 3 1999 Jakub Jelinek -- fix kbdrate on sparc. - -* Wed Oct 27 1999 Bill Nottingham -- ship hwclock on alpha. - -* Tue Oct 5 1999 Bill Nottingham -- don't ship symlinks to rdev if we don't ship rdev. - -* Tue Sep 07 1999 Cristian Gafton -- add rawIO support from sct - -* Mon Aug 30 1999 Preston Brown -- don't display "new mail" message when the only piece of mail is from IMAP - -* Fri Aug 27 1999 Michael K. Johnson -- kbdrate is now a console program - -* Thu Aug 26 1999 Jeff Johnson -- hostid is now in sh-utils. On sparc, install hostid as sunhostid (#4581). -- update to 2.9w: -- Updated mount.8 (Yann Droneaud) -- Improved makefiles -- Fixed flaw in fdisk - -* Tue Aug 10 1999 Jeff Johnson -- tsort is now in textutils. - -* Wed Aug 4 1999 Bill Nottingham -- turn off setuid bit on login. Again. :( - -* Tue Aug 3 1999 Peter Jones, -- hostid script for sparc (#3803). - -* Tue Aug 03 1999 Christian 'Dr. Disk' Hechelmann -- added locale message catalogs to %%file -- added patch for non-root build -- vigr.8 and /usr/lib/getopt man-page was missing from file list -- /etc/fdprm really is a config file - -* Fri Jul 23 1999 Jeff Johnson -- update to 2.9v: -- cfdisk no longer believes the kernel's HDGETGEO - (and may be able to partition a 2 TB disk) - -* Fri Jul 16 1999 Jeff Johnson -- update to 2.9u: -- Czech more.help and messages (Jiri Pavlovsky) -- Japanese messages (Daisuke Yamashita) -- fdisk fix (Klaus G. Wagner) -- mount fix (Hirokazu Takahashi) -- agetty: enable hardware flow control (Thorsten Kranzkowski) -- minor cfdisk improvements -- fdisk no longer accepts a default device -- Makefile fix - -* Tue Jul 6 1999 Jeff Johnson -- update to 2.9t: -- national language support for hwclock -- Japanese messages (both by Daisuke Yamashita) -- German messages and some misc i18n fixes (Elrond) -- Czech messages (Jiri Pavlovsky) -- wall fixed for /dev/pts/xx ttys -- make last and wall use getutent() (Sascha Schumann) - [Maybe this is bad: last reading all of wtmp may be too slow. - Revert in case people complain.] -- documented UUID= and LABEL= in fstab.5 -- added some partition types -- swapon: warn only if verbose - -* Fri Jun 25 1999 Jeff Johnson -- update to 2.9s. - -* Sat May 29 1999 Jeff Johnson -- fix mkswap sets incorrect bits on sparc64 (#3140). - -* Thu Apr 15 1999 Jeff Johnson -- on sparc64 random ioctls on clock interface cause kernel messages. - -* Thu Apr 15 1999 Jeff Johnson -- improved raid patch (H.J. Lu). - -* Wed Apr 14 1999 Michael K. Johnson -- added patch for smartraid controllers - -* Sat Apr 10 1999 Cristian Gafton -- fix logging problems caused by setproctitle and PAM interaction - (#2045) - -* Wed Mar 31 1999 Jeff Johnson -- include docs and examples for sfdisk (#1164) - -* Mon Mar 29 1999 Matt Wilson -- rtc is not working properly on alpha, we can't use hwclock yet. - -* Fri Mar 26 1999 Cristian Gafton -- add patch to make mkswap more 64 bit friendly... Patch from - eranian@hpl.hp.com (ahem!) - -* Thu Mar 25 1999 Jeff Johnson -- include sfdisk (#1164) -- fix write (#1784) -- use positive logic in spec file (%%ifarch rather than %ifnarch). -- (re)-use 1st matching utmp slot if search by mypid not found. -- update to 2.9o -- lastb wants bad logins in wtmp clone /var/run/btmp (#884) - -* Thu Mar 25 1999 Jakub Jelinek -- if hwclock is to be compiled on sparc, - it must actually work. Also, it should obsolete - clock, otherwise it clashes. -- limit the swap size in mkswap for 2.2.1+ kernels - by the actual maximum size kernel can handle. -- fix kbdrate on sparc, patch by J. S. Connell - - -* Wed Mar 24 1999 Matt Wilson -- added pam_console back into pam.d/login - -* Tue Mar 23 1999 Matt Wilson -- updated to 2.9i -- added hwclock for sparcs and alpha - -* Mon Mar 22 1999 Erik Troan -- added vigr to file list - -* Sun Mar 21 1999 Cristian Gafton -- auto rebuild in the new build environment (release 12) - -* Thu Mar 18 1999 Cristian Gafton -- remove most of the ifnarch arm stuff - -* Mon Mar 15 1999 Michael Johnson -- added pam_console.so to /etc/pam.d/login - -* Thu Feb 4 1999 Michael K. Johnson -- .perms patch to login to make it retain root in parent process - for pam_close_session to work correctly - -* Tue Jan 12 1999 Jeff Johnson -- strip fdisk in buildroot correctly (#718) - -* Mon Jan 11 1999 Cristian Gafton -- have fdisk compiled on sparc and arm - -* Mon Jan 11 1999 Erik Troan -- added beos partition type to fdisk - -* Wed Dec 30 1998 Cristian Gafton -- incorporate fdisk on all arches - -* Sat Dec 5 1998 Jeff Johnson -- restore PAM functionality at end of login (Bug #201) - -* Thu Dec 03 1998 Cristian Gafton -- patch top build on the arm without PAM and related utilities, for now. -- build hwclock only on intel - -* Wed Nov 18 1998 Cristian Gafton -- upgraded to version 2.9 - -* Thu Oct 29 1998 Bill Nottingham -- build for Raw Hide (slang-1.2.2) -- patch kbdrate wackiness so it builds with egcs - -* Tue Oct 13 1998 Erik Troan -- patched more to use termcap - -* Mon Oct 12 1998 Erik Troan -- added warning about alpha/bsd label starting cylinder - -* Mon Sep 21 1998 Erik Troan -- use sigsetjmp/siglongjmp in more rather then sig'less versions - -* Fri Sep 11 1998 Jeff Johnson -- explicit attrs for setuid/setgid programs - -* Thu Aug 27 1998 Cristian Gafton -- sln is now included in glibc - -* Sun Aug 23 1998 Jeff Johnson -- add cbm1581 floppy definitions (problem #787) - -* Mon Jun 29 1998 Jeff Johnson -- remove /etc/nologin at end of shutdown/halt. - -* Fri Jun 19 1998 Jeff Johnson -- add mount/losetup. - -* Thu Jun 18 1998 Jeff Johnson -- update to 2.8 with 2.8b clean up. hostid now defunct? - -* Mon Jun 01 1998 David S. Miller -- "more" now works properly on sparc - -* Sat May 02 1998 Jeff Johnson -- Fix "fdisk -l" fault on mounted cdrom. (prob #513) - -* Fri Apr 24 1998 Prospector System -- translations modified for de, fr, tr - -* Sat Apr 11 1998 Cristian Gafton -- manhattan rebuild - -* Mon Dec 29 1997 Erik Troan -- more didn't suspend properly on glibc -- use proper tc*() calls rather then ioctl's - -* Sun Dec 21 1997 Cristian Gafton -- fixed a security problem in chfn and chsh accepting too - long gecos fields - -* Fri Dec 19 1997 Mike Wangsmo -- removed "." from default path - -* Tue Dec 02 1997 Cristian Gafton -- added (again) the vipw patch - -* Wed Oct 22 1997 Michael Fulbright -- minor cleanups for glibc 2.1 - -* Fri Oct 17 1997 Michael Fulbright -- added vfat32 filesystem type to list recognized by fdisk - -* Fri Oct 10 1997 Erik Troan -- don't build clock on the alpha -- don't install chkdupexe - -* Thu Oct 02 1997 Michael K. Johnson -- Update to new pam standard. -- BuildRoot. - -* Thu Sep 25 1997 Cristian Gafton -- added rootok and setproctitle patches -- updated pam config files for chfn and chsh - -* Tue Sep 02 1997 Erik Troan -- updated MCONFIG to automatically determine the architecture -- added glibc header hacks to fdisk code -- rdev is only available on the intel - -* Fri Jul 18 1997 Erik Troan -- update to util-linux 2.7, fixed login problems - -* Wed Jun 25 1997 Erik Troan -- Merged Red Hat changes into main util-linux source, updated package to - development util-linux (nearly 2.7). - -* Tue Apr 22 1997 Michael K. Johnson -- LOG_AUTH --> LOG_AUTHPRIV in login and shutdown - -* Mon Mar 03 1997 Michael K. Johnson -- Moved to new pam and from pam.conf to pam.d - -* Tue Feb 25 1997 Michael K. Johnson -- pam.patch differentiated between different kinds of bad logins. - In particular, "user does not exist" and "bad password" were treated - differently. This was a minor security hole. diff --git a/uuidd.init b/uuidd.init deleted file mode 100755 index 9fba666..0000000 --- a/uuidd.init +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -# -# uuidd uuidd daemon for unique time-based UUID generation -# -# Author: Eric Sandeen -# -# chkconfig: - 60 99 -# -# description: uuidd is a helper daemon to guarantee uniqueness of \ -# time-based UUIDs when using libuuid. -# processname: uuidd -# pidfile: /var/lib/libuuid/uuidd.pid -# - -### BEGIN INIT INFO -# Provides: uuidd -# Required-Start: $time $local_fs -# Required-Stop: $time $local_fs -# Default-Stop: 0 1 6 -# Short-Description: UUID daemon -# Description: Daemon which guarantees uniqueness of time-based UUIDS -# when using libuuid. -### END INIT INFO - -# source function library -. /etc/rc.d/init.d/functions - -[ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd - -DAEMON=uuidd -exec=/usr/sbin/uuidd -prog=uuidd -user=uuidd -lockfile=/var/lock/subsys/$DAEMON -pidfile=/var/run/uuidd/uuidd.pid - -check() { - # Check that we're a privileged user - [ $(id -u) -eq 0 ] || exit 4 - - # Check if daemon binary is executable - [ -x $exec ] || exit 5 -} - -start () { - check - echo -n $"Starting $prog: " - daemon --user $user --pidfile $pidfile $DAEMON - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop () { - check - echo -n $"Stopping $prog: " - killproc $DAEMON - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - status -p $pidfile $DAEMON -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $?