From 32470391496dafc5bb8da7deb91f0dcefcbb6f7a Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 4 May 2005 04:27:03 +0000 Subject: [PATCH 001/425] - rebuild against new libe2fsprogs (and libblkid) to fix cramfs auto-detection --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 0594b2b..21464fe 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.12p -Release: 9.2 +Release: 9.3 License: distributable Group: System Environment/Base @@ -644,6 +644,9 @@ fi /sbin/losetup %changelog +* 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 From 5305967376e3e3c7920de9110ac895be2d19fa25 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 6 May 2005 12:35:06 +0000 Subject: [PATCH 002/425] Added the -o fsc flag to nfsmount --- util-linux.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 0594b2b..7b7bad1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.12p -Release: 9.2 +Release: 9.2.nfsmount.fsc License: distributable Group: System Environment/Base @@ -109,6 +109,7 @@ Patch171: util-linux-2.12a-mount-proto.patch Patch172: util-linux-2.12a-nfsmount-overflow.patch Patch173: util-linux-2.12a-nfsmount-reservp.patch Patch174: util-linux-2.12p-nfsmount-rollback.patch +Patch175: util-linux-2.12p-nfsmount-fsc.patch # Makeing /var/log/lastlog (#151635) Patch180: util-linux-2.12p-login-lastlog.patch @@ -243,6 +244,7 @@ mv MCONFIG.new MCONFIG %patch172 -p1 %patch173 -p1 %patch174 -p1 +%patch175 -p1 %patch180 -p1 -b .lastlog %patch181 -p1 @@ -644,6 +646,9 @@ fi /sbin/losetup %changelog +* Fri May 6 2005 Steve Dickson 2.12p-9.2.nfsmount.fsc +- Added the -o fsc flag to nfsmount. + * Mon May 2 2005 Karel Zak 2.12p-9.2 - rebuild From 4b5a4a79666480f34c54773cb24568f1e67c59e0 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Sat, 7 May 2005 13:56:17 +0000 Subject: [PATCH 003/425] Added util-linux-2.12p-nfsmount-fsc.patch --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 7b7bad1..2f00a44 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.12p -Release: 9.2.nfsmount.fsc +Release: 9.3.nfsmount.fsc License: distributable Group: System Environment/Base @@ -646,7 +646,7 @@ fi /sbin/losetup %changelog -* Fri May 6 2005 Steve Dickson 2.12p-9.2.nfsmount.fsc +* Fri May 6 2005 Steve Dickson 2.12p-9.3.nfsmount.fsc - Added the -o fsc flag to nfsmount. * Mon May 2 2005 Karel Zak 2.12p-9.2 From 0eae1f1b8c39305cd464f5587e758a05470649bf Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Tue, 31 May 2005 22:56:30 +0000 Subject: [PATCH 004/425] testme --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 21464fe..4145fef 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.12p -Release: 9.3 +Release: 9.4 License: distributable Group: System Environment/Base From 330bdf6b1e878baf8e2b8b72b8c57021ff672489 Mon Sep 17 00:00:00 2001 From: kzak Date: Sun, 5 Jun 2005 12:37:24 +0000 Subject: [PATCH 005/425] - removed non utf-8 junk from .spec --- util-linux.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 4145fef..2ec8b6e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1010,7 +1010,7 @@ totally useless. * Tue Jul 2 2002 Bill Nottingham 2.11r-4 - only require usermode if we're shipping kbdrate here -* Fri Jun 28 2002 Trond Eivind Glomsrød 2.11r-3 +* 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 @@ -1039,7 +1039,7 @@ slang-devel. - 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 Glomsrød 2.11n-16 +* Tue Jun 11 2002 Trond Eivind Glomsrod 2.11n-16 - support large swap partitions - add '-d' option to autodetect available swap partitions @@ -1409,7 +1409,7 @@ acquisition of controlling terminal). * Fri Jul 16 1999 Jeff Johnson - update to 2.9u: -- Czech more.help and messages (Jiøí Pavlovský) +- Czech more.help and messages (Jiri Pavlovsky) - Japanese messages (Daisuke Yamashita) - fdisk fix (Klaus G. Wagner) - mount fix (Hirokazu Takahashi) @@ -1423,7 +1423,7 @@ acquisition of controlling terminal). - national language support for hwclock - Japanese messages (both by Daisuke Yamashita) - German messages and some misc i18n fixes (Elrond) -- Czech messages (Jiøí Pavlovský) +- 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. From ced06ff43da49dd55b390ebd80b1dcc120811d76 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 16 Jun 2005 15:39:03 +0000 Subject: [PATCH 006/425] =?UTF-8?q?-=20fix=20#157656=20=E2=80=93=20CRM=205?= =?UTF-8?q?46998:=20Possible=20bug=20in=20vipw,=20changes=20permissions=20?= =?UTF-8?q?of=20=20=20=20=20/etc/shadow=20and=20/etc/gshadow=20-=20fix=20#?= =?UTF-8?q?159339=20-=20util-linux=20updates=20for=20new=20audit=20system?= =?UTF-8?q?=20(pam=5Floginuid.so=20=20=20=20=20added=20to=20util-linux-sel?= =?UTF-8?q?inux.pamd)=20-=20fix=20#159418=20-=20sfdisk=20unusable=20-=20cr?= =?UTF-8?q?ashes=20immediately=20on=20invocation=20-=20fix=20#157674=20?= =?UTF-8?q?=E2=80=93=20sync=20option=20on=20VFAT=20mount=20destroys=20flas?= =?UTF-8?q?h=20drives=20-=20fix=20.spec=20file=20/usr/sbin/{hwclock,clock}?= =?UTF-8?q?=20symlinks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util-linux-2.12p-vipw-perm.patch | 16 ++++++++++++++++ util-linux.spec | 23 ++++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 util-linux-2.12p-vipw-perm.patch diff --git a/util-linux-2.12p-vipw-perm.patch b/util-linux-2.12p-vipw-perm.patch new file mode 100644 index 0000000..13c9cd8 --- /dev/null +++ b/util-linux-2.12p-vipw-perm.patch @@ -0,0 +1,16 @@ +--- util-linux-2.12p/login-utils/vipw.c.perm 2005-06-16 10:33:46.387891456 +0200 ++++ util-linux-2.12p/login-utils/vipw.c 2005-06-16 10:34:37.077185512 +0200 +@@ -299,11 +299,11 @@ + } + if (!is_shadow) + chmod(tmp_file, 0644); +-#if 0 ++/*#if 0*/ + /* if shadow file, then mode is 0600 now */ + else + chmod(tmp_file, 0400); +-#endif ++/*#endif*/ + pw_unlock(); + } + diff --git a/util-linux.spec b/util-linux.spec index 2ec8b6e..15e7712 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.12p -Release: 9.4 +Release: 10 License: distributable Group: System Environment/Base @@ -128,6 +128,12 @@ Patch186: util-linux-2.12p-fdformat-ide.patch Patch187: util-linux-2.12p-fstab-man.patch # 156597 - look - doesn't work with separators Patch188: util-linux-2.12p-look-separator.patch +# 157656 - CRM 546998 : Possible bug in vipw, changes permissions of /etc/shadow +Patch189: util-linux-2.12p-vipw-perm.patch +# 159418 – sfdisk unusable - crashes immediately on invocation +Patch200: util-linux-2.12p-sfdisk-fgets.patch +# 157674 – sync option on VFAT mount destroys flash drives +Patch201: util-linux-2.12p-mount-man-sync.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -254,6 +260,9 @@ mv MCONFIG.new MCONFIG %patch186 -p1 %patch187 -p1 %patch188 -p1 +%patch189 -p1 +%patch200 -p1 +%patch201 -p1 %build unset LINGUAS || : @@ -382,7 +391,8 @@ install -m644 kbdrate/kbdrate.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kbdrate } ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock -ln -sf ../../sbin/clock ${RPM_BUILD_ROOT}/usr/sbin/clock +# we needn't /usr/sbin/clock in 'install' section if we ignore it in 'files' section [24-Jun-2005, Karel Zak] +#ln -sf ../../sbin/clock ${RPM_BUILD_ROOT}/usr/sbin/clock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock # We do not want dependencies on csh @@ -394,7 +404,7 @@ rm -f fdisk/README.cfdisk 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* +rm -f $RPM_BUILD_ROOT/sbin/{hwclock,clock} $RPM_BUILD_ROOT%{_mandir}/man8/hwclock.8* $RPM_BUILD_ROOT/usr/sbin/{hwclock,clock} %endif %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy,setfdprm} $RPM_BUILD_ROOT%{_mandir}/man8/{fdformat,tunelp,floppy,setfdprm}.8* @@ -644,6 +654,13 @@ fi /sbin/losetup %changelog +* Thu Jun 16 2005 Karel Zak 2.12p-10 +- 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 From c82b4cbfc9659225a50f7a9312f19f31a7b5a100 Mon Sep 17 00:00:00 2001 From: kzak Date: Sat, 18 Jun 2005 09:20:18 +0000 Subject: [PATCH 007/425] - fix some chars in .spec --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 15e7712..604a6fe 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -655,10 +655,10 @@ fi %changelog * Thu Jun 16 2005 Karel Zak 2.12p-10 -- fix #157656 – CRM 546998: Possible bug in vipw, changes permissions of /etc/shadow and /etc/gshadow +- 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 #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 From 169b953cab0cab6fa5a9ba38e3b227b49c6e3048 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 16 Aug 2005 17:58:01 +0000 Subject: [PATCH 008/425] - /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) --- .cvsignore | 4 +- sources | 2 +- util-linux-2.12p-execl.patch | 25 ++ util-linux-2.12p-mount-ocfs2.patch | 187 +++++++++++ util-linux-2.13-arch.patch | 94 ++++++ util-linux-2.13-audit-hwclock.patch | 324 ++++++++++++++++++ util-linux-2.13-ctty3.patch | 102 ++++++ util-linux-2.13-fdisk-gpt.patch | 500 ++++++++++++++++++++++++++++ util-linux-2.13-moretc.patch | 107 ++++++ util-linux-chsh-chfn.pamd | 6 + util-linux.spec | 351 ++++++++++--------- 11 files changed, 1522 insertions(+), 180 deletions(-) create mode 100644 util-linux-2.12p-execl.patch create mode 100644 util-linux-2.12p-mount-ocfs2.patch create mode 100644 util-linux-2.13-arch.patch create mode 100644 util-linux-2.13-audit-hwclock.patch create mode 100644 util-linux-2.13-ctty3.patch create mode 100644 util-linux-2.13-fdisk-gpt.patch create mode 100644 util-linux-2.13-moretc.patch create mode 100644 util-linux-chsh-chfn.pamd diff --git a/.cvsignore b/.cvsignore index accc18d..6fff6a4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,6 +1,4 @@ cramfs-1.1.tar.gz floppy-0.12.tar.gz kbdrate.tar.gz -util-linux-2.12a.tar.gz -util-linux-2.12j.tar.gz -util-linux-2.12p.tar.gz +util-linux-2.13-pre1.tar.bz2 diff --git a/sources b/sources index d9ab3fb..99a73b2 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ d3912b9f7bf745fbfea68f6a9b9de30f cramfs-1.1.tar.gz 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz 555e4bd2a23347fddac4268cbf4e1fe4 kbdrate.tar.gz -d47e820f6880c21c8b4c0c7e8a7376cc util-linux-2.12p.tar.gz +d65154c41657f7bcb1b2025cdbe588a7 util-linux-2.13-pre1.tar.bz2 diff --git a/util-linux-2.12p-execl.patch b/util-linux-2.12p-execl.patch new file mode 100644 index 0000000..3d88c5e --- /dev/null +++ b/util-linux-2.12p-execl.patch @@ -0,0 +1,25 @@ +--- util-linux-2.12p/login-utils/agetty.c.execl 2005-07-12 15:53:25.000000000 +0200 ++++ util-linux-2.12p/login-utils/agetty.c 2005-07-12 15:53:49.000000000 +0200 +@@ -382,7 +382,7 @@ + + /* Let the login program take care of password validation. */ + +- (void) execl(options.login, options.login, "--", logname, (char *) 0); ++ (void) execl(options.login, options.login, "--", logname, NULL); + error(_("%s: can't exec %s: %m"), options.tty, options.login); + exit(0); /* quiet GCC */ + } +--- util-linux-2.12p/misc-utils/script.c.execl 2005-07-12 15:54:17.000000000 +0200 ++++ util-linux-2.12p/misc-utils/script.c 2005-07-12 15:54:28.000000000 +0200 +@@ -325,9 +325,9 @@ + shname = shell; + + if (cflg) +- execl(shell, shname, "-c", cflg, 0); ++ execl(shell, shname, "-c", cflg, NULL); + else +- execl(shell, shname, "-i", 0); ++ execl(shell, shname, "-i", NULL); + + perror(shell); + fail(); diff --git a/util-linux-2.12p-mount-ocfs2.patch b/util-linux-2.12p-mount-ocfs2.patch new file mode 100644 index 0000000..37ddb1c --- /dev/null +++ b/util-linux-2.12p-mount-ocfs2.patch @@ -0,0 +1,187 @@ +--- util-linux-2.12p/mount/mount.c.ocfs2 2005-07-12 16:31:16.000000000 +0200 ++++ util-linux-2.12p/mount/mount.c 2005-07-12 16:31:46.000000000 +0200 +@@ -466,6 +466,61 @@ + } + + /* ++ * check_special_mountprog() ++ * If there is a special mount program for this type, exec it. ++ * returns: 0: no exec was done, 1: exec was done, status has result ++ */ ++ ++static int ++check_special_mountprog(const char *spec, const char *node, const char *type, int flags, ++ char *extra_opts, int *status) { ++ char mountprog[120]; ++ struct stat statbuf; ++ int res; ++ ++ if (!external_allowed) ++ return 0; ++ ++ if (type && strlen(type) < 100) { ++ sprintf(mountprog, "/sbin/mount.%s", type); ++ if (stat(mountprog, &statbuf) == 0) { ++ res = fork(); ++ if (res == 0) { ++ char *oo, *mountargs[10]; ++ int i = 0; ++ ++ setuid(getuid()); ++ setgid(getgid()); ++ oo = fix_opts_string (flags, extra_opts, NULL); ++ mountargs[i++] = mountprog; ++ mountargs[i++] = spec; ++ mountargs[i++] = node; ++ if (nomtab) ++ mountargs[i++] = "-n"; ++ if (verbose) ++ mountargs[i++] = "-v"; ++ if (oo && *oo) { ++ mountargs[i++] = "-o"; ++ mountargs[i++] = oo; ++ } ++ mountargs[i] = NULL; ++ execv(mountprog, mountargs); ++ exit(1); /* exec failed */ ++ } else if (res != -1) { ++ int st; ++ wait(&st); ++ *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR); ++ return 1; ++ } else { ++ int errsv = errno; ++ error(_("mount: cannot fork: %s"), strerror(errsv)); ++ } ++ } ++ } ++ return 0; ++} ++ ++/* + * guess_fstype_and_mount() + * Mount a single file system. Guess the type when unknown. + * returns: 0: OK, -1: error in errno, 1: other error +@@ -474,9 +529,11 @@ + */ + static int + guess_fstype_and_mount(const char *spec, const char *node, const char **types, +- int flags, char *mount_opts) { ++ int flags, char *mount_opts, int *special, int *status) { + struct mountargs args = { spec, node, NULL, flags & ~MS_NOSYS, mount_opts }; + ++ *special = 0; ++ + if (*types && strcasecmp (*types, "auto") == 0) + *types = NULL; + +@@ -485,10 +542,16 @@ + + if (!*types && !(flags & MS_REMOUNT)) { + *types = guess_fstype(spec); +- if (*types && !strcmp(*types, "swap")) { +- error(_("%s looks like swapspace - not mounted"), spec); +- *types = NULL; +- return 1; ++ if (*types) { ++ if (!strcmp(*types, "swap")) { ++ error(_("%s looks like swapspace - not mounted"), spec); ++ *types = NULL; ++ return 1; ++ } else if (check_special_mountprog(spec, node, *types, flags, ++ mount_opts, status)) { ++ *special = 1; ++ return 0; ++ } + } + } + +@@ -741,61 +804,6 @@ + } + + /* +- * check_special_mountprog() +- * If there is a special mount program for this type, exec it. +- * returns: 0: no exec was done, 1: exec was done, status has result +- */ +- +-static int +-check_special_mountprog(const char *spec, const char *node, const char *type, +- int flags, char *extra_opts, int *status) { +- char mountprog[120]; +- struct stat statbuf; +- int res; +- +- if (!external_allowed) +- return 0; +- +- if (type && strlen(type) < 100) { +- sprintf(mountprog, "/sbin/mount.%s", type); +- if (stat(mountprog, &statbuf) == 0) { +- res = fork(); +- if (res == 0) { +- const char *oo, *mountargs[10]; +- int i = 0; +- +- setuid(getuid()); +- setgid(getgid()); +- oo = fix_opts_string (flags, extra_opts, NULL); +- mountargs[i++] = mountprog; +- mountargs[i++] = spec; +- mountargs[i++] = node; +- if (nomtab) +- mountargs[i++] = "-n"; +- if (verbose) +- mountargs[i++] = "-v"; +- if (oo && *oo) { +- mountargs[i++] = "-o"; +- mountargs[i++] = oo; +- } +- mountargs[i] = NULL; +- execv(mountprog, (char **) mountargs); +- exit(1); /* exec failed */ +- } else if (res != -1) { +- int st; +- wait(&st); +- *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR); +- return 1; +- } else { +- int errsv = errno; +- error(_("mount: cannot fork: %s"), strerror(errsv)); +- } +- } +- } +- return 0; +-} +- +-/* + * try_mount_one() + * Try to mount one file system. When "bg" is 1, this is a retry + * in the background. One additional exit code EX_BG is used here. +@@ -807,7 +815,7 @@ + static int + try_mount_one (const char *spec0, const char *node0, const char *types0, + const char *opts0, int freq, int pass, int bg, int ro) { +- int res = 0, status; ++ int res = 0, status, special; + int mnt5_res = 0; /* only for gcc */ + int mnt_err; + int flags; +@@ -898,9 +906,15 @@ + block_signals (SIG_BLOCK); + nosigblock: + +- if (!fake) ++ if (!fake) { + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, +- mount_opts); ++ mount_opts, &special, &status); ++ ++ if (special) { ++ block_signals (SIG_UNBLOCK); ++ return status; ++ } ++ } + + if (fake || mnt5_res == 0) { + /* Mount succeeded, report this (if verbose) and write mtab entry. */ diff --git a/util-linux-2.13-arch.patch b/util-linux-2.13-arch.patch new file mode 100644 index 0000000..472e4fb --- /dev/null +++ b/util-linux-2.13-arch.patch @@ -0,0 +1,94 @@ +--- util-linux-2.13-pre1/sys-utils/Makefile.am.arch 2005-08-16 12:54:22.000000000 +0200 ++++ util-linux-2.13-pre1/sys-utils/Makefile.am 2005-08-16 12:55:00.000000000 +0200 +@@ -1,6 +1,6 @@ + include $(top_srcdir)/config/include-Makefile.am + +-bin_PROGRAMS = dmesg ++bin_PROGRAMS = dmesg arch + + usrbin_PROGRAMS = cytune flock ipcrm ipcs renice setsid + +@@ -8,7 +8,7 @@ + + usrsbin_PROGRAMS = readprofile tunelp + +-man_MANS = flock.1 readprofile.1 \ ++man_MANS = flock.1 readprofile.1 arch.1 \ + ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 ipcs.8 renice.8 \ + setsid.8 tunelp.8 + +--- util-linux-2.13-pre1/sys-utils/arch.1.arch 2005-08-16 12:55:34.000000000 +0200 ++++ util-linux-2.13-pre1/sys-utils/arch.1 2005-08-16 12:59:51.000000000 +0200 +@@ -0,0 +1,34 @@ ++.\" arch.1 -- ++.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) ++.\" Public domain: may be freely distributed. ++.TH ARCH 1 "4 July 1997" "Linux 2.0" "Linux Programmer's Manual" ++.SH NAME ++arch \- print machine architecture ++.SH SYNOPSIS ++.B arch ++.SH DESCRIPTION ++.B arch ++is deprecated command since release util-linux 2.13. Use ++.BR "uname -m" . ++ ++On current Linux systems, ++.B arch ++prints things such as "i386", "i486", "i586", "alpha", "sparc", ++"arm", "m68k", "mips", "ppc". ++.SH SEE ALSO ++.BR uname (1), ++.BR uname (2) ++.\" ++.\" Details: ++.\" arch prints the machine part of the system_utsname struct ++.\" This struct is defined in version.c, and this field is ++.\" initialized with UTS_MACHINE, which is defined as $ARCH ++.\" in the main Makefile. ++.\" That gives the possibilities ++.\" alpha arm i386 m68k mips ppc sparc sparc64 ++.\" ++.\" If Makefile is not edited, ARCH is guessed by ++.\" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) ++.\" Then how come we get these i586 values? ++.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; ++.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) +--- util-linux-2.13-pre1/sys-utils/arch.c.arch 2005-08-16 12:55:43.000000000 +0200 ++++ util-linux-2.13-pre1/sys-utils/arch.c 1999-07-09 04:56:41.000000000 +0200 +@@ -0,0 +1,35 @@ ++/* arch -- print machine architecture information ++ * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu ++ * Revised: Mon Dec 20 12:29:23 1993 by faith@cs.unc.edu ++ * Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) ++ ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2, or (at your option) any ++ * later version. ++ ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ ++#include ++#include ++ ++int main (void) ++{ ++ struct utsname utsbuf; ++ ++ if (uname( &utsbuf )) { ++ perror( "arch" ); ++ return 1; ++ } ++ ++ printf( "%s\n", utsbuf.machine ); ++ ++ return 0; ++} diff --git a/util-linux-2.13-audit-hwclock.patch b/util-linux-2.13-audit-hwclock.patch new file mode 100644 index 0000000..97b6ee7 --- /dev/null +++ b/util-linux-2.13-audit-hwclock.patch @@ -0,0 +1,324 @@ +--- util-linux-2.13-pre1/hwclock/hwclock.c.audit 2005-07-31 22:15:18.000000000 +0200 ++++ util-linux-2.13-pre1/hwclock/hwclock.c 2005-08-12 14:36:57.000000000 +0200 +@@ -81,9 +81,11 @@ + #include + #include + #include ++#include + + #include "clock.h" + #include "nls.h" ++#include "audit.h" + + #define MYNAME "hwclock" + +@@ -1234,7 +1236,7 @@ + va_end(ap); + } + +- exit(fmt ? EX_USAGE : 0); ++ audit_exit(fmt ? EX_USAGE : 0); + } + + static const struct option longopts[] = { +@@ -1298,6 +1300,12 @@ + /* Remember what time we were invoked */ + gettimeofday(&startup_time, NULL); + ++ audit_fd = audit_open(); ++ if (audit_fd < 0) { ++ fprintf(stderr, "Error - unable to connect to audit system\n"); ++ return EX_NOPERM; ++ } ++ + setlocale(LC_ALL, ""); + #ifdef LC_NUMERIC + /* We need LC_CTYPE and LC_TIME and LC_MESSAGES, but must avoid +@@ -1393,6 +1401,13 @@ + argc -= optind; + argv += optind; + ++ if (testing != TRUE) { ++ if (adjust == TRUE || hctosys == TRUE || systohc == TRUE || ++ set == TRUE || setepoch == TRUE) { ++ auditable_event(1); ++ } ++ } ++ + if (argc > 0) { + usage(_("%s takes no non-option arguments. " + "You supplied %d.\n"), +@@ -1403,27 +1418,27 @@ + fprintf(stderr, _("You have specified multiple functions.\n" + "You can only perform one function " + "at a time.\n")); +- exit(EX_USAGE); ++ audit_exit(EX_USAGE); + } + + if (utc && local_opt) { + fprintf(stderr, _("%s: The --utc and --localtime options " + "are mutually exclusive. You specified " + "both.\n"), MYNAME); +- exit(EX_USAGE); ++ audit_exit(EX_USAGE); + } + + if (adjust && noadjfile) { + fprintf(stderr, _("%s: The --adjust and --noadjfile options " + "are mutually exclusive. You specified " + "both.\n"), MYNAME); +- exit(EX_USAGE); ++ audit_exit(EX_USAGE); + } + + if (noadjfile && !(utc || local_opt)) { + fprintf(stderr, _("%s: With --noadjfile, you must specify " + "either --utc or --localtime\n"), MYNAME); +- exit(EX_USAGE); ++ audit_exit(EX_USAGE); + } + + #ifdef __alpha__ +@@ -1437,7 +1452,7 @@ + if (rc != 0) { + fprintf(stderr, _("No usable set-to time. " + "Cannot set clock.\n")); +- exit(EX_USAGE); ++ audit_exit(EX_USAGE); + } + } + +@@ -1469,11 +1484,11 @@ + } + + if (!permitted) +- exit(EX_NOPERM); ++ audit_exit(EX_NOPERM); + + if (getepoch || setepoch) { + manipulate_epoch(getepoch, setepoch, epoch_option, testing); +- return 0; ++ audit_exit(0); + } + + if (debug) +@@ -1487,12 +1502,14 @@ + fprintf(stderr, + _("Use the --debug option to see the details " + "of our search for an access method.\n")); +- exit(1); ++ audit_exit(1); + } + +- return manipulate_clock(show, adjust, noadjfile, set, set_time, ++ rc = manipulate_clock(show, adjust, noadjfile, set, set_time, + hctosys, systohc, startup_time, utc, + local_opt, testing); ++ audit_exit(rc); ++ return rc; /* Not reached */ + } + + /* A single routine for greater uniformity */ +--- /dev/null 2005-08-10 15:18:23.129961080 +0200 ++++ util-linux-2.13-pre1/hwclock/audit.c 2005-08-12 14:36:57.000000000 +0200 +@@ -0,0 +1,70 @@ ++/* audit.c -- This file contains the audit system extensions ++ * ++ * Copyright 2005 Red Hat Inc., Durham, North Carolina. ++ * All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Authors: ++ * Steve Grubb ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "audit.h" ++ ++int audit_fd = -1; ++ ++/* ++ * This function will log a message to the audit system using a predefined ++ * message format. Parameter usage is as follows: ++ * ++ * op - operation. "adding user", "changing finger info", "deleting group" ++ * result - 0 = "success" or 1 = "failed" ++ */ ++static void audit_logger(const char *op, int result) ++{ ++ char msg_buf[256]; /* Common buffer for messaging */ ++ const char *success; ++ extern char *progname; ++ ++ if (!result) ++ success = "success"; ++ else ++ success = "failed"; ++ ++ /* Add some audit info & log it. */ ++ snprintf(msg_buf, sizeof(msg_buf), ++ "%s: op=%s id=%u res=%s", progname, op, getuid(), success); ++ audit_send_user_message(audit_fd, AUDIT_USYS_CONFIG, msg_buf); ++ close(audit_fd); ++} ++ ++static int audit_this = 0; ++void auditable_event(int i) ++{ ++ audit_this = i; ++} ++ ++void audit_exit(int status) ++{ ++ if (audit_this) ++ audit_logger("changing system time", status); ++ exit(status); ++} ++ +--- util-linux-2.13-pre1/hwclock/kd.c.audit 2005-07-31 18:01:20.000000000 +0200 ++++ util-linux-2.13-pre1/hwclock/kd.c 2005-08-12 14:36:57.000000000 +0200 +@@ -19,6 +19,7 @@ + + #include "clock.h" + #include "nls.h" ++#include "audit.h" + + static int con_fd = -1; /* opened by probe_for_kd_clock() */ + /* never closed */ +@@ -103,7 +104,7 @@ + + if (ioctl(con_fd, KDGHWCLK, &t) == -1) { + outsyserr(_("ioctl() failed to read time from %s"), con_fd_filename); +- exit(EX_IOERR); ++ audit_exit(EX_IOERR); + } + + tm->tm_sec = t.sec; +@@ -139,7 +140,7 @@ + + if (ioctl(con_fd, KDSHWCLK, &t ) == -1) { + outsyserr(_("ioctl KDSHWCLK failed")); +- exit(1); ++ audit_exit(1); + } + return 0; + } +--- util-linux-2.13-pre1/hwclock/Makefile.am.audit 2005-08-12 14:37:27.000000000 +0200 ++++ util-linux-2.13-pre1/hwclock/Makefile.am 2005-08-12 14:50:39.000000000 +0200 +@@ -4,4 +4,5 @@ + + sbin_PROGRAMS = hwclock + +-hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c +\ No newline at end of file ++hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c audit.c ++hwclock_LDADD = -laudit +\ No newline at end of file +--- /dev/null 2005-08-10 15:18:23.129961080 +0200 ++++ util-linux-2.13-pre1/hwclock/audit.h 2005-08-12 14:36:57.000000000 +0200 +@@ -0,0 +1,34 @@ ++/* audit.h -- This file contains the function prototypes for audit calls ++ * Copyright 2005 Red Hat Inc., Durham, North Carolina. ++ * All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Author: ++ * Steve Grubb ++ * ++ */ ++ ++#ifndef HW_AUDIT_H ++#define HW_AUDIT_H ++ ++/* This is the file descriptor used by the audit system */ ++extern int audit_fd; ++ ++/* This is the logging functions */ ++void auditable_event(int i); ++void audit_exit(int status); ++ ++#endif +--- util-linux-2.13-pre1/hwclock/clock.h.audit 2000-12-07 17:39:53.000000000 +0100 ++++ util-linux-2.13-pre1/hwclock/clock.h 2005-08-12 14:36:57.000000000 +0200 +@@ -24,7 +24,12 @@ + extern char *progname; + extern int debug; + extern int epoch_option; +-extern void outsyserr(char *msg, ...); ++extern void outsyserr(char *msg, ...) ++#ifdef __GNUC__ ++ __attribute__ ((format (printf, 1, 2))); ++#else ++ ; ++#endif + + /* cmos.c */ + extern void set_cmos_epoch(int ARCconsole, int SRM); +--- util-linux-2.13-pre1/hwclock/rtc.c.audit 2005-07-31 22:15:45.000000000 +0200 ++++ util-linux-2.13-pre1/hwclock/rtc.c 2005-08-12 14:36:57.000000000 +0200 +@@ -8,6 +8,7 @@ + + #include "clock.h" + #include "nls.h" ++#include "audit.h" + + /* + * Get defines for rtc stuff. +@@ -114,7 +115,7 @@ + + if (rtc_fd < 0) { + outsyserr(_("open() of %s failed"), rtc_dev_name); +- exit(EX_OSFILE); ++ audit_exit(EX_OSFILE); + } + return rtc_fd; + } +@@ -149,7 +150,7 @@ + perror(ioctlname); + fprintf(stderr, _("ioctl() to %s to read the time failed.\n"), + rtc_dev_name); +- exit(EX_IOERR); ++ audit_exit(EX_IOERR); + } + + tm->tm_isdst = -1; /* don't know whether it's dst */ +@@ -329,7 +330,7 @@ + perror(ioctlname); + fprintf(stderr, _("ioctl() to %s to set the time failed.\n"), + rtc_dev_name); +- exit(EX_IOERR); ++ audit_exit(EX_IOERR); + } + + if (debug) diff --git a/util-linux-2.13-ctty3.patch b/util-linux-2.13-ctty3.patch new file mode 100644 index 0000000..e33fef7 --- /dev/null +++ b/util-linux-2.13-ctty3.patch @@ -0,0 +1,102 @@ +--- util-linux-2.13-pre1/login-utils/login.c.ctty3 2005-08-02 18:10:24.000000000 +0200 ++++ util-linux-2.13-pre1/login-utils/login.c 2005-08-15 15:51:35.000000000 +0200 +@@ -285,7 +285,21 @@ + updwtmp(_PATH_BTMP, &ut); + #endif + } +-#endif /* HAVE_SECURITY_PAM_MISC_H */ ++ ++static int childPid = 0; ++static volatile int got_sig = 0; ++ ++static void ++parent_sig_handler(int signal) ++{ ++ if(childPid) ++ kill(-childPid, signal); ++ else ++ got_sig = 1; ++ if(signal == SIGTERM) ++ kill(-childPid, SIGHUP); /* because the shell often ignores SIGTERM */ ++} ++#endif /* HAVE_SECURITY_PAM_MISC_H */ + + int + main(int argc, char **argv) +@@ -307,7 +321,7 @@ + int retcode; + pam_handle_t *pamh = NULL; + struct pam_conv conv = { misc_conv, NULL }; +- pid_t childPid; ++ struct sigaction sa, oldsa_hup, oldsa_term; + #else + char *salt, *pp; + #endif +@@ -1023,7 +1037,18 @@ + * We must fork before setuid() because we need to call + * pam_close_session() as root. + */ ++ memset(&sa, 0, sizeof(sa)); ++ sa.sa_handler = SIG_IGN; ++ sigaction(SIGINT, &sa, NULL); ++ ++ sigaction(SIGHUP, &sa, &oldsa_hup); /* ignore while we detach from the tty */ ++ ioctl(0, TIOCNOTTY, NULL); ++ ++ sa.sa_handler = parent_sig_handler; ++ sigaction(SIGHUP, &sa, NULL); ++ sigaction(SIGTERM, &sa, &oldsa_term); + ++ closelog(); + childPid = fork(); + if (childPid < 0) { + int errsv = errno; +@@ -1034,19 +1059,20 @@ + } + + if (childPid) { +- /* parent - wait for child to finish, then cleanup session */ +- signal(SIGHUP, SIG_IGN); +- signal(SIGINT, SIG_IGN); +- signal(SIGQUIT, SIG_IGN); +- signal(SIGTSTP, SIG_IGN); +- signal(SIGTTIN, SIG_IGN); +- signal(SIGTTOU, SIG_IGN); +- +- wait(NULL); ++ close(0); close(1); close(2); ++ sa.sa_handler = SIG_IGN; ++ sigaction(SIGQUIT, &sa, NULL); ++ sigaction(SIGINT, &sa, NULL); ++ while(wait(NULL) == -1 && errno == EINTR) /**/ ; ++ openlog("login", LOG_ODELAY, LOG_AUTHPRIV); + PAM_END; + exit(0); + } + ++ sigaction(SIGHUP, &oldsa_hup, NULL); ++ sigaction(SIGTERM, &oldsa_term, NULL); ++ if(got_sig) exit(1); ++ + /* child */ + /* + * Problem: if the user's shell is a shell like ash that doesnt do +@@ -1058,14 +1084,15 @@ + setsid(); + + /* make sure we have a controlling tty */ +- opentty(ttyn); + openlog("login", LOG_ODELAY, LOG_AUTHPRIV); /* reopen */ + + /* + * TIOCSCTTY: steal tty from other process group. + */ +- if (ioctl(0, TIOCSCTTY, 1)) +- syslog(LOG_ERR, _("TIOCSCTTY failed: %m")); ++ if (ioctl(0, TIOCSCTTY, (char *)1)) { ++ syslog(LOG_ERR, _("Couldn't set controlling terminal: %s"), strerror(errno)); ++ exit(1); ++ } + #endif + signal(SIGINT, SIG_DFL); + diff --git a/util-linux-2.13-fdisk-gpt.patch b/util-linux-2.13-fdisk-gpt.patch new file mode 100644 index 0000000..f72e986 --- /dev/null +++ b/util-linux-2.13-fdisk-gpt.patch @@ -0,0 +1,500 @@ +--- util-linux-2.13-pre1/fdisk/fdisk.c.gpt 2005-08-12 15:24:28.000000000 +0200 ++++ util-linux-2.13-pre1/fdisk/fdisk.c 2005-08-12 15:24:28.000000000 +0200 +@@ -34,6 +34,8 @@ + #include + #endif + ++#include "gpt.h" ++ + static void delete_partition(int i); + + #define hex_val(c) ({ \ +@@ -2400,6 +2402,14 @@ + } + + static void ++gpt_warning(char *dev) ++{ ++ if (gpt_probe_signature_devname(dev)) ++ fprintf(stderr, _("\nWARNING: GPT (GUID Partition Table) detected on '%s'! " ++ "The util fdisk doesn't support GPT. Use GNU Parted.\n\n"), dev); ++} ++ ++static void + try(char *device, int user_specified) { + int gb; + +@@ -2409,6 +2419,7 @@ + if (!user_specified) + if (is_ide_cdrom_or_tape(device)) + return; ++ gpt_warning(device); + if ((fd = open(disk_device, type_open)) >= 0) { + gb = get_boot(try_only); + if (gb > 0) { /* I/O error */ +@@ -2470,6 +2481,8 @@ + printf(_("%c: unknown command\n"), c); + } + ++ ++ + int + main(int argc, char **argv) { + int j, c; +@@ -2574,6 +2587,7 @@ + + for (j = optind; j < argc; j++) { + disk_device = argv[j]; ++ gpt_warning(disk_device); + if ((fd = open(disk_device, type_open)) < 0) + fatal(unable_to_open); + if (disksize(fd, &size)) +@@ -2594,6 +2608,7 @@ + else + fatal(usage2); + ++ gpt_warning(disk_device); + get_boot(fdisk); + + if (osf_label) { +--- /dev/null 2005-08-10 15:18:23.129961080 +0200 ++++ util-linux-2.13-pre1/fdisk/gpt.h 2005-08-12 15:24:28.000000000 +0200 +@@ -0,0 +1,9 @@ ++ ++#ifndef __GPT_H__ ++#define __GPT_H__ ++ ++extern int gpt_probe_signature_fd(int fd); ++extern int gpt_probe_signature_devname(char *devname); ++ ++#endif /* __GPT_H__ */ ++ +--- util-linux-2.13-pre1/fdisk/Makefile.am.gpt 2005-08-12 15:24:59.000000000 +0200 ++++ util-linux-2.13-pre1/fdisk/Makefile.am 2005-08-12 15:25:35.000000000 +0200 +@@ -3,13 +3,13 @@ + sbin_PROGRAMS = fdisk + man_MANS = fdisk.8 + fdisk_SOURCES = fdisk.c llseek.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ +- fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c ++ fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c gpt.c + + if !SPARC + + sbin_PROGRAMS += sfdisk + man_MANS += sfdisk.8 +-sfdisk_SOURCES = sfdisk.c disksize.c i386_sys_types.c partname.c ++sfdisk_SOURCES = sfdisk.c disksize.c i386_sys_types.c partname.c gpt.c + + if USE_SLANG + sbin_PROGRAMS += cfdisk +@@ -25,4 +25,4 @@ + endif + endif + +-endif +\ No newline at end of file ++endif +--- util-linux-2.13-pre1/fdisk/fdisk.8.gpt 2005-08-12 15:24:28.000000000 +0200 ++++ util-linux-2.13-pre1/fdisk/fdisk.8 2005-08-12 15:24:28.000000000 +0200 +@@ -42,6 +42,11 @@ + partition tables. + It understands DOS type partition tables and BSD or SUN type disklabels. + ++.B fdisk ++doesn't understand GUID Partition Table (GPT) and ++it is not designed for large partitions. In particular case use more advanced GNU ++.B parted(8). ++ + The + .I device + is usually one of the following: +--- util-linux-2.13-pre1/fdisk/sfdisk.8.gpt 2004-12-31 17:28:30.000000000 +0100 ++++ util-linux-2.13-pre1/fdisk/sfdisk.8 2005-08-12 15:24:28.000000000 +0200 +@@ -18,6 +18,11 @@ + on a device, check the partitions on a device, and - very dangerous - + repartition a device. + ++.B sfdisk ++doesn't understand GUID Partition Table (GPT) and ++it is not designed for large partitions. In particular case use more advanced GNU ++.B parted(8). ++ + .SS "List Sizes" + .BI "sfdisk \-s " partition + gives the size of +--- /dev/null 2005-08-10 15:18:23.129961080 +0200 ++++ util-linux-2.13-pre1/fdisk/gpt.c 2005-08-12 15:24:28.000000000 +0200 +@@ -0,0 +1,287 @@ ++/* ++ GPT (GUID Partition Table) signature detection. Based on libparted and ++ util-linux/partx. ++ ++ Warning: this code doesn't do all GPT checks (CRC32, Protective MBR, ..). It's ++ really GPT signature detection only. ++ ++ -- Karel Zak (Jun-2-2005) ++ ++*/ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "gpt.h" ++ ++#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) ++#define SECTOR_SIZE 512 /* default */ ++ ++#define _GET_BYTE(x, n) ( ((x) >> (8 * (n))) & 0xff ) ++ ++#define _PED_SWAP64(x) ( (_GET_BYTE(x, 0) << 56) \ ++ + (_GET_BYTE(x, 1) << 48) \ ++ + (_GET_BYTE(x, 2) << 40) \ ++ + (_GET_BYTE(x, 3) << 32) \ ++ + (_GET_BYTE(x, 4) << 24) \ ++ + (_GET_BYTE(x, 5) << 16) \ ++ + (_GET_BYTE(x, 6) << 8) \ ++ + (_GET_BYTE(x, 7) << 0) ) ++ ++#define PED_SWAP64(x) ((uint64_t) _PED_SWAP64( (uint64_t) (x) )) ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# define CPU_TO_LE64(x) (x) ++#else ++# define CPU_TO_LE64(x) PED_SWAP64(x) ++#endif ++ ++#define BLKSSZGET _IO(0x12,104) /* get block device sector size */ ++#define BLKGETLASTSECT _IO(0x12,108) /* get last sector of block device */ ++#define BLKGETSIZE _IO(0x12,96) /* return device size */ ++#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ ++ ++#define GPT_HEADER_SIGNATURE 0x5452415020494645LL ++#define GPT_PRIMARY_PARTITION_TABLE_LBA 1 ++ ++typedef struct { ++ uint32_t time_low; ++ uint16_t time_mid; ++ uint16_t time_hi_and_version; ++ uint8_t clock_seq_hi_and_reserved; ++ uint8_t clock_seq_low; ++ uint8_t node[6]; ++} /* __attribute__ ((packed)) */ efi_guid_t; ++/* commented out "__attribute__ ((packed))" to work around gcc bug (fixed ++ * in gcc3.1): __attribute__ ((packed)) breaks addressing on initialized ++ * data. It turns out we don't need it in this case, so it doesn't break ++ * anything :) ++ */ ++ ++typedef struct _GuidPartitionTableHeader_t { ++ uint64_t Signature; ++ uint32_t Revision; ++ uint32_t HeaderSize; ++ uint32_t HeaderCRC32; ++ uint32_t Reserved1; ++ uint64_t MyLBA; ++ uint64_t AlternateLBA; ++ uint64_t FirstUsableLBA; ++ uint64_t LastUsableLBA; ++ efi_guid_t DiskGUID; ++ uint64_t PartitionEntryLBA; ++ uint32_t NumberOfPartitionEntries; ++ uint32_t SizeOfPartitionEntry; ++ uint32_t PartitionEntryArrayCRC32; ++ uint8_t Reserved2[512 - 92]; ++} __attribute__ ((packed)) GuidPartitionTableHeader_t; ++ ++struct blkdev_ioctl_param { ++ unsigned int block; ++ size_t content_length; ++ char * block_contents; ++}; ++ ++static int ++_get_linux_version (void) ++{ ++ static int kver = -1; ++ struct utsname uts; ++ int major; ++ int minor; ++ int teeny; ++ ++ if (kver != -1) ++ return kver; ++ if (uname (&uts)) ++ return kver = 0; ++ if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) != 3) ++ return kver = 0; ++ return kver = KERNEL_VERSION (major, minor, teeny); ++} ++ ++static unsigned int ++_get_sector_size (int fd) ++{ ++ unsigned int sector_size; ++ ++ if (_get_linux_version() < KERNEL_VERSION (2,3,0)) ++ return SECTOR_SIZE; ++ if (ioctl (fd, BLKSSZGET, §or_size)) ++ return SECTOR_SIZE; ++ return sector_size; ++} ++ ++static uint64_t ++_get_num_sectors(int fd) ++{ ++ int version = _get_linux_version(); ++ unsigned long size; ++ uint64_t bytes=0; ++ ++ if (version >= KERNEL_VERSION(2,5,4) || ++ (version < KERNEL_VERSION(2,5,0) && ++ version >= KERNEL_VERSION (2,4,18))) ++ { ++ if (ioctl(fd, BLKGETSIZE64, &bytes) == 0) ++ return bytes / _get_sector_size(fd); ++ } ++ if (ioctl (fd, BLKGETSIZE, &size)) ++ return 0; ++ return size; ++} ++ ++static uint64_t ++last_lba(int fd) ++{ ++ int rc; ++ uint64_t sectors = 0; ++ struct stat s; ++ ++ memset(&s, 0, sizeof (s)); ++ rc = fstat(fd, &s); ++ if (rc == -1) ++ { ++ fprintf(stderr, "last_lba() could not stat: %s\n", ++ strerror(errno)); ++ return 0; ++ } ++ if (S_ISBLK(s.st_mode)) ++ sectors = _get_num_sectors(fd); ++ else ++ { ++ fprintf(stderr, ++ "last_lba(): I don't know how to handle files with mode %x\n", ++ s.st_mode); ++ sectors = 1; ++ } ++ return sectors - 1; ++} ++ ++static ssize_t ++read_lastoddsector(int fd, uint64_t lba, void *buffer, size_t count) ++{ ++ int rc; ++ struct blkdev_ioctl_param ioctl_param; ++ ++ if (!buffer) return 0; ++ ++ ioctl_param.block = 0; /* read the last sector */ ++ ioctl_param.content_length = count; ++ ioctl_param.block_contents = buffer; ++ ++ rc = ioctl(fd, BLKGETLASTSECT, &ioctl_param); ++ if (rc == -1) perror("read failed"); ++ ++ return !rc; ++} ++ ++static ssize_t ++read_lba(int fd, uint64_t lba, void *buffer, size_t bytes) ++{ ++ int sector_size = _get_sector_size(fd); ++ off_t offset = lba * sector_size; ++ ssize_t bytesread; ++ ++ lseek(fd, offset, SEEK_SET); ++ bytesread = read(fd, buffer, bytes); ++ ++ /* Kludge. This is necessary to read/write the last ++ block of an odd-sized disk, until Linux 2.5.x kernel fixes. ++ This is only used by gpt.c, and only to read ++ one sector, so we don't have to be fancy. ++ */ ++ if (!bytesread && !(last_lba(fd) & 1) && lba == last_lba(fd)) ++ bytesread = read_lastoddsector(fd, lba, buffer, bytes); ++ return bytesread; ++} ++ ++static GuidPartitionTableHeader_t * ++alloc_read_gpt_header(int fd, uint64_t lba) ++{ ++ GuidPartitionTableHeader_t *gpt = ++ (GuidPartitionTableHeader_t *) malloc(sizeof (GuidPartitionTableHeader_t)); ++ if (!gpt) ++ return NULL; ++ memset(gpt, 0, sizeof (*gpt)); ++ if (!read_lba(fd, lba, gpt, sizeof (GuidPartitionTableHeader_t))) ++ { ++ free(gpt); ++ return NULL; ++ } ++ return gpt; ++} ++ ++static int ++gpt_check_signature(int fd, uint64_t lba) ++{ ++ GuidPartitionTableHeader_t *gpt; ++ int res=0; ++ ++ if ((gpt = alloc_read_gpt_header(fd, lba))) ++ { ++ if (gpt->Signature == CPU_TO_LE64(GPT_HEADER_SIGNATURE)) ++ res = 1; ++ free(gpt); ++ } ++ return res; ++} ++ ++/* returns: ++ * 0 not found GPT ++ * 1 for valid primary GPT header ++ * 2 for valid alternative GPT header ++ */ ++int ++gpt_probe_signature_fd(int fd) ++{ ++ int res = 0; ++ ++ /* check primary GPT header */ ++ if (gpt_check_signature(fd, GPT_PRIMARY_PARTITION_TABLE_LBA)) ++ res = 1; ++ else ++ { ++ /* check alternative GPT header */ ++ uint64_t lastlba = last_lba(fd); ++ if (gpt_check_signature(fd, lastlba)) ++ res = 2; ++ } ++ return res; ++} ++ ++int ++gpt_probe_signature_devname(char *devname) ++{ ++ int res, fd; ++ if ((fd = open(devname, O_RDONLY)) < 0) ++ return 0; ++ res = gpt_probe_signature_fd(fd); ++ close(fd); ++ return res; ++} ++ ++#ifdef GPT_TEST_MAIN ++int ++main(int argc, char **argv) ++{ ++ if (argc!=2) ++ { ++ fprintf(stderr, "usage: %s \n", argv[0]); ++ exit(EXIT_FAILURE); ++ } ++ if (gpt_probe_signature_devname(argv[1])) ++ printf("GPT (GUID Partition Table) detected on %s\n", argv[1]); ++ exit(EXIT_SUCCESS); ++} ++#endif +--- util-linux-2.13-pre1/fdisk/sfdisk.c.gpt 2005-08-01 21:35:55.000000000 +0200 ++++ util-linux-2.13-pre1/fdisk/sfdisk.c 2005-08-12 15:24:28.000000000 +0200 +@@ -50,6 +50,8 @@ + #include "nls.h" + #include "common.h" + ++#include "gpt.h" ++ + #define SIZE(a) (sizeof(a)/sizeof(a[0])) + + /* +@@ -2476,6 +2478,23 @@ + return NULL; + } + ++static void ++gpt_warning(char *dev, int warn_only) ++{ ++ if (force) ++ warn_only = 1; ++ ++ if (gpt_probe_signature_devname(dev)) { ++ fflush(stdout); ++ fprintf(stderr, _("\nWARNING: GPT (GUID Partition Table) detected on '%s'! " ++ "The util sfdisk doesn't support GPT. Use GNU Parted.\n\n"), dev); ++ if (!warn_only) { ++ fprintf(stderr, _("Use the --force flag to overrule this check.\n")); ++ exit(1); ++ } ++ } ++} ++ + static void do_list(char *dev, int silent); + static void do_size(char *dev, int silent); + static void do_geom(char *dev, int silent); +@@ -2621,6 +2640,7 @@ + while ((dev = nextproc()) != NULL) { + if (is_ide_cdrom_or_tape(dev)) + continue; ++ gpt_warning(dev, 1); + if (opt_out_geom) + do_geom(dev, 1); + if (opt_out_pt_geom) +@@ -2648,6 +2668,7 @@ + + if (opt_list || opt_out_geom || opt_out_pt_geom || opt_size || verify) { + while (optind < argc) { ++ gpt_warning(argv[optind], 1); + if (opt_out_geom) + do_geom(argv[optind], 0); + if (opt_out_pt_geom) +@@ -2676,6 +2697,7 @@ + fatal(_("usage: sfdisk --change-id device partition-number Id\n")); + else if (optind != argc-3 && optind != argc-2) + fatal(_("usage: sfdisk --id device partition-number [Id]\n")); ++ gpt_warning(argv[optind], 0); + do_change_id(argv[optind], argv[optind+1], + (optind == argc-2) ? 0 : argv[optind+2]); + exit(exit_status); +@@ -2685,6 +2707,8 @@ + fatal(_("can specify only one device (except with -l or -s)\n")); + dev = argv[optind]; + ++ gpt_warning(dev, 0); ++ + if (opt_reread) + do_reread(dev); + else if (restore_sector_file) +@@ -2861,6 +2885,8 @@ + + z = &oldp; + ++ gpt_warning(dev, 0); ++ + rw = (!no_write && (arg || ac > 1)); + fd = my_open(dev, rw, 0); + +@@ -2934,6 +2960,8 @@ + + z = &oldp; + ++ gpt_warning(dev, 0); ++ + rw = !no_write; + fd = my_open(dev, rw, 0); + diff --git a/util-linux-2.13-moretc.patch b/util-linux-2.13-moretc.patch new file mode 100644 index 0000000..34a5fae --- /dev/null +++ b/util-linux-2.13-moretc.patch @@ -0,0 +1,107 @@ +--- util-linux-2.13-pre1/text-utils/Makefile.am.moretc 2005-08-01 20:11:07.000000000 +0200 ++++ util-linux-2.13-pre1/text-utils/Makefile.am 2005-08-15 13:36:12.000000000 +0200 +@@ -7,16 +7,13 @@ + man_MANS = col.1 colcrt.1 colrm.1 column.1 hexdump.1 rev.1 line.1 tailf.1 + + if HAVE_NCURSES +-bin_PROGRAMS = more + usrbin_PROGRAMS += ul pg +-more_LDADD = -lncurses + pg_LDADD = -lncurses + ul_LDADD = -lncurses +-man_MANS += ul.1 more.1 pg.1 +-else ++man_MANS += ul.1 pg.1 ++endif + if HAVE_TERMCAP + bin_PROGRAMS = more + more_LDADD = -ltermcap + man_MANS += more.1 + endif +-endif +\ No newline at end of file +--- util-linux-2.13-pre1/text-utils/more.c.moretc 2005-07-28 23:49:31.000000000 +0200 ++++ util-linux-2.13-pre1/text-utils/more.c 2005-08-15 13:40:55.000000000 +0200 +@@ -59,6 +59,8 @@ + #include "nls.h" + #include "widechar.h" + ++#include "../config.h" ++ + #define _REGEX_RE_COMP + #include + #undef _REGEX_RE_COMP +@@ -165,19 +167,60 @@ + } context, screen_start; + extern char PC; /* pad character */ + ++#ifdef HAVE_LIBTERMCAP ++ ++#include ++ ++char termbuffer[4096]; ++char tcbuffer[4096]; ++char *strbuf = termbuffer; ++ ++static void ++my_putstring(char *s) { ++ tputs (s, 1, putchar); ++} ++ ++static void ++my_setupterm(const char *term, int fildes, int *errret) { ++ *errret = tgetent(tcbuffer, term); ++} ++ ++static int ++my_tgetnum(char *s, char *ss) { ++ return tgetnum(s); ++} ++ ++static int ++my_tgetflag(char *s, char *ss) { ++ return tgetflag(s); ++} ++ ++static char * ++my_tgetstr(char *s, char *ss) { ++ return tgetstr(s, &strbuf); ++} ++ ++static char * ++my_tgoto(const char *cap, int col, int row) { ++ return tgoto(cap, col, row); ++} ++ ++#else /* !HAVE_TERMCAP */ ++ + #ifdef HAVE_NCURSES_H +-#include ++# include ++# include + #elif defined(HAVE_NCURSES_NCURSES_H) +-#include ++# include ++# include + #endif + +-#include /* include after */ +- + static void + my_putstring(char *s) { + tputs (s, 1, putchar); /* putp(s); */ + } + ++ + static void + my_setupterm(const char *term, int fildes, int *errret) { + setupterm(term, fildes, errret); +@@ -203,6 +246,8 @@ + return tparm(cap, col, row); + } + ++#endif /* !HAVE_TERMCAP */ ++ + static void + idummy(int *kk) {} + diff --git a/util-linux-chsh-chfn.pamd b/util-linux-chsh-chfn.pamd new file mode 100644 index 0000000..1d512ad --- /dev/null +++ b/util-linux-chsh-chfn.pamd @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_stack.so service=system-auth +account required pam_stack.so service=system-auth +password required pam_stack.so service=system-auth +session required pam_stack.so service=system-auth diff --git a/util-linux.spec b/util-linux.spec index 604a6fe..c79ba3e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,36 +1,38 @@ # Rules for hacking: -# When you add a patch to fix a bug, include the bug number in its filename. +# - when adding patches, please make sure that it is easy to find out what bug ID +# patch fixes. Tip: cut&past bug title with bug ID from bugzilla. +# +# Notes: +# - upstream maintainer Adrian Bunk # # TODO: -# Investigate turning on HAVE_BLKID - it's the right idea, it just needs verifying. +# - remove deprecated (since release 2.13) the arch command # -# Upstream maintainer Adrian Bunk -# 'raw' support is deprecated, only ship it if we need compatibility stuff. +### Features %define include_raw 0 - -%if %{include_raw} -%define raw_options ADD_RAW=yes -%else -%define raw_options %{nil} -%endif - -%define make_options HAVE_BLKID=yes HAVE_PIVOT_ROOT=yes HAVE_PAM=yes HAVE_SHADOW=no HAVE_PASSWD=yes ALLOW_VCS_USE=no %{raw_options} HAVE_SLANG=yes HAVE_SELINUX=yes SLANGFLAGS=-I/usr/include/slang INSTALLSUID='$(INSTALL) -m $(SUIDMODE)' USE_TTY_GROUP=no -%define make_cflags -DUSE_TTY_GROUP -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - %define with_kbdrate 0 + +### Macros %define floppyver 0.12 %define cramfsver 1.1 %define no_hwclock_archs s390 s390x %define cytune_archs %{ix86} alpha armv4l +### Paths +BuildRoot: %{_tmppath}/%{name}-root +# see build section for _prefix + +### Header +# note: this is experimental unstable package. See "TODO [stable]" notes. -- kzak Summary: A collection of basic system utilities. Name: util-linux -Version: 2.12p -Release: 10 +Version: 2.13 +Release: 0.1.pre1 License: distributable Group: System Environment/Base +### Dependences BuildRequires: sed BuildRequires: pam-devel BuildRequires: ncurses-devel @@ -41,34 +43,50 @@ BuildRequires: texinfo BuildRequires: gettext BuildRequires: libselinux-devel BuildRequires: e2fsprogs-devel >= 1.36 +BuildRequires: audit-libs-devel -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-%{version}.tar.gz +### Sources +# TODO [stable]: s/2.13-pre1/%{version}/ +Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre1.tar.bz2 Source1: util-linux-selinux.pamd -Source4: util-linux-2.7-login.pamd -Source2: util-linux-2.7-chfn.pamd -Source3: util-linux-2.7-chsh.pamd +Source2: util-linux-chsh-chfn.pamd Source8: nologin.c Source9: nologin.8 Source10: kbdrate.tar.gz Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.gz Source12: http://download.sourceforge.net/cramfs/cramfs-%{cramfsver}.tar.gz -##### Red Hat Linux-specific patches -# Not really RH-specific -Patch: util-linux-2.12a-moretc.patch +### Obsoletes & Conflicts & Provides +Obsoletes: fdisk tunelp mount losetup schedutils +%ifarch alpha sparc sparc64 sparcv9 s390 +Obsoletes: clock +%endif +%ifarch alpha +Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 +%endif +Requires: pam >= 0.66-4, /etc/pam.d/system-auth +%if %{with_kbdrate} +Requires: usermode +%endif +Conflicts: kernel < 2.2.12-7, +Prereq: /sbin/install-info +Provides: mount = %{version} +Provides: losetup = %{version} +Provides: schedutils +### Patches +# let's use -ltermcap from the more command +Patch1: util-linux-2.13-moretc.patch # Reduce MAX_PARTS to 16 (upstream reasonably won't take it) Patch70: util-linux-2.12a-partlimit.patch - # Note on how to set up raw device mappings using RHL /etc/sysconfig/rawdevices Patch109: util-linux-2.11f-rawman.patch -######## Patches that should be upstream eventually Patch100: util-linux-2.12j-managed.patch Patch106: util-linux-2.12p-swaponsymlink-57300.patch Patch107: util-linux-2.11y-procpartitions-37436.patch -Patch113: util-linux-2.11r-ctty3.patch +Patch113: util-linux-2.13-ctty3.patch Patch120: util-linux-2.11y-skipraid2.patch Patch126: util-linux-2.11y-multibyte.patch @@ -88,23 +106,15 @@ Patch153: util-linux-2.12a-16415-rdevman.patch # Patch to enabled remote service for login/pam (#91174) Patch157: util-linux-2.12a-pamstart.patch - # Patch to enable the pamconsole flag for restricting mounting to users at the console (#133941) Patch159: util-linux-2.12j-pamconsole.patch - # Allow raw(8) to bind raw devices whose device nodes do not yet exist. Patch160: raw-handle-nonpresent-devs.patch Patch164: util-linux-2.12j-113790-hotkeys.patch -# newgrp disabled -#Patch168: util-linux-2.12j-143597-newgrp.patch - -# disable newgrp, in shadow-utils is better implementation (#149997, #151613) -Patch169: util-linux-2.12p-newgrp-disable.patch - # patches required for NFSv4 support -Patch170: util-linux-2.12p-nfsv4.patch +Patch170: util-linux-2.13-nfsv4.patch Patch171: util-linux-2.12a-mount-proto.patch Patch172: util-linux-2.12a-nfsmount-overflow.patch Patch173: util-linux-2.12a-nfsmount-reservp.patch @@ -130,32 +140,24 @@ Patch187: util-linux-2.12p-fstab-man.patch Patch188: util-linux-2.12p-look-separator.patch # 157656 - CRM 546998 : Possible bug in vipw, changes permissions of /etc/shadow Patch189: util-linux-2.12p-vipw-perm.patch -# 159418 – sfdisk unusable - crashes immediately on invocation -Patch200: util-linux-2.12p-sfdisk-fgets.patch -# 157674 – sync option on VFAT mount destroys flash drives -Patch201: util-linux-2.12p-mount-man-sync.patch +# 159339 - util-linux updates for new audit system +Patch202: util-linux-2.13-audit-hwclock.patch +# 158737 - sfdisk warning for large partitions, gpt +Patch203: util-linux-2.13-fdisk-gpt.patch +# 150912 - Add ocfs2 support +Patch204: util-linux-2.12p-mount-ocfs2.patch +# NULL is better than zero at end of execl() +Patch205: util-linux-2.12p-execl.patch +# deprecated the arch command (for compatibility only) +Patch206: util-linux-2.13-arch.patch +# upstream mistakes +Patch207: util-linux-2.13-agetty-man.patch +Patch208: util-linux-2.13-init.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. ########### END upstreamable -Obsoletes: fdisk tunelp -%ifarch alpha sparc sparc64 sparcv9 s390 -Obsoletes: clock -%endif -%ifarch alpha -Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 -%endif -BuildRoot: %{_tmppath}/%{name}-root -Requires: pam >= 0.66-4, /etc/pam.d/system-auth -%if %{with_kbdrate} -Requires: usermode -%endif -Conflicts: kernel < 2.2.12-7, -Prereq: /sbin/install-info -Obsoletes: mount losetup -Provides: mount = %{version} -Provides: losetup = %{version} %description The util-linux package contains a large variety of low-level system @@ -163,97 +165,47 @@ utilities that are necessary for a Linux system to function. Among others, Util-linux contains the fdisk configuration tool and the login program. -%if 0 -%package -n mount -Group: System Environment/Base -Summary: Programs for mounting and unmounting filesystems. -ExclusiveOS: Linux - -%description -n mount -The mount package contains the mount, umount, swapon, and swapoff -programs. Accessible files on your system are arranged in one big tree -or hierarchy. These files can be spread out over several devices. The -mount command attaches a filesystem on some device to your system's -file tree. The umount command detaches a filesystem from the -tree. Swapon and swapoff, respectively, specify and disable devices -and files for paging and swapping. - -%package -n losetup -Summary: Programs for setting up and configuring loopback devices. -Group: System Environment/Base - -%description -n losetup -Linux supports a special block device called the loop device, which -maps a normal file onto a virtual block device. This allows for the -file to be used as a "virtual file system" inside another file. -Losetup is used to associate loop devices with regular files or block -devices, to detach loop devices and to query the status of a loop -device. -%endif - %prep +# TODO [stable]: remove -n +%setup -q -a 10 -a 11 -a 12 -n util-linux-2.13-pre1 -%setup -q -a 10 -a 11 -a 12 - -%patch0 -p1 - +%patch1 -p1 -b .moretc %patch70 -p1 - # nologin cp %{SOURCE8} %{SOURCE9} . - %patch100 -p1 - -sed -e 's:^MAN_DIR=.*:MAN_DIR=%{_mandir}:' -e 's:^INFO_DIR=.*:INFO_DIR=%{_infodir}:' MCONFIG > MCONFIG.new -mv MCONFIG.new MCONFIG - %patch106 -p1 %patch107 -p1 %if %{include_raw} %patch109 -p1 %endif - -%patch113 -p1 +%patch113 -p1 -b .ctty3 %patch120 -p1 - %patch126 -p1 %patch128 -p1 - %patch138 -p1 %patch139 -p1 - # cramfs %patch143 -p0 %patch144 -p1 - %patch147 -p1 %patch150 -p0 - %patch151 -p1 %patch153 -p1 %patch157 -p1 -b .pamstart %patch159 -p1 -b .console - %if %{include_raw} %patch160 -p1 %endif - %patch164 -p1 - -# newgrp disabled -#%patch168 -p1 - -%patch169 -p1 %patch170 -p1 -b .nfsv4 %patch171 -p1 %patch172 -p1 %patch173 -p1 %patch174 -p1 - %patch180 -p1 -b .lastlog %patch181 -p1 %patch182 -p1 -b .typo - %patch183 -p1 %patch184 -p1 %patch185 -p1 @@ -261,39 +213,70 @@ mv MCONFIG.new MCONFIG %patch187 -p1 %patch188 -p1 %patch189 -p1 -%patch200 -p1 -%patch201 -p1 +%patch202 -p1 -b .audit +%patch203 -p1 -b .gpt +%patch204 -p1 +%patch205 -p1 +%patch206 -p1 +%patch207 -p1 +%patch208 -p1 %build unset LINGUAS || : -%configure +# rebuild build system +aclocal +automake -a +autoconf -make OPT="$RPM_OPT_FLAGS %{make_cflags}" \ - LDFLAGS="" \ - %{make_options} \ - %{?_smp_mflags} -make LDFLAGS="" CFLAGS="$RPM_OPT_FLAGS" -C partx %{?_smp_mflags} -cd rescuept -cc -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS -o rescuept rescuept.c -cd .. +# CFLAGS +%define make_cflags -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +# note: we install to /bin and /usr/bin, so there's $bindir and $usrbindir in +# util-linux build system. It's better follow package build-system than rpm +# macros (where is prefix=/usr) +%define _prefix "" + +# configure +export CFLAGS="%{make_cflags} $RPM_OPT_FLAGS" %{?_smp_mflags} +%configure \ + --disable-wall \ + --enable-partx \ + --enable-login-utils \ + --enable-kill \ + --enable-write \ +%if %{include_raw} + --enable-raw \ +%endif + --enable-rdev + +# reset to original +%define _prefix /usr + +# build util-linux +make + +# build kbdrate %if %{with_kbdrate} pushd kbdrate cc $RPM_OPT_FLAGS -o kbdrate kbdrate.c popd %endif +# build floppy stuff pushd floppy-%{floppyver} # We have to disable floppygtk somehow... %configure --with-gtk-prefix=/asfd/jkl make %{?_smp_mflags} popd +# build cramfs 1.1 make -C cramfs-%{cramfsver} %{?_smp_mflags} +# build nologin gcc $RPM_OPT_FLAGS -o nologin nologin.c +# build docs pushd sys-utils makeinfo --number-sections ipc.texi popd @@ -310,44 +293,35 @@ mkdir -p %{buildroot}/var/log touch %{buildroot}/var/log/lastlog chmod 0400 %{buildroot}/var/log/lastlog -make \ - OPT="$RPM_OPT_FLAGS %{make_cflags}" \ - LDFLAGS="" \ - %{make_options} \ - INSTALLDIR="install -d -m 755" \ - INSTALLSUID="install -m 755" \ - INSTALLBIN="install -m 755" \ - INSTALLMAN="install -m 644" \ - install DESTDIR=${RPM_BUILD_ROOT} +# install util-linux +make install DESTDIR=${RPM_BUILD_ROOT} + +# inslall floppy stuff pushd floppy-%{floppyver} %makeinstall popd +# install cramfs 1.1 pushd cramfs-%{cramfsver} install -s -m 755 mkcramfs ${RPM_BUILD_ROOT}/sbin/mkfs.cramfs ln -s ../../sbin/mkfs.cramfs ${RPM_BUILD_ROOT}/usr/bin/mkcramfs install -s -m 755 cramfsck ${RPM_BUILD_ROOT}/sbin/fsck.cramfs popd -install -m 755 mount/pivot_root ${RPM_BUILD_ROOT}/sbin -install -m 644 mount/pivot_root.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 -install -m 755 rescuept/rescuept ${RPM_BUILD_ROOT}/sbin -mv rescuept/README rescuept/README.rescuept +# install no login install -m 755 nologin ${RPM_BUILD_ROOT}/sbin install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 + %if %{with_kbdrate} install -m 755 kbdrate/kbdrate ${RPM_BUILD_ROOT}/sbin install -m 644 kbdrate/kbdrate.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 ln -s consolehelper ${RPM_BUILD_ROOT}/usr/bin/kbdrate %endif + %if %{include_raw} echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 -%else -rm -f $RPM_BUILD_ROOT%{_bindir}/raw $RPM_BUILD_ROOT%{_mandir}/man8/raw.8* %endif -install -m 755 partx/{addpart,delpart,partx} $RPM_BUILD_ROOT/sbin - # Correct mail spool path. sed -e 's,/usr/spool/mail,/var/spool/mail,g' ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1 > ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1.new mv ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1.new ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1 @@ -381,23 +355,20 @@ gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/ipc.info install -m644 kbdrate/kbdrate.apps $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kbdrate install -m644 kbdrate/kbdrate.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kbdrate %endif + +# PAM settings { pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d install -m 644 %{SOURCE1} ./login install -m 644 %{SOURCE1} ./remote - install -m 644 ${RPM_SOURCE_DIR}/util-linux-2.7-chsh.pamd ./chsh - install -m 644 ${RPM_SOURCE_DIR}/util-linux-2.7-chsh.pamd ./chfn + install -m 644 %{SOURCE2} ./chsh + install -m 644 %{SOURCE2} ./chfn popd } ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock -# we needn't /usr/sbin/clock in 'install' section if we ignore it in 'files' section [24-Jun-2005, Karel Zak] -#ln -sf ../../sbin/clock ${RPM_BUILD_ROOT}/usr/sbin/clock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock -# We do not want dependencies on csh -chmod 644 ${RPM_BUILD_ROOT}%{_datadir}/misc/getopt/* -rm -f fdisk/README.cfdisk # Final cleanup %ifnarch %cytune_archs @@ -407,21 +378,50 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* rm -f $RPM_BUILD_ROOT/sbin/{hwclock,clock} $RPM_BUILD_ROOT%{_mandir}/man8/hwclock.8* $RPM_BUILD_ROOT/usr/sbin/{hwclock,clock} %endif %ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy,setfdprm} $RPM_BUILD_ROOT%{_mandir}/man8/{fdformat,tunelp,floppy,setfdprm}.8* +rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_mandir}/man8/{fdformat,tunelp,floppy}.8* rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/fdprm %endif -for I in /sbin/cfdisk /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln /usr/bin/chkdupexe \ - %{_bindir}/line %{_bindir}/pg; do +# deprecated commands +for I in /sbin/cfdisk /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ + /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ + /sbin/shutdown %{_bindir}/wall %{_bindir}/scriptreplay; do rm -f $RPM_BUILD_ROOT$I done -for I in man1/chkdupexe.1 man1/line.1 man1/pg.1 man8/cfdisk.8 man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8; do +# deprecated man pages +for I in man1/chkdupexe.1 man1/line.1 man1/pg.1 man1/newgrp.1 man8/cfdisk.8 \ + man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 man1/wall.1; do rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* done +# deprecated docs +for I in fdisk/README.cfdisk text-utils/README.pg text-utils/README.reset; do + rm -rf $I +done + +# we install getopt/getopt-*.{bash,tcsh} as doc files +# note: versions <=2.12 use path "%{_datadir}/misc/getopt/*" +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 +# /bin -> /sbin +for I in pivot_root losetup swapon swapoff; do + if [ -e $RPM_BUILD_ROOT/bin/$I -o -h $RPM_BUILD_ROOT/bin/$I ]; then + mv $RPM_BUILD_ROOT/bin/$I $RPM_BUILD_ROOT/sbin/$I + fi +done + +# /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 + %find_lang %{name} %clean @@ -440,7 +440,8 @@ fi %files -f %{name}.lang %defattr(-,root,root) -%doc */README.* HISTORY MAINTAINER +%doc */README.* NEWS AUTHORS +%doc getopt/getopt-*.{bash,tcsh} /bin/arch /bin/dmesg @@ -461,7 +462,6 @@ fi /sbin/blockdev /sbin/pivot_root /sbin/ctrlaltdel -/sbin/elvtune /sbin/addpart /sbin/delpart /sbin/partx @@ -480,7 +480,6 @@ fi %endif /sbin/mkfs /sbin/mkswap -/sbin/rescuept /sbin/nologin %{_mandir}/man8/nologin.8* %ghost %attr(0400,root,root) %verify(not md5 size mtime) /var/log/lastlog @@ -494,6 +493,10 @@ fi %{_sysconfdir}/security/console.apps/kbdrate %endif +%{_bindir}/chrt +%{_bindir}/ionice +%{_bindir}/taskset + %{_bindir}/cal %attr(4711,root,root) %{_bindir}/chfn %attr(4711,root,root) %{_bindir}/chsh @@ -528,9 +531,6 @@ fi %endif %{_bindir}/namei -# newgrp disabled -#%attr(4711,root,root) %{_bindir}/newgrp - %if %{include_raw} %{_bindir}/raw %endif @@ -538,9 +538,6 @@ fi %{_bindir}/renice %{_bindir}/rev %{_bindir}/script -%ifnarch s390 s390x -%{_bindir}/setfdprm -%endif %{_bindir}/setsid %{_bindir}/setterm %ifarch sparc sparc64 sparcv9 @@ -589,10 +586,6 @@ fi %{_mandir}/man1/mcookie.1* %{_mandir}/man1/more.1* %{_mandir}/man1/namei.1* - -# newgrp disabled -#%{_mandir}/man1/newgrp.1* - %{_mandir}/man1/readprofile.1* %{_mandir}/man1/rename.1* %{_mandir}/man1/rev.1* @@ -603,10 +596,13 @@ fi %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* +%{_mandir}/man1/chrt.1* +%{_mandir}/man1/ionice.1* +%{_mandir}/man1/taskset.1* + %{_mandir}/man8/blockdev.8* %{_mandir}/man8/ctrlaltdel.8* %{_mandir}/man8/dmesg.8* -%{_mandir}/man8/elvtune.8* %ifnarch s390 s390x %{_mandir}/man8/fdformat.8* %endif @@ -621,22 +617,13 @@ fi %{_mandir}/man8/rawdevices.8* %endif %{_mandir}/man8/renice.8* -%ifnarch s390 s390x -%{_mandir}/man8/setfdprm.8* -%endif %{_mandir}/man8/setsid.8* -# XXX this man page should be moved to glibc. -%{_mandir}/man8/sln.8* %ifnarch s390 s390x %{_mandir}/man8/tunelp.8* %endif %{_mandir}/man8/vigr.8* %{_mandir}/man8/vipw.8* -%{_datadir}/misc/getopt - -#files -n mount -#defattr(-,root,root) %attr(4755,root,root) /bin/mount %attr(4755,root,root) /bin/umount /sbin/swapon @@ -647,14 +634,26 @@ fi %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/umount.8* - -#files -n losetup -#defattr(-,root,root) %{_mandir}/man8/losetup.8* /sbin/losetup %changelog -* Thu Jun 16 2005 Karel Zak 2.12p-10 +* Tue Aug 16 2005 Karel Zak 2.13-0.1.pre1 +- /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 From 920aa7c1551d19265c31efe7bf7a0cb8962d556f Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 17 Aug 2005 11:53:18 +0000 Subject: [PATCH 009/425] - pre2 version --- .cvsignore | 2 +- sources | 2 +- util-linux-2.13-moretc.patch | 11 +++++------ util-linux.spec | 23 ++++++++++++----------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6fff6a4..cf80685 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ cramfs-1.1.tar.gz floppy-0.12.tar.gz kbdrate.tar.gz -util-linux-2.13-pre1.tar.bz2 +util-linux-2.13-pre2.tar.bz2 diff --git a/sources b/sources index 99a73b2..f3772b9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ d3912b9f7bf745fbfea68f6a9b9de30f cramfs-1.1.tar.gz 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz 555e4bd2a23347fddac4268cbf4e1fe4 kbdrate.tar.gz -d65154c41657f7bcb1b2025cdbe588a7 util-linux-2.13-pre1.tar.bz2 +9df13e6a02ed4292966693533ae768aa util-linux-2.13-pre2.tar.bz2 diff --git a/util-linux-2.13-moretc.patch b/util-linux-2.13-moretc.patch index 34a5fae..d30b625 100644 --- a/util-linux-2.13-moretc.patch +++ b/util-linux-2.13-moretc.patch @@ -1,11 +1,11 @@ ---- util-linux-2.13-pre1/text-utils/Makefile.am.moretc 2005-08-01 20:11:07.000000000 +0200 -+++ util-linux-2.13-pre1/text-utils/Makefile.am 2005-08-15 13:36:12.000000000 +0200 +--- util-linux-2.13-pre2/text-utils/Makefile.am.moretc 2005-08-17 10:40:44.000000000 +0200 ++++ util-linux-2.13-pre2/text-utils/Makefile.am 2005-08-17 10:41:52.000000000 +0200 @@ -7,16 +7,13 @@ man_MANS = col.1 colcrt.1 colrm.1 column.1 hexdump.1 rev.1 line.1 tailf.1 if HAVE_NCURSES -bin_PROGRAMS = more - usrbin_PROGRAMS += ul pg + usrbinexec_PROGRAMS += ul pg -more_LDADD = -lncurses pg_LDADD = -lncurses ul_LDADD = -lncurses @@ -19,9 +19,8 @@ man_MANS += more.1 endif -endif -\ No newline at end of file ---- util-linux-2.13-pre1/text-utils/more.c.moretc 2005-07-28 23:49:31.000000000 +0200 -+++ util-linux-2.13-pre1/text-utils/more.c 2005-08-15 13:40:55.000000000 +0200 +--- util-linux-2.13-pre2/text-utils/more.c.moretc 2005-07-28 23:49:31.000000000 +0200 ++++ util-linux-2.13-pre2/text-utils/more.c 2005-08-17 10:40:23.000000000 +0200 @@ -59,6 +59,8 @@ #include "nls.h" #include "widechar.h" diff --git a/util-linux.spec b/util-linux.spec index c79ba3e..bbdd35c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -28,7 +28,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.1.pre1 +Release: 0.2.pre2 License: distributable Group: System Environment/Base @@ -46,8 +46,8 @@ BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel ### Sources -# TODO [stable]: s/2.13-pre1/%{version}/ -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre1.tar.bz2 +# TODO [stable]: s/2.13-pre2/%{version}/ +Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre2.tar.bz2 Source1: util-linux-selinux.pamd Source2: util-linux-chsh-chfn.pamd Source8: nologin.c @@ -150,9 +150,10 @@ Patch204: util-linux-2.12p-mount-ocfs2.patch Patch205: util-linux-2.12p-execl.patch # deprecated the arch command (for compatibility only) Patch206: util-linux-2.13-arch.patch + # upstream mistakes Patch207: util-linux-2.13-agetty-man.patch -Patch208: util-linux-2.13-init.patch +Patch208: util-linux-2.13-usrsbin.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -167,7 +168,7 @@ program. %prep # TODO [stable]: remove -n -%setup -q -a 10 -a 11 -a 12 -n util-linux-2.13-pre1 +%setup -q -a 10 -a 11 -a 12 -n util-linux-2.13-pre2 %patch1 -p1 -b .moretc %patch70 -p1 @@ -238,9 +239,13 @@ autoconf %define _prefix "" # configure -export CFLAGS="%{make_cflags} $RPM_OPT_FLAGS" %{?_smp_mflags} +# note: we disable tty group (USE_TTY_GROUP) in Makefiles to prevent call chgrp +# during the "make install". But we define -DUSE_TTY_GROUP that enable tty groups in +# *.c files only. +export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS" %{?_smp_mflags} %configure \ --disable-wall \ + --disable-use-tty-group \ --enable-partx \ --enable-login-utils \ --enable-kill \ @@ -379,7 +384,6 @@ rm -f $RPM_BUILD_ROOT/sbin/{hwclock,clock} $RPM_BUILD_ROOT%{_mandir}/man8/hwcloc %endif %ifarch s390 s390x rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_mandir}/man8/{fdformat,tunelp,floppy}.8* -rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/fdprm %endif # deprecated commands @@ -449,9 +453,6 @@ fi /bin/more /bin/kill -%ifnarch s390 s390x -%config %{_sysconfdir}/fdprm -%endif %config %{_sysconfdir}/pam.d/chfn %config %{_sysconfdir}/pam.d/chsh %config %{_sysconfdir}/pam.d/login @@ -638,7 +639,7 @@ fi /sbin/losetup %changelog -* Tue Aug 16 2005 Karel Zak 2.13-0.1.pre1 +* 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 From 4a91433ba8c7d85b94366125cecb1c4ed2bfce5c Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 17 Aug 2005 12:16:53 +0000 Subject: [PATCH 010/425] - fix CFLAGS --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index bbdd35c..d9158bb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -242,7 +242,7 @@ autoconf # note: we disable tty group (USE_TTY_GROUP) in Makefiles to prevent call chgrp # during the "make install". But we define -DUSE_TTY_GROUP that enable tty groups in # *.c files only. -export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS" %{?_smp_mflags} +export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS %{?_smp_mflags}" %configure \ --disable-wall \ --disable-use-tty-group \ From 42bd6e21d01aea85e176742808b89da3de5768d3 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 17 Aug 2005 12:46:40 +0000 Subject: [PATCH 011/425] - fix make SMP options --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index d9158bb..7c055a2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -242,7 +242,7 @@ autoconf # note: we disable tty group (USE_TTY_GROUP) in Makefiles to prevent call chgrp # during the "make install". But we define -DUSE_TTY_GROUP that enable tty groups in # *.c files only. -export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS %{?_smp_mflags}" +export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS" %configure \ --disable-wall \ --disable-use-tty-group \ @@ -259,7 +259,7 @@ export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS %{?_smp_mflags}" %define _prefix /usr # build util-linux -make +make %{?_smp_mflags} # build kbdrate %if %{with_kbdrate} From 7bbea84c42c78bcc5034d92b3dce026635c51d37 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 17 Aug 2005 13:47:16 +0000 Subject: [PATCH 012/425] - fix info/dir --- util-linux.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 7c055a2..320e65a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -426,6 +426,9 @@ for I in addpart delpart partx; do fi done +# omit info/dir file +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir + %find_lang %{name} %clean From 3aff07c3c771b9233dfa10a3dbbc948efe9afadb Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 30 Aug 2005 09:20:15 +0000 Subject: [PATCH 013/425] - fix #166923 and #159410 --- util-linux-2.13-audit-hwclock.patch | 54 ++++++++++++++++------------- util-linux.spec | 10 +++++- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/util-linux-2.13-audit-hwclock.patch b/util-linux-2.13-audit-hwclock.patch index 97b6ee7..30049d7 100644 --- a/util-linux-2.13-audit-hwclock.patch +++ b/util-linux-2.13-audit-hwclock.patch @@ -1,5 +1,5 @@ ---- util-linux-2.13-pre1/hwclock/hwclock.c.audit 2005-07-31 22:15:18.000000000 +0200 -+++ util-linux-2.13-pre1/hwclock/hwclock.c 2005-08-12 14:36:57.000000000 +0200 +--- util-linux-2.13-pre2/hwclock/hwclock.c.audit 2005-07-31 22:15:18.000000000 +0200 ++++ util-linux-2.13-pre2/hwclock/hwclock.c 2005-08-30 11:11:11.000000000 +0200 @@ -81,9 +81,11 @@ #include #include @@ -21,12 +21,15 @@ } static const struct option longopts[] = { -@@ -1298,6 +1300,12 @@ +@@ -1298,6 +1300,15 @@ /* Remember what time we were invoked */ gettimeofday(&startup_time, NULL); + audit_fd = audit_open(); -+ if (audit_fd < 0) { ++ if (audit_fd < 0 && !(errno == EINVAL || errno == EPROTONOSUPPORT || ++ errno == EAFNOSUPPORT)) { ++ /* You get these error codes only when the kernel doesn't have ++ * audit compiled in. */ + fprintf(stderr, "Error - unable to connect to audit system\n"); + return EX_NOPERM; + } @@ -34,7 +37,7 @@ setlocale(LC_ALL, ""); #ifdef LC_NUMERIC /* We need LC_CTYPE and LC_TIME and LC_MESSAGES, but must avoid -@@ -1393,6 +1401,13 @@ +@@ -1393,6 +1404,13 @@ argc -= optind; argv += optind; @@ -48,7 +51,7 @@ if (argc > 0) { usage(_("%s takes no non-option arguments. " "You supplied %d.\n"), -@@ -1403,27 +1418,27 @@ +@@ -1403,27 +1421,27 @@ fprintf(stderr, _("You have specified multiple functions.\n" "You can only perform one function " "at a time.\n")); @@ -80,7 +83,7 @@ } #ifdef __alpha__ -@@ -1437,7 +1452,7 @@ +@@ -1437,7 +1455,7 @@ if (rc != 0) { fprintf(stderr, _("No usable set-to time. " "Cannot set clock.\n")); @@ -89,7 +92,7 @@ } } -@@ -1469,11 +1484,11 @@ +@@ -1469,11 +1487,11 @@ } if (!permitted) @@ -103,7 +106,7 @@ } if (debug) -@@ -1487,12 +1502,14 @@ +@@ -1487,12 +1505,14 @@ fprintf(stderr, _("Use the --debug option to see the details " "of our search for an access method.\n")); @@ -120,9 +123,9 @@ } /* A single routine for greater uniformity */ ---- /dev/null 2005-08-10 15:18:23.129961080 +0200 -+++ util-linux-2.13-pre1/hwclock/audit.c 2005-08-12 14:36:57.000000000 +0200 -@@ -0,0 +1,70 @@ +--- /dev/null 2005-08-29 11:11:19.415613608 +0200 ++++ util-linux-2.13-pre2/hwclock/audit.c 2005-08-30 11:10:38.000000000 +0200 +@@ -0,0 +1,73 @@ +/* audit.c -- This file contains the audit system extensions + * + * Copyright 2005 Red Hat Inc., Durham, North Carolina. @@ -168,6 +171,9 @@ + const char *success; + extern char *progname; + ++ if (audit_fd < 0) ++ return; /* kernel without audit support */ ++ + if (!result) + success = "success"; + else @@ -193,8 +199,8 @@ + exit(status); +} + ---- util-linux-2.13-pre1/hwclock/kd.c.audit 2005-07-31 18:01:20.000000000 +0200 -+++ util-linux-2.13-pre1/hwclock/kd.c 2005-08-12 14:36:57.000000000 +0200 +--- util-linux-2.13-pre2/hwclock/kd.c.audit 2005-07-31 18:01:20.000000000 +0200 ++++ util-linux-2.13-pre2/hwclock/kd.c 2005-08-30 11:06:38.000000000 +0200 @@ -19,6 +19,7 @@ #include "clock.h" @@ -221,19 +227,19 @@ } return 0; } ---- util-linux-2.13-pre1/hwclock/Makefile.am.audit 2005-08-12 14:37:27.000000000 +0200 -+++ util-linux-2.13-pre1/hwclock/Makefile.am 2005-08-12 14:50:39.000000000 +0200 +--- util-linux-2.13-pre2/hwclock/Makefile.am.audit 2005-01-30 00:18:46.000000000 +0100 ++++ util-linux-2.13-pre2/hwclock/Makefile.am 2005-08-30 11:06:38.000000000 +0200 @@ -4,4 +4,5 @@ sbin_PROGRAMS = hwclock -hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c -\ No newline at end of file +\ Chybí znak konce řádku na konci souboru +hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c audit.c +hwclock_LDADD = -laudit -\ No newline at end of file ---- /dev/null 2005-08-10 15:18:23.129961080 +0200 -+++ util-linux-2.13-pre1/hwclock/audit.h 2005-08-12 14:36:57.000000000 +0200 +\ Chybí znak konce řádku na konci souboru +--- /dev/null 2005-08-29 11:11:19.415613608 +0200 ++++ util-linux-2.13-pre2/hwclock/audit.h 2005-08-30 11:06:38.000000000 +0200 @@ -0,0 +1,34 @@ +/* audit.h -- This file contains the function prototypes for audit calls + * Copyright 2005 Red Hat Inc., Durham, North Carolina. @@ -269,8 +275,8 @@ +void audit_exit(int status); + +#endif ---- util-linux-2.13-pre1/hwclock/clock.h.audit 2000-12-07 17:39:53.000000000 +0100 -+++ util-linux-2.13-pre1/hwclock/clock.h 2005-08-12 14:36:57.000000000 +0200 +--- util-linux-2.13-pre2/hwclock/clock.h.audit 2000-12-07 17:39:53.000000000 +0100 ++++ util-linux-2.13-pre2/hwclock/clock.h 2005-08-30 11:06:38.000000000 +0200 @@ -24,7 +24,12 @@ extern char *progname; extern int debug; @@ -285,8 +291,8 @@ /* cmos.c */ extern void set_cmos_epoch(int ARCconsole, int SRM); ---- util-linux-2.13-pre1/hwclock/rtc.c.audit 2005-07-31 22:15:45.000000000 +0200 -+++ util-linux-2.13-pre1/hwclock/rtc.c 2005-08-12 14:36:57.000000000 +0200 +--- util-linux-2.13-pre2/hwclock/rtc.c.audit 2005-07-31 22:15:45.000000000 +0200 ++++ util-linux-2.13-pre2/hwclock/rtc.c 2005-08-30 11:06:38.000000000 +0200 @@ -8,6 +8,7 @@ #include "clock.h" diff --git a/util-linux.spec b/util-linux.spec index 320e65a..1784985 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -151,10 +151,13 @@ Patch205: util-linux-2.12p-execl.patch # deprecated the arch command (for compatibility only) Patch206: util-linux-2.13-arch.patch -# upstream mistakes +# upstream build system mistakes Patch207: util-linux-2.13-agetty-man.patch Patch208: util-linux-2.13-usrsbin.patch +#159410 - mkswap(8) claims max swap area size is 2 GB +Patch209: util-linux-2.12p-mkswap-man.patch + # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. ########### END upstreamable @@ -221,6 +224,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch206 -p1 %patch207 -p1 %patch208 -p1 +%patch209 -p1 %build unset LINGUAS || : @@ -642,6 +646,10 @@ fi /sbin/losetup %changelog +* Tue Aug 30 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 + * 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 From 2ac050e2567701fafd30038be47941fb898bde17 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 2 Sep 2005 14:38:19 +0000 Subject: [PATCH 014/425] - fix swapon on swsuspend --- util-linux-2.13-swapon-suspend.patch | 161 +++++++++++++++++++++++++++ util-linux.spec | 8 +- 2 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.13-swapon-suspend.patch diff --git a/util-linux-2.13-swapon-suspend.patch b/util-linux-2.13-swapon-suspend.patch new file mode 100644 index 0000000..6c716d2 --- /dev/null +++ b/util-linux-2.13-swapon-suspend.patch @@ -0,0 +1,161 @@ +--- util-linux-2.13-pre2/mount/swapon.c.swsuspend 2005-09-02 14:32:53.000000000 +0200 ++++ util-linux-2.13-pre2/mount/swapon.c 2005-09-02 16:29:43.000000000 +0200 +@@ -11,6 +11,9 @@ + #include + #include + #include ++#include ++#include ++#include + #include "xmalloc.h" + #include "swap_constants.h" + #include "swapargs.h" +@@ -22,6 +25,7 @@ + + #define _PATH_FSTAB "/etc/fstab" + #define PROC_SWAPS "/proc/swaps" ++#define PATH_MKSWAP "/sbin/mkswap" + + #define SWAPON_NEEDS_TWO_ARGS + +@@ -173,6 +177,84 @@ + return 0 ; + } + ++/* ++ * It's better do swsuspend detection by follow routine than ++ * include huge mount_guess_fstype.o to swapon. We need only ++ * swsuspend and no the others filesystems. ++ */ ++#ifdef HAVE_LIBBLKID ++static int ++swap_is_swsuspend(const char *device) { ++ const char *type = blkid_get_tag_value(blkid, "TYPE", device); ++ ++ if (type && strcmp(type, "swsuspend")==0) ++ return 0; ++ return 1; ++} ++#else ++static int ++swap_is_swsuspend(const char *device) { ++ int fd, re = 1, n = getpagesize() - 10; ++ char buf[10]; ++ ++ fd = open(device, O_RDONLY); ++ if (fd < 0) ++ return -1; ++ ++ if (lseek(fd, n, SEEK_SET) >= 0 && ++ read(fd, buf, sizeof buf) == sizeof buf && ++ (memcmp("S1SUSPEND", buf, 9)==0 || ++ memcmp("S2SUSPEND", buf, 9)==0)) ++ re = 0; ++ ++ close(fd); ++ return re; ++} ++#endif ++ ++/* calls mkswap */ ++static int ++swap_reinitialize(const char *device) { ++ const char *label = mount_get_volume_label_by_spec(device); ++ pid_t pid; ++ ++ switch((pid=fork())) { ++ case -1: /* fork error */ ++ fprintf(stderr, _("%s: cannot fork: %s\n"), ++ progname, strerror(errno)); ++ 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); ++ exit(1); /* error */ ++ ++ default: /* parent */ ++ { ++ int status; ++ int ret; ++ ++ 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 status; +@@ -196,6 +278,18 @@ + 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. ++ */ ++ if (swap_is_swsuspend(special)==0) { ++ 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) { +--- util-linux-2.13-pre2/mount/get_label_uuid.c.swsuspend 2005-09-02 14:32:53.000000000 +0200 ++++ util-linux-2.13-pre2/mount/get_label_uuid.c 2005-09-02 16:21:20.000000000 +0200 +@@ -129,7 +129,24 @@ + } + return 0; + } +- ++ ++static int ++is_swsuspend_partition(int fd, char **label, char *uuid) { ++ int n = getpagesize(); ++ char *buf = xmalloc(n); ++ struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf; ++ ++ if (lseek(fd, 0, SEEK_SET) == 0 ++ && read(fd, buf, n) == n ++ && (strncmp(buf+n-10, "S1SUSPEND", 9)==0 || ++ strncmp(buf+n-10, "S2SUSPEND", 9)==0) ++ && p->version == 1) { ++ store_uuid(uuid, p->uuid); ++ store_label(label, p->volume_name, 16); ++ return 1; ++ } ++ return 0; ++} + + /* + * Get both label and uuid. +@@ -162,6 +179,8 @@ + + if (is_v1_swap_partition(fd, label, uuid)) + goto done; ++ if (is_swsuspend_partition(fd, label, uuid)) ++ goto done; + + if (lseek(fd, 1024, SEEK_SET) == 1024 + && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) diff --git a/util-linux.spec b/util-linux.spec index 1784985..39bec0b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -28,7 +28,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.2.pre2 +Release: 0.3.pre2 License: distributable Group: System Environment/Base @@ -157,6 +157,8 @@ Patch208: util-linux-2.13-usrsbin.patch #159410 - mkswap(8) claims max swap area size is 2 GB Patch209: util-linux-2.12p-mkswap-man.patch +#165863 - swsusp swaps should be reinitialized +Patch210: util-linux-2.13-swapon-suspend.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -225,6 +227,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch207 -p1 %patch208 -p1 %patch209 -p1 +%patch210 -p1 -b .swsuspend %build unset LINGUAS || : @@ -646,9 +649,10 @@ fi /sbin/losetup %changelog -* Tue Aug 30 2005 Karel Zak 2.13-0.3.pre2 +* 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 * Tue Aug 16 2005 Karel Zak 2.13-0.2.pre2 - /usr/share/misc/getopt/* -move-> /usr/share/doc/util-linux-2.13/getopt-* From 0f3067db6b0a45a64236f3978b8c81ae833cd40c Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 5 Sep 2005 12:47:36 +0000 Subject: [PATCH 015/425] - lastlog perms to 644 --- util-linux.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 39bec0b..4fdcc56 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -303,7 +303,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps} mkdir -p %{buildroot}/var/log touch %{buildroot}/var/log/lastlog -chmod 0400 %{buildroot}/var/log/lastlog +chmod 0644 %{buildroot}/var/log/lastlog # install util-linux make install DESTDIR=${RPM_BUILD_ROOT} @@ -445,7 +445,7 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir /sbin/install-info %{_infodir}/ipc.info* %{_infodir}/dir touch /var/log/lastlog chown root:root /var/log/lastlog -chmod 0400 /var/log/lastlog +chmod 0644 /var/log/lastlog %postun if [ "$1" = 0 ]; then @@ -493,7 +493,7 @@ fi /sbin/mkswap /sbin/nologin %{_mandir}/man8/nologin.8* -%ghost %attr(0400,root,root) %verify(not md5 size mtime) /var/log/lastlog +%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog # Begin kbdrate stuff %if %{with_kbdrate} From 7c34e9b5104a0c4e7e2fe43c5e0b8f95f56c77e2 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 5 Sep 2005 14:10:32 +0000 Subject: [PATCH 016/425] *** empty log message *** --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index 4fdcc56..e69fe2c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -653,6 +653,7 @@ fi - 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-* From a557a45aa1b620754f4434b8aeab2b4aed575db0 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 14 Sep 2005 10:25:51 +0000 Subject: [PATCH 017/425] - remove some utf8 chars from spec file --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index e69fe2c..80f852f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -667,7 +667,7 @@ fi * 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 +- fix #150912 - Add ocfs2 support - NULL is better than zero at end of execl() * Thu Jun 16 2005 Karel Zak 2.12p-9.5 From a2f104d878ab0c544d1344e8384b94241551622d Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 7 Oct 2005 14:50:44 +0000 Subject: [PATCH 018/425] fix #170110 - Documentation for 'rsize' and 'wsize' NFS mount options is misleading --- util-linux.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 80f852f..b3caa16 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -28,7 +28,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.3.pre2 +Release: 0.3.pre3 License: distributable Group: System Environment/Base @@ -159,6 +159,8 @@ Patch208: util-linux-2.13-usrsbin.patch Patch209: util-linux-2.12p-mkswap-man.patch #165863 - swsusp swaps should be reinitialized Patch210: util-linux-2.13-swapon-suspend.patch +#170110 - Documentation for 'rsize' and 'wsize' NFS mount options is misleading +Patch211: util-linux-2.12p-nfs-manupdate.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -228,6 +230,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch208 -p1 %patch209 -p1 %patch210 -p1 -b .swsuspend +%patch211 -p1 %build unset LINGUAS || : @@ -649,6 +652,9 @@ fi /sbin/losetup %changelog +* 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 From 35b20313b2a9a7dce60f3064fc218365233e1f06 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 7 Oct 2005 19:34:46 +0000 Subject: [PATCH 019/425] =?UTF-8?q?-=20fix=20#169628=20-=20/usr/bin/floppy?= =?UTF-8?q?=20doesn't=20work=20with=20/dev/fd0=20-=20fix=20#168436=20-=20l?= =?UTF-8?q?ogin=20will=20attempt=20to=20run=20if=20it=20has=20no=20read/wr?= =?UTF-8?q?ite=20access=20to=20=20=20=20=20its=20terminal=20-=20fix=20#168?= =?UTF-8?q?434=20-=20login's=20timeout=20can=20fail=20-=20needs=20to=20cal?= =?UTF-8?q?l=20=20=20=20=20siginterrupt(SIGALRM,1)=20-=20fix=20#165253=20?= =?UTF-8?q?=E2=80=93=20losetup=20missing=20option=20-a=20[new=20feature]?= =?UTF-8?q?=20-=20update=20PAM=20files=20(replace=20pam=5Fstack=20with=20n?= =?UTF-8?q?ew=20"include"=20PAM=20directive)=20-=20remove=20kbdrate=20from?= =?UTF-8?q?=20src.rpm=20-=20update=20to=202.13pre4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cvsignore | 3 +- sources | 3 +- util-linux-2.12p-floppy-generic.patch | 102 +++++++++++++++++++ util-linux-2.13-fdisk-gpt.patch | 37 +++---- util-linux-2.13-login-hang.patch | 20 ++++ util-linux-2.13-losetup-all.patch | 140 ++++++++++++++++++++++++++ util-linux-chsh-chfn.pamd | 8 +- util-linux.spec | 81 ++++++--------- 8 files changed, 312 insertions(+), 82 deletions(-) create mode 100644 util-linux-2.12p-floppy-generic.patch create mode 100644 util-linux-2.13-login-hang.patch create mode 100644 util-linux-2.13-losetup-all.patch diff --git a/.cvsignore b/.cvsignore index cf80685..7f0c184 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,3 @@ cramfs-1.1.tar.gz floppy-0.12.tar.gz -kbdrate.tar.gz -util-linux-2.13-pre2.tar.bz2 +util-linux-2.13-pre4.tar.bz2 diff --git a/sources b/sources index f3772b9..0f54064 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ d3912b9f7bf745fbfea68f6a9b9de30f cramfs-1.1.tar.gz 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz -555e4bd2a23347fddac4268cbf4e1fe4 kbdrate.tar.gz -9df13e6a02ed4292966693533ae768aa util-linux-2.13-pre2.tar.bz2 +484f4809876197a07a6c471d320b6d03 util-linux-2.13-pre4.tar.bz2 diff --git a/util-linux-2.12p-floppy-generic.patch b/util-linux-2.12p-floppy-generic.patch new file mode 100644 index 0000000..ec33468 --- /dev/null +++ b/util-linux-2.12p-floppy-generic.patch @@ -0,0 +1,102 @@ +--- util-linux-2.12p/floppy-0.12/floppyfloppy.c.generic 2001-02-13 01:15:38.000000000 +0100 ++++ util-linux-2.12p/floppy-0.12/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-2.13-fdisk-gpt.patch b/util-linux-2.13-fdisk-gpt.patch index f72e986..76eedd5 100644 --- a/util-linux-2.13-fdisk-gpt.patch +++ b/util-linux-2.13-fdisk-gpt.patch @@ -1,5 +1,5 @@ ---- util-linux-2.13-pre1/fdisk/fdisk.c.gpt 2005-08-12 15:24:28.000000000 +0200 -+++ util-linux-2.13-pre1/fdisk/fdisk.c 2005-08-12 15:24:28.000000000 +0200 +--- util-linux-2.13-pre4/fdisk/fdisk.c.gpt 2005-10-07 18:40:26.000000000 +0200 ++++ util-linux-2.13-pre4/fdisk/fdisk.c 2005-10-07 18:40:26.000000000 +0200 @@ -34,6 +34,8 @@ #include #endif @@ -57,8 +57,8 @@ get_boot(fdisk); if (osf_label) { ---- /dev/null 2005-08-10 15:18:23.129961080 +0200 -+++ util-linux-2.13-pre1/fdisk/gpt.h 2005-08-12 15:24:28.000000000 +0200 +--- /dev/null 2005-10-07 17:17:17.781101976 +0200 ++++ util-linux-2.13-pre4/fdisk/gpt.h 2005-10-07 18:40:26.000000000 +0200 @@ -0,0 +1,9 @@ + +#ifndef __GPT_H__ @@ -69,9 +69,9 @@ + +#endif /* __GPT_H__ */ + ---- util-linux-2.13-pre1/fdisk/Makefile.am.gpt 2005-08-12 15:24:59.000000000 +0200 -+++ util-linux-2.13-pre1/fdisk/Makefile.am 2005-08-12 15:25:35.000000000 +0200 -@@ -3,13 +3,13 @@ +--- util-linux-2.13-pre4/fdisk/Makefile.am.gpt 2005-09-12 20:55:27.000000000 +0200 ++++ util-linux-2.13-pre4/fdisk/Makefile.am 2005-10-07 18:46:57.000000000 +0200 +@@ -5,13 +5,13 @@ sbin_PROGRAMS = fdisk man_MANS = fdisk.8 fdisk_SOURCES = fdisk.c llseek.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ @@ -87,15 +87,8 @@ if USE_SLANG sbin_PROGRAMS += cfdisk -@@ -25,4 +25,4 @@ - endif - endif - --endif -\ No newline at end of file -+endif ---- util-linux-2.13-pre1/fdisk/fdisk.8.gpt 2005-08-12 15:24:28.000000000 +0200 -+++ util-linux-2.13-pre1/fdisk/fdisk.8 2005-08-12 15:24:28.000000000 +0200 +--- util-linux-2.13-pre4/fdisk/fdisk.8.gpt 2005-10-07 18:40:26.000000000 +0200 ++++ util-linux-2.13-pre4/fdisk/fdisk.8 2005-10-07 18:40:26.000000000 +0200 @@ -42,6 +42,11 @@ partition tables. It understands DOS type partition tables and BSD or SUN type disklabels. @@ -108,8 +101,8 @@ The .I device is usually one of the following: ---- util-linux-2.13-pre1/fdisk/sfdisk.8.gpt 2004-12-31 17:28:30.000000000 +0100 -+++ util-linux-2.13-pre1/fdisk/sfdisk.8 2005-08-12 15:24:28.000000000 +0200 +--- util-linux-2.13-pre4/fdisk/sfdisk.8.gpt 2004-12-31 17:28:30.000000000 +0100 ++++ util-linux-2.13-pre4/fdisk/sfdisk.8 2005-10-07 18:40:26.000000000 +0200 @@ -18,6 +18,11 @@ on a device, check the partitions on a device, and - very dangerous - repartition a device. @@ -122,8 +115,8 @@ .SS "List Sizes" .BI "sfdisk \-s " partition gives the size of ---- /dev/null 2005-08-10 15:18:23.129961080 +0200 -+++ util-linux-2.13-pre1/fdisk/gpt.c 2005-08-12 15:24:28.000000000 +0200 +--- /dev/null 2005-10-07 17:17:17.781101976 +0200 ++++ util-linux-2.13-pre4/fdisk/gpt.c 2005-10-07 18:40:26.000000000 +0200 @@ -0,0 +1,287 @@ +/* + GPT (GUID Partition Table) signature detection. Based on libparted and @@ -412,8 +405,8 @@ + exit(EXIT_SUCCESS); +} +#endif ---- util-linux-2.13-pre1/fdisk/sfdisk.c.gpt 2005-08-01 21:35:55.000000000 +0200 -+++ util-linux-2.13-pre1/fdisk/sfdisk.c 2005-08-12 15:24:28.000000000 +0200 +--- util-linux-2.13-pre4/fdisk/sfdisk.c.gpt 2005-08-14 17:14:18.000000000 +0200 ++++ util-linux-2.13-pre4/fdisk/sfdisk.c 2005-10-07 18:40:26.000000000 +0200 @@ -50,6 +50,8 @@ #include "nls.h" #include "common.h" diff --git a/util-linux-2.13-login-hang.patch b/util-linux-2.13-login-hang.patch new file mode 100644 index 0000000..e6031f3 --- /dev/null +++ b/util-linux-2.13-login-hang.patch @@ -0,0 +1,20 @@ +--- util-linux-2.13-pre2/login-utils/login.c.hang 2005-10-03 16:02:54.000000000 +0200 ++++ util-linux-2.13-pre2/login-utils/login.c 2005-10-03 16:16:16.000000000 +0200 +@@ -223,7 +223,8 @@ + + if (lstat(ttyn, &statbuf) + || !S_ISCHR(statbuf.st_mode) +- || (statbuf.st_nlink > 1 && strncmp(ttyn, "/dev/", 5))) { ++ || (statbuf.st_nlink > 1 && strncmp(ttyn, "/dev/", 5)) ++ || (access(ttyn, R_OK | W_OK) != 0)) { + syslog(LOG_ERR, _("FATAL: bad tty")); + sleep(1); + exit(1); +@@ -332,6 +333,7 @@ + pid = getpid(); + + signal(SIGALRM, timedout); ++ siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */ + alarm((unsigned int)timeout); + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); diff --git a/util-linux-2.13-losetup-all.patch b/util-linux-2.13-losetup-all.patch new file mode 100644 index 0000000..d9fed85 --- /dev/null +++ b/util-linux-2.13-losetup-all.patch @@ -0,0 +1,140 @@ +--- util-linux-2.13-pre2/mount/lomount.c.all 2005-08-29 16:59:06.000000000 +0200 ++++ util-linux-2.13-pre2/mount/lomount.c 2005-08-29 17:17:49.000000000 +0200 +@@ -28,6 +28,8 @@ + extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ + extern void error (const char *fmt, ...); /* idem */ + ++#define SIZE(a) (sizeof(a)/sizeof(a[0])) ++ + #ifdef LOOP_SET_FD + + static int +@@ -128,6 +130,42 @@ + close (fd); + return 1; + } ++ ++static int ++show_used_loop_devices (void) { ++ char dev[20]; ++ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; ++ int i, j, fd, permission = 0, somedev = 0; ++ struct stat statbuf; ++ struct loop_info loopinfo; ++ ++ for (j = 0; j < SIZE(loop_formats); j++) { ++ for(i = 0; i < 256; i++) { ++ sprintf(dev, loop_formats[j], i); ++ if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { ++ somedev++; ++ fd = open (dev, O_RDONLY); ++ if (fd >= 0) { ++ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) ++ show_loop(dev); ++ close (fd); ++ somedev++; ++ } else if (errno == EACCES) ++ permission++; ++ continue; /* continue trying as long as devices exist */ ++ } ++ break; ++ } ++ } ++ ++ if (somedev==0 && permission) { ++ error(_("%s: no permission to look at /dev/loop#"), progname); ++ return 1; ++ } ++ return 0; ++} ++ ++ + #endif + + int +@@ -139,8 +177,6 @@ + major(statbuf.st_rdev) == LOOPMAJOR); + } + +-#define SIZE(a) (sizeof(a)/sizeof(a[0])) +- + char * + find_unused_loop_device (void) { + /* Just creating a device, say in /tmp, is probably a bad idea - +@@ -403,12 +439,13 @@ + + static void + usage(void) { +- fprintf(stderr, _("usage:\n\ +- %s loop_device # give info\n\ +- %s -d loop_device # delete\n\ +- %s -f # find unused\n\ +- %s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), +- progname, progname, progname, progname); ++ fprintf(stderr, _("usage:\n" ++ " %1$s loop_device # give info\n" ++ " %1$s -d loop_device # delete\n" ++ " %1$s -f # find unused\n" ++ " %1$s -a # list all used\n" ++ " %1$s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), ++ progname); + exit(1); + } + +@@ -442,7 +479,7 @@ + int + main(int argc, char **argv) { + char *p, *offset, *encryption, *passfd, *device, *file; +- int delete, find, c; ++ int delete, find, c, all; + int res = 0; + int ro = 0; + int pfd = -1; +@@ -452,7 +489,7 @@ + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + +- delete = find = 0; ++ delete = find = all = 0; + off = 0; + offset = encryption = passfd = NULL; + +@@ -460,8 +497,11 @@ + if ((p = strrchr(progname, '/')) != NULL) + progname = p+1; + +- while ((c = getopt(argc, argv, "de:E:fo:p:v")) != -1) { ++ while ((c = getopt(argc, argv, "ade:E:fo:p:v")) != -1) { + switch (c) { ++ case 'a': ++ all = 1; ++ break; + case 'd': + delete = 1; + break; +@@ -489,17 +529,22 @@ + if (argc == 1) { + usage(); + } else if (delete) { +- if (argc != optind+1 || encryption || offset || find) ++ if (argc != optind+1 || encryption || offset || find || all) + usage(); + } else if (find) { +- if (argc < optind || argc > optind+1) ++ if (all || argc < optind || argc > optind+1) ++ usage(); ++ } else if (all) { ++ if (argc > 2) + usage(); + } else { + if (argc < optind+1 || argc > optind+2) + usage(); + } + +- if (find) { ++ if (all) ++ return show_used_loop_devices(); ++ else if (find) { + device = find_unused_loop_device(); + if (device == NULL) + return -1; diff --git a/util-linux-chsh-chfn.pamd b/util-linux-chsh-chfn.pamd index 1d512ad..2dbc0aa 100644 --- a/util-linux-chsh-chfn.pamd +++ b/util-linux-chsh-chfn.pamd @@ -1,6 +1,6 @@ #%PAM-1.0 auth sufficient pam_rootok.so -auth required pam_stack.so service=system-auth -account required pam_stack.so service=system-auth -password required pam_stack.so service=system-auth -session required pam_stack.so service=system-auth +auth include system-auth +account include system-auth +password include system-auth +session include system-auth diff --git a/util-linux.spec b/util-linux.spec index b3caa16..403ae16 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -6,12 +6,11 @@ # - upstream maintainer Adrian Bunk # # TODO: -# - remove deprecated (since release 2.13) the arch command +# - remove deprecated the arch command (since release 2.13) # ### Features %define include_raw 0 -%define with_kbdrate 0 ### Macros %define floppyver 0.12 @@ -28,7 +27,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.3.pre3 +Release: 0.4.pre4 License: distributable Group: System Environment/Base @@ -46,13 +45,12 @@ BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel ### Sources -# TODO [stable]: s/2.13-pre2/%{version}/ -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre2.tar.bz2 +# TODO [stable]: s/2.13-pre4/%{version}/ +Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre4.tar.bz2 Source1: util-linux-selinux.pamd Source2: util-linux-chsh-chfn.pamd Source8: nologin.c Source9: nologin.8 -Source10: kbdrate.tar.gz Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.gz Source12: http://download.sourceforge.net/cramfs/cramfs-%{cramfsver}.tar.gz @@ -65,9 +63,6 @@ Obsoletes: clock Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 %endif Requires: pam >= 0.66-4, /etc/pam.d/system-auth -%if %{with_kbdrate} -Requires: usermode -%endif Conflicts: kernel < 2.2.12-7, Prereq: /sbin/install-info Provides: mount = %{version} @@ -150,23 +145,22 @@ Patch204: util-linux-2.12p-mount-ocfs2.patch Patch205: util-linux-2.12p-execl.patch # deprecated the arch command (for compatibility only) Patch206: util-linux-2.13-arch.patch - -# upstream build system mistakes -Patch207: util-linux-2.13-agetty-man.patch -Patch208: util-linux-2.13-usrsbin.patch - -#159410 - mkswap(8) claims max swap area size is 2 GB -Patch209: util-linux-2.12p-mkswap-man.patch -#165863 - swsusp swaps should be reinitialized +# 165863 - swsusp swaps should be reinitialized Patch210: util-linux-2.13-swapon-suspend.patch -#170110 - Documentation for 'rsize' and 'wsize' NFS mount options is misleading +# 170110 - Documentation for 'rsize' and 'wsize' NFS mount options is misleading Patch211: util-linux-2.12p-nfs-manupdate.patch +# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 +Patch212: util-linux-2.12p-floppy-generic.patch +# 168436 - login will attempt to run if it has no read/write access to its terminal +# 168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1) +Patch213: util-linux-2.13-login-hang.patch +# 165253 – losetup missing option -a [new feature] +Patch214: util-linux-2.13-losetup-all.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. ########### END upstreamable - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -175,7 +169,7 @@ program. %prep # TODO [stable]: remove -n -%setup -q -a 10 -a 11 -a 12 -n util-linux-2.13-pre2 +%setup -q -a 11 -a 12 -n util-linux-2.13-pre4 %patch1 -p1 -b .moretc %patch70 -p1 @@ -225,12 +219,12 @@ cp %{SOURCE8} %{SOURCE9} . %patch203 -p1 -b .gpt %patch204 -p1 %patch205 -p1 -%patch206 -p1 -%patch207 -p1 -%patch208 -p1 -%patch209 -p1 +%patch206 -p1 -b .arch %patch210 -p1 -b .swsuspend %patch211 -p1 +%patch212 -p1 +%patch213 -p1 +%patch214 -p1 %build unset LINGUAS || : @@ -271,13 +265,6 @@ export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS" # build util-linux make %{?_smp_mflags} -# build kbdrate -%if %{with_kbdrate} -pushd kbdrate - cc $RPM_OPT_FLAGS -o kbdrate kbdrate.c -popd -%endif - # build floppy stuff pushd floppy-%{floppyver} # We have to disable floppygtk somehow... @@ -327,12 +314,6 @@ popd install -m 755 nologin ${RPM_BUILD_ROOT}/sbin install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 -%if %{with_kbdrate} -install -m 755 kbdrate/kbdrate ${RPM_BUILD_ROOT}/sbin -install -m 644 kbdrate/kbdrate.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 -ln -s consolehelper ${RPM_BUILD_ROOT}/usr/bin/kbdrate -%endif - %if %{include_raw} echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 %endif @@ -366,11 +347,6 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/ipc.info -%if %{with_kbdrate} -install -m644 kbdrate/kbdrate.apps $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kbdrate -install -m644 kbdrate/kbdrate.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kbdrate -%endif - # PAM settings { pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d @@ -498,15 +474,6 @@ fi %{_mandir}/man8/nologin.8* %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog -# Begin kbdrate stuff -%if %{with_kbdrate} -/sbin/kbdrate -/usr/bin/kbdrate -%{_mandir}/man8/kbdrate.8* -%{_sysconfdir}/pam.d/kbdrate -%{_sysconfdir}/security/console.apps/kbdrate -%endif - %{_bindir}/chrt %{_bindir}/ionice %{_bindir}/taskset @@ -652,9 +619,19 @@ fi /sbin/losetup %changelog +* 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 +- 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 From f0e1d6bb1765c2d34c575bb732be8529a5758df6 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 17 Oct 2005 14:09:59 +0000 Subject: [PATCH 020/425] -login audit stuff --- util-linux-2.13-audit-login.patch | 101 ++++++++++++++++++++++++++++++ util-linux.spec | 15 +++-- 2 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 util-linux-2.13-audit-login.patch diff --git a/util-linux-2.13-audit-login.patch b/util-linux-2.13-audit-login.patch new file mode 100644 index 0000000..ca88bdc --- /dev/null +++ b/util-linux-2.13-audit-login.patch @@ -0,0 +1,101 @@ +diff -ur util-linux-2.13-pre4.orig/login-utils/login.c util-linux-2.13-pre4/login-utils/login.c +--- util-linux-2.13-pre4.orig/login-utils/login.c 2005-10-14 13:59:08.000000000 -0400 ++++ util-linux-2.13-pre4/login-utils/login.c 2005-10-14 15:43:54.000000000 -0400 +@@ -106,6 +106,7 @@ + #include + #include + #include ++#include + #include "pathnames.h" + #include "my_crypt.h" + #include "login.h" +@@ -329,6 +330,7 @@ + #ifdef LOGIN_CHOWN_VCS + char vcsn[20], vcsan[20]; + #endif ++ int audit_fd; + + pid = getpid(); + +@@ -545,11 +547,25 @@ + (retcode == PAM_USER_UNKNOWN) || + (retcode == PAM_CRED_INSUFFICIENT) || + (retcode == PAM_AUTHINFO_UNAVAIL))) { ++ struct passwd *pw; ++ char buf[64]; + pam_get_item(pamh, PAM_USER, (const void **) &username); + + syslog(LOG_NOTICE,_("FAILED LOGIN %d FROM %s FOR %s, %s"), + failcount, hostname, username, pam_strerror(pamh, retcode)); + logbtmp(tty_name, username, hostname); ++ audit_fd = audit_open(); ++ pw = getpwnam(username); ++ if (pw) { ++ snprintf(buf, sizeof(buf), "uid=%d", pw->pw_uid); ++ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, ++ buf, hostname, NULL, tty_name, 0); ++ } else { ++ snprintf(buf, sizeof(buf), "acct=%s", username); ++ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, ++ buf, hostname, NULL, tty_name, 0); ++ } ++ close(audit_fd); + + fprintf(stderr,_("Login incorrect\n\n")); + pam_set_item(pamh,PAM_USER,NULL); +@@ -557,6 +573,8 @@ + } + + if (retcode != PAM_SUCCESS) { ++ struct passwd *pw; ++ char buf[64]; + pam_get_item(pamh, PAM_USER, (const void **) &username); + + if (retcode == PAM_MAXTRIES) +@@ -567,6 +585,18 @@ + syslog(LOG_NOTICE,_("FAILED LOGIN SESSION FROM %s FOR %s, %s"), + hostname, username, pam_strerror(pamh, retcode)); + logbtmp(tty_name, username, hostname); ++ audit_fd = audit_open(); ++ pw = getpwnam(username); ++ if (pw) { ++ snprintf(buf, sizeof(buf), "uid=%d", pw->pw_uid); ++ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, ++ buf, hostname, NULL, tty_name, 0); ++ } else { ++ snprintf(buf, sizeof(buf), "acct=%s", username); ++ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, ++ buf, hostname, NULL, tty_name, 0); ++ } ++ close(audit_fd); + + fprintf(stderr,_("\nLogin incorrect\n")); + pam_end(pamh, retcode); +@@ -908,6 +938,15 @@ + #endif + #endif + } ++ ++ { ++ char buf[32]; ++ audit_fd = audit_open(); ++ snprintf(buf, sizeof(buf), "uid=%d", pwd->pw_uid); ++ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, ++ buf, hostname, NULL, tty_name, 1); ++ close(audit_fd); ++ } + + dolastlog(quietlog); + +diff -ur util-linux-2.13-pre4.orig/login-utils/Makefile.am util-linux-2.13-pre4/login-utils/Makefile.am +--- util-linux-2.13-pre4.orig/login-utils/Makefile.am 2005-10-14 13:59:08.000000000 -0400 ++++ util-linux-2.13-pre4/login-utils/Makefile.am 2005-10-14 15:45:22.000000000 -0400 +@@ -55,7 +55,7 @@ + if HAVE_PAM + chfn_LDADD += -lpam -lpam_misc + chsh_LDADD += -lpam -lpam_misc +-login_LDADD += -lpam -lpam_misc ++login_LDADD += -lpam -lpam_misc -laudit + login_SOURCES = login.c + else + login_SOURCES = login.c checktty.c diff --git a/util-linux.spec b/util-linux.spec index 403ae16..a3cd94c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -27,7 +27,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.4.pre4 +Release: 0.5.pre4 License: distributable Group: System Environment/Base @@ -42,7 +42,7 @@ BuildRequires: texinfo BuildRequires: gettext BuildRequires: libselinux-devel BuildRequires: e2fsprogs-devel >= 1.36 -BuildRequires: audit-libs-devel +BuildRequires: audit-libs-devel >= 1.0.6 ### Sources # TODO [stable]: s/2.13-pre4/%{version}/ @@ -63,6 +63,7 @@ Obsoletes: clock Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 %endif Requires: pam >= 0.66-4, /etc/pam.d/system-auth +Requires: audit-libs >= 1.0.6 Conflicts: kernel < 2.2.12-7, Prereq: /sbin/install-info Provides: mount = %{version} @@ -154,8 +155,10 @@ Patch212: util-linux-2.12p-floppy-generic.patch # 168436 - login will attempt to run if it has no read/write access to its terminal # 168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1) Patch213: util-linux-2.13-login-hang.patch -# 165253 – losetup missing option -a [new feature] +# 165253 - losetup missing option -a [new feature] Patch214: util-linux-2.13-losetup-all.patch +# 170564 - add audit message to login +Patch215: util-linux-2.13-audit-login.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -225,6 +228,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch212 -p1 %patch213 -p1 %patch214 -p1 +%patch215 -p1 %build unset LINGUAS || : @@ -619,11 +623,14 @@ fi /sbin/losetup %changelog +* 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] +- 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 From b86cfa5ff32a9262ef3e61aca17c93d5f6790bc4 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 20 Oct 2005 14:54:21 +0000 Subject: [PATCH 021/425] new upstream version --- .cvsignore | 3 +-- sources | 3 +-- util-linux-2.13-ipcs-shmax.patch | 18 ++++++++++++++++ util-linux.spec | 37 +++++++++++--------------------- 4 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 util-linux-2.13-ipcs-shmax.patch diff --git a/.cvsignore b/.cvsignore index 7f0c184..1b29f61 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,2 @@ -cramfs-1.1.tar.gz floppy-0.12.tar.gz -util-linux-2.13-pre4.tar.bz2 +util-linux-2.13-pre5.tar.bz2 diff --git a/sources b/sources index 0f54064..1c9674c 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -d3912b9f7bf745fbfea68f6a9b9de30f cramfs-1.1.tar.gz 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz -484f4809876197a07a6c471d320b6d03 util-linux-2.13-pre4.tar.bz2 +cb6df95064100fe75364fa139634c475 util-linux-2.13-pre5.tar.bz2 diff --git a/util-linux-2.13-ipcs-shmax.patch b/util-linux-2.13-ipcs-shmax.patch new file mode 100644 index 0000000..d855bf5 --- /dev/null +++ b/util-linux-2.13-ipcs-shmax.patch @@ -0,0 +1,18 @@ +--- util-linux-2.13-pre4/sys-utils/ipcs.c.shmax 2005-10-18 17:04:42.000000000 +0200 ++++ util-linux-2.13-pre4/sys-utils/ipcs.c 2005-10-18 17:31:28.000000000 +0200 +@@ -280,8 +280,14 @@ + (unsigned long) shminfo.shmmni); + printf (_("max seg size (kbytes) = %lu\n"), + (unsigned long) (shminfo.shmmax >> 10)); ++ ++ /* max shmem = pagesize * shminfo.shmall / 1024 ++ * ++ * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit) ++ * it means that better is "/" before "*" or use "long long" ++ */ + printf (_("max total shared memory (kbytes) = %lu\n"), +- (getpagesize()*((unsigned long) shminfo.shmall))/1024UL); ++ getpagesize()/1024 * (unsigned long) shminfo.shmall); + printf (_("min seg size (bytes) = %lu\n"), + (unsigned long) shminfo.shmmin); + return; diff --git a/util-linux.spec b/util-linux.spec index a3cd94c..300bc80 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -14,7 +14,6 @@ ### Macros %define floppyver 0.12 -%define cramfsver 1.1 %define no_hwclock_archs s390 s390x %define cytune_archs %{ix86} alpha armv4l @@ -23,11 +22,10 @@ BuildRoot: %{_tmppath}/%{name}-root # see build section for _prefix ### Header -# note: this is experimental unstable package. See "TODO [stable]" notes. -- kzak Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.5.pre4 +Release: 0.6.pre5 License: distributable Group: System Environment/Base @@ -45,14 +43,13 @@ BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel >= 1.0.6 ### Sources -# TODO [stable]: s/2.13-pre4/%{version}/ -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre4.tar.bz2 +# TODO [stable]: s/2.13-pre5/%{version}/ +Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre5.tar.bz2 Source1: util-linux-selinux.pamd Source2: util-linux-chsh-chfn.pamd Source8: nologin.c Source9: nologin.8 Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.gz -Source12: http://download.sourceforge.net/cramfs/cramfs-%{cramfsver}.tar.gz ### Obsoletes & Conflicts & Provides Obsoletes: fdisk tunelp mount losetup schedutils @@ -91,9 +88,6 @@ Patch128: util-linux-2.12a-ipcs-84243-86285.patch Patch138: util-linux-2.11y-chsh-103004.patch Patch139: util-linux-2.11y-fdisksegv-103954.patch -Patch143: cramfs-1.1-blocksize_and_quiet.patch -Patch144: cramfs-1.1-pagesize.patch - Patch147: util-linux-2.12a-126572-fdiskman.patch Patch150: floppy-0.12-locale.patch @@ -159,6 +153,8 @@ Patch213: util-linux-2.13-login-hang.patch Patch214: util-linux-2.13-losetup-all.patch # 170564 - add audit message to login Patch215: util-linux-2.13-audit-login.patch +# 170171 - ipcs -lm always report "max total shared memory (kbytes) = 0" +Patch216: util-linux-2.13-ipcs-shmax.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -172,7 +168,7 @@ program. %prep # TODO [stable]: remove -n -%setup -q -a 11 -a 12 -n util-linux-2.13-pre4 +%setup -q -a 11 -n util-linux-2.13-pre5 %patch1 -p1 -b .moretc %patch70 -p1 @@ -190,9 +186,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch128 -p1 %patch138 -p1 %patch139 -p1 -# cramfs -%patch143 -p0 -%patch144 -p1 %patch147 -p1 %patch150 -p0 %patch151 -p1 @@ -229,6 +222,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch213 -p1 %patch214 -p1 %patch215 -p1 +%patch216 -p1 %build unset LINGUAS || : @@ -276,9 +270,6 @@ pushd floppy-%{floppyver} make %{?_smp_mflags} popd -# build cramfs 1.1 -make -C cramfs-%{cramfsver} %{?_smp_mflags} - # build nologin gcc $RPM_OPT_FLAGS -o nologin nologin.c @@ -307,13 +298,6 @@ pushd floppy-%{floppyver} %makeinstall popd -# install cramfs 1.1 -pushd cramfs-%{cramfsver} -install -s -m 755 mkcramfs ${RPM_BUILD_ROOT}/sbin/mkfs.cramfs -ln -s ../../sbin/mkfs.cramfs ${RPM_BUILD_ROOT}/usr/bin/mkcramfs -install -s -m 755 cramfsck ${RPM_BUILD_ROOT}/sbin/fsck.cramfs -popd - # install no login install -m 755 nologin ${RPM_BUILD_ROOT}/sbin install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 @@ -507,7 +491,6 @@ fi %{_bindir}/logger %{_bindir}/look %{_bindir}/mcookie -%{_bindir}/mkcramfs /sbin/fsck.cramfs /sbin/mkfs.cramfs %ifnarch s390 s390x @@ -623,6 +606,12 @@ fi /sbin/losetup %changelog +* 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 From 08be59bff836bec71e0246a20f84a6411fc1843f Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 20 Oct 2005 21:58:21 +0000 Subject: [PATCH 022/425] fix cramfs --- util-linux-2.13-cramfs-maxentries.patch | 47 +++++++++++++++++++++++++ util-linux.spec | 9 ++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-cramfs-maxentries.patch diff --git a/util-linux-2.13-cramfs-maxentries.patch b/util-linux-2.13-cramfs-maxentries.patch new file mode 100644 index 0000000..07b8822 --- /dev/null +++ b/util-linux-2.13-cramfs-maxentries.patch @@ -0,0 +1,47 @@ +--- util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c.maxentries 2005-10-20 23:46:19.000000000 +0200 ++++ util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c 2005-10-20 23:54:07.000000000 +0200 +@@ -471,11 +471,13 @@ + * entries, using a stack to remember the directories + * we've seen. + */ +-#define MAXENTRIES (100) + static unsigned int write_directory_structure(struct entry *entry, char *base, unsigned int offset) + { + int stack_entries = 0; +- struct entry *entry_stack[MAXENTRIES]; ++ int stack_size = 64; ++ struct entry **entry_stack; ++ ++ entry_stack = xmalloc(stack_size * sizeof(struct entry *)); + + for (;;) { + int dir_start = stack_entries; +@@ -508,13 +510,13 @@ + if (verbose) + printf(" %s\n", entry->name); + if (entry->child) { +- if (stack_entries >= MAXENTRIES) { +- fprintf(stderr, +- _("Exceeded MAXENTRIES. Raise" +- " this value in mkcramfs.c " +- "and recompile. Exiting.\n") +- ); +- exit(8); ++ if (stack_entries >= stack_size) { ++ stack_size *= 2; ++ entry_stack = realloc(entry_stack, stack_size * sizeof(struct entry *)); ++ if (!entry_stack) { ++ perror(NULL); ++ exit(8); /* out of memory */ ++ } + } + entry_stack[stack_entries] = entry; + stack_entries++; +@@ -551,6 +553,7 @@ + printf("'%s':\n", entry->name); + entry = entry->child; + } ++ free(entry_stack); + return offset; + } + diff --git a/util-linux.spec b/util-linux.spec index 300bc80..fabfd00 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.6.pre5 +Release: 0.7.pre5 License: distributable Group: System Environment/Base @@ -155,6 +155,8 @@ Patch214: util-linux-2.13-losetup-all.patch Patch215: util-linux-2.13-audit-login.patch # 170171 - ipcs -lm always report "max total shared memory (kbytes) = 0" Patch216: util-linux-2.13-ipcs-shmax.patch +# 171337 - mkfs.cramfs dies creating installer image +Patch217: util-linux-2.13-cramfs-maxentries.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -221,8 +223,10 @@ cp %{SOURCE8} %{SOURCE9} . %patch212 -p1 %patch213 -p1 %patch214 -p1 +# audit %patch215 -p1 %patch216 -p1 +%patch217 -p1 %build unset LINGUAS || : @@ -606,6 +610,9 @@ fi /sbin/losetup %changelog +* 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) From 05d406e6391fa8850a16129c21c3d5cd62666b0e Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 25 Oct 2005 22:07:29 +0000 Subject: [PATCH 023/425] - updated version of the hwclock audit patch --- util-linux-2.13-audit-hwclock.patch | 262 +++++++++++++--------------- util-linux.spec | 5 +- 2 files changed, 127 insertions(+), 140 deletions(-) diff --git a/util-linux-2.13-audit-hwclock.patch b/util-linux-2.13-audit-hwclock.patch index 30049d7..0aa5bfe 100644 --- a/util-linux-2.13-audit-hwclock.patch +++ b/util-linux-2.13-audit-hwclock.patch @@ -1,5 +1,115 @@ ---- util-linux-2.13-pre2/hwclock/hwclock.c.audit 2005-07-31 22:15:18.000000000 +0200 -+++ util-linux-2.13-pre2/hwclock/hwclock.c 2005-08-30 11:11:11.000000000 +0200 +diff -urN util-linux-2.13-pre5.orig/hwclock/audit.c util-linux-2.13-pre5/hwclock/audit.c +--- util-linux-2.13-pre5.orig/hwclock/audit.c 1969-12-31 19:00:00.000000000 -0500 ++++ util-linux-2.13-pre5/hwclock/audit.c 2005-10-25 17:14:46.000000000 -0400 +@@ -0,0 +1,50 @@ ++/* audit.c -- This file contains the audit system extensions ++ * ++ * Copyright 2005 Red Hat Inc., Durham, North Carolina. ++ * All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Authors: ++ * Steve Grubb ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "audit.h" ++ ++int audit_fd = -1; ++static int audit_this = 0; ++ ++ ++void auditable_event(int i) ++{ ++ audit_this = i; ++} ++ ++ ++void audit_exit(int status) ++{ ++ if (audit_this) { ++ audit_log_user_message(audit_fd, AUDIT_USYS_CONFIG, ++ "changing system time", NULL, NULL, NULL, status); ++ close(audit_fd); ++ } ++ exit(status); ++} ++ +diff -urN util-linux-2.13-pre5.orig/hwclock/audit.h util-linux-2.13-pre5/hwclock/audit.h +--- util-linux-2.13-pre5.orig/hwclock/audit.h 1969-12-31 19:00:00.000000000 -0500 ++++ util-linux-2.13-pre5/hwclock/audit.h 2005-10-25 17:09:40.000000000 -0400 +@@ -0,0 +1,34 @@ ++/* audit.h -- This file contains the function prototypes for audit calls ++ * Copyright 2005 Red Hat Inc., Durham, North Carolina. ++ * All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Author: ++ * Steve Grubb ++ * ++ */ ++ ++#ifndef HW_AUDIT_H ++#define HW_AUDIT_H ++ ++/* This is the file descriptor used by the audit system */ ++extern int audit_fd; ++ ++/* This is the logging functions */ ++void auditable_event(int i); ++void audit_exit(int status); ++ ++#endif +diff -urN util-linux-2.13-pre5.orig/hwclock/clock.h util-linux-2.13-pre5/hwclock/clock.h +--- util-linux-2.13-pre5.orig/hwclock/clock.h 2005-10-25 17:08:26.000000000 -0400 ++++ util-linux-2.13-pre5/hwclock/clock.h 2005-10-25 17:09:40.000000000 -0400 +@@ -24,7 +24,12 @@ + extern char *progname; + extern int debug; + extern int epoch_option; +-extern void outsyserr(char *msg, ...); ++extern void outsyserr(char *msg, ...) ++#ifdef __GNUC__ ++ __attribute__ ((format (printf, 1, 2))); ++#else ++ ; ++#endif + + /* cmos.c */ + extern void set_cmos_epoch(int ARCconsole, int SRM); +diff -urN util-linux-2.13-pre5.orig/hwclock/hwclock.c util-linux-2.13-pre5/hwclock/hwclock.c +--- util-linux-2.13-pre5.orig/hwclock/hwclock.c 2005-10-25 17:08:26.000000000 -0400 ++++ util-linux-2.13-pre5/hwclock/hwclock.c 2005-10-25 17:09:40.000000000 -0400 @@ -81,9 +81,11 @@ #include #include @@ -123,84 +233,9 @@ } /* A single routine for greater uniformity */ ---- /dev/null 2005-08-29 11:11:19.415613608 +0200 -+++ util-linux-2.13-pre2/hwclock/audit.c 2005-08-30 11:10:38.000000000 +0200 -@@ -0,0 +1,73 @@ -+/* audit.c -- This file contains the audit system extensions -+ * -+ * Copyright 2005 Red Hat Inc., Durham, North Carolina. -+ * All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Authors: -+ * Steve Grubb -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include "audit.h" -+ -+int audit_fd = -1; -+ -+/* -+ * This function will log a message to the audit system using a predefined -+ * message format. Parameter usage is as follows: -+ * -+ * op - operation. "adding user", "changing finger info", "deleting group" -+ * result - 0 = "success" or 1 = "failed" -+ */ -+static void audit_logger(const char *op, int result) -+{ -+ char msg_buf[256]; /* Common buffer for messaging */ -+ const char *success; -+ extern char *progname; -+ -+ if (audit_fd < 0) -+ return; /* kernel without audit support */ -+ -+ if (!result) -+ success = "success"; -+ else -+ success = "failed"; -+ -+ /* Add some audit info & log it. */ -+ snprintf(msg_buf, sizeof(msg_buf), -+ "%s: op=%s id=%u res=%s", progname, op, getuid(), success); -+ audit_send_user_message(audit_fd, AUDIT_USYS_CONFIG, msg_buf); -+ close(audit_fd); -+} -+ -+static int audit_this = 0; -+void auditable_event(int i) -+{ -+ audit_this = i; -+} -+ -+void audit_exit(int status) -+{ -+ if (audit_this) -+ audit_logger("changing system time", status); -+ exit(status); -+} -+ ---- util-linux-2.13-pre2/hwclock/kd.c.audit 2005-07-31 18:01:20.000000000 +0200 -+++ util-linux-2.13-pre2/hwclock/kd.c 2005-08-30 11:06:38.000000000 +0200 +diff -urN util-linux-2.13-pre5.orig/hwclock/kd.c util-linux-2.13-pre5/hwclock/kd.c +--- util-linux-2.13-pre5.orig/hwclock/kd.c 2005-10-25 17:08:26.000000000 -0400 ++++ util-linux-2.13-pre5/hwclock/kd.c 2005-10-25 17:09:40.000000000 -0400 @@ -19,6 +19,7 @@ #include "clock.h" @@ -227,72 +262,21 @@ } return 0; } ---- util-linux-2.13-pre2/hwclock/Makefile.am.audit 2005-01-30 00:18:46.000000000 +0100 -+++ util-linux-2.13-pre2/hwclock/Makefile.am 2005-08-30 11:06:38.000000000 +0200 +diff -urN util-linux-2.13-pre5.orig/hwclock/Makefile.am util-linux-2.13-pre5/hwclock/Makefile.am +--- util-linux-2.13-pre5.orig/hwclock/Makefile.am 2005-10-25 17:08:26.000000000 -0400 ++++ util-linux-2.13-pre5/hwclock/Makefile.am 2005-10-25 17:09:40.000000000 -0400 @@ -4,4 +4,5 @@ sbin_PROGRAMS = hwclock -hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c -\ Chybí znak konce řádku na konci souboru +\ No newline at end of file +hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c audit.c +hwclock_LDADD = -laudit -\ Chybí znak konce řádku na konci souboru ---- /dev/null 2005-08-29 11:11:19.415613608 +0200 -+++ util-linux-2.13-pre2/hwclock/audit.h 2005-08-30 11:06:38.000000000 +0200 -@@ -0,0 +1,34 @@ -+/* audit.h -- This file contains the function prototypes for audit calls -+ * Copyright 2005 Red Hat Inc., Durham, North Carolina. -+ * All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Author: -+ * Steve Grubb -+ * -+ */ -+ -+#ifndef HW_AUDIT_H -+#define HW_AUDIT_H -+ -+/* This is the file descriptor used by the audit system */ -+extern int audit_fd; -+ -+/* This is the logging functions */ -+void auditable_event(int i); -+void audit_exit(int status); -+ -+#endif ---- util-linux-2.13-pre2/hwclock/clock.h.audit 2000-12-07 17:39:53.000000000 +0100 -+++ util-linux-2.13-pre2/hwclock/clock.h 2005-08-30 11:06:38.000000000 +0200 -@@ -24,7 +24,12 @@ - extern char *progname; - extern int debug; - extern int epoch_option; --extern void outsyserr(char *msg, ...); -+extern void outsyserr(char *msg, ...) -+#ifdef __GNUC__ -+ __attribute__ ((format (printf, 1, 2))); -+#else -+ ; -+#endif - - /* cmos.c */ - extern void set_cmos_epoch(int ARCconsole, int SRM); ---- util-linux-2.13-pre2/hwclock/rtc.c.audit 2005-07-31 22:15:45.000000000 +0200 -+++ util-linux-2.13-pre2/hwclock/rtc.c 2005-08-30 11:06:38.000000000 +0200 +\ No newline at end of file +diff -urN util-linux-2.13-pre5.orig/hwclock/rtc.c util-linux-2.13-pre5/hwclock/rtc.c +--- util-linux-2.13-pre5.orig/hwclock/rtc.c 2005-10-25 17:08:26.000000000 -0400 ++++ util-linux-2.13-pre5/hwclock/rtc.c 2005-10-25 17:09:40.000000000 -0400 @@ -8,6 +8,7 @@ #include "clock.h" diff --git a/util-linux.spec b/util-linux.spec index fabfd00..e162614 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.7.pre5 +Release: 0.8.pre5 License: distributable Group: System Environment/Base @@ -610,6 +610,9 @@ fi /sbin/losetup %changelog +* 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 From df323dcd1b3b12d5e6a93b255d7976ff7c757837 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 26 Oct 2005 13:42:24 +0000 Subject: [PATCH 024/425] exclude broken s390 --- util-linux.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index e162614..0d53a5d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,6 +29,10 @@ Release: 0.8.pre5 License: distributable Group: System Environment/Base +### TEMPORARY WORKAROUND ONLY [26-Oct-2005, kzak] +ExcludeArch: s390 +### + ### Dependences BuildRequires: sed BuildRequires: pam-devel From 218489d495262a1ee5c5f76fe1f1c5fb2b5326f2 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 27 Oct 2005 09:50:39 +0000 Subject: [PATCH 025/425] remove exclude s360 --- util-linux.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 0d53a5d..e162614 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -29,10 +29,6 @@ Release: 0.8.pre5 License: distributable Group: System Environment/Base -### TEMPORARY WORKAROUND ONLY [26-Oct-2005, kzak] -ExcludeArch: s390 -### - ### Dependences BuildRequires: sed BuildRequires: pam-devel From b18736cd84c71a7673d8def883ce0feaf96ecb88 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 28 Oct 2005 09:04:22 +0000 Subject: [PATCH 026/425] rebuild --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index e162614..da44716 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.8.pre5 +Release: 0.9.pre5 License: distributable Group: System Environment/Base @@ -610,7 +610,10 @@ fi /sbin/losetup %changelog -* Wed Oct 26 2005 Karel Zak 2.13-0.8.pre5 +* 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 From 9f643f99c9541104e16bdd0f11f6c7a333a8d055 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 7 Nov 2005 12:22:20 +0000 Subject: [PATCH 027/425] fix mkfs.cramfs --- util-linux-2.13-cramfs-zerofiles.patch | 11 +++++++++++ util-linux.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-cramfs-zerofiles.patch diff --git a/util-linux-2.13-cramfs-zerofiles.patch b/util-linux-2.13-cramfs-zerofiles.patch new file mode 100644 index 0000000..3d97419 --- /dev/null +++ b/util-linux-2.13-cramfs-zerofiles.patch @@ -0,0 +1,11 @@ +--- util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c.zerofiles 2005-11-07 13:05:27.000000000 +0100 ++++ util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c 2005-11-07 13:06:38.000000000 +0100 +@@ -661,7 +661,7 @@ + if (e->same) { + set_data_offset(e, base, e->same->offset); + e->offset = e->same->offset; +- } else { ++ } else if (e->size) { + set_data_offset(e, base, offset); + e->offset = offset; + offset = do_compress(base, offset, e->name, diff --git a/util-linux.spec b/util-linux.spec index da44716..0a1c2c5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.9.pre5 +Release: 0.10.pre5 License: distributable Group: System Environment/Base @@ -157,6 +157,8 @@ Patch215: util-linux-2.13-audit-login.patch Patch216: util-linux-2.13-ipcs-shmax.patch # 171337 - mkfs.cramfs dies creating installer image Patch217: util-linux-2.13-cramfs-maxentries.patch +# [171337 too] - mkfs.cramfs doesn't work correctly with empty files +Patch218: util-linux-2.13-cramfs-zerofiles.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -227,6 +229,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch215 -p1 %patch216 -p1 %patch217 -p1 +%patch218 -p1 %build unset LINGUAS || : @@ -610,6 +613,9 @@ fi /sbin/losetup %changelog +* 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 From 8a8022aac198f236177f8a410263bdb9fb7d21f5 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 9 Nov 2005 15:51:23 +0000 Subject: [PATCH 028/425] add BuildReq gettext-devel --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 0a1c2c5..d02869f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -37,7 +37,7 @@ BuildRequires: libtermcap-devel BuildRequires: zlib-devel BuildRequires: slang-devel BuildRequires: texinfo -BuildRequires: gettext +BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel >= 1.0.6 From c832e53cfd6f0c35c69d055939d287b8ce8e4544 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 25 Nov 2005 07:32:12 +0000 Subject: [PATCH 029/425] new version 2.13-pre6 --- .cvsignore | 2 +- sources | 2 +- util-linux-2.12a-mount-man-cifs.patch | 30 ++++++++++++++++++ util-linux-2.13-fdisk-gpt.patch | 44 +++++++++++++-------------- util-linux.spec | 41 ++++++++++++++----------- 5 files changed, 78 insertions(+), 41 deletions(-) create mode 100644 util-linux-2.12a-mount-man-cifs.patch diff --git a/.cvsignore b/.cvsignore index 1b29f61..9d34935 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.12.tar.gz -util-linux-2.13-pre5.tar.bz2 +util-linux-2.13-pre6.tar.bz2 diff --git a/sources b/sources index 1c9674c..bf8417d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz -cb6df95064100fe75364fa139634c475 util-linux-2.13-pre5.tar.bz2 +1db1249029439e5e965c2c7178149616 util-linux-2.13-pre6.tar.bz2 diff --git a/util-linux-2.12a-mount-man-cifs.patch b/util-linux-2.12a-mount-man-cifs.patch new file mode 100644 index 0000000..185cc0d --- /dev/null +++ b/util-linux-2.12a-mount-man-cifs.patch @@ -0,0 +1,30 @@ +--- util-linux-2.12a/mount/mount.8.cifs 2005-11-23 16:34:34.000000000 +0100 ++++ util-linux-2.12a/mount/mount.8 2005-11-23 16:38:37.000000000 +0100 +@@ -413,8 +413,8 @@ + program has to do is issue a simple + .IR mount (2) + system call, and no detailed knowledge of the filesystem type is required. +-For a few types however (like nfs, nfs4, smbfs, ncpfs) ad hoc code is +-necessary. The nfs ad hoc code is built in, but smbfs and ncpfs ++For a few types however (like nfs, nfs4, smbfs, ncpfs, cifs) ad hoc code is ++necessary. The nfs ad hoc code is built in, but smbfs, ncpfs and cifs + have a separate mount program. In order to make it possible to + treat all types in a uniform way, mount will execute the program + .I /sbin/mount.TYPE +@@ -720,6 +720,16 @@ + (However, quota utilities may react to such strings in + .IR /etc/fstab .) + ++.SH "Mount options for cifs" ++Just like ++.IR nfs " or " smbfs ++implementation expects a binary argument ++to the mount system call. This argument is constructed by ++.BR mount.cifs (8) ++and the current version of ++.B mount ++(2.12) does not know anything about cifs. ++ + .SH "Mount options for coherent" + None. + diff --git a/util-linux-2.13-fdisk-gpt.patch b/util-linux-2.13-fdisk-gpt.patch index 76eedd5..03c6ca9 100644 --- a/util-linux-2.13-fdisk-gpt.patch +++ b/util-linux-2.13-fdisk-gpt.patch @@ -1,5 +1,5 @@ ---- util-linux-2.13-pre4/fdisk/fdisk.c.gpt 2005-10-07 18:40:26.000000000 +0200 -+++ util-linux-2.13-pre4/fdisk/fdisk.c 2005-10-07 18:40:26.000000000 +0200 +--- util-linux-2.13-pre6/fdisk/fdisk.c.gpt 2005-11-24 15:30:36.000000000 +0100 ++++ util-linux-2.13-pre6/fdisk/fdisk.c 2005-11-24 15:30:36.000000000 +0100 @@ -34,6 +34,8 @@ #include #endif @@ -57,8 +57,8 @@ get_boot(fdisk); if (osf_label) { ---- /dev/null 2005-10-07 17:17:17.781101976 +0200 -+++ util-linux-2.13-pre4/fdisk/gpt.h 2005-10-07 18:40:26.000000000 +0200 +--- /dev/null 2005-11-14 15:52:26.044616250 +0100 ++++ util-linux-2.13-pre6/fdisk/gpt.h 2005-11-24 15:30:36.000000000 +0100 @@ -0,0 +1,9 @@ + +#ifndef __GPT_H__ @@ -69,12 +69,12 @@ + +#endif /* __GPT_H__ */ + ---- util-linux-2.13-pre4/fdisk/Makefile.am.gpt 2005-09-12 20:55:27.000000000 +0200 -+++ util-linux-2.13-pre4/fdisk/Makefile.am 2005-10-07 18:46:57.000000000 +0200 +--- util-linux-2.13-pre6/fdisk/Makefile.am.gpt 2005-10-16 14:12:52.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/Makefile.am 2005-11-24 15:31:42.000000000 +0100 @@ -5,13 +5,13 @@ sbin_PROGRAMS = fdisk man_MANS = fdisk.8 - fdisk_SOURCES = fdisk.c llseek.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ + fdisk_SOURCES = fdisk.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ - fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c + fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c gpt.c @@ -87,8 +87,8 @@ if USE_SLANG sbin_PROGRAMS += cfdisk ---- util-linux-2.13-pre4/fdisk/fdisk.8.gpt 2005-10-07 18:40:26.000000000 +0200 -+++ util-linux-2.13-pre4/fdisk/fdisk.8 2005-10-07 18:40:26.000000000 +0200 +--- util-linux-2.13-pre6/fdisk/fdisk.8.gpt 2005-11-24 15:30:36.000000000 +0100 ++++ util-linux-2.13-pre6/fdisk/fdisk.8 2005-11-24 15:30:36.000000000 +0100 @@ -42,6 +42,11 @@ partition tables. It understands DOS type partition tables and BSD or SUN type disklabels. @@ -101,8 +101,8 @@ The .I device is usually one of the following: ---- util-linux-2.13-pre4/fdisk/sfdisk.8.gpt 2004-12-31 17:28:30.000000000 +0100 -+++ util-linux-2.13-pre4/fdisk/sfdisk.8 2005-10-07 18:40:26.000000000 +0200 +--- util-linux-2.13-pre6/fdisk/sfdisk.8.gpt 2004-12-31 17:28:30.000000000 +0100 ++++ util-linux-2.13-pre6/fdisk/sfdisk.8 2005-11-24 15:30:36.000000000 +0100 @@ -18,6 +18,11 @@ on a device, check the partitions on a device, and - very dangerous - repartition a device. @@ -115,8 +115,8 @@ .SS "List Sizes" .BI "sfdisk \-s " partition gives the size of ---- /dev/null 2005-10-07 17:17:17.781101976 +0200 -+++ util-linux-2.13-pre4/fdisk/gpt.c 2005-10-07 18:40:26.000000000 +0200 +--- /dev/null 2005-11-14 15:52:26.044616250 +0100 ++++ util-linux-2.13-pre6/fdisk/gpt.c 2005-11-24 15:30:36.000000000 +0100 @@ -0,0 +1,287 @@ +/* + GPT (GUID Partition Table) signature detection. Based on libparted and @@ -405,8 +405,8 @@ + exit(EXIT_SUCCESS); +} +#endif ---- util-linux-2.13-pre4/fdisk/sfdisk.c.gpt 2005-08-14 17:14:18.000000000 +0200 -+++ util-linux-2.13-pre4/fdisk/sfdisk.c 2005-10-07 18:40:26.000000000 +0200 +--- util-linux-2.13-pre6/fdisk/sfdisk.c.gpt 2005-10-16 14:18:32.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/sfdisk.c 2005-11-24 15:30:36.000000000 +0100 @@ -50,6 +50,8 @@ #include "nls.h" #include "common.h" @@ -416,7 +416,7 @@ #define SIZE(a) (sizeof(a)/sizeof(a[0])) /* -@@ -2476,6 +2478,23 @@ +@@ -2457,6 +2459,23 @@ return NULL; } @@ -440,7 +440,7 @@ static void do_list(char *dev, int silent); static void do_size(char *dev, int silent); static void do_geom(char *dev, int silent); -@@ -2621,6 +2640,7 @@ +@@ -2602,6 +2621,7 @@ while ((dev = nextproc()) != NULL) { if (is_ide_cdrom_or_tape(dev)) continue; @@ -448,7 +448,7 @@ if (opt_out_geom) do_geom(dev, 1); if (opt_out_pt_geom) -@@ -2648,6 +2668,7 @@ +@@ -2629,6 +2649,7 @@ if (opt_list || opt_out_geom || opt_out_pt_geom || opt_size || verify) { while (optind < argc) { @@ -456,7 +456,7 @@ if (opt_out_geom) do_geom(argv[optind], 0); if (opt_out_pt_geom) -@@ -2676,6 +2697,7 @@ +@@ -2657,6 +2678,7 @@ fatal(_("usage: sfdisk --change-id device partition-number Id\n")); else if (optind != argc-3 && optind != argc-2) fatal(_("usage: sfdisk --id device partition-number [Id]\n")); @@ -464,7 +464,7 @@ do_change_id(argv[optind], argv[optind+1], (optind == argc-2) ? 0 : argv[optind+2]); exit(exit_status); -@@ -2685,6 +2707,8 @@ +@@ -2666,6 +2688,8 @@ fatal(_("can specify only one device (except with -l or -s)\n")); dev = argv[optind]; @@ -473,7 +473,7 @@ if (opt_reread) do_reread(dev); else if (restore_sector_file) -@@ -2861,6 +2885,8 @@ +@@ -2842,6 +2866,8 @@ z = &oldp; @@ -482,7 +482,7 @@ rw = (!no_write && (arg || ac > 1)); fd = my_open(dev, rw, 0); -@@ -2934,6 +2960,8 @@ +@@ -2943,6 +2969,8 @@ z = &oldp; diff --git a/util-linux.spec b/util-linux.spec index d02869f..5d45d48 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.10.pre5 +Release: 0.11.pre6 License: distributable Group: System Environment/Base @@ -43,8 +43,8 @@ BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel >= 1.0.6 ### Sources -# TODO [stable]: s/2.13-pre5/%{version}/ -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre5.tar.bz2 +# TODO [stable]: s/2.13-pre6/%{version}/ +Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre6.tar.bz2 Source1: util-linux-selinux.pamd Source2: util-linux-chsh-chfn.pamd Source8: nologin.c @@ -157,8 +157,11 @@ Patch215: util-linux-2.13-audit-login.patch Patch216: util-linux-2.13-ipcs-shmax.patch # 171337 - mkfs.cramfs dies creating installer image Patch217: util-linux-2.13-cramfs-maxentries.patch -# [171337 too] - mkfs.cramfs doesn't work correctly with empty files +# [also 171337] - mkfs.cramfs doesn't work correctly with empty files Patch218: util-linux-2.13-cramfs-zerofiles.patch +# 172203 - mount man page in RHEL4 lacks any info on cifs mount options +Patch219: util-linux-2.12a-mount-man-cifs.patch + # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -172,9 +175,9 @@ program. %prep # TODO [stable]: remove -n -%setup -q -a 11 -n util-linux-2.13-pre5 +%setup -q -a 11 -n util-linux-2.13-pre6 -%patch1 -p1 -b .moretc +%patch1 -p1 %patch70 -p1 # nologin cp %{SOURCE8} %{SOURCE9} . @@ -184,7 +187,7 @@ cp %{SOURCE8} %{SOURCE9} . %if %{include_raw} %patch109 -p1 %endif -%patch113 -p1 -b .ctty3 +%patch113 -p1 %patch120 -p1 %patch126 -p1 %patch128 -p1 @@ -194,20 +197,20 @@ cp %{SOURCE8} %{SOURCE9} . %patch150 -p0 %patch151 -p1 %patch153 -p1 -%patch157 -p1 -b .pamstart -%patch159 -p1 -b .console +%patch157 -p1 +%patch159 -p1 %if %{include_raw} %patch160 -p1 %endif %patch164 -p1 -%patch170 -p1 -b .nfsv4 +%patch170 -p1 %patch171 -p1 %patch172 -p1 %patch173 -p1 %patch174 -p1 -%patch180 -p1 -b .lastlog +%patch180 -p1 %patch181 -p1 -%patch182 -p1 -b .typo +%patch182 -p1 %patch183 -p1 %patch184 -p1 %patch185 -p1 @@ -215,21 +218,21 @@ cp %{SOURCE8} %{SOURCE9} . %patch187 -p1 %patch188 -p1 %patch189 -p1 -%patch202 -p1 -b .audit -%patch203 -p1 -b .gpt +%patch202 -p1 +%patch203 -p1 %patch204 -p1 %patch205 -p1 -%patch206 -p1 -b .arch -%patch210 -p1 -b .swsuspend +%patch206 -p1 +%patch210 -p1 %patch211 -p1 %patch212 -p1 %patch213 -p1 %patch214 -p1 -# audit %patch215 -p1 %patch216 -p1 %patch217 -p1 %patch218 -p1 +%patch219 -p1 %build unset LINGUAS || : @@ -613,6 +616,10 @@ fi /sbin/losetup %changelog +* 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 From a02d0945d45136dc98983802a1c89f919d4338e9 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 9 Dec 2005 22:43:43 +0000 Subject: [PATCH 030/425] gcc update bump --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5d45d48..995e593 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.11.pre6 +Release: 0.11.pre6.1 License: distributable Group: System Environment/Base @@ -616,6 +616,9 @@ fi /sbin/losetup %changelog +* 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 From bc67171fe0b4f3583de5fa3e83ff818016f96c79 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Dec 2005 16:28:43 +0000 Subject: [PATCH 031/425] release number cleanup --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 995e593..5aa68bf 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.11.pre6.1 +Release: 0.12 License: distributable Group: System Environment/Base @@ -616,6 +616,9 @@ fi /sbin/losetup %changelog +* Mon Dec 12 2005 Karel Zak 2.13-0.12 +- rebuilt + * Fri Dec 09 2005 Jesse Keating - rebuilt From 632f4946d17fff0b007ec9364ae3abadf256ef31 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 3 Jan 2006 17:50:20 +0000 Subject: [PATCH 032/425] col and cal wide chars fix, 'mount -o loop' fix --- util-linux-2.12p-cal-wide.patch | 53 +++++++++++++++++++++++ util-linux-2.12p-col-EILSEQ.patch | 37 ++++++++++++++++ util-linux-2.13-audit-hwclock.patch | 2 +- util-linux-2.13-mount-twiceloop.patch | 62 +++++++++++++++++++++++++++ util-linux.spec | 18 +++++++- 5 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 util-linux-2.12p-cal-wide.patch create mode 100644 util-linux-2.12p-col-EILSEQ.patch create mode 100644 util-linux-2.13-mount-twiceloop.patch diff --git a/util-linux-2.12p-cal-wide.patch b/util-linux-2.12p-cal-wide.patch new file mode 100644 index 0000000..8440e53 --- /dev/null +++ b/util-linux-2.12p-cal-wide.patch @@ -0,0 +1,53 @@ +--- util-linux-2.12p/misc-utils/cal.c.wide 2004-12-05 20:20:36.000000000 +0100 ++++ util-linux-2.12p/misc-utils/cal.c 2006-01-02 15:13:50.000000000 +0100 +@@ -368,7 +368,7 @@ + int i, wd; + #ifdef ENABLE_WIDECHAR + wchar_t day_headings_wc[22],j_day_headings_wc[29]; +- wchar_t wd_wc[10]; ++ char *cur_dh = day_headings, *cur_j_dh = j_day_headings; + #endif + + strcpy(day_headings,""); +@@ -385,30 +385,25 @@ + #endif + + for(i = 0 ; i < 7 ; i++ ) { ++ ssize_t space_left; + wd = (i + week1stday) % 7; + #ifdef ENABLE_WIDECHAR +- mbstowcs(wd_wc,weekday(wd),10); +- if (wcswidth(wd_wc,10) < 3) +- wcscat(j_day_headings_wc,L" "); +- if (wcswidth(wd_wc,10) < 2) { +- wcscat(day_headings_wc, L" "); +- wcscat(j_day_headings_wc, L" "); +- } +- wcsncat(day_headings_wc,wd_wc,2); +- wcsncat(j_day_headings_wc,wd_wc,3); +- wcscat(day_headings_wc, L" "); +- wcscat(j_day_headings_wc, L" "); ++ swprintf(day_headings_wc, sizeof(day_headings_wc)/sizeof(day_headings_wc[0]), ++ L"%1.2s ", weekday(wd)); ++ swprintf(j_day_headings_wc, sizeof(j_day_headings_wc)/sizeof(j_day_headings_wc[0]), ++ L"%3.3s ", weekday(wd)); ++ space_left = sizeof(day_headings)-(cur_dh-day_headings); ++ if(space_left <= 0) break; ++ cur_dh += wcstombs(cur_dh,day_headings_wc, space_left); ++ space_left = sizeof(j_day_headings)-(cur_j_dh-j_day_headings); ++ if(space_left <= 0) break; ++ cur_j_dh += wcstombs(cur_j_dh,j_day_headings_wc, space_left); + #else + sprintf(eos(day_headings), "%2.2s ", weekday(wd)); + sprintf(eos(j_day_headings), "%3.3s ", weekday(wd)); + #endif + } + +-#ifdef ENABLE_WIDECHAR +- wcstombs(day_headings,day_headings_wc,sizeof(day_headings)); +- wcstombs(j_day_headings,j_day_headings_wc,sizeof(j_day_headings)); +-#endif +- + trim_trailing_spaces(day_headings); + trim_trailing_spaces(j_day_headings); + #undef weekday diff --git a/util-linux-2.12p-col-EILSEQ.patch b/util-linux-2.12p-col-EILSEQ.patch new file mode 100644 index 0000000..4dda976 --- /dev/null +++ b/util-linux-2.12p-col-EILSEQ.patch @@ -0,0 +1,37 @@ +--- util-linux-2.12p/text-utils/col.c.EILSEQ 2002-03-09 00:05:12.000000000 +0100 ++++ util-linux-2.12p/text-utils/col.c 2006-01-02 18:00:06.000000000 +0100 +@@ -128,6 +128,7 @@ + int this_line; /* line l points to */ + int nflushd_lines; /* number of lines that were flushed */ + int adjust, opt, warned; ++ int ret = 0; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); +@@ -175,8 +176,15 @@ + cur_line = max_line = nflushd_lines = this_line = 0; + cur_set = last_set = CS_NORMAL; + lines = l = alloc_line(); +- +- while ((ch = getwchar()) != WEOF) { ++ ++ while (feof(stdin)==0) { ++ errno = 0; ++ if ((ch = getwchar()) == WEOF) { ++ if (errno==EILSEQ) ++ perror("col"); ++ ret = 1; ++ break; ++ } + if (!iswgraph(ch)) { + switch (ch) { + case BS: /* can't go back further */ +@@ -332,7 +340,7 @@ + flush_blanks(); + if (ferror(stdout) || fclose(stdout)) + return 1; +- return 0; ++ return ret; + } + + void flush_lines(int nflush) diff --git a/util-linux-2.13-audit-hwclock.patch b/util-linux-2.13-audit-hwclock.patch index 0aa5bfe..0173655 100644 --- a/util-linux-2.13-audit-hwclock.patch +++ b/util-linux-2.13-audit-hwclock.patch @@ -46,7 +46,7 @@ diff -urN util-linux-2.13-pre5.orig/hwclock/audit.c util-linux-2.13-pre5/hwclock +{ + if (audit_this) { + audit_log_user_message(audit_fd, AUDIT_USYS_CONFIG, -+ "changing system time", NULL, NULL, NULL, status); ++ "changing system time", NULL, NULL, NULL, status ? 0 : 1); + close(audit_fd); + } + exit(status); diff --git a/util-linux-2.13-mount-twiceloop.patch b/util-linux-2.13-mount-twiceloop.patch new file mode 100644 index 0000000..a82401a --- /dev/null +++ b/util-linux-2.13-mount-twiceloop.patch @@ -0,0 +1,62 @@ +--- util-linux-2.13-pre6/mount/fstab.c.twiceloop 2006-01-03 18:35:05.000000000 +0100 ++++ util-linux-2.13-pre6/mount/fstab.c 2006-01-03 18:37:44.000000000 +0100 +@@ -254,6 +254,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-2.13-pre6/mount/mount.c.twiceloop 2006-01-03 18:35:06.000000000 +0100 ++++ util-linux-2.13-pre6/mount/mount.c 2006-01-03 18:37:44.000000000 +0100 +@@ -671,7 +671,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; + +@@ -709,6 +709,11 @@ + } else { + int loopro = (*flags & MS_RDONLY); + ++ if (is_mounted_same_loopfile(*loopfile, dir)) { ++ error(_("mount: %s already mounted on %s"), *loopfile, dir); ++ return EX_FAIL; ++ } ++ + if (!*loopdev || !**loopdev) + *loopdev = find_unused_loop_device(); + if (!*loopdev) +@@ -856,7 +861,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.spec b/util-linux.spec index 5aa68bf..335bb9f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.12 +Release: 0.13 License: distributable Group: System Environment/Base @@ -161,7 +161,12 @@ Patch217: util-linux-2.13-cramfs-maxentries.patch Patch218: util-linux-2.13-cramfs-zerofiles.patch # 172203 - mount man page in RHEL4 lacks any info on cifs mount options Patch219: util-linux-2.12a-mount-man-cifs.patch - +# better wide chars usage in the cal command (based on the old 'moremisc' patch) +Patch220: util-linux-2.12p-cal-wide.patch +# 176441: col truncates data +Patch221: util-linux-2.12p-col-EILSEQ.patch +# 174111 - mount allows loopback devices to be mounted more than once to the same mount point +Patch222: util-linux-2.13-mount-twiceloop.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -233,6 +238,9 @@ cp %{SOURCE8} %{SOURCE9} . %patch217 -p1 %patch218 -p1 %patch219 -p1 +%patch220 -p1 +%patch221 -p1 +%patch222 -p1 %build unset LINGUAS || : @@ -616,6 +624,12 @@ fi /sbin/losetup %changelog +* 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 From c1ba4e88315cf35e602d6fd0058e1c464eed1c64 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 20 Jan 2006 03:19:45 +0000 Subject: [PATCH 033/425] 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. --- util-linux.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 335bb9f..300bd79 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.13 +Release: 0.14 License: distributable Group: System Environment/Base @@ -624,6 +624,11 @@ fi /sbin/losetup %changelog +* 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 From 0d5efa96b2146d1e7175032ee32cf07bb6f8e722 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 7 Feb 2006 14:11:38 +0000 Subject: [PATCH 034/425] bump for new gcc/glibc --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 300bd79..27835ed 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.14 +Release: 0.14.1 License: distributable Group: System Environment/Base @@ -624,6 +624,9 @@ fi /sbin/losetup %changelog +* 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 From 4bd72069fd42ea9ba6231dcccd0a159de832eb63 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 8 Feb 2006 19:24:29 +0000 Subject: [PATCH 035/425] - add "blockdev --rmpart N " and "blockdev --rmparts " --- util-linux-2.13-rmparts.patch | 105 ++++++++++++++++++++++++++++++++++ util-linux.spec | 8 ++- 2 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-rmparts.patch diff --git a/util-linux-2.13-rmparts.patch b/util-linux-2.13-rmparts.patch new file mode 100644 index 0000000..128337d --- /dev/null +++ b/util-linux-2.13-rmparts.patch @@ -0,0 +1,105 @@ +--- util-linux-2.13-pre6/disk-utils/blockdev.c.rmparts 2006-02-08 14:10:48.000000000 -0500 ++++ util-linux-2.13-pre6/disk-utils/blockdev.c 2006-02-08 14:19:31.000000000 -0500 +@@ -29,6 +29,28 @@ + #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 ++ ++struct blkpg_partition { ++ long long start; ++ long long length; ++ long long pno; ++ char devname[BLKPG_DEVNAMELTH]; ++ char volname[BLKPG_VOLNAMELTH]; ++}; ++ ++struct blkpg_ioctl_arg { ++ int op; ++ int flags; ++ int datalen; ++ void *data; ++}; ++#endif ++ + /* Maybe could be included */ + #ifndef HDIO_GETGEO + #define HDIO_GETGEO 0x0301 +@@ -93,6 +115,10 @@ + { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, + N_("reread partition table") }, + #endif ++#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])) +@@ -144,6 +170,35 @@ + return 0; + } + ++#ifdef BLKPG ++static int ++disable_partition(int fd, int partno) { ++ struct blkpg_partition part = { ++ .pno = partno, ++ }; ++ struct blkpg_ioctl_arg io = { ++ .op = BLKPG_DEL_PARTITION, ++ .datalen = sizeof(part), ++ .data = &part, ++ }; ++ 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); +@@ -259,6 +314,12 @@ + 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: +@@ -276,6 +337,13 @@ + 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.spec b/util-linux.spec index 27835ed..2cd966c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.14.1 +Release: 0.15 License: distributable Group: System Environment/Base @@ -167,6 +167,8 @@ Patch220: util-linux-2.12p-cal-wide.patch Patch221: util-linux-2.12p-col-EILSEQ.patch # 174111 - mount allows loopback devices to be mounted more than once to the same mount point Patch222: util-linux-2.13-mount-twiceloop.patch +# nobug - add --rmpart N and --rmparts +Patch223: util-linux-2.13-rmparts.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -241,6 +243,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch220 -p1 %patch221 -p1 %patch222 -p1 +%patch223 -p1 %build unset LINGUAS || : @@ -624,6 +627,9 @@ fi /sbin/losetup %changelog +* 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 From 066e7b4604926f4fe2a7f2fa92a8c072d0669685 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 11 Feb 2006 05:56:30 +0000 Subject: [PATCH 036/425] bump for bug in double-long on ppc(64) --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 2cd966c..bccfc9d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.15 +Release: 0.15.1 License: distributable Group: System Environment/Base @@ -627,6 +627,9 @@ fi /sbin/losetup %changelog +* 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 " From bfef8444516141fede866c929e540ef90b16c9d7 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 21 Feb 2006 21:28:13 +0000 Subject: [PATCH 037/425] fix col-EILSEQ.patch --- util-linux-2.12p-col-EILSEQ.patch | 13 +++++++------ util-linux.spec | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/util-linux-2.12p-col-EILSEQ.patch b/util-linux-2.12p-col-EILSEQ.patch index 4dda976..ef58ad4 100644 --- a/util-linux-2.12p-col-EILSEQ.patch +++ b/util-linux-2.12p-col-EILSEQ.patch @@ -1,5 +1,5 @@ ---- util-linux-2.12p/text-utils/col.c.EILSEQ 2002-03-09 00:05:12.000000000 +0100 -+++ util-linux-2.12p/text-utils/col.c 2006-01-02 18:00:06.000000000 +0100 +--- util-linux-2.13-pre6/text-utils/col.c.kzak 2002-03-09 00:05:12.000000000 +0100 ++++ util-linux-2.13-pre6/text-utils/col.c 2006-02-21 22:25:48.000000000 +0100 @@ -128,6 +128,7 @@ int this_line; /* line l points to */ int nflushd_lines; /* number of lines that were flushed */ @@ -8,7 +8,7 @@ setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); -@@ -175,8 +176,15 @@ +@@ -175,8 +176,16 @@ cur_line = max_line = nflushd_lines = this_line = 0; cur_set = last_set = CS_NORMAL; lines = l = alloc_line(); @@ -18,15 +18,16 @@ + while (feof(stdin)==0) { + errno = 0; + if ((ch = getwchar()) == WEOF) { -+ if (errno==EILSEQ) ++ if (errno==EILSEQ) { + perror("col"); -+ ret = 1; ++ ret = 1; ++ } + break; + } if (!iswgraph(ch)) { switch (ch) { case BS: /* can't go back further */ -@@ -332,7 +340,7 @@ +@@ -332,7 +341,7 @@ flush_blanks(); if (ferror(stdout) || fclose(stdout)) return 1; diff --git a/util-linux.spec b/util-linux.spec index bccfc9d..823171a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.15.1 +Release: 0.16 License: distributable Group: System Environment/Base @@ -627,6 +627,9 @@ fi /sbin/losetup %changelog +* Tue Feb 21 2006 Karel Zak 2.13-0.16 +- fix #180730 - col is exiting with 1 (fix util-linux-2.12p-col-EILSEQ.patch) + * Fri Feb 10 2006 Jesse Keating - 2.13-0.15.1 - bump again for double-long bug on ppc(64) From 5896f9a7e5e98d370df445e0d18d312469226898 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 23 Feb 2006 14:19:40 +0000 Subject: [PATCH 038/425] update 2.13-0.16 --- util-linux-2.13-login-pam-acct.patch | 31 ++++++++++++++ util-linux-2.13-mkswap-selinux.patch | 60 ++++++++++++++++++++++++++++ util-linux-2.13-schedutils-man.patch | 22 ++++++++++ util-linux-2.13-umount-sysfs.patch | 11 +++++ util-linux.spec | 22 +++++++++- 5 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-login-pam-acct.patch create mode 100644 util-linux-2.13-mkswap-selinux.patch create mode 100644 util-linux-2.13-schedutils-man.patch create mode 100644 util-linux-2.13-umount-sysfs.patch diff --git a/util-linux-2.13-login-pam-acct.patch b/util-linux-2.13-login-pam-acct.patch new file mode 100644 index 0000000..24fba08 --- /dev/null +++ b/util-linux-2.13-login-pam-acct.patch @@ -0,0 +1,31 @@ +--- util-linux-2.13-pre6/login-utils/login.c.acct 2006-02-22 21:43:03.000000000 +0100 ++++ util-linux-2.13-pre6/login-utils/login.c 2006-02-22 21:57:55.000000000 +0100 +@@ -602,16 +602,22 @@ + pam_end(pamh, retcode); + exit(0); + } ++ } + +- retcode = pam_acct_mgmt(pamh, 0); +- +- if(retcode == PAM_NEW_AUTHTOK_REQD) { +- retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); +- } ++ /* ++ * Authentication may be skipped (for example, during krlogin, rlogin, etc...), ++ * but it doesn't mean that we can skip other account checks. The account ++ * could be disabled or password expired (althought kerberos ticket is valid). ++ * -- kzak@redhat.com (22-Feb-2006) ++ */ ++ retcode = pam_acct_mgmt(pamh, 0); + +- PAM_FAIL_CHECK; ++ if(retcode == PAM_NEW_AUTHTOK_REQD) { ++ retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); + } + ++ PAM_FAIL_CHECK; ++ + /* + * Grab the user information out of the password file for future usage + * First get the username that we are actually using, though. diff --git a/util-linux-2.13-mkswap-selinux.patch b/util-linux-2.13-mkswap-selinux.patch new file mode 100644 index 0000000..599c776 --- /dev/null +++ b/util-linux-2.13-mkswap-selinux.patch @@ -0,0 +1,60 @@ +--- util-linux-2.13-pre6/disk-utils/mkswap.c.selinux 2006-02-22 14:07:47.000000000 +0100 ++++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-02-22 15:16:05.000000000 +0100 +@@ -39,6 +39,8 @@ + #include /* for _IO */ + #include + #include ++#include ++#include + #include "swapheader.h" + #include "xstrncpy.h" + #include "nls.h" +@@ -76,6 +78,8 @@ + + #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) + ++#define SELINUX_SWAPFILE_LABEL "swapfile_t" ++ + static int + linux_version_code(void) { + struct utsname my_utsname; +@@ -718,5 +722,30 @@ + if (fsync(DEV)) + die(_("fsync failed")); + #endif ++ ++ if (S_ISREG(statbuf.st_mode)) { ++ char *context = NULL; ++ ++ if (fgetfilecon(DEV, &context) < 0) { ++ if (errno == ENODATA) { ++ context = NULL; ++ } else { ++ perror(device_name); ++ die(_("unable to obtain selinux file label")); ++ return 0; ++ } ++ } ++ if (context==NULL || strcmp(context, SELINUX_SWAPFILE_LABEL)) { ++ if (fsetfilecon(DEV, SELINUX_SWAPFILE_LABEL)) { ++ fprintf(stderr, "%s: unable to relabel %s to %s: %s\n", ++ program_name, device_name, ++ SELINUX_SWAPFILE_LABEL, ++ strerror(errno)); ++ exit(1); ++ } ++ } ++ if (context) ++ freecon(context); ++ } + return 0; + } +--- util-linux-2.13-pre6/disk-utils/Makefile.am.selinux 2006-02-22 15:23:00.000000000 +0100 ++++ util-linux-2.13-pre6/disk-utils/Makefile.am 2006-02-22 15:23:09.000000000 +0100 +@@ -31,5 +31,5 @@ + endif + + if HAVE_UUID +-mkswap_LDADD = -luuid ++mkswap_LDADD = -luuid -lselinux + endif diff --git a/util-linux-2.13-schedutils-man.patch b/util-linux-2.13-schedutils-man.patch new file mode 100644 index 0000000..a5b7e31 --- /dev/null +++ b/util-linux-2.13-schedutils-man.patch @@ -0,0 +1,22 @@ +--- util-linux-2.13-pre6/schedutils/taskset.1.kzak 2006-02-22 16:10:26.000000000 +0100 ++++ util-linux-2.13-pre6/schedutils/taskset.1 2006-02-22 16:10:38.000000000 +0100 +@@ -82,7 +82,7 @@ + .SH USAGE + .TP + The default behavior is to run a new command with a given affinity mask: +-taskset [mask] -- [command] [arguments] ++taskset [mask] [command] [arguments] + .TP + You can also retrieve the CPU affinity of an existing task: + taskset -p [pid] +--- util-linux-2.13-pre6/schedutils/chrt.1.kzak 2006-02-22 16:09:02.000000000 +0100 ++++ util-linux-2.13-pre6/schedutils/chrt.1 2006-02-22 16:09:22.000000000 +0100 +@@ -72,7 +72,7 @@ + .SH USAGE + .TP + The default behavior is to run a new command:: +-chrt [prio] -- [command] [arguments] ++chrt [prio] [command] [arguments] + .TP + You can also retrieve the real-time attributes of an existing task: + chrt -p [pid] diff --git a/util-linux-2.13-umount-sysfs.patch b/util-linux-2.13-umount-sysfs.patch new file mode 100644 index 0000000..0d2d9f0 --- /dev/null +++ b/util-linux-2.13-umount-sysfs.patch @@ -0,0 +1,11 @@ +--- util-linux-2.13-pre6/mount/umount.c.sysfs 2006-02-23 10:09:53.000000000 +0100 ++++ util-linux-2.13-pre6/mount/umount.c 2006-02-23 10:10:39.000000000 +0100 +@@ -734,7 +734,7 @@ + if (all) { + /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ + if (types == NULL) +- types = "noproc,nodevfs,nodevpts"; ++ types = "noproc,nodevfs,nodevpts,nosysfs"; + result = umount_all (types, test_opts); + } else if (argc < 1) { + usage (stderr, 2); diff --git a/util-linux.spec b/util-linux.spec index 823171a..e6efc28 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -169,6 +169,16 @@ Patch221: util-linux-2.12p-col-EILSEQ.patch Patch222: util-linux-2.13-mount-twiceloop.patch # nobug - add --rmpart N and --rmparts Patch223: util-linux-2.13-rmparts.patch +# 181782 - mkswap should automatically add selinux label to swapfile +Patch224: util-linux-2.13-mkswap-selinux.patch +# 181896 - broken example in man pages +Patch225: util-linux-2.13-schedutils-man.patch +# 177331 - login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped. +Patch226: util-linux-2.13-login-pam-acct.patch +# 177523 - umount -a should not unmount sysfs +Patch227: util-linux-2.13-umount-sysfs.patch +# 182553 - fdisk -l inside xen guest shows no disks +Patch228: util-linux-2.13-fdisk-xvd.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -244,6 +254,11 @@ cp %{SOURCE8} %{SOURCE9} . %patch221 -p1 %patch222 -p1 %patch223 -p1 +%patch224 -p1 +%patch225 -p1 +%patch226 -p1 +%patch227 -p1 +%patch228 -p1 %build unset LINGUAS || : @@ -627,8 +642,13 @@ fi /sbin/losetup %changelog -* Tue Feb 21 2006 Karel Zak 2.13-0.16 +* 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) From 7eb3b23957d500e4e415f0e418a7f7a141e50c55 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 8 Mar 2006 17:04:47 +0000 Subject: [PATCH 039/425] fix mkswap selinux patch --- util-linux-2.13-mkswap-selinux.patch | 71 ++++++++++++++++++---------- util-linux.spec | 7 ++- 2 files changed, 51 insertions(+), 27 deletions(-) diff --git a/util-linux-2.13-mkswap-selinux.patch b/util-linux-2.13-mkswap-selinux.patch index 599c776..b7b97b7 100644 --- a/util-linux-2.13-mkswap-selinux.patch +++ b/util-linux-2.13-mkswap-selinux.patch @@ -1,60 +1,81 @@ ---- util-linux-2.13-pre6/disk-utils/mkswap.c.selinux 2006-02-22 14:07:47.000000000 +0100 -+++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-02-22 15:16:05.000000000 +0100 -@@ -39,6 +39,8 @@ +--- util-linux-2.13-pre6/disk-utils/mkswap.c.selinux 2005-08-14 17:34:49.000000000 +0200 ++++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-03-08 16:35:08.000000000 +0100 +@@ -39,6 +39,12 @@ #include /* for _IO */ #include #include +#include ++#ifdef HAVE_LIBSELINUX +#include ++#include ++#endif ++ #include "swapheader.h" #include "xstrncpy.h" #include "nls.h" -@@ -76,6 +78,8 @@ +@@ -76,6 +82,8 @@ #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) -+#define SELINUX_SWAPFILE_LABEL "swapfile_t" ++#define SELINUX_SWAPFILE_TYPE "swapfile_t" + static int linux_version_code(void) { struct utsname my_utsname; -@@ -718,5 +722,30 @@ +@@ -718,5 +726,39 @@ if (fsync(DEV)) die(_("fsync failed")); #endif + -+ if (S_ISREG(statbuf.st_mode)) { -+ char *context = NULL; ++#ifdef HAVE_LIBSELINUX ++ if (S_ISREG(statbuf.st_mode) && is_selinux_enabled()) { ++ security_context_t context_string; ++ security_context_t oldcontext; ++ context_t newcontext; + -+ if (fgetfilecon(DEV, &context) < 0) { -+ if (errno == ENODATA) { -+ context = NULL; -+ } else { -+ perror(device_name); -+ die(_("unable to obtain selinux file label")); -+ return 0; -+ } ++ if ((fgetfilecon(DEV, &oldcontext) < 0) && ++ (errno != ENODATA)) { ++ fprintf(stderr, "%s: %s: unable to obtain selinux file label: %s\n", ++ program_name, device_name, ++ strerror(errno)); ++ exit(1); + } -+ if (context==NULL || strcmp(context, SELINUX_SWAPFILE_LABEL)) { -+ if (fsetfilecon(DEV, SELINUX_SWAPFILE_LABEL)) { ++ if (!(newcontext = context_new(oldcontext))) ++ die(_("unable to create new selinux context")); ++ if (context_type_set(newcontext, SELINUX_SWAPFILE_TYPE)) ++ die(_("couldn't compute selinux context")); ++ ++ context_string = context_str(newcontext); ++ ++ if (strcmp(context_string, oldcontext)!=0) { ++ if (fsetfilecon(DEV, context_string)) { + fprintf(stderr, "%s: unable to relabel %s to %s: %s\n", + program_name, device_name, -+ SELINUX_SWAPFILE_LABEL, ++ context_string, + strerror(errno)); + exit(1); + } + } -+ if (context) -+ freecon(context); ++ context_free(newcontext); ++ freecon(oldcontext); + } ++#endif return 0; } ---- util-linux-2.13-pre6/disk-utils/Makefile.am.selinux 2006-02-22 15:23:00.000000000 +0100 -+++ util-linux-2.13-pre6/disk-utils/Makefile.am 2006-02-22 15:23:09.000000000 +0100 -@@ -31,5 +31,5 @@ +--- util-linux-2.13-pre6/disk-utils/Makefile.am.selinux 2005-09-10 19:46:10.000000000 +0200 ++++ util-linux-2.13-pre6/disk-utils/Makefile.am 2006-03-08 16:27:03.000000000 +0100 +@@ -30,6 +30,13 @@ + mkfs_cramfs_LDADD = -lz $(top_srcdir)/lib/libmd5.a endif ++mkswap_LDADD = ++ if HAVE_UUID -mkswap_LDADD = -luuid -+mkswap_LDADD = -luuid -lselinux ++mkswap_LDADD += -luuid ++endif ++ ++if HAVE_SELINUX ++mkswap_LDADD += -lselinux endif ++ diff --git a/util-linux.spec b/util-linux.spec index e6efc28..61fa822 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.16 +Release: 0.17 License: distributable Group: System Environment/Base @@ -254,7 +254,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch221 -p1 %patch222 -p1 %patch223 -p1 -%patch224 -p1 +%patch224 -p1 -b .selinux %patch225 -p1 %patch226 -p1 %patch227 -p1 @@ -642,6 +642,9 @@ fi /sbin/losetup %changelog +* 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) From bd3a2b8451b83d535441b8d915fb23e7e8c1b3dd Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 9 Mar 2006 10:47:44 +0000 Subject: [PATCH 040/425] cosmetic change to mkswap selinux patch --- util-linux-2.13-mkswap-selinux.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux-2.13-mkswap-selinux.patch b/util-linux-2.13-mkswap-selinux.patch index b7b97b7..2d89115 100644 --- a/util-linux-2.13-mkswap-selinux.patch +++ b/util-linux-2.13-mkswap-selinux.patch @@ -35,7 +35,7 @@ + + if ((fgetfilecon(DEV, &oldcontext) < 0) && + (errno != ENODATA)) { -+ fprintf(stderr, "%s: %s: unable to obtain selinux file label: %s\n", ++ fprintf(stderr, _("%s: %s: unable to obtain selinux file label: %s\n"), + program_name, device_name, + strerror(errno)); + exit(1); @@ -49,7 +49,7 @@ + + if (strcmp(context_string, oldcontext)!=0) { + if (fsetfilecon(DEV, context_string)) { -+ fprintf(stderr, "%s: unable to relabel %s to %s: %s\n", ++ fprintf(stderr, _("%s: unable to relabel %s to %s: %s\n"), + program_name, device_name, + context_string, + strerror(errno)); From b682e2d2a51959e6f5c3d1dea74d7f18d7a93aa8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 9 Mar 2006 22:18:56 +0000 Subject: [PATCH 041/425] restorecon /var/log/lastlog --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 61fa822..17c3911 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.17 +Release: 0.18 License: distributable Group: System Environment/Base @@ -449,6 +449,7 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir touch /var/log/lastlog chown root:root /var/log/lastlog chmod 0644 /var/log/lastlog +[ -x /sbin/restorecon ] && /sbin/restorecon /var/log/lastlog %postun if [ "$1" = 0 ]; then @@ -642,6 +643,9 @@ fi /sbin/losetup %changelog +* Wed Mar 10 2006 Jesse Keating 2.13-0.18 +- 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) From d031e23b3ac64506a5fa5525b957ee2031d63fac Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 9 Mar 2006 22:21:16 +0000 Subject: [PATCH 042/425] er, I'm not living in the future.... --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 17c3911..f1bb2d1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.18 +Release: 0.19 License: distributable Group: System Environment/Base @@ -643,7 +643,7 @@ fi /sbin/losetup %changelog -* Wed Mar 10 2006 Jesse Keating 2.13-0.18 +* Wed Mar 9 2006 Jesse Keating 2.13-0.19 - restorecon /var/log/lastlog * Wed Mar 8 2006 Karel Zak 2.13-0.17 From e0dfce74f4e88140ca33fe5a79785eaeea6f40b5 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 9 Mar 2006 22:51:31 +0000 Subject: [PATCH 043/425] cleanups suggested by notting. --- util-linux.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index f1bb2d1..7ecda71 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.19 +Release: 0.20 License: distributable Group: System Environment/Base @@ -63,6 +63,7 @@ Requires: pam >= 0.66-4, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 Conflicts: kernel < 2.2.12-7, Prereq: /sbin/install-info +Prereq: /sbin/restorecon Provides: mount = %{version} Provides: losetup = %{version} Provides: schedutils @@ -449,7 +450,7 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir touch /var/log/lastlog chown root:root /var/log/lastlog chmod 0644 /var/log/lastlog -[ -x /sbin/restorecon ] && /sbin/restorecon /var/log/lastlog +/sbin/restorecon /var/log/lastlog >/dev/null 2>&1 %postun if [ "$1" = 0 ]; then @@ -643,6 +644,10 @@ fi /sbin/losetup %changelog +* 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 From af241b07efa7df13325d587563c4ee8def4bd219 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 1 May 2006 14:56:50 +0000 Subject: [PATCH 044/425] Added 'noacl' mount flag 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). --- util-linux.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 7ecda71..6b3a3bc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -180,6 +180,12 @@ Patch226: util-linux-2.13-login-pam-acct.patch Patch227: util-linux-2.13-umount-sysfs.patch # 182553 - fdisk -l inside xen guest shows no disks Patch228: util-linux-2.13-fdisk-xvd.patch +# 169042 - Changed nfsmount to try udp before using tcp when rpc-ing +# the remote rpc.mountd (iff -o tcp is not specified). +Patch229: util-linux-2.13-nfsmount-mountd-udp.patch +# 151549 - Added 'noacl' mount flag +Patch230: util-linux-2.13-nfs-noacl.patch + # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -260,6 +266,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch226 -p1 %patch227 -p1 %patch228 -p1 +%patch229 -p1 +%patch230 -p1 %build unset LINGUAS || : @@ -644,6 +652,13 @@ fi /sbin/losetup %changelog +* Mon May 1 2006 Steve Dickson 2.13-0.21 +- 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 From fe1a51113f8c18278790a4e17b9e9583581baefd Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 1 May 2006 15:12:03 +0000 Subject: [PATCH 045/425] fix #183713 - foreground mounts are not retrying as advertised --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 6b3a3bc..6d1939d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.20 +Release: 0.21 License: distributable Group: System Environment/Base @@ -185,6 +185,8 @@ Patch228: util-linux-2.13-fdisk-xvd.patch Patch229: util-linux-2.13-nfsmount-mountd-udp.patch # 151549 - Added 'noacl' mount flag Patch230: util-linux-2.13-nfs-noacl.patch +# 183713 - foreground nfs mount timeout options to get hard mount semantic +Patch231: util-linux-2.13-nfsmount-retry.patch # When adding patches, please make sure that it is easy to find out what bug # the @@ -268,6 +270,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch228 -p1 %patch229 -p1 %patch230 -p1 +%patch231 -p1 %build unset LINGUAS || : @@ -653,6 +656,7 @@ fi %changelog * 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). From 4910c54bf1995647cf5d69d2acbc0db2adbe57e3 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 2 May 2006 11:09:09 +0000 Subject: [PATCH 046/425] - Added syslog logging to background mounts as suggested by a customer. --- util-linux.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 6d1939d..b6f539e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.21 +Release: 0.22 License: distributable Group: System Environment/Base @@ -187,6 +187,8 @@ Patch229: util-linux-2.13-nfsmount-mountd-udp.patch Patch230: util-linux-2.13-nfs-noacl.patch # 183713 - foreground nfs mount timeout options to get hard mount semantic Patch231: util-linux-2.13-nfsmount-retry.patch +# Adds syslog logging to background mounts +Patch232: util-linux-2.13-nfsmount-syslog.patch # When adding patches, please make sure that it is easy to find out what bug # the @@ -271,6 +273,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch229 -p1 %patch230 -p1 %patch231 -p1 +%patch232 -p1 %build unset LINGUAS || : @@ -655,6 +658,10 @@ fi /sbin/losetup %changelog +* 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 From f0dfcfacd7d8967ca499088efe45419e6d573a4f Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 24 May 2006 19:19:54 +0000 Subject: [PATCH 047/425] Fixed bug in patch for bz183713 which cause nfs4 mounts to fail --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index b6f539e..569af61 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.22 +Release: 0.23 License: distributable Group: System Environment/Base @@ -658,6 +658,9 @@ fi /sbin/losetup %changelog +* 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. From d6dc3e6f704203d667ef4b5b54925ba99f72daf1 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 25 May 2006 19:39:35 +0000 Subject: [PATCH 048/425] - Remove requirement on restorecon, since we can do the same thing - with chcon/matchpathcon, and not add requirement on policycoreutils --- util-linux.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 569af61..ca69992 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.23 +Release: 0.24 License: distributable Group: System Environment/Base @@ -63,7 +63,6 @@ Requires: pam >= 0.66-4, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 Conflicts: kernel < 2.2.12-7, Prereq: /sbin/install-info -Prereq: /sbin/restorecon Provides: mount = %{version} Provides: losetup = %{version} Provides: schedutils @@ -464,7 +463,8 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir touch /var/log/lastlog chown root:root /var/log/lastlog chmod 0644 /var/log/lastlog -/sbin/restorecon /var/log/lastlog >/dev/null 2>&1 +# Fix the file context, do not use restorecon +chcon `matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 %postun if [ "$1" = 0 ]; then @@ -658,6 +658,10 @@ fi /sbin/losetup %changelog +* 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. From 0c223bc70738374031ddcb36b1fc259b7d4b80c4 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Jun 2006 11:38:50 +0000 Subject: [PATCH 049/425] sync with RHEL4, add new things from Suse --- util-linux-2.12a-raw-man-dd.patch | 28 +++ util-linux-2.13-cal-wide.patch | 236 ++++++++++++++++++ util-linux-2.13-fdisk-isfull.patch | 103 ++++++++ util-linux-2.13-fdisk-sectors.patch | 345 +++++++++++++++++++++++++++ util-linux-2.13-hexdump-gcc.patch | 17 ++ util-linux-2.13-mount-context.patch | 153 ++++++++++++ util-linux-2.13-mount-man-bugs.patch | 39 +++ util-linux-2.13-mount-move.patch | 28 +++ util-linux-2.13-mount-subtree.patch | 187 +++++++++++++++ util-linux-2.13-mount-uuid.patch | 60 +++++ util-linux.spec | 53 +++- 11 files changed, 1244 insertions(+), 5 deletions(-) create mode 100644 util-linux-2.12a-raw-man-dd.patch create mode 100644 util-linux-2.13-cal-wide.patch create mode 100644 util-linux-2.13-fdisk-isfull.patch create mode 100644 util-linux-2.13-fdisk-sectors.patch create mode 100644 util-linux-2.13-hexdump-gcc.patch create mode 100644 util-linux-2.13-mount-context.patch create mode 100644 util-linux-2.13-mount-man-bugs.patch create mode 100644 util-linux-2.13-mount-move.patch create mode 100644 util-linux-2.13-mount-subtree.patch create mode 100644 util-linux-2.13-mount-uuid.patch diff --git a/util-linux-2.12a-raw-man-dd.patch b/util-linux-2.12a-raw-man-dd.patch new file mode 100644 index 0000000..531d742 --- /dev/null +++ b/util-linux-2.12a-raw-man-dd.patch @@ -0,0 +1,28 @@ +--- util-linux-2.12a/disk-utils/raw.8.dd 2006-04-24 15:27:39.000000000 +0200 ++++ util-linux-2.12a/disk-utils/raw.8 2006-04-24 15:53:46.000000000 +0200 +@@ -15,6 +15,12 @@ + .PP + .B raw + .B \-qa ++.SH WARNING ++Although Linux includes support for rawio, it is now a deprecated interface. If ++your application performs device access using this interface, Red Hat ++encourages you to modify your application to open the block device with the ++O_DIRECT flag. The rawio interface will exist for the life of Red Hat ++Enterprise Linux 4, but is a candidate for removal from future releases. + .SH DESCRIPTION + .B raw + is used to bind a Linux raw character device to a block device. Any +@@ -82,8 +88,10 @@ + .SH BUGS + The Linux + .B dd +-(1) command does not currently align its buffers correctly, and so +-cannot be used on raw devices. ++(1) command should be used without bs= option or the blocksize needs to be a ++multiple of the sector size of the device (512 bytes usually) otherwise it ++will fail with "Invalid Argument" messages (EINVAL). ++ + .PP + Raw I/O devices do not maintain cache coherency with the Linux block + device buffer cache. If you use raw I/O to overwrite data already in diff --git a/util-linux-2.13-cal-wide.patch b/util-linux-2.13-cal-wide.patch new file mode 100644 index 0000000..ac51aa8 --- /dev/null +++ b/util-linux-2.13-cal-wide.patch @@ -0,0 +1,236 @@ +--- util-linux-2.13-pre7/include/widechar.h.kzak 2005-08-01 20:18:35.000000000 +0200 ++++ util-linux-2.13-pre7/include/widechar.h 2006-03-29 19:38:56.000000000 +0200 +@@ -2,7 +2,7 @@ + /* This file must be included last because the redefinition of wchar_t may + cause conflicts when system include files were included after it. */ + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + + # include + # include +--- util-linux-2.13-pre7/misc-utils/cal.c.kzak 2006-03-29 19:40:26.000000000 +0200 ++++ util-linux-2.13-pre7/misc-utils/cal.c 2006-03-29 19:40:34.000000000 +0200 +@@ -355,7 +355,7 @@ + exit(0); + } + +-#ifndef ENABLE_WIDECHAR ++#ifndef HAVE_WIDECHAR + static char *eos(char *s) { + while (s && *s) + s++; +@@ -366,14 +366,14 @@ + void headers_init(void) + { + int i, wd; +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + wchar_t day_headings_wc[22],j_day_headings_wc[29]; + char *cur_dh = day_headings, *cur_j_dh = j_day_headings; + #endif + + strcpy(day_headings,""); + strcpy(j_day_headings,""); +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + wcscpy(day_headings_wc,L""); + wcscpy(j_day_headings_wc,L""); + #endif +@@ -387,7 +387,7 @@ + for(i = 0 ; i < 7 ; i++ ) { + ssize_t space_left; + wd = (i + week1stday) % 7; +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + swprintf(day_headings_wc, sizeof(day_headings_wc)/sizeof(day_headings_wc[0]), + L"%1.2s ", weekday(wd)); + swprintf(j_day_headings_wc, sizeof(j_day_headings_wc)/sizeof(j_day_headings_wc[0]), +@@ -718,7 +718,7 @@ + void + center_str(const char* src, char* dest, size_t dest_size, int width) + { +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + wchar_t str_wc[FMT_ST_CHARS]; + #endif + char str[FMT_ST_CHARS]; +@@ -727,7 +727,7 @@ + + len = strlen(src); + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (mbstowcs(str_wc, src, FMT_ST_CHARS) > 0) { + wide_char_enabled = 1; + len = wcswidth(str_wc, SIZE(str_wc)); +@@ -736,7 +736,7 @@ + if (len > width) { + str_to_print=str; + if (wide_char_enabled) { +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + str_wc[width]=L'\0'; + wcstombs(str, str_wc, SIZE(str)); + #endif +--- util-linux-2.13-pre7/text-utils/column.c.kzak 2006-03-29 19:41:20.000000000 +0200 ++++ util-linux-2.13-pre7/text-utils/column.c 2006-03-29 19:41:25.000000000 +0200 +@@ -52,7 +52,7 @@ + + #include "widechar.h" + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + #define wcs_width(s) wcswidth(s,wcslen(s)) + static wchar_t *mbs_to_wcs(const char *); + #else +@@ -312,7 +312,7 @@ + } + } + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + static wchar_t *mbs_to_wcs(const char *s) + { + size_t n; +@@ -330,7 +330,7 @@ + } + #endif + +-#ifndef ENABLE_WIDECHAR ++#ifndef HAVE_WIDECHAR + static char *mtsafe_strtok(char *str, const char *delim, char **ptr) + { + if (str == NULL) { +--- util-linux-2.13-pre7/text-utils/pg.c.kzak 2006-03-29 19:41:52.000000000 +0200 ++++ util-linux-2.13-pre7/text-utils/pg.c 2006-03-29 19:41:59.000000000 +0200 +@@ -255,7 +255,7 @@ + usage(); + } + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + /* + * A mbstowcs()-alike function that transparently handles invalid sequences. + */ +@@ -402,7 +402,7 @@ + return 0; + } + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + /* + * Return the last character that will fit on the line at col columns + * in case MB_CUR_MAX > 1. +@@ -489,7 +489,7 @@ + unsigned pos = 0; + char *t = s; + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (MB_CUR_MAX > 1) + return endline_for_mb(col, s); + #endif +@@ -776,7 +776,7 @@ + cmd.count = getcount(cmd.cmdline); + } + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + /* + * Remove backspace formatting, for searches + * in case MB_CUR_MAX > 1. +@@ -817,7 +817,7 @@ + { + char *p = s, *q; + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (MB_CUR_MAX > 1) + return colb_for_mb(s); + #endif +@@ -836,7 +836,7 @@ + return s; + } + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + /* + * Convert nonprintable characters to spaces + * in case MB_CUR_MAX > 1. +@@ -867,7 +867,7 @@ + static void + makeprint(char *s, size_t l) + { +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (MB_CUR_MAX > 1) + return makeprint_for_mb(s, l); + #endif +--- util-linux-2.13-pre7/text-utils/more.c.kzak 2006-03-29 19:41:01.000000000 +0200 ++++ util-linux-2.13-pre7/text-utils/more.c 2006-03-29 19:41:08.000000000 +0200 +@@ -782,7 +782,7 @@ + int column; + static int colflg; + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + int i; + wchar_t wc; + int wc_width; +@@ -805,7 +805,7 @@ + c = Getc (f); + } + while (p < &Line[LINSIZ - 1]) { +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (fold_opt && use_mbc_buffer_flag && MB_CUR_MAX > 1) { + use_mbc_buffer_flag = 0; + state_bak = state; +@@ -923,7 +923,7 @@ + *length = p - Line; + return (column); + } else { +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (fold_opt && MB_CUR_MAX > 1) { + memset (mbc, '\0', MB_LEN_MAX); + mbc_pos = 0; +@@ -1054,7 +1054,7 @@ + my_putstring(state ? ULenter : ULexit); + } + if (c != ' ' || pstate == 0 || state != 0 || ulglitch == 0) +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + { + wchar_t wc; + size_t mblength; +@@ -1070,7 +1070,7 @@ + } + #else + putchar(c); +-#endif /* ENABLE_WIDECHAR */ ++#endif /* HAVE_WIDECHAR */ + if (state && *chUL) { + putsout(chBS); + my_putstring(chUL); +@@ -1867,7 +1867,7 @@ + } + else if (((cc_t) c == otty.c_cc[VERASE]) && !slash) { + if (sp > buf) { +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + if (MB_CUR_MAX > 1) + { + wchar_t wc; +--- util-linux-2.13-pre7/text-utils/ul.c.kzak 2006-03-29 19:42:09.000000000 +0200 ++++ util-linux-2.13-pre7/text-utils/ul.c 2006-03-29 19:42:25.000000000 +0200 +@@ -50,7 +50,7 @@ + + #include "widechar.h" + +-#ifdef ENABLE_WIDECHAR ++#ifdef HAVE_WIDECHAR + static int put1wc(int c) /* Output an ASCII character as a wide character */ + { + if (putwchar(c) == WEOF) diff --git a/util-linux-2.13-fdisk-isfull.patch b/util-linux-2.13-fdisk-isfull.patch new file mode 100644 index 0000000..91fdace --- /dev/null +++ b/util-linux-2.13-fdisk-isfull.patch @@ -0,0 +1,103 @@ +--- util-linux-2.13-pre6/fdisk/sfdisk.c.isfull 2006-06-12 13:31:46.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/sfdisk.c 2006-06-12 13:31:47.000000000 +0200 +@@ -2413,19 +2413,6 @@ + return is_ide; + } + +-static int +-is_probably_full_disk(char *name) { +- struct hd_geometry geometry; +- int fd, i = 0; +- +- fd = open(name, O_RDONLY); +- if (fd >= 0) { +- i = ioctl(fd, HDIO_GETGEO, &geometry); +- close(fd); +- } +- return (fd >= 0 && i == 0 && geometry.start == 0); +-} +- + #define PROC_PARTITIONS "/proc/partitions" + static FILE *procf = NULL; + +--- util-linux-2.13-pre6/fdisk/common.h.isfull 2004-09-06 20:07:11.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/common.h 2006-06-12 13:31:47.000000000 +0200 +@@ -28,5 +28,6 @@ + extern struct systypes i386_sys_types[]; + + extern char *partname(char *dev, int pno, int lth); ++extern int is_probably_full_disk(char *name); + + int disksize(int fd, unsigned long long *sectors); +--- util-linux-2.13-pre6/fdisk/partname.c.isfull 2002-07-07 14:16:43.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/partname.c 2006-06-12 13:32:54.000000000 +0200 +@@ -1,6 +1,9 @@ + #include + #include + #include ++#include ++#include ++#include + #include "common.h" + + /* +@@ -45,3 +48,30 @@ + partname(char *dev, int pno, int lth) { + return partnamebf(dev, pno, lth, 0, NULL); + } ++ ++int ++is_probably_full_disk(char *name) { ++#ifdef HDIO_GETGEO ++ struct hd_geometry geometry; ++ int fd, i = 0; ++ ++ fd = open(name, O_RDONLY); ++ if (fd >= 0) { ++ i = ioctl(fd, HDIO_GETGEO, &geometry); ++ close(fd); ++ } ++ if (i==0) ++ return (fd >= 0 && geometry.start == 0); ++ /* ++ * "silly heuristic" is still so sexy for us, because ++ * for example Xen doesn't implement HDIO_GETGEO for virtual ++ * block devices (/dev/xvda). ++ * -- kzak@redhat.com (23-Feb-2006) ++ */ ++#endif ++ /* silly heuristic */ ++ while (*name) ++ name++; ++ return !isdigit(name[-1]); ++} ++ +--- util-linux-2.13-pre6/fdisk/fdisk.c.isfull 2006-06-12 13:31:47.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/fdisk.c 2006-06-12 13:31:47.000000000 +0200 +@@ -788,26 +788,6 @@ + #endif + } + +-static int +-is_probably_full_disk(char *name) { +-#ifdef HDIO_GETGEO +- struct hd_geometry geometry; +- int fd, i = 0; +- +- fd = open(name, O_RDONLY); +- if (fd >= 0) { +- i = ioctl(fd, HDIO_GETGEO, &geometry); +- close(fd); +- } +- return (fd >= 0 && i == 0 && geometry.start == 0); +-#else +- /* silly heuristic */ +- while (*name) +- name++; +- return !isdigit(name[-1]); +-#endif +-} +- + static void + get_partition_table_geometry(void) { + unsigned char *bufp = MBRbuffer; diff --git a/util-linux-2.13-fdisk-sectors.patch b/util-linux-2.13-fdisk-sectors.patch new file mode 100644 index 0000000..c8de359 --- /dev/null +++ b/util-linux-2.13-fdisk-sectors.patch @@ -0,0 +1,345 @@ +--- util-linux-2.13-pre6/fdisk/fdisk.h.sectors 2006-06-12 10:50:11.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/fdisk.h 2006-06-12 10:50:52.000000000 +0200 +@@ -81,8 +81,8 @@ + #define SINGULAR 1 + extern char *const str_units(int); + +-extern unsigned int get_start_sect(struct partition *p); +-extern unsigned int get_nr_sects(struct partition *p); ++extern unsigned long long get_start_sect(struct partition *p); ++extern unsigned long long get_nr_sects(struct partition *p); + + extern int osf_label; + +--- util-linux-2.13-pre6/fdisk/fdisksgilabel.h.sectors 2004-12-14 00:39:29.000000000 +0100 ++++ util-linux-2.13-pre6/fdisk/fdisksgilabel.h 2006-06-12 10:50:52.000000000 +0200 +@@ -103,8 +103,9 @@ + /* fdisk.c */ + #define sgilabel ((sgi_partition *)MBRbuffer) + #define sgiparam (sgilabel->devparam) +-extern char MBRbuffer[MAX_SECTOR_SIZE]; +-extern unsigned int heads, sectors, cylinders, sector_size; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned int heads, cylinders, sector_size; ++extern unsigned long long sectors; + extern int show_begin; + extern int sgi_label; + extern char *partition_type(unsigned char type); +--- util-linux-2.13-pre6/fdisk/fdisksunlabel.h.sectors 2004-12-14 00:39:18.000000000 +0100 ++++ util-linux-2.13-pre6/fdisk/fdisksunlabel.h 2006-06-12 10:50:52.000000000 +0200 +@@ -37,8 +37,9 @@ + : (__u32)(x)) + + /* fdisk.c */ +-extern char MBRbuffer[MAX_SECTOR_SIZE]; +-extern unsigned int heads, sectors, cylinders; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned int heads, cylinders; ++extern unsigned long long sectors; + extern int show_begin; + extern int sun_label; + extern char *partition_type(unsigned char type); +--- util-linux-2.13-pre6/fdisk/fdiskaixlabel.h.sectors 2004-12-14 00:39:47.000000000 +0100 ++++ util-linux-2.13-pre6/fdisk/fdiskaixlabel.h 2006-06-12 10:50:52.000000000 +0200 +@@ -19,9 +19,10 @@ + + /* fdisk.c */ + #define aixlabel ((aix_partition *)MBRbuffer) +-extern char MBRbuffer[MAX_SECTOR_SIZE]; ++extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; + extern char changed[MAXIMUM_PARTS]; +-extern unsigned int heads, sectors, cylinders; ++extern unsigned int heads, cylinders; ++extern unsigned long long sectors; + extern int show_begin; + extern int aix_label; + extern char *partition_type(unsigned char type); +--- util-linux-2.13-pre6/fdisk/fdisksunlabel.c.sectors 2005-07-31 18:00:29.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/fdisksunlabel.c 2006-06-12 10:50:52.000000000 +0200 +@@ -348,7 +348,7 @@ + } + + snprintf(sunlabel->info, sizeof(sunlabel->info), +- "%s%s%s cyl %d alt %d hd %d sec %d", ++ "%s%s%s cyl %d alt %d hd %d sec %llu", + p ? p->vendor : "", (p && *p->vendor) ? " " : "", + p ? p->model + : (floppy ? _("3,5\" floppy") : _("Linux custom")), +@@ -655,7 +655,7 @@ + w = strlen(disk_device); + if (xtra) + printf( +- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d rpm\n" ++ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d rpm\n" + "%d cylinders, %d alternate cylinders, %d physical cylinders\n" + "%d extra sects/cyl, interleave %d:1\n" + "%s\n" +@@ -669,7 +669,7 @@ + str_units(PLURAL), units_per_sector); + else + printf( +- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d cylinders\n" ++ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d cylinders\n" + "Units = %s of %d * 512 bytes\n\n"), + disk_device, heads, sectors, cylinders, + str_units(PLURAL), units_per_sector); +--- util-linux-2.13-pre6/fdisk/fdisk.c.sectors 2006-06-12 10:50:11.000000000 +0200 ++++ util-linux-2.13-pre6/fdisk/fdisk.c 2006-06-12 10:51:53.000000000 +0200 +@@ -64,7 +64,7 @@ + + /* A valid partition table sector ends in 0x55 0xaa */ + static unsigned int +-part_table_flag(char *b) { ++part_table_flag(unsigned char *b) { + return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8); + } + +@@ -74,7 +74,7 @@ + } + + static void +-write_part_table_flag(char *b) { ++write_part_table_flag(unsigned char *b) { + b[510] = 0x55; + b[511] = 0xaa; + } +@@ -101,17 +101,17 @@ + store4_little_endian(p->start4, start_sect); + } + +-unsigned int ++unsigned long long + get_start_sect(struct partition *p) { + return read4_little_endian(p->start4); + } + + static void +-set_nr_sects(struct partition *p, unsigned int nr_sects) { ++set_nr_sects(struct partition *p, unsigned long long nr_sects) { + store4_little_endian(p->size4, nr_sects); + } + +-unsigned int ++unsigned long long + get_nr_sects(struct partition *p) { + return read4_little_endian(p->size4); + } +@@ -123,7 +123,7 @@ + * Raw disk label. For DOS-type partition tables the MBR, + * with descriptions of the primary partitions. + */ +-char MBRbuffer[MAX_SECTOR_SIZE]; ++unsigned char MBRbuffer[MAX_SECTOR_SIZE]; + + /* + * per partition table entry data +@@ -137,8 +137,8 @@ + struct partition *part_table; /* points into sectorbuffer */ + struct partition *ext_pointer; /* points into sectorbuffer */ + char changed; /* boolean */ +- unsigned int offset; /* disk sector number */ +- char *sectorbuffer; /* disk sector contents */ ++ unsigned long long offset; /* disk sector number */ ++ unsigned char *sectorbuffer; /* disk sector contents */ + } ptes[MAXIMUM_PARTS]; + + char *disk_device, /* must be specified */ +@@ -157,15 +157,14 @@ + unsigned int pt_heads, pt_sectors; + unsigned int kern_heads, kern_sectors; + ++unsigned long long sector_offset = 1, extended_offset = 0, sectors; ++ + unsigned int heads, +- sectors, + cylinders, + sector_size = DEFAULT_SECTOR_SIZE, + user_set_sector_size = 0, +- sector_offset = 1, + units_per_sector = 1, +- display_in_cyl_units = 1, +- extended_offset = 0; /* offset of link pointers */ ++ display_in_cyl_units = 1; + + unsigned long long total_number_of_sectors; + +@@ -242,21 +241,21 @@ + } + + static void +-seek_sector(int fd, unsigned int secno) { ++seek_sector(int fd, unsigned long long secno) { + off_t offset = (off_t) secno * sector_size; + if (lseek(fd, offset, SEEK_SET) == (off_t) -1) + fatal(unable_to_seek); + } + + static void +-read_sector(int fd, unsigned int secno, char *buf) { ++read_sector(int fd, unsigned long long secno, char *buf) { + seek_sector(fd, secno); + if (read(fd, buf, sector_size) != sector_size) + fatal(unable_to_read); + } + + static void +-write_sector(int fd, unsigned int secno, char *buf) { ++write_sector(int fd, unsigned long long secno, char *buf) { + seek_sector(fd, secno); + if (write(fd, buf, sector_size) != sector_size) + fatal(unable_to_write); +@@ -264,11 +263,11 @@ + + /* Allocate a buffer and read a partition table sector */ + static void +-read_pte(int fd, int pno, unsigned int offset) { ++read_pte(int fd, int pno, unsigned long long offset) { + struct pte *pe = &ptes[pno]; + + pe->offset = offset; +- pe->sectorbuffer = (char *) malloc(sector_size); ++ pe->sectorbuffer = malloc(sector_size); + if (!pe->sectorbuffer) + fatal(out_of_memory); + read_sector(fd, offset, pe->sectorbuffer); +@@ -276,7 +275,7 @@ + pe->part_table = pe->ext_pointer = NULL; + } + +-static unsigned int ++static unsigned long long + get_partition_start(struct pte *pe) { + return pe->offset + get_start_sect(pe->part_table); + } +@@ -542,10 +541,10 @@ + } + + static void +-set_partition(int i, int doext, unsigned int start, unsigned int stop, +- int sysid) { ++set_partition(int i, int doext, unsigned long long start, ++ unsigned long long stop, int sysid) { + struct partition *p; +- unsigned int offset; ++ unsigned long long offset; + + if (doext) { + p = ptes[i].ext_pointer; +@@ -1544,7 +1543,7 @@ + else + printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"), + disk_device, megabytes/1000, (megabytes/100)%10, bytes); +- printf(_("%d heads, %d sectors/track, %d cylinders"), ++ printf(_("%d heads, %Ld sectors/track, %d cylinders"), + heads, sectors, cylinders); + if (units_per_sector == 1) + printf(_(", total %llu sectors"), +@@ -1776,20 +1775,21 @@ + struct partition *p; + int i; + +- printf(_("\nDisk %s: %d heads, %d sectors, %d cylinders\n\n"), ++ printf(_("\nDisk %s: %d heads, %Ld sectors, %d cylinders\n\n"), + disk_device, heads, sectors, cylinders); + printf(_("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n")); + for (i = 0 ; i < partitions; i++) { + pe = &ptes[i]; + p = (extend ? pe->ext_pointer : pe->part_table); + if (p != NULL) { +- printf("%2d %02x%4d%4d%5d%4d%4d%5d%11u%11u %02x\n", ++ printf("%2d %02x%4d%4d%5d%4d%4d%5d%11lu%11lu %02x\n", + i + 1, p->boot_ind, p->head, + sector(p->sector), + cylinder(p->sector, p->cyl), p->end_head, + sector(p->end_sector), + cylinder(p->end_sector, p->end_cyl), +- get_start_sect(p), get_nr_sects(p), p->sys_ind); ++ (unsigned long) get_start_sect(p), ++ (unsigned long) get_nr_sects(p), p->sys_ind); + if (p->sys_ind) + check_consistency(p, i); + } +@@ -1797,7 +1797,7 @@ + } + + static void +-fill_bounds(unsigned int *first, unsigned int *last) { ++fill_bounds(unsigned long long *first, unsigned long long *last) { + int i; + struct pte *pe = &ptes[0]; + struct partition *p; +@@ -1830,7 +1830,7 @@ + n, h + 1, heads); + if (real_s >= sectors) + fprintf(stderr, _("Partition %d: sector %d greater than " +- "maximum %d\n"), n, s, sectors); ++ "maximum %Ld\n"), n, s, sectors); + if (real_c >= cylinders) + fprintf(stderr, _("Partitions %d: cylinder %d greater than " + "maximum %d\n"), n, real_c + 1, cylinders); +@@ -1843,8 +1843,8 @@ + static void + verify(void) { + int i, j; +- unsigned int total = 1; +- unsigned int first[partitions], last[partitions]; ++ unsigned long total = 1; ++ unsigned long long first[partitions], last[partitions]; + struct partition *p; + + if (warn_geometry()) +@@ -1888,7 +1888,7 @@ + + if (extended_offset) { + struct pte *pex = &ptes[ext_index]; +- unsigned int e_last = get_start_sect(pex->part_table) + ++ unsigned long long e_last = get_start_sect(pex->part_table) + + get_nr_sects(pex->part_table) - 1; + + for (i = 4; i < partitions; i++) { +@@ -1907,8 +1907,8 @@ + } + + if (total > total_number_of_sectors) +- printf(_("Total allocated sectors %d greater than the maximum " +- "%lld\n"), 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); +@@ -1921,7 +1921,7 @@ + struct partition *p = ptes[n].part_table; + struct partition *q = ptes[ext_index].part_table; + long long llimit; +- unsigned int start, stop = 0, limit, temp, ++ unsigned long long start, stop = 0, limit, temp, + first[partitions], last[partitions]; + + if (p && p->sys_ind) { +@@ -1967,7 +1967,7 @@ + if (start > limit) + break; + if (start >= temp+units_per_sector && read) { +- printf(_("Sector %d is already allocated\n"), temp); ++ printf(_("Sector %llu is already allocated\n"), temp); + temp = start; + read = 0; + } +@@ -2225,14 +2225,14 @@ + + #define MAX_PER_LINE 16 + static void +-print_buffer(char pbuffer[]) { ++print_buffer(unsigned char pbuffer[]) { + int i, + l; + + for (i = 0, l = 0; i < sector_size; i++, l++) { + if (l == 0) + printf("0x%03X:", i); +- printf(" %02X", (unsigned char) pbuffer[i]); ++ printf(" %02X", pbuffer[i]); + if (l == MAX_PER_LINE - 1) { + printf("\n"); + l = -1; diff --git a/util-linux-2.13-hexdump-gcc.patch b/util-linux-2.13-hexdump-gcc.patch new file mode 100644 index 0000000..f088147 --- /dev/null +++ b/util-linux-2.13-hexdump-gcc.patch @@ -0,0 +1,17 @@ + + gcc 4.1.0: "warning: memset used with constant zero length parameter; this + could be due to transposed parameters". So, fix it! + -- 03/30/2006 Karel Zak + +--- util-linux-2.13-pre7/text-utils/display.c.gcc 2006-03-31 10:44:50.000000000 +0200 ++++ util-linux-2.13-pre7/text-utils/display.c 2006-03-31 10:45:22.000000000 +0200 +@@ -255,7 +255,8 @@ + (void)printf("*\n"); + return(NULL); + } +- memset((char *)curp + nread, 0, need); ++ if (need > 0) ++ memset((char *)curp + nread, 0, need); + eaddress = address + nread; + return(curp); + } diff --git a/util-linux-2.13-mount-context.patch b/util-linux-2.13-mount-context.patch new file mode 100644 index 0000000..6542b6a --- /dev/null +++ b/util-linux-2.13-mount-context.patch @@ -0,0 +1,153 @@ + + This patch adds to the mount man page docs about context, fscontext and +defcontext mount options and translate context options from human to raw +selinux context format. -- 03/30/2006 Karel Zak + +--- util-linux-2.13-pre7/mount/mount.8.cxt 2006-03-30 17:15:06.000000000 +0200 ++++ util-linux-2.13-pre7/mount/mount.8 2006-03-30 17:15:06.000000000 +0200 +@@ -661,6 +661,50 @@ + .BR noexec ", " nosuid ", and " nodev + (unless overridden by subsequent options, as in the option line + .BR users,exec,dev,suid ). ++.TP ++\fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP and \fBdefcontext=\fP\fIcontext\fP ++The ++.BR context= ++option is useful when mounting filesystems that do not support ++extended attributes, such as a floppy or hard disk formatted with VFAT, or ++systems that are not normally running under SELinux, such as an ext3 formatted ++disk from a non-SELinux workstation. You can also use ++.BR context= ++on filesystems you do not trust, such as a floppy. It also helps in compatibility with ++xattr-supporting filesystems on earlier 2.4. kernel versions. Even where ++xattrs are supported, you can save time not having to label every file by ++assigning the entire disk one security context. ++ ++A commonly used option for removable media is ++.BR context=system_u:object_r:removable_t . ++ ++Two other options are ++.BR fscontext= ++and ++.BR defcontext= , ++both of which are mutually exclusive of the context option. This means you ++can use fscontext and defcontext with each other, but neither can be used with ++context. ++ ++The ++.BR fscontext= ++option works for all filesystems, regardless of their xattr ++support. The fscontext option sets the overarching filesystem label to a ++specific security context. This filesystem label is separate from the ++individual labels on the files. It represents the entire filesystem for ++certain kinds of permission checks, such as during mount or file creation. ++Individual file labels are still obtained from the xattrs on the files ++themselves. The context option actually sets the aggregate context that ++fscontext provides, in addition to supplying the same label for individual ++files. ++ ++You can set the default security context for unlabeled files using ++.BR defcontext= ++option. This overrides the value set for unlabeled files in the policy and requires a ++file system that supports xattr labeling. ++ ++For more details see ++.BR selinux (8) + .RE + .TP + .B \-\-bind +--- util-linux-2.13-pre7/mount/mount.c.cxt 2006-03-30 17:15:06.000000000 +0200 ++++ util-linux-2.13-pre7/mount/mount.c 2006-03-30 20:16:57.000000000 +0200 +@@ -21,6 +21,11 @@ + #include + #include + ++#ifdef HAVE_LIBSELINUX ++#include ++#include ++#endif ++ + #include "mount_blkid.h" + #include "mount_constants.h" + #include "sundries.h" +@@ -255,6 +260,49 @@ + free((void *) s); + } + ++#ifdef HAVE_LIBSELINUX ++/* translates SELinux context from human to raw format and ++ * appends it to the mount extra options. ++ * ++ * returns -1 on error and 0 on success ++ */ ++static int ++append_context(const char *optname, const char *optdata, char *extra_opts, int *len) ++{ ++ security_context_t raw = NULL; ++ char *buf = NULL; ++ int bufsz; ++ ++ if (!is_selinux_enabled()) ++ /* ignore the option if we running without selinux */ ++ return 0; ++ ++ if (optdata==NULL || *optdata=='\0' || optname==NULL) ++ return -1; ++ ++ if (selinux_trans_to_raw_context( ++ (security_context_t) optdata, &raw)==-1 || ++ raw==NULL) ++ return -1; ++ ++ if (verbose) ++ printf(_("mount: translated %s '%s' to '%s'\n"), ++ optname, optdata, (char *) raw); ++ ++ bufsz = strlen(optname) + strlen(raw) + 2; /* 2 is \0 and '=' */ ++ buf = xmalloc(bufsz); ++ ++ snprintf(buf, bufsz, "%s=%s", optname, (char *) raw); ++ freecon(raw); ++ ++ if ((*len -= bufsz-1) > 0) ++ strcat(extra_opts, buf); ++ ++ my_free(buf); ++ return 0; ++} ++#endif ++ + /* + * Look for OPT in opt_map table and return mask value. + * If OPT isn't found, tack it onto extra_opts (which is non-NULL). +@@ -313,7 +361,20 @@ + return; + } + } +- ++#ifdef HAVE_LIBSELINUX ++ if (strncmp(opt, "context=", 8)==0 && *(opt+8)) { ++ if (append_context("context", opt+8, extra_opts, &len)==0) ++ return; ++ } ++ if (strncmp(opt, "fscontext=", 10)==0 && *(opt+10)) { ++ if (append_context("fscontext", opt+10, extra_opts, &len)==0) ++ return; ++ } ++ if (strncmp(opt, "defcontext=", 11)==0 && *(opt+11)) { ++ if (append_context("defcontext", opt+11, extra_opts, &len)==0) ++ return; ++ } ++#endif + if ((len -= strlen(opt)) > 0) + strcat(extra_opts, opt); + } +@@ -330,7 +391,7 @@ + if (options != NULL) { + char *opts = xstrdup(options); + char *opt; +- int len = strlen(opts) + 20; ++ int len = strlen(opts) + 256; + + *extra_opts = xmalloc(len); + **extra_opts = '\0'; diff --git a/util-linux-2.13-mount-man-bugs.patch b/util-linux-2.13-mount-man-bugs.patch new file mode 100644 index 0000000..79c3b0f --- /dev/null +++ b/util-linux-2.13-mount-man-bugs.patch @@ -0,0 +1,39 @@ +--- util-linux-2.13-pre7/mount/nfs.5.bugs 2006-03-30 21:37:53.000000000 +0200 ++++ util-linux-2.13-pre7/mount/nfs.5 2006-03-30 21:38:13.000000000 +0200 +@@ -443,3 +443,10 @@ + .P + The umount command should notify the server + when an NFS filesystem is unmounted. ++.P ++Checking files on NFS filesystem referenced by file descriptors (i.e. the ++.BR fcntl ++and ++.BR ioctl ++families of functions) may lead to inconsistent result due to the lack of ++consistency check in kernel even if noac is used. +--- util-linux-2.13-pre7/mount/mount.8.bugs 2006-03-30 21:36:56.000000000 +0200 ++++ util-linux-2.13-pre7/mount/mount.8 2006-03-30 21:37:35.000000000 +0200 +@@ -2047,6 +2047,23 @@ + .IR /proc/partitions . + In particular, it may well fail if the kernel was compiled with devfs + but devfs is not mounted. ++.PP ++It is possible that files ++.IR /etc/mtab ++and ++.IR /proc/mounts ++don't match. The first file is based only on the mount command options, but the ++content of the second file also depends on the kernel and others settings (e.g. ++remote NFS server. In particular case the mount command may reports unreliable ++information about a NFS mount point and the /proc/mounts file usually contains ++more reliable information.) ++.PP ++Checking files on NFS filesystem referenced by file descriptors (i.e. the ++.BR fcntl ++and ++.BR ioctl ++families of functions) may lead to inconsistent result due to the lack of ++consistency check in kernel even if noac is used. + .SH HISTORY + A + .B mount diff --git a/util-linux-2.13-mount-move.patch b/util-linux-2.13-mount-move.patch new file mode 100644 index 0000000..c7d1c77 --- /dev/null +++ b/util-linux-2.13-mount-move.patch @@ -0,0 +1,28 @@ +--- util-linux-2.13-pre6/mount/mount.c.move 2006-06-12 09:19:43.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-06-12 09:45:05.000000000 +0200 +@@ -768,6 +768,25 @@ + else { + mntFILE *mfp; + ++ /* when moving a mount point, we have to make sure the mtab ++ * gets updated properly. We get info about the old mount ++ * point, copy it to the new mount point, and then delete ++ * the old mount point. */ ++ if (flags & MS_MOVE) { ++ const char *olddir = mnt.mnt_fsname; ++ struct mntentchn *oldmc = oldmc = getmntfile(olddir); ++ if (oldmc != NULL) { ++ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname); ++ mnt.mnt_type = oldmc->m.mnt_type; ++ mnt.mnt_opts = oldmc->m.mnt_opts; ++ mnt.mnt_freq = oldmc->m.mnt_freq; ++ mnt.mnt_passno = oldmc->m.mnt_passno; ++ } ++ update_mtab(olddir, NULL); ++ if (oldmc != NULL) ++ my_free(olddir); ++ } ++ + lock_mtab(); + mfp = my_setmntent(MOUNTED, "a+"); + if (mfp == NULL || mfp->mntent_fp == NULL) { diff --git a/util-linux-2.13-mount-subtree.patch b/util-linux-2.13-mount-subtree.patch new file mode 100644 index 0000000..b16ae99 --- /dev/null +++ b/util-linux-2.13-mount-subtree.patch @@ -0,0 +1,187 @@ +--- util-linux-2.13-pre6/mount/mount.8.subtree 2006-06-12 09:18:26.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.8 2006-06-12 09:19:43.000000000 +0200 +@@ -131,6 +131,41 @@ + .B "mount --move olddir newdir" + .RE + ++Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared, ++private, slave or unbindable. A shared mount provides ability to create mirrors ++of that mount such that mounts and umounts within any of the mirrors propagate ++to the other mirror. A slave mount receives propagation from its master, but ++any not vice-versa. A private mount carries no propagation abilities. A ++unbindable mount is a private mount which cannot cloned through a bind ++operation. Detailed semantics is documented in Documentation/sharedsubtree.txt ++file in the kernel source tree. ++.RS ++.br ++.B "mount --make-shared mountpoint" ++.br ++.B "mount --make-slave mountpoint" ++.br ++.B "mount --make-private mountpoint" ++.br ++.B "mount --make-unbindable mountpoint" ++.br ++.RE ++ ++The following commands allows one to recursively change the type of all the ++mounts under a given mountpoint. ++.RS ++.br ++.B "mount --make-rshared mountpoint" ++.br ++.B "mount --make-rslave mountpoint" ++.br ++.B "mount --make-rprivate mountpoint" ++.br ++.B ++"mount --make-runbindable mountpoint" ++.br ++.RE ++ + The + .I proc + file system is not associated with a special device, and when +--- util-linux-2.13-pre6/mount/mount_constants.h.subtree 2002-11-01 01:24:36.000000000 +0100 ++++ util-linux-2.13-pre6/mount/mount_constants.h 2006-06-12 09:19:43.000000000 +0200 +@@ -57,6 +57,18 @@ + #ifndef MS_VERBOSE + #define MS_VERBOSE 0x8000 /* 32768 */ + #endif ++#ifndef MS_UNBINDABLE ++#define MS_UNBINDABLE (1<<17) /* 131072 unbindable*/ ++#endif ++#ifndef MS_PRIVATE ++#define MS_PRIVATE (1<<18) /* 262144 Private*/ ++#endif ++#ifndef MS_SLAVE ++#define MS_SLAVE (1<<19) /* 524288 Slave*/ ++#endif ++#ifndef MS_SHARED ++#define MS_SHARED (1<<20) /* 1048576 Shared*/ ++#endif + /* + * Magic mount flag number. Had to be or-ed to the flag values. + */ +--- util-linux-2.13-pre6/mount/mount.c.subtree 2006-06-12 09:18:26.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-06-12 09:19:43.000000000 +0200 +@@ -74,7 +74,9 @@ + /* Add volumelabel in a listing of mounted devices (-l). */ + static int list_with_volumelabel = 0; + +-/* Nonzero for mount {--bind|--replace|--before|--after|--over|--move} */ ++/* Nonzero for mount {--bind|--replace|--before|--after|--over|--move| ++ * make-shared|make-private|make-unbindable|make-slave} ++ */ + static int mounttype = 0; + + /* True if ruid != euid. */ +@@ -109,6 +111,8 @@ + /* Options that we keep from appearing in the options field in the mtab. */ + #define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER|MS_PAMCONSOLE) + ++#define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE) ++ + /* Options that we make ordinary users have by default. */ + #define MS_SECURE (MS_NOEXEC|MS_NOSUID|MS_NODEV) + +@@ -346,6 +350,9 @@ + *flags |= MS_RDONLY; + if (readwrite) + *flags &= ~MS_RDONLY; ++ ++ if (mounttype & MS_PROPAGATION) ++ *flags &= ~MS_BIND; + *flags |= mounttype; + } + +@@ -916,13 +923,15 @@ + if (loop) + opt_loopdev = loopdev; + +- update_mtab_entry(loop ? loopfile : spec, ++ if (!(mounttype & MS_PROPAGATION)) { ++ update_mtab_entry(loop ? loopfile : spec, + node, + types ? types : "unknown", + fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user), + flags, + freq, + pass); ++ } + + block_signals (SIG_UNBLOCK); + res = 0; +@@ -1461,6 +1470,14 @@ + { "move", 0, 0, 133 }, + { "guess-fstype", 1, 0, 134 }, + { "rbind", 0, 0, 135 }, ++ { "make-shared", 0, 0, 136 }, ++ { "make-slave", 0, 0, 137 }, ++ { "make-private", 0, 0, 138 }, ++ { "make-unbindable", 0, 0, 139 }, ++ { "make-rshared", 0, 0, 140 }, ++ { "make-rslave", 0, 0, 141 }, ++ { "make-rprivate", 0, 0, 142 }, ++ { "make-runbindable", 0, 0, 143 }, + { "internal-only", 0, 0, 'i' }, + { NULL, 0, 0, 0 } + }; +@@ -1487,6 +1504,17 @@ + " mount --bind olddir newdir\n" + "or move a subtree:\n" + " mount --move olddir newdir\n" ++ "One can change the type of mount containing the directory dir:\n" ++ " mount --make-shared dir\n" ++ " mount --make-slave dir\n" ++ " mount --make-private dir\n" ++ " mount --make-unbindable dir\n" ++ "One can change the type of all the mounts in a mount subtree\n" ++ "containing the directory dir:\n" ++ " mount --make-rshared dir\n" ++ " mount --make-rslave dir\n" ++ " mount --make-rprivate dir\n" ++ " mount --make-runbindable dir\n" + "A device can be given by name, say /dev/hda1 or /dev/cdrom,\n" + "or by label, using -L label or by uuid, using -U uuid .\n" + "Other options: [-nfFrsvw] [-o options] [-p passwdfd].\n" +@@ -1638,6 +1666,39 @@ + case 135: + mounttype = (MS_BIND | MS_REC); + break; ++ ++ case 136: ++ mounttype = MS_SHARED; ++ break; ++ ++ case 137: ++ mounttype = MS_SLAVE; ++ break; ++ ++ case 138: ++ mounttype = MS_PRIVATE; ++ break; ++ ++ case 139: ++ mounttype = MS_UNBINDABLE; ++ break; ++ ++ case 140: ++ mounttype = (MS_SHARED | MS_REC); ++ break; ++ ++ case 141: ++ mounttype = (MS_SLAVE | MS_REC); ++ break; ++ ++ case 142: ++ mounttype = (MS_PRIVATE | MS_REC); ++ break; ++ ++ case 143: ++ mounttype = (MS_UNBINDABLE | MS_REC); ++ break; ++ + case '?': + default: + usage (stderr, EX_USAGE); diff --git a/util-linux-2.13-mount-uuid.patch b/util-linux-2.13-mount-uuid.patch new file mode 100644 index 0000000..43a4d7a --- /dev/null +++ b/util-linux-2.13-mount-uuid.patch @@ -0,0 +1,60 @@ + + The UUID code in the mount command is broken -- en example UUID= in the fstab + file is reason for SIGSEG when non-root user tries umount any device. + -- 03/30/2006 Karel Zak + +--- util-linux-2.13-pre6/mount/mount_blkid.h.uuid 2006-03-29 15:34:24.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount_blkid.h 2006-03-29 15:34:57.000000000 +0200 +@@ -8,5 +8,6 @@ + extern const char *mount_get_devname_by_uuid(const char *uuid); + extern const char *mount_get_devname_by_label(const char *label); + extern const char *mount_get_volume_label_by_spec(const char *spec); ++extern const char *mount_get_volume_uuid_by_spec(const char *spec); + extern const char *mount_get_devname(const char *spec); + extern const char *mount_get_devname_for_mounting(const char *spec); +--- util-linux-2.13-pre6/mount/mount_blkid.c.uuid 2006-03-29 15:33:44.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount_blkid.c 2006-03-29 15:34:14.000000000 +0200 +@@ -21,6 +21,11 @@ + } + + const char * ++mount_get_volume_uuid_by_spec(const char *spec) { ++ return blkid_get_tag_value(blkid, "UUID", spec); ++} ++ ++const char * + mount_get_devname(const char *spec) { + return blkid_get_devname(blkid, spec, 0); + } +--- util-linux-2.13-pre6/mount/fstab.c.uuid 2006-03-29 15:29:28.000000000 +0200 ++++ util-linux-2.13-pre6/mount/fstab.c 2006-03-29 15:36:30.000000000 +0200 +@@ -301,23 +301,19 @@ + static int + has_label(const char *device, const char *label) { + const char *devlabel; +- int ret; + +- devlabel = mount_get_volume_label_by_spec(device); +- ret = !strcmp(label, devlabel); +- /* free(devlabel); */ +- return ret; ++ if (!(devlabel = mount_get_volume_label_by_spec(device))) ++ return 0; ++ return !strcmp(label, devlabel); + } + + static int + has_uuid(const char *device, const char *uuid){ + const char *devuuid; +- int ret; + +- devuuid = mount_get_devname_by_uuid(device); +- ret = !strcmp(uuid, devuuid); +- /* free(devuuid); */ +- return ret; ++ if (!(devuuid = mount_get_volume_uuid_by_spec(device))) ++ return 0; ++ return !strcmp(uuid, devuuid); + } + + /* Find the entry (SPEC,FILE) in fstab */ diff --git a/util-linux.spec b/util-linux.spec index ca69992..89bd798 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.24 +Release: 0.25 License: distributable Group: System Environment/Base @@ -177,8 +177,6 @@ Patch225: util-linux-2.13-schedutils-man.patch Patch226: util-linux-2.13-login-pam-acct.patch # 177523 - umount -a should not unmount sysfs Patch227: util-linux-2.13-umount-sysfs.patch -# 182553 - fdisk -l inside xen guest shows no disks -Patch228: util-linux-2.13-fdisk-xvd.patch # 169042 - Changed nfsmount to try udp before using tcp when rpc-ing # the remote rpc.mountd (iff -o tcp is not specified). Patch229: util-linux-2.13-nfsmount-mountd-udp.patch @@ -188,7 +186,29 @@ Patch230: util-linux-2.13-nfs-noacl.patch Patch231: util-linux-2.13-nfsmount-retry.patch # Adds syslog logging to background mounts Patch232: util-linux-2.13-nfsmount-syslog.patch - +# 187014 - umount segfaults for normal user +Patch233: util-linux-2.13-mount-uuid.patch +# 183446 - cal not UTF-8-aware +Patch234: util-linux-2.13-cal-wide.patch +# 186915 - mount does not translate SELIinux context options though libselinux +# 185500 - Need man page entry for -o context= mount option +Patch235: util-linux-2.13-mount-context.patch +# 152579 - missing info about /etc/mtab and /proc/mounts mismatch +# 183890 - missing info about possible ioctl() and fcntl() problems on NFS filesystem +Patch236: util-linux-2.13-mount-man-bugs.patch +# Keep gcc happy +Patch237: util-linux-2.13-hexdump-gcc.patch +# 191230 - using mount --move results in wrong data in /etc/mtab +Patch238: util-linux-2.13-mount-move.patch +# Subtrees support +Patch239: util-linux-2.13-mount-subtree.patch +# wrong number of sectors for large disks (suse#160822) +Patch240: util-linux-2.13-fdisk-sectors.patch +# 182553 - fdisk -l inside xen guest shows no disks +# 188981 - "sfdisk -l" tries to open partitions +Patch241: util-linux-2.13-fdisk-isfull.patch +# 181549 - raw(8) manpage has old information about dd +Patch242: util-linux-2.12a-raw-man-dd.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -268,11 +288,21 @@ cp %{SOURCE8} %{SOURCE9} . %patch225 -p1 %patch226 -p1 %patch227 -p1 -%patch228 -p1 %patch229 -p1 %patch230 -p1 %patch231 -p1 %patch232 -p1 +%patch233 -p1 +%patch234 -p1 +%patch235 -p1 +%patch236 -p1 +%patch237 -p1 +%patch238 -p1 +%patch239 -p1 +%patch240 -p1 +%patch241 -p1 -b .isfull +%patch242 -p1 + %build unset LINGUAS || : @@ -658,6 +688,19 @@ fi /sbin/losetup %changelog +* 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 + * 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 From 2b735b7247512d3ff8a9c8bc4cca10e8711af3b8 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Jun 2006 12:31:43 +0000 Subject: [PATCH 050/425] BuidReq... --- util-linux.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 89bd798..822f117 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -41,6 +41,8 @@ BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel >= 1.0.6 +BuildRequires: autoconf +BuildRequires: automake ### Sources # TODO [stable]: s/2.13-pre6/%{version}/ From e497d5ef9bc4ddc3bcb1ad6c37d35f0bb8b9ecb5 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Jun 2006 15:02:58 +0000 Subject: [PATCH 051/425] *** empty log message *** --- util-linux.spec | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 822f117..f77a2d7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,19 +30,19 @@ License: distributable Group: System Environment/Base ### Dependences -BuildRequires: sed -BuildRequires: pam-devel -BuildRequires: ncurses-devel -BuildRequires: libtermcap-devel -BuildRequires: zlib-devel -BuildRequires: slang-devel -BuildRequires: texinfo -BuildRequires: gettext-devel -BuildRequires: libselinux-devel -BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: audit-libs-devel >= 1.0.6 BuildRequires: autoconf BuildRequires: automake +BuildRequires: e2fsprogs-devel >= 1.36 +BuildRequires: gettext-devel +BuildRequires: libselinux-devel +BuildRequires: libtermcap-devel +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: sed +BuildRequires: slang-devel +BuildRequires: texinfo +BuildRequires: zlib-devel ### Sources # TODO [stable]: s/2.13-pre6/%{version}/ @@ -212,6 +212,8 @@ Patch241: util-linux-2.13-fdisk-isfull.patch # 181549 - raw(8) manpage has old information about dd Patch242: util-linux-2.12a-raw-man-dd.patch +Patch243: util-linux-2.13-swapon-debug.patch + # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. ########### END upstreamable @@ -305,6 +307,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch241 -p1 -b .isfull %patch242 -p1 +%patch243 -p1 %build unset LINGUAS || : From 4a69e1decc3411436f26c14d701c6746594dc942 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 12 Jun 2006 16:04:59 +0000 Subject: [PATCH 052/425] remove asm/page.h usage --- util-linux-2.13-swap-page.patch | 68 +++++++++++++++++++++++++++++++++ util-linux.spec | 8 ++-- 2 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 util-linux-2.13-swap-page.patch diff --git a/util-linux-2.13-swap-page.patch b/util-linux-2.13-swap-page.patch new file mode 100644 index 0000000..797f646 --- /dev/null +++ b/util-linux-2.13-swap-page.patch @@ -0,0 +1,68 @@ +--- util-linux-2.13-pre6/disk-utils/mkswap.c.page 2006-06-12 17:30:57.000000000 +0200 ++++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-06-12 17:30:31.000000000 +0200 +@@ -53,17 +53,6 @@ + #include + #endif + +-/* Try to get PAGE_SIZE from libc or kernel includes */ +-#ifdef HAVE_SYS_USER_H +- /* Note: says: for gdb only */ +-#include /* for PAGE_SIZE and PAGE_SHIFT */ +-#else +-#ifdef HAVE_ASM_PAGE_H +-#include /* for PAGE_SIZE and PAGE_SHIFT */ +- /* we also get PAGE_SIZE via getpagesize() */ +-#endif +-#endif +- + #ifndef _IO + /* pre-1.3.45 */ + #define BLKGETSIZE 0x1260 +@@ -172,10 +161,6 @@ + + static void + init_signature_page(void) { +- +-#ifdef PAGE_SIZE +- defined_pagesize = PAGE_SIZE; +-#endif + kernel_pagesize = getpagesize(); + pagesize = kernel_pagesize; + +--- util-linux-2.13-pre6/configure.ac.page 2006-06-12 17:28:51.000000000 +0200 ++++ util-linux-2.13-pre6/configure.ac 2006-06-12 17:28:28.000000000 +0200 +@@ -26,7 +26,8 @@ + ]) + AC_CHECK_HEADERS(langinfo.h) + AC_CHECK_HEADERS(sys/user.h) +-AC_CHECK_HEADERS(asm/page.h) ++# Suck ... ++#AC_CHECK_HEADERS(asm/page.h) + AC_CHECK_HEADERS(rpcsvc/nfs_prot.h) + AC_CHECK_HEADERS(sys/io.h) + AC_CHECK_HEADERS(pty.h) +--- util-linux-2.13-pre6/mount/swap.configure.page 2006-06-12 17:23:27.000000000 +0200 ++++ util-linux-2.13-pre6/mount/swap.configure 2006-06-12 17:25:28.000000000 +0200 +@@ -3,7 +3,7 @@ + + # Prepare test + CC=${CC-cc} +-compile="$CC -o conftest conftest.c >/dev/null 2>&1" ++compile="$CC -o conftest conftest.c" + rm -f conftest conftest.c swapargs.h + + # What include files shall we try? +@@ -14,9 +14,10 @@ + PAGEH= + if [ -f /usr/include/sys/swap.h ]; then + SWAPH="#include " +- if [ -f /usr/include/asm/page.h ]; then +- PAGEH="#include " +- fi ++ # Suck ... ++ #if [ -f /usr/include/asm/page.h ]; then ++ # PAGEH="#include " ++ #fi + fi + echo $PAGEH > conftest.c + echo $SWAPH >> conftest.c diff --git a/util-linux.spec b/util-linux.spec index f77a2d7..bd2c70f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -211,8 +211,8 @@ Patch240: util-linux-2.13-fdisk-sectors.patch Patch241: util-linux-2.13-fdisk-isfull.patch # 181549 - raw(8) manpage has old information about dd Patch242: util-linux-2.12a-raw-man-dd.patch - -Patch243: util-linux-2.13-swapon-debug.patch +# Don't use asm/page.h +Patch243: util-linux-2.13-swap-page.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -304,9 +304,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch238 -p1 %patch239 -p1 %patch240 -p1 -%patch241 -p1 -b .isfull +%patch241 -p1 %patch242 -p1 - %patch243 -p1 %build @@ -705,6 +704,7 @@ fi - 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 From 533859e046b4e78a5b276205593b6f91b9b09ac4 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 14 Jun 2006 14:49:17 +0000 Subject: [PATCH 053/425] Remove unneeded header files from nfsmount.c --- util-linux.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index bd2c70f..3258ae0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.25 +Release: 0.26 License: distributable Group: System Environment/Base @@ -213,6 +213,8 @@ Patch241: util-linux-2.13-fdisk-isfull.patch Patch242: util-linux-2.12a-raw-man-dd.patch # Don't use asm/page.h Patch243: util-linux-2.13-swap-page.patch +# Don't use linux/posix_types.h or asm/posix_types.h +Patch244: util-linux-2.13-nfs4-posix_types.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -307,6 +309,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch241 -p1 %patch242 -p1 %patch243 -p1 +%patch244 -p1 %build unset LINGUAS || : @@ -692,6 +695,9 @@ fi /sbin/losetup %changelog +* 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 From a7999ec0d79b111eeba1ed515d8ee78bfedf476f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 21 Jun 2006 12:51:10 +0000 Subject: [PATCH 054/425] - Only execute chcon on machines with selinux enabled --- util-linux.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 3258ae0..1d40704 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.26 +Release: 0.27 License: distributable Group: System Environment/Base @@ -501,7 +501,9 @@ touch /var/log/lastlog chown root:root /var/log/lastlog chmod 0644 /var/log/lastlog # Fix the file context, do not use restorecon -chcon `matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 +if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then + chcon `matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 +fi %postun if [ "$1" = 0 ]; then @@ -695,6 +697,9 @@ fi /sbin/losetup %changelog +* 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 From 169f41e73b77bcd46f648f6692b14c3eb5512f1b Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Mon, 26 Jun 2006 16:13:09 +0000 Subject: [PATCH 055/425] - move install-info from postun to preun --- util-linux.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 1d40704..bd8e544 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.27 +Release: 0.28 License: distributable Group: System Environment/Base @@ -505,10 +505,11 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then chcon `matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 fi -%postun +%preun if [ "$1" = 0 ]; then /sbin/install-info --del %{_infodir}/ipc.info* %{_infodir}/dir fi +exit 0 %files -f %{name}.lang %defattr(-,root,root) @@ -697,6 +698,9 @@ fi /sbin/losetup %changelog +* Mon Jun 26 2006 Florian La Roche +- 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 From 4e41baf9bc292aab65e3ed7a5dc0793f1d7b11a9 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 7 Jul 2006 09:32:01 +0000 Subject: [PATCH 056/425] include the raw command to RHELs builds --- util-linux.spec | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index bd8e544..0ee93dc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -4,13 +4,21 @@ # # Notes: # - upstream maintainer Adrian Bunk -# -# TODO: -# - remove deprecated the arch command (since release 2.13) -# + +### Header +Summary: A collection of basic system utilities. +Name: util-linux +Version: 2.13 +Release: 0.29 +License: distributable +Group: System Environment/Base ### Features +%if 0%{?rhel} +%define include_raw 1 +%else %define include_raw 0 +%endif ### Macros %define floppyver 0.12 @@ -21,14 +29,6 @@ BuildRoot: %{_tmppath}/%{name}-root # see build section for _prefix -### Header -Summary: A collection of basic system utilities. -Name: util-linux -Version: 2.13 -Release: 0.28 -License: distributable -Group: System Environment/Base - ### Dependences BuildRequires: audit-libs-devel >= 1.0.6 BuildRequires: autoconf @@ -290,7 +290,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch221 -p1 %patch222 -p1 %patch223 -p1 -%patch224 -p1 -b .selinux +%patch224 -p1 %patch225 -p1 %patch226 -p1 %patch227 -p1 @@ -698,7 +698,10 @@ exit 0 /sbin/losetup %changelog -* Mon Jun 26 2006 Florian La Roche +* 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 From 1e56b858ab87d755c44f8afa3b3c0f2d9a04e6c1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 10 Jul 2006 09:45:16 +0000 Subject: [PATCH 057/425] - silence install in minimal buildroot without /var/log matchpathcon(/var/log/lastlog) failed: No such file or directory error: %post(util-linux-2.13-0.29.x86_64) scriptlet failed, exit status 1 --- util-linux.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 0ee93dc..a6ec090 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.29 +Release: 0.30 License: distributable Group: System Environment/Base @@ -497,6 +497,8 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir %post /sbin/install-info %{_infodir}/ipc.info* %{_infodir}/dir +# only for minimal buildroots without /var/log +[ -d /var/log ] || mkdir -p /var/log touch /var/log/lastlog chown root:root /var/log/lastlog chmod 0644 /var/log/lastlog @@ -698,6 +700,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 0e8509e0544b5a48abf907b7733eb8cbd256660a Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 11 Jul 2006 08:52:07 +0000 Subject: [PATCH 058/425] cleanup Requires --- util-linux.spec | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index a6ec090..02b2f7d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.30 +Release: 0.31 License: distributable Group: System Environment/Base @@ -64,7 +64,9 @@ Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 Requires: pam >= 0.66-4, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 Conflicts: kernel < 2.2.12-7, -Prereq: /sbin/install-info +Requires(preun): /sbin/install-info +Requires(post): /sbin/install-info +Requires(post): coreutils Provides: mount = %{version} Provides: losetup = %{version} Provides: schedutils @@ -498,10 +500,10 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir %post /sbin/install-info %{_infodir}/ipc.info* %{_infodir}/dir # only for minimal buildroots without /var/log -[ -d /var/log ] || mkdir -p /var/log -touch /var/log/lastlog -chown root:root /var/log/lastlog -chmod 0644 /var/log/lastlog +[ -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 chcon `matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 @@ -700,6 +702,9 @@ exit 0 /sbin/losetup %changelog +* 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 From b7d2d653dc149d1ba8d5939f10db72c154e2dd84 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 12 Jul 2006 08:39:17 +0000 Subject: [PATCH 059/425] bumped for rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 02b2f7d..2dafcf3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.31 +Release: 0.31.1 License: distributable Group: System Environment/Base @@ -702,6 +702,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 4f8c2f9bd0b2105e003f42c84b01f5cca39e4c7c Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 17 Jul 2006 09:09:59 +0000 Subject: [PATCH 060/425] add IPv6 and keyring support --- util-linux-2.13-login-ipv6.patch | 79 ++++++++++++++++++++++++++++++++ util-linux.spec | 11 ++++- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-login-ipv6.patch diff --git a/util-linux-2.13-login-ipv6.patch b/util-linux-2.13-login-ipv6.patch new file mode 100644 index 0000000..928451e --- /dev/null +++ b/util-linux-2.13-login-ipv6.patch @@ -0,0 +1,79 @@ +--- util-linux-2.13-pre6/login-utils/login.c.ipv6 2006-07-17 11:05:48.000000000 +0200 ++++ util-linux-2.13-pre6/login-utils/login.c 2006-07-17 11:05:48.000000000 +0200 +@@ -173,7 +173,7 @@ + #ifdef HAVE_SECURITY_PAM_MISC_H + static struct passwd pwdcopy; + #endif +-char hostaddress[4]; /* used in checktty.c */ ++char hostaddress[16]; /* used in checktty.c */ + char *hostname; /* idem */ + static char *username, *tty_name, *tty_number; + static char thishost[100]; +@@ -281,7 +281,7 @@ + if (hostname) { + xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); + if (hostaddress[0]) +- memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); ++ memcpy(&ut.ut_addr_v6, hostaddress, sizeof(ut.ut_addr_v6)); + } + #if HAVE_UPDWTMP /* bad luck for ancient systems */ + updwtmp(_PATH_BTMP, &ut); +@@ -380,13 +380,32 @@ + + hostname = strdup(optarg); /* strdup: Ambrose C. Li */ + { +- struct hostent *he = gethostbyname(hostname); ++ struct addrinfo hints, *addr_info; ++ int k=0; ++ ++ memset(&hints, '\0', sizeof(hints)); ++ hints.ai_flags = AI_ADDRCONFIG; ++ ++ if (getaddrinfo(hostname, NULL, &hints, &addr_info) != 0) ++ fprintf(stderr, "getaddrinfo: %s\n", strerror(errno)); ++ ++ hostaddress[0] = 0; + +- /* he points to static storage; copy the part we use */ +- hostaddress[0] = 0; +- if (he && he->h_addr_list && he->h_addr_list[0]) +- memcpy(hostaddress, he->h_addr_list[0], +- sizeof(hostaddress)); ++ if (addr_info && (addr_info->ai_family == AF_INET)) ++ { ++ struct sockaddr_in *sa4; ++ ++ sa4 = (struct sockaddr_in *)addr_info->ai_addr; ++ memcpy(hostaddress, &(sa4->sin_addr), sizeof(sa4->sin_addr)); ++ } ++ if (addr_info && (addr_info->ai_family == AF_INET6)) ++ { ++ struct sockaddr_in6 *sa6; ++ ++ sa6 = (struct sockaddr_in6 *)addr_info->ai_addr; ++ memcpy(hostaddress, &(sa6->sin6_addr), sizeof(sa6->sin6_addr)); ++ } ++ freeaddrinfo(addr_info); + } + break; + +@@ -906,7 +925,7 @@ + if (hostname) { + xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); + if (hostaddress[0]) +- memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); ++ memcpy(&ut.ut_addr_v6, hostaddress, sizeof(ut.ut_addr_v6)); + } + + pututline(&ut); +--- util-linux-2.13-pre6/login-utils/login.h.ipv6 2005-08-02 14:01:18.000000000 +0200 ++++ util-linux-2.13-pre6/login-utils/login.h 2006-07-17 11:05:48.000000000 +0200 +@@ -1,7 +1,7 @@ + /* defined in login.c */ + extern void badlogin(const char *s); + extern void sleepexit(int); +-extern char hostaddress[4]; ++extern char hostaddress[16]; + extern char *hostname; + + /* defined in checktty.c */ diff --git a/util-linux.spec b/util-linux.spec index 2dafcf3..5d3792e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.31.1 +Release: 0.32 License: distributable Group: System Environment/Base @@ -217,6 +217,8 @@ Patch242: util-linux-2.12a-raw-man-dd.patch Patch243: util-linux-2.13-swap-page.patch # Don't use linux/posix_types.h or asm/posix_types.h Patch244: util-linux-2.13-nfs4-posix_types.patch +# IPv6 support to login command +Patch245: util-linux-2.13-login-ipv6.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -312,6 +314,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch242 -p1 %patch243 -p1 %patch244 -p1 +%patch245 -p1 %build unset LINGUAS || : @@ -702,6 +705,12 @@ exit 0 /sbin/losetup %changelog +* Mon Jul 17 2006 Karel Zak 2.13-0.32 +- add IPv6 support to the login command (patch by Milan Zazrivec) + +* Thu Jul 13 2006 David Howells +- fix #198626 - add keyinit instructions to the login PAM script + * Wed Jul 12 2006 Jesse Keating - 2.13-0.31.1 - rebuild From 76e4c8686fb12bdebccd10d9597122241e37a7df Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 17 Jul 2006 10:28:00 +0000 Subject: [PATCH 061/425] fix spec file --- util-linux.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 5d3792e..e99267d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -707,9 +707,8 @@ exit 0 %changelog * Mon Jul 17 2006 Karel Zak 2.13-0.32 - add IPv6 support to the login command (patch by Milan Zazrivec) - -* Thu Jul 13 2006 David Howells -- fix #198626 - add keyinit instructions to the login PAM script +- 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 From 791d8575e6bafb06d023e1e65c1a0f30531c0165 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 18 Jul 2006 21:00:39 +0000 Subject: [PATCH 062/425] fix dependences --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index e99267d..eabda19 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.32 +Release: 0.33 License: distributable Group: System Environment/Base @@ -67,6 +67,7 @@ Conflicts: kernel < 2.2.12-7, Requires(preun): /sbin/install-info Requires(post): /sbin/install-info Requires(post): coreutils +Requires(post): libselinux Provides: mount = %{version} Provides: losetup = %{version} Provides: schedutils @@ -705,6 +706,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 99bce927f8d50ee836d2549aced717abfa0dc99a Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 18 Jul 2006 22:19:58 +0000 Subject: [PATCH 063/425] use absolute paths in post script --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index eabda19..f3ac1de 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -510,7 +510,7 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir /bin/chmod 0644 /var/log/lastlog # Fix the file context, do not use restorecon if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - chcon `matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 + /usr/bin/chcon `/usr/sbin/matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 fi %preun From 73320c37d063b34a609b2cb117c62743b829a28d Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 26 Jul 2006 14:14:21 +0000 Subject: [PATCH 064/425] fix spec file --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index f3ac1de..e989989 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.33 +Release: 0.34 License: distributable Group: System Environment/Base @@ -706,6 +706,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 7afd131298beb1f0d7601e2957c1267936e94764 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Thu, 27 Jul 2006 17:40:34 +0000 Subject: [PATCH 065/425] Added the -o fsc flag to nfsmount. --- util-linux.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index e989989..d13b4b4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.34 +Release: 0.35 License: distributable Group: System Environment/Base @@ -220,6 +220,8 @@ Patch243: util-linux-2.13-swap-page.patch Patch244: util-linux-2.13-nfs4-posix_types.patch # IPv6 support to login command Patch245: util-linux-2.13-login-ipv6.patch +# fscache bits for NFS mounts +Patch246: util-linux-2.13-nfsmount-fsc.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -316,6 +318,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch243 -p1 %patch244 -p1 %patch245 -p1 +%patch246 -p1 %build unset LINGUAS || : @@ -706,6 +709,9 @@ exit 0 /sbin/losetup %changelog +* Thu Jul 27 2006 Steve Dickson 2.13-0.34 +- Added the -o fsc flag to nfsmount. + * Wed Jul 26 2006 Karel Zak 2.13-0.34 - rebuild From 6a938430388c2d171bf310225b4834b0f76185d7 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 27 Jul 2006 22:31:19 +0000 Subject: [PATCH 066/425] fix %post script --- util-linux.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index d13b4b4..3d38359 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.35 +Release: 0.36 License: distributable Group: System Environment/Base @@ -67,7 +67,7 @@ Conflicts: kernel < 2.2.12-7, Requires(preun): /sbin/install-info Requires(post): /sbin/install-info Requires(post): coreutils -Requires(post): libselinux + Provides: mount = %{version} Provides: losetup = %{version} Provides: schedutils @@ -513,7 +513,14 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir /bin/chmod 0644 /var/log/lastlog # Fix the file context, do not use restorecon if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - /usr/bin/chcon `/usr/sbin/matchpathcon -n /var/log/lastlog` /var/log/lastlog >/dev/null 2>&1 + 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 @@ -709,7 +716,10 @@ exit 0 /sbin/losetup %changelog -* Thu Jul 27 2006 Steve Dickson 2.13-0.34 +* 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 From 93a2f57302622ca54f635a537da2586fa58a3f39 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 10 Aug 2006 10:20:54 +0000 Subject: [PATCH 067/425] add timeval patch --- util-linux-2.13-login-timeval.patch | 49 +++++++++++++++++++++++++++++ util-linux.spec | 8 ++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-login-timeval.patch diff --git a/util-linux-2.13-login-timeval.patch b/util-linux-2.13-login-timeval.patch new file mode 100644 index 0000000..2f8e46a --- /dev/null +++ b/util-linux-2.13-login-timeval.patch @@ -0,0 +1,49 @@ + +On 64-bit platforms such as x86_64, glibc is usally built with 32-bit +compatibilty for various structures. One of them is utmp. + +What this means is that gettimeofday(&ut.ut_tv, NULL) on x86_64 will +end up overwriting the first parts of ut_addr_v6, leading to garbage +in the utmp file. + + +--- util-linux-2.13-pre6/login-utils/login.c.kzak 2006-08-10 11:38:33.000000000 +0200 ++++ util-linux-2.13-pre6/login-utils/login.c 2006-08-10 11:38:49.000000000 +0200 +@@ -257,6 +257,7 @@ + static void + logbtmp(const char *line, const char *username, const char *hostname) { + struct utmp ut; ++ struct timeval tv; + + memset(&ut, 0, sizeof(ut)); + +@@ -267,7 +268,9 @@ + xstrncpy(ut.ut_line, line, sizeof(ut.ut_line)); + + #if defined(_HAVE_UT_TV) /* in included by */ +- gettimeofday(&ut.ut_tv, NULL); ++ gettimeofday(&tv, NULL); ++ ut.ut_tv.tv_sec = tv.tv_sec; ++ ut.ut_tv.tv_usec = tv.tv_usec; + #else + { + time_t t; +@@ -872,6 +875,7 @@ + { + struct utmp ut; + struct utmp *utp; ++ struct timeval tv; + + utmpname(_PATH_UTMP); + setutent(); +@@ -911,7 +915,9 @@ + strncpy(ut.ut_user, username, sizeof(ut.ut_user)); + xstrncpy(ut.ut_line, tty_name, sizeof(ut.ut_line)); + #ifdef _HAVE_UT_TV /* in included by */ +- gettimeofday(&ut.ut_tv, NULL); ++ gettimeofday(&tv, NULL); ++ ut.ut_tv.tv_sec = tv.tv_sec; ++ ut.ut_tv.tv_usec = tv.tv_usec; + #else + { + time_t t; diff --git a/util-linux.spec b/util-linux.spec index 3d38359..4a03355 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.36 +Release: 0.37 License: distributable Group: System Environment/Base @@ -222,6 +222,8 @@ Patch244: util-linux-2.13-nfs4-posix_types.patch Patch245: util-linux-2.13-login-ipv6.patch # fscache bits for NFS mounts Patch246: util-linux-2.13-nfsmount-fsc.patch +# 176494 - last -i returns strange IP addresses +Patch247: util-linux-2.13-login-timeval.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -319,6 +321,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch244 -p1 %patch245 -p1 %patch246 -p1 +%patch247 -p1 %build unset LINGUAS || : @@ -716,6 +719,9 @@ exit 0 /sbin/losetup %changelog +* 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 From ae240430b0703fef22d266b884f34c487317531d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 10 Aug 2006 16:47:52 +0000 Subject: [PATCH 068/425] - Change keycreate line to happen after pam_selinux open call so it gets correct context --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 4a03355..c1953c8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.37 +Release: 0.38 License: distributable Group: System Environment/Base @@ -719,6 +719,9 @@ exit 0 /sbin/losetup %changelog +* 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) From 3c367f2f3cad735135b95542d03f4498d42ca9c9 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 11 Aug 2006 06:41:23 +0000 Subject: [PATCH 069/425] add ctrlaltdel-man.patch --- util-linux-2.13-ctrlaltdel-man.patch | 10 ++++++++++ util-linux.spec | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-ctrlaltdel-man.patch diff --git a/util-linux-2.13-ctrlaltdel-man.patch b/util-linux-2.13-ctrlaltdel-man.patch new file mode 100644 index 0000000..ab7c6bd --- /dev/null +++ b/util-linux-2.13-ctrlaltdel-man.patch @@ -0,0 +1,10 @@ +--- 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.spec b/util-linux.spec index c1953c8..d05adb3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.38 +Release: 0.39 License: distributable Group: System Environment/Base @@ -224,6 +224,8 @@ Patch245: util-linux-2.13-login-ipv6.patch Patch246: util-linux-2.13-nfsmount-fsc.patch # 176494 - last -i returns strange IP addresses Patch247: util-linux-2.13-login-timeval.patch +# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) +Patch248: util-linux-2.13-ctrlaltdel-man.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -322,6 +324,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch245 -p1 %patch246 -p1 %patch247 -p1 +%patch248 -p1 %build unset LINGUAS || : @@ -719,6 +722,9 @@ exit 0 /sbin/losetup %changelog +* 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 From bc3ff95282cef80507e6bfc3c54d1411228d8190 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 21 Aug 2006 16:24:02 +0000 Subject: [PATCH 070/425] fc6/rhel5 fixes --- util-linux-2.13-mount-context.patch | 126 +++++++++++++++------------- util-linux-login.pamd | 14 ++++ util-linux-remote.pamd | 14 ++++ util-linux.spec | 28 +++++-- 4 files changed, 118 insertions(+), 64 deletions(-) create mode 100644 util-linux-login.pamd create mode 100644 util-linux-remote.pamd diff --git a/util-linux-2.13-mount-context.patch b/util-linux-2.13-mount-context.patch index 6542b6a..9bf90f7 100644 --- a/util-linux-2.13-mount-context.patch +++ b/util-linux-2.13-mount-context.patch @@ -1,63 +1,10 @@ This patch adds to the mount man page docs about context, fscontext and -defcontext mount options and translate context options from human to raw -selinux context format. -- 03/30/2006 Karel Zak + defcontext mount options and translate context options from human to raw + selinux context format. -- 03/30/2006 Karel Zak ---- util-linux-2.13-pre7/mount/mount.8.cxt 2006-03-30 17:15:06.000000000 +0200 -+++ util-linux-2.13-pre7/mount/mount.8 2006-03-30 17:15:06.000000000 +0200 -@@ -661,6 +661,50 @@ - .BR noexec ", " nosuid ", and " nodev - (unless overridden by subsequent options, as in the option line - .BR users,exec,dev,suid ). -+.TP -+\fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP and \fBdefcontext=\fP\fIcontext\fP -+The -+.BR context= -+option is useful when mounting filesystems that do not support -+extended attributes, such as a floppy or hard disk formatted with VFAT, or -+systems that are not normally running under SELinux, such as an ext3 formatted -+disk from a non-SELinux workstation. You can also use -+.BR context= -+on filesystems you do not trust, such as a floppy. It also helps in compatibility with -+xattr-supporting filesystems on earlier 2.4. kernel versions. Even where -+xattrs are supported, you can save time not having to label every file by -+assigning the entire disk one security context. -+ -+A commonly used option for removable media is -+.BR context=system_u:object_r:removable_t . -+ -+Two other options are -+.BR fscontext= -+and -+.BR defcontext= , -+both of which are mutually exclusive of the context option. This means you -+can use fscontext and defcontext with each other, but neither can be used with -+context. -+ -+The -+.BR fscontext= -+option works for all filesystems, regardless of their xattr -+support. The fscontext option sets the overarching filesystem label to a -+specific security context. This filesystem label is separate from the -+individual labels on the files. It represents the entire filesystem for -+certain kinds of permission checks, such as during mount or file creation. -+Individual file labels are still obtained from the xattrs on the files -+themselves. The context option actually sets the aggregate context that -+fscontext provides, in addition to supplying the same label for individual -+files. -+ -+You can set the default security context for unlabeled files using -+.BR defcontext= -+option. This overrides the value set for unlabeled files in the policy and requires a -+file system that supports xattr labeling. -+ -+For more details see -+.BR selinux (8) - .RE - .TP - .B \-\-bind ---- util-linux-2.13-pre7/mount/mount.c.cxt 2006-03-30 17:15:06.000000000 +0200 -+++ util-linux-2.13-pre7/mount/mount.c 2006-03-30 20:16:57.000000000 +0200 +--- util-linux-2.13-pre6/mount/mount.c.kzak 2006-08-21 11:51:50.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-08-21 11:51:50.000000000 +0200 @@ -21,6 +21,11 @@ #include #include @@ -151,3 +98,68 @@ selinux context format. -- 03/30/2006 Karel Zak *extra_opts = xmalloc(len); **extra_opts = '\0'; +--- util-linux-2.13-pre6/mount/mount.8.kzak 2006-08-21 11:51:50.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.8 2006-08-21 11:51:50.000000000 +0200 +@@ -660,6 +660,50 @@ + .BR noexec ", " nosuid ", and " nodev + (unless overridden by subsequent options, as in the option line + .BR users,exec,dev,suid ). ++.TP ++\fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP and \fBdefcontext=\fP\fIcontext\fP ++The ++.BR context= ++option is useful when mounting filesystems that do not support ++extended attributes, such as a floppy or hard disk formatted with VFAT, or ++systems that are not normally running under SELinux, such as an ext3 formatted ++disk from a non-SELinux workstation. You can also use ++.BR context= ++on filesystems you do not trust, such as a floppy. It also helps in compatibility with ++xattr-supporting filesystems on earlier 2.4. kernel versions. Even where ++xattrs are supported, you can save time not having to label every file by ++assigning the entire disk one security context. ++ ++A commonly used option for removable media is ++.BR context=system_u:object_r:removable_t . ++ ++Two other options are ++.BR fscontext= ++and ++.BR defcontext= , ++both of which are mutually exclusive of the context option. This means you ++can use fscontext and defcontext with each other, but neither can be used with ++context. ++ ++The ++.BR fscontext= ++option works for all filesystems, regardless of their xattr ++support. The fscontext option sets the overarching filesystem label to a ++specific security context. This filesystem label is separate from the ++individual labels on the files. It represents the entire filesystem for ++certain kinds of permission checks, such as during mount or file creation. ++Individual file labels are still obtained from the xattrs on the files ++themselves. The context option actually sets the aggregate context that ++fscontext provides, in addition to supplying the same label for individual ++files. ++ ++You can set the default security context for unlabeled files using ++.BR defcontext= ++option. This overrides the value set for unlabeled files in the policy and requires a ++file system that supports xattr labeling. ++ ++For more details see ++.BR selinux (8) + .RE + .TP + .B \-\-bind +--- util-linux-2.13-pre6/mount/Makefile.am.kzak 2006-08-21 12:13:10.000000000 +0200 ++++ util-linux-2.13-pre6/mount/Makefile.am 2006-08-21 12:13:03.000000000 +0200 +@@ -37,6 +37,9 @@ + man_MANS += pivot_root.8 + endif + ++if HAVE_SELINUX ++mount_LDADD += -lselinux ++endif + + swapon.c: swapargs.h + diff --git a/util-linux-login.pamd b/util-linux-login.pamd new file mode 100644 index 0000000..1515a27 --- /dev/null +++ b/util-linux-login.pamd @@ -0,0 +1,14 @@ +#%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 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 optional pam_keyinit.so force revoke diff --git a/util-linux-remote.pamd b/util-linux-remote.pamd new file mode 100644 index 0000000..4cf49ea --- /dev/null +++ b/util-linux-remote.pamd @@ -0,0 +1,14 @@ +#%PAM-1.0 +auth required 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 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 optional pam_keyinit.so force revoke diff --git a/util-linux.spec b/util-linux.spec index d05adb3..6074b51 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.39 +Release: 0.40 License: distributable Group: System Environment/Base @@ -47,8 +47,9 @@ BuildRequires: zlib-devel ### Sources # TODO [stable]: s/2.13-pre6/%{version}/ Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre6.tar.bz2 -Source1: util-linux-selinux.pamd -Source2: util-linux-chsh-chfn.pamd +Source1: util-linux-login.pamd +Source2: util-linux-remote.pamd +Source3: util-linux-chsh-chfn.pamd Source8: nologin.c Source9: nologin.8 Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.gz @@ -441,9 +442,9 @@ gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/ipc.info { pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d install -m 644 %{SOURCE1} ./login - install -m 644 %{SOURCE1} ./remote - install -m 644 %{SOURCE2} ./chsh - install -m 644 %{SOURCE2} ./chfn + install -m 644 %{SOURCE2} ./remote + install -m 644 %{SOURCE3} ./chsh + install -m 644 %{SOURCE3} ./chfn popd } @@ -502,6 +503,13 @@ for I in addpart delpart partx; do 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 + # omit info/dir file rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir @@ -545,6 +553,7 @@ exit 0 %attr(755,root,root) /bin/login /bin/more /bin/kill +/bin/taskset %config %{_sysconfdir}/pam.d/chfn %config %{_sysconfdir}/pam.d/chsh @@ -580,7 +589,6 @@ exit 0 %{_bindir}/chrt %{_bindir}/ionice -%{_bindir}/taskset %{_bindir}/cal %attr(4711,root,root) %{_bindir}/chfn @@ -722,6 +730,12 @@ exit 0 /sbin/losetup %changelog +* 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) From 3e4b94e40bc9e45dfd9dcffb29cb0096b9c3f19d Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 15 Sep 2006 09:08:32 +0000 Subject: [PATCH 071/425] - some important FC6 bugfixes --- util-linux-2.13-mount-sloppy.patch | 20 ++++++++ util-linux-2.13-mount-twiceloop.patch | 72 +++++++++++++++------------ util-linux-2.13-mount-uhelper.patch | 49 ++++++++++++++++++ util-linux.spec | 14 +++++- 4 files changed, 123 insertions(+), 32 deletions(-) create mode 100644 util-linux-2.13-mount-sloppy.patch create mode 100644 util-linux-2.13-mount-uhelper.patch diff --git a/util-linux-2.13-mount-sloppy.patch b/util-linux-2.13-mount-sloppy.patch new file mode 100644 index 0000000..43b985c --- /dev/null +++ b/util-linux-2.13-mount-sloppy.patch @@ -0,0 +1,20 @@ +--- util-linux-2.13-pre6/mount/mount.c.sloppy 2006-09-15 08:39:53.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 08:43:24.000000000 +0200 +@@ -554,7 +554,7 @@ + if (stat(mountprog, &statbuf) == 0) { + res = fork(); + if (res == 0) { +- char *oo, *mountargs[10]; ++ char *oo, *mountargs[11]; + int i = 0; + + setuid(getuid()); +@@ -563,6 +563,8 @@ + mountargs[i++] = mountprog; + mountargs[i++] = spec; + mountargs[i++] = node; ++ if (sloppy && (strcmp(type, "nfs")==0 || strcmp(type, "nfs4")==0)) ++ mountargs[i++] = "-s"; + if (nomtab) + mountargs[i++] = "-n"; + if (verbose) diff --git a/util-linux-2.13-mount-twiceloop.patch b/util-linux-2.13-mount-twiceloop.patch index a82401a..f694bcf 100644 --- a/util-linux-2.13-mount-twiceloop.patch +++ b/util-linux-2.13-mount-twiceloop.patch @@ -1,35 +1,15 @@ ---- util-linux-2.13-pre6/mount/fstab.c.twiceloop 2006-01-03 18:35:05.000000000 +0100 -+++ util-linux-2.13-pre6/mount/fstab.c 2006-01-03 18:37:44.000000000 +0100 -@@ -254,6 +254,27 @@ - return (ct == 1); - } +--- util-linux-2.13-pre6/mount/fstab.h.twiceloop 2006-09-15 08:50:46.000000000 +0200 ++++ util-linux-2.13-pre6/mount/fstab.h 2006-09-15 08:51:10.000000000 +0200 +@@ -2,6 +2,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); -+/* -+ * 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-2.13-pre6/mount/mount.c.twiceloop 2006-01-03 18:35:06.000000000 +0100 -+++ util-linux-2.13-pre6/mount/mount.c 2006-01-03 18:37:44.000000000 +0100 + struct mntentchn { + struct mntentchn *nxt, *prev; +--- util-linux-2.13-pre6/mount/mount.c.twiceloop 2006-09-15 08:50:23.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 08:50:24.000000000 +0200 @@ -671,7 +671,7 @@ static int @@ -60,3 +40,33 @@ if (res) goto out; } +--- util-linux-2.13-pre6/mount/fstab.c.twiceloop 2006-09-15 08:50:23.000000000 +0200 ++++ util-linux-2.13-pre6/mount/fstab.c 2006-09-15 08:50:24.000000000 +0200 +@@ -254,6 +254,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) { diff --git a/util-linux-2.13-mount-uhelper.patch b/util-linux-2.13-mount-uhelper.patch new file mode 100644 index 0000000..b687591 --- /dev/null +++ b/util-linux-2.13-mount-uhelper.patch @@ -0,0 +1,49 @@ +--- util-linux-2.13-pre6/mount/umount.8.uhelper 2006-09-15 09:44:43.000000000 +0200 ++++ util-linux-2.13-pre6/mount/umount.8 2006-09-15 10:07:11.000000000 +0200 +@@ -122,6 +122,19 @@ + Any pending loop devices can be freed using `losetup -d', see + .BR losetup (8). + ++.SH NOTES ++The syntax of external umount helpers is: ++ ++.br ++.BI "/sbin/umount. [\-nlfvr] " "dir " | " device " ++.br ++ ++where the is filesystem type or a value from "uhelper=" mtab option. ++ ++The uhelper (unprivileged umount request helper) is possible used when non-root ++user wants to umount device which has been mounted by an external process (e.g. ++HAL) and there is not entry in fstab for this mountpoint. ++ + .SH FILES + .I /etc/mtab + table of mounted file systems +--- util-linux-2.13-pre6/mount/umount.c.uhelper 2006-09-15 09:11:38.000000000 +0200 ++++ util-linux-2.13-pre6/mount/umount.c 2006-09-15 09:44:10.000000000 +0200 +@@ -565,11 +565,24 @@ + + if (suid) { + char *mtab_user = NULL; ++ char *uhelper = NULL; + + if (!mc) + die(2, + _("umount: %s is not mounted (according to mtab)"), + file); ++ /* ++ * uhelper - unprivileged umount helper ++ * -- external umount (for example HAL mounts) ++ */ ++ if (mc->m.mnt_opts) ++ uhelper = get_value(mc->m.mnt_opts, "uhelper="); ++ if (uhelper) { ++ int status = 0; ++ if (check_special_umountprog(arg, arg, uhelper, &status)) ++ return status; ++ } ++ + /* The 2.4 kernel will generally refuse to mount the same + filesystem on the same mount point, but will accept NFS. + So, unmounting must be possible. */ diff --git a/util-linux.spec b/util-linux.spec index 6074b51..9d69ffe 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.40 +Release: 0.41 License: distributable Group: System Environment/Base @@ -227,6 +227,10 @@ Patch246: util-linux-2.13-nfsmount-fsc.patch Patch247: util-linux-2.13-login-timeval.patch # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) Patch248: util-linux-2.13-ctrlaltdel-man.patch +# 205038 - mount not allowing sloppy option +Patch249: util-linux-2.13-mount-sloppy.patch +# 188193 - util-linux should provide plugin infrastructure for HAL +Patch250: util-linux-2.13-mount-uhelper.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -326,6 +330,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch246 -p1 %patch247 -p1 %patch248 -p1 +%patch249 -p1 +%patch250 -p1 %build unset LINGUAS || : @@ -730,6 +736,12 @@ exit 0 /sbin/losetup %changelog +* 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 From 1d1cdb949ca55e1b7662d87d89e7201f7a8fd393 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 15 Sep 2006 12:09:25 +0000 Subject: [PATCH 072/425] fix previous commit --- util-linux-2.13-mount-uhelper.patch | 31 +++++++++++++++++++++++------ util-linux.spec | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/util-linux-2.13-mount-uhelper.patch b/util-linux-2.13-mount-uhelper.patch index b687591..0dbda6c 100644 --- a/util-linux-2.13-mount-uhelper.patch +++ b/util-linux-2.13-mount-uhelper.patch @@ -1,5 +1,24 @@ ---- util-linux-2.13-pre6/mount/umount.8.uhelper 2006-09-15 09:44:43.000000000 +0200 -+++ util-linux-2.13-pre6/mount/umount.8 2006-09-15 10:07:11.000000000 +0200 +--- util-linux-2.13-pre6/mount/mount.c.uhelper 2006-09-15 13:23:23.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 13:23:23.000000000 +0200 +@@ -183,7 +183,7 @@ + }; + + static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, +- *opt_speed, *opt_comment; ++ *opt_speed, *opt_comment, *opt_uhelper; + + static struct string_opt_map { + char *tag; +@@ -196,6 +196,7 @@ + { "encryption=", 0, &opt_encryption }, + { "speed=", 0, &opt_speed }, + { "comment=", 1, &opt_comment }, ++ { "uhelper=", 0, &opt_uhelper }, + { NULL, 0, NULL } + }; + +--- util-linux-2.13-pre6/mount/umount.8.uhelper 2004-11-10 20:49:37.000000000 +0100 ++++ util-linux-2.13-pre6/mount/umount.8 2006-09-15 14:02:25.000000000 +0200 @@ -122,6 +122,19 @@ Any pending loop devices can be freed using `losetup -d', see .BR losetup (8). @@ -14,14 +33,14 @@ +where the is filesystem type or a value from "uhelper=" mtab option. + +The uhelper (unprivileged umount request helper) is possible used when non-root -+user wants to umount device which has been mounted by an external process (e.g. -+HAL) and there is not entry in fstab for this mountpoint. ++user wants to umount a mountpoint which is not defined in the /etc/fstab file ++(e.g devices mounted by HAL). + .SH FILES .I /etc/mtab table of mounted file systems ---- util-linux-2.13-pre6/mount/umount.c.uhelper 2006-09-15 09:11:38.000000000 +0200 -+++ util-linux-2.13-pre6/mount/umount.c 2006-09-15 09:44:10.000000000 +0200 +--- util-linux-2.13-pre6/mount/umount.c.uhelper 2006-09-15 13:23:23.000000000 +0200 ++++ util-linux-2.13-pre6/mount/umount.c 2006-09-15 13:23:23.000000000 +0200 @@ -565,11 +565,24 @@ if (suid) { diff --git a/util-linux.spec b/util-linux.spec index 9d69ffe..09a100d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -331,7 +331,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch247 -p1 %patch248 -p1 %patch249 -p1 -%patch250 -p1 +%patch250 -p1 -b .uhelper %build unset LINGUAS || : From 859b4d5faa75619a7a0b091a340d96827fe4be0d Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 20 Sep 2006 14:26:00 +0000 Subject: [PATCH 073/425] remove obsolete NFS from mount code (we use mount.nfs from nfs-utils) --- util-linux-2.13-mount-man-bugs.patch | 13 -- util-linux-2.13-mount-man-nfs.patch | 84 ++++++++++++ util-linux-2.13-mount-man-nfs4.patch | 106 +++++++++++++++ util-linux-2.13-mount-nonfs.patch | 196 +++++++++++++++++++++++++++ util-linux.spec | 51 ++----- 5 files changed, 400 insertions(+), 50 deletions(-) create mode 100644 util-linux-2.13-mount-man-nfs.patch create mode 100644 util-linux-2.13-mount-man-nfs4.patch create mode 100644 util-linux-2.13-mount-nonfs.patch diff --git a/util-linux-2.13-mount-man-bugs.patch b/util-linux-2.13-mount-man-bugs.patch index 79c3b0f..59f8c8f 100644 --- a/util-linux-2.13-mount-man-bugs.patch +++ b/util-linux-2.13-mount-man-bugs.patch @@ -1,16 +1,3 @@ ---- util-linux-2.13-pre7/mount/nfs.5.bugs 2006-03-30 21:37:53.000000000 +0200 -+++ util-linux-2.13-pre7/mount/nfs.5 2006-03-30 21:38:13.000000000 +0200 -@@ -443,3 +443,10 @@ - .P - The umount command should notify the server - when an NFS filesystem is unmounted. -+.P -+Checking files on NFS filesystem referenced by file descriptors (i.e. the -+.BR fcntl -+and -+.BR ioctl -+families of functions) may lead to inconsistent result due to the lack of -+consistency check in kernel even if noac is used. --- util-linux-2.13-pre7/mount/mount.8.bugs 2006-03-30 21:36:56.000000000 +0200 +++ util-linux-2.13-pre7/mount/mount.8 2006-03-30 21:37:35.000000000 +0200 @@ -2047,6 +2047,23 @@ diff --git a/util-linux-2.13-mount-man-nfs.patch b/util-linux-2.13-mount-man-nfs.patch new file mode 100644 index 0000000..4c24f6c --- /dev/null +++ b/util-linux-2.13-mount-man-nfs.patch @@ -0,0 +1,84 @@ +--- util-linux-2.12p/mount/mount.8.nfsdoc 2005-05-10 11:46:25.119592000 -0400 ++++ util-linux-2.12p/mount/mount.8 2005-10-07 09:46:13.374277000 -0400 +@@ -1339,29 +1339,17 @@ For details, see + + Especially useful options include + .TP +-.B rsize=8192,wsize=8192 +-This will make your nfs connection faster than with the default +-buffer size of 4096. (NFSv2 does not work with larger values of +-.B rsize +-and +-.BR wsize .) +-.TP +-.B hard +-The program accessing a file on a NFS mounted file system will hang +-when the server crashes. The process cannot be interrupted or +-killed unless you also specify +-.BR intr . +-When the NFS server is back online the program will continue undisturbed +-from where it was. This is probably what you want. +-.TP +-.B soft +-This option allows the kernel to time out if the nfs server is not +-responding for some time. The time can be +-specified with +-.BR timeo=time . +-This option might be useful if your nfs server sometimes doesn't respond +-or will be rebooted while some process tries to get a file from the server. +-Usually it just causes lots of trouble. ++.B rsize=32768,wsize=32768 ++This causes the NFS client to try to negotiate a buffer size ++up to the size specified. ++A large buffer size does improve performance, but both the ++server and client have to support it. ++In the case where one of these does not support the size specified, ++the size negotiated will be the largest that both support. ++.TP ++.B intr ++This will allow NFS operations (on hard mounts) to be ++interrupted while waiting for a response from the server. + .TP + .B nolock + Do not use locking. Do not start lockd. +@@ -1408,30 +1396,16 @@ For details, see + Especially useful options include + .TP + .B rsize=32768,wsize=32768 +-This will make your NFS connection faster than with the default +-buffer size of 4096. +-.TP +-.B hard +-The program accessing a file on a NFS mounted file system will hang +-when the server crashes. The process cannot be interrupted or +-killed unless you also specify +-.BR intr . +-When the NFS server is back online the program will continue undisturbed +-from where it was. This is probably what you want. +-.TP +-.B soft +-This option allows the kernel to time out if the NFS server is not +-responding for some time. The time can be +-specified with +-.BR timeo=time . +-This timeout value is expressed in tenths of a second. +-The +-.BR soft +-option might be useful if your NFS server sometimes doesn't respond +-or will be rebooted while some process tries to get a file from the server. +-Avoid using this option with +-.BR proto=udp +-or with a short timeout. ++This causes the NFS4 client to try to negotiate a buffer size ++up to the size specified. ++A large buffer size does improve performance, but both the ++server and client have to support it. ++In the case where one of these does not support the size specified, ++the size negotiated will be the largest that both support. ++.TP ++.B intr ++This will allow NFS4 operations (on hard mounts) to be ++interrupted while waiting for a response from the server. + + .SH "Mount options for ntfs" + .TP diff --git a/util-linux-2.13-mount-man-nfs4.patch b/util-linux-2.13-mount-man-nfs4.patch new file mode 100644 index 0000000..98807d8 --- /dev/null +++ b/util-linux-2.13-mount-man-nfs4.patch @@ -0,0 +1,106 @@ +--- util-linux-2.13-pre2/mount/mount.8.nfsv4 2005-08-02 19:34:16.000000000 +0200 ++++ util-linux-2.13-pre2/mount/mount.8 2005-08-17 10:44:06.000000000 +0200 +@@ -384,6 +384,7 @@ + .IR msdos , + .IR ncpfs , + .IR nfs , ++.IR nfs4 , + .IR ntfs , + .IR proc , + .IR qnx4 , +@@ -421,7 +422,7 @@ + program has to do is issue a simple + .IR mount (2) + system call, and no detailed knowledge of the filesystem type is required. +-For a few types however (like nfs, smbfs, ncpfs) ad hoc code is ++For a few types however (like nfs, nfs4, smbfs, ncpfs) ad hoc code is + necessary. The nfs ad hoc code is built in, but smbfs and ncpfs + have a separate mount program. In order to make it possible to + treat all types in a uniform way, mount will execute the program +@@ -449,9 +450,10 @@ + All of the filesystem types listed there will be tried, + except for those that are labeled "nodev" (e.g., + .IR devpts , +-.I proc ++.IR proc , ++.IR nfs , + and +-.IR nfs ). ++.IR nfs4 ). + If + .I /etc/filesystems + ends in a line with a single * only, mount will read +@@ -1373,6 +1375,73 @@ + .B nolock + Do not use locking. Do not start lockd. + ++.SH "Mount options for nfs4" ++Instead of a textual option string, parsed by the kernel, the ++.I nfs4 ++file system expects a binary argument of type ++.IR "struct nfs4_mount_data" . ++The program ++.B mount ++itself parses the following options of the form `tag=value', ++and puts them in the structure mentioned: ++.BI rsize= n, ++.BI wsize= n, ++.BI timeo= n, ++.BI retrans= n, ++.BI acregmin= n, ++.BI acregmax= n, ++.BI acdirmin= n, ++.BI acdirmax= n, ++.BI actimeo= n, ++.BI retry= n, ++.BI port= n, ++.BI proto= n, ++.BI clientaddr= n, ++.BI sec= n. ++The option ++.BI addr= n ++is accepted but ignored. ++Also the following Boolean options, possibly preceded by ++.B no ++are recognized: ++.BR bg , ++.BR fg , ++.BR soft , ++.BR hard , ++.BR intr , ++.BR cto , ++.BR ac , ++For details, see ++.BR nfs (5). ++ ++Especially useful options include ++.TP ++.B rsize=32768,wsize=32768 ++This will make your NFS connection faster than with the default ++buffer size of 4096. ++.TP ++.B hard ++The program accessing a file on a NFS mounted file system will hang ++when the server crashes. The process cannot be interrupted or ++killed unless you also specify ++.BR intr . ++When the NFS server is back online the program will continue undisturbed ++from where it was. This is probably what you want. ++.TP ++.B soft ++This option allows the kernel to time out if the NFS server is not ++responding for some time. The time can be ++specified with ++.BR timeo=time . ++This timeout value is expressed in tenths of a second. ++The ++.BR soft ++option might be useful if your NFS server sometimes doesn't respond ++or will be rebooted while some process tries to get a file from the server. ++Avoid using this option with ++.BR proto=udp ++or with a short timeout. ++ + .SH "Mount options for ntfs" + .TP + .BI iocharset= name diff --git a/util-linux-2.13-mount-nonfs.patch b/util-linux-2.13-mount-nonfs.patch new file mode 100644 index 0000000..e2ccb2b --- /dev/null +++ b/util-linux-2.13-mount-nonfs.patch @@ -0,0 +1,196 @@ +--- util-linux-2.13-pre6/mount/Makefile.am.nonfs 2006-09-20 12:45:50.000000000 +0200 ++++ util-linux-2.13-pre6/mount/Makefile.am 2006-09-20 12:46:51.000000000 +0200 +@@ -1,15 +1,12 @@ + include $(top_srcdir)/config/include-Makefile.am + +-AM_CPPFLAGS += -DHAVE_NFS +- + bin_PROGRAMS = mount umount + sbin_PROGRAMS = losetup swapon +-man_MANS = fstab.5 nfs.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 ++man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 + + mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \ + get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ + getusername.c \ +- nfsmount.c nfsmount_xdr.c nfsmount_clnt.c \ + lomount.c + + mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a +--- util-linux-2.13-pre6/mount/sundries.c.nonfs 2006-09-20 12:53:09.000000000 +0200 ++++ util-linux-2.13-pre6/mount/sundries.c 2006-09-20 12:53:13.000000000 +0200 +@@ -15,7 +15,6 @@ + #include "fstab.h" + #include "sundries.h" + #include "realpath.h" +-#include "nfsmount.h" + #include "nls.h" + + char * +--- util-linux-2.13-pre6/mount/umount.c.nonfs 2006-09-20 12:51:11.000000000 +0200 ++++ util-linux-2.13-pre6/mount/umount.c 2006-09-20 12:52:26.000000000 +0200 +@@ -20,15 +20,6 @@ + #include "env.h" + #include "nls.h" + +-#include +-#include +-#include +-#include +-#include +-#include +-#include "nfsmount.h" +-#include +- + #if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) + /* Interesting ... it seems libc knows about MNT_FORCE and presumably + about umount2 as well -- need not do anything */ +@@ -144,98 +135,6 @@ + return 0; + } + +-static int xdr_dir(XDR *xdrsp, char *dirp) +-{ +- return (xdr_string(xdrsp, &dirp, MNTPATHLEN)); +-} +- +-static int +-nfs_umount_rpc_call(const char *spec, const char *opts) +-{ +- register CLIENT *clp; +- struct sockaddr_in saddr; +- struct timeval pertry, try; +- enum clnt_stat clnt_stat; +- int port = 0; +- int so = RPC_ANYSOCK; +- struct hostent *hostp; +- char *hostname; +- char *dirname; +- char *p; +- +- if (spec == NULL || (p = strchr(spec,':')) == NULL) +- return 0; +- hostname = xstrndup(spec, p-spec); +- dirname = xstrdup(p+1); +-#ifdef DEBUG +- printf(_("host: %s, directory: %s\n"), hostname, dirname); +-#endif +- +- if (opts && (p = strstr(opts, "addr="))) { +- char *q; +- +- free(hostname); +- p += 5; +- q = p; +- while (*q && *q != ',') q++; +- hostname = xstrndup(p,q-p); +- } +- +- if (opts && (p = strstr(opts, "mountport=")) && isdigit(*(p+10))) +- port = atoi(p+10); +- +- if (hostname[0] >= '0' && hostname[0] <= '9') +- saddr.sin_addr.s_addr = inet_addr(hostname); +- else { +- if ((hostp = gethostbyname(hostname)) == NULL) { +- fprintf(stderr, _("umount: can't get address for %s\n"), +- hostname); +- return 1; +- } +- if (hostp->h_length > sizeof(struct in_addr)) { +- fprintf(stderr, _("umount: got bad hostp->h_length\n")); +- hostp->h_length = sizeof(struct in_addr); +- } +- memcpy(&saddr.sin_addr, hostp->h_addr, hostp->h_length); +- } +- +- saddr.sin_family = AF_INET; +- saddr.sin_port = htons(port); +- pertry.tv_sec = 3; +- pertry.tv_usec = 0; +- if (opts && (p = strstr(opts, "tcp"))) { +- /* possibly: make sure option is not "notcp" +- possibly: try udp if tcp fails */ +- if ((clp = clnttcp_create(&saddr, MOUNTPROG, MOUNTVERS, +- &so, 0, 0)) == NULL) { +- clnt_pcreateerror("Cannot MOUNTPROG RPC (tcp)"); +- return 1; +- } +- } else { +- if ((clp = clntudp_create(&saddr, MOUNTPROG, MOUNTVERS, +- pertry, &so)) == NULL) { +- clnt_pcreateerror("Cannot MOUNTPROG RPC"); +- return 1; +- } +- } +- clp->cl_auth = authunix_create_default(); +- try.tv_sec = 20; +- try.tv_usec = 0; +- clnt_stat = clnt_call(clp, MOUNTPROC_UMNT, +- (xdrproc_t) xdr_dir, dirname, +- (xdrproc_t) xdr_void, (caddr_t) 0, +- try); +- +- if (clnt_stat != RPC_SUCCESS) { +- clnt_perror(clp, "Bad UMNT RPC"); +- return 1; +- } +- auth_destroy(clp->cl_auth); +- clnt_destroy(clp); +- +- return 0; +-} +- + /* complain about a failed umount */ + static void complain(int err, const char *dev) { + switch (err) { +@@ -289,11 +188,6 @@ + if (check_special_umountprog(spec, node, type, &status)) + return status; + +- /* Ignore any RPC errors, so that you can umount the filesystem +- if the server is down. */ +- if (strcasecmp(type, "nfs") == 0) +- nfs_umount_rpc_call(spec, opts); +- + umnt_err = umnt_err2 = 0; + if (lazy) { + res = umount2 (node, MNT_DETACH); +--- util-linux-2.13-pre6/mount/mount.c.nonfs 2006-09-20 12:48:48.000000000 +0200 ++++ util-linux-2.13-pre6/mount/mount.c 2006-09-20 12:48:33.000000000 +0200 +@@ -966,19 +966,6 @@ + goto out; + } + +- /* +- * Also nfs requires a separate program, but it is built in. +- */ +- if (!fake && types && streq (types, "nfs")) { +-retry_nfs: +- mnt_err = nfsmount (spec, node, &flags, &extra_opts, &mount_opts, +- &nfs_mount_version, bg); +- if (mnt_err) { +- res = mnt_err; +- goto out; +- } +- } +- + block_signals (SIG_BLOCK); + + if (!fake) { +@@ -1018,15 +1005,6 @@ + + block_signals (SIG_UNBLOCK); + +- if (mnt_err && types && streq (types, "nfs")) { +- if (nfs_mount_version == 4 && mnt_err != EBUSY && mnt_err != ENOENT) { +- if (verbose) +- printf(_("mount: failed with nfs mount version 4, trying 3..\n")); +- nfs_mount_version = 3; +- goto retry_nfs; +- } +- } +- + /* Mount failed, complain, but don't die. */ + + if (types == 0) { diff --git a/util-linux.spec b/util-linux.spec index 09a100d..216e449 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.41 +Release: 0.42 License: distributable Group: System Environment/Base @@ -109,13 +109,8 @@ Patch160: raw-handle-nonpresent-devs.patch Patch164: util-linux-2.12j-113790-hotkeys.patch -# patches required for NFSv4 support -Patch170: util-linux-2.13-nfsv4.patch -Patch171: util-linux-2.12a-mount-proto.patch -Patch172: util-linux-2.12a-nfsmount-overflow.patch -Patch173: util-linux-2.12a-nfsmount-reservp.patch -Patch174: util-linux-2.12p-nfsmount-rollback.patch - +# Info about NFS4 +Patch170: util-linux-2.13-mount-man-nfs4.patch # Makeing /var/log/lastlog (#151635) Patch180: util-linux-2.12p-login-lastlog.patch # Improved /etc/mtab lock (#143118) @@ -124,8 +119,6 @@ Patch181: util-linux-2.12p-mtab-lock.patch Patch182: util-linux-2.12p-ipcs-typo.patch # 154498 - util-linux login & pam session Patch183: util-linux-2.12a-pamsession.patch -# 155293 - man 5 nfs should include vers as a mount option -Patch184: util-linux-2.12p-nfsman.patch # 76467 - At boot time, fsck chokes on LVs listed by label in fstab Patch185: util-linux-2.12p-lvm2dupes-76467.patch # add note about ATAPI IDE floppy to fdformat.8 @@ -149,7 +142,7 @@ Patch206: util-linux-2.13-arch.patch # 165863 - swsusp swaps should be reinitialized Patch210: util-linux-2.13-swapon-suspend.patch # 170110 - Documentation for 'rsize' and 'wsize' NFS mount options is misleading -Patch211: util-linux-2.12p-nfs-manupdate.patch +Patch211: util-linux-2.13-mount-man-nfs.patch # 169628 - /usr/bin/floppy doesn't work with /dev/fd0 Patch212: util-linux-2.12p-floppy-generic.patch # 168436 - login will attempt to run if it has no read/write access to its terminal @@ -183,15 +176,6 @@ Patch225: util-linux-2.13-schedutils-man.patch Patch226: util-linux-2.13-login-pam-acct.patch # 177523 - umount -a should not unmount sysfs Patch227: util-linux-2.13-umount-sysfs.patch -# 169042 - Changed nfsmount to try udp before using tcp when rpc-ing -# the remote rpc.mountd (iff -o tcp is not specified). -Patch229: util-linux-2.13-nfsmount-mountd-udp.patch -# 151549 - Added 'noacl' mount flag -Patch230: util-linux-2.13-nfs-noacl.patch -# 183713 - foreground nfs mount timeout options to get hard mount semantic -Patch231: util-linux-2.13-nfsmount-retry.patch -# Adds syslog logging to background mounts -Patch232: util-linux-2.13-nfsmount-syslog.patch # 187014 - umount segfaults for normal user Patch233: util-linux-2.13-mount-uuid.patch # 183446 - cal not UTF-8-aware @@ -217,12 +201,8 @@ Patch241: util-linux-2.13-fdisk-isfull.patch Patch242: util-linux-2.12a-raw-man-dd.patch # Don't use asm/page.h Patch243: util-linux-2.13-swap-page.patch -# Don't use linux/posix_types.h or asm/posix_types.h -Patch244: util-linux-2.13-nfs4-posix_types.patch # IPv6 support to login command Patch245: util-linux-2.13-login-ipv6.patch -# fscache bits for NFS mounts -Patch246: util-linux-2.13-nfsmount-fsc.patch # 176494 - last -i returns strange IP addresses Patch247: util-linux-2.13-login-timeval.patch # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) @@ -231,6 +211,8 @@ Patch248: util-linux-2.13-ctrlaltdel-man.patch Patch249: util-linux-2.13-mount-sloppy.patch # 188193 - util-linux should provide plugin infrastructure for HAL Patch250: util-linux-2.13-mount-uhelper.patch +# Removes obsolete NFS code (we use /sbin/[u]mount.nfs[4] from nfs-utils) +Patch251: util-linux-2.13-mount-nonfs.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -272,16 +254,12 @@ cp %{SOURCE8} %{SOURCE9} . %patch160 -p1 %endif %patch164 -p1 + %patch170 -p1 -%patch171 -p1 -%patch172 -p1 -%patch173 -p1 -%patch174 -p1 %patch180 -p1 %patch181 -p1 %patch182 -p1 %patch183 -p1 -%patch184 -p1 %patch185 -p1 %patch186 -p1 %patch187 -p1 @@ -310,10 +288,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch225 -p1 %patch226 -p1 %patch227 -p1 -%patch229 -p1 -%patch230 -p1 -%patch231 -p1 -%patch232 -p1 %patch233 -p1 %patch234 -p1 %patch235 -p1 @@ -325,13 +299,12 @@ cp %{SOURCE8} %{SOURCE9} . %patch241 -p1 %patch242 -p1 %patch243 -p1 -%patch244 -p1 %patch245 -p1 -%patch246 -p1 %patch247 -p1 %patch248 -p1 %patch249 -p1 -%patch250 -p1 -b .uhelper +%patch250 -p1 +%patch251 -p1 %build unset LINGUAS || : @@ -727,7 +700,6 @@ exit 0 /sbin/swapon /sbin/swapoff %{_mandir}/man5/fstab.5* -%{_mandir}/man5/nfs.5* %{_mandir}/man8/mount.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* @@ -736,6 +708,11 @@ exit 0 /sbin/losetup %changelog +* 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) From 9e959b7e30878762bb4d207a9579f91068013257 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 22 Sep 2006 19:03:40 +0000 Subject: [PATCH 074/425] add %{?dist} to release --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 216e449..5986e7d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.42 +Release: 0.42%{?dist} License: distributable Group: System Environment/Base From f47effa044e0c9e1498912acbafa408f26b9c366 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sun, 1 Oct 2006 21:18:56 +0000 Subject: [PATCH 075/425] bump for gcc bug --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5986e7d..bf553e8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.42%{?dist} +Release: 0.43%{?dist} License: distributable Group: System Environment/Base @@ -708,6 +708,9 @@ exit 0 /sbin/losetup %changelog +* 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) From 04e2fdeac1e7633086a9add6a5db7510dc7ef824 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 12 Oct 2006 10:10:37 +0000 Subject: [PATCH 076/425] - 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 --- util-linux-2.13-login-ipv6.patch | 47 +++++++++--------- util-linux-2.13-losetup-all.patch | 24 ++++++++- util-linux-2.13-losetup-deprecated.patch | 13 +++++ util-linux-2.13-mkswap-mounted.patch | 62 ++++++++++++++++++++++++ util-linux.spec | 13 ++++- 5 files changed, 133 insertions(+), 26 deletions(-) create mode 100644 util-linux-2.13-losetup-deprecated.patch create mode 100644 util-linux-2.13-mkswap-mounted.patch diff --git a/util-linux-2.13-login-ipv6.patch b/util-linux-2.13-login-ipv6.patch index 928451e..5eba0c6 100644 --- a/util-linux-2.13-login-ipv6.patch +++ b/util-linux-2.13-login-ipv6.patch @@ -1,5 +1,5 @@ ---- util-linux-2.13-pre6/login-utils/login.c.ipv6 2006-07-17 11:05:48.000000000 +0200 -+++ util-linux-2.13-pre6/login-utils/login.c 2006-07-17 11:05:48.000000000 +0200 +--- util-linux-2.13-pre6/login-utils/login.c.ipv6 2006-10-12 10:10:34.000000000 +0200 ++++ util-linux-2.13-pre6/login-utils/login.c 2006-10-12 10:17:16.000000000 +0200 @@ -173,7 +173,7 @@ #ifdef HAVE_SECURITY_PAM_MISC_H static struct passwd pwdcopy; @@ -18,19 +18,15 @@ } #if HAVE_UPDWTMP /* bad luck for ancient systems */ updwtmp(_PATH_BTMP, &ut); -@@ -380,13 +380,32 @@ +@@ -380,13 +380,33 @@ hostname = strdup(optarg); /* strdup: Ambrose C. Li */ { - struct hostent *he = gethostbyname(hostname); -+ struct addrinfo hints, *addr_info; -+ int k=0; ++ struct addrinfo hints, *info = NULL; + + memset(&hints, '\0', sizeof(hints)); + hints.ai_flags = AI_ADDRCONFIG; -+ -+ if (getaddrinfo(hostname, NULL, &hints, &addr_info) != 0) -+ fprintf(stderr, "getaddrinfo: %s\n", strerror(errno)); + + hostaddress[0] = 0; @@ -39,25 +35,30 @@ - if (he && he->h_addr_list && he->h_addr_list[0]) - memcpy(hostaddress, he->h_addr_list[0], - sizeof(hostaddress)); -+ if (addr_info && (addr_info->ai_family == AF_INET)) ++ if (getaddrinfo(hostname, NULL, &hints, &info)==0 && info) + { -+ struct sockaddr_in *sa4; -+ -+ sa4 = (struct sockaddr_in *)addr_info->ai_addr; -+ memcpy(hostaddress, &(sa4->sin_addr), sizeof(sa4->sin_addr)); ++ if (info->ai_family == AF_INET) ++ { ++ struct sockaddr_in *sa4; ++ ++ sa4 = (struct sockaddr_in *) info->ai_addr; ++ memcpy(hostaddress, &(sa4->sin_addr), ++ sizeof(sa4->sin_addr)); ++ } ++ if (info->ai_family == AF_INET6) ++ { ++ struct sockaddr_in6 *sa6; ++ ++ sa6 = (struct sockaddr_in6 *) info->ai_addr; ++ memcpy(hostaddress, &(sa6->sin6_addr), ++ sizeof(sa6->sin6_addr)); ++ } ++ freeaddrinfo(info); + } -+ if (addr_info && (addr_info->ai_family == AF_INET6)) -+ { -+ struct sockaddr_in6 *sa6; -+ -+ sa6 = (struct sockaddr_in6 *)addr_info->ai_addr; -+ memcpy(hostaddress, &(sa6->sin6_addr), sizeof(sa6->sin6_addr)); -+ } -+ freeaddrinfo(addr_info); } break; -@@ -906,7 +925,7 @@ +@@ -906,7 +926,7 @@ if (hostname) { xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); if (hostaddress[0]) @@ -67,7 +68,7 @@ pututline(&ut); --- util-linux-2.13-pre6/login-utils/login.h.ipv6 2005-08-02 14:01:18.000000000 +0200 -+++ util-linux-2.13-pre6/login-utils/login.h 2006-07-17 11:05:48.000000000 +0200 ++++ util-linux-2.13-pre6/login-utils/login.h 2006-10-12 10:10:34.000000000 +0200 @@ -1,7 +1,7 @@ /* defined in login.c */ extern void badlogin(const char *s); diff --git a/util-linux-2.13-losetup-all.patch b/util-linux-2.13-losetup-all.patch index d9fed85..bd12f2e 100644 --- a/util-linux-2.13-losetup-all.patch +++ b/util-linux-2.13-losetup-all.patch @@ -1,5 +1,25 @@ ---- util-linux-2.13-pre2/mount/lomount.c.all 2005-08-29 16:59:06.000000000 +0200 -+++ util-linux-2.13-pre2/mount/lomount.c 2005-08-29 17:17:49.000000000 +0200 +--- util-linux-2.13-pre6/mount/losetup.8.all 2006-10-12 10:34:47.000000000 +0200 ++++ util-linux-2.13-pre6/mount/losetup.8 2006-10-12 10:37:35.000000000 +0200 +@@ -9,6 +9,8 @@ + .B losetup + .I loop_device + .sp ++.B losetup -a ++.sp + .in -5 + Delete loop: + .sp +@@ -66,6 +68,8 @@ + .B \-e + option.) + .SH OPTIONS ++.IP \fB\-a\fP ++Show status of all loop devices. + .IP \fB\-d\fP + Detach the file or device associated with the specified loop device. + .IP "\fB\-E \fIencryption_type\fP" +--- util-linux-2.13-pre6/mount/lomount.c.all 2004-12-20 23:11:04.000000000 +0100 ++++ util-linux-2.13-pre6/mount/lomount.c 2006-10-12 10:29:55.000000000 +0200 @@ -28,6 +28,8 @@ extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ extern void error (const char *fmt, ...); /* idem */ diff --git a/util-linux-2.13-losetup-deprecated.patch b/util-linux-2.13-losetup-deprecated.patch new file mode 100644 index 0000000..73e45c0 --- /dev/null +++ b/util-linux-2.13-losetup-deprecated.patch @@ -0,0 +1,13 @@ +--- util-linux-2.13-pre6/mount/losetup.8.kzak 2006-10-12 10:39:39.000000000 +0200 ++++ util-linux-2.13-pre6/mount/losetup.8 2006-10-12 10:40:04.000000000 +0200 +@@ -133,6 +133,10 @@ + .fi + .SH RESTRICTION + DES encryption is painfully slow. On the other hand, XOR is terribly weak. ++ ++Cryptoloop is deprecated and unmaintained in 2.6 kernels. Use dm-crypt. For ++more details see ++.B cryptsetup(8). + .\" .SH AUTHORS + .\" .nf + .\" Original version: Theodore Ts'o diff --git a/util-linux-2.13-mkswap-mounted.patch b/util-linux-2.13-mkswap-mounted.patch new file mode 100644 index 0000000..cc78b7d --- /dev/null +++ b/util-linux-2.13-mkswap-mounted.patch @@ -0,0 +1,62 @@ +--- util-linux-2.13-pre6/disk-utils/mkswap.c.kzak 2006-10-12 11:33:50.000000000 +0200 ++++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-10-12 11:36:08.000000000 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include /* for _IO */ + #include + #include +@@ -485,6 +486,29 @@ + return (c >= '1' && c <= '9'); + } + ++ ++/* ++ * Check to make certain that our new filesystem won't be created on ++ * an already mounted partition. Code adapted from mke2fs, Copyright ++ * (C) 1994 Theodore Ts'o. Also licensed under GPL. ++ * (C) 2006 Karel Zak -- port to mkswap ++ */ ++static int ++check_mount(void) { ++ FILE * f; ++ struct mntent * mnt; ++ ++ if ((f = setmntent (MOUNTED, "r")) == NULL) ++ return 0; ++ while ((mnt = getmntent (f)) != NULL) ++ if (strcmp (device_name, mnt->mnt_fsname) == 0) ++ break; ++ endmntent (f); ++ if (!mnt) ++ return 0; ++ return 1; ++} ++ + int + main(int argc, char ** argv) { + struct stat statbuf; +@@ -648,8 +672,19 @@ + /* Want a block device. Probably not /dev/hda or /dev/hdb. */ + if (!S_ISBLK(statbuf.st_mode)) + check=0; +- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) +- die(_("Will not try to make swapdevice on '%s'")); ++ else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) { ++ fprintf(stderr, ++ _("%s: error: " ++ "will not try to make swapdevice on '%s'\n"), ++ program_name, device_name); ++ exit(1); ++ } else if (check_mount()) { ++ fprintf(stderr, ++ _("%s: error: " ++ "%s is mounted; will not make swapspace.\n"), ++ program_name, device_name); ++ exit(1); ++ } + + #ifdef __sparc__ + if (!force && version == 0) { diff --git a/util-linux.spec b/util-linux.spec index bf553e8..82ff3b9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.43%{?dist} +Release: 0.44%{?dist} License: distributable Group: System Environment/Base @@ -213,6 +213,10 @@ Patch249: util-linux-2.13-mount-sloppy.patch Patch250: util-linux-2.13-mount-uhelper.patch # Removes obsolete NFS code (we use /sbin/[u]mount.nfs[4] from nfs-utils) Patch251: util-linux-2.13-mount-nonfs.patch +# Losetup.8 update -- add info about dm-crypt +Patch252: util-linux-2.13-losetup-deprecated.patch +# 208634 - mkswap "works" without warning on a mounted device +Patch253: util-linux-2.13-mkswap-mounted.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -305,6 +309,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch249 -p1 %patch250 -p1 %patch251 -p1 +%patch252 -p1 +%patch253 -p1 -b .kzak %build unset LINGUAS || : @@ -708,6 +714,11 @@ exit 0 /sbin/losetup %changelog +* 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 From 894b42f522e0e5bb5f61d371bab6239a8a78ac83 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 14 Dec 2006 12:42:01 +0000 Subject: [PATCH 077/425] - 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 - Resolves: rhbz#218915 rhbz#217186 rhbz#216489 rhbz#216712 rhbz#216760 rhbz#211827 rhbz#213127 rhbz#211749 --- .cvsignore | 2 +- sources | 2 +- util-linux-2.12a-mount-man-cifs.patch | 11 -- util-linux-2.13-fdisk-b-4096.patch | 15 +++ util-linux-2.13-losetup-rdonly.patch | 47 +++++++ util-linux-2.13-mkdir_p.patch | 122 +++++++++++++++++++ util-linux-2.13-mount-comment.patch | 14 +++ util-linux-2.13-mount-context.patch | 117 +++++++++++++----- util-linux-2.13-mount-man-nfs4.patch | 18 +-- util-linux-2.13-raw-raw0.patch | 45 +++++++ util-linux-2.13-schedutils-SCHED_BATCH.patch | 102 ++++++++++++++++ util-linux-60-raw.rules | 11 ++ util-linux.spec | 79 +++++++++--- 13 files changed, 514 insertions(+), 71 deletions(-) create mode 100644 util-linux-2.13-fdisk-b-4096.patch create mode 100644 util-linux-2.13-losetup-rdonly.patch create mode 100644 util-linux-2.13-mkdir_p.patch create mode 100644 util-linux-2.13-mount-comment.patch create mode 100644 util-linux-2.13-raw-raw0.patch create mode 100644 util-linux-2.13-schedutils-SCHED_BATCH.patch create mode 100644 util-linux-60-raw.rules diff --git a/.cvsignore b/.cvsignore index 9d34935..fe49e67 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.12.tar.gz -util-linux-2.13-pre6.tar.bz2 +util-linux-2.13-pre7.tar.bz2 diff --git a/sources b/sources index bf8417d..dcc01f1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz -1db1249029439e5e965c2c7178149616 util-linux-2.13-pre6.tar.bz2 +13cdf4b76533e8421dc49de188f85291 util-linux-2.13-pre7.tar.bz2 diff --git a/util-linux-2.12a-mount-man-cifs.patch b/util-linux-2.12a-mount-man-cifs.patch index 185cc0d..df673ef 100644 --- a/util-linux-2.12a-mount-man-cifs.patch +++ b/util-linux-2.12a-mount-man-cifs.patch @@ -1,16 +1,5 @@ --- util-linux-2.12a/mount/mount.8.cifs 2005-11-23 16:34:34.000000000 +0100 +++ util-linux-2.12a/mount/mount.8 2005-11-23 16:38:37.000000000 +0100 -@@ -413,8 +413,8 @@ - program has to do is issue a simple - .IR mount (2) - system call, and no detailed knowledge of the filesystem type is required. --For a few types however (like nfs, nfs4, smbfs, ncpfs) ad hoc code is --necessary. The nfs ad hoc code is built in, but smbfs and ncpfs -+For a few types however (like nfs, nfs4, smbfs, ncpfs, cifs) ad hoc code is -+necessary. The nfs ad hoc code is built in, but smbfs, ncpfs and cifs - have a separate mount program. In order to make it possible to - treat all types in a uniform way, mount will execute the program - .I /sbin/mount.TYPE @@ -720,6 +720,16 @@ (However, quota utilities may react to such strings in .IR /etc/fstab .) diff --git a/util-linux-2.13-fdisk-b-4096.patch b/util-linux-2.13-fdisk-b-4096.patch new file mode 100644 index 0000000..b2dde20 --- /dev/null +++ b/util-linux-2.13-fdisk-b-4096.patch @@ -0,0 +1,15 @@ + + The "-b" option allows to manually define size of sector size. We need to support + 4096 bytes for really huge disks. [kzak 12/14/2006] + +--- util-linux-2.13-pre7/fdisk/fdisk.c.kzak 2006-12-14 10:21:57.000000000 +0100 ++++ util-linux-2.13-pre7/fdisk/fdisk.c 2006-12-14 10:22:21.000000000 +0100 +@@ -2491,7 +2491,7 @@ + */ + 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-2.13-losetup-rdonly.patch b/util-linux-2.13-losetup-rdonly.patch new file mode 100644 index 0000000..19e9f13 --- /dev/null +++ b/util-linux-2.13-losetup-rdonly.patch @@ -0,0 +1,47 @@ +--- util-linux-2.13-pre6/mount/lomount.c.ronly 2006-11-01 14:14:14.000000000 +0100 ++++ util-linux-2.13-pre6/mount/lomount.c 2006-11-01 15:01:52.000000000 +0100 +@@ -444,7 +444,8 @@ + " %1$s -d loop_device # delete\n" + " %1$s -f # find unused\n" + " %1$s -a # list all used\n" +- " %1$s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), ++ " %1$s -r # read-only loop\n" ++ " %1$s [-e encryption] [-o offset] [-r] {-f|loop_device} file # setup\n"), + progname); + exit(1); + } +@@ -497,11 +498,14 @@ + if ((p = strrchr(progname, '/')) != NULL) + progname = p+1; + +- while ((c = getopt(argc, argv, "ade:E:fo:p:v")) != -1) { ++ while ((c = getopt(argc, argv, "ade:E:fo:p:vr")) != -1) { + switch (c) { + case 'a': + all = 1; + break; ++ case 'r': ++ ro = 1; ++ break; + case 'd': + delete = 1; + break; +--- util-linux-2.13-pre6/mount/losetup.8.ronly 2006-11-01 14:49:14.000000000 +0100 ++++ util-linux-2.13-pre6/mount/losetup.8 2006-11-01 15:06:21.000000000 +0100 +@@ -35,6 +35,7 @@ + .IR offset ] + .RB [ \-p + .IR pfd ] ++.RB [ \-r ] + .in +8 + .RB { \-f | \fIloop_device\fP } + .I file +@@ -87,6 +88,8 @@ + Read the passphrase from file descriptor with number + .I num + instead of from the terminal. ++.IP \fB\-r\fP ++Setup read-only loop device. + .SH RETURN VALUE + .B losetup + returns 0 on success, nonzero on failure. When diff --git a/util-linux-2.13-mkdir_p.patch b/util-linux-2.13-mkdir_p.patch new file mode 100644 index 0000000..26452cb --- /dev/null +++ b/util-linux-2.13-mkdir_p.patch @@ -0,0 +1,122 @@ +--- util-linux-2.13-pre6/po/Makefile.in.in.mkdir_p 2005-10-14 22:22:14.000000000 +0200 ++++ util-linux-2.13-pre6/po/Makefile.in.in 2006-10-24 22:48:30.000000000 +0200 +@@ -1,5 +1,5 @@ + # Makefile for PO directory in any package using GNU gettext. +-# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper ++# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper + # + # This file can be copied and used freely without restrictions. It can + # be used in projects which are not available under the GNU General Public +@@ -8,7 +8,7 @@ + # Please note that the actual code of GNU gettext is covered by the GNU + # General Public License and is *not* in the public domain. + # +-# Origin: gettext-0.14.4 ++# Origin: gettext-0.16 + + PACKAGE = @PACKAGE@ + VERSION = @VERSION@ +@@ -23,18 +23,38 @@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-datadir = $(prefix)/usr/share +-localedir = $(datadir)/locale ++datarootdir = @datarootdir@ ++datadir = @datadir@ ++localedir = @localedir@ + gettextsrcdir = $(datadir)/gettext/po + + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ +-MKINSTALLDIRS = @MKINSTALLDIRS@ +-mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +-GMSGFMT = @GMSGFMT@ +-MSGFMT = @MSGFMT@ +-XGETTEXT = @XGETTEXT@ ++# We use $(mkdir_p). ++# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as ++# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, ++# @install_sh@ does not start with $(SHELL), so we add it. ++# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined ++# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake ++# versions, $(mkinstalldirs) and $(install_sh) are unused. ++mkinstalldirs = $(SHELL) @install_sh@ -d ++install_sh = $(SHELL) @install_sh@ ++MKDIR_P = @MKDIR_P@ ++mkdir_p = @mkdir_p@ ++ ++GMSGFMT_ = @GMSGFMT@ ++GMSGFMT_no = @GMSGFMT@ ++GMSGFMT_yes = @GMSGFMT_015@ ++GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) ++MSGFMT_ = @MSGFMT@ ++MSGFMT_no = @MSGFMT@ ++MSGFMT_yes = @MSGFMT_015@ ++MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) ++XGETTEXT_ = @XGETTEXT@ ++XGETTEXT_no = @XGETTEXT@ ++XGETTEXT_yes = @XGETTEXT_015@ ++XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) + MSGMERGE = msgmerge + MSGMERGE_UPDATE = @MSGMERGE@ --update + MSGINIT = msginit +@@ -158,7 +178,7 @@ + install-exec: + install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ +- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ ++ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ +@@ -171,13 +191,13 @@ + fi + install-data-no: all + install-data-yes: all +- $(mkinstalldirs) $(DESTDIR)$(datadir) ++ $(mkdir_p) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ +- $(mkinstalldirs) $(DESTDIR)$$dir; \ ++ $(mkdir_p) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ +@@ -217,19 +237,19 @@ + installdirs-exec: + installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ +- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ ++ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi + installdirs-data-no: + installdirs-data-yes: +- $(mkinstalldirs) $(DESTDIR)$(datadir) ++ $(mkdir_p) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ +- $(mkinstalldirs) $(DESTDIR)$$dir; \ ++ $(mkdir_p) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ +@@ -374,8 +394,7 @@ + + Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ +- && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ +- $(SHELL) ./config.status ++ && $(SHELL) ./config.status $(subdir)/$@.in po-directories + + force: + diff --git a/util-linux-2.13-mount-comment.patch b/util-linux-2.13-mount-comment.patch new file mode 100644 index 0000000..04ef9ad --- /dev/null +++ b/util-linux-2.13-mount-comment.patch @@ -0,0 +1,14 @@ + + The original MS_COMMENT is in conflict with MS_UNBINDABLE. + +--- util-linux-2.13-pre6/mount/mount.c.comment 2006-11-01 13:31:45.000000000 +0100 ++++ util-linux-2.13-pre6/mount/mount.c 2006-11-01 13:31:38.000000000 +0100 +@@ -106,7 +106,7 @@ + #define MS_OWNER 0x10000000 + #define MS_GROUP 0x08000000 + #define MS_PAMCONSOLE 0x04000000 +-#define MS_COMMENT 0x00020000 ++#define MS_COMMENT 0x02000000 + #define MS_LOOP 0x00010000 + + diff --git a/util-linux-2.13-mount-context.patch b/util-linux-2.13-mount-context.patch index 9bf90f7..a239aab 100644 --- a/util-linux-2.13-mount-context.patch +++ b/util-linux-2.13-mount-context.patch @@ -1,10 +1,17 @@ - - This patch adds to the mount man page docs about context, fscontext and - defcontext mount options and translate context options from human to raw - selinux context format. -- 03/30/2006 Karel Zak - ---- util-linux-2.13-pre6/mount/mount.c.kzak 2006-08-21 11:51:50.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-08-21 11:51:50.000000000 +0200 +--- util-linux-2.13-pre6/mount/Makefile.am.context 2005-09-12 22:41:11.000000000 +0200 ++++ util-linux-2.13-pre6/mount/Makefile.am 2006-11-01 11:31:46.000000000 +0100 +@@ -37,6 +37,9 @@ + man_MANS += pivot_root.8 + endif + ++if HAVE_SELINUX ++mount_LDADD += -lselinux ++endif + + swapon.c: swapargs.h + +--- util-linux-2.13-pre6/mount/mount.c.context 2006-11-01 11:31:46.000000000 +0100 ++++ util-linux-2.13-pre6/mount/mount.c 2006-11-01 11:36:17.000000000 +0100 @@ -21,6 +21,11 @@ #include #include @@ -17,20 +24,40 @@ #include "mount_blkid.h" #include "mount_constants.h" #include "sundries.h" -@@ -255,6 +260,49 @@ +@@ -255,13 +260,79 @@ free((void *) s); } +#ifdef HAVE_LIBSELINUX ++/* strip quotes from a "string" ++ * Warning: This function modify the "str" argument. ++ */ ++static char * ++strip_quotes(char *str) ++{ ++ char *end = NULL; ++ ++ if (*str != '"') ++ return str; ++ ++ end = strrchr(str, '"'); ++ if (end == NULL || end == str) ++ die (EX_USAGE, _("mount: improperly quoted option string '%s'"), str); ++ ++ *end = '\0'; ++ return str+1; ++} ++ +/* translates SELinux context from human to raw format and + * appends it to the mount extra options. + * + * returns -1 on error and 0 on success + */ +static int -+append_context(const char *optname, const char *optdata, char *extra_opts, int *len) ++append_context(const char *optname, char *optdata, char *extra_opts, int *len) +{ + security_context_t raw = NULL; ++ char *data = NULL; + char *buf = NULL; + int bufsz; + @@ -41,19 +68,22 @@ + if (optdata==NULL || *optdata=='\0' || optname==NULL) + return -1; + ++ /* TODO: use strip_quotes() for all mount options? */ ++ data = *optdata =='"' ? strip_quotes(optdata) : optdata; ++ + if (selinux_trans_to_raw_context( -+ (security_context_t) optdata, &raw)==-1 || -+ raw==NULL) ++ (security_context_t) data, &raw)==-1 || ++ raw==NULL) + return -1; + + if (verbose) + printf(_("mount: translated %s '%s' to '%s'\n"), -+ optname, optdata, (char *) raw); -+ -+ bufsz = strlen(optname) + strlen(raw) + 2; /* 2 is \0 and '=' */ ++ optname, data, (char *) raw); ++ // TODO 2.6.19: context options with commans are unsupported by kernel now ;-( ++ bufsz = strlen(optname) + strlen(raw) + 2; // bufsz = strlen(optname) + strlen(raw) + 4; /* 4 is \0, '=' and 2x '"' */ + buf = xmalloc(bufsz); + -+ snprintf(buf, bufsz, "%s=%s", optname, (char *) raw); ++ snprintf(buf, bufsz, "%s=%s", optname, (char *) raw); // snprintf(buf, bufsz, "%s=\"%s\"", optname, (char *) raw); + freecon(raw); + + if ((*len -= bufsz-1) > 0) @@ -67,7 +97,15 @@ /* * Look for OPT in opt_map table and return mask value. * If OPT isn't found, tack it onto extra_opts (which is non-NULL). -@@ -313,7 +361,20 @@ + * For the options uid= and gid= replace user or group name by its value. + */ + static inline void +-parse_opt(const char *opt, int *mask, char *extra_opts, int len) { ++parse_opt(char *opt, int *mask, char *extra_opts, int len) { + const struct opt_map *om; + + for (om = opt_map; om->opt != NULL; om++) +@@ -313,7 +384,20 @@ return; } } @@ -89,17 +127,44 @@ if ((len -= strlen(opt)) > 0) strcat(extra_opts, opt); } -@@ -330,7 +391,7 @@ +@@ -329,16 +413,29 @@ + if (options != NULL) { char *opts = xstrdup(options); - char *opt; +- char *opt; - int len = strlen(opts) + 20; + int len = strlen(opts) + 256; ++ int open_quote = 0; ++ char *opt, *p; *extra_opts = xmalloc(len); **extra_opts = '\0'; ---- util-linux-2.13-pre6/mount/mount.8.kzak 2006-08-21 11:51:50.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.8 2006-08-21 11:51:50.000000000 +0200 + +- for (opt = strtok(opts, ","); opt; opt = strtok(NULL, ",")) +- if (!parse_string_opt(opt)) +- parse_opt(opt, flags, *extra_opts, len); +- ++ for (p=opts, opt=NULL; p && *p; p++) { ++ if (!opt) ++ opt = p; /* begin of the option item */ ++ if (*p == '"') ++ open_quote ^= 1; /* reverse the status */ ++ if (open_quote) ++ continue; /* still in quoted block */ ++ if (*p == ',') ++ *p = '\0'; /* terminate the option item */ ++ /* end of option item or last item */ ++ if (*p == '\0' || *(p+1) == '\0') { ++ if (!parse_string_opt(opt)) ++ parse_opt(opt, flags, *extra_opts, len); ++ opt = NULL; ++ } ++ } + free(opts); + } + +--- util-linux-2.13-pre6/mount/mount.8.context 2006-11-01 11:31:46.000000000 +0100 ++++ util-linux-2.13-pre6/mount/mount.8 2006-11-01 11:31:46.000000000 +0100 @@ -660,6 +660,50 @@ .BR noexec ", " nosuid ", and " nodev (unless overridden by subsequent options, as in the option line @@ -151,15 +216,3 @@ .RE .TP .B \-\-bind ---- util-linux-2.13-pre6/mount/Makefile.am.kzak 2006-08-21 12:13:10.000000000 +0200 -+++ util-linux-2.13-pre6/mount/Makefile.am 2006-08-21 12:13:03.000000000 +0200 -@@ -37,6 +37,9 @@ - man_MANS += pivot_root.8 - endif - -+if HAVE_SELINUX -+mount_LDADD += -lselinux -+endif - - swapon.c: swapargs.h - diff --git a/util-linux-2.13-mount-man-nfs4.patch b/util-linux-2.13-mount-man-nfs4.patch index 98807d8..07d4811 100644 --- a/util-linux-2.13-mount-man-nfs4.patch +++ b/util-linux-2.13-mount-man-nfs4.patch @@ -1,6 +1,6 @@ ---- util-linux-2.13-pre2/mount/mount.8.nfsv4 2005-08-02 19:34:16.000000000 +0200 -+++ util-linux-2.13-pre2/mount/mount.8 2005-08-17 10:44:06.000000000 +0200 -@@ -384,6 +384,7 @@ +--- util-linux-2.13-pre7/mount/mount.8.man-nfs4 2006-03-06 00:04:37.000000000 +0100 ++++ util-linux-2.13-pre7/mount/mount.8 2006-12-14 00:30:33.000000000 +0100 +@@ -385,6 +385,7 @@ .IR msdos , .IR ncpfs , .IR nfs , @@ -8,16 +8,16 @@ .IR ntfs , .IR proc , .IR qnx4 , -@@ -421,7 +422,7 @@ +@@ -422,7 +423,7 @@ program has to do is issue a simple .IR mount (2) system call, and no detailed knowledge of the filesystem type is required. --For a few types however (like nfs, smbfs, ncpfs) ad hoc code is -+For a few types however (like nfs, nfs4, smbfs, ncpfs) ad hoc code is - necessary. The nfs ad hoc code is built in, but smbfs and ncpfs +-For a few types however (like nfs, cifs, smbfs, ncpfs) ad hoc code is ++For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is + necessary. The nfs ad hoc code is built in, but cifs, smbfs, and ncpfs have a separate mount program. In order to make it possible to treat all types in a uniform way, mount will execute the program -@@ -449,9 +450,10 @@ +@@ -450,9 +451,10 @@ All of the filesystem types listed there will be tried, except for those that are labeled "nodev" (e.g., .IR devpts , @@ -30,7 +30,7 @@ If .I /etc/filesystems ends in a line with a single * only, mount will read -@@ -1373,6 +1375,73 @@ +@@ -1368,6 +1370,73 @@ .B nolock Do not use locking. Do not start lockd. diff --git a/util-linux-2.13-raw-raw0.patch b/util-linux-2.13-raw-raw0.patch new file mode 100644 index 0000000..c92e3bd --- /dev/null +++ b/util-linux-2.13-raw-raw0.patch @@ -0,0 +1,45 @@ +--- util-linux-2.13-pre6/disk-utils/raw.c.kzak 2006-11-21 21:56:40.000000000 +0100 ++++ util-linux-2.13-pre6/disk-utils/raw.c 2006-11-21 22:35:11.000000000 +0100 +@@ -66,6 +66,7 @@ + int err; + int block_major, block_minor; + int i; ++ int rc; + + struct stat statbuf; + +@@ -108,19 +109,23 @@ + usage(1); + raw_name = argv[optind++]; + ++ rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); ++ if (rc != 1) { ++ fprintf (stderr, ++ "Unsupported raw device name '%s' (format is " RAWDEVDIR "rawN))\n", ++ raw_name); ++ exit(2); ++ } ++ if (raw_minor == 0) { ++ fprintf (stderr, ++ "Unsupported raw device name '%s' (minor number cannot be zero)\n", ++ raw_name); ++ exit(2); ++ } ++ + err = stat(raw_name, &statbuf); +- if (err) { +- int rc; +- +- rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); +- if (rc != 1) { +- fprintf (stderr, +- "Cannot locate raw device '%s' (%s)\n", +- raw_name, strerror(errno)); +- exit(2); +- } ++ if (err) + goto skip_test_rawdev; +- } + + if (!S_ISCHR(statbuf.st_mode)) { + fprintf (stderr, "raw device '%s' is not a character dev\n", diff --git a/util-linux-2.13-schedutils-SCHED_BATCH.patch b/util-linux-2.13-schedutils-SCHED_BATCH.patch new file mode 100644 index 0000000..f0abaaa --- /dev/null +++ b/util-linux-2.13-schedutils-SCHED_BATCH.patch @@ -0,0 +1,102 @@ +--- util-linux-2.13-pre6/schedutils/chrt.1.batch 2006-11-10 13:23:37.000000000 -0500 ++++ util-linux-2.13-pre6/schedutils/chrt.1 2006-11-10 13:27:23.000000000 -0500 +@@ -36,10 +36,11 @@ + .BR chrt (1) + sets or retrieves the real-time scheduling attributes of an existing PID or + runs COMMAND with the given attributes. Both policy (one of ++.BR SCHED_OTHER , + .BR SCHED_FIFO , + .BR SCHED_RR , + or +-.BR SCHED_OTHER ) ++.BR SCHED_BATCH ) + and priority can be set and retrieved. + .SH OPTIONS + .TP +@@ -48,6 +49,10 @@ + .TP + + .TP ++.B -b, --batch ++set scheduling policy to ++.BR SCHED_BATCH ++.TP + .B -f, --fifo + set scheduling policy to + .BR SCHED_FIFO +--- util-linux-2.13-pre6/schedutils/chrt.c.batch 2005-08-14 11:18:54.000000000 -0400 ++++ util-linux-2.13-pre6/schedutils/chrt.c 2006-11-10 13:27:52.000000000 -0500 +@@ -36,6 +36,8 @@ + fprintf(stderr, "usage: %s [options] [prio] [pid | cmd [args...]]\n", + cmd); + fprintf(stderr, "manipulate real-time attributes of a process\n"); ++ fprintf(stderr, " -b, --batch " ++ "set policy to SCHED_BATCH\n"); + fprintf(stderr, " -f, --fifo " + "set policy to SCHED_FF\n"); + fprintf(stderr, " -p, --pid " +@@ -83,6 +85,9 @@ + case SCHED_RR: + printf("SCHED_RR\n"); + break; ++ case SCHED_BATCH: ++ printf("SCHED_BATCH\n"); ++ break; + default: + printf("unknown\n"); + } +@@ -101,6 +106,13 @@ + { + int max, min; + ++ max = sched_get_priority_max(SCHED_OTHER); ++ min = sched_get_priority_min(SCHED_OTHER); ++ if (max >= 0 && min >= 0) ++ printf("SCHED_OTHER min/max priority\t: %d/%d\n", min, max); ++ else ++ printf("SCHED_OTHER not supported?\n"); ++ + max = sched_get_priority_max(SCHED_FIFO); + min = sched_get_priority_min(SCHED_FIFO); + if (max >= 0 && min >= 0) +@@ -115,12 +127,12 @@ + else + printf("SCHED_RR not supported?\n"); + +- max = sched_get_priority_max(SCHED_OTHER); +- min = sched_get_priority_min(SCHED_OTHER); ++ max = sched_get_priority_max(SCHED_BATCH); ++ min = sched_get_priority_min(SCHED_BATCH); + if (max >= 0 && min >= 0) +- printf("SCHED_OTHER min/max priority\t: %d/%d\n", min, max); ++ printf("SCHED_BATCH min/max priority\t: %d/%d\n", min, max); + else +- printf("SCHED_OTHER not supported?\n"); ++ printf("SCHED_BATCH not supported?\n"); + } + + int main(int argc, char *argv[]) +@@ -130,6 +142,7 @@ + pid_t pid = 0; + + struct option longopts[] = { ++ { "batch", 0, NULL, 'b' }, + { "fifo", 0, NULL, 'f' }, + { "pid", 0, NULL, 'p' }, + { "help", 0, NULL, 'h' }, +@@ -141,11 +154,14 @@ + { NULL, 0, NULL, 0 } + }; + +- while((i = getopt_long(argc, argv, "+fphmorvV", longopts, NULL)) != -1) ++ while((i = getopt_long(argc, argv, "+bfphmorvV", longopts, NULL)) != -1) + { + int ret = 1; + + switch (i) { ++ case 'b': ++ policy = SCHED_BATCH; ++ break; + case 'f': + policy = SCHED_FIFO; + break; diff --git a/util-linux-60-raw.rules b/util-linux-60-raw.rules new file mode 100644 index 0000000..2279c91 --- /dev/null +++ b/util-linux-60-raw.rules @@ -0,0 +1,11 @@ +# 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.spec b/util-linux.spec index 82ff3b9..58e7f89 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.44%{?dist} +Release: 0.45%{?dist} License: distributable Group: System Environment/Base @@ -36,7 +36,8 @@ BuildRequires: automake BuildRequires: e2fsprogs-devel >= 1.36 BuildRequires: gettext-devel BuildRequires: libselinux-devel -BuildRequires: libtermcap-devel +# ncurses is the right way now [kzak, 12/14/2006] +#BuildRequires: libtermcap-devel BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: sed @@ -45,11 +46,12 @@ BuildRequires: texinfo BuildRequires: zlib-devel ### Sources -# TODO [stable]: s/2.13-pre6/%{version}/ -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre6.tar.bz2 +# TODO [stable]: s/2.13-pre7/%{version}/ +Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre7.tar.bz2 Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd +Source4: util-linux-60-raw.rules Source8: nologin.c Source9: nologin.8 Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.gz @@ -68,6 +70,9 @@ Conflicts: kernel < 2.2.12-7, Requires(preun): /sbin/install-info Requires(post): /sbin/install-info Requires(post): coreutils +%if %{include_raw} +Requires: udev +%endif Provides: mount = %{version} Provides: losetup = %{version} @@ -182,6 +187,7 @@ Patch233: util-linux-2.13-mount-uuid.patch Patch234: util-linux-2.13-cal-wide.patch # 186915 - mount does not translate SELIinux context options though libselinux # 185500 - Need man page entry for -o context= mount option +# 211827 - Can't mount with additional contexts Patch235: util-linux-2.13-mount-context.patch # 152579 - missing info about /etc/mtab and /proc/mounts mismatch # 183890 - missing info about possible ioctl() and fcntl() problems on NFS filesystem @@ -217,6 +223,18 @@ Patch251: util-linux-2.13-mount-nonfs.patch Patch252: util-linux-2.13-losetup-deprecated.patch # 208634 - mkswap "works" without warning on a mounted device Patch253: util-linux-2.13-mkswap-mounted.patch +# 213127 - mount --make-unbindable does not work +Patch254: util-linux-2.13-mount-comment.patch +# 211749 - add -r option to losetup to create a read-only loop +Patch255: util-linux-2.13-losetup-rdonly.patch +# 216489 - SCHED_BATCH option missing in chrt +Patch256: util-linux-2.13-schedutils-SCHED_BATCH.patch +# 216712 - issues with raw device support ("raw0" is wrong device name) +Patch257: util-linux-2.13-raw-raw0.patch +# 217186 - /bin/sh: @MKINSTALLDIRS@: No such file or directory +Patch258: util-linux-2.13-mkdir_p.patch +# 218915 - fdisk -b 4K +Patch259: util-linux-2.13-fdisk-b-4096.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -230,18 +248,19 @@ program. %prep # TODO [stable]: remove -n -%setup -q -a 11 -n util-linux-2.13-pre6 +%setup -q -a 11 -n util-linux-2.13-pre7 + +# ncurses vs. termcap for the more command +#%patch1 -p1 + -%patch1 -p1 %patch70 -p1 # nologin cp %{SOURCE8} %{SOURCE9} . %patch100 -p1 %patch106 -p1 %patch107 -p1 -%if %{include_raw} %patch109 -p1 -%endif %patch113 -p1 %patch120 -p1 %patch126 -p1 @@ -254,11 +273,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch153 -p1 %patch157 -p1 %patch159 -p1 -%if %{include_raw} %patch160 -p1 -%endif %patch164 -p1 - %patch170 -p1 %patch180 -p1 %patch181 -p1 @@ -310,7 +326,13 @@ cp %{SOURCE8} %{SOURCE9} . %patch250 -p1 %patch251 -p1 %patch252 -p1 -%patch253 -p1 -b .kzak +%patch253 -p1 +%patch254 -p1 +%patch255 -p1 +%patch256 -p1 +%patch257 -p1 +%patch258 -p1 +%patch259 -p1 %build unset LINGUAS || : @@ -392,6 +414,13 @@ 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 # Correct mail spool path. @@ -489,7 +518,7 @@ for I in addpart delpart partx; do done # /usr/bin -> /bin -for I in taskset; do +for I in taskset raw; do if [ -e $RPM_BUILD_ROOT/usr/bin/$I ]; then mv $RPM_BUILD_ROOT/usr/bin/$I $RPM_BUILD_ROOT/bin/$I fi @@ -539,6 +568,10 @@ exit 0 /bin/more /bin/kill /bin/taskset +%if %{include_raw} +/bin/raw +%config %{_sysconfdir}/udev/rules.d/60-raw.rules +%endif %config %{_sysconfdir}/pam.d/chfn %config %{_sysconfdir}/pam.d/chsh @@ -607,10 +640,6 @@ exit 0 %{_mandir}/man8/floppy.8* %endif %{_bindir}/namei - -%if %{include_raw} -%{_bindir}/raw -%endif %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev @@ -714,6 +743,22 @@ exit 0 /sbin/losetup %changelog +* 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) From c71c6e5c1f7c9ed20250ecc820cf1b01a5674872 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 14 Dec 2006 13:18:16 +0000 Subject: [PATCH 078/425] added missing patch --- util-linux-2.13-more-CLOEXEC.patch | 19 +++++++++++++++++++ util-linux.spec | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 util-linux-2.13-more-CLOEXEC.patch diff --git a/util-linux-2.13-more-CLOEXEC.patch b/util-linux-2.13-more-CLOEXEC.patch new file mode 100644 index 0000000..fe69e7a --- /dev/null +++ b/util-linux-2.13-more-CLOEXEC.patch @@ -0,0 +1,19 @@ + +When you view a file with the more command and run a shell, the file descriptor +for reading the file is leaked to that process. + +To test, more any file. Then do !/bin/sh. At the prompt do "ls -l /proc/$$/fd" +and you'll see the leaked fd. + +From: Steve Grubb + +--- util-linux-2.13-pre7/text-utils/more.c.cloexec 2006-12-14 14:05:31.000000000 +0100 ++++ util-linux-2.13-pre7/text-utils/more.c 2006-12-14 14:04:57.000000000 +0100 +@@ -478,6 +478,7 @@ + } + if (magic(f, fs)) + return((FILE *)NULL); ++ fcntl(fileno(f), F_SETFD, FD_CLOEXEC ); + c = Getc(f); + *clearfirst = (c == '\f'); + Ungetc (c, f); diff --git a/util-linux.spec b/util-linux.spec index 58e7f89..371d3ec 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -235,6 +235,8 @@ Patch257: util-linux-2.13-raw-raw0.patch Patch258: util-linux-2.13-mkdir_p.patch # 218915 - fdisk -b 4K Patch259: util-linux-2.13-fdisk-b-4096.patch +# leaking file descriptor +Patch260: util-linux-2.13-more-CLOEXEC.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -333,6 +335,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch257 -p1 %patch258 -p1 %patch259 -p1 +%patch260 -p1 %build unset LINGUAS || : @@ -744,6 +747,7 @@ exit 0 %changelog * Wed Dec 13 2006 Karel Zak 2.13-0.45 +- fix leaking file descriptor in the more command (patch by Steve Grubb) - use ncurses only - fix #218915 - fdisk -b 4K - upgrade to -pre7 release From e593a77fd1b252405482a9954faa7e53a211c0db Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 14 Dec 2006 13:29:39 +0000 Subject: [PATCH 079/425] release++; previous build has been canceled to late ;-( --- util-linux.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 371d3ec..1e5d9c9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.45%{?dist} +Release: 0.46%{?dist} License: distributable Group: System Environment/Base @@ -746,8 +746,10 @@ exit 0 /sbin/losetup %changelog -* Wed Dec 13 2006 Karel Zak 2.13-0.45 +* 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 From f17b9c0d257b346d0c60fb652f2a34ece93e4852 Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 15 Dec 2006 17:05:55 +0000 Subject: [PATCH 080/425] - fix #217240 - namei ignores non-directory components instead of saying "Not a directory" - fix #217241 - namei enforces symlink limits inconsistently - Resolves: rhbz#217240 rhbz#217241 --- util-linux-2.12a-raw-man-dd.patch | 4 +- util-linux-2.13-mount-context.patch | 6 +- util-linux-2.13-namei-logic.patch | 129 ++++++++++++++++++++++++++++ util-linux.spec | 10 ++- 4 files changed, 143 insertions(+), 6 deletions(-) create mode 100644 util-linux-2.13-namei-logic.patch diff --git a/util-linux-2.12a-raw-man-dd.patch b/util-linux-2.12a-raw-man-dd.patch index 531d742..35f57eb 100644 --- a/util-linux-2.12a-raw-man-dd.patch +++ b/util-linux-2.12a-raw-man-dd.patch @@ -8,8 +8,8 @@ +Although Linux includes support for rawio, it is now a deprecated interface. If +your application performs device access using this interface, Red Hat +encourages you to modify your application to open the block device with the -+O_DIRECT flag. The rawio interface will exist for the life of Red Hat -+Enterprise Linux 4, but is a candidate for removal from future releases. ++O_DIRECT flag. The rawio interface is a candidate for removal from future releases. ++ .SH DESCRIPTION .B raw is used to bind a Linux raw character device to a block device. Any diff --git a/util-linux-2.13-mount-context.patch b/util-linux-2.13-mount-context.patch index a239aab..09f9d79 100644 --- a/util-linux-2.13-mount-context.patch +++ b/util-linux-2.13-mount-context.patch @@ -79,11 +79,11 @@ + if (verbose) + printf(_("mount: translated %s '%s' to '%s'\n"), + optname, data, (char *) raw); -+ // TODO 2.6.19: context options with commans are unsupported by kernel now ;-( -+ bufsz = strlen(optname) + strlen(raw) + 2; // bufsz = strlen(optname) + strlen(raw) + 4; /* 4 is \0, '=' and 2x '"' */ ++ ++ bufsz = strlen(optname) + strlen(raw) + 4; /* 4 is \0, '=' and 2x '"' */ + buf = xmalloc(bufsz); + -+ snprintf(buf, bufsz, "%s=%s", optname, (char *) raw); // snprintf(buf, bufsz, "%s=\"%s\"", optname, (char *) raw); ++ snprintf(buf, bufsz, "%s=\"%s\"", optname, (char *) raw); + freecon(raw); + + if ((*len -= bufsz-1) > 0) diff --git a/util-linux-2.13-namei-logic.patch b/util-linux-2.13-namei-logic.patch new file mode 100644 index 0000000..b3b811f --- /dev/null +++ b/util-linux-2.13-namei-logic.patch @@ -0,0 +1,129 @@ +--- util-linux-2.13-pre7/misc-utils/namei.1.nodir 2006-12-15 10:58:38.000000000 +0100 ++++ util-linux-2.13-pre7/misc-utils/namei.1 2006-12-15 10:58:51.000000000 +0100 +@@ -52,9 +52,5 @@ + Roger Southwick (rogers@amadeus.wr.tek.com) + .SH BUGS + To be discovered. +-.SH CAVEATS +-.I Namei +-will follow an infinite loop of symbolic links forever. To escape, use +-SIGINT (usually ^C). + .SH "SEE ALSO" + ls(1), stat(1) +--- util-linux-2.13-pre7/misc-utils/namei.c.nodir 2006-12-14 21:38:41.000000000 +0100 ++++ util-linux-2.13-pre7/misc-utils/namei.c 2006-12-15 10:58:31.000000000 +0100 +@@ -42,6 +42,10 @@ + 1999-02-22 Arkadiusz Mi¶kiewicz + - added Native Language Support + ++2006-12-15 Karel Zak ++- fixed logic; don't follow the path if a component is not directory ++- fixed infinite loop of symbolic links; stack size is very limited ++ + -------------------------------------------------------------*/ + + #include +@@ -66,7 +70,7 @@ + #endif + + static char *pperm(unsigned short); +-static void namei(char *, int); ++static void namei(char *, int, mode_t *); + static void usage(void); + + int +@@ -107,9 +111,10 @@ + + + for(; optind < argc; optind++){ ++ mode_t lastmode = 0; + (void)printf("f: %s\n", argv[optind]); + symcount = 1; +- namei(argv[optind], 0); ++ namei(argv[optind], 0, &lastmode); + + if(chdir(curdir) == -1){ + (void)fprintf(stderr, +@@ -131,8 +136,10 @@ + #define NODEV (dev_t)(-1) + #endif + ++int kzak; ++ + static void +-namei(char *file, int lev) { ++namei(char *file, int lev, mode_t *lastmode) { + char *cp; + char buf[BUFSIZ], sym[BUFSIZ]; + struct stat stb; +@@ -143,7 +150,7 @@ + * See if the file has a leading /, and if so cd to root + */ + +- if(*file == '/'){ ++ if(file && *file == '/'){ + while(*file == '/') + file++; + +@@ -166,7 +173,7 @@ + (void)printf(" d /\n"); + } + +- for(;;){ ++ for(; file && *file;){ + + if (strlen(file) >= BUFSIZ) { + fprintf(stderr,_("namei: buf overflow\n")); +@@ -198,6 +205,20 @@ + for(i = 0; i < lev; i++) + (void)printf(" "); + ++ ++ /* ++ * Previous element in the path wasn't directory, it means ++ * we cannot walk on *path* and check the actual element by lstat(), because ++ * there could be a component with same name. Try: ++ * ++ * $ touch a b ++ * $ namei a/b <-- "a" is not directory so namei shouldn't check for "b" ++ */ ++ if (*lastmode && S_ISDIR(*lastmode)==0 && S_ISLNK(*lastmode)==0){ ++ (void)printf(" ? %s - %s (%d)\n", buf, strerror(ENOENT), ENOENT); ++ return; ++ } ++ + /* + * See what type of critter this file is + */ +@@ -207,6 +228,8 @@ + return; + } + ++ *lastmode = stb.st_mode; ++ + switch(stb.st_mode & S_IFMT){ + case S_IFDIR: + +@@ -241,7 +264,6 @@ + * Sigh, another symlink. Read its contents and + * call namei() + */ +- + bzero(sym, BUFSIZ); + if(readlink(buf, sym, BUFSIZ) == -1){ + (void)printf(_(" ? problems reading symlink %s - %s (%d)\n"), buf, ERR); +@@ -255,11 +277,12 @@ + + if(symcount > 0 && symcount++ > MAXSYMLINKS){ + (void)printf(_(" *** EXCEEDED UNIX LIMIT OF SYMLINKS ***\n")); +- symcount = -1; + } else { + (void)printf("\n"); +- namei(sym, lev + 1); ++ namei(sym, lev + 1, lastmode); + } ++ if (symcount > MAXSYMLINKS) ++ return; + break; + + case S_IFCHR: diff --git a/util-linux.spec b/util-linux.spec index 1e5d9c9..4a93844 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.46%{?dist} +Release: 0.47%{?dist} License: distributable Group: System Environment/Base @@ -237,6 +237,9 @@ Patch258: util-linux-2.13-mkdir_p.patch Patch259: util-linux-2.13-fdisk-b-4096.patch # leaking file descriptor Patch260: util-linux-2.13-more-CLOEXEC.patch +# 217240 - namei ignores non-directory components instead of saying "Not a directory" +# 217241 - namei enforces symlink limits inconsistently +Patch261: util-linux-2.13-namei-logic.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -336,6 +339,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch258 -p1 %patch259 -p1 %patch260 -p1 +%patch261 -p1 %build unset LINGUAS || : @@ -746,6 +750,10 @@ exit 0 /sbin/losetup %changelog +* 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) From ba0ee667da3eafad57fbe0c22e1c59cc262634f7 Mon Sep 17 00:00:00 2001 From: kzak Date: Sat, 16 Dec 2006 23:20:07 +0000 Subject: [PATCH 081/425] - fix paths in po/Makefile.in.in --- util-linux-2.13-mkdir_p.patch | 47 ++++++++--------------------------- util-linux.spec | 5 +++- 2 files changed, 15 insertions(+), 37 deletions(-) diff --git a/util-linux-2.13-mkdir_p.patch b/util-linux-2.13-mkdir_p.patch index 26452cb..eb8ed15 100644 --- a/util-linux-2.13-mkdir_p.patch +++ b/util-linux-2.13-mkdir_p.patch @@ -1,5 +1,5 @@ ---- util-linux-2.13-pre6/po/Makefile.in.in.mkdir_p 2005-10-14 22:22:14.000000000 +0200 -+++ util-linux-2.13-pre6/po/Makefile.in.in 2006-10-24 22:48:30.000000000 +0200 +--- util-linux-2.13-pre7/po/Makefile.in.in.mkdir_p 2005-10-14 22:22:14.000000000 +0200 ++++ util-linux-2.13-pre7/po/Makefile.in.in 2006-12-17 00:06:29.000000000 +0100 @@ -1,5 +1,5 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper @@ -16,25 +16,13 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ -@@ -23,18 +23,38 @@ - - prefix = @prefix@ - exec_prefix = @exec_prefix@ --datadir = $(prefix)/usr/share --localedir = $(datadir)/locale -+datarootdir = @datarootdir@ -+datadir = @datadir@ -+localedir = @localedir@ - gettextsrcdir = $(datadir)/gettext/po +@@ -29,8 +29,18 @@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - --GMSGFMT = @GMSGFMT@ --MSGFMT = @MSGFMT@ --XGETTEXT = @XGETTEXT@ ++ +# We use $(mkdir_p). +# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as +# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, @@ -46,23 +34,10 @@ +install_sh = $(SHELL) @install_sh@ +MKDIR_P = @MKDIR_P@ +mkdir_p = @mkdir_p@ -+ -+GMSGFMT_ = @GMSGFMT@ -+GMSGFMT_no = @GMSGFMT@ -+GMSGFMT_yes = @GMSGFMT_015@ -+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) -+MSGFMT_ = @MSGFMT@ -+MSGFMT_no = @MSGFMT@ -+MSGFMT_yes = @MSGFMT_015@ -+MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) -+XGETTEXT_ = @XGETTEXT@ -+XGETTEXT_no = @XGETTEXT@ -+XGETTEXT_yes = @XGETTEXT_015@ -+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) - MSGMERGE = msgmerge - MSGMERGE_UPDATE = @MSGMERGE@ --update - MSGINIT = msginit -@@ -158,7 +178,7 @@ + + GMSGFMT = @GMSGFMT@ + MSGFMT = @MSGFMT@ +@@ -158,7 +168,7 @@ install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ @@ -71,7 +46,7 @@ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ -@@ -171,13 +191,13 @@ +@@ -171,13 +181,13 @@ fi install-data-no: all install-data-yes: all @@ -87,7 +62,7 @@ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ -@@ -217,19 +237,19 @@ +@@ -217,19 +227,19 @@ installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ @@ -110,7 +85,7 @@ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ -@@ -374,8 +394,7 @@ +@@ -374,8 +384,7 @@ Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ diff --git a/util-linux.spec b/util-linux.spec index 4a93844..fc1cd62 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.47%{?dist} +Release: 0.48%{?dist} License: distributable Group: System Environment/Base @@ -750,6 +750,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 07af4295f2b110b80734c8333065e78e81b30a59 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 11 Jan 2007 15:39:41 +0000 Subject: [PATCH 082/425] - fix #222293 - undocumented partx,addpart, delpart - Resolves: rhbz#222293 --- util-linux-2.13-partx-man.patch | 129 ++++++++++++++++++++++++++++++++ util-linux.spec | 11 ++- 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.13-partx-man.patch diff --git a/util-linux-2.13-partx-man.patch b/util-linux-2.13-partx-man.patch new file mode 100644 index 0000000..ff1d023 --- /dev/null +++ b/util-linux-2.13-partx-man.patch @@ -0,0 +1,129 @@ +--- util-linux-2.13-pre7/partx/Makefile.am.kzak 2007-01-11 16:30:39.000000000 +0100 ++++ util-linux-2.13-pre7/partx/Makefile.am 2007-01-11 16:30:30.000000000 +0100 +@@ -4,5 +4,6 @@ + + usrsbinexec_PROGRAMS = addpart delpart partx + partx_SOURCES = bsd.c dos.c partx.c solaris.c unixware.c gpt.c crc32.c ++man_MANS = addpart.8 delpart.8 partx.8 + + endif +--- /dev/null 2007-01-05 11:17:33.335119060 +0100 ++++ util-linux-2.13-pre7/partx/delpart.8 2007-01-11 16:28:37.000000000 +0100 +@@ -0,0 +1,30 @@ ++.\" delpart.8 -- ++.\" Copyright 2007 Karel Zak ++.\" Copyright 2007 Red Hat, Inc. ++.\" May be distributed under the GNU General Public License ++.TH DELPART 8 "11 Jan 2007" ++.SH NAME ++delpart \- ++simple wrapper around the "del partition" ioctl ++.SH SYNOPSIS ++.B delpart device partition ++.SH DESCRIPTION ++.B delpart ++is a program that asks the Linux kernel to remove a partition. ++ ++This command doesn't manipulate with partitions on hard drive. ++ ++.SH OPTIONS ++.TP ++.BI device ++Specify the disk device. ++.TP ++.BI partition ++Specify the partition number. ++ ++.SH SEE ALSO ++.BR addpart (8), ++.BR fdisk (8), ++.BR parted (8), ++.BR partprobe (8), ++.BR partx (8) +--- /dev/null 2007-01-05 11:17:33.335119060 +0100 ++++ util-linux-2.13-pre7/partx/addpart.8 2007-01-11 16:28:37.000000000 +0100 +@@ -0,0 +1,36 @@ ++.\" addpart.8 -- ++.\" Copyright 2007 Karel Zak ++.\" Copyright 2007 Red Hat, Inc. ++.\" May be distributed under the GNU General Public License ++.TH ADDPART 8 "11 Jan 2007" ++.SH NAME ++addpart \- ++simple wrapper around the "add partition" ioctl ++.SH SYNOPSIS ++.B addpart device partition start length ++.SH DESCRIPTION ++.B addpart ++is a program that informs the Linux kernel of new partition. ++ ++This command doesn't manipulate with partitions on hard drive. ++ ++.SH PARAMETERS ++.TP ++.BI device ++Specify the disk device. ++.TP ++.BI partition ++Specify the partition number. ++.TP ++.BI start ++Specify the begin of the partition (in bytes). ++.TP ++.BI length ++Specify the length of the partition (in bytes). ++ ++.SH SEE ALSO ++.BR delpart (8), ++.BR fdisk (8), ++.BR parted (8), ++.BR partprobe (8), ++.BR partx (8) +--- /dev/null 2007-01-05 11:17:33.335119060 +0100 ++++ util-linux-2.13-pre7/partx/partx.8 2007-01-11 16:28:37.000000000 +0100 +@@ -0,0 +1,45 @@ ++.\" partx.8 -- ++.\" Copyright 2007 Karel Zak ++.\" Copyright 2007 Red Hat, Inc. ++.\" May be distributed under the GNU General Public License ++.TH PARTX 8 "11 Jan 2007" ++.SH NAME ++partx \- ++telling the kernel about presence and numbering of on-disk partitions. ++.SH SYNOPSIS ++.B partx [-a|-d|-l] [--type TYPE] [--nr M-N] [partition] disk ++.SH DESCRIPTION ++Given a block device ( ++.B disk ++) and a partition table ++.B type ++, try to parse the partition table, and list the ++contents. Optionally add or remove partitions. ++ ++This is not an fdisk - adding and removing partitions ++is not a change of the disk, but just telling the kernel ++about presence and numbering of on-disk partitions. ++ ++.SH OPTIONS ++.TP ++.B \-a ++add specified partitions or read disk and add all partitions ++.TP ++.B \-d ++delete specified or all partitions ++.TP ++.B \-l ++list partitions ++.TP ++.BI --type " TYPE" ++Specify the partition type -- dos, bsd, solaris, unixware or gpt. ++.TP ++.BI --nr " M-N" ++Specify the range of partitions (e.g --nr 2-4). ++ ++.SH SEE ALSO ++.BR addpart (8), ++.BR delpart (8), ++.BR fdisk (8), ++.BR parted (8), ++.BR partprobe (8) diff --git a/util-linux.spec b/util-linux.spec index fc1cd62..febb0b0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.48%{?dist} +Release: 0.49%{?dist} License: distributable Group: System Environment/Base @@ -240,6 +240,8 @@ Patch260: util-linux-2.13-more-CLOEXEC.patch # 217240 - namei ignores non-directory components instead of saying "Not a directory" # 217241 - namei enforces symlink limits inconsistently Patch261: util-linux-2.13-namei-logic.patch +# 222293 - undocumented partx,addpart, delpart +Patch262: util-linux-2.13-partx-man.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -340,6 +342,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch259 -p1 %patch260 -p1 %patch261 -p1 +%patch262 -p1 %build unset LINGUAS || : @@ -593,6 +596,9 @@ exit 0 /sbin/addpart /sbin/delpart /sbin/partx +%{_mandir}/man8/partx.8* +%{_mandir}/man8/addpart.8* +%{_mandir}/man8/delpart.8* /sbin/sfdisk %{_mandir}/man8/sfdisk.8* @@ -750,6 +756,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 2fb39b620a4225e952d49f964353930335f0992c Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Sat, 3 Mar 2007 20:50:41 +0000 Subject: [PATCH 083/425] - include ConsoleKit session module by default (#229172) --- util-linux-login.pamd | 1 + util-linux.spec | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux-login.pamd b/util-linux-login.pamd index 1515a27..04195f7 100644 --- a/util-linux-login.pamd +++ b/util-linux-login.pamd @@ -12,3 +12,4 @@ 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 optional pam_keyinit.so force revoke +session optional pam_ck_connector.so diff --git a/util-linux.spec b/util-linux.spec index febb0b0..a3e0f92 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.49%{?dist} +Release: 0.50%{?dist} License: distributable Group: System Environment/Base @@ -73,6 +73,7 @@ Requires(post): coreutils %if %{include_raw} Requires: udev %endif +Requires: ConsoleKit-libs Provides: mount = %{version} Provides: losetup = %{version} @@ -756,6 +757,9 @@ exit 0 /sbin/losetup %changelog +* 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 From 7c423cb1a89d2076a33ed66075eb559bad96fb5d Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 6 Apr 2007 10:57:45 +0000 Subject: [PATCH 084/425] - 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 --- util-linux-2.13-hwclock-systohc.patch | 46 +++++++++++++++++++++++++++ util-linux-2.13-mount-fake.patch | 11 +++++++ util-linux-2.13-umount-sysfs.patch | 2 +- util-linux.spec | 15 ++++++++- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.13-hwclock-systohc.patch create mode 100644 util-linux-2.13-mount-fake.patch diff --git a/util-linux-2.13-hwclock-systohc.patch b/util-linux-2.13-hwclock-systohc.patch new file mode 100644 index 0000000..d0d1eb0 --- /dev/null +++ b/util-linux-2.13-hwclock-systohc.patch @@ -0,0 +1,46 @@ +commit 99c392d8ba163e35b9d562dd4bcf7dd476ad3573 +Author: Karel Zak +Date: Tue Mar 20 00:32:37 2007 +0100 + + hwclock: fix --systohc sets clock 0.5 seconds slow + + quote from rh150493: + + The kernel code, when setting the BIOS clock notes that the clock time + ticks to the next second 0.5 seconds after adjusting it (see + linux/arch/i386/kernel/time.c). + + hwclock --systohc sets the CMOS clock at the 1 second boundry and thus + causes the clock to be wrong by 500ms each time it is reset. If the + clock is set every shutdown then the clock will have a reboot-count + related drift as well as the natural drift problems of the clock. Note + that this also mucks up the drift calculations, of course. + + Signed-off-by: Karel Zak + +diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c +index 9731dad..820c388 100644 +--- a/hwclock/hwclock.c ++++ b/hwclock/hwclock.c +@@ -517,14 +517,19 @@ set_hardware_clock_exact(const time_t sethwtime, + "Delaying further to reach the next full second.\n"), + time_diff(beginsystime, refsystime)); + +- /* Now delay some more until Hardware Clock time newhwtime arrives */ ++ /* ++ * Now delay some more until Hardware Clock time newhwtime arrives. The -500 ++ * ms is because the Hardware Clock always sets to your set time plus 500 ms ++ * (because it is designed to update to the next second precisely 500 ms ++ * after you finish the setting). ++ */ + do { + float tdiff; + gettimeofday(&nowsystime, NULL); + tdiff = time_diff(nowsystime, beginsystime); + if (tdiff < 0) + goto time_resync; /* probably time was reset */ +- } while (time_diff(nowsystime, refsystime) < newhwtime - sethwtime); ++ } while (time_diff(nowsystime, refsystime) - 0.5 < newhwtime - sethwtime); + + set_hardware_clock(newhwtime, universal, testing); + } diff --git a/util-linux-2.13-mount-fake.patch b/util-linux-2.13-mount-fake.patch new file mode 100644 index 0000000..627b1e2 --- /dev/null +++ b/util-linux-2.13-mount-fake.patch @@ -0,0 +1,11 @@ +--- util-linux-2.13-pre7/mount/mount.c.kzak 2007-02-09 12:54:20.000000000 +0100 ++++ util-linux-2.13-pre7/mount/mount.c 2007-02-09 12:54:14.000000000 +0100 +@@ -602,6 +602,8 @@ + mountargs[i++] = node; + if (sloppy && (strcmp(type, "nfs")==0 || strcmp(type, "nfs4")==0)) + mountargs[i++] = "-s"; ++ if (fake) ++ mountargs[i++] = "-f"; + if (nomtab) + mountargs[i++] = "-n"; + if (verbose) diff --git a/util-linux-2.13-umount-sysfs.patch b/util-linux-2.13-umount-sysfs.patch index 0d2d9f0..5d92a9c 100644 --- a/util-linux-2.13-umount-sysfs.patch +++ b/util-linux-2.13-umount-sysfs.patch @@ -5,7 +5,7 @@ /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ if (types == NULL) - types = "noproc,nodevfs,nodevpts"; -+ types = "noproc,nodevfs,nodevpts,nosysfs"; ++ types = "noproc,nodevfs,nodevpts,nosysfs,rpc_pipefs"; result = umount_all (types, test_opts); } else if (argc < 1) { usage (stderr, 2); diff --git a/util-linux.spec b/util-linux.spec index a3e0f92..e3500e6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.50%{?dist} +Release: 0.51%{?dist} License: distributable Group: System Environment/Base @@ -243,6 +243,11 @@ Patch260: util-linux-2.13-more-CLOEXEC.patch Patch261: util-linux-2.13-namei-logic.patch # 222293 - undocumented partx,addpart, delpart Patch262: util-linux-2.13-partx-man.patch +# 150493 - hwclock --systohc sets clock 0.5 seconds slow +Patch263: util-linux-2.13-hwclock-systohc.patch +# 227903 - mount -f does not work with NFS-mounted +Patch264: util-linux-2.13-mount-fake.patch + # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -344,6 +349,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch260 -p1 %patch261 -p1 %patch262 -p1 +%patch263 -p1 +%patch264 -p1 %build unset LINGUAS || : @@ -757,6 +764,12 @@ exit 0 /sbin/losetup %changelog +* 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) From e87645308fbf82bedc9bbf8078e8abedfccba174 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 13 Aug 2007 21:08:43 +0000 Subject: [PATCH 085/425] - rebuild F7 package to F8 --- util-linux-2.12a-mount-lockperm.patch | 21 +++++ util-linux-2.13-blockdev-errno.patch | 36 ++++++++ util-linux-2.13-blockdev-unsigned.patch | 69 +++++++++++++++ util-linux-2.13-cal-3.patch | 109 ++++++++++++++++++++++++ util-linux-2.13-ipcs-32bit.patch | 68 +++++++++++++++ util-linux-2.13-localedir.patch | 16 ++++ util-linux-2.13-mount-loop.patch | 34 ++++++++ util-linux-2.13-mount-relatime.patch | 44 ++++++++++ util-linux-2.13-sfdisk-geo.patch | 13 +++ util-linux-login.pamd | 2 +- util-linux-remote.pamd | 3 +- util-linux.spec | 54 ++++++++++-- 12 files changed, 460 insertions(+), 9 deletions(-) create mode 100644 util-linux-2.12a-mount-lockperm.patch create mode 100644 util-linux-2.13-blockdev-errno.patch create mode 100644 util-linux-2.13-blockdev-unsigned.patch create mode 100644 util-linux-2.13-cal-3.patch create mode 100644 util-linux-2.13-ipcs-32bit.patch create mode 100644 util-linux-2.13-localedir.patch create mode 100644 util-linux-2.13-mount-loop.patch create mode 100644 util-linux-2.13-mount-relatime.patch create mode 100644 util-linux-2.13-sfdisk-geo.patch diff --git a/util-linux-2.12a-mount-lockperm.patch b/util-linux-2.12a-mount-lockperm.patch new file mode 100644 index 0000000..d60538c --- /dev/null +++ b/util-linux-2.12a-mount-lockperm.patch @@ -0,0 +1,21 @@ + +From: Flávio Leitner +Subject: mount should set proper permissions on locktime + +When creating the "/etc/mtab~" lockfile (specifically 'linktargetfile' in the +lock_mtab function), the file is created with incorrect permissions ('000') +which necessitates root to leverage CAP_DAC_OVERRIDE. If proper file modes (it +would appear 0600 would be sufficient) were used in the open this would +function properly with CAP_DAC_OVERRIDE revoked. + +--- util-linux-2.12a/mount/fstab.c.kzak 2007-07-31 12:13:26.000000000 +0200 ++++ util-linux-2.12a/mount/fstab.c 2007-07-31 12:13:11.000000000 +0200 +@@ -433,7 +433,7 @@ + linktargetfile = xmalloc(strlen(MOUNTLOCK_LINKTARGET) + 20); + sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); + +- i = open (linktargetfile, O_WRONLY|O_CREAT, 0); ++ i = open (linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); + if (i < 0) { + int errsv = errno; + /* linktargetfile does not exist (as a file) diff --git a/util-linux-2.13-blockdev-errno.patch b/util-linux-2.13-blockdev-errno.patch new file mode 100644 index 0000000..0ccdd60 --- /dev/null +++ b/util-linux-2.13-blockdev-errno.patch @@ -0,0 +1,36 @@ +commit 3281d4268a192cbd1951347a4a857b94428dc958 +Author: Karel Zak +Date: Wed Aug 1 15:06:18 2007 +0200 + + blockdev: fix "blockdev --getsz" for large devices + + The "blockdev --getsz" command doesn't try to use BLKGETSIZE64 when + previous BLKGETSIZE failed with EFBIG. This patch fixes this problem. + + Signed-off-by: Karel Zak + +diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c +index 46b7fa7..0dd531c 100644 +--- a/disk-utils/blockdev.c ++++ b/disk-utils/blockdev.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #include "nls.h" + +@@ -148,8 +149,10 @@ getsize(int fd, long long *sectors) { + long long b; + + err = ioctl (fd, BLKGETSIZE, &sz); +- if (err) +- return err; ++ if (err) { ++ if (errno != EFBIG) ++ return err; ++ } + err = ioctl(fd, BLKGETSIZE64, &b); + if (err || b == 0 || b == sz) + *sectors = sz; diff --git a/util-linux-2.13-blockdev-unsigned.patch b/util-linux-2.13-blockdev-unsigned.patch new file mode 100644 index 0000000..4f46083 --- /dev/null +++ b/util-linux-2.13-blockdev-unsigned.patch @@ -0,0 +1,69 @@ +--- util-linux-2.13-pre7/disk-utils/blockdev.c.kzak 2007-08-02 13:24:45.000000000 +0200 ++++ util-linux-2.13-pre7/disk-utils/blockdev.c 2007-08-02 13:24:45.000000000 +0200 +@@ -77,6 +77,8 @@ + #define ARGINTG 4 + #define ARGLINTG 5 + #define ARGLLINTG 6 ++#define ARGLU 7 ++#define ARGLLU 8 + long argval; + char *argname; + char *help; +@@ -98,10 +100,10 @@ + { "--setbsz", "BLKBSZSET", BLKBSZSET, ARGINTAP, 0, "BLOCKSIZE", N_("set blocksize") }, + #endif + #ifdef BLKGETSIZE +- { "--getsize", "BLKGETSIZE", BLKGETSIZE, ARGLINTG, -1, NULL, N_("get 32-bit sector count") }, ++ { "--getsize", "BLKGETSIZE", BLKGETSIZE, ARGLU, -1, NULL, N_("get 32-bit sector count") }, + #endif + #ifdef BLKGETSIZE64 +- { "--getsize64", "BLKGETSIZE64", BLKGETSIZE64, ARGLLINTG, -1, NULL, N_("get size in bytes") }, ++ { "--getsize64", "BLKGETSIZE64", BLKGETSIZE64, ARGLLU, -1, NULL, N_("get size in bytes") }, + #endif + #ifdef BLKRASET + { "--setra", "BLKRASET", BLKRASET, ARGINTA, 0, "READAHEAD", N_("set readahead") }, +@@ -286,6 +288,8 @@ + int iarg; + long larg; + long long llarg; ++ unsigned long lu; ++ unsigned long long llu; + int verbose = 0; + + for (i = 1; i < d; i++) { +@@ -363,6 +367,15 @@ + llarg = bdcms[j].argval; + res = ioctl(fd, bdcms[j].ioc, &llarg); + break; ++ case ARGLU: ++ lu = bdcms[j].argval; ++ res = ioctl(fd, bdcms[j].ioc, &lu); ++ break; ++ case ARGLLU: ++ llu = bdcms[j].argval; ++ res = ioctl(fd, bdcms[j].ioc, &llu); ++ break; ++ + } + if (res == -1) { + perror(bdcms[j].iocname); +@@ -389,6 +402,19 @@ + else + printf("%lld\n", llarg); + break; ++ case ARGLU: ++ if (verbose) ++ printf("%s: %lu\n", _(bdcms[j].help), lu); ++ else ++ printf("%lu\n", lu); ++ break; ++ case ARGLLU: ++ if (verbose) ++ printf("%s: %llu\n", _(bdcms[j].help), llu); ++ else ++ printf("%llu\n", llu); ++ break; ++ + default: + if (verbose) + printf(_("%s succeeded.\n"), _(bdcms[j].help)); diff --git a/util-linux-2.13-cal-3.patch b/util-linux-2.13-cal-3.patch new file mode 100644 index 0000000..f7f7916 --- /dev/null +++ b/util-linux-2.13-cal-3.patch @@ -0,0 +1,109 @@ +--- util-linux-2.13-pre7/misc-utils/cal.c.kzak 2007-07-09 14:54:39.000000000 +0200 ++++ util-linux-2.13-pre7/misc-utils/cal.c 2007-07-09 14:54:39.000000000 +0200 +@@ -87,9 +87,13 @@ + putp(s); + } + +-static char * ++static const char * + my_tgetstr(char *s, char *ss) { +- return tigetstr(ss); ++ const char* ret = tigetstr(ss); ++ if (!ret || ret==(char*)-1) ++ return ""; ++ else ++ return ret; + } + + #elif defined(HAVE_LIBTERMCAP) +@@ -110,14 +114,20 @@ + tputs (s, 1, putchar); + } + +-static char * ++static const char * + my_tgetstr(char *s, char *ss) { +- return tgetstr(s, &strbuf); ++ const char* ret = tgetstr(s, &strbuf); ++ if (!ret) ++ return ""; ++ else ++ return ret; + } + + #endif + const char *term=""; + const char *Senter="", *Sexit="";/* enter and exit standout mode */ ++int Slen; /* strlen of Senter+Sexit */ ++char *Hrow; /* pointer to highlighted row in month */ + + #ifdef HAVE_LANGINFO_H + # include +@@ -262,6 +272,7 @@ + if (ret > 0) { + Senter = my_tgetstr("so","smso"); + Sexit = my_tgetstr("se","rmso"); ++ Slen = strlen(Senter) + strlen(Sexit); + } + } + #endif +@@ -437,11 +448,18 @@ + sprintf(out->s[1],"%s", + julian ? j_day_headings : day_headings); + for (row = 0; row < 6; row++) { +- for (col = 0, p = lineout; col < 7; col++) +- p = ascii_day(p, days[row * 7 + col]); ++ int has_hl = 0; ++ for (col = 0, p = lineout; col < 7; col++) { ++ int xd = days[row * 7 + col]; ++ if (xd != SPACE && (xd & TODAY_FLAG)) ++ has_hl = 1; ++ p = ascii_day(p, xd); ++ } + *p = '\0'; + trim_trailing_spaces(lineout); + sprintf(out->s[row+2], "%s", lineout); ++ if (has_hl) ++ Hrow = out->s[row+2]; + } + } + +@@ -489,14 +507,25 @@ + do_monthly(day, prev_month, prev_year, &out_prev); + do_monthly(day, month, year, &out_curm); + do_monthly(day, next_month, next_year, &out_next); ++ + width = (julian ? J_WEEK_LEN : WEEK_LEN) -1; + for (i = 0; i < 2; i++) + printf("%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); + for (i = 2; i < FMT_ST_LINES; i++) { ++ int w1, w2, w3; ++ w1 = w2 = w3 = width; ++ ++#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP) ++ /* adjust width to allow for non printable characters */ ++ w1 += (out_prev.s[i] == Hrow ? Slen : 0); ++ w2 += (out_curm.s[i] == Hrow ? Slen : 0); ++ w3 += (out_next.s[i] == Hrow ? Slen : 0); ++#endif + snprintf(lineout, SIZE(lineout), "%-*s %-*s %-*s\n", +- width, out_prev.s[i], +- width, out_curm.s[i], +- width, out_next.s[i]); ++ w1, out_prev.s[i], ++ w2, out_curm.s[i], ++ w3, out_next.s[i]); ++ + #if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP) + my_putstring(lineout); + #else +--- util-linux-2.13-pre7/configure.ac.kzak 2007-07-09 14:54:48.000000000 +0200 ++++ util-linux-2.13-pre7/configure.ac 2007-07-09 14:55:11.000000000 +0200 +@@ -71,6 +71,7 @@ + if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes; then + have_ncurses=yes + AC_MSG_NOTICE([you have ncurses]) ++ AC_DEFINE(HAVE_NCURSES, 1, [Do we have -lncurses?]) + else + AC_MSG_NOTICE([you do not have ncurses]) + fi diff --git a/util-linux-2.13-ipcs-32bit.patch b/util-linux-2.13-ipcs-32bit.patch new file mode 100644 index 0000000..99942eb --- /dev/null +++ b/util-linux-2.13-ipcs-32bit.patch @@ -0,0 +1,68 @@ + +The compat (32bit) version of sys_shmctl on 64bit kernel returns incorrect +information. In this case is better to read data from /proc/sys/kernel/shm*. + +--- util-linux-2.13-pre7/sys-utils/ipcs.c.kzak 2007-06-25 10:25:31.000000000 +0200 ++++ util-linux-2.13-pre7/sys-utils/ipcs.c 2007-06-25 10:14:06.000000000 +0200 +@@ -253,6 +253,26 @@ + 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) + { +@@ -268,7 +288,7 @@ + printf (_("kernel not configured for shared memory\n")); + return; + } +- ++ + switch (format) { + case LIMITS: + printf (_("------ Shared Memory Limits --------\n")); +@@ -276,18 +296,15 @@ + 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)); ++ + /* max shmem = pagesize * shminfo.shmall / 1024 +- * +- * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit) +- * it means that better is "/" before "*" or use "long long" + */ +- printf (_("max total shared memory (kbytes) = %lu\n"), +- getpagesize()/1024 * (unsigned long) shminfo.shmall); ++ printf (_("max total shared memory (kbytes) = %llu\n"), ++ 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-2.13-localedir.patch b/util-linux-2.13-localedir.patch new file mode 100644 index 0000000..97be1e7 --- /dev/null +++ b/util-linux-2.13-localedir.patch @@ -0,0 +1,16 @@ +--- util-linux-2.13-pre7/config/include-Makefile.am.kzak 2007-06-25 11:15:40.000000000 +0200 ++++ util-linux-2.13-pre7/config/include-Makefile.am 2007-06-25 11:16:39.000000000 +0200 +@@ -3,10 +3,10 @@ + datadir = $(prefix)/usr/share + infodir = $(datadir)/info + mandir = $(datadir)/man ++localedir = $(datadir)/locale + +-AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include ++AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \ ++ -DLOCALEDIR=\"$(localedir)\" + + DEFAULT_INCLUDES = + +-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ +- diff --git a/util-linux-2.13-mount-loop.patch b/util-linux-2.13-mount-loop.patch new file mode 100644 index 0000000..27db35c --- /dev/null +++ b/util-linux-2.13-mount-loop.patch @@ -0,0 +1,34 @@ +commit 2e039577c5eb895fab35aed136345a0c07d7a587 +Author: Karel Zak +Date: Mon Jul 2 23:35:08 2007 +0200 + + mount: use loop= option when mounting by /sbin/mount. + + The mount(8) calls external mount programs (/sbin/mount.) + without the loop=/dev/loopN option. This patch fix this bug. + + Signed-off-by: Karel Zak + +diff --git a/mount/mount.c b/mount/mount.c +index c27c5e5..50089a9 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -1057,6 +1057,9 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + goto out; + } + ++ if (loop) ++ opt_loopdev = loopdev; ++ + /* + * Call mount.TYPE for types that require a separate mount program. + * For the moment these types are ncpfs and smbfs. Maybe also vxfs. +@@ -1082,8 +1085,6 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + + if (fake || mnt5_res == 0) { + /* Mount succeeded, report this (if verbose) and write mtab entry. */ +- if (loop) +- opt_loopdev = loopdev; + + if (!(mounttype & MS_PROPAGATION)) { + update_mtab_entry(loop ? loopfile : spec, diff --git a/util-linux-2.13-mount-relatime.patch b/util-linux-2.13-mount-relatime.patch new file mode 100644 index 0000000..edae73b --- /dev/null +++ b/util-linux-2.13-mount-relatime.patch @@ -0,0 +1,44 @@ +--- util-linux-2.13-pre7/mount/mount_constants.h.kzak 2007-08-08 16:48:29.000000000 +0200 ++++ util-linux-2.13-pre7/mount/mount_constants.h 2007-08-08 16:48:30.000000000 +0200 +@@ -57,6 +57,10 @@ + #ifndef MS_VERBOSE + #define MS_VERBOSE 0x8000 /* 32768 */ + #endif ++#ifndef MS_RELATIME ++#define MS_RELATIME 0x200000 /* 200000: Update access times relative ++ to mtime/ctime */ ++#endif + #ifndef MS_UNBINDABLE + #define MS_UNBINDABLE (1<<17) /* 131072 unbindable*/ + #endif +--- util-linux-2.13-pre7/mount/mount.8.kzak 2007-08-08 16:48:29.000000000 +0200 ++++ util-linux-2.13-pre7/mount/mount.8 2007-08-08 16:48:30.000000000 +0200 +@@ -623,6 +623,13 @@ + .B nodiratime + Do not update directory inode access times on this filesystem. + .TP ++.B relatime ++Update inode access times relative to modify or change time. Access ++time is only updated if the previous access time was earlier than the ++current modify or change time. (Similar to noatime, but doesn't break ++mutt or other applications that need to know if a file has been read ++since the last time it was modified.) ++.TP + .B noauto + Can only be mounted explicitly (i.e., the + .B \-a +--- util-linux-2.13-pre7/mount/mount.c.kzak 2007-08-08 16:48:30.000000000 +0200 ++++ util-linux-2.13-pre7/mount/mount.c 2007-08-08 16:53:02.000000000 +0200 +@@ -177,6 +177,12 @@ + { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ + { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ + #endif ++#ifdef MS_RELATIME ++ { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to ++ mtime/ctime */ ++ { "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 */ + { NULL, 0, 0, 0 } diff --git a/util-linux-2.13-sfdisk-geo.patch b/util-linux-2.13-sfdisk-geo.patch new file mode 100644 index 0000000..52b5b9f --- /dev/null +++ b/util-linux-2.13-sfdisk-geo.patch @@ -0,0 +1,13 @@ +--- util-linux-2.13-pre7/fdisk/sfdisk.c.kzak 2007-06-25 09:13:31.000000000 +0200 ++++ util-linux-2.13-pre7/fdisk/sfdisk.c 2007-06-25 09:12:42.000000000 +0200 +@@ -469,8 +469,8 @@ + + R = get_geometry(dev, fd, silent); + +- B.heads = (U.heads ? U.heads : R.heads); +- B.sectors = (U.sectors ? U.sectors : R.sectors); ++ B.heads = (U.heads ? U.heads : (R.heads ? R.heads : 255)); ++ B.sectors = (U.sectors ? U.sectors : (R.sectors ? R.sectors : 63)); + B.cylinders = (U.cylinders ? U.cylinders : R.cylinders); + + B.cylindersize = B.heads * B.sectors; diff --git a/util-linux-login.pamd b/util-linux-login.pamd index 04195f7..9e8ca3b 100644 --- a/util-linux-login.pamd +++ b/util-linux-login.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 optional pam_keyinit.so force revoke session optional pam_ck_connector.so diff --git a/util-linux-remote.pamd b/util-linux-remote.pamd index 4cf49ea..705203e 100644 --- a/util-linux-remote.pamd +++ b/util-linux-remote.pamd @@ -6,9 +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 optional pam_keyinit.so force revoke + diff --git a/util-linux.spec b/util-linux.spec index e3500e6..0fe8803 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -5,11 +5,11 @@ # Notes: # - upstream maintainer Adrian Bunk -### Header +### Header Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.51%{?dist} +Release: 0.55%{?dist} License: distributable Group: System Environment/Base @@ -247,11 +247,23 @@ Patch262: util-linux-2.13-partx-man.patch Patch263: util-linux-2.13-hwclock-systohc.patch # 227903 - mount -f does not work with NFS-mounted Patch264: util-linux-2.13-mount-fake.patch - - -# When adding patches, please make sure that it is easy to find out what bug # the -# patch fixes. -########### END upstreamable +# 243930 - Translation files exist, but are not being used +Patch265: util-linux-2.13-localedir.patch +# 228731 - sfdisk doesn't support DM-MP device (add default heads and sectors) +Patch266: util-linux-2.13-sfdisk-geo.patch +# 231192 - ipcs is not printing correct values on pLinux +Patch267: util-linux-2.13-ipcs-32bit.patch +# 245912 - mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device +Patch268: util-linux-2.13-mount-loop.patch +# 213253 - "cal -3" generates improperly formatted output +Patch269: util-linux-2.13-cal-3.patch +# 236848 - mount/fstab.c:lock_mtab() should open with proper permissions +Patch270: util-linux-2.12a-mount-lockperm.patch +# 238918 - blockdev --getsize does not work properly on devices with more than 2^31 sectors +Patch271: util-linux-2.13-blockdev-errno.patch +Patch272: util-linux-2.13-blockdev-unsigned.patch +# backport MS_RELATIME +Patch273: util-linux-2.13-mount-relatime.patch %description The util-linux package contains a large variety of low-level system @@ -351,6 +363,15 @@ cp %{SOURCE8} %{SOURCE9} . %patch262 -p1 %patch263 -p1 %patch264 -p1 +%patch265 -p1 +%patch266 -p1 +%patch267 -p1 +%patch268 -p1 +%patch269 -p1 +%patch270 -p1 +%patch271 -p1 +%patch272 -p1 +%patch273 -p1 %build unset LINGUAS || : @@ -764,6 +785,25 @@ exit 0 /sbin/losetup %changelog +* Wed Aug 8 2007 Karel Zak 2.13-0.55 +- rebuild F7 package to F8 + +* Wed Aug 8 2007 Karel Zak 2.13-0.54 +- backport mount relatime patch + +* Thu Aug 2 2007 Karel Zak 2.13-0.53 +- fix #236848 - mount/fstab.c:lock_mtab() should open with proper permissions +- fix #238918 - blockdev --getsize does not work properly on devices with more than 2^31 sectors + +* Mon Jul 9 2007 Karel Zak 2.13-0.52 +- fix #245578 - login's PAM configuration inits the keyring at an inconvenient time +- fix #231532 - "pamconsole" not documented in mount(8) +- fix #243930 - translation files exist, but are not being used +- fix #228731 - sfdisk doesn't support DM-MP device (add default heads and sectors) +- fix #231192 - ipcs is not printing correct values on pLinux +- fix #245912 - mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device +- fix #213253 - "cal -3" generates improperly formatted output + * 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. From 72576b42dd3aa9792637d3a39b6debeea591a768 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 20 Aug 2007 11:25:12 +0000 Subject: [PATCH 086/425] util-linux is dead.... use util-linux-ng --- floppy-0.12-locale.patch | 10 - raw-handle-nonpresent-devs.patch | 73 - sources | 2 - util-linux-2.11f-rawman.patch | 14 - util-linux-2.11y-chsh-103004.patch | 19 - util-linux-2.11y-fdisksegv-103954.patch | 31 - util-linux-2.11y-multibyte.patch | 26 - util-linux-2.11y-procpartitions-37436.patch | 70 - util-linux-2.11y-skipraid2.patch | 109 - util-linux-2.12a-126572-fdiskman.patch | 32 - util-linux-2.12a-16415-rdevman.patch | 55 - util-linux-2.12a-ipcs-84243-86285.patch | 21 - util-linux-2.12a-mount-lockperm.patch | 21 - util-linux-2.12a-mount-man-cifs.patch | 19 - util-linux-2.12a-mountbylabel-dm.patch | 63 - util-linux-2.12a-pamsession.patch | 12 - util-linux-2.12a-pamstart.patch | 11 - util-linux-2.12a-partlimit.patch | 22 - util-linux-2.12a-raw-man-dd.patch | 28 - util-linux-2.12j-113790-hotkeys.patch | 44 - util-linux-2.12j-managed.patch | 11 - util-linux-2.12j-pamconsole.patch | 139 -- util-linux-2.12p-cal-wide.patch | 53 - util-linux-2.12p-col-EILSEQ.patch | 38 - util-linux-2.12p-execl.patch | 25 - util-linux-2.12p-fdformat-ide.patch | 22 - util-linux-2.12p-floppy-generic.patch | 102 - util-linux-2.12p-fstab-man.patch | 25 - util-linux-2.12p-ipcs-typo.patch | 14 - util-linux-2.12p-login-lastlog.patch | 11 - util-linux-2.12p-look-separator.patch | 16 - util-linux-2.12p-lvm2dupes-76467.patch | 27 - util-linux-2.12p-mount-ocfs2.patch | 187 -- util-linux-2.12p-mtab-lock.patch | 150 -- util-linux-2.12p-swaponsymlink-57300.patch | 24 - util-linux-2.12p-vipw-perm.patch | 16 - util-linux-2.13-arch.patch | 94 - util-linux-2.13-audit-hwclock.patch | 314 --- util-linux-2.13-audit-login.patch | 101 - util-linux-2.13-blockdev-errno.patch | 36 - util-linux-2.13-blockdev-unsigned.patch | 69 - util-linux-2.13-cal-3.patch | 109 - util-linux-2.13-cal-wide.patch | 236 -- util-linux-2.13-cramfs-maxentries.patch | 47 - util-linux-2.13-cramfs-zerofiles.patch | 11 - util-linux-2.13-ctrlaltdel-man.patch | 10 - util-linux-2.13-ctty3.patch | 102 - util-linux-2.13-fdisk-b-4096.patch | 15 - util-linux-2.13-fdisk-gpt.patch | 493 ----- util-linux-2.13-fdisk-isfull.patch | 103 - util-linux-2.13-fdisk-sectors.patch | 345 --- util-linux-2.13-hexdump-gcc.patch | 17 - util-linux-2.13-hwclock-systohc.patch | 46 - util-linux-2.13-ipcs-32bit.patch | 68 - util-linux-2.13-ipcs-shmax.patch | 18 - util-linux-2.13-localedir.patch | 16 - util-linux-2.13-login-hang.patch | 20 - util-linux-2.13-login-ipv6.patch | 80 - util-linux-2.13-login-pam-acct.patch | 31 - util-linux-2.13-login-timeval.patch | 49 - util-linux-2.13-losetup-all.patch | 160 -- util-linux-2.13-losetup-deprecated.patch | 13 - util-linux-2.13-losetup-rdonly.patch | 47 - util-linux-2.13-mkdir_p.patch | 97 - util-linux-2.13-mkswap-mounted.patch | 62 - util-linux-2.13-mkswap-selinux.patch | 81 - util-linux-2.13-more-CLOEXEC.patch | 19 - util-linux-2.13-moretc.patch | 106 - util-linux-2.13-mount-comment.patch | 14 - util-linux-2.13-mount-context.patch | 218 -- util-linux-2.13-mount-fake.patch | 11 - util-linux-2.13-mount-loop.patch | 34 - util-linux-2.13-mount-man-bugs.patch | 26 - util-linux-2.13-mount-man-nfs.patch | 84 - util-linux-2.13-mount-man-nfs4.patch | 106 - util-linux-2.13-mount-move.patch | 28 - util-linux-2.13-mount-nonfs.patch | 196 -- util-linux-2.13-mount-relatime.patch | 44 - util-linux-2.13-mount-sloppy.patch | 20 - util-linux-2.13-mount-subtree.patch | 187 -- util-linux-2.13-mount-twiceloop.patch | 72 - util-linux-2.13-mount-uhelper.patch | 68 - util-linux-2.13-mount-uuid.patch | 60 - util-linux-2.13-namei-logic.patch | 129 -- util-linux-2.13-partx-man.patch | 129 -- util-linux-2.13-raw-raw0.patch | 45 - util-linux-2.13-rmparts.patch | 105 - util-linux-2.13-schedutils-SCHED_BATCH.patch | 102 - util-linux-2.13-schedutils-man.patch | 22 - util-linux-2.13-sfdisk-geo.patch | 13 - util-linux-2.13-swap-page.patch | 68 - util-linux-2.13-swapon-suspend.patch | 161 -- util-linux-2.13-umount-sysfs.patch | 11 - util-linux.spec | 2035 ------------------ 94 files changed, 8545 deletions(-) delete mode 100644 floppy-0.12-locale.patch delete mode 100644 raw-handle-nonpresent-devs.patch delete mode 100644 sources delete mode 100644 util-linux-2.11f-rawman.patch delete mode 100644 util-linux-2.11y-chsh-103004.patch delete mode 100644 util-linux-2.11y-fdisksegv-103954.patch delete mode 100644 util-linux-2.11y-multibyte.patch delete mode 100644 util-linux-2.11y-procpartitions-37436.patch delete mode 100644 util-linux-2.11y-skipraid2.patch delete mode 100644 util-linux-2.12a-126572-fdiskman.patch delete mode 100644 util-linux-2.12a-16415-rdevman.patch delete mode 100644 util-linux-2.12a-ipcs-84243-86285.patch delete mode 100644 util-linux-2.12a-mount-lockperm.patch delete mode 100644 util-linux-2.12a-mount-man-cifs.patch delete mode 100644 util-linux-2.12a-mountbylabel-dm.patch delete mode 100644 util-linux-2.12a-pamsession.patch delete mode 100644 util-linux-2.12a-pamstart.patch delete mode 100644 util-linux-2.12a-partlimit.patch delete mode 100644 util-linux-2.12a-raw-man-dd.patch delete mode 100644 util-linux-2.12j-113790-hotkeys.patch delete mode 100644 util-linux-2.12j-managed.patch delete mode 100644 util-linux-2.12j-pamconsole.patch delete mode 100644 util-linux-2.12p-cal-wide.patch delete mode 100644 util-linux-2.12p-col-EILSEQ.patch delete mode 100644 util-linux-2.12p-execl.patch delete mode 100644 util-linux-2.12p-fdformat-ide.patch delete mode 100644 util-linux-2.12p-floppy-generic.patch delete mode 100644 util-linux-2.12p-fstab-man.patch delete mode 100644 util-linux-2.12p-ipcs-typo.patch delete mode 100644 util-linux-2.12p-login-lastlog.patch delete mode 100644 util-linux-2.12p-look-separator.patch delete mode 100644 util-linux-2.12p-lvm2dupes-76467.patch delete mode 100644 util-linux-2.12p-mount-ocfs2.patch delete mode 100644 util-linux-2.12p-mtab-lock.patch delete mode 100644 util-linux-2.12p-swaponsymlink-57300.patch delete mode 100644 util-linux-2.12p-vipw-perm.patch delete mode 100644 util-linux-2.13-arch.patch delete mode 100644 util-linux-2.13-audit-hwclock.patch delete mode 100644 util-linux-2.13-audit-login.patch delete mode 100644 util-linux-2.13-blockdev-errno.patch delete mode 100644 util-linux-2.13-blockdev-unsigned.patch delete mode 100644 util-linux-2.13-cal-3.patch delete mode 100644 util-linux-2.13-cal-wide.patch delete mode 100644 util-linux-2.13-cramfs-maxentries.patch delete mode 100644 util-linux-2.13-cramfs-zerofiles.patch delete mode 100644 util-linux-2.13-ctrlaltdel-man.patch delete mode 100644 util-linux-2.13-ctty3.patch delete mode 100644 util-linux-2.13-fdisk-b-4096.patch delete mode 100644 util-linux-2.13-fdisk-gpt.patch delete mode 100644 util-linux-2.13-fdisk-isfull.patch delete mode 100644 util-linux-2.13-fdisk-sectors.patch delete mode 100644 util-linux-2.13-hexdump-gcc.patch delete mode 100644 util-linux-2.13-hwclock-systohc.patch delete mode 100644 util-linux-2.13-ipcs-32bit.patch delete mode 100644 util-linux-2.13-ipcs-shmax.patch delete mode 100644 util-linux-2.13-localedir.patch delete mode 100644 util-linux-2.13-login-hang.patch delete mode 100644 util-linux-2.13-login-ipv6.patch delete mode 100644 util-linux-2.13-login-pam-acct.patch delete mode 100644 util-linux-2.13-login-timeval.patch delete mode 100644 util-linux-2.13-losetup-all.patch delete mode 100644 util-linux-2.13-losetup-deprecated.patch delete mode 100644 util-linux-2.13-losetup-rdonly.patch delete mode 100644 util-linux-2.13-mkdir_p.patch delete mode 100644 util-linux-2.13-mkswap-mounted.patch delete mode 100644 util-linux-2.13-mkswap-selinux.patch delete mode 100644 util-linux-2.13-more-CLOEXEC.patch delete mode 100644 util-linux-2.13-moretc.patch delete mode 100644 util-linux-2.13-mount-comment.patch delete mode 100644 util-linux-2.13-mount-context.patch delete mode 100644 util-linux-2.13-mount-fake.patch delete mode 100644 util-linux-2.13-mount-loop.patch delete mode 100644 util-linux-2.13-mount-man-bugs.patch delete mode 100644 util-linux-2.13-mount-man-nfs.patch delete mode 100644 util-linux-2.13-mount-man-nfs4.patch delete mode 100644 util-linux-2.13-mount-move.patch delete mode 100644 util-linux-2.13-mount-nonfs.patch delete mode 100644 util-linux-2.13-mount-relatime.patch delete mode 100644 util-linux-2.13-mount-sloppy.patch delete mode 100644 util-linux-2.13-mount-subtree.patch delete mode 100644 util-linux-2.13-mount-twiceloop.patch delete mode 100644 util-linux-2.13-mount-uhelper.patch delete mode 100644 util-linux-2.13-mount-uuid.patch delete mode 100644 util-linux-2.13-namei-logic.patch delete mode 100644 util-linux-2.13-partx-man.patch delete mode 100644 util-linux-2.13-raw-raw0.patch delete mode 100644 util-linux-2.13-rmparts.patch delete mode 100644 util-linux-2.13-schedutils-SCHED_BATCH.patch delete mode 100644 util-linux-2.13-schedutils-man.patch delete mode 100644 util-linux-2.13-sfdisk-geo.patch delete mode 100644 util-linux-2.13-swap-page.patch delete mode 100644 util-linux-2.13-swapon-suspend.patch delete mode 100644 util-linux-2.13-umount-sysfs.patch delete mode 100644 util-linux.spec diff --git a/floppy-0.12-locale.patch b/floppy-0.12-locale.patch deleted file mode 100644 index 9c1aa53..0000000 --- a/floppy-0.12-locale.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- floppy-0.12/superfloppy.c.fixfail 2004-07-15 14:41:21.835145325 -0400 -+++ floppy-0.12/superfloppy.c 2004-07-15 14:41:32.385876513 -0400 -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/raw-handle-nonpresent-devs.patch b/raw-handle-nonpresent-devs.patch deleted file mode 100644 index 1dd0b76..0000000 --- a/raw-handle-nonpresent-devs.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- util-linux-2.12a/disk-utils/raw.c.=K0000=.orig -+++ util-linux-2.12a/disk-utils/raw.c -@@ -31,6 +31,7 @@ - #endif - #define DEVFS_RAWCTLDEV "/dev/raw/rawctl" - -+#define RAW_NR_MINORS 8192 - - char * progname; - int do_query = 0; -@@ -94,7 +95,7 @@ int main(int argc, char *argv[]) - if (do_query_all) { - if (optind < argc) - usage(1); -- for (i=1; i<255; i++) -+ for (i = 1; i < RAW_NR_MINORS; i++) - query(i, 1); - exit(0); - } -@@ -109,9 +110,16 @@ int main(int argc, char *argv[]) - - err = stat(raw_name, &statbuf); - if (err) { -- fprintf (stderr, "Cannot locate raw device '%s' (%s)\n", -- raw_name, strerror(errno)); -- exit(2); -+ int rc; -+ -+ rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); -+ if (rc != 1) { -+ fprintf (stderr, -+ "Cannot locate raw device '%s' (%s)\n", -+ raw_name, strerror(errno)); -+ exit(2); -+ } -+ goto skip_test_rawdev; - } - - if (!S_ISCHR(statbuf.st_mode)) { -@@ -127,6 +135,7 @@ int main(int argc, char *argv[]) - - raw_minor = minor(statbuf.st_rdev); - -+skip_test_rawdev: - if (do_query) - return query(raw_minor, 0); - -@@ -193,6 +202,7 @@ void open_raw_ctl(void) - int query(int minor, int quiet) - { - struct raw_config_request rq; -+ static int has_worked = 0; - int err; - - rq.raw_minor = minor; -@@ -200,11 +210,17 @@ int query(int minor, int quiet) - if (err < 0) { - if (quiet && errno == ENODEV) - return 3; -+ if (has_worked && errno == EINVAL) -+ return 0; - fprintf (stderr, - "Error querying raw device (%s)\n", - strerror(errno)); - exit(3); - } -+ /* If one query has worked, mark that fact so that we don't -+ * report spurious fatal errors if raw(8) has been built to -+ * support more raw minor numbers than the kernel has. */ -+ has_worked = 1; - if (quiet && !rq.block_major && !rq.block_minor) - return 0; - printf (RAWDEVDIR "raw%d: bound to major %d, minor %d\n", diff --git a/sources b/sources deleted file mode 100644 index dcc01f1..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz -13cdf4b76533e8421dc49de188f85291 util-linux-2.13-pre7.tar.bz2 diff --git a/util-linux-2.11f-rawman.patch b/util-linux-2.11f-rawman.patch deleted file mode 100644 index c891c2b..0000000 --- a/util-linux-2.11f-rawman.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-linux-2.11f/disk-utils/raw.8.sopwith Tue Feb 26 13:15:34 2002 -+++ util-linux-2.11f/disk-utils/raw.8 Tue Feb 26 13:16:28 2002 -@@ -58,6 +58,11 @@ - disk, they must be an exact number of sectors long, and the data buffer - in virtual memory must also be aligned to a multiple of the sector - size. The sector size is 512 bytes for most devices. -+.PP -+Use the /etc/sysconfig/rawdevices file to define the set of raw device -+mappings automatically created during the system startup sequence. The -+format of the file is the same used in the command line with the exception -+that the "raw" command itself is omitted. - .SH OPTIONS - .TP - .B -q diff --git a/util-linux-2.11y-chsh-103004.patch b/util-linux-2.11y-chsh-103004.patch deleted file mode 100644 index 2bafab1..0000000 --- a/util-linux-2.11y-chsh-103004.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- util-linux-2.11y/login-utils/chsh.c.sopwith Fri Sep 5 08:51:49 2003 -+++ util-linux-2.11y/login-utils/chsh.c Fri Sep 5 08:53:43 2003 -@@ -185,7 +185,6 @@ - printf (_("Shell not changed.\n")); - return 0; - } -- if (!strcmp(shell, "/bin/sh")) shell = ""; - pw->pw_shell = shell; - if (setpwnam (pw) < 0) { - perror ("setpwnam"); -@@ -299,6 +298,8 @@ - check_shell (char *shell) { - int i, c; - -+ if (! *shell) shell = "/bin/sh"; /* Fudge it */ -+ - if (*shell != '/') { - printf (_("%s: shell must be a full path name.\n"), whoami); - return (-1); diff --git a/util-linux-2.11y-fdisksegv-103954.patch b/util-linux-2.11y-fdisksegv-103954.patch deleted file mode 100644 index 367edb9..0000000 --- a/util-linux-2.11y-fdisksegv-103954.patch +++ /dev/null @@ -1,31 +0,0 @@ -*** util-linux-2.11y/fdisk/fdisk.c.000 2003-09-08 14:47:41.000000000 +0200 ---- util-linux-2.11y/fdisk/fdisk.c 2003-09-08 15:01:42.000000000 +0200 -*************** -*** 2020,2028 **** - for (i = 0; i < 4; i++) - free_primary += !ptes[i].part_table->sys_ind; - -! if (!free_primary && partitions >= MAXIMUM_PARTS) { -! printf(_("The maximum number of partitions has been created\n")); -! return; - } - - if (!free_primary) { ---- 2020,2036 ---- - for (i = 0; i < 4; i++) - free_primary += !ptes[i].part_table->sys_ind; - -! // Fix to only add primary partition if all logical partions are used -! if (partitions >= MAXIMUM_PARTS) { -! if (!free_primary) { -! printf(_("The maximum number of partitions has been created\n")); -! return; -! } -! else { -! add_partition(get_partition(0, 4), -! LINUX_NATIVE); -! return; -! } - } - - if (!free_primary) { diff --git a/util-linux-2.11y-multibyte.patch b/util-linux-2.11y-multibyte.patch deleted file mode 100644 index 46915e0..0000000 --- a/util-linux-2.11y-multibyte.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- util-linux-2.11y/text-utils/more.c.multibyte 2003-02-03 16:22:32.000000000 +0000 -+++ util-linux-2.11y/text-utils/more.c 2003-02-03 17:03:45.000000000 +0000 -@@ -1163,7 +1163,23 @@ - my_putstring(state ? ULenter : ULexit); - } - if (c != ' ' || pstate == 0 || state != 0 || ulglitch == 0) -+#ifdef ENABLE_WIDECHAR -+ { -+ wchar_t wc; -+ size_t mblength; -+ mbstate_t state; -+ memset (&state, '\0', sizeof (mbstate_t)); -+ s--; n++; -+ mblength = mbrtowc (&wc, s, n, &state); -+ if (mblength == (size_t) -2 || mblength == (size_t) -1) -+ mblength = 1; -+ while (mblength--) -+ putchar (*s++); -+ n += mblength; -+ } -+#else - putchar(c); -+#endif /* ENABLE_WIDECHAR */ - if (state && *chUL) { - pr(chBS); - my_putstring(chUL); diff --git a/util-linux-2.11y-procpartitions-37436.patch b/util-linux-2.11y-procpartitions-37436.patch deleted file mode 100644 index 978e906..0000000 --- a/util-linux-2.11y-procpartitions-37436.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- util-linux-2.11y/disk-utils/blockdev.c.procpartitions 2002-03-08 17:57:02.000000000 -0500 -+++ util-linux-2.11y/disk-utils/blockdev.c 2003-01-13 14:28:41.000000000 -0500 -@@ -290,6 +290,7 @@ - char ptname[200]; - char device[210]; - int ma, mi, sz; -+ char iobuf[32*1024]; - - procpt = fopen(PROC_PARTITIONS, "r"); - if (!procpt) { -@@ -297,6 +298,7 @@ - progname, PROC_PARTITIONS); - exit(1); - } -+ setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf)); - - while (fgets(line, sizeof(line), procpt)) { - if (sscanf (line, " %d %d %d %[^\n ]", ---- util-linux-2.11y/fdisk/fdisk.c.procpartitions 2003-01-13 14:28:41.000000000 -0500 -+++ util-linux-2.11y/fdisk/fdisk.c 2003-01-13 14:28:41.000000000 -0500 -@@ -2371,12 +2371,14 @@ - FILE *procpt; - char line[100], ptname[100], devname[120], *s; - int ma, mi, sz; -+ char iobuf[32*1024]; - - procpt = fopen(PROC_PARTITIONS, "r"); - if (procpt == NULL) { - fprintf(stderr, _("cannot open %s\n"), PROC_PARTITIONS); - return; - } -+ setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf)); - - while (fgets(line, sizeof(line), procpt)) { - if (sscanf (line, " %d %d %d %[^\n ]", ---- util-linux-2.11y/mount/mount_by_label.c.procpartitions 2002-11-26 04:23:49.000000000 -0500 -+++ util-linux-2.11y/mount/mount_by_label.c 2003-01-13 14:31:53.000000000 -0500 -@@ -136,9 +136,7 @@ - char device[110]; - int firstPass; - int handleOnFirst; --#if 0 - char iobuf[32*1024]; /* For setvbuf */ --#endif - - if (uuidCache) - return; -@@ -155,7 +153,6 @@ - PROC_PARTITIONS); - return; - } --#if 0 - /* Ugly kludge - the contents of /proc/partitions change in time, - and this causes failures when the file is not read in one go. - In particular, one cannot use stdio on /proc/partitions. -@@ -166,9 +163,12 @@ - to keep statistics in /proc/partitions. Of course, statistics belong - in some /proc/diskstats, not in some /proc file that happened to - exist already. */ -- -+/* Until someone actually implements something else, /proc/partitions _IS_ -+ /proc/diskstats. And no matter what file we are reading, we will still -+ need to increase the buffer size, because 8k is just not Enough For -+ Everyone even if stats aren't in /proc/partitions. -+*/ - setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf)); --#endif - - for (firstPass = 1; firstPass >= 0; firstPass--) { - fseek(procpt, 0, SEEK_SET); diff --git a/util-linux-2.11y-skipraid2.patch b/util-linux-2.11y-skipraid2.patch deleted file mode 100644 index 4778706..0000000 --- a/util-linux-2.11y-skipraid2.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- util-linux-2.11y/mount/linux_fs.h.skipraid2 2002-10-07 09:08:22.000000000 -0400 -+++ util-linux-2.11y/mount/linux_fs.h 2003-01-13 14:42:57.000000000 -0500 -@@ -13,6 +13,12 @@ - #endif - #endif - -+#include -+#ifndef BLKGETSIZE64 -+#include -+#define BLKGETSIZE64 _IOR(0x12,114,sizeof(uint64_t)) -+#endif -+ - #define MINIX_SUPER_MAGIC 0x137F /* minix v1, 14 char names */ - #define MINIX_SUPER_MAGIC2 0x138F /* minix v1, 30 char names */ - #define MINIX2_SUPER_MAGIC 0x2468 /* minix v2, 14 char names */ ---- util-linux-2.11y/mount/get_label_uuid.c.skipraid2 2003-01-13 14:44:04.000000000 -0500 -+++ util-linux-2.11y/mount/get_label_uuid.c 2003-01-13 14:46:34.000000000 -0500 -@@ -6,6 +6,8 @@ - #include - #include - #include -+#include -+#include - - #include "linux_fs.h" - #include "get_label_uuid.h" -@@ -19,28 +21,62 @@ - * not on the disks that form the raid array. This test causes a lot of - * problems when run on my striped promise fasttrak 100 array." - */ --static inline int --is_raid_partition(int fd) { --#if 0 -- struct mdp_super_block mdsb; -- int n; -- -- /* hardcode 4096 here in various places, because that's -- what it's defined to be. Note that even if we used -- the actual kernel headers, sizeof(mdp_super_t) is -- slightly larger in the 2.2 kernel on 64-bit archs, -- so using that wouldn't work. */ -- lseek(fd, -4096, SEEK_END); /* Ignore possible error -- about return value overflow */ -- n = 4096; -- if (sizeof(mdsb) < n) -- n = sizeof(mdsb); -- if (read(fd, &mdsb, n) != n) -- return 1; /* error */ -- return (mdsbmagic(mdsb) == MD_SB_MAGIC); -+ -+#if BYTE_ORDER == BIG_ENDIAN -+#define INT32_FROM_LE(val) ((unsigned int) ( \ -+ (((unsigned int) (val) & (unsigned int) 0x000000ffU) << 24) | \ -+ (((unsigned int) (val) & (unsigned int) 0x0000ff00U) << 8) | \ -+ (((unsigned int) (val) & (unsigned int) 0x00ff0000U) >> 8) | \ -+ (((unsigned int) (val) & (unsigned int) 0xff000000U) >> 24))) - #else -- return 0; -+#define INT32_FROM_LE(val) (val) -+#endif -+ -+typedef struct { -+ unsigned int md_magic; -+} mdp_super_t; -+#ifndef MD_SB_MAGIC -+#define MD_SB_MAGIC 0xa92b4efc -+#endif -+#ifndef MD_RESERVED_BYTES -+#define MD_RESERVED_BYTES 65536L - #endif -+#ifndef MD_NEW_SIZE_BYTES -+#define MD_NEW_SIZE_BYTES(x) ((x & ~(MD_RESERVED_BYTES - 1L)) - MD_RESERVED_BYTES) -+#endif -+ -+static int -+is_raid_partition(int fd) -+{ -+ mdp_super_t mdsb; -+ int n; -+ struct stat sbuf; -+ if(fstat(fd, &sbuf)) -+ return 2; -+ if(!sbuf.st_size) { -+ uint64_t bsize64; -+ unsigned int bsize32; -+ if(!ioctl(fd, BLKGETSIZE64, &bsize64)) -+ sbuf.st_size = bsize64; -+ else if(!ioctl(fd, BLKGETSIZE, &bsize32)) -+ sbuf.st_size = bsize32; -+ } -+ if(!sbuf.st_size) return 3; -+ /* hardcode 4096 here in various places, -+ because that's what it's defined to be. -+ Note that even if we used the actual kernel headers, -+ sizeof(mdp_super_t) is slightly larger in the 2.2 kernel on 64-bit -+ archs, so using that wouldn't work. */ -+ lseek(fd, MD_NEW_SIZE_BYTES(sbuf.st_size), SEEK_SET); -+ n = 4096; if(sizeof(mdsb) < n) n = sizeof(mdsb); -+ if(read(fd, &mdsb, n) != n) -+ return 4; /* error */ -+ mdsb.md_magic = INT32_FROM_LE(mdsb.md_magic); -+ return (mdsb.md_magic == MD_SB_MAGIC); /* If this device has a -+ RAID superblock at -+ the end, it must be -+ part of a RAID -+ array. */ - } - - /* for now, only ext2, ext3, xfs, ocfs are supported */ diff --git a/util-linux-2.12a-126572-fdiskman.patch b/util-linux-2.12a-126572-fdiskman.patch deleted file mode 100644 index 5142d1b..0000000 --- a/util-linux-2.12a-126572-fdiskman.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- util-linux-2.12a/fdisk/fdisk.8.sopwith 2004-07-09 17:49:08.522648265 -0400 -+++ util-linux-2.12a/fdisk/fdisk.8 2004-07-09 17:50:24.281128923 -0400 -@@ -213,28 +213,9 @@ - There are several *fdisk programs around. - Each has its problems and strengths. - Try them in the order --.BR cfdisk , -+.BR parted , - .BR fdisk , - .BR sfdisk . --(Indeed, --.B cfdisk --is a beautiful program that has strict requirements on --the partition tables it accepts, and produces high quality partition --tables. Use it if you can. --.B fdisk --is a buggy program that does fuzzy things - usually it happens to --produce reasonable results. Its single advantage is that it has --some support for BSD disk labels and other non-DOS partition tables. --Avoid it if you can. --.B sfdisk --is for hackers only - the user interface is terrible, but it is --more correct than fdisk and more powerful than both fdisk and cfdisk. --Moreover, it can be used noninteractively.) --.PP --These days there also is --.BR parted . --The cfdisk interface is nicer, but parted does much more: it not only --resizes partitions, but also the filesystems that live in them. - .PP - The IRIX/SGI type disklabel is currently not supported by the kernel. - Moreover, IRIX/SGI header directories are not fully supported yet. diff --git a/util-linux-2.12a-16415-rdevman.patch b/util-linux-2.12a-16415-rdevman.patch deleted file mode 100644 index 4003e43..0000000 --- a/util-linux-2.12a-16415-rdevman.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- util-linux-2.12a/fdisk/fdisk.8.sopwith 2004-08-20 14:46:47.062722632 -0400 -+++ util-linux-2.12a/fdisk/fdisk.8 2004-08-20 14:47:12.496816302 -0400 -@@ -149,12 +149,12 @@ - this extra information even if the /U flag is given -- we consider - this a bug in DOS FORMAT and DOS FDISK. - --The bottom line is that if you use cfdisk or fdisk to change the size of a -+The bottom line is that if you use fdisk to change the size of a - DOS partition table entry, then you must also use - .B dd - to zero the first 512 bytes of that partition before using DOS FORMAT to --format the partition. For example, if you were using cfdisk to make a DOS --partition table entry for /dev/hda1, then (after exiting fdisk or cfdisk -+format the partition. For example, if you were using disk to make a DOS -+partition table entry for /dev/hda1, then (after exiting fdisk - and rebooting Linux so that the partition table information is valid) you - would use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zero - the first 512 bytes of the partition. -@@ -166,7 +166,7 @@ - - For best results, you should always use an OS-specific partition table - program. For example, you should make DOS partitions with the DOS FDISK --program and Linux partitions with the Linux fdisk or Linux cfdisk program. -+program and Linux partitions with the Linux fdisk program. - - .SH OPTIONS - .TP -@@ -228,7 +228,6 @@ - .\" Andreas Neuper (ANeuper@GUUG.de) - .\" and many others. - .SH "SEE ALSO" --.BR cfdisk (8), - .BR mkfs (8), - .BR parted (8), - .BR sfdisk (8) ---- util-linux-2.12a/sys-utils/rdev.8.sopwith 2004-08-20 11:35:56.740842004 -0400 -+++ util-linux-2.12a/sys-utils/rdev.8 2004-08-20 11:38:38.291622818 -0400 -@@ -79,7 +79,8 @@ - .B ramsize - command, the - .B size --parameter specifies the size of the RAM disk in kilobytes. -+parameter specifies the size of the RAM disk in kilobytes. 2.0.x kernels and newer dynamically allocate the ramdisk -+and do not need this setting. - - For the - .B rootflags -@@ -121,6 +122,7 @@ - .B rdev - to act like - .BR ramsize . -+(Not relevant for 2.0.x and newer kernels.) - .TP - .B \-R - Causes diff --git a/util-linux-2.12a-ipcs-84243-86285.patch b/util-linux-2.12a-ipcs-84243-86285.patch deleted file mode 100644 index c20e5ba..0000000 --- a/util-linux-2.12a-ipcs-84243-86285.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- util-linux-2.12a/sys-utils/ipcs.c.ipcs 2004-03-04 14:28:42.000000000 -0500 -+++ util-linux-2.12a/sys-utils/ipcs.c 2004-05-26 18:05:44.967792668 -0400 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include "nls.h" - - /* X/OPEN tells us to use for semctl() */ -@@ -279,8 +280,8 @@ - (unsigned long) shminfo.shmmni); - printf (_("max seg size (kbytes) = %lu\n"), - (unsigned long) (shminfo.shmmax >> 10)); -- printf (_("max total shared memory (pages) = %lu\n"), -- (unsigned long) shminfo.shmall); -+ printf (_("max total shared memory (kbytes) = %lu\n"), -+ (getpagesize()*((unsigned long) shminfo.shmall))/1024UL); - printf (_("min seg size (bytes) = %lu\n"), - (unsigned long) shminfo.shmmin); - return; diff --git a/util-linux-2.12a-mount-lockperm.patch b/util-linux-2.12a-mount-lockperm.patch deleted file mode 100644 index d60538c..0000000 --- a/util-linux-2.12a-mount-lockperm.patch +++ /dev/null @@ -1,21 +0,0 @@ - -From: Flávio Leitner -Subject: mount should set proper permissions on locktime - -When creating the "/etc/mtab~" lockfile (specifically 'linktargetfile' in the -lock_mtab function), the file is created with incorrect permissions ('000') -which necessitates root to leverage CAP_DAC_OVERRIDE. If proper file modes (it -would appear 0600 would be sufficient) were used in the open this would -function properly with CAP_DAC_OVERRIDE revoked. - ---- util-linux-2.12a/mount/fstab.c.kzak 2007-07-31 12:13:26.000000000 +0200 -+++ util-linux-2.12a/mount/fstab.c 2007-07-31 12:13:11.000000000 +0200 -@@ -433,7 +433,7 @@ - linktargetfile = xmalloc(strlen(MOUNTLOCK_LINKTARGET) + 20); - sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); - -- i = open (linktargetfile, O_WRONLY|O_CREAT, 0); -+ i = open (linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR); - if (i < 0) { - int errsv = errno; - /* linktargetfile does not exist (as a file) diff --git a/util-linux-2.12a-mount-man-cifs.patch b/util-linux-2.12a-mount-man-cifs.patch deleted file mode 100644 index df673ef..0000000 --- a/util-linux-2.12a-mount-man-cifs.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- util-linux-2.12a/mount/mount.8.cifs 2005-11-23 16:34:34.000000000 +0100 -+++ util-linux-2.12a/mount/mount.8 2005-11-23 16:38:37.000000000 +0100 -@@ -720,6 +720,16 @@ - (However, quota utilities may react to such strings in - .IR /etc/fstab .) - -+.SH "Mount options for cifs" -+Just like -+.IR nfs " or " smbfs -+implementation expects a binary argument -+to the mount system call. This argument is constructed by -+.BR mount.cifs (8) -+and the current version of -+.B mount -+(2.12) does not know anything about cifs. -+ - .SH "Mount options for coherent" - None. - diff --git a/util-linux-2.12a-mountbylabel-dm.patch b/util-linux-2.12a-mountbylabel-dm.patch deleted file mode 100644 index fd8f567..0000000 --- a/util-linux-2.12a-mountbylabel-dm.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- util-linux-2.12a/mount/mount_by_label.c.old 2004-08-11 22:25:06.000000000 +0100 -+++ util-linux-2.12a/mount/mount_by_label.c 2004-08-11 22:25:21.000000000 +0100 -@@ -17,6 +17,8 @@ - * - Added JFS v2 format support - * 2002-07-26 Luciano Chavez - * - Added EVMS support -+ * 2004-08-11 Alasdair Kergon -+ * - Added LVM2/device-mapper support - */ - - #include -@@ -38,6 +40,7 @@ - #define VG_DIR "/proc/lvm/VGs" - #define EVMS_VOLUME_NAME_SIZE 127 - #define PROC_EVMS_VOLUMES "/proc/evms/volumes" -+#define DEVICEMAPPERDIR "/dev/mapper" - - static struct uuidCache_s { - struct uuidCache_s *next; -@@ -101,6 +104,34 @@ - closedir(vg_dir); - } - -+/* LVM2/device-mapper support */ -+static void -+uuidcache_init_dm(void) { -+ char lvm_device[PATH_MAX]; -+ DIR *d; -+ struct dirent *lv_iter; -+ char uuid[16], *label; -+ -+ if (!(d = opendir(DEVICEMAPPERDIR))) { -+ if (errno != ENOENT) -+ perror("mount (init_dm)"); -+ return; -+ } -+ -+ while ((lv_iter = readdir(d))) { -+ if (!strcmp(lv_iter->d_name, "control") || -+ !strcmp(lv_iter->d_name, ".") || -+ !strcmp(lv_iter->d_name, "..")) -+ continue; -+ snprintf(lvm_device, sizeof(lvm_device), "%s/%s", -+ DEVICEMAPPERDIR, lv_iter->d_name); -+ if (!get_label_uuid(strdup(lvm_device), &label, uuid)) -+ uuidcache_addentry(strdup(lvm_device), -+ label, uuid); -+ } -+ closedir(d); -+} -+ - static int - uuidcache_init_evms(void) { - FILE *procvol; -@@ -250,6 +281,8 @@ - fclose(procpt); - - uuidcache_init_lvm(); -+ -+ uuidcache_init_dm(); - } - - #define UUID 1 diff --git a/util-linux-2.12a-pamsession.patch b/util-linux-2.12a-pamsession.patch deleted file mode 100644 index cace510..0000000 --- a/util-linux-2.12a-pamsession.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urb util-linux-2.12a.orig/login-utils/login.c util-linux-2.12a/login-utils/login.c ---- util-linux-2.12a.orig/login-utils/login.c 2005-04-08 09:43:37.000000000 -0400 -+++ util-linux-2.12a/login-utils/login.c 2005-04-08 11:14:37.850579656 -0400 -@@ -703,6 +703,8 @@ - PAM_FAIL_CHECK; - - retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED); -+ if (retcode != PAM_SUCCESS) -+ pam_close_session(pamh, 0); - PAM_FAIL_CHECK; - - #else /* ! USE_PAM */ diff --git a/util-linux-2.12a-pamstart.patch b/util-linux-2.12a-pamstart.patch deleted file mode 100644 index 1ca73e2..0000000 --- a/util-linux-2.12a-pamstart.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.12a/login-utils/login.c.pamstart 2004-09-15 16:13:36.462028734 +0200 -+++ util-linux-2.12a/login-utils/login.c 2004-09-15 16:13:50.790278325 +0200 -@@ -549,7 +549,7 @@ - * 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)); diff --git a/util-linux-2.12a-partlimit.patch b/util-linux-2.12a-partlimit.patch deleted file mode 100644 index 6912547..0000000 --- a/util-linux-2.12a-partlimit.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- util-linux-2.12pre/fdisk/fdisk.8.miscfixes 2002-08-06 10:33:33.000000000 -0400 -+++ util-linux-2.12pre/fdisk/fdisk.8 2003-12-17 13:55:16.000000000 -0500 -@@ -65,7 +65,7 @@ - name followed by a partition number. For example, - .B /dev/hda1 - is the first partition on the first IDE hard disk in the system. --IDE disks can have up to 63 partitions, SCSI disks up to 15. -+Disks can have up to 15 partitions. - See also - .IR /usr/src/linux/Documentation/devices.txt . - ---- util-linux-2.12pre/fdisk/fdisk.h.miscfixes 2003-07-13 14:25:00.000000000 -0400 -+++ util-linux-2.12pre/fdisk/fdisk.h 2003-12-17 13:55:16.000000000 -0500 -@@ -5,7 +5,7 @@ - #define DEFAULT_SECTOR_SIZE 512 - #define MAX_SECTOR_SIZE 2048 - #define SECTOR_SIZE 512 /* still used in BSD code */ --#define MAXIMUM_PARTS 60 -+#define MAXIMUM_PARTS 15 - - #define ACTIVE_FLAG 0x80 - diff --git a/util-linux-2.12a-raw-man-dd.patch b/util-linux-2.12a-raw-man-dd.patch deleted file mode 100644 index 35f57eb..0000000 --- a/util-linux-2.12a-raw-man-dd.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- util-linux-2.12a/disk-utils/raw.8.dd 2006-04-24 15:27:39.000000000 +0200 -+++ util-linux-2.12a/disk-utils/raw.8 2006-04-24 15:53:46.000000000 +0200 -@@ -15,6 +15,12 @@ - .PP - .B raw - .B \-qa -+.SH WARNING -+Although Linux includes support for rawio, it is now a deprecated interface. If -+your application performs device access using this interface, Red Hat -+encourages you to modify your application to open the block device with the -+O_DIRECT flag. The rawio interface is a candidate for removal from future releases. -+ - .SH DESCRIPTION - .B raw - is used to bind a Linux raw character device to a block device. Any -@@ -82,8 +88,10 @@ - .SH BUGS - The Linux - .B dd --(1) command does not currently align its buffers correctly, and so --cannot be used on raw devices. -+(1) command should be used without bs= option or the blocksize needs to be a -+multiple of the sector size of the device (512 bytes usually) otherwise it -+will fail with "Invalid Argument" messages (EINVAL). -+ - .PP - Raw I/O devices do not maintain cache coherency with the Linux block - device buffer cache. If you use raw I/O to overwrite data already in diff --git a/util-linux-2.12j-113790-hotkeys.patch b/util-linux-2.12j-113790-hotkeys.patch deleted file mode 100644 index afd8956..0000000 --- a/util-linux-2.12j-113790-hotkeys.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- util-linux-2.12j/po/ca.po.sopwith 2004-12-05 14:08:08.000000000 -0500 -+++ util-linux-2.12j/po/ca.po 2004-12-10 13:10:52.411668785 -0500 -@@ -7183,7 +7183,7 @@ - #: login-utils/vipw.c:354 - #, c-format - msgid "Would you like to edit %s now [y/n]? " --msgstr "Desitgeu editar %s ara? [s/n] " -+msgstr "Desitgeu editar %s ara? [y/n] " - - #: login-utils/wall.c:104 - #, c-format ---- util-linux-2.12j/po/da.po.sopwith 2004-12-05 14:08:09.000000000 -0500 -+++ util-linux-2.12j/po/da.po 2004-12-10 13:09:50.382880759 -0500 -@@ -1470,7 +1470,7 @@ - - #: fdisk/cfdisk.c:1526 - msgid "Do you wish to start with a zero table [y/N] ?" --msgstr "Vil du starte med nulstillet tabel [j/N] ?" -+msgstr "Vil du starte med nulstillet tabel [y/N] ?" - - #: fdisk/cfdisk.c:1574 - msgid "You specified more cylinders than fit on disk" ---- util-linux-2.12j/po/nl.po.sopwith 2004-12-05 14:08:15.000000000 -0500 -+++ util-linux-2.12j/po/nl.po 2004-12-10 13:09:50.390878282 -0500 -@@ -1493,7 +1493,7 @@ - - #: fdisk/cfdisk.c:1526 - msgid "Do you wish to start with a zero table [y/N] ?" --msgstr "Wilt u met een lege tabel beginnen [j/N] ?" -+msgstr "Wilt u met een lege tabel beginnen [y/N] ?" - - #: fdisk/cfdisk.c:1574 - msgid "You specified more cylinders than fit on disk" ---- util-linux-2.12j/po/pt_BR.po.sopwith 2004-12-05 14:08:15.000000000 -0500 -+++ util-linux-2.12j/po/pt_BR.po 2004-12-10 13:11:47.560587674 -0500 -@@ -7161,7 +7161,7 @@ - #: login-utils/vipw.c:354 - #, c-format - msgid "Would you like to edit %s now [y/n]? " --msgstr "Você gostaria de editar %s agora [s/n]" -+msgstr "Você gostaria de editar %s agora [y/n]" - - #: login-utils/wall.c:104 - #, c-format diff --git a/util-linux-2.12j-managed.patch b/util-linux-2.12j-managed.patch deleted file mode 100644 index 48353d6..0000000 --- a/util-linux-2.12j-managed.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.12a/mount/mount.c.sopwith 2004-03-04 20:28:22.000000000 -0500 -+++ util-linux-2.12a/mount/mount.c 2004-07-16 16:50:18.792814782 -0400 -@@ -191,6 +191,8 @@ - { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ - { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ - #endif -+ { "kudzu", 0, 0, MS_COMMENT }, /* Silently remove this option (backwards compat use only - deprecated) */ -+ { "managed", 0, 0, MS_COMMENT }, /* Silently remove this option */ - { NULL, 0, 0, 0 } - }; - diff --git a/util-linux-2.12j-pamconsole.patch b/util-linux-2.12j-pamconsole.patch deleted file mode 100644 index 8e02d1c..0000000 --- a/util-linux-2.12j-pamconsole.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- util-linux-2.12j/mount/mount.c.console 2004-12-10 12:32:57.887137495 -0500 -+++ util-linux-2.12j/mount/mount.c 2004-12-10 12:43:06.136750656 -0500 -@@ -97,14 +97,16 @@ - #define MS_USER 0x20000000 - #define MS_OWNER 0x10000000 - #define MS_GROUP 0x08000000 -+#define MS_PAMCONSOLE 0x04000000 - #define MS_COMMENT 0x00020000 - #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) - - /* Options that we make ordinary users have by default. */ - #define MS_SECURE (MS_NOEXEC|MS_NOSUID|MS_NODEV) -@@ -142,6 +144,8 @@ - { "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 */ -@@ -265,7 +269,7 @@ - *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) -@@ -554,7 +558,29 @@ - } - } - -- /* 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; -@@ -570,7 +596,7 @@ - *user = getusername(); - } - -- *flags &= ~(MS_OWNER | MS_GROUP); -+ *flags &= ~(MS_OWNER | MS_GROUP | MS_PAMCONSOLE); - } - - static int ---- util-linux-2.12j/mount/umount.c.console 2004-12-10 12:32:57.885138115 -0500 -+++ util-linux-2.12j/mount/umount.c 2004-12-10 12:44:51.494119742 -0500 -@@ -546,7 +546,7 @@ - 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; - - file = canonicalize(arg); /* mtab paths are canonicalized */ -@@ -608,13 +608,16 @@ - 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; -@@ -624,6 +627,14 @@ - - 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"), ---- util-linux-2.12j/mount/fstab.5.console 2004-09-28 10:13:42.000000000 -0400 -+++ util-linux-2.12j/mount/fstab.5 2004-12-10 12:59:05.088744506 -0500 -@@ -156,10 +156,10 @@ - .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). - diff --git a/util-linux-2.12p-cal-wide.patch b/util-linux-2.12p-cal-wide.patch deleted file mode 100644 index 8440e53..0000000 --- a/util-linux-2.12p-cal-wide.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- util-linux-2.12p/misc-utils/cal.c.wide 2004-12-05 20:20:36.000000000 +0100 -+++ util-linux-2.12p/misc-utils/cal.c 2006-01-02 15:13:50.000000000 +0100 -@@ -368,7 +368,7 @@ - int i, wd; - #ifdef ENABLE_WIDECHAR - wchar_t day_headings_wc[22],j_day_headings_wc[29]; -- wchar_t wd_wc[10]; -+ char *cur_dh = day_headings, *cur_j_dh = j_day_headings; - #endif - - strcpy(day_headings,""); -@@ -385,30 +385,25 @@ - #endif - - for(i = 0 ; i < 7 ; i++ ) { -+ ssize_t space_left; - wd = (i + week1stday) % 7; - #ifdef ENABLE_WIDECHAR -- mbstowcs(wd_wc,weekday(wd),10); -- if (wcswidth(wd_wc,10) < 3) -- wcscat(j_day_headings_wc,L" "); -- if (wcswidth(wd_wc,10) < 2) { -- wcscat(day_headings_wc, L" "); -- wcscat(j_day_headings_wc, L" "); -- } -- wcsncat(day_headings_wc,wd_wc,2); -- wcsncat(j_day_headings_wc,wd_wc,3); -- wcscat(day_headings_wc, L" "); -- wcscat(j_day_headings_wc, L" "); -+ swprintf(day_headings_wc, sizeof(day_headings_wc)/sizeof(day_headings_wc[0]), -+ L"%1.2s ", weekday(wd)); -+ swprintf(j_day_headings_wc, sizeof(j_day_headings_wc)/sizeof(j_day_headings_wc[0]), -+ L"%3.3s ", weekday(wd)); -+ space_left = sizeof(day_headings)-(cur_dh-day_headings); -+ if(space_left <= 0) break; -+ cur_dh += wcstombs(cur_dh,day_headings_wc, space_left); -+ space_left = sizeof(j_day_headings)-(cur_j_dh-j_day_headings); -+ if(space_left <= 0) break; -+ cur_j_dh += wcstombs(cur_j_dh,j_day_headings_wc, space_left); - #else - sprintf(eos(day_headings), "%2.2s ", weekday(wd)); - sprintf(eos(j_day_headings), "%3.3s ", weekday(wd)); - #endif - } - --#ifdef ENABLE_WIDECHAR -- wcstombs(day_headings,day_headings_wc,sizeof(day_headings)); -- wcstombs(j_day_headings,j_day_headings_wc,sizeof(j_day_headings)); --#endif -- - trim_trailing_spaces(day_headings); - trim_trailing_spaces(j_day_headings); - #undef weekday diff --git a/util-linux-2.12p-col-EILSEQ.patch b/util-linux-2.12p-col-EILSEQ.patch deleted file mode 100644 index ef58ad4..0000000 --- a/util-linux-2.12p-col-EILSEQ.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- util-linux-2.13-pre6/text-utils/col.c.kzak 2002-03-09 00:05:12.000000000 +0100 -+++ util-linux-2.13-pre6/text-utils/col.c 2006-02-21 22:25:48.000000000 +0100 -@@ -128,6 +128,7 @@ - int this_line; /* line l points to */ - int nflushd_lines; /* number of lines that were flushed */ - int adjust, opt, warned; -+ int ret = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); -@@ -175,8 +176,16 @@ - cur_line = max_line = nflushd_lines = this_line = 0; - cur_set = last_set = CS_NORMAL; - lines = l = alloc_line(); -- -- while ((ch = getwchar()) != WEOF) { -+ -+ while (feof(stdin)==0) { -+ errno = 0; -+ if ((ch = getwchar()) == WEOF) { -+ if (errno==EILSEQ) { -+ perror("col"); -+ ret = 1; -+ } -+ break; -+ } - if (!iswgraph(ch)) { - switch (ch) { - case BS: /* can't go back further */ -@@ -332,7 +341,7 @@ - flush_blanks(); - if (ferror(stdout) || fclose(stdout)) - return 1; -- return 0; -+ return ret; - } - - void flush_lines(int nflush) diff --git a/util-linux-2.12p-execl.patch b/util-linux-2.12p-execl.patch deleted file mode 100644 index 3d88c5e..0000000 --- a/util-linux-2.12p-execl.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- util-linux-2.12p/login-utils/agetty.c.execl 2005-07-12 15:53:25.000000000 +0200 -+++ util-linux-2.12p/login-utils/agetty.c 2005-07-12 15:53:49.000000000 +0200 -@@ -382,7 +382,7 @@ - - /* Let the login program take care of password validation. */ - -- (void) execl(options.login, options.login, "--", logname, (char *) 0); -+ (void) execl(options.login, options.login, "--", logname, NULL); - error(_("%s: can't exec %s: %m"), options.tty, options.login); - exit(0); /* quiet GCC */ - } ---- util-linux-2.12p/misc-utils/script.c.execl 2005-07-12 15:54:17.000000000 +0200 -+++ util-linux-2.12p/misc-utils/script.c 2005-07-12 15:54:28.000000000 +0200 -@@ -325,9 +325,9 @@ - shname = shell; - - if (cflg) -- execl(shell, shname, "-c", cflg, 0); -+ execl(shell, shname, "-c", cflg, NULL); - else -- execl(shell, shname, "-i", 0); -+ execl(shell, shname, "-i", NULL); - - perror(shell); - fail(); diff --git a/util-linux-2.12p-fdformat-ide.patch b/util-linux-2.12p-fdformat-ide.patch deleted file mode 100644 index 80ea0b6..0000000 --- a/util-linux-2.12p-fdformat-ide.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- util-linux-2.12p/disk-utils/fdformat.8.ide 2005-04-25 11:39:19.528340384 +0200 -+++ util-linux-2.12p/disk-utils/fdformat.8 2005-04-25 11:44:07.189609224 +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,6 +58,7 @@ - .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) diff --git a/util-linux-2.12p-floppy-generic.patch b/util-linux-2.12p-floppy-generic.patch deleted file mode 100644 index ec33468..0000000 --- a/util-linux-2.12p-floppy-generic.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- util-linux-2.12p/floppy-0.12/floppyfloppy.c.generic 2001-02-13 01:15:38.000000000 +0100 -+++ util-linux-2.12p/floppy-0.12/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-2.12p-fstab-man.patch b/util-linux-2.12p-fstab-man.patch deleted file mode 100644 index 58075ea..0000000 --- a/util-linux-2.12p-fstab-man.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- util-linux-2.12p/mount/fstab.5.sync 2005-04-25 11:56:00.625150536 +0200 -+++ util-linux-2.12p/mount/fstab.5 2005-04-25 12:07:12.089072504 +0200 -@@ -49,10 +49,11 @@ - The file - .B fstab - contains descriptive information about the various file systems. -+It is the duty of the system administrator to properly create and maintain this file. - .B fstab --is only read by programs, and not written; it is the duty of the system --administrator to properly create and maintain this file. Each filesystem --is described on a separate line; fields on each line are separated by tabs -+can be modified by special utils (e.g. -+.BR fstab-sync (8)). -+Each filesystem is described on a separate line; fields on each line are separated by tabs - or spaces. Lines starting with '#' are comments. The order of records in - .B fstab - is important because -@@ -200,6 +201,7 @@ - .BR swapon (8), - .BR fs (5) - .BR nfs (5) -+.BR fstab-sync (8) - .SH HISTORY - The ancestor of this - .B fstab diff --git a/util-linux-2.12p-ipcs-typo.patch b/util-linux-2.12p-ipcs-typo.patch deleted file mode 100644 index 3e74ab7..0000000 --- a/util-linux-2.12p-ipcs-typo.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-linux-2.12p/sys-utils/ipcs.c.typo 2005-03-25 13:01:54.871752240 +0100 -+++ util-linux-2.12p/sys-utils/ipcs.c 2005-03-25 13:02:43.745322328 +0100 -@@ -423,9 +423,9 @@ - break; - - case TIME: -- printf (_("------ Shared Memory Operation/Change Times --------\n")); -+ printf (_("------ Semaphore Operation/Change Times --------\n")); - printf (_("%-8s %-10s %-26.24s %-26.24s\n"), -- _("shmid"),_("owner"),_("last-op"),_("last-changed")); -+ _("semid"),_("owner"),_("last-op"),_("last-changed")); - break; - - case PID: diff --git a/util-linux-2.12p-login-lastlog.patch b/util-linux-2.12p-login-lastlog.patch deleted file mode 100644 index cd1b4f7..0000000 --- a/util-linux-2.12p-login-lastlog.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.12p/login-utils/login.c.login-lastlog 2005-03-24 13:26:06.516865128 +0100 -+++ util-linux-2.12p/login-utils/login.c 2005-03-24 13:26:58.136017824 +0100 -@@ -1397,7 +1397,7 @@ - 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-2.12p-look-separator.patch b/util-linux-2.12p-look-separator.patch deleted file mode 100644 index cd48b34..0000000 --- a/util-linux-2.12p-look-separator.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- util-linux-2.12p/misc-utils/look.c.sep 2005-05-02 12:51:17.808227240 +0200 -+++ util-linux-2.12p/misc-utils/look.c 2005-05-02 12:53:18.078943312 +0200 -@@ -327,9 +327,12 @@ - /* copy, ignoring things that should be ignored */ - p = comparbuf; - i = stringlen; -- while(s2 < s2end && *s2 != '\n' && i--) { -+ while(s2 < s2end && *s2 != '\n' && i) { - if (!dflag || isalnum(*s2)) -+ { - *p++ = *s2; -+ i--; -+ } - s2++; - } - *p = 0; diff --git a/util-linux-2.12p-lvm2dupes-76467.patch b/util-linux-2.12p-lvm2dupes-76467.patch deleted file mode 100644 index 3d74b33..0000000 --- a/util-linux-2.12p-lvm2dupes-76467.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- util-linux-2.12p/mount/mount_by_label.c.lvm2dupes 2005-04-25 11:33:53.657880224 +0200 -+++ util-linux-2.12p/mount/mount_by_label.c 2005-04-25 11:36:32.075797040 +0200 -@@ -195,6 +195,15 @@ - return 1; - } - -+/* We need to avoid listing /dev/dm-X devices, because they are added to the uuidcache separately by the -+ uuidcache_init_dm routine. Duplicate entries cause mount-by-label to fail. -+ */ -+static int -+is_lvm2(char *ptname) -+{ -+ return !strncmp(ptname, "dm-", 3); -+} -+ - static void - uuidcache_init(void) { - char line[100]; -@@ -266,7 +275,7 @@ - /* devfs has .../disc and .../part1 etc. */ - - for (s = ptname; *s; s++); -- if (isdigit(s[-1]) || is_xvm(ptname)) { -+ if ((isdigit(s[-1]) || is_xvm(ptname)) && !is_lvm2(ptname)) { - - /* - * Note: this is a heuristic only - there is no reason diff --git a/util-linux-2.12p-mount-ocfs2.patch b/util-linux-2.12p-mount-ocfs2.patch deleted file mode 100644 index 37ddb1c..0000000 --- a/util-linux-2.12p-mount-ocfs2.patch +++ /dev/null @@ -1,187 +0,0 @@ ---- util-linux-2.12p/mount/mount.c.ocfs2 2005-07-12 16:31:16.000000000 +0200 -+++ util-linux-2.12p/mount/mount.c 2005-07-12 16:31:46.000000000 +0200 -@@ -466,6 +466,61 @@ - } - - /* -+ * check_special_mountprog() -+ * If there is a special mount program for this type, exec it. -+ * returns: 0: no exec was done, 1: exec was done, status has result -+ */ -+ -+static int -+check_special_mountprog(const char *spec, const char *node, const char *type, int flags, -+ char *extra_opts, int *status) { -+ char mountprog[120]; -+ struct stat statbuf; -+ int res; -+ -+ if (!external_allowed) -+ return 0; -+ -+ if (type && strlen(type) < 100) { -+ sprintf(mountprog, "/sbin/mount.%s", type); -+ if (stat(mountprog, &statbuf) == 0) { -+ res = fork(); -+ if (res == 0) { -+ char *oo, *mountargs[10]; -+ int i = 0; -+ -+ setuid(getuid()); -+ setgid(getgid()); -+ oo = fix_opts_string (flags, extra_opts, NULL); -+ mountargs[i++] = mountprog; -+ mountargs[i++] = spec; -+ mountargs[i++] = node; -+ if (nomtab) -+ mountargs[i++] = "-n"; -+ if (verbose) -+ mountargs[i++] = "-v"; -+ if (oo && *oo) { -+ mountargs[i++] = "-o"; -+ mountargs[i++] = oo; -+ } -+ mountargs[i] = NULL; -+ execv(mountprog, mountargs); -+ exit(1); /* exec failed */ -+ } else if (res != -1) { -+ int st; -+ wait(&st); -+ *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR); -+ return 1; -+ } else { -+ int errsv = errno; -+ error(_("mount: cannot fork: %s"), strerror(errsv)); -+ } -+ } -+ } -+ return 0; -+} -+ -+/* - * guess_fstype_and_mount() - * Mount a single file system. Guess the type when unknown. - * returns: 0: OK, -1: error in errno, 1: other error -@@ -474,9 +529,11 @@ - */ - static int - guess_fstype_and_mount(const char *spec, const char *node, const char **types, -- int flags, char *mount_opts) { -+ int flags, char *mount_opts, int *special, int *status) { - struct mountargs args = { spec, node, NULL, flags & ~MS_NOSYS, mount_opts }; - -+ *special = 0; -+ - if (*types && strcasecmp (*types, "auto") == 0) - *types = NULL; - -@@ -485,10 +542,16 @@ - - if (!*types && !(flags & MS_REMOUNT)) { - *types = guess_fstype(spec); -- if (*types && !strcmp(*types, "swap")) { -- error(_("%s looks like swapspace - not mounted"), spec); -- *types = NULL; -- return 1; -+ if (*types) { -+ if (!strcmp(*types, "swap")) { -+ error(_("%s looks like swapspace - not mounted"), spec); -+ *types = NULL; -+ return 1; -+ } else if (check_special_mountprog(spec, node, *types, flags, -+ mount_opts, status)) { -+ *special = 1; -+ return 0; -+ } - } - } - -@@ -741,61 +804,6 @@ - } - - /* -- * check_special_mountprog() -- * If there is a special mount program for this type, exec it. -- * returns: 0: no exec was done, 1: exec was done, status has result -- */ -- --static int --check_special_mountprog(const char *spec, const char *node, const char *type, -- int flags, char *extra_opts, int *status) { -- char mountprog[120]; -- struct stat statbuf; -- int res; -- -- if (!external_allowed) -- return 0; -- -- if (type && strlen(type) < 100) { -- sprintf(mountprog, "/sbin/mount.%s", type); -- if (stat(mountprog, &statbuf) == 0) { -- res = fork(); -- if (res == 0) { -- const char *oo, *mountargs[10]; -- int i = 0; -- -- setuid(getuid()); -- setgid(getgid()); -- oo = fix_opts_string (flags, extra_opts, NULL); -- mountargs[i++] = mountprog; -- mountargs[i++] = spec; -- mountargs[i++] = node; -- if (nomtab) -- mountargs[i++] = "-n"; -- if (verbose) -- mountargs[i++] = "-v"; -- if (oo && *oo) { -- mountargs[i++] = "-o"; -- mountargs[i++] = oo; -- } -- mountargs[i] = NULL; -- execv(mountprog, (char **) mountargs); -- exit(1); /* exec failed */ -- } else if (res != -1) { -- int st; -- wait(&st); -- *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR); -- return 1; -- } else { -- int errsv = errno; -- error(_("mount: cannot fork: %s"), strerror(errsv)); -- } -- } -- } -- return 0; --} -- --/* - * try_mount_one() - * Try to mount one file system. When "bg" is 1, this is a retry - * in the background. One additional exit code EX_BG is used here. -@@ -807,7 +815,7 @@ - static int - try_mount_one (const char *spec0, const char *node0, const char *types0, - const char *opts0, int freq, int pass, int bg, int ro) { -- int res = 0, status; -+ int res = 0, status, special; - int mnt5_res = 0; /* only for gcc */ - int mnt_err; - int flags; -@@ -898,9 +906,15 @@ - block_signals (SIG_BLOCK); - nosigblock: - -- if (!fake) -+ if (!fake) { - mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, -- mount_opts); -+ mount_opts, &special, &status); -+ -+ if (special) { -+ block_signals (SIG_UNBLOCK); -+ return status; -+ } -+ } - - if (fake || mnt5_res == 0) { - /* Mount succeeded, report this (if verbose) and write mtab entry. */ diff --git a/util-linux-2.12p-mtab-lock.patch b/util-linux-2.12p-mtab-lock.patch deleted file mode 100644 index 98ea4d1..0000000 --- a/util-linux-2.12p-mtab-lock.patch +++ /dev/null @@ -1,150 +0,0 @@ ---- util-linux-2.12p/mount/fstab.c.mtab-lock 2005-03-22 14:05:22.481297072 +0100 -+++ util-linux-2.12p/mount/fstab.c 2005-03-22 14:50:55.719781664 +0100 -@@ -395,6 +395,7 @@ - - /* Flag for already existing lock file. */ - static int we_created_lockfile = 0; -+static int lockfile_fd = -1; - - /* Flag to indicate that signals have been set up. */ - static int signals_have_been_setup = 0; -@@ -416,6 +417,8 @@ - void - unlock_mtab (void) { - if (we_created_lockfile) { -+ close(lockfile_fd); -+ lockfile_fd = -1; - unlink (MOUNTED_LOCK); - we_created_lockfile = 0; - } -@@ -443,7 +446,7 @@ - - void - lock_mtab (void) { -- int tries = 3; -+ int tries = 100000, i; - char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; - - at_die = unlock_mtab; -@@ -469,45 +472,48 @@ - - sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ()); - -+ i = open (linktargetfile, O_WRONLY|O_CREAT, 0); -+ 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 " -+ "(use -n flag to override)"), -+ linktargetfile, strerror (errsv)); -+ } -+ close(i); -+ - /* Repeat until it was us who made the link */ - while (!we_created_lockfile) { - struct flock flock; -- int errsv, fd, i, j; -- -- i = open (linktargetfile, O_WRONLY|O_CREAT, 0); -- 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 " -- "(use -n flag to override)"), -- linktargetfile, strerror (errsv)); -- } -- close(i); -+ int errsv, j; - - j = link(linktargetfile, MOUNTED_LOCK); - errsv = errno; - -- (void) unlink(linktargetfile); -- - 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 " - "(use -n flag to override)"), - MOUNTED_LOCK, strerror (errsv)); - } - -- fd = open (MOUNTED_LOCK, O_WRONLY); -+ lockfile_fd = open (MOUNTED_LOCK, O_WRONLY); - -- if (fd < 0) { -+ if (lockfile_fd < 0) { - int errsv = errno; - /* Strange... Maybe the file was just deleted? */ -- if (errno == ENOENT && tries-- > 0) -+ if (errno == ENOENT && tries-- > 0) { -+ if (tries % 200 == 0) -+ usleep(30); - continue; -+ } -+ (void) unlink(linktargetfile); - die (EX_FILEIO, _("can't open lock file %s: %s " - "(use -n flag to override)"), - MOUNTED_LOCK, strerror (errsv)); -@@ -520,7 +526,7 @@ - - if (j == 0) { - /* We made the link. Now claim the lock. */ -- if (fcntl (fd, F_SETLK, &flock) == -1) { -+ if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) { - if (verbose) { - int errsv = errno; - printf(_("Can't lock lock file %s: %s\n"), -@@ -528,13 +534,15 @@ - } - /* proceed anyway */ - } -+ (void) unlink(linktargetfile); - } else { - static int tries = 0; - - /* Someone else made the link. Wait. */ - alarm(LOCK_TIMEOUT); -- if (fcntl (fd, F_SETLKW, &flock) == -1) { -+ if (fcntl (lockfile_fd, F_SETLKW, &flock) == -1) { - int errsv = errno; -+ (void) unlink(linktargetfile); - die (EX_FILEIO, _("can't lock lock file %s: %s"), - MOUNTED_LOCK, (errno == EINTR) ? - _("timed out") : strerror (errsv)); -@@ -542,16 +550,18 @@ - alarm(0); - /* Limit the number of iterations - maybe there - still is some old /etc/mtab~ */ -- if (tries++ > 3) { -- if (tries > 5) -- die (EX_FILEIO, _("Cannot create link %s\n" -- "Perhaps there is a stale lock file?\n"), -- MOUNTED_LOCK); -- sleep(1); -- } -+ ++tries; -+ if (tries % 200 == 0) -+ usleep(30); -+ if (tries > 100000) { -+ (void) unlink(linktargetfile); -+ close(lockfile_fd); -+ die (EX_FILEIO, _("Cannot create link %s\n" -+ "Perhaps there is a stale lock file?\n"), -+ MOUNTED_LOCK); -+ } -+ close(lockfile_fd); - } -- -- close(fd); - } - } - diff --git a/util-linux-2.12p-swaponsymlink-57300.patch b/util-linux-2.12p-swaponsymlink-57300.patch deleted file mode 100644 index b1dc704..0000000 --- a/util-linux-2.12p-swaponsymlink-57300.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- util-linux-2.12p/mount/swapon.c.sopwith Wed Dec 22 04:50:19 2004 -+++ util-linux-2.12p/mount/swapon.c Thu Dec 23 14:44:49 2004 -@@ -138,9 +138,19 @@ - is_in_proc_swaps(const char *fname) { - int i; - -- for (i = 0; i < numSwaps; i++) -- if (swapFiles[i] && !strcmp(fname, swapFiles[i])) -+ for (i = 0; i < numSwaps; i++) { -+ struct stat swapped, swapping; -+ -+ if (!swapFiles[i]) continue; -+ -+ if (!strcmp(fname, swapFiles[i]) -+ || (!stat (swapFiles[i], &swapped) -+ && !stat (fname, &swapping) -+ && (swapped.st_dev == swapping.st_dev -+ && swapped.st_ino == swapping.st_ino)) -+ ) - return 1; -+ } - return 0; - } - diff --git a/util-linux-2.12p-vipw-perm.patch b/util-linux-2.12p-vipw-perm.patch deleted file mode 100644 index 13c9cd8..0000000 --- a/util-linux-2.12p-vipw-perm.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- util-linux-2.12p/login-utils/vipw.c.perm 2005-06-16 10:33:46.387891456 +0200 -+++ util-linux-2.12p/login-utils/vipw.c 2005-06-16 10:34:37.077185512 +0200 -@@ -299,11 +299,11 @@ - } - if (!is_shadow) - chmod(tmp_file, 0644); --#if 0 -+/*#if 0*/ - /* if shadow file, then mode is 0600 now */ - else - chmod(tmp_file, 0400); --#endif -+/*#endif*/ - pw_unlock(); - } - diff --git a/util-linux-2.13-arch.patch b/util-linux-2.13-arch.patch deleted file mode 100644 index 472e4fb..0000000 --- a/util-linux-2.13-arch.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- util-linux-2.13-pre1/sys-utils/Makefile.am.arch 2005-08-16 12:54:22.000000000 +0200 -+++ util-linux-2.13-pre1/sys-utils/Makefile.am 2005-08-16 12:55:00.000000000 +0200 -@@ -1,6 +1,6 @@ - include $(top_srcdir)/config/include-Makefile.am - --bin_PROGRAMS = dmesg -+bin_PROGRAMS = dmesg arch - - usrbin_PROGRAMS = cytune flock ipcrm ipcs renice setsid - -@@ -8,7 +8,7 @@ - - usrsbin_PROGRAMS = readprofile tunelp - --man_MANS = flock.1 readprofile.1 \ -+man_MANS = flock.1 readprofile.1 arch.1 \ - ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 ipcs.8 renice.8 \ - setsid.8 tunelp.8 - ---- util-linux-2.13-pre1/sys-utils/arch.1.arch 2005-08-16 12:55:34.000000000 +0200 -+++ util-linux-2.13-pre1/sys-utils/arch.1 2005-08-16 12:59:51.000000000 +0200 -@@ -0,0 +1,34 @@ -+.\" arch.1 -- -+.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) -+.\" Public domain: may be freely distributed. -+.TH ARCH 1 "4 July 1997" "Linux 2.0" "Linux Programmer's Manual" -+.SH NAME -+arch \- print machine architecture -+.SH SYNOPSIS -+.B arch -+.SH DESCRIPTION -+.B arch -+is deprecated command since release util-linux 2.13. Use -+.BR "uname -m" . -+ -+On current Linux systems, -+.B arch -+prints things such as "i386", "i486", "i586", "alpha", "sparc", -+"arm", "m68k", "mips", "ppc". -+.SH SEE ALSO -+.BR uname (1), -+.BR uname (2) -+.\" -+.\" Details: -+.\" arch prints the machine part of the system_utsname struct -+.\" This struct is defined in version.c, and this field is -+.\" initialized with UTS_MACHINE, which is defined as $ARCH -+.\" in the main Makefile. -+.\" That gives the possibilities -+.\" alpha arm i386 m68k mips ppc sparc sparc64 -+.\" -+.\" If Makefile is not edited, ARCH is guessed by -+.\" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) -+.\" Then how come we get these i586 values? -+.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86; -+.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h) ---- util-linux-2.13-pre1/sys-utils/arch.c.arch 2005-08-16 12:55:43.000000000 +0200 -+++ util-linux-2.13-pre1/sys-utils/arch.c 1999-07-09 04:56:41.000000000 +0200 -@@ -0,0 +1,35 @@ -+/* arch -- print machine architecture information -+ * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu -+ * Revised: Mon Dec 20 12:29:23 1993 by faith@cs.unc.edu -+ * Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) -+ -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2, or (at your option) any -+ * later version. -+ -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -+ -+#include -+#include -+ -+int main (void) -+{ -+ struct utsname utsbuf; -+ -+ if (uname( &utsbuf )) { -+ perror( "arch" ); -+ return 1; -+ } -+ -+ printf( "%s\n", utsbuf.machine ); -+ -+ return 0; -+} diff --git a/util-linux-2.13-audit-hwclock.patch b/util-linux-2.13-audit-hwclock.patch deleted file mode 100644 index 0173655..0000000 --- a/util-linux-2.13-audit-hwclock.patch +++ /dev/null @@ -1,314 +0,0 @@ -diff -urN util-linux-2.13-pre5.orig/hwclock/audit.c util-linux-2.13-pre5/hwclock/audit.c ---- util-linux-2.13-pre5.orig/hwclock/audit.c 1969-12-31 19:00:00.000000000 -0500 -+++ util-linux-2.13-pre5/hwclock/audit.c 2005-10-25 17:14:46.000000000 -0400 -@@ -0,0 +1,50 @@ -+/* audit.c -- This file contains the audit system extensions -+ * -+ * Copyright 2005 Red Hat Inc., Durham, North Carolina. -+ * All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Authors: -+ * Steve Grubb -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include "audit.h" -+ -+int audit_fd = -1; -+static int audit_this = 0; -+ -+ -+void auditable_event(int i) -+{ -+ audit_this = i; -+} -+ -+ -+void audit_exit(int status) -+{ -+ if (audit_this) { -+ audit_log_user_message(audit_fd, AUDIT_USYS_CONFIG, -+ "changing system time", NULL, NULL, NULL, status ? 0 : 1); -+ close(audit_fd); -+ } -+ exit(status); -+} -+ -diff -urN util-linux-2.13-pre5.orig/hwclock/audit.h util-linux-2.13-pre5/hwclock/audit.h ---- util-linux-2.13-pre5.orig/hwclock/audit.h 1969-12-31 19:00:00.000000000 -0500 -+++ util-linux-2.13-pre5/hwclock/audit.h 2005-10-25 17:09:40.000000000 -0400 -@@ -0,0 +1,34 @@ -+/* audit.h -- This file contains the function prototypes for audit calls -+ * Copyright 2005 Red Hat Inc., Durham, North Carolina. -+ * All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Author: -+ * Steve Grubb -+ * -+ */ -+ -+#ifndef HW_AUDIT_H -+#define HW_AUDIT_H -+ -+/* This is the file descriptor used by the audit system */ -+extern int audit_fd; -+ -+/* This is the logging functions */ -+void auditable_event(int i); -+void audit_exit(int status); -+ -+#endif -diff -urN util-linux-2.13-pre5.orig/hwclock/clock.h util-linux-2.13-pre5/hwclock/clock.h ---- util-linux-2.13-pre5.orig/hwclock/clock.h 2005-10-25 17:08:26.000000000 -0400 -+++ util-linux-2.13-pre5/hwclock/clock.h 2005-10-25 17:09:40.000000000 -0400 -@@ -24,7 +24,12 @@ - extern char *progname; - extern int debug; - extern int epoch_option; --extern void outsyserr(char *msg, ...); -+extern void outsyserr(char *msg, ...) -+#ifdef __GNUC__ -+ __attribute__ ((format (printf, 1, 2))); -+#else -+ ; -+#endif - - /* cmos.c */ - extern void set_cmos_epoch(int ARCconsole, int SRM); -diff -urN util-linux-2.13-pre5.orig/hwclock/hwclock.c util-linux-2.13-pre5/hwclock/hwclock.c ---- util-linux-2.13-pre5.orig/hwclock/hwclock.c 2005-10-25 17:08:26.000000000 -0400 -+++ util-linux-2.13-pre5/hwclock/hwclock.c 2005-10-25 17:09:40.000000000 -0400 -@@ -81,9 +81,11 @@ - #include - #include - #include -+#include - - #include "clock.h" - #include "nls.h" -+#include "audit.h" - - #define MYNAME "hwclock" - -@@ -1234,7 +1236,7 @@ - va_end(ap); - } - -- exit(fmt ? EX_USAGE : 0); -+ audit_exit(fmt ? EX_USAGE : 0); - } - - static const struct option longopts[] = { -@@ -1298,6 +1300,15 @@ - /* Remember what time we were invoked */ - gettimeofday(&startup_time, NULL); - -+ audit_fd = audit_open(); -+ if (audit_fd < 0 && !(errno == EINVAL || errno == EPROTONOSUPPORT || -+ errno == EAFNOSUPPORT)) { -+ /* You get these error codes only when the kernel doesn't have -+ * audit compiled in. */ -+ fprintf(stderr, "Error - unable to connect to audit system\n"); -+ return EX_NOPERM; -+ } -+ - setlocale(LC_ALL, ""); - #ifdef LC_NUMERIC - /* We need LC_CTYPE and LC_TIME and LC_MESSAGES, but must avoid -@@ -1393,6 +1404,13 @@ - argc -= optind; - argv += optind; - -+ if (testing != TRUE) { -+ if (adjust == TRUE || hctosys == TRUE || systohc == TRUE || -+ set == TRUE || setepoch == TRUE) { -+ auditable_event(1); -+ } -+ } -+ - if (argc > 0) { - usage(_("%s takes no non-option arguments. " - "You supplied %d.\n"), -@@ -1403,27 +1421,27 @@ - fprintf(stderr, _("You have specified multiple functions.\n" - "You can only perform one function " - "at a time.\n")); -- exit(EX_USAGE); -+ audit_exit(EX_USAGE); - } - - if (utc && local_opt) { - fprintf(stderr, _("%s: The --utc and --localtime options " - "are mutually exclusive. You specified " - "both.\n"), MYNAME); -- exit(EX_USAGE); -+ audit_exit(EX_USAGE); - } - - if (adjust && noadjfile) { - fprintf(stderr, _("%s: The --adjust and --noadjfile options " - "are mutually exclusive. You specified " - "both.\n"), MYNAME); -- exit(EX_USAGE); -+ audit_exit(EX_USAGE); - } - - if (noadjfile && !(utc || local_opt)) { - fprintf(stderr, _("%s: With --noadjfile, you must specify " - "either --utc or --localtime\n"), MYNAME); -- exit(EX_USAGE); -+ audit_exit(EX_USAGE); - } - - #ifdef __alpha__ -@@ -1437,7 +1455,7 @@ - if (rc != 0) { - fprintf(stderr, _("No usable set-to time. " - "Cannot set clock.\n")); -- exit(EX_USAGE); -+ audit_exit(EX_USAGE); - } - } - -@@ -1469,11 +1487,11 @@ - } - - if (!permitted) -- exit(EX_NOPERM); -+ audit_exit(EX_NOPERM); - - if (getepoch || setepoch) { - manipulate_epoch(getepoch, setepoch, epoch_option, testing); -- return 0; -+ audit_exit(0); - } - - if (debug) -@@ -1487,12 +1505,14 @@ - fprintf(stderr, - _("Use the --debug option to see the details " - "of our search for an access method.\n")); -- exit(1); -+ audit_exit(1); - } - -- return manipulate_clock(show, adjust, noadjfile, set, set_time, -+ rc = manipulate_clock(show, adjust, noadjfile, set, set_time, - hctosys, systohc, startup_time, utc, - local_opt, testing); -+ audit_exit(rc); -+ return rc; /* Not reached */ - } - - /* A single routine for greater uniformity */ -diff -urN util-linux-2.13-pre5.orig/hwclock/kd.c util-linux-2.13-pre5/hwclock/kd.c ---- util-linux-2.13-pre5.orig/hwclock/kd.c 2005-10-25 17:08:26.000000000 -0400 -+++ util-linux-2.13-pre5/hwclock/kd.c 2005-10-25 17:09:40.000000000 -0400 -@@ -19,6 +19,7 @@ - - #include "clock.h" - #include "nls.h" -+#include "audit.h" - - static int con_fd = -1; /* opened by probe_for_kd_clock() */ - /* never closed */ -@@ -103,7 +104,7 @@ - - if (ioctl(con_fd, KDGHWCLK, &t) == -1) { - outsyserr(_("ioctl() failed to read time from %s"), con_fd_filename); -- exit(EX_IOERR); -+ audit_exit(EX_IOERR); - } - - tm->tm_sec = t.sec; -@@ -139,7 +140,7 @@ - - if (ioctl(con_fd, KDSHWCLK, &t ) == -1) { - outsyserr(_("ioctl KDSHWCLK failed")); -- exit(1); -+ audit_exit(1); - } - return 0; - } -diff -urN util-linux-2.13-pre5.orig/hwclock/Makefile.am util-linux-2.13-pre5/hwclock/Makefile.am ---- util-linux-2.13-pre5.orig/hwclock/Makefile.am 2005-10-25 17:08:26.000000000 -0400 -+++ util-linux-2.13-pre5/hwclock/Makefile.am 2005-10-25 17:09:40.000000000 -0400 -@@ -4,4 +4,5 @@ - - sbin_PROGRAMS = hwclock - --hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c -\ No newline at end of file -+hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c audit.c -+hwclock_LDADD = -laudit -\ No newline at end of file -diff -urN util-linux-2.13-pre5.orig/hwclock/rtc.c util-linux-2.13-pre5/hwclock/rtc.c ---- util-linux-2.13-pre5.orig/hwclock/rtc.c 2005-10-25 17:08:26.000000000 -0400 -+++ util-linux-2.13-pre5/hwclock/rtc.c 2005-10-25 17:09:40.000000000 -0400 -@@ -8,6 +8,7 @@ - - #include "clock.h" - #include "nls.h" -+#include "audit.h" - - /* - * Get defines for rtc stuff. -@@ -114,7 +115,7 @@ - - if (rtc_fd < 0) { - outsyserr(_("open() of %s failed"), rtc_dev_name); -- exit(EX_OSFILE); -+ audit_exit(EX_OSFILE); - } - return rtc_fd; - } -@@ -149,7 +150,7 @@ - perror(ioctlname); - fprintf(stderr, _("ioctl() to %s to read the time failed.\n"), - rtc_dev_name); -- exit(EX_IOERR); -+ audit_exit(EX_IOERR); - } - - tm->tm_isdst = -1; /* don't know whether it's dst */ -@@ -329,7 +330,7 @@ - perror(ioctlname); - fprintf(stderr, _("ioctl() to %s to set the time failed.\n"), - rtc_dev_name); -- exit(EX_IOERR); -+ audit_exit(EX_IOERR); - } - - if (debug) diff --git a/util-linux-2.13-audit-login.patch b/util-linux-2.13-audit-login.patch deleted file mode 100644 index ca88bdc..0000000 --- a/util-linux-2.13-audit-login.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff -ur util-linux-2.13-pre4.orig/login-utils/login.c util-linux-2.13-pre4/login-utils/login.c ---- util-linux-2.13-pre4.orig/login-utils/login.c 2005-10-14 13:59:08.000000000 -0400 -+++ util-linux-2.13-pre4/login-utils/login.c 2005-10-14 15:43:54.000000000 -0400 -@@ -106,6 +106,7 @@ - #include - #include - #include -+#include - #include "pathnames.h" - #include "my_crypt.h" - #include "login.h" -@@ -329,6 +330,7 @@ - #ifdef LOGIN_CHOWN_VCS - char vcsn[20], vcsan[20]; - #endif -+ int audit_fd; - - pid = getpid(); - -@@ -545,11 +547,25 @@ - (retcode == PAM_USER_UNKNOWN) || - (retcode == PAM_CRED_INSUFFICIENT) || - (retcode == PAM_AUTHINFO_UNAVAIL))) { -+ struct passwd *pw; -+ char buf[64]; - pam_get_item(pamh, PAM_USER, (const void **) &username); - - syslog(LOG_NOTICE,_("FAILED LOGIN %d FROM %s FOR %s, %s"), - failcount, hostname, username, pam_strerror(pamh, retcode)); - logbtmp(tty_name, username, hostname); -+ audit_fd = audit_open(); -+ pw = getpwnam(username); -+ if (pw) { -+ snprintf(buf, sizeof(buf), "uid=%d", pw->pw_uid); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty_name, 0); -+ } else { -+ snprintf(buf, sizeof(buf), "acct=%s", username); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty_name, 0); -+ } -+ close(audit_fd); - - fprintf(stderr,_("Login incorrect\n\n")); - pam_set_item(pamh,PAM_USER,NULL); -@@ -557,6 +573,8 @@ - } - - if (retcode != PAM_SUCCESS) { -+ struct passwd *pw; -+ char buf[64]; - pam_get_item(pamh, PAM_USER, (const void **) &username); - - if (retcode == PAM_MAXTRIES) -@@ -567,6 +585,18 @@ - syslog(LOG_NOTICE,_("FAILED LOGIN SESSION FROM %s FOR %s, %s"), - hostname, username, pam_strerror(pamh, retcode)); - logbtmp(tty_name, username, hostname); -+ audit_fd = audit_open(); -+ pw = getpwnam(username); -+ if (pw) { -+ snprintf(buf, sizeof(buf), "uid=%d", pw->pw_uid); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty_name, 0); -+ } else { -+ snprintf(buf, sizeof(buf), "acct=%s", username); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty_name, 0); -+ } -+ close(audit_fd); - - fprintf(stderr,_("\nLogin incorrect\n")); - pam_end(pamh, retcode); -@@ -908,6 +938,15 @@ - #endif - #endif - } -+ -+ { -+ char buf[32]; -+ audit_fd = audit_open(); -+ snprintf(buf, sizeof(buf), "uid=%d", pwd->pw_uid); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty_name, 1); -+ close(audit_fd); -+ } - - dolastlog(quietlog); - -diff -ur util-linux-2.13-pre4.orig/login-utils/Makefile.am util-linux-2.13-pre4/login-utils/Makefile.am ---- util-linux-2.13-pre4.orig/login-utils/Makefile.am 2005-10-14 13:59:08.000000000 -0400 -+++ util-linux-2.13-pre4/login-utils/Makefile.am 2005-10-14 15:45:22.000000000 -0400 -@@ -55,7 +55,7 @@ - if HAVE_PAM - chfn_LDADD += -lpam -lpam_misc - chsh_LDADD += -lpam -lpam_misc --login_LDADD += -lpam -lpam_misc -+login_LDADD += -lpam -lpam_misc -laudit - login_SOURCES = login.c - else - login_SOURCES = login.c checktty.c diff --git a/util-linux-2.13-blockdev-errno.patch b/util-linux-2.13-blockdev-errno.patch deleted file mode 100644 index 0ccdd60..0000000 --- a/util-linux-2.13-blockdev-errno.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 3281d4268a192cbd1951347a4a857b94428dc958 -Author: Karel Zak -Date: Wed Aug 1 15:06:18 2007 +0200 - - blockdev: fix "blockdev --getsz" for large devices - - The "blockdev --getsz" command doesn't try to use BLKGETSIZE64 when - previous BLKGETSIZE failed with EFBIG. This patch fixes this problem. - - Signed-off-by: Karel Zak - -diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c -index 46b7fa7..0dd531c 100644 ---- a/disk-utils/blockdev.c -+++ b/disk-utils/blockdev.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - - #include "nls.h" - -@@ -148,8 +149,10 @@ getsize(int fd, long long *sectors) { - long long b; - - err = ioctl (fd, BLKGETSIZE, &sz); -- if (err) -- return err; -+ if (err) { -+ if (errno != EFBIG) -+ return err; -+ } - err = ioctl(fd, BLKGETSIZE64, &b); - if (err || b == 0 || b == sz) - *sectors = sz; diff --git a/util-linux-2.13-blockdev-unsigned.patch b/util-linux-2.13-blockdev-unsigned.patch deleted file mode 100644 index 4f46083..0000000 --- a/util-linux-2.13-blockdev-unsigned.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- util-linux-2.13-pre7/disk-utils/blockdev.c.kzak 2007-08-02 13:24:45.000000000 +0200 -+++ util-linux-2.13-pre7/disk-utils/blockdev.c 2007-08-02 13:24:45.000000000 +0200 -@@ -77,6 +77,8 @@ - #define ARGINTG 4 - #define ARGLINTG 5 - #define ARGLLINTG 6 -+#define ARGLU 7 -+#define ARGLLU 8 - long argval; - char *argname; - char *help; -@@ -98,10 +100,10 @@ - { "--setbsz", "BLKBSZSET", BLKBSZSET, ARGINTAP, 0, "BLOCKSIZE", N_("set blocksize") }, - #endif - #ifdef BLKGETSIZE -- { "--getsize", "BLKGETSIZE", BLKGETSIZE, ARGLINTG, -1, NULL, N_("get 32-bit sector count") }, -+ { "--getsize", "BLKGETSIZE", BLKGETSIZE, ARGLU, -1, NULL, N_("get 32-bit sector count") }, - #endif - #ifdef BLKGETSIZE64 -- { "--getsize64", "BLKGETSIZE64", BLKGETSIZE64, ARGLLINTG, -1, NULL, N_("get size in bytes") }, -+ { "--getsize64", "BLKGETSIZE64", BLKGETSIZE64, ARGLLU, -1, NULL, N_("get size in bytes") }, - #endif - #ifdef BLKRASET - { "--setra", "BLKRASET", BLKRASET, ARGINTA, 0, "READAHEAD", N_("set readahead") }, -@@ -286,6 +288,8 @@ - int iarg; - long larg; - long long llarg; -+ unsigned long lu; -+ unsigned long long llu; - int verbose = 0; - - for (i = 1; i < d; i++) { -@@ -363,6 +367,15 @@ - llarg = bdcms[j].argval; - res = ioctl(fd, bdcms[j].ioc, &llarg); - break; -+ case ARGLU: -+ lu = bdcms[j].argval; -+ res = ioctl(fd, bdcms[j].ioc, &lu); -+ break; -+ case ARGLLU: -+ llu = bdcms[j].argval; -+ res = ioctl(fd, bdcms[j].ioc, &llu); -+ break; -+ - } - if (res == -1) { - perror(bdcms[j].iocname); -@@ -389,6 +402,19 @@ - else - printf("%lld\n", llarg); - break; -+ case ARGLU: -+ if (verbose) -+ printf("%s: %lu\n", _(bdcms[j].help), lu); -+ else -+ printf("%lu\n", lu); -+ break; -+ case ARGLLU: -+ if (verbose) -+ printf("%s: %llu\n", _(bdcms[j].help), llu); -+ else -+ printf("%llu\n", llu); -+ break; -+ - default: - if (verbose) - printf(_("%s succeeded.\n"), _(bdcms[j].help)); diff --git a/util-linux-2.13-cal-3.patch b/util-linux-2.13-cal-3.patch deleted file mode 100644 index f7f7916..0000000 --- a/util-linux-2.13-cal-3.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- util-linux-2.13-pre7/misc-utils/cal.c.kzak 2007-07-09 14:54:39.000000000 +0200 -+++ util-linux-2.13-pre7/misc-utils/cal.c 2007-07-09 14:54:39.000000000 +0200 -@@ -87,9 +87,13 @@ - putp(s); - } - --static char * -+static const char * - my_tgetstr(char *s, char *ss) { -- return tigetstr(ss); -+ const char* ret = tigetstr(ss); -+ if (!ret || ret==(char*)-1) -+ return ""; -+ else -+ return ret; - } - - #elif defined(HAVE_LIBTERMCAP) -@@ -110,14 +114,20 @@ - tputs (s, 1, putchar); - } - --static char * -+static const char * - my_tgetstr(char *s, char *ss) { -- return tgetstr(s, &strbuf); -+ const char* ret = tgetstr(s, &strbuf); -+ if (!ret) -+ return ""; -+ else -+ return ret; - } - - #endif - const char *term=""; - const char *Senter="", *Sexit="";/* enter and exit standout mode */ -+int Slen; /* strlen of Senter+Sexit */ -+char *Hrow; /* pointer to highlighted row in month */ - - #ifdef HAVE_LANGINFO_H - # include -@@ -262,6 +272,7 @@ - if (ret > 0) { - Senter = my_tgetstr("so","smso"); - Sexit = my_tgetstr("se","rmso"); -+ Slen = strlen(Senter) + strlen(Sexit); - } - } - #endif -@@ -437,11 +448,18 @@ - sprintf(out->s[1],"%s", - julian ? j_day_headings : day_headings); - for (row = 0; row < 6; row++) { -- for (col = 0, p = lineout; col < 7; col++) -- p = ascii_day(p, days[row * 7 + col]); -+ int has_hl = 0; -+ for (col = 0, p = lineout; col < 7; col++) { -+ int xd = days[row * 7 + col]; -+ if (xd != SPACE && (xd & TODAY_FLAG)) -+ has_hl = 1; -+ p = ascii_day(p, xd); -+ } - *p = '\0'; - trim_trailing_spaces(lineout); - sprintf(out->s[row+2], "%s", lineout); -+ if (has_hl) -+ Hrow = out->s[row+2]; - } - } - -@@ -489,14 +507,25 @@ - do_monthly(day, prev_month, prev_year, &out_prev); - do_monthly(day, month, year, &out_curm); - do_monthly(day, next_month, next_year, &out_next); -+ - width = (julian ? J_WEEK_LEN : WEEK_LEN) -1; - for (i = 0; i < 2; i++) - printf("%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); - for (i = 2; i < FMT_ST_LINES; i++) { -+ int w1, w2, w3; -+ w1 = w2 = w3 = width; -+ -+#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP) -+ /* adjust width to allow for non printable characters */ -+ w1 += (out_prev.s[i] == Hrow ? Slen : 0); -+ w2 += (out_curm.s[i] == Hrow ? Slen : 0); -+ w3 += (out_next.s[i] == Hrow ? Slen : 0); -+#endif - snprintf(lineout, SIZE(lineout), "%-*s %-*s %-*s\n", -- width, out_prev.s[i], -- width, out_curm.s[i], -- width, out_next.s[i]); -+ w1, out_prev.s[i], -+ w2, out_curm.s[i], -+ w3, out_next.s[i]); -+ - #if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP) - my_putstring(lineout); - #else ---- util-linux-2.13-pre7/configure.ac.kzak 2007-07-09 14:54:48.000000000 +0200 -+++ util-linux-2.13-pre7/configure.ac 2007-07-09 14:55:11.000000000 +0200 -@@ -71,6 +71,7 @@ - if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes; then - have_ncurses=yes - AC_MSG_NOTICE([you have ncurses]) -+ AC_DEFINE(HAVE_NCURSES, 1, [Do we have -lncurses?]) - else - AC_MSG_NOTICE([you do not have ncurses]) - fi diff --git a/util-linux-2.13-cal-wide.patch b/util-linux-2.13-cal-wide.patch deleted file mode 100644 index ac51aa8..0000000 --- a/util-linux-2.13-cal-wide.patch +++ /dev/null @@ -1,236 +0,0 @@ ---- util-linux-2.13-pre7/include/widechar.h.kzak 2005-08-01 20:18:35.000000000 +0200 -+++ util-linux-2.13-pre7/include/widechar.h 2006-03-29 19:38:56.000000000 +0200 -@@ -2,7 +2,7 @@ - /* This file must be included last because the redefinition of wchar_t may - cause conflicts when system include files were included after it. */ - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - - # include - # include ---- util-linux-2.13-pre7/misc-utils/cal.c.kzak 2006-03-29 19:40:26.000000000 +0200 -+++ util-linux-2.13-pre7/misc-utils/cal.c 2006-03-29 19:40:34.000000000 +0200 -@@ -355,7 +355,7 @@ - exit(0); - } - --#ifndef ENABLE_WIDECHAR -+#ifndef HAVE_WIDECHAR - static char *eos(char *s) { - while (s && *s) - s++; -@@ -366,14 +366,14 @@ - void headers_init(void) - { - int i, wd; --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - wchar_t day_headings_wc[22],j_day_headings_wc[29]; - char *cur_dh = day_headings, *cur_j_dh = j_day_headings; - #endif - - strcpy(day_headings,""); - strcpy(j_day_headings,""); --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - wcscpy(day_headings_wc,L""); - wcscpy(j_day_headings_wc,L""); - #endif -@@ -387,7 +387,7 @@ - for(i = 0 ; i < 7 ; i++ ) { - ssize_t space_left; - wd = (i + week1stday) % 7; --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - swprintf(day_headings_wc, sizeof(day_headings_wc)/sizeof(day_headings_wc[0]), - L"%1.2s ", weekday(wd)); - swprintf(j_day_headings_wc, sizeof(j_day_headings_wc)/sizeof(j_day_headings_wc[0]), -@@ -718,7 +718,7 @@ - void - center_str(const char* src, char* dest, size_t dest_size, int width) - { --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - wchar_t str_wc[FMT_ST_CHARS]; - #endif - char str[FMT_ST_CHARS]; -@@ -727,7 +727,7 @@ - - len = strlen(src); - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (mbstowcs(str_wc, src, FMT_ST_CHARS) > 0) { - wide_char_enabled = 1; - len = wcswidth(str_wc, SIZE(str_wc)); -@@ -736,7 +736,7 @@ - if (len > width) { - str_to_print=str; - if (wide_char_enabled) { --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - str_wc[width]=L'\0'; - wcstombs(str, str_wc, SIZE(str)); - #endif ---- util-linux-2.13-pre7/text-utils/column.c.kzak 2006-03-29 19:41:20.000000000 +0200 -+++ util-linux-2.13-pre7/text-utils/column.c 2006-03-29 19:41:25.000000000 +0200 -@@ -52,7 +52,7 @@ - - #include "widechar.h" - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - #define wcs_width(s) wcswidth(s,wcslen(s)) - static wchar_t *mbs_to_wcs(const char *); - #else -@@ -312,7 +312,7 @@ - } - } - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - static wchar_t *mbs_to_wcs(const char *s) - { - size_t n; -@@ -330,7 +330,7 @@ - } - #endif - --#ifndef ENABLE_WIDECHAR -+#ifndef HAVE_WIDECHAR - static char *mtsafe_strtok(char *str, const char *delim, char **ptr) - { - if (str == NULL) { ---- util-linux-2.13-pre7/text-utils/pg.c.kzak 2006-03-29 19:41:52.000000000 +0200 -+++ util-linux-2.13-pre7/text-utils/pg.c 2006-03-29 19:41:59.000000000 +0200 -@@ -255,7 +255,7 @@ - usage(); - } - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - /* - * A mbstowcs()-alike function that transparently handles invalid sequences. - */ -@@ -402,7 +402,7 @@ - return 0; - } - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - /* - * Return the last character that will fit on the line at col columns - * in case MB_CUR_MAX > 1. -@@ -489,7 +489,7 @@ - unsigned pos = 0; - char *t = s; - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (MB_CUR_MAX > 1) - return endline_for_mb(col, s); - #endif -@@ -776,7 +776,7 @@ - cmd.count = getcount(cmd.cmdline); - } - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - /* - * Remove backspace formatting, for searches - * in case MB_CUR_MAX > 1. -@@ -817,7 +817,7 @@ - { - char *p = s, *q; - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (MB_CUR_MAX > 1) - return colb_for_mb(s); - #endif -@@ -836,7 +836,7 @@ - return s; - } - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - /* - * Convert nonprintable characters to spaces - * in case MB_CUR_MAX > 1. -@@ -867,7 +867,7 @@ - static void - makeprint(char *s, size_t l) - { --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (MB_CUR_MAX > 1) - return makeprint_for_mb(s, l); - #endif ---- util-linux-2.13-pre7/text-utils/more.c.kzak 2006-03-29 19:41:01.000000000 +0200 -+++ util-linux-2.13-pre7/text-utils/more.c 2006-03-29 19:41:08.000000000 +0200 -@@ -782,7 +782,7 @@ - int column; - static int colflg; - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - int i; - wchar_t wc; - int wc_width; -@@ -805,7 +805,7 @@ - c = Getc (f); - } - while (p < &Line[LINSIZ - 1]) { --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (fold_opt && use_mbc_buffer_flag && MB_CUR_MAX > 1) { - use_mbc_buffer_flag = 0; - state_bak = state; -@@ -923,7 +923,7 @@ - *length = p - Line; - return (column); - } else { --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (fold_opt && MB_CUR_MAX > 1) { - memset (mbc, '\0', MB_LEN_MAX); - mbc_pos = 0; -@@ -1054,7 +1054,7 @@ - my_putstring(state ? ULenter : ULexit); - } - if (c != ' ' || pstate == 0 || state != 0 || ulglitch == 0) --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - { - wchar_t wc; - size_t mblength; -@@ -1070,7 +1070,7 @@ - } - #else - putchar(c); --#endif /* ENABLE_WIDECHAR */ -+#endif /* HAVE_WIDECHAR */ - if (state && *chUL) { - putsout(chBS); - my_putstring(chUL); -@@ -1867,7 +1867,7 @@ - } - else if (((cc_t) c == otty.c_cc[VERASE]) && !slash) { - if (sp > buf) { --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - if (MB_CUR_MAX > 1) - { - wchar_t wc; ---- util-linux-2.13-pre7/text-utils/ul.c.kzak 2006-03-29 19:42:09.000000000 +0200 -+++ util-linux-2.13-pre7/text-utils/ul.c 2006-03-29 19:42:25.000000000 +0200 -@@ -50,7 +50,7 @@ - - #include "widechar.h" - --#ifdef ENABLE_WIDECHAR -+#ifdef HAVE_WIDECHAR - static int put1wc(int c) /* Output an ASCII character as a wide character */ - { - if (putwchar(c) == WEOF) diff --git a/util-linux-2.13-cramfs-maxentries.patch b/util-linux-2.13-cramfs-maxentries.patch deleted file mode 100644 index 07b8822..0000000 --- a/util-linux-2.13-cramfs-maxentries.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c.maxentries 2005-10-20 23:46:19.000000000 +0200 -+++ util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c 2005-10-20 23:54:07.000000000 +0200 -@@ -471,11 +471,13 @@ - * entries, using a stack to remember the directories - * we've seen. - */ --#define MAXENTRIES (100) - static unsigned int write_directory_structure(struct entry *entry, char *base, unsigned int offset) - { - int stack_entries = 0; -- struct entry *entry_stack[MAXENTRIES]; -+ int stack_size = 64; -+ struct entry **entry_stack; -+ -+ entry_stack = xmalloc(stack_size * sizeof(struct entry *)); - - for (;;) { - int dir_start = stack_entries; -@@ -508,13 +510,13 @@ - if (verbose) - printf(" %s\n", entry->name); - if (entry->child) { -- if (stack_entries >= MAXENTRIES) { -- fprintf(stderr, -- _("Exceeded MAXENTRIES. Raise" -- " this value in mkcramfs.c " -- "and recompile. Exiting.\n") -- ); -- exit(8); -+ if (stack_entries >= stack_size) { -+ stack_size *= 2; -+ entry_stack = realloc(entry_stack, stack_size * sizeof(struct entry *)); -+ if (!entry_stack) { -+ perror(NULL); -+ exit(8); /* out of memory */ -+ } - } - entry_stack[stack_entries] = entry; - stack_entries++; -@@ -551,6 +553,7 @@ - printf("'%s':\n", entry->name); - entry = entry->child; - } -+ free(entry_stack); - return offset; - } - diff --git a/util-linux-2.13-cramfs-zerofiles.patch b/util-linux-2.13-cramfs-zerofiles.patch deleted file mode 100644 index 3d97419..0000000 --- a/util-linux-2.13-cramfs-zerofiles.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c.zerofiles 2005-11-07 13:05:27.000000000 +0100 -+++ util-linux-2.13-pre5/disk-utils/mkfs.cramfs.c 2005-11-07 13:06:38.000000000 +0100 -@@ -661,7 +661,7 @@ - if (e->same) { - set_data_offset(e, base, e->same->offset); - e->offset = e->same->offset; -- } else { -+ } else if (e->size) { - set_data_offset(e, base, offset); - e->offset = offset; - offset = do_compress(base, offset, e->name, diff --git a/util-linux-2.13-ctrlaltdel-man.patch b/util-linux-2.13-ctrlaltdel-man.patch deleted file mode 100644 index ab7c6bd..0000000 --- a/util-linux-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-2.13-ctty3.patch b/util-linux-2.13-ctty3.patch deleted file mode 100644 index e33fef7..0000000 --- a/util-linux-2.13-ctty3.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- util-linux-2.13-pre1/login-utils/login.c.ctty3 2005-08-02 18:10:24.000000000 +0200 -+++ util-linux-2.13-pre1/login-utils/login.c 2005-08-15 15:51:35.000000000 +0200 -@@ -285,7 +285,21 @@ - updwtmp(_PATH_BTMP, &ut); - #endif - } --#endif /* HAVE_SECURITY_PAM_MISC_H */ -+ -+static int childPid = 0; -+static volatile int got_sig = 0; -+ -+static void -+parent_sig_handler(int signal) -+{ -+ if(childPid) -+ kill(-childPid, signal); -+ else -+ got_sig = 1; -+ if(signal == SIGTERM) -+ kill(-childPid, SIGHUP); /* because the shell often ignores SIGTERM */ -+} -+#endif /* HAVE_SECURITY_PAM_MISC_H */ - - int - main(int argc, char **argv) -@@ -307,7 +321,7 @@ - int retcode; - pam_handle_t *pamh = NULL; - struct pam_conv conv = { misc_conv, NULL }; -- pid_t childPid; -+ struct sigaction sa, oldsa_hup, oldsa_term; - #else - char *salt, *pp; - #endif -@@ -1023,7 +1037,18 @@ - * We must fork before setuid() because we need to call - * pam_close_session() as root. - */ -+ memset(&sa, 0, sizeof(sa)); -+ sa.sa_handler = SIG_IGN; -+ sigaction(SIGINT, &sa, NULL); -+ -+ sigaction(SIGHUP, &sa, &oldsa_hup); /* ignore while we detach from the tty */ -+ ioctl(0, TIOCNOTTY, NULL); -+ -+ sa.sa_handler = parent_sig_handler; -+ sigaction(SIGHUP, &sa, NULL); -+ sigaction(SIGTERM, &sa, &oldsa_term); - -+ closelog(); - childPid = fork(); - if (childPid < 0) { - int errsv = errno; -@@ -1034,19 +1059,20 @@ - } - - if (childPid) { -- /* parent - wait for child to finish, then cleanup session */ -- signal(SIGHUP, SIG_IGN); -- signal(SIGINT, SIG_IGN); -- signal(SIGQUIT, SIG_IGN); -- signal(SIGTSTP, SIG_IGN); -- signal(SIGTTIN, SIG_IGN); -- signal(SIGTTOU, SIG_IGN); -- -- wait(NULL); -+ close(0); close(1); close(2); -+ sa.sa_handler = SIG_IGN; -+ sigaction(SIGQUIT, &sa, NULL); -+ sigaction(SIGINT, &sa, NULL); -+ while(wait(NULL) == -1 && errno == EINTR) /**/ ; -+ openlog("login", LOG_ODELAY, LOG_AUTHPRIV); - PAM_END; - exit(0); - } - -+ sigaction(SIGHUP, &oldsa_hup, NULL); -+ sigaction(SIGTERM, &oldsa_term, NULL); -+ if(got_sig) exit(1); -+ - /* child */ - /* - * Problem: if the user's shell is a shell like ash that doesnt do -@@ -1058,14 +1084,15 @@ - setsid(); - - /* make sure we have a controlling tty */ -- opentty(ttyn); - openlog("login", LOG_ODELAY, LOG_AUTHPRIV); /* reopen */ - - /* - * TIOCSCTTY: steal tty from other process group. - */ -- if (ioctl(0, TIOCSCTTY, 1)) -- syslog(LOG_ERR, _("TIOCSCTTY failed: %m")); -+ if (ioctl(0, TIOCSCTTY, (char *)1)) { -+ syslog(LOG_ERR, _("Couldn't set controlling terminal: %s"), strerror(errno)); -+ exit(1); -+ } - #endif - signal(SIGINT, SIG_DFL); - diff --git a/util-linux-2.13-fdisk-b-4096.patch b/util-linux-2.13-fdisk-b-4096.patch deleted file mode 100644 index b2dde20..0000000 --- a/util-linux-2.13-fdisk-b-4096.patch +++ /dev/null @@ -1,15 +0,0 @@ - - The "-b" option allows to manually define size of sector size. We need to support - 4096 bytes for really huge disks. [kzak 12/14/2006] - ---- util-linux-2.13-pre7/fdisk/fdisk.c.kzak 2006-12-14 10:21:57.000000000 +0100 -+++ util-linux-2.13-pre7/fdisk/fdisk.c 2006-12-14 10:22:21.000000000 +0100 -@@ -2491,7 +2491,7 @@ - */ - 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-2.13-fdisk-gpt.patch b/util-linux-2.13-fdisk-gpt.patch deleted file mode 100644 index 03c6ca9..0000000 --- a/util-linux-2.13-fdisk-gpt.patch +++ /dev/null @@ -1,493 +0,0 @@ ---- util-linux-2.13-pre6/fdisk/fdisk.c.gpt 2005-11-24 15:30:36.000000000 +0100 -+++ util-linux-2.13-pre6/fdisk/fdisk.c 2005-11-24 15:30:36.000000000 +0100 -@@ -34,6 +34,8 @@ - #include - #endif - -+#include "gpt.h" -+ - static void delete_partition(int i); - - #define hex_val(c) ({ \ -@@ -2400,6 +2402,14 @@ - } - - static void -+gpt_warning(char *dev) -+{ -+ if (gpt_probe_signature_devname(dev)) -+ fprintf(stderr, _("\nWARNING: GPT (GUID Partition Table) detected on '%s'! " -+ "The util fdisk doesn't support GPT. Use GNU Parted.\n\n"), dev); -+} -+ -+static void - try(char *device, int user_specified) { - int gb; - -@@ -2409,6 +2419,7 @@ - if (!user_specified) - if (is_ide_cdrom_or_tape(device)) - return; -+ gpt_warning(device); - if ((fd = open(disk_device, type_open)) >= 0) { - gb = get_boot(try_only); - if (gb > 0) { /* I/O error */ -@@ -2470,6 +2481,8 @@ - printf(_("%c: unknown command\n"), c); - } - -+ -+ - int - main(int argc, char **argv) { - int j, c; -@@ -2574,6 +2587,7 @@ - - for (j = optind; j < argc; j++) { - disk_device = argv[j]; -+ gpt_warning(disk_device); - if ((fd = open(disk_device, type_open)) < 0) - fatal(unable_to_open); - if (disksize(fd, &size)) -@@ -2594,6 +2608,7 @@ - else - fatal(usage2); - -+ gpt_warning(disk_device); - get_boot(fdisk); - - if (osf_label) { ---- /dev/null 2005-11-14 15:52:26.044616250 +0100 -+++ util-linux-2.13-pre6/fdisk/gpt.h 2005-11-24 15:30:36.000000000 +0100 -@@ -0,0 +1,9 @@ -+ -+#ifndef __GPT_H__ -+#define __GPT_H__ -+ -+extern int gpt_probe_signature_fd(int fd); -+extern int gpt_probe_signature_devname(char *devname); -+ -+#endif /* __GPT_H__ */ -+ ---- util-linux-2.13-pre6/fdisk/Makefile.am.gpt 2005-10-16 14:12:52.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/Makefile.am 2005-11-24 15:31:42.000000000 +0100 -@@ -5,13 +5,13 @@ - sbin_PROGRAMS = fdisk - man_MANS = fdisk.8 - fdisk_SOURCES = fdisk.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \ -- fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c -+ fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c gpt.c - - if !SPARC - - sbin_PROGRAMS += sfdisk - man_MANS += sfdisk.8 --sfdisk_SOURCES = sfdisk.c disksize.c i386_sys_types.c partname.c -+sfdisk_SOURCES = sfdisk.c disksize.c i386_sys_types.c partname.c gpt.c - - if USE_SLANG - sbin_PROGRAMS += cfdisk ---- util-linux-2.13-pre6/fdisk/fdisk.8.gpt 2005-11-24 15:30:36.000000000 +0100 -+++ util-linux-2.13-pre6/fdisk/fdisk.8 2005-11-24 15:30:36.000000000 +0100 -@@ -42,6 +42,11 @@ - partition tables. - It understands DOS type partition tables and BSD or SUN type disklabels. - -+.B fdisk -+doesn't understand GUID Partition Table (GPT) and -+it is not designed for large partitions. In particular case use more advanced GNU -+.B parted(8). -+ - The - .I device - is usually one of the following: ---- util-linux-2.13-pre6/fdisk/sfdisk.8.gpt 2004-12-31 17:28:30.000000000 +0100 -+++ util-linux-2.13-pre6/fdisk/sfdisk.8 2005-11-24 15:30:36.000000000 +0100 -@@ -18,6 +18,11 @@ - on a device, check the partitions on a device, and - very dangerous - - repartition a device. - -+.B sfdisk -+doesn't understand GUID Partition Table (GPT) and -+it is not designed for large partitions. In particular case use more advanced GNU -+.B parted(8). -+ - .SS "List Sizes" - .BI "sfdisk \-s " partition - gives the size of ---- /dev/null 2005-11-14 15:52:26.044616250 +0100 -+++ util-linux-2.13-pre6/fdisk/gpt.c 2005-11-24 15:30:36.000000000 +0100 -@@ -0,0 +1,287 @@ -+/* -+ GPT (GUID Partition Table) signature detection. Based on libparted and -+ util-linux/partx. -+ -+ Warning: this code doesn't do all GPT checks (CRC32, Protective MBR, ..). It's -+ really GPT signature detection only. -+ -+ -- Karel Zak (Jun-2-2005) -+ -+*/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "gpt.h" -+ -+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -+#define SECTOR_SIZE 512 /* default */ -+ -+#define _GET_BYTE(x, n) ( ((x) >> (8 * (n))) & 0xff ) -+ -+#define _PED_SWAP64(x) ( (_GET_BYTE(x, 0) << 56) \ -+ + (_GET_BYTE(x, 1) << 48) \ -+ + (_GET_BYTE(x, 2) << 40) \ -+ + (_GET_BYTE(x, 3) << 32) \ -+ + (_GET_BYTE(x, 4) << 24) \ -+ + (_GET_BYTE(x, 5) << 16) \ -+ + (_GET_BYTE(x, 6) << 8) \ -+ + (_GET_BYTE(x, 7) << 0) ) -+ -+#define PED_SWAP64(x) ((uint64_t) _PED_SWAP64( (uint64_t) (x) )) -+ -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+# define CPU_TO_LE64(x) (x) -+#else -+# define CPU_TO_LE64(x) PED_SWAP64(x) -+#endif -+ -+#define BLKSSZGET _IO(0x12,104) /* get block device sector size */ -+#define BLKGETLASTSECT _IO(0x12,108) /* get last sector of block device */ -+#define BLKGETSIZE _IO(0x12,96) /* return device size */ -+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ -+ -+#define GPT_HEADER_SIGNATURE 0x5452415020494645LL -+#define GPT_PRIMARY_PARTITION_TABLE_LBA 1 -+ -+typedef struct { -+ uint32_t time_low; -+ uint16_t time_mid; -+ uint16_t time_hi_and_version; -+ uint8_t clock_seq_hi_and_reserved; -+ uint8_t clock_seq_low; -+ uint8_t node[6]; -+} /* __attribute__ ((packed)) */ efi_guid_t; -+/* commented out "__attribute__ ((packed))" to work around gcc bug (fixed -+ * in gcc3.1): __attribute__ ((packed)) breaks addressing on initialized -+ * data. It turns out we don't need it in this case, so it doesn't break -+ * anything :) -+ */ -+ -+typedef struct _GuidPartitionTableHeader_t { -+ uint64_t Signature; -+ uint32_t Revision; -+ uint32_t HeaderSize; -+ uint32_t HeaderCRC32; -+ uint32_t Reserved1; -+ uint64_t MyLBA; -+ uint64_t AlternateLBA; -+ uint64_t FirstUsableLBA; -+ uint64_t LastUsableLBA; -+ efi_guid_t DiskGUID; -+ uint64_t PartitionEntryLBA; -+ uint32_t NumberOfPartitionEntries; -+ uint32_t SizeOfPartitionEntry; -+ uint32_t PartitionEntryArrayCRC32; -+ uint8_t Reserved2[512 - 92]; -+} __attribute__ ((packed)) GuidPartitionTableHeader_t; -+ -+struct blkdev_ioctl_param { -+ unsigned int block; -+ size_t content_length; -+ char * block_contents; -+}; -+ -+static int -+_get_linux_version (void) -+{ -+ static int kver = -1; -+ struct utsname uts; -+ int major; -+ int minor; -+ int teeny; -+ -+ if (kver != -1) -+ return kver; -+ if (uname (&uts)) -+ return kver = 0; -+ if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) != 3) -+ return kver = 0; -+ return kver = KERNEL_VERSION (major, minor, teeny); -+} -+ -+static unsigned int -+_get_sector_size (int fd) -+{ -+ unsigned int sector_size; -+ -+ if (_get_linux_version() < KERNEL_VERSION (2,3,0)) -+ return SECTOR_SIZE; -+ if (ioctl (fd, BLKSSZGET, §or_size)) -+ return SECTOR_SIZE; -+ return sector_size; -+} -+ -+static uint64_t -+_get_num_sectors(int fd) -+{ -+ int version = _get_linux_version(); -+ unsigned long size; -+ uint64_t bytes=0; -+ -+ if (version >= KERNEL_VERSION(2,5,4) || -+ (version < KERNEL_VERSION(2,5,0) && -+ version >= KERNEL_VERSION (2,4,18))) -+ { -+ if (ioctl(fd, BLKGETSIZE64, &bytes) == 0) -+ return bytes / _get_sector_size(fd); -+ } -+ if (ioctl (fd, BLKGETSIZE, &size)) -+ return 0; -+ return size; -+} -+ -+static uint64_t -+last_lba(int fd) -+{ -+ int rc; -+ uint64_t sectors = 0; -+ struct stat s; -+ -+ memset(&s, 0, sizeof (s)); -+ rc = fstat(fd, &s); -+ if (rc == -1) -+ { -+ fprintf(stderr, "last_lba() could not stat: %s\n", -+ strerror(errno)); -+ return 0; -+ } -+ if (S_ISBLK(s.st_mode)) -+ sectors = _get_num_sectors(fd); -+ else -+ { -+ fprintf(stderr, -+ "last_lba(): I don't know how to handle files with mode %x\n", -+ s.st_mode); -+ sectors = 1; -+ } -+ return sectors - 1; -+} -+ -+static ssize_t -+read_lastoddsector(int fd, uint64_t lba, void *buffer, size_t count) -+{ -+ int rc; -+ struct blkdev_ioctl_param ioctl_param; -+ -+ if (!buffer) return 0; -+ -+ ioctl_param.block = 0; /* read the last sector */ -+ ioctl_param.content_length = count; -+ ioctl_param.block_contents = buffer; -+ -+ rc = ioctl(fd, BLKGETLASTSECT, &ioctl_param); -+ if (rc == -1) perror("read failed"); -+ -+ return !rc; -+} -+ -+static ssize_t -+read_lba(int fd, uint64_t lba, void *buffer, size_t bytes) -+{ -+ int sector_size = _get_sector_size(fd); -+ off_t offset = lba * sector_size; -+ ssize_t bytesread; -+ -+ lseek(fd, offset, SEEK_SET); -+ bytesread = read(fd, buffer, bytes); -+ -+ /* Kludge. This is necessary to read/write the last -+ block of an odd-sized disk, until Linux 2.5.x kernel fixes. -+ This is only used by gpt.c, and only to read -+ one sector, so we don't have to be fancy. -+ */ -+ if (!bytesread && !(last_lba(fd) & 1) && lba == last_lba(fd)) -+ bytesread = read_lastoddsector(fd, lba, buffer, bytes); -+ return bytesread; -+} -+ -+static GuidPartitionTableHeader_t * -+alloc_read_gpt_header(int fd, uint64_t lba) -+{ -+ GuidPartitionTableHeader_t *gpt = -+ (GuidPartitionTableHeader_t *) malloc(sizeof (GuidPartitionTableHeader_t)); -+ if (!gpt) -+ return NULL; -+ memset(gpt, 0, sizeof (*gpt)); -+ if (!read_lba(fd, lba, gpt, sizeof (GuidPartitionTableHeader_t))) -+ { -+ free(gpt); -+ return NULL; -+ } -+ return gpt; -+} -+ -+static int -+gpt_check_signature(int fd, uint64_t lba) -+{ -+ GuidPartitionTableHeader_t *gpt; -+ int res=0; -+ -+ if ((gpt = alloc_read_gpt_header(fd, lba))) -+ { -+ if (gpt->Signature == CPU_TO_LE64(GPT_HEADER_SIGNATURE)) -+ res = 1; -+ free(gpt); -+ } -+ return res; -+} -+ -+/* returns: -+ * 0 not found GPT -+ * 1 for valid primary GPT header -+ * 2 for valid alternative GPT header -+ */ -+int -+gpt_probe_signature_fd(int fd) -+{ -+ int res = 0; -+ -+ /* check primary GPT header */ -+ if (gpt_check_signature(fd, GPT_PRIMARY_PARTITION_TABLE_LBA)) -+ res = 1; -+ else -+ { -+ /* check alternative GPT header */ -+ uint64_t lastlba = last_lba(fd); -+ if (gpt_check_signature(fd, lastlba)) -+ res = 2; -+ } -+ return res; -+} -+ -+int -+gpt_probe_signature_devname(char *devname) -+{ -+ int res, fd; -+ if ((fd = open(devname, O_RDONLY)) < 0) -+ return 0; -+ res = gpt_probe_signature_fd(fd); -+ close(fd); -+ return res; -+} -+ -+#ifdef GPT_TEST_MAIN -+int -+main(int argc, char **argv) -+{ -+ if (argc!=2) -+ { -+ fprintf(stderr, "usage: %s \n", argv[0]); -+ exit(EXIT_FAILURE); -+ } -+ if (gpt_probe_signature_devname(argv[1])) -+ printf("GPT (GUID Partition Table) detected on %s\n", argv[1]); -+ exit(EXIT_SUCCESS); -+} -+#endif ---- util-linux-2.13-pre6/fdisk/sfdisk.c.gpt 2005-10-16 14:18:32.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/sfdisk.c 2005-11-24 15:30:36.000000000 +0100 -@@ -50,6 +50,8 @@ - #include "nls.h" - #include "common.h" - -+#include "gpt.h" -+ - #define SIZE(a) (sizeof(a)/sizeof(a[0])) - - /* -@@ -2457,6 +2459,23 @@ - return NULL; - } - -+static void -+gpt_warning(char *dev, int warn_only) -+{ -+ if (force) -+ warn_only = 1; -+ -+ if (gpt_probe_signature_devname(dev)) { -+ fflush(stdout); -+ fprintf(stderr, _("\nWARNING: GPT (GUID Partition Table) detected on '%s'! " -+ "The util sfdisk doesn't support GPT. Use GNU Parted.\n\n"), dev); -+ if (!warn_only) { -+ fprintf(stderr, _("Use the --force flag to overrule this check.\n")); -+ exit(1); -+ } -+ } -+} -+ - static void do_list(char *dev, int silent); - static void do_size(char *dev, int silent); - static void do_geom(char *dev, int silent); -@@ -2602,6 +2621,7 @@ - while ((dev = nextproc()) != NULL) { - if (is_ide_cdrom_or_tape(dev)) - continue; -+ gpt_warning(dev, 1); - if (opt_out_geom) - do_geom(dev, 1); - if (opt_out_pt_geom) -@@ -2629,6 +2649,7 @@ - - if (opt_list || opt_out_geom || opt_out_pt_geom || opt_size || verify) { - while (optind < argc) { -+ gpt_warning(argv[optind], 1); - if (opt_out_geom) - do_geom(argv[optind], 0); - if (opt_out_pt_geom) -@@ -2657,6 +2678,7 @@ - fatal(_("usage: sfdisk --change-id device partition-number Id\n")); - else if (optind != argc-3 && optind != argc-2) - fatal(_("usage: sfdisk --id device partition-number [Id]\n")); -+ gpt_warning(argv[optind], 0); - do_change_id(argv[optind], argv[optind+1], - (optind == argc-2) ? 0 : argv[optind+2]); - exit(exit_status); -@@ -2666,6 +2688,8 @@ - fatal(_("can specify only one device (except with -l or -s)\n")); - dev = argv[optind]; - -+ gpt_warning(dev, 0); -+ - if (opt_reread) - do_reread(dev); - else if (restore_sector_file) -@@ -2842,6 +2866,8 @@ - - z = &oldp; - -+ gpt_warning(dev, 0); -+ - rw = (!no_write && (arg || ac > 1)); - fd = my_open(dev, rw, 0); - -@@ -2943,6 +2969,8 @@ - - z = &oldp; - -+ gpt_warning(dev, 0); -+ - rw = !no_write; - fd = my_open(dev, rw, 0); - diff --git a/util-linux-2.13-fdisk-isfull.patch b/util-linux-2.13-fdisk-isfull.patch deleted file mode 100644 index 91fdace..0000000 --- a/util-linux-2.13-fdisk-isfull.patch +++ /dev/null @@ -1,103 +0,0 @@ ---- util-linux-2.13-pre6/fdisk/sfdisk.c.isfull 2006-06-12 13:31:46.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/sfdisk.c 2006-06-12 13:31:47.000000000 +0200 -@@ -2413,19 +2413,6 @@ - return is_ide; - } - --static int --is_probably_full_disk(char *name) { -- struct hd_geometry geometry; -- int fd, i = 0; -- -- fd = open(name, O_RDONLY); -- if (fd >= 0) { -- i = ioctl(fd, HDIO_GETGEO, &geometry); -- close(fd); -- } -- return (fd >= 0 && i == 0 && geometry.start == 0); --} -- - #define PROC_PARTITIONS "/proc/partitions" - static FILE *procf = NULL; - ---- util-linux-2.13-pre6/fdisk/common.h.isfull 2004-09-06 20:07:11.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/common.h 2006-06-12 13:31:47.000000000 +0200 -@@ -28,5 +28,6 @@ - extern struct systypes i386_sys_types[]; - - extern char *partname(char *dev, int pno, int lth); -+extern int is_probably_full_disk(char *name); - - int disksize(int fd, unsigned long long *sectors); ---- util-linux-2.13-pre6/fdisk/partname.c.isfull 2002-07-07 14:16:43.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/partname.c 2006-06-12 13:32:54.000000000 +0200 -@@ -1,6 +1,9 @@ - #include - #include - #include -+#include -+#include -+#include - #include "common.h" - - /* -@@ -45,3 +48,30 @@ - partname(char *dev, int pno, int lth) { - return partnamebf(dev, pno, lth, 0, NULL); - } -+ -+int -+is_probably_full_disk(char *name) { -+#ifdef HDIO_GETGEO -+ struct hd_geometry geometry; -+ int fd, i = 0; -+ -+ fd = open(name, O_RDONLY); -+ if (fd >= 0) { -+ i = ioctl(fd, HDIO_GETGEO, &geometry); -+ close(fd); -+ } -+ if (i==0) -+ return (fd >= 0 && geometry.start == 0); -+ /* -+ * "silly heuristic" is still so sexy for us, because -+ * for example Xen doesn't implement HDIO_GETGEO for virtual -+ * block devices (/dev/xvda). -+ * -- kzak@redhat.com (23-Feb-2006) -+ */ -+#endif -+ /* silly heuristic */ -+ while (*name) -+ name++; -+ return !isdigit(name[-1]); -+} -+ ---- util-linux-2.13-pre6/fdisk/fdisk.c.isfull 2006-06-12 13:31:47.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/fdisk.c 2006-06-12 13:31:47.000000000 +0200 -@@ -788,26 +788,6 @@ - #endif - } - --static int --is_probably_full_disk(char *name) { --#ifdef HDIO_GETGEO -- struct hd_geometry geometry; -- int fd, i = 0; -- -- fd = open(name, O_RDONLY); -- if (fd >= 0) { -- i = ioctl(fd, HDIO_GETGEO, &geometry); -- close(fd); -- } -- return (fd >= 0 && i == 0 && geometry.start == 0); --#else -- /* silly heuristic */ -- while (*name) -- name++; -- return !isdigit(name[-1]); --#endif --} -- - static void - get_partition_table_geometry(void) { - unsigned char *bufp = MBRbuffer; diff --git a/util-linux-2.13-fdisk-sectors.patch b/util-linux-2.13-fdisk-sectors.patch deleted file mode 100644 index c8de359..0000000 --- a/util-linux-2.13-fdisk-sectors.patch +++ /dev/null @@ -1,345 +0,0 @@ ---- util-linux-2.13-pre6/fdisk/fdisk.h.sectors 2006-06-12 10:50:11.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/fdisk.h 2006-06-12 10:50:52.000000000 +0200 -@@ -81,8 +81,8 @@ - #define SINGULAR 1 - extern char *const str_units(int); - --extern unsigned int get_start_sect(struct partition *p); --extern unsigned int get_nr_sects(struct partition *p); -+extern unsigned long long get_start_sect(struct partition *p); -+extern unsigned long long get_nr_sects(struct partition *p); - - extern int osf_label; - ---- util-linux-2.13-pre6/fdisk/fdisksgilabel.h.sectors 2004-12-14 00:39:29.000000000 +0100 -+++ util-linux-2.13-pre6/fdisk/fdisksgilabel.h 2006-06-12 10:50:52.000000000 +0200 -@@ -103,8 +103,9 @@ - /* fdisk.c */ - #define sgilabel ((sgi_partition *)MBRbuffer) - #define sgiparam (sgilabel->devparam) --extern char MBRbuffer[MAX_SECTOR_SIZE]; --extern unsigned int heads, sectors, cylinders, sector_size; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned int heads, cylinders, sector_size; -+extern unsigned long long sectors; - extern int show_begin; - extern int sgi_label; - extern char *partition_type(unsigned char type); ---- util-linux-2.13-pre6/fdisk/fdisksunlabel.h.sectors 2004-12-14 00:39:18.000000000 +0100 -+++ util-linux-2.13-pre6/fdisk/fdisksunlabel.h 2006-06-12 10:50:52.000000000 +0200 -@@ -37,8 +37,9 @@ - : (__u32)(x)) - - /* fdisk.c */ --extern char MBRbuffer[MAX_SECTOR_SIZE]; --extern unsigned int heads, sectors, cylinders; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned int heads, cylinders; -+extern unsigned long long sectors; - extern int show_begin; - extern int sun_label; - extern char *partition_type(unsigned char type); ---- util-linux-2.13-pre6/fdisk/fdiskaixlabel.h.sectors 2004-12-14 00:39:47.000000000 +0100 -+++ util-linux-2.13-pre6/fdisk/fdiskaixlabel.h 2006-06-12 10:50:52.000000000 +0200 -@@ -19,9 +19,10 @@ - - /* fdisk.c */ - #define aixlabel ((aix_partition *)MBRbuffer) --extern char MBRbuffer[MAX_SECTOR_SIZE]; -+extern unsigned char MBRbuffer[MAX_SECTOR_SIZE]; - extern char changed[MAXIMUM_PARTS]; --extern unsigned int heads, sectors, cylinders; -+extern unsigned int heads, cylinders; -+extern unsigned long long sectors; - extern int show_begin; - extern int aix_label; - extern char *partition_type(unsigned char type); ---- util-linux-2.13-pre6/fdisk/fdisksunlabel.c.sectors 2005-07-31 18:00:29.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/fdisksunlabel.c 2006-06-12 10:50:52.000000000 +0200 -@@ -348,7 +348,7 @@ - } - - snprintf(sunlabel->info, sizeof(sunlabel->info), -- "%s%s%s cyl %d alt %d hd %d sec %d", -+ "%s%s%s cyl %d alt %d hd %d sec %llu", - p ? p->vendor : "", (p && *p->vendor) ? " " : "", - p ? p->model - : (floppy ? _("3,5\" floppy") : _("Linux custom")), -@@ -655,7 +655,7 @@ - w = strlen(disk_device); - if (xtra) - printf( -- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d rpm\n" -+ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d rpm\n" - "%d cylinders, %d alternate cylinders, %d physical cylinders\n" - "%d extra sects/cyl, interleave %d:1\n" - "%s\n" -@@ -669,7 +669,7 @@ - str_units(PLURAL), units_per_sector); - else - printf( -- _("\nDisk %s (Sun disk label): %d heads, %d sectors, %d cylinders\n" -+ _("\nDisk %s (Sun disk label): %d heads, %llu sectors, %d cylinders\n" - "Units = %s of %d * 512 bytes\n\n"), - disk_device, heads, sectors, cylinders, - str_units(PLURAL), units_per_sector); ---- util-linux-2.13-pre6/fdisk/fdisk.c.sectors 2006-06-12 10:50:11.000000000 +0200 -+++ util-linux-2.13-pre6/fdisk/fdisk.c 2006-06-12 10:51:53.000000000 +0200 -@@ -64,7 +64,7 @@ - - /* A valid partition table sector ends in 0x55 0xaa */ - static unsigned int --part_table_flag(char *b) { -+part_table_flag(unsigned char *b) { - return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8); - } - -@@ -74,7 +74,7 @@ - } - - static void --write_part_table_flag(char *b) { -+write_part_table_flag(unsigned char *b) { - b[510] = 0x55; - b[511] = 0xaa; - } -@@ -101,17 +101,17 @@ - store4_little_endian(p->start4, start_sect); - } - --unsigned int -+unsigned long long - get_start_sect(struct partition *p) { - return read4_little_endian(p->start4); - } - - static void --set_nr_sects(struct partition *p, unsigned int nr_sects) { -+set_nr_sects(struct partition *p, unsigned long long nr_sects) { - store4_little_endian(p->size4, nr_sects); - } - --unsigned int -+unsigned long long - get_nr_sects(struct partition *p) { - return read4_little_endian(p->size4); - } -@@ -123,7 +123,7 @@ - * Raw disk label. For DOS-type partition tables the MBR, - * with descriptions of the primary partitions. - */ --char MBRbuffer[MAX_SECTOR_SIZE]; -+unsigned char MBRbuffer[MAX_SECTOR_SIZE]; - - /* - * per partition table entry data -@@ -137,8 +137,8 @@ - struct partition *part_table; /* points into sectorbuffer */ - struct partition *ext_pointer; /* points into sectorbuffer */ - char changed; /* boolean */ -- unsigned int offset; /* disk sector number */ -- char *sectorbuffer; /* disk sector contents */ -+ unsigned long long offset; /* disk sector number */ -+ unsigned char *sectorbuffer; /* disk sector contents */ - } ptes[MAXIMUM_PARTS]; - - char *disk_device, /* must be specified */ -@@ -157,15 +157,14 @@ - unsigned int pt_heads, pt_sectors; - unsigned int kern_heads, kern_sectors; - -+unsigned long long sector_offset = 1, extended_offset = 0, sectors; -+ - unsigned int heads, -- sectors, - cylinders, - sector_size = DEFAULT_SECTOR_SIZE, - user_set_sector_size = 0, -- sector_offset = 1, - units_per_sector = 1, -- display_in_cyl_units = 1, -- extended_offset = 0; /* offset of link pointers */ -+ display_in_cyl_units = 1; - - unsigned long long total_number_of_sectors; - -@@ -242,21 +241,21 @@ - } - - static void --seek_sector(int fd, unsigned int secno) { -+seek_sector(int fd, unsigned long long secno) { - off_t offset = (off_t) secno * sector_size; - if (lseek(fd, offset, SEEK_SET) == (off_t) -1) - fatal(unable_to_seek); - } - - static void --read_sector(int fd, unsigned int secno, char *buf) { -+read_sector(int fd, unsigned long long secno, char *buf) { - seek_sector(fd, secno); - if (read(fd, buf, sector_size) != sector_size) - fatal(unable_to_read); - } - - static void --write_sector(int fd, unsigned int secno, char *buf) { -+write_sector(int fd, unsigned long long secno, char *buf) { - seek_sector(fd, secno); - if (write(fd, buf, sector_size) != sector_size) - fatal(unable_to_write); -@@ -264,11 +263,11 @@ - - /* Allocate a buffer and read a partition table sector */ - static void --read_pte(int fd, int pno, unsigned int offset) { -+read_pte(int fd, int pno, unsigned long long offset) { - struct pte *pe = &ptes[pno]; - - pe->offset = offset; -- pe->sectorbuffer = (char *) malloc(sector_size); -+ pe->sectorbuffer = malloc(sector_size); - if (!pe->sectorbuffer) - fatal(out_of_memory); - read_sector(fd, offset, pe->sectorbuffer); -@@ -276,7 +275,7 @@ - pe->part_table = pe->ext_pointer = NULL; - } - --static unsigned int -+static unsigned long long - get_partition_start(struct pte *pe) { - return pe->offset + get_start_sect(pe->part_table); - } -@@ -542,10 +541,10 @@ - } - - static void --set_partition(int i, int doext, unsigned int start, unsigned int stop, -- int sysid) { -+set_partition(int i, int doext, unsigned long long start, -+ unsigned long long stop, int sysid) { - struct partition *p; -- unsigned int offset; -+ unsigned long long offset; - - if (doext) { - p = ptes[i].ext_pointer; -@@ -1544,7 +1543,7 @@ - else - printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"), - disk_device, megabytes/1000, (megabytes/100)%10, bytes); -- printf(_("%d heads, %d sectors/track, %d cylinders"), -+ printf(_("%d heads, %Ld sectors/track, %d cylinders"), - heads, sectors, cylinders); - if (units_per_sector == 1) - printf(_(", total %llu sectors"), -@@ -1776,20 +1775,21 @@ - struct partition *p; - int i; - -- printf(_("\nDisk %s: %d heads, %d sectors, %d cylinders\n\n"), -+ printf(_("\nDisk %s: %d heads, %Ld sectors, %d cylinders\n\n"), - disk_device, heads, sectors, cylinders); - printf(_("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n")); - for (i = 0 ; i < partitions; i++) { - pe = &ptes[i]; - p = (extend ? pe->ext_pointer : pe->part_table); - if (p != NULL) { -- printf("%2d %02x%4d%4d%5d%4d%4d%5d%11u%11u %02x\n", -+ printf("%2d %02x%4d%4d%5d%4d%4d%5d%11lu%11lu %02x\n", - i + 1, p->boot_ind, p->head, - sector(p->sector), - cylinder(p->sector, p->cyl), p->end_head, - sector(p->end_sector), - cylinder(p->end_sector, p->end_cyl), -- get_start_sect(p), get_nr_sects(p), p->sys_ind); -+ (unsigned long) get_start_sect(p), -+ (unsigned long) get_nr_sects(p), p->sys_ind); - if (p->sys_ind) - check_consistency(p, i); - } -@@ -1797,7 +1797,7 @@ - } - - static void --fill_bounds(unsigned int *first, unsigned int *last) { -+fill_bounds(unsigned long long *first, unsigned long long *last) { - int i; - struct pte *pe = &ptes[0]; - struct partition *p; -@@ -1830,7 +1830,7 @@ - n, h + 1, heads); - if (real_s >= sectors) - fprintf(stderr, _("Partition %d: sector %d greater than " -- "maximum %d\n"), n, s, sectors); -+ "maximum %Ld\n"), n, s, sectors); - if (real_c >= cylinders) - fprintf(stderr, _("Partitions %d: cylinder %d greater than " - "maximum %d\n"), n, real_c + 1, cylinders); -@@ -1843,8 +1843,8 @@ - static void - verify(void) { - int i, j; -- unsigned int total = 1; -- unsigned int first[partitions], last[partitions]; -+ unsigned long total = 1; -+ unsigned long long first[partitions], last[partitions]; - struct partition *p; - - if (warn_geometry()) -@@ -1888,7 +1888,7 @@ - - if (extended_offset) { - struct pte *pex = &ptes[ext_index]; -- unsigned int e_last = get_start_sect(pex->part_table) + -+ unsigned long long e_last = get_start_sect(pex->part_table) + - get_nr_sects(pex->part_table) - 1; - - for (i = 4; i < partitions; i++) { -@@ -1907,8 +1907,8 @@ - } - - if (total > total_number_of_sectors) -- printf(_("Total allocated sectors %d greater than the maximum " -- "%lld\n"), 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); -@@ -1921,7 +1921,7 @@ - struct partition *p = ptes[n].part_table; - struct partition *q = ptes[ext_index].part_table; - long long llimit; -- unsigned int start, stop = 0, limit, temp, -+ unsigned long long start, stop = 0, limit, temp, - first[partitions], last[partitions]; - - if (p && p->sys_ind) { -@@ -1967,7 +1967,7 @@ - if (start > limit) - break; - if (start >= temp+units_per_sector && read) { -- printf(_("Sector %d is already allocated\n"), temp); -+ printf(_("Sector %llu is already allocated\n"), temp); - temp = start; - read = 0; - } -@@ -2225,14 +2225,14 @@ - - #define MAX_PER_LINE 16 - static void --print_buffer(char pbuffer[]) { -+print_buffer(unsigned char pbuffer[]) { - int i, - l; - - for (i = 0, l = 0; i < sector_size; i++, l++) { - if (l == 0) - printf("0x%03X:", i); -- printf(" %02X", (unsigned char) pbuffer[i]); -+ printf(" %02X", pbuffer[i]); - if (l == MAX_PER_LINE - 1) { - printf("\n"); - l = -1; diff --git a/util-linux-2.13-hexdump-gcc.patch b/util-linux-2.13-hexdump-gcc.patch deleted file mode 100644 index f088147..0000000 --- a/util-linux-2.13-hexdump-gcc.patch +++ /dev/null @@ -1,17 +0,0 @@ - - gcc 4.1.0: "warning: memset used with constant zero length parameter; this - could be due to transposed parameters". So, fix it! - -- 03/30/2006 Karel Zak - ---- util-linux-2.13-pre7/text-utils/display.c.gcc 2006-03-31 10:44:50.000000000 +0200 -+++ util-linux-2.13-pre7/text-utils/display.c 2006-03-31 10:45:22.000000000 +0200 -@@ -255,7 +255,8 @@ - (void)printf("*\n"); - return(NULL); - } -- memset((char *)curp + nread, 0, need); -+ if (need > 0) -+ memset((char *)curp + nread, 0, need); - eaddress = address + nread; - return(curp); - } diff --git a/util-linux-2.13-hwclock-systohc.patch b/util-linux-2.13-hwclock-systohc.patch deleted file mode 100644 index d0d1eb0..0000000 --- a/util-linux-2.13-hwclock-systohc.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit 99c392d8ba163e35b9d562dd4bcf7dd476ad3573 -Author: Karel Zak -Date: Tue Mar 20 00:32:37 2007 +0100 - - hwclock: fix --systohc sets clock 0.5 seconds slow - - quote from rh150493: - - The kernel code, when setting the BIOS clock notes that the clock time - ticks to the next second 0.5 seconds after adjusting it (see - linux/arch/i386/kernel/time.c). - - hwclock --systohc sets the CMOS clock at the 1 second boundry and thus - causes the clock to be wrong by 500ms each time it is reset. If the - clock is set every shutdown then the clock will have a reboot-count - related drift as well as the natural drift problems of the clock. Note - that this also mucks up the drift calculations, of course. - - Signed-off-by: Karel Zak - -diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c -index 9731dad..820c388 100644 ---- a/hwclock/hwclock.c -+++ b/hwclock/hwclock.c -@@ -517,14 +517,19 @@ set_hardware_clock_exact(const time_t sethwtime, - "Delaying further to reach the next full second.\n"), - time_diff(beginsystime, refsystime)); - -- /* Now delay some more until Hardware Clock time newhwtime arrives */ -+ /* -+ * Now delay some more until Hardware Clock time newhwtime arrives. The -500 -+ * ms is because the Hardware Clock always sets to your set time plus 500 ms -+ * (because it is designed to update to the next second precisely 500 ms -+ * after you finish the setting). -+ */ - do { - float tdiff; - gettimeofday(&nowsystime, NULL); - tdiff = time_diff(nowsystime, beginsystime); - if (tdiff < 0) - goto time_resync; /* probably time was reset */ -- } while (time_diff(nowsystime, refsystime) < newhwtime - sethwtime); -+ } while (time_diff(nowsystime, refsystime) - 0.5 < newhwtime - sethwtime); - - set_hardware_clock(newhwtime, universal, testing); - } diff --git a/util-linux-2.13-ipcs-32bit.patch b/util-linux-2.13-ipcs-32bit.patch deleted file mode 100644 index 99942eb..0000000 --- a/util-linux-2.13-ipcs-32bit.patch +++ /dev/null @@ -1,68 +0,0 @@ - -The compat (32bit) version of sys_shmctl on 64bit kernel returns incorrect -information. In this case is better to read data from /proc/sys/kernel/shm*. - ---- util-linux-2.13-pre7/sys-utils/ipcs.c.kzak 2007-06-25 10:25:31.000000000 +0200 -+++ util-linux-2.13-pre7/sys-utils/ipcs.c 2007-06-25 10:14:06.000000000 +0200 -@@ -253,6 +253,26 @@ - 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) - { -@@ -268,7 +288,7 @@ - printf (_("kernel not configured for shared memory\n")); - return; - } -- -+ - switch (format) { - case LIMITS: - printf (_("------ Shared Memory Limits --------\n")); -@@ -276,18 +296,15 @@ - 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)); -+ - /* max shmem = pagesize * shminfo.shmall / 1024 -- * -- * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit) -- * it means that better is "/" before "*" or use "long long" - */ -- printf (_("max total shared memory (kbytes) = %lu\n"), -- getpagesize()/1024 * (unsigned long) shminfo.shmall); -+ printf (_("max total shared memory (kbytes) = %llu\n"), -+ 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-2.13-ipcs-shmax.patch b/util-linux-2.13-ipcs-shmax.patch deleted file mode 100644 index d855bf5..0000000 --- a/util-linux-2.13-ipcs-shmax.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- util-linux-2.13-pre4/sys-utils/ipcs.c.shmax 2005-10-18 17:04:42.000000000 +0200 -+++ util-linux-2.13-pre4/sys-utils/ipcs.c 2005-10-18 17:31:28.000000000 +0200 -@@ -280,8 +280,14 @@ - (unsigned long) shminfo.shmmni); - printf (_("max seg size (kbytes) = %lu\n"), - (unsigned long) (shminfo.shmmax >> 10)); -+ -+ /* max shmem = pagesize * shminfo.shmall / 1024 -+ * -+ * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit) -+ * it means that better is "/" before "*" or use "long long" -+ */ - printf (_("max total shared memory (kbytes) = %lu\n"), -- (getpagesize()*((unsigned long) shminfo.shmall))/1024UL); -+ getpagesize()/1024 * (unsigned long) shminfo.shmall); - printf (_("min seg size (bytes) = %lu\n"), - (unsigned long) shminfo.shmmin); - return; diff --git a/util-linux-2.13-localedir.patch b/util-linux-2.13-localedir.patch deleted file mode 100644 index 97be1e7..0000000 --- a/util-linux-2.13-localedir.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- util-linux-2.13-pre7/config/include-Makefile.am.kzak 2007-06-25 11:15:40.000000000 +0200 -+++ util-linux-2.13-pre7/config/include-Makefile.am 2007-06-25 11:16:39.000000000 +0200 -@@ -3,10 +3,10 @@ - datadir = $(prefix)/usr/share - infodir = $(datadir)/info - mandir = $(datadir)/man -+localedir = $(datadir)/locale - --AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include -+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \ -+ -DLOCALEDIR=\"$(localedir)\" - - DEFAULT_INCLUDES = - --DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ -- diff --git a/util-linux-2.13-login-hang.patch b/util-linux-2.13-login-hang.patch deleted file mode 100644 index e6031f3..0000000 --- a/util-linux-2.13-login-hang.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- util-linux-2.13-pre2/login-utils/login.c.hang 2005-10-03 16:02:54.000000000 +0200 -+++ util-linux-2.13-pre2/login-utils/login.c 2005-10-03 16:16:16.000000000 +0200 -@@ -223,7 +223,8 @@ - - if (lstat(ttyn, &statbuf) - || !S_ISCHR(statbuf.st_mode) -- || (statbuf.st_nlink > 1 && strncmp(ttyn, "/dev/", 5))) { -+ || (statbuf.st_nlink > 1 && strncmp(ttyn, "/dev/", 5)) -+ || (access(ttyn, R_OK | W_OK) != 0)) { - syslog(LOG_ERR, _("FATAL: bad tty")); - sleep(1); - exit(1); -@@ -332,6 +333,7 @@ - pid = getpid(); - - signal(SIGALRM, timedout); -+ siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */ - alarm((unsigned int)timeout); - signal(SIGQUIT, SIG_IGN); - signal(SIGINT, SIG_IGN); diff --git a/util-linux-2.13-login-ipv6.patch b/util-linux-2.13-login-ipv6.patch deleted file mode 100644 index 5eba0c6..0000000 --- a/util-linux-2.13-login-ipv6.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- util-linux-2.13-pre6/login-utils/login.c.ipv6 2006-10-12 10:10:34.000000000 +0200 -+++ util-linux-2.13-pre6/login-utils/login.c 2006-10-12 10:17:16.000000000 +0200 -@@ -173,7 +173,7 @@ - #ifdef HAVE_SECURITY_PAM_MISC_H - static struct passwd pwdcopy; - #endif --char hostaddress[4]; /* used in checktty.c */ -+char hostaddress[16]; /* used in checktty.c */ - char *hostname; /* idem */ - static char *username, *tty_name, *tty_number; - static char thishost[100]; -@@ -281,7 +281,7 @@ - if (hostname) { - xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); - if (hostaddress[0]) -- memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); -+ memcpy(&ut.ut_addr_v6, hostaddress, sizeof(ut.ut_addr_v6)); - } - #if HAVE_UPDWTMP /* bad luck for ancient systems */ - updwtmp(_PATH_BTMP, &ut); -@@ -380,13 +380,33 @@ - - hostname = strdup(optarg); /* strdup: Ambrose C. Li */ - { -- struct hostent *he = gethostbyname(hostname); -+ struct addrinfo hints, *info = NULL; -+ -+ memset(&hints, '\0', sizeof(hints)); -+ hints.ai_flags = AI_ADDRCONFIG; -+ -+ hostaddress[0] = 0; - -- /* he points to static storage; copy the part we use */ -- hostaddress[0] = 0; -- if (he && he->h_addr_list && he->h_addr_list[0]) -- memcpy(hostaddress, he->h_addr_list[0], -- sizeof(hostaddress)); -+ if (getaddrinfo(hostname, NULL, &hints, &info)==0 && info) -+ { -+ if (info->ai_family == AF_INET) -+ { -+ struct sockaddr_in *sa4; -+ -+ sa4 = (struct sockaddr_in *) info->ai_addr; -+ memcpy(hostaddress, &(sa4->sin_addr), -+ sizeof(sa4->sin_addr)); -+ } -+ if (info->ai_family == AF_INET6) -+ { -+ struct sockaddr_in6 *sa6; -+ -+ sa6 = (struct sockaddr_in6 *) info->ai_addr; -+ memcpy(hostaddress, &(sa6->sin6_addr), -+ sizeof(sa6->sin6_addr)); -+ } -+ freeaddrinfo(info); -+ } - } - break; - -@@ -906,7 +926,7 @@ - if (hostname) { - xstrncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); - if (hostaddress[0]) -- memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); -+ memcpy(&ut.ut_addr_v6, hostaddress, sizeof(ut.ut_addr_v6)); - } - - pututline(&ut); ---- util-linux-2.13-pre6/login-utils/login.h.ipv6 2005-08-02 14:01:18.000000000 +0200 -+++ util-linux-2.13-pre6/login-utils/login.h 2006-10-12 10:10:34.000000000 +0200 -@@ -1,7 +1,7 @@ - /* defined in login.c */ - extern void badlogin(const char *s); - extern void sleepexit(int); --extern char hostaddress[4]; -+extern char hostaddress[16]; - extern char *hostname; - - /* defined in checktty.c */ diff --git a/util-linux-2.13-login-pam-acct.patch b/util-linux-2.13-login-pam-acct.patch deleted file mode 100644 index 24fba08..0000000 --- a/util-linux-2.13-login-pam-acct.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- util-linux-2.13-pre6/login-utils/login.c.acct 2006-02-22 21:43:03.000000000 +0100 -+++ util-linux-2.13-pre6/login-utils/login.c 2006-02-22 21:57:55.000000000 +0100 -@@ -602,16 +602,22 @@ - pam_end(pamh, retcode); - exit(0); - } -+ } - -- retcode = pam_acct_mgmt(pamh, 0); -- -- if(retcode == PAM_NEW_AUTHTOK_REQD) { -- retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); -- } -+ /* -+ * Authentication may be skipped (for example, during krlogin, rlogin, etc...), -+ * but it doesn't mean that we can skip other account checks. The account -+ * could be disabled or password expired (althought kerberos ticket is valid). -+ * -- kzak@redhat.com (22-Feb-2006) -+ */ -+ retcode = pam_acct_mgmt(pamh, 0); - -- PAM_FAIL_CHECK; -+ if(retcode == PAM_NEW_AUTHTOK_REQD) { -+ retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); - } - -+ PAM_FAIL_CHECK; -+ - /* - * Grab the user information out of the password file for future usage - * First get the username that we are actually using, though. diff --git a/util-linux-2.13-login-timeval.patch b/util-linux-2.13-login-timeval.patch deleted file mode 100644 index 2f8e46a..0000000 --- a/util-linux-2.13-login-timeval.patch +++ /dev/null @@ -1,49 +0,0 @@ - -On 64-bit platforms such as x86_64, glibc is usally built with 32-bit -compatibilty for various structures. One of them is utmp. - -What this means is that gettimeofday(&ut.ut_tv, NULL) on x86_64 will -end up overwriting the first parts of ut_addr_v6, leading to garbage -in the utmp file. - - ---- util-linux-2.13-pre6/login-utils/login.c.kzak 2006-08-10 11:38:33.000000000 +0200 -+++ util-linux-2.13-pre6/login-utils/login.c 2006-08-10 11:38:49.000000000 +0200 -@@ -257,6 +257,7 @@ - static void - logbtmp(const char *line, const char *username, const char *hostname) { - struct utmp ut; -+ struct timeval tv; - - memset(&ut, 0, sizeof(ut)); - -@@ -267,7 +268,9 @@ - xstrncpy(ut.ut_line, line, sizeof(ut.ut_line)); - - #if defined(_HAVE_UT_TV) /* in included by */ -- gettimeofday(&ut.ut_tv, NULL); -+ gettimeofday(&tv, NULL); -+ ut.ut_tv.tv_sec = tv.tv_sec; -+ ut.ut_tv.tv_usec = tv.tv_usec; - #else - { - time_t t; -@@ -872,6 +875,7 @@ - { - struct utmp ut; - struct utmp *utp; -+ struct timeval tv; - - utmpname(_PATH_UTMP); - setutent(); -@@ -911,7 +915,9 @@ - strncpy(ut.ut_user, username, sizeof(ut.ut_user)); - xstrncpy(ut.ut_line, tty_name, sizeof(ut.ut_line)); - #ifdef _HAVE_UT_TV /* in included by */ -- gettimeofday(&ut.ut_tv, NULL); -+ gettimeofday(&tv, NULL); -+ ut.ut_tv.tv_sec = tv.tv_sec; -+ ut.ut_tv.tv_usec = tv.tv_usec; - #else - { - time_t t; diff --git a/util-linux-2.13-losetup-all.patch b/util-linux-2.13-losetup-all.patch deleted file mode 100644 index bd12f2e..0000000 --- a/util-linux-2.13-losetup-all.patch +++ /dev/null @@ -1,160 +0,0 @@ ---- util-linux-2.13-pre6/mount/losetup.8.all 2006-10-12 10:34:47.000000000 +0200 -+++ util-linux-2.13-pre6/mount/losetup.8 2006-10-12 10:37:35.000000000 +0200 -@@ -9,6 +9,8 @@ - .B losetup - .I loop_device - .sp -+.B losetup -a -+.sp - .in -5 - Delete loop: - .sp -@@ -66,6 +68,8 @@ - .B \-e - option.) - .SH OPTIONS -+.IP \fB\-a\fP -+Show status of all loop devices. - .IP \fB\-d\fP - Detach the file or device associated with the specified loop device. - .IP "\fB\-E \fIencryption_type\fP" ---- util-linux-2.13-pre6/mount/lomount.c.all 2004-12-20 23:11:04.000000000 +0100 -+++ util-linux-2.13-pre6/mount/lomount.c 2006-10-12 10:29:55.000000000 +0200 -@@ -28,6 +28,8 @@ - extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ - extern void error (const char *fmt, ...); /* idem */ - -+#define SIZE(a) (sizeof(a)/sizeof(a[0])) -+ - #ifdef LOOP_SET_FD - - static int -@@ -128,6 +130,42 @@ - close (fd); - return 1; - } -+ -+static int -+show_used_loop_devices (void) { -+ char dev[20]; -+ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; -+ int i, j, fd, permission = 0, somedev = 0; -+ struct stat statbuf; -+ struct loop_info loopinfo; -+ -+ for (j = 0; j < SIZE(loop_formats); j++) { -+ for(i = 0; i < 256; i++) { -+ sprintf(dev, loop_formats[j], i); -+ if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { -+ somedev++; -+ fd = open (dev, O_RDONLY); -+ if (fd >= 0) { -+ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0) -+ show_loop(dev); -+ close (fd); -+ somedev++; -+ } else if (errno == EACCES) -+ permission++; -+ continue; /* continue trying as long as devices exist */ -+ } -+ break; -+ } -+ } -+ -+ if (somedev==0 && permission) { -+ error(_("%s: no permission to look at /dev/loop#"), progname); -+ return 1; -+ } -+ return 0; -+} -+ -+ - #endif - - int -@@ -139,8 +177,6 @@ - major(statbuf.st_rdev) == LOOPMAJOR); - } - --#define SIZE(a) (sizeof(a)/sizeof(a[0])) -- - char * - find_unused_loop_device (void) { - /* Just creating a device, say in /tmp, is probably a bad idea - -@@ -403,12 +439,13 @@ - - static void - usage(void) { -- fprintf(stderr, _("usage:\n\ -- %s loop_device # give info\n\ -- %s -d loop_device # delete\n\ -- %s -f # find unused\n\ -- %s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), -- progname, progname, progname, progname); -+ fprintf(stderr, _("usage:\n" -+ " %1$s loop_device # give info\n" -+ " %1$s -d loop_device # delete\n" -+ " %1$s -f # find unused\n" -+ " %1$s -a # list all used\n" -+ " %1$s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), -+ progname); - exit(1); - } - -@@ -442,7 +479,7 @@ - int - main(int argc, char **argv) { - char *p, *offset, *encryption, *passfd, *device, *file; -- int delete, find, c; -+ int delete, find, c, all; - int res = 0; - int ro = 0; - int pfd = -1; -@@ -452,7 +489,7 @@ - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -- delete = find = 0; -+ delete = find = all = 0; - off = 0; - offset = encryption = passfd = NULL; - -@@ -460,8 +497,11 @@ - if ((p = strrchr(progname, '/')) != NULL) - progname = p+1; - -- while ((c = getopt(argc, argv, "de:E:fo:p:v")) != -1) { -+ while ((c = getopt(argc, argv, "ade:E:fo:p:v")) != -1) { - switch (c) { -+ case 'a': -+ all = 1; -+ break; - case 'd': - delete = 1; - break; -@@ -489,17 +529,22 @@ - if (argc == 1) { - usage(); - } else if (delete) { -- if (argc != optind+1 || encryption || offset || find) -+ if (argc != optind+1 || encryption || offset || find || all) - usage(); - } else if (find) { -- if (argc < optind || argc > optind+1) -+ if (all || argc < optind || argc > optind+1) -+ usage(); -+ } else if (all) { -+ if (argc > 2) - usage(); - } else { - if (argc < optind+1 || argc > optind+2) - usage(); - } - -- if (find) { -+ if (all) -+ return show_used_loop_devices(); -+ else if (find) { - device = find_unused_loop_device(); - if (device == NULL) - return -1; diff --git a/util-linux-2.13-losetup-deprecated.patch b/util-linux-2.13-losetup-deprecated.patch deleted file mode 100644 index 73e45c0..0000000 --- a/util-linux-2.13-losetup-deprecated.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- util-linux-2.13-pre6/mount/losetup.8.kzak 2006-10-12 10:39:39.000000000 +0200 -+++ util-linux-2.13-pre6/mount/losetup.8 2006-10-12 10:40:04.000000000 +0200 -@@ -133,6 +133,10 @@ - .fi - .SH RESTRICTION - DES encryption is painfully slow. On the other hand, XOR is terribly weak. -+ -+Cryptoloop is deprecated and unmaintained in 2.6 kernels. Use dm-crypt. For -+more details see -+.B cryptsetup(8). - .\" .SH AUTHORS - .\" .nf - .\" Original version: Theodore Ts'o diff --git a/util-linux-2.13-losetup-rdonly.patch b/util-linux-2.13-losetup-rdonly.patch deleted file mode 100644 index 19e9f13..0000000 --- a/util-linux-2.13-losetup-rdonly.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- util-linux-2.13-pre6/mount/lomount.c.ronly 2006-11-01 14:14:14.000000000 +0100 -+++ util-linux-2.13-pre6/mount/lomount.c 2006-11-01 15:01:52.000000000 +0100 -@@ -444,7 +444,8 @@ - " %1$s -d loop_device # delete\n" - " %1$s -f # find unused\n" - " %1$s -a # list all used\n" -- " %1$s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"), -+ " %1$s -r # read-only loop\n" -+ " %1$s [-e encryption] [-o offset] [-r] {-f|loop_device} file # setup\n"), - progname); - exit(1); - } -@@ -497,11 +498,14 @@ - if ((p = strrchr(progname, '/')) != NULL) - progname = p+1; - -- while ((c = getopt(argc, argv, "ade:E:fo:p:v")) != -1) { -+ while ((c = getopt(argc, argv, "ade:E:fo:p:vr")) != -1) { - switch (c) { - case 'a': - all = 1; - break; -+ case 'r': -+ ro = 1; -+ break; - case 'd': - delete = 1; - break; ---- util-linux-2.13-pre6/mount/losetup.8.ronly 2006-11-01 14:49:14.000000000 +0100 -+++ util-linux-2.13-pre6/mount/losetup.8 2006-11-01 15:06:21.000000000 +0100 -@@ -35,6 +35,7 @@ - .IR offset ] - .RB [ \-p - .IR pfd ] -+.RB [ \-r ] - .in +8 - .RB { \-f | \fIloop_device\fP } - .I file -@@ -87,6 +88,8 @@ - Read the passphrase from file descriptor with number - .I num - instead of from the terminal. -+.IP \fB\-r\fP -+Setup read-only loop device. - .SH RETURN VALUE - .B losetup - returns 0 on success, nonzero on failure. When diff --git a/util-linux-2.13-mkdir_p.patch b/util-linux-2.13-mkdir_p.patch deleted file mode 100644 index eb8ed15..0000000 --- a/util-linux-2.13-mkdir_p.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- util-linux-2.13-pre7/po/Makefile.in.in.mkdir_p 2005-10-14 22:22:14.000000000 +0200 -+++ util-linux-2.13-pre7/po/Makefile.in.in 2006-12-17 00:06:29.000000000 +0100 -@@ -1,5 +1,5 @@ - # Makefile for PO directory in any package using GNU gettext. --# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper -+# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper - # - # This file can be copied and used freely without restrictions. It can - # be used in projects which are not available under the GNU General Public -@@ -8,7 +8,7 @@ - # Please note that the actual code of GNU gettext is covered by the GNU - # General Public License and is *not* in the public domain. - # --# Origin: gettext-0.14.4 -+# Origin: gettext-0.16 - - PACKAGE = @PACKAGE@ - VERSION = @VERSION@ -@@ -29,8 +29,18 @@ - - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ --MKINSTALLDIRS = @MKINSTALLDIRS@ --mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) -+ -+# We use $(mkdir_p). -+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as -+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, -+# @install_sh@ does not start with $(SHELL), so we add it. -+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined -+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake -+# versions, $(mkinstalldirs) and $(install_sh) are unused. -+mkinstalldirs = $(SHELL) @install_sh@ -d -+install_sh = $(SHELL) @install_sh@ -+MKDIR_P = @MKDIR_P@ -+mkdir_p = @mkdir_p@ - - GMSGFMT = @GMSGFMT@ - MSGFMT = @MSGFMT@ -@@ -158,7 +168,7 @@ - install-exec: - install-data: install-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ -- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ -+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ - for file in $(DISTFILES.common) Makevars.template; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ -@@ -171,13 +181,13 @@ - fi - install-data-no: all - install-data-yes: all -- $(mkinstalldirs) $(DESTDIR)$(datadir) -+ $(mkdir_p) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ -- $(mkinstalldirs) $(DESTDIR)$$dir; \ -+ $(mkdir_p) $(DESTDIR)$$dir; \ - if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ - $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ - echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ -@@ -217,19 +227,19 @@ - installdirs-exec: - installdirs-data: installdirs-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ -- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ -+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi - installdirs-data-no: - installdirs-data-yes: -- $(mkinstalldirs) $(DESTDIR)$(datadir) -+ $(mkdir_p) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ -- $(mkinstalldirs) $(DESTDIR)$$dir; \ -+ $(mkdir_p) $(DESTDIR)$$dir; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ -@@ -374,8 +384,7 @@ - - Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ - cd $(top_builddir) \ -- && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ -- $(SHELL) ./config.status -+ && $(SHELL) ./config.status $(subdir)/$@.in po-directories - - force: - diff --git a/util-linux-2.13-mkswap-mounted.patch b/util-linux-2.13-mkswap-mounted.patch deleted file mode 100644 index cc78b7d..0000000 --- a/util-linux-2.13-mkswap-mounted.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- util-linux-2.13-pre6/disk-utils/mkswap.c.kzak 2006-10-12 11:33:50.000000000 +0200 -+++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-10-12 11:36:08.000000000 +0200 -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - #include /* for _IO */ - #include - #include -@@ -485,6 +486,29 @@ - return (c >= '1' && c <= '9'); - } - -+ -+/* -+ * Check to make certain that our new filesystem won't be created on -+ * an already mounted partition. Code adapted from mke2fs, Copyright -+ * (C) 1994 Theodore Ts'o. Also licensed under GPL. -+ * (C) 2006 Karel Zak -- port to mkswap -+ */ -+static int -+check_mount(void) { -+ FILE * f; -+ struct mntent * mnt; -+ -+ if ((f = setmntent (MOUNTED, "r")) == NULL) -+ return 0; -+ while ((mnt = getmntent (f)) != NULL) -+ if (strcmp (device_name, mnt->mnt_fsname) == 0) -+ break; -+ endmntent (f); -+ if (!mnt) -+ return 0; -+ return 1; -+} -+ - int - main(int argc, char ** argv) { - struct stat statbuf; -@@ -648,8 +672,19 @@ - /* Want a block device. Probably not /dev/hda or /dev/hdb. */ - if (!S_ISBLK(statbuf.st_mode)) - check=0; -- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) -- die(_("Will not try to make swapdevice on '%s'")); -+ else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) { -+ fprintf(stderr, -+ _("%s: error: " -+ "will not try to make swapdevice on '%s'\n"), -+ program_name, device_name); -+ exit(1); -+ } else if (check_mount()) { -+ fprintf(stderr, -+ _("%s: error: " -+ "%s is mounted; will not make swapspace.\n"), -+ program_name, device_name); -+ exit(1); -+ } - - #ifdef __sparc__ - if (!force && version == 0) { diff --git a/util-linux-2.13-mkswap-selinux.patch b/util-linux-2.13-mkswap-selinux.patch deleted file mode 100644 index 2d89115..0000000 --- a/util-linux-2.13-mkswap-selinux.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- util-linux-2.13-pre6/disk-utils/mkswap.c.selinux 2005-08-14 17:34:49.000000000 +0200 -+++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-03-08 16:35:08.000000000 +0100 -@@ -39,6 +39,12 @@ - #include /* for _IO */ - #include - #include -+#include -+#ifdef HAVE_LIBSELINUX -+#include -+#include -+#endif -+ - #include "swapheader.h" - #include "xstrncpy.h" - #include "nls.h" -@@ -76,6 +82,8 @@ - - #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) - -+#define SELINUX_SWAPFILE_TYPE "swapfile_t" -+ - static int - linux_version_code(void) { - struct utsname my_utsname; -@@ -718,5 +726,39 @@ - if (fsync(DEV)) - die(_("fsync failed")); - #endif -+ -+#ifdef HAVE_LIBSELINUX -+ if (S_ISREG(statbuf.st_mode) && is_selinux_enabled()) { -+ security_context_t context_string; -+ security_context_t oldcontext; -+ context_t newcontext; -+ -+ if ((fgetfilecon(DEV, &oldcontext) < 0) && -+ (errno != ENODATA)) { -+ fprintf(stderr, _("%s: %s: unable to obtain selinux file label: %s\n"), -+ program_name, device_name, -+ strerror(errno)); -+ exit(1); -+ } -+ if (!(newcontext = context_new(oldcontext))) -+ die(_("unable to create new selinux context")); -+ if (context_type_set(newcontext, SELINUX_SWAPFILE_TYPE)) -+ die(_("couldn't compute selinux context")); -+ -+ context_string = context_str(newcontext); -+ -+ if (strcmp(context_string, oldcontext)!=0) { -+ if (fsetfilecon(DEV, context_string)) { -+ fprintf(stderr, _("%s: unable to relabel %s to %s: %s\n"), -+ program_name, device_name, -+ context_string, -+ strerror(errno)); -+ exit(1); -+ } -+ } -+ context_free(newcontext); -+ freecon(oldcontext); -+ } -+#endif - return 0; - } ---- util-linux-2.13-pre6/disk-utils/Makefile.am.selinux 2005-09-10 19:46:10.000000000 +0200 -+++ util-linux-2.13-pre6/disk-utils/Makefile.am 2006-03-08 16:27:03.000000000 +0100 -@@ -30,6 +30,13 @@ - mkfs_cramfs_LDADD = -lz $(top_srcdir)/lib/libmd5.a - endif - -+mkswap_LDADD = -+ - if HAVE_UUID --mkswap_LDADD = -luuid -+mkswap_LDADD += -luuid -+endif -+ -+if HAVE_SELINUX -+mkswap_LDADD += -lselinux - endif -+ diff --git a/util-linux-2.13-more-CLOEXEC.patch b/util-linux-2.13-more-CLOEXEC.patch deleted file mode 100644 index fe69e7a..0000000 --- a/util-linux-2.13-more-CLOEXEC.patch +++ /dev/null @@ -1,19 +0,0 @@ - -When you view a file with the more command and run a shell, the file descriptor -for reading the file is leaked to that process. - -To test, more any file. Then do !/bin/sh. At the prompt do "ls -l /proc/$$/fd" -and you'll see the leaked fd. - -From: Steve Grubb - ---- util-linux-2.13-pre7/text-utils/more.c.cloexec 2006-12-14 14:05:31.000000000 +0100 -+++ util-linux-2.13-pre7/text-utils/more.c 2006-12-14 14:04:57.000000000 +0100 -@@ -478,6 +478,7 @@ - } - if (magic(f, fs)) - return((FILE *)NULL); -+ fcntl(fileno(f), F_SETFD, FD_CLOEXEC ); - c = Getc(f); - *clearfirst = (c == '\f'); - Ungetc (c, f); diff --git a/util-linux-2.13-moretc.patch b/util-linux-2.13-moretc.patch deleted file mode 100644 index d30b625..0000000 --- a/util-linux-2.13-moretc.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- util-linux-2.13-pre2/text-utils/Makefile.am.moretc 2005-08-17 10:40:44.000000000 +0200 -+++ util-linux-2.13-pre2/text-utils/Makefile.am 2005-08-17 10:41:52.000000000 +0200 -@@ -7,16 +7,13 @@ - man_MANS = col.1 colcrt.1 colrm.1 column.1 hexdump.1 rev.1 line.1 tailf.1 - - if HAVE_NCURSES --bin_PROGRAMS = more - usrbinexec_PROGRAMS += ul pg --more_LDADD = -lncurses - pg_LDADD = -lncurses - ul_LDADD = -lncurses --man_MANS += ul.1 more.1 pg.1 --else -+man_MANS += ul.1 pg.1 -+endif - if HAVE_TERMCAP - bin_PROGRAMS = more - more_LDADD = -ltermcap - man_MANS += more.1 - endif --endif ---- util-linux-2.13-pre2/text-utils/more.c.moretc 2005-07-28 23:49:31.000000000 +0200 -+++ util-linux-2.13-pre2/text-utils/more.c 2005-08-17 10:40:23.000000000 +0200 -@@ -59,6 +59,8 @@ - #include "nls.h" - #include "widechar.h" - -+#include "../config.h" -+ - #define _REGEX_RE_COMP - #include - #undef _REGEX_RE_COMP -@@ -165,19 +167,60 @@ - } context, screen_start; - extern char PC; /* pad character */ - -+#ifdef HAVE_LIBTERMCAP -+ -+#include -+ -+char termbuffer[4096]; -+char tcbuffer[4096]; -+char *strbuf = termbuffer; -+ -+static void -+my_putstring(char *s) { -+ tputs (s, 1, putchar); -+} -+ -+static void -+my_setupterm(const char *term, int fildes, int *errret) { -+ *errret = tgetent(tcbuffer, term); -+} -+ -+static int -+my_tgetnum(char *s, char *ss) { -+ return tgetnum(s); -+} -+ -+static int -+my_tgetflag(char *s, char *ss) { -+ return tgetflag(s); -+} -+ -+static char * -+my_tgetstr(char *s, char *ss) { -+ return tgetstr(s, &strbuf); -+} -+ -+static char * -+my_tgoto(const char *cap, int col, int row) { -+ return tgoto(cap, col, row); -+} -+ -+#else /* !HAVE_TERMCAP */ -+ - #ifdef HAVE_NCURSES_H --#include -+# include -+# include - #elif defined(HAVE_NCURSES_NCURSES_H) --#include -+# include -+# include - #endif - --#include /* include after */ -- - static void - my_putstring(char *s) { - tputs (s, 1, putchar); /* putp(s); */ - } - -+ - static void - my_setupterm(const char *term, int fildes, int *errret) { - setupterm(term, fildes, errret); -@@ -203,6 +246,8 @@ - return tparm(cap, col, row); - } - -+#endif /* !HAVE_TERMCAP */ -+ - static void - idummy(int *kk) {} - diff --git a/util-linux-2.13-mount-comment.patch b/util-linux-2.13-mount-comment.patch deleted file mode 100644 index 04ef9ad..0000000 --- a/util-linux-2.13-mount-comment.patch +++ /dev/null @@ -1,14 +0,0 @@ - - The original MS_COMMENT is in conflict with MS_UNBINDABLE. - ---- util-linux-2.13-pre6/mount/mount.c.comment 2006-11-01 13:31:45.000000000 +0100 -+++ util-linux-2.13-pre6/mount/mount.c 2006-11-01 13:31:38.000000000 +0100 -@@ -106,7 +106,7 @@ - #define MS_OWNER 0x10000000 - #define MS_GROUP 0x08000000 - #define MS_PAMCONSOLE 0x04000000 --#define MS_COMMENT 0x00020000 -+#define MS_COMMENT 0x02000000 - #define MS_LOOP 0x00010000 - - diff --git a/util-linux-2.13-mount-context.patch b/util-linux-2.13-mount-context.patch deleted file mode 100644 index 09f9d79..0000000 --- a/util-linux-2.13-mount-context.patch +++ /dev/null @@ -1,218 +0,0 @@ ---- util-linux-2.13-pre6/mount/Makefile.am.context 2005-09-12 22:41:11.000000000 +0200 -+++ util-linux-2.13-pre6/mount/Makefile.am 2006-11-01 11:31:46.000000000 +0100 -@@ -37,6 +37,9 @@ - man_MANS += pivot_root.8 - endif - -+if HAVE_SELINUX -+mount_LDADD += -lselinux -+endif - - swapon.c: swapargs.h - ---- util-linux-2.13-pre6/mount/mount.c.context 2006-11-01 11:31:46.000000000 +0100 -+++ util-linux-2.13-pre6/mount/mount.c 2006-11-01 11:36:17.000000000 +0100 -@@ -21,6 +21,11 @@ - #include - #include - -+#ifdef HAVE_LIBSELINUX -+#include -+#include -+#endif -+ - #include "mount_blkid.h" - #include "mount_constants.h" - #include "sundries.h" -@@ -255,13 +260,79 @@ - free((void *) s); - } - -+#ifdef HAVE_LIBSELINUX -+/* strip quotes from a "string" -+ * Warning: This function modify the "str" argument. -+ */ -+static char * -+strip_quotes(char *str) -+{ -+ char *end = NULL; -+ -+ if (*str != '"') -+ return str; -+ -+ end = strrchr(str, '"'); -+ if (end == NULL || end == str) -+ die (EX_USAGE, _("mount: improperly quoted option string '%s'"), str); -+ -+ *end = '\0'; -+ return str+1; -+} -+ -+/* translates SELinux context from human to raw format and -+ * appends it to the mount extra options. -+ * -+ * returns -1 on error and 0 on success -+ */ -+static int -+append_context(const char *optname, char *optdata, char *extra_opts, int *len) -+{ -+ security_context_t raw = NULL; -+ char *data = NULL; -+ char *buf = NULL; -+ int bufsz; -+ -+ if (!is_selinux_enabled()) -+ /* ignore the option if we running without selinux */ -+ return 0; -+ -+ if (optdata==NULL || *optdata=='\0' || optname==NULL) -+ return -1; -+ -+ /* TODO: use strip_quotes() for all mount options? */ -+ data = *optdata =='"' ? strip_quotes(optdata) : optdata; -+ -+ if (selinux_trans_to_raw_context( -+ (security_context_t) data, &raw)==-1 || -+ raw==NULL) -+ return -1; -+ -+ if (verbose) -+ printf(_("mount: translated %s '%s' to '%s'\n"), -+ optname, data, (char *) raw); -+ -+ bufsz = strlen(optname) + strlen(raw) + 4; /* 4 is \0, '=' and 2x '"' */ -+ buf = xmalloc(bufsz); -+ -+ snprintf(buf, bufsz, "%s=\"%s\"", optname, (char *) raw); -+ freecon(raw); -+ -+ if ((*len -= bufsz-1) > 0) -+ strcat(extra_opts, buf); -+ -+ my_free(buf); -+ return 0; -+} -+#endif -+ - /* - * Look for OPT in opt_map table and return mask value. - * If OPT isn't found, tack it onto extra_opts (which is non-NULL). - * For the options uid= and gid= replace user or group name by its value. - */ - static inline void --parse_opt(const char *opt, int *mask, char *extra_opts, int len) { -+parse_opt(char *opt, int *mask, char *extra_opts, int len) { - const struct opt_map *om; - - for (om = opt_map; om->opt != NULL; om++) -@@ -313,7 +384,20 @@ - return; - } - } -- -+#ifdef HAVE_LIBSELINUX -+ if (strncmp(opt, "context=", 8)==0 && *(opt+8)) { -+ if (append_context("context", opt+8, extra_opts, &len)==0) -+ return; -+ } -+ if (strncmp(opt, "fscontext=", 10)==0 && *(opt+10)) { -+ if (append_context("fscontext", opt+10, extra_opts, &len)==0) -+ return; -+ } -+ if (strncmp(opt, "defcontext=", 11)==0 && *(opt+11)) { -+ if (append_context("defcontext", opt+11, extra_opts, &len)==0) -+ return; -+ } -+#endif - if ((len -= strlen(opt)) > 0) - strcat(extra_opts, opt); - } -@@ -329,16 +413,29 @@ - - if (options != NULL) { - char *opts = xstrdup(options); -- char *opt; -- int len = strlen(opts) + 20; -+ int len = strlen(opts) + 256; -+ int open_quote = 0; -+ char *opt, *p; - - *extra_opts = xmalloc(len); - **extra_opts = '\0'; - -- for (opt = strtok(opts, ","); opt; opt = strtok(NULL, ",")) -- if (!parse_string_opt(opt)) -- parse_opt(opt, flags, *extra_opts, len); -- -+ for (p=opts, opt=NULL; p && *p; p++) { -+ if (!opt) -+ opt = p; /* begin of the option item */ -+ if (*p == '"') -+ open_quote ^= 1; /* reverse the status */ -+ if (open_quote) -+ continue; /* still in quoted block */ -+ if (*p == ',') -+ *p = '\0'; /* terminate the option item */ -+ /* end of option item or last item */ -+ if (*p == '\0' || *(p+1) == '\0') { -+ if (!parse_string_opt(opt)) -+ parse_opt(opt, flags, *extra_opts, len); -+ opt = NULL; -+ } -+ } - free(opts); - } - ---- util-linux-2.13-pre6/mount/mount.8.context 2006-11-01 11:31:46.000000000 +0100 -+++ util-linux-2.13-pre6/mount/mount.8 2006-11-01 11:31:46.000000000 +0100 -@@ -660,6 +660,50 @@ - .BR noexec ", " nosuid ", and " nodev - (unless overridden by subsequent options, as in the option line - .BR users,exec,dev,suid ). -+.TP -+\fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP and \fBdefcontext=\fP\fIcontext\fP -+The -+.BR context= -+option is useful when mounting filesystems that do not support -+extended attributes, such as a floppy or hard disk formatted with VFAT, or -+systems that are not normally running under SELinux, such as an ext3 formatted -+disk from a non-SELinux workstation. You can also use -+.BR context= -+on filesystems you do not trust, such as a floppy. It also helps in compatibility with -+xattr-supporting filesystems on earlier 2.4. kernel versions. Even where -+xattrs are supported, you can save time not having to label every file by -+assigning the entire disk one security context. -+ -+A commonly used option for removable media is -+.BR context=system_u:object_r:removable_t . -+ -+Two other options are -+.BR fscontext= -+and -+.BR defcontext= , -+both of which are mutually exclusive of the context option. This means you -+can use fscontext and defcontext with each other, but neither can be used with -+context. -+ -+The -+.BR fscontext= -+option works for all filesystems, regardless of their xattr -+support. The fscontext option sets the overarching filesystem label to a -+specific security context. This filesystem label is separate from the -+individual labels on the files. It represents the entire filesystem for -+certain kinds of permission checks, such as during mount or file creation. -+Individual file labels are still obtained from the xattrs on the files -+themselves. The context option actually sets the aggregate context that -+fscontext provides, in addition to supplying the same label for individual -+files. -+ -+You can set the default security context for unlabeled files using -+.BR defcontext= -+option. This overrides the value set for unlabeled files in the policy and requires a -+file system that supports xattr labeling. -+ -+For more details see -+.BR selinux (8) - .RE - .TP - .B \-\-bind diff --git a/util-linux-2.13-mount-fake.patch b/util-linux-2.13-mount-fake.patch deleted file mode 100644 index 627b1e2..0000000 --- a/util-linux-2.13-mount-fake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.13-pre7/mount/mount.c.kzak 2007-02-09 12:54:20.000000000 +0100 -+++ util-linux-2.13-pre7/mount/mount.c 2007-02-09 12:54:14.000000000 +0100 -@@ -602,6 +602,8 @@ - mountargs[i++] = node; - if (sloppy && (strcmp(type, "nfs")==0 || strcmp(type, "nfs4")==0)) - mountargs[i++] = "-s"; -+ if (fake) -+ mountargs[i++] = "-f"; - if (nomtab) - mountargs[i++] = "-n"; - if (verbose) diff --git a/util-linux-2.13-mount-loop.patch b/util-linux-2.13-mount-loop.patch deleted file mode 100644 index 27db35c..0000000 --- a/util-linux-2.13-mount-loop.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 2e039577c5eb895fab35aed136345a0c07d7a587 -Author: Karel Zak -Date: Mon Jul 2 23:35:08 2007 +0200 - - mount: use loop= option when mounting by /sbin/mount. - - The mount(8) calls external mount programs (/sbin/mount.) - without the loop=/dev/loopN option. This patch fix this bug. - - Signed-off-by: Karel Zak - -diff --git a/mount/mount.c b/mount/mount.c -index c27c5e5..50089a9 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -1057,6 +1057,9 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - goto out; - } - -+ if (loop) -+ opt_loopdev = loopdev; -+ - /* - * Call mount.TYPE for types that require a separate mount program. - * For the moment these types are ncpfs and smbfs. Maybe also vxfs. -@@ -1082,8 +1085,6 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - - if (fake || mnt5_res == 0) { - /* Mount succeeded, report this (if verbose) and write mtab entry. */ -- if (loop) -- opt_loopdev = loopdev; - - if (!(mounttype & MS_PROPAGATION)) { - update_mtab_entry(loop ? loopfile : spec, diff --git a/util-linux-2.13-mount-man-bugs.patch b/util-linux-2.13-mount-man-bugs.patch deleted file mode 100644 index 59f8c8f..0000000 --- a/util-linux-2.13-mount-man-bugs.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- util-linux-2.13-pre7/mount/mount.8.bugs 2006-03-30 21:36:56.000000000 +0200 -+++ util-linux-2.13-pre7/mount/mount.8 2006-03-30 21:37:35.000000000 +0200 -@@ -2047,6 +2047,23 @@ - .IR /proc/partitions . - In particular, it may well fail if the kernel was compiled with devfs - but devfs is not mounted. -+.PP -+It is possible that files -+.IR /etc/mtab -+and -+.IR /proc/mounts -+don't match. The first file is based only on the mount command options, but the -+content of the second file also depends on the kernel and others settings (e.g. -+remote NFS server. In particular case the mount command may reports unreliable -+information about a NFS mount point and the /proc/mounts file usually contains -+more reliable information.) -+.PP -+Checking files on NFS filesystem referenced by file descriptors (i.e. the -+.BR fcntl -+and -+.BR ioctl -+families of functions) may lead to inconsistent result due to the lack of -+consistency check in kernel even if noac is used. - .SH HISTORY - A - .B mount diff --git a/util-linux-2.13-mount-man-nfs.patch b/util-linux-2.13-mount-man-nfs.patch deleted file mode 100644 index 4c24f6c..0000000 --- a/util-linux-2.13-mount-man-nfs.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- util-linux-2.12p/mount/mount.8.nfsdoc 2005-05-10 11:46:25.119592000 -0400 -+++ util-linux-2.12p/mount/mount.8 2005-10-07 09:46:13.374277000 -0400 -@@ -1339,29 +1339,17 @@ For details, see - - Especially useful options include - .TP --.B rsize=8192,wsize=8192 --This will make your nfs connection faster than with the default --buffer size of 4096. (NFSv2 does not work with larger values of --.B rsize --and --.BR wsize .) --.TP --.B hard --The program accessing a file on a NFS mounted file system will hang --when the server crashes. The process cannot be interrupted or --killed unless you also specify --.BR intr . --When the NFS server is back online the program will continue undisturbed --from where it was. This is probably what you want. --.TP --.B soft --This option allows the kernel to time out if the nfs server is not --responding for some time. The time can be --specified with --.BR timeo=time . --This option might be useful if your nfs server sometimes doesn't respond --or will be rebooted while some process tries to get a file from the server. --Usually it just causes lots of trouble. -+.B rsize=32768,wsize=32768 -+This causes the NFS client to try to negotiate a buffer size -+up to the size specified. -+A large buffer size does improve performance, but both the -+server and client have to support it. -+In the case where one of these does not support the size specified, -+the size negotiated will be the largest that both support. -+.TP -+.B intr -+This will allow NFS operations (on hard mounts) to be -+interrupted while waiting for a response from the server. - .TP - .B nolock - Do not use locking. Do not start lockd. -@@ -1408,30 +1396,16 @@ For details, see - Especially useful options include - .TP - .B rsize=32768,wsize=32768 --This will make your NFS connection faster than with the default --buffer size of 4096. --.TP --.B hard --The program accessing a file on a NFS mounted file system will hang --when the server crashes. The process cannot be interrupted or --killed unless you also specify --.BR intr . --When the NFS server is back online the program will continue undisturbed --from where it was. This is probably what you want. --.TP --.B soft --This option allows the kernel to time out if the NFS server is not --responding for some time. The time can be --specified with --.BR timeo=time . --This timeout value is expressed in tenths of a second. --The --.BR soft --option might be useful if your NFS server sometimes doesn't respond --or will be rebooted while some process tries to get a file from the server. --Avoid using this option with --.BR proto=udp --or with a short timeout. -+This causes the NFS4 client to try to negotiate a buffer size -+up to the size specified. -+A large buffer size does improve performance, but both the -+server and client have to support it. -+In the case where one of these does not support the size specified, -+the size negotiated will be the largest that both support. -+.TP -+.B intr -+This will allow NFS4 operations (on hard mounts) to be -+interrupted while waiting for a response from the server. - - .SH "Mount options for ntfs" - .TP diff --git a/util-linux-2.13-mount-man-nfs4.patch b/util-linux-2.13-mount-man-nfs4.patch deleted file mode 100644 index 07d4811..0000000 --- a/util-linux-2.13-mount-man-nfs4.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- util-linux-2.13-pre7/mount/mount.8.man-nfs4 2006-03-06 00:04:37.000000000 +0100 -+++ util-linux-2.13-pre7/mount/mount.8 2006-12-14 00:30:33.000000000 +0100 -@@ -385,6 +385,7 @@ - .IR msdos , - .IR ncpfs , - .IR nfs , -+.IR nfs4 , - .IR ntfs , - .IR proc , - .IR qnx4 , -@@ -422,7 +423,7 @@ - program has to do is issue a simple - .IR mount (2) - system call, and no detailed knowledge of the filesystem type is required. --For a few types however (like nfs, cifs, smbfs, ncpfs) ad hoc code is -+For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is - necessary. The nfs ad hoc code is built in, but cifs, smbfs, and ncpfs - have a separate mount program. In order to make it possible to - treat all types in a uniform way, mount will execute the program -@@ -450,9 +451,10 @@ - All of the filesystem types listed there will be tried, - except for those that are labeled "nodev" (e.g., - .IR devpts , --.I proc -+.IR proc , -+.IR nfs , - and --.IR nfs ). -+.IR nfs4 ). - If - .I /etc/filesystems - ends in a line with a single * only, mount will read -@@ -1368,6 +1370,73 @@ - .B nolock - Do not use locking. Do not start lockd. - -+.SH "Mount options for nfs4" -+Instead of a textual option string, parsed by the kernel, the -+.I nfs4 -+file system expects a binary argument of type -+.IR "struct nfs4_mount_data" . -+The program -+.B mount -+itself parses the following options of the form `tag=value', -+and puts them in the structure mentioned: -+.BI rsize= n, -+.BI wsize= n, -+.BI timeo= n, -+.BI retrans= n, -+.BI acregmin= n, -+.BI acregmax= n, -+.BI acdirmin= n, -+.BI acdirmax= n, -+.BI actimeo= n, -+.BI retry= n, -+.BI port= n, -+.BI proto= n, -+.BI clientaddr= n, -+.BI sec= n. -+The option -+.BI addr= n -+is accepted but ignored. -+Also the following Boolean options, possibly preceded by -+.B no -+are recognized: -+.BR bg , -+.BR fg , -+.BR soft , -+.BR hard , -+.BR intr , -+.BR cto , -+.BR ac , -+For details, see -+.BR nfs (5). -+ -+Especially useful options include -+.TP -+.B rsize=32768,wsize=32768 -+This will make your NFS connection faster than with the default -+buffer size of 4096. -+.TP -+.B hard -+The program accessing a file on a NFS mounted file system will hang -+when the server crashes. The process cannot be interrupted or -+killed unless you also specify -+.BR intr . -+When the NFS server is back online the program will continue undisturbed -+from where it was. This is probably what you want. -+.TP -+.B soft -+This option allows the kernel to time out if the NFS server is not -+responding for some time. The time can be -+specified with -+.BR timeo=time . -+This timeout value is expressed in tenths of a second. -+The -+.BR soft -+option might be useful if your NFS server sometimes doesn't respond -+or will be rebooted while some process tries to get a file from the server. -+Avoid using this option with -+.BR proto=udp -+or with a short timeout. -+ - .SH "Mount options for ntfs" - .TP - .BI iocharset= name diff --git a/util-linux-2.13-mount-move.patch b/util-linux-2.13-mount-move.patch deleted file mode 100644 index c7d1c77..0000000 --- a/util-linux-2.13-mount-move.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- util-linux-2.13-pre6/mount/mount.c.move 2006-06-12 09:19:43.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-06-12 09:45:05.000000000 +0200 -@@ -768,6 +768,25 @@ - else { - mntFILE *mfp; - -+ /* when moving a mount point, we have to make sure the mtab -+ * gets updated properly. We get info about the old mount -+ * point, copy it to the new mount point, and then delete -+ * the old mount point. */ -+ if (flags & MS_MOVE) { -+ const char *olddir = mnt.mnt_fsname; -+ struct mntentchn *oldmc = oldmc = getmntfile(olddir); -+ if (oldmc != NULL) { -+ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname); -+ mnt.mnt_type = oldmc->m.mnt_type; -+ mnt.mnt_opts = oldmc->m.mnt_opts; -+ mnt.mnt_freq = oldmc->m.mnt_freq; -+ mnt.mnt_passno = oldmc->m.mnt_passno; -+ } -+ update_mtab(olddir, NULL); -+ if (oldmc != NULL) -+ my_free(olddir); -+ } -+ - lock_mtab(); - mfp = my_setmntent(MOUNTED, "a+"); - if (mfp == NULL || mfp->mntent_fp == NULL) { diff --git a/util-linux-2.13-mount-nonfs.patch b/util-linux-2.13-mount-nonfs.patch deleted file mode 100644 index e2ccb2b..0000000 --- a/util-linux-2.13-mount-nonfs.patch +++ /dev/null @@ -1,196 +0,0 @@ ---- util-linux-2.13-pre6/mount/Makefile.am.nonfs 2006-09-20 12:45:50.000000000 +0200 -+++ util-linux-2.13-pre6/mount/Makefile.am 2006-09-20 12:46:51.000000000 +0200 -@@ -1,15 +1,12 @@ - include $(top_srcdir)/config/include-Makefile.am - --AM_CPPFLAGS += -DHAVE_NFS -- - bin_PROGRAMS = mount umount - sbin_PROGRAMS = losetup swapon --man_MANS = fstab.5 nfs.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 -+man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - - mount_SOURCES = mount.c fstab.c sundries.c xmalloc.c realpath.c mntent.c \ - get_label_uuid.c mount_by_label.c mount_blkid.c mount_guess_fstype.c \ - getusername.c \ -- nfsmount.c nfsmount_xdr.c nfsmount_clnt.c \ - lomount.c - - mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a ---- util-linux-2.13-pre6/mount/sundries.c.nonfs 2006-09-20 12:53:09.000000000 +0200 -+++ util-linux-2.13-pre6/mount/sundries.c 2006-09-20 12:53:13.000000000 +0200 -@@ -15,7 +15,6 @@ - #include "fstab.h" - #include "sundries.h" - #include "realpath.h" --#include "nfsmount.h" - #include "nls.h" - - char * ---- util-linux-2.13-pre6/mount/umount.c.nonfs 2006-09-20 12:51:11.000000000 +0200 -+++ util-linux-2.13-pre6/mount/umount.c 2006-09-20 12:52:26.000000000 +0200 -@@ -20,15 +20,6 @@ - #include "env.h" - #include "nls.h" - --#include --#include --#include --#include --#include --#include --#include "nfsmount.h" --#include -- - #if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) - /* Interesting ... it seems libc knows about MNT_FORCE and presumably - about umount2 as well -- need not do anything */ -@@ -144,98 +135,6 @@ - return 0; - } - --static int xdr_dir(XDR *xdrsp, char *dirp) --{ -- return (xdr_string(xdrsp, &dirp, MNTPATHLEN)); --} -- --static int --nfs_umount_rpc_call(const char *spec, const char *opts) --{ -- register CLIENT *clp; -- struct sockaddr_in saddr; -- struct timeval pertry, try; -- enum clnt_stat clnt_stat; -- int port = 0; -- int so = RPC_ANYSOCK; -- struct hostent *hostp; -- char *hostname; -- char *dirname; -- char *p; -- -- if (spec == NULL || (p = strchr(spec,':')) == NULL) -- return 0; -- hostname = xstrndup(spec, p-spec); -- dirname = xstrdup(p+1); --#ifdef DEBUG -- printf(_("host: %s, directory: %s\n"), hostname, dirname); --#endif -- -- if (opts && (p = strstr(opts, "addr="))) { -- char *q; -- -- free(hostname); -- p += 5; -- q = p; -- while (*q && *q != ',') q++; -- hostname = xstrndup(p,q-p); -- } -- -- if (opts && (p = strstr(opts, "mountport=")) && isdigit(*(p+10))) -- port = atoi(p+10); -- -- if (hostname[0] >= '0' && hostname[0] <= '9') -- saddr.sin_addr.s_addr = inet_addr(hostname); -- else { -- if ((hostp = gethostbyname(hostname)) == NULL) { -- fprintf(stderr, _("umount: can't get address for %s\n"), -- hostname); -- return 1; -- } -- if (hostp->h_length > sizeof(struct in_addr)) { -- fprintf(stderr, _("umount: got bad hostp->h_length\n")); -- hostp->h_length = sizeof(struct in_addr); -- } -- memcpy(&saddr.sin_addr, hostp->h_addr, hostp->h_length); -- } -- -- saddr.sin_family = AF_INET; -- saddr.sin_port = htons(port); -- pertry.tv_sec = 3; -- pertry.tv_usec = 0; -- if (opts && (p = strstr(opts, "tcp"))) { -- /* possibly: make sure option is not "notcp" -- possibly: try udp if tcp fails */ -- if ((clp = clnttcp_create(&saddr, MOUNTPROG, MOUNTVERS, -- &so, 0, 0)) == NULL) { -- clnt_pcreateerror("Cannot MOUNTPROG RPC (tcp)"); -- return 1; -- } -- } else { -- if ((clp = clntudp_create(&saddr, MOUNTPROG, MOUNTVERS, -- pertry, &so)) == NULL) { -- clnt_pcreateerror("Cannot MOUNTPROG RPC"); -- return 1; -- } -- } -- clp->cl_auth = authunix_create_default(); -- try.tv_sec = 20; -- try.tv_usec = 0; -- clnt_stat = clnt_call(clp, MOUNTPROC_UMNT, -- (xdrproc_t) xdr_dir, dirname, -- (xdrproc_t) xdr_void, (caddr_t) 0, -- try); -- -- if (clnt_stat != RPC_SUCCESS) { -- clnt_perror(clp, "Bad UMNT RPC"); -- return 1; -- } -- auth_destroy(clp->cl_auth); -- clnt_destroy(clp); -- -- return 0; --} -- - /* complain about a failed umount */ - static void complain(int err, const char *dev) { - switch (err) { -@@ -289,11 +188,6 @@ - if (check_special_umountprog(spec, node, type, &status)) - return status; - -- /* Ignore any RPC errors, so that you can umount the filesystem -- if the server is down. */ -- if (strcasecmp(type, "nfs") == 0) -- nfs_umount_rpc_call(spec, opts); -- - umnt_err = umnt_err2 = 0; - if (lazy) { - res = umount2 (node, MNT_DETACH); ---- util-linux-2.13-pre6/mount/mount.c.nonfs 2006-09-20 12:48:48.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-09-20 12:48:33.000000000 +0200 -@@ -966,19 +966,6 @@ - goto out; - } - -- /* -- * Also nfs requires a separate program, but it is built in. -- */ -- if (!fake && types && streq (types, "nfs")) { --retry_nfs: -- mnt_err = nfsmount (spec, node, &flags, &extra_opts, &mount_opts, -- &nfs_mount_version, bg); -- if (mnt_err) { -- res = mnt_err; -- goto out; -- } -- } -- - block_signals (SIG_BLOCK); - - if (!fake) { -@@ -1018,15 +1005,6 @@ - - block_signals (SIG_UNBLOCK); - -- if (mnt_err && types && streq (types, "nfs")) { -- if (nfs_mount_version == 4 && mnt_err != EBUSY && mnt_err != ENOENT) { -- if (verbose) -- printf(_("mount: failed with nfs mount version 4, trying 3..\n")); -- nfs_mount_version = 3; -- goto retry_nfs; -- } -- } -- - /* Mount failed, complain, but don't die. */ - - if (types == 0) { diff --git a/util-linux-2.13-mount-relatime.patch b/util-linux-2.13-mount-relatime.patch deleted file mode 100644 index edae73b..0000000 --- a/util-linux-2.13-mount-relatime.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- util-linux-2.13-pre7/mount/mount_constants.h.kzak 2007-08-08 16:48:29.000000000 +0200 -+++ util-linux-2.13-pre7/mount/mount_constants.h 2007-08-08 16:48:30.000000000 +0200 -@@ -57,6 +57,10 @@ - #ifndef MS_VERBOSE - #define MS_VERBOSE 0x8000 /* 32768 */ - #endif -+#ifndef MS_RELATIME -+#define MS_RELATIME 0x200000 /* 200000: Update access times relative -+ to mtime/ctime */ -+#endif - #ifndef MS_UNBINDABLE - #define MS_UNBINDABLE (1<<17) /* 131072 unbindable*/ - #endif ---- util-linux-2.13-pre7/mount/mount.8.kzak 2007-08-08 16:48:29.000000000 +0200 -+++ util-linux-2.13-pre7/mount/mount.8 2007-08-08 16:48:30.000000000 +0200 -@@ -623,6 +623,13 @@ - .B nodiratime - Do not update directory inode access times on this filesystem. - .TP -+.B relatime -+Update inode access times relative to modify or change time. Access -+time is only updated if the previous access time was earlier than the -+current modify or change time. (Similar to noatime, but doesn't break -+mutt or other applications that need to know if a file has been read -+since the last time it was modified.) -+.TP - .B noauto - Can only be mounted explicitly (i.e., the - .B \-a ---- util-linux-2.13-pre7/mount/mount.c.kzak 2007-08-08 16:48:30.000000000 +0200 -+++ util-linux-2.13-pre7/mount/mount.c 2007-08-08 16:53:02.000000000 +0200 -@@ -177,6 +177,12 @@ - { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */ - { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */ - #endif -+#ifdef MS_RELATIME -+ { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to -+ mtime/ctime */ -+ { "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 */ - { NULL, 0, 0, 0 } diff --git a/util-linux-2.13-mount-sloppy.patch b/util-linux-2.13-mount-sloppy.patch deleted file mode 100644 index 43b985c..0000000 --- a/util-linux-2.13-mount-sloppy.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- util-linux-2.13-pre6/mount/mount.c.sloppy 2006-09-15 08:39:53.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 08:43:24.000000000 +0200 -@@ -554,7 +554,7 @@ - if (stat(mountprog, &statbuf) == 0) { - res = fork(); - if (res == 0) { -- char *oo, *mountargs[10]; -+ char *oo, *mountargs[11]; - int i = 0; - - setuid(getuid()); -@@ -563,6 +563,8 @@ - mountargs[i++] = mountprog; - mountargs[i++] = spec; - mountargs[i++] = node; -+ if (sloppy && (strcmp(type, "nfs")==0 || strcmp(type, "nfs4")==0)) -+ mountargs[i++] = "-s"; - if (nomtab) - mountargs[i++] = "-n"; - if (verbose) diff --git a/util-linux-2.13-mount-subtree.patch b/util-linux-2.13-mount-subtree.patch deleted file mode 100644 index b16ae99..0000000 --- a/util-linux-2.13-mount-subtree.patch +++ /dev/null @@ -1,187 +0,0 @@ ---- util-linux-2.13-pre6/mount/mount.8.subtree 2006-06-12 09:18:26.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.8 2006-06-12 09:19:43.000000000 +0200 -@@ -131,6 +131,41 @@ - .B "mount --move olddir newdir" - .RE - -+Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared, -+private, slave or unbindable. A shared mount provides ability to create mirrors -+of that mount such that mounts and umounts within any of the mirrors propagate -+to the other mirror. A slave mount receives propagation from its master, but -+any not vice-versa. A private mount carries no propagation abilities. A -+unbindable mount is a private mount which cannot cloned through a bind -+operation. Detailed semantics is documented in Documentation/sharedsubtree.txt -+file in the kernel source tree. -+.RS -+.br -+.B "mount --make-shared mountpoint" -+.br -+.B "mount --make-slave mountpoint" -+.br -+.B "mount --make-private mountpoint" -+.br -+.B "mount --make-unbindable mountpoint" -+.br -+.RE -+ -+The following commands allows one to recursively change the type of all the -+mounts under a given mountpoint. -+.RS -+.br -+.B "mount --make-rshared mountpoint" -+.br -+.B "mount --make-rslave mountpoint" -+.br -+.B "mount --make-rprivate mountpoint" -+.br -+.B -+"mount --make-runbindable mountpoint" -+.br -+.RE -+ - The - .I proc - file system is not associated with a special device, and when ---- util-linux-2.13-pre6/mount/mount_constants.h.subtree 2002-11-01 01:24:36.000000000 +0100 -+++ util-linux-2.13-pre6/mount/mount_constants.h 2006-06-12 09:19:43.000000000 +0200 -@@ -57,6 +57,18 @@ - #ifndef MS_VERBOSE - #define MS_VERBOSE 0x8000 /* 32768 */ - #endif -+#ifndef MS_UNBINDABLE -+#define MS_UNBINDABLE (1<<17) /* 131072 unbindable*/ -+#endif -+#ifndef MS_PRIVATE -+#define MS_PRIVATE (1<<18) /* 262144 Private*/ -+#endif -+#ifndef MS_SLAVE -+#define MS_SLAVE (1<<19) /* 524288 Slave*/ -+#endif -+#ifndef MS_SHARED -+#define MS_SHARED (1<<20) /* 1048576 Shared*/ -+#endif - /* - * Magic mount flag number. Had to be or-ed to the flag values. - */ ---- util-linux-2.13-pre6/mount/mount.c.subtree 2006-06-12 09:18:26.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-06-12 09:19:43.000000000 +0200 -@@ -74,7 +74,9 @@ - /* Add volumelabel in a listing of mounted devices (-l). */ - static int list_with_volumelabel = 0; - --/* Nonzero for mount {--bind|--replace|--before|--after|--over|--move} */ -+/* Nonzero for mount {--bind|--replace|--before|--after|--over|--move| -+ * make-shared|make-private|make-unbindable|make-slave} -+ */ - static int mounttype = 0; - - /* True if ruid != euid. */ -@@ -109,6 +111,8 @@ - /* Options that we keep from appearing in the options field in the mtab. */ - #define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER|MS_PAMCONSOLE) - -+#define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE) -+ - /* Options that we make ordinary users have by default. */ - #define MS_SECURE (MS_NOEXEC|MS_NOSUID|MS_NODEV) - -@@ -346,6 +350,9 @@ - *flags |= MS_RDONLY; - if (readwrite) - *flags &= ~MS_RDONLY; -+ -+ if (mounttype & MS_PROPAGATION) -+ *flags &= ~MS_BIND; - *flags |= mounttype; - } - -@@ -916,13 +923,15 @@ - if (loop) - opt_loopdev = loopdev; - -- update_mtab_entry(loop ? loopfile : spec, -+ if (!(mounttype & MS_PROPAGATION)) { -+ update_mtab_entry(loop ? loopfile : spec, - node, - types ? types : "unknown", - fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user), - flags, - freq, - pass); -+ } - - block_signals (SIG_UNBLOCK); - res = 0; -@@ -1461,6 +1470,14 @@ - { "move", 0, 0, 133 }, - { "guess-fstype", 1, 0, 134 }, - { "rbind", 0, 0, 135 }, -+ { "make-shared", 0, 0, 136 }, -+ { "make-slave", 0, 0, 137 }, -+ { "make-private", 0, 0, 138 }, -+ { "make-unbindable", 0, 0, 139 }, -+ { "make-rshared", 0, 0, 140 }, -+ { "make-rslave", 0, 0, 141 }, -+ { "make-rprivate", 0, 0, 142 }, -+ { "make-runbindable", 0, 0, 143 }, - { "internal-only", 0, 0, 'i' }, - { NULL, 0, 0, 0 } - }; -@@ -1487,6 +1504,17 @@ - " mount --bind olddir newdir\n" - "or move a subtree:\n" - " mount --move olddir newdir\n" -+ "One can change the type of mount containing the directory dir:\n" -+ " mount --make-shared dir\n" -+ " mount --make-slave dir\n" -+ " mount --make-private dir\n" -+ " mount --make-unbindable dir\n" -+ "One can change the type of all the mounts in a mount subtree\n" -+ "containing the directory dir:\n" -+ " mount --make-rshared dir\n" -+ " mount --make-rslave dir\n" -+ " mount --make-rprivate dir\n" -+ " mount --make-runbindable dir\n" - "A device can be given by name, say /dev/hda1 or /dev/cdrom,\n" - "or by label, using -L label or by uuid, using -U uuid .\n" - "Other options: [-nfFrsvw] [-o options] [-p passwdfd].\n" -@@ -1638,6 +1666,39 @@ - case 135: - mounttype = (MS_BIND | MS_REC); - break; -+ -+ case 136: -+ mounttype = MS_SHARED; -+ break; -+ -+ case 137: -+ mounttype = MS_SLAVE; -+ break; -+ -+ case 138: -+ mounttype = MS_PRIVATE; -+ break; -+ -+ case 139: -+ mounttype = MS_UNBINDABLE; -+ break; -+ -+ case 140: -+ mounttype = (MS_SHARED | MS_REC); -+ break; -+ -+ case 141: -+ mounttype = (MS_SLAVE | MS_REC); -+ break; -+ -+ case 142: -+ mounttype = (MS_PRIVATE | MS_REC); -+ break; -+ -+ case 143: -+ mounttype = (MS_UNBINDABLE | MS_REC); -+ break; -+ - case '?': - default: - usage (stderr, EX_USAGE); diff --git a/util-linux-2.13-mount-twiceloop.patch b/util-linux-2.13-mount-twiceloop.patch deleted file mode 100644 index f694bcf..0000000 --- a/util-linux-2.13-mount-twiceloop.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- util-linux-2.13-pre6/mount/fstab.h.twiceloop 2006-09-15 08:50:46.000000000 +0200 -+++ util-linux-2.13-pre6/mount/fstab.h 2006-09-15 08:51:10.000000000 +0200 -@@ -2,6 +2,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-2.13-pre6/mount/mount.c.twiceloop 2006-09-15 08:50:23.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 08:50:24.000000000 +0200 -@@ -671,7 +671,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; - -@@ -709,6 +709,11 @@ - } else { - int loopro = (*flags & MS_RDONLY); - -+ if (is_mounted_same_loopfile(*loopfile, dir)) { -+ error(_("mount: %s already mounted on %s"), *loopfile, dir); -+ return EX_FAIL; -+ } -+ - if (!*loopdev || !**loopdev) - *loopdev = find_unused_loop_device(); - if (!*loopdev) -@@ -856,7 +861,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; - } ---- util-linux-2.13-pre6/mount/fstab.c.twiceloop 2006-09-15 08:50:23.000000000 +0200 -+++ util-linux-2.13-pre6/mount/fstab.c 2006-09-15 08:50:24.000000000 +0200 -@@ -254,6 +254,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) { diff --git a/util-linux-2.13-mount-uhelper.patch b/util-linux-2.13-mount-uhelper.patch deleted file mode 100644 index 0dbda6c..0000000 --- a/util-linux-2.13-mount-uhelper.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- util-linux-2.13-pre6/mount/mount.c.uhelper 2006-09-15 13:23:23.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 13:23:23.000000000 +0200 -@@ -183,7 +183,7 @@ - }; - - static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, -- *opt_speed, *opt_comment; -+ *opt_speed, *opt_comment, *opt_uhelper; - - static struct string_opt_map { - char *tag; -@@ -196,6 +196,7 @@ - { "encryption=", 0, &opt_encryption }, - { "speed=", 0, &opt_speed }, - { "comment=", 1, &opt_comment }, -+ { "uhelper=", 0, &opt_uhelper }, - { NULL, 0, NULL } - }; - ---- util-linux-2.13-pre6/mount/umount.8.uhelper 2004-11-10 20:49:37.000000000 +0100 -+++ util-linux-2.13-pre6/mount/umount.8 2006-09-15 14:02:25.000000000 +0200 -@@ -122,6 +122,19 @@ - Any pending loop devices can be freed using `losetup -d', see - .BR losetup (8). - -+.SH NOTES -+The syntax of external umount helpers is: -+ -+.br -+.BI "/sbin/umount. [\-nlfvr] " "dir " | " device " -+.br -+ -+where the is filesystem type or a value from "uhelper=" mtab option. -+ -+The uhelper (unprivileged umount request helper) is possible used when non-root -+user wants to umount a mountpoint which is not defined in the /etc/fstab file -+(e.g devices mounted by HAL). -+ - .SH FILES - .I /etc/mtab - table of mounted file systems ---- util-linux-2.13-pre6/mount/umount.c.uhelper 2006-09-15 13:23:23.000000000 +0200 -+++ util-linux-2.13-pre6/mount/umount.c 2006-09-15 13:23:23.000000000 +0200 -@@ -565,11 +565,24 @@ - - if (suid) { - char *mtab_user = NULL; -+ char *uhelper = NULL; - - if (!mc) - die(2, - _("umount: %s is not mounted (according to mtab)"), - file); -+ /* -+ * uhelper - unprivileged umount helper -+ * -- external umount (for example HAL mounts) -+ */ -+ if (mc->m.mnt_opts) -+ uhelper = get_value(mc->m.mnt_opts, "uhelper="); -+ if (uhelper) { -+ int status = 0; -+ if (check_special_umountprog(arg, arg, uhelper, &status)) -+ return status; -+ } -+ - /* The 2.4 kernel will generally refuse to mount the same - filesystem on the same mount point, but will accept NFS. - So, unmounting must be possible. */ diff --git a/util-linux-2.13-mount-uuid.patch b/util-linux-2.13-mount-uuid.patch deleted file mode 100644 index 43a4d7a..0000000 --- a/util-linux-2.13-mount-uuid.patch +++ /dev/null @@ -1,60 +0,0 @@ - - The UUID code in the mount command is broken -- en example UUID= in the fstab - file is reason for SIGSEG when non-root user tries umount any device. - -- 03/30/2006 Karel Zak - ---- util-linux-2.13-pre6/mount/mount_blkid.h.uuid 2006-03-29 15:34:24.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount_blkid.h 2006-03-29 15:34:57.000000000 +0200 -@@ -8,5 +8,6 @@ - extern const char *mount_get_devname_by_uuid(const char *uuid); - extern const char *mount_get_devname_by_label(const char *label); - extern const char *mount_get_volume_label_by_spec(const char *spec); -+extern const char *mount_get_volume_uuid_by_spec(const char *spec); - extern const char *mount_get_devname(const char *spec); - extern const char *mount_get_devname_for_mounting(const char *spec); ---- util-linux-2.13-pre6/mount/mount_blkid.c.uuid 2006-03-29 15:33:44.000000000 +0200 -+++ util-linux-2.13-pre6/mount/mount_blkid.c 2006-03-29 15:34:14.000000000 +0200 -@@ -21,6 +21,11 @@ - } - - const char * -+mount_get_volume_uuid_by_spec(const char *spec) { -+ return blkid_get_tag_value(blkid, "UUID", spec); -+} -+ -+const char * - mount_get_devname(const char *spec) { - return blkid_get_devname(blkid, spec, 0); - } ---- util-linux-2.13-pre6/mount/fstab.c.uuid 2006-03-29 15:29:28.000000000 +0200 -+++ util-linux-2.13-pre6/mount/fstab.c 2006-03-29 15:36:30.000000000 +0200 -@@ -301,23 +301,19 @@ - static int - has_label(const char *device, const char *label) { - const char *devlabel; -- int ret; - -- devlabel = mount_get_volume_label_by_spec(device); -- ret = !strcmp(label, devlabel); -- /* free(devlabel); */ -- return ret; -+ if (!(devlabel = mount_get_volume_label_by_spec(device))) -+ return 0; -+ return !strcmp(label, devlabel); - } - - static int - has_uuid(const char *device, const char *uuid){ - const char *devuuid; -- int ret; - -- devuuid = mount_get_devname_by_uuid(device); -- ret = !strcmp(uuid, devuuid); -- /* free(devuuid); */ -- return ret; -+ if (!(devuuid = mount_get_volume_uuid_by_spec(device))) -+ return 0; -+ return !strcmp(uuid, devuuid); - } - - /* Find the entry (SPEC,FILE) in fstab */ diff --git a/util-linux-2.13-namei-logic.patch b/util-linux-2.13-namei-logic.patch deleted file mode 100644 index b3b811f..0000000 --- a/util-linux-2.13-namei-logic.patch +++ /dev/null @@ -1,129 +0,0 @@ ---- util-linux-2.13-pre7/misc-utils/namei.1.nodir 2006-12-15 10:58:38.000000000 +0100 -+++ util-linux-2.13-pre7/misc-utils/namei.1 2006-12-15 10:58:51.000000000 +0100 -@@ -52,9 +52,5 @@ - Roger Southwick (rogers@amadeus.wr.tek.com) - .SH BUGS - To be discovered. --.SH CAVEATS --.I Namei --will follow an infinite loop of symbolic links forever. To escape, use --SIGINT (usually ^C). - .SH "SEE ALSO" - ls(1), stat(1) ---- util-linux-2.13-pre7/misc-utils/namei.c.nodir 2006-12-14 21:38:41.000000000 +0100 -+++ util-linux-2.13-pre7/misc-utils/namei.c 2006-12-15 10:58:31.000000000 +0100 -@@ -42,6 +42,10 @@ - 1999-02-22 Arkadiusz Mi¶kiewicz - - added Native Language Support - -+2006-12-15 Karel Zak -+- fixed logic; don't follow the path if a component is not directory -+- fixed infinite loop of symbolic links; stack size is very limited -+ - -------------------------------------------------------------*/ - - #include -@@ -66,7 +70,7 @@ - #endif - - static char *pperm(unsigned short); --static void namei(char *, int); -+static void namei(char *, int, mode_t *); - static void usage(void); - - int -@@ -107,9 +111,10 @@ - - - for(; optind < argc; optind++){ -+ mode_t lastmode = 0; - (void)printf("f: %s\n", argv[optind]); - symcount = 1; -- namei(argv[optind], 0); -+ namei(argv[optind], 0, &lastmode); - - if(chdir(curdir) == -1){ - (void)fprintf(stderr, -@@ -131,8 +136,10 @@ - #define NODEV (dev_t)(-1) - #endif - -+int kzak; -+ - static void --namei(char *file, int lev) { -+namei(char *file, int lev, mode_t *lastmode) { - char *cp; - char buf[BUFSIZ], sym[BUFSIZ]; - struct stat stb; -@@ -143,7 +150,7 @@ - * See if the file has a leading /, and if so cd to root - */ - -- if(*file == '/'){ -+ if(file && *file == '/'){ - while(*file == '/') - file++; - -@@ -166,7 +173,7 @@ - (void)printf(" d /\n"); - } - -- for(;;){ -+ for(; file && *file;){ - - if (strlen(file) >= BUFSIZ) { - fprintf(stderr,_("namei: buf overflow\n")); -@@ -198,6 +205,20 @@ - for(i = 0; i < lev; i++) - (void)printf(" "); - -+ -+ /* -+ * Previous element in the path wasn't directory, it means -+ * we cannot walk on *path* and check the actual element by lstat(), because -+ * there could be a component with same name. Try: -+ * -+ * $ touch a b -+ * $ namei a/b <-- "a" is not directory so namei shouldn't check for "b" -+ */ -+ if (*lastmode && S_ISDIR(*lastmode)==0 && S_ISLNK(*lastmode)==0){ -+ (void)printf(" ? %s - %s (%d)\n", buf, strerror(ENOENT), ENOENT); -+ return; -+ } -+ - /* - * See what type of critter this file is - */ -@@ -207,6 +228,8 @@ - return; - } - -+ *lastmode = stb.st_mode; -+ - switch(stb.st_mode & S_IFMT){ - case S_IFDIR: - -@@ -241,7 +264,6 @@ - * Sigh, another symlink. Read its contents and - * call namei() - */ -- - bzero(sym, BUFSIZ); - if(readlink(buf, sym, BUFSIZ) == -1){ - (void)printf(_(" ? problems reading symlink %s - %s (%d)\n"), buf, ERR); -@@ -255,11 +277,12 @@ - - if(symcount > 0 && symcount++ > MAXSYMLINKS){ - (void)printf(_(" *** EXCEEDED UNIX LIMIT OF SYMLINKS ***\n")); -- symcount = -1; - } else { - (void)printf("\n"); -- namei(sym, lev + 1); -+ namei(sym, lev + 1, lastmode); - } -+ if (symcount > MAXSYMLINKS) -+ return; - break; - - case S_IFCHR: diff --git a/util-linux-2.13-partx-man.patch b/util-linux-2.13-partx-man.patch deleted file mode 100644 index ff1d023..0000000 --- a/util-linux-2.13-partx-man.patch +++ /dev/null @@ -1,129 +0,0 @@ ---- util-linux-2.13-pre7/partx/Makefile.am.kzak 2007-01-11 16:30:39.000000000 +0100 -+++ util-linux-2.13-pre7/partx/Makefile.am 2007-01-11 16:30:30.000000000 +0100 -@@ -4,5 +4,6 @@ - - usrsbinexec_PROGRAMS = addpart delpart partx - partx_SOURCES = bsd.c dos.c partx.c solaris.c unixware.c gpt.c crc32.c -+man_MANS = addpart.8 delpart.8 partx.8 - - endif ---- /dev/null 2007-01-05 11:17:33.335119060 +0100 -+++ util-linux-2.13-pre7/partx/delpart.8 2007-01-11 16:28:37.000000000 +0100 -@@ -0,0 +1,30 @@ -+.\" delpart.8 -- -+.\" Copyright 2007 Karel Zak -+.\" Copyright 2007 Red Hat, Inc. -+.\" May be distributed under the GNU General Public License -+.TH DELPART 8 "11 Jan 2007" -+.SH NAME -+delpart \- -+simple wrapper around the "del partition" ioctl -+.SH SYNOPSIS -+.B delpart device partition -+.SH DESCRIPTION -+.B delpart -+is a program that asks the Linux kernel to remove a partition. -+ -+This command doesn't manipulate with partitions on hard drive. -+ -+.SH OPTIONS -+.TP -+.BI device -+Specify the disk device. -+.TP -+.BI partition -+Specify the partition number. -+ -+.SH SEE ALSO -+.BR addpart (8), -+.BR fdisk (8), -+.BR parted (8), -+.BR partprobe (8), -+.BR partx (8) ---- /dev/null 2007-01-05 11:17:33.335119060 +0100 -+++ util-linux-2.13-pre7/partx/addpart.8 2007-01-11 16:28:37.000000000 +0100 -@@ -0,0 +1,36 @@ -+.\" addpart.8 -- -+.\" Copyright 2007 Karel Zak -+.\" Copyright 2007 Red Hat, Inc. -+.\" May be distributed under the GNU General Public License -+.TH ADDPART 8 "11 Jan 2007" -+.SH NAME -+addpart \- -+simple wrapper around the "add partition" ioctl -+.SH SYNOPSIS -+.B addpart device partition start length -+.SH DESCRIPTION -+.B addpart -+is a program that informs the Linux kernel of new partition. -+ -+This command doesn't manipulate with partitions on hard drive. -+ -+.SH PARAMETERS -+.TP -+.BI device -+Specify the disk device. -+.TP -+.BI partition -+Specify the partition number. -+.TP -+.BI start -+Specify the begin of the partition (in bytes). -+.TP -+.BI length -+Specify the length of the partition (in bytes). -+ -+.SH SEE ALSO -+.BR delpart (8), -+.BR fdisk (8), -+.BR parted (8), -+.BR partprobe (8), -+.BR partx (8) ---- /dev/null 2007-01-05 11:17:33.335119060 +0100 -+++ util-linux-2.13-pre7/partx/partx.8 2007-01-11 16:28:37.000000000 +0100 -@@ -0,0 +1,45 @@ -+.\" partx.8 -- -+.\" Copyright 2007 Karel Zak -+.\" Copyright 2007 Red Hat, Inc. -+.\" May be distributed under the GNU General Public License -+.TH PARTX 8 "11 Jan 2007" -+.SH NAME -+partx \- -+telling the kernel about presence and numbering of on-disk partitions. -+.SH SYNOPSIS -+.B partx [-a|-d|-l] [--type TYPE] [--nr M-N] [partition] disk -+.SH DESCRIPTION -+Given a block device ( -+.B disk -+) and a partition table -+.B type -+, try to parse the partition table, and list the -+contents. Optionally add or remove partitions. -+ -+This is not an fdisk - adding and removing partitions -+is not a change of the disk, but just telling the kernel -+about presence and numbering of on-disk partitions. -+ -+.SH OPTIONS -+.TP -+.B \-a -+add specified partitions or read disk and add all partitions -+.TP -+.B \-d -+delete specified or all partitions -+.TP -+.B \-l -+list partitions -+.TP -+.BI --type " TYPE" -+Specify the partition type -- dos, bsd, solaris, unixware or gpt. -+.TP -+.BI --nr " M-N" -+Specify the range of partitions (e.g --nr 2-4). -+ -+.SH SEE ALSO -+.BR addpart (8), -+.BR delpart (8), -+.BR fdisk (8), -+.BR parted (8), -+.BR partprobe (8) diff --git a/util-linux-2.13-raw-raw0.patch b/util-linux-2.13-raw-raw0.patch deleted file mode 100644 index c92e3bd..0000000 --- a/util-linux-2.13-raw-raw0.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- util-linux-2.13-pre6/disk-utils/raw.c.kzak 2006-11-21 21:56:40.000000000 +0100 -+++ util-linux-2.13-pre6/disk-utils/raw.c 2006-11-21 22:35:11.000000000 +0100 -@@ -66,6 +66,7 @@ - int err; - int block_major, block_minor; - int i; -+ int rc; - - struct stat statbuf; - -@@ -108,19 +109,23 @@ - usage(1); - raw_name = argv[optind++]; - -+ rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); -+ if (rc != 1) { -+ fprintf (stderr, -+ "Unsupported raw device name '%s' (format is " RAWDEVDIR "rawN))\n", -+ raw_name); -+ exit(2); -+ } -+ if (raw_minor == 0) { -+ fprintf (stderr, -+ "Unsupported raw device name '%s' (minor number cannot be zero)\n", -+ raw_name); -+ exit(2); -+ } -+ - err = stat(raw_name, &statbuf); -- if (err) { -- int rc; -- -- rc = sscanf(raw_name, RAWDEVDIR "raw%d", &raw_minor); -- if (rc != 1) { -- fprintf (stderr, -- "Cannot locate raw device '%s' (%s)\n", -- raw_name, strerror(errno)); -- exit(2); -- } -+ if (err) - goto skip_test_rawdev; -- } - - if (!S_ISCHR(statbuf.st_mode)) { - fprintf (stderr, "raw device '%s' is not a character dev\n", diff --git a/util-linux-2.13-rmparts.patch b/util-linux-2.13-rmparts.patch deleted file mode 100644 index 128337d..0000000 --- a/util-linux-2.13-rmparts.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- util-linux-2.13-pre6/disk-utils/blockdev.c.rmparts 2006-02-08 14:10:48.000000000 -0500 -+++ util-linux-2.13-pre6/disk-utils/blockdev.c 2006-02-08 14:19:31.000000000 -0500 -@@ -29,6 +29,28 @@ - #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 -+ -+struct blkpg_partition { -+ long long start; -+ long long length; -+ long long pno; -+ char devname[BLKPG_DEVNAMELTH]; -+ char volname[BLKPG_VOLNAMELTH]; -+}; -+ -+struct blkpg_ioctl_arg { -+ int op; -+ int flags; -+ int datalen; -+ void *data; -+}; -+#endif -+ - /* Maybe could be included */ - #ifndef HDIO_GETGEO - #define HDIO_GETGEO 0x0301 -@@ -93,6 +115,10 @@ - { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, - N_("reread partition table") }, - #endif -+#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])) -@@ -144,6 +170,35 @@ - return 0; - } - -+#ifdef BLKPG -+static int -+disable_partition(int fd, int partno) { -+ struct blkpg_partition part = { -+ .pno = partno, -+ }; -+ struct blkpg_ioctl_arg io = { -+ .op = BLKPG_DEL_PARTITION, -+ .datalen = sizeof(part), -+ .data = &part, -+ }; -+ 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); -@@ -259,6 +314,12 @@ - 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: -@@ -276,6 +337,13 @@ - 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-2.13-schedutils-SCHED_BATCH.patch b/util-linux-2.13-schedutils-SCHED_BATCH.patch deleted file mode 100644 index f0abaaa..0000000 --- a/util-linux-2.13-schedutils-SCHED_BATCH.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- util-linux-2.13-pre6/schedutils/chrt.1.batch 2006-11-10 13:23:37.000000000 -0500 -+++ util-linux-2.13-pre6/schedutils/chrt.1 2006-11-10 13:27:23.000000000 -0500 -@@ -36,10 +36,11 @@ - .BR chrt (1) - sets or retrieves the real-time scheduling attributes of an existing PID or - runs COMMAND with the given attributes. Both policy (one of -+.BR SCHED_OTHER , - .BR SCHED_FIFO , - .BR SCHED_RR , - or --.BR SCHED_OTHER ) -+.BR SCHED_BATCH ) - and priority can be set and retrieved. - .SH OPTIONS - .TP -@@ -48,6 +49,10 @@ - .TP - - .TP -+.B -b, --batch -+set scheduling policy to -+.BR SCHED_BATCH -+.TP - .B -f, --fifo - set scheduling policy to - .BR SCHED_FIFO ---- util-linux-2.13-pre6/schedutils/chrt.c.batch 2005-08-14 11:18:54.000000000 -0400 -+++ util-linux-2.13-pre6/schedutils/chrt.c 2006-11-10 13:27:52.000000000 -0500 -@@ -36,6 +36,8 @@ - fprintf(stderr, "usage: %s [options] [prio] [pid | cmd [args...]]\n", - cmd); - fprintf(stderr, "manipulate real-time attributes of a process\n"); -+ fprintf(stderr, " -b, --batch " -+ "set policy to SCHED_BATCH\n"); - fprintf(stderr, " -f, --fifo " - "set policy to SCHED_FF\n"); - fprintf(stderr, " -p, --pid " -@@ -83,6 +85,9 @@ - case SCHED_RR: - printf("SCHED_RR\n"); - break; -+ case SCHED_BATCH: -+ printf("SCHED_BATCH\n"); -+ break; - default: - printf("unknown\n"); - } -@@ -101,6 +106,13 @@ - { - int max, min; - -+ max = sched_get_priority_max(SCHED_OTHER); -+ min = sched_get_priority_min(SCHED_OTHER); -+ if (max >= 0 && min >= 0) -+ printf("SCHED_OTHER min/max priority\t: %d/%d\n", min, max); -+ else -+ printf("SCHED_OTHER not supported?\n"); -+ - max = sched_get_priority_max(SCHED_FIFO); - min = sched_get_priority_min(SCHED_FIFO); - if (max >= 0 && min >= 0) -@@ -115,12 +127,12 @@ - else - printf("SCHED_RR not supported?\n"); - -- max = sched_get_priority_max(SCHED_OTHER); -- min = sched_get_priority_min(SCHED_OTHER); -+ max = sched_get_priority_max(SCHED_BATCH); -+ min = sched_get_priority_min(SCHED_BATCH); - if (max >= 0 && min >= 0) -- printf("SCHED_OTHER min/max priority\t: %d/%d\n", min, max); -+ printf("SCHED_BATCH min/max priority\t: %d/%d\n", min, max); - else -- printf("SCHED_OTHER not supported?\n"); -+ printf("SCHED_BATCH not supported?\n"); - } - - int main(int argc, char *argv[]) -@@ -130,6 +142,7 @@ - pid_t pid = 0; - - struct option longopts[] = { -+ { "batch", 0, NULL, 'b' }, - { "fifo", 0, NULL, 'f' }, - { "pid", 0, NULL, 'p' }, - { "help", 0, NULL, 'h' }, -@@ -141,11 +154,14 @@ - { NULL, 0, NULL, 0 } - }; - -- while((i = getopt_long(argc, argv, "+fphmorvV", longopts, NULL)) != -1) -+ while((i = getopt_long(argc, argv, "+bfphmorvV", longopts, NULL)) != -1) - { - int ret = 1; - - switch (i) { -+ case 'b': -+ policy = SCHED_BATCH; -+ break; - case 'f': - policy = SCHED_FIFO; - break; diff --git a/util-linux-2.13-schedutils-man.patch b/util-linux-2.13-schedutils-man.patch deleted file mode 100644 index a5b7e31..0000000 --- a/util-linux-2.13-schedutils-man.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- util-linux-2.13-pre6/schedutils/taskset.1.kzak 2006-02-22 16:10:26.000000000 +0100 -+++ util-linux-2.13-pre6/schedutils/taskset.1 2006-02-22 16:10:38.000000000 +0100 -@@ -82,7 +82,7 @@ - .SH USAGE - .TP - The default behavior is to run a new command with a given affinity mask: --taskset [mask] -- [command] [arguments] -+taskset [mask] [command] [arguments] - .TP - You can also retrieve the CPU affinity of an existing task: - taskset -p [pid] ---- util-linux-2.13-pre6/schedutils/chrt.1.kzak 2006-02-22 16:09:02.000000000 +0100 -+++ util-linux-2.13-pre6/schedutils/chrt.1 2006-02-22 16:09:22.000000000 +0100 -@@ -72,7 +72,7 @@ - .SH USAGE - .TP - The default behavior is to run a new command:: --chrt [prio] -- [command] [arguments] -+chrt [prio] [command] [arguments] - .TP - You can also retrieve the real-time attributes of an existing task: - chrt -p [pid] diff --git a/util-linux-2.13-sfdisk-geo.patch b/util-linux-2.13-sfdisk-geo.patch deleted file mode 100644 index 52b5b9f..0000000 --- a/util-linux-2.13-sfdisk-geo.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- util-linux-2.13-pre7/fdisk/sfdisk.c.kzak 2007-06-25 09:13:31.000000000 +0200 -+++ util-linux-2.13-pre7/fdisk/sfdisk.c 2007-06-25 09:12:42.000000000 +0200 -@@ -469,8 +469,8 @@ - - R = get_geometry(dev, fd, silent); - -- B.heads = (U.heads ? U.heads : R.heads); -- B.sectors = (U.sectors ? U.sectors : R.sectors); -+ B.heads = (U.heads ? U.heads : (R.heads ? R.heads : 255)); -+ B.sectors = (U.sectors ? U.sectors : (R.sectors ? R.sectors : 63)); - B.cylinders = (U.cylinders ? U.cylinders : R.cylinders); - - B.cylindersize = B.heads * B.sectors; diff --git a/util-linux-2.13-swap-page.patch b/util-linux-2.13-swap-page.patch deleted file mode 100644 index 797f646..0000000 --- a/util-linux-2.13-swap-page.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- util-linux-2.13-pre6/disk-utils/mkswap.c.page 2006-06-12 17:30:57.000000000 +0200 -+++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-06-12 17:30:31.000000000 +0200 -@@ -53,17 +53,6 @@ - #include - #endif - --/* Try to get PAGE_SIZE from libc or kernel includes */ --#ifdef HAVE_SYS_USER_H -- /* Note: says: for gdb only */ --#include /* for PAGE_SIZE and PAGE_SHIFT */ --#else --#ifdef HAVE_ASM_PAGE_H --#include /* for PAGE_SIZE and PAGE_SHIFT */ -- /* we also get PAGE_SIZE via getpagesize() */ --#endif --#endif -- - #ifndef _IO - /* pre-1.3.45 */ - #define BLKGETSIZE 0x1260 -@@ -172,10 +161,6 @@ - - static void - init_signature_page(void) { -- --#ifdef PAGE_SIZE -- defined_pagesize = PAGE_SIZE; --#endif - kernel_pagesize = getpagesize(); - pagesize = kernel_pagesize; - ---- util-linux-2.13-pre6/configure.ac.page 2006-06-12 17:28:51.000000000 +0200 -+++ util-linux-2.13-pre6/configure.ac 2006-06-12 17:28:28.000000000 +0200 -@@ -26,7 +26,8 @@ - ]) - AC_CHECK_HEADERS(langinfo.h) - AC_CHECK_HEADERS(sys/user.h) --AC_CHECK_HEADERS(asm/page.h) -+# Suck ... -+#AC_CHECK_HEADERS(asm/page.h) - AC_CHECK_HEADERS(rpcsvc/nfs_prot.h) - AC_CHECK_HEADERS(sys/io.h) - AC_CHECK_HEADERS(pty.h) ---- util-linux-2.13-pre6/mount/swap.configure.page 2006-06-12 17:23:27.000000000 +0200 -+++ util-linux-2.13-pre6/mount/swap.configure 2006-06-12 17:25:28.000000000 +0200 -@@ -3,7 +3,7 @@ - - # Prepare test - CC=${CC-cc} --compile="$CC -o conftest conftest.c >/dev/null 2>&1" -+compile="$CC -o conftest conftest.c" - rm -f conftest conftest.c swapargs.h - - # What include files shall we try? -@@ -14,9 +14,10 @@ - PAGEH= - if [ -f /usr/include/sys/swap.h ]; then - SWAPH="#include " -- if [ -f /usr/include/asm/page.h ]; then -- PAGEH="#include " -- fi -+ # Suck ... -+ #if [ -f /usr/include/asm/page.h ]; then -+ # PAGEH="#include " -+ #fi - fi - echo $PAGEH > conftest.c - echo $SWAPH >> conftest.c diff --git a/util-linux-2.13-swapon-suspend.patch b/util-linux-2.13-swapon-suspend.patch deleted file mode 100644 index 6c716d2..0000000 --- a/util-linux-2.13-swapon-suspend.patch +++ /dev/null @@ -1,161 +0,0 @@ ---- util-linux-2.13-pre2/mount/swapon.c.swsuspend 2005-09-02 14:32:53.000000000 +0200 -+++ util-linux-2.13-pre2/mount/swapon.c 2005-09-02 16:29:43.000000000 +0200 -@@ -11,6 +11,9 @@ - #include - #include - #include -+#include -+#include -+#include - #include "xmalloc.h" - #include "swap_constants.h" - #include "swapargs.h" -@@ -22,6 +25,7 @@ - - #define _PATH_FSTAB "/etc/fstab" - #define PROC_SWAPS "/proc/swaps" -+#define PATH_MKSWAP "/sbin/mkswap" - - #define SWAPON_NEEDS_TWO_ARGS - -@@ -173,6 +177,84 @@ - return 0 ; - } - -+/* -+ * It's better do swsuspend detection by follow routine than -+ * include huge mount_guess_fstype.o to swapon. We need only -+ * swsuspend and no the others filesystems. -+ */ -+#ifdef HAVE_LIBBLKID -+static int -+swap_is_swsuspend(const char *device) { -+ const char *type = blkid_get_tag_value(blkid, "TYPE", device); -+ -+ if (type && strcmp(type, "swsuspend")==0) -+ return 0; -+ return 1; -+} -+#else -+static int -+swap_is_swsuspend(const char *device) { -+ int fd, re = 1, n = getpagesize() - 10; -+ char buf[10]; -+ -+ fd = open(device, O_RDONLY); -+ if (fd < 0) -+ return -1; -+ -+ if (lseek(fd, n, SEEK_SET) >= 0 && -+ read(fd, buf, sizeof buf) == sizeof buf && -+ (memcmp("S1SUSPEND", buf, 9)==0 || -+ memcmp("S2SUSPEND", buf, 9)==0)) -+ re = 0; -+ -+ close(fd); -+ return re; -+} -+#endif -+ -+/* calls mkswap */ -+static int -+swap_reinitialize(const char *device) { -+ const char *label = mount_get_volume_label_by_spec(device); -+ pid_t pid; -+ -+ switch((pid=fork())) { -+ case -1: /* fork error */ -+ fprintf(stderr, _("%s: cannot fork: %s\n"), -+ progname, strerror(errno)); -+ 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); -+ exit(1); /* error */ -+ -+ default: /* parent */ -+ { -+ int status; -+ int ret; -+ -+ 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 status; -@@ -196,6 +278,18 @@ - 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. -+ */ -+ if (swap_is_swsuspend(special)==0) { -+ 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) { ---- util-linux-2.13-pre2/mount/get_label_uuid.c.swsuspend 2005-09-02 14:32:53.000000000 +0200 -+++ util-linux-2.13-pre2/mount/get_label_uuid.c 2005-09-02 16:21:20.000000000 +0200 -@@ -129,7 +129,24 @@ - } - return 0; - } -- -+ -+static int -+is_swsuspend_partition(int fd, char **label, char *uuid) { -+ int n = getpagesize(); -+ char *buf = xmalloc(n); -+ struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf; -+ -+ if (lseek(fd, 0, SEEK_SET) == 0 -+ && read(fd, buf, n) == n -+ && (strncmp(buf+n-10, "S1SUSPEND", 9)==0 || -+ strncmp(buf+n-10, "S2SUSPEND", 9)==0) -+ && p->version == 1) { -+ store_uuid(uuid, p->uuid); -+ store_label(label, p->volume_name, 16); -+ return 1; -+ } -+ return 0; -+} - - /* - * Get both label and uuid. -@@ -162,6 +179,8 @@ - - if (is_v1_swap_partition(fd, label, uuid)) - goto done; -+ if (is_swsuspend_partition(fd, label, uuid)) -+ goto done; - - if (lseek(fd, 1024, SEEK_SET) == 1024 - && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb) diff --git a/util-linux-2.13-umount-sysfs.patch b/util-linux-2.13-umount-sysfs.patch deleted file mode 100644 index 5d92a9c..0000000 --- a/util-linux-2.13-umount-sysfs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux-2.13-pre6/mount/umount.c.sysfs 2006-02-23 10:09:53.000000000 +0100 -+++ util-linux-2.13-pre6/mount/umount.c 2006-02-23 10:10:39.000000000 +0100 -@@ -734,7 +734,7 @@ - if (all) { - /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ - if (types == NULL) -- types = "noproc,nodevfs,nodevpts"; -+ types = "noproc,nodevfs,nodevpts,nosysfs,rpc_pipefs"; - result = umount_all (types, test_opts); - } else if (argc < 1) { - usage (stderr, 2); diff --git a/util-linux.spec b/util-linux.spec deleted file mode 100644 index 0fe8803..0000000 --- a/util-linux.spec +++ /dev/null @@ -1,2035 +0,0 @@ -# Rules for hacking: -# - when adding patches, please make sure that it is easy to find out what bug ID -# patch fixes. Tip: cut&past bug title with bug ID from bugzilla. -# -# Notes: -# - upstream maintainer Adrian Bunk - -### Header -Summary: A collection of basic system utilities. -Name: util-linux -Version: 2.13 -Release: 0.55%{?dist} -License: distributable -Group: System Environment/Base - -### Features -%if 0%{?rhel} -%define include_raw 1 -%else -%define include_raw 0 -%endif - -### Macros -%define floppyver 0.12 -%define no_hwclock_archs s390 s390x -%define cytune_archs %{ix86} alpha armv4l - -### Paths -BuildRoot: %{_tmppath}/%{name}-root -# see build section for _prefix - -### Dependences -BuildRequires: audit-libs-devel >= 1.0.6 -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: e2fsprogs-devel >= 1.36 -BuildRequires: gettext-devel -BuildRequires: libselinux-devel -# ncurses is the right way now [kzak, 12/14/2006] -#BuildRequires: libtermcap-devel -BuildRequires: ncurses-devel -BuildRequires: pam-devel -BuildRequires: sed -BuildRequires: slang-devel -BuildRequires: texinfo -BuildRequires: zlib-devel - -### Sources -# TODO [stable]: s/2.13-pre7/%{version}/ -Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/util-linux-2.13-pre7.tar.bz2 -Source1: util-linux-login.pamd -Source2: util-linux-remote.pamd -Source3: util-linux-chsh-chfn.pamd -Source4: util-linux-60-raw.rules -Source8: nologin.c -Source9: nologin.8 -Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.gz - -### Obsoletes & Conflicts & Provides -Obsoletes: fdisk tunelp mount losetup schedutils -%ifarch alpha sparc sparc64 sparcv9 s390 -Obsoletes: clock -%endif -%ifarch alpha -Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 -%endif -Requires: pam >= 0.66-4, /etc/pam.d/system-auth -Requires: audit-libs >= 1.0.6 -Conflicts: kernel < 2.2.12-7, -Requires(preun): /sbin/install-info -Requires(post): /sbin/install-info -Requires(post): coreutils -%if %{include_raw} -Requires: udev -%endif -Requires: ConsoleKit-libs - -Provides: mount = %{version} -Provides: losetup = %{version} -Provides: schedutils - -### Patches -# let's use -ltermcap from the more command -Patch1: util-linux-2.13-moretc.patch -# Reduce MAX_PARTS to 16 (upstream reasonably won't take it) -Patch70: util-linux-2.12a-partlimit.patch -# Note on how to set up raw device mappings using RHL /etc/sysconfig/rawdevices -Patch109: util-linux-2.11f-rawman.patch - -Patch100: util-linux-2.12j-managed.patch - -Patch106: util-linux-2.12p-swaponsymlink-57300.patch -Patch107: util-linux-2.11y-procpartitions-37436.patch -Patch113: util-linux-2.13-ctty3.patch - -Patch120: util-linux-2.11y-skipraid2.patch -Patch126: util-linux-2.11y-multibyte.patch -Patch128: util-linux-2.12a-ipcs-84243-86285.patch - -Patch138: util-linux-2.11y-chsh-103004.patch -Patch139: util-linux-2.11y-fdisksegv-103954.patch - -Patch147: util-linux-2.12a-126572-fdiskman.patch -Patch150: floppy-0.12-locale.patch - -Patch151: util-linux-2.12a-mountbylabel-dm.patch -Patch153: util-linux-2.12a-16415-rdevman.patch - -# Patch to enabled remote service for login/pam (#91174) -Patch157: util-linux-2.12a-pamstart.patch -# Patch to enable the pamconsole flag for restricting mounting to users at the console (#133941) -Patch159: util-linux-2.12j-pamconsole.patch -# Allow raw(8) to bind raw devices whose device nodes do not yet exist. -Patch160: raw-handle-nonpresent-devs.patch - -Patch164: util-linux-2.12j-113790-hotkeys.patch - -# Info about NFS4 -Patch170: util-linux-2.13-mount-man-nfs4.patch -# Makeing /var/log/lastlog (#151635) -Patch180: util-linux-2.12p-login-lastlog.patch -# Improved /etc/mtab lock (#143118) -Patch181: util-linux-2.12p-mtab-lock.patch -# Stupid typo (#151156) -Patch182: util-linux-2.12p-ipcs-typo.patch -# 154498 - util-linux login & pam session -Patch183: util-linux-2.12a-pamsession.patch -# 76467 - At boot time, fsck chokes on LVs listed by label in fstab -Patch185: util-linux-2.12p-lvm2dupes-76467.patch -# add note about ATAPI IDE floppy to fdformat.8 -Patch186: util-linux-2.12p-fdformat-ide.patch -# 145355 - Man pages for fstab and fstab-sync in conflict. -Patch187: util-linux-2.12p-fstab-man.patch -# 156597 - look - doesn't work with separators -Patch188: util-linux-2.12p-look-separator.patch -# 157656 - CRM 546998 : Possible bug in vipw, changes permissions of /etc/shadow -Patch189: util-linux-2.12p-vipw-perm.patch -# 159339 - util-linux updates for new audit system -Patch202: util-linux-2.13-audit-hwclock.patch -# 158737 - sfdisk warning for large partitions, gpt -Patch203: util-linux-2.13-fdisk-gpt.patch -# 150912 - Add ocfs2 support -Patch204: util-linux-2.12p-mount-ocfs2.patch -# NULL is better than zero at end of execl() -Patch205: util-linux-2.12p-execl.patch -# deprecated the arch command (for compatibility only) -Patch206: util-linux-2.13-arch.patch -# 165863 - swsusp swaps should be reinitialized -Patch210: util-linux-2.13-swapon-suspend.patch -# 170110 - Documentation for 'rsize' and 'wsize' NFS mount options is misleading -Patch211: util-linux-2.13-mount-man-nfs.patch -# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 -Patch212: util-linux-2.12p-floppy-generic.patch -# 168436 - login will attempt to run if it has no read/write access to its terminal -# 168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1) -Patch213: util-linux-2.13-login-hang.patch -# 165253 - losetup missing option -a [new feature] -Patch214: util-linux-2.13-losetup-all.patch -# 170564 - add audit message to login -Patch215: util-linux-2.13-audit-login.patch -# 170171 - ipcs -lm always report "max total shared memory (kbytes) = 0" -Patch216: util-linux-2.13-ipcs-shmax.patch -# 171337 - mkfs.cramfs dies creating installer image -Patch217: util-linux-2.13-cramfs-maxentries.patch -# [also 171337] - mkfs.cramfs doesn't work correctly with empty files -Patch218: util-linux-2.13-cramfs-zerofiles.patch -# 172203 - mount man page in RHEL4 lacks any info on cifs mount options -Patch219: util-linux-2.12a-mount-man-cifs.patch -# better wide chars usage in the cal command (based on the old 'moremisc' patch) -Patch220: util-linux-2.12p-cal-wide.patch -# 176441: col truncates data -Patch221: util-linux-2.12p-col-EILSEQ.patch -# 174111 - mount allows loopback devices to be mounted more than once to the same mount point -Patch222: util-linux-2.13-mount-twiceloop.patch -# nobug - add --rmpart N and --rmparts -Patch223: util-linux-2.13-rmparts.patch -# 181782 - mkswap should automatically add selinux label to swapfile -Patch224: util-linux-2.13-mkswap-selinux.patch -# 181896 - broken example in man pages -Patch225: util-linux-2.13-schedutils-man.patch -# 177331 - login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped. -Patch226: util-linux-2.13-login-pam-acct.patch -# 177523 - umount -a should not unmount sysfs -Patch227: util-linux-2.13-umount-sysfs.patch -# 187014 - umount segfaults for normal user -Patch233: util-linux-2.13-mount-uuid.patch -# 183446 - cal not UTF-8-aware -Patch234: util-linux-2.13-cal-wide.patch -# 186915 - mount does not translate SELIinux context options though libselinux -# 185500 - Need man page entry for -o context= mount option -# 211827 - Can't mount with additional contexts -Patch235: util-linux-2.13-mount-context.patch -# 152579 - missing info about /etc/mtab and /proc/mounts mismatch -# 183890 - missing info about possible ioctl() and fcntl() problems on NFS filesystem -Patch236: util-linux-2.13-mount-man-bugs.patch -# Keep gcc happy -Patch237: util-linux-2.13-hexdump-gcc.patch -# 191230 - using mount --move results in wrong data in /etc/mtab -Patch238: util-linux-2.13-mount-move.patch -# Subtrees support -Patch239: util-linux-2.13-mount-subtree.patch -# wrong number of sectors for large disks (suse#160822) -Patch240: util-linux-2.13-fdisk-sectors.patch -# 182553 - fdisk -l inside xen guest shows no disks -# 188981 - "sfdisk -l" tries to open partitions -Patch241: util-linux-2.13-fdisk-isfull.patch -# 181549 - raw(8) manpage has old information about dd -Patch242: util-linux-2.12a-raw-man-dd.patch -# Don't use asm/page.h -Patch243: util-linux-2.13-swap-page.patch -# IPv6 support to login command -Patch245: util-linux-2.13-login-ipv6.patch -# 176494 - last -i returns strange IP addresses -Patch247: util-linux-2.13-login-timeval.patch -# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) -Patch248: util-linux-2.13-ctrlaltdel-man.patch -# 205038 - mount not allowing sloppy option -Patch249: util-linux-2.13-mount-sloppy.patch -# 188193 - util-linux should provide plugin infrastructure for HAL -Patch250: util-linux-2.13-mount-uhelper.patch -# Removes obsolete NFS code (we use /sbin/[u]mount.nfs[4] from nfs-utils) -Patch251: util-linux-2.13-mount-nonfs.patch -# Losetup.8 update -- add info about dm-crypt -Patch252: util-linux-2.13-losetup-deprecated.patch -# 208634 - mkswap "works" without warning on a mounted device -Patch253: util-linux-2.13-mkswap-mounted.patch -# 213127 - mount --make-unbindable does not work -Patch254: util-linux-2.13-mount-comment.patch -# 211749 - add -r option to losetup to create a read-only loop -Patch255: util-linux-2.13-losetup-rdonly.patch -# 216489 - SCHED_BATCH option missing in chrt -Patch256: util-linux-2.13-schedutils-SCHED_BATCH.patch -# 216712 - issues with raw device support ("raw0" is wrong device name) -Patch257: util-linux-2.13-raw-raw0.patch -# 217186 - /bin/sh: @MKINSTALLDIRS@: No such file or directory -Patch258: util-linux-2.13-mkdir_p.patch -# 218915 - fdisk -b 4K -Patch259: util-linux-2.13-fdisk-b-4096.patch -# leaking file descriptor -Patch260: util-linux-2.13-more-CLOEXEC.patch -# 217240 - namei ignores non-directory components instead of saying "Not a directory" -# 217241 - namei enforces symlink limits inconsistently -Patch261: util-linux-2.13-namei-logic.patch -# 222293 - undocumented partx,addpart, delpart -Patch262: util-linux-2.13-partx-man.patch -# 150493 - hwclock --systohc sets clock 0.5 seconds slow -Patch263: util-linux-2.13-hwclock-systohc.patch -# 227903 - mount -f does not work with NFS-mounted -Patch264: util-linux-2.13-mount-fake.patch -# 243930 - Translation files exist, but are not being used -Patch265: util-linux-2.13-localedir.patch -# 228731 - sfdisk doesn't support DM-MP device (add default heads and sectors) -Patch266: util-linux-2.13-sfdisk-geo.patch -# 231192 - ipcs is not printing correct values on pLinux -Patch267: util-linux-2.13-ipcs-32bit.patch -# 245912 - mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device -Patch268: util-linux-2.13-mount-loop.patch -# 213253 - "cal -3" generates improperly formatted output -Patch269: util-linux-2.13-cal-3.patch -# 236848 - mount/fstab.c:lock_mtab() should open with proper permissions -Patch270: util-linux-2.12a-mount-lockperm.patch -# 238918 - blockdev --getsize does not work properly on devices with more than 2^31 sectors -Patch271: util-linux-2.13-blockdev-errno.patch -Patch272: util-linux-2.13-blockdev-unsigned.patch -# backport MS_RELATIME -Patch273: util-linux-2.13-mount-relatime.patch - -%description -The util-linux 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. - -%prep -# TODO [stable]: remove -n -%setup -q -a 11 -n util-linux-2.13-pre7 - -# ncurses vs. termcap for the more command -#%patch1 -p1 - - -%patch70 -p1 -# nologin -cp %{SOURCE8} %{SOURCE9} . -%patch100 -p1 -%patch106 -p1 -%patch107 -p1 -%patch109 -p1 -%patch113 -p1 -%patch120 -p1 -%patch126 -p1 -%patch128 -p1 -%patch138 -p1 -%patch139 -p1 -%patch147 -p1 -%patch150 -p0 -%patch151 -p1 -%patch153 -p1 -%patch157 -p1 -%patch159 -p1 -%patch160 -p1 -%patch164 -p1 -%patch170 -p1 -%patch180 -p1 -%patch181 -p1 -%patch182 -p1 -%patch183 -p1 -%patch185 -p1 -%patch186 -p1 -%patch187 -p1 -%patch188 -p1 -%patch189 -p1 -%patch202 -p1 -%patch203 -p1 -%patch204 -p1 -%patch205 -p1 -%patch206 -p1 -%patch210 -p1 -%patch211 -p1 -%patch212 -p1 -%patch213 -p1 -%patch214 -p1 -%patch215 -p1 -%patch216 -p1 -%patch217 -p1 -%patch218 -p1 -%patch219 -p1 -%patch220 -p1 -%patch221 -p1 -%patch222 -p1 -%patch223 -p1 -%patch224 -p1 -%patch225 -p1 -%patch226 -p1 -%patch227 -p1 -%patch233 -p1 -%patch234 -p1 -%patch235 -p1 -%patch236 -p1 -%patch237 -p1 -%patch238 -p1 -%patch239 -p1 -%patch240 -p1 -%patch241 -p1 -%patch242 -p1 -%patch243 -p1 -%patch245 -p1 -%patch247 -p1 -%patch248 -p1 -%patch249 -p1 -%patch250 -p1 -%patch251 -p1 -%patch252 -p1 -%patch253 -p1 -%patch254 -p1 -%patch255 -p1 -%patch256 -p1 -%patch257 -p1 -%patch258 -p1 -%patch259 -p1 -%patch260 -p1 -%patch261 -p1 -%patch262 -p1 -%patch263 -p1 -%patch264 -p1 -%patch265 -p1 -%patch266 -p1 -%patch267 -p1 -%patch268 -p1 -%patch269 -p1 -%patch270 -p1 -%patch271 -p1 -%patch272 -p1 -%patch273 -p1 - -%build -unset LINGUAS || : - -# rebuild build system -aclocal -automake -a -autoconf - -# CFLAGS -%define make_cflags -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - -# note: we install to /bin and /usr/bin, so there's $bindir and $usrbindir in -# util-linux build system. It's better follow package build-system than rpm -# macros (where is prefix=/usr) -%define _prefix "" - -# configure -# note: we disable tty group (USE_TTY_GROUP) in Makefiles to prevent call chgrp -# during the "make install". But we define -DUSE_TTY_GROUP that enable tty groups in -# *.c files only. -export CFLAGS="%{make_cflags} -DUSE_TTY_GROUP $RPM_OPT_FLAGS" -%configure \ - --disable-wall \ - --disable-use-tty-group \ - --enable-partx \ - --enable-login-utils \ - --enable-kill \ - --enable-write \ -%if %{include_raw} - --enable-raw \ -%endif - --enable-rdev - -# reset to original -%define _prefix /usr - -# build util-linux -make %{?_smp_mflags} - -# build floppy stuff -pushd floppy-%{floppyver} -# We have to disable floppygtk somehow... -%configure --with-gtk-prefix=/asfd/jkl -make %{?_smp_mflags} -popd - -# build nologin -gcc $RPM_OPT_FLAGS -o nologin nologin.c - -# build docs -pushd sys-utils - makeinfo --number-sections ipc.texi -popd - -%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} -mkdir -p %{buildroot}/var/log -touch %{buildroot}/var/log/lastlog -chmod 0644 %{buildroot}/var/log/lastlog - -# install util-linux -make install DESTDIR=${RPM_BUILD_ROOT} - -# inslall floppy stuff -pushd floppy-%{floppyver} -%makeinstall -popd - -# install no login -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 - -# Correct mail spool path. -sed -e 's,/usr/spool/mail,/var/spool/mail,g' ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1 > ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1.new -mv ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1.new ${RPM_BUILD_ROOT}%{_mandir}/man1/login.1 - -if [ "%{_infodir}" != "%{_prefix}/info" -a -d ${RPM_BUILD_ROOT}%{_prefix}/info ]; then - ( cd ${RPM_BUILD_ROOT}%{_prefix}/info; tar cf - ./* ) | - ( cd ${RPM_BUILD_ROOT}%{_infodir}; tar xf - ) - ( cd ${RPM_BUILD_ROOT}%{_prefix}; rm -rf ./info ) -fi - -%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 - -gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/ipc.info - -# 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 - - -# Final cleanup -%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 -%ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_mandir}/man8/{fdformat,tunelp,floppy}.8* -%endif - -# deprecated commands -for I in /sbin/cfdisk /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ - /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /sbin/shutdown %{_bindir}/wall %{_bindir}/scriptreplay; 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/cfdisk.8 \ - man8/fsck.minix.8 man8/mkfs.minix.8 man8/mkfs.bfs.8 man1/wall.1; do - rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* -done - -# deprecated docs -for I in fdisk/README.cfdisk text-utils/README.pg text-utils/README.reset; do - rm -rf $I -done - -# we install getopt/getopt-*.{bash,tcsh} as doc files -# note: versions <=2.12 use path "%{_datadir}/misc/getopt/*" -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 - -# /bin -> /sbin -for I in pivot_root losetup swapon swapoff; do - if [ -e $RPM_BUILD_ROOT/bin/$I -o -h $RPM_BUILD_ROOT/bin/$I ]; then - mv $RPM_BUILD_ROOT/bin/$I $RPM_BUILD_ROOT/sbin/$I - fi -done - -# /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 raw; do - if [ -e $RPM_BUILD_ROOT/usr/bin/$I ]; then - mv $RPM_BUILD_ROOT/usr/bin/$I $RPM_BUILD_ROOT/bin/$I - fi -done - -# omit info/dir file -rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir - -%find_lang %{name} - -%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 - -%files -f %{name}.lang -%defattr(-,root,root) -%doc */README.* NEWS AUTHORS -%doc getopt/getopt-*.{bash,tcsh} - -/bin/arch -/bin/dmesg -%attr(755,root,root) /bin/login -/bin/more -/bin/kill -/bin/taskset -%if %{include_raw} -/bin/raw -%config %{_sysconfdir}/udev/rules.d/60-raw.rules -%endif - -%config %{_sysconfdir}/pam.d/chfn -%config %{_sysconfdir}/pam.d/chsh -%config %{_sysconfdir}/pam.d/login -%config %{_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* - -/sbin/sfdisk -%{_mandir}/man8/sfdisk.8* -%doc fdisk/sfdisk.examples - -/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(4711,root,root) %{_bindir}/chfn -%attr(4711,root,root) %{_bindir}/chsh -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%ifarch %cytune_archs -%{_bindir}/cytune -%{_mandir}/man8/cytune.8* -%endif -%{_bindir}/ddate -%ifnarch s390 s390x -%{_bindir}/fdformat -%endif -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%{_bindir}/kill -%{_bindir}/logger -%{_bindir}/look -%{_bindir}/mcookie -/sbin/fsck.cramfs -/sbin/mkfs.cramfs -%ifnarch s390 s390x -%{_bindir}/floppy -%{_mandir}/man8/floppy.8* -%endif -%{_bindir}/namei -%{_bindir}/rename -%{_bindir}/renice -%{_bindir}/rev -%{_bindir}/script -%{_bindir}/setsid -%{_bindir}/setterm -%ifarch sparc sparc64 sparcv9 -%{_bindir}/sunhostid -%endif -%{_bindir}/tailf -%{_bindir}/ul -%{_bindir}/whereis -%attr(2755,root,tty) %{_bindir}/write - -%ifarch %{ix86} -%{_sbindir}/rdev -%{_sbindir}/ramsize -%{_sbindir}/rootflags -%{_sbindir}/vidmode -%{_mandir}/man8/rdev.8* -%{_mandir}/man8/ramsize.8* -%{_mandir}/man8/rootflags.8* -%{_mandir}/man8/vidmode.8* -%endif -%{_sbindir}/readprofile -%ifnarch s390 s390x -%{_sbindir}/tunelp -%endif -%{_sbindir}/vipw -%{_sbindir}/vigr - -%{_infodir}/ipc.info* - -%{_mandir}/man1/arch.1* -%{_mandir}/man1/cal.1* -%{_mandir}/man1/chfn.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/flock.1* -%{_mandir}/man1/getopt.1* -%{_mandir}/man1/hexdump.1* -%{_mandir}/man1/kill.1* -%{_mandir}/man1/logger.1* -%{_mandir}/man1/login.1* -%{_mandir}/man1/look.1* -%{_mandir}/man1/mcookie.1* -%{_mandir}/man1/more.1* -%{_mandir}/man1/namei.1* -%{_mandir}/man1/readprofile.1* -%{_mandir}/man1/rename.1* -%{_mandir}/man1/rev.1* -%{_mandir}/man1/script.1* -%{_mandir}/man1/setterm.1* -%{_mandir}/man1/tailf.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}/man8/blockdev.8* -%{_mandir}/man8/ctrlaltdel.8* -%{_mandir}/man8/dmesg.8* -%ifnarch s390 s390x -%{_mandir}/man8/fdformat.8* -%endif -%{_mandir}/man8/ipcrm.8* -%{_mandir}/man8/ipcs.8* -%{_mandir}/man8/isosize.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 -%{_mandir}/man8/renice.8* -%{_mandir}/man8/setsid.8* -%ifnarch s390 s390x -%{_mandir}/man8/tunelp.8* -%endif -%{_mandir}/man8/vigr.8* -%{_mandir}/man8/vipw.8* - -%attr(4755,root,root) /bin/mount -%attr(4755,root,root) /bin/umount -/sbin/swapon -/sbin/swapoff -%{_mandir}/man5/fstab.5* -%{_mandir}/man8/mount.8* -%{_mandir}/man8/swapoff.8* -%{_mandir}/man8/swapon.8* -%{_mandir}/man8/umount.8* -%{_mandir}/man8/losetup.8* -/sbin/losetup - -%changelog -* Wed Aug 8 2007 Karel Zak 2.13-0.55 -- rebuild F7 package to F8 - -* Wed Aug 8 2007 Karel Zak 2.13-0.54 -- backport mount relatime patch - -* Thu Aug 2 2007 Karel Zak 2.13-0.53 -- fix #236848 - mount/fstab.c:lock_mtab() should open with proper permissions -- fix #238918 - blockdev --getsize does not work properly on devices with more than 2^31 sectors - -* Mon Jul 9 2007 Karel Zak 2.13-0.52 -- fix #245578 - login's PAM configuration inits the keyring at an inconvenient time -- fix #231532 - "pamconsole" not documented in mount(8) -- fix #243930 - translation files exist, but are not being used -- fix #228731 - sfdisk doesn't support DM-MP device (add default heads and sectors) -- fix #231192 - ipcs is not printing correct values on pLinux -- fix #245912 - mount doesn't write the 'loop=...' option in /etc/mtab when mounting a loop device -- fix #213253 - "cal -3" generates improperly formatted output - -* 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. From 271c831047a1276ffa9ee28fe7f3e6a393e6edd3 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 20 Aug 2007 11:25:54 +0000 Subject: [PATCH 087/425] add dead.package file --- dead.package | 1 + 1 file changed, 1 insertion(+) create mode 100644 dead.package diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..54ef3a5 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Obsolete in favor of util-linux-ng. From 73db4af8d9e4ca4576fff20a3517bc6a7ccc2542 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 20 Aug 2007 12:26:45 +0000 Subject: [PATCH 088/425] remove the rest of old files --- .cvsignore | 2 -- Makefile | 6 ---- nologin.8 | 63 --------------------------------------- nologin.c | 58 ----------------------------------- util-linux-60-raw.rules | 11 ------- util-linux-chsh-chfn.pamd | 6 ---- util-linux-login.pamd | 15 ---------- util-linux-remote.pamd | 15 ---------- 8 files changed, 176 deletions(-) delete mode 100644 .cvsignore delete mode 100644 Makefile delete mode 100644 nologin.8 delete mode 100644 nologin.c delete mode 100644 util-linux-60-raw.rules delete mode 100644 util-linux-chsh-chfn.pamd delete mode 100644 util-linux-login.pamd delete mode 100644 util-linux-remote.pamd diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index fe49e67..0000000 --- a/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -floppy-0.12.tar.gz -util-linux-2.13-pre7.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index 4ec2b9c..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile for source rpm: util-linux -# $Id$ -NAME := util-linux -SPECFILE = $(firstword $(wildcard *.spec)) - -include ../common/Makefile.common 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/util-linux-60-raw.rules b/util-linux-60-raw.rules deleted file mode 100644 index 2279c91..0000000 --- a/util-linux-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-chsh-chfn.pamd b/util-linux-chsh-chfn.pamd deleted file mode 100644 index 2dbc0aa..0000000 --- a/util-linux-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-login.pamd b/util-linux-login.pamd deleted file mode 100644 index 9e8ca3b..0000000 --- a/util-linux-login.pamd +++ /dev/null @@ -1,15 +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 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 optional pam_ck_connector.so diff --git a/util-linux-remote.pamd b/util-linux-remote.pamd deleted file mode 100644 index 705203e..0000000 --- a/util-linux-remote.pamd +++ /dev/null @@ -1,15 +0,0 @@ -#%PAM-1.0 -auth required 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 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 - From fd7089e44b5b5d1062906341252299c4acebb7b5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Jan 2011 09:56:35 +0100 Subject: [PATCH 089/425] 2.19-0.1: initial import of util-linux Note that the upstream package has been renamed from util-linux-ng back to util-linux. The util-linux-ng is obsolete now. Signed-off-by: Karel Zak --- .gitignore | 3 + dead.package | 1 - 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-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.spec | 2297 +++++++++++++++++++++ uuidd.init | 117 ++ 19 files changed, 2922 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 dead.package create mode 100644 mount.tmpfs create mode 100644 nologin.8 create mode 100644 nologin.c create mode 100644 sources create mode 100644 util-linux-ng-2.13-ctrlaltdel-man.patch create mode 100644 util-linux-ng-2.13-fdformat-man-ide.patch create mode 100644 util-linux-ng-2.13-floppy-generic.patch create mode 100644 util-linux-ng-2.13-floppy-locale.patch create mode 100644 util-linux-ng-2.13-login-lastlog.patch create mode 100644 util-linux-ng-2.15-ipcs-32bit.patch create mode 100644 util-linux-ng-2.16-blkid-cachefile.patch create mode 100644 util-linux-ng-60-raw.rules create mode 100644 util-linux-ng-chsh-chfn.pamd create mode 100644 util-linux-ng-login.pamd create mode 100644 util-linux-ng-remote.pamd create mode 100644 util-linux.spec create mode 100755 uuidd.init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..627ffce --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/floppy-0.16.tar.bz2 +/util-linux-2.19-rc1.tar.bz2 +/util-linux-2.19-rc1-32-gbded43d.tar.bz2 diff --git a/dead.package b/dead.package deleted file mode 100644 index 54ef3a5..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Obsolete in favor of util-linux-ng. diff --git a/mount.tmpfs b/mount.tmpfs new file mode 100644 index 0000000..5495c9d --- /dev/null +++ b/mount.tmpfs @@ -0,0 +1,51 @@ +#! /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 new file mode 100644 index 0000000..5cb1601 --- /dev/null +++ b/nologin.8 @@ -0,0 +1,63 @@ +.\" $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 new file mode 100644 index 0000000..8a51ba9 --- /dev/null +++ b/nologin.c @@ -0,0 +1,58 @@ +/* $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 new file mode 100644 index 0000000..0ed7d18 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 +96714c97fda4a18b7480eac71ab421fa util-linux-2.19-rc1-32-gbded43d.tar.bz2 diff --git a/util-linux-ng-2.13-ctrlaltdel-man.patch b/util-linux-ng-2.13-ctrlaltdel-man.patch new file mode 100644 index 0000000..ab7c6bd --- /dev/null +++ b/util-linux-ng-2.13-ctrlaltdel-man.patch @@ -0,0 +1,10 @@ +--- 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 new file mode 100644 index 0000000..1116641 --- /dev/null +++ b/util-linux-ng-2.13-fdformat-man-ide.patch @@ -0,0 +1,23 @@ +--- 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 new file mode 100644 index 0000000..ffc4750 --- /dev/null +++ b/util-linux-ng-2.13-floppy-generic.patch @@ -0,0 +1,102 @@ +--- 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 new file mode 100644 index 0000000..9b8142f --- /dev/null +++ b/util-linux-ng-2.13-floppy-locale.patch @@ -0,0 +1,10 @@ +--- 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 new file mode 100644 index 0000000..548b99d --- /dev/null +++ b/util-linux-ng-2.13-login-lastlog.patch @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..c3860f1 --- /dev/null +++ b/util-linux-ng-2.15-ipcs-32bit.patch @@ -0,0 +1,48 @@ +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 new file mode 100644 index 0000000..7edd4e9 --- /dev/null +++ b/util-linux-ng-2.16-blkid-cachefile.patch @@ -0,0 +1,78 @@ +--- + 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-60-raw.rules b/util-linux-ng-60-raw.rules new file mode 100644 index 0000000..2279c91 --- /dev/null +++ b/util-linux-ng-60-raw.rules @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 0000000..2dbc0aa --- /dev/null +++ b/util-linux-ng-chsh-chfn.pamd @@ -0,0 +1,6 @@ +#%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 new file mode 100644 index 0000000..2c9a3a2 --- /dev/null +++ b/util-linux-ng-login.pamd @@ -0,0 +1,16 @@ +#%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 new file mode 100644 index 0000000..d8f83f3 --- /dev/null +++ b/util-linux-ng-remote.pamd @@ -0,0 +1,14 @@ +#%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.spec b/util-linux.spec new file mode 100644 index 0000000..899dd71 --- /dev/null +++ b/util-linux.spec @@ -0,0 +1,2297 @@ +### Header +Summary: A collection of basic system utilities +Name: util-linux +Version: 2.19 +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 + +%define upstream_version %{version}-rc1-32-gbded43d + +### Features +%if 0%{?rhel} +%define include_raw 1 +%else +%define include_raw 0 +%endif + +%define mtab_symlink 1 + +### Macros +%define floppyver 0.16 +%define cytune_archs %{ix86} alpha armv4l + +### Dependences +BuildRequires: audit-libs-devel >= 1.0.6 +BuildRequires: gettext-devel +BuildRequires: libselinux-devel +BuildRequires: ncurses-devel +BuildRequires: pam-devel +BuildRequires: zlib-devel +BuildRequires: popt-devel +BuildRequires: libutempter-devel + +### Sources +#Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{upstream_version}.tar.bz2 + +Source0: util-linux-%{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 +# old versions of e2fsprogs contain fsck, uuidgen +Conflicts: e2fsprogs < 1.41.8-5 +# rename from util-linux-ng back to util-linux +Obsoletes: util-linux-ng < 2.19 +Provides: util-linux-ng = %{version}-%{release} + +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 + +%description +The util-linux 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. + + +%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. + + +%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. + + +%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. + + +%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 + +%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 +%if %{mtab_symlink} + --enable-libmount-mount \ +%endif + --with-selinux \ + --with-audit \ + --with-utempter \ + --disable-makeinstall-chown + +# build util-linux +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}%{_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 +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 + +%if %{mtab_symlink} + ln -s /proc/mounts %{buildroot}/etc/mtab +%else + touch %{buildroot}/etc/mtab +%endif + +# /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 + +# 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 + +%post +# 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 +%if %{mtab_symlink} + ln -s /proc/mounts /etc/mtab + /bin/chown root:root /etc/mtab +%else + touch /etc/mtab + /bin/chown root:root /etc/mtab + /bin/chmod 0644 /etc/mtab +%endif + + +%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 +%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab + +/bin/dmesg +/bin/findmnt +/bin/kill +/bin/lsblk +/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/fstrim +/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 + +%{_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}/ru/man1/ddate.1.gz + +%{_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/fstrim.8* +%{_mandir}/man8/isosize.8* +%{_mandir}/man8/ldattach.8* +%{_mandir}/man8/losetup.8* +%{_mandir}/man8/lsblk.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) +%doc licenses/COPYING.GPL +/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) +%doc shlibs/mount/COPYING.libmount +/%{_lib}/libmount.so.* + +%files -n libmount-devel +%defattr(-,root,root) +%doc shlibs/mount/COPYING.libmount +%{_libdir}/libmount.so +%{_includedir}/mount +%{_libdir}/pkgconfig/mount.pc + + +%files -n libblkid +%defattr(-,root,root) +%doc shlibs/blkid/COPYING.libblkid +%dir /etc/blkid +/%{_lib}/libblkid.so.* + +%files -n libblkid-devel +%defattr(-,root,root) +%doc shlibs/blkid/COPYING.libblkid +%{_libdir}/libblkid.so +%{_includedir}/blkid +%{_mandir}/man3/libblkid.3* +%{_libdir}/pkgconfig/blkid.pc + + +%files -n libuuid +%defattr(-,root,root) +%doc shlibs/uuid/COPYING.libuuid +/%{_lib}/libuuid.so.* + +%files -n libuuid-devel +%defattr(-,root,root) +%doc shlibs/uuid/COPYING.libuuid +%{_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 +* Wed Jan 5 2011 Karel Zak 2.19-0.1 +- upgrade to the release 2.19-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes + +* 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 new file mode 100755 index 0000000..9fba666 --- /dev/null +++ b/uuidd.init @@ -0,0 +1,117 @@ +#!/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 $? From 4c5e4a495190c74806d9619b770d7b81e4dbeea6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Jan 2011 10:39:22 +0100 Subject: [PATCH 090/425] 2.19-0.2: clean up specfile Signed-off-by: Karel Zak --- util-linux.spec | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 899dd71..5a2465a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -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 @@ -20,7 +20,7 @@ URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux ### Macros %define floppyver 0.16 -%define cytune_archs %{ix86} alpha armv4l +%define cytune_archs %{ix86} alpha %{arm} ### Dependences BuildRequires: audit-libs-devel >= 1.0.6 @@ -283,7 +283,7 @@ install -d ${RPM_BUILD_ROOT}/var/lib/libuuid # libtool junk rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la -%ifarch sparc sparc64 sparcv9 +%ifarch %{sparc} rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid cat << E-O-F > ${RPM_BUILD_ROOT}%{_bindir}/sunhostid #!/bin/sh @@ -337,7 +337,7 @@ done %endif # unsupported on SPARCs -%ifarch sparc sparcv9 sparc64 +%ifarch %{sparc} for I in /sbin/sfdisk \ %{_mandir}/man8/sfdisk.8* \ %doc fdisk/sfdisk.examples \ @@ -440,12 +440,13 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then fi fi %if %{mtab_symlink} - ln -s /proc/mounts /etc/mtab - /bin/chown root:root /etc/mtab +rm -f /etc/mtab +ln -s /proc/mounts /etc/mtab +/bin/chown root:root /etc/mtab %else - touch /etc/mtab - /bin/chown root:root /etc/mtab - /bin/chmod 0644 /etc/mtab +touch /etc/mtab +/bin/chown root:root /etc/mtab +/bin/chmod 0644 /etc/mtab %endif @@ -670,7 +671,7 @@ fi %{_mandir}/man8/tunelp.8* %endif -%ifnarch sparc sparcv9 sparc64 +%ifnarch %{sparc} %doc fdisk/sfdisk.examples /sbin/cfdisk /sbin/sfdisk @@ -678,7 +679,7 @@ fi %{_mandir}/man8/sfdisk.8* %endif -%ifarch sparc sparc64 sparcv9 +%ifarch %{sparc} %{_bindir}/sunhostid %endif @@ -751,6 +752,9 @@ fi %changelog +* Wed Jan 19 2011 Karel Zak 2.19-0.2 +- clean up specfile (review #667416) + * Wed Jan 5 2011 Karel Zak 2.19-0.1 - upgrade to the release 2.19-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes @@ -2139,7 +2143,7 @@ acquisition of controlling terminal). * Thu Mar 25 1999 Jeff Johnson - include sfdisk (#1164) - fix write (#1784) -- use positive logic in spec file (%%ifarch rather than %ifnarch). +- 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) From 54f17daa1b0fd709660863a06bdf50b65c3abd0f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 25 Jan 2011 15:33:36 +0100 Subject: [PATCH 091/425] 2.19-0.3: upgrade to -rc2 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 17 ++++++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 627ffce..6414d63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /floppy-0.16.tar.bz2 /util-linux-2.19-rc1.tar.bz2 /util-linux-2.19-rc1-32-gbded43d.tar.bz2 +/util-linux-2.19-rc2.tar.bz2 diff --git a/sources b/sources index 0ed7d18..6c973b2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -96714c97fda4a18b7480eac71ab421fa util-linux-2.19-rc1-32-gbded43d.tar.bz2 +ff2ec40dcae191048f9a3a0175e632a6 util-linux-2.19-rc2.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index 5a2465a..f1a4291 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -Release: 0.2%{?dist} +Release: 0.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 -%define upstream_version %{version}-rc1-32-gbded43d +%define upstream_version %{version}-rc2 ### Features %if 0%{?rhel} @@ -33,9 +33,7 @@ BuildRequires: popt-devel BuildRequires: libutempter-devel ### Sources -#Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{upstream_version}.tar.bz2 - -Source0: util-linux-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{upstream_version}.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -442,7 +440,6 @@ fi %if %{mtab_symlink} rm -f /etc/mtab ln -s /proc/mounts /etc/mtab -/bin/chown root:root /etc/mtab %else touch /etc/mtab /bin/chown root:root /etc/mtab @@ -708,7 +705,7 @@ fi %defattr(-,root,root) %doc shlibs/mount/COPYING.libmount %{_libdir}/libmount.so -%{_includedir}/mount +%{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc @@ -752,6 +749,12 @@ fi %changelog +* Tue Jan 25 2011 Karel Zak 2.19-0.3 +- upgrade to the release 2.19-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc2-ChangeLog +- fix #671893 - SELinux is preventing /bin/chown from 'setattr' accesses + on the file mounts. + * Wed Jan 19 2011 Karel Zak 2.19-0.2 - clean up specfile (review #667416) From 37c7a135408fa49c45efb86ab7a2eced6ffd171b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 25 Jan 2011 17:37:28 +0100 Subject: [PATCH 092/425] 2.19-0.4: upgrade to v2.19-rc3 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6414d63..6095e9b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /util-linux-2.19-rc1.tar.bz2 /util-linux-2.19-rc1-32-gbded43d.tar.bz2 /util-linux-2.19-rc2.tar.bz2 +/util-linux-2.19-rc3.tar.bz2 diff --git a/sources b/sources index 6c973b2..099ae3d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -ff2ec40dcae191048f9a3a0175e632a6 util-linux-2.19-rc2.tar.bz2 +89423502d34bd1e6da0ad29ac716145f util-linux-2.19-rc3.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index f1a4291..ba483f8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -Release: 0.3%{?dist} +Release: 0.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 -%define upstream_version %{version}-rc2 +%define upstream_version %{version}-rc3 ### Features %if 0%{?rhel} @@ -749,6 +749,10 @@ fi %changelog +* Tue Jan 25 2011 Karel Zak 2.19-0.4 +- upgrade to the release 2.19-rc3 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc3-ChangeLog + * Tue Jan 25 2011 Karel Zak 2.19-0.3 - upgrade to the release 2.19-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc2-ChangeLog From 9641d59f73bf373ec5b76dda03a99b790e24b4c9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 18:45:53 -0600 Subject: [PATCH 093/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index ba483f8..2779987 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -Release: 0.4%{?dist} +Release: 0.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 @@ -749,6 +749,9 @@ fi %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 2.19-0.5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Tue Jan 25 2011 Karel Zak 2.19-0.4 - upgrade to the release 2.19-rc3 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc3-ChangeLog From a5988fe3ea16ecf44882ab6254ecb9738c9ba128 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 8 Feb 2011 17:30:48 +0100 Subject: [PATCH 094/425] 2.19-0.6: fix #665062 Signed-off-by: Karel Zak --- ...linux-ng-60-raw.rules => util-linux-60-raw.rules | 0 ...x-ng-chsh-chfn.pamd => util-linux-chsh-chfn.pamd | 0 util-linux-ng-login.pamd => util-linux-login.pamd | 4 +++- util-linux-ng-remote.pamd => util-linux-remote.pamd | 4 +++- util-linux.spec | 13 ++++++++----- 5 files changed, 14 insertions(+), 7 deletions(-) rename util-linux-ng-60-raw.rules => util-linux-60-raw.rules (100%) rename util-linux-ng-chsh-chfn.pamd => util-linux-chsh-chfn.pamd (100%) rename util-linux-ng-login.pamd => util-linux-login.pamd (86%) rename util-linux-ng-remote.pamd => util-linux-remote.pamd (84%) diff --git a/util-linux-ng-60-raw.rules b/util-linux-60-raw.rules similarity index 100% rename from util-linux-ng-60-raw.rules rename to util-linux-60-raw.rules diff --git a/util-linux-ng-chsh-chfn.pamd b/util-linux-chsh-chfn.pamd similarity index 100% rename from util-linux-ng-chsh-chfn.pamd rename to util-linux-chsh-chfn.pamd diff --git a/util-linux-ng-login.pamd b/util-linux-login.pamd similarity index 86% rename from util-linux-ng-login.pamd rename to util-linux-login.pamd index 2c9a3a2..3c03927 100644 --- a/util-linux-ng-login.pamd +++ b/util-linux-login.pamd @@ -1,6 +1,7 @@ #%PAM-1.0 auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so -auth include system-auth +auth substack system-auth +auth include postlogin account required pam_nologin.so account include system-auth password include system-auth @@ -13,4 +14,5 @@ session required pam_selinux.so open session required pam_namespace.so session optional pam_keyinit.so force revoke session include system-auth +session include postlogin -session optional pam_ck_connector.so diff --git a/util-linux-ng-remote.pamd b/util-linux-remote.pamd similarity index 84% rename from util-linux-ng-remote.pamd rename to util-linux-remote.pamd index d8f83f3..2f22cc2 100644 --- a/util-linux-ng-remote.pamd +++ b/util-linux-remote.pamd @@ -1,6 +1,7 @@ #%PAM-1.0 auth required pam_securetty.so -auth include password-auth +auth substack password-auth +auth include postlogin account required pam_nologin.so account include password-auth password include password-auth @@ -12,3 +13,4 @@ session required pam_selinux.so open session required pam_namespace.so session optional pam_keyinit.so force revoke session include password-auth +session include postlogin diff --git a/util-linux.spec b/util-linux.spec index 2779987..9acd324 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -Release: 0.5%{?dist} +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 @@ -34,10 +34,10 @@ BuildRequires: libutempter-devel ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{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 +Source1: util-linux-login.pamd +Source2: util-linux-remote.pamd +Source3: util-linux-chsh-chfn.pamd +Source4: util-linux-60-raw.rules Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 @@ -749,6 +749,9 @@ fi %changelog +* Tue Feb 8 2011 Karel Zak 2.19-0.6 +- fix #665062 - add support for the postlogin PAM stack to util-linux-ng + * Mon Feb 07 2011 Fedora Release Engineering - 2.19-0.5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 35ae1870533e94b56ced9e8b441a2c5c1eb415f1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 10 Feb 2011 10:49:59 +0100 Subject: [PATCH 095/425] 2.19-1: upgrade to stable release Signed-off-by: Karel Zak --- .gitignore | 1 + mount.tmpfs | 51 ------------------------------------------------- sources | 2 +- util-linux.spec | 17 ++++++++--------- 4 files changed, 10 insertions(+), 61 deletions(-) delete mode 100644 mount.tmpfs diff --git a/.gitignore b/.gitignore index 6095e9b..912a99f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /util-linux-2.19-rc1-32-gbded43d.tar.bz2 /util-linux-2.19-rc2.tar.bz2 /util-linux-2.19-rc3.tar.bz2 +/util-linux-2.19.tar.bz2 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/sources b/sources index 099ae3d..83b415d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -89423502d34bd1e6da0ad29ac716145f util-linux-2.19-rc3.tar.bz2 +590ca71aad0b254e2631d84401f28255 util-linux-2.19.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index 9acd324..490dd5b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -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 -%define upstream_version %{version}-rc3 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -38,7 +38,6 @@ Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd Source4: util-linux-60-raw.rules -Source5: mount.tmpfs Source8: nologin.c Source9: nologin.8 Source10: uuidd.init @@ -312,11 +311,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 -# 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* @@ -489,7 +483,6 @@ fi %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 @@ -749,6 +742,12 @@ fi %changelog + +* Thu Feb 10 2011 Karel Zak 2.19-1 +- upgrade to the release 2.19 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes +- remove /sbin/mount.tmpfs -- integrated to mount(8) + * Tue Feb 8 2011 Karel Zak 2.19-0.6 - fix #665062 - add support for the postlogin PAM stack to util-linux-ng From cbffb8f231902ad5afb36d5ac968e2b58ef676be Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 7 Mar 2011 10:55:11 +0100 Subject: [PATCH 096/425] 2.19-2: fix #682502 Signed-off-by: Karel Zak --- .gitignore | 4 ++++ sources | 2 +- ....patch => util-linux-2.19-floppy-generic.patch | 11 ++++++----- util-linux-2.19-floppy-locale.patch | 11 +++++++++++ util-linux-ng-2.13-floppy-locale.patch | 10 ---------- util-linux.spec | 15 +++++++++------ 6 files changed, 31 insertions(+), 22 deletions(-) rename util-linux-ng-2.13-floppy-generic.patch => util-linux-2.19-floppy-generic.patch (82%) create mode 100644 util-linux-2.19-floppy-locale.patch delete mode 100644 util-linux-ng-2.13-floppy-locale.patch diff --git a/.gitignore b/.gitignore index 912a99f..bf9fe4e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ /util-linux-2.19-rc2.tar.bz2 /util-linux-2.19-rc3.tar.bz2 /util-linux-2.19.tar.bz2 +*~ +.*.log +*.rpm +/floppy-0.18.tar.bz2 diff --git a/sources b/sources index 83b415d..4a5346f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 +a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 590ca71aad0b254e2631d84401f28255 util-linux-2.19.tar.bz2 diff --git a/util-linux-ng-2.13-floppy-generic.patch b/util-linux-2.19-floppy-generic.patch similarity index 82% rename from util-linux-ng-2.13-floppy-generic.patch rename to util-linux-2.19-floppy-generic.patch index ffc4750..eb12161 100644 --- a/util-linux-ng-2.13-floppy-generic.patch +++ b/util-linux-2.19-floppy-generic.patch @@ -1,6 +1,7 @@ ---- 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 @@ +diff -up util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak util-linux-2.19/floppy-0.18/floppyfloppy.c +--- util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak 2009-09-24 03:36:33.000000000 +0200 ++++ util-linux-2.19/floppy-0.18/floppyfloppy.c 2011-03-07 10:40:42.000000000 +0100 +@@ -271,6 +271,33 @@ static RETSIGTYPE sighandler(int signum) #endif } @@ -34,7 +35,7 @@ static int do_format(const char *dev, int fmtnum, int (*fmt_func)(const char *, int), int flags) -@@ -275,6 +302,7 @@ +@@ -282,6 +309,7 @@ static int do_format(const char *dev, in struct format_descr curtrack; int pct; struct stat stat_buf; @@ -42,7 +43,7 @@ int i, j; char *devname; -@@ -297,23 +325,52 @@ +@@ -304,23 +332,52 @@ static int do_format(const char *dev, in strcat(strcpy(devname, dev), floppy_type[fmtnum].dev); diff --git a/util-linux-2.19-floppy-locale.patch b/util-linux-2.19-floppy-locale.patch new file mode 100644 index 0000000..43ecae9 --- /dev/null +++ b/util-linux-2.19-floppy-locale.patch @@ -0,0 +1,11 @@ +diff -up util-linux-2.19/floppy-0.18/superfloppy.c.kzak util-linux-2.19/floppy-0.18/superfloppy.c +--- util-linux-2.19/floppy-0.18/superfloppy.c.kzak 2009-09-23 02:47:26.000000000 +0200 ++++ util-linux-2.19/floppy-0.18/superfloppy.c 2011-03-07 10:37:20.000000000 +0100 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include 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.spec b/util-linux.spec index 490dd5b..e78acff 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,10 +2,10 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19 -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 +URL: http://kernel.org/~kzak/util-linux/ %define upstream_version %{version} @@ -19,7 +19,7 @@ URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux %define mtab_symlink 1 ### Macros -%define floppyver 0.16 +%define floppyver 0.18 %define cytune_archs %{ix86} alpha %{arm} ### Dependences @@ -41,7 +41,7 @@ Source4: util-linux-60-raw.rules Source8: nologin.c Source9: nologin.8 Source10: uuidd.init -Source11: http://dl.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 +Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides # old versions of e2fsprogs contain fsck, uuidgen @@ -64,11 +64,11 @@ Requires: udev ### Floppy patches (Fedora/RHEL specific) ### # add a missing header -Patch0: util-linux-ng-2.13-floppy-locale.patch +Patch0: util-linux-2.19-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 +Patch2: util-linux-2.19-floppy-generic.patch ### Fedora/RHEL specific patches -- need to die! ### @@ -742,6 +742,9 @@ fi %changelog +* Mon Mar 7 2011 Karel Zak 2.19-2 +- fix #682502 - Broken source URL to floppy tarball, new version available +- upgrade to floppy-0.18 * Thu Feb 10 2011 Karel Zak 2.19-1 - upgrade to the release 2.19 From ad1b19d2755d522c7e14af7c4121a2290f708485 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 Apr 2011 13:42:39 +0200 Subject: [PATCH 097/425] 2.19.1-0.1: upgrade to upstream 2.19.1-rc1 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bf9fe4e..b22ba54 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ .*.log *.rpm /floppy-0.18.tar.bz2 +/util-linux-2.19.1-rc1.tar.bz2 diff --git a/sources b/sources index 4a5346f..7a8ad49 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -590ca71aad0b254e2631d84401f28255 util-linux-2.19.tar.bz2 +516ae5d83108d4028da3224947e8658f util-linux-2.19.1-rc1.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index e78acff..741316f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.19 -Release: 2%{?dist} +Version: 2.19.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: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -742,6 +742,10 @@ fi %changelog +* Wed Apr 20 2011 Karel Zak 2.19.1-0.1 +- upgrade to the release 2.19.1-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-rc1-ChangeLog + * Mon Mar 7 2011 Karel Zak 2.19-2 - fix #682502 - Broken source URL to floppy tarball, new version available - upgrade to floppy-0.18 From 1d999308166261bf75e85f71eef409e74050fdb3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 6 May 2011 14:03:12 +0200 Subject: [PATCH 098/425] 2.19.1-1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b22ba54..c60fbf5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ *.rpm /floppy-0.18.tar.bz2 /util-linux-2.19.1-rc1.tar.bz2 +/util-linux-2.19.1.tar.bz2 diff --git a/sources b/sources index 7a8ad49..f3dea83 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +3eab06f05163dfa65479c44e5231932c util-linux-2.19.1.tar.bz2 a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -516ae5d83108d4028da3224947e8658f util-linux-2.19.1-rc1.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index 741316f..f700e0d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19.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: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version}-rc1 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -742,6 +742,10 @@ fi %changelog +* Fri May 6 2011 Karel Zak 2.19.1-1 +- upgrade to the release 2.19.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-ReleaseNotes + * Wed Apr 20 2011 Karel Zak 2.19.1-0.1 - upgrade to the release 2.19.1-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-rc1-ChangeLog From 6d73e5dfdfde62759df14d2c96917656c11d9bc7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 5 Jul 2011 00:05:24 +0200 Subject: [PATCH 099/425] 2.19.1-2: merge changes from f15 (#716483, #709681, #709319) Signed-off-by: Karel Zak --- util-linux-2.19-kernel-version.patch | 32 +++ util-linux-2.19-libmount-mounted.patch | 290 +++++++++++++++++++++++++ util-linux-2.19-mount-a-bind.patch | 105 +++++++++ util-linux-2.19-mount-fsname.patch | 33 +++ util-linux-2.19-mount-mountpoint.patch | 76 +++++++ util-linux.spec | 26 ++- 6 files changed, 561 insertions(+), 1 deletion(-) create mode 100644 util-linux-2.19-kernel-version.patch create mode 100644 util-linux-2.19-libmount-mounted.patch create mode 100644 util-linux-2.19-mount-a-bind.patch create mode 100644 util-linux-2.19-mount-fsname.patch create mode 100644 util-linux-2.19-mount-mountpoint.patch diff --git a/util-linux-2.19-kernel-version.patch b/util-linux-2.19-kernel-version.patch new file mode 100644 index 0000000..c15b93f --- /dev/null +++ b/util-linux-2.19-kernel-version.patch @@ -0,0 +1,32 @@ +From fa7e0d6d442de9f5940f99fd93f4522602439131 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 6 Jun 2011 12:35:26 +0200 +Subject: [PATCH] lib: [linux_version.c] accommodate two-component linux + version (e.g. 3.0) + +Signed-off-by: Karel Zak +--- + lib/linux_version.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/linux_version.c b/lib/linux_version.c +index f9fbd8d..ada566a 100644 +--- a/lib/linux_version.c ++++ b/lib/linux_version.c +@@ -16,10 +16,10 @@ get_linux_version (void) + return kver; + if (uname (&uts)) + kver = 0; +- else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) != 3) +- kver = 0; +- else ++ else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) == 3) + kver = KERNEL_VERSION (major, minor, teeny); ++ else if (sscanf (uts.release, "%d.%d", &major, &minor) == 2) ++ kver = KERNEL_VERSION (major, minor, 0); + + return kver; + } +-- +1.7.5.2 + diff --git a/util-linux-2.19-libmount-mounted.patch b/util-linux-2.19-libmount-mounted.patch new file mode 100644 index 0000000..99b8e38 --- /dev/null +++ b/util-linux-2.19-libmount-mounted.patch @@ -0,0 +1,290 @@ +From 5c60a0eab5155043f58fa88909d89e0b06cad2f8 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 31 May 2011 18:01:36 +0200 +Subject: [PATCH] libmount: add mnt_table_is_mounted() + +Signed-off-by: Karel Zak +--- + shlibs/mount/src/libmount.h.in | 3 + + shlibs/mount/src/libmount.sym | 1 + + shlibs/mount/src/tab.c | 210 ++++++++++++++++++++++++++++++++++++++++ + shlibs/mount/src/tab_update.c | 2 +- + 4 files changed, 215 insertions(+), 1 deletions(-) + +diff --git a/shlibs/mount/src/libmount.h.in b/shlibs/mount/src/libmount.h.in +index 3ea2f92..1522208 100644 +--- a/shlibs/mount/src/libmount.h.in ++++ b/shlibs/mount/src/libmount.h.in +@@ -308,6 +308,9 @@ extern int mnt_table_find_next_fs(struct libmnt_table *tb, + int (*match_func)(struct libmnt_fs *, void *), void *userdata, + struct libmnt_fs **fs); + ++extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs); ++ ++ + /* tab_update.c */ + extern struct libmnt_update *mnt_new_update(void); + extern void mnt_free_update(struct libmnt_update *upd); +diff --git a/shlibs/mount/src/libmount.sym b/shlibs/mount/src/libmount.sym +index 0b7c560..a498916 100644 +--- a/shlibs/mount/src/libmount.sym ++++ b/shlibs/mount/src/libmount.sym +@@ -195,6 +195,7 @@ global: + mnt_update_is_ready; + mnt_update_set_fs; + mnt_update_table; ++ mnt_table_is_fs_mounted; + local: + *; + }; +diff --git a/shlibs/mount/src/tab.c b/shlibs/mount/src/tab.c +index 2a6a235..38a5d5b 100644 +--- a/shlibs/mount/src/tab.c ++++ b/shlibs/mount/src/tab.c +@@ -712,6 +712,175 @@ struct libmnt_fs *mnt_table_find_pair(struct libmnt_table *tb, const char *sourc + return NULL; + } + ++/* ++ * @tb: /proc/self/mountinfo ++ * @fs: filesystem ++ * @mountflags: MS_BIND or 0 ++ * @fsroot: fs-root that will be probably used in the mountinfo file ++ * for @fs after mount(2) ++ * ++ * For btrfs subvolumes this function returns NULL, but @fsroot properly set. ++ * ++ * Returns: entry from @tb that will be used as a source for @fs if the @fs is ++ * bindmount. ++ */ ++struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, ++ struct libmnt_fs *fs, ++ unsigned long mountflags, ++ char **fsroot) ++{ ++ char *root = NULL, *mnt = NULL; ++ const char *fstype; ++ struct libmnt_fs *src_fs = NULL; ++ ++ assert(tb); ++ assert(fs); ++ assert(fsroot); ++ ++ DBG(TAB, mnt_debug("lookup fs-root for %s", mnt_fs_get_source(fs))); ++ ++ fstype = mnt_fs_get_fstype(fs); ++ ++ if (mountflags & MS_BIND) { ++ const char *src, *src_root; ++ ++ DBG(TAB, mnt_debug("fs-root for bind")); ++ ++ src = mnt_resolve_spec(mnt_fs_get_source(fs), tb->cache); ++ if (!src) ++ goto err; ++ ++ mnt = mnt_get_mountpoint(src); ++ if (!mnt) ++ goto err; ++ ++ root = mnt_get_fs_root(src, mnt); ++ ++ src_fs = mnt_table_find_target(tb, mnt, MNT_ITER_BACKWARD); ++ if (!src_fs) { ++ DBG(TAB, mnt_debug("not found '%s' in mountinfo -- using default", mnt)); ++ goto dflt; ++ } ++ ++ /* on btrfs the subvolume is used as fs-root in ++ * /proc/self/mountinfo, so we have to get the original subvolume ++ * name from src_fs and prepend the subvolume name to the ++ * fs-root path ++ */ ++ src_root = mnt_fs_get_root(src_fs); ++ if (src_root && !startswith(root, src_root)) { ++ size_t sz = strlen(root) + strlen(src_root) + 1; ++ char *tmp = malloc(sz); ++ ++ if (!tmp) ++ goto err; ++ snprintf(tmp, sz, "%s%s", src_root, root); ++ free(root); ++ root = tmp; ++ } ++ } ++ ++ /* ++ * btrfs-subvolume mount -- get subvolume name and use it as a root-fs path ++ */ ++ else if (fstype && !strcmp(fstype, "btrfs")) { ++ char *vol = NULL, *p; ++ size_t sz, volsz = 0; ++ ++ if (mnt_fs_get_option(fs, "subvol", &vol, &volsz)) ++ goto dflt; ++ ++ DBG(TAB, mnt_debug("setting FS root: btrfs subvol")); ++ ++ sz = volsz; ++ if (*vol != '/') ++ sz++; ++ root = malloc(sz + 1); ++ if (!root) ++ goto err; ++ p = root; ++ if (*vol != '/') ++ *p++ = '/'; ++ memcpy(p, vol, volsz); ++ *(root + sz) = '\0'; ++ } ++dflt: ++ if (!root) { ++ root = strdup("/"); ++ if (!root) ++ goto err; ++ } ++ *fsroot = root; ++ ++ DBG(TAB, mnt_debug("FS root result: %s", root)); ++ ++ free(mnt); ++ return src_fs; ++err: ++ free(root); ++ free(mnt); ++ return NULL; ++} ++ ++/** ++ * mnt_table_is_mounted: ++ * @tb: /proc/self/mountinfo file ++ * @fstab_fs: /etc/fstab entry ++ * ++ * Checks if the @fstab_fs entry is already in the @tb table. The "swap" ++ * is ignored. ++ * ++ * TODO: check for loopdev (see mount/mount.c is_fstab_entry_mounted(). ++ * ++ * Returns: 0 or 1 ++ */ ++int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) ++{ ++ char *root = NULL; ++ struct libmnt_fs *src_fs; ++ const char *src, *tgt; ++ int flags = 0, rc = 0; ++ ++ assert(tb); ++ assert(fstab_fs); ++ ++ if (fstab_fs->flags & MNT_FS_SWAP) ++ return 0; ++ ++ if (mnt_fs_get_option(fstab_fs, "bind", NULL, NULL) == 0) ++ flags = MS_BIND; ++ ++ src_fs = mnt_table_get_fs_root(tb, fstab_fs, flags, &root); ++ if (src_fs) ++ src = mnt_fs_get_srcpath(src_fs); ++ else ++ src = mnt_resolve_spec(mnt_fs_get_source(fstab_fs), tb->cache); ++ ++ tgt = mnt_fs_get_target(fstab_fs); ++ ++ if (tgt || src || root) { ++ struct libmnt_iter itr; ++ struct libmnt_fs *fs; ++ ++ mnt_reset_iter(&itr, MNT_ITER_FORWARD); ++ ++ while(mnt_table_next_fs(tb, &itr, &fs) == 0) { ++ const char *s = mnt_fs_get_srcpath(fs), ++ *t = mnt_fs_get_target(fs), ++ *r = mnt_fs_get_root(fs); ++ ++ if (s && t && r && !strcmp(t, tgt) && ++ !strcmp(s, src) && !strcmp(r, root)) ++ break; ++ } ++ if (fs) ++ rc = 1; /* success */ ++ } ++ ++ free(root); ++ return rc; ++} ++ + #ifdef TEST_PROGRAM + + static int parser_errcb(struct libmnt_table *tb, const char *filename, int line) +@@ -869,6 +1038,46 @@ done: + return rc; + } + ++static int test_is_mounted(struct libmnt_test *ts, int argc, char *argv[]) ++{ ++ struct libmnt_table *tb = NULL, *fstab = NULL; ++ struct libmnt_fs *fs; ++ struct libmnt_iter *itr = NULL; ++ int rc; ++ ++ tb = mnt_new_table_from_file("/proc/self/mountinfo"); ++ if (!tb) { ++ fprintf(stderr, "failed to parse mountinfo\n"); ++ return -1; ++ } ++ ++ fstab = create_table(argv[1]); ++ if (!fstab) ++ goto done; ++ ++ itr = mnt_new_iter(MNT_ITER_FORWARD); ++ if (!itr) ++ goto done; ++ ++ while(mnt_table_next_fs(fstab, itr, &fs) == 0) { ++ if (mnt_table_is_fs_mounted(tb, fs)) ++ printf("%s already mounted on %s\n", ++ mnt_fs_get_source(fs), ++ mnt_fs_get_target(fs)); ++ else ++ printf("%s not mounted on %s\n", ++ mnt_fs_get_source(fs), ++ mnt_fs_get_target(fs)); ++ } ++ ++ rc = 0; ++done: ++ mnt_free_table(tb); ++ mnt_free_table(fstab); ++ mnt_free_iter(itr); ++ return rc; ++} ++ + int main(int argc, char *argv[]) + { + struct libmnt_test tss[] = { +@@ -877,6 +1086,7 @@ int main(int argc, char *argv[]) + { "--find-backward", test_find_bw, " " }, + { "--find-pair", test_find_pair, " " }, + { "--copy-fs", test_copy_fs, " copy root FS from the file" }, ++ { "--is-mounted", test_is_mounted, " check what from are already mounted" }, + { NULL } + }; + +diff --git a/shlibs/mount/src/tab_update.c b/shlibs/mount/src/tab_update.c +index 5abb566..9817f20 100644 +--- a/shlibs/mount/src/tab_update.c ++++ b/shlibs/mount/src/tab_update.c +@@ -410,7 +410,7 @@ static int set_fs_root(struct libmnt_fs *result, struct libmnt_fs *fs, unsigned + mnt_fs_set_fstype(result, mnt_fs_get_fstype(src_fs)); + + /* on btrfs the subvolume is used as fs-root in +- * /proc/self/mountinfo, so we have get the original subvolume ++ * /proc/self/mountinfo, so we have to get the original subvolume + * name from src_fs and prepend the subvolume name to the + * fs-root path + */ +-- +1.7.5.2 + diff --git a/util-linux-2.19-mount-a-bind.patch b/util-linux-2.19-mount-a-bind.patch new file mode 100644 index 0000000..5d6eb59 --- /dev/null +++ b/util-linux-2.19-mount-a-bind.patch @@ -0,0 +1,105 @@ +From 0cac8948216a298deaf5fd30837ed9cc80618f80 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 31 May 2011 18:02:29 +0200 +Subject: [PATCH] mount: use libmount to detect already mounted bind mounts + +It's pretty tricky to detect that a bind mount from fstab is already +mounted on system without /etc/mtab. Let's use functionality from +libmount. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=701176 +Signed-off-by: Karel Zak +--- + mount/mount.c | 42 ++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 38 insertions(+), 4 deletions(-) + +diff --git a/mount/mount.c b/mount/mount.c +index 29963c2..3ba705f 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -212,7 +212,7 @@ static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, + *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; + + static int is_readonly(const char *node); +-static int mounted (const char *spec0, const char *node0); ++static int mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc); + static int check_special_mountprog(const char *spec, const char *node, + const char *type, int flags, char *extra_opts, int *status); + +@@ -1562,7 +1562,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, + /* The "mount -f" checks for for existing record in /etc/mtab (with + * regular non-fake mount this is usually done by kernel) + */ +- if (!(flags & MS_REMOUNT) && fake && mounted (spec, node)) ++ if (!(flags & MS_REMOUNT) && fake && mounted (spec, node, NULL)) + die(EX_USAGE, _("mount: according to mtab, " + "%s is already mounted on %s\n"), + spec, node); +@@ -2016,13 +2016,46 @@ mount_one (const char *spec, const char *node, const char *types, + return try_mount_one (spec, node, types, opts, freq, pass, 0); + } + ++#ifdef HAVE_LIBMOUNT_MOUNT ++static struct libmnt_table *minfo; /* parsed mountinfo file */ ++#endif ++ + /* Check if an fsname/dir pair was already in the old mtab. */ + static int +-mounted (const char *spec0, const char *node0) { ++mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc) { + struct mntentchn *mc, *mc0; + const char *spec, *node; + int ret = 0; + ++#ifdef HAVE_LIBMOUNT_MOUNT ++ /* ++ * Use libmount to check for already mounted bind mounts on systems ++ * without mtab. ++ */ ++ if (fstab_mc && fstab_mc->m.mnt_opts && ++ mtab_is_a_symlink() && strstr(fstab_mc->m.mnt_opts, "bind")) { ++ ++ struct libmnt_fs *fs = mnt_new_fs(); ++ int rc = fs ? 0 : -1; ++ ++ if (!rc) ++ rc = mnt_fs_set_fstype(fs, fstab_mc->m.mnt_type); ++ if (!rc) ++ rc = mnt_fs_set_source(fs, fstab_mc->m.mnt_fsname); ++ if (!rc) ++ rc = mnt_fs_set_target(fs, fstab_mc->m.mnt_dir); ++ if (!rc) ++ rc = mnt_fs_set_options(fs, fstab_mc->m.mnt_opts); ++ if (!rc && !minfo) ++ minfo = mnt_new_table_from_file("/proc/self/mountinfo"); ++ if (!rc && minfo) ++ rc = mnt_table_is_fs_mounted(minfo, fs); ++ ++ mnt_free_fs(fs); ++ if (rc == 1) ++ return 1; ++ } ++#endif + /* Handle possible UUID= and LABEL= in spec */ + spec = spec_to_devname(spec0); + if (!spec) +@@ -2030,6 +2063,7 @@ mounted (const char *spec0, const char *node0) { + + node = canonicalize(node0); + ++ + mc0 = mtab_head(); + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) + if (streq (spec, mc->m.mnt_fsname) && +@@ -2050,7 +2084,7 @@ is_fstab_entry_mounted(struct mntentchn *mc, int verbose) + { + struct stat st; + +- if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir)) ++ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir, mc)) + goto yes; + + /* extra care for loop devices */ +-- +1.7.5.2 + diff --git a/util-linux-2.19-mount-fsname.patch b/util-linux-2.19-mount-fsname.patch new file mode 100644 index 0000000..686d7fb --- /dev/null +++ b/util-linux-2.19-mount-fsname.patch @@ -0,0 +1,33 @@ +From aab72640daa7ee2db3d42fc8278ab86e3aef2d71 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 2 Jun 2011 14:53:42 +0200 +Subject: [PATCH] mount: canonicalize fstab mnt_dir + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=709681 +Signed-off-by: Karel Zak +--- + mount/fstab.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/mount/fstab.c b/mount/fstab.c +index 8ce733b..4fa26b4 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -455,7 +455,13 @@ getfs_by_dir (const char *dir) { + + cdir = canonicalize(dir); + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { +- if (streq(mc->m.mnt_dir, cdir)) { ++ int ok = streq(mc->m.mnt_dir, cdir); ++ if (!ok) { ++ char *dr = canonicalize(mc->m.mnt_dir); ++ ok = dr ? streq(dr, cdir) : 0; ++ free(dr); ++ } ++ if (ok) { + free(cdir); + return mc; + } +-- +1.7.5.2 + diff --git a/util-linux-2.19-mount-mountpoint.patch b/util-linux-2.19-mount-mountpoint.patch new file mode 100644 index 0000000..bd97aa7 --- /dev/null +++ b/util-linux-2.19-mount-mountpoint.patch @@ -0,0 +1,76 @@ +From 067e9b4934372f72b89b2c0442a3d28290834537 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 29 Jun 2011 09:02:50 +0200 +Subject: [PATCH] mount: first look for mountpoint + + # mount + +The current code looks for a device and then for a mountpoint in +/etc/fstab. This is not user friendly solution. People usually use + + # mount /dir + +to mount any filesystem. It makes more sense to check for mountpoint +and if not found then for device. + +This is also important for bind mounts, for example if you have in +your fstab: + + /dev/sda1 /mnt/foo auto defaults + /mnt/foo /mnt/bar none bind + +then + # mount /mnt/foo + +should be interpreted as the first entry and /dev/sda1 should be +mounted. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=716483 +Signed-off-by: Karel Zak +--- + mount/mount.8 | 11 +++++++++++ + mount/mount.c | 4 ++-- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/mount/mount.8 b/mount/mount.8 +index 8982537..e9a52dd 100644 +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -101,6 +101,17 @@ the pathname + refers to the root of the filesystem on + .IR device . + ++If only directory or device is given, for example: ++.RS ++ ++.br ++.BI "mount /dir" ++.br ++ ++.RE ++then mount looks for a mountpoint and if not found then for a device in the ++/etc/fstab file. ++ + .B The listing and help. + .RS + Three forms of invocation do not actually mount anything: +diff --git a/mount/mount.c b/mount/mount.c +index 3ba705f..00637f5 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -2347,10 +2347,10 @@ getfs(const char *spec, const char *uuid, const char *label) + else if (label) + mc = getfs_by_label(label); + else { +- mc = getfs_by_spec(spec); ++ mc = getfs_by_dir(spec); + + if (!mc) +- mc = getfs_by_dir(spec); ++ mc = getfs_by_spec(spec); + } + if (mc) + return mc; +-- +1.7.5.4 + diff --git a/util-linux.spec b/util-linux.spec index f700e0d..8b59dad 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.19.1 -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: http://kernel.org/~kzak/util-linux/ @@ -84,6 +84,18 @@ 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 +### +# kernel "3.0" +Patch9: util-linux-2.19-kernel-version.patch +# 709319 - 'mount -a' mounts already mounted directories +Patch10: util-linux-2.19-libmount-mounted.patch +Patch11: util-linux-2.19-mount-a-bind.patch +# 709681 - failure to mount if a mount point ends with a slash in /etc/fstab +Patch12: util-linux-2.19-mount-fsname.patch +# 716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup +Patch13: util-linux-2.19-mount-mountpoint.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -197,6 +209,12 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 + %build unset LINGUAS || : @@ -742,6 +760,12 @@ fi %changelog +* Mon Jul 4 2011 Karel Zak 2.19.1-2 +- fix #716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup +- fix #709681 - failure to mount if a mount point ends with a slash in /etc/fstab +- fix #709319 - 'mount -a' mounts already mounted directories +- fix kernel version parsing + * Fri May 6 2011 Karel Zak 2.19.1-1 - upgrade to the release 2.19.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-ReleaseNotes From c8007f2ee246d9618a72323f0dfddbb309d5eec8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 2 Aug 2011 16:56:01 +0200 Subject: [PATCH 100/425] 2.20-0.1: upgrade to 2.20-rc1 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux-2.20-blkid-cachefile.patch | 64 +++++++++++++++++++ util-linux-2.20-fdformat-man-ide.patch | 25 ++++++++ util-linux-ng-2.13-fdformat-man-ide.patch | 23 ------- util-linux-ng-2.16-blkid-cachefile.patch | 78 ----------------------- util-linux.spec | 48 ++++++-------- 7 files changed, 109 insertions(+), 132 deletions(-) create mode 100644 util-linux-2.20-blkid-cachefile.patch create mode 100644 util-linux-2.20-fdformat-man-ide.patch delete mode 100644 util-linux-ng-2.13-fdformat-man-ide.patch delete mode 100644 util-linux-ng-2.16-blkid-cachefile.patch diff --git a/.gitignore b/.gitignore index c60fbf5..13488f8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /floppy-0.18.tar.bz2 /util-linux-2.19.1-rc1.tar.bz2 /util-linux-2.19.1.tar.bz2 +/util-linux-2.20-rc1.tar.bz2 diff --git a/sources b/sources index f3dea83..11c77ff 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -3eab06f05163dfa65479c44e5231932c util-linux-2.19.1.tar.bz2 +a8ae69612162422b2d4d331ba90ef86d util-linux-2.20-rc1.tar.bz2 a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux-2.20-blkid-cachefile.patch b/util-linux-2.20-blkid-cachefile.patch new file mode 100644 index 0000000..12b75d5 --- /dev/null +++ b/util-linux-2.20-blkid-cachefile.patch @@ -0,0 +1,64 @@ +diff -up util-linux-2.20-rc1/libblkid/libblkid.3.kzak util-linux-2.20-rc1/libblkid/libblkid.3 +--- util-linux-2.20-rc1/libblkid/libblkid.3.kzak 2011-07-26 16:43:07.000000000 +0200 ++++ util-linux-2.20-rc1/libblkid/libblkid.3 2011-07-29 21:17:20.883777687 +0200 +@@ -28,7 +28,7 @@ partitions and block device topology. + .P + The high-level part of the library keeps information about block devices + 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 +@@ -69,7 +69,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 +@@ -87,7 +87,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-2.20-rc1/libblkid/src/blkidP.h.kzak util-linux-2.20-rc1/libblkid/src/blkidP.h +--- util-linux-2.20-rc1/libblkid/src/blkidP.h.kzak 2011-07-20 21:55:23.000000000 +0200 ++++ util-linux-2.20-rc1/libblkid/src/blkidP.h 2011-07-29 21:17:52.852169993 +0200 +@@ -286,7 +286,7 @@ extern char *blkid_strdup(const char *s) + extern char *blkid_strndup(const char *s, const int length); + extern char *blkid_strconcat(const char *a, const char *b, const char *c); + +-#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 -up util-linux-2.20-rc1/misc-utils/blkid.8.kzak util-linux-2.20-rc1/misc-utils/blkid.8 +--- util-linux-2.20-rc1/misc-utils/blkid.8.kzak 2011-07-20 21:55:23.000000000 +0200 ++++ util-linux-2.20-rc1/misc-utils/blkid.8 2011-07-29 21:15:37.312506693 +0200 +@@ -79,7 +79,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 . +@@ -242,7 +242,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 at all, specify + .IR /dev/null. + If not specified, it will be the same file as that given with the +diff -up util-linux-2.20-rc1/misc-utils/blkid.c.kzak util-linux-2.20-rc1/misc-utils/blkid.c diff --git a/util-linux-2.20-fdformat-man-ide.patch b/util-linux-2.20-fdformat-man-ide.patch new file mode 100644 index 0000000..de3618b --- /dev/null +++ b/util-linux-2.20-fdformat-man-ide.patch @@ -0,0 +1,25 @@ +diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk-utils/fdformat.8 +--- util-linux-2.20-rc1/disk-utils/fdformat.8.orig 2011-07-20 21:55:23.000000000 +0200 ++++ util-linux-2.20-rc1/disk-utils/fdformat.8 2011-07-29 21:08:57.558601033 +0200 +@@ -43,6 +43,11 @@ when a non-standard format is being used + autodetected earlier. In this case, use + .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 + \fB\-n\fR, \fB\-\-no\-verify\fR +@@ -58,7 +63,8 @@ Display help and exit. + .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-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.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.spec b/util-linux.spec index 8b59dad..dc77629 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.19.1 -Release: 2%{?dist} +Version: 2.20 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Features %if 0%{?rhel} @@ -66,7 +66,7 @@ Requires: udev # add a missing header Patch0: util-linux-2.19-floppy-locale.patch # add note about ATAPI IDE floppy to fdformat.8 -Patch1: util-linux-ng-2.13-fdformat-man-ide.patch +Patch1: util-linux-2.20-fdformat-man-ide.patch # 169628 - /usr/bin/floppy doesn't work with /dev/fd0 Patch2: util-linux-2.19-floppy-generic.patch @@ -75,7 +75,7 @@ Patch2: util-linux-2.19-floppy-generic.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.16-blkid-cachefile.patch +Patch5: util-linux-2.20-blkid-cachefile.patch ### Ready for upstream? ### @@ -84,18 +84,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 -### -# kernel "3.0" -Patch9: util-linux-2.19-kernel-version.patch -# 709319 - 'mount -a' mounts already mounted directories -Patch10: util-linux-2.19-libmount-mounted.patch -Patch11: util-linux-2.19-mount-a-bind.patch -# 709681 - failure to mount if a mount point ends with a slash in /etc/fstab -Patch12: util-linux-2.19-mount-fsname.patch -# 716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup -Patch13: util-linux-2.19-mount-mountpoint.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -209,12 +197,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch5 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 - %build unset LINGUAS || : @@ -514,6 +496,7 @@ fi /bin/kill /bin/lsblk /bin/more +/bin/mountpoint /bin/taskset /sbin/addpart @@ -606,6 +589,7 @@ fi %{_mandir}/man1/lscpu.1* %{_mandir}/man1/mcookie.1* %{_mandir}/man1/more.1* +%{_mandir}/man1/mountpoint.1* %{_mandir}/man1/namei.1* %{_mandir}/man1/readprofile.1* %{_mandir}/man1/rename.1* @@ -622,7 +606,6 @@ fi %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* - %{_mandir}/ru/man1/ddate.1.gz %{_mandir}/man5/fstab.5* @@ -709,12 +692,12 @@ fi %files -n libmount %defattr(-,root,root) -%doc shlibs/mount/COPYING.libmount +%doc libmount/COPYING.libmount /%{_lib}/libmount.so.* %files -n libmount-devel %defattr(-,root,root) -%doc shlibs/mount/COPYING.libmount +%doc libmount/COPYING.libmount %{_libdir}/libmount.so %{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc @@ -722,13 +705,13 @@ fi %files -n libblkid %defattr(-,root,root) -%doc shlibs/blkid/COPYING.libblkid +%doc libblkid/COPYING.libblkid %dir /etc/blkid /%{_lib}/libblkid.so.* %files -n libblkid-devel %defattr(-,root,root) -%doc shlibs/blkid/COPYING.libblkid +%doc libblkid/COPYING.libblkid %{_libdir}/libblkid.so %{_includedir}/blkid %{_mandir}/man3/libblkid.3* @@ -737,12 +720,12 @@ fi %files -n libuuid %defattr(-,root,root) -%doc shlibs/uuid/COPYING.libuuid +%doc libuuid/COPYING.libuuid /%{_lib}/libuuid.so.* %files -n libuuid-devel %defattr(-,root,root) -%doc shlibs/uuid/COPYING.libuuid +%doc libuuid/COPYING.libuuid %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -752,6 +735,7 @@ fi %{_mandir}/man3/uuid_generate.3* %{_mandir}/man3/uuid_generate_random.3* %{_mandir}/man3/uuid_generate_time.3* +%{_mandir}/man3/uuid_generate_time_safe.3* %{_mandir}/man3/uuid_is_null.3* %{_mandir}/man3/uuid_parse.3* %{_mandir}/man3/uuid_time.3* @@ -760,6 +744,10 @@ fi %changelog +* Fri Aug 2 2021 Karel Zak 2.20.0.1 +- upgrade to the release 2.20-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-ReleaseNotes + * Mon Jul 4 2011 Karel Zak 2.19.1-2 - fix #716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup - fix #709681 - failure to mount if a mount point ends with a slash in /etc/fstab From 16cfb1591e87b760e012c28f58974726a934e523 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 17 Aug 2011 11:34:12 +0200 Subject: [PATCH 101/425] 2.20.0.2: upgrade to -rc2 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- ...bit.patch => util-linux-2.20-ipcs-32bit.patch | 16 +++++++++------- util-linux.spec | 10 +++++++--- 4 files changed, 18 insertions(+), 11 deletions(-) rename util-linux-ng-2.15-ipcs-32bit.patch => util-linux-2.20-ipcs-32bit.patch (75%) diff --git a/.gitignore b/.gitignore index 13488f8..a79a8e2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /util-linux-2.19.1-rc1.tar.bz2 /util-linux-2.19.1.tar.bz2 /util-linux-2.20-rc1.tar.bz2 +/util-linux-2.20-rc2.tar.bz2 diff --git a/sources b/sources index 11c77ff..255d8c3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -a8ae69612162422b2d4d331ba90ef86d util-linux-2.20-rc1.tar.bz2 +e730bbbe41e4a80926e183b45a337c77 util-linux-2.20-rc2.tar.bz2 a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux-ng-2.15-ipcs-32bit.patch b/util-linux-2.20-ipcs-32bit.patch similarity index 75% rename from util-linux-ng-2.15-ipcs-32bit.patch rename to util-linux-2.20-ipcs-32bit.patch index c3860f1..ae6f060 100644 --- a/util-linux-ng-2.15-ipcs-32bit.patch +++ b/util-linux-2.20-ipcs-32bit.patch @@ -1,10 +1,10 @@ -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); +diff -up util-linux-2.20-rc2/sys-utils/ipcs.c.kzak util-linux-2.20-rc2/sys-utils/ipcs.c +--- util-linux-2.20-rc2/sys-utils/ipcs.c.kzak 2011-08-12 11:13:00.000000000 +0200 ++++ util-linux-2.20-rc2/sys-utils/ipcs.c 2011-08-17 01:16:23.629928605 +0200 +@@ -255,6 +255,28 @@ print_perms (int id, struct ipc_perm *ip } + +static unsigned long long +shminfo_from_proc(const char *name, unsigned long def) +{ @@ -25,10 +25,12 @@ diff -up util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.15.1-rc1 + fclose(f); + return res; +} - ++ ++ void do_shm (char format) { -@@ -266,12 +286,12 @@ void do_shm (char format) + int maxid, shmid, id; +@@ -277,12 +299,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.spec b/util-linux.spec index dc77629..918a995 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.20 -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: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Features %if 0%{?rhel} @@ -82,7 +82,7 @@ Patch5: util-linux-2.20-blkid-cachefile.patch # 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 +Patch8: util-linux-2.20-ipcs-32bit.patch %description The util-linux package contains a large variety of low-level system @@ -744,6 +744,10 @@ fi %changelog +* Wed Aug 17 2021 Karel Zak 2.20.0.2 +- upgrade to the release 2.20-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-rc2-ChangeLog + * Fri Aug 2 2021 Karel Zak 2.20.0.1 - upgrade to the release 2.20-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-ReleaseNotes From dc4135e72431179b127ff198c03b541b57ffe9ff Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 29 Aug 2011 14:27:52 +0200 Subject: [PATCH 102/425] 2.20-1: upgrade to stable 2.20 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 12 ++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a79a8e2..799bb9e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /util-linux-2.19.1.tar.bz2 /util-linux-2.20-rc1.tar.bz2 /util-linux-2.20-rc2.tar.bz2 +/util-linux-2.20.tar.bz2 diff --git a/sources b/sources index 255d8c3..667c1cd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -e730bbbe41e4a80926e183b45a337c77 util-linux-2.20-rc2.tar.bz2 a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 +4dcacdbdafa116635e52b977d9d0e879 util-linux-2.20.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index 918a995..a45e494 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.20 -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: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Features %if 0%{?rhel} @@ -214,6 +214,7 @@ export SUID_LDFLAGS="-pie" --enable-login-utils \ --enable-kill \ --enable-write \ + --enable-ddate \ %if %{include_raw} --enable-raw \ %endif @@ -744,11 +745,14 @@ fi %changelog -* Wed Aug 17 2021 Karel Zak 2.20.0.2 +* Mon Aug 29 2011 Karel Zak 2.20-1 +- upgrade to the release 2.20 + +* Wed Aug 17 2011 Karel Zak 2.20-0.2 - upgrade to the release 2.20-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-rc2-ChangeLog -* Fri Aug 2 2021 Karel Zak 2.20.0.1 +* Fri Aug 2 2011 Karel Zak 2.20-0.1 - upgrade to the release 2.20-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-ReleaseNotes From 8a8438a08042259fcc4f2eb7a117ece3a8d35a80 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 20 Oct 2011 12:01:01 +0200 Subject: [PATCH 103/425] 2.20.1-1: upgrade to the release 2.20.1 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 799bb9e..c30c148 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /util-linux-2.20-rc1.tar.bz2 /util-linux-2.20-rc2.tar.bz2 /util-linux-2.20.tar.bz2 +/util-linux-2.20.1.tar.bz2 diff --git a/sources b/sources index 667c1cd..5d01ad1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +079b37517fd4e002a2e6e992e8b4e361 util-linux-2.20.1.tar.bz2 a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -4dcacdbdafa116635e52b977d9d0e879 util-linux-2.20.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index a45e494..f780646 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.20 +Version: 2.20.1 Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -33,7 +33,9 @@ BuildRequires: popt-devel BuildRequires: libutempter-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{upstream_version}.tar.bz2 +#Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{upstream_version}.tar.bz2 +# +Source0: ftp://ftp.infradead.org/pub/util-linux/v2.20/util-linux-%{upstream_version}.tar.bz2 Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -745,6 +747,10 @@ fi %changelog +* Thu Oct 20 2011 Karel Zak 2.20.1-1 +- upgrade to the release 2.20.1 + ftp://ftp.infradead.org/pub/util-linux/v2.20/v2.20.1-ReleaseNotes + * Mon Aug 29 2011 Karel Zak 2.20-1 - upgrade to the release 2.20 From 9966c1fdc63483280b12bc8b5f8590a42791bd14 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 26 Oct 2011 19:28:12 -0500 Subject: [PATCH 104/425] - Rebuilt for glibc bug#747377 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index f780646..3cd1d83 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.20.1 -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: http://kernel.org/~kzak/util-linux/ @@ -747,6 +747,9 @@ fi %changelog +* Wed Oct 26 2011 Fedora Release Engineering - 2.20.1-2 +- Rebuilt for glibc bug#747377 + * Thu Oct 20 2011 Karel Zak 2.20.1-1 - upgrade to the release 2.20.1 ftp://ftp.infradead.org/pub/util-linux/v2.20/v2.20.1-ReleaseNotes From 8587dd2a9ae226f5b57f3ea7e669cf93e1963edb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 22 Nov 2011 16:29:24 +0100 Subject: [PATCH 105/425] 2.20.1-3: #748216, remove ddate(1) Signed-off-by: Karel Zak --- util-linux.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 3cd1d83..f4c091c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.20.1 -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: http://kernel.org/~kzak/util-linux/ @@ -53,7 +53,7 @@ Obsoletes: util-linux-ng < 2.19 Provides: util-linux-ng = %{version}-%{release} Requires(post): coreutils -Requires: pam >= 1.0.90, /etc/pam.d/system-auth +Requires: pam >= 1.1.3-7, /etc/pam.d/system-auth Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} @@ -216,7 +216,6 @@ export SUID_LDFLAGS="-pie" --enable-login-utils \ --enable-kill \ --enable-write \ - --enable-ddate \ %if %{include_raw} --enable-raw \ %endif @@ -533,7 +532,6 @@ fi %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column -%{_bindir}/ddate %{_bindir}/fallocate %{_bindir}/flock %{_bindir}/getopt @@ -575,7 +573,6 @@ fi %{_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* @@ -609,7 +606,6 @@ fi %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* -%{_mandir}/ru/man1/ddate.1.gz %{_mandir}/man5/fstab.5* @@ -747,6 +743,10 @@ fi %changelog +* Tue Nov 22 2011 Karel Zak 2.20.1-3 +- fix #748216 - util-linux requires pam >= 1.1.3-7 +- remove ddate(1) + * Wed Oct 26 2011 Fedora Release Engineering - 2.20.1-2 - Rebuilt for glibc bug#747377 From d1bad96edd5cbdc831f47acfbe677d65b081c166 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 01:41:40 -0600 Subject: [PATCH 106/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index f4c091c..6c60ce2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.20.1 -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: http://kernel.org/~kzak/util-linux/ @@ -743,6 +743,9 @@ fi %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 2.20.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Nov 22 2011 Karel Zak 2.20.1-3 - fix #748216 - util-linux requires pam >= 1.1.3-7 - remove ddate(1) From b2fdd8fbf36e01818925cd30723e066a732148d1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 25 Jan 2012 15:07:47 +0100 Subject: [PATCH 107/425] install everything in /usr This patch is needed for the /usr-move feature https://fedoraproject.org/wiki/Features/UsrMove This package requires now 'filesystem' >= 3, which is only installable on a system which has /bin, /sbin, /lib, /lib64 as symlinks to /usr and not regular directories. The 'filesystem' package acts as a guard, to prevent *this* package to be installed on old unconverted systems. New installations will have the 'filesystem' >=3 layout right away, old installations need to be converted with anaconda or dracut first; only after that, the 'filesystem' package, and also *this* package can be installed. Packages *should* not install files in /bin, /sbin, /lib, /lib64, but only in the corresponding directories in /usr. Packages *must* not install conflicting files with the same names in the corresponding directories in / and /usr. Especially compatibilty symlinks must not be installed. Feel free to modify any of the changes to the spec file, but keep the above in mind. --- util-linux.spec | 142 +++++++++++++++++++++++------------------------- 1 file changed, 68 insertions(+), 74 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 6c60ce2..8108f7d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.20.1 -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: http://kernel.org/~kzak/util-linux/ @@ -22,7 +22,7 @@ URL: http://kernel.org/~kzak/util-linux/ %define floppyver 0.18 %define cytune_archs %{ix86} alpha %{arm} -### Dependences +### Dependencies BuildRequires: audit-libs-devel >= 1.0.6 BuildRequires: gettext-devel BuildRequires: libselinux-devel @@ -51,6 +51,17 @@ Conflicts: e2fsprogs < 1.41.8-5 # rename from util-linux-ng back to util-linux Obsoletes: util-linux-ng < 2.19 Provides: util-linux-ng = %{version}-%{release} +Conflicts: filesystem < 3 +Provides: /bin/dmesg +Provides: /bin/kill +Provides: /bin/more +Provides: /bin/mount +Provides: /bin/umount +Provides: /sbin/blkid +Provides: /sbin/blockdev +Provides: /sbin/findfs +Provides: /sbin/fsck +Provides: /sbin/nologin Requires(post): coreutils Requires: pam >= 1.1.3-7, /etc/pam.d/system-auth @@ -60,7 +71,7 @@ Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} %if %{include_raw} -Requires: udev +Requires: udev >= 176 %endif ### Floppy patches (Fedora/RHEL specific) @@ -98,6 +109,7 @@ Summary: Device mounting library Group: Development/Libraries License: LGPLv2+ Requires: libblkid = %{version}-%{release} +Conflicts: filesystem < 3 %description -n libmount This is the device mounting library, part of util-linux. @@ -120,6 +132,7 @@ Summary: Block device ID library Group: Development/Libraries License: LGPLv2+ Requires: libuuid = %{version}-%{release} +Conflicts: filesystem < 3 %description -n libblkid This is block device identification library, part of util-linux. @@ -141,6 +154,7 @@ part of util-linux. Summary: Universally unique ID library Group: Development/Libraries License: BSD +Conflicts: filesystem < 3 %description -n libuuid This is the universally unique ID library, part of e2fsprogs. @@ -207,9 +221,6 @@ export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" %configure \ - --bindir=/bin \ - --sbindir=/sbin \ - --libdir=/%{_lib} \ --disable-silent-rules \ --disable-wall \ --enable-partx \ @@ -241,7 +252,6 @@ 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}%{_mandir}/man{1,6,8,5} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} @@ -259,15 +269,15 @@ make install DESTDIR=${RPM_BUILD_ROOT} popd # install nologin -install -m 755 nologin ${RPM_BUILD_ROOT}/sbin +install -m 755 nologin ${RPM_BUILD_ROOT}%{_sbindir} 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 + mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/udev/rules.d + pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/udev/rules.d install -m 644 %{SOURCE4} ./60-raw.rules popd } @@ -309,8 +319,7 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid popd } -ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock -ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock +ln -sf hwclock ${RPM_BUILD_ROOT}%{_sbindir}/clock echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 # unsupported on ix86 alpha armv4l @@ -322,8 +331,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* %ifarch s390 s390x for I in /usr/{bin,sbin}/{fdformat,tunelp,floppy} \ %{_mandir}/man8/{fdformat,tunelp,floppy}.8* \ - /sbin/{hwclock,clock} \ - /usr/sbin/hwclock \ + /usr/sbin/{hwclock,clock} \ %{_mandir}/man8/{hwclock,clock}.8*; do rm -f $RPM_BUILD_ROOT$I @@ -343,9 +351,9 @@ done %endif # deprecated commands -for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ +for I in /usr/sbin/fsck.minix /usr/sbin/mkfs.{bfs,minix} /usr/sbin/sln \ /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /sbin/shutdown /usr/sbin/vipw /usr/sbin/vigr; do + /usr/sbin/shutdown /usr/sbin/vipw /usr/sbin/vigr; do rm -f $RPM_BUILD_ROOT$I done @@ -369,28 +377,12 @@ 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 - %if %{mtab_symlink} ln -s /proc/mounts %{buildroot}/etc/mtab %else touch %{buildroot}/etc/mtab %endif -# /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 @@ -483,9 +475,9 @@ fi %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) /bin/login +%attr(4755,root,root) %{_bindir}/mount +%attr(4755,root,root) %{_bindir}/umount +%attr(755,root,root) %{_bindir}/login %attr(4711,root,root) %{_bindir}/chfn %attr(4711,root,root) %{_bindir}/chsh %attr(2755,root,tty) %{_bindir}/write @@ -493,38 +485,37 @@ fi %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab -/bin/dmesg -/bin/findmnt -/bin/kill -/bin/lsblk -/bin/more -/bin/mountpoint -/bin/taskset +%{_bindir}/dmesg +%{_bindir}/findmnt +%{_bindir}/lsblk +%{_bindir}/more +%{_bindir}/mountpoint +%{_bindir}/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/fstrim -/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 +%{_sbindir}/addpart +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blockdev +%{_sbindir}/ctrlaltdel +%{_sbindir}/delpart +%{_sbindir}/fdisk +%{_sbindir}/findfs +%{_sbindir}/fsck +%{_sbindir}/fsck.cramfs +%{_sbindir}/fsfreeze +%{_sbindir}/fstrim +%{_sbindir}/losetup +%{_sbindir}/mkfs +%{_sbindir}/mkfs.cramfs +%{_sbindir}/mkswap +%{_sbindir}/nologin +%{_sbindir}/partx +%{_sbindir}/pivot_root +%{_sbindir}/swaplabel +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root +%{_sbindir}/wipefs %{_bindir}/cal %{_bindir}/chrt @@ -641,15 +632,14 @@ fi %{_mandir}/man8/wipefs.8* %if %{include_raw} -/bin/raw +%{_bindir}/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 +%{_sbindir}/clock %{_bindir}/floppy %{_sbindir}/fdformat %{_sbindir}/hwclock @@ -663,8 +653,8 @@ fi %ifnarch %{sparc} %doc fdisk/sfdisk.examples -/sbin/cfdisk -/sbin/sfdisk +%{_sbindir}/cfdisk +%{_sbindir}/sfdisk %{_mandir}/man8/cfdisk.8* %{_mandir}/man8/sfdisk.8* %endif @@ -692,7 +682,7 @@ fi %files -n libmount %defattr(-,root,root) %doc libmount/COPYING.libmount -/%{_lib}/libmount.so.* +%{_libdir}/libmount.so.* %files -n libmount-devel %defattr(-,root,root) @@ -706,7 +696,7 @@ fi %defattr(-,root,root) %doc libblkid/COPYING.libblkid %dir /etc/blkid -/%{_lib}/libblkid.so.* +%{_libdir}/libblkid.so.* %files -n libblkid-devel %defattr(-,root,root) @@ -720,7 +710,7 @@ fi %files -n libuuid %defattr(-,root,root) %doc libuuid/COPYING.libuuid -/%{_lib}/libuuid.so.* +%{_libdir}/libuuid.so.* %files -n libuuid-devel %defattr(-,root,root) @@ -743,6 +733,10 @@ fi %changelog +* Wed Jan 25 2012 Harald Hoyer 2.20.1-5 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + * Sat Jan 14 2012 Fedora Release Engineering - 2.20.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From f6117ff853237c88a03058cbf639e6552afda43c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 7 Feb 2012 14:12:06 +0100 Subject: [PATCH 108/425] 2.21-0.1: upgrade to v2.21-rc2 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux-2.19-kernel-version.patch | 32 -- util-linux-2.19-libmount-mounted.patch | 290 ------------------ util-linux-2.19-mount-a-bind.patch | 105 ------- util-linux-2.19-mount-fsname.patch | 33 -- util-linux-2.19-mount-mountpoint.patch | 76 ----- util-linux-2.20-blkid-cachefile.patch | 64 ---- ....patch => util-linux-2.21-ipcs-32bit.patch | 31 +- util-linux-60-raw.rules | 7 +- util-linux-ng-2.13-ctrlaltdel-man.patch | 10 - util-linux-ng-2.13-login-lastlog.patch | 13 - util-linux-ng-2.21-login-lastlog.patch | 11 + util-linux.spec | 138 ++++----- 14 files changed, 91 insertions(+), 722 deletions(-) delete mode 100644 util-linux-2.19-kernel-version.patch delete mode 100644 util-linux-2.19-libmount-mounted.patch delete mode 100644 util-linux-2.19-mount-a-bind.patch delete mode 100644 util-linux-2.19-mount-fsname.patch delete mode 100644 util-linux-2.19-mount-mountpoint.patch delete mode 100644 util-linux-2.20-blkid-cachefile.patch rename util-linux-2.20-ipcs-32bit.patch => util-linux-2.21-ipcs-32bit.patch (57%) delete mode 100644 util-linux-ng-2.13-ctrlaltdel-man.patch delete mode 100644 util-linux-ng-2.13-login-lastlog.patch create mode 100644 util-linux-ng-2.21-login-lastlog.patch diff --git a/.gitignore b/.gitignore index c30c148..d4bacee 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /util-linux-2.20-rc2.tar.bz2 /util-linux-2.20.tar.bz2 /util-linux-2.20.1.tar.bz2 +/util-linux-2.21-rc2.tar.xz diff --git a/sources b/sources index 5d01ad1..8e1a93c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -079b37517fd4e002a2e6e992e8b4e361 util-linux-2.20.1.tar.bz2 +d36eb7c452ffb79d71e619710894305d util-linux-2.21-rc2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux-2.19-kernel-version.patch b/util-linux-2.19-kernel-version.patch deleted file mode 100644 index c15b93f..0000000 --- a/util-linux-2.19-kernel-version.patch +++ /dev/null @@ -1,32 +0,0 @@ -From fa7e0d6d442de9f5940f99fd93f4522602439131 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 6 Jun 2011 12:35:26 +0200 -Subject: [PATCH] lib: [linux_version.c] accommodate two-component linux - version (e.g. 3.0) - -Signed-off-by: Karel Zak ---- - lib/linux_version.c | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/linux_version.c b/lib/linux_version.c -index f9fbd8d..ada566a 100644 ---- a/lib/linux_version.c -+++ b/lib/linux_version.c -@@ -16,10 +16,10 @@ get_linux_version (void) - return kver; - if (uname (&uts)) - kver = 0; -- else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) != 3) -- kver = 0; -- else -+ else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) == 3) - kver = KERNEL_VERSION (major, minor, teeny); -+ else if (sscanf (uts.release, "%d.%d", &major, &minor) == 2) -+ kver = KERNEL_VERSION (major, minor, 0); - - return kver; - } --- -1.7.5.2 - diff --git a/util-linux-2.19-libmount-mounted.patch b/util-linux-2.19-libmount-mounted.patch deleted file mode 100644 index 99b8e38..0000000 --- a/util-linux-2.19-libmount-mounted.patch +++ /dev/null @@ -1,290 +0,0 @@ -From 5c60a0eab5155043f58fa88909d89e0b06cad2f8 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 31 May 2011 18:01:36 +0200 -Subject: [PATCH] libmount: add mnt_table_is_mounted() - -Signed-off-by: Karel Zak ---- - shlibs/mount/src/libmount.h.in | 3 + - shlibs/mount/src/libmount.sym | 1 + - shlibs/mount/src/tab.c | 210 ++++++++++++++++++++++++++++++++++++++++ - shlibs/mount/src/tab_update.c | 2 +- - 4 files changed, 215 insertions(+), 1 deletions(-) - -diff --git a/shlibs/mount/src/libmount.h.in b/shlibs/mount/src/libmount.h.in -index 3ea2f92..1522208 100644 ---- a/shlibs/mount/src/libmount.h.in -+++ b/shlibs/mount/src/libmount.h.in -@@ -308,6 +308,9 @@ extern int mnt_table_find_next_fs(struct libmnt_table *tb, - int (*match_func)(struct libmnt_fs *, void *), void *userdata, - struct libmnt_fs **fs); - -+extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs); -+ -+ - /* tab_update.c */ - extern struct libmnt_update *mnt_new_update(void); - extern void mnt_free_update(struct libmnt_update *upd); -diff --git a/shlibs/mount/src/libmount.sym b/shlibs/mount/src/libmount.sym -index 0b7c560..a498916 100644 ---- a/shlibs/mount/src/libmount.sym -+++ b/shlibs/mount/src/libmount.sym -@@ -195,6 +195,7 @@ global: - mnt_update_is_ready; - mnt_update_set_fs; - mnt_update_table; -+ mnt_table_is_fs_mounted; - local: - *; - }; -diff --git a/shlibs/mount/src/tab.c b/shlibs/mount/src/tab.c -index 2a6a235..38a5d5b 100644 ---- a/shlibs/mount/src/tab.c -+++ b/shlibs/mount/src/tab.c -@@ -712,6 +712,175 @@ struct libmnt_fs *mnt_table_find_pair(struct libmnt_table *tb, const char *sourc - return NULL; - } - -+/* -+ * @tb: /proc/self/mountinfo -+ * @fs: filesystem -+ * @mountflags: MS_BIND or 0 -+ * @fsroot: fs-root that will be probably used in the mountinfo file -+ * for @fs after mount(2) -+ * -+ * For btrfs subvolumes this function returns NULL, but @fsroot properly set. -+ * -+ * Returns: entry from @tb that will be used as a source for @fs if the @fs is -+ * bindmount. -+ */ -+struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, -+ struct libmnt_fs *fs, -+ unsigned long mountflags, -+ char **fsroot) -+{ -+ char *root = NULL, *mnt = NULL; -+ const char *fstype; -+ struct libmnt_fs *src_fs = NULL; -+ -+ assert(tb); -+ assert(fs); -+ assert(fsroot); -+ -+ DBG(TAB, mnt_debug("lookup fs-root for %s", mnt_fs_get_source(fs))); -+ -+ fstype = mnt_fs_get_fstype(fs); -+ -+ if (mountflags & MS_BIND) { -+ const char *src, *src_root; -+ -+ DBG(TAB, mnt_debug("fs-root for bind")); -+ -+ src = mnt_resolve_spec(mnt_fs_get_source(fs), tb->cache); -+ if (!src) -+ goto err; -+ -+ mnt = mnt_get_mountpoint(src); -+ if (!mnt) -+ goto err; -+ -+ root = mnt_get_fs_root(src, mnt); -+ -+ src_fs = mnt_table_find_target(tb, mnt, MNT_ITER_BACKWARD); -+ if (!src_fs) { -+ DBG(TAB, mnt_debug("not found '%s' in mountinfo -- using default", mnt)); -+ goto dflt; -+ } -+ -+ /* on btrfs the subvolume is used as fs-root in -+ * /proc/self/mountinfo, so we have to get the original subvolume -+ * name from src_fs and prepend the subvolume name to the -+ * fs-root path -+ */ -+ src_root = mnt_fs_get_root(src_fs); -+ if (src_root && !startswith(root, src_root)) { -+ size_t sz = strlen(root) + strlen(src_root) + 1; -+ char *tmp = malloc(sz); -+ -+ if (!tmp) -+ goto err; -+ snprintf(tmp, sz, "%s%s", src_root, root); -+ free(root); -+ root = tmp; -+ } -+ } -+ -+ /* -+ * btrfs-subvolume mount -- get subvolume name and use it as a root-fs path -+ */ -+ else if (fstype && !strcmp(fstype, "btrfs")) { -+ char *vol = NULL, *p; -+ size_t sz, volsz = 0; -+ -+ if (mnt_fs_get_option(fs, "subvol", &vol, &volsz)) -+ goto dflt; -+ -+ DBG(TAB, mnt_debug("setting FS root: btrfs subvol")); -+ -+ sz = volsz; -+ if (*vol != '/') -+ sz++; -+ root = malloc(sz + 1); -+ if (!root) -+ goto err; -+ p = root; -+ if (*vol != '/') -+ *p++ = '/'; -+ memcpy(p, vol, volsz); -+ *(root + sz) = '\0'; -+ } -+dflt: -+ if (!root) { -+ root = strdup("/"); -+ if (!root) -+ goto err; -+ } -+ *fsroot = root; -+ -+ DBG(TAB, mnt_debug("FS root result: %s", root)); -+ -+ free(mnt); -+ return src_fs; -+err: -+ free(root); -+ free(mnt); -+ return NULL; -+} -+ -+/** -+ * mnt_table_is_mounted: -+ * @tb: /proc/self/mountinfo file -+ * @fstab_fs: /etc/fstab entry -+ * -+ * Checks if the @fstab_fs entry is already in the @tb table. The "swap" -+ * is ignored. -+ * -+ * TODO: check for loopdev (see mount/mount.c is_fstab_entry_mounted(). -+ * -+ * Returns: 0 or 1 -+ */ -+int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) -+{ -+ char *root = NULL; -+ struct libmnt_fs *src_fs; -+ const char *src, *tgt; -+ int flags = 0, rc = 0; -+ -+ assert(tb); -+ assert(fstab_fs); -+ -+ if (fstab_fs->flags & MNT_FS_SWAP) -+ return 0; -+ -+ if (mnt_fs_get_option(fstab_fs, "bind", NULL, NULL) == 0) -+ flags = MS_BIND; -+ -+ src_fs = mnt_table_get_fs_root(tb, fstab_fs, flags, &root); -+ if (src_fs) -+ src = mnt_fs_get_srcpath(src_fs); -+ else -+ src = mnt_resolve_spec(mnt_fs_get_source(fstab_fs), tb->cache); -+ -+ tgt = mnt_fs_get_target(fstab_fs); -+ -+ if (tgt || src || root) { -+ struct libmnt_iter itr; -+ struct libmnt_fs *fs; -+ -+ mnt_reset_iter(&itr, MNT_ITER_FORWARD); -+ -+ while(mnt_table_next_fs(tb, &itr, &fs) == 0) { -+ const char *s = mnt_fs_get_srcpath(fs), -+ *t = mnt_fs_get_target(fs), -+ *r = mnt_fs_get_root(fs); -+ -+ if (s && t && r && !strcmp(t, tgt) && -+ !strcmp(s, src) && !strcmp(r, root)) -+ break; -+ } -+ if (fs) -+ rc = 1; /* success */ -+ } -+ -+ free(root); -+ return rc; -+} -+ - #ifdef TEST_PROGRAM - - static int parser_errcb(struct libmnt_table *tb, const char *filename, int line) -@@ -869,6 +1038,46 @@ done: - return rc; - } - -+static int test_is_mounted(struct libmnt_test *ts, int argc, char *argv[]) -+{ -+ struct libmnt_table *tb = NULL, *fstab = NULL; -+ struct libmnt_fs *fs; -+ struct libmnt_iter *itr = NULL; -+ int rc; -+ -+ tb = mnt_new_table_from_file("/proc/self/mountinfo"); -+ if (!tb) { -+ fprintf(stderr, "failed to parse mountinfo\n"); -+ return -1; -+ } -+ -+ fstab = create_table(argv[1]); -+ if (!fstab) -+ goto done; -+ -+ itr = mnt_new_iter(MNT_ITER_FORWARD); -+ if (!itr) -+ goto done; -+ -+ while(mnt_table_next_fs(fstab, itr, &fs) == 0) { -+ if (mnt_table_is_fs_mounted(tb, fs)) -+ printf("%s already mounted on %s\n", -+ mnt_fs_get_source(fs), -+ mnt_fs_get_target(fs)); -+ else -+ printf("%s not mounted on %s\n", -+ mnt_fs_get_source(fs), -+ mnt_fs_get_target(fs)); -+ } -+ -+ rc = 0; -+done: -+ mnt_free_table(tb); -+ mnt_free_table(fstab); -+ mnt_free_iter(itr); -+ return rc; -+} -+ - int main(int argc, char *argv[]) - { - struct libmnt_test tss[] = { -@@ -877,6 +1086,7 @@ int main(int argc, char *argv[]) - { "--find-backward", test_find_bw, " " }, - { "--find-pair", test_find_pair, " " }, - { "--copy-fs", test_copy_fs, " copy root FS from the file" }, -+ { "--is-mounted", test_is_mounted, " check what from are already mounted" }, - { NULL } - }; - -diff --git a/shlibs/mount/src/tab_update.c b/shlibs/mount/src/tab_update.c -index 5abb566..9817f20 100644 ---- a/shlibs/mount/src/tab_update.c -+++ b/shlibs/mount/src/tab_update.c -@@ -410,7 +410,7 @@ static int set_fs_root(struct libmnt_fs *result, struct libmnt_fs *fs, unsigned - mnt_fs_set_fstype(result, mnt_fs_get_fstype(src_fs)); - - /* on btrfs the subvolume is used as fs-root in -- * /proc/self/mountinfo, so we have get the original subvolume -+ * /proc/self/mountinfo, so we have to get the original subvolume - * name from src_fs and prepend the subvolume name to the - * fs-root path - */ --- -1.7.5.2 - diff --git a/util-linux-2.19-mount-a-bind.patch b/util-linux-2.19-mount-a-bind.patch deleted file mode 100644 index 5d6eb59..0000000 --- a/util-linux-2.19-mount-a-bind.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 0cac8948216a298deaf5fd30837ed9cc80618f80 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 31 May 2011 18:02:29 +0200 -Subject: [PATCH] mount: use libmount to detect already mounted bind mounts - -It's pretty tricky to detect that a bind mount from fstab is already -mounted on system without /etc/mtab. Let's use functionality from -libmount. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=701176 -Signed-off-by: Karel Zak ---- - mount/mount.c | 42 ++++++++++++++++++++++++++++++++++++++---- - 1 files changed, 38 insertions(+), 4 deletions(-) - -diff --git a/mount/mount.c b/mount/mount.c -index 29963c2..3ba705f 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -212,7 +212,7 @@ static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit, - *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper; - - static int is_readonly(const char *node); --static int mounted (const char *spec0, const char *node0); -+static int mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc); - static int check_special_mountprog(const char *spec, const char *node, - const char *type, int flags, char *extra_opts, int *status); - -@@ -1562,7 +1562,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, - /* The "mount -f" checks for for existing record in /etc/mtab (with - * regular non-fake mount this is usually done by kernel) - */ -- if (!(flags & MS_REMOUNT) && fake && mounted (spec, node)) -+ if (!(flags & MS_REMOUNT) && fake && mounted (spec, node, NULL)) - die(EX_USAGE, _("mount: according to mtab, " - "%s is already mounted on %s\n"), - spec, node); -@@ -2016,13 +2016,46 @@ mount_one (const char *spec, const char *node, const char *types, - return try_mount_one (spec, node, types, opts, freq, pass, 0); - } - -+#ifdef HAVE_LIBMOUNT_MOUNT -+static struct libmnt_table *minfo; /* parsed mountinfo file */ -+#endif -+ - /* Check if an fsname/dir pair was already in the old mtab. */ - static int --mounted (const char *spec0, const char *node0) { -+mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc) { - struct mntentchn *mc, *mc0; - const char *spec, *node; - int ret = 0; - -+#ifdef HAVE_LIBMOUNT_MOUNT -+ /* -+ * Use libmount to check for already mounted bind mounts on systems -+ * without mtab. -+ */ -+ if (fstab_mc && fstab_mc->m.mnt_opts && -+ mtab_is_a_symlink() && strstr(fstab_mc->m.mnt_opts, "bind")) { -+ -+ struct libmnt_fs *fs = mnt_new_fs(); -+ int rc = fs ? 0 : -1; -+ -+ if (!rc) -+ rc = mnt_fs_set_fstype(fs, fstab_mc->m.mnt_type); -+ if (!rc) -+ rc = mnt_fs_set_source(fs, fstab_mc->m.mnt_fsname); -+ if (!rc) -+ rc = mnt_fs_set_target(fs, fstab_mc->m.mnt_dir); -+ if (!rc) -+ rc = mnt_fs_set_options(fs, fstab_mc->m.mnt_opts); -+ if (!rc && !minfo) -+ minfo = mnt_new_table_from_file("/proc/self/mountinfo"); -+ if (!rc && minfo) -+ rc = mnt_table_is_fs_mounted(minfo, fs); -+ -+ mnt_free_fs(fs); -+ if (rc == 1) -+ return 1; -+ } -+#endif - /* Handle possible UUID= and LABEL= in spec */ - spec = spec_to_devname(spec0); - if (!spec) -@@ -2030,6 +2063,7 @@ mounted (const char *spec0, const char *node0) { - - node = canonicalize(node0); - -+ - mc0 = mtab_head(); - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) - if (streq (spec, mc->m.mnt_fsname) && -@@ -2050,7 +2084,7 @@ is_fstab_entry_mounted(struct mntentchn *mc, int verbose) - { - struct stat st; - -- if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir)) -+ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir, mc)) - goto yes; - - /* extra care for loop devices */ --- -1.7.5.2 - diff --git a/util-linux-2.19-mount-fsname.patch b/util-linux-2.19-mount-fsname.patch deleted file mode 100644 index 686d7fb..0000000 --- a/util-linux-2.19-mount-fsname.patch +++ /dev/null @@ -1,33 +0,0 @@ -From aab72640daa7ee2db3d42fc8278ab86e3aef2d71 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 2 Jun 2011 14:53:42 +0200 -Subject: [PATCH] mount: canonicalize fstab mnt_dir - -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=709681 -Signed-off-by: Karel Zak ---- - mount/fstab.c | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) - -diff --git a/mount/fstab.c b/mount/fstab.c -index 8ce733b..4fa26b4 100644 ---- a/mount/fstab.c -+++ b/mount/fstab.c -@@ -455,7 +455,13 @@ getfs_by_dir (const char *dir) { - - cdir = canonicalize(dir); - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { -- if (streq(mc->m.mnt_dir, cdir)) { -+ int ok = streq(mc->m.mnt_dir, cdir); -+ if (!ok) { -+ char *dr = canonicalize(mc->m.mnt_dir); -+ ok = dr ? streq(dr, cdir) : 0; -+ free(dr); -+ } -+ if (ok) { - free(cdir); - return mc; - } --- -1.7.5.2 - diff --git a/util-linux-2.19-mount-mountpoint.patch b/util-linux-2.19-mount-mountpoint.patch deleted file mode 100644 index bd97aa7..0000000 --- a/util-linux-2.19-mount-mountpoint.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 067e9b4934372f72b89b2c0442a3d28290834537 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 29 Jun 2011 09:02:50 +0200 -Subject: [PATCH] mount: first look for mountpoint - - # mount - -The current code looks for a device and then for a mountpoint in -/etc/fstab. This is not user friendly solution. People usually use - - # mount /dir - -to mount any filesystem. It makes more sense to check for mountpoint -and if not found then for device. - -This is also important for bind mounts, for example if you have in -your fstab: - - /dev/sda1 /mnt/foo auto defaults - /mnt/foo /mnt/bar none bind - -then - # mount /mnt/foo - -should be interpreted as the first entry and /dev/sda1 should be -mounted. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=716483 -Signed-off-by: Karel Zak ---- - mount/mount.8 | 11 +++++++++++ - mount/mount.c | 4 ++-- - 2 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/mount/mount.8 b/mount/mount.8 -index 8982537..e9a52dd 100644 ---- a/mount/mount.8 -+++ b/mount/mount.8 -@@ -101,6 +101,17 @@ the pathname - refers to the root of the filesystem on - .IR device . - -+If only directory or device is given, for example: -+.RS -+ -+.br -+.BI "mount /dir" -+.br -+ -+.RE -+then mount looks for a mountpoint and if not found then for a device in the -+/etc/fstab file. -+ - .B The listing and help. - .RS - Three forms of invocation do not actually mount anything: -diff --git a/mount/mount.c b/mount/mount.c -index 3ba705f..00637f5 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -2347,10 +2347,10 @@ getfs(const char *spec, const char *uuid, const char *label) - else if (label) - mc = getfs_by_label(label); - else { -- mc = getfs_by_spec(spec); -+ mc = getfs_by_dir(spec); - - if (!mc) -- mc = getfs_by_dir(spec); -+ mc = getfs_by_spec(spec); - } - if (mc) - return mc; --- -1.7.5.4 - diff --git a/util-linux-2.20-blkid-cachefile.patch b/util-linux-2.20-blkid-cachefile.patch deleted file mode 100644 index 12b75d5..0000000 --- a/util-linux-2.20-blkid-cachefile.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -up util-linux-2.20-rc1/libblkid/libblkid.3.kzak util-linux-2.20-rc1/libblkid/libblkid.3 ---- util-linux-2.20-rc1/libblkid/libblkid.3.kzak 2011-07-26 16:43:07.000000000 +0200 -+++ util-linux-2.20-rc1/libblkid/libblkid.3 2011-07-29 21:17:20.883777687 +0200 -@@ -28,7 +28,7 @@ partitions and block device topology. - .P - The high-level part of the library keeps information about block devices - 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 -@@ -69,7 +69,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 -@@ -87,7 +87,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-2.20-rc1/libblkid/src/blkidP.h.kzak util-linux-2.20-rc1/libblkid/src/blkidP.h ---- util-linux-2.20-rc1/libblkid/src/blkidP.h.kzak 2011-07-20 21:55:23.000000000 +0200 -+++ util-linux-2.20-rc1/libblkid/src/blkidP.h 2011-07-29 21:17:52.852169993 +0200 -@@ -286,7 +286,7 @@ extern char *blkid_strdup(const char *s) - extern char *blkid_strndup(const char *s, const int length); - extern char *blkid_strconcat(const char *a, const char *b, const char *c); - --#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 -up util-linux-2.20-rc1/misc-utils/blkid.8.kzak util-linux-2.20-rc1/misc-utils/blkid.8 ---- util-linux-2.20-rc1/misc-utils/blkid.8.kzak 2011-07-20 21:55:23.000000000 +0200 -+++ util-linux-2.20-rc1/misc-utils/blkid.8 2011-07-29 21:15:37.312506693 +0200 -@@ -79,7 +79,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 . -@@ -242,7 +242,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 at all, specify - .IR /dev/null. - If not specified, it will be the same file as that given with the -diff -up util-linux-2.20-rc1/misc-utils/blkid.c.kzak util-linux-2.20-rc1/misc-utils/blkid.c diff --git a/util-linux-2.20-ipcs-32bit.patch b/util-linux-2.21-ipcs-32bit.patch similarity index 57% rename from util-linux-2.20-ipcs-32bit.patch rename to util-linux-2.21-ipcs-32bit.patch index ae6f060..4685153 100644 --- a/util-linux-2.20-ipcs-32bit.patch +++ b/util-linux-2.21-ipcs-32bit.patch @@ -1,10 +1,10 @@ -diff -up util-linux-2.20-rc2/sys-utils/ipcs.c.kzak util-linux-2.20-rc2/sys-utils/ipcs.c ---- util-linux-2.20-rc2/sys-utils/ipcs.c.kzak 2011-08-12 11:13:00.000000000 +0200 -+++ util-linux-2.20-rc2/sys-utils/ipcs.c 2011-08-17 01:16:23.629928605 +0200 -@@ -255,6 +255,28 @@ print_perms (int id, struct ipc_perm *ip +diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils/ipcs.c +--- util-linux-2.21-rc1/sys-utils/ipcs.c.kzak 2012-01-19 13:31:26.328579820 +0100 ++++ util-linux-2.21-rc1/sys-utils/ipcs.c 2012-01-19 13:33:40.968066006 +0100 +@@ -262,6 +262,27 @@ static void print_perms (int id, struct + printf(" %-10u\n", ipcp->gid); } - - + +static unsigned long long +shminfo_from_proc(const char *name, unsigned long def) +{ @@ -25,15 +25,14 @@ diff -up util-linux-2.20-rc2/sys-utils/ipcs.c.kzak util-linux-2.20-rc2/sys-utils + fclose(f); + return res; +} -+ + void do_shm (char format) { - int maxid, shmid, id; -@@ -277,12 +299,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 */ + int maxid, shmid, id; +@@ -286,12 +307,12 @@ void do_shm (char format) + * 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"), @@ -42,9 +41,9 @@ diff -up util-linux-2.20-rc2/sys-utils/ipcs.c.kzak util-linux-2.20-rc2/sys-utils + 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"), + 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; + printf (_("min seg size (bytes) = %lu\n"), + (unsigned long) shminfo.shmmin); + return; diff --git a/util-linux-60-raw.rules b/util-linux-60-raw.rules index 2279c91..abbf79d 100644 --- a/util-linux-60-raw.rules +++ b/util-linux-60-raw.rules @@ -1,11 +1,8 @@ -# 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" +# ACTION=="add", KERNEL=="sda", RUN+="/usr/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" +# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/usr/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-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-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.21-login-lastlog.patch b/util-linux-ng-2.21-login-lastlog.patch new file mode 100644 index 0000000..947a0e5 --- /dev/null +++ b/util-linux-ng-2.21-login-lastlog.patch @@ -0,0 +1,11 @@ +diff -up util-linux-2.21-rc1/login-utils/login.c.kzak util-linux-2.21-rc1/login-utils/login.c +--- util-linux-2.21-rc1/login-utils/login.c.kzak 2012-01-19 13:19:54.886299587 +0100 ++++ util-linux-2.21-rc1/login-utils/login.c 2012-01-19 13:20:40.853451212 +0100 +@@ -499,7 +499,7 @@ static void log_lastlog(struct login_con + if (!cxt->pwd) + return; + +- fd = open(_PATH_LASTLOG, O_RDWR, 0); ++ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); + if (fd < 0) + return; diff --git a/util-linux.spec b/util-linux.spec index 8108f7d..01ba770 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,22 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.20.1 -Release: 5%{?dist} +Version: 2.21 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version} - -### Features -%if 0%{?rhel} -%define include_raw 1 -%else -%define include_raw 0 -%endif - -%define mtab_symlink 1 +%define upstream_version %{version}-rc2 ### Macros %define floppyver 0.18 @@ -31,11 +22,10 @@ BuildRequires: pam-devel BuildRequires: zlib-devel BuildRequires: popt-devel BuildRequires: libutempter-devel +BuildRequires: libudev-devel ### Sources -#Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{upstream_version}.tar.bz2 -# -Source0: ftp://ftp.infradead.org/pub/util-linux/v2.20/util-linux-%{upstream_version}.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -69,10 +59,7 @@ Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} - -%if %{include_raw} Requires: udev >= 176 -%endif ### Floppy patches (Fedora/RHEL specific) ### @@ -83,19 +70,12 @@ Patch1: util-linux-2.20-fdformat-man-ide.patch # 169628 - /usr/bin/floppy doesn't work with /dev/fd0 Patch2: util-linux-2.19-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-2.20-blkid-cachefile.patch - ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch7: util-linux-ng-2.13-login-lastlog.patch +Patch3: util-linux-ng-2.21-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux -Patch8: util-linux-2.20-ipcs-32bit.patch +Patch4: util-linux-2.21-ipcs-32bit.patch %description The util-linux package contains a large variety of low-level system @@ -209,10 +189,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 %build unset LINGUAS || : @@ -227,12 +205,9 @@ export SUID_LDFLAGS="-pie" --enable-login-utils \ --enable-kill \ --enable-write \ -%if %{include_raw} --enable-raw \ -%endif -%if %{mtab_symlink} - --enable-libmount-mount \ -%endif + --enable-new-mount \ + --with-udev \ --with-selinux \ --with-audit \ --with-utempter \ @@ -255,7 +230,7 @@ rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} 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}%{_sysconfdir}/{pam.d,security/console.apps} mkdir -p ${RPM_BUILD_ROOT}/var/log touch ${RPM_BUILD_ROOT}/var/log/lastlog chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog @@ -272,7 +247,7 @@ popd install -m 755 nologin ${RPM_BUILD_ROOT}%{_sbindir} install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 -%if %{include_raw} +# raw echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 { # see RH bugzilla #216664 @@ -281,7 +256,9 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 install -m 644 %{SOURCE4} ./60-raw.rules popd } -%endif + +# sbin -> bin +mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw # Our own initscript for uuidd install -D -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/uuidd @@ -342,7 +319,7 @@ done %ifarch %{sparc} for I in /sbin/sfdisk \ %{_mandir}/man8/sfdisk.8* \ - %doc fdisk/sfdisk.examples \ + %doc Documentation/sfdisk.txt \ /sbin/cfdisk \ %{_mandir}/man8/cfdisk.8*; do @@ -351,7 +328,7 @@ done %endif # deprecated commands -for I in /usr/sbin/fsck.minix /usr/sbin/mkfs.{bfs,minix} /usr/sbin/sln \ +for I in /usr/sbin/mkfs.bfs /usr/sbin/sln \ /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ /usr/sbin/shutdown /usr/sbin/vipw /usr/sbin/vigr; do rm -f $RPM_BUILD_ROOT$I @@ -359,13 +336,12 @@ 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 + 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 +for I in floppy-%{floppyver}/README.html; do rm -rf $I done @@ -377,18 +353,8 @@ chmod 644 getopt/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt -%if %{mtab_symlink} - ln -s /proc/mounts %{buildroot}/etc/mtab -%else - touch %{buildroot}/etc/mtab -%endif +ln -s /proc/mounts %{buildroot}/etc/mtab -# /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 # remove static libs rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a @@ -425,20 +391,22 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : fi fi -%if %{mtab_symlink} rm -f /etc/mtab ln -s /proc/mounts /etc/mtab -%else -touch /etc/mtab -/bin/chown root:root /etc/mtab -/bin/chmod 0644 /etc/mtab -%endif - %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 || : + +### Move blkid cache to /run + +# deprecated upstream default +[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /run/blkid/blkid.tab || : +[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /run/blkid/blkid.tab.old || : + +# deprecated Fedora default +[ -e /etc/blkid/blkid.tab ] && mv /etc/blkid/blkid.tab /run/blkid/blkid.tab || : +[ -e /etc/blkid/blkid.tab.old ] && mv /etc/blkid/blkid.tab.old /run/blkid/blkid.tab.old || : + %postun -n libblkid -p /sbin/ldconfig @@ -467,7 +435,8 @@ fi %files -f %{name}.files %defattr(-,root,root) -%doc */README.* NEWS AUTHORS licenses/* README* +%doc README */README.* NEWS AUTHORS +%doc Documentation/deprecated.txt Documentation/licenses/* %doc getopt/getopt-*.{bash,tcsh} %config(noreplace) %{_sysconfdir}/pam.d/chfn @@ -496,17 +465,20 @@ fi %{_sbindir}/agetty %{_sbindir}/blkid %{_sbindir}/blockdev +%{_sbindir}/chcpu %{_sbindir}/ctrlaltdel %{_sbindir}/delpart %{_sbindir}/fdisk %{_sbindir}/findfs %{_sbindir}/fsck %{_sbindir}/fsck.cramfs +%{_sbindir}/fsck.minix %{_sbindir}/fsfreeze %{_sbindir}/fstrim %{_sbindir}/losetup %{_sbindir}/mkfs %{_sbindir}/mkfs.cramfs +%{_sbindir}/mkfs.minix %{_sbindir}/mkswap %{_sbindir}/nologin %{_sbindir}/partx @@ -538,6 +510,7 @@ fi %{_bindir}/lscpu %{_bindir}/mcookie %{_bindir}/namei +%{_bindir}/prlimit %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev @@ -582,7 +555,7 @@ fi %{_mandir}/man1/more.1* %{_mandir}/man1/mountpoint.1* %{_mandir}/man1/namei.1* -%{_mandir}/man1/readprofile.1* +%{_mandir}/man1/prlimit.1* %{_mandir}/man1/rename.1* %{_mandir}/man1/renice.1* %{_mandir}/man1/rev.1* @@ -604,12 +577,14 @@ fi %{_mandir}/man8/agetty.8* %{_mandir}/man8/blkid.8* %{_mandir}/man8/blockdev.8* +%{_mandir}/man8/chcpu.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/fsck.minix.8* %{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/fstrim.8* %{_mandir}/man8/isosize.8* @@ -617,11 +592,13 @@ fi %{_mandir}/man8/losetup.8* %{_mandir}/man8/lsblk.8* %{_mandir}/man8/mkfs.8* +%{_mandir}/man8/mkfs.minix.8* %{_mandir}/man8/mkswap.8* %{_mandir}/man8/mount.8* %{_mandir}/man8/nologin.8* %{_mandir}/man8/partx.8* %{_mandir}/man8/pivot_root.8* +%{_mandir}/man8/readprofile.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* %{_mandir}/man8/swaplabel.8* @@ -631,12 +608,10 @@ fi %{_mandir}/man8/umount.8* %{_mandir}/man8/wipefs.8* -%if %{include_raw} %{_bindir}/raw -%config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules +%config(noreplace) %{_prefix}/lib/udev/rules.d %{_mandir}/man8/raw.8* %{_mandir}/man8/rawdevices.8* -%endif %ifnarch s390 s390x %{_sbindir}/clock @@ -652,7 +627,7 @@ fi %endif %ifnarch %{sparc} -%doc fdisk/sfdisk.examples +%doc Documentation/sfdisk.txt %{_sbindir}/cfdisk %{_sbindir}/sfdisk %{_mandir}/man8/cfdisk.8* @@ -671,7 +646,7 @@ fi %files -n uuidd %defattr(-,root,root) -%doc licenses/COPYING.GPL +%doc Documentation/licenses/COPYING.GPLv2 /etc/rc.d/init.d/uuidd %{_mandir}/man8/uuidd.8* %attr(-, uuidd, uuidd) %{_sbindir}/uuidd @@ -681,12 +656,12 @@ fi %files -n libmount %defattr(-,root,root) -%doc libmount/COPYING.libmount +%doc libmount/COPYING %{_libdir}/libmount.so.* %files -n libmount-devel %defattr(-,root,root) -%doc libmount/COPYING.libmount +%doc libmount/COPYING %{_libdir}/libmount.so %{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc @@ -694,13 +669,12 @@ fi %files -n libblkid %defattr(-,root,root) -%doc libblkid/COPYING.libblkid -%dir /etc/blkid +%doc libblkid/COPYING %{_libdir}/libblkid.so.* %files -n libblkid-devel %defattr(-,root,root) -%doc libblkid/COPYING.libblkid +%doc libblkid/COPYING %{_libdir}/libblkid.so %{_includedir}/blkid %{_mandir}/man3/libblkid.3* @@ -709,12 +683,12 @@ fi %files -n libuuid %defattr(-,root,root) -%doc libuuid/COPYING.libuuid +%doc libuuid/COPYING %{_libdir}/libuuid.so.* %files -n libuuid-devel %defattr(-,root,root) -%doc libuuid/COPYING.libuuid +%doc libuuid/COPYING %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -733,6 +707,16 @@ fi %changelog +* Thu Feb 07 2012 Karel Zak 2.21-0.1 +- upgrade to the release 2.21-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ReleaseNotes +- add {fsck,mkfs}.minix +- add new command chcpu(8) +- add new command prlimit(1) +- enable raw(8) command +- move 60-raw.rules from /etc from /usr/lib/udev/rules.d +- move blkid cache from etc to /run/blkid + * Wed Jan 25 2012 Harald Hoyer 2.20.1-5 - install everything in /usr https://fedoraproject.org/wiki/Features/UsrMove From 952f94ffaf4542b68d7e7272688839e1b76722e9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 9 Feb 2012 10:48:05 +0100 Subject: [PATCH 109/425] 2.21-0.2: fix #788703 Signed-off-by: Karel Zak --- util-linux.spec | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 01ba770..a2faa3f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.21 -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: http://kernel.org/~kzak/util-linux/ @@ -376,10 +376,10 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ %post # 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 +[ -d /var/log ] || mkdir -p /var/log +touch /var/log/lastlog +chown root:root /var/log/lastlog +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 ) @@ -398,15 +398,14 @@ ln -s /proc/mounts /etc/mtab /sbin/ldconfig ### Move blkid cache to /run +[ -d /run/blkid ] || mkdir -p /run/blkid +for I in /etc/blkid.tab /etc/blkid.tab.old \ + /etc/blkid/blkid.tab /etc/blkid/blkid.tab.old; do -# deprecated upstream default -[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /run/blkid/blkid.tab || : -[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /run/blkid/blkid.tab.old || : - -# deprecated Fedora default -[ -e /etc/blkid/blkid.tab ] && mv /etc/blkid/blkid.tab /run/blkid/blkid.tab || : -[ -e /etc/blkid/blkid.tab.old ] && mv /etc/blkid/blkid.tab.old /run/blkid/blkid.tab.old || : - + if [ -f "$I" ]; then + mv "$I" /run/blkid/ || : + fi +done %postun -n libblkid -p /sbin/ldconfig @@ -707,6 +706,9 @@ fi %changelog +* Thu Feb 09 2012 Karel Zak 2.21-0.2 +- fix #788703 - /run/blkid does not exist + * Thu Feb 07 2012 Karel Zak 2.21-0.1 - upgrade to the release 2.21-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ReleaseNotes From 6c2b43a9455748b3cefc17e05ad2cfd7308d15fc Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 17 Feb 2012 14:45:10 -0700 Subject: [PATCH 110/425] Add Requires(post): coreutils to libblkid --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index a2faa3f..80f6b64 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -113,6 +113,7 @@ Group: Development/Libraries License: LGPLv2+ Requires: libuuid = %{version}-%{release} Conflicts: filesystem < 3 +Requires(post): coreutils %description -n libblkid This is block device identification library, part of util-linux. From 7cb4cff5d3d507874c68478a38678cbc642cee94 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 24 Feb 2012 13:37:21 +0100 Subject: [PATCH 111/425] 2.21-1: upgrade to stable release Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d4bacee..3e7f767 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /util-linux-2.20.tar.bz2 /util-linux-2.20.1.tar.bz2 /util-linux-2.21-rc2.tar.xz +/util-linux-2.21.tar.xz diff --git a/sources b/sources index 8e1a93c..75b605a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -d36eb7c452ffb79d71e619710894305d util-linux-2.21-rc2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 +208aa058f4117759d2939d1be7d662fc util-linux-2.21.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 80f6b64..cc2fc64 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.21 -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: http://kernel.org/~kzak/util-linux/ -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define floppyver 0.18 @@ -707,6 +707,9 @@ fi %changelog +* Fri Feb 24 2012 Karel Zak 2.21-1 +- upgrade to release 2.21 + * Thu Feb 09 2012 Karel Zak 2.21-0.2 - fix #788703 - /run/blkid does not exist From 32be86ade7a424c2750788784de9fdcd11cf9708 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 30 Mar 2012 13:48:09 +0200 Subject: [PATCH 112/425] 2.21.1-1: upgrade to stable release Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3e7f767..e27a90a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /util-linux-2.20.1.tar.bz2 /util-linux-2.21-rc2.tar.xz /util-linux-2.21.tar.xz +/util-linux-2.21.1.tar.xz diff --git a/sources b/sources index 75b605a..d4c2bff 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -208aa058f4117759d2939d1be7d662fc util-linux-2.21.tar.xz +ad602dcd528f340b1329cfa6200d8f80 util-linux-2.21.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index cc2fc64..3912d86 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.21 +Version: 2.21.1 Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -707,6 +707,9 @@ fi %changelog +* Fri Mar 30 2012 Karel Zak 2.21.1-1 +- upgrade to bugfix release 2.21.1 + * Fri Feb 24 2012 Karel Zak 2.21-1 - upgrade to release 2.21 From a887e3b8dac586ef7b8a4be34a2196682adb483b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 25 May 2012 13:42:40 +0200 Subject: [PATCH 113/425] 2.21.2-1: upgrade to bugfix release 2.21.2 - fix #814699 - namei(1) incorrectly resolves relative symlinks - fix #820707 - Impossible to unmount nfsv4/krb5 mounts after network disconnect - fix #816877 - libmount does not close device fd before mount(2) - fix #822705 - unable to login after installing Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e27a90a..2402478 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /util-linux-2.21-rc2.tar.xz /util-linux-2.21.tar.xz /util-linux-2.21.1.tar.xz +/util-linux-2.21.2.tar.xz diff --git a/sources b/sources index d4c2bff..dee478b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +10d940dec87902bff7e6f9f2adcd0236 util-linux-2.21.2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -ad602dcd528f340b1329cfa6200d8f80 util-linux-2.21.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 3912d86..c197e6c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.21.1 +Version: 2.21.2 Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -707,6 +707,13 @@ fi %changelog +* Fri May 25 2012 Karel Zak 2.21.2-1 +- upgrade to bugfix release 2.21.2 +- fix #814699 - namei(1) incorrectly resolves relative symlinks +- fix #820707 - Impossible to unmount nfsv4/krb5 mounts after network disconnect +- fix #816877 - libmount does not close device fd before mount(2) +- fix #822705 - unable to login after installing + * Fri Mar 30 2012 Karel Zak 2.21.1-1 - upgrade to bugfix release 2.21.1 From 77dc49ad7c31a4862d9568add3f3c0fe720a8ae9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 13 Jun 2012 10:38:00 +0200 Subject: [PATCH 114/425] 2.21.2-2: replace udev dependenceis with systemd Signed-off-by: Karel Zak --- util-linux.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index c197e6c..74fb7ca 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.21.2 -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: http://kernel.org/~kzak/util-linux/ @@ -22,7 +22,7 @@ BuildRequires: pam-devel BuildRequires: zlib-devel BuildRequires: popt-devel BuildRequires: libutempter-devel -BuildRequires: libudev-devel +Buildrequires: systemd-devel ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/util-linux-%{upstream_version}.tar.xz @@ -59,7 +59,7 @@ Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} -Requires: udev >= 176 +Requires: systemd >= 185 ### Floppy patches (Fedora/RHEL specific) ### @@ -707,6 +707,9 @@ fi %changelog +* Wed Jun 13 2012 Karel Zak 2.21.2-2 +- replace udev dependenceis with systemd + * Fri May 25 2012 Karel Zak 2.21.2-1 - upgrade to bugfix release 2.21.2 - fix #814699 - namei(1) incorrectly resolves relative symlinks From 7518e4396c87d870b2fc8b440203afc1fdb0d656 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 27 Jul 2012 03:58:13 -0500 Subject: [PATCH 115/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 74fb7ca..a9314cc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.21.2 -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: http://kernel.org/~kzak/util-linux/ @@ -707,6 +707,9 @@ fi %changelog +* Fri Jul 27 2012 Fedora Release Engineering - 2.21.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Wed Jun 13 2012 Karel Zak 2.21.2-2 - replace udev dependenceis with systemd From 0d8c506be727baf86785c66f03da19d281f34dbf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 16 Aug 2012 15:22:02 +0200 Subject: [PATCH 116/425] 2.22-0.1: upgrade to new upstream release Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 155 +++++++++++++++++++++++++++--------------------- uuidd.init | 117 ------------------------------------ 4 files changed, 89 insertions(+), 186 deletions(-) delete mode 100755 uuidd.init diff --git a/.gitignore b/.gitignore index 2402478..31636e5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /util-linux-2.21.tar.xz /util-linux-2.21.1.tar.xz /util-linux-2.21.2.tar.xz +/util-linux-2.22-rc2.tar.xz diff --git a/sources b/sources index dee478b..34364af 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -10d940dec87902bff7e6f9f2adcd0236 util-linux-2.21.2.tar.xz +505d71aaade14033d060373d87e4f41d util-linux-2.22-rc2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index a9314cc..1f3b0f1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.21.2 -Release: 3%{?dist} +Version: 2.22 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base -URL: http://kernel.org/~kzak/util-linux/ +URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc2 ### Macros %define floppyver 0.18 @@ -25,17 +25,18 @@ BuildRequires: libutempter-devel Buildrequires: systemd-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd Source4: util-linux-60-raw.rules Source8: nologin.c Source9: nologin.8 -Source10: uuidd.init Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides +# sulogin, utmpdump merged into util-linux v2.22 +Conflicts: sysvinit-tools < 2.88-8 # old versions of e2fsprogs contain fsck, uuidgen Conflicts: e2fsprogs < 1.41.8-5 # rename from util-linux-ng back to util-linux @@ -60,6 +61,8 @@ Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: systemd >= 185 +Requires(post): systemd-units +Requires(preun): systemd-units ### Floppy patches (Fedora/RHEL specific) ### @@ -200,14 +203,15 @@ export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" %configure \ + --with-systemdsystemunitdir=%{_unitdir} \ + --disable-eject \ --disable-silent-rules \ --disable-wall \ - --enable-partx \ - --enable-login-utils \ - --enable-kill \ + --enable-socket-activation \ + --enable-chfn-chsh \ --enable-write \ --enable-raw \ - --enable-new-mount \ + --disable-su \ --with-udev \ --with-selinux \ --with-audit \ @@ -261,10 +265,8 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 # sbin -> bin mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw -# 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}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid # libtool junk @@ -349,8 +351,8 @@ 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} +# we install getopt-*.{bash,tcsh} as doc files +chmod 644 misc-utils/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt @@ -424,12 +426,21 @@ useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ exit 0 %post -n uuidd -/sbin/chkconfig --add uuidd +if [ $1 -eq 1 ]; then + # Package install, + /bin/systemctl enable uuidd.service >/dev/null 2>&1 || : + /bin/systemctl start uuidd.service > /dev/null 2>&1 || : +else + # Package upgrade + if /bin/systemctl --quiet is-enabled uuidd.service ; then + /bin/systemctl reenable uuidd.service >/dev/null 2>&1 || : + fi +fi %preun -n uuidd if [ "$1" = 0 ]; then - /sbin/service uuidd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del uuidd + /bin/systemctl stop uuidd.service > /dev/null 2>&1 || : + /bin/systemctl disable uuidd.service > /dev/null 2>&1 || : fi @@ -437,12 +448,13 @@ fi %defattr(-,root,root) %doc README */README.* NEWS AUTHORS %doc Documentation/deprecated.txt Documentation/licenses/* -%doc getopt/getopt-*.{bash,tcsh} +%doc misc-utils/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 +%config(noreplace) %{_prefix}/lib/udev/rules.d %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount @@ -454,48 +466,15 @@ fi %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab -%{_bindir}/dmesg -%{_bindir}/findmnt -%{_bindir}/lsblk -%{_bindir}/more -%{_bindir}/mountpoint -%{_bindir}/taskset - -%{_sbindir}/addpart -%{_sbindir}/agetty -%{_sbindir}/blkid -%{_sbindir}/blockdev -%{_sbindir}/chcpu -%{_sbindir}/ctrlaltdel -%{_sbindir}/delpart -%{_sbindir}/fdisk -%{_sbindir}/findfs -%{_sbindir}/fsck -%{_sbindir}/fsck.cramfs -%{_sbindir}/fsck.minix -%{_sbindir}/fsfreeze -%{_sbindir}/fstrim -%{_sbindir}/losetup -%{_sbindir}/mkfs -%{_sbindir}/mkfs.cramfs -%{_sbindir}/mkfs.minix -%{_sbindir}/mkswap -%{_sbindir}/nologin -%{_sbindir}/partx -%{_sbindir}/pivot_root -%{_sbindir}/swaplabel -%{_sbindir}/swapoff -%{_sbindir}/swapon -%{_sbindir}/switch_root -%{_sbindir}/wipefs - %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/dmesg %{_bindir}/fallocate +%{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump @@ -507,10 +486,15 @@ fi %{_bindir}/kill %{_bindir}/logger %{_bindir}/look +%{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lslocks %{_bindir}/mcookie +%{_bindir}/more +%{_bindir}/mountpoint %{_bindir}/namei %{_bindir}/prlimit +%{_bindir}/raw %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev @@ -520,15 +504,13 @@ fi %{_bindir}/setsid %{_bindir}/setterm %{_bindir}/tailf +%{_bindir}/taskset %{_bindir}/ul %{_bindir}/unshare +%{_bindir}/utmpdump %{_bindir}/uuidgen +%{_bindir}/wdctl %{_bindir}/whereis - -%{_sbindir}/ldattach -%{_sbindir}/readprofile -%{_sbindir}/rtcwake - %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/chrt.1* @@ -567,12 +549,11 @@ fi %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* %{_mandir}/man1/unshare.1* +%{_mandir}/man1/utmpdump.1.gz %{_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* @@ -591,6 +572,7 @@ fi %{_mandir}/man8/ldattach.8* %{_mandir}/man8/losetup.8* %{_mandir}/man8/lsblk.8* +%{_mandir}/man8/lslocks.8.gz %{_mandir}/man8/mkfs.8* %{_mandir}/man8/mkfs.minix.8* %{_mandir}/man8/mkswap.8* @@ -598,20 +580,52 @@ fi %{_mandir}/man8/nologin.8* %{_mandir}/man8/partx.8* %{_mandir}/man8/pivot_root.8* +%{_mandir}/man8/raw.8* +%{_mandir}/man8/rawdevices.8* %{_mandir}/man8/readprofile.8* +%{_mandir}/man8/resizepart.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* +%{_mandir}/man8/sulogin.8.gz %{_mandir}/man8/swaplabel.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* %{_mandir}/man8/umount.8* +%{_mandir}/man8/wdctl.8.gz %{_mandir}/man8/wipefs.8* - -%{_bindir}/raw -%config(noreplace) %{_prefix}/lib/udev/rules.d -%{_mandir}/man8/raw.8* -%{_mandir}/man8/rawdevices.8* +%{_sbindir}/addpart +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blockdev +%{_sbindir}/chcpu +%{_sbindir}/ctrlaltdel +%{_sbindir}/delpart +%{_sbindir}/fdisk +%{_sbindir}/findfs +%{_sbindir}/fsck +%{_sbindir}/fsck.cramfs +%{_sbindir}/fsck.minix +%{_sbindir}/fsfreeze +%{_sbindir}/fstrim +%{_sbindir}/ldattach +%{_sbindir}/losetup +%{_sbindir}/mkfs +%{_sbindir}/mkfs.cramfs +%{_sbindir}/mkfs.minix +%{_sbindir}/mkswap +%{_sbindir}/nologin +%{_sbindir}/partx +%{_sbindir}/pivot_root +%{_sbindir}/readprofile +%{_sbindir}/resizepart +%{_sbindir}/rtcwake +%{_sbindir}/sulogin +%{_sbindir}/swaplabel +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root +%{_sbindir}/wipefs %ifnarch s390 s390x %{_sbindir}/clock @@ -647,11 +661,11 @@ fi %files -n uuidd %defattr(-,root,root) %doc Documentation/licenses/COPYING.GPLv2 -/etc/rc.d/init.d/uuidd %{_mandir}/man8/uuidd.8* %attr(-, uuidd, uuidd) %{_sbindir}/uuidd +%{_unitdir}/* %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid -%dir %attr(2775, uuidd, uuidd) /var/run/uuidd +%dir %attr(2775, uuidd, uuidd) /run/uuidd %files -n libmount @@ -707,6 +721,11 @@ fi %changelog +* Thu Aug 16 2012 Karel Zak 2.22-0.1 +- upgrade to the release 2.22-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/v2.22-ReleaseNotes +- add sulogin, utmpdump, lslocks, wdctl + * Fri Jul 27 2012 Fedora Release Engineering - 2.21.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 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 $? From e5224a209aa7481b1fc477acfec2c8a2c0f7189c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 16 Aug 2012 15:22:02 +0200 Subject: [PATCH 117/425] 2.22-0.1: upgrade to new upstream release Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 155 +++++++++++++++++++++++++++--------------------- uuidd.init | 117 ------------------------------------ 4 files changed, 89 insertions(+), 186 deletions(-) delete mode 100755 uuidd.init diff --git a/.gitignore b/.gitignore index 2402478..31636e5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /util-linux-2.21.tar.xz /util-linux-2.21.1.tar.xz /util-linux-2.21.2.tar.xz +/util-linux-2.22-rc2.tar.xz diff --git a/sources b/sources index dee478b..34364af 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -10d940dec87902bff7e6f9f2adcd0236 util-linux-2.21.2.tar.xz +505d71aaade14033d060373d87e4f41d util-linux-2.22-rc2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index a9314cc..1f3b0f1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.21.2 -Release: 3%{?dist} +Version: 2.22 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base -URL: http://kernel.org/~kzak/util-linux/ +URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc2 ### Macros %define floppyver 0.18 @@ -25,17 +25,18 @@ BuildRequires: libutempter-devel Buildrequires: systemd-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd Source4: util-linux-60-raw.rules Source8: nologin.c Source9: nologin.8 -Source10: uuidd.init Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides +# sulogin, utmpdump merged into util-linux v2.22 +Conflicts: sysvinit-tools < 2.88-8 # old versions of e2fsprogs contain fsck, uuidgen Conflicts: e2fsprogs < 1.41.8-5 # rename from util-linux-ng back to util-linux @@ -60,6 +61,8 @@ Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: systemd >= 185 +Requires(post): systemd-units +Requires(preun): systemd-units ### Floppy patches (Fedora/RHEL specific) ### @@ -200,14 +203,15 @@ export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie" %configure \ + --with-systemdsystemunitdir=%{_unitdir} \ + --disable-eject \ --disable-silent-rules \ --disable-wall \ - --enable-partx \ - --enable-login-utils \ - --enable-kill \ + --enable-socket-activation \ + --enable-chfn-chsh \ --enable-write \ --enable-raw \ - --enable-new-mount \ + --disable-su \ --with-udev \ --with-selinux \ --with-audit \ @@ -261,10 +265,8 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 # sbin -> bin mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw -# 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}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid # libtool junk @@ -349,8 +351,8 @@ 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} +# we install getopt-*.{bash,tcsh} as doc files +chmod 644 misc-utils/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt @@ -424,12 +426,21 @@ useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ exit 0 %post -n uuidd -/sbin/chkconfig --add uuidd +if [ $1 -eq 1 ]; then + # Package install, + /bin/systemctl enable uuidd.service >/dev/null 2>&1 || : + /bin/systemctl start uuidd.service > /dev/null 2>&1 || : +else + # Package upgrade + if /bin/systemctl --quiet is-enabled uuidd.service ; then + /bin/systemctl reenable uuidd.service >/dev/null 2>&1 || : + fi +fi %preun -n uuidd if [ "$1" = 0 ]; then - /sbin/service uuidd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del uuidd + /bin/systemctl stop uuidd.service > /dev/null 2>&1 || : + /bin/systemctl disable uuidd.service > /dev/null 2>&1 || : fi @@ -437,12 +448,13 @@ fi %defattr(-,root,root) %doc README */README.* NEWS AUTHORS %doc Documentation/deprecated.txt Documentation/licenses/* -%doc getopt/getopt-*.{bash,tcsh} +%doc misc-utils/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 +%config(noreplace) %{_prefix}/lib/udev/rules.d %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount @@ -454,48 +466,15 @@ fi %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab -%{_bindir}/dmesg -%{_bindir}/findmnt -%{_bindir}/lsblk -%{_bindir}/more -%{_bindir}/mountpoint -%{_bindir}/taskset - -%{_sbindir}/addpart -%{_sbindir}/agetty -%{_sbindir}/blkid -%{_sbindir}/blockdev -%{_sbindir}/chcpu -%{_sbindir}/ctrlaltdel -%{_sbindir}/delpart -%{_sbindir}/fdisk -%{_sbindir}/findfs -%{_sbindir}/fsck -%{_sbindir}/fsck.cramfs -%{_sbindir}/fsck.minix -%{_sbindir}/fsfreeze -%{_sbindir}/fstrim -%{_sbindir}/losetup -%{_sbindir}/mkfs -%{_sbindir}/mkfs.cramfs -%{_sbindir}/mkfs.minix -%{_sbindir}/mkswap -%{_sbindir}/nologin -%{_sbindir}/partx -%{_sbindir}/pivot_root -%{_sbindir}/swaplabel -%{_sbindir}/swapoff -%{_sbindir}/swapon -%{_sbindir}/switch_root -%{_sbindir}/wipefs - %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/dmesg %{_bindir}/fallocate +%{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump @@ -507,10 +486,15 @@ fi %{_bindir}/kill %{_bindir}/logger %{_bindir}/look +%{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lslocks %{_bindir}/mcookie +%{_bindir}/more +%{_bindir}/mountpoint %{_bindir}/namei %{_bindir}/prlimit +%{_bindir}/raw %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev @@ -520,15 +504,13 @@ fi %{_bindir}/setsid %{_bindir}/setterm %{_bindir}/tailf +%{_bindir}/taskset %{_bindir}/ul %{_bindir}/unshare +%{_bindir}/utmpdump %{_bindir}/uuidgen +%{_bindir}/wdctl %{_bindir}/whereis - -%{_sbindir}/ldattach -%{_sbindir}/readprofile -%{_sbindir}/rtcwake - %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/chrt.1* @@ -567,12 +549,11 @@ fi %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* %{_mandir}/man1/unshare.1* +%{_mandir}/man1/utmpdump.1.gz %{_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* @@ -591,6 +572,7 @@ fi %{_mandir}/man8/ldattach.8* %{_mandir}/man8/losetup.8* %{_mandir}/man8/lsblk.8* +%{_mandir}/man8/lslocks.8.gz %{_mandir}/man8/mkfs.8* %{_mandir}/man8/mkfs.minix.8* %{_mandir}/man8/mkswap.8* @@ -598,20 +580,52 @@ fi %{_mandir}/man8/nologin.8* %{_mandir}/man8/partx.8* %{_mandir}/man8/pivot_root.8* +%{_mandir}/man8/raw.8* +%{_mandir}/man8/rawdevices.8* %{_mandir}/man8/readprofile.8* +%{_mandir}/man8/resizepart.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* +%{_mandir}/man8/sulogin.8.gz %{_mandir}/man8/swaplabel.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* %{_mandir}/man8/umount.8* +%{_mandir}/man8/wdctl.8.gz %{_mandir}/man8/wipefs.8* - -%{_bindir}/raw -%config(noreplace) %{_prefix}/lib/udev/rules.d -%{_mandir}/man8/raw.8* -%{_mandir}/man8/rawdevices.8* +%{_sbindir}/addpart +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blockdev +%{_sbindir}/chcpu +%{_sbindir}/ctrlaltdel +%{_sbindir}/delpart +%{_sbindir}/fdisk +%{_sbindir}/findfs +%{_sbindir}/fsck +%{_sbindir}/fsck.cramfs +%{_sbindir}/fsck.minix +%{_sbindir}/fsfreeze +%{_sbindir}/fstrim +%{_sbindir}/ldattach +%{_sbindir}/losetup +%{_sbindir}/mkfs +%{_sbindir}/mkfs.cramfs +%{_sbindir}/mkfs.minix +%{_sbindir}/mkswap +%{_sbindir}/nologin +%{_sbindir}/partx +%{_sbindir}/pivot_root +%{_sbindir}/readprofile +%{_sbindir}/resizepart +%{_sbindir}/rtcwake +%{_sbindir}/sulogin +%{_sbindir}/swaplabel +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root +%{_sbindir}/wipefs %ifnarch s390 s390x %{_sbindir}/clock @@ -647,11 +661,11 @@ fi %files -n uuidd %defattr(-,root,root) %doc Documentation/licenses/COPYING.GPLv2 -/etc/rc.d/init.d/uuidd %{_mandir}/man8/uuidd.8* %attr(-, uuidd, uuidd) %{_sbindir}/uuidd +%{_unitdir}/* %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid -%dir %attr(2775, uuidd, uuidd) /var/run/uuidd +%dir %attr(2775, uuidd, uuidd) /run/uuidd %files -n libmount @@ -707,6 +721,11 @@ fi %changelog +* Thu Aug 16 2012 Karel Zak 2.22-0.1 +- upgrade to the release 2.22-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/v2.22-ReleaseNotes +- add sulogin, utmpdump, lslocks, wdctl + * Fri Jul 27 2012 Fedora Release Engineering - 2.21.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 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 $? From 1d0642d05767948dc0e5c24c46c6e93a0bfce2d6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 6 Sep 2012 12:51:38 +0200 Subject: [PATCH 118/425] 2.22-1: upgrade, enable eject, fix #853164, #851230 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 31636e5..1334088 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /util-linux-2.21.1.tar.xz /util-linux-2.21.2.tar.xz /util-linux-2.22-rc2.tar.xz +/util-linux-2.22.tar.xz diff --git a/sources b/sources index 34364af..4fe7f39 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -505d71aaade14033d060373d87e4f41d util-linux-2.22-rc2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 +ba2d8cc12a937231c80a04f7f7149303 util-linux-2.22.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 1f3b0f1..dac7222 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22 -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: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define floppyver 0.18 @@ -35,6 +35,9 @@ Source9: nologin.8 Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides +# eject has been merged into util-linux v2.22 +Obsoletes: eject <= 2.1.5 +Provides: eject = 2.1.6 # sulogin, utmpdump merged into util-linux v2.22 Conflicts: sysvinit-tools < 2.88-8 # old versions of e2fsprogs contain fsck, uuidgen @@ -201,10 +204,9 @@ 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" +export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ - --disable-eject \ --disable-silent-rules \ --disable-wall \ --enable-socket-activation \ @@ -473,6 +475,7 @@ fi %{_bindir}/colrm %{_bindir}/column %{_bindir}/dmesg +%{_bindir}/eject %{_bindir}/fallocate %{_bindir}/findmnt %{_bindir}/flock @@ -520,6 +523,7 @@ fi %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* %{_mandir}/man1/dmesg.1* +%{_mandir}/man1/eject.1* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* @@ -721,6 +725,12 @@ fi %changelog +* Thu Sep 6 2012 Karel Zak 2.22-1 +- upgrade to the release 2.22 +- enable eject(1) from util-linux, obsolete original eject package +- fix #853164 - setuid program should have full RELRO +- fix #851230 - probe_ntfs: /usr/sbin/blkid was killed by SIGSEGV + * Thu Aug 16 2012 Karel Zak 2.22-0.1 - upgrade to the release 2.22-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/v2.22-ReleaseNotes From 1de1774f06e15b2c6df080e1b187a9722c7b7422 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 6 Sep 2012 12:51:38 +0200 Subject: [PATCH 119/425] 2.22-1: upgrade, enable eject, fix #853164, #851230 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 31636e5..1334088 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /util-linux-2.21.1.tar.xz /util-linux-2.21.2.tar.xz /util-linux-2.22-rc2.tar.xz +/util-linux-2.22.tar.xz diff --git a/sources b/sources index 34364af..4fe7f39 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -505d71aaade14033d060373d87e4f41d util-linux-2.22-rc2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 +ba2d8cc12a937231c80a04f7f7149303 util-linux-2.22.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 1f3b0f1..dac7222 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22 -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: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define floppyver 0.18 @@ -35,6 +35,9 @@ Source9: nologin.8 Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 ### Obsoletes & Conflicts & Provides +# eject has been merged into util-linux v2.22 +Obsoletes: eject <= 2.1.5 +Provides: eject = 2.1.6 # sulogin, utmpdump merged into util-linux v2.22 Conflicts: sysvinit-tools < 2.88-8 # old versions of e2fsprogs contain fsck, uuidgen @@ -201,10 +204,9 @@ 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" +export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ - --disable-eject \ --disable-silent-rules \ --disable-wall \ --enable-socket-activation \ @@ -473,6 +475,7 @@ fi %{_bindir}/colrm %{_bindir}/column %{_bindir}/dmesg +%{_bindir}/eject %{_bindir}/fallocate %{_bindir}/findmnt %{_bindir}/flock @@ -520,6 +523,7 @@ fi %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* %{_mandir}/man1/dmesg.1* +%{_mandir}/man1/eject.1* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* @@ -721,6 +725,12 @@ fi %changelog +* Thu Sep 6 2012 Karel Zak 2.22-1 +- upgrade to the release 2.22 +- enable eject(1) from util-linux, obsolete original eject package +- fix #853164 - setuid program should have full RELRO +- fix #851230 - probe_ntfs: /usr/sbin/blkid was killed by SIGSEGV + * Thu Aug 16 2012 Karel Zak 2.22-0.1 - upgrade to the release 2.22-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/v2.22-ReleaseNotes From 49e6ba14007de1e209f0cf8632088c20c36a4acf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 3 Oct 2012 09:42:04 +0200 Subject: [PATCH 120/425] 2.22-2: remove obsolete references to e2fsprogs Signed-off-by: Karel Zak --- util-linux.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index dac7222..3b0ee15 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22 -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: http://en.wikipedia.org/wiki/Util-linux @@ -144,7 +144,7 @@ License: BSD Conflicts: filesystem < 3 %description -n libuuid -This is the universally unique ID library, part of e2fsprogs. +This is the universally unique ID library, part of util-linux. The libuuid library generates and parses 128-bit universally unique id's (UUID's). A UUID is an identifier that is unique across both @@ -164,7 +164,7 @@ Requires: pkgconfig %description -n libuuid-devel This is the universally unique ID development library and headers, -part of e2fsprogs. +part of util-linux. The libuuid library generates and parses 128-bit universally unique id's (UUID's). A UUID is an identifier that is unique across both @@ -725,6 +725,9 @@ fi %changelog +* Wed Oct 3 2012 Karel Zak 2.22-2 +- remove obsolete references to e2fsprogs + * Thu Sep 6 2012 Karel Zak 2.22-1 - upgrade to the release 2.22 - enable eject(1) from util-linux, obsolete original eject package From 82639d6500b446d4be22ada077fe0192b114ce61 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 3 Oct 2012 09:42:04 +0200 Subject: [PATCH 121/425] 2.22-2: remove obsolete references to e2fsprogs Signed-off-by: Karel Zak --- util-linux.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index dac7222..3b0ee15 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22 -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: http://en.wikipedia.org/wiki/Util-linux @@ -144,7 +144,7 @@ License: BSD Conflicts: filesystem < 3 %description -n libuuid -This is the universally unique ID library, part of e2fsprogs. +This is the universally unique ID library, part of util-linux. The libuuid library generates and parses 128-bit universally unique id's (UUID's). A UUID is an identifier that is unique across both @@ -164,7 +164,7 @@ Requires: pkgconfig %description -n libuuid-devel This is the universally unique ID development library and headers, -part of e2fsprogs. +part of util-linux. The libuuid library generates and parses 128-bit universally unique id's (UUID's). A UUID is an identifier that is unique across both @@ -725,6 +725,9 @@ fi %changelog +* Wed Oct 3 2012 Karel Zak 2.22-2 +- remove obsolete references to e2fsprogs + * Thu Sep 6 2012 Karel Zak 2.22-1 - upgrade to the release 2.22 - enable eject(1) from util-linux, obsolete original eject package From e79ab2d9de06338324d89a3ff8c21ad81deee3fb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 10 Oct 2012 17:12:15 +0200 Subject: [PATCH 122/425] 2.22.1-1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1334088..0d27901 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /util-linux-2.21.2.tar.xz /util-linux-2.22-rc2.tar.xz /util-linux-2.22.tar.xz +/util-linux-2.22.1.tar.xz diff --git a/sources b/sources index 4fe7f39..7d69556 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +c6c15a1afc04d8a69d5b99db1c39623f util-linux-2.22.1.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -ba2d8cc12a937231c80a04f7f7149303 util-linux-2.22.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 3b0ee15..2d2e868 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.22 -Release: 2%{?dist} +Version: 2.22.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -725,6 +725,9 @@ fi %changelog +* Thu Oct 10 2012 Karel Zak 2.22.1-1 +- upgrade to the release 2.22.1 + * Wed Oct 3 2012 Karel Zak 2.22-2 - remove obsolete references to e2fsprogs From 5fd3817ee5d5fd3293c31896ea250f162dd2f535 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 10 Oct 2012 17:12:15 +0200 Subject: [PATCH 123/425] 2.22.1-1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1334088..0d27901 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /util-linux-2.21.2.tar.xz /util-linux-2.22-rc2.tar.xz /util-linux-2.22.tar.xz +/util-linux-2.22.1.tar.xz diff --git a/sources b/sources index 4fe7f39..7d69556 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +c6c15a1afc04d8a69d5b99db1c39623f util-linux-2.22.1.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -ba2d8cc12a937231c80a04f7f7149303 util-linux-2.22.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 3b0ee15..2d2e868 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.22 -Release: 2%{?dist} +Version: 2.22.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -725,6 +725,9 @@ fi %changelog +* Thu Oct 10 2012 Karel Zak 2.22.1-1 +- upgrade to the release 2.22.1 + * Wed Oct 3 2012 Karel Zak 2.22-2 - remove obsolete references to e2fsprogs From 4d123a0a1169ab4970476f2feed84b8ddfc97a36 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Nov 2012 10:28:02 +0100 Subject: [PATCH 124/425] 2.22.1-2: apply upstream 2.22.2 patches Signed-off-by: Karel Zak --- ...t-use-umount-optimization-for-l-or-f.patch | 34 ++++++ 0002-wipefs-use-O_EXCL.patch | 27 +++++ ...-remove-loop-declaration-smatch-scan.patch | 37 ++++++ ...ix-compiler-warning-Wstrict-aliasing.patch | 35 ++++++ ...eviation-for-no-canonicalize-to-man-.patch | 31 +++++ ...long-options-for-L-and-U-to-man-page.patch | 33 ++++++ 0007-lib-loopdev-improve-debug-messages.patch | 107 ++++++++++++++++++ 0008-lib-loopdev-check-for-sys.patch | 35 ++++++ ...ile-with-DINCLUDE_FS_TESTS-for-make-.patch | 49 ++++++++ ...-fix-compiler-warning-Wunused-result.patch | 44 +++++++ ...misc-make-readlink-usage-more-robust.patch | 63 +++++++++++ util-linux.spec | 35 +++++- 12 files changed, 529 insertions(+), 1 deletion(-) create mode 100644 0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch create mode 100644 0002-wipefs-use-O_EXCL.patch create mode 100644 0003-swapon-remove-loop-declaration-smatch-scan.patch create mode 100644 0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch create mode 100644 0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch create mode 100644 0006-mount-add-long-options-for-L-and-U-to-man-page.patch create mode 100644 0007-lib-loopdev-improve-debug-messages.patch create mode 100644 0008-lib-loopdev-check-for-sys.patch create mode 100644 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch create mode 100644 0010-login-fix-compiler-warning-Wunused-result.patch create mode 100644 0011-misc-make-readlink-usage-more-robust.patch diff --git a/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch b/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch new file mode 100644 index 0000000..952c5e1 --- /dev/null +++ b/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch @@ -0,0 +1,34 @@ +From 6eeca6c7170295f325b814ee0cd1576da885cd30 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 15 Oct 2012 11:10:50 +0200 +Subject: [PATCH 01/11] libmount: don't use umount optimization for -l or -f + +The options -l (lazy) and -f (force) means that the mountpoint may be +unreadable (for example because NFS server is unreadable). So we +should not try to be smart in this case and we should try to minimize +number of situations when stat() or readlink() is used for the +mountpoint. + +Signed-off-by: Karel Zak +--- + libmount/src/context_umount.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c +index ce095bf..2c2e64c 100644 +--- a/libmount/src/context_umount.c ++++ b/libmount/src/context_umount.c +@@ -83,7 +83,9 @@ static int lookup_umount_fs(struct libmnt_context *cxt) + * where LABEL, UUID or symlinks are to canonicalized. It means that + * it's usable only for canonicalized stuff (e.g. kernel mountinfo). + */ +- if (!cxt->mtab_writable && *tgt == '/') { ++ if (!cxt->mtab_writable && *tgt == '/' && ++ !mnt_context_is_force(cxt) && !mnt_context_is_lazy(cxt)) { ++ + struct stat st; + + if (stat(tgt, &st) == 0 && S_ISDIR(st.st_mode)) { +-- +1.7.11.7 + diff --git a/0002-wipefs-use-O_EXCL.patch b/0002-wipefs-use-O_EXCL.patch new file mode 100644 index 0000000..66a6476 --- /dev/null +++ b/0002-wipefs-use-O_EXCL.patch @@ -0,0 +1,27 @@ +From 9faf9c8494cf37fdcf68b1dfe10fd7900e93ec00 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 15 Oct 2012 12:38:09 +0200 +Subject: [PATCH 02/11] wipefs: use O_EXCL + +Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961 +Signed-off-by: Karel Zak +--- + misc-utils/wipefs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c +index cddad8a..0ddc148 100644 +--- a/misc-utils/wipefs.c ++++ b/misc-utils/wipefs.c +@@ -309,7 +309,7 @@ static void do_wipe_real(blkid_probe pr, const char *devname, struct wipe_desc * + static struct wipe_desc * + do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet) + { +- blkid_probe pr = new_probe(devname, O_RDWR); ++ blkid_probe pr = new_probe(devname, O_RDWR | O_EXCL); + struct wipe_desc *w, *wp0 = clone_offset(wp); + int zap = all ? 1 : wp->zap; + +-- +1.7.11.7 + diff --git a/0003-swapon-remove-loop-declaration-smatch-scan.patch b/0003-swapon-remove-loop-declaration-smatch-scan.patch new file mode 100644 index 0000000..d5b90fe --- /dev/null +++ b/0003-swapon-remove-loop-declaration-smatch-scan.patch @@ -0,0 +1,37 @@ +From 10a9cbcf36d43c0d4a13bf5e91315b4ffd29e636 Mon Sep 17 00:00:00 2001 +From: Sami Kerola +Date: Mon, 8 Oct 2012 08:08:20 +0100 +Subject: [PATCH 03/11] swapon: remove loop declaration [smatch scan] + +sys-utils/swapon.c:677:2: error: 'for' loop initial declarations are +only allowed in C99 mode + +Signed-off-by: Sami Kerola +--- + sys-utils/swapon.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c +index c9cabc1..0e1ab66 100644 +--- a/sys-utils/swapon.c ++++ b/sys-utils/swapon.c +@@ -642,6 +642,7 @@ static int swapon_all(void) + + static void __attribute__ ((__noreturn__)) usage(FILE * out) + { ++ size_t i; + fputs(USAGE_HEADER, out); + + fprintf(out, _(" %s [options] []\n"), program_invocation_short_name); +@@ -674,7 +675,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) + " name of file to be used\n"), out); + + fputs(_("\nAvailable columns (for --show):\n"), out); +- for (size_t i = 0; i < NCOLS; i++) ++ for (i = 0; i < NCOLS; i++) + fprintf(out, " %4s %s\n", infos[i].name, _(infos[i].help)); + + fprintf(out, USAGE_MAN_TAIL("swapon(8)")); +-- +1.7.11.7 + diff --git a/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch b/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch new file mode 100644 index 0000000..af08118 --- /dev/null +++ b/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch @@ -0,0 +1,35 @@ +From 9f6c8591eeffb6591dc6a18512e618f0acf09890 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 15 Oct 2012 17:01:30 +0200 +Subject: [PATCH 04/11] libblkid: fix compiler warning [-Wstrict-aliasing] + +libblkid/src/superblocks/befs.c: In function 'get_uuid': +libblkid/src/superblocks/befs.c:353:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] + +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/befs.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c +index a7f4317..452da1e 100644 +--- a/libblkid/src/superblocks/befs.c ++++ b/libblkid/src/superblocks/befs.c +@@ -348,9 +348,11 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, + && FS16_TO_CPU(sd->name_size, fs_le) == strlen(KEY_NAME) + && FS16_TO_CPU(sd->data_size, fs_le) == KEY_SIZE + && strcmp(sd->name, KEY_NAME) == 0) { +- *uuid = *(uint64_t *) ((uint8_t *) sd->name +- + FS16_TO_CPU(sd->name_size, fs_le) +- + 3); ++ ++ memcpy(uuid, ++ sd->name + FS16_TO_CPU(sd->name_size, fs_le) + 3, ++ sizeof(uint64_t)); ++ + break; + } else if (FS32_TO_CPU(sd->type, fs_le) == 0 + && FS16_TO_CPU(sd->name_size, fs_le) == 0 +-- +1.7.11.7 + diff --git a/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch b/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch new file mode 100644 index 0000000..dedadd2 --- /dev/null +++ b/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch @@ -0,0 +1,31 @@ +From 532116d4dd16632806ed4a036c2e89b966221031 Mon Sep 17 00:00:00 2001 +From: Bill Pemberton +Date: Wed, 10 Oct 2012 16:54:01 -0400 +Subject: [PATCH 05/11] mount: add -c abbreviation for --no-canonicalize to + man page + +The --no-canonicalize option can also be set using -c. The --help for +mount shows this option but the man page did not. Add -c to the man +page. + +Signed-off-by: Bill Pemberton +--- + sys-utils/mount.8 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 +index dce4b8c..83a4518 100644 +--- a/sys-utils/mount.8 ++++ b/sys-utils/mount.8 +@@ -552,7 +552,7 @@ Mount without writing in + This is necessary for example when + .I /etc + is on a read-only filesystem. +-.IP "\fB\-\-no\-canonicalize\fP" ++.IP "\fB\-c, \-\-no\-canonicalize\fP" + Don't canonicalize paths. The mount command canonicalizes all paths + (from command line or fstab) and stores canonicalized paths to the + .IR /etc/mtab +-- +1.7.11.7 + diff --git a/0006-mount-add-long-options-for-L-and-U-to-man-page.patch b/0006-mount-add-long-options-for-L-and-U-to-man-page.patch new file mode 100644 index 0000000..feb4c39 --- /dev/null +++ b/0006-mount-add-long-options-for-L-and-U-to-man-page.patch @@ -0,0 +1,33 @@ +From b426209c5ba2126a9038363a269fec884af470fb Mon Sep 17 00:00:00 2001 +From: Bill Pemberton +Date: Wed, 10 Oct 2012 16:54:02 -0400 +Subject: [PATCH 06/11] mount: add long options for -L and -U to man page + +The -L and -U flags both have long options too (--label and --uuid). +The usage() function will show them but the man page didn't list them. + +Signed-off-by: Bill Pemberton +--- + sys-utils/mount.8 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 +index 83a4518..0b40bf7 100644 +--- a/sys-utils/mount.8 ++++ b/sys-utils/mount.8 +@@ -586,10 +586,10 @@ set the block device to read-only mode, see command + .IP "\fB\-w, \-\-rw\fP" + Mount the filesystem read/write. This is the default. A synonym is + .BR "\-o rw" . +-.IP "\fB\-L \fIlabel\fP" ++.IP "\fB\-L, \-\-label \fIlabel\fP" + Mount the partition that has the specified + .IR label . +-.IP "\fB\-U \fIuuid\fP" ++.IP "\fB\-U, \-\-uuid \fIuuid\fP" + Mount the partition that has the specified + .IR uuid . + These two options require the file +-- +1.7.11.7 + diff --git a/0007-lib-loopdev-improve-debug-messages.patch b/0007-lib-loopdev-improve-debug-messages.patch new file mode 100644 index 0000000..0db04da --- /dev/null +++ b/0007-lib-loopdev-improve-debug-messages.patch @@ -0,0 +1,107 @@ +From deb0e659451d4ade29df3dbb842607edd6080c0d Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 17 Oct 2012 11:42:21 +0200 +Subject: [PATCH 07/11] lib/loopdev: improve debug messages + +Signed-off-by: Karel Zak +--- + lib/loopdev.c | 22 ++++++++++++++++++---- + sys-utils/losetup.c | 2 -- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/lib/loopdev.c b/lib/loopdev.c +index a9f6df2..0e6033a 100644 +--- a/lib/loopdev.c ++++ b/lib/loopdev.c +@@ -87,8 +87,10 @@ int loopcxt_set_device(struct loopdev_cxt *lc, const char *device) + if (!lc) + return -EINVAL; + +- if (lc->fd >= 0) ++ if (lc->fd >= 0) { + close(lc->fd); ++ DBG(lc, loopdev_debug("closing old open fd")); ++ } + lc->fd = -1; + lc->mode = 0; + lc->has_info = 0; +@@ -158,19 +160,26 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) + memcpy(lc, &dummy, sizeof(dummy)); + lc->flags = flags; + ++ if (getenv("LOOPDEV_DEBUG")) ++ loopcxt_enable_debug(lc, TRUE); ++ + rc = loopcxt_set_device(lc, NULL); + if (rc) + return rc; + + if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && +- get_linux_version() >= KERNEL_VERSION(2,6,37)) ++ get_linux_version() >= KERNEL_VERSION(2,6,37)) { + /* + * Use only sysfs for basic information about loop devices + */ + lc->flags |= LOOPDEV_FL_NOIOCTL; ++ DBG(lc, loopdev_debug("init: ignore ioctls")); ++ } + +- if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) ++ if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) { + lc->flags |= LOOPDEV_FL_CONTROL; ++ DBG(lc, loopdev_debug("init: loop-control detected ")); ++ } + + return 0; + } +@@ -272,7 +281,9 @@ int loopcxt_get_fd(struct loopdev_cxt *lc) + if (lc->fd < 0) { + lc->mode = lc->flags & LOOPDEV_FL_RDWR ? O_RDWR : O_RDONLY; + lc->fd = open(lc->device, lc->mode); +- DBG(lc, loopdev_debug("open %s", lc->fd < 0 ? "failed" : "ok")); ++ DBG(lc, loopdev_debug("open %s [%s]: %s", lc->device, ++ lc->flags & LOOPDEV_FL_RDWR ? "rw" : "ro", ++ lc->fd < 0 ? "failed" : "ok")); + } + return lc->fd; + } +@@ -576,6 +587,7 @@ int loopcxt_next(struct loopdev_cxt *lc) + * of loop devices). This is enough for 99% of all cases. + */ + if (iter->default_check) { ++ DBG(lc, loopdev_debug("iter: next: default check")); + for (++iter->ncur; iter->ncur < LOOPDEV_DEFAULT_NNODES; + iter->ncur++) { + char name[16]; +@@ -590,6 +602,7 @@ int loopcxt_next(struct loopdev_cxt *lc) + /* C) the worst possibility, scan whole /dev or /dev/loop/ + */ + if (!iter->minors) { ++ DBG(lc, loopdev_debug("iter: next: scan /dev")); + iter->nminors = (lc->flags & LOOPDEV_FL_DEVSUBDIR) ? + loop_scandir(_PATH_DEV_LOOP, &iter->minors, 0) : + loop_scandir(_PATH_DEV, &iter->minors, 1); +@@ -1150,6 +1163,7 @@ int loopcxt_setup_device(struct loopdev_cxt *lc) + DBG(lc, loopdev_debug("setup: backing file open: OK")); + + if (lc->fd != -1 && lc->mode != mode) { ++ DBG(lc, loopdev_debug("closing already open device (mode mismatch)")); + close(lc->fd); + lc->fd = -1; + lc->mode = 0; +diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c +index fdcc0be..a8381a8 100644 +--- a/sys-utils/losetup.c ++++ b/sys-utils/losetup.c +@@ -250,8 +250,6 @@ int main(int argc, char **argv) + if (loopcxt_init(&lc, 0)) + err(EXIT_FAILURE, _("failed to initialize loopcxt")); + +- loopcxt_enable_debug(&lc, getenv("LOOPDEV_DEBUG") ? TRUE : FALSE); +- + while ((c = getopt_long(argc, argv, "ac:d:De:E:fhj:o:p:PrvV", + longopts, NULL)) != -1) { + +-- +1.7.11.7 + diff --git a/0008-lib-loopdev-check-for-sys.patch b/0008-lib-loopdev-check-for-sys.patch new file mode 100644 index 0000000..ba50416 --- /dev/null +++ b/0008-lib-loopdev-check-for-sys.patch @@ -0,0 +1,35 @@ +From 939636dd664cc608232c272de77be96e6f089235 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 17 Oct 2012 11:43:39 +0200 +Subject: [PATCH 08/11] lib/loopdev: check for /sys + +The current loopdev code prefers /sys to get information about +loop devices. The old methods like scan /dev are fallback solution +only. Unfortunately, the code does not check if /sys is mounted. + +Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad +Signed-off-by: Karel Zak +--- + lib/loopdev.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/loopdev.c b/lib/loopdev.c +index 0e6033a..f62af83 100644 +--- a/lib/loopdev.c ++++ b/lib/loopdev.c +@@ -167,6 +167,12 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) + if (rc) + return rc; + ++ if (stat(_PATH_SYS_BLOCK, &st) || !S_ISDIR(st.st_mode)) { ++ lc->flags |= LOOPDEV_FL_NOSYSFS; ++ lc->flags &= ~LOOPDEV_FL_NOIOCTL; ++ DBG(lc, loopdev_debug("init: disable /sys usage")); ++ } ++ + if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && + get_linux_version() >= KERNEL_VERSION(2,6,37)) { + /* +-- +1.7.11.7 + diff --git a/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch b/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch new file mode 100644 index 0000000..dc4f7b7 --- /dev/null +++ b/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch @@ -0,0 +1,49 @@ +From 75f03f036011003c2a9e8e634ca3ce7930873318 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 22 Oct 2012 10:10:55 +0200 +Subject: [PATCH 09/11] fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make + check + + make check + sudo su - + cd tests + ./run.sh cramfs + +Signed-off-by: Karel Zak +--- + disk-utils/Makemodule.am | 5 +++++ + tests/commands.sh | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/disk-utils/Makemodule.am b/disk-utils/Makemodule.am +index f2360bf..b329a99 100644 +--- a/disk-utils/Makemodule.am ++++ b/disk-utils/Makemodule.am +@@ -97,6 +97,11 @@ fsck_cramfs_LDADD = $(LDADD) -lz libcommon.la + sbin_PROGRAMS += mkfs.cramfs + mkfs_cramfs_SOURCES = disk-utils/mkfs.cramfs.c $(cramfs_common_sources) + mkfs_cramfs_LDADD = $(LDADD) -lz libcommon.la ++ ++check_PROGRAMS += test_fsck.cramfs ++test_fsck_cramfs_SOURCES = $(fsck_cramfs_SOURCES) ++test_fsck_cramfs_LDADD = $(fsck_cramfs_LDADD) ++test_fsck_cramfs_CFLAGS = $(AM_CFLAGS) -DINCLUDE_FS_TESTS + endif + + +diff --git a/tests/commands.sh b/tests/commands.sh +index 8a1577e..db1d4ac 100644 +--- a/tests/commands.sh ++++ b/tests/commands.sh +@@ -37,7 +37,7 @@ TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"} + TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"} + TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"} + TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"} +-TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"} ++TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/test_fsck.cramfs"} + TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"} + + TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"} +-- +1.7.11.7 + diff --git a/0010-login-fix-compiler-warning-Wunused-result.patch b/0010-login-fix-compiler-warning-Wunused-result.patch new file mode 100644 index 0000000..2d50045 --- /dev/null +++ b/0010-login-fix-compiler-warning-Wunused-result.patch @@ -0,0 +1,44 @@ +From ed68f1e2f5609a3f42492df407d62b8fc006ea17 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 22 Oct 2012 13:13:02 +0200 +Subject: [PATCH 10/11] login: fix compiler warning [-Wunused-result] + +It's probably unnecessary paranoia, but let's check if we're able to +restore the original IDs after ~/.hushlogin file check. + +Signed-off-by: Karel Zak +--- + login-utils/login.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/login-utils/login.c b/login-utils/login.c +index 8ae5266..f5896da 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -1031,13 +1031,17 @@ static int get_hushlogin_status(struct passwd *pwd) + gid_t egid = getegid(); + + sprintf(buf, "%s/%s", pwd->pw_dir, file); +- setregid(-1, pwd->pw_gid); +- setreuid(0, pwd->pw_uid); +- ok = effective_access(buf, O_RDONLY) == 0; +- setuid(0); /* setreuid doesn't do it alone! */ +- setreuid(ruid, 0); +- setregid(-1, egid); + ++ if (setregid(-1, pwd->pw_gid) == 0 && ++ setreuid(0, pwd->pw_uid) == 0) ++ ok = effective_access(buf, O_RDONLY) == 0; ++ ++ if (setuid(0) != 0 || ++ setreuid(ruid, 0) != 0 || ++ setregid(-1, egid) != 0) { ++ syslog(LOG_ALERT, _("hush login status: restore original IDs failed")); ++ exit(EXIT_FAILURE); ++ } + if (ok) + return 1; /* enabled by user */ + } +-- +1.7.11.7 + diff --git a/0011-misc-make-readlink-usage-more-robust.patch b/0011-misc-make-readlink-usage-more-robust.patch new file mode 100644 index 0000000..ce4e754 --- /dev/null +++ b/0011-misc-make-readlink-usage-more-robust.patch @@ -0,0 +1,63 @@ +From a3528342bc716ecdabdd86609ae5a3198f560870 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 23 Oct 2012 12:40:39 +0200 +Subject: [PATCH 11/11] misc: make readlink() usage more robust + +Signed-off-by: Karel Zak +--- + misc-utils/lsblk.c | 4 ++-- + misc-utils/lslocks.c | 2 +- + sys-utils/eject.c | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index cc97c05..9c25dd0 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -962,7 +962,7 @@ static int get_wholedisk_from_partition_dirent(DIR *dir, const char *dirname, + int len; + + if ((len = readlink_at(dirfd(dir), dirname, +- d->d_name, path, sizeof(path))) < 0) ++ d->d_name, path, sizeof(path) - 1)) < 0) + return 0; + + path[len] = '\0'; +@@ -1075,7 +1075,7 @@ static char *devno_to_sysfs_name(dev_t devno, char *devname, char *buf, size_t b + return NULL; + } + +- len = readlink(path, buf, buf_size); ++ len = readlink(path, buf, buf_size - 1); + if (len < 0) { + warn(_("%s: failed to read link"), path); + return NULL; +diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c +index 45fb6de..495eb80 100644 +--- a/misc-utils/lslocks.c ++++ b/misc-utils/lslocks.c +@@ -196,7 +196,7 @@ static char *get_filename_sz(ino_t inode, pid_t pid, size_t *size) + continue; + + if ((len = readlink_at(fd, path, dp->d_name, +- sym, sizeof(path))) < 1) ++ sym, sizeof(sym) - 1)) < 1) + goto out; + + *size = sb.st_size; +diff --git a/sys-utils/eject.c b/sys-utils/eject.c +index 1a5b834..6d0da18 100644 +--- a/sys-utils/eject.c ++++ b/sys-utils/eject.c +@@ -837,7 +837,7 @@ static char *get_subsystem(char *chain, char *buf, size_t bufsz) + memcpy(chain + len, SUBSYSTEM_LINKNAME, sizeof(SUBSYSTEM_LINKNAME)); + + /* try if subsystem symlink exists */ +- sz = readlink(chain, buf, bufsz); ++ sz = readlink(chain, buf, bufsz - 1); + + /* remove last subsystem from chain */ + chain[len] = '\0'; +-- +1.7.11.7 + diff --git a/util-linux.spec b/util-linux.spec index 2d2e868..aa6dab8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.1 -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: http://en.wikipedia.org/wiki/Util-linux @@ -83,6 +83,23 @@ Patch3: util-linux-ng-2.21-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch4: util-linux-2.21-ipcs-32bit.patch + +### Upstream patches from proposed stable/v2.22.2 branch +### (remove after update to the final 2.22.2) +### +Patch101: 0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch +Patch102: 0002-wipefs-use-O_EXCL.patch +Patch103: 0003-swapon-remove-loop-declaration-smatch-scan.patch +Patch104: 0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch +Patch105: 0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch +Patch106: 0006-mount-add-long-options-for-L-and-U-to-man-page.patch +Patch107: 0007-lib-loopdev-improve-debug-messages.patch +Patch108: 0008-lib-loopdev-check-for-sys.patch +Patch109: 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch +Patch110: 0010-login-fix-compiler-warning-Wunused-result.patch +Patch111: 0011-misc-make-readlink-usage-more-robust.patch + + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -199,6 +216,18 @@ cp %{SOURCE8} %{SOURCE9} . %patch3 -p1 %patch4 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 +%patch106 -p1 +%patch107 -p1 +%patch108 -p1 +%patch109 -p1 +%patch110 -p1 +%patch111 -p1 + %build unset LINGUAS || : @@ -725,6 +754,10 @@ fi %changelog +* Thu Nov 1 2012 Karel Zak 2.22.1-2 +- apply pathes from upstream stable/v2.22 branch +- fix #865961 - wipefs -a should use O_EXCL + * Thu Oct 10 2012 Karel Zak 2.22.1-1 - upgrade to the release 2.22.1 From 7443d5608126e9c090cea78de3abb396e17d1397 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Nov 2012 15:09:04 +0100 Subject: [PATCH 125/425] 2.22.1-3: enable su(1) and runuser(1) Signed-off-by: Karel Zak --- ...-su-add-group-and-supp-group-options.patch | 203 +++ ...-move-generic-su-code-to-su-common.c.patch | 1576 +++++++++++++++++ ...unuser-new-command-derived-from-su-1.patch | 450 +++++ ...etpwuid-for-GNU-Hurt-coreutils-71b7d.patch | 68 + ...fy-writing-to-streams-was-successful.patch | 33 + 0205-su-move-long-options-to-main.patch | 60 + ...ion-fault-reporting-of-the-child-pro.patch | 40 + ...su-fixed-a-typo-in-pam-error-message.patch | 26 + 0208-runuser-add-u-to-not-execute-shell.patch | 281 +++ 0209-build-sys-move-runuser-to-sbin-dir.patch | 26 + util-linux-runuser-l.pamd | 4 + util-linux-runuser.pamd | 5 + util-linux-su-l.pamd | 6 + util-linux-su.pamd | 14 + util-linux.spec | 57 +- 15 files changed, 2847 insertions(+), 2 deletions(-) create mode 100644 0200-su-add-group-and-supp-group-options.patch create mode 100644 0201-su-move-generic-su-code-to-su-common.c.patch create mode 100644 0202-runuser-new-command-derived-from-su-1.patch create mode 100644 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch create mode 100644 0204-su-verify-writing-to-streams-was-successful.patch create mode 100644 0205-su-move-long-options-to-main.patch create mode 100644 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch create mode 100644 0207-su-fixed-a-typo-in-pam-error-message.patch create mode 100644 0208-runuser-add-u-to-not-execute-shell.patch create mode 100644 0209-build-sys-move-runuser-to-sbin-dir.patch create mode 100644 util-linux-runuser-l.pamd create mode 100644 util-linux-runuser.pamd create mode 100644 util-linux-su-l.pamd create mode 100644 util-linux-su.pamd diff --git a/0200-su-add-group-and-supp-group-options.patch b/0200-su-add-group-and-supp-group-options.patch new file mode 100644 index 0000000..fae59a9 --- /dev/null +++ b/0200-su-add-group-and-supp-group-options.patch @@ -0,0 +1,203 @@ +From 6273784aa4f40121b3963b41df0986044eeaced0 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 28 Aug 2012 16:32:28 +0200 +Subject: [PATCH 200/208] su: add --group and --supp-group options + +These options allow to specify alternative groups. The command +su(1) has to be executed by root. The implementation is based on +Fedora runuser(1) command. + +For example: + + # su --group=kzak --supp-group=uuidd - + # id + uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak) + +non-root user: + + $ su --group=kzak - + su: only root can specify alternative groups + +Signed-off-by: Karel Zak +--- + login-utils/su.1 | 6 +++++ + login-utils/su.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- + 2 files changed, 75 insertions(+), 4 deletions(-) + +diff --git a/login-utils/su.1 b/login-utils/su.1 +index 598cebd..59e1731 100644 +--- a/login-utils/su.1 ++++ b/login-utils/su.1 +@@ -59,6 +59,12 @@ Pass + to the shell which may or may not be useful depending on the + shell. + .TP ++\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR ++specify the primary group, this option is allowed for root user only ++.TP ++\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR ++specify a supplemental group, this option is allowed for root user only ++.TP + \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR + Starts the shell as login shell with an environment similar to a real + login: +diff --git a/login-utils/su.c b/login-utils/su.c +index c6b8bce..f11c757 100644 +--- a/login-utils/su.c ++++ b/login-utils/su.c +@@ -110,6 +110,8 @@ static struct option const longopts[] = + {"login", no_argument, NULL, 'l'}, + {"preserve-environment", no_argument, NULL, 'p'}, + {"shell", required_argument, NULL, 's'}, ++ {"group", required_argument, NULL, 'g'}, ++ {"supp-group", required_argument, NULL, 'G'}, + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'V'}, + {NULL, 0, NULL, 0} +@@ -424,11 +426,18 @@ modify_environment (const struct passwd *pw, const char *shell) + /* Become the user and group(s) specified by PW. */ + + static void +-init_groups (const struct passwd *pw) ++init_groups (const struct passwd *pw, gid_t *groups, int num_groups) + { + int retval; ++ + errno = 0; +- if (initgroups (pw->pw_name, pw->pw_gid) == -1) ++ ++ if (num_groups) ++ retval = setgroups (num_groups, groups); ++ else ++ retval = initgroups (pw->pw_name, pw->pw_gid); ++ ++ if (retval == -1) + { + cleanup_pam (PAM_ABORT); + err (EXIT_FAILURE, _("cannot set groups")); +@@ -535,6 +544,8 @@ usage (int status) + -c, --command pass a single command to the shell with -c\n\ + --session-command pass a single command to the shell with -c\n\ + and do not create a new session\n\ ++ -g --group=group specify the primary group\n\ ++ -G --supp-group=group specify a supplemental group\n\ + -f, --fast pass -f to the shell (for csh or tcsh)\n\ + -m, --preserve-environment do not reset environment variables\n\ + -p same as -m\n\ +@@ -556,6 +567,19 @@ void load_config(void) + logindefs_load_file(_PATH_LOGINDEFS); + } + ++/* ++ * Returns 1 if the current user is not root ++ */ ++static int ++evaluate_uid(void) ++{ ++ uid_t ruid = getuid(); ++ uid_t euid = geteuid(); ++ ++ /* if we're really root and aren't running setuid */ ++ return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; ++} ++ + int + main (int argc, char **argv) + { +@@ -566,6 +590,11 @@ main (int argc, char **argv) + char *shell = NULL; + struct passwd *pw; + struct passwd pw_copy; ++ struct group *gr; ++ gid_t groups[NGROUPS_MAX]; ++ int num_supp_groups = 0; ++ int use_gid = 0; ++ int restricted; + + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); +@@ -575,7 +604,7 @@ main (int argc, char **argv) + simulate_login = false; + change_environment = true; + +- while ((optc = getopt_long (argc, argv, "c:flmps:hV", longopts, NULL)) != -1) ++ while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) + { + switch (optc) + { +@@ -592,6 +621,26 @@ main (int argc, char **argv) + fast_startup = true; + break; + ++ case 'g': ++ gr = getgrnam(optarg); ++ if (!gr) ++ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); ++ use_gid = 1; ++ groups[0] = gr->gr_gid; ++ break; ++ ++ case 'G': ++ num_supp_groups++; ++ if (num_supp_groups >= NGROUPS_MAX) ++ errx(EXIT_FAILURE, ++ _("can't specify more than %d supplemental groups"), ++ NGROUPS_MAX - 1); ++ gr = getgrnam(optarg); ++ if (!gr) ++ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); ++ groups[num_supp_groups] = gr->gr_gid; ++ break; ++ + case 'l': + simulate_login = true; + break; +@@ -617,6 +666,8 @@ main (int argc, char **argv) + } + } + ++ restricted = evaluate_uid (); ++ + if (optind < argc && !strcmp (argv[optind], "-")) + { + simulate_login = true; +@@ -625,6 +676,9 @@ main (int argc, char **argv) + if (optind < argc) + new_user = argv[optind++]; + ++ if ((num_supp_groups || use_gid) && restricted) ++ errx(EXIT_FAILURE, _("only root can specify alternative groups")); ++ + logindefs_load_defaults = load_config; + + pw = getpwnam (new_user); +@@ -648,6 +702,17 @@ main (int argc, char **argv) + : DEFAULT_SHELL); + endpwent (); + ++ if (num_supp_groups && !use_gid) ++ { ++ pw->pw_gid = groups[1]; ++ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); ++ } ++ else if (use_gid) ++ { ++ pw->pw_gid = groups[0]; ++ num_supp_groups++; ++ } ++ + authenticate (pw); + + if (request_same_session || !command || !pw->pw_uid) +@@ -666,7 +731,7 @@ main (int argc, char **argv) + } + shell = xstrdup (shell ? shell : pw->pw_shell); + +- init_groups (pw); ++ init_groups (pw, groups, num_supp_groups); + + create_watching_parent (); + /* Now we're in the child. */ +-- +1.7.11.7 + diff --git a/0201-su-move-generic-su-code-to-su-common.c.patch b/0201-su-move-generic-su-code-to-su-common.c.patch new file mode 100644 index 0000000..25c7141 --- /dev/null +++ b/0201-su-move-generic-su-code-to-su-common.c.patch @@ -0,0 +1,1576 @@ +From 1874fa1ef38ce41eaf61b1aada25fac5f6966839 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 1 Nov 2012 12:38:48 +0100 +Subject: [PATCH 201/208] su: move generic su code to su-common.c + +Signed-off-by: Karel Zak +--- + login-utils/Makemodule.am | 2 + + login-utils/su-common.c | 759 ++++++++++++++++++++++++++++++++++++++++++++++ + login-utils/su-common.h | 12 + + login-utils/su.c | 754 +-------------------------------------------- + 4 files changed, 776 insertions(+), 751 deletions(-) + create mode 100644 login-utils/su-common.c + create mode 100644 login-utils/su-common.h + +diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am +index e10da46..b918f00 100644 +--- a/login-utils/Makemodule.am ++++ b/login-utils/Makemodule.am +@@ -83,6 +83,8 @@ bin_PROGRAMS += su + dist_man_MANS += login-utils/su.1 + su_SOURCES = \ + login-utils/su.c \ ++ login-utils/su-common.c \ ++ login-utils/su-common.h \ + login-utils/logindefs.c \ + login-utils/logindefs.h + su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +new file mode 100644 +index 0000000..f1f46aa +--- /dev/null ++++ b/login-utils/su-common.c +@@ -0,0 +1,759 @@ ++/* su for Linux. Run a shell with substitute user and group IDs. ++ Copyright (C) 1992-2006 Free Software Foundation, Inc. ++ Copyright (C) 2012 SUSE Linux Products GmbH, Nuernberg ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ++ ++/* Run a shell with the real and effective UID and GID and groups ++ of USER, default `root'. ++ ++ The shell run is taken from USER's password entry, /bin/sh if ++ none is specified there. If the account has a password, su ++ prompts for a password unless run by a user with real UID 0. ++ ++ Does not change the current directory. ++ Sets `HOME' and `SHELL' from the password entry for USER, and if ++ USER is not root, sets `USER' and `LOGNAME' to USER. ++ The subshell is not a login shell. ++ ++ If one or more ARGs are given, they are passed as additional ++ arguments to the subshell. ++ ++ Does not handle /bin/sh or other shells specially ++ (setting argv[0] to "-su", passing -c only to certain shells, etc.). ++ I don't see the point in doing that, and it's ugly. ++ ++ Based on an implemenation by David MacKenzie . */ ++ ++enum ++{ ++ EXIT_CANNOT_INVOKE = 126, ++ EXIT_ENOENT = 127 ++}; ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "err.h" ++ ++#include ++#include "c.h" ++#include "xalloc.h" ++#include "nls.h" ++#include "pathnames.h" ++#include "env.h" ++ ++/* name of the pam configuration files. separate configs for su and su - */ ++#define PAM_SERVICE_NAME "su" ++#define PAM_SERVICE_NAME_L "su-l" ++ ++#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) ++ ++#include "logindefs.h" ++#include "su-common.h" ++ ++/* The shell to run if none is given in the user's passwd entry. */ ++#define DEFAULT_SHELL "/bin/sh" ++ ++/* The user to become if none is specified. */ ++#define DEFAULT_USER "root" ++ ++#ifndef HAVE_ENVIRON_DECL ++extern char **environ; ++#endif ++ ++static void run_shell (char const *, char const *, char **, size_t) ++ __attribute__ ((__noreturn__)); ++ ++/* If true, pass the `-f' option to the subshell. */ ++static bool fast_startup; ++ ++/* If true, simulate a login instead of just starting a shell. */ ++static bool simulate_login; ++ ++/* If true, change some environment vars to indicate the user su'd to. */ ++static bool change_environment; ++ ++/* If true, then don't call setsid() with a command. */ ++int same_session = 0; ++ ++/* SU_MODE_{RUNUSER,SU} */ ++static int su_mode; ++ ++static bool _pam_session_opened; ++static bool _pam_cred_established; ++static sig_atomic_t volatile caught_signal = false; ++static pam_handle_t *pamh = NULL; ++ ++static struct option const longopts[] = ++{ ++ {"command", required_argument, NULL, 'c'}, ++ {"session-command", required_argument, NULL, 'C'}, ++ {"fast", no_argument, NULL, 'f'}, ++ {"login", no_argument, NULL, 'l'}, ++ {"preserve-environment", no_argument, NULL, 'p'}, ++ {"shell", required_argument, NULL, 's'}, ++ {"group", required_argument, NULL, 'g'}, ++ {"supp-group", required_argument, NULL, 'G'}, ++ {"help", no_argument, 0, 'h'}, ++ {"version", no_argument, 0, 'V'}, ++ {NULL, 0, NULL, 0} ++}; ++ ++/* Log the fact that someone has run su to the user given by PW; ++ if SUCCESSFUL is true, they gave the correct password, etc. */ ++ ++static void ++log_su (struct passwd const *pw, bool successful) ++{ ++ const char *new_user, *old_user, *tty; ++ ++ new_user = pw->pw_name; ++ /* The utmp entry (via getlogin) is probably the best way to identify ++ the user, especially if someone su's from a su-shell. */ ++ old_user = getlogin (); ++ if (!old_user) ++ { ++ /* getlogin can fail -- usually due to lack of utmp entry. ++ Resort to getpwuid. */ ++ struct passwd *pwd = getpwuid (getuid ()); ++ old_user = (pwd ? pwd->pw_name : ""); ++ } ++ tty = ttyname (STDERR_FILENO); ++ if (!tty) ++ tty = "none"; ++ ++ openlog (program_invocation_short_name, 0 , LOG_AUTH); ++ syslog (LOG_NOTICE, "%s(to %s) %s on %s", ++ successful ? "" : "FAILED SU ", ++ new_user, old_user, tty); ++ closelog (); ++} ++ ++static struct pam_conv conv = ++{ ++ misc_conv, ++ NULL ++}; ++ ++static void ++cleanup_pam (int retcode) ++{ ++ int saved_errno = errno; ++ ++ if (_pam_session_opened) ++ pam_close_session (pamh, 0); ++ ++ if (_pam_cred_established) ++ pam_setcred (pamh, PAM_DELETE_CRED | PAM_SILENT); ++ ++ pam_end(pamh, retcode); ++ ++ errno = saved_errno; ++} ++ ++/* Signal handler for parent process. */ ++static void ++su_catch_sig (int sig __attribute__((__unused__))) ++{ ++ caught_signal = true; ++} ++ ++/* Export env variables declared by PAM modules. */ ++static void ++export_pamenv (void) ++{ ++ char **env; ++ ++ /* This is a copy but don't care to free as we exec later anyways. */ ++ env = pam_getenvlist (pamh); ++ while (env && *env) ++ { ++ if (putenv (*env) != 0) ++ err (EXIT_FAILURE, NULL); ++ env++; ++ } ++} ++ ++static void ++create_watching_parent (void) ++{ ++ pid_t child; ++ sigset_t ourset; ++ int status = 0; ++ int retval; ++ ++ retval = pam_open_session (pamh, 0); ++ if (is_pam_failure(retval)) ++ { ++ cleanup_pam (retval); ++ errx (EXIT_FAILURE, _("cannot not open session: %s"), ++ pam_strerror (pamh, retval)); ++ } ++ else ++ _pam_session_opened = 1; ++ ++ child = fork (); ++ if (child == (pid_t) -1) ++ { ++ cleanup_pam (PAM_ABORT); ++ err (EXIT_FAILURE, _("cannot create child process")); ++ } ++ ++ /* the child proceeds to run the shell */ ++ if (child == 0) ++ return; ++ ++ /* In the parent watch the child. */ ++ ++ /* su without pam support does not have a helper that keeps ++ sitting on any directory so let's go to /. */ ++ if (chdir ("/") != 0) ++ warn (_("cannot change directory to %s"), "/"); ++ ++ sigfillset (&ourset); ++ if (sigprocmask (SIG_BLOCK, &ourset, NULL)) ++ { ++ warn (_("cannot block signals")); ++ caught_signal = true; ++ } ++ if (!caught_signal) ++ { ++ struct sigaction action; ++ action.sa_handler = su_catch_sig; ++ sigemptyset (&action.sa_mask); ++ action.sa_flags = 0; ++ sigemptyset (&ourset); ++ if (!same_session) ++ { ++ if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) ++ { ++ warn (_("cannot set signal handler")); ++ caught_signal = true; ++ } ++ } ++ if (!caught_signal && (sigaddset(&ourset, SIGTERM) ++ || sigaddset(&ourset, SIGALRM) ++ || sigaction(SIGTERM, &action, NULL) ++ || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) { ++ warn (_("cannot set signal handler")); ++ caught_signal = true; ++ } ++ if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) ++ || sigaction(SIGQUIT, &action, NULL))) ++ { ++ warn (_("cannot set signal handler")); ++ caught_signal = true; ++ } ++ } ++ if (!caught_signal) ++ { ++ pid_t pid; ++ for (;;) ++ { ++ pid = waitpid (child, &status, WUNTRACED); ++ ++ if (pid != (pid_t)-1 && WIFSTOPPED (status)) ++ { ++ kill (getpid (), SIGSTOP); ++ /* once we get here, we must have resumed */ ++ kill (pid, SIGCONT); ++ } ++ else ++ break; ++ } ++ if (pid != (pid_t)-1) ++ if (WIFSIGNALED (status)) ++ status = WTERMSIG (status) + 128; ++ else ++ status = WEXITSTATUS (status); ++ else ++ status = 1; ++ } ++ else ++ status = 1; ++ ++ if (caught_signal) ++ { ++ fprintf (stderr, _("\nSession terminated, killing shell...")); ++ kill (child, SIGTERM); ++ } ++ ++ cleanup_pam (PAM_SUCCESS); ++ ++ if (caught_signal) ++ { ++ sleep (2); ++ kill (child, SIGKILL); ++ fprintf (stderr, _(" ...killed.\n")); ++ } ++ exit (status); ++} ++ ++static void ++authenticate (const struct passwd *pw) ++{ ++ const struct passwd *lpw; ++ const char *cp; ++ int retval; ++ ++ retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, ++ pw->pw_name, &conv, &pamh); ++ if (is_pam_failure(retval)) ++ goto done; ++ ++ if (isatty (0) && (cp = ttyname (0)) != NULL) ++ { ++ const char *tty; ++ ++ if (strncmp (cp, "/dev/", 5) == 0) ++ tty = cp + 5; ++ else ++ tty = cp; ++ retval = pam_set_item (pamh, PAM_TTY, tty); ++ if (is_pam_failure(retval)) ++ goto done; ++ } ++ ++ lpw = getpwuid (getuid ()); ++ if (lpw && lpw->pw_name) ++ { ++ retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); ++ if (is_pam_failure(retval)) ++ goto done; ++ } ++ ++ retval = pam_authenticate (pamh, 0); ++ if (is_pam_failure(retval)) ++ goto done; ++ ++ retval = pam_acct_mgmt (pamh, 0); ++ if (retval == PAM_NEW_AUTHTOK_REQD) ++ { ++ /* Password has expired. Offer option to change it. */ ++ retval = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK); ++ } ++ ++done: ++ ++ log_su (pw, !is_pam_failure(retval)); ++ ++ if (is_pam_failure(retval)) ++ { ++ const char *msg = pam_strerror(pamh, retval); ++ pam_end(pamh, retval); ++ sleep (getlogindefs_num ("FAIL_DELAY", 1)); ++ errx (EXIT_FAILURE, "%s", msg?msg:_("incorrect password")); ++ } ++} ++ ++static void ++set_path(const struct passwd* pw) ++{ ++ int r; ++ if (pw->pw_uid) ++ r = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); ++ ++ else if ((r = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) ++ r = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); ++ ++ if (r != 0) ++ err (EXIT_FAILURE, _("failed to set PATH")); ++} ++ ++/* Update `environ' for the new shell based on PW, with SHELL being ++ the value for the SHELL environment variable. */ ++ ++static void ++modify_environment (const struct passwd *pw, const char *shell) ++{ ++ if (simulate_login) ++ { ++ /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. ++ Unset all other environment variables. */ ++ char const *term = getenv ("TERM"); ++ if (term) ++ term = xstrdup (term); ++ environ = xmalloc ((6 + !!term) * sizeof (char *)); ++ environ[0] = NULL; ++ if (term) ++ xsetenv ("TERM", term, 1); ++ xsetenv ("HOME", pw->pw_dir, 1); ++ xsetenv ("SHELL", shell, 1); ++ xsetenv ("USER", pw->pw_name, 1); ++ xsetenv ("LOGNAME", pw->pw_name, 1); ++ set_path(pw); ++ } ++ else ++ { ++ /* Set HOME, SHELL, and if not becoming a super-user, ++ USER and LOGNAME. */ ++ if (change_environment) ++ { ++ xsetenv ("HOME", pw->pw_dir, 1); ++ xsetenv ("SHELL", shell, 1); ++ if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) ++ set_path(pw); ++ ++ if (pw->pw_uid) ++ { ++ xsetenv ("USER", pw->pw_name, 1); ++ xsetenv ("LOGNAME", pw->pw_name, 1); ++ } ++ } ++ } ++ ++ export_pamenv (); ++} ++ ++/* Become the user and group(s) specified by PW. */ ++ ++static void ++init_groups (const struct passwd *pw, gid_t *groups, int num_groups) ++{ ++ int retval; ++ ++ errno = 0; ++ ++ if (num_groups) ++ retval = setgroups (num_groups, groups); ++ else ++ retval = initgroups (pw->pw_name, pw->pw_gid); ++ ++ if (retval == -1) ++ { ++ cleanup_pam (PAM_ABORT); ++ err (EXIT_FAILURE, _("cannot set groups")); ++ } ++ endgrent (); ++ ++ retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); ++ if (is_pam_failure(retval)) ++ errx (EXIT_FAILURE, "%s", pam_strerror (pamh, retval)); ++ else ++ _pam_cred_established = 1; ++} ++ ++static void ++change_identity (const struct passwd *pw) ++{ ++ if (setgid (pw->pw_gid)) ++ err (EXIT_FAILURE, _("cannot set group id")); ++ if (setuid (pw->pw_uid)) ++ err (EXIT_FAILURE, _("cannot set user id")); ++} ++ ++/* Run SHELL, or DEFAULT_SHELL if SHELL is empty. ++ If COMMAND is nonzero, pass it to the shell with the -c option. ++ Pass ADDITIONAL_ARGS to the shell as more arguments; there ++ are N_ADDITIONAL_ARGS extra arguments. */ ++ ++static void ++run_shell (char const *shell, char const *command, char **additional_args, ++ size_t n_additional_args) ++{ ++ size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; ++ char const **args = xcalloc (n_args, sizeof *args); ++ size_t argno = 1; ++ ++ if (simulate_login) ++ { ++ char *arg0; ++ char *shell_basename; ++ ++ shell_basename = basename (shell); ++ arg0 = xmalloc (strlen (shell_basename) + 2); ++ arg0[0] = '-'; ++ strcpy (arg0 + 1, shell_basename); ++ args[0] = arg0; ++ } ++ else ++ args[0] = basename (shell); ++ if (fast_startup) ++ args[argno++] = "-f"; ++ if (command) ++ { ++ args[argno++] = "-c"; ++ args[argno++] = command; ++ } ++ memcpy (args + argno, additional_args, n_additional_args * sizeof *args); ++ args[argno + n_additional_args] = NULL; ++ execv (shell, (char **) args); ++ ++ { ++ int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); ++ warn ("%s", shell); ++ exit (exit_status); ++ } ++} ++ ++/* Return true if SHELL is a restricted shell (one not returned by ++ getusershell), else false, meaning it is a standard shell. */ ++ ++static bool ++restricted_shell (const char *shell) ++{ ++ char *line; ++ ++ setusershell (); ++ while ((line = getusershell ()) != NULL) ++ { ++ if (*line != '#' && !strcmp (line, shell)) ++ { ++ endusershell (); ++ return false; ++ } ++ } ++ endusershell (); ++ return true; ++} ++ ++static void __attribute__((__noreturn__)) ++usage (int status) ++{ ++ if (status != EXIT_SUCCESS) ++ fprintf (stderr, _("Try `%s --help' for more information.\n"), ++ program_invocation_short_name); ++ else ++ { ++ fputs(USAGE_HEADER, stdout); ++ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); ++ fputs (_("\n\ ++ Change the effective user id and group id to that of USER.\n\ ++ A mere - implies -l. If USER not given, assume root.\n"), stdout); ++ fputs(USAGE_OPTIONS, stdout); ++ fputs (_("\ ++ -, -l, --login make the shell a login shell\n\ ++ -c, --command pass a single command to the shell with -c\n\ ++ --session-command pass a single command to the shell with -c\n\ ++ and do not create a new session\n\ ++ -g --group=group specify the primary group\n\ ++ -G --supp-group=group specify a supplemental group\n\ ++ -f, --fast pass -f to the shell (for csh or tcsh)\n\ ++ -m, --preserve-environment do not reset environment variables\n\ ++ -p same as -m\n\ ++ -s, --shell run shell if /etc/shells allows it\n\ ++"), stdout); ++ ++ fputs(USAGE_SEPARATOR, stdout); ++ fputs(USAGE_HELP, stdout); ++ fputs(USAGE_VERSION, stdout); ++ printf(USAGE_MAN_TAIL("su(1)")); ++ } ++ exit (status); ++} ++ ++static ++void load_config(void) ++{ ++ logindefs_load_file("/etc/default/su"); ++ logindefs_load_file(_PATH_LOGINDEFS); ++} ++ ++/* ++ * Returns 1 if the current user is not root ++ */ ++static int ++evaluate_uid(void) ++{ ++ uid_t ruid = getuid(); ++ uid_t euid = geteuid(); ++ ++ /* if we're really root and aren't running setuid */ ++ return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; ++} ++ ++int ++su_main (int argc, char **argv, int mode) ++{ ++ int optc; ++ const char *new_user = DEFAULT_USER; ++ char *command = NULL; ++ int request_same_session = 0; ++ char *shell = NULL; ++ struct passwd *pw; ++ struct passwd pw_copy; ++ struct group *gr; ++ gid_t groups[NGROUPS_MAX]; ++ int num_supp_groups = 0; ++ int use_gid = 0; ++ int restricted; ++ ++ setlocale (LC_ALL, ""); ++ bindtextdomain (PACKAGE, LOCALEDIR); ++ textdomain (PACKAGE); ++ ++ su_mode = mode; ++ fast_startup = false; ++ simulate_login = false; ++ change_environment = true; ++ ++ while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) ++ { ++ switch (optc) ++ { ++ case 'c': ++ command = optarg; ++ break; ++ ++ case 'C': ++ command = optarg; ++ request_same_session = 1; ++ break; ++ ++ case 'f': ++ fast_startup = true; ++ break; ++ ++ case 'g': ++ gr = getgrnam(optarg); ++ if (!gr) ++ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); ++ use_gid = 1; ++ groups[0] = gr->gr_gid; ++ break; ++ ++ case 'G': ++ num_supp_groups++; ++ if (num_supp_groups >= NGROUPS_MAX) ++ errx(EXIT_FAILURE, ++ _("can't specify more than %d supplemental groups"), ++ NGROUPS_MAX - 1); ++ gr = getgrnam(optarg); ++ if (!gr) ++ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); ++ groups[num_supp_groups] = gr->gr_gid; ++ break; ++ ++ case 'l': ++ simulate_login = true; ++ break; ++ ++ case 'm': ++ case 'p': ++ change_environment = false; ++ break; ++ ++ case 's': ++ shell = optarg; ++ break; ++ ++ case 'h': ++ usage(0); ++ ++ case 'V': ++ printf(UTIL_LINUX_VERSION); ++ exit(EXIT_SUCCESS); ++ ++ default: ++ usage (EXIT_FAILURE); ++ } ++ } ++ ++ restricted = evaluate_uid (); ++ ++ if (optind < argc && !strcmp (argv[optind], "-")) ++ { ++ simulate_login = true; ++ ++optind; ++ } ++ if (optind < argc) ++ new_user = argv[optind++]; ++ ++ if ((num_supp_groups || use_gid) && restricted) ++ errx(EXIT_FAILURE, _("only root can specify alternative groups")); ++ ++ logindefs_load_defaults = load_config; ++ ++ pw = getpwnam (new_user); ++ if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0] ++ && pw->pw_passwd)) ++ errx (EXIT_FAILURE, _("user %s does not exist"), new_user); ++ ++ /* Make a copy of the password information and point pw at the local ++ copy instead. Otherwise, some systems (e.g. Linux) would clobber ++ the static data through the getlogin call from log_su. ++ Also, make sure pw->pw_shell is a nonempty string. ++ It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), ++ but that doesn't have a default shell listed. */ ++ pw_copy = *pw; ++ pw = &pw_copy; ++ pw->pw_name = xstrdup (pw->pw_name); ++ pw->pw_passwd = xstrdup (pw->pw_passwd); ++ pw->pw_dir = xstrdup (pw->pw_dir); ++ pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0] ++ ? pw->pw_shell ++ : DEFAULT_SHELL); ++ endpwent (); ++ ++ if (num_supp_groups && !use_gid) ++ { ++ pw->pw_gid = groups[1]; ++ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); ++ } ++ else if (use_gid) ++ { ++ pw->pw_gid = groups[0]; ++ num_supp_groups++; ++ } ++ ++ authenticate (pw); ++ ++ if (request_same_session || !command || !pw->pw_uid) ++ same_session = 1; ++ ++ if (!shell && !change_environment) ++ shell = getenv ("SHELL"); ++ if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) ++ { ++ /* The user being su'd to has a nonstandard shell, and so is ++ probably a uucp account or has restricted access. Don't ++ compromise the account by allowing access with a standard ++ shell. */ ++ warnx (_("using restricted shell %s"), pw->pw_shell); ++ shell = NULL; ++ } ++ shell = xstrdup (shell ? shell : pw->pw_shell); ++ ++ init_groups (pw, groups, num_supp_groups); ++ ++ create_watching_parent (); ++ /* Now we're in the child. */ ++ ++ change_identity (pw); ++ if (!same_session) ++ setsid (); ++ ++ /* Set environment after pam_open_session, which may put KRB5CCNAME ++ into the pam_env, etc. */ ++ ++ modify_environment (pw, shell); ++ ++ if (simulate_login && chdir (pw->pw_dir) != 0) ++ warn (_("warning: cannot change directory to %s"), pw->pw_dir); ++ ++ run_shell (shell, command, argv + optind, max (0, argc - optind)); ++} ++ ++// vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 +diff --git a/login-utils/su-common.h b/login-utils/su-common.h +new file mode 100644 +index 0000000..4e4dc9d +--- /dev/null ++++ b/login-utils/su-common.h +@@ -0,0 +1,12 @@ ++#ifndef UTIL_LINUX_SU_COMMON_H ++#define UTIL_LINUX_SU_COMMON_H ++ ++enum { ++ SU_MODE, ++ RUNUSER_MODE ++}; ++ ++extern int su_main(int argc, char **argv, int mode); ++ ++#endif /* UTIL_LINUX_SU_COMMON */ ++ +diff --git a/login-utils/su.c b/login-utils/su.c +index f11c757..6179e1b 100644 +--- a/login-utils/su.c ++++ b/login-utils/su.c +@@ -1,754 +1,6 @@ +-/* su for Linux. Run a shell with substitute user and group IDs. +- Copyright (C) 1992-2006 Free Software Foundation, Inc. +- Copyright (C) 2012 SUSE Linux Products GmbH, Nuernberg ++#include "su-common.h" + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 2, or (at your option) +- any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software Foundation, +- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +- +-/* Run a shell with the real and effective UID and GID and groups +- of USER, default `root'. +- +- The shell run is taken from USER's password entry, /bin/sh if +- none is specified there. If the account has a password, su +- prompts for a password unless run by a user with real UID 0. +- +- Does not change the current directory. +- Sets `HOME' and `SHELL' from the password entry for USER, and if +- USER is not root, sets `USER' and `LOGNAME' to USER. +- The subshell is not a login shell. +- +- If one or more ARGs are given, they are passed as additional +- arguments to the subshell. +- +- Does not handle /bin/sh or other shells specially +- (setting argv[0] to "-su", passing -c only to certain shells, etc.). +- I don't see the point in doing that, and it's ugly. +- +- Based on an implemenation by David MacKenzie . */ +- +-enum +-{ +- EXIT_CANNOT_INVOKE = 126, +- EXIT_ENOENT = 127 +-}; +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "err.h" +- +-#include +-#include "c.h" +-#include "xalloc.h" +-#include "nls.h" +-#include "pathnames.h" +-#include "env.h" +- +-/* name of the pam configuration files. separate configs for su and su - */ +-#define PAM_SERVICE_NAME "su" +-#define PAM_SERVICE_NAME_L "su-l" +- +-#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) +- +-#include "logindefs.h" +- +-/* The shell to run if none is given in the user's passwd entry. */ +-#define DEFAULT_SHELL "/bin/sh" +- +-/* The user to become if none is specified. */ +-#define DEFAULT_USER "root" +- +-#ifndef HAVE_ENVIRON_DECL +-extern char **environ; +-#endif +- +-static void run_shell (char const *, char const *, char **, size_t) +- __attribute__ ((__noreturn__)); +- +-/* If true, pass the `-f' option to the subshell. */ +-static bool fast_startup; +- +-/* If true, simulate a login instead of just starting a shell. */ +-static bool simulate_login; +- +-/* If true, change some environment vars to indicate the user su'd to. */ +-static bool change_environment; +- +-/* If true, then don't call setsid() with a command. */ +-int same_session = 0; +- +-static bool _pam_session_opened; +-static bool _pam_cred_established; +-static sig_atomic_t volatile caught_signal = false; +-static pam_handle_t *pamh = NULL; +- +-static struct option const longopts[] = +-{ +- {"command", required_argument, NULL, 'c'}, +- {"session-command", required_argument, NULL, 'C'}, +- {"fast", no_argument, NULL, 'f'}, +- {"login", no_argument, NULL, 'l'}, +- {"preserve-environment", no_argument, NULL, 'p'}, +- {"shell", required_argument, NULL, 's'}, +- {"group", required_argument, NULL, 'g'}, +- {"supp-group", required_argument, NULL, 'G'}, +- {"help", no_argument, 0, 'h'}, +- {"version", no_argument, 0, 'V'}, +- {NULL, 0, NULL, 0} +-}; +- +-/* Log the fact that someone has run su to the user given by PW; +- if SUCCESSFUL is true, they gave the correct password, etc. */ +- +-static void +-log_su (struct passwd const *pw, bool successful) +-{ +- const char *new_user, *old_user, *tty; +- +- new_user = pw->pw_name; +- /* The utmp entry (via getlogin) is probably the best way to identify +- the user, especially if someone su's from a su-shell. */ +- old_user = getlogin (); +- if (!old_user) +- { +- /* getlogin can fail -- usually due to lack of utmp entry. +- Resort to getpwuid. */ +- struct passwd *pwd = getpwuid (getuid ()); +- old_user = (pwd ? pwd->pw_name : ""); +- } +- tty = ttyname (STDERR_FILENO); +- if (!tty) +- tty = "none"; +- +- openlog (program_invocation_short_name, 0 , LOG_AUTH); +- syslog (LOG_NOTICE, "%s(to %s) %s on %s", +- successful ? "" : "FAILED SU ", +- new_user, old_user, tty); +- closelog (); +-} +- +-static struct pam_conv conv = +-{ +- misc_conv, +- NULL +-}; +- +-static void +-cleanup_pam (int retcode) +-{ +- int saved_errno = errno; +- +- if (_pam_session_opened) +- pam_close_session (pamh, 0); +- +- if (_pam_cred_established) +- pam_setcred (pamh, PAM_DELETE_CRED | PAM_SILENT); +- +- pam_end(pamh, retcode); +- +- errno = saved_errno; +-} +- +-/* Signal handler for parent process. */ +-static void +-su_catch_sig (int sig __attribute__((__unused__))) +-{ +- caught_signal = true; +-} +- +-/* Export env variables declared by PAM modules. */ +-static void +-export_pamenv (void) +-{ +- char **env; +- +- /* This is a copy but don't care to free as we exec later anyways. */ +- env = pam_getenvlist (pamh); +- while (env && *env) +- { +- if (putenv (*env) != 0) +- err (EXIT_FAILURE, NULL); +- env++; +- } +-} +- +-static void +-create_watching_parent (void) +-{ +- pid_t child; +- sigset_t ourset; +- int status = 0; +- int retval; +- +- retval = pam_open_session (pamh, 0); +- if (is_pam_failure(retval)) +- { +- cleanup_pam (retval); +- errx (EXIT_FAILURE, _("cannot not open session: %s"), +- pam_strerror (pamh, retval)); +- } +- else +- _pam_session_opened = 1; +- +- child = fork (); +- if (child == (pid_t) -1) +- { +- cleanup_pam (PAM_ABORT); +- err (EXIT_FAILURE, _("cannot create child process")); +- } +- +- /* the child proceeds to run the shell */ +- if (child == 0) +- return; +- +- /* In the parent watch the child. */ +- +- /* su without pam support does not have a helper that keeps +- sitting on any directory so let's go to /. */ +- if (chdir ("/") != 0) +- warn (_("cannot change directory to %s"), "/"); +- +- sigfillset (&ourset); +- if (sigprocmask (SIG_BLOCK, &ourset, NULL)) +- { +- warn (_("cannot block signals")); +- caught_signal = true; +- } +- if (!caught_signal) +- { +- struct sigaction action; +- action.sa_handler = su_catch_sig; +- sigemptyset (&action.sa_mask); +- action.sa_flags = 0; +- sigemptyset (&ourset); +- if (!same_session) +- { +- if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) +- { +- warn (_("cannot set signal handler")); +- caught_signal = true; +- } +- } +- if (!caught_signal && (sigaddset(&ourset, SIGTERM) +- || sigaddset(&ourset, SIGALRM) +- || sigaction(SIGTERM, &action, NULL) +- || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) { +- warn (_("cannot set signal handler")); +- caught_signal = true; +- } +- if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) +- || sigaction(SIGQUIT, &action, NULL))) +- { +- warn (_("cannot set signal handler")); +- caught_signal = true; +- } +- } +- if (!caught_signal) +- { +- pid_t pid; +- for (;;) +- { +- pid = waitpid (child, &status, WUNTRACED); +- +- if (pid != (pid_t)-1 && WIFSTOPPED (status)) +- { +- kill (getpid (), SIGSTOP); +- /* once we get here, we must have resumed */ +- kill (pid, SIGCONT); +- } +- else +- break; +- } +- if (pid != (pid_t)-1) +- if (WIFSIGNALED (status)) +- status = WTERMSIG (status) + 128; +- else +- status = WEXITSTATUS (status); +- else +- status = 1; +- } +- else +- status = 1; +- +- if (caught_signal) +- { +- fprintf (stderr, _("\nSession terminated, killing shell...")); +- kill (child, SIGTERM); +- } +- +- cleanup_pam (PAM_SUCCESS); +- +- if (caught_signal) +- { +- sleep (2); +- kill (child, SIGKILL); +- fprintf (stderr, _(" ...killed.\n")); +- } +- exit (status); +-} +- +-static void +-authenticate (const struct passwd *pw) ++int main (int argc, char **argv) + { +- const struct passwd *lpw; +- const char *cp; +- int retval; +- +- retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, +- pw->pw_name, &conv, &pamh); +- if (is_pam_failure(retval)) +- goto done; +- +- if (isatty (0) && (cp = ttyname (0)) != NULL) +- { +- const char *tty; +- +- if (strncmp (cp, "/dev/", 5) == 0) +- tty = cp + 5; +- else +- tty = cp; +- retval = pam_set_item (pamh, PAM_TTY, tty); +- if (is_pam_failure(retval)) +- goto done; +- } +- +- lpw = getpwuid (getuid ()); +- if (lpw && lpw->pw_name) +- { +- retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); +- if (is_pam_failure(retval)) +- goto done; +- } +- +- retval = pam_authenticate (pamh, 0); +- if (is_pam_failure(retval)) +- goto done; +- +- retval = pam_acct_mgmt (pamh, 0); +- if (retval == PAM_NEW_AUTHTOK_REQD) +- { +- /* Password has expired. Offer option to change it. */ +- retval = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK); +- } +- +-done: +- +- log_su (pw, !is_pam_failure(retval)); +- +- if (is_pam_failure(retval)) +- { +- const char *msg = pam_strerror(pamh, retval); +- pam_end(pamh, retval); +- sleep (getlogindefs_num ("FAIL_DELAY", 1)); +- errx (EXIT_FAILURE, "%s", msg?msg:_("incorrect password")); +- } ++ return su_main(argc, argv, SU_MODE); + } +- +-static void +-set_path(const struct passwd* pw) +-{ +- int r; +- if (pw->pw_uid) +- r = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); +- +- else if ((r = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) +- r = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); +- +- if (r != 0) +- err (EXIT_FAILURE, _("failed to set PATH")); +-} +- +-/* Update `environ' for the new shell based on PW, with SHELL being +- the value for the SHELL environment variable. */ +- +-static void +-modify_environment (const struct passwd *pw, const char *shell) +-{ +- if (simulate_login) +- { +- /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. +- Unset all other environment variables. */ +- char const *term = getenv ("TERM"); +- if (term) +- term = xstrdup (term); +- environ = xmalloc ((6 + !!term) * sizeof (char *)); +- environ[0] = NULL; +- if (term) +- xsetenv ("TERM", term, 1); +- xsetenv ("HOME", pw->pw_dir, 1); +- xsetenv ("SHELL", shell, 1); +- xsetenv ("USER", pw->pw_name, 1); +- xsetenv ("LOGNAME", pw->pw_name, 1); +- set_path(pw); +- } +- else +- { +- /* Set HOME, SHELL, and if not becoming a super-user, +- USER and LOGNAME. */ +- if (change_environment) +- { +- xsetenv ("HOME", pw->pw_dir, 1); +- xsetenv ("SHELL", shell, 1); +- if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) +- set_path(pw); +- +- if (pw->pw_uid) +- { +- xsetenv ("USER", pw->pw_name, 1); +- xsetenv ("LOGNAME", pw->pw_name, 1); +- } +- } +- } +- +- export_pamenv (); +-} +- +-/* Become the user and group(s) specified by PW. */ +- +-static void +-init_groups (const struct passwd *pw, gid_t *groups, int num_groups) +-{ +- int retval; +- +- errno = 0; +- +- if (num_groups) +- retval = setgroups (num_groups, groups); +- else +- retval = initgroups (pw->pw_name, pw->pw_gid); +- +- if (retval == -1) +- { +- cleanup_pam (PAM_ABORT); +- err (EXIT_FAILURE, _("cannot set groups")); +- } +- endgrent (); +- +- retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); +- if (is_pam_failure(retval)) +- errx (EXIT_FAILURE, "%s", pam_strerror (pamh, retval)); +- else +- _pam_cred_established = 1; +-} +- +-static void +-change_identity (const struct passwd *pw) +-{ +- if (setgid (pw->pw_gid)) +- err (EXIT_FAILURE, _("cannot set group id")); +- if (setuid (pw->pw_uid)) +- err (EXIT_FAILURE, _("cannot set user id")); +-} +- +-/* Run SHELL, or DEFAULT_SHELL if SHELL is empty. +- If COMMAND is nonzero, pass it to the shell with the -c option. +- Pass ADDITIONAL_ARGS to the shell as more arguments; there +- are N_ADDITIONAL_ARGS extra arguments. */ +- +-static void +-run_shell (char const *shell, char const *command, char **additional_args, +- size_t n_additional_args) +-{ +- size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; +- char const **args = xcalloc (n_args, sizeof *args); +- size_t argno = 1; +- +- if (simulate_login) +- { +- char *arg0; +- char *shell_basename; +- +- shell_basename = basename (shell); +- arg0 = xmalloc (strlen (shell_basename) + 2); +- arg0[0] = '-'; +- strcpy (arg0 + 1, shell_basename); +- args[0] = arg0; +- } +- else +- args[0] = basename (shell); +- if (fast_startup) +- args[argno++] = "-f"; +- if (command) +- { +- args[argno++] = "-c"; +- args[argno++] = command; +- } +- memcpy (args + argno, additional_args, n_additional_args * sizeof *args); +- args[argno + n_additional_args] = NULL; +- execv (shell, (char **) args); +- +- { +- int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); +- warn ("%s", shell); +- exit (exit_status); +- } +-} +- +-/* Return true if SHELL is a restricted shell (one not returned by +- getusershell), else false, meaning it is a standard shell. */ +- +-static bool +-restricted_shell (const char *shell) +-{ +- char *line; +- +- setusershell (); +- while ((line = getusershell ()) != NULL) +- { +- if (*line != '#' && !strcmp (line, shell)) +- { +- endusershell (); +- return false; +- } +- } +- endusershell (); +- return true; +-} +- +-static void __attribute__((__noreturn__)) +-usage (int status) +-{ +- if (status != EXIT_SUCCESS) +- fprintf (stderr, _("Try `%s --help' for more information.\n"), +- program_invocation_short_name); +- else +- { +- fputs(USAGE_HEADER, stdout); +- printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); +- fputs (_("\n\ +- Change the effective user id and group id to that of USER.\n\ +- A mere - implies -l. If USER not given, assume root.\n"), stdout); +- fputs(USAGE_OPTIONS, stdout); +- fputs (_("\ +- -, -l, --login make the shell a login shell\n\ +- -c, --command pass a single command to the shell with -c\n\ +- --session-command pass a single command to the shell with -c\n\ +- and do not create a new session\n\ +- -g --group=group specify the primary group\n\ +- -G --supp-group=group specify a supplemental group\n\ +- -f, --fast pass -f to the shell (for csh or tcsh)\n\ +- -m, --preserve-environment do not reset environment variables\n\ +- -p same as -m\n\ +- -s, --shell run shell if /etc/shells allows it\n\ +-"), stdout); +- +- fputs(USAGE_SEPARATOR, stdout); +- fputs(USAGE_HELP, stdout); +- fputs(USAGE_VERSION, stdout); +- printf(USAGE_MAN_TAIL("su(1)")); +- } +- exit (status); +-} +- +-static +-void load_config(void) +-{ +- logindefs_load_file("/etc/default/su"); +- logindefs_load_file(_PATH_LOGINDEFS); +-} +- +-/* +- * Returns 1 if the current user is not root +- */ +-static int +-evaluate_uid(void) +-{ +- uid_t ruid = getuid(); +- uid_t euid = geteuid(); +- +- /* if we're really root and aren't running setuid */ +- return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; +-} +- +-int +-main (int argc, char **argv) +-{ +- int optc; +- const char *new_user = DEFAULT_USER; +- char *command = NULL; +- int request_same_session = 0; +- char *shell = NULL; +- struct passwd *pw; +- struct passwd pw_copy; +- struct group *gr; +- gid_t groups[NGROUPS_MAX]; +- int num_supp_groups = 0; +- int use_gid = 0; +- int restricted; +- +- setlocale (LC_ALL, ""); +- bindtextdomain (PACKAGE, LOCALEDIR); +- textdomain (PACKAGE); +- +- fast_startup = false; +- simulate_login = false; +- change_environment = true; +- +- while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) +- { +- switch (optc) +- { +- case 'c': +- command = optarg; +- break; +- +- case 'C': +- command = optarg; +- request_same_session = 1; +- break; +- +- case 'f': +- fast_startup = true; +- break; +- +- case 'g': +- gr = getgrnam(optarg); +- if (!gr) +- errx(EXIT_FAILURE, _("group %s does not exist"), optarg); +- use_gid = 1; +- groups[0] = gr->gr_gid; +- break; +- +- case 'G': +- num_supp_groups++; +- if (num_supp_groups >= NGROUPS_MAX) +- errx(EXIT_FAILURE, +- _("can't specify more than %d supplemental groups"), +- NGROUPS_MAX - 1); +- gr = getgrnam(optarg); +- if (!gr) +- errx(EXIT_FAILURE, _("group %s does not exist"), optarg); +- groups[num_supp_groups] = gr->gr_gid; +- break; +- +- case 'l': +- simulate_login = true; +- break; +- +- case 'm': +- case 'p': +- change_environment = false; +- break; +- +- case 's': +- shell = optarg; +- break; +- +- case 'h': +- usage(0); +- +- case 'V': +- printf(UTIL_LINUX_VERSION); +- exit(EXIT_SUCCESS); +- +- default: +- usage (EXIT_FAILURE); +- } +- } +- +- restricted = evaluate_uid (); +- +- if (optind < argc && !strcmp (argv[optind], "-")) +- { +- simulate_login = true; +- ++optind; +- } +- if (optind < argc) +- new_user = argv[optind++]; +- +- if ((num_supp_groups || use_gid) && restricted) +- errx(EXIT_FAILURE, _("only root can specify alternative groups")); +- +- logindefs_load_defaults = load_config; +- +- pw = getpwnam (new_user); +- if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0] +- && pw->pw_passwd)) +- errx (EXIT_FAILURE, _("user %s does not exist"), new_user); +- +- /* Make a copy of the password information and point pw at the local +- copy instead. Otherwise, some systems (e.g. Linux) would clobber +- the static data through the getlogin call from log_su. +- Also, make sure pw->pw_shell is a nonempty string. +- It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), +- but that doesn't have a default shell listed. */ +- pw_copy = *pw; +- pw = &pw_copy; +- pw->pw_name = xstrdup (pw->pw_name); +- pw->pw_passwd = xstrdup (pw->pw_passwd); +- pw->pw_dir = xstrdup (pw->pw_dir); +- pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0] +- ? pw->pw_shell +- : DEFAULT_SHELL); +- endpwent (); +- +- if (num_supp_groups && !use_gid) +- { +- pw->pw_gid = groups[1]; +- memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); +- } +- else if (use_gid) +- { +- pw->pw_gid = groups[0]; +- num_supp_groups++; +- } +- +- authenticate (pw); +- +- if (request_same_session || !command || !pw->pw_uid) +- same_session = 1; +- +- if (!shell && !change_environment) +- shell = getenv ("SHELL"); +- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) +- { +- /* The user being su'd to has a nonstandard shell, and so is +- probably a uucp account or has restricted access. Don't +- compromise the account by allowing access with a standard +- shell. */ +- warnx (_("using restricted shell %s"), pw->pw_shell); +- shell = NULL; +- } +- shell = xstrdup (shell ? shell : pw->pw_shell); +- +- init_groups (pw, groups, num_supp_groups); +- +- create_watching_parent (); +- /* Now we're in the child. */ +- +- change_identity (pw); +- if (!same_session) +- setsid (); +- +- /* Set environment after pam_open_session, which may put KRB5CCNAME +- into the pam_env, etc. */ +- +- modify_environment (pw, shell); +- +- if (simulate_login && chdir (pw->pw_dir) != 0) +- warn (_("warning: cannot change directory to %s"), pw->pw_dir); +- +- run_shell (shell, command, argv + optind, max (0, argc - optind)); +-} +- +-// vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 +-- +1.7.11.7 + diff --git a/0202-runuser-new-command-derived-from-su-1.patch b/0202-runuser-new-command-derived-from-su-1.patch new file mode 100644 index 0000000..7282092 --- /dev/null +++ b/0202-runuser-new-command-derived-from-su-1.patch @@ -0,0 +1,450 @@ +From d8c2f623ab9d9e7da1490244cb8c77c3017545dc Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 29 Aug 2012 17:34:26 +0200 +Subject: [PATCH 202/208] runuser: new command (derived from su(1)) + + This command is based on su(1), the differences: + + - based on Fedora runuser su(1) patch + - not installed with suid rights + - allowed for root users only + - don't ask for password + - uses PAM session, for example: + +$ cat /etc/pam.d/runuser +auth sufficient pam_rootok.so +session optional pam_keyinit.so revoke +session required pam_limits.so +session required pam_unix.so + +$ cat /etc/pam.d/runuser-l +auth include runuser +session optional pam_keyinit.so force revoke +session include runuser + +Signed-off-by: Karel Zak +--- + .gitignore | 1 + + configure.ac | 9 ++ + login-utils/Makemodule.am | 13 +++ + login-utils/runuser.1 | 230 ++++++++++++++++++++++++++++++++++++++++++++++ + login-utils/runuser.c | 7 ++ + login-utils/su-common.c | 51 ++++++++-- + 6 files changed, 303 insertions(+), 8 deletions(-) + create mode 100644 login-utils/runuser.1 + create mode 100644 login-utils/runuser.c + +#diff --git a/.gitignore b/.gitignore +#index fbc5636..5be008f 100644 +#--- a/.gitignore +#+++ b/.gitignore +#@@ -138,6 +138,7 @@ tests/run.sh.trs +# /resizepart +# /rev +# /rtcwake +#+/runuser +# /sample-mkfs +# /sample-partitions +# /sample-superblocks +diff --git a/configure.ac b/configure.ac +index 87e85fa..83ef6ce 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1149,6 +1149,15 @@ UL_REQUIRES_HAVE([su], [security_pam_misc_h], [PAM header file]) + AM_CONDITIONAL(BUILD_SU, test "x$build_su" = xyes) + + ++AC_ARG_ENABLE([runuser], ++ AS_HELP_STRING([--disable-runuser], [do not build runuser]), ++ [], enable_runuser=yes ++) ++UL_BUILD_INIT([runuser]) ++UL_REQUIRES_HAVE([runuser], [security_pam_misc_h], [PAM header file]) ++AM_CONDITIONAL(BUILD_RUNUSER, test "x$build_runuser" = xyes) ++ ++ + AC_ARG_ENABLE([schedutils], + AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]), + [], enable_schedutils=yes +diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am +index b918f00..e26d9a7 100644 +--- a/login-utils/Makemodule.am ++++ b/login-utils/Makemodule.am +@@ -93,6 +93,19 @@ su_LDADD = $(LDADD) -lpam -lpam_misc + endif + + ++if BUILD_RUNUSER ++bin_PROGRAMS += runuser ++dist_man_MANS += login-utils/runuser.1 ++runuser_SOURCES = \ ++ login-utils/runuser.c \ ++ login-utils/su-common.c \ ++ login-utils/su-common.h \ ++ login-utils/logindefs.c \ ++ login-utils/logindefs.h ++runuser_LDADD = $(LDADD) -lpam -lpam_misc ++endif ++ ++ + if BUILD_NEWGRP + usrbin_exec_PROGRAMS += newgrp + dist_man_MANS += login-utils/newgrp.1 +diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 +new file mode 100644 +index 0000000..66ad1c4 +--- /dev/null ++++ b/login-utils/runuser.1 +@@ -0,0 +1,230 @@ ++.TH RUNUSER "1" "August 2012" "util-linux" "User Commands" ++.SH NAME ++runuser \- run a command with substitute user and group ID ++.SH SYNOPSIS ++.B runuser ++[options...] [\-] [user [args...]] ++.SH DESCRIPTION ++.B runuser ++allows to run commands with substitute user and group ID. ++The difference between the commands ++.B runuser ++and ++.B su ++is that ++.B runuser ++does not ask for password, because it may be executed by root user only. ++The command ++.B runuser ++does not have to be installed with suid permissions. ++.PP ++When called without arguments ++.B runuser ++defaults to running an interactive shell as ++.IR root . ++.PP ++For backward compatibility ++.B runuser ++defaults to not change the current directory and to only set the ++environment variables ++.B HOME ++and ++.B SHELL ++(plus ++.B USER ++and ++.B LOGNAME ++if the target ++.I user ++is not root). It is recommended to always use the ++.B \-\-login ++option (instead it's shortcut ++.BR \- ) ++to avoid side effects caused by mixing environments. ++.PP ++This version of ++.B runuser ++uses PAM for session management. ++.SH OPTIONS ++.TP ++\fB\-c\fR \fIcommand\fR, \fB\-\-command\fR=\fIcommand\fR ++Pass ++.I command ++to the shell with the ++.B \-c ++option. ++.TP ++\fB\-\-session\-command\fR=\fIcommand\fR ++Same as ++.B \-c ++but do not create a new session (discouraged). ++.TP ++\fB\-f\fR, \fB\-\-fast\fR ++Pass ++.B \-f ++to the shell which may or may not be useful depending on the ++shell. ++.TP ++\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR ++specify the primary group, this option is allowed for root user only ++.TP ++\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR ++specify a supplemental group, this option is allowed for root user only ++.TP ++\fB\-\fR, \fB\-l\fR, \fB\-\-login\fR ++Starts the shell as login shell with an environment similar to a real ++login: ++.RS 10 ++.TP ++o ++clears all environment variables except for ++.B TERM ++.TP ++o ++initializes the environment variables ++.BR HOME , ++.BR SHELL , ++.BR USER , ++.BR LOGNAME , ++.B PATH ++.TP ++o ++changes to the target user's home directory ++.TP ++o ++sets argv[0] of the shell to ++.RB ' \- ' ++in order to make the shell a login shell ++.RE ++.TP ++\fB\-m\fR, \fB\-p\fR, \fB\-\-preserve-environment\fR ++Preserves the whole environment, ie does not set ++.BR HOME , ++.BR SHELL , ++.B USER ++nor ++.BR LOGNAME . ++.TP ++\fB\-s\fR \fISHELL\fR, \fB\-\-shell\fR=\fISHELL\fR ++Runs the specified shell instead of the default. The shell to run is ++selected according to the following rules in order: ++.RS 10 ++.TP ++o ++the shell specified with ++.B \-\-shell ++.TP ++o ++The shell specified in the environment variable ++.B SHELL ++if the ++.B \-\-preserve-environment ++option is used. ++.TP ++o ++the shell listed in the passwd entry of the target user ++.TP ++o ++/bin/sh ++.RE ++.IP ++If the target user has a restricted shell (i.e. not listed in ++/etc/shells) the ++.B \-\-shell ++option and the ++.B SHELL ++environment variables are ignored unless the calling user is root. ++.TP ++\fB\-\-help\fR ++Display help text and exit. ++.TP ++\fB\-\-version\fR ++Display version information and exit. ++.SH CONFIG FILES ++.B runuser ++reads the ++.I /etc/default/runuser ++and ++.I /etc/login.defs ++configuration files. The following configuration items are relevant ++for ++.BR runuser : ++.PP ++.B ENV_PATH ++(string) ++.RS 4 ++Defines the PATH environment variable for a regular user. The ++default value is ++.IR /usr/local/bin:\:/bin:\:/usr/bin . ++.RE ++.PP ++.B ENV_ROOTPATH ++(string) ++.br ++.B ENV_SUPATH ++(string) ++.RS 4 ++Defines the PATH environment variable for root. The default value is ++.IR /usr/local/sbin:\:/usr/local/bin:\:/sbin:\:/bin:\:/usr/sbin:\:/usr/bin . ++.RE ++.PP ++.B ALWAYS_SET_PATH ++(boolean) ++.RS 4 ++If set to ++.I yes ++and \-\-login and \-\-preserve\-environment were not specified ++.B runuser ++initializes ++.BR PATH . ++.RE ++.SH EXIT STATUS ++.B runuser ++normally returns the exit status of the command it executed. If the ++command was killed by a signal, ++.B runuser ++returns the number of the signal plus 128. ++.PP ++Exit status generated by ++.B runuser ++itself: ++.RS 10 ++.TP ++1 ++Generic error before executing the requested command ++.TP ++126 ++The requested command could not be executed ++.TP ++127 ++The requested command could was not found ++.RE ++.SH FILES ++.PD 0 ++.TP 17 ++/etc/pam.d/runuser ++default PAM configuration file ++.TP ++/etc/pam.d/runuser-l ++PAM configuration file if \-\-login is specified ++.TP ++/etc/default/runuser ++runuser specific logindef config file ++.TP ++/etc/login.defs ++global logindef config file ++.PD 1 ++.SH "SEE ALSO" ++.BR pam (8), ++.BR shells (5), ++.BR login.defs (5), ++.BR su (1) ++.SH AUTHOR ++Derived from coreutils' su which was based on an implemenation from ++David MacKenzie and Fedora runuser command from Dan Walsh. ++.SH AVAILABILITY ++The runuser command is part of the util-linux package and is ++available from ++.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ ++Linux Kernel Archive ++.UE . +diff --git a/login-utils/runuser.c b/login-utils/runuser.c +new file mode 100644 +index 0000000..d4f37f4 +--- /dev/null ++++ b/login-utils/runuser.c +@@ -0,0 +1,7 @@ ++ ++#include "su-common.h" ++ ++int main(int argc, char **argv) ++{ ++ return su_main(argc, argv, RUNUSER_MODE); ++} +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index f1f46aa..770f455 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -65,8 +65,14 @@ enum + #include "env.h" + + /* name of the pam configuration files. separate configs for su and su - */ +-#define PAM_SERVICE_NAME "su" +-#define PAM_SERVICE_NAME_L "su-l" ++#define PAM_SRVNAME_SU "su" ++#define PAM_SRVNAME_SU_L "su-l" ++ ++#define PAM_SRVNAME_RUNUSER "runuser" ++#define PAM_SRVNAME_RUNUSER_L "runuser-l" ++ ++#define _PATH_LOGINDEFS_SU "/etc/defaults/su" ++#define _PATH_LOGINDEFS_RUNUSER "/etc/defaults/runuser" + + #define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) + +@@ -106,6 +112,8 @@ static bool _pam_cred_established; + static sig_atomic_t volatile caught_signal = false; + static pam_handle_t *pamh = NULL; + ++static int restricted = 1; /* zero for root user */ ++ + static struct option const longopts[] = + { + {"command", required_argument, NULL, 'c'}, +@@ -146,7 +154,8 @@ log_su (struct passwd const *pw, bool successful) + + openlog (program_invocation_short_name, 0 , LOG_AUTH); + syslog (LOG_NOTICE, "%s(to %s) %s on %s", +- successful ? "" : "FAILED SU ", ++ successful ? "" : ++ su_mode == RUNUSER_MODE ? "FAILED RUNUSER " : "FAILED SU ", + new_user, old_user, tty); + closelog (); + } +@@ -315,11 +324,19 @@ static void + authenticate (const struct passwd *pw) + { + const struct passwd *lpw; +- const char *cp; ++ const char *cp, *srvname = NULL; + int retval; + +- retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, +- pw->pw_name, &conv, &pamh); ++ switch (su_mode) { ++ case SU_MODE: ++ srvname = simulate_login ? PAM_SRVNAME_SU_L : PAM_SRVNAME_SU; ++ break; ++ case RUNUSER_MODE: ++ srvname = simulate_login ? PAM_SRVNAME_RUNUSER_L : PAM_SRVNAME_RUNUSER; ++ break; ++ } ++ ++ retval = pam_start (srvname, pw->pw_name, &conv, &pamh); + if (is_pam_failure(retval)) + goto done; + +@@ -344,6 +361,17 @@ authenticate (const struct passwd *pw) + goto done; + } + ++ if (su_mode == RUNUSER_MODE) ++ { ++ /* ++ * This is the only difference between runuser(1) and su(1). The command ++ * runuser(1) does not required authentication, because user is root. ++ */ ++ if (restricted) ++ errx(EXIT_FAILURE, _("may not be used by non-root users")); ++ return; ++ } ++ + retval = pam_authenticate (pamh, 0); + if (is_pam_failure(retval)) + goto done; +@@ -567,7 +595,15 @@ usage (int status) + static + void load_config(void) + { +- logindefs_load_file("/etc/default/su"); ++ switch (su_mode) { ++ case SU_MODE: ++ logindefs_load_file(_PATH_LOGINDEFS_SU); ++ break; ++ case RUNUSER_MODE: ++ logindefs_load_file(_PATH_LOGINDEFS_RUNUSER); ++ break; ++ } ++ + logindefs_load_file(_PATH_LOGINDEFS); + } + +@@ -598,7 +634,6 @@ su_main (int argc, char **argv, int mode) + gid_t groups[NGROUPS_MAX]; + int num_supp_groups = 0; + int use_gid = 0; +- int restricted; + + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); +-- +1.7.11.7 + diff --git a/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch b/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch new file mode 100644 index 0000000..2ab11bc --- /dev/null +++ b/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch @@ -0,0 +1,68 @@ +From 8f33f59e72bef913068f9a80338f12d8d4434010 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 5 Sep 2012 11:13:34 +0200 +Subject: [PATCH 203/208] su: more robust getpwuid() for GNU Hurt [coreutils + 71b7ddc] + +Let's support GNU Hurd over-engineering where a process can exist +without UID and getuid() returns -1 and sets errno. + +Signed-off-by: Karel Zak +--- + login-utils/su-common.c | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index 770f455..a253dda 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -129,6 +129,26 @@ static struct option const longopts[] = + {NULL, 0, NULL, 0} + }; + ++ ++static struct passwd * ++current_getpwuid(void) ++{ ++ uid_t ruid; ++ ++ /* GNU Hurd implementation has an extension where a process can exist in a ++ * non-conforming environment, and thus be outside the realms of POSIX ++ * process identifiers; on this platform, getuid() fails with a status of ++ * (uid_t)(-1) and sets errno if a program is run from a non-conforming ++ * environment. ++ * ++ * http://austingroupbugs.net/view.php?id=511 ++ */ ++ errno = 0; ++ ruid = getuid (); ++ ++ return errno == 0 ? getpwuid (ruid) : NULL; ++} ++ + /* Log the fact that someone has run su to the user given by PW; + if SUCCESSFUL is true, they gave the correct password, etc. */ + +@@ -145,8 +165,8 @@ log_su (struct passwd const *pw, bool successful) + { + /* getlogin can fail -- usually due to lack of utmp entry. + Resort to getpwuid. */ +- struct passwd *pwd = getpwuid (getuid ()); +- old_user = (pwd ? pwd->pw_name : ""); ++ struct passwd *pwd = current_getpwuid(); ++ old_user = pwd ? pwd->pw_name : ""; + } + tty = ttyname (STDERR_FILENO); + if (!tty) +@@ -353,7 +373,7 @@ authenticate (const struct passwd *pw) + goto done; + } + +- lpw = getpwuid (getuid ()); ++ lpw = current_getpwuid (); + if (lpw && lpw->pw_name) + { + retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); +-- +1.7.11.7 + diff --git a/0204-su-verify-writing-to-streams-was-successful.patch b/0204-su-verify-writing-to-streams-was-successful.patch new file mode 100644 index 0000000..4418ff5 --- /dev/null +++ b/0204-su-verify-writing-to-streams-was-successful.patch @@ -0,0 +1,33 @@ +From 589e24a625c5e83805e95b917eaf3bf1be64369e Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 5 Sep 2012 11:21:07 +0200 +Subject: [PATCH 204/208] su: verify writing to streams was successful + +Signed-off-by: Karel Zak +--- + login-utils/su-common.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index a253dda..1f97328 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -63,6 +63,7 @@ enum + #include "nls.h" + #include "pathnames.h" + #include "env.h" ++#include "closestream.h" + + /* name of the pam configuration files. separate configs for su and su - */ + #define PAM_SRVNAME_SU "su" +@@ -658,6 +659,7 @@ su_main (int argc, char **argv, int mode) + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); ++ atexit(close_stdout); + + su_mode = mode; + fast_startup = false; +-- +1.7.11.7 + diff --git a/0205-su-move-long-options-to-main.patch b/0205-su-move-long-options-to-main.patch new file mode 100644 index 0000000..ed57c5d --- /dev/null +++ b/0205-su-move-long-options-to-main.patch @@ -0,0 +1,60 @@ +From bea3752e9d048895b6750e2d0d8ce72fed20cef9 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 5 Sep 2012 11:26:20 +0200 +Subject: [PATCH 205/208] su: move long options to main() + +Signed-off-by: Karel Zak +--- + login-utils/su-common.c | 29 ++++++++++++++--------------- + 1 file changed, 14 insertions(+), 15 deletions(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index 1f97328..778738f 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -115,21 +115,6 @@ static pam_handle_t *pamh = NULL; + + static int restricted = 1; /* zero for root user */ + +-static struct option const longopts[] = +-{ +- {"command", required_argument, NULL, 'c'}, +- {"session-command", required_argument, NULL, 'C'}, +- {"fast", no_argument, NULL, 'f'}, +- {"login", no_argument, NULL, 'l'}, +- {"preserve-environment", no_argument, NULL, 'p'}, +- {"shell", required_argument, NULL, 's'}, +- {"group", required_argument, NULL, 'g'}, +- {"supp-group", required_argument, NULL, 'G'}, +- {"help", no_argument, 0, 'h'}, +- {"version", no_argument, 0, 'V'}, +- {NULL, 0, NULL, 0} +-}; +- + + static struct passwd * + current_getpwuid(void) +@@ -656,6 +641,20 @@ su_main (int argc, char **argv, int mode) + int num_supp_groups = 0; + int use_gid = 0; + ++ static const struct option longopts[] = { ++ {"command", required_argument, NULL, 'c'}, ++ {"session-command", required_argument, NULL, 'C'}, ++ {"fast", no_argument, NULL, 'f'}, ++ {"login", no_argument, NULL, 'l'}, ++ {"preserve-environment", no_argument, NULL, 'p'}, ++ {"shell", required_argument, NULL, 's'}, ++ {"group", required_argument, NULL, 'g'}, ++ {"supp-group", required_argument, NULL, 'G'}, ++ {"help", no_argument, 0, 'h'}, ++ {"version", no_argument, 0, 'V'}, ++ {NULL, 0, NULL, 0} ++ }; ++ + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); +-- +1.7.11.7 + diff --git a/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch b/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch new file mode 100644 index 0000000..ffb3df8 --- /dev/null +++ b/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch @@ -0,0 +1,40 @@ +From 1fe22a730b1a6595c6da9ea8cd58594337e66dc3 Mon Sep 17 00:00:00 2001 +From: Ondrej Oprala +Date: Tue, 11 Sep 2012 16:39:17 +0200 +Subject: [PATCH 206/208] su: add segmentation fault reporting of the child + process +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Child processes that ended with segmentation fault previously +indicated this with return status only. The report is now more +verbose if core dump is allowed. + +Improved-by: Pádraig Brady +Signed-off-by: Ondrej Oprala +--- + login-utils/su-common.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index 778738f..118e080 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -300,7 +300,12 @@ create_watching_parent (void) + } + if (pid != (pid_t)-1) + if (WIFSIGNALED (status)) +- status = WTERMSIG (status) + 128; ++ { ++ status = WTERMSIG (status) + 128; ++ if (WCOREDUMP (status)) ++ fprintf (stderr, _("%s (core dumped)\n"), ++ strsignal (WTERMSIG (status))); ++ } + else + status = WEXITSTATUS (status); + else +-- +1.7.11.7 + diff --git a/0207-su-fixed-a-typo-in-pam-error-message.patch b/0207-su-fixed-a-typo-in-pam-error-message.patch new file mode 100644 index 0000000..f5c19d6 --- /dev/null +++ b/0207-su-fixed-a-typo-in-pam-error-message.patch @@ -0,0 +1,26 @@ +From 2f3cb337e1cda9e897480f256453f369914380b3 Mon Sep 17 00:00:00 2001 +From: Vitezslav Cizek +Date: Mon, 1 Oct 2012 14:48:16 +0200 +Subject: [PATCH 207/208] su: fixed a typo in pam error message + +Signed-off-by: Vitezslav Cizek +--- + login-utils/su-common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index 118e080..ea6864e 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -223,7 +223,7 @@ create_watching_parent (void) + if (is_pam_failure(retval)) + { + cleanup_pam (retval); +- errx (EXIT_FAILURE, _("cannot not open session: %s"), ++ errx (EXIT_FAILURE, _("cannot open session: %s"), + pam_strerror (pamh, retval)); + } + else +-- +1.7.11.7 + diff --git a/0208-runuser-add-u-to-not-execute-shell.patch b/0208-runuser-add-u-to-not-execute-shell.patch new file mode 100644 index 0000000..5085956 --- /dev/null +++ b/0208-runuser-add-u-to-not-execute-shell.patch @@ -0,0 +1,281 @@ +From f0c57c2b1129b17e68e54d08421d1f209f1b6c57 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 13 Sep 2012 11:58:00 +0200 +Subject: [PATCH 208/208] runuser: add -u to not execute shell + +Signed-off-by: Karel Zak +--- + login-utils/runuser.1 | 20 ++++--- + login-utils/su-common.c | 138 +++++++++++++++++++++++++++++++----------------- + login-utils/su.1 | 1 + + 3 files changed, 105 insertions(+), 54 deletions(-) + +diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 +index 66ad1c4..4620165 100644 +--- a/login-utils/runuser.1 ++++ b/login-utils/runuser.1 +@@ -3,10 +3,21 @@ + runuser \- run a command with substitute user and group ID + .SH SYNOPSIS + .B runuser +-[options...] [\-] [user [args...]] ++[options] -u ++.IR user ++.IR "command " [ argument ...] ++.LP ++.B runuser ++[options] [-] ++[ ++.IR "user " [ argument ...] ++] + .SH DESCRIPTION + .B runuser + allows to run commands with substitute user and group ID. ++If the option \fB\-u\fR not given, fallback to ++.B su ++compatible semantic and shell is executed. + The difference between the commands + .B runuser + and +@@ -36,12 +47,7 @@ and + .B LOGNAME + if the target + .I user +-is not root). It is recommended to always use the +-.B \-\-login +-option (instead it's shortcut +-.BR \- ) +-to avoid side effects caused by mixing environments. +-.PP ++is not root). + This version of + .B runuser + uses PAM for session management. +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index ea6864e..4e1f6b2 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -439,7 +439,8 @@ modify_environment (const struct passwd *pw, const char *shell) + if (term) + xsetenv ("TERM", term, 1); + xsetenv ("HOME", pw->pw_dir, 1); +- xsetenv ("SHELL", shell, 1); ++ if (shell) ++ xsetenv ("SHELL", shell, 1); + xsetenv ("USER", pw->pw_name, 1); + xsetenv ("LOGNAME", pw->pw_name, 1); + set_path(pw); +@@ -451,7 +452,8 @@ modify_environment (const struct passwd *pw, const char *shell) + if (change_environment) + { + xsetenv ("HOME", pw->pw_dir, 1); +- xsetenv ("SHELL", shell, 1); ++ if (shell) ++ xsetenv ("SHELL", shell, 1); + if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) + set_path(pw); + +@@ -571,35 +573,47 @@ restricted_shell (const char *shell) + static void __attribute__((__noreturn__)) + usage (int status) + { +- if (status != EXIT_SUCCESS) +- fprintf (stderr, _("Try `%s --help' for more information.\n"), +- program_invocation_short_name); +- else +- { +- fputs(USAGE_HEADER, stdout); +- printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); +- fputs (_("\n\ +- Change the effective user id and group id to that of USER.\n\ +- A mere - implies -l. If USER not given, assume root.\n"), stdout); +- fputs(USAGE_OPTIONS, stdout); +- fputs (_("\ +- -, -l, --login make the shell a login shell\n\ +- -c, --command pass a single command to the shell with -c\n\ +- --session-command pass a single command to the shell with -c\n\ +- and do not create a new session\n\ +- -g --group=group specify the primary group\n\ +- -G --supp-group=group specify a supplemental group\n\ +- -f, --fast pass -f to the shell (for csh or tcsh)\n\ +- -m, --preserve-environment do not reset environment variables\n\ +- -p same as -m\n\ +- -s, --shell run shell if /etc/shells allows it\n\ +-"), stdout); +- +- fputs(USAGE_SEPARATOR, stdout); +- fputs(USAGE_HELP, stdout); +- fputs(USAGE_VERSION, stdout); +- printf(USAGE_MAN_TAIL("su(1)")); +- } ++ if (su_mode == RUNUSER_MODE) { ++ fputs(USAGE_HEADER, stdout); ++ printf (_(" %s [options] -u COMMAND\n"), program_invocation_short_name); ++ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); ++ fputs (_("\n" ++ "Run COMMAND with the effective id and group id. If -u not\n" ++ "given, fallback to su(1) compatible semantic and shell is executed.\n" ++ "The options -l, -c, -f, -s are mutually exclusive to -u.\n"), stdout); ++ ++ fputs(USAGE_OPTIONS, stdout); ++ ++ fputs (_( ++ " -u, --user username\n"), stdout); ++ ++ } else { ++ fputs(USAGE_HEADER, stdout); ++ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); ++ fputs (_("\n" ++ "Change the effective user id and group id to that of USER.\n" ++ "A mere - implies -l. If USER not given, assume root.\n"), stdout); ++ ++ fputs(USAGE_OPTIONS, stdout); ++ } ++ ++ fputs (_( ++ " -m, -p, --preserve-environment do not reset environment variables\n" ++ " -g, --group specify the primary group\n" ++ " -G, --supp-group specify a supplemental group\n\n"), stdout); ++ ++ fputs (_( ++ " -, -l, --login make the shell a login shell\n" ++ " -c, --command pass a single command to the shell with -c\n" ++ " --session-command pass a single command to the shell with -c\n" ++ " and do not create a new session\n" ++ " -f, --fast pass -f to the shell (for csh or tcsh)\n" ++ " -s, --shell run shell if /etc/shells allows it\n"), stdout); ++ ++ fputs(USAGE_SEPARATOR, stdout); ++ fputs(USAGE_HELP, stdout); ++ fputs(USAGE_VERSION, stdout); ++ printf(USAGE_MAN_TAIL(su_mode == SU_MODE ? "su(1)" : "runuser(1)")); + exit (status); + } + +@@ -635,7 +649,7 @@ int + su_main (int argc, char **argv, int mode) + { + int optc; +- const char *new_user = DEFAULT_USER; ++ const char *new_user = DEFAULT_USER, *runuser_user = NULL; + char *command = NULL; + int request_same_session = 0; + char *shell = NULL; +@@ -655,6 +669,7 @@ su_main (int argc, char **argv, int mode) + {"shell", required_argument, NULL, 's'}, + {"group", required_argument, NULL, 'g'}, + {"supp-group", required_argument, NULL, 'G'}, ++ {"user", required_argument, NULL, 'u'}, /* runuser only */ + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'V'}, + {NULL, 0, NULL, 0} +@@ -670,7 +685,7 @@ su_main (int argc, char **argv, int mode) + simulate_login = false; + change_environment = true; + +- while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) ++ while ((optc = getopt_long (argc, argv, "+c:fg:G:lmps:u:hV", longopts, NULL)) != -1) + { + switch (optc) + { +@@ -720,6 +735,12 @@ su_main (int argc, char **argv, int mode) + shell = optarg; + break; + ++ case 'u': ++ if (su_mode != RUNUSER_MODE) ++ usage (EXIT_FAILURE); ++ runuser_user = optarg; ++ break; ++ + case 'h': + usage(0); + +@@ -739,8 +760,21 @@ su_main (int argc, char **argv, int mode) + simulate_login = true; + ++optind; + } +- if (optind < argc) ++ ++ /* if not "-u " specified then fallback to classic su(1) */ ++ if (!runuser_user && optind < argc) + new_user = argv[optind++]; ++ else { ++ /* runuser -u */ ++ new_user = runuser_user; ++ if (shell || fast_startup || command || simulate_login) { ++ errx(EXIT_FAILURE, ++ _("options --{shell,fast,command,session-command,login} and " ++ "--user are mutually exclusive.")); ++ } ++ if (optind == argc) ++ errx(EXIT_FAILURE, _("COMMAND not specified.")); ++ } + + if ((num_supp_groups || use_gid) && restricted) + errx(EXIT_FAILURE, _("only root can specify alternative groups")); +@@ -784,18 +818,23 @@ su_main (int argc, char **argv, int mode) + if (request_same_session || !command || !pw->pw_uid) + same_session = 1; + +- if (!shell && !change_environment) +- shell = getenv ("SHELL"); +- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) +- { +- /* The user being su'd to has a nonstandard shell, and so is +- probably a uucp account or has restricted access. Don't +- compromise the account by allowing access with a standard +- shell. */ +- warnx (_("using restricted shell %s"), pw->pw_shell); +- shell = NULL; +- } +- shell = xstrdup (shell ? shell : pw->pw_shell); ++ /* initialize shell variable only if "-u " not specified */ ++ if (runuser_user) { ++ shell = NULL; ++ } else { ++ if (!shell && !change_environment) ++ shell = getenv ("SHELL"); ++ if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) ++ { ++ /* The user being su'd to has a nonstandard shell, and so is ++ probably a uucp account or has restricted access. Don't ++ compromise the account by allowing access with a standard ++ shell. */ ++ warnx (_("using restricted shell %s"), pw->pw_shell); ++ shell = NULL; ++ } ++ shell = xstrdup (shell ? shell : pw->pw_shell); ++ } + + init_groups (pw, groups, num_supp_groups); + +@@ -814,7 +853,12 @@ su_main (int argc, char **argv, int mode) + if (simulate_login && chdir (pw->pw_dir) != 0) + warn (_("warning: cannot change directory to %s"), pw->pw_dir); + +- run_shell (shell, command, argv + optind, max (0, argc - optind)); ++ if (shell) ++ run_shell (shell, command, argv + optind, max (0, argc - optind)); ++ else { ++ execvp(argv[optind], &argv[optind]); ++ err(EXIT_FAILURE, _("executing %s failed"), argv[optind]); ++ } + } + + // vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 +diff --git a/login-utils/su.1 b/login-utils/su.1 +index 59e1731..c82b941 100644 +--- a/login-utils/su.1 ++++ b/login-utils/su.1 +@@ -216,6 +216,7 @@ command specific logindef config file + global logindef config file + .PD 1 + .SH "SEE ALSO" ++.BR runuser (8), + .BR pam (8), + .BR shells (5), + .BR login.defs (5) +-- +1.7.11.7 + diff --git a/0209-build-sys-move-runuser-to-sbin-dir.patch b/0209-build-sys-move-runuser-to-sbin-dir.patch new file mode 100644 index 0000000..ab87cbc --- /dev/null +++ b/0209-build-sys-move-runuser-to-sbin-dir.patch @@ -0,0 +1,26 @@ +From 69658513d00635048f5de76ed73f4a43a61d374d Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 1 Nov 2012 13:12:02 +0100 +Subject: [PATCH] build-sys: move runuser to sbin dir + +Signed-off-by: Karel Zak +--- + login-utils/Makemodule.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am +index e26d9a7..0d8e8b1 100644 +--- a/login-utils/Makemodule.am ++++ b/login-utils/Makemodule.am +@@ -94,7 +94,7 @@ endif + + + if BUILD_RUNUSER +-bin_PROGRAMS += runuser ++sbin_PROGRAMS += runuser + dist_man_MANS += login-utils/runuser.1 + runuser_SOURCES = \ + login-utils/runuser.c \ +-- +1.7.11.7 + diff --git a/util-linux-runuser-l.pamd b/util-linux-runuser-l.pamd new file mode 100644 index 0000000..fa1e4d8 --- /dev/null +++ b/util-linux-runuser-l.pamd @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth include runuser +session optional pam_keyinit.so force revoke +session include runuser diff --git a/util-linux-runuser.pamd b/util-linux-runuser.pamd new file mode 100644 index 0000000..37f0e84 --- /dev/null +++ b/util-linux-runuser.pamd @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +session optional pam_keyinit.so revoke +session required pam_limits.so +session required pam_unix.so diff --git a/util-linux-su-l.pamd b/util-linux-su-l.pamd new file mode 100644 index 0000000..656a139 --- /dev/null +++ b/util-linux-su-l.pamd @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth include su +account include su +password include su +session optional pam_keyinit.so force revoke +session include su diff --git a/util-linux-su.pamd b/util-linux-su.pamd new file mode 100644 index 0000000..1981f58 --- /dev/null +++ b/util-linux-su.pamd @@ -0,0 +1,14 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +# Uncomment the following line to implicitly trust users in the "wheel" group. +#auth sufficient pam_wheel.so trust use_uid +# Uncomment the following line to require a user to be in the "wheel" group. +#auth required pam_wheel.so use_uid +auth include system-auth +auth include postlogin +account sufficient pam_succeed_if.so uid = 0 use_uid quiet +account include system-auth +password include system-auth +session include system-auth +session include postlogin +session optional pam_xauth.so diff --git a/util-linux.spec b/util-linux.spec index aa6dab8..a2faa3d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.1 -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: http://en.wikipedia.org/wiki/Util-linux @@ -24,6 +24,11 @@ BuildRequires: popt-devel BuildRequires: libutempter-devel Buildrequires: systemd-devel +# because backported su(1) and runuser(1) patches +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool + ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd @@ -33,8 +38,14 @@ Source4: util-linux-60-raw.rules Source8: nologin.c Source9: nologin.8 Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 +Source12: util-linux-su.pamd +Source13: util-linux-su-l.pamd +Source14: util-linux-runuser.pamd +Source15: util-linux-runuser-l.pamd ### Obsoletes & Conflicts & Provides +# su(1) and runuser(1) merged into util-linux v2.22 +Conflicts: coreutils < 8.20 # eject has been merged into util-linux v2.22 Obsoletes: eject <= 2.1.5 Provides: eject = 2.1.6 @@ -99,6 +110,20 @@ Patch109: 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch Patch110: 0010-login-fix-compiler-warning-Wunused-result.patch Patch111: 0011-misc-make-readlink-usage-more-robust.patch +### Upstream patches from master branch (will be v2.23) for su(1) and new +### runuser(1) implementation. This is required for the recent coreutils where +### is no more su(1). +### +Patch200: 0200-su-add-group-and-supp-group-options.patch +Patch201: 0201-su-move-generic-su-code-to-su-common.c.patch +Patch202: 0202-runuser-new-command-derived-from-su-1.patch +Patch203: 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch +Patch204: 0204-su-verify-writing-to-streams-was-successful.patch +Patch205: 0205-su-move-long-options-to-main.patch +Patch206: 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch +Patch207: 0207-su-fixed-a-typo-in-pam-error-message.patch +Patch208: 0208-runuser-add-u-to-not-execute-shell.patch +Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch %description The util-linux package contains a large variety of low-level system @@ -228,9 +253,22 @@ cp %{SOURCE8} %{SOURCE9} . %patch110 -p1 %patch111 -p1 +%patch200 -p1 +%patch201 -p1 +%patch202 -p1 +%patch203 -p1 +%patch204 -p1 +%patch205 -p1 +%patch206 -p1 +%patch207 -p1 +%patch208 -p1 +%patch209 -p1 + %build unset LINGUAS || : +./autogen.sh + export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -242,7 +280,6 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" --enable-chfn-chsh \ --enable-write \ --enable-raw \ - --disable-su \ --with-udev \ --with-selinux \ --with-audit \ @@ -327,6 +364,10 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid install -m 644 %{SOURCE2} ./remote install -m 644 %{SOURCE3} ./chsh install -m 644 %{SOURCE3} ./chfn + install -m 644 %{SOURCE12} ./su + install -m 644 %{SOURCE13} ./su-l + install -m 644 %{SOURCE14} ./runuser + install -m 644 %{SOURCE15} ./runuser-l popd } @@ -485,10 +526,15 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/chsh %config(noreplace) %{_sysconfdir}/pam.d/login %config(noreplace) %{_sysconfdir}/pam.d/remote +%config(noreplace) %{_sysconfdir}/pam.d/su +%config(noreplace) %{_sysconfdir}/pam.d/su-l +%config(noreplace) %{_sysconfdir}/pam.d/runuser +%config(noreplace) %{_sysconfdir}/pam.d/runuser-l %config(noreplace) %{_prefix}/lib/udev/rules.d %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount +%attr(4755,root,root) %{_bindir}/su %attr(755,root,root) %{_bindir}/login %attr(4711,root,root) %{_bindir}/chfn %attr(4711,root,root) %{_bindir}/chsh @@ -574,10 +620,12 @@ fi %{_mandir}/man1/rename.1* %{_mandir}/man1/renice.1* %{_mandir}/man1/rev.1* +%{_mandir}/man1/runuser.1* %{_mandir}/man1/script.1* %{_mandir}/man1/scriptreplay.1* %{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* +%{_mandir}/man1/su.1* %{_mandir}/man1/tailf.1* %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* @@ -653,6 +701,7 @@ fi %{_sbindir}/readprofile %{_sbindir}/resizepart %{_sbindir}/rtcwake +%{_sbindir}/runuser %{_sbindir}/sulogin %{_sbindir}/swaplabel %{_sbindir}/swapoff @@ -754,6 +803,10 @@ fi %changelog +* Thu Nov 1 2012 Karel Zak 2.22.1-3 +- backport upstream runuser(1) +- enable su(1) + * Thu Nov 1 2012 Karel Zak 2.22.1-2 - apply pathes from upstream stable/v2.22 branch - fix #865961 - wipefs -a should use O_EXCL From 84d2be4ab357d6f98b38dd1c1ea878362eaad0cb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 16 Nov 2012 13:00:20 +0100 Subject: [PATCH 126/425] 2.22.1-4: #872787 Signed-off-by: Karel Zak --- 0210-su-fix-COMMAND-not-specified-error.patch | 62 +++++++++++++++++++ util-linux.spec | 37 +++-------- 2 files changed, 70 insertions(+), 29 deletions(-) create mode 100644 0210-su-fix-COMMAND-not-specified-error.patch diff --git a/0210-su-fix-COMMAND-not-specified-error.patch b/0210-su-fix-COMMAND-not-specified-error.patch new file mode 100644 index 0000000..c1818c0 --- /dev/null +++ b/0210-su-fix-COMMAND-not-specified-error.patch @@ -0,0 +1,62 @@ +From 360e088738aa792bf6c52e777d64b5163b45362a Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 7 Nov 2012 15:20:39 +0100 +Subject: [PATCH] su: fix "COMMAND not specified" error + + # su + su: COMMAND not specified + +This error message make sense for "runuser -u " only. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=872787 +Signed-off-by: Karel Zak +--- + login-utils/su-common.c | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index 1fa76c8..5abdc84 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -761,19 +761,28 @@ su_main (int argc, char **argv, int mode) + ++optind; + } + +- /* if not "-u " specified then fallback to classic su(1) */ +- if (!runuser_user && optind < argc) +- new_user = argv[optind++]; +- else { +- /* runuser -u */ +- new_user = runuser_user; +- if (shell || fast_startup || command || simulate_login) { +- errx(EXIT_FAILURE, ++ switch (su_mode) { ++ case RUNUSER_MODE: ++ if (runuser_user) { ++ /* runuser -u */ ++ new_user = runuser_user; ++ if (shell || fast_startup || command || simulate_login) { ++ errx(EXIT_FAILURE, + _("options --{shell,fast,command,session-command,login} and " + "--user are mutually exclusive.")); ++ } ++ if (optind == argc) ++ errx(EXIT_FAILURE, _("COMMAND not specified.")); ++ ++ break; + } +- if (optind == argc) +- errx(EXIT_FAILURE, _("COMMAND not specified.")); ++ /* fallthrough if -u is not specified, then follow ++ * traditional su(1) behavior ++ */ ++ case SU_MODE: ++ if (optind < argc) ++ new_user = argv[optind++]; ++ break; + } + + if ((num_supp_groups || use_gid) && restricted) +-- +1.7.11.7 + diff --git a/util-linux.spec b/util-linux.spec index a2faa3d..e5550fb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.1 -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: http://en.wikipedia.org/wiki/Util-linux @@ -124,6 +124,7 @@ Patch206: 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch Patch207: 0207-su-fixed-a-typo-in-pam-error-message.patch Patch208: 0208-runuser-add-u-to-not-execute-shell.patch Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch +Patch210: 0210-su-fix-COMMAND-not-specified-error.patch %description The util-linux package contains a large variety of low-level system @@ -235,34 +236,9 @@ SMP systems. %setup -q -a 11 -n %{name}-%{upstream_version} cp %{SOURCE8} %{SOURCE9} . -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 - -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 - -%patch200 -p1 -%patch201 -p1 -%patch202 -p1 -%patch203 -p1 -%patch204 -p1 -%patch205 -p1 -%patch206 -p1 -%patch207 -p1 -%patch208 -p1 -%patch209 -p1 +for p in %{patches}; do + %{__patch} -p1 -F%{_default_patch_fuzz} %{_default_patch_flags} -i "$p" +done %build unset LINGUAS || : @@ -803,6 +779,9 @@ fi %changelog +* Fri Nov 16 2012 Karel Zak 2.22.1-4 +- fix #872787 - su: COMMAND not specified + * Thu Nov 1 2012 Karel Zak 2.22.1-3 - backport upstream runuser(1) - enable su(1) From ead2073dab4341a069662512535ad1e66a983811 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 16 Nov 2012 13:11:56 +0100 Subject: [PATCH 127/425] fix spec file Signed-off-by: Karel Zak --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index e5550fb..b401bc2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -237,7 +237,7 @@ SMP systems. cp %{SOURCE8} %{SOURCE9} . for p in %{patches}; do - %{__patch} -p1 -F%{_default_patch_fuzz} %{_default_patch_flags} -i "$p" + %{__patch} -p1 -F%{_default_patch_fuzz} -i "$p" done %build From dff9e6fd53a99ed06b3d59bb82810fd57ca11c1c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 19 Nov 2012 16:11:38 +0100 Subject: [PATCH 128/425] 2.22.1-5 Signed-off-by: Karel Zak --- sources | 2 +- util-linux.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sources b/sources index 7d69556..5f146c9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -c6c15a1afc04d8a69d5b99db1c39623f util-linux-2.22.1.tar.xz +730cf9932531ed09b53a04ca30fcb4c9 util-linux-2.22.1.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index b401bc2..61e50e4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -779,6 +779,9 @@ fi %changelog +* Mon Nov 19 2012 Karel Zak 2.22.1-5 +- sources cleanup + * Fri Nov 16 2012 Karel Zak 2.22.1-4 - fix #872787 - su: COMMAND not specified From 0a456518f31ea2698ddb4245d1423829873cb581 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 13 Dec 2012 13:16:43 +0100 Subject: [PATCH 129/425] 2.22.2-1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 23 +++++------------------ 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 0d27901..df32d4a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /util-linux-2.22-rc2.tar.xz /util-linux-2.22.tar.xz /util-linux-2.22.1.tar.xz +/util-linux-2.22.2.tar.xz diff --git a/sources b/sources index 5f146c9..e03cca9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -730cf9932531ed09b53a04ca30fcb4c9 util-linux-2.22.1.tar.xz +eeacbfdd2556acd899a2d0ffdb446185 util-linux-2.22.2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 diff --git a/util-linux.spec b/util-linux.spec index 61e50e4..321570d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.22.1 -Release: 4%{?dist} +Version: 2.22.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -94,22 +94,6 @@ Patch3: util-linux-ng-2.21-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch4: util-linux-2.21-ipcs-32bit.patch - -### Upstream patches from proposed stable/v2.22.2 branch -### (remove after update to the final 2.22.2) -### -Patch101: 0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch -Patch102: 0002-wipefs-use-O_EXCL.patch -Patch103: 0003-swapon-remove-loop-declaration-smatch-scan.patch -Patch104: 0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch -Patch105: 0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch -Patch106: 0006-mount-add-long-options-for-L-and-U-to-man-page.patch -Patch107: 0007-lib-loopdev-improve-debug-messages.patch -Patch108: 0008-lib-loopdev-check-for-sys.patch -Patch109: 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch -Patch110: 0010-login-fix-compiler-warning-Wunused-result.patch -Patch111: 0011-misc-make-readlink-usage-more-robust.patch - ### Upstream patches from master branch (will be v2.23) for su(1) and new ### runuser(1) implementation. This is required for the recent coreutils where ### is no more su(1). @@ -779,6 +763,9 @@ fi %changelog +* Thu Dec 13 2012 Karel Zak 2.22.2-1 +- upgrade to upstream maintenance release 2.22.2 + * Mon Nov 19 2012 Karel Zak 2.22.1-5 - sources cleanup From 1bc2448b90ef5fafa7716c2100e4591e94c12cbd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 11 Jan 2013 10:32:17 +0100 Subject: [PATCH 130/425] 2.22.2-2: fix #889888 Signed-off-by: Karel Zak --- ...-support-for-btrfs-backup-superblock.patch | 46 +++++++++++++++++++ util-linux.spec | 11 ++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 libblkid-add-support-for-btrfs-backup-superblock.patch diff --git a/libblkid-add-support-for-btrfs-backup-superblock.patch b/libblkid-add-support-for-btrfs-backup-superblock.patch new file mode 100644 index 0000000..e8a3ea8 --- /dev/null +++ b/libblkid-add-support-for-btrfs-backup-superblock.patch @@ -0,0 +1,46 @@ +From d4a276491269b6502c15e0089fba6b616f5c5df8 Mon Sep 17 00:00:00 2001 +From: Goffredo Baroncelli +Date: Wed, 9 Jan 2013 22:14:43 +0100 +Subject: [PATCH] libblkid: add support for btrfs backup superblock + +Btrfs has three superblock. The first one is placed at 64KB, the second one at +64MB, the third one at 256GB. + +If the first superblock is valid except that the "magic field" is zeroed, btrfs +skips the check of the other superblocks. If the first superblock is fully +invalid, btrfs checks for the other superblock. + +So zeroing the first superblock "magic field" at the beginning seems that the +filesystem is wiped. But when the first superblock is overwritten (eg by +another filesystem), then the other two superblock may be considered valid, and +the filesystem may resurrect. + +This patch allow to find and wipe the other btrfs superblocks signature. + +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/btrfs.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c +index 039be42..1bd1df9 100644 +--- a/libblkid/src/superblocks/btrfs.c ++++ b/libblkid/src/superblocks/btrfs.c +@@ -87,6 +87,14 @@ const struct blkid_idinfo btrfs_idinfo = + .magics = + { + { .magic = "_BHRfS_M", .len = 8, .kboff = 64, .sboff = 0x40 }, ++ { .magic = "_BHRfS_M", ++ .len = 8, ++ .kboff = 64 * 1024, ++ .sboff = 0x40 }, ++ { .magic = "_BHRfS_M", ++ .len = 8, ++ .kboff = 256 * 1024 * 1024, ++ .sboff = 0x40 }, + { NULL } + } + }; +-- +1.7.11.7 + diff --git a/util-linux.spec b/util-linux.spec index 321570d..7c620ae 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.2 -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: http://en.wikipedia.org/wiki/Util-linux @@ -94,6 +94,11 @@ Patch3: util-linux-ng-2.21-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch4: util-linux-2.21-ipcs-32bit.patch +### +### Upstream patches (2.23 or 2.22.x) +# 889888 - wipefs does not completely wipe btrfs volume +Patch100: libblkid-add-support-for-btrfs-backup-superblock.patch + ### Upstream patches from master branch (will be v2.23) for su(1) and new ### runuser(1) implementation. This is required for the recent coreutils where ### is no more su(1). @@ -110,6 +115,7 @@ Patch208: 0208-runuser-add-u-to-not-execute-shell.patch Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch Patch210: 0210-su-fix-COMMAND-not-specified-error.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -763,6 +769,9 @@ fi %changelog +* Tue Jan 15 2013 Karel Zak 2.22.2-2 +- fix #889888 - wipefs does not completely wipe btrfs volume + * Thu Dec 13 2012 Karel Zak 2.22.2-1 - upgrade to upstream maintenance release 2.22.2 From 8e3b51d51a8ee141128b6d417279c7a65c27c821 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sun, 3 Feb 2013 16:54:28 +0100 Subject: [PATCH 131/425] 2.22.2-3 - fix #882305 - agetty: unstable /dev/tty* permissions - fix #885314 - hexdump segfault - fix #896447 - No newlines in piped "cal" command - fix libblkid cache usage (upstream patch) - fix #905008 - uuidd: /usr/sbin/uuidd has incorrect file permissions Signed-off-by: Karel Zak --- agetty-replace-perms-660-to-620.patch | 45 +++++ ...-ncurses-output-functions-and-printf.patch | 139 +++++++++++++++ ...egfault-when-iterating-over-an-empty.patch | 95 ++++++++++ ...ve-optimization-from-verify-function.patch | 165 ++++++++++++++++++ util-linux.spec | 20 ++- 5 files changed, 462 insertions(+), 2 deletions(-) create mode 100644 agetty-replace-perms-660-to-620.patch create mode 100644 cal-don-t-mix-ncurses-output-functions-and-printf.patch create mode 100644 hexdump-do-not-segfault-when-iterating-over-an-empty.patch create mode 100644 libblkid-remove-optimization-from-verify-function.patch diff --git a/agetty-replace-perms-660-to-620.patch b/agetty-replace-perms-660-to-620.patch new file mode 100644 index 0000000..ebf59b7 --- /dev/null +++ b/agetty-replace-perms-660-to-620.patch @@ -0,0 +1,45 @@ +From 7afbf6f20e1de62fb5595411d998703c95af8965 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 2 Jan 2013 08:23:00 +0100 +Subject: [PATCH 1/3] agetty: replace perms 660 to 620 + + ... the default is root:tty 620 + +Signed-off-by: Karel Zak +--- + login-utils/login.1 | 5 ++++- + term-utils/agetty.c | 2 +- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/login-utils/login.1 b/login-utils/login.1 +index 092213d..e37e5e6 100644 +--- a/login-utils/login.1 ++++ b/login-utils/login.1 +@@ -184,7 +184,10 @@ login failure. The default value is + (string) + .RS 4 + The terminal permissions. The default value is +-.IR 0600 . ++.IR 0600 ++or ++.IR 0620 ++if tty group is used. + .RE + .PP + .B TTYGROUP +diff --git a/term-utils/agetty.c b/term-utils/agetty.c +index 7ee252d..17ebfba 100644 +--- a/term-utils/agetty.c ++++ b/term-utils/agetty.c +@@ -894,7 +894,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op) + * Linux login(1) will change tty permissions. Use root owner and group + * with permission -rw------- for the period between getty and login. + */ +- if (chown(buf, 0, gid) || chmod(buf, (gid ? 0660 : 0600))) { ++ if (chown(buf, 0, gid) || chmod(buf, (gid ? 0620 : 0600))) { + if (errno == EROFS) + log_warn("%s: %m", buf); + else +-- +1.8.1 + diff --git a/cal-don-t-mix-ncurses-output-functions-and-printf.patch b/cal-don-t-mix-ncurses-output-functions-and-printf.patch new file mode 100644 index 0000000..1641068 --- /dev/null +++ b/cal-don-t-mix-ncurses-output-functions-and-printf.patch @@ -0,0 +1,139 @@ +From c265cc40a8ece740084fbfb3ebd4c1894b3b29b7 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 17 Jan 2013 18:48:16 +0100 +Subject: [PATCH 3/3] cal: don't mix ncurses output functions and printf() + +Fedora 18 (ncurses-libs-5.9-7.20121017, glibc-2.16-28): + +$ cal | cat +Actual results: + January 2013 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 +9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31 + +Not sure where is the problem, but it's too fragile to mix two +output methods in one code. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=896447 +Signed-off-by: Karel Zak +--- + misc-utils/cal.c | 43 +++++++++++++++++++++++++++---------------- + 1 file changed, 27 insertions(+), 16 deletions(-) + +diff --git a/misc-utils/cal.c b/misc-utils/cal.c +index 60e85df..0e204b9 100644 +--- a/misc-utils/cal.c ++++ b/misc-utils/cal.c +@@ -498,7 +498,7 @@ monthly(int day, int month, int year) { + do_monthly(day, month, year, &out); + for (i = 0; i < FMT_ST_LINES; i++) { + my_putstring(out.s[i]); +- putchar('\n'); ++ my_putstring("\n"); + } + } + +@@ -533,8 +533,11 @@ monthly3(int day, int month, int year) { + do_monthly(day, next_month, next_year, &out_next); + + width = (julian ? J_WEEK_LEN : WEEK_LEN) -1; +- for (i = 0; i < 2; i++) +- printf("%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); ++ for (i = 0; i < 2; i++) { ++ snprintf(lineout, sizeof(lineout), ++ "%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); ++ my_putstring(lineout); ++ } + for (i = 2; i < FMT_ST_LINES; i++) { + int w1, w2, w3; + w1 = w2 = w3 = width; +@@ -562,7 +565,7 @@ j_yearly(int day, int year) { + + snprintf(lineout, sizeof(lineout), "%d", year); + center(lineout, J_WEEK_LEN*2 + J_HEAD_SEP - 1, 0); +- printf("\n\n"); ++ my_putstring("\n\n"); + + for (i = 0; i < 12; i++) + day_array(day, i + 1, year, days[i]); +@@ -571,8 +574,10 @@ j_yearly(int day, int year) { + for (month = 0; month < 12; month += 2) { + center(full_month[month], J_WEEK_LEN-1, J_HEAD_SEP+1); + center(full_month[month + 1], J_WEEK_LEN-1, 0); +- printf("\n%s%*s %s\n", j_day_headings, J_HEAD_SEP, "", +- j_day_headings); ++ snprintf(lineout, sizeof(lineout), ++ "\n%s%*s %s\n", j_day_headings, J_HEAD_SEP, "", ++ j_day_headings); ++ my_putstring(lineout); + for (row = 0; row < 6; row++) { + p = lineout; + for (which_cal = 0; which_cal < 2; which_cal++) { +@@ -584,10 +589,10 @@ j_yearly(int day, int year) { + *p = '\0'; + trim_trailing_spaces(lineout); + my_putstring(lineout); +- putchar('\n'); ++ my_putstring("\n"); + } + } +- printf("\n"); ++ my_putstring("\n"); + } + + void +@@ -598,7 +603,7 @@ yearly(int day, int year) { + + snprintf(lineout, sizeof(lineout), "%d", year); + center(lineout, WEEK_LEN*3 + HEAD_SEP*2 - 1, 0); +- printf("\n\n"); ++ my_putstring("\n\n"); + + for (i = 0; i < 12; i++) + day_array(day, i + 1, year, days[i]); +@@ -608,8 +613,10 @@ yearly(int day, int year) { + center(full_month[month], WEEK_LEN-1, HEAD_SEP+1); + center(full_month[month + 1], WEEK_LEN-1, HEAD_SEP+1); + center(full_month[month + 2], WEEK_LEN-1, 0); +- printf("\n%s%*s %s%*s %s\n", day_headings, HEAD_SEP, +- "", day_headings, HEAD_SEP, "", day_headings); ++ snprintf(lineout, sizeof(lineout), ++ "\n%s%*s %s%*s %s\n", day_headings, HEAD_SEP, ++ "", day_headings, HEAD_SEP, "", day_headings); ++ my_putstring(lineout); + for (row = 0; row < 6; row++) { + p = lineout; + for (which_cal = 0; which_cal < 3; which_cal++) { +@@ -621,10 +628,10 @@ yearly(int day, int year) { + *p = '\0'; + trim_trailing_spaces(lineout); + my_putstring(lineout); +- putchar('\n'); ++ my_putstring("\n"); + } + } +- putchar('\n'); ++ my_putstring("\n"); + } + + /* +@@ -773,10 +780,14 @@ void + center(const char *str, size_t len, int separate) + { + char lineout[FMT_ST_CHARS]; ++ + center_str(str, lineout, ARRAY_SIZE(lineout), len); +- fputs(lineout, stdout); +- if (separate) +- printf("%*s", separate, ""); ++ my_putstring(lineout); ++ ++ if (separate) { ++ snprintf(lineout, sizeof(lineout), "%*s", separate, ""); ++ my_putstring(lineout); ++ } + } + + static void __attribute__ ((__noreturn__)) usage(FILE * out) +-- +1.8.1 + diff --git a/hexdump-do-not-segfault-when-iterating-over-an-empty.patch b/hexdump-do-not-segfault-when-iterating-over-an-empty.patch new file mode 100644 index 0000000..c9472bd --- /dev/null +++ b/hexdump-do-not-segfault-when-iterating-over-an-empty.patch @@ -0,0 +1,95 @@ +From 85c24fe2b11cd136d43bbffd983014a3f967c25e Mon Sep 17 00:00:00 2001 +From: Ondrej Oprala +Date: Fri, 21 Dec 2012 13:04:04 +0100 +Subject: [PATCH 2/3] hexdump: do not segfault when iterating over an empty + format string + +Signed-off-by: Ondrej Oprala +--- + tests/commands.sh | 1 + + tests/expected/hexdump/empty-format | 1 + + tests/ts/hexdump/empty-format | 26 ++++++++++++++++++++++++++ + text-utils/parse.c | 16 +++++++++------- + 4 files changed, 37 insertions(+), 7 deletions(-) + create mode 100644 tests/expected/hexdump/empty-format + create mode 100755 tests/ts/hexdump/empty-format + +diff --git a/tests/commands.sh b/tests/commands.sh +index db1d4ac..3672095 100644 +--- a/tests/commands.sh ++++ b/tests/commands.sh +@@ -62,3 +62,4 @@ TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"$top_builddir/findmnt"} + + TS_CMD_FDISK=${TS_CMD_FDISK-"$top_builddir/fdisk"} + ++TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"$top_builddir/hexdump"} +diff --git a/tests/expected/hexdump/empty-format b/tests/expected/hexdump/empty-format +new file mode 100644 +index 0000000..9d60796 +--- /dev/null ++++ b/tests/expected/hexdump/empty-format +@@ -0,0 +1 @@ ++11 +\ No newline at end of file +diff --git a/tests/ts/hexdump/empty-format b/tests/ts/hexdump/empty-format +new file mode 100755 +index 0000000..4a3e528 +--- /dev/null ++++ b/tests/ts/hexdump/empty-format +@@ -0,0 +1,26 @@ ++#!/bin/bash ++ ++# This file is part of util-linux. ++# ++# This file is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This file is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++TS_TOPDIR="$(dirname $0)/../.." ++TS_DESC="format-strings" ++ ++. $TS_TOPDIR/functions.sh ++ts_init "$*" ++ ++INPUT=$(printf \\1) ++$TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT 2>&1 >> $TS_OUTPUT ++ ++$TS_CMD_HEXDUMP -n1 -ve '4 "%x"' -e '2 ""' <<< $INPUT 2>&1 >> $TS_OUTPUT ++ ++ts_finalize +diff --git a/text-utils/parse.c b/text-utils/parse.c +index 5f1e2bd..bd96961 100644 +--- a/text-utils/parse.c ++++ b/text-utils/parse.c +@@ -421,13 +421,15 @@ isint2: switch(fu->bcnt) { + !(fu->flags&F_SETREP) && fu->bcnt) + fu->reps += (blocksize - fs->bcnt) / fu->bcnt; + if (fu->reps > 1) { +- for (pr = fu->nextpr;; pr = pr->nextpr) +- if (!pr->nextpr) +- break; +- for (p1 = pr->fmt, p2 = NULL; *p1; ++p1) +- p2 = isspace((unsigned char)*p1) ? p1 : NULL; +- if (p2) +- pr->nospace = p2; ++ if (fu->nextpr) { ++ for (pr = fu->nextpr; ; pr = pr->nextpr) ++ if (!pr->nextpr) ++ break; ++ for (p1 = pr->fmt, p2 = NULL; *p1; ++p1) ++ p2 = isspace((unsigned char)*p1) ? p1 : NULL; ++ if (p2) ++ pr->nospace = p2; ++ } + } + } + } +-- +1.8.1 + diff --git a/libblkid-remove-optimization-from-verify-function.patch b/libblkid-remove-optimization-from-verify-function.patch new file mode 100644 index 0000000..7d40835 --- /dev/null +++ b/libblkid-remove-optimization-from-verify-function.patch @@ -0,0 +1,165 @@ +From 2270b1ad90b394950f4fe215eb2fc1042020cef0 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 1 Feb 2013 15:59:58 +0100 +Subject: [PATCH] libblkid: remove optimization from verify( funrtion + +Now libblkid (the cache based part) tries to probe for the cached +filesystem firstly. This optimization is broken, because: + + * new another superblock could be on the device and the original + is already obsolete + * we still need to probe for partitions and raids + * the code was too fragile + +The patch also suggests lsblk --fs in blkid.8 for end users. lsblk +read information from used db. + +Reported-by: Andreas Hofmeister +Signed-off-by: Karel Zak +--- + libblkid/src/verify.c | 76 ++++++++------------------------------------------- + misc-utils/blkid.8 | 11 ++++++++ + 2 files changed, 22 insertions(+), 65 deletions(-) + +diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c +index 4bab4de..0f48c48 100644 +--- a/libblkid/src/verify.c ++++ b/libblkid/src/verify.c +@@ -43,26 +43,6 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) + blkid_set_tag(dev, name, data, len); + } + } +- +- /* +- * remove obsolete tags +- */ +- if (!nvals || !blkid_probe_has_value(pr, "LABEL")) +- blkid_set_tag(dev, "LABEL", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "UUID")) +- blkid_set_tag(dev, "UUID", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "PART_ENTRY_UUID")) +- blkid_set_tag(dev, "PARTUUID", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "PART_ENTRY_NAME")) +- blkid_set_tag(dev, "PARTLABEL", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "TYPE")) +- blkid_set_tag(dev, "TYPE", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "SEC_TYPE")) +- blkid_set_tag(dev, "SEC_TYPE", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "EXT_JOURNAL")) /* extN */ +- blkid_set_tag(dev, "EXT_JOURNAL", NULL, 0); +- if (!nvals || !blkid_probe_has_value(pr, "MOUNT")) /* ocfs */ +- blkid_set_tag(dev, "MOUNT", NULL, 0); + } + + /* +@@ -76,9 +56,10 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) + */ + blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) + { ++ blkid_tag_iterate iter; ++ const char *type, *value; + struct stat st; + time_t diff, now; +- char *fltr[2]; + int fd; + + if (!dev) +@@ -155,64 +136,29 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) + return NULL; + } + +- blkid_probe_enable_superblocks(cache->probe, TRUE); ++ /* remove old cache info */ ++ iter = blkid_tag_iterate_begin(dev); ++ while (blkid_tag_next(iter, &type, &value) == 0) ++ blkid_set_tag(dev, type, NULL, 0); ++ blkid_tag_iterate_end(iter); + ++ /* enable superblocks probing */ ++ blkid_probe_enable_superblocks(cache->probe, TRUE); + blkid_probe_set_superblocks_flags(cache->probe, + BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | + BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE); + +- /* +- * If we already know the type, then try that first. +- */ +- if (dev->bid_type) { +- blkid_tag_iterate iter; +- const char *type, *value; +- +- fltr[0] = dev->bid_type; +- fltr[1] = NULL; +- +- blkid_probe_filter_superblocks_type(cache->probe, +- BLKID_FLTR_ONLYIN, fltr); +- +- if (blkid_do_probe(cache->probe) == 0) { +- /* +- * Cool, we found FS type, let's also read PART{UUID,LABEL} +- */ +- blkid_probe_enable_superblocks(cache->probe, FALSE); +- blkid_probe_enable_partitions(cache->probe, TRUE); +- blkid_probe_set_partitions_flags(cache->probe, BLKID_PARTS_ENTRY_DETAILS); +- if (blkid_do_probe(cache->probe) == 0) +- goto found_type; +- } +- +- blkid_probe_enable_superblocks(cache->probe, TRUE); +- blkid_probe_invert_superblocks_filter(cache->probe); +- +- /* +- * Zap the device filesystem information and try again +- */ +- DBG(DEBUG_PROBE, +- printf("previous fs type %s not valid, " +- "trying full probe\n", dev->bid_type)); +- iter = blkid_tag_iterate_begin(dev); +- while (blkid_tag_next(iter, &type, &value) == 0) +- blkid_set_tag(dev, type, 0, 0); +- blkid_tag_iterate_end(iter); +- } +- ++ /* enable partitions probing */ + blkid_probe_enable_partitions(cache->probe, TRUE); + blkid_probe_set_partitions_flags(cache->probe, BLKID_PARTS_ENTRY_DETAILS); + +- /* +- * Probe for all types. +- */ ++ /* probe */ + if (blkid_do_safeprobe(cache->probe)) { + /* found nothing or error */ + blkid_free_dev(dev); + dev = NULL; + } + +-found_type: + if (dev) { + #ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC + struct timeval tv; +diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 +index 2ba1ab4..eb8d716 100644 +--- a/misc-utils/blkid.8 ++++ b/misc-utils/blkid.8 +@@ -64,6 +64,17 @@ library. It can determine the type of content (e.g. filesystem or swap) + that a block device holds, and also attributes (tokens, NAME=value pairs) + from the content metadata (e.g. LABEL or UUID fields). + .PP ++Note that ++.B blkid ++reads information directly from devices and for non-root users ++it returns cached unverified information. It's better to use ++.B lsblk --fs ++to get user-friendly overview about filesystems and devices. ++.BR lsblk (8) ++is also easy to use in scripts. ++.B blkid ++is mostly designed for system services and to test libblkid functionality. ++.PP + .B blkid + has two main forms of operation: either searching for a device with a + specific NAME=value pair, or displaying NAME=value pairs for one or +-- +1.8.1 + diff --git a/util-linux.spec b/util-linux.spec index 7c620ae..1b41030 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.2 -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: http://en.wikipedia.org/wiki/Util-linux @@ -98,6 +98,14 @@ Patch4: util-linux-2.21-ipcs-32bit.patch ### Upstream patches (2.23 or 2.22.x) # 889888 - wipefs does not completely wipe btrfs volume Patch100: libblkid-add-support-for-btrfs-backup-superblock.patch +# 882305 - agetty: unstable /dev/tty* permissions +Patch101: agetty-replace-perms-660-to-620.patch +# 885314 - hexdump segfault +Patch102: hexdump-do-not-segfault-when-iterating-over-an-empty.patch +# 896447 - No newlines in piped "cal" command +Patch103: cal-don-t-mix-ncurses-output-functions-and-printf.patch +# upstream patch +Patch104: libblkid-remove-optimization-from-verify-function.patch ### Upstream patches from master branch (will be v2.23) for su(1) and new ### runuser(1) implementation. This is required for the recent coreutils where @@ -128,6 +136,7 @@ Summary: Device mounting library Group: Development/Libraries License: LGPLv2+ Requires: libblkid = %{version}-%{release} +Requires: libuuid = %{version}-%{release} Conflicts: filesystem < 3 %description -n libmount @@ -710,7 +719,7 @@ fi %defattr(-,root,root) %doc Documentation/licenses/COPYING.GPLv2 %{_mandir}/man8/uuidd.8* -%attr(-, uuidd, uuidd) %{_sbindir}/uuidd +%{_sbindir}/uuidd %{_unitdir}/* %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %dir %attr(2775, uuidd, uuidd) /run/uuidd @@ -769,6 +778,13 @@ fi %changelog +* Sun Feb 3 2013 Karel Zak 2.22.2-3 +- fix #882305 - agetty: unstable /dev/tty* permissions +- fix #885314 - hexdump segfault +- fix #896447 - No newlines in piped "cal" command +- fix libblkid cache usage (upstream patch) +- fix #905008 - uuidd: /usr/sbin/uuidd has incorrect file permissions + * Tue Jan 15 2013 Karel Zak 2.22.2-2 - fix #889888 - wipefs does not completely wipe btrfs volume From 2a4e9f041eb97d3893da0ede1b0c735818e467b7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 6 Feb 2013 10:30:04 +0100 Subject: [PATCH 132/425] 2.22.2-4: spec file cleanup Signed-off-by: Karel Zak --- util-linux.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 1b41030..907f200 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.2 -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: http://en.wikipedia.org/wiki/Util-linux @@ -74,9 +74,6 @@ Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} -Requires: systemd >= 185 -Requires(post): systemd-units -Requires(preun): systemd-units ### Floppy patches (Fedora/RHEL specific) ### @@ -223,7 +220,10 @@ Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Group: System Environment/Daemons Requires: libuuid = %{version}-%{release} License: GPLv2 +Requires: systemd Requires(pre): shadow-utils +Requires(post): systemd-units +Requires(preun): systemd-units %description -n uuidd The uuidd package contains a userspace daemon (uuidd) which guarantees @@ -441,8 +441,10 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : fi fi -rm -f /etc/mtab -ln -s /proc/mounts /etc/mtab +if [ ! -L /etc/mtab ]; then + rm -f /etc/mtab + ln -s /proc/mounts /etc/mtab +fi %post -n libblkid /sbin/ldconfig @@ -505,7 +507,7 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/pam.d/runuser %config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%config(noreplace) %{_prefix}/lib/udev/rules.d +%config(noreplace) %{_prefix}/lib/udev/rules.d/60-raw.rules %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount @@ -778,6 +780,10 @@ fi %changelog +* Wed Feb 6 2013 Karel Zak 2.22.2-4 +- improve convertion to mtab symlink in post script +- spec file cleanup (based on #894199) + * Sun Feb 3 2013 Karel Zak 2.22.2-3 - fix #882305 - agetty: unstable /dev/tty* permissions - fix #885314 - hexdump segfault From cb9405c20ebb2adc0b60df20a82f107c4fa448e8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 19 Feb 2013 16:20:33 +0100 Subject: [PATCH 133/425] 2.22.2-5: #902512, refresh patches Signed-off-by: Karel Zak --- ...ckup-superblock-visible-for-wipefs-8.patch | 64 +++++++++++++++++++ ... => util-linux-2.22-fdformat-man-ide.patch | 8 +-- ....patch => util-linux-2.22-ipcs-32bit.patch | 30 ++++----- util-linux-ng-2.21-login-lastlog.patch | 11 ---- util-linux-ng-2.22-login-lastlog.patch | 12 ++++ util-linux.spec | 20 +++--- 6 files changed, 107 insertions(+), 38 deletions(-) create mode 100644 libblkid-make-backup-superblock-visible-for-wipefs-8.patch rename util-linux-2.20-fdformat-man-ide.patch => util-linux-2.22-fdformat-man-ide.patch (61%) rename util-linux-2.21-ipcs-32bit.patch => util-linux-2.22-ipcs-32bit.patch (57%) delete mode 100644 util-linux-ng-2.21-login-lastlog.patch create mode 100644 util-linux-ng-2.22-login-lastlog.patch diff --git a/libblkid-make-backup-superblock-visible-for-wipefs-8.patch b/libblkid-make-backup-superblock-visible-for-wipefs-8.patch new file mode 100644 index 0000000..df06674 --- /dev/null +++ b/libblkid-make-backup-superblock-visible-for-wipefs-8.patch @@ -0,0 +1,64 @@ +diff -up util-linux-2.22.2/libblkid/src/blkidP.h.kzak util-linux-2.22.2/libblkid/src/blkidP.h +--- util-linux-2.22.2/libblkid/src/blkidP.h.kzak 2012-12-12 21:04:47.902355093 +0100 ++++ util-linux-2.22.2/libblkid/src/blkidP.h 2013-02-20 10:54:33.885606609 +0100 +@@ -224,6 +224,9 @@ struct blkid_struct_probe + + /* private per-probing flags */ + #define BLKID_PROBE_FL_IGNORE_PT (1 << 1) /* ignore partition table */ ++#define BLKID_PROBE_FL_IGNORE_BACKUP (1 << 2) /* ignore backup superblocks or PT */ ++ ++extern int blkid_probe_ignore_backup(blkid_probe pr); + + extern blkid_probe blkid_clone_probe(blkid_probe parent); + extern blkid_probe blkid_probe_get_wholedisk_probe(blkid_probe pr); +diff -up util-linux-2.22.2/libblkid/src/probe.c.kzak util-linux-2.22.2/libblkid/src/probe.c +--- util-linux-2.22.2/libblkid/src/probe.c.kzak 2012-12-12 21:04:47.903355101 +0100 ++++ util-linux-2.22.2/libblkid/src/probe.c 2013-02-20 11:02:48.525255696 +0100 +@@ -810,6 +810,7 @@ int blkid_probe_get_idmag(blkid_probe pr + static inline void blkid_probe_start(blkid_probe pr) + { + if (pr) { ++ DBG(DEBUG_LOWPROBE, printf("%p: start probe\n", pr)); + pr->cur_chain = NULL; + pr->prob_flags = 0; + blkid_probe_set_wiper(pr, 0, 0); +@@ -819,6 +820,7 @@ static inline void blkid_probe_start(blk + static inline void blkid_probe_end(blkid_probe pr) + { + if (pr) { ++ DBG(DEBUG_LOWPROBE, printf("%p: end probe\n", pr)); + pr->cur_chain = NULL; + pr->prob_flags = 0; + blkid_probe_set_wiper(pr, 0, 0); +@@ -1057,6 +1059,8 @@ int blkid_do_safeprobe(blkid_probe pr) + + blkid_probe_start(pr); + ++ pr->prob_flags |= BLKID_PROBE_FL_IGNORE_BACKUP; ++ + for (i = 0; i < BLKID_NCHAINS; i++) { + struct blkid_chain *chn; + +@@ -1679,3 +1683,7 @@ void blkid_probe_use_wiper(blkid_probe p + } + } + ++int blkid_probe_ignore_backup(blkid_probe pr) ++{ ++ return pr && (pr->prob_flags & BLKID_PROBE_FL_IGNORE_BACKUP); ++} +diff -up util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak util-linux-2.22.2/libblkid/src/superblocks/btrfs.c +--- util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak 2013-02-20 10:54:03.422381876 +0100 ++++ util-linux-2.22.2/libblkid/src/superblocks/btrfs.c 2013-02-20 10:54:33.886606616 +0100 +@@ -63,6 +63,11 @@ static int probe_btrfs(blkid_probe pr, c + { + struct btrfs_super_block *bfs; + ++ if (mag->kboff > 64 && blkid_probe_ignore_backup(pr)) { ++ DBG(DEBUG_LOWPROBE, printf("btrfs: found backup superblock, ignore\n")); ++ return 1; ++ } ++ + bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block); + if (!bfs) + return -1; diff --git a/util-linux-2.20-fdformat-man-ide.patch b/util-linux-2.22-fdformat-man-ide.patch similarity index 61% rename from util-linux-2.20-fdformat-man-ide.patch rename to util-linux-2.22-fdformat-man-ide.patch index de3618b..d742d5f 100644 --- a/util-linux-2.20-fdformat-man-ide.patch +++ b/util-linux-2.22-fdformat-man-ide.patch @@ -1,6 +1,6 @@ -diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk-utils/fdformat.8 ---- util-linux-2.20-rc1/disk-utils/fdformat.8.orig 2011-07-20 21:55:23.000000000 +0200 -+++ util-linux-2.20-rc1/disk-utils/fdformat.8 2011-07-29 21:08:57.558601033 +0200 +diff -up util-linux-2.22.2/disk-utils/fdformat.8.kzak util-linux-2.22.2/disk-utils/fdformat.8 +--- util-linux-2.22.2/disk-utils/fdformat.8.kzak 2012-06-11 12:06:53.620195844 +0200 ++++ util-linux-2.22.2/disk-utils/fdformat.8 2013-02-19 16:16:27.130214023 +0100 @@ -43,6 +43,11 @@ when a non-standard format is being used autodetected earlier. In this case, use .BR setfdprm (8) @@ -13,7 +13,7 @@ diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk .SH OPTIONS .TP \fB\-n\fR, \fB\-\-no\-verify\fR -@@ -58,7 +63,8 @@ Display help and exit. +@@ -57,7 +62,8 @@ Display help and exit. .BR fd (4), .BR setfdprm (8), .BR mkfs (8), diff --git a/util-linux-2.21-ipcs-32bit.patch b/util-linux-2.22-ipcs-32bit.patch similarity index 57% rename from util-linux-2.21-ipcs-32bit.patch rename to util-linux-2.22-ipcs-32bit.patch index 4685153..b6d5149 100644 --- a/util-linux-2.21-ipcs-32bit.patch +++ b/util-linux-2.22-ipcs-32bit.patch @@ -1,10 +1,10 @@ -diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils/ipcs.c ---- util-linux-2.21-rc1/sys-utils/ipcs.c.kzak 2012-01-19 13:31:26.328579820 +0100 -+++ util-linux-2.21-rc1/sys-utils/ipcs.c 2012-01-19 13:33:40.968066006 +0100 -@@ -262,6 +262,27 @@ static void print_perms (int id, struct - printf(" %-10u\n", ipcp->gid); +diff -up util-linux-2.22.2/sys-utils/ipcs.c.kzak util-linux-2.22.2/sys-utils/ipcs.c +--- util-linux-2.22.2/sys-utils/ipcs.c.kzak 2012-12-12 21:04:47.976355744 +0100 ++++ util-linux-2.22.2/sys-utils/ipcs.c 2013-02-19 16:12:54.712551108 +0100 +@@ -264,6 +264,27 @@ static void print_perms (int id, struct + printf(" %-10u\n", ipcp->gid); } - + +static unsigned long long +shminfo_from_proc(const char *name, unsigned long def) +{ @@ -28,11 +28,11 @@ diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils + void do_shm (char format) { - int maxid, shmid, id; -@@ -286,12 +307,12 @@ void do_shm (char format) - * glibc 2.1.3 and all earlier libc's have ints as fields of - * struct shminfo; glibc 2.1.91 has unsigned long; ach - */ + int maxid, shmid, id; +@@ -288,12 +309,12 @@ void do_shm (char format) + * 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"), @@ -41,9 +41,9 @@ diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils + 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"), + 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; + printf (_("min seg size (bytes) = %lu\n"), + (unsigned long) shminfo.shmmin); + return; diff --git a/util-linux-ng-2.21-login-lastlog.patch b/util-linux-ng-2.21-login-lastlog.patch deleted file mode 100644 index 947a0e5..0000000 --- a/util-linux-ng-2.21-login-lastlog.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up util-linux-2.21-rc1/login-utils/login.c.kzak util-linux-2.21-rc1/login-utils/login.c ---- util-linux-2.21-rc1/login-utils/login.c.kzak 2012-01-19 13:19:54.886299587 +0100 -+++ util-linux-2.21-rc1/login-utils/login.c 2012-01-19 13:20:40.853451212 +0100 -@@ -499,7 +499,7 @@ static void log_lastlog(struct login_con - if (!cxt->pwd) - return; - -- fd = open(_PATH_LASTLOG, O_RDWR, 0); -+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); - if (fd < 0) - return; diff --git a/util-linux-ng-2.22-login-lastlog.patch b/util-linux-ng-2.22-login-lastlog.patch new file mode 100644 index 0000000..73085d7 --- /dev/null +++ b/util-linux-ng-2.22-login-lastlog.patch @@ -0,0 +1,12 @@ +diff -up util-linux-2.22.2/login-utils/login.c.kzak util-linux-2.22.2/login-utils/login.c +--- util-linux-2.22.2/login-utils/login.c.kzak 2012-12-12 21:04:47.906355128 +0100 ++++ util-linux-2.22.2/login-utils/login.c 2013-02-19 16:14:33.224339106 +0100 +@@ -514,7 +514,7 @@ static void log_lastlog(struct login_con + if (!cxt->pwd) + return; + +- fd = open(_PATH_LASTLOG, O_RDWR, 0); ++ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); + if (fd < 0) + return; + diff --git a/util-linux.spec b/util-linux.spec index 907f200..998f53d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.2 -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: http://en.wikipedia.org/wiki/Util-linux @@ -80,16 +80,16 @@ Requires: libmount = %{version}-%{release} # add a missing header Patch0: util-linux-2.19-floppy-locale.patch # add note about ATAPI IDE floppy to fdformat.8 -Patch1: util-linux-2.20-fdformat-man-ide.patch +Patch1: util-linux-2.22-fdformat-man-ide.patch # 169628 - /usr/bin/floppy doesn't work with /dev/fd0 Patch2: util-linux-2.19-floppy-generic.patch ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch3: util-linux-ng-2.21-login-lastlog.patch +Patch3: util-linux-ng-2.22-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux -Patch4: util-linux-2.21-ipcs-32bit.patch +Patch4: util-linux-2.22-ipcs-32bit.patch ### ### Upstream patches (2.23 or 2.22.x) @@ -103,6 +103,8 @@ Patch102: hexdump-do-not-segfault-when-iterating-over-an-empty.patch Patch103: cal-don-t-mix-ncurses-output-functions-and-printf.patch # upstream patch Patch104: libblkid-remove-optimization-from-verify-function.patch +# 902512 - No boot : Dependency failed for /home (and blkid fails to tell UUID) +Patch105: libblkid-make-backup-superblock-visible-for-wipefs-8.patch ### Upstream patches from master branch (will be v2.23) for su(1) and new ### runuser(1) implementation. This is required for the recent coreutils where @@ -403,7 +405,7 @@ chmod 644 misc-utils/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt -ln -s /proc/mounts %{buildroot}/etc/mtab +ln -sf /proc/mounts %{buildroot}/etc/mtab # remove static libs @@ -442,8 +444,7 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then fi fi if [ ! -L /etc/mtab ]; then - rm -f /etc/mtab - ln -s /proc/mounts /etc/mtab + ln -fs /proc/mounts /etc/mtab fi %post -n libblkid @@ -778,8 +779,11 @@ fi %{_mandir}/man3/uuid_unparse.3* %{_libdir}/pkgconfig/uuid.pc - %changelog +* Tue Feb 19 2013 Karel Zak 2.22.2-5 +- fix #902512 - Dependency failed for /home (and blkid fails to tell UUID) +- refresh old patches + * Wed Feb 6 2013 Karel Zak 2.22.2-4 - improve convertion to mtab symlink in post script - spec file cleanup (based on #894199) From c2496a27a2dba2849b11f699c99b715107c0a08a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 Feb 2013 09:25:51 +0100 Subject: [PATCH 134/425] 2.22.2-6: #912778 Signed-off-by: Karel Zak --- util-linux-runuser-l.pamd | 1 + util-linux.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux-runuser-l.pamd b/util-linux-runuser-l.pamd index fa1e4d8..7a9a48c 100644 --- a/util-linux-runuser-l.pamd +++ b/util-linux-runuser-l.pamd @@ -1,4 +1,5 @@ #%PAM-1.0 auth include runuser session optional pam_keyinit.so force revoke +-session optional pam_systemd.so session include runuser diff --git a/util-linux.spec b/util-linux.spec index 998f53d..7a6f711 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.22.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -780,6 +780,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Wed Feb 20 2013 Karel Zak 2.22.2-6 +- fix #912778 - "runuser -l" doesn't register session to systemd + * Tue Feb 19 2013 Karel Zak 2.22.2-5 - fix #902512 - Dependency failed for /home (and blkid fails to tell UUID) - refresh old patches From 2c19cdfe49b048e1d29c157fae78a99e0f31231d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 22 Mar 2013 14:10:10 +0100 Subject: [PATCH 135/425] 2.23-0.1: upgrade to uspream 2.23-rc1 Signed-off-by: Karel Zak --- .gitignore | 1 + ...t-use-umount-optimization-for-l-or-f.patch | 34 - 0002-wipefs-use-O_EXCL.patch | 27 - ...-remove-loop-declaration-smatch-scan.patch | 37 - ...ix-compiler-warning-Wstrict-aliasing.patch | 35 - ...eviation-for-no-canonicalize-to-man-.patch | 31 - ...long-options-for-L-and-U-to-man-page.patch | 33 - 0007-lib-loopdev-improve-debug-messages.patch | 107 -- 0008-lib-loopdev-check-for-sys.patch | 35 - ...ile-with-DINCLUDE_FS_TESTS-for-make-.patch | 49 - ...-fix-compiler-warning-Wunused-result.patch | 44 - ...misc-make-readlink-usage-more-robust.patch | 63 - ...-su-add-group-and-supp-group-options.patch | 203 --- ...-move-generic-su-code-to-su-common.c.patch | 1576 ----------------- ...unuser-new-command-derived-from-su-1.patch | 450 ----- ...etpwuid-for-GNU-Hurt-coreutils-71b7d.patch | 68 - ...fy-writing-to-streams-was-successful.patch | 33 - 0205-su-move-long-options-to-main.patch | 60 - ...ion-fault-reporting-of-the-child-pro.patch | 40 - ...su-fixed-a-typo-in-pam-error-message.patch | 26 - 0208-runuser-add-u-to-not-execute-shell.patch | 281 --- 0209-build-sys-move-runuser-to-sbin-dir.patch | 26 - 0210-su-fix-COMMAND-not-specified-error.patch | 62 - sources | 2 +- util-linux-2.22-ipcs-32bit.patch | 49 - util-linux.spec | 69 +- 26 files changed, 22 insertions(+), 3419 deletions(-) delete mode 100644 0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch delete mode 100644 0002-wipefs-use-O_EXCL.patch delete mode 100644 0003-swapon-remove-loop-declaration-smatch-scan.patch delete mode 100644 0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch delete mode 100644 0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch delete mode 100644 0006-mount-add-long-options-for-L-and-U-to-man-page.patch delete mode 100644 0007-lib-loopdev-improve-debug-messages.patch delete mode 100644 0008-lib-loopdev-check-for-sys.patch delete mode 100644 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch delete mode 100644 0010-login-fix-compiler-warning-Wunused-result.patch delete mode 100644 0011-misc-make-readlink-usage-more-robust.patch delete mode 100644 0200-su-add-group-and-supp-group-options.patch delete mode 100644 0201-su-move-generic-su-code-to-su-common.c.patch delete mode 100644 0202-runuser-new-command-derived-from-su-1.patch delete mode 100644 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch delete mode 100644 0204-su-verify-writing-to-streams-was-successful.patch delete mode 100644 0205-su-move-long-options-to-main.patch delete mode 100644 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch delete mode 100644 0207-su-fixed-a-typo-in-pam-error-message.patch delete mode 100644 0208-runuser-add-u-to-not-execute-shell.patch delete mode 100644 0209-build-sys-move-runuser-to-sbin-dir.patch delete mode 100644 0210-su-fix-COMMAND-not-specified-error.patch delete mode 100644 util-linux-2.22-ipcs-32bit.patch diff --git a/.gitignore b/.gitignore index df32d4a..f2bff19 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /util-linux-2.22.tar.xz /util-linux-2.22.1.tar.xz /util-linux-2.22.2.tar.xz +/util-linux-2.23-rc1.tar.xz diff --git a/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch b/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch deleted file mode 100644 index 952c5e1..0000000 --- a/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6eeca6c7170295f325b814ee0cd1576da885cd30 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 15 Oct 2012 11:10:50 +0200 -Subject: [PATCH 01/11] libmount: don't use umount optimization for -l or -f - -The options -l (lazy) and -f (force) means that the mountpoint may be -unreadable (for example because NFS server is unreadable). So we -should not try to be smart in this case and we should try to minimize -number of situations when stat() or readlink() is used for the -mountpoint. - -Signed-off-by: Karel Zak ---- - libmount/src/context_umount.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c -index ce095bf..2c2e64c 100644 ---- a/libmount/src/context_umount.c -+++ b/libmount/src/context_umount.c -@@ -83,7 +83,9 @@ static int lookup_umount_fs(struct libmnt_context *cxt) - * where LABEL, UUID or symlinks are to canonicalized. It means that - * it's usable only for canonicalized stuff (e.g. kernel mountinfo). - */ -- if (!cxt->mtab_writable && *tgt == '/') { -+ if (!cxt->mtab_writable && *tgt == '/' && -+ !mnt_context_is_force(cxt) && !mnt_context_is_lazy(cxt)) { -+ - struct stat st; - - if (stat(tgt, &st) == 0 && S_ISDIR(st.st_mode)) { --- -1.7.11.7 - diff --git a/0002-wipefs-use-O_EXCL.patch b/0002-wipefs-use-O_EXCL.patch deleted file mode 100644 index 66a6476..0000000 --- a/0002-wipefs-use-O_EXCL.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9faf9c8494cf37fdcf68b1dfe10fd7900e93ec00 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 15 Oct 2012 12:38:09 +0200 -Subject: [PATCH 02/11] wipefs: use O_EXCL - -Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961 -Signed-off-by: Karel Zak ---- - misc-utils/wipefs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c -index cddad8a..0ddc148 100644 ---- a/misc-utils/wipefs.c -+++ b/misc-utils/wipefs.c -@@ -309,7 +309,7 @@ static void do_wipe_real(blkid_probe pr, const char *devname, struct wipe_desc * - static struct wipe_desc * - do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet) - { -- blkid_probe pr = new_probe(devname, O_RDWR); -+ blkid_probe pr = new_probe(devname, O_RDWR | O_EXCL); - struct wipe_desc *w, *wp0 = clone_offset(wp); - int zap = all ? 1 : wp->zap; - --- -1.7.11.7 - diff --git a/0003-swapon-remove-loop-declaration-smatch-scan.patch b/0003-swapon-remove-loop-declaration-smatch-scan.patch deleted file mode 100644 index d5b90fe..0000000 --- a/0003-swapon-remove-loop-declaration-smatch-scan.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 10a9cbcf36d43c0d4a13bf5e91315b4ffd29e636 Mon Sep 17 00:00:00 2001 -From: Sami Kerola -Date: Mon, 8 Oct 2012 08:08:20 +0100 -Subject: [PATCH 03/11] swapon: remove loop declaration [smatch scan] - -sys-utils/swapon.c:677:2: error: 'for' loop initial declarations are -only allowed in C99 mode - -Signed-off-by: Sami Kerola ---- - sys-utils/swapon.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c -index c9cabc1..0e1ab66 100644 ---- a/sys-utils/swapon.c -+++ b/sys-utils/swapon.c -@@ -642,6 +642,7 @@ static int swapon_all(void) - - static void __attribute__ ((__noreturn__)) usage(FILE * out) - { -+ size_t i; - fputs(USAGE_HEADER, out); - - fprintf(out, _(" %s [options] []\n"), program_invocation_short_name); -@@ -674,7 +675,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) - " name of file to be used\n"), out); - - fputs(_("\nAvailable columns (for --show):\n"), out); -- for (size_t i = 0; i < NCOLS; i++) -+ for (i = 0; i < NCOLS; i++) - fprintf(out, " %4s %s\n", infos[i].name, _(infos[i].help)); - - fprintf(out, USAGE_MAN_TAIL("swapon(8)")); --- -1.7.11.7 - diff --git a/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch b/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch deleted file mode 100644 index af08118..0000000 --- a/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9f6c8591eeffb6591dc6a18512e618f0acf09890 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 15 Oct 2012 17:01:30 +0200 -Subject: [PATCH 04/11] libblkid: fix compiler warning [-Wstrict-aliasing] - -libblkid/src/superblocks/befs.c: In function 'get_uuid': -libblkid/src/superblocks/befs.c:353:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/befs.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c -index a7f4317..452da1e 100644 ---- a/libblkid/src/superblocks/befs.c -+++ b/libblkid/src/superblocks/befs.c -@@ -348,9 +348,11 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, - && FS16_TO_CPU(sd->name_size, fs_le) == strlen(KEY_NAME) - && FS16_TO_CPU(sd->data_size, fs_le) == KEY_SIZE - && strcmp(sd->name, KEY_NAME) == 0) { -- *uuid = *(uint64_t *) ((uint8_t *) sd->name -- + FS16_TO_CPU(sd->name_size, fs_le) -- + 3); -+ -+ memcpy(uuid, -+ sd->name + FS16_TO_CPU(sd->name_size, fs_le) + 3, -+ sizeof(uint64_t)); -+ - break; - } else if (FS32_TO_CPU(sd->type, fs_le) == 0 - && FS16_TO_CPU(sd->name_size, fs_le) == 0 --- -1.7.11.7 - diff --git a/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch b/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch deleted file mode 100644 index dedadd2..0000000 --- a/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 532116d4dd16632806ed4a036c2e89b966221031 Mon Sep 17 00:00:00 2001 -From: Bill Pemberton -Date: Wed, 10 Oct 2012 16:54:01 -0400 -Subject: [PATCH 05/11] mount: add -c abbreviation for --no-canonicalize to - man page - -The --no-canonicalize option can also be set using -c. The --help for -mount shows this option but the man page did not. Add -c to the man -page. - -Signed-off-by: Bill Pemberton ---- - sys-utils/mount.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index dce4b8c..83a4518 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -552,7 +552,7 @@ Mount without writing in - This is necessary for example when - .I /etc - is on a read-only filesystem. --.IP "\fB\-\-no\-canonicalize\fP" -+.IP "\fB\-c, \-\-no\-canonicalize\fP" - Don't canonicalize paths. The mount command canonicalizes all paths - (from command line or fstab) and stores canonicalized paths to the - .IR /etc/mtab --- -1.7.11.7 - diff --git a/0006-mount-add-long-options-for-L-and-U-to-man-page.patch b/0006-mount-add-long-options-for-L-and-U-to-man-page.patch deleted file mode 100644 index feb4c39..0000000 --- a/0006-mount-add-long-options-for-L-and-U-to-man-page.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b426209c5ba2126a9038363a269fec884af470fb Mon Sep 17 00:00:00 2001 -From: Bill Pemberton -Date: Wed, 10 Oct 2012 16:54:02 -0400 -Subject: [PATCH 06/11] mount: add long options for -L and -U to man page - -The -L and -U flags both have long options too (--label and --uuid). -The usage() function will show them but the man page didn't list them. - -Signed-off-by: Bill Pemberton ---- - sys-utils/mount.8 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index 83a4518..0b40bf7 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -586,10 +586,10 @@ set the block device to read-only mode, see command - .IP "\fB\-w, \-\-rw\fP" - Mount the filesystem read/write. This is the default. A synonym is - .BR "\-o rw" . --.IP "\fB\-L \fIlabel\fP" -+.IP "\fB\-L, \-\-label \fIlabel\fP" - Mount the partition that has the specified - .IR label . --.IP "\fB\-U \fIuuid\fP" -+.IP "\fB\-U, \-\-uuid \fIuuid\fP" - Mount the partition that has the specified - .IR uuid . - These two options require the file --- -1.7.11.7 - diff --git a/0007-lib-loopdev-improve-debug-messages.patch b/0007-lib-loopdev-improve-debug-messages.patch deleted file mode 100644 index 0db04da..0000000 --- a/0007-lib-loopdev-improve-debug-messages.patch +++ /dev/null @@ -1,107 +0,0 @@ -From deb0e659451d4ade29df3dbb842607edd6080c0d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 17 Oct 2012 11:42:21 +0200 -Subject: [PATCH 07/11] lib/loopdev: improve debug messages - -Signed-off-by: Karel Zak ---- - lib/loopdev.c | 22 ++++++++++++++++++---- - sys-utils/losetup.c | 2 -- - 2 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/lib/loopdev.c b/lib/loopdev.c -index a9f6df2..0e6033a 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -87,8 +87,10 @@ int loopcxt_set_device(struct loopdev_cxt *lc, const char *device) - if (!lc) - return -EINVAL; - -- if (lc->fd >= 0) -+ if (lc->fd >= 0) { - close(lc->fd); -+ DBG(lc, loopdev_debug("closing old open fd")); -+ } - lc->fd = -1; - lc->mode = 0; - lc->has_info = 0; -@@ -158,19 +160,26 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) - memcpy(lc, &dummy, sizeof(dummy)); - lc->flags = flags; - -+ if (getenv("LOOPDEV_DEBUG")) -+ loopcxt_enable_debug(lc, TRUE); -+ - rc = loopcxt_set_device(lc, NULL); - if (rc) - return rc; - - if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && -- get_linux_version() >= KERNEL_VERSION(2,6,37)) -+ get_linux_version() >= KERNEL_VERSION(2,6,37)) { - /* - * Use only sysfs for basic information about loop devices - */ - lc->flags |= LOOPDEV_FL_NOIOCTL; -+ DBG(lc, loopdev_debug("init: ignore ioctls")); -+ } - -- if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) -+ if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) { - lc->flags |= LOOPDEV_FL_CONTROL; -+ DBG(lc, loopdev_debug("init: loop-control detected ")); -+ } - - return 0; - } -@@ -272,7 +281,9 @@ int loopcxt_get_fd(struct loopdev_cxt *lc) - if (lc->fd < 0) { - lc->mode = lc->flags & LOOPDEV_FL_RDWR ? O_RDWR : O_RDONLY; - lc->fd = open(lc->device, lc->mode); -- DBG(lc, loopdev_debug("open %s", lc->fd < 0 ? "failed" : "ok")); -+ DBG(lc, loopdev_debug("open %s [%s]: %s", lc->device, -+ lc->flags & LOOPDEV_FL_RDWR ? "rw" : "ro", -+ lc->fd < 0 ? "failed" : "ok")); - } - return lc->fd; - } -@@ -576,6 +587,7 @@ int loopcxt_next(struct loopdev_cxt *lc) - * of loop devices). This is enough for 99% of all cases. - */ - if (iter->default_check) { -+ DBG(lc, loopdev_debug("iter: next: default check")); - for (++iter->ncur; iter->ncur < LOOPDEV_DEFAULT_NNODES; - iter->ncur++) { - char name[16]; -@@ -590,6 +602,7 @@ int loopcxt_next(struct loopdev_cxt *lc) - /* C) the worst possibility, scan whole /dev or /dev/loop/ - */ - if (!iter->minors) { -+ DBG(lc, loopdev_debug("iter: next: scan /dev")); - iter->nminors = (lc->flags & LOOPDEV_FL_DEVSUBDIR) ? - loop_scandir(_PATH_DEV_LOOP, &iter->minors, 0) : - loop_scandir(_PATH_DEV, &iter->minors, 1); -@@ -1150,6 +1163,7 @@ int loopcxt_setup_device(struct loopdev_cxt *lc) - DBG(lc, loopdev_debug("setup: backing file open: OK")); - - if (lc->fd != -1 && lc->mode != mode) { -+ DBG(lc, loopdev_debug("closing already open device (mode mismatch)")); - close(lc->fd); - lc->fd = -1; - lc->mode = 0; -diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c -index fdcc0be..a8381a8 100644 ---- a/sys-utils/losetup.c -+++ b/sys-utils/losetup.c -@@ -250,8 +250,6 @@ int main(int argc, char **argv) - if (loopcxt_init(&lc, 0)) - err(EXIT_FAILURE, _("failed to initialize loopcxt")); - -- loopcxt_enable_debug(&lc, getenv("LOOPDEV_DEBUG") ? TRUE : FALSE); -- - while ((c = getopt_long(argc, argv, "ac:d:De:E:fhj:o:p:PrvV", - longopts, NULL)) != -1) { - --- -1.7.11.7 - diff --git a/0008-lib-loopdev-check-for-sys.patch b/0008-lib-loopdev-check-for-sys.patch deleted file mode 100644 index ba50416..0000000 --- a/0008-lib-loopdev-check-for-sys.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 939636dd664cc608232c272de77be96e6f089235 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 17 Oct 2012 11:43:39 +0200 -Subject: [PATCH 08/11] lib/loopdev: check for /sys - -The current loopdev code prefers /sys to get information about -loop devices. The old methods like scan /dev are fallback solution -only. Unfortunately, the code does not check if /sys is mounted. - -Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad -Signed-off-by: Karel Zak ---- - lib/loopdev.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/lib/loopdev.c b/lib/loopdev.c -index 0e6033a..f62af83 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -167,6 +167,12 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) - if (rc) - return rc; - -+ if (stat(_PATH_SYS_BLOCK, &st) || !S_ISDIR(st.st_mode)) { -+ lc->flags |= LOOPDEV_FL_NOSYSFS; -+ lc->flags &= ~LOOPDEV_FL_NOIOCTL; -+ DBG(lc, loopdev_debug("init: disable /sys usage")); -+ } -+ - if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && - get_linux_version() >= KERNEL_VERSION(2,6,37)) { - /* --- -1.7.11.7 - diff --git a/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch b/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch deleted file mode 100644 index dc4f7b7..0000000 --- a/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 75f03f036011003c2a9e8e634ca3ce7930873318 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 22 Oct 2012 10:10:55 +0200 -Subject: [PATCH 09/11] fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make - check - - make check - sudo su - - cd tests - ./run.sh cramfs - -Signed-off-by: Karel Zak ---- - disk-utils/Makemodule.am | 5 +++++ - tests/commands.sh | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/disk-utils/Makemodule.am b/disk-utils/Makemodule.am -index f2360bf..b329a99 100644 ---- a/disk-utils/Makemodule.am -+++ b/disk-utils/Makemodule.am -@@ -97,6 +97,11 @@ fsck_cramfs_LDADD = $(LDADD) -lz libcommon.la - sbin_PROGRAMS += mkfs.cramfs - mkfs_cramfs_SOURCES = disk-utils/mkfs.cramfs.c $(cramfs_common_sources) - mkfs_cramfs_LDADD = $(LDADD) -lz libcommon.la -+ -+check_PROGRAMS += test_fsck.cramfs -+test_fsck_cramfs_SOURCES = $(fsck_cramfs_SOURCES) -+test_fsck_cramfs_LDADD = $(fsck_cramfs_LDADD) -+test_fsck_cramfs_CFLAGS = $(AM_CFLAGS) -DINCLUDE_FS_TESTS - endif - - -diff --git a/tests/commands.sh b/tests/commands.sh -index 8a1577e..db1d4ac 100644 ---- a/tests/commands.sh -+++ b/tests/commands.sh -@@ -37,7 +37,7 @@ TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"} - TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"} - TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"} - TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"} --TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"} -+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/test_fsck.cramfs"} - TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"} - - TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"} --- -1.7.11.7 - diff --git a/0010-login-fix-compiler-warning-Wunused-result.patch b/0010-login-fix-compiler-warning-Wunused-result.patch deleted file mode 100644 index 2d50045..0000000 --- a/0010-login-fix-compiler-warning-Wunused-result.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ed68f1e2f5609a3f42492df407d62b8fc006ea17 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 22 Oct 2012 13:13:02 +0200 -Subject: [PATCH 10/11] login: fix compiler warning [-Wunused-result] - -It's probably unnecessary paranoia, but let's check if we're able to -restore the original IDs after ~/.hushlogin file check. - -Signed-off-by: Karel Zak ---- - login-utils/login.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/login-utils/login.c b/login-utils/login.c -index 8ae5266..f5896da 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -1031,13 +1031,17 @@ static int get_hushlogin_status(struct passwd *pwd) - gid_t egid = getegid(); - - sprintf(buf, "%s/%s", pwd->pw_dir, file); -- setregid(-1, pwd->pw_gid); -- setreuid(0, pwd->pw_uid); -- ok = effective_access(buf, O_RDONLY) == 0; -- setuid(0); /* setreuid doesn't do it alone! */ -- setreuid(ruid, 0); -- setregid(-1, egid); - -+ if (setregid(-1, pwd->pw_gid) == 0 && -+ setreuid(0, pwd->pw_uid) == 0) -+ ok = effective_access(buf, O_RDONLY) == 0; -+ -+ if (setuid(0) != 0 || -+ setreuid(ruid, 0) != 0 || -+ setregid(-1, egid) != 0) { -+ syslog(LOG_ALERT, _("hush login status: restore original IDs failed")); -+ exit(EXIT_FAILURE); -+ } - if (ok) - return 1; /* enabled by user */ - } --- -1.7.11.7 - diff --git a/0011-misc-make-readlink-usage-more-robust.patch b/0011-misc-make-readlink-usage-more-robust.patch deleted file mode 100644 index ce4e754..0000000 --- a/0011-misc-make-readlink-usage-more-robust.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a3528342bc716ecdabdd86609ae5a3198f560870 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 23 Oct 2012 12:40:39 +0200 -Subject: [PATCH 11/11] misc: make readlink() usage more robust - -Signed-off-by: Karel Zak ---- - misc-utils/lsblk.c | 4 ++-- - misc-utils/lslocks.c | 2 +- - sys-utils/eject.c | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index cc97c05..9c25dd0 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -962,7 +962,7 @@ static int get_wholedisk_from_partition_dirent(DIR *dir, const char *dirname, - int len; - - if ((len = readlink_at(dirfd(dir), dirname, -- d->d_name, path, sizeof(path))) < 0) -+ d->d_name, path, sizeof(path) - 1)) < 0) - return 0; - - path[len] = '\0'; -@@ -1075,7 +1075,7 @@ static char *devno_to_sysfs_name(dev_t devno, char *devname, char *buf, size_t b - return NULL; - } - -- len = readlink(path, buf, buf_size); -+ len = readlink(path, buf, buf_size - 1); - if (len < 0) { - warn(_("%s: failed to read link"), path); - return NULL; -diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c -index 45fb6de..495eb80 100644 ---- a/misc-utils/lslocks.c -+++ b/misc-utils/lslocks.c -@@ -196,7 +196,7 @@ static char *get_filename_sz(ino_t inode, pid_t pid, size_t *size) - continue; - - if ((len = readlink_at(fd, path, dp->d_name, -- sym, sizeof(path))) < 1) -+ sym, sizeof(sym) - 1)) < 1) - goto out; - - *size = sb.st_size; -diff --git a/sys-utils/eject.c b/sys-utils/eject.c -index 1a5b834..6d0da18 100644 ---- a/sys-utils/eject.c -+++ b/sys-utils/eject.c -@@ -837,7 +837,7 @@ static char *get_subsystem(char *chain, char *buf, size_t bufsz) - memcpy(chain + len, SUBSYSTEM_LINKNAME, sizeof(SUBSYSTEM_LINKNAME)); - - /* try if subsystem symlink exists */ -- sz = readlink(chain, buf, bufsz); -+ sz = readlink(chain, buf, bufsz - 1); - - /* remove last subsystem from chain */ - chain[len] = '\0'; --- -1.7.11.7 - diff --git a/0200-su-add-group-and-supp-group-options.patch b/0200-su-add-group-and-supp-group-options.patch deleted file mode 100644 index fae59a9..0000000 --- a/0200-su-add-group-and-supp-group-options.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 6273784aa4f40121b3963b41df0986044eeaced0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 28 Aug 2012 16:32:28 +0200 -Subject: [PATCH 200/208] su: add --group and --supp-group options - -These options allow to specify alternative groups. The command -su(1) has to be executed by root. The implementation is based on -Fedora runuser(1) command. - -For example: - - # su --group=kzak --supp-group=uuidd - - # id - uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak) - -non-root user: - - $ su --group=kzak - - su: only root can specify alternative groups - -Signed-off-by: Karel Zak ---- - login-utils/su.1 | 6 +++++ - login-utils/su.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 75 insertions(+), 4 deletions(-) - -diff --git a/login-utils/su.1 b/login-utils/su.1 -index 598cebd..59e1731 100644 ---- a/login-utils/su.1 -+++ b/login-utils/su.1 -@@ -59,6 +59,12 @@ Pass - to the shell which may or may not be useful depending on the - shell. - .TP -+\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR -+specify the primary group, this option is allowed for root user only -+.TP -+\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR -+specify a supplemental group, this option is allowed for root user only -+.TP - \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR - Starts the shell as login shell with an environment similar to a real - login: -diff --git a/login-utils/su.c b/login-utils/su.c -index c6b8bce..f11c757 100644 ---- a/login-utils/su.c -+++ b/login-utils/su.c -@@ -110,6 +110,8 @@ static struct option const longopts[] = - {"login", no_argument, NULL, 'l'}, - {"preserve-environment", no_argument, NULL, 'p'}, - {"shell", required_argument, NULL, 's'}, -+ {"group", required_argument, NULL, 'g'}, -+ {"supp-group", required_argument, NULL, 'G'}, - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'V'}, - {NULL, 0, NULL, 0} -@@ -424,11 +426,18 @@ modify_environment (const struct passwd *pw, const char *shell) - /* Become the user and group(s) specified by PW. */ - - static void --init_groups (const struct passwd *pw) -+init_groups (const struct passwd *pw, gid_t *groups, int num_groups) - { - int retval; -+ - errno = 0; -- if (initgroups (pw->pw_name, pw->pw_gid) == -1) -+ -+ if (num_groups) -+ retval = setgroups (num_groups, groups); -+ else -+ retval = initgroups (pw->pw_name, pw->pw_gid); -+ -+ if (retval == -1) - { - cleanup_pam (PAM_ABORT); - err (EXIT_FAILURE, _("cannot set groups")); -@@ -535,6 +544,8 @@ usage (int status) - -c, --command pass a single command to the shell with -c\n\ - --session-command pass a single command to the shell with -c\n\ - and do not create a new session\n\ -+ -g --group=group specify the primary group\n\ -+ -G --supp-group=group specify a supplemental group\n\ - -f, --fast pass -f to the shell (for csh or tcsh)\n\ - -m, --preserve-environment do not reset environment variables\n\ - -p same as -m\n\ -@@ -556,6 +567,19 @@ void load_config(void) - logindefs_load_file(_PATH_LOGINDEFS); - } - -+/* -+ * Returns 1 if the current user is not root -+ */ -+static int -+evaluate_uid(void) -+{ -+ uid_t ruid = getuid(); -+ uid_t euid = geteuid(); -+ -+ /* if we're really root and aren't running setuid */ -+ return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; -+} -+ - int - main (int argc, char **argv) - { -@@ -566,6 +590,11 @@ main (int argc, char **argv) - char *shell = NULL; - struct passwd *pw; - struct passwd pw_copy; -+ struct group *gr; -+ gid_t groups[NGROUPS_MAX]; -+ int num_supp_groups = 0; -+ int use_gid = 0; -+ int restricted; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); -@@ -575,7 +604,7 @@ main (int argc, char **argv) - simulate_login = false; - change_environment = true; - -- while ((optc = getopt_long (argc, argv, "c:flmps:hV", longopts, NULL)) != -1) -+ while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) - { - switch (optc) - { -@@ -592,6 +621,26 @@ main (int argc, char **argv) - fast_startup = true; - break; - -+ case 'g': -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ use_gid = 1; -+ groups[0] = gr->gr_gid; -+ break; -+ -+ case 'G': -+ num_supp_groups++; -+ if (num_supp_groups >= NGROUPS_MAX) -+ errx(EXIT_FAILURE, -+ _("can't specify more than %d supplemental groups"), -+ NGROUPS_MAX - 1); -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ groups[num_supp_groups] = gr->gr_gid; -+ break; -+ - case 'l': - simulate_login = true; - break; -@@ -617,6 +666,8 @@ main (int argc, char **argv) - } - } - -+ restricted = evaluate_uid (); -+ - if (optind < argc && !strcmp (argv[optind], "-")) - { - simulate_login = true; -@@ -625,6 +676,9 @@ main (int argc, char **argv) - if (optind < argc) - new_user = argv[optind++]; - -+ if ((num_supp_groups || use_gid) && restricted) -+ errx(EXIT_FAILURE, _("only root can specify alternative groups")); -+ - logindefs_load_defaults = load_config; - - pw = getpwnam (new_user); -@@ -648,6 +702,17 @@ main (int argc, char **argv) - : DEFAULT_SHELL); - endpwent (); - -+ if (num_supp_groups && !use_gid) -+ { -+ pw->pw_gid = groups[1]; -+ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); -+ } -+ else if (use_gid) -+ { -+ pw->pw_gid = groups[0]; -+ num_supp_groups++; -+ } -+ - authenticate (pw); - - if (request_same_session || !command || !pw->pw_uid) -@@ -666,7 +731,7 @@ main (int argc, char **argv) - } - shell = xstrdup (shell ? shell : pw->pw_shell); - -- init_groups (pw); -+ init_groups (pw, groups, num_supp_groups); - - create_watching_parent (); - /* Now we're in the child. */ --- -1.7.11.7 - diff --git a/0201-su-move-generic-su-code-to-su-common.c.patch b/0201-su-move-generic-su-code-to-su-common.c.patch deleted file mode 100644 index 25c7141..0000000 --- a/0201-su-move-generic-su-code-to-su-common.c.patch +++ /dev/null @@ -1,1576 +0,0 @@ -From 1874fa1ef38ce41eaf61b1aada25fac5f6966839 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Nov 2012 12:38:48 +0100 -Subject: [PATCH 201/208] su: move generic su code to su-common.c - -Signed-off-by: Karel Zak ---- - login-utils/Makemodule.am | 2 + - login-utils/su-common.c | 759 ++++++++++++++++++++++++++++++++++++++++++++++ - login-utils/su-common.h | 12 + - login-utils/su.c | 754 +-------------------------------------------- - 4 files changed, 776 insertions(+), 751 deletions(-) - create mode 100644 login-utils/su-common.c - create mode 100644 login-utils/su-common.h - -diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am -index e10da46..b918f00 100644 ---- a/login-utils/Makemodule.am -+++ b/login-utils/Makemodule.am -@@ -83,6 +83,8 @@ bin_PROGRAMS += su - dist_man_MANS += login-utils/su.1 - su_SOURCES = \ - login-utils/su.c \ -+ login-utils/su-common.c \ -+ login-utils/su-common.h \ - login-utils/logindefs.c \ - login-utils/logindefs.h - su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -new file mode 100644 -index 0000000..f1f46aa ---- /dev/null -+++ b/login-utils/su-common.c -@@ -0,0 +1,759 @@ -+/* su for Linux. Run a shell with substitute user and group IDs. -+ Copyright (C) 1992-2006 Free Software Foundation, Inc. -+ Copyright (C) 2012 SUSE Linux Products GmbH, Nuernberg -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -+ -+/* Run a shell with the real and effective UID and GID and groups -+ of USER, default `root'. -+ -+ The shell run is taken from USER's password entry, /bin/sh if -+ none is specified there. If the account has a password, su -+ prompts for a password unless run by a user with real UID 0. -+ -+ Does not change the current directory. -+ Sets `HOME' and `SHELL' from the password entry for USER, and if -+ USER is not root, sets `USER' and `LOGNAME' to USER. -+ The subshell is not a login shell. -+ -+ If one or more ARGs are given, they are passed as additional -+ arguments to the subshell. -+ -+ Does not handle /bin/sh or other shells specially -+ (setting argv[0] to "-su", passing -c only to certain shells, etc.). -+ I don't see the point in doing that, and it's ugly. -+ -+ Based on an implemenation by David MacKenzie . */ -+ -+enum -+{ -+ EXIT_CANNOT_INVOKE = 126, -+ EXIT_ENOENT = 127 -+}; -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "err.h" -+ -+#include -+#include "c.h" -+#include "xalloc.h" -+#include "nls.h" -+#include "pathnames.h" -+#include "env.h" -+ -+/* name of the pam configuration files. separate configs for su and su - */ -+#define PAM_SERVICE_NAME "su" -+#define PAM_SERVICE_NAME_L "su-l" -+ -+#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) -+ -+#include "logindefs.h" -+#include "su-common.h" -+ -+/* The shell to run if none is given in the user's passwd entry. */ -+#define DEFAULT_SHELL "/bin/sh" -+ -+/* The user to become if none is specified. */ -+#define DEFAULT_USER "root" -+ -+#ifndef HAVE_ENVIRON_DECL -+extern char **environ; -+#endif -+ -+static void run_shell (char const *, char const *, char **, size_t) -+ __attribute__ ((__noreturn__)); -+ -+/* If true, pass the `-f' option to the subshell. */ -+static bool fast_startup; -+ -+/* If true, simulate a login instead of just starting a shell. */ -+static bool simulate_login; -+ -+/* If true, change some environment vars to indicate the user su'd to. */ -+static bool change_environment; -+ -+/* If true, then don't call setsid() with a command. */ -+int same_session = 0; -+ -+/* SU_MODE_{RUNUSER,SU} */ -+static int su_mode; -+ -+static bool _pam_session_opened; -+static bool _pam_cred_established; -+static sig_atomic_t volatile caught_signal = false; -+static pam_handle_t *pamh = NULL; -+ -+static struct option const longopts[] = -+{ -+ {"command", required_argument, NULL, 'c'}, -+ {"session-command", required_argument, NULL, 'C'}, -+ {"fast", no_argument, NULL, 'f'}, -+ {"login", no_argument, NULL, 'l'}, -+ {"preserve-environment", no_argument, NULL, 'p'}, -+ {"shell", required_argument, NULL, 's'}, -+ {"group", required_argument, NULL, 'g'}, -+ {"supp-group", required_argument, NULL, 'G'}, -+ {"help", no_argument, 0, 'h'}, -+ {"version", no_argument, 0, 'V'}, -+ {NULL, 0, NULL, 0} -+}; -+ -+/* Log the fact that someone has run su to the user given by PW; -+ if SUCCESSFUL is true, they gave the correct password, etc. */ -+ -+static void -+log_su (struct passwd const *pw, bool successful) -+{ -+ const char *new_user, *old_user, *tty; -+ -+ new_user = pw->pw_name; -+ /* The utmp entry (via getlogin) is probably the best way to identify -+ the user, especially if someone su's from a su-shell. */ -+ old_user = getlogin (); -+ if (!old_user) -+ { -+ /* getlogin can fail -- usually due to lack of utmp entry. -+ Resort to getpwuid. */ -+ struct passwd *pwd = getpwuid (getuid ()); -+ old_user = (pwd ? pwd->pw_name : ""); -+ } -+ tty = ttyname (STDERR_FILENO); -+ if (!tty) -+ tty = "none"; -+ -+ openlog (program_invocation_short_name, 0 , LOG_AUTH); -+ syslog (LOG_NOTICE, "%s(to %s) %s on %s", -+ successful ? "" : "FAILED SU ", -+ new_user, old_user, tty); -+ closelog (); -+} -+ -+static struct pam_conv conv = -+{ -+ misc_conv, -+ NULL -+}; -+ -+static void -+cleanup_pam (int retcode) -+{ -+ int saved_errno = errno; -+ -+ if (_pam_session_opened) -+ pam_close_session (pamh, 0); -+ -+ if (_pam_cred_established) -+ pam_setcred (pamh, PAM_DELETE_CRED | PAM_SILENT); -+ -+ pam_end(pamh, retcode); -+ -+ errno = saved_errno; -+} -+ -+/* Signal handler for parent process. */ -+static void -+su_catch_sig (int sig __attribute__((__unused__))) -+{ -+ caught_signal = true; -+} -+ -+/* Export env variables declared by PAM modules. */ -+static void -+export_pamenv (void) -+{ -+ char **env; -+ -+ /* This is a copy but don't care to free as we exec later anyways. */ -+ env = pam_getenvlist (pamh); -+ while (env && *env) -+ { -+ if (putenv (*env) != 0) -+ err (EXIT_FAILURE, NULL); -+ env++; -+ } -+} -+ -+static void -+create_watching_parent (void) -+{ -+ pid_t child; -+ sigset_t ourset; -+ int status = 0; -+ int retval; -+ -+ retval = pam_open_session (pamh, 0); -+ if (is_pam_failure(retval)) -+ { -+ cleanup_pam (retval); -+ errx (EXIT_FAILURE, _("cannot not open session: %s"), -+ pam_strerror (pamh, retval)); -+ } -+ else -+ _pam_session_opened = 1; -+ -+ child = fork (); -+ if (child == (pid_t) -1) -+ { -+ cleanup_pam (PAM_ABORT); -+ err (EXIT_FAILURE, _("cannot create child process")); -+ } -+ -+ /* the child proceeds to run the shell */ -+ if (child == 0) -+ return; -+ -+ /* In the parent watch the child. */ -+ -+ /* su without pam support does not have a helper that keeps -+ sitting on any directory so let's go to /. */ -+ if (chdir ("/") != 0) -+ warn (_("cannot change directory to %s"), "/"); -+ -+ sigfillset (&ourset); -+ if (sigprocmask (SIG_BLOCK, &ourset, NULL)) -+ { -+ warn (_("cannot block signals")); -+ caught_signal = true; -+ } -+ if (!caught_signal) -+ { -+ struct sigaction action; -+ action.sa_handler = su_catch_sig; -+ sigemptyset (&action.sa_mask); -+ action.sa_flags = 0; -+ sigemptyset (&ourset); -+ if (!same_session) -+ { -+ if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) -+ { -+ warn (_("cannot set signal handler")); -+ caught_signal = true; -+ } -+ } -+ if (!caught_signal && (sigaddset(&ourset, SIGTERM) -+ || sigaddset(&ourset, SIGALRM) -+ || sigaction(SIGTERM, &action, NULL) -+ || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) { -+ warn (_("cannot set signal handler")); -+ caught_signal = true; -+ } -+ if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) -+ || sigaction(SIGQUIT, &action, NULL))) -+ { -+ warn (_("cannot set signal handler")); -+ caught_signal = true; -+ } -+ } -+ if (!caught_signal) -+ { -+ pid_t pid; -+ for (;;) -+ { -+ pid = waitpid (child, &status, WUNTRACED); -+ -+ if (pid != (pid_t)-1 && WIFSTOPPED (status)) -+ { -+ kill (getpid (), SIGSTOP); -+ /* once we get here, we must have resumed */ -+ kill (pid, SIGCONT); -+ } -+ else -+ break; -+ } -+ if (pid != (pid_t)-1) -+ if (WIFSIGNALED (status)) -+ status = WTERMSIG (status) + 128; -+ else -+ status = WEXITSTATUS (status); -+ else -+ status = 1; -+ } -+ else -+ status = 1; -+ -+ if (caught_signal) -+ { -+ fprintf (stderr, _("\nSession terminated, killing shell...")); -+ kill (child, SIGTERM); -+ } -+ -+ cleanup_pam (PAM_SUCCESS); -+ -+ if (caught_signal) -+ { -+ sleep (2); -+ kill (child, SIGKILL); -+ fprintf (stderr, _(" ...killed.\n")); -+ } -+ exit (status); -+} -+ -+static void -+authenticate (const struct passwd *pw) -+{ -+ const struct passwd *lpw; -+ const char *cp; -+ int retval; -+ -+ retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, -+ pw->pw_name, &conv, &pamh); -+ if (is_pam_failure(retval)) -+ goto done; -+ -+ if (isatty (0) && (cp = ttyname (0)) != NULL) -+ { -+ const char *tty; -+ -+ if (strncmp (cp, "/dev/", 5) == 0) -+ tty = cp + 5; -+ else -+ tty = cp; -+ retval = pam_set_item (pamh, PAM_TTY, tty); -+ if (is_pam_failure(retval)) -+ goto done; -+ } -+ -+ lpw = getpwuid (getuid ()); -+ if (lpw && lpw->pw_name) -+ { -+ retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); -+ if (is_pam_failure(retval)) -+ goto done; -+ } -+ -+ retval = pam_authenticate (pamh, 0); -+ if (is_pam_failure(retval)) -+ goto done; -+ -+ retval = pam_acct_mgmt (pamh, 0); -+ if (retval == PAM_NEW_AUTHTOK_REQD) -+ { -+ /* Password has expired. Offer option to change it. */ -+ retval = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK); -+ } -+ -+done: -+ -+ log_su (pw, !is_pam_failure(retval)); -+ -+ if (is_pam_failure(retval)) -+ { -+ const char *msg = pam_strerror(pamh, retval); -+ pam_end(pamh, retval); -+ sleep (getlogindefs_num ("FAIL_DELAY", 1)); -+ errx (EXIT_FAILURE, "%s", msg?msg:_("incorrect password")); -+ } -+} -+ -+static void -+set_path(const struct passwd* pw) -+{ -+ int r; -+ if (pw->pw_uid) -+ r = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); -+ -+ else if ((r = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) -+ r = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); -+ -+ if (r != 0) -+ err (EXIT_FAILURE, _("failed to set PATH")); -+} -+ -+/* Update `environ' for the new shell based on PW, with SHELL being -+ the value for the SHELL environment variable. */ -+ -+static void -+modify_environment (const struct passwd *pw, const char *shell) -+{ -+ if (simulate_login) -+ { -+ /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. -+ Unset all other environment variables. */ -+ char const *term = getenv ("TERM"); -+ if (term) -+ term = xstrdup (term); -+ environ = xmalloc ((6 + !!term) * sizeof (char *)); -+ environ[0] = NULL; -+ if (term) -+ xsetenv ("TERM", term, 1); -+ xsetenv ("HOME", pw->pw_dir, 1); -+ xsetenv ("SHELL", shell, 1); -+ xsetenv ("USER", pw->pw_name, 1); -+ xsetenv ("LOGNAME", pw->pw_name, 1); -+ set_path(pw); -+ } -+ else -+ { -+ /* Set HOME, SHELL, and if not becoming a super-user, -+ USER and LOGNAME. */ -+ if (change_environment) -+ { -+ xsetenv ("HOME", pw->pw_dir, 1); -+ xsetenv ("SHELL", shell, 1); -+ if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) -+ set_path(pw); -+ -+ if (pw->pw_uid) -+ { -+ xsetenv ("USER", pw->pw_name, 1); -+ xsetenv ("LOGNAME", pw->pw_name, 1); -+ } -+ } -+ } -+ -+ export_pamenv (); -+} -+ -+/* Become the user and group(s) specified by PW. */ -+ -+static void -+init_groups (const struct passwd *pw, gid_t *groups, int num_groups) -+{ -+ int retval; -+ -+ errno = 0; -+ -+ if (num_groups) -+ retval = setgroups (num_groups, groups); -+ else -+ retval = initgroups (pw->pw_name, pw->pw_gid); -+ -+ if (retval == -1) -+ { -+ cleanup_pam (PAM_ABORT); -+ err (EXIT_FAILURE, _("cannot set groups")); -+ } -+ endgrent (); -+ -+ retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); -+ if (is_pam_failure(retval)) -+ errx (EXIT_FAILURE, "%s", pam_strerror (pamh, retval)); -+ else -+ _pam_cred_established = 1; -+} -+ -+static void -+change_identity (const struct passwd *pw) -+{ -+ if (setgid (pw->pw_gid)) -+ err (EXIT_FAILURE, _("cannot set group id")); -+ if (setuid (pw->pw_uid)) -+ err (EXIT_FAILURE, _("cannot set user id")); -+} -+ -+/* Run SHELL, or DEFAULT_SHELL if SHELL is empty. -+ If COMMAND is nonzero, pass it to the shell with the -c option. -+ Pass ADDITIONAL_ARGS to the shell as more arguments; there -+ are N_ADDITIONAL_ARGS extra arguments. */ -+ -+static void -+run_shell (char const *shell, char const *command, char **additional_args, -+ size_t n_additional_args) -+{ -+ size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; -+ char const **args = xcalloc (n_args, sizeof *args); -+ size_t argno = 1; -+ -+ if (simulate_login) -+ { -+ char *arg0; -+ char *shell_basename; -+ -+ shell_basename = basename (shell); -+ arg0 = xmalloc (strlen (shell_basename) + 2); -+ arg0[0] = '-'; -+ strcpy (arg0 + 1, shell_basename); -+ args[0] = arg0; -+ } -+ else -+ args[0] = basename (shell); -+ if (fast_startup) -+ args[argno++] = "-f"; -+ if (command) -+ { -+ args[argno++] = "-c"; -+ args[argno++] = command; -+ } -+ memcpy (args + argno, additional_args, n_additional_args * sizeof *args); -+ args[argno + n_additional_args] = NULL; -+ execv (shell, (char **) args); -+ -+ { -+ int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); -+ warn ("%s", shell); -+ exit (exit_status); -+ } -+} -+ -+/* Return true if SHELL is a restricted shell (one not returned by -+ getusershell), else false, meaning it is a standard shell. */ -+ -+static bool -+restricted_shell (const char *shell) -+{ -+ char *line; -+ -+ setusershell (); -+ while ((line = getusershell ()) != NULL) -+ { -+ if (*line != '#' && !strcmp (line, shell)) -+ { -+ endusershell (); -+ return false; -+ } -+ } -+ endusershell (); -+ return true; -+} -+ -+static void __attribute__((__noreturn__)) -+usage (int status) -+{ -+ if (status != EXIT_SUCCESS) -+ fprintf (stderr, _("Try `%s --help' for more information.\n"), -+ program_invocation_short_name); -+ else -+ { -+ fputs(USAGE_HEADER, stdout); -+ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -+ fputs (_("\n\ -+ Change the effective user id and group id to that of USER.\n\ -+ A mere - implies -l. If USER not given, assume root.\n"), stdout); -+ fputs(USAGE_OPTIONS, stdout); -+ fputs (_("\ -+ -, -l, --login make the shell a login shell\n\ -+ -c, --command pass a single command to the shell with -c\n\ -+ --session-command pass a single command to the shell with -c\n\ -+ and do not create a new session\n\ -+ -g --group=group specify the primary group\n\ -+ -G --supp-group=group specify a supplemental group\n\ -+ -f, --fast pass -f to the shell (for csh or tcsh)\n\ -+ -m, --preserve-environment do not reset environment variables\n\ -+ -p same as -m\n\ -+ -s, --shell run shell if /etc/shells allows it\n\ -+"), stdout); -+ -+ fputs(USAGE_SEPARATOR, stdout); -+ fputs(USAGE_HELP, stdout); -+ fputs(USAGE_VERSION, stdout); -+ printf(USAGE_MAN_TAIL("su(1)")); -+ } -+ exit (status); -+} -+ -+static -+void load_config(void) -+{ -+ logindefs_load_file("/etc/default/su"); -+ logindefs_load_file(_PATH_LOGINDEFS); -+} -+ -+/* -+ * Returns 1 if the current user is not root -+ */ -+static int -+evaluate_uid(void) -+{ -+ uid_t ruid = getuid(); -+ uid_t euid = geteuid(); -+ -+ /* if we're really root and aren't running setuid */ -+ return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; -+} -+ -+int -+su_main (int argc, char **argv, int mode) -+{ -+ int optc; -+ const char *new_user = DEFAULT_USER; -+ char *command = NULL; -+ int request_same_session = 0; -+ char *shell = NULL; -+ struct passwd *pw; -+ struct passwd pw_copy; -+ struct group *gr; -+ gid_t groups[NGROUPS_MAX]; -+ int num_supp_groups = 0; -+ int use_gid = 0; -+ int restricted; -+ -+ setlocale (LC_ALL, ""); -+ bindtextdomain (PACKAGE, LOCALEDIR); -+ textdomain (PACKAGE); -+ -+ su_mode = mode; -+ fast_startup = false; -+ simulate_login = false; -+ change_environment = true; -+ -+ while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) -+ { -+ switch (optc) -+ { -+ case 'c': -+ command = optarg; -+ break; -+ -+ case 'C': -+ command = optarg; -+ request_same_session = 1; -+ break; -+ -+ case 'f': -+ fast_startup = true; -+ break; -+ -+ case 'g': -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ use_gid = 1; -+ groups[0] = gr->gr_gid; -+ break; -+ -+ case 'G': -+ num_supp_groups++; -+ if (num_supp_groups >= NGROUPS_MAX) -+ errx(EXIT_FAILURE, -+ _("can't specify more than %d supplemental groups"), -+ NGROUPS_MAX - 1); -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ groups[num_supp_groups] = gr->gr_gid; -+ break; -+ -+ case 'l': -+ simulate_login = true; -+ break; -+ -+ case 'm': -+ case 'p': -+ change_environment = false; -+ break; -+ -+ case 's': -+ shell = optarg; -+ break; -+ -+ case 'h': -+ usage(0); -+ -+ case 'V': -+ printf(UTIL_LINUX_VERSION); -+ exit(EXIT_SUCCESS); -+ -+ default: -+ usage (EXIT_FAILURE); -+ } -+ } -+ -+ restricted = evaluate_uid (); -+ -+ if (optind < argc && !strcmp (argv[optind], "-")) -+ { -+ simulate_login = true; -+ ++optind; -+ } -+ if (optind < argc) -+ new_user = argv[optind++]; -+ -+ if ((num_supp_groups || use_gid) && restricted) -+ errx(EXIT_FAILURE, _("only root can specify alternative groups")); -+ -+ logindefs_load_defaults = load_config; -+ -+ pw = getpwnam (new_user); -+ if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0] -+ && pw->pw_passwd)) -+ errx (EXIT_FAILURE, _("user %s does not exist"), new_user); -+ -+ /* Make a copy of the password information and point pw at the local -+ copy instead. Otherwise, some systems (e.g. Linux) would clobber -+ the static data through the getlogin call from log_su. -+ Also, make sure pw->pw_shell is a nonempty string. -+ It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), -+ but that doesn't have a default shell listed. */ -+ pw_copy = *pw; -+ pw = &pw_copy; -+ pw->pw_name = xstrdup (pw->pw_name); -+ pw->pw_passwd = xstrdup (pw->pw_passwd); -+ pw->pw_dir = xstrdup (pw->pw_dir); -+ pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0] -+ ? pw->pw_shell -+ : DEFAULT_SHELL); -+ endpwent (); -+ -+ if (num_supp_groups && !use_gid) -+ { -+ pw->pw_gid = groups[1]; -+ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); -+ } -+ else if (use_gid) -+ { -+ pw->pw_gid = groups[0]; -+ num_supp_groups++; -+ } -+ -+ authenticate (pw); -+ -+ if (request_same_session || !command || !pw->pw_uid) -+ same_session = 1; -+ -+ if (!shell && !change_environment) -+ shell = getenv ("SHELL"); -+ if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -+ { -+ /* The user being su'd to has a nonstandard shell, and so is -+ probably a uucp account or has restricted access. Don't -+ compromise the account by allowing access with a standard -+ shell. */ -+ warnx (_("using restricted shell %s"), pw->pw_shell); -+ shell = NULL; -+ } -+ shell = xstrdup (shell ? shell : pw->pw_shell); -+ -+ init_groups (pw, groups, num_supp_groups); -+ -+ create_watching_parent (); -+ /* Now we're in the child. */ -+ -+ change_identity (pw); -+ if (!same_session) -+ setsid (); -+ -+ /* Set environment after pam_open_session, which may put KRB5CCNAME -+ into the pam_env, etc. */ -+ -+ modify_environment (pw, shell); -+ -+ if (simulate_login && chdir (pw->pw_dir) != 0) -+ warn (_("warning: cannot change directory to %s"), pw->pw_dir); -+ -+ run_shell (shell, command, argv + optind, max (0, argc - optind)); -+} -+ -+// vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 -diff --git a/login-utils/su-common.h b/login-utils/su-common.h -new file mode 100644 -index 0000000..4e4dc9d ---- /dev/null -+++ b/login-utils/su-common.h -@@ -0,0 +1,12 @@ -+#ifndef UTIL_LINUX_SU_COMMON_H -+#define UTIL_LINUX_SU_COMMON_H -+ -+enum { -+ SU_MODE, -+ RUNUSER_MODE -+}; -+ -+extern int su_main(int argc, char **argv, int mode); -+ -+#endif /* UTIL_LINUX_SU_COMMON */ -+ -diff --git a/login-utils/su.c b/login-utils/su.c -index f11c757..6179e1b 100644 ---- a/login-utils/su.c -+++ b/login-utils/su.c -@@ -1,754 +1,6 @@ --/* su for Linux. Run a shell with substitute user and group IDs. -- Copyright (C) 1992-2006 Free Software Foundation, Inc. -- Copyright (C) 2012 SUSE Linux Products GmbH, Nuernberg -+#include "su-common.h" - -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2, or (at your option) -- any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software Foundation, -- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -- --/* Run a shell with the real and effective UID and GID and groups -- of USER, default `root'. -- -- The shell run is taken from USER's password entry, /bin/sh if -- none is specified there. If the account has a password, su -- prompts for a password unless run by a user with real UID 0. -- -- Does not change the current directory. -- Sets `HOME' and `SHELL' from the password entry for USER, and if -- USER is not root, sets `USER' and `LOGNAME' to USER. -- The subshell is not a login shell. -- -- If one or more ARGs are given, they are passed as additional -- arguments to the subshell. -- -- Does not handle /bin/sh or other shells specially -- (setting argv[0] to "-su", passing -c only to certain shells, etc.). -- I don't see the point in doing that, and it's ugly. -- -- Based on an implemenation by David MacKenzie . */ -- --enum --{ -- EXIT_CANNOT_INVOKE = 126, -- EXIT_ENOENT = 127 --}; -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include "err.h" -- --#include --#include "c.h" --#include "xalloc.h" --#include "nls.h" --#include "pathnames.h" --#include "env.h" -- --/* name of the pam configuration files. separate configs for su and su - */ --#define PAM_SERVICE_NAME "su" --#define PAM_SERVICE_NAME_L "su-l" -- --#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) -- --#include "logindefs.h" -- --/* The shell to run if none is given in the user's passwd entry. */ --#define DEFAULT_SHELL "/bin/sh" -- --/* The user to become if none is specified. */ --#define DEFAULT_USER "root" -- --#ifndef HAVE_ENVIRON_DECL --extern char **environ; --#endif -- --static void run_shell (char const *, char const *, char **, size_t) -- __attribute__ ((__noreturn__)); -- --/* If true, pass the `-f' option to the subshell. */ --static bool fast_startup; -- --/* If true, simulate a login instead of just starting a shell. */ --static bool simulate_login; -- --/* If true, change some environment vars to indicate the user su'd to. */ --static bool change_environment; -- --/* If true, then don't call setsid() with a command. */ --int same_session = 0; -- --static bool _pam_session_opened; --static bool _pam_cred_established; --static sig_atomic_t volatile caught_signal = false; --static pam_handle_t *pamh = NULL; -- --static struct option const longopts[] = --{ -- {"command", required_argument, NULL, 'c'}, -- {"session-command", required_argument, NULL, 'C'}, -- {"fast", no_argument, NULL, 'f'}, -- {"login", no_argument, NULL, 'l'}, -- {"preserve-environment", no_argument, NULL, 'p'}, -- {"shell", required_argument, NULL, 's'}, -- {"group", required_argument, NULL, 'g'}, -- {"supp-group", required_argument, NULL, 'G'}, -- {"help", no_argument, 0, 'h'}, -- {"version", no_argument, 0, 'V'}, -- {NULL, 0, NULL, 0} --}; -- --/* Log the fact that someone has run su to the user given by PW; -- if SUCCESSFUL is true, they gave the correct password, etc. */ -- --static void --log_su (struct passwd const *pw, bool successful) --{ -- const char *new_user, *old_user, *tty; -- -- new_user = pw->pw_name; -- /* The utmp entry (via getlogin) is probably the best way to identify -- the user, especially if someone su's from a su-shell. */ -- old_user = getlogin (); -- if (!old_user) -- { -- /* getlogin can fail -- usually due to lack of utmp entry. -- Resort to getpwuid. */ -- struct passwd *pwd = getpwuid (getuid ()); -- old_user = (pwd ? pwd->pw_name : ""); -- } -- tty = ttyname (STDERR_FILENO); -- if (!tty) -- tty = "none"; -- -- openlog (program_invocation_short_name, 0 , LOG_AUTH); -- syslog (LOG_NOTICE, "%s(to %s) %s on %s", -- successful ? "" : "FAILED SU ", -- new_user, old_user, tty); -- closelog (); --} -- --static struct pam_conv conv = --{ -- misc_conv, -- NULL --}; -- --static void --cleanup_pam (int retcode) --{ -- int saved_errno = errno; -- -- if (_pam_session_opened) -- pam_close_session (pamh, 0); -- -- if (_pam_cred_established) -- pam_setcred (pamh, PAM_DELETE_CRED | PAM_SILENT); -- -- pam_end(pamh, retcode); -- -- errno = saved_errno; --} -- --/* Signal handler for parent process. */ --static void --su_catch_sig (int sig __attribute__((__unused__))) --{ -- caught_signal = true; --} -- --/* Export env variables declared by PAM modules. */ --static void --export_pamenv (void) --{ -- char **env; -- -- /* This is a copy but don't care to free as we exec later anyways. */ -- env = pam_getenvlist (pamh); -- while (env && *env) -- { -- if (putenv (*env) != 0) -- err (EXIT_FAILURE, NULL); -- env++; -- } --} -- --static void --create_watching_parent (void) --{ -- pid_t child; -- sigset_t ourset; -- int status = 0; -- int retval; -- -- retval = pam_open_session (pamh, 0); -- if (is_pam_failure(retval)) -- { -- cleanup_pam (retval); -- errx (EXIT_FAILURE, _("cannot not open session: %s"), -- pam_strerror (pamh, retval)); -- } -- else -- _pam_session_opened = 1; -- -- child = fork (); -- if (child == (pid_t) -1) -- { -- cleanup_pam (PAM_ABORT); -- err (EXIT_FAILURE, _("cannot create child process")); -- } -- -- /* the child proceeds to run the shell */ -- if (child == 0) -- return; -- -- /* In the parent watch the child. */ -- -- /* su without pam support does not have a helper that keeps -- sitting on any directory so let's go to /. */ -- if (chdir ("/") != 0) -- warn (_("cannot change directory to %s"), "/"); -- -- sigfillset (&ourset); -- if (sigprocmask (SIG_BLOCK, &ourset, NULL)) -- { -- warn (_("cannot block signals")); -- caught_signal = true; -- } -- if (!caught_signal) -- { -- struct sigaction action; -- action.sa_handler = su_catch_sig; -- sigemptyset (&action.sa_mask); -- action.sa_flags = 0; -- sigemptyset (&ourset); -- if (!same_session) -- { -- if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) -- { -- warn (_("cannot set signal handler")); -- caught_signal = true; -- } -- } -- if (!caught_signal && (sigaddset(&ourset, SIGTERM) -- || sigaddset(&ourset, SIGALRM) -- || sigaction(SIGTERM, &action, NULL) -- || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) { -- warn (_("cannot set signal handler")); -- caught_signal = true; -- } -- if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) -- || sigaction(SIGQUIT, &action, NULL))) -- { -- warn (_("cannot set signal handler")); -- caught_signal = true; -- } -- } -- if (!caught_signal) -- { -- pid_t pid; -- for (;;) -- { -- pid = waitpid (child, &status, WUNTRACED); -- -- if (pid != (pid_t)-1 && WIFSTOPPED (status)) -- { -- kill (getpid (), SIGSTOP); -- /* once we get here, we must have resumed */ -- kill (pid, SIGCONT); -- } -- else -- break; -- } -- if (pid != (pid_t)-1) -- if (WIFSIGNALED (status)) -- status = WTERMSIG (status) + 128; -- else -- status = WEXITSTATUS (status); -- else -- status = 1; -- } -- else -- status = 1; -- -- if (caught_signal) -- { -- fprintf (stderr, _("\nSession terminated, killing shell...")); -- kill (child, SIGTERM); -- } -- -- cleanup_pam (PAM_SUCCESS); -- -- if (caught_signal) -- { -- sleep (2); -- kill (child, SIGKILL); -- fprintf (stderr, _(" ...killed.\n")); -- } -- exit (status); --} -- --static void --authenticate (const struct passwd *pw) -+int main (int argc, char **argv) - { -- const struct passwd *lpw; -- const char *cp; -- int retval; -- -- retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, -- pw->pw_name, &conv, &pamh); -- if (is_pam_failure(retval)) -- goto done; -- -- if (isatty (0) && (cp = ttyname (0)) != NULL) -- { -- const char *tty; -- -- if (strncmp (cp, "/dev/", 5) == 0) -- tty = cp + 5; -- else -- tty = cp; -- retval = pam_set_item (pamh, PAM_TTY, tty); -- if (is_pam_failure(retval)) -- goto done; -- } -- -- lpw = getpwuid (getuid ()); -- if (lpw && lpw->pw_name) -- { -- retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); -- if (is_pam_failure(retval)) -- goto done; -- } -- -- retval = pam_authenticate (pamh, 0); -- if (is_pam_failure(retval)) -- goto done; -- -- retval = pam_acct_mgmt (pamh, 0); -- if (retval == PAM_NEW_AUTHTOK_REQD) -- { -- /* Password has expired. Offer option to change it. */ -- retval = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK); -- } -- --done: -- -- log_su (pw, !is_pam_failure(retval)); -- -- if (is_pam_failure(retval)) -- { -- const char *msg = pam_strerror(pamh, retval); -- pam_end(pamh, retval); -- sleep (getlogindefs_num ("FAIL_DELAY", 1)); -- errx (EXIT_FAILURE, "%s", msg?msg:_("incorrect password")); -- } -+ return su_main(argc, argv, SU_MODE); - } -- --static void --set_path(const struct passwd* pw) --{ -- int r; -- if (pw->pw_uid) -- r = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); -- -- else if ((r = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) -- r = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); -- -- if (r != 0) -- err (EXIT_FAILURE, _("failed to set PATH")); --} -- --/* Update `environ' for the new shell based on PW, with SHELL being -- the value for the SHELL environment variable. */ -- --static void --modify_environment (const struct passwd *pw, const char *shell) --{ -- if (simulate_login) -- { -- /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. -- Unset all other environment variables. */ -- char const *term = getenv ("TERM"); -- if (term) -- term = xstrdup (term); -- environ = xmalloc ((6 + !!term) * sizeof (char *)); -- environ[0] = NULL; -- if (term) -- xsetenv ("TERM", term, 1); -- xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -- xsetenv ("USER", pw->pw_name, 1); -- xsetenv ("LOGNAME", pw->pw_name, 1); -- set_path(pw); -- } -- else -- { -- /* Set HOME, SHELL, and if not becoming a super-user, -- USER and LOGNAME. */ -- if (change_environment) -- { -- xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -- if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) -- set_path(pw); -- -- if (pw->pw_uid) -- { -- xsetenv ("USER", pw->pw_name, 1); -- xsetenv ("LOGNAME", pw->pw_name, 1); -- } -- } -- } -- -- export_pamenv (); --} -- --/* Become the user and group(s) specified by PW. */ -- --static void --init_groups (const struct passwd *pw, gid_t *groups, int num_groups) --{ -- int retval; -- -- errno = 0; -- -- if (num_groups) -- retval = setgroups (num_groups, groups); -- else -- retval = initgroups (pw->pw_name, pw->pw_gid); -- -- if (retval == -1) -- { -- cleanup_pam (PAM_ABORT); -- err (EXIT_FAILURE, _("cannot set groups")); -- } -- endgrent (); -- -- retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); -- if (is_pam_failure(retval)) -- errx (EXIT_FAILURE, "%s", pam_strerror (pamh, retval)); -- else -- _pam_cred_established = 1; --} -- --static void --change_identity (const struct passwd *pw) --{ -- if (setgid (pw->pw_gid)) -- err (EXIT_FAILURE, _("cannot set group id")); -- if (setuid (pw->pw_uid)) -- err (EXIT_FAILURE, _("cannot set user id")); --} -- --/* Run SHELL, or DEFAULT_SHELL if SHELL is empty. -- If COMMAND is nonzero, pass it to the shell with the -c option. -- Pass ADDITIONAL_ARGS to the shell as more arguments; there -- are N_ADDITIONAL_ARGS extra arguments. */ -- --static void --run_shell (char const *shell, char const *command, char **additional_args, -- size_t n_additional_args) --{ -- size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; -- char const **args = xcalloc (n_args, sizeof *args); -- size_t argno = 1; -- -- if (simulate_login) -- { -- char *arg0; -- char *shell_basename; -- -- shell_basename = basename (shell); -- arg0 = xmalloc (strlen (shell_basename) + 2); -- arg0[0] = '-'; -- strcpy (arg0 + 1, shell_basename); -- args[0] = arg0; -- } -- else -- args[0] = basename (shell); -- if (fast_startup) -- args[argno++] = "-f"; -- if (command) -- { -- args[argno++] = "-c"; -- args[argno++] = command; -- } -- memcpy (args + argno, additional_args, n_additional_args * sizeof *args); -- args[argno + n_additional_args] = NULL; -- execv (shell, (char **) args); -- -- { -- int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); -- warn ("%s", shell); -- exit (exit_status); -- } --} -- --/* Return true if SHELL is a restricted shell (one not returned by -- getusershell), else false, meaning it is a standard shell. */ -- --static bool --restricted_shell (const char *shell) --{ -- char *line; -- -- setusershell (); -- while ((line = getusershell ()) != NULL) -- { -- if (*line != '#' && !strcmp (line, shell)) -- { -- endusershell (); -- return false; -- } -- } -- endusershell (); -- return true; --} -- --static void __attribute__((__noreturn__)) --usage (int status) --{ -- if (status != EXIT_SUCCESS) -- fprintf (stderr, _("Try `%s --help' for more information.\n"), -- program_invocation_short_name); -- else -- { -- fputs(USAGE_HEADER, stdout); -- printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -- fputs (_("\n\ -- Change the effective user id and group id to that of USER.\n\ -- A mere - implies -l. If USER not given, assume root.\n"), stdout); -- fputs(USAGE_OPTIONS, stdout); -- fputs (_("\ -- -, -l, --login make the shell a login shell\n\ -- -c, --command pass a single command to the shell with -c\n\ -- --session-command pass a single command to the shell with -c\n\ -- and do not create a new session\n\ -- -g --group=group specify the primary group\n\ -- -G --supp-group=group specify a supplemental group\n\ -- -f, --fast pass -f to the shell (for csh or tcsh)\n\ -- -m, --preserve-environment do not reset environment variables\n\ -- -p same as -m\n\ -- -s, --shell run shell if /etc/shells allows it\n\ --"), stdout); -- -- fputs(USAGE_SEPARATOR, stdout); -- fputs(USAGE_HELP, stdout); -- fputs(USAGE_VERSION, stdout); -- printf(USAGE_MAN_TAIL("su(1)")); -- } -- exit (status); --} -- --static --void load_config(void) --{ -- logindefs_load_file("/etc/default/su"); -- logindefs_load_file(_PATH_LOGINDEFS); --} -- --/* -- * Returns 1 if the current user is not root -- */ --static int --evaluate_uid(void) --{ -- uid_t ruid = getuid(); -- uid_t euid = geteuid(); -- -- /* if we're really root and aren't running setuid */ -- return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; --} -- --int --main (int argc, char **argv) --{ -- int optc; -- const char *new_user = DEFAULT_USER; -- char *command = NULL; -- int request_same_session = 0; -- char *shell = NULL; -- struct passwd *pw; -- struct passwd pw_copy; -- struct group *gr; -- gid_t groups[NGROUPS_MAX]; -- int num_supp_groups = 0; -- int use_gid = 0; -- int restricted; -- -- setlocale (LC_ALL, ""); -- bindtextdomain (PACKAGE, LOCALEDIR); -- textdomain (PACKAGE); -- -- fast_startup = false; -- simulate_login = false; -- change_environment = true; -- -- while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) -- { -- switch (optc) -- { -- case 'c': -- command = optarg; -- break; -- -- case 'C': -- command = optarg; -- request_same_session = 1; -- break; -- -- case 'f': -- fast_startup = true; -- break; -- -- case 'g': -- gr = getgrnam(optarg); -- if (!gr) -- errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -- use_gid = 1; -- groups[0] = gr->gr_gid; -- break; -- -- case 'G': -- num_supp_groups++; -- if (num_supp_groups >= NGROUPS_MAX) -- errx(EXIT_FAILURE, -- _("can't specify more than %d supplemental groups"), -- NGROUPS_MAX - 1); -- gr = getgrnam(optarg); -- if (!gr) -- errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -- groups[num_supp_groups] = gr->gr_gid; -- break; -- -- case 'l': -- simulate_login = true; -- break; -- -- case 'm': -- case 'p': -- change_environment = false; -- break; -- -- case 's': -- shell = optarg; -- break; -- -- case 'h': -- usage(0); -- -- case 'V': -- printf(UTIL_LINUX_VERSION); -- exit(EXIT_SUCCESS); -- -- default: -- usage (EXIT_FAILURE); -- } -- } -- -- restricted = evaluate_uid (); -- -- if (optind < argc && !strcmp (argv[optind], "-")) -- { -- simulate_login = true; -- ++optind; -- } -- if (optind < argc) -- new_user = argv[optind++]; -- -- if ((num_supp_groups || use_gid) && restricted) -- errx(EXIT_FAILURE, _("only root can specify alternative groups")); -- -- logindefs_load_defaults = load_config; -- -- pw = getpwnam (new_user); -- if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0] -- && pw->pw_passwd)) -- errx (EXIT_FAILURE, _("user %s does not exist"), new_user); -- -- /* Make a copy of the password information and point pw at the local -- copy instead. Otherwise, some systems (e.g. Linux) would clobber -- the static data through the getlogin call from log_su. -- Also, make sure pw->pw_shell is a nonempty string. -- It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), -- but that doesn't have a default shell listed. */ -- pw_copy = *pw; -- pw = &pw_copy; -- pw->pw_name = xstrdup (pw->pw_name); -- pw->pw_passwd = xstrdup (pw->pw_passwd); -- pw->pw_dir = xstrdup (pw->pw_dir); -- pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0] -- ? pw->pw_shell -- : DEFAULT_SHELL); -- endpwent (); -- -- if (num_supp_groups && !use_gid) -- { -- pw->pw_gid = groups[1]; -- memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); -- } -- else if (use_gid) -- { -- pw->pw_gid = groups[0]; -- num_supp_groups++; -- } -- -- authenticate (pw); -- -- if (request_same_session || !command || !pw->pw_uid) -- same_session = 1; -- -- if (!shell && !change_environment) -- shell = getenv ("SHELL"); -- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -- { -- /* The user being su'd to has a nonstandard shell, and so is -- probably a uucp account or has restricted access. Don't -- compromise the account by allowing access with a standard -- shell. */ -- warnx (_("using restricted shell %s"), pw->pw_shell); -- shell = NULL; -- } -- shell = xstrdup (shell ? shell : pw->pw_shell); -- -- init_groups (pw, groups, num_supp_groups); -- -- create_watching_parent (); -- /* Now we're in the child. */ -- -- change_identity (pw); -- if (!same_session) -- setsid (); -- -- /* Set environment after pam_open_session, which may put KRB5CCNAME -- into the pam_env, etc. */ -- -- modify_environment (pw, shell); -- -- if (simulate_login && chdir (pw->pw_dir) != 0) -- warn (_("warning: cannot change directory to %s"), pw->pw_dir); -- -- run_shell (shell, command, argv + optind, max (0, argc - optind)); --} -- --// vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 --- -1.7.11.7 - diff --git a/0202-runuser-new-command-derived-from-su-1.patch b/0202-runuser-new-command-derived-from-su-1.patch deleted file mode 100644 index 7282092..0000000 --- a/0202-runuser-new-command-derived-from-su-1.patch +++ /dev/null @@ -1,450 +0,0 @@ -From d8c2f623ab9d9e7da1490244cb8c77c3017545dc Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 29 Aug 2012 17:34:26 +0200 -Subject: [PATCH 202/208] runuser: new command (derived from su(1)) - - This command is based on su(1), the differences: - - - based on Fedora runuser su(1) patch - - not installed with suid rights - - allowed for root users only - - don't ask for password - - uses PAM session, for example: - -$ cat /etc/pam.d/runuser -auth sufficient pam_rootok.so -session optional pam_keyinit.so revoke -session required pam_limits.so -session required pam_unix.so - -$ cat /etc/pam.d/runuser-l -auth include runuser -session optional pam_keyinit.so force revoke -session include runuser - -Signed-off-by: Karel Zak ---- - .gitignore | 1 + - configure.ac | 9 ++ - login-utils/Makemodule.am | 13 +++ - login-utils/runuser.1 | 230 ++++++++++++++++++++++++++++++++++++++++++++++ - login-utils/runuser.c | 7 ++ - login-utils/su-common.c | 51 ++++++++-- - 6 files changed, 303 insertions(+), 8 deletions(-) - create mode 100644 login-utils/runuser.1 - create mode 100644 login-utils/runuser.c - -#diff --git a/.gitignore b/.gitignore -#index fbc5636..5be008f 100644 -#--- a/.gitignore -#+++ b/.gitignore -#@@ -138,6 +138,7 @@ tests/run.sh.trs -# /resizepart -# /rev -# /rtcwake -#+/runuser -# /sample-mkfs -# /sample-partitions -# /sample-superblocks -diff --git a/configure.ac b/configure.ac -index 87e85fa..83ef6ce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1149,6 +1149,15 @@ UL_REQUIRES_HAVE([su], [security_pam_misc_h], [PAM header file]) - AM_CONDITIONAL(BUILD_SU, test "x$build_su" = xyes) - - -+AC_ARG_ENABLE([runuser], -+ AS_HELP_STRING([--disable-runuser], [do not build runuser]), -+ [], enable_runuser=yes -+) -+UL_BUILD_INIT([runuser]) -+UL_REQUIRES_HAVE([runuser], [security_pam_misc_h], [PAM header file]) -+AM_CONDITIONAL(BUILD_RUNUSER, test "x$build_runuser" = xyes) -+ -+ - AC_ARG_ENABLE([schedutils], - AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]), - [], enable_schedutils=yes -diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am -index b918f00..e26d9a7 100644 ---- a/login-utils/Makemodule.am -+++ b/login-utils/Makemodule.am -@@ -93,6 +93,19 @@ su_LDADD = $(LDADD) -lpam -lpam_misc - endif - - -+if BUILD_RUNUSER -+bin_PROGRAMS += runuser -+dist_man_MANS += login-utils/runuser.1 -+runuser_SOURCES = \ -+ login-utils/runuser.c \ -+ login-utils/su-common.c \ -+ login-utils/su-common.h \ -+ login-utils/logindefs.c \ -+ login-utils/logindefs.h -+runuser_LDADD = $(LDADD) -lpam -lpam_misc -+endif -+ -+ - if BUILD_NEWGRP - usrbin_exec_PROGRAMS += newgrp - dist_man_MANS += login-utils/newgrp.1 -diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 -new file mode 100644 -index 0000000..66ad1c4 ---- /dev/null -+++ b/login-utils/runuser.1 -@@ -0,0 +1,230 @@ -+.TH RUNUSER "1" "August 2012" "util-linux" "User Commands" -+.SH NAME -+runuser \- run a command with substitute user and group ID -+.SH SYNOPSIS -+.B runuser -+[options...] [\-] [user [args...]] -+.SH DESCRIPTION -+.B runuser -+allows to run commands with substitute user and group ID. -+The difference between the commands -+.B runuser -+and -+.B su -+is that -+.B runuser -+does not ask for password, because it may be executed by root user only. -+The command -+.B runuser -+does not have to be installed with suid permissions. -+.PP -+When called without arguments -+.B runuser -+defaults to running an interactive shell as -+.IR root . -+.PP -+For backward compatibility -+.B runuser -+defaults to not change the current directory and to only set the -+environment variables -+.B HOME -+and -+.B SHELL -+(plus -+.B USER -+and -+.B LOGNAME -+if the target -+.I user -+is not root). It is recommended to always use the -+.B \-\-login -+option (instead it's shortcut -+.BR \- ) -+to avoid side effects caused by mixing environments. -+.PP -+This version of -+.B runuser -+uses PAM for session management. -+.SH OPTIONS -+.TP -+\fB\-c\fR \fIcommand\fR, \fB\-\-command\fR=\fIcommand\fR -+Pass -+.I command -+to the shell with the -+.B \-c -+option. -+.TP -+\fB\-\-session\-command\fR=\fIcommand\fR -+Same as -+.B \-c -+but do not create a new session (discouraged). -+.TP -+\fB\-f\fR, \fB\-\-fast\fR -+Pass -+.B \-f -+to the shell which may or may not be useful depending on the -+shell. -+.TP -+\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR -+specify the primary group, this option is allowed for root user only -+.TP -+\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR -+specify a supplemental group, this option is allowed for root user only -+.TP -+\fB\-\fR, \fB\-l\fR, \fB\-\-login\fR -+Starts the shell as login shell with an environment similar to a real -+login: -+.RS 10 -+.TP -+o -+clears all environment variables except for -+.B TERM -+.TP -+o -+initializes the environment variables -+.BR HOME , -+.BR SHELL , -+.BR USER , -+.BR LOGNAME , -+.B PATH -+.TP -+o -+changes to the target user's home directory -+.TP -+o -+sets argv[0] of the shell to -+.RB ' \- ' -+in order to make the shell a login shell -+.RE -+.TP -+\fB\-m\fR, \fB\-p\fR, \fB\-\-preserve-environment\fR -+Preserves the whole environment, ie does not set -+.BR HOME , -+.BR SHELL , -+.B USER -+nor -+.BR LOGNAME . -+.TP -+\fB\-s\fR \fISHELL\fR, \fB\-\-shell\fR=\fISHELL\fR -+Runs the specified shell instead of the default. The shell to run is -+selected according to the following rules in order: -+.RS 10 -+.TP -+o -+the shell specified with -+.B \-\-shell -+.TP -+o -+The shell specified in the environment variable -+.B SHELL -+if the -+.B \-\-preserve-environment -+option is used. -+.TP -+o -+the shell listed in the passwd entry of the target user -+.TP -+o -+/bin/sh -+.RE -+.IP -+If the target user has a restricted shell (i.e. not listed in -+/etc/shells) the -+.B \-\-shell -+option and the -+.B SHELL -+environment variables are ignored unless the calling user is root. -+.TP -+\fB\-\-help\fR -+Display help text and exit. -+.TP -+\fB\-\-version\fR -+Display version information and exit. -+.SH CONFIG FILES -+.B runuser -+reads the -+.I /etc/default/runuser -+and -+.I /etc/login.defs -+configuration files. The following configuration items are relevant -+for -+.BR runuser : -+.PP -+.B ENV_PATH -+(string) -+.RS 4 -+Defines the PATH environment variable for a regular user. The -+default value is -+.IR /usr/local/bin:\:/bin:\:/usr/bin . -+.RE -+.PP -+.B ENV_ROOTPATH -+(string) -+.br -+.B ENV_SUPATH -+(string) -+.RS 4 -+Defines the PATH environment variable for root. The default value is -+.IR /usr/local/sbin:\:/usr/local/bin:\:/sbin:\:/bin:\:/usr/sbin:\:/usr/bin . -+.RE -+.PP -+.B ALWAYS_SET_PATH -+(boolean) -+.RS 4 -+If set to -+.I yes -+and \-\-login and \-\-preserve\-environment were not specified -+.B runuser -+initializes -+.BR PATH . -+.RE -+.SH EXIT STATUS -+.B runuser -+normally returns the exit status of the command it executed. If the -+command was killed by a signal, -+.B runuser -+returns the number of the signal plus 128. -+.PP -+Exit status generated by -+.B runuser -+itself: -+.RS 10 -+.TP -+1 -+Generic error before executing the requested command -+.TP -+126 -+The requested command could not be executed -+.TP -+127 -+The requested command could was not found -+.RE -+.SH FILES -+.PD 0 -+.TP 17 -+/etc/pam.d/runuser -+default PAM configuration file -+.TP -+/etc/pam.d/runuser-l -+PAM configuration file if \-\-login is specified -+.TP -+/etc/default/runuser -+runuser specific logindef config file -+.TP -+/etc/login.defs -+global logindef config file -+.PD 1 -+.SH "SEE ALSO" -+.BR pam (8), -+.BR shells (5), -+.BR login.defs (5), -+.BR su (1) -+.SH AUTHOR -+Derived from coreutils' su which was based on an implemenation from -+David MacKenzie and Fedora runuser command from Dan Walsh. -+.SH AVAILABILITY -+The runuser command is part of the util-linux package and is -+available from -+.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ -+Linux Kernel Archive -+.UE . -diff --git a/login-utils/runuser.c b/login-utils/runuser.c -new file mode 100644 -index 0000000..d4f37f4 ---- /dev/null -+++ b/login-utils/runuser.c -@@ -0,0 +1,7 @@ -+ -+#include "su-common.h" -+ -+int main(int argc, char **argv) -+{ -+ return su_main(argc, argv, RUNUSER_MODE); -+} -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index f1f46aa..770f455 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -65,8 +65,14 @@ enum - #include "env.h" - - /* name of the pam configuration files. separate configs for su and su - */ --#define PAM_SERVICE_NAME "su" --#define PAM_SERVICE_NAME_L "su-l" -+#define PAM_SRVNAME_SU "su" -+#define PAM_SRVNAME_SU_L "su-l" -+ -+#define PAM_SRVNAME_RUNUSER "runuser" -+#define PAM_SRVNAME_RUNUSER_L "runuser-l" -+ -+#define _PATH_LOGINDEFS_SU "/etc/defaults/su" -+#define _PATH_LOGINDEFS_RUNUSER "/etc/defaults/runuser" - - #define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) - -@@ -106,6 +112,8 @@ static bool _pam_cred_established; - static sig_atomic_t volatile caught_signal = false; - static pam_handle_t *pamh = NULL; - -+static int restricted = 1; /* zero for root user */ -+ - static struct option const longopts[] = - { - {"command", required_argument, NULL, 'c'}, -@@ -146,7 +154,8 @@ log_su (struct passwd const *pw, bool successful) - - openlog (program_invocation_short_name, 0 , LOG_AUTH); - syslog (LOG_NOTICE, "%s(to %s) %s on %s", -- successful ? "" : "FAILED SU ", -+ successful ? "" : -+ su_mode == RUNUSER_MODE ? "FAILED RUNUSER " : "FAILED SU ", - new_user, old_user, tty); - closelog (); - } -@@ -315,11 +324,19 @@ static void - authenticate (const struct passwd *pw) - { - const struct passwd *lpw; -- const char *cp; -+ const char *cp, *srvname = NULL; - int retval; - -- retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, -- pw->pw_name, &conv, &pamh); -+ switch (su_mode) { -+ case SU_MODE: -+ srvname = simulate_login ? PAM_SRVNAME_SU_L : PAM_SRVNAME_SU; -+ break; -+ case RUNUSER_MODE: -+ srvname = simulate_login ? PAM_SRVNAME_RUNUSER_L : PAM_SRVNAME_RUNUSER; -+ break; -+ } -+ -+ retval = pam_start (srvname, pw->pw_name, &conv, &pamh); - if (is_pam_failure(retval)) - goto done; - -@@ -344,6 +361,17 @@ authenticate (const struct passwd *pw) - goto done; - } - -+ if (su_mode == RUNUSER_MODE) -+ { -+ /* -+ * This is the only difference between runuser(1) and su(1). The command -+ * runuser(1) does not required authentication, because user is root. -+ */ -+ if (restricted) -+ errx(EXIT_FAILURE, _("may not be used by non-root users")); -+ return; -+ } -+ - retval = pam_authenticate (pamh, 0); - if (is_pam_failure(retval)) - goto done; -@@ -567,7 +595,15 @@ usage (int status) - static - void load_config(void) - { -- logindefs_load_file("/etc/default/su"); -+ switch (su_mode) { -+ case SU_MODE: -+ logindefs_load_file(_PATH_LOGINDEFS_SU); -+ break; -+ case RUNUSER_MODE: -+ logindefs_load_file(_PATH_LOGINDEFS_RUNUSER); -+ break; -+ } -+ - logindefs_load_file(_PATH_LOGINDEFS); - } - -@@ -598,7 +634,6 @@ su_main (int argc, char **argv, int mode) - gid_t groups[NGROUPS_MAX]; - int num_supp_groups = 0; - int use_gid = 0; -- int restricted; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); --- -1.7.11.7 - diff --git a/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch b/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch deleted file mode 100644 index 2ab11bc..0000000 --- a/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 8f33f59e72bef913068f9a80338f12d8d4434010 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Sep 2012 11:13:34 +0200 -Subject: [PATCH 203/208] su: more robust getpwuid() for GNU Hurt [coreutils - 71b7ddc] - -Let's support GNU Hurd over-engineering where a process can exist -without UID and getuid() returns -1 and sets errno. - -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 26 +++++++++++++++++++++++--- - 1 file changed, 23 insertions(+), 3 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 770f455..a253dda 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -129,6 +129,26 @@ static struct option const longopts[] = - {NULL, 0, NULL, 0} - }; - -+ -+static struct passwd * -+current_getpwuid(void) -+{ -+ uid_t ruid; -+ -+ /* GNU Hurd implementation has an extension where a process can exist in a -+ * non-conforming environment, and thus be outside the realms of POSIX -+ * process identifiers; on this platform, getuid() fails with a status of -+ * (uid_t)(-1) and sets errno if a program is run from a non-conforming -+ * environment. -+ * -+ * http://austingroupbugs.net/view.php?id=511 -+ */ -+ errno = 0; -+ ruid = getuid (); -+ -+ return errno == 0 ? getpwuid (ruid) : NULL; -+} -+ - /* Log the fact that someone has run su to the user given by PW; - if SUCCESSFUL is true, they gave the correct password, etc. */ - -@@ -145,8 +165,8 @@ log_su (struct passwd const *pw, bool successful) - { - /* getlogin can fail -- usually due to lack of utmp entry. - Resort to getpwuid. */ -- struct passwd *pwd = getpwuid (getuid ()); -- old_user = (pwd ? pwd->pw_name : ""); -+ struct passwd *pwd = current_getpwuid(); -+ old_user = pwd ? pwd->pw_name : ""; - } - tty = ttyname (STDERR_FILENO); - if (!tty) -@@ -353,7 +373,7 @@ authenticate (const struct passwd *pw) - goto done; - } - -- lpw = getpwuid (getuid ()); -+ lpw = current_getpwuid (); - if (lpw && lpw->pw_name) - { - retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); --- -1.7.11.7 - diff --git a/0204-su-verify-writing-to-streams-was-successful.patch b/0204-su-verify-writing-to-streams-was-successful.patch deleted file mode 100644 index 4418ff5..0000000 --- a/0204-su-verify-writing-to-streams-was-successful.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 589e24a625c5e83805e95b917eaf3bf1be64369e Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Sep 2012 11:21:07 +0200 -Subject: [PATCH 204/208] su: verify writing to streams was successful - -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index a253dda..1f97328 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -63,6 +63,7 @@ enum - #include "nls.h" - #include "pathnames.h" - #include "env.h" -+#include "closestream.h" - - /* name of the pam configuration files. separate configs for su and su - */ - #define PAM_SRVNAME_SU "su" -@@ -658,6 +659,7 @@ su_main (int argc, char **argv, int mode) - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); -+ atexit(close_stdout); - - su_mode = mode; - fast_startup = false; --- -1.7.11.7 - diff --git a/0205-su-move-long-options-to-main.patch b/0205-su-move-long-options-to-main.patch deleted file mode 100644 index ed57c5d..0000000 --- a/0205-su-move-long-options-to-main.patch +++ /dev/null @@ -1,60 +0,0 @@ -From bea3752e9d048895b6750e2d0d8ce72fed20cef9 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Sep 2012 11:26:20 +0200 -Subject: [PATCH 205/208] su: move long options to main() - -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 1f97328..778738f 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -115,21 +115,6 @@ static pam_handle_t *pamh = NULL; - - static int restricted = 1; /* zero for root user */ - --static struct option const longopts[] = --{ -- {"command", required_argument, NULL, 'c'}, -- {"session-command", required_argument, NULL, 'C'}, -- {"fast", no_argument, NULL, 'f'}, -- {"login", no_argument, NULL, 'l'}, -- {"preserve-environment", no_argument, NULL, 'p'}, -- {"shell", required_argument, NULL, 's'}, -- {"group", required_argument, NULL, 'g'}, -- {"supp-group", required_argument, NULL, 'G'}, -- {"help", no_argument, 0, 'h'}, -- {"version", no_argument, 0, 'V'}, -- {NULL, 0, NULL, 0} --}; -- - - static struct passwd * - current_getpwuid(void) -@@ -656,6 +641,20 @@ su_main (int argc, char **argv, int mode) - int num_supp_groups = 0; - int use_gid = 0; - -+ static const struct option longopts[] = { -+ {"command", required_argument, NULL, 'c'}, -+ {"session-command", required_argument, NULL, 'C'}, -+ {"fast", no_argument, NULL, 'f'}, -+ {"login", no_argument, NULL, 'l'}, -+ {"preserve-environment", no_argument, NULL, 'p'}, -+ {"shell", required_argument, NULL, 's'}, -+ {"group", required_argument, NULL, 'g'}, -+ {"supp-group", required_argument, NULL, 'G'}, -+ {"help", no_argument, 0, 'h'}, -+ {"version", no_argument, 0, 'V'}, -+ {NULL, 0, NULL, 0} -+ }; -+ - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); --- -1.7.11.7 - diff --git a/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch b/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch deleted file mode 100644 index ffb3df8..0000000 --- a/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1fe22a730b1a6595c6da9ea8cd58594337e66dc3 Mon Sep 17 00:00:00 2001 -From: Ondrej Oprala -Date: Tue, 11 Sep 2012 16:39:17 +0200 -Subject: [PATCH 206/208] su: add segmentation fault reporting of the child - process -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Child processes that ended with segmentation fault previously -indicated this with return status only. The report is now more -verbose if core dump is allowed. - -Improved-by: Pádraig Brady -Signed-off-by: Ondrej Oprala ---- - login-utils/su-common.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 778738f..118e080 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -300,7 +300,12 @@ create_watching_parent (void) - } - if (pid != (pid_t)-1) - if (WIFSIGNALED (status)) -- status = WTERMSIG (status) + 128; -+ { -+ status = WTERMSIG (status) + 128; -+ if (WCOREDUMP (status)) -+ fprintf (stderr, _("%s (core dumped)\n"), -+ strsignal (WTERMSIG (status))); -+ } - else - status = WEXITSTATUS (status); - else --- -1.7.11.7 - diff --git a/0207-su-fixed-a-typo-in-pam-error-message.patch b/0207-su-fixed-a-typo-in-pam-error-message.patch deleted file mode 100644 index f5c19d6..0000000 --- a/0207-su-fixed-a-typo-in-pam-error-message.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2f3cb337e1cda9e897480f256453f369914380b3 Mon Sep 17 00:00:00 2001 -From: Vitezslav Cizek -Date: Mon, 1 Oct 2012 14:48:16 +0200 -Subject: [PATCH 207/208] su: fixed a typo in pam error message - -Signed-off-by: Vitezslav Cizek ---- - login-utils/su-common.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 118e080..ea6864e 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -223,7 +223,7 @@ create_watching_parent (void) - if (is_pam_failure(retval)) - { - cleanup_pam (retval); -- errx (EXIT_FAILURE, _("cannot not open session: %s"), -+ errx (EXIT_FAILURE, _("cannot open session: %s"), - pam_strerror (pamh, retval)); - } - else --- -1.7.11.7 - diff --git a/0208-runuser-add-u-to-not-execute-shell.patch b/0208-runuser-add-u-to-not-execute-shell.patch deleted file mode 100644 index 5085956..0000000 --- a/0208-runuser-add-u-to-not-execute-shell.patch +++ /dev/null @@ -1,281 +0,0 @@ -From f0c57c2b1129b17e68e54d08421d1f209f1b6c57 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 13 Sep 2012 11:58:00 +0200 -Subject: [PATCH 208/208] runuser: add -u to not execute shell - -Signed-off-by: Karel Zak ---- - login-utils/runuser.1 | 20 ++++--- - login-utils/su-common.c | 138 +++++++++++++++++++++++++++++++----------------- - login-utils/su.1 | 1 + - 3 files changed, 105 insertions(+), 54 deletions(-) - -diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 -index 66ad1c4..4620165 100644 ---- a/login-utils/runuser.1 -+++ b/login-utils/runuser.1 -@@ -3,10 +3,21 @@ - runuser \- run a command with substitute user and group ID - .SH SYNOPSIS - .B runuser --[options...] [\-] [user [args...]] -+[options] -u -+.IR user -+.IR "command " [ argument ...] -+.LP -+.B runuser -+[options] [-] -+[ -+.IR "user " [ argument ...] -+] - .SH DESCRIPTION - .B runuser - allows to run commands with substitute user and group ID. -+If the option \fB\-u\fR not given, fallback to -+.B su -+compatible semantic and shell is executed. - The difference between the commands - .B runuser - and -@@ -36,12 +47,7 @@ and - .B LOGNAME - if the target - .I user --is not root). It is recommended to always use the --.B \-\-login --option (instead it's shortcut --.BR \- ) --to avoid side effects caused by mixing environments. --.PP -+is not root). - This version of - .B runuser - uses PAM for session management. -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index ea6864e..4e1f6b2 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -439,7 +439,8 @@ modify_environment (const struct passwd *pw, const char *shell) - if (term) - xsetenv ("TERM", term, 1); - xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -+ if (shell) -+ xsetenv ("SHELL", shell, 1); - xsetenv ("USER", pw->pw_name, 1); - xsetenv ("LOGNAME", pw->pw_name, 1); - set_path(pw); -@@ -451,7 +452,8 @@ modify_environment (const struct passwd *pw, const char *shell) - if (change_environment) - { - xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -+ if (shell) -+ xsetenv ("SHELL", shell, 1); - if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) - set_path(pw); - -@@ -571,35 +573,47 @@ restricted_shell (const char *shell) - static void __attribute__((__noreturn__)) - usage (int status) - { -- if (status != EXIT_SUCCESS) -- fprintf (stderr, _("Try `%s --help' for more information.\n"), -- program_invocation_short_name); -- else -- { -- fputs(USAGE_HEADER, stdout); -- printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -- fputs (_("\n\ -- Change the effective user id and group id to that of USER.\n\ -- A mere - implies -l. If USER not given, assume root.\n"), stdout); -- fputs(USAGE_OPTIONS, stdout); -- fputs (_("\ -- -, -l, --login make the shell a login shell\n\ -- -c, --command pass a single command to the shell with -c\n\ -- --session-command pass a single command to the shell with -c\n\ -- and do not create a new session\n\ -- -g --group=group specify the primary group\n\ -- -G --supp-group=group specify a supplemental group\n\ -- -f, --fast pass -f to the shell (for csh or tcsh)\n\ -- -m, --preserve-environment do not reset environment variables\n\ -- -p same as -m\n\ -- -s, --shell run shell if /etc/shells allows it\n\ --"), stdout); -- -- fputs(USAGE_SEPARATOR, stdout); -- fputs(USAGE_HELP, stdout); -- fputs(USAGE_VERSION, stdout); -- printf(USAGE_MAN_TAIL("su(1)")); -- } -+ if (su_mode == RUNUSER_MODE) { -+ fputs(USAGE_HEADER, stdout); -+ printf (_(" %s [options] -u COMMAND\n"), program_invocation_short_name); -+ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -+ fputs (_("\n" -+ "Run COMMAND with the effective id and group id. If -u not\n" -+ "given, fallback to su(1) compatible semantic and shell is executed.\n" -+ "The options -l, -c, -f, -s are mutually exclusive to -u.\n"), stdout); -+ -+ fputs(USAGE_OPTIONS, stdout); -+ -+ fputs (_( -+ " -u, --user username\n"), stdout); -+ -+ } else { -+ fputs(USAGE_HEADER, stdout); -+ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -+ fputs (_("\n" -+ "Change the effective user id and group id to that of USER.\n" -+ "A mere - implies -l. If USER not given, assume root.\n"), stdout); -+ -+ fputs(USAGE_OPTIONS, stdout); -+ } -+ -+ fputs (_( -+ " -m, -p, --preserve-environment do not reset environment variables\n" -+ " -g, --group specify the primary group\n" -+ " -G, --supp-group specify a supplemental group\n\n"), stdout); -+ -+ fputs (_( -+ " -, -l, --login make the shell a login shell\n" -+ " -c, --command pass a single command to the shell with -c\n" -+ " --session-command pass a single command to the shell with -c\n" -+ " and do not create a new session\n" -+ " -f, --fast pass -f to the shell (for csh or tcsh)\n" -+ " -s, --shell run shell if /etc/shells allows it\n"), stdout); -+ -+ fputs(USAGE_SEPARATOR, stdout); -+ fputs(USAGE_HELP, stdout); -+ fputs(USAGE_VERSION, stdout); -+ printf(USAGE_MAN_TAIL(su_mode == SU_MODE ? "su(1)" : "runuser(1)")); - exit (status); - } - -@@ -635,7 +649,7 @@ int - su_main (int argc, char **argv, int mode) - { - int optc; -- const char *new_user = DEFAULT_USER; -+ const char *new_user = DEFAULT_USER, *runuser_user = NULL; - char *command = NULL; - int request_same_session = 0; - char *shell = NULL; -@@ -655,6 +669,7 @@ su_main (int argc, char **argv, int mode) - {"shell", required_argument, NULL, 's'}, - {"group", required_argument, NULL, 'g'}, - {"supp-group", required_argument, NULL, 'G'}, -+ {"user", required_argument, NULL, 'u'}, /* runuser only */ - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'V'}, - {NULL, 0, NULL, 0} -@@ -670,7 +685,7 @@ su_main (int argc, char **argv, int mode) - simulate_login = false; - change_environment = true; - -- while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) -+ while ((optc = getopt_long (argc, argv, "+c:fg:G:lmps:u:hV", longopts, NULL)) != -1) - { - switch (optc) - { -@@ -720,6 +735,12 @@ su_main (int argc, char **argv, int mode) - shell = optarg; - break; - -+ case 'u': -+ if (su_mode != RUNUSER_MODE) -+ usage (EXIT_FAILURE); -+ runuser_user = optarg; -+ break; -+ - case 'h': - usage(0); - -@@ -739,8 +760,21 @@ su_main (int argc, char **argv, int mode) - simulate_login = true; - ++optind; - } -- if (optind < argc) -+ -+ /* if not "-u " specified then fallback to classic su(1) */ -+ if (!runuser_user && optind < argc) - new_user = argv[optind++]; -+ else { -+ /* runuser -u */ -+ new_user = runuser_user; -+ if (shell || fast_startup || command || simulate_login) { -+ errx(EXIT_FAILURE, -+ _("options --{shell,fast,command,session-command,login} and " -+ "--user are mutually exclusive.")); -+ } -+ if (optind == argc) -+ errx(EXIT_FAILURE, _("COMMAND not specified.")); -+ } - - if ((num_supp_groups || use_gid) && restricted) - errx(EXIT_FAILURE, _("only root can specify alternative groups")); -@@ -784,18 +818,23 @@ su_main (int argc, char **argv, int mode) - if (request_same_session || !command || !pw->pw_uid) - same_session = 1; - -- if (!shell && !change_environment) -- shell = getenv ("SHELL"); -- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -- { -- /* The user being su'd to has a nonstandard shell, and so is -- probably a uucp account or has restricted access. Don't -- compromise the account by allowing access with a standard -- shell. */ -- warnx (_("using restricted shell %s"), pw->pw_shell); -- shell = NULL; -- } -- shell = xstrdup (shell ? shell : pw->pw_shell); -+ /* initialize shell variable only if "-u " not specified */ -+ if (runuser_user) { -+ shell = NULL; -+ } else { -+ if (!shell && !change_environment) -+ shell = getenv ("SHELL"); -+ if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -+ { -+ /* The user being su'd to has a nonstandard shell, and so is -+ probably a uucp account or has restricted access. Don't -+ compromise the account by allowing access with a standard -+ shell. */ -+ warnx (_("using restricted shell %s"), pw->pw_shell); -+ shell = NULL; -+ } -+ shell = xstrdup (shell ? shell : pw->pw_shell); -+ } - - init_groups (pw, groups, num_supp_groups); - -@@ -814,7 +853,12 @@ su_main (int argc, char **argv, int mode) - if (simulate_login && chdir (pw->pw_dir) != 0) - warn (_("warning: cannot change directory to %s"), pw->pw_dir); - -- run_shell (shell, command, argv + optind, max (0, argc - optind)); -+ if (shell) -+ run_shell (shell, command, argv + optind, max (0, argc - optind)); -+ else { -+ execvp(argv[optind], &argv[optind]); -+ err(EXIT_FAILURE, _("executing %s failed"), argv[optind]); -+ } - } - - // vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 -diff --git a/login-utils/su.1 b/login-utils/su.1 -index 59e1731..c82b941 100644 ---- a/login-utils/su.1 -+++ b/login-utils/su.1 -@@ -216,6 +216,7 @@ command specific logindef config file - global logindef config file - .PD 1 - .SH "SEE ALSO" -+.BR runuser (8), - .BR pam (8), - .BR shells (5), - .BR login.defs (5) --- -1.7.11.7 - diff --git a/0209-build-sys-move-runuser-to-sbin-dir.patch b/0209-build-sys-move-runuser-to-sbin-dir.patch deleted file mode 100644 index ab87cbc..0000000 --- a/0209-build-sys-move-runuser-to-sbin-dir.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 69658513d00635048f5de76ed73f4a43a61d374d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Nov 2012 13:12:02 +0100 -Subject: [PATCH] build-sys: move runuser to sbin dir - -Signed-off-by: Karel Zak ---- - login-utils/Makemodule.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am -index e26d9a7..0d8e8b1 100644 ---- a/login-utils/Makemodule.am -+++ b/login-utils/Makemodule.am -@@ -94,7 +94,7 @@ endif - - - if BUILD_RUNUSER --bin_PROGRAMS += runuser -+sbin_PROGRAMS += runuser - dist_man_MANS += login-utils/runuser.1 - runuser_SOURCES = \ - login-utils/runuser.c \ --- -1.7.11.7 - diff --git a/0210-su-fix-COMMAND-not-specified-error.patch b/0210-su-fix-COMMAND-not-specified-error.patch deleted file mode 100644 index c1818c0..0000000 --- a/0210-su-fix-COMMAND-not-specified-error.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 360e088738aa792bf6c52e777d64b5163b45362a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 7 Nov 2012 15:20:39 +0100 -Subject: [PATCH] su: fix "COMMAND not specified" error - - # su - su: COMMAND not specified - -This error message make sense for "runuser -u " only. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=872787 -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 29 +++++++++++++++++++---------- - 1 file changed, 19 insertions(+), 10 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 1fa76c8..5abdc84 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -761,19 +761,28 @@ su_main (int argc, char **argv, int mode) - ++optind; - } - -- /* if not "-u " specified then fallback to classic su(1) */ -- if (!runuser_user && optind < argc) -- new_user = argv[optind++]; -- else { -- /* runuser -u */ -- new_user = runuser_user; -- if (shell || fast_startup || command || simulate_login) { -- errx(EXIT_FAILURE, -+ switch (su_mode) { -+ case RUNUSER_MODE: -+ if (runuser_user) { -+ /* runuser -u */ -+ new_user = runuser_user; -+ if (shell || fast_startup || command || simulate_login) { -+ errx(EXIT_FAILURE, - _("options --{shell,fast,command,session-command,login} and " - "--user are mutually exclusive.")); -+ } -+ if (optind == argc) -+ errx(EXIT_FAILURE, _("COMMAND not specified.")); -+ -+ break; - } -- if (optind == argc) -- errx(EXIT_FAILURE, _("COMMAND not specified.")); -+ /* fallthrough if -u is not specified, then follow -+ * traditional su(1) behavior -+ */ -+ case SU_MODE: -+ if (optind < argc) -+ new_user = argv[optind++]; -+ break; - } - - if ((num_supp_groups || use_gid) && restricted) --- -1.7.11.7 - diff --git a/sources b/sources index e03cca9..23dd002 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -eeacbfdd2556acd899a2d0ffdb446185 util-linux-2.22.2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 +62a5e17c2710da8974e55c6fa5711122 util-linux-2.23-rc1.tar.xz diff --git a/util-linux-2.22-ipcs-32bit.patch b/util-linux-2.22-ipcs-32bit.patch deleted file mode 100644 index b6d5149..0000000 --- a/util-linux-2.22-ipcs-32bit.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up util-linux-2.22.2/sys-utils/ipcs.c.kzak util-linux-2.22.2/sys-utils/ipcs.c ---- util-linux-2.22.2/sys-utils/ipcs.c.kzak 2012-12-12 21:04:47.976355744 +0100 -+++ util-linux-2.22.2/sys-utils/ipcs.c 2013-02-19 16:12:54.712551108 +0100 -@@ -264,6 +264,27 @@ static void print_perms (int id, struct - printf(" %-10u\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) - { - int maxid, shmid, id; -@@ -288,12 +309,12 @@ void do_shm (char format) - * 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.spec b/util-linux.spec index 7a6f711..d6af783 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.22.2 -Release: 6%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain +Version: 2.23 +Release: 0.1%{?dist} +License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros %define floppyver 0.18 @@ -23,11 +23,8 @@ BuildRequires: zlib-devel BuildRequires: popt-devel BuildRequires: libutempter-devel Buildrequires: systemd-devel - -# because backported su(1) and runuser(1) patches -BuildRequires: automake -BuildRequires: autoconf -BuildRequires: libtool +Buildrequires: libuser-devel +BuildRequires: libcap-ng-devel ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/util-linux-%{upstream_version}.tar.xz @@ -88,40 +85,6 @@ Patch2: util-linux-2.19-floppy-generic.patch ### # 151635 - makeing /var/log/lastlog Patch3: util-linux-ng-2.22-login-lastlog.patch -# 231192 - ipcs is not printing correct values on pLinux -Patch4: util-linux-2.22-ipcs-32bit.patch - -### -### Upstream patches (2.23 or 2.22.x) -# 889888 - wipefs does not completely wipe btrfs volume -Patch100: libblkid-add-support-for-btrfs-backup-superblock.patch -# 882305 - agetty: unstable /dev/tty* permissions -Patch101: agetty-replace-perms-660-to-620.patch -# 885314 - hexdump segfault -Patch102: hexdump-do-not-segfault-when-iterating-over-an-empty.patch -# 896447 - No newlines in piped "cal" command -Patch103: cal-don-t-mix-ncurses-output-functions-and-printf.patch -# upstream patch -Patch104: libblkid-remove-optimization-from-verify-function.patch -# 902512 - No boot : Dependency failed for /home (and blkid fails to tell UUID) -Patch105: libblkid-make-backup-superblock-visible-for-wipefs-8.patch - -### Upstream patches from master branch (will be v2.23) for su(1) and new -### runuser(1) implementation. This is required for the recent coreutils where -### is no more su(1). -### -Patch200: 0200-su-add-group-and-supp-group-options.patch -Patch201: 0201-su-move-generic-su-code-to-su-common.c.patch -Patch202: 0202-runuser-new-command-derived-from-su-1.patch -Patch203: 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch -Patch204: 0204-su-verify-writing-to-streams-was-successful.patch -Patch205: 0205-su-move-long-options-to-main.patch -Patch206: 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch -Patch207: 0207-su-fixed-a-typo-in-pam-error-message.patch -Patch208: 0208-runuser-add-u-to-not-execute-shell.patch -Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch -Patch210: 0210-su-fix-COMMAND-not-specified-error.patch - %description The util-linux package contains a large variety of low-level system @@ -244,8 +207,6 @@ done %build unset LINGUAS || : -./autogen.sh - export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -358,8 +319,8 @@ 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* \ +for I in /usr/{bin,sbin}/{fdformat,floppy} \ + %{_mandir}/man8/{fdformat,floppy}.8* \ /usr/sbin/{hwclock,clock} \ %{_mandir}/man8/{hwclock,clock}.8*; do @@ -549,6 +510,7 @@ fi %{_bindir}/more %{_bindir}/mountpoint %{_bindir}/namei +%{_bindir}/nsenter %{_bindir}/prlimit %{_bindir}/raw %{_bindir}/rename @@ -557,6 +519,7 @@ fi %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch +%{_bindir}/setpriv %{_bindir}/setsid %{_bindir}/setterm %{_bindir}/tailf @@ -594,6 +557,7 @@ fi %{_mandir}/man1/more.1* %{_mandir}/man1/mountpoint.1* %{_mandir}/man1/namei.1* +%{_mandir}/man1/nsenter.1* %{_mandir}/man1/prlimit.1* %{_mandir}/man1/rename.1* %{_mandir}/man1/renice.1* @@ -601,6 +565,7 @@ fi %{_mandir}/man1/runuser.1* %{_mandir}/man1/script.1* %{_mandir}/man1/scriptreplay.1* +%{_mandir}/man1/setpriv.1* %{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* @@ -615,6 +580,7 @@ fi %{_mandir}/man5/fstab.5* %{_mandir}/man8/addpart.8* %{_mandir}/man8/agetty.8* +%{_mandir}/man8/blkdiscard.8* %{_mandir}/man8/blkid.8* %{_mandir}/man8/blockdev.8* %{_mandir}/man8/chcpu.8* @@ -655,6 +621,7 @@ fi %{_mandir}/man8/wipefs.8* %{_sbindir}/addpart %{_sbindir}/agetty +%{_sbindir}/blkdiscard %{_sbindir}/blkid %{_sbindir}/blockdev %{_sbindir}/chcpu @@ -692,12 +659,10 @@ fi %{_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} @@ -780,6 +745,12 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Fri Mar 22 2013 Karel Zak 2.23-0.1 +- upgrade to the release 2.22-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes +- add nsenter and blkdiscard +- remove tunelp + * Wed Feb 20 2013 Karel Zak 2.22.2-6 - fix #912778 - "runuser -l" doesn't register session to systemd From 27a5499f1ee89fd71b778a7a3c994cff9fc35baa Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 22 Mar 2013 14:10:10 +0100 Subject: [PATCH 136/425] 2.23-0.1: upgrade to uspream 2.23-rc1 Signed-off-by: Karel Zak --- .gitignore | 1 + ...t-use-umount-optimization-for-l-or-f.patch | 34 - 0002-wipefs-use-O_EXCL.patch | 27 - ...-remove-loop-declaration-smatch-scan.patch | 37 - ...ix-compiler-warning-Wstrict-aliasing.patch | 35 - ...eviation-for-no-canonicalize-to-man-.patch | 31 - ...long-options-for-L-and-U-to-man-page.patch | 33 - 0007-lib-loopdev-improve-debug-messages.patch | 107 -- 0008-lib-loopdev-check-for-sys.patch | 35 - ...ile-with-DINCLUDE_FS_TESTS-for-make-.patch | 49 - ...-fix-compiler-warning-Wunused-result.patch | 44 - ...misc-make-readlink-usage-more-robust.patch | 63 - ...-su-add-group-and-supp-group-options.patch | 203 --- ...-move-generic-su-code-to-su-common.c.patch | 1576 ----------------- ...unuser-new-command-derived-from-su-1.patch | 450 ----- ...etpwuid-for-GNU-Hurt-coreutils-71b7d.patch | 68 - ...fy-writing-to-streams-was-successful.patch | 33 - 0205-su-move-long-options-to-main.patch | 60 - ...ion-fault-reporting-of-the-child-pro.patch | 40 - ...su-fixed-a-typo-in-pam-error-message.patch | 26 - 0208-runuser-add-u-to-not-execute-shell.patch | 281 --- 0209-build-sys-move-runuser-to-sbin-dir.patch | 26 - 0210-su-fix-COMMAND-not-specified-error.patch | 62 - sources | 2 +- util-linux-2.22-ipcs-32bit.patch | 49 - util-linux.spec | 69 +- 26 files changed, 22 insertions(+), 3419 deletions(-) delete mode 100644 0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch delete mode 100644 0002-wipefs-use-O_EXCL.patch delete mode 100644 0003-swapon-remove-loop-declaration-smatch-scan.patch delete mode 100644 0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch delete mode 100644 0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch delete mode 100644 0006-mount-add-long-options-for-L-and-U-to-man-page.patch delete mode 100644 0007-lib-loopdev-improve-debug-messages.patch delete mode 100644 0008-lib-loopdev-check-for-sys.patch delete mode 100644 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch delete mode 100644 0010-login-fix-compiler-warning-Wunused-result.patch delete mode 100644 0011-misc-make-readlink-usage-more-robust.patch delete mode 100644 0200-su-add-group-and-supp-group-options.patch delete mode 100644 0201-su-move-generic-su-code-to-su-common.c.patch delete mode 100644 0202-runuser-new-command-derived-from-su-1.patch delete mode 100644 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch delete mode 100644 0204-su-verify-writing-to-streams-was-successful.patch delete mode 100644 0205-su-move-long-options-to-main.patch delete mode 100644 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch delete mode 100644 0207-su-fixed-a-typo-in-pam-error-message.patch delete mode 100644 0208-runuser-add-u-to-not-execute-shell.patch delete mode 100644 0209-build-sys-move-runuser-to-sbin-dir.patch delete mode 100644 0210-su-fix-COMMAND-not-specified-error.patch delete mode 100644 util-linux-2.22-ipcs-32bit.patch diff --git a/.gitignore b/.gitignore index df32d4a..f2bff19 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /util-linux-2.22.tar.xz /util-linux-2.22.1.tar.xz /util-linux-2.22.2.tar.xz +/util-linux-2.23-rc1.tar.xz diff --git a/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch b/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch deleted file mode 100644 index 952c5e1..0000000 --- a/0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6eeca6c7170295f325b814ee0cd1576da885cd30 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 15 Oct 2012 11:10:50 +0200 -Subject: [PATCH 01/11] libmount: don't use umount optimization for -l or -f - -The options -l (lazy) and -f (force) means that the mountpoint may be -unreadable (for example because NFS server is unreadable). So we -should not try to be smart in this case and we should try to minimize -number of situations when stat() or readlink() is used for the -mountpoint. - -Signed-off-by: Karel Zak ---- - libmount/src/context_umount.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c -index ce095bf..2c2e64c 100644 ---- a/libmount/src/context_umount.c -+++ b/libmount/src/context_umount.c -@@ -83,7 +83,9 @@ static int lookup_umount_fs(struct libmnt_context *cxt) - * where LABEL, UUID or symlinks are to canonicalized. It means that - * it's usable only for canonicalized stuff (e.g. kernel mountinfo). - */ -- if (!cxt->mtab_writable && *tgt == '/') { -+ if (!cxt->mtab_writable && *tgt == '/' && -+ !mnt_context_is_force(cxt) && !mnt_context_is_lazy(cxt)) { -+ - struct stat st; - - if (stat(tgt, &st) == 0 && S_ISDIR(st.st_mode)) { --- -1.7.11.7 - diff --git a/0002-wipefs-use-O_EXCL.patch b/0002-wipefs-use-O_EXCL.patch deleted file mode 100644 index 66a6476..0000000 --- a/0002-wipefs-use-O_EXCL.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9faf9c8494cf37fdcf68b1dfe10fd7900e93ec00 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 15 Oct 2012 12:38:09 +0200 -Subject: [PATCH 02/11] wipefs: use O_EXCL - -Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961 -Signed-off-by: Karel Zak ---- - misc-utils/wipefs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c -index cddad8a..0ddc148 100644 ---- a/misc-utils/wipefs.c -+++ b/misc-utils/wipefs.c -@@ -309,7 +309,7 @@ static void do_wipe_real(blkid_probe pr, const char *devname, struct wipe_desc * - static struct wipe_desc * - do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet) - { -- blkid_probe pr = new_probe(devname, O_RDWR); -+ blkid_probe pr = new_probe(devname, O_RDWR | O_EXCL); - struct wipe_desc *w, *wp0 = clone_offset(wp); - int zap = all ? 1 : wp->zap; - --- -1.7.11.7 - diff --git a/0003-swapon-remove-loop-declaration-smatch-scan.patch b/0003-swapon-remove-loop-declaration-smatch-scan.patch deleted file mode 100644 index d5b90fe..0000000 --- a/0003-swapon-remove-loop-declaration-smatch-scan.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 10a9cbcf36d43c0d4a13bf5e91315b4ffd29e636 Mon Sep 17 00:00:00 2001 -From: Sami Kerola -Date: Mon, 8 Oct 2012 08:08:20 +0100 -Subject: [PATCH 03/11] swapon: remove loop declaration [smatch scan] - -sys-utils/swapon.c:677:2: error: 'for' loop initial declarations are -only allowed in C99 mode - -Signed-off-by: Sami Kerola ---- - sys-utils/swapon.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c -index c9cabc1..0e1ab66 100644 ---- a/sys-utils/swapon.c -+++ b/sys-utils/swapon.c -@@ -642,6 +642,7 @@ static int swapon_all(void) - - static void __attribute__ ((__noreturn__)) usage(FILE * out) - { -+ size_t i; - fputs(USAGE_HEADER, out); - - fprintf(out, _(" %s [options] []\n"), program_invocation_short_name); -@@ -674,7 +675,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) - " name of file to be used\n"), out); - - fputs(_("\nAvailable columns (for --show):\n"), out); -- for (size_t i = 0; i < NCOLS; i++) -+ for (i = 0; i < NCOLS; i++) - fprintf(out, " %4s %s\n", infos[i].name, _(infos[i].help)); - - fprintf(out, USAGE_MAN_TAIL("swapon(8)")); --- -1.7.11.7 - diff --git a/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch b/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch deleted file mode 100644 index af08118..0000000 --- a/0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9f6c8591eeffb6591dc6a18512e618f0acf09890 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 15 Oct 2012 17:01:30 +0200 -Subject: [PATCH 04/11] libblkid: fix compiler warning [-Wstrict-aliasing] - -libblkid/src/superblocks/befs.c: In function 'get_uuid': -libblkid/src/superblocks/befs.c:353:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/befs.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c -index a7f4317..452da1e 100644 ---- a/libblkid/src/superblocks/befs.c -+++ b/libblkid/src/superblocks/befs.c -@@ -348,9 +348,11 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs, - && FS16_TO_CPU(sd->name_size, fs_le) == strlen(KEY_NAME) - && FS16_TO_CPU(sd->data_size, fs_le) == KEY_SIZE - && strcmp(sd->name, KEY_NAME) == 0) { -- *uuid = *(uint64_t *) ((uint8_t *) sd->name -- + FS16_TO_CPU(sd->name_size, fs_le) -- + 3); -+ -+ memcpy(uuid, -+ sd->name + FS16_TO_CPU(sd->name_size, fs_le) + 3, -+ sizeof(uint64_t)); -+ - break; - } else if (FS32_TO_CPU(sd->type, fs_le) == 0 - && FS16_TO_CPU(sd->name_size, fs_le) == 0 --- -1.7.11.7 - diff --git a/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch b/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch deleted file mode 100644 index dedadd2..0000000 --- a/0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 532116d4dd16632806ed4a036c2e89b966221031 Mon Sep 17 00:00:00 2001 -From: Bill Pemberton -Date: Wed, 10 Oct 2012 16:54:01 -0400 -Subject: [PATCH 05/11] mount: add -c abbreviation for --no-canonicalize to - man page - -The --no-canonicalize option can also be set using -c. The --help for -mount shows this option but the man page did not. Add -c to the man -page. - -Signed-off-by: Bill Pemberton ---- - sys-utils/mount.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index dce4b8c..83a4518 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -552,7 +552,7 @@ Mount without writing in - This is necessary for example when - .I /etc - is on a read-only filesystem. --.IP "\fB\-\-no\-canonicalize\fP" -+.IP "\fB\-c, \-\-no\-canonicalize\fP" - Don't canonicalize paths. The mount command canonicalizes all paths - (from command line or fstab) and stores canonicalized paths to the - .IR /etc/mtab --- -1.7.11.7 - diff --git a/0006-mount-add-long-options-for-L-and-U-to-man-page.patch b/0006-mount-add-long-options-for-L-and-U-to-man-page.patch deleted file mode 100644 index feb4c39..0000000 --- a/0006-mount-add-long-options-for-L-and-U-to-man-page.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b426209c5ba2126a9038363a269fec884af470fb Mon Sep 17 00:00:00 2001 -From: Bill Pemberton -Date: Wed, 10 Oct 2012 16:54:02 -0400 -Subject: [PATCH 06/11] mount: add long options for -L and -U to man page - -The -L and -U flags both have long options too (--label and --uuid). -The usage() function will show them but the man page didn't list them. - -Signed-off-by: Bill Pemberton ---- - sys-utils/mount.8 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index 83a4518..0b40bf7 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -586,10 +586,10 @@ set the block device to read-only mode, see command - .IP "\fB\-w, \-\-rw\fP" - Mount the filesystem read/write. This is the default. A synonym is - .BR "\-o rw" . --.IP "\fB\-L \fIlabel\fP" -+.IP "\fB\-L, \-\-label \fIlabel\fP" - Mount the partition that has the specified - .IR label . --.IP "\fB\-U \fIuuid\fP" -+.IP "\fB\-U, \-\-uuid \fIuuid\fP" - Mount the partition that has the specified - .IR uuid . - These two options require the file --- -1.7.11.7 - diff --git a/0007-lib-loopdev-improve-debug-messages.patch b/0007-lib-loopdev-improve-debug-messages.patch deleted file mode 100644 index 0db04da..0000000 --- a/0007-lib-loopdev-improve-debug-messages.patch +++ /dev/null @@ -1,107 +0,0 @@ -From deb0e659451d4ade29df3dbb842607edd6080c0d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 17 Oct 2012 11:42:21 +0200 -Subject: [PATCH 07/11] lib/loopdev: improve debug messages - -Signed-off-by: Karel Zak ---- - lib/loopdev.c | 22 ++++++++++++++++++---- - sys-utils/losetup.c | 2 -- - 2 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/lib/loopdev.c b/lib/loopdev.c -index a9f6df2..0e6033a 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -87,8 +87,10 @@ int loopcxt_set_device(struct loopdev_cxt *lc, const char *device) - if (!lc) - return -EINVAL; - -- if (lc->fd >= 0) -+ if (lc->fd >= 0) { - close(lc->fd); -+ DBG(lc, loopdev_debug("closing old open fd")); -+ } - lc->fd = -1; - lc->mode = 0; - lc->has_info = 0; -@@ -158,19 +160,26 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) - memcpy(lc, &dummy, sizeof(dummy)); - lc->flags = flags; - -+ if (getenv("LOOPDEV_DEBUG")) -+ loopcxt_enable_debug(lc, TRUE); -+ - rc = loopcxt_set_device(lc, NULL); - if (rc) - return rc; - - if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && -- get_linux_version() >= KERNEL_VERSION(2,6,37)) -+ get_linux_version() >= KERNEL_VERSION(2,6,37)) { - /* - * Use only sysfs for basic information about loop devices - */ - lc->flags |= LOOPDEV_FL_NOIOCTL; -+ DBG(lc, loopdev_debug("init: ignore ioctls")); -+ } - -- if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) -+ if (!(lc->flags & LOOPDEV_FL_CONTROL) && !stat(_PATH_DEV_LOOPCTL, &st)) { - lc->flags |= LOOPDEV_FL_CONTROL; -+ DBG(lc, loopdev_debug("init: loop-control detected ")); -+ } - - return 0; - } -@@ -272,7 +281,9 @@ int loopcxt_get_fd(struct loopdev_cxt *lc) - if (lc->fd < 0) { - lc->mode = lc->flags & LOOPDEV_FL_RDWR ? O_RDWR : O_RDONLY; - lc->fd = open(lc->device, lc->mode); -- DBG(lc, loopdev_debug("open %s", lc->fd < 0 ? "failed" : "ok")); -+ DBG(lc, loopdev_debug("open %s [%s]: %s", lc->device, -+ lc->flags & LOOPDEV_FL_RDWR ? "rw" : "ro", -+ lc->fd < 0 ? "failed" : "ok")); - } - return lc->fd; - } -@@ -576,6 +587,7 @@ int loopcxt_next(struct loopdev_cxt *lc) - * of loop devices). This is enough for 99% of all cases. - */ - if (iter->default_check) { -+ DBG(lc, loopdev_debug("iter: next: default check")); - for (++iter->ncur; iter->ncur < LOOPDEV_DEFAULT_NNODES; - iter->ncur++) { - char name[16]; -@@ -590,6 +602,7 @@ int loopcxt_next(struct loopdev_cxt *lc) - /* C) the worst possibility, scan whole /dev or /dev/loop/ - */ - if (!iter->minors) { -+ DBG(lc, loopdev_debug("iter: next: scan /dev")); - iter->nminors = (lc->flags & LOOPDEV_FL_DEVSUBDIR) ? - loop_scandir(_PATH_DEV_LOOP, &iter->minors, 0) : - loop_scandir(_PATH_DEV, &iter->minors, 1); -@@ -1150,6 +1163,7 @@ int loopcxt_setup_device(struct loopdev_cxt *lc) - DBG(lc, loopdev_debug("setup: backing file open: OK")); - - if (lc->fd != -1 && lc->mode != mode) { -+ DBG(lc, loopdev_debug("closing already open device (mode mismatch)")); - close(lc->fd); - lc->fd = -1; - lc->mode = 0; -diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c -index fdcc0be..a8381a8 100644 ---- a/sys-utils/losetup.c -+++ b/sys-utils/losetup.c -@@ -250,8 +250,6 @@ int main(int argc, char **argv) - if (loopcxt_init(&lc, 0)) - err(EXIT_FAILURE, _("failed to initialize loopcxt")); - -- loopcxt_enable_debug(&lc, getenv("LOOPDEV_DEBUG") ? TRUE : FALSE); -- - while ((c = getopt_long(argc, argv, "ac:d:De:E:fhj:o:p:PrvV", - longopts, NULL)) != -1) { - --- -1.7.11.7 - diff --git a/0008-lib-loopdev-check-for-sys.patch b/0008-lib-loopdev-check-for-sys.patch deleted file mode 100644 index ba50416..0000000 --- a/0008-lib-loopdev-check-for-sys.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 939636dd664cc608232c272de77be96e6f089235 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 17 Oct 2012 11:43:39 +0200 -Subject: [PATCH 08/11] lib/loopdev: check for /sys - -The current loopdev code prefers /sys to get information about -loop devices. The old methods like scan /dev are fallback solution -only. Unfortunately, the code does not check if /sys is mounted. - -Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad -Signed-off-by: Karel Zak ---- - lib/loopdev.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/lib/loopdev.c b/lib/loopdev.c -index 0e6033a..f62af83 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -167,6 +167,12 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) - if (rc) - return rc; - -+ if (stat(_PATH_SYS_BLOCK, &st) || !S_ISDIR(st.st_mode)) { -+ lc->flags |= LOOPDEV_FL_NOSYSFS; -+ lc->flags &= ~LOOPDEV_FL_NOIOCTL; -+ DBG(lc, loopdev_debug("init: disable /sys usage")); -+ } -+ - if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && - get_linux_version() >= KERNEL_VERSION(2,6,37)) { - /* --- -1.7.11.7 - diff --git a/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch b/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch deleted file mode 100644 index dc4f7b7..0000000 --- a/0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 75f03f036011003c2a9e8e634ca3ce7930873318 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 22 Oct 2012 10:10:55 +0200 -Subject: [PATCH 09/11] fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make - check - - make check - sudo su - - cd tests - ./run.sh cramfs - -Signed-off-by: Karel Zak ---- - disk-utils/Makemodule.am | 5 +++++ - tests/commands.sh | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/disk-utils/Makemodule.am b/disk-utils/Makemodule.am -index f2360bf..b329a99 100644 ---- a/disk-utils/Makemodule.am -+++ b/disk-utils/Makemodule.am -@@ -97,6 +97,11 @@ fsck_cramfs_LDADD = $(LDADD) -lz libcommon.la - sbin_PROGRAMS += mkfs.cramfs - mkfs_cramfs_SOURCES = disk-utils/mkfs.cramfs.c $(cramfs_common_sources) - mkfs_cramfs_LDADD = $(LDADD) -lz libcommon.la -+ -+check_PROGRAMS += test_fsck.cramfs -+test_fsck_cramfs_SOURCES = $(fsck_cramfs_SOURCES) -+test_fsck_cramfs_LDADD = $(fsck_cramfs_LDADD) -+test_fsck_cramfs_CFLAGS = $(AM_CFLAGS) -DINCLUDE_FS_TESTS - endif - - -diff --git a/tests/commands.sh b/tests/commands.sh -index 8a1577e..db1d4ac 100644 ---- a/tests/commands.sh -+++ b/tests/commands.sh -@@ -37,7 +37,7 @@ TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"} - TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"} - TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"} - TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"} --TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"} -+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/test_fsck.cramfs"} - TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"} - - TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"} --- -1.7.11.7 - diff --git a/0010-login-fix-compiler-warning-Wunused-result.patch b/0010-login-fix-compiler-warning-Wunused-result.patch deleted file mode 100644 index 2d50045..0000000 --- a/0010-login-fix-compiler-warning-Wunused-result.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ed68f1e2f5609a3f42492df407d62b8fc006ea17 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 22 Oct 2012 13:13:02 +0200 -Subject: [PATCH 10/11] login: fix compiler warning [-Wunused-result] - -It's probably unnecessary paranoia, but let's check if we're able to -restore the original IDs after ~/.hushlogin file check. - -Signed-off-by: Karel Zak ---- - login-utils/login.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/login-utils/login.c b/login-utils/login.c -index 8ae5266..f5896da 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -1031,13 +1031,17 @@ static int get_hushlogin_status(struct passwd *pwd) - gid_t egid = getegid(); - - sprintf(buf, "%s/%s", pwd->pw_dir, file); -- setregid(-1, pwd->pw_gid); -- setreuid(0, pwd->pw_uid); -- ok = effective_access(buf, O_RDONLY) == 0; -- setuid(0); /* setreuid doesn't do it alone! */ -- setreuid(ruid, 0); -- setregid(-1, egid); - -+ if (setregid(-1, pwd->pw_gid) == 0 && -+ setreuid(0, pwd->pw_uid) == 0) -+ ok = effective_access(buf, O_RDONLY) == 0; -+ -+ if (setuid(0) != 0 || -+ setreuid(ruid, 0) != 0 || -+ setregid(-1, egid) != 0) { -+ syslog(LOG_ALERT, _("hush login status: restore original IDs failed")); -+ exit(EXIT_FAILURE); -+ } - if (ok) - return 1; /* enabled by user */ - } --- -1.7.11.7 - diff --git a/0011-misc-make-readlink-usage-more-robust.patch b/0011-misc-make-readlink-usage-more-robust.patch deleted file mode 100644 index ce4e754..0000000 --- a/0011-misc-make-readlink-usage-more-robust.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a3528342bc716ecdabdd86609ae5a3198f560870 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 23 Oct 2012 12:40:39 +0200 -Subject: [PATCH 11/11] misc: make readlink() usage more robust - -Signed-off-by: Karel Zak ---- - misc-utils/lsblk.c | 4 ++-- - misc-utils/lslocks.c | 2 +- - sys-utils/eject.c | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index cc97c05..9c25dd0 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -962,7 +962,7 @@ static int get_wholedisk_from_partition_dirent(DIR *dir, const char *dirname, - int len; - - if ((len = readlink_at(dirfd(dir), dirname, -- d->d_name, path, sizeof(path))) < 0) -+ d->d_name, path, sizeof(path) - 1)) < 0) - return 0; - - path[len] = '\0'; -@@ -1075,7 +1075,7 @@ static char *devno_to_sysfs_name(dev_t devno, char *devname, char *buf, size_t b - return NULL; - } - -- len = readlink(path, buf, buf_size); -+ len = readlink(path, buf, buf_size - 1); - if (len < 0) { - warn(_("%s: failed to read link"), path); - return NULL; -diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c -index 45fb6de..495eb80 100644 ---- a/misc-utils/lslocks.c -+++ b/misc-utils/lslocks.c -@@ -196,7 +196,7 @@ static char *get_filename_sz(ino_t inode, pid_t pid, size_t *size) - continue; - - if ((len = readlink_at(fd, path, dp->d_name, -- sym, sizeof(path))) < 1) -+ sym, sizeof(sym) - 1)) < 1) - goto out; - - *size = sb.st_size; -diff --git a/sys-utils/eject.c b/sys-utils/eject.c -index 1a5b834..6d0da18 100644 ---- a/sys-utils/eject.c -+++ b/sys-utils/eject.c -@@ -837,7 +837,7 @@ static char *get_subsystem(char *chain, char *buf, size_t bufsz) - memcpy(chain + len, SUBSYSTEM_LINKNAME, sizeof(SUBSYSTEM_LINKNAME)); - - /* try if subsystem symlink exists */ -- sz = readlink(chain, buf, bufsz); -+ sz = readlink(chain, buf, bufsz - 1); - - /* remove last subsystem from chain */ - chain[len] = '\0'; --- -1.7.11.7 - diff --git a/0200-su-add-group-and-supp-group-options.patch b/0200-su-add-group-and-supp-group-options.patch deleted file mode 100644 index fae59a9..0000000 --- a/0200-su-add-group-and-supp-group-options.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 6273784aa4f40121b3963b41df0986044eeaced0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 28 Aug 2012 16:32:28 +0200 -Subject: [PATCH 200/208] su: add --group and --supp-group options - -These options allow to specify alternative groups. The command -su(1) has to be executed by root. The implementation is based on -Fedora runuser(1) command. - -For example: - - # su --group=kzak --supp-group=uuidd - - # id - uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak) - -non-root user: - - $ su --group=kzak - - su: only root can specify alternative groups - -Signed-off-by: Karel Zak ---- - login-utils/su.1 | 6 +++++ - login-utils/su.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 75 insertions(+), 4 deletions(-) - -diff --git a/login-utils/su.1 b/login-utils/su.1 -index 598cebd..59e1731 100644 ---- a/login-utils/su.1 -+++ b/login-utils/su.1 -@@ -59,6 +59,12 @@ Pass - to the shell which may or may not be useful depending on the - shell. - .TP -+\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR -+specify the primary group, this option is allowed for root user only -+.TP -+\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR -+specify a supplemental group, this option is allowed for root user only -+.TP - \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR - Starts the shell as login shell with an environment similar to a real - login: -diff --git a/login-utils/su.c b/login-utils/su.c -index c6b8bce..f11c757 100644 ---- a/login-utils/su.c -+++ b/login-utils/su.c -@@ -110,6 +110,8 @@ static struct option const longopts[] = - {"login", no_argument, NULL, 'l'}, - {"preserve-environment", no_argument, NULL, 'p'}, - {"shell", required_argument, NULL, 's'}, -+ {"group", required_argument, NULL, 'g'}, -+ {"supp-group", required_argument, NULL, 'G'}, - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'V'}, - {NULL, 0, NULL, 0} -@@ -424,11 +426,18 @@ modify_environment (const struct passwd *pw, const char *shell) - /* Become the user and group(s) specified by PW. */ - - static void --init_groups (const struct passwd *pw) -+init_groups (const struct passwd *pw, gid_t *groups, int num_groups) - { - int retval; -+ - errno = 0; -- if (initgroups (pw->pw_name, pw->pw_gid) == -1) -+ -+ if (num_groups) -+ retval = setgroups (num_groups, groups); -+ else -+ retval = initgroups (pw->pw_name, pw->pw_gid); -+ -+ if (retval == -1) - { - cleanup_pam (PAM_ABORT); - err (EXIT_FAILURE, _("cannot set groups")); -@@ -535,6 +544,8 @@ usage (int status) - -c, --command pass a single command to the shell with -c\n\ - --session-command pass a single command to the shell with -c\n\ - and do not create a new session\n\ -+ -g --group=group specify the primary group\n\ -+ -G --supp-group=group specify a supplemental group\n\ - -f, --fast pass -f to the shell (for csh or tcsh)\n\ - -m, --preserve-environment do not reset environment variables\n\ - -p same as -m\n\ -@@ -556,6 +567,19 @@ void load_config(void) - logindefs_load_file(_PATH_LOGINDEFS); - } - -+/* -+ * Returns 1 if the current user is not root -+ */ -+static int -+evaluate_uid(void) -+{ -+ uid_t ruid = getuid(); -+ uid_t euid = geteuid(); -+ -+ /* if we're really root and aren't running setuid */ -+ return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; -+} -+ - int - main (int argc, char **argv) - { -@@ -566,6 +590,11 @@ main (int argc, char **argv) - char *shell = NULL; - struct passwd *pw; - struct passwd pw_copy; -+ struct group *gr; -+ gid_t groups[NGROUPS_MAX]; -+ int num_supp_groups = 0; -+ int use_gid = 0; -+ int restricted; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); -@@ -575,7 +604,7 @@ main (int argc, char **argv) - simulate_login = false; - change_environment = true; - -- while ((optc = getopt_long (argc, argv, "c:flmps:hV", longopts, NULL)) != -1) -+ while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) - { - switch (optc) - { -@@ -592,6 +621,26 @@ main (int argc, char **argv) - fast_startup = true; - break; - -+ case 'g': -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ use_gid = 1; -+ groups[0] = gr->gr_gid; -+ break; -+ -+ case 'G': -+ num_supp_groups++; -+ if (num_supp_groups >= NGROUPS_MAX) -+ errx(EXIT_FAILURE, -+ _("can't specify more than %d supplemental groups"), -+ NGROUPS_MAX - 1); -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ groups[num_supp_groups] = gr->gr_gid; -+ break; -+ - case 'l': - simulate_login = true; - break; -@@ -617,6 +666,8 @@ main (int argc, char **argv) - } - } - -+ restricted = evaluate_uid (); -+ - if (optind < argc && !strcmp (argv[optind], "-")) - { - simulate_login = true; -@@ -625,6 +676,9 @@ main (int argc, char **argv) - if (optind < argc) - new_user = argv[optind++]; - -+ if ((num_supp_groups || use_gid) && restricted) -+ errx(EXIT_FAILURE, _("only root can specify alternative groups")); -+ - logindefs_load_defaults = load_config; - - pw = getpwnam (new_user); -@@ -648,6 +702,17 @@ main (int argc, char **argv) - : DEFAULT_SHELL); - endpwent (); - -+ if (num_supp_groups && !use_gid) -+ { -+ pw->pw_gid = groups[1]; -+ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); -+ } -+ else if (use_gid) -+ { -+ pw->pw_gid = groups[0]; -+ num_supp_groups++; -+ } -+ - authenticate (pw); - - if (request_same_session || !command || !pw->pw_uid) -@@ -666,7 +731,7 @@ main (int argc, char **argv) - } - shell = xstrdup (shell ? shell : pw->pw_shell); - -- init_groups (pw); -+ init_groups (pw, groups, num_supp_groups); - - create_watching_parent (); - /* Now we're in the child. */ --- -1.7.11.7 - diff --git a/0201-su-move-generic-su-code-to-su-common.c.patch b/0201-su-move-generic-su-code-to-su-common.c.patch deleted file mode 100644 index 25c7141..0000000 --- a/0201-su-move-generic-su-code-to-su-common.c.patch +++ /dev/null @@ -1,1576 +0,0 @@ -From 1874fa1ef38ce41eaf61b1aada25fac5f6966839 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Nov 2012 12:38:48 +0100 -Subject: [PATCH 201/208] su: move generic su code to su-common.c - -Signed-off-by: Karel Zak ---- - login-utils/Makemodule.am | 2 + - login-utils/su-common.c | 759 ++++++++++++++++++++++++++++++++++++++++++++++ - login-utils/su-common.h | 12 + - login-utils/su.c | 754 +-------------------------------------------- - 4 files changed, 776 insertions(+), 751 deletions(-) - create mode 100644 login-utils/su-common.c - create mode 100644 login-utils/su-common.h - -diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am -index e10da46..b918f00 100644 ---- a/login-utils/Makemodule.am -+++ b/login-utils/Makemodule.am -@@ -83,6 +83,8 @@ bin_PROGRAMS += su - dist_man_MANS += login-utils/su.1 - su_SOURCES = \ - login-utils/su.c \ -+ login-utils/su-common.c \ -+ login-utils/su-common.h \ - login-utils/logindefs.c \ - login-utils/logindefs.h - su_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -new file mode 100644 -index 0000000..f1f46aa ---- /dev/null -+++ b/login-utils/su-common.c -@@ -0,0 +1,759 @@ -+/* su for Linux. Run a shell with substitute user and group IDs. -+ Copyright (C) 1992-2006 Free Software Foundation, Inc. -+ Copyright (C) 2012 SUSE Linux Products GmbH, Nuernberg -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2, or (at your option) -+ any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software Foundation, -+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -+ -+/* Run a shell with the real and effective UID and GID and groups -+ of USER, default `root'. -+ -+ The shell run is taken from USER's password entry, /bin/sh if -+ none is specified there. If the account has a password, su -+ prompts for a password unless run by a user with real UID 0. -+ -+ Does not change the current directory. -+ Sets `HOME' and `SHELL' from the password entry for USER, and if -+ USER is not root, sets `USER' and `LOGNAME' to USER. -+ The subshell is not a login shell. -+ -+ If one or more ARGs are given, they are passed as additional -+ arguments to the subshell. -+ -+ Does not handle /bin/sh or other shells specially -+ (setting argv[0] to "-su", passing -c only to certain shells, etc.). -+ I don't see the point in doing that, and it's ugly. -+ -+ Based on an implemenation by David MacKenzie . */ -+ -+enum -+{ -+ EXIT_CANNOT_INVOKE = 126, -+ EXIT_ENOENT = 127 -+}; -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "err.h" -+ -+#include -+#include "c.h" -+#include "xalloc.h" -+#include "nls.h" -+#include "pathnames.h" -+#include "env.h" -+ -+/* name of the pam configuration files. separate configs for su and su - */ -+#define PAM_SERVICE_NAME "su" -+#define PAM_SERVICE_NAME_L "su-l" -+ -+#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) -+ -+#include "logindefs.h" -+#include "su-common.h" -+ -+/* The shell to run if none is given in the user's passwd entry. */ -+#define DEFAULT_SHELL "/bin/sh" -+ -+/* The user to become if none is specified. */ -+#define DEFAULT_USER "root" -+ -+#ifndef HAVE_ENVIRON_DECL -+extern char **environ; -+#endif -+ -+static void run_shell (char const *, char const *, char **, size_t) -+ __attribute__ ((__noreturn__)); -+ -+/* If true, pass the `-f' option to the subshell. */ -+static bool fast_startup; -+ -+/* If true, simulate a login instead of just starting a shell. */ -+static bool simulate_login; -+ -+/* If true, change some environment vars to indicate the user su'd to. */ -+static bool change_environment; -+ -+/* If true, then don't call setsid() with a command. */ -+int same_session = 0; -+ -+/* SU_MODE_{RUNUSER,SU} */ -+static int su_mode; -+ -+static bool _pam_session_opened; -+static bool _pam_cred_established; -+static sig_atomic_t volatile caught_signal = false; -+static pam_handle_t *pamh = NULL; -+ -+static struct option const longopts[] = -+{ -+ {"command", required_argument, NULL, 'c'}, -+ {"session-command", required_argument, NULL, 'C'}, -+ {"fast", no_argument, NULL, 'f'}, -+ {"login", no_argument, NULL, 'l'}, -+ {"preserve-environment", no_argument, NULL, 'p'}, -+ {"shell", required_argument, NULL, 's'}, -+ {"group", required_argument, NULL, 'g'}, -+ {"supp-group", required_argument, NULL, 'G'}, -+ {"help", no_argument, 0, 'h'}, -+ {"version", no_argument, 0, 'V'}, -+ {NULL, 0, NULL, 0} -+}; -+ -+/* Log the fact that someone has run su to the user given by PW; -+ if SUCCESSFUL is true, they gave the correct password, etc. */ -+ -+static void -+log_su (struct passwd const *pw, bool successful) -+{ -+ const char *new_user, *old_user, *tty; -+ -+ new_user = pw->pw_name; -+ /* The utmp entry (via getlogin) is probably the best way to identify -+ the user, especially if someone su's from a su-shell. */ -+ old_user = getlogin (); -+ if (!old_user) -+ { -+ /* getlogin can fail -- usually due to lack of utmp entry. -+ Resort to getpwuid. */ -+ struct passwd *pwd = getpwuid (getuid ()); -+ old_user = (pwd ? pwd->pw_name : ""); -+ } -+ tty = ttyname (STDERR_FILENO); -+ if (!tty) -+ tty = "none"; -+ -+ openlog (program_invocation_short_name, 0 , LOG_AUTH); -+ syslog (LOG_NOTICE, "%s(to %s) %s on %s", -+ successful ? "" : "FAILED SU ", -+ new_user, old_user, tty); -+ closelog (); -+} -+ -+static struct pam_conv conv = -+{ -+ misc_conv, -+ NULL -+}; -+ -+static void -+cleanup_pam (int retcode) -+{ -+ int saved_errno = errno; -+ -+ if (_pam_session_opened) -+ pam_close_session (pamh, 0); -+ -+ if (_pam_cred_established) -+ pam_setcred (pamh, PAM_DELETE_CRED | PAM_SILENT); -+ -+ pam_end(pamh, retcode); -+ -+ errno = saved_errno; -+} -+ -+/* Signal handler for parent process. */ -+static void -+su_catch_sig (int sig __attribute__((__unused__))) -+{ -+ caught_signal = true; -+} -+ -+/* Export env variables declared by PAM modules. */ -+static void -+export_pamenv (void) -+{ -+ char **env; -+ -+ /* This is a copy but don't care to free as we exec later anyways. */ -+ env = pam_getenvlist (pamh); -+ while (env && *env) -+ { -+ if (putenv (*env) != 0) -+ err (EXIT_FAILURE, NULL); -+ env++; -+ } -+} -+ -+static void -+create_watching_parent (void) -+{ -+ pid_t child; -+ sigset_t ourset; -+ int status = 0; -+ int retval; -+ -+ retval = pam_open_session (pamh, 0); -+ if (is_pam_failure(retval)) -+ { -+ cleanup_pam (retval); -+ errx (EXIT_FAILURE, _("cannot not open session: %s"), -+ pam_strerror (pamh, retval)); -+ } -+ else -+ _pam_session_opened = 1; -+ -+ child = fork (); -+ if (child == (pid_t) -1) -+ { -+ cleanup_pam (PAM_ABORT); -+ err (EXIT_FAILURE, _("cannot create child process")); -+ } -+ -+ /* the child proceeds to run the shell */ -+ if (child == 0) -+ return; -+ -+ /* In the parent watch the child. */ -+ -+ /* su without pam support does not have a helper that keeps -+ sitting on any directory so let's go to /. */ -+ if (chdir ("/") != 0) -+ warn (_("cannot change directory to %s"), "/"); -+ -+ sigfillset (&ourset); -+ if (sigprocmask (SIG_BLOCK, &ourset, NULL)) -+ { -+ warn (_("cannot block signals")); -+ caught_signal = true; -+ } -+ if (!caught_signal) -+ { -+ struct sigaction action; -+ action.sa_handler = su_catch_sig; -+ sigemptyset (&action.sa_mask); -+ action.sa_flags = 0; -+ sigemptyset (&ourset); -+ if (!same_session) -+ { -+ if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) -+ { -+ warn (_("cannot set signal handler")); -+ caught_signal = true; -+ } -+ } -+ if (!caught_signal && (sigaddset(&ourset, SIGTERM) -+ || sigaddset(&ourset, SIGALRM) -+ || sigaction(SIGTERM, &action, NULL) -+ || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) { -+ warn (_("cannot set signal handler")); -+ caught_signal = true; -+ } -+ if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) -+ || sigaction(SIGQUIT, &action, NULL))) -+ { -+ warn (_("cannot set signal handler")); -+ caught_signal = true; -+ } -+ } -+ if (!caught_signal) -+ { -+ pid_t pid; -+ for (;;) -+ { -+ pid = waitpid (child, &status, WUNTRACED); -+ -+ if (pid != (pid_t)-1 && WIFSTOPPED (status)) -+ { -+ kill (getpid (), SIGSTOP); -+ /* once we get here, we must have resumed */ -+ kill (pid, SIGCONT); -+ } -+ else -+ break; -+ } -+ if (pid != (pid_t)-1) -+ if (WIFSIGNALED (status)) -+ status = WTERMSIG (status) + 128; -+ else -+ status = WEXITSTATUS (status); -+ else -+ status = 1; -+ } -+ else -+ status = 1; -+ -+ if (caught_signal) -+ { -+ fprintf (stderr, _("\nSession terminated, killing shell...")); -+ kill (child, SIGTERM); -+ } -+ -+ cleanup_pam (PAM_SUCCESS); -+ -+ if (caught_signal) -+ { -+ sleep (2); -+ kill (child, SIGKILL); -+ fprintf (stderr, _(" ...killed.\n")); -+ } -+ exit (status); -+} -+ -+static void -+authenticate (const struct passwd *pw) -+{ -+ const struct passwd *lpw; -+ const char *cp; -+ int retval; -+ -+ retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, -+ pw->pw_name, &conv, &pamh); -+ if (is_pam_failure(retval)) -+ goto done; -+ -+ if (isatty (0) && (cp = ttyname (0)) != NULL) -+ { -+ const char *tty; -+ -+ if (strncmp (cp, "/dev/", 5) == 0) -+ tty = cp + 5; -+ else -+ tty = cp; -+ retval = pam_set_item (pamh, PAM_TTY, tty); -+ if (is_pam_failure(retval)) -+ goto done; -+ } -+ -+ lpw = getpwuid (getuid ()); -+ if (lpw && lpw->pw_name) -+ { -+ retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); -+ if (is_pam_failure(retval)) -+ goto done; -+ } -+ -+ retval = pam_authenticate (pamh, 0); -+ if (is_pam_failure(retval)) -+ goto done; -+ -+ retval = pam_acct_mgmt (pamh, 0); -+ if (retval == PAM_NEW_AUTHTOK_REQD) -+ { -+ /* Password has expired. Offer option to change it. */ -+ retval = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK); -+ } -+ -+done: -+ -+ log_su (pw, !is_pam_failure(retval)); -+ -+ if (is_pam_failure(retval)) -+ { -+ const char *msg = pam_strerror(pamh, retval); -+ pam_end(pamh, retval); -+ sleep (getlogindefs_num ("FAIL_DELAY", 1)); -+ errx (EXIT_FAILURE, "%s", msg?msg:_("incorrect password")); -+ } -+} -+ -+static void -+set_path(const struct passwd* pw) -+{ -+ int r; -+ if (pw->pw_uid) -+ r = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); -+ -+ else if ((r = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) -+ r = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); -+ -+ if (r != 0) -+ err (EXIT_FAILURE, _("failed to set PATH")); -+} -+ -+/* Update `environ' for the new shell based on PW, with SHELL being -+ the value for the SHELL environment variable. */ -+ -+static void -+modify_environment (const struct passwd *pw, const char *shell) -+{ -+ if (simulate_login) -+ { -+ /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. -+ Unset all other environment variables. */ -+ char const *term = getenv ("TERM"); -+ if (term) -+ term = xstrdup (term); -+ environ = xmalloc ((6 + !!term) * sizeof (char *)); -+ environ[0] = NULL; -+ if (term) -+ xsetenv ("TERM", term, 1); -+ xsetenv ("HOME", pw->pw_dir, 1); -+ xsetenv ("SHELL", shell, 1); -+ xsetenv ("USER", pw->pw_name, 1); -+ xsetenv ("LOGNAME", pw->pw_name, 1); -+ set_path(pw); -+ } -+ else -+ { -+ /* Set HOME, SHELL, and if not becoming a super-user, -+ USER and LOGNAME. */ -+ if (change_environment) -+ { -+ xsetenv ("HOME", pw->pw_dir, 1); -+ xsetenv ("SHELL", shell, 1); -+ if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) -+ set_path(pw); -+ -+ if (pw->pw_uid) -+ { -+ xsetenv ("USER", pw->pw_name, 1); -+ xsetenv ("LOGNAME", pw->pw_name, 1); -+ } -+ } -+ } -+ -+ export_pamenv (); -+} -+ -+/* Become the user and group(s) specified by PW. */ -+ -+static void -+init_groups (const struct passwd *pw, gid_t *groups, int num_groups) -+{ -+ int retval; -+ -+ errno = 0; -+ -+ if (num_groups) -+ retval = setgroups (num_groups, groups); -+ else -+ retval = initgroups (pw->pw_name, pw->pw_gid); -+ -+ if (retval == -1) -+ { -+ cleanup_pam (PAM_ABORT); -+ err (EXIT_FAILURE, _("cannot set groups")); -+ } -+ endgrent (); -+ -+ retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); -+ if (is_pam_failure(retval)) -+ errx (EXIT_FAILURE, "%s", pam_strerror (pamh, retval)); -+ else -+ _pam_cred_established = 1; -+} -+ -+static void -+change_identity (const struct passwd *pw) -+{ -+ if (setgid (pw->pw_gid)) -+ err (EXIT_FAILURE, _("cannot set group id")); -+ if (setuid (pw->pw_uid)) -+ err (EXIT_FAILURE, _("cannot set user id")); -+} -+ -+/* Run SHELL, or DEFAULT_SHELL if SHELL is empty. -+ If COMMAND is nonzero, pass it to the shell with the -c option. -+ Pass ADDITIONAL_ARGS to the shell as more arguments; there -+ are N_ADDITIONAL_ARGS extra arguments. */ -+ -+static void -+run_shell (char const *shell, char const *command, char **additional_args, -+ size_t n_additional_args) -+{ -+ size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; -+ char const **args = xcalloc (n_args, sizeof *args); -+ size_t argno = 1; -+ -+ if (simulate_login) -+ { -+ char *arg0; -+ char *shell_basename; -+ -+ shell_basename = basename (shell); -+ arg0 = xmalloc (strlen (shell_basename) + 2); -+ arg0[0] = '-'; -+ strcpy (arg0 + 1, shell_basename); -+ args[0] = arg0; -+ } -+ else -+ args[0] = basename (shell); -+ if (fast_startup) -+ args[argno++] = "-f"; -+ if (command) -+ { -+ args[argno++] = "-c"; -+ args[argno++] = command; -+ } -+ memcpy (args + argno, additional_args, n_additional_args * sizeof *args); -+ args[argno + n_additional_args] = NULL; -+ execv (shell, (char **) args); -+ -+ { -+ int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); -+ warn ("%s", shell); -+ exit (exit_status); -+ } -+} -+ -+/* Return true if SHELL is a restricted shell (one not returned by -+ getusershell), else false, meaning it is a standard shell. */ -+ -+static bool -+restricted_shell (const char *shell) -+{ -+ char *line; -+ -+ setusershell (); -+ while ((line = getusershell ()) != NULL) -+ { -+ if (*line != '#' && !strcmp (line, shell)) -+ { -+ endusershell (); -+ return false; -+ } -+ } -+ endusershell (); -+ return true; -+} -+ -+static void __attribute__((__noreturn__)) -+usage (int status) -+{ -+ if (status != EXIT_SUCCESS) -+ fprintf (stderr, _("Try `%s --help' for more information.\n"), -+ program_invocation_short_name); -+ else -+ { -+ fputs(USAGE_HEADER, stdout); -+ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -+ fputs (_("\n\ -+ Change the effective user id and group id to that of USER.\n\ -+ A mere - implies -l. If USER not given, assume root.\n"), stdout); -+ fputs(USAGE_OPTIONS, stdout); -+ fputs (_("\ -+ -, -l, --login make the shell a login shell\n\ -+ -c, --command pass a single command to the shell with -c\n\ -+ --session-command pass a single command to the shell with -c\n\ -+ and do not create a new session\n\ -+ -g --group=group specify the primary group\n\ -+ -G --supp-group=group specify a supplemental group\n\ -+ -f, --fast pass -f to the shell (for csh or tcsh)\n\ -+ -m, --preserve-environment do not reset environment variables\n\ -+ -p same as -m\n\ -+ -s, --shell run shell if /etc/shells allows it\n\ -+"), stdout); -+ -+ fputs(USAGE_SEPARATOR, stdout); -+ fputs(USAGE_HELP, stdout); -+ fputs(USAGE_VERSION, stdout); -+ printf(USAGE_MAN_TAIL("su(1)")); -+ } -+ exit (status); -+} -+ -+static -+void load_config(void) -+{ -+ logindefs_load_file("/etc/default/su"); -+ logindefs_load_file(_PATH_LOGINDEFS); -+} -+ -+/* -+ * Returns 1 if the current user is not root -+ */ -+static int -+evaluate_uid(void) -+{ -+ uid_t ruid = getuid(); -+ uid_t euid = geteuid(); -+ -+ /* if we're really root and aren't running setuid */ -+ return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; -+} -+ -+int -+su_main (int argc, char **argv, int mode) -+{ -+ int optc; -+ const char *new_user = DEFAULT_USER; -+ char *command = NULL; -+ int request_same_session = 0; -+ char *shell = NULL; -+ struct passwd *pw; -+ struct passwd pw_copy; -+ struct group *gr; -+ gid_t groups[NGROUPS_MAX]; -+ int num_supp_groups = 0; -+ int use_gid = 0; -+ int restricted; -+ -+ setlocale (LC_ALL, ""); -+ bindtextdomain (PACKAGE, LOCALEDIR); -+ textdomain (PACKAGE); -+ -+ su_mode = mode; -+ fast_startup = false; -+ simulate_login = false; -+ change_environment = true; -+ -+ while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) -+ { -+ switch (optc) -+ { -+ case 'c': -+ command = optarg; -+ break; -+ -+ case 'C': -+ command = optarg; -+ request_same_session = 1; -+ break; -+ -+ case 'f': -+ fast_startup = true; -+ break; -+ -+ case 'g': -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ use_gid = 1; -+ groups[0] = gr->gr_gid; -+ break; -+ -+ case 'G': -+ num_supp_groups++; -+ if (num_supp_groups >= NGROUPS_MAX) -+ errx(EXIT_FAILURE, -+ _("can't specify more than %d supplemental groups"), -+ NGROUPS_MAX - 1); -+ gr = getgrnam(optarg); -+ if (!gr) -+ errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -+ groups[num_supp_groups] = gr->gr_gid; -+ break; -+ -+ case 'l': -+ simulate_login = true; -+ break; -+ -+ case 'm': -+ case 'p': -+ change_environment = false; -+ break; -+ -+ case 's': -+ shell = optarg; -+ break; -+ -+ case 'h': -+ usage(0); -+ -+ case 'V': -+ printf(UTIL_LINUX_VERSION); -+ exit(EXIT_SUCCESS); -+ -+ default: -+ usage (EXIT_FAILURE); -+ } -+ } -+ -+ restricted = evaluate_uid (); -+ -+ if (optind < argc && !strcmp (argv[optind], "-")) -+ { -+ simulate_login = true; -+ ++optind; -+ } -+ if (optind < argc) -+ new_user = argv[optind++]; -+ -+ if ((num_supp_groups || use_gid) && restricted) -+ errx(EXIT_FAILURE, _("only root can specify alternative groups")); -+ -+ logindefs_load_defaults = load_config; -+ -+ pw = getpwnam (new_user); -+ if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0] -+ && pw->pw_passwd)) -+ errx (EXIT_FAILURE, _("user %s does not exist"), new_user); -+ -+ /* Make a copy of the password information and point pw at the local -+ copy instead. Otherwise, some systems (e.g. Linux) would clobber -+ the static data through the getlogin call from log_su. -+ Also, make sure pw->pw_shell is a nonempty string. -+ It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), -+ but that doesn't have a default shell listed. */ -+ pw_copy = *pw; -+ pw = &pw_copy; -+ pw->pw_name = xstrdup (pw->pw_name); -+ pw->pw_passwd = xstrdup (pw->pw_passwd); -+ pw->pw_dir = xstrdup (pw->pw_dir); -+ pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0] -+ ? pw->pw_shell -+ : DEFAULT_SHELL); -+ endpwent (); -+ -+ if (num_supp_groups && !use_gid) -+ { -+ pw->pw_gid = groups[1]; -+ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); -+ } -+ else if (use_gid) -+ { -+ pw->pw_gid = groups[0]; -+ num_supp_groups++; -+ } -+ -+ authenticate (pw); -+ -+ if (request_same_session || !command || !pw->pw_uid) -+ same_session = 1; -+ -+ if (!shell && !change_environment) -+ shell = getenv ("SHELL"); -+ if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -+ { -+ /* The user being su'd to has a nonstandard shell, and so is -+ probably a uucp account or has restricted access. Don't -+ compromise the account by allowing access with a standard -+ shell. */ -+ warnx (_("using restricted shell %s"), pw->pw_shell); -+ shell = NULL; -+ } -+ shell = xstrdup (shell ? shell : pw->pw_shell); -+ -+ init_groups (pw, groups, num_supp_groups); -+ -+ create_watching_parent (); -+ /* Now we're in the child. */ -+ -+ change_identity (pw); -+ if (!same_session) -+ setsid (); -+ -+ /* Set environment after pam_open_session, which may put KRB5CCNAME -+ into the pam_env, etc. */ -+ -+ modify_environment (pw, shell); -+ -+ if (simulate_login && chdir (pw->pw_dir) != 0) -+ warn (_("warning: cannot change directory to %s"), pw->pw_dir); -+ -+ run_shell (shell, command, argv + optind, max (0, argc - optind)); -+} -+ -+// vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 -diff --git a/login-utils/su-common.h b/login-utils/su-common.h -new file mode 100644 -index 0000000..4e4dc9d ---- /dev/null -+++ b/login-utils/su-common.h -@@ -0,0 +1,12 @@ -+#ifndef UTIL_LINUX_SU_COMMON_H -+#define UTIL_LINUX_SU_COMMON_H -+ -+enum { -+ SU_MODE, -+ RUNUSER_MODE -+}; -+ -+extern int su_main(int argc, char **argv, int mode); -+ -+#endif /* UTIL_LINUX_SU_COMMON */ -+ -diff --git a/login-utils/su.c b/login-utils/su.c -index f11c757..6179e1b 100644 ---- a/login-utils/su.c -+++ b/login-utils/su.c -@@ -1,754 +1,6 @@ --/* su for Linux. Run a shell with substitute user and group IDs. -- Copyright (C) 1992-2006 Free Software Foundation, Inc. -- Copyright (C) 2012 SUSE Linux Products GmbH, Nuernberg -+#include "su-common.h" - -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2, or (at your option) -- any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software Foundation, -- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -- --/* Run a shell with the real and effective UID and GID and groups -- of USER, default `root'. -- -- The shell run is taken from USER's password entry, /bin/sh if -- none is specified there. If the account has a password, su -- prompts for a password unless run by a user with real UID 0. -- -- Does not change the current directory. -- Sets `HOME' and `SHELL' from the password entry for USER, and if -- USER is not root, sets `USER' and `LOGNAME' to USER. -- The subshell is not a login shell. -- -- If one or more ARGs are given, they are passed as additional -- arguments to the subshell. -- -- Does not handle /bin/sh or other shells specially -- (setting argv[0] to "-su", passing -c only to certain shells, etc.). -- I don't see the point in doing that, and it's ugly. -- -- Based on an implemenation by David MacKenzie . */ -- --enum --{ -- EXIT_CANNOT_INVOKE = 126, -- EXIT_ENOENT = 127 --}; -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include "err.h" -- --#include --#include "c.h" --#include "xalloc.h" --#include "nls.h" --#include "pathnames.h" --#include "env.h" -- --/* name of the pam configuration files. separate configs for su and su - */ --#define PAM_SERVICE_NAME "su" --#define PAM_SERVICE_NAME_L "su-l" -- --#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) -- --#include "logindefs.h" -- --/* The shell to run if none is given in the user's passwd entry. */ --#define DEFAULT_SHELL "/bin/sh" -- --/* The user to become if none is specified. */ --#define DEFAULT_USER "root" -- --#ifndef HAVE_ENVIRON_DECL --extern char **environ; --#endif -- --static void run_shell (char const *, char const *, char **, size_t) -- __attribute__ ((__noreturn__)); -- --/* If true, pass the `-f' option to the subshell. */ --static bool fast_startup; -- --/* If true, simulate a login instead of just starting a shell. */ --static bool simulate_login; -- --/* If true, change some environment vars to indicate the user su'd to. */ --static bool change_environment; -- --/* If true, then don't call setsid() with a command. */ --int same_session = 0; -- --static bool _pam_session_opened; --static bool _pam_cred_established; --static sig_atomic_t volatile caught_signal = false; --static pam_handle_t *pamh = NULL; -- --static struct option const longopts[] = --{ -- {"command", required_argument, NULL, 'c'}, -- {"session-command", required_argument, NULL, 'C'}, -- {"fast", no_argument, NULL, 'f'}, -- {"login", no_argument, NULL, 'l'}, -- {"preserve-environment", no_argument, NULL, 'p'}, -- {"shell", required_argument, NULL, 's'}, -- {"group", required_argument, NULL, 'g'}, -- {"supp-group", required_argument, NULL, 'G'}, -- {"help", no_argument, 0, 'h'}, -- {"version", no_argument, 0, 'V'}, -- {NULL, 0, NULL, 0} --}; -- --/* Log the fact that someone has run su to the user given by PW; -- if SUCCESSFUL is true, they gave the correct password, etc. */ -- --static void --log_su (struct passwd const *pw, bool successful) --{ -- const char *new_user, *old_user, *tty; -- -- new_user = pw->pw_name; -- /* The utmp entry (via getlogin) is probably the best way to identify -- the user, especially if someone su's from a su-shell. */ -- old_user = getlogin (); -- if (!old_user) -- { -- /* getlogin can fail -- usually due to lack of utmp entry. -- Resort to getpwuid. */ -- struct passwd *pwd = getpwuid (getuid ()); -- old_user = (pwd ? pwd->pw_name : ""); -- } -- tty = ttyname (STDERR_FILENO); -- if (!tty) -- tty = "none"; -- -- openlog (program_invocation_short_name, 0 , LOG_AUTH); -- syslog (LOG_NOTICE, "%s(to %s) %s on %s", -- successful ? "" : "FAILED SU ", -- new_user, old_user, tty); -- closelog (); --} -- --static struct pam_conv conv = --{ -- misc_conv, -- NULL --}; -- --static void --cleanup_pam (int retcode) --{ -- int saved_errno = errno; -- -- if (_pam_session_opened) -- pam_close_session (pamh, 0); -- -- if (_pam_cred_established) -- pam_setcred (pamh, PAM_DELETE_CRED | PAM_SILENT); -- -- pam_end(pamh, retcode); -- -- errno = saved_errno; --} -- --/* Signal handler for parent process. */ --static void --su_catch_sig (int sig __attribute__((__unused__))) --{ -- caught_signal = true; --} -- --/* Export env variables declared by PAM modules. */ --static void --export_pamenv (void) --{ -- char **env; -- -- /* This is a copy but don't care to free as we exec later anyways. */ -- env = pam_getenvlist (pamh); -- while (env && *env) -- { -- if (putenv (*env) != 0) -- err (EXIT_FAILURE, NULL); -- env++; -- } --} -- --static void --create_watching_parent (void) --{ -- pid_t child; -- sigset_t ourset; -- int status = 0; -- int retval; -- -- retval = pam_open_session (pamh, 0); -- if (is_pam_failure(retval)) -- { -- cleanup_pam (retval); -- errx (EXIT_FAILURE, _("cannot not open session: %s"), -- pam_strerror (pamh, retval)); -- } -- else -- _pam_session_opened = 1; -- -- child = fork (); -- if (child == (pid_t) -1) -- { -- cleanup_pam (PAM_ABORT); -- err (EXIT_FAILURE, _("cannot create child process")); -- } -- -- /* the child proceeds to run the shell */ -- if (child == 0) -- return; -- -- /* In the parent watch the child. */ -- -- /* su without pam support does not have a helper that keeps -- sitting on any directory so let's go to /. */ -- if (chdir ("/") != 0) -- warn (_("cannot change directory to %s"), "/"); -- -- sigfillset (&ourset); -- if (sigprocmask (SIG_BLOCK, &ourset, NULL)) -- { -- warn (_("cannot block signals")); -- caught_signal = true; -- } -- if (!caught_signal) -- { -- struct sigaction action; -- action.sa_handler = su_catch_sig; -- sigemptyset (&action.sa_mask); -- action.sa_flags = 0; -- sigemptyset (&ourset); -- if (!same_session) -- { -- if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) -- { -- warn (_("cannot set signal handler")); -- caught_signal = true; -- } -- } -- if (!caught_signal && (sigaddset(&ourset, SIGTERM) -- || sigaddset(&ourset, SIGALRM) -- || sigaction(SIGTERM, &action, NULL) -- || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) { -- warn (_("cannot set signal handler")); -- caught_signal = true; -- } -- if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) -- || sigaction(SIGQUIT, &action, NULL))) -- { -- warn (_("cannot set signal handler")); -- caught_signal = true; -- } -- } -- if (!caught_signal) -- { -- pid_t pid; -- for (;;) -- { -- pid = waitpid (child, &status, WUNTRACED); -- -- if (pid != (pid_t)-1 && WIFSTOPPED (status)) -- { -- kill (getpid (), SIGSTOP); -- /* once we get here, we must have resumed */ -- kill (pid, SIGCONT); -- } -- else -- break; -- } -- if (pid != (pid_t)-1) -- if (WIFSIGNALED (status)) -- status = WTERMSIG (status) + 128; -- else -- status = WEXITSTATUS (status); -- else -- status = 1; -- } -- else -- status = 1; -- -- if (caught_signal) -- { -- fprintf (stderr, _("\nSession terminated, killing shell...")); -- kill (child, SIGTERM); -- } -- -- cleanup_pam (PAM_SUCCESS); -- -- if (caught_signal) -- { -- sleep (2); -- kill (child, SIGKILL); -- fprintf (stderr, _(" ...killed.\n")); -- } -- exit (status); --} -- --static void --authenticate (const struct passwd *pw) -+int main (int argc, char **argv) - { -- const struct passwd *lpw; -- const char *cp; -- int retval; -- -- retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, -- pw->pw_name, &conv, &pamh); -- if (is_pam_failure(retval)) -- goto done; -- -- if (isatty (0) && (cp = ttyname (0)) != NULL) -- { -- const char *tty; -- -- if (strncmp (cp, "/dev/", 5) == 0) -- tty = cp + 5; -- else -- tty = cp; -- retval = pam_set_item (pamh, PAM_TTY, tty); -- if (is_pam_failure(retval)) -- goto done; -- } -- -- lpw = getpwuid (getuid ()); -- if (lpw && lpw->pw_name) -- { -- retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); -- if (is_pam_failure(retval)) -- goto done; -- } -- -- retval = pam_authenticate (pamh, 0); -- if (is_pam_failure(retval)) -- goto done; -- -- retval = pam_acct_mgmt (pamh, 0); -- if (retval == PAM_NEW_AUTHTOK_REQD) -- { -- /* Password has expired. Offer option to change it. */ -- retval = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK); -- } -- --done: -- -- log_su (pw, !is_pam_failure(retval)); -- -- if (is_pam_failure(retval)) -- { -- const char *msg = pam_strerror(pamh, retval); -- pam_end(pamh, retval); -- sleep (getlogindefs_num ("FAIL_DELAY", 1)); -- errx (EXIT_FAILURE, "%s", msg?msg:_("incorrect password")); -- } -+ return su_main(argc, argv, SU_MODE); - } -- --static void --set_path(const struct passwd* pw) --{ -- int r; -- if (pw->pw_uid) -- r = logindefs_setenv("PATH", "ENV_PATH", _PATH_DEFPATH); -- -- else if ((r = logindefs_setenv("PATH", "ENV_ROOTPATH", NULL)) != 0) -- r = logindefs_setenv("PATH", "ENV_SUPATH", _PATH_DEFPATH_ROOT); -- -- if (r != 0) -- err (EXIT_FAILURE, _("failed to set PATH")); --} -- --/* Update `environ' for the new shell based on PW, with SHELL being -- the value for the SHELL environment variable. */ -- --static void --modify_environment (const struct passwd *pw, const char *shell) --{ -- if (simulate_login) -- { -- /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. -- Unset all other environment variables. */ -- char const *term = getenv ("TERM"); -- if (term) -- term = xstrdup (term); -- environ = xmalloc ((6 + !!term) * sizeof (char *)); -- environ[0] = NULL; -- if (term) -- xsetenv ("TERM", term, 1); -- xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -- xsetenv ("USER", pw->pw_name, 1); -- xsetenv ("LOGNAME", pw->pw_name, 1); -- set_path(pw); -- } -- else -- { -- /* Set HOME, SHELL, and if not becoming a super-user, -- USER and LOGNAME. */ -- if (change_environment) -- { -- xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -- if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) -- set_path(pw); -- -- if (pw->pw_uid) -- { -- xsetenv ("USER", pw->pw_name, 1); -- xsetenv ("LOGNAME", pw->pw_name, 1); -- } -- } -- } -- -- export_pamenv (); --} -- --/* Become the user and group(s) specified by PW. */ -- --static void --init_groups (const struct passwd *pw, gid_t *groups, int num_groups) --{ -- int retval; -- -- errno = 0; -- -- if (num_groups) -- retval = setgroups (num_groups, groups); -- else -- retval = initgroups (pw->pw_name, pw->pw_gid); -- -- if (retval == -1) -- { -- cleanup_pam (PAM_ABORT); -- err (EXIT_FAILURE, _("cannot set groups")); -- } -- endgrent (); -- -- retval = pam_setcred (pamh, PAM_ESTABLISH_CRED); -- if (is_pam_failure(retval)) -- errx (EXIT_FAILURE, "%s", pam_strerror (pamh, retval)); -- else -- _pam_cred_established = 1; --} -- --static void --change_identity (const struct passwd *pw) --{ -- if (setgid (pw->pw_gid)) -- err (EXIT_FAILURE, _("cannot set group id")); -- if (setuid (pw->pw_uid)) -- err (EXIT_FAILURE, _("cannot set user id")); --} -- --/* Run SHELL, or DEFAULT_SHELL if SHELL is empty. -- If COMMAND is nonzero, pass it to the shell with the -c option. -- Pass ADDITIONAL_ARGS to the shell as more arguments; there -- are N_ADDITIONAL_ARGS extra arguments. */ -- --static void --run_shell (char const *shell, char const *command, char **additional_args, -- size_t n_additional_args) --{ -- size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1; -- char const **args = xcalloc (n_args, sizeof *args); -- size_t argno = 1; -- -- if (simulate_login) -- { -- char *arg0; -- char *shell_basename; -- -- shell_basename = basename (shell); -- arg0 = xmalloc (strlen (shell_basename) + 2); -- arg0[0] = '-'; -- strcpy (arg0 + 1, shell_basename); -- args[0] = arg0; -- } -- else -- args[0] = basename (shell); -- if (fast_startup) -- args[argno++] = "-f"; -- if (command) -- { -- args[argno++] = "-c"; -- args[argno++] = command; -- } -- memcpy (args + argno, additional_args, n_additional_args * sizeof *args); -- args[argno + n_additional_args] = NULL; -- execv (shell, (char **) args); -- -- { -- int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE); -- warn ("%s", shell); -- exit (exit_status); -- } --} -- --/* Return true if SHELL is a restricted shell (one not returned by -- getusershell), else false, meaning it is a standard shell. */ -- --static bool --restricted_shell (const char *shell) --{ -- char *line; -- -- setusershell (); -- while ((line = getusershell ()) != NULL) -- { -- if (*line != '#' && !strcmp (line, shell)) -- { -- endusershell (); -- return false; -- } -- } -- endusershell (); -- return true; --} -- --static void __attribute__((__noreturn__)) --usage (int status) --{ -- if (status != EXIT_SUCCESS) -- fprintf (stderr, _("Try `%s --help' for more information.\n"), -- program_invocation_short_name); -- else -- { -- fputs(USAGE_HEADER, stdout); -- printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -- fputs (_("\n\ -- Change the effective user id and group id to that of USER.\n\ -- A mere - implies -l. If USER not given, assume root.\n"), stdout); -- fputs(USAGE_OPTIONS, stdout); -- fputs (_("\ -- -, -l, --login make the shell a login shell\n\ -- -c, --command pass a single command to the shell with -c\n\ -- --session-command pass a single command to the shell with -c\n\ -- and do not create a new session\n\ -- -g --group=group specify the primary group\n\ -- -G --supp-group=group specify a supplemental group\n\ -- -f, --fast pass -f to the shell (for csh or tcsh)\n\ -- -m, --preserve-environment do not reset environment variables\n\ -- -p same as -m\n\ -- -s, --shell run shell if /etc/shells allows it\n\ --"), stdout); -- -- fputs(USAGE_SEPARATOR, stdout); -- fputs(USAGE_HELP, stdout); -- fputs(USAGE_VERSION, stdout); -- printf(USAGE_MAN_TAIL("su(1)")); -- } -- exit (status); --} -- --static --void load_config(void) --{ -- logindefs_load_file("/etc/default/su"); -- logindefs_load_file(_PATH_LOGINDEFS); --} -- --/* -- * Returns 1 if the current user is not root -- */ --static int --evaluate_uid(void) --{ -- uid_t ruid = getuid(); -- uid_t euid = geteuid(); -- -- /* if we're really root and aren't running setuid */ -- return (uid_t) 0 == ruid && ruid == euid ? 0 : 1; --} -- --int --main (int argc, char **argv) --{ -- int optc; -- const char *new_user = DEFAULT_USER; -- char *command = NULL; -- int request_same_session = 0; -- char *shell = NULL; -- struct passwd *pw; -- struct passwd pw_copy; -- struct group *gr; -- gid_t groups[NGROUPS_MAX]; -- int num_supp_groups = 0; -- int use_gid = 0; -- int restricted; -- -- setlocale (LC_ALL, ""); -- bindtextdomain (PACKAGE, LOCALEDIR); -- textdomain (PACKAGE); -- -- fast_startup = false; -- simulate_login = false; -- change_environment = true; -- -- while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) -- { -- switch (optc) -- { -- case 'c': -- command = optarg; -- break; -- -- case 'C': -- command = optarg; -- request_same_session = 1; -- break; -- -- case 'f': -- fast_startup = true; -- break; -- -- case 'g': -- gr = getgrnam(optarg); -- if (!gr) -- errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -- use_gid = 1; -- groups[0] = gr->gr_gid; -- break; -- -- case 'G': -- num_supp_groups++; -- if (num_supp_groups >= NGROUPS_MAX) -- errx(EXIT_FAILURE, -- _("can't specify more than %d supplemental groups"), -- NGROUPS_MAX - 1); -- gr = getgrnam(optarg); -- if (!gr) -- errx(EXIT_FAILURE, _("group %s does not exist"), optarg); -- groups[num_supp_groups] = gr->gr_gid; -- break; -- -- case 'l': -- simulate_login = true; -- break; -- -- case 'm': -- case 'p': -- change_environment = false; -- break; -- -- case 's': -- shell = optarg; -- break; -- -- case 'h': -- usage(0); -- -- case 'V': -- printf(UTIL_LINUX_VERSION); -- exit(EXIT_SUCCESS); -- -- default: -- usage (EXIT_FAILURE); -- } -- } -- -- restricted = evaluate_uid (); -- -- if (optind < argc && !strcmp (argv[optind], "-")) -- { -- simulate_login = true; -- ++optind; -- } -- if (optind < argc) -- new_user = argv[optind++]; -- -- if ((num_supp_groups || use_gid) && restricted) -- errx(EXIT_FAILURE, _("only root can specify alternative groups")); -- -- logindefs_load_defaults = load_config; -- -- pw = getpwnam (new_user); -- if (! (pw && pw->pw_name && pw->pw_name[0] && pw->pw_dir && pw->pw_dir[0] -- && pw->pw_passwd)) -- errx (EXIT_FAILURE, _("user %s does not exist"), new_user); -- -- /* Make a copy of the password information and point pw at the local -- copy instead. Otherwise, some systems (e.g. Linux) would clobber -- the static data through the getlogin call from log_su. -- Also, make sure pw->pw_shell is a nonempty string. -- It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), -- but that doesn't have a default shell listed. */ -- pw_copy = *pw; -- pw = &pw_copy; -- pw->pw_name = xstrdup (pw->pw_name); -- pw->pw_passwd = xstrdup (pw->pw_passwd); -- pw->pw_dir = xstrdup (pw->pw_dir); -- pw->pw_shell = xstrdup (pw->pw_shell && pw->pw_shell[0] -- ? pw->pw_shell -- : DEFAULT_SHELL); -- endpwent (); -- -- if (num_supp_groups && !use_gid) -- { -- pw->pw_gid = groups[1]; -- memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups); -- } -- else if (use_gid) -- { -- pw->pw_gid = groups[0]; -- num_supp_groups++; -- } -- -- authenticate (pw); -- -- if (request_same_session || !command || !pw->pw_uid) -- same_session = 1; -- -- if (!shell && !change_environment) -- shell = getenv ("SHELL"); -- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -- { -- /* The user being su'd to has a nonstandard shell, and so is -- probably a uucp account or has restricted access. Don't -- compromise the account by allowing access with a standard -- shell. */ -- warnx (_("using restricted shell %s"), pw->pw_shell); -- shell = NULL; -- } -- shell = xstrdup (shell ? shell : pw->pw_shell); -- -- init_groups (pw, groups, num_supp_groups); -- -- create_watching_parent (); -- /* Now we're in the child. */ -- -- change_identity (pw); -- if (!same_session) -- setsid (); -- -- /* Set environment after pam_open_session, which may put KRB5CCNAME -- into the pam_env, etc. */ -- -- modify_environment (pw, shell); -- -- if (simulate_login && chdir (pw->pw_dir) != 0) -- warn (_("warning: cannot change directory to %s"), pw->pw_dir); -- -- run_shell (shell, command, argv + optind, max (0, argc - optind)); --} -- --// vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 --- -1.7.11.7 - diff --git a/0202-runuser-new-command-derived-from-su-1.patch b/0202-runuser-new-command-derived-from-su-1.patch deleted file mode 100644 index 7282092..0000000 --- a/0202-runuser-new-command-derived-from-su-1.patch +++ /dev/null @@ -1,450 +0,0 @@ -From d8c2f623ab9d9e7da1490244cb8c77c3017545dc Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 29 Aug 2012 17:34:26 +0200 -Subject: [PATCH 202/208] runuser: new command (derived from su(1)) - - This command is based on su(1), the differences: - - - based on Fedora runuser su(1) patch - - not installed with suid rights - - allowed for root users only - - don't ask for password - - uses PAM session, for example: - -$ cat /etc/pam.d/runuser -auth sufficient pam_rootok.so -session optional pam_keyinit.so revoke -session required pam_limits.so -session required pam_unix.so - -$ cat /etc/pam.d/runuser-l -auth include runuser -session optional pam_keyinit.so force revoke -session include runuser - -Signed-off-by: Karel Zak ---- - .gitignore | 1 + - configure.ac | 9 ++ - login-utils/Makemodule.am | 13 +++ - login-utils/runuser.1 | 230 ++++++++++++++++++++++++++++++++++++++++++++++ - login-utils/runuser.c | 7 ++ - login-utils/su-common.c | 51 ++++++++-- - 6 files changed, 303 insertions(+), 8 deletions(-) - create mode 100644 login-utils/runuser.1 - create mode 100644 login-utils/runuser.c - -#diff --git a/.gitignore b/.gitignore -#index fbc5636..5be008f 100644 -#--- a/.gitignore -#+++ b/.gitignore -#@@ -138,6 +138,7 @@ tests/run.sh.trs -# /resizepart -# /rev -# /rtcwake -#+/runuser -# /sample-mkfs -# /sample-partitions -# /sample-superblocks -diff --git a/configure.ac b/configure.ac -index 87e85fa..83ef6ce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1149,6 +1149,15 @@ UL_REQUIRES_HAVE([su], [security_pam_misc_h], [PAM header file]) - AM_CONDITIONAL(BUILD_SU, test "x$build_su" = xyes) - - -+AC_ARG_ENABLE([runuser], -+ AS_HELP_STRING([--disable-runuser], [do not build runuser]), -+ [], enable_runuser=yes -+) -+UL_BUILD_INIT([runuser]) -+UL_REQUIRES_HAVE([runuser], [security_pam_misc_h], [PAM header file]) -+AM_CONDITIONAL(BUILD_RUNUSER, test "x$build_runuser" = xyes) -+ -+ - AC_ARG_ENABLE([schedutils], - AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]), - [], enable_schedutils=yes -diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am -index b918f00..e26d9a7 100644 ---- a/login-utils/Makemodule.am -+++ b/login-utils/Makemodule.am -@@ -93,6 +93,19 @@ su_LDADD = $(LDADD) -lpam -lpam_misc - endif - - -+if BUILD_RUNUSER -+bin_PROGRAMS += runuser -+dist_man_MANS += login-utils/runuser.1 -+runuser_SOURCES = \ -+ login-utils/runuser.c \ -+ login-utils/su-common.c \ -+ login-utils/su-common.h \ -+ login-utils/logindefs.c \ -+ login-utils/logindefs.h -+runuser_LDADD = $(LDADD) -lpam -lpam_misc -+endif -+ -+ - if BUILD_NEWGRP - usrbin_exec_PROGRAMS += newgrp - dist_man_MANS += login-utils/newgrp.1 -diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 -new file mode 100644 -index 0000000..66ad1c4 ---- /dev/null -+++ b/login-utils/runuser.1 -@@ -0,0 +1,230 @@ -+.TH RUNUSER "1" "August 2012" "util-linux" "User Commands" -+.SH NAME -+runuser \- run a command with substitute user and group ID -+.SH SYNOPSIS -+.B runuser -+[options...] [\-] [user [args...]] -+.SH DESCRIPTION -+.B runuser -+allows to run commands with substitute user and group ID. -+The difference between the commands -+.B runuser -+and -+.B su -+is that -+.B runuser -+does not ask for password, because it may be executed by root user only. -+The command -+.B runuser -+does not have to be installed with suid permissions. -+.PP -+When called without arguments -+.B runuser -+defaults to running an interactive shell as -+.IR root . -+.PP -+For backward compatibility -+.B runuser -+defaults to not change the current directory and to only set the -+environment variables -+.B HOME -+and -+.B SHELL -+(plus -+.B USER -+and -+.B LOGNAME -+if the target -+.I user -+is not root). It is recommended to always use the -+.B \-\-login -+option (instead it's shortcut -+.BR \- ) -+to avoid side effects caused by mixing environments. -+.PP -+This version of -+.B runuser -+uses PAM for session management. -+.SH OPTIONS -+.TP -+\fB\-c\fR \fIcommand\fR, \fB\-\-command\fR=\fIcommand\fR -+Pass -+.I command -+to the shell with the -+.B \-c -+option. -+.TP -+\fB\-\-session\-command\fR=\fIcommand\fR -+Same as -+.B \-c -+but do not create a new session (discouraged). -+.TP -+\fB\-f\fR, \fB\-\-fast\fR -+Pass -+.B \-f -+to the shell which may or may not be useful depending on the -+shell. -+.TP -+\fB\-g\fR, \fB\-\-group\fR=\fIgroup\fR\fR -+specify the primary group, this option is allowed for root user only -+.TP -+\fB\-G\fR, \fB\-\-supp-group\fR=\fIgroup\fR\fR -+specify a supplemental group, this option is allowed for root user only -+.TP -+\fB\-\fR, \fB\-l\fR, \fB\-\-login\fR -+Starts the shell as login shell with an environment similar to a real -+login: -+.RS 10 -+.TP -+o -+clears all environment variables except for -+.B TERM -+.TP -+o -+initializes the environment variables -+.BR HOME , -+.BR SHELL , -+.BR USER , -+.BR LOGNAME , -+.B PATH -+.TP -+o -+changes to the target user's home directory -+.TP -+o -+sets argv[0] of the shell to -+.RB ' \- ' -+in order to make the shell a login shell -+.RE -+.TP -+\fB\-m\fR, \fB\-p\fR, \fB\-\-preserve-environment\fR -+Preserves the whole environment, ie does not set -+.BR HOME , -+.BR SHELL , -+.B USER -+nor -+.BR LOGNAME . -+.TP -+\fB\-s\fR \fISHELL\fR, \fB\-\-shell\fR=\fISHELL\fR -+Runs the specified shell instead of the default. The shell to run is -+selected according to the following rules in order: -+.RS 10 -+.TP -+o -+the shell specified with -+.B \-\-shell -+.TP -+o -+The shell specified in the environment variable -+.B SHELL -+if the -+.B \-\-preserve-environment -+option is used. -+.TP -+o -+the shell listed in the passwd entry of the target user -+.TP -+o -+/bin/sh -+.RE -+.IP -+If the target user has a restricted shell (i.e. not listed in -+/etc/shells) the -+.B \-\-shell -+option and the -+.B SHELL -+environment variables are ignored unless the calling user is root. -+.TP -+\fB\-\-help\fR -+Display help text and exit. -+.TP -+\fB\-\-version\fR -+Display version information and exit. -+.SH CONFIG FILES -+.B runuser -+reads the -+.I /etc/default/runuser -+and -+.I /etc/login.defs -+configuration files. The following configuration items are relevant -+for -+.BR runuser : -+.PP -+.B ENV_PATH -+(string) -+.RS 4 -+Defines the PATH environment variable for a regular user. The -+default value is -+.IR /usr/local/bin:\:/bin:\:/usr/bin . -+.RE -+.PP -+.B ENV_ROOTPATH -+(string) -+.br -+.B ENV_SUPATH -+(string) -+.RS 4 -+Defines the PATH environment variable for root. The default value is -+.IR /usr/local/sbin:\:/usr/local/bin:\:/sbin:\:/bin:\:/usr/sbin:\:/usr/bin . -+.RE -+.PP -+.B ALWAYS_SET_PATH -+(boolean) -+.RS 4 -+If set to -+.I yes -+and \-\-login and \-\-preserve\-environment were not specified -+.B runuser -+initializes -+.BR PATH . -+.RE -+.SH EXIT STATUS -+.B runuser -+normally returns the exit status of the command it executed. If the -+command was killed by a signal, -+.B runuser -+returns the number of the signal plus 128. -+.PP -+Exit status generated by -+.B runuser -+itself: -+.RS 10 -+.TP -+1 -+Generic error before executing the requested command -+.TP -+126 -+The requested command could not be executed -+.TP -+127 -+The requested command could was not found -+.RE -+.SH FILES -+.PD 0 -+.TP 17 -+/etc/pam.d/runuser -+default PAM configuration file -+.TP -+/etc/pam.d/runuser-l -+PAM configuration file if \-\-login is specified -+.TP -+/etc/default/runuser -+runuser specific logindef config file -+.TP -+/etc/login.defs -+global logindef config file -+.PD 1 -+.SH "SEE ALSO" -+.BR pam (8), -+.BR shells (5), -+.BR login.defs (5), -+.BR su (1) -+.SH AUTHOR -+Derived from coreutils' su which was based on an implemenation from -+David MacKenzie and Fedora runuser command from Dan Walsh. -+.SH AVAILABILITY -+The runuser command is part of the util-linux package and is -+available from -+.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ -+Linux Kernel Archive -+.UE . -diff --git a/login-utils/runuser.c b/login-utils/runuser.c -new file mode 100644 -index 0000000..d4f37f4 ---- /dev/null -+++ b/login-utils/runuser.c -@@ -0,0 +1,7 @@ -+ -+#include "su-common.h" -+ -+int main(int argc, char **argv) -+{ -+ return su_main(argc, argv, RUNUSER_MODE); -+} -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index f1f46aa..770f455 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -65,8 +65,14 @@ enum - #include "env.h" - - /* name of the pam configuration files. separate configs for su and su - */ --#define PAM_SERVICE_NAME "su" --#define PAM_SERVICE_NAME_L "su-l" -+#define PAM_SRVNAME_SU "su" -+#define PAM_SRVNAME_SU_L "su-l" -+ -+#define PAM_SRVNAME_RUNUSER "runuser" -+#define PAM_SRVNAME_RUNUSER_L "runuser-l" -+ -+#define _PATH_LOGINDEFS_SU "/etc/defaults/su" -+#define _PATH_LOGINDEFS_RUNUSER "/etc/defaults/runuser" - - #define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) - -@@ -106,6 +112,8 @@ static bool _pam_cred_established; - static sig_atomic_t volatile caught_signal = false; - static pam_handle_t *pamh = NULL; - -+static int restricted = 1; /* zero for root user */ -+ - static struct option const longopts[] = - { - {"command", required_argument, NULL, 'c'}, -@@ -146,7 +154,8 @@ log_su (struct passwd const *pw, bool successful) - - openlog (program_invocation_short_name, 0 , LOG_AUTH); - syslog (LOG_NOTICE, "%s(to %s) %s on %s", -- successful ? "" : "FAILED SU ", -+ successful ? "" : -+ su_mode == RUNUSER_MODE ? "FAILED RUNUSER " : "FAILED SU ", - new_user, old_user, tty); - closelog (); - } -@@ -315,11 +324,19 @@ static void - authenticate (const struct passwd *pw) - { - const struct passwd *lpw; -- const char *cp; -+ const char *cp, *srvname = NULL; - int retval; - -- retval = pam_start (simulate_login ? PAM_SERVICE_NAME_L : PAM_SERVICE_NAME, -- pw->pw_name, &conv, &pamh); -+ switch (su_mode) { -+ case SU_MODE: -+ srvname = simulate_login ? PAM_SRVNAME_SU_L : PAM_SRVNAME_SU; -+ break; -+ case RUNUSER_MODE: -+ srvname = simulate_login ? PAM_SRVNAME_RUNUSER_L : PAM_SRVNAME_RUNUSER; -+ break; -+ } -+ -+ retval = pam_start (srvname, pw->pw_name, &conv, &pamh); - if (is_pam_failure(retval)) - goto done; - -@@ -344,6 +361,17 @@ authenticate (const struct passwd *pw) - goto done; - } - -+ if (su_mode == RUNUSER_MODE) -+ { -+ /* -+ * This is the only difference between runuser(1) and su(1). The command -+ * runuser(1) does not required authentication, because user is root. -+ */ -+ if (restricted) -+ errx(EXIT_FAILURE, _("may not be used by non-root users")); -+ return; -+ } -+ - retval = pam_authenticate (pamh, 0); - if (is_pam_failure(retval)) - goto done; -@@ -567,7 +595,15 @@ usage (int status) - static - void load_config(void) - { -- logindefs_load_file("/etc/default/su"); -+ switch (su_mode) { -+ case SU_MODE: -+ logindefs_load_file(_PATH_LOGINDEFS_SU); -+ break; -+ case RUNUSER_MODE: -+ logindefs_load_file(_PATH_LOGINDEFS_RUNUSER); -+ break; -+ } -+ - logindefs_load_file(_PATH_LOGINDEFS); - } - -@@ -598,7 +634,6 @@ su_main (int argc, char **argv, int mode) - gid_t groups[NGROUPS_MAX]; - int num_supp_groups = 0; - int use_gid = 0; -- int restricted; - - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); --- -1.7.11.7 - diff --git a/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch b/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch deleted file mode 100644 index 2ab11bc..0000000 --- a/0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 8f33f59e72bef913068f9a80338f12d8d4434010 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Sep 2012 11:13:34 +0200 -Subject: [PATCH 203/208] su: more robust getpwuid() for GNU Hurt [coreutils - 71b7ddc] - -Let's support GNU Hurd over-engineering where a process can exist -without UID and getuid() returns -1 and sets errno. - -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 26 +++++++++++++++++++++++--- - 1 file changed, 23 insertions(+), 3 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 770f455..a253dda 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -129,6 +129,26 @@ static struct option const longopts[] = - {NULL, 0, NULL, 0} - }; - -+ -+static struct passwd * -+current_getpwuid(void) -+{ -+ uid_t ruid; -+ -+ /* GNU Hurd implementation has an extension where a process can exist in a -+ * non-conforming environment, and thus be outside the realms of POSIX -+ * process identifiers; on this platform, getuid() fails with a status of -+ * (uid_t)(-1) and sets errno if a program is run from a non-conforming -+ * environment. -+ * -+ * http://austingroupbugs.net/view.php?id=511 -+ */ -+ errno = 0; -+ ruid = getuid (); -+ -+ return errno == 0 ? getpwuid (ruid) : NULL; -+} -+ - /* Log the fact that someone has run su to the user given by PW; - if SUCCESSFUL is true, they gave the correct password, etc. */ - -@@ -145,8 +165,8 @@ log_su (struct passwd const *pw, bool successful) - { - /* getlogin can fail -- usually due to lack of utmp entry. - Resort to getpwuid. */ -- struct passwd *pwd = getpwuid (getuid ()); -- old_user = (pwd ? pwd->pw_name : ""); -+ struct passwd *pwd = current_getpwuid(); -+ old_user = pwd ? pwd->pw_name : ""; - } - tty = ttyname (STDERR_FILENO); - if (!tty) -@@ -353,7 +373,7 @@ authenticate (const struct passwd *pw) - goto done; - } - -- lpw = getpwuid (getuid ()); -+ lpw = current_getpwuid (); - if (lpw && lpw->pw_name) - { - retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); --- -1.7.11.7 - diff --git a/0204-su-verify-writing-to-streams-was-successful.patch b/0204-su-verify-writing-to-streams-was-successful.patch deleted file mode 100644 index 4418ff5..0000000 --- a/0204-su-verify-writing-to-streams-was-successful.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 589e24a625c5e83805e95b917eaf3bf1be64369e Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Sep 2012 11:21:07 +0200 -Subject: [PATCH 204/208] su: verify writing to streams was successful - -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index a253dda..1f97328 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -63,6 +63,7 @@ enum - #include "nls.h" - #include "pathnames.h" - #include "env.h" -+#include "closestream.h" - - /* name of the pam configuration files. separate configs for su and su - */ - #define PAM_SRVNAME_SU "su" -@@ -658,6 +659,7 @@ su_main (int argc, char **argv, int mode) - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); -+ atexit(close_stdout); - - su_mode = mode; - fast_startup = false; --- -1.7.11.7 - diff --git a/0205-su-move-long-options-to-main.patch b/0205-su-move-long-options-to-main.patch deleted file mode 100644 index ed57c5d..0000000 --- a/0205-su-move-long-options-to-main.patch +++ /dev/null @@ -1,60 +0,0 @@ -From bea3752e9d048895b6750e2d0d8ce72fed20cef9 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Sep 2012 11:26:20 +0200 -Subject: [PATCH 205/208] su: move long options to main() - -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 1f97328..778738f 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -115,21 +115,6 @@ static pam_handle_t *pamh = NULL; - - static int restricted = 1; /* zero for root user */ - --static struct option const longopts[] = --{ -- {"command", required_argument, NULL, 'c'}, -- {"session-command", required_argument, NULL, 'C'}, -- {"fast", no_argument, NULL, 'f'}, -- {"login", no_argument, NULL, 'l'}, -- {"preserve-environment", no_argument, NULL, 'p'}, -- {"shell", required_argument, NULL, 's'}, -- {"group", required_argument, NULL, 'g'}, -- {"supp-group", required_argument, NULL, 'G'}, -- {"help", no_argument, 0, 'h'}, -- {"version", no_argument, 0, 'V'}, -- {NULL, 0, NULL, 0} --}; -- - - static struct passwd * - current_getpwuid(void) -@@ -656,6 +641,20 @@ su_main (int argc, char **argv, int mode) - int num_supp_groups = 0; - int use_gid = 0; - -+ static const struct option longopts[] = { -+ {"command", required_argument, NULL, 'c'}, -+ {"session-command", required_argument, NULL, 'C'}, -+ {"fast", no_argument, NULL, 'f'}, -+ {"login", no_argument, NULL, 'l'}, -+ {"preserve-environment", no_argument, NULL, 'p'}, -+ {"shell", required_argument, NULL, 's'}, -+ {"group", required_argument, NULL, 'g'}, -+ {"supp-group", required_argument, NULL, 'G'}, -+ {"help", no_argument, 0, 'h'}, -+ {"version", no_argument, 0, 'V'}, -+ {NULL, 0, NULL, 0} -+ }; -+ - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); --- -1.7.11.7 - diff --git a/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch b/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch deleted file mode 100644 index ffb3df8..0000000 --- a/0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1fe22a730b1a6595c6da9ea8cd58594337e66dc3 Mon Sep 17 00:00:00 2001 -From: Ondrej Oprala -Date: Tue, 11 Sep 2012 16:39:17 +0200 -Subject: [PATCH 206/208] su: add segmentation fault reporting of the child - process -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Child processes that ended with segmentation fault previously -indicated this with return status only. The report is now more -verbose if core dump is allowed. - -Improved-by: Pádraig Brady -Signed-off-by: Ondrej Oprala ---- - login-utils/su-common.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 778738f..118e080 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -300,7 +300,12 @@ create_watching_parent (void) - } - if (pid != (pid_t)-1) - if (WIFSIGNALED (status)) -- status = WTERMSIG (status) + 128; -+ { -+ status = WTERMSIG (status) + 128; -+ if (WCOREDUMP (status)) -+ fprintf (stderr, _("%s (core dumped)\n"), -+ strsignal (WTERMSIG (status))); -+ } - else - status = WEXITSTATUS (status); - else --- -1.7.11.7 - diff --git a/0207-su-fixed-a-typo-in-pam-error-message.patch b/0207-su-fixed-a-typo-in-pam-error-message.patch deleted file mode 100644 index f5c19d6..0000000 --- a/0207-su-fixed-a-typo-in-pam-error-message.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2f3cb337e1cda9e897480f256453f369914380b3 Mon Sep 17 00:00:00 2001 -From: Vitezslav Cizek -Date: Mon, 1 Oct 2012 14:48:16 +0200 -Subject: [PATCH 207/208] su: fixed a typo in pam error message - -Signed-off-by: Vitezslav Cizek ---- - login-utils/su-common.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 118e080..ea6864e 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -223,7 +223,7 @@ create_watching_parent (void) - if (is_pam_failure(retval)) - { - cleanup_pam (retval); -- errx (EXIT_FAILURE, _("cannot not open session: %s"), -+ errx (EXIT_FAILURE, _("cannot open session: %s"), - pam_strerror (pamh, retval)); - } - else --- -1.7.11.7 - diff --git a/0208-runuser-add-u-to-not-execute-shell.patch b/0208-runuser-add-u-to-not-execute-shell.patch deleted file mode 100644 index 5085956..0000000 --- a/0208-runuser-add-u-to-not-execute-shell.patch +++ /dev/null @@ -1,281 +0,0 @@ -From f0c57c2b1129b17e68e54d08421d1f209f1b6c57 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 13 Sep 2012 11:58:00 +0200 -Subject: [PATCH 208/208] runuser: add -u to not execute shell - -Signed-off-by: Karel Zak ---- - login-utils/runuser.1 | 20 ++++--- - login-utils/su-common.c | 138 +++++++++++++++++++++++++++++++----------------- - login-utils/su.1 | 1 + - 3 files changed, 105 insertions(+), 54 deletions(-) - -diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 -index 66ad1c4..4620165 100644 ---- a/login-utils/runuser.1 -+++ b/login-utils/runuser.1 -@@ -3,10 +3,21 @@ - runuser \- run a command with substitute user and group ID - .SH SYNOPSIS - .B runuser --[options...] [\-] [user [args...]] -+[options] -u -+.IR user -+.IR "command " [ argument ...] -+.LP -+.B runuser -+[options] [-] -+[ -+.IR "user " [ argument ...] -+] - .SH DESCRIPTION - .B runuser - allows to run commands with substitute user and group ID. -+If the option \fB\-u\fR not given, fallback to -+.B su -+compatible semantic and shell is executed. - The difference between the commands - .B runuser - and -@@ -36,12 +47,7 @@ and - .B LOGNAME - if the target - .I user --is not root). It is recommended to always use the --.B \-\-login --option (instead it's shortcut --.BR \- ) --to avoid side effects caused by mixing environments. --.PP -+is not root). - This version of - .B runuser - uses PAM for session management. -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index ea6864e..4e1f6b2 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -439,7 +439,8 @@ modify_environment (const struct passwd *pw, const char *shell) - if (term) - xsetenv ("TERM", term, 1); - xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -+ if (shell) -+ xsetenv ("SHELL", shell, 1); - xsetenv ("USER", pw->pw_name, 1); - xsetenv ("LOGNAME", pw->pw_name, 1); - set_path(pw); -@@ -451,7 +452,8 @@ modify_environment (const struct passwd *pw, const char *shell) - if (change_environment) - { - xsetenv ("HOME", pw->pw_dir, 1); -- xsetenv ("SHELL", shell, 1); -+ if (shell) -+ xsetenv ("SHELL", shell, 1); - if (getlogindefs_bool ("ALWAYS_SET_PATH", 0)) - set_path(pw); - -@@ -571,35 +573,47 @@ restricted_shell (const char *shell) - static void __attribute__((__noreturn__)) - usage (int status) - { -- if (status != EXIT_SUCCESS) -- fprintf (stderr, _("Try `%s --help' for more information.\n"), -- program_invocation_short_name); -- else -- { -- fputs(USAGE_HEADER, stdout); -- printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -- fputs (_("\n\ -- Change the effective user id and group id to that of USER.\n\ -- A mere - implies -l. If USER not given, assume root.\n"), stdout); -- fputs(USAGE_OPTIONS, stdout); -- fputs (_("\ -- -, -l, --login make the shell a login shell\n\ -- -c, --command pass a single command to the shell with -c\n\ -- --session-command pass a single command to the shell with -c\n\ -- and do not create a new session\n\ -- -g --group=group specify the primary group\n\ -- -G --supp-group=group specify a supplemental group\n\ -- -f, --fast pass -f to the shell (for csh or tcsh)\n\ -- -m, --preserve-environment do not reset environment variables\n\ -- -p same as -m\n\ -- -s, --shell run shell if /etc/shells allows it\n\ --"), stdout); -- -- fputs(USAGE_SEPARATOR, stdout); -- fputs(USAGE_HELP, stdout); -- fputs(USAGE_VERSION, stdout); -- printf(USAGE_MAN_TAIL("su(1)")); -- } -+ if (su_mode == RUNUSER_MODE) { -+ fputs(USAGE_HEADER, stdout); -+ printf (_(" %s [options] -u COMMAND\n"), program_invocation_short_name); -+ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -+ fputs (_("\n" -+ "Run COMMAND with the effective id and group id. If -u not\n" -+ "given, fallback to su(1) compatible semantic and shell is executed.\n" -+ "The options -l, -c, -f, -s are mutually exclusive to -u.\n"), stdout); -+ -+ fputs(USAGE_OPTIONS, stdout); -+ -+ fputs (_( -+ " -u, --user username\n"), stdout); -+ -+ } else { -+ fputs(USAGE_HEADER, stdout); -+ printf (_(" %s [options] [-] [USER [arg]...]\n"), program_invocation_short_name); -+ fputs (_("\n" -+ "Change the effective user id and group id to that of USER.\n" -+ "A mere - implies -l. If USER not given, assume root.\n"), stdout); -+ -+ fputs(USAGE_OPTIONS, stdout); -+ } -+ -+ fputs (_( -+ " -m, -p, --preserve-environment do not reset environment variables\n" -+ " -g, --group specify the primary group\n" -+ " -G, --supp-group specify a supplemental group\n\n"), stdout); -+ -+ fputs (_( -+ " -, -l, --login make the shell a login shell\n" -+ " -c, --command pass a single command to the shell with -c\n" -+ " --session-command pass a single command to the shell with -c\n" -+ " and do not create a new session\n" -+ " -f, --fast pass -f to the shell (for csh or tcsh)\n" -+ " -s, --shell run shell if /etc/shells allows it\n"), stdout); -+ -+ fputs(USAGE_SEPARATOR, stdout); -+ fputs(USAGE_HELP, stdout); -+ fputs(USAGE_VERSION, stdout); -+ printf(USAGE_MAN_TAIL(su_mode == SU_MODE ? "su(1)" : "runuser(1)")); - exit (status); - } - -@@ -635,7 +649,7 @@ int - su_main (int argc, char **argv, int mode) - { - int optc; -- const char *new_user = DEFAULT_USER; -+ const char *new_user = DEFAULT_USER, *runuser_user = NULL; - char *command = NULL; - int request_same_session = 0; - char *shell = NULL; -@@ -655,6 +669,7 @@ su_main (int argc, char **argv, int mode) - {"shell", required_argument, NULL, 's'}, - {"group", required_argument, NULL, 'g'}, - {"supp-group", required_argument, NULL, 'G'}, -+ {"user", required_argument, NULL, 'u'}, /* runuser only */ - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'V'}, - {NULL, 0, NULL, 0} -@@ -670,7 +685,7 @@ su_main (int argc, char **argv, int mode) - simulate_login = false; - change_environment = true; - -- while ((optc = getopt_long (argc, argv, "c:fg:G:lmps:hV", longopts, NULL)) != -1) -+ while ((optc = getopt_long (argc, argv, "+c:fg:G:lmps:u:hV", longopts, NULL)) != -1) - { - switch (optc) - { -@@ -720,6 +735,12 @@ su_main (int argc, char **argv, int mode) - shell = optarg; - break; - -+ case 'u': -+ if (su_mode != RUNUSER_MODE) -+ usage (EXIT_FAILURE); -+ runuser_user = optarg; -+ break; -+ - case 'h': - usage(0); - -@@ -739,8 +760,21 @@ su_main (int argc, char **argv, int mode) - simulate_login = true; - ++optind; - } -- if (optind < argc) -+ -+ /* if not "-u " specified then fallback to classic su(1) */ -+ if (!runuser_user && optind < argc) - new_user = argv[optind++]; -+ else { -+ /* runuser -u */ -+ new_user = runuser_user; -+ if (shell || fast_startup || command || simulate_login) { -+ errx(EXIT_FAILURE, -+ _("options --{shell,fast,command,session-command,login} and " -+ "--user are mutually exclusive.")); -+ } -+ if (optind == argc) -+ errx(EXIT_FAILURE, _("COMMAND not specified.")); -+ } - - if ((num_supp_groups || use_gid) && restricted) - errx(EXIT_FAILURE, _("only root can specify alternative groups")); -@@ -784,18 +818,23 @@ su_main (int argc, char **argv, int mode) - if (request_same_session || !command || !pw->pw_uid) - same_session = 1; - -- if (!shell && !change_environment) -- shell = getenv ("SHELL"); -- if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -- { -- /* The user being su'd to has a nonstandard shell, and so is -- probably a uucp account or has restricted access. Don't -- compromise the account by allowing access with a standard -- shell. */ -- warnx (_("using restricted shell %s"), pw->pw_shell); -- shell = NULL; -- } -- shell = xstrdup (shell ? shell : pw->pw_shell); -+ /* initialize shell variable only if "-u " not specified */ -+ if (runuser_user) { -+ shell = NULL; -+ } else { -+ if (!shell && !change_environment) -+ shell = getenv ("SHELL"); -+ if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) -+ { -+ /* The user being su'd to has a nonstandard shell, and so is -+ probably a uucp account or has restricted access. Don't -+ compromise the account by allowing access with a standard -+ shell. */ -+ warnx (_("using restricted shell %s"), pw->pw_shell); -+ shell = NULL; -+ } -+ shell = xstrdup (shell ? shell : pw->pw_shell); -+ } - - init_groups (pw, groups, num_supp_groups); - -@@ -814,7 +853,12 @@ su_main (int argc, char **argv, int mode) - if (simulate_login && chdir (pw->pw_dir) != 0) - warn (_("warning: cannot change directory to %s"), pw->pw_dir); - -- run_shell (shell, command, argv + optind, max (0, argc - optind)); -+ if (shell) -+ run_shell (shell, command, argv + optind, max (0, argc - optind)); -+ else { -+ execvp(argv[optind], &argv[optind]); -+ err(EXIT_FAILURE, _("executing %s failed"), argv[optind]); -+ } - } - - // vim: sw=2 cinoptions=>4,n-2,{2,^-2,\:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 -diff --git a/login-utils/su.1 b/login-utils/su.1 -index 59e1731..c82b941 100644 ---- a/login-utils/su.1 -+++ b/login-utils/su.1 -@@ -216,6 +216,7 @@ command specific logindef config file - global logindef config file - .PD 1 - .SH "SEE ALSO" -+.BR runuser (8), - .BR pam (8), - .BR shells (5), - .BR login.defs (5) --- -1.7.11.7 - diff --git a/0209-build-sys-move-runuser-to-sbin-dir.patch b/0209-build-sys-move-runuser-to-sbin-dir.patch deleted file mode 100644 index ab87cbc..0000000 --- a/0209-build-sys-move-runuser-to-sbin-dir.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 69658513d00635048f5de76ed73f4a43a61d374d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 1 Nov 2012 13:12:02 +0100 -Subject: [PATCH] build-sys: move runuser to sbin dir - -Signed-off-by: Karel Zak ---- - login-utils/Makemodule.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am -index e26d9a7..0d8e8b1 100644 ---- a/login-utils/Makemodule.am -+++ b/login-utils/Makemodule.am -@@ -94,7 +94,7 @@ endif - - - if BUILD_RUNUSER --bin_PROGRAMS += runuser -+sbin_PROGRAMS += runuser - dist_man_MANS += login-utils/runuser.1 - runuser_SOURCES = \ - login-utils/runuser.c \ --- -1.7.11.7 - diff --git a/0210-su-fix-COMMAND-not-specified-error.patch b/0210-su-fix-COMMAND-not-specified-error.patch deleted file mode 100644 index c1818c0..0000000 --- a/0210-su-fix-COMMAND-not-specified-error.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 360e088738aa792bf6c52e777d64b5163b45362a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 7 Nov 2012 15:20:39 +0100 -Subject: [PATCH] su: fix "COMMAND not specified" error - - # su - su: COMMAND not specified - -This error message make sense for "runuser -u " only. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=872787 -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 29 +++++++++++++++++++---------- - 1 file changed, 19 insertions(+), 10 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index 1fa76c8..5abdc84 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -761,19 +761,28 @@ su_main (int argc, char **argv, int mode) - ++optind; - } - -- /* if not "-u " specified then fallback to classic su(1) */ -- if (!runuser_user && optind < argc) -- new_user = argv[optind++]; -- else { -- /* runuser -u */ -- new_user = runuser_user; -- if (shell || fast_startup || command || simulate_login) { -- errx(EXIT_FAILURE, -+ switch (su_mode) { -+ case RUNUSER_MODE: -+ if (runuser_user) { -+ /* runuser -u */ -+ new_user = runuser_user; -+ if (shell || fast_startup || command || simulate_login) { -+ errx(EXIT_FAILURE, - _("options --{shell,fast,command,session-command,login} and " - "--user are mutually exclusive.")); -+ } -+ if (optind == argc) -+ errx(EXIT_FAILURE, _("COMMAND not specified.")); -+ -+ break; - } -- if (optind == argc) -- errx(EXIT_FAILURE, _("COMMAND not specified.")); -+ /* fallthrough if -u is not specified, then follow -+ * traditional su(1) behavior -+ */ -+ case SU_MODE: -+ if (optind < argc) -+ new_user = argv[optind++]; -+ break; - } - - if ((num_supp_groups || use_gid) && restricted) --- -1.7.11.7 - diff --git a/sources b/sources index e03cca9..23dd002 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -eeacbfdd2556acd899a2d0ffdb446185 util-linux-2.22.2.tar.xz a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 +62a5e17c2710da8974e55c6fa5711122 util-linux-2.23-rc1.tar.xz diff --git a/util-linux-2.22-ipcs-32bit.patch b/util-linux-2.22-ipcs-32bit.patch deleted file mode 100644 index b6d5149..0000000 --- a/util-linux-2.22-ipcs-32bit.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up util-linux-2.22.2/sys-utils/ipcs.c.kzak util-linux-2.22.2/sys-utils/ipcs.c ---- util-linux-2.22.2/sys-utils/ipcs.c.kzak 2012-12-12 21:04:47.976355744 +0100 -+++ util-linux-2.22.2/sys-utils/ipcs.c 2013-02-19 16:12:54.712551108 +0100 -@@ -264,6 +264,27 @@ static void print_perms (int id, struct - printf(" %-10u\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) - { - int maxid, shmid, id; -@@ -288,12 +309,12 @@ void do_shm (char format) - * 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.spec b/util-linux.spec index 7a6f711..d6af783 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.22.2 -Release: 6%{?dist} -License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain +Version: 2.23 +Release: 0.1%{?dist} +License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros %define floppyver 0.18 @@ -23,11 +23,8 @@ BuildRequires: zlib-devel BuildRequires: popt-devel BuildRequires: libutempter-devel Buildrequires: systemd-devel - -# because backported su(1) and runuser(1) patches -BuildRequires: automake -BuildRequires: autoconf -BuildRequires: libtool +Buildrequires: libuser-devel +BuildRequires: libcap-ng-devel ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/util-linux-%{upstream_version}.tar.xz @@ -88,40 +85,6 @@ Patch2: util-linux-2.19-floppy-generic.patch ### # 151635 - makeing /var/log/lastlog Patch3: util-linux-ng-2.22-login-lastlog.patch -# 231192 - ipcs is not printing correct values on pLinux -Patch4: util-linux-2.22-ipcs-32bit.patch - -### -### Upstream patches (2.23 or 2.22.x) -# 889888 - wipefs does not completely wipe btrfs volume -Patch100: libblkid-add-support-for-btrfs-backup-superblock.patch -# 882305 - agetty: unstable /dev/tty* permissions -Patch101: agetty-replace-perms-660-to-620.patch -# 885314 - hexdump segfault -Patch102: hexdump-do-not-segfault-when-iterating-over-an-empty.patch -# 896447 - No newlines in piped "cal" command -Patch103: cal-don-t-mix-ncurses-output-functions-and-printf.patch -# upstream patch -Patch104: libblkid-remove-optimization-from-verify-function.patch -# 902512 - No boot : Dependency failed for /home (and blkid fails to tell UUID) -Patch105: libblkid-make-backup-superblock-visible-for-wipefs-8.patch - -### Upstream patches from master branch (will be v2.23) for su(1) and new -### runuser(1) implementation. This is required for the recent coreutils where -### is no more su(1). -### -Patch200: 0200-su-add-group-and-supp-group-options.patch -Patch201: 0201-su-move-generic-su-code-to-su-common.c.patch -Patch202: 0202-runuser-new-command-derived-from-su-1.patch -Patch203: 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch -Patch204: 0204-su-verify-writing-to-streams-was-successful.patch -Patch205: 0205-su-move-long-options-to-main.patch -Patch206: 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch -Patch207: 0207-su-fixed-a-typo-in-pam-error-message.patch -Patch208: 0208-runuser-add-u-to-not-execute-shell.patch -Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch -Patch210: 0210-su-fix-COMMAND-not-specified-error.patch - %description The util-linux package contains a large variety of low-level system @@ -244,8 +207,6 @@ done %build unset LINGUAS || : -./autogen.sh - export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -358,8 +319,8 @@ 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* \ +for I in /usr/{bin,sbin}/{fdformat,floppy} \ + %{_mandir}/man8/{fdformat,floppy}.8* \ /usr/sbin/{hwclock,clock} \ %{_mandir}/man8/{hwclock,clock}.8*; do @@ -549,6 +510,7 @@ fi %{_bindir}/more %{_bindir}/mountpoint %{_bindir}/namei +%{_bindir}/nsenter %{_bindir}/prlimit %{_bindir}/raw %{_bindir}/rename @@ -557,6 +519,7 @@ fi %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch +%{_bindir}/setpriv %{_bindir}/setsid %{_bindir}/setterm %{_bindir}/tailf @@ -594,6 +557,7 @@ fi %{_mandir}/man1/more.1* %{_mandir}/man1/mountpoint.1* %{_mandir}/man1/namei.1* +%{_mandir}/man1/nsenter.1* %{_mandir}/man1/prlimit.1* %{_mandir}/man1/rename.1* %{_mandir}/man1/renice.1* @@ -601,6 +565,7 @@ fi %{_mandir}/man1/runuser.1* %{_mandir}/man1/script.1* %{_mandir}/man1/scriptreplay.1* +%{_mandir}/man1/setpriv.1* %{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* @@ -615,6 +580,7 @@ fi %{_mandir}/man5/fstab.5* %{_mandir}/man8/addpart.8* %{_mandir}/man8/agetty.8* +%{_mandir}/man8/blkdiscard.8* %{_mandir}/man8/blkid.8* %{_mandir}/man8/blockdev.8* %{_mandir}/man8/chcpu.8* @@ -655,6 +621,7 @@ fi %{_mandir}/man8/wipefs.8* %{_sbindir}/addpart %{_sbindir}/agetty +%{_sbindir}/blkdiscard %{_sbindir}/blkid %{_sbindir}/blockdev %{_sbindir}/chcpu @@ -692,12 +659,10 @@ fi %{_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} @@ -780,6 +745,12 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Fri Mar 22 2013 Karel Zak 2.23-0.1 +- upgrade to the release 2.22-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes +- add nsenter and blkdiscard +- remove tunelp + * Wed Feb 20 2013 Karel Zak 2.22.2-6 - fix #912778 - "runuser -l" doesn't register session to systemd From 4788cbd6e78c7063c6607e89457eab611e4f4700 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Mar 2013 10:53:32 +0100 Subject: [PATCH 137/425] 2.23-0.2: libmount fixes Signed-off-by: Karel Zak --- ...r-mount-by-root-for-mount.-type-help.patch | 50 ++++++++++++++ ...crashes-when-trying-to-umount-a-non-.patch | 69 +++++++++++++++++++ util-linux.spec | 11 ++- 3 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch create mode 100644 0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch diff --git a/0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch b/0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch new file mode 100644 index 0000000..f6523b5 --- /dev/null +++ b/0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch @@ -0,0 +1,50 @@ +From 17206c059dc2e42e7081079b76eafda68cc9a5b8 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 26 Mar 2013 16:05:07 +0100 +Subject: [PATCH] libmount: fix user-mount by root for mount. helpers + +Append options like "exec" "suid" and "dev" to mount. helpers +command line if the options are in fstab. This is relevant for root +user who calls mount(8) for fstab entries with "user,exec" etc. + +Signed-off-by: Karel Zak +--- + libmount/src/context_mount.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index 00738b4..3b280ab 100644 +--- a/libmount/src/context_mount.c ++++ b/libmount/src/context_mount.c +@@ -275,6 +275,28 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) + if (!*optstr) + return -ENOMEM; + ++ if (cxt->user_mountflags & MNT_MS_USER) { ++ /* ++ * This is unnecessary for real user-mounts as mount. ++ * helpers have to always follow fstab rather than mount ++ * options on command line. ++ * ++ * But if you call mount. as root then the helper follows ++ * command line. If there is (for example) "user,exec" in fstab ++ * then we have to manually append the "exec" back to the options ++ * string, bacause there is nothing like MS_EXEC (we have only ++ * MS_NOEXEC in mount flags and we don't care about the original ++ * mount string in libmount for VFS options). ++ */ ++ if (!(cxt->mountflags & MS_NOEXEC)) ++ mnt_optstr_append_option(optstr, "exec", NULL); ++ if (!(cxt->mountflags & MS_NOSUID)) ++ mnt_optstr_append_option(optstr, "suid", NULL); ++ if (!(cxt->mountflags & MS_NODEV)) ++ mnt_optstr_append_option(optstr, "dev", NULL); ++ } ++ ++ + if (cxt->flags & MNT_FL_SAVED_USER) + rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user); + if (rc) +-- +1.8.1.4 + diff --git a/0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch b/0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch new file mode 100644 index 0000000..ed498b6 --- /dev/null +++ b/0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch @@ -0,0 +1,69 @@ +From 52a285bf4e8d3a78d7211694977f5894a748bdac Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 25 Mar 2013 09:17:52 +0100 +Subject: [PATCH] libmount: umount crashes when trying to umount a + non-mountpoint +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reported-by: Mantas MikulÄ—nas +Signed-off-by: Karel Zak +--- + libmount/src/context_umount.c | 4 ++-- + libmount/src/fs.c | 3 +++ + libmount/src/libmount.h.in | 2 +- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c +index 113c53e..96ae87a 100644 +--- a/libmount/src/context_umount.c ++++ b/libmount/src/context_umount.c +@@ -183,7 +183,7 @@ err: + static int lookup_umount_fs(struct libmnt_context *cxt) + { + const char *tgt; +- struct libmnt_fs *fs; ++ struct libmnt_fs *fs = NULL; + int rc; + + assert(cxt); +@@ -198,7 +198,7 @@ static int lookup_umount_fs(struct libmnt_context *cxt) + rc = mnt_context_find_umount_fs(cxt, tgt, &fs); + if (rc < 0) + return rc; +- if (!fs) { ++ if (rc == 1 || !fs) { + DBG(CXT, mnt_debug_h(cxt, "umount: cannot find %s in mtab", tgt)); + return 0; + } +diff --git a/libmount/src/fs.c b/libmount/src/fs.c +index 96c13d3..bb9006d 100644 +--- a/libmount/src/fs.c ++++ b/libmount/src/fs.c +@@ -129,6 +129,9 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, + { + const struct libmnt_fs *org = dest; + ++ if (!src) ++ return NULL; ++ + if (!dest) { + dest = mnt_new_fs(); + if (!dest) +diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in +index ccd260d..bb18ba1 100644 +--- a/libmount/src/libmount.h.in ++++ b/libmount/src/libmount.h.in +@@ -318,7 +318,7 @@ extern void mnt_reset_fs(struct libmnt_fs *fs) + __ul_attribute__((nonnull)); + extern struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, + const struct libmnt_fs *src) +- __ul_attribute__((nonnull(2), warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern void *mnt_fs_get_userdata(struct libmnt_fs *fs) + __ul_attribute__((nonnull)); + extern int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data); +-- +1.8.1.4 + diff --git a/util-linux.spec b/util-linux.spec index d6af783..dcd74c5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -86,6 +86,12 @@ Patch2: util-linux-2.19-floppy-generic.patch # 151635 - makeing /var/log/lastlog Patch3: util-linux-ng-2.22-login-lastlog.patch +### Upstream patches for v2.23-rc2 +### +Patch100: 0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch +Patch101: 0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch + + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -745,6 +751,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Wed Mar 27 2013 Karel Zak 2.23-0.2 +- add upstream patches for to fix umount and mount. + * Fri Mar 22 2013 Karel Zak 2.23-0.1 - upgrade to the release 2.22-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes From 4a3cb4822873eb1724259319d61e6b34994dbfc3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Mar 2013 12:13:24 +0100 Subject: [PATCH 138/425] 2.23-0.3: fix build for s390 Signed-off-by: Karel Zak --- ...x-NTFS-prober-on-big-endian-machines.patch | 45 +++++++++++++++++++ util-linux.spec | 6 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch diff --git a/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch b/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch new file mode 100644 index 0000000..b469458 --- /dev/null +++ b/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch @@ -0,0 +1,45 @@ +From 45b048b340742402695741229f01b151cce871c9 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 27 Mar 2013 11:37:57 +0100 +Subject: [PATCH] libblkid: fix NTFS prober on big-endian machines + + MFT_RECORD_ATTR_VOLUME_NAME = cpu_to_le32(0x60), + ^ +./include/bitops.h:94:36: error: braced-group within expression +allowed only inside a function + +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/ntfs.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c +index 41c6b9c..c60a151 100644 +--- a/libblkid/src/superblocks/ntfs.c ++++ b/libblkid/src/superblocks/ntfs.c +@@ -75,8 +75,8 @@ struct file_attribute { + #define NTFS_MAX_CLUSTER_SIZE (64 * 1024) + + enum { +- MFT_RECORD_ATTR_VOLUME_NAME = cpu_to_le32(0x60), +- MFT_RECORD_ATTR_END = cpu_to_le32(0xffffffff) ++ MFT_RECORD_ATTR_VOLUME_NAME = 0x60, ++ MFT_RECORD_ATTR_END = 0xffffffff + }; + + static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) +@@ -186,9 +186,9 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) + if (!attr_len) + break; + +- if (attr->type == MFT_RECORD_ATTR_END) ++ if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_END) + break; +- if (attr->type == MFT_RECORD_ATTR_VOLUME_NAME) { ++ if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_VOLUME_NAME) { + unsigned int val_off = le16_to_cpu(attr->value_offset); + unsigned int val_len = le32_to_cpu(attr->value_len); + unsigned char *val = ((uint8_t *) attr) + val_off; +-- +1.8.1.4 + diff --git a/util-linux.spec b/util-linux.spec index dcd74c5..eb49d56 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -90,6 +90,7 @@ Patch3: util-linux-ng-2.22-login-lastlog.patch ### Patch100: 0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch Patch101: 0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch +Patch102: 0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch %description @@ -751,6 +752,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Wed Mar 27 2013 Karel Zak 2.23-0.3 +- libblkid ntfs bugfix for build on s390 + * Wed Mar 27 2013 Karel Zak 2.23-0.2 - add upstream patches for to fix umount and mount. From 7bc31e71b78f31dc5115ba73a226dfa28747327a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 11 Apr 2013 00:32:07 +0200 Subject: [PATCH 139/425] 2.23-0.4: upgrade to -rc2 Signed-off-by: Karel Zak --- .gitignore | 1 + ...x-NTFS-prober-on-big-endian-machines.patch | 45 ------ ...r-mount-by-root-for-mount.-type-help.patch | 50 ------ ...crashes-when-trying-to-umount-a-non-.patch | 69 --------- sources | 2 +- util-linux.spec | 145 +++++++++++++----- 6 files changed, 111 insertions(+), 201 deletions(-) delete mode 100644 0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch delete mode 100644 0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch delete mode 100644 0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch diff --git a/.gitignore b/.gitignore index f2bff19..94ddde1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /util-linux-2.22.1.tar.xz /util-linux-2.22.2.tar.xz /util-linux-2.23-rc1.tar.xz +/util-linux-2.23-rc2.tar.xz diff --git a/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch b/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch deleted file mode 100644 index b469458..0000000 --- a/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 45b048b340742402695741229f01b151cce871c9 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 27 Mar 2013 11:37:57 +0100 -Subject: [PATCH] libblkid: fix NTFS prober on big-endian machines - - MFT_RECORD_ATTR_VOLUME_NAME = cpu_to_le32(0x60), - ^ -./include/bitops.h:94:36: error: braced-group within expression -allowed only inside a function - -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/ntfs.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c -index 41c6b9c..c60a151 100644 ---- a/libblkid/src/superblocks/ntfs.c -+++ b/libblkid/src/superblocks/ntfs.c -@@ -75,8 +75,8 @@ struct file_attribute { - #define NTFS_MAX_CLUSTER_SIZE (64 * 1024) - - enum { -- MFT_RECORD_ATTR_VOLUME_NAME = cpu_to_le32(0x60), -- MFT_RECORD_ATTR_END = cpu_to_le32(0xffffffff) -+ MFT_RECORD_ATTR_VOLUME_NAME = 0x60, -+ MFT_RECORD_ATTR_END = 0xffffffff - }; - - static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) -@@ -186,9 +186,9 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) - if (!attr_len) - break; - -- if (attr->type == MFT_RECORD_ATTR_END) -+ if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_END) - break; -- if (attr->type == MFT_RECORD_ATTR_VOLUME_NAME) { -+ if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_VOLUME_NAME) { - unsigned int val_off = le16_to_cpu(attr->value_offset); - unsigned int val_len = le32_to_cpu(attr->value_len); - unsigned char *val = ((uint8_t *) attr) + val_off; --- -1.8.1.4 - diff --git a/0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch b/0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch deleted file mode 100644 index f6523b5..0000000 --- a/0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 17206c059dc2e42e7081079b76eafda68cc9a5b8 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 26 Mar 2013 16:05:07 +0100 -Subject: [PATCH] libmount: fix user-mount by root for mount. helpers - -Append options like "exec" "suid" and "dev" to mount. helpers -command line if the options are in fstab. This is relevant for root -user who calls mount(8) for fstab entries with "user,exec" etc. - -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index 00738b4..3b280ab 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -275,6 +275,28 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) - if (!*optstr) - return -ENOMEM; - -+ if (cxt->user_mountflags & MNT_MS_USER) { -+ /* -+ * This is unnecessary for real user-mounts as mount. -+ * helpers have to always follow fstab rather than mount -+ * options on command line. -+ * -+ * But if you call mount. as root then the helper follows -+ * command line. If there is (for example) "user,exec" in fstab -+ * then we have to manually append the "exec" back to the options -+ * string, bacause there is nothing like MS_EXEC (we have only -+ * MS_NOEXEC in mount flags and we don't care about the original -+ * mount string in libmount for VFS options). -+ */ -+ if (!(cxt->mountflags & MS_NOEXEC)) -+ mnt_optstr_append_option(optstr, "exec", NULL); -+ if (!(cxt->mountflags & MS_NOSUID)) -+ mnt_optstr_append_option(optstr, "suid", NULL); -+ if (!(cxt->mountflags & MS_NODEV)) -+ mnt_optstr_append_option(optstr, "dev", NULL); -+ } -+ -+ - if (cxt->flags & MNT_FL_SAVED_USER) - rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user); - if (rc) --- -1.8.1.4 - diff --git a/0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch b/0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch deleted file mode 100644 index ed498b6..0000000 --- a/0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 52a285bf4e8d3a78d7211694977f5894a748bdac Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 25 Mar 2013 09:17:52 +0100 -Subject: [PATCH] libmount: umount crashes when trying to umount a - non-mountpoint -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Reported-by: Mantas MikulÄ—nas -Signed-off-by: Karel Zak ---- - libmount/src/context_umount.c | 4 ++-- - libmount/src/fs.c | 3 +++ - libmount/src/libmount.h.in | 2 +- - 3 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c -index 113c53e..96ae87a 100644 ---- a/libmount/src/context_umount.c -+++ b/libmount/src/context_umount.c -@@ -183,7 +183,7 @@ err: - static int lookup_umount_fs(struct libmnt_context *cxt) - { - const char *tgt; -- struct libmnt_fs *fs; -+ struct libmnt_fs *fs = NULL; - int rc; - - assert(cxt); -@@ -198,7 +198,7 @@ static int lookup_umount_fs(struct libmnt_context *cxt) - rc = mnt_context_find_umount_fs(cxt, tgt, &fs); - if (rc < 0) - return rc; -- if (!fs) { -+ if (rc == 1 || !fs) { - DBG(CXT, mnt_debug_h(cxt, "umount: cannot find %s in mtab", tgt)); - return 0; - } -diff --git a/libmount/src/fs.c b/libmount/src/fs.c -index 96c13d3..bb9006d 100644 ---- a/libmount/src/fs.c -+++ b/libmount/src/fs.c -@@ -129,6 +129,9 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, - { - const struct libmnt_fs *org = dest; - -+ if (!src) -+ return NULL; -+ - if (!dest) { - dest = mnt_new_fs(); - if (!dest) -diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in -index ccd260d..bb18ba1 100644 ---- a/libmount/src/libmount.h.in -+++ b/libmount/src/libmount.h.in -@@ -318,7 +318,7 @@ extern void mnt_reset_fs(struct libmnt_fs *fs) - __ul_attribute__((nonnull)); - extern struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, - const struct libmnt_fs *src) -- __ul_attribute__((nonnull(2), warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern void *mnt_fs_get_userdata(struct libmnt_fs *fs) - __ul_attribute__((nonnull)); - extern int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data); --- -1.8.1.4 - diff --git a/sources b/sources index 23dd002..50e47fe 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -62a5e17c2710da8974e55c6fa5711122 util-linux-2.23-rc1.tar.xz +abf3d68b534237b9c336dd5bfbf058d9 util-linux-2.23-rc2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index eb49d56..d832c36 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,16 +2,17 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Macros %define floppyver 0.18 %define cytune_archs %{ix86} alpha %{arm} +%define compldir %{_datadir}/bash-completion/completions/ ### Dependencies BuildRequires: audit-libs-devel >= 1.0.6 @@ -27,7 +28,7 @@ Buildrequires: libuser-devel BuildRequires: libcap-ng-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -41,6 +42,7 @@ Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd ### Obsoletes & Conflicts & Provides +Conflicts: bash-completion < 1:2.1-1 # su(1) and runuser(1) merged into util-linux v2.22 Conflicts: coreutils < 8.20 # eject has been merged into util-linux v2.22 @@ -86,13 +88,6 @@ Patch2: util-linux-2.19-floppy-generic.patch # 151635 - makeing /var/log/lastlog Patch3: util-linux-ng-2.22-login-lastlog.patch -### Upstream patches for v2.23-rc2 -### -Patch100: 0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch -Patch101: 0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch -Patch102: 0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -221,6 +216,8 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" --with-systemdsystemunitdir=%{_unitdir} \ --disable-silent-rules \ --disable-wall \ + --disable-bfs \ + --disable-pg \ --enable-socket-activation \ --enable-chfn-chsh \ --enable-write \ @@ -229,7 +226,14 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" --with-selinux \ --with-audit \ --with-utempter \ - --disable-makeinstall-chown + --disable-makeinstall-chown \ +%ifnarch %cytune_archs + --disable-cytune \ +%endif +%ifarch s390 s390x + --disable-hwclock \ + --disable-fdformat +%endif # build util-linux make %{?_smp_mflags} @@ -316,23 +320,15 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid popd } +%ifnarch s390 s390x ln -sf hwclock ${RPM_BUILD_ROOT}%{_sbindir}/clock echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 - -# 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,floppy} \ - %{_mandir}/man8/{fdformat,floppy}.8* \ - /usr/sbin/{hwclock,clock} \ - %{_mandir}/man8/{hwclock,clock}.8*; do - - rm -f $RPM_BUILD_ROOT$I -done +rm -f $RPM_BUILD_ROOT%{_sbindir}floppy +rm -f $RPM_BUILD_ROOT%{_mandir}/man8/floppy.8* %endif # unsupported on SPARCs @@ -347,19 +343,6 @@ for I in /sbin/sfdisk \ done %endif -# deprecated commands -for I in /usr/sbin/mkfs.bfs /usr/sbin/sln \ - /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ - /usr/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/mkfs.bfs.8 man8/vipw.8 man8/vigr; do - rm -rf $RPM_BUILD_ROOT%{_mandir}/${I}* -done - # deprecated docs for I in floppy-%{floppyver}/README.html; do rm -rf $I @@ -597,6 +580,7 @@ fi %{_mandir}/man8/findfs.8* %{_mandir}/man8/findmnt.8* %{_mandir}/man8/fsck.8* +%{_mandir}/man8/fsck.cramfs.8* %{_mandir}/man8/fsck.minix.8* %{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/fstrim.8* @@ -606,6 +590,7 @@ fi %{_mandir}/man8/lsblk.8* %{_mandir}/man8/lslocks.8.gz %{_mandir}/man8/mkfs.8* +%{_mandir}/man8/mkfs.cramfs.8* %{_mandir}/man8/mkfs.minix.8* %{_mandir}/man8/mkswap.8* %{_mandir}/man8/mount.8* @@ -661,6 +646,85 @@ fi %{_sbindir}/switch_root %{_sbindir}/wipefs +%{compldir}/addpart +%{compldir}/blkdiscard +%{compldir}/blkid +%{compldir}/blockdev +%{compldir}/cal +%{compldir}/chcpu +%{compldir}/chfn +%{compldir}/chrt +%{compldir}/chsh +%{compldir}/col +%{compldir}/colcrt +%{compldir}/colrm +%{compldir}/column +%{compldir}/ctrlaltdel +%{compldir}/delpart +%{compldir}/dmesg +%{compldir}/eject +%{compldir}/fallocate +%{compldir}/fdisk +%{compldir}/findmnt +%{compldir}/flock +%{compldir}/fsck +%{compldir}/fsck.cramfs +%{compldir}/fsck.minix +%{compldir}/fsfreeze +%{compldir}/fstrim +%{compldir}/getopt +%{compldir}/hexdump +%{compldir}/ionice +%{compldir}/ipcrm +%{compldir}/ipcs +%{compldir}/isosize +%{compldir}/ldattach +%{compldir}/logger +%{compldir}/look +%{compldir}/losetup +%{compldir}/lsblk +%{compldir}/lscpu +%{compldir}/lslocks +%{compldir}/mcookie +%{compldir}/mkfs +%{compldir}/mkfs.cramfs +%{compldir}/mkfs.minix +%{compldir}/mkswap +%{compldir}/more +%{compldir}/mountpoint +%{compldir}/namei +%{compldir}/nsenter +%{compldir}/partx +%{compldir}/pivot_root +%{compldir}/prlimit +%{compldir}/raw +%{compldir}/readprofile +%{compldir}/rename +%{compldir}/renice +%{compldir}/resizepart +%{compldir}/rev +%{compldir}/rtcwake +%{compldir}/runuser +%{compldir}/script +%{compldir}/scriptreplay +%{compldir}/setarch +%{compldir}/setpriv +%{compldir}/setsid +%{compldir}/setterm +%{compldir}/su +%{compldir}/swaplabel +%{compldir}/swapon +%{compldir}/tailf +%{compldir}/taskset +%{compldir}/ul +%{compldir}/unshare +%{compldir}/utmpdump +%{compldir}/uuidgen +%{compldir}/wdctl +%{compldir}/whereis +%{compldir}/wipefs +%{compldir}/write + %ifnarch s390 s390x %{_sbindir}/clock %{_bindir}/floppy @@ -670,6 +734,8 @@ fi %{_mandir}/man8/floppy.8* %{_mandir}/man8/hwclock.8* %{_mandir}/man8/clock.8* +%{compldir}/fdformat +%{compldir}/hwclock %endif %ifnarch %{sparc} @@ -678,6 +744,8 @@ fi %{_sbindir}/sfdisk %{_mandir}/man8/cfdisk.8* %{_mandir}/man8/sfdisk.8* +%{compldir}/cfdisk +%{compldir}/sfdisk %endif %ifarch %{sparc} @@ -687,6 +755,7 @@ fi %ifarch %cytune_archs %{_bindir}/cytune %{_mandir}/man8/cytune.8* +%{compldir}/cytune %endif @@ -698,6 +767,7 @@ fi %{_unitdir}/* %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %dir %attr(2775, uuidd, uuidd) /run/uuidd +%{compldir}/uuidd %files -n libmount @@ -752,6 +822,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Wed Apr 10 2013 Karel Zak 2.23-0.4 +- upgrade to the release 2.23-rc2 + * Wed Mar 27 2013 Karel Zak 2.23-0.3 - libblkid ntfs bugfix for build on s390 @@ -759,7 +832,7 @@ fi - add upstream patches for to fix umount and mount. * Fri Mar 22 2013 Karel Zak 2.23-0.1 -- upgrade to the release 2.22-rc1 +- upgrade to the release 2.23-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes - add nsenter and blkdiscard - remove tunelp From 379232cd9588b1609ed568601c005c0bbbef5e85 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 12 Apr 2013 15:32:50 +0200 Subject: [PATCH 140/425] 2.23-0.5: fix #948274 Signed-off-by: Karel Zak --- ...nt.nfs-segfault-rely-on-assert-rathe.patch | 1340 +++++++++++++++++ util-linux.spec | 9 +- 2 files changed, 1348 insertions(+), 1 deletion(-) create mode 100644 0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch diff --git a/0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch b/0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch new file mode 100644 index 0000000..a2d2223 --- /dev/null +++ b/0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch @@ -0,0 +1,1340 @@ +From 4569bbeab783632c81ee14793da84b3e29444543 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 12 Apr 2013 12:35:34 +0200 +Subject: [PATCH] libmount: fix mount.nfs segfault, rely on assert() rather + than on nonnull + +We use + mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL); + +in mount.nfs, unfortunately mnt_optstr_append_option() has been marked +ass nonnull(1, 2). That's wrong because append and prepend should +robust enough to accept NULL as option name. + +The patch also removes almost all __attribute__((nonnull). It seems +better to rely on assert() to have usable feedback. In many cases +(nonnull) is premature optimization for the library. This attribute +makes sense for things like strlen() or so... + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=948274 +Signed-off-by: Karel Zak +--- + libmount/src/context.c | 55 ++++++++++-- + libmount/src/fs.c | 34 ++++++-- + libmount/src/libmount.h.in | 202 ++++++++++++++++----------------------------- + libmount/src/lock.c | 2 + + libmount/src/mountP.h | 4 +- + libmount/src/optstr.c | 26 +++++- + libmount/src/tab_parse.c | 8 +- + libmount/src/tab_update.c | 13 ++- + libmount/src/utils.c | 9 +- + libmount/src/version.c | 5 ++ + 10 files changed, 202 insertions(+), 156 deletions(-) + +diff --git a/libmount/src/context.c b/libmount/src/context.c +index 614d3f3..38f80de 100644 +--- a/libmount/src/context.c ++++ b/libmount/src/context.c +@@ -196,6 +196,7 @@ int mnt_reset_context(struct libmnt_context *cxt) + */ + int mnt_context_reset_status(struct libmnt_context *cxt) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + +@@ -207,6 +208,7 @@ int mnt_context_reset_status(struct libmnt_context *cxt) + + static int set_flag(struct libmnt_context *cxt, int flag, int enable) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + if (enable) { +@@ -227,7 +229,6 @@ static int set_flag(struct libmnt_context *cxt, int flag, int enable) + */ + int mnt_context_is_restricted(struct libmnt_context *cxt) + { +- assert(cxt); + return cxt->restricted; + } + +@@ -270,6 +271,7 @@ int mnt_context_is_restricted(struct libmnt_context *cxt) + */ + int mnt_context_set_optsmode(struct libmnt_context *cxt, int mode) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + cxt->optsmode = mode; +@@ -285,6 +287,7 @@ int mnt_context_set_optsmode(struct libmnt_context *cxt, int mode) + + int mnt_context_get_optsmode(struct libmnt_context *cxt) + { ++ assert(cxt); + return cxt->optsmode; + } + +@@ -663,6 +666,7 @@ int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs) + */ + struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) + { ++ assert(cxt); + if (!cxt) + return NULL; + if (!cxt->fs) { +@@ -681,6 +685,7 @@ struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) + */ + int mnt_context_set_source(struct libmnt_context *cxt, const char *source) + { ++ assert(cxt); + return mnt_fs_set_source(mnt_context_get_fs(cxt), source); + } + +@@ -692,6 +697,7 @@ int mnt_context_set_source(struct libmnt_context *cxt, const char *source) + */ + const char *mnt_context_get_source(struct libmnt_context *cxt) + { ++ assert(cxt); + return mnt_fs_get_source(mnt_context_get_fs(cxt)); + } + +@@ -704,6 +710,7 @@ const char *mnt_context_get_source(struct libmnt_context *cxt) + */ + int mnt_context_set_target(struct libmnt_context *cxt, const char *target) + { ++ assert(cxt); + return mnt_fs_set_target(mnt_context_get_fs(cxt), target); + } + +@@ -715,6 +722,7 @@ int mnt_context_set_target(struct libmnt_context *cxt, const char *target) + */ + const char *mnt_context_get_target(struct libmnt_context *cxt) + { ++ assert(cxt); + return mnt_fs_get_target(mnt_context_get_fs(cxt)); + } + +@@ -731,6 +739,7 @@ const char *mnt_context_get_target(struct libmnt_context *cxt) + */ + int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype) + { ++ assert(cxt); + return mnt_fs_set_fstype(mnt_context_get_fs(cxt), fstype); + } + +@@ -742,6 +751,7 @@ int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype) + */ + const char *mnt_context_get_fstype(struct libmnt_context *cxt) + { ++ assert(cxt); + return mnt_fs_get_fstype(mnt_context_get_fs(cxt)); + } + +@@ -754,6 +764,7 @@ const char *mnt_context_get_fstype(struct libmnt_context *cxt) + */ + int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr) + { ++ assert(cxt); + return mnt_fs_set_options(mnt_context_get_fs(cxt), optstr); + } + +@@ -766,6 +777,7 @@ int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr) + */ + int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr) + { ++ assert(cxt); + return mnt_fs_append_options(mnt_context_get_fs(cxt), optstr); + } + +@@ -784,6 +796,7 @@ int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr) + */ + const char *mnt_context_get_options(struct libmnt_context *cxt) + { ++ assert(cxt); + return mnt_fs_get_options(mnt_context_get_fs(cxt)); + } + +@@ -800,6 +813,7 @@ int mnt_context_set_fstype_pattern(struct libmnt_context *cxt, const char *patte + { + char *p = NULL; + ++ assert(cxt); + if (!cxt) + return -EINVAL; + if (pattern) { +@@ -825,6 +839,7 @@ int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *patt + { + char *p = NULL; + ++ assert(cxt); + if (!cxt) + return -EINVAL; + if (pattern) { +@@ -856,6 +871,7 @@ int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *patt + */ + int mnt_context_set_fstab(struct libmnt_context *cxt, struct libmnt_table *tb) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + if (!(cxt->flags & MNT_FL_EXTERN_FSTAB)) +@@ -879,9 +895,9 @@ int mnt_context_get_fstab(struct libmnt_context *cxt, struct libmnt_table **tb) + { + struct libmnt_cache *cache; + ++ assert(cxt); + if (!cxt) + return -EINVAL; +- + if (!cxt->fstab) { + int rc; + +@@ -921,9 +937,9 @@ int mnt_context_get_mtab(struct libmnt_context *cxt, struct libmnt_table **tb) + { + struct libmnt_cache *cache; + ++ assert(cxt); + if (!cxt) + return -EINVAL; +- + if (!cxt->mtab) { + int rc; + +@@ -962,6 +978,7 @@ int mnt_context_set_tabfilter(struct libmnt_context *cxt, + int (*fltr)(struct libmnt_fs *, void *), + void *data) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + +@@ -1002,6 +1019,8 @@ int mnt_context_get_table(struct libmnt_context *cxt, + struct libmnt_cache *cache; + int rc; + ++ assert(cxt); ++ assert(tb); + if (!cxt || !tb) + return -EINVAL; + +@@ -1042,6 +1061,7 @@ int mnt_context_get_table(struct libmnt_context *cxt, + int mnt_context_set_tables_errcb(struct libmnt_context *cxt, + int (*cb)(struct libmnt_table *tb, const char *filename, int line)) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + +@@ -1085,6 +1105,7 @@ int mnt_context_set_cache(struct libmnt_context *cxt, struct libmnt_cache *cache + */ + struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt) + { ++ assert(cxt); + if (!cxt || mnt_context_is_nocanonicalize(cxt)) + return NULL; + +@@ -1112,9 +1133,9 @@ int mnt_context_set_passwd_cb(struct libmnt_context *cxt, + char *(*get)(struct libmnt_context *), + void (*release)(struct libmnt_context *, char *)) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; +- + cxt->pwd_get_cb = get; + cxt->pwd_release_cb = release; + return 0; +@@ -1142,6 +1163,7 @@ int mnt_context_set_passwd_cb(struct libmnt_context *cxt, + */ + struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) + { ++ assert(cxt); + /* + * DON'T call this function within libmount, it will always allocate + * the lock. The mnt_update_* functions are able to allocate the lock +@@ -1181,6 +1203,7 @@ struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) + */ + int mnt_context_set_mflags(struct libmnt_context *cxt, unsigned long flags) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + +@@ -1213,6 +1236,8 @@ int mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags) + int rc = 0; + struct list_head *p; + ++ assert(cxt); ++ assert(flags); + if (!cxt || !flags) + return -EINVAL; + +@@ -1249,6 +1274,7 @@ int mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags) + */ + int mnt_context_set_user_mflags(struct libmnt_context *cxt, unsigned long flags) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + cxt->user_mountflags = flags; +@@ -1268,6 +1294,9 @@ int mnt_context_set_user_mflags(struct libmnt_context *cxt, unsigned long flags) + int mnt_context_get_user_mflags(struct libmnt_context *cxt, unsigned long *flags) + { + int rc = 0; ++ ++ assert(cxt); ++ assert(flags); + if (!cxt || !flags) + return -EINVAL; + +@@ -1299,6 +1328,7 @@ int mnt_context_get_user_mflags(struct libmnt_context *cxt, unsigned long *flags + */ + int mnt_context_set_mountdata(struct libmnt_context *cxt, void *data) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + cxt->mountdata = data; +@@ -1908,6 +1938,7 @@ int mnt_context_apply_fstab(struct libmnt_context *cxt) + */ + int mnt_context_tab_applied(struct libmnt_context *cxt) + { ++ assert(cxt); + return cxt->flags & MNT_FL_TAB_APPLIED; + } + +@@ -1949,6 +1980,7 @@ int mnt_context_propagation_only(struct libmnt_context *cxt) + */ + int mnt_context_get_status(struct libmnt_context *cxt) + { ++ assert(cxt); + return !cxt->syscall_status || !cxt->helper_exec_status; + } + +@@ -1960,6 +1992,7 @@ int mnt_context_get_status(struct libmnt_context *cxt) + */ + int mnt_context_helper_executed(struct libmnt_context *cxt) + { ++ assert(cxt); + return cxt->helper_exec_status != 1; + } + +@@ -1972,6 +2005,7 @@ int mnt_context_helper_executed(struct libmnt_context *cxt) + */ + int mnt_context_get_helper_status(struct libmnt_context *cxt) + { ++ assert(cxt); + return cxt->helper_status; + } + +@@ -1983,6 +2017,7 @@ int mnt_context_get_helper_status(struct libmnt_context *cxt) + */ + int mnt_context_syscall_called(struct libmnt_context *cxt) + { ++ assert(cxt); + return cxt->syscall_status != 1; + } + +@@ -1997,9 +2032,9 @@ int mnt_context_syscall_called(struct libmnt_context *cxt) + */ + int mnt_context_get_syscall_errno(struct libmnt_context *cxt) + { ++ assert(cxt); + if (cxt->syscall_status < 0) + return -cxt->syscall_status; +- + return 0; + } + +@@ -2017,6 +2052,7 @@ int mnt_context_get_syscall_errno(struct libmnt_context *cxt) + */ + int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status) + { ++ assert(cxt); + if (!cxt) + return -EINVAL; + +@@ -2063,8 +2099,11 @@ int mnt_context_strerror(struct libmnt_context *cxt __attribute__((__unused__)), + int mnt_context_init_helper(struct libmnt_context *cxt, int action, + int flags __attribute__((__unused__))) + { +- int rc = mnt_context_disable_helpers(cxt, TRUE); ++ int rc; + ++ assert(cxt); ++ ++ rc = mnt_context_disable_helpers(cxt, TRUE); + if (!rc) + rc = set_flag(cxt, MNT_FL_HELPER, 1); + if (!rc) +@@ -2115,6 +2154,7 @@ int mnt_context_is_fs_mounted(struct libmnt_context *cxt, + struct libmnt_table *mtab; + int rc; + ++ assert(cxt); + if (!cxt || !fs || !mounted) + return -EINVAL; + +@@ -2130,6 +2170,7 @@ static int mnt_context_add_child(struct libmnt_context *cxt, pid_t pid) + { + pid_t *pids; + ++ assert(cxt); + if (!cxt) + return -EINVAL; + +@@ -2149,6 +2190,7 @@ int mnt_fork_context(struct libmnt_context *cxt) + int rc = 0; + pid_t pid; + ++ assert(cxt); + if (!mnt_context_is_parent(cxt)) + return -EINVAL; + +@@ -2182,6 +2224,7 @@ int mnt_context_wait_for_children(struct libmnt_context *cxt, + { + int i; + ++ assert(cxt); + if (!cxt) + return -EINVAL; + +diff --git a/libmount/src/fs.c b/libmount/src/fs.c +index bb9006d..c95cdc7 100644 +--- a/libmount/src/fs.c ++++ b/libmount/src/fs.c +@@ -131,7 +131,6 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, + + if (!src) + return NULL; +- + if (!dest) { + dest = mnt_new_fs(); + if (!dest) +@@ -197,6 +196,7 @@ struct libmnt_fs *mnt_copy_mtab_fs(const struct libmnt_fs *fs) + { + struct libmnt_fs *n = mnt_new_fs(); + ++ assert(fs); + if (!n) + return NULL; + +@@ -249,6 +249,7 @@ err: + */ + void *mnt_fs_get_userdata(struct libmnt_fs *fs) + { ++ assert(fs); + return fs ? fs->userdata : NULL; + } + +@@ -263,6 +264,7 @@ void *mnt_fs_get_userdata(struct libmnt_fs *fs) + */ + int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data) + { ++ assert(fs); + if (!fs) + return -EINVAL; + fs->userdata = data; +@@ -303,6 +305,7 @@ const char *mnt_fs_get_srcpath(struct libmnt_fs *fs) + */ + const char *mnt_fs_get_source(struct libmnt_fs *fs) + { ++ assert(fs); + return fs ? fs->source : NULL; + } + +@@ -346,6 +349,7 @@ int mnt_fs_set_source(struct libmnt_fs *fs, const char *source) + char *p = NULL; + int rc; + ++ assert(fs); + if (!fs) + return -EINVAL; + +@@ -375,6 +379,7 @@ int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) + { + const char *p; + ++ assert(fs); + if (!fs) + return 0; + +@@ -401,6 +406,7 @@ int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) + */ + int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) + { ++ assert(fs); + return fs && streq_except_trailing_slash(mnt_fs_get_target(fs), path); + } + +@@ -439,6 +445,7 @@ int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) + */ + int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, const char **value) + { ++ assert(fs); + if (fs == NULL || !fs->tagname) + return -EINVAL; + if (name) +@@ -474,7 +481,6 @@ int mnt_fs_set_target(struct libmnt_fs *fs, const char *target) + char *p = NULL; + + assert(fs); +- + if (!fs) + return -EINVAL; + if (target) { +@@ -506,6 +512,7 @@ static int mnt_fs_get_flags(struct libmnt_fs *fs) + */ + int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags) + { ++ assert(fs); + if (!fs || !flags) + return -EINVAL; + +@@ -547,6 +554,7 @@ int mnt_fs_is_kernel(struct libmnt_fs *fs) + */ + int mnt_fs_is_swaparea(struct libmnt_fs *fs) + { ++ assert(fs); + return mnt_fs_get_flags(fs) & MNT_FS_SWAP; + } + +@@ -558,6 +566,7 @@ int mnt_fs_is_swaparea(struct libmnt_fs *fs) + */ + int mnt_fs_is_pseudofs(struct libmnt_fs *fs) + { ++ assert(fs); + return mnt_fs_get_flags(fs) & MNT_FS_PSEUDO; + } + +@@ -569,6 +578,7 @@ int mnt_fs_is_pseudofs(struct libmnt_fs *fs) + */ + int mnt_fs_is_netfs(struct libmnt_fs *fs) + { ++ assert(fs); + return mnt_fs_get_flags(fs) & MNT_FS_NET; + } + +@@ -622,6 +632,7 @@ int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype) + { + char *p = NULL; + ++ assert(fs); + if (!fs) + return -EINVAL; + if (fstype) { +@@ -700,9 +711,7 @@ char *mnt_fs_strdup_options(struct libmnt_fs *fs) + char *res; + + assert(fs); +- + errno = 0; +- + if (fs->optstr) + return strdup(fs->optstr); + +@@ -758,7 +767,6 @@ int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr) + char *v = NULL, *f = NULL, *u = NULL, *n = NULL; + + assert(fs); +- + if (!fs) + return -EINVAL; + if (optstr) { +@@ -801,7 +809,6 @@ int mnt_fs_append_options(struct libmnt_fs *fs, const char *optstr) + int rc; + + assert(fs); +- + if (!fs) + return -EINVAL; + if (!optstr) +@@ -842,7 +849,6 @@ int mnt_fs_prepend_options(struct libmnt_fs *fs, const char *optstr) + int rc; + + assert(fs); +- + if (!fs) + return -EINVAL; + if (!optstr) +@@ -932,6 +938,7 @@ int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr) + { + char *p = NULL; + ++ assert(fs); + if (!fs) + return -EINVAL; + if (optstr) { +@@ -974,6 +981,7 @@ int mnt_fs_append_attributes(struct libmnt_fs *fs, const char *optstr) + */ + int mnt_fs_prepend_attributes(struct libmnt_fs *fs, const char *optstr) + { ++ assert(fs); + if (!fs) + return -EINVAL; + if (!optstr) +@@ -1235,6 +1243,7 @@ int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, + { + char rc = 1; + ++ assert(fs); + if (!fs) + return -EINVAL; + if (fs->fs_optstr) +@@ -1260,6 +1269,9 @@ int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name, + { + char rc = 1; + ++ assert(fs); ++ if (!fs) ++ return -EINVAL; + if (fs->attrs) + rc = mnt_optstr_get_option(fs->attrs, name, value, valsz); + return rc; +@@ -1286,6 +1298,7 @@ int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, + { + int rc = 0; + ++ assert(fs); + if (!fs || !target || !fs->target) + return 0; + +@@ -1330,6 +1343,7 @@ int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, + char *cn; + const char *src, *t, *v; + ++ assert(fs); + if (!fs) + return 0; + +@@ -1403,6 +1417,7 @@ int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, + */ + int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types) + { ++ assert(fs); + return mnt_match_fstype(fs->fstype, types); + } + +@@ -1418,6 +1433,7 @@ int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types) + */ + int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) + { ++ assert(fs); + return mnt_match_options(mnt_fs_get_options(fs), options); + } + +@@ -1430,7 +1446,7 @@ int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) + */ + int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file) + { +- if (!fs) ++ if (!fs || !file) + return -EINVAL; + fprintf(file, "------ fs: %p\n", fs); + fprintf(file, "source: %s\n", mnt_fs_get_source(fs)); +@@ -1514,6 +1530,8 @@ int mnt_fs_to_mntent(struct libmnt_fs *fs, struct mntent **mnt) + int rc; + struct mntent *m; + ++ assert(fs); ++ assert(mnt); + if (!fs || !mnt) + return -EINVAL; + +diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in +index 1b5df82..db479e1 100644 +--- a/libmount/src/libmount.h.in ++++ b/libmount/src/libmount.h.in +@@ -187,8 +187,7 @@ enum { + extern void mnt_init_debug(int mask); + + /* version.c */ +-extern int mnt_parse_version_string(const char *ver_string) +- __ul_attribute__((nonnull)); ++extern int mnt_parse_version_string(const char *ver_string); + extern int mnt_get_library_version(const char **ver_string); + extern int mnt_get_library_features(const char ***features); + +@@ -198,10 +197,8 @@ extern char *mnt_mangle(const char *str) + extern char *mnt_unmangle(const char *str) + __ul_attribute__((warn_unused_result)); + +-extern int mnt_fstype_is_netfs(const char *type) +- __ul_attribute__((nonnull)); +-extern int mnt_fstype_is_pseudofs(const char *type) +- __ul_attribute__((nonnull)); ++extern int mnt_fstype_is_netfs(const char *type); ++extern int mnt_fstype_is_pseudofs(const char *type); + + extern int mnt_match_fstype(const char *type, const char *pattern) + __ul_attribute__((warn_unused_result)); +@@ -212,7 +209,7 @@ extern const char *mnt_get_swaps_path(void); + extern const char *mnt_get_mtab_path(void); + extern int mnt_has_regular_mtab(const char **mtab, int *writable); + extern char *mnt_get_mountpoint(const char *path) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + + /* cache.c */ + extern struct libmnt_cache *mnt_new_cache(void) +@@ -224,8 +221,7 @@ extern int mnt_cache_read_tags(struct libmnt_cache *cache, const char *devname); + extern int mnt_cache_device_has_tag(struct libmnt_cache *cache, + const char *devname, + const char *token, +- const char *value) +- __ul_attribute__((nonnull)); ++ const char *value); + + extern char *mnt_cache_find_tag_value(struct libmnt_cache *cache, + const char *devname, const char *token); +@@ -245,24 +241,18 @@ extern char *mnt_pretty_path(const char *path, struct libmnt_cache *cache) + + /* optstr.c */ + extern int mnt_optstr_next_option(char **optstr, char **name, size_t *namesz, +- char **value, size_t *valuesz) +- __ul_attribute__((nonnull(1))); ++ char **value, size_t *valuesz); + extern int mnt_optstr_append_option(char **optstr, const char *name, +- const char *value) +- __ul_attribute__((nonnull(1, 2))); ++ const char *value); + extern int mnt_optstr_prepend_option(char **optstr, const char *name, +- const char *value) +- __ul_attribute__((nonnull(1, 2))); ++ const char *value); + + extern int mnt_optstr_get_option(const char *optstr, const char *name, + char **value, size_t *valsz); + extern int mnt_optstr_set_option(char **optstr, const char *name, +- const char *value) +- __ul_attribute__((nonnull(1, 2))); +-extern int mnt_optstr_remove_option(char **optstr, const char *name) +- __ul_attribute__((nonnull)); +-extern int mnt_optstr_deduplicate_option(char **optstr, const char *name) +- __ul_attribute__((nonnull)); ++ const char *value); ++extern int mnt_optstr_remove_option(char **optstr, const char *name); ++extern int mnt_optstr_deduplicate_option(char **optstr, const char *name); + + extern int mnt_split_optstr(const char *optstr, + char **user, char **vfs, char **fs, +@@ -301,11 +291,10 @@ extern const struct libmnt_optmap *mnt_get_builtin_optmap(int id); + + /* lock.c */ + extern struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern void mnt_free_lock(struct libmnt_lock *ml); + +-extern void mnt_unlock_file(struct libmnt_lock *ml) +- __ul_attribute__((nonnull)); ++extern void mnt_unlock_file(struct libmnt_lock *ml); + extern int mnt_lock_file(struct libmnt_lock *ml); + extern int mnt_lock_block_signals(struct libmnt_lock *ml, int enable); + +@@ -314,27 +303,21 @@ extern struct libmnt_fs *mnt_new_fs(void) + __ul_attribute__((warn_unused_result)); + extern void mnt_free_fs(struct libmnt_fs *fs); + +-extern void mnt_reset_fs(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern void mnt_reset_fs(struct libmnt_fs *fs); + extern struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, + const struct libmnt_fs *src) + __ul_attribute__((warn_unused_result)); +-extern void *mnt_fs_get_userdata(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern void *mnt_fs_get_userdata(struct libmnt_fs *fs); + extern int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data); +-extern const char *mnt_fs_get_source(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_source(struct libmnt_fs *fs); + extern int mnt_fs_set_source(struct libmnt_fs *fs, const char *source); + extern const char *mnt_fs_get_srcpath(struct libmnt_fs *fs); + + extern int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, +- const char **value) +- __ul_attribute__((nonnull(1))); +-extern const char *mnt_fs_get_target(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++ const char **value); ++extern const char *mnt_fs_get_target(struct libmnt_fs *fs); + extern int mnt_fs_set_target(struct libmnt_fs *fs, const char *target); +-extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs); + extern int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype); + + extern int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) +@@ -343,11 +326,11 @@ extern int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) + __ul_attribute__((warn_unused_result)); + + extern char *mnt_fs_strdup_options(struct libmnt_fs *fs) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern const char *mnt_fs_get_options(struct libmnt_fs *fs) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern const char *mnt_fs_get_optional_fields(struct libmnt_fs *fs) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags); + + extern int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr); +@@ -357,81 +340,56 @@ extern int mnt_fs_prepend_options(struct libmnt_fs *fs, const char *optstr); + extern int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, + char **value, size_t *valsz); + +-extern const char *mnt_fs_get_fs_options(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern const char *mnt_fs_get_user_options(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_fs_options(struct libmnt_fs *fs); ++extern const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs); ++extern const char *mnt_fs_get_user_options(struct libmnt_fs *fs); + +-extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs); + extern int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr); + extern int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name, + char **value, size_t *valsz); + extern int mnt_fs_append_attributes(struct libmnt_fs *fs, const char *optstr); + extern int mnt_fs_prepend_attributes(struct libmnt_fs *fs, const char *optstr); + +-extern int mnt_fs_get_freq(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern int mnt_fs_get_freq(struct libmnt_fs *fs); + extern int mnt_fs_set_freq(struct libmnt_fs *fs, int freq); +-extern int mnt_fs_get_passno(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern int mnt_fs_get_passno(struct libmnt_fs *fs); + extern int mnt_fs_set_passno(struct libmnt_fs *fs, int passno); +-extern const char *mnt_fs_get_root(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_root(struct libmnt_fs *fs); + extern int mnt_fs_set_root(struct libmnt_fs *fs, const char *root); +-extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs); + extern int mnt_fs_set_bindsrc(struct libmnt_fs *fs, const char *src); +-extern int mnt_fs_get_id(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern int mnt_fs_get_parent_id(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern dev_t mnt_fs_get_devno(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern pid_t mnt_fs_get_tid(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern int mnt_fs_get_id(struct libmnt_fs *fs); ++extern int mnt_fs_get_parent_id(struct libmnt_fs *fs); ++extern dev_t mnt_fs_get_devno(struct libmnt_fs *fs); ++extern pid_t mnt_fs_get_tid(struct libmnt_fs *fs); + +-extern const char *mnt_fs_get_swaptype(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern off_t mnt_fs_get_size(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern off_t mnt_fs_get_usedsize(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern int mnt_fs_get_priority(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern const char *mnt_fs_get_swaptype(struct libmnt_fs *fs); ++extern off_t mnt_fs_get_size(struct libmnt_fs *fs); ++extern off_t mnt_fs_get_usedsize(struct libmnt_fs *fs); ++extern int mnt_fs_get_priority(struct libmnt_fs *fs); + + extern int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, +- struct libmnt_cache *cache) +- __ul_attribute__((nonnull(1))); ++ struct libmnt_cache *cache); + extern int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, +- struct libmnt_cache *cache) +- __ul_attribute__((nonnull(1))); +-extern int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types) +- __ul_attribute__((nonnull(1))); +-extern int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) +- __ul_attribute__((nonnull(1))); +-extern int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file) +- __ul_attribute__((nonnull)); ++ struct libmnt_cache *cache); ++extern int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types); ++extern int mnt_fs_match_options(struct libmnt_fs *fs, const char *options); ++extern int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file); + +-extern int mnt_fs_is_kernel(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern int mnt_fs_is_swaparea(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern int mnt_fs_is_netfs(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); +-extern int mnt_fs_is_pseudofs(struct libmnt_fs *fs) +- __ul_attribute__((nonnull)); ++extern int mnt_fs_is_kernel(struct libmnt_fs *fs); ++extern int mnt_fs_is_swaparea(struct libmnt_fs *fs); ++extern int mnt_fs_is_netfs(struct libmnt_fs *fs); ++extern int mnt_fs_is_pseudofs(struct libmnt_fs *fs); + + extern void mnt_free_mntent(struct mntent *mnt); + extern int mnt_fs_to_mntent(struct libmnt_fs *fs, struct mntent **mnt); + + /* tab-parse.c */ + extern struct libmnt_table *mnt_new_table_from_file(const char *filename) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern struct libmnt_table *mnt_new_table_from_dir(const char *dirname) +- __ul_attribute__((nonnull, warn_unused_result)); ++ __ul_attribute__((warn_unused_result)); + extern int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, + const char *filename); + extern int mnt_table_parse_file(struct libmnt_table *tb, const char *filename); +@@ -484,27 +442,21 @@ extern int mnt_table_find_next_fs(struct libmnt_table *tb, + void *userdata, + struct libmnt_fs **fs); + +-extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) +- __ul_attribute__((nonnull)); +- ++extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs); + + /* tab_update.c */ + extern struct libmnt_update *mnt_new_update(void) + __ul_attribute__((warn_unused_result)); + extern void mnt_free_update(struct libmnt_update *upd); + +-extern int mnt_update_is_ready(struct libmnt_update *upd) +- __ul_attribute__((nonnull)); ++extern int mnt_update_is_ready(struct libmnt_update *upd); + extern int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags, + const char *target, struct libmnt_fs *fs); + extern int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc); +-extern unsigned long mnt_update_get_mflags(struct libmnt_update *upd) +- __ul_attribute__((nonnull)); ++extern unsigned long mnt_update_get_mflags(struct libmnt_update *upd); + extern int mnt_update_force_rdonly(struct libmnt_update *upd, int rdonly); +-extern const char *mnt_update_get_filename(struct libmnt_update *upd) +- __ul_attribute__((nonnull)); +-extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd) +- __ul_attribute__((nonnull)); ++extern const char *mnt_update_get_filename(struct libmnt_update *upd); ++extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd); + + /* tab_diff.c */ + enum { +@@ -578,8 +530,8 @@ extern int mnt_context_enable_loopdel(struct libmnt_context *cxt, int enable); + extern int mnt_context_enable_fork(struct libmnt_context *cxt, int enable); + extern int mnt_context_disable_swapmatch(struct libmnt_context *cxt, int disable); + +-extern int mnt_context_get_optsmode(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern int mnt_context_get_optsmode(struct libmnt_context *cxt); ++ + extern int mnt_context_is_lazy(struct libmnt_context *cxt) + __ul_attribute__((nonnull)); + extern int mnt_context_is_rdonly_umount(struct libmnt_context *cxt) +@@ -614,28 +566,22 @@ extern int mnt_context_wait_for_children(struct libmnt_context *cxt, + int *nchildren, int *nerrs); + + extern int mnt_context_is_fs_mounted(struct libmnt_context *cxt, +- struct libmnt_fs *fs, int *mounted) +- __ul_attribute__((nonnull)); ++ struct libmnt_fs *fs, int *mounted); + extern int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs); +-extern struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt); + + extern int mnt_context_set_source(struct libmnt_context *cxt, const char *source); + extern int mnt_context_set_target(struct libmnt_context *cxt, const char *target); + extern int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype); + +-extern const char *mnt_context_get_source(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); +-extern const char *mnt_context_get_target(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); +-extern const char *mnt_context_get_fstype(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern const char *mnt_context_get_source(struct libmnt_context *cxt); ++extern const char *mnt_context_get_target(struct libmnt_context *cxt); ++extern const char *mnt_context_get_fstype(struct libmnt_context *cxt); + + extern int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr); + extern int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr); + +-extern const char *mnt_context_get_options(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern const char *mnt_context_get_options(struct libmnt_context *cxt); + + extern int mnt_context_set_fstype_pattern(struct libmnt_context *cxt, const char *pattern); + extern int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *pattern); +@@ -659,10 +605,8 @@ extern int mnt_context_get_table(struct libmnt_context *cxt, + struct libmnt_table **tb); + extern int mnt_context_set_cache(struct libmnt_context *cxt, + struct libmnt_cache *cache); +-extern struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); +-extern struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt); ++extern struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt); + extern int mnt_context_set_mflags(struct libmnt_context *cxt, + unsigned long flags); + extern int mnt_context_get_mflags(struct libmnt_context *cxt, +@@ -676,19 +620,14 @@ extern int mnt_context_set_mountdata(struct libmnt_context *cxt, void *data); + extern int mnt_context_apply_fstab(struct libmnt_context *cxt); + + extern int mnt_context_reset_status(struct libmnt_context *cxt); +-extern int mnt_context_get_status(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern int mnt_context_get_status(struct libmnt_context *cxt); + +-extern int mnt_context_helper_executed(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); +-extern int mnt_context_get_helper_status(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern int mnt_context_helper_executed(struct libmnt_context *cxt); ++extern int mnt_context_get_helper_status(struct libmnt_context *cxt); + +-extern int mnt_context_syscall_called(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern int mnt_context_syscall_called(struct libmnt_context *cxt); + +-extern int mnt_context_get_syscall_errno(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern int mnt_context_get_syscall_errno(struct libmnt_context *cxt); + + extern int mnt_context_strerror(struct libmnt_context *cxt, char *buf, + size_t bufsiz); +@@ -720,8 +659,7 @@ extern int mnt_context_prepare_umount(struct libmnt_context *cxt) + extern int mnt_context_do_umount(struct libmnt_context *cxt); + extern int mnt_context_finalize_umount(struct libmnt_context *cxt); + +-extern int mnt_context_tab_applied(struct libmnt_context *cxt) +- __ul_attribute__((nonnull)); ++extern int mnt_context_tab_applied(struct libmnt_context *cxt); + extern int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status); + + /* +diff --git a/libmount/src/lock.c b/libmount/src/lock.c +index 9e583cc..e73edf5 100644 +--- a/libmount/src/lock.c ++++ b/libmount/src/lock.c +@@ -53,6 +53,8 @@ struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id) + char *lo = NULL, *ln = NULL; + size_t losz; + ++ assert(datafile); ++ + /* for flock we use "foo.lock, for mtab "foo~" + */ + losz = strlen(datafile) + sizeof(".lock"); +diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h +index 065b815..e064a68 100644 +--- a/libmount/src/mountP.h ++++ b/libmount/src/mountP.h +@@ -26,7 +26,9 @@ + #define CONFIG_LIBMOUNT_DEBUG + + #ifdef CONFIG_LIBMOUNT_ASSERT +-#include ++# include ++#else ++# define assert(x) + #endif + + /* +diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c +index a3a5d0a..5e9e708 100644 +--- a/libmount/src/optstr.c ++++ b/libmount/src/optstr.c +@@ -169,8 +169,7 @@ int mnt_optstr_next_option(char **optstr, char **name, size_t *namesz, + return mnt_optstr_parse_next(optstr, name, namesz, value, valuesz); + } + +-static int __attribute__((nonnull(1, 2))) +-__mnt_optstr_append_option(char **optstr, ++static int __mnt_optstr_append_option(char **optstr, + const char *name, size_t nsz, + const char *value, size_t vsz) + { +@@ -180,6 +179,7 @@ __mnt_optstr_append_option(char **optstr, + assert(name); + assert(*name); + assert(nsz); ++ assert(optstr); + + osz = *optstr ? strlen(*optstr) : 0; + +@@ -225,6 +225,8 @@ int mnt_optstr_append_option(char **optstr, const char *name, const char *value) + { + size_t vsz, nsz; + ++ assert(optstr); ++ + if (!name || !*name) + return 0; + +@@ -248,6 +250,11 @@ int mnt_optstr_prepend_option(char **optstr, const char *name, const char *value + int rc = 0; + char *tmp = *optstr; + ++ assert(optstr); ++ ++ if (!name || !*name) ++ return 0; ++ + *optstr = NULL; + + rc = mnt_optstr_append_option(optstr, name, value); +@@ -282,6 +289,9 @@ int mnt_optstr_get_option(const char *optstr, const char *name, + struct libmnt_optloc ol; + int rc; + ++ assert(optstr); ++ assert(name); ++ + mnt_init_optloc(&ol); + + rc = mnt_optstr_locate_option((char *) optstr, name, &ol); +@@ -307,8 +317,12 @@ int mnt_optstr_get_option(const char *optstr, const char *name, + int mnt_optstr_deduplicate_option(char **optstr, const char *name) + { + int rc; +- char *begin = NULL, *end = NULL, *opt = *optstr; ++ char *begin = NULL, *end = NULL, *opt; + ++ assert(optstr); ++ assert(name); ++ ++ opt = *optstr; + do { + struct libmnt_optloc ol; + +@@ -421,6 +435,9 @@ int mnt_optstr_set_option(char **optstr, const char *name, const char *value) + char *nameend; + int rc = 1; + ++ assert(optstr); ++ assert(name); ++ + if (!optstr) + return -EINVAL; + +@@ -467,6 +484,9 @@ int mnt_optstr_remove_option(char **optstr, const char *name) + struct libmnt_optloc ol; + int rc; + ++ assert(optstr); ++ assert(name); ++ + mnt_init_optloc(&ol); + + rc = mnt_optstr_locate_option(*optstr, name, &ol); +diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c +index 7368d8c..e930fd8 100644 +--- a/libmount/src/tab_parse.c ++++ b/libmount/src/tab_parse.c +@@ -720,7 +720,6 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) + struct stat st; + + assert(filename); +- + if (!filename) + return NULL; + if (stat(filename, &st)) +@@ -749,6 +748,7 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) + */ + struct libmnt_table *mnt_new_table_from_file(const char *filename) + { ++ assert(filename); + return __mnt_new_table_from_file(filename, MNT_FMT_GUESS); + } + +@@ -763,7 +763,6 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) + struct libmnt_table *tb; + + assert(dirname); +- + if (!dirname) + return NULL; + tb = mnt_new_table(); +@@ -793,6 +792,7 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) + int mnt_table_set_parser_errcb(struct libmnt_table *tb, + int (*cb)(struct libmnt_table *tb, const char *filename, int line)) + { ++ assert(tb); + if (!tb) + return -EINVAL; + tb->errcb = cb; +@@ -807,6 +807,7 @@ int mnt_table_set_parser_fltrcb(struct libmnt_table *tb, + int (*cb)(struct libmnt_fs *, void *), + void *data) + { ++ assert(tb); + if (!tb) + return -EINVAL; + +@@ -862,7 +863,6 @@ int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename) + int rc = 0; + + assert(tb); +- + if (!tb) + return -EINVAL; + if (!filename) +@@ -959,6 +959,8 @@ int mnt_table_parse_mtab(struct libmnt_table *tb, const char *filename) + const char *utab = NULL; + struct libmnt_table *u_tb; + ++ assert(tb); ++ + if (mnt_has_regular_mtab(&filename, NULL)) { + + DBG(TAB, mnt_debug_h(tb, "force %s usage", filename)); +diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c +index 044a13f..1e7f32b 100644 +--- a/libmount/src/tab_update.c ++++ b/libmount/src/tab_update.c +@@ -131,6 +131,7 @@ int mnt_update_set_filename(struct libmnt_update *upd, const char *filename, + */ + const char *mnt_update_get_filename(struct libmnt_update *upd) + { ++ assert(upd); + return upd ? upd->filename : NULL; + } + +@@ -143,6 +144,7 @@ const char *mnt_update_get_filename(struct libmnt_update *upd) + */ + int mnt_update_is_ready(struct libmnt_update *upd) + { ++ assert(upd); + return upd ? upd->ready : FALSE; + } + +@@ -227,6 +229,7 @@ int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags, + */ + struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd) + { ++ assert(upd); + return upd ? upd->fs : NULL; + } + +@@ -238,6 +241,7 @@ struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd) + */ + unsigned long mnt_update_get_mflags(struct libmnt_update *upd) + { ++ assert(upd); + return upd ? upd->mountflags : 0; + } + +@@ -252,6 +256,7 @@ int mnt_update_force_rdonly(struct libmnt_update *upd, int rdonly) + { + int rc = 0; + ++ assert(upd); + if (!upd || !upd->fs) + return -EINVAL; + +@@ -505,6 +510,7 @@ static int update_table(struct libmnt_update *upd, struct libmnt_table *tb) + int rc, fd; + char *uq = NULL; + ++ assert(upd); + if (!tb || !upd->filename) + return -EINVAL; + +@@ -566,8 +572,11 @@ leave: + + static int add_file_entry(struct libmnt_table *tb, struct libmnt_update *upd) + { +- struct libmnt_fs *fs = mnt_copy_fs(NULL, upd->fs); ++ struct libmnt_fs *fs; ++ ++ assert(upd); + ++ fs = mnt_copy_fs(NULL, upd->fs); + if (!fs) + return -ENOMEM; + +@@ -638,6 +647,7 @@ static int update_modify_target(struct libmnt_update *upd, struct libmnt_lock *l + struct libmnt_table *tb = NULL; + int rc = 0; + ++ assert(upd); + DBG(UPDATE, mnt_debug_h(upd, "%s: modify target", upd->filename)); + + if (lc) +@@ -726,7 +736,6 @@ int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc) + int rc = -EINVAL; + + assert(upd); +- + if (!upd || !upd->filename) + return -EINVAL; + if (!upd->ready) +diff --git a/libmount/src/utils.c b/libmount/src/utils.c +index c910035..c328414 100644 +--- a/libmount/src/utils.c ++++ b/libmount/src/utils.c +@@ -269,6 +269,8 @@ int mnt_fstype_is_pseudofs(const char *type) + "tmpfs" + }; + ++ assert(type); ++ + return !(bsearch(&type, pseudofs, ARRAY_SIZE(pseudofs), + sizeof(char*), fstype_cmp) == NULL); + } +@@ -281,6 +283,8 @@ int mnt_fstype_is_pseudofs(const char *type) + */ + int mnt_fstype_is_netfs(const char *type) + { ++ assert(type); ++ + if (strcmp(type, "cifs") == 0 || + strcmp(type, "smbfs") == 0 || + strncmp(type,"nfs", 3) == 0 || +@@ -859,10 +863,13 @@ int mnt_open_uniq_filename(const char *filename, char **name) + */ + char *mnt_get_mountpoint(const char *path) + { +- char *mnt = strdup(path); ++ char *mnt; + struct stat st; + dev_t dir, base; + ++ assert(path); ++ ++ mnt = strdup(path); + if (!mnt) + return NULL; + if (*mnt == '/' && *(mnt + 1) == '\0') +diff --git a/libmount/src/version.c b/libmount/src/version.c +index 00e4f99..00b7c03 100644 +--- a/libmount/src/version.c ++++ b/libmount/src/version.c +@@ -25,6 +25,9 @@ static const char *lib_features[] = { + #ifdef CONFIG_LIBMOUNT_DEBUG + "debug", + #endif ++#ifdef CONFIG_LIBMOUNT_ASSERT ++ "assert", ++#endif + NULL + }; + +@@ -39,6 +42,8 @@ int mnt_parse_version_string(const char *ver_string) + const char *cp; + int version = 0; + ++ assert(ver_string); ++ + for (cp = ver_string; *cp; cp++) { + if (*cp == '.') + continue; +-- +1.8.1.4 + diff --git a/util-linux.spec b/util-linux.spec index d832c36..55391c7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -88,6 +88,10 @@ Patch2: util-linux-2.19-floppy-generic.patch # 151635 - makeing /var/log/lastlog Patch3: util-linux-ng-2.22-login-lastlog.patch +### upstream pathes (2.23) +# 948274 - interruption code 0x4003B in libmount.so.1.1.0 +Patch100: 0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -822,6 +826,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Fri Apr 12 2013 Karel Zak 2.23-0.5 +- fix #948274 - interruption code 0x4003B in libmount.so.1.1.0 + * Wed Apr 10 2013 Karel Zak 2.23-0.4 - upgrade to the release 2.23-rc2 From 3fc0e67f32827466ca0b868488252d36f0bccce7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Apr 2013 10:37:16 +0200 Subject: [PATCH 141/425] 2.23-0.6: remove floppy from util-linux Signed-off-by: Karel Zak --- sources | 1 - util-linux-2.19-floppy-generic.patch | 103 ------------------------- util-linux-2.19-floppy-locale.patch | 11 --- util-linux-2.22-fdformat-man-ide.patch | 25 ------ 4 files changed, 140 deletions(-) delete mode 100644 util-linux-2.19-floppy-generic.patch delete mode 100644 util-linux-2.19-floppy-locale.patch delete mode 100644 util-linux-2.22-fdformat-man-ide.patch diff --git a/sources b/sources index 50e47fe..09b9945 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 abf3d68b534237b9c336dd5bfbf058d9 util-linux-2.23-rc2.tar.xz diff --git a/util-linux-2.19-floppy-generic.patch b/util-linux-2.19-floppy-generic.patch deleted file mode 100644 index eb12161..0000000 --- a/util-linux-2.19-floppy-generic.patch +++ /dev/null @@ -1,103 +0,0 @@ -diff -up util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak util-linux-2.19/floppy-0.18/floppyfloppy.c ---- util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak 2009-09-24 03:36:33.000000000 +0200 -+++ util-linux-2.19/floppy-0.18/floppyfloppy.c 2011-03-07 10:40:42.000000000 +0100 -@@ -271,6 +271,33 @@ static RETSIGTYPE sighandler(int signum) - #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) -@@ -282,6 +309,7 @@ static int do_format(const char *dev, in - struct format_descr curtrack; - int pct; - struct stat stat_buf; -+ int gen = 0; - - int i, j; - char *devname; -@@ -304,23 +332,52 @@ static int do_format(const char *dev, in - - 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-2.19-floppy-locale.patch b/util-linux-2.19-floppy-locale.patch deleted file mode 100644 index 43ecae9..0000000 --- a/util-linux-2.19-floppy-locale.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up util-linux-2.19/floppy-0.18/superfloppy.c.kzak util-linux-2.19/floppy-0.18/superfloppy.c ---- util-linux-2.19/floppy-0.18/superfloppy.c.kzak 2009-09-23 02:47:26.000000000 +0200 -+++ util-linux-2.19/floppy-0.18/superfloppy.c 2011-03-07 10:37:20.000000000 +0100 -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/util-linux-2.22-fdformat-man-ide.patch b/util-linux-2.22-fdformat-man-ide.patch deleted file mode 100644 index d742d5f..0000000 --- a/util-linux-2.22-fdformat-man-ide.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up util-linux-2.22.2/disk-utils/fdformat.8.kzak util-linux-2.22.2/disk-utils/fdformat.8 ---- util-linux-2.22.2/disk-utils/fdformat.8.kzak 2012-06-11 12:06:53.620195844 +0200 -+++ util-linux-2.22.2/disk-utils/fdformat.8 2013-02-19 16:16:27.130214023 +0100 -@@ -43,6 +43,11 @@ when a non-standard format is being used - autodetected earlier. In this case, use - .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 - \fB\-n\fR, \fB\-\-no\-verify\fR -@@ -57,7 +62,8 @@ Display help and exit. - .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 From 59ea5186b7d1cf255a85fcd4edb5b4b4ec85baa4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Apr 2013 10:39:36 +0200 Subject: [PATCH 142/425] 2.23-0.6: commit uncommitted changes Signed-off-by: Karel Zak --- util-linux.spec | 47 ++++++----------------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 55391c7..3bac0be 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.5%{?dist} +Release: 0.6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -10,7 +10,6 @@ URL: http://en.wikipedia.org/wiki/Util-linux %define upstream_version %{version}-rc2 ### Macros -%define floppyver 0.18 %define cytune_archs %{ix86} alpha %{arm} %define compldir %{_datadir}/bash-completion/completions/ @@ -35,7 +34,6 @@ Source3: util-linux-chsh-chfn.pamd Source4: util-linux-60-raw.rules Source8: nologin.c Source9: nologin.8 -Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd @@ -74,15 +72,6 @@ Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} -### Floppy patches (Fedora/RHEL specific) -### -# add a missing header -Patch0: util-linux-2.19-floppy-locale.patch -# add note about ATAPI IDE floppy to fdformat.8 -Patch1: util-linux-2.22-fdformat-man-ide.patch -# 169628 - /usr/bin/floppy doesn't work with /dev/fd0 -Patch2: util-linux-2.19-floppy-generic.patch - ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog @@ -203,7 +192,7 @@ SMP systems. %prep -%setup -q -a 11 -n %{name}-%{upstream_version} +%setup -q -n %{name}-%{upstream_version} cp %{SOURCE8} %{SOURCE9} . for p in %{patches}; do @@ -242,12 +231,6 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" # build util-linux make %{?_smp_mflags} -# build floppy stuff -pushd floppy-%{floppyver} -%configure --disable-gtk2 -make %{?_smp_mflags} -popd - # build nologin gcc $CFLAGS -o nologin nologin.c @@ -264,11 +247,6 @@ chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog # install util-linux 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}%{_sbindir} install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 @@ -329,12 +307,6 @@ ln -sf hwclock ${RPM_BUILD_ROOT}%{_sbindir}/clock echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 %endif -# unsupported on s390 -%ifarch s390 s390x -rm -f $RPM_BUILD_ROOT%{_sbindir}floppy -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/floppy.8* -%endif - # unsupported on SPARCs %ifarch %{sparc} for I in /sbin/sfdisk \ @@ -347,14 +319,6 @@ for I in /sbin/sfdisk \ done %endif -# deprecated docs -for I in floppy-%{floppyver}/README.html; do - rm -rf $I -done - -# rename docs -mv floppy-%{floppyver}/README floppy-%{floppyver}/README.floppy - # we install getopt-*.{bash,tcsh} as doc files chmod 644 misc-utils/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* @@ -451,7 +415,7 @@ fi %files -f %{name}.files %defattr(-,root,root) -%doc README */README.* NEWS AUTHORS +%doc README NEWS AUTHORS %doc Documentation/deprecated.txt Documentation/licenses/* %doc misc-utils/getopt-*.{bash,tcsh} @@ -731,11 +695,9 @@ fi %ifnarch s390 s390x %{_sbindir}/clock -%{_bindir}/floppy %{_sbindir}/fdformat %{_sbindir}/hwclock %{_mandir}/man8/fdformat.8* -%{_mandir}/man8/floppy.8* %{_mandir}/man8/hwclock.8* %{_mandir}/man8/clock.8* %{compldir}/fdformat @@ -826,6 +788,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Mon Apr 15 2013 Karel Zak 2.23-0.6 +- remove floppy from util-linux + * Fri Apr 12 2013 Karel Zak 2.23-0.5 - fix #948274 - interruption code 0x4003B in libmount.so.1.1.0 From 19ed00a32f220678a2a59ccb507cc7153d410f83 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Apr 2013 10:58:14 +0200 Subject: [PATCH 143/425] 2.23-0.6: 2.23-0.6: 2.23-0.6: 2.23-0.6: 2.23-0.6: 2.23-0.6: remove unused patches Signed-off-by: Karel Zak --- agetty-replace-perms-660-to-620.patch | 45 ----- ...-ncurses-output-functions-and-printf.patch | 139 --------------- ...egfault-when-iterating-over-an-empty.patch | 95 ---------- ...-support-for-btrfs-backup-superblock.patch | 46 ----- ...ckup-superblock-visible-for-wipefs-8.patch | 64 ------- ...ve-optimization-from-verify-function.patch | 165 ------------------ 6 files changed, 554 deletions(-) delete mode 100644 agetty-replace-perms-660-to-620.patch delete mode 100644 cal-don-t-mix-ncurses-output-functions-and-printf.patch delete mode 100644 hexdump-do-not-segfault-when-iterating-over-an-empty.patch delete mode 100644 libblkid-add-support-for-btrfs-backup-superblock.patch delete mode 100644 libblkid-make-backup-superblock-visible-for-wipefs-8.patch delete mode 100644 libblkid-remove-optimization-from-verify-function.patch diff --git a/agetty-replace-perms-660-to-620.patch b/agetty-replace-perms-660-to-620.patch deleted file mode 100644 index ebf59b7..0000000 --- a/agetty-replace-perms-660-to-620.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7afbf6f20e1de62fb5595411d998703c95af8965 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 2 Jan 2013 08:23:00 +0100 -Subject: [PATCH 1/3] agetty: replace perms 660 to 620 - - ... the default is root:tty 620 - -Signed-off-by: Karel Zak ---- - login-utils/login.1 | 5 ++++- - term-utils/agetty.c | 2 +- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/login-utils/login.1 b/login-utils/login.1 -index 092213d..e37e5e6 100644 ---- a/login-utils/login.1 -+++ b/login-utils/login.1 -@@ -184,7 +184,10 @@ login failure. The default value is - (string) - .RS 4 - The terminal permissions. The default value is --.IR 0600 . -+.IR 0600 -+or -+.IR 0620 -+if tty group is used. - .RE - .PP - .B TTYGROUP -diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index 7ee252d..17ebfba 100644 ---- a/term-utils/agetty.c -+++ b/term-utils/agetty.c -@@ -894,7 +894,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op) - * Linux login(1) will change tty permissions. Use root owner and group - * with permission -rw------- for the period between getty and login. - */ -- if (chown(buf, 0, gid) || chmod(buf, (gid ? 0660 : 0600))) { -+ if (chown(buf, 0, gid) || chmod(buf, (gid ? 0620 : 0600))) { - if (errno == EROFS) - log_warn("%s: %m", buf); - else --- -1.8.1 - diff --git a/cal-don-t-mix-ncurses-output-functions-and-printf.patch b/cal-don-t-mix-ncurses-output-functions-and-printf.patch deleted file mode 100644 index 1641068..0000000 --- a/cal-don-t-mix-ncurses-output-functions-and-printf.patch +++ /dev/null @@ -1,139 +0,0 @@ -From c265cc40a8ece740084fbfb3ebd4c1894b3b29b7 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 17 Jan 2013 18:48:16 +0100 -Subject: [PATCH 3/3] cal: don't mix ncurses output functions and printf() - -Fedora 18 (ncurses-libs-5.9-7.20121017, glibc-2.16-28): - -$ cal | cat -Actual results: - January 2013 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 -9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31 - -Not sure where is the problem, but it's too fragile to mix two -output methods in one code. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=896447 -Signed-off-by: Karel Zak ---- - misc-utils/cal.c | 43 +++++++++++++++++++++++++++---------------- - 1 file changed, 27 insertions(+), 16 deletions(-) - -diff --git a/misc-utils/cal.c b/misc-utils/cal.c -index 60e85df..0e204b9 100644 ---- a/misc-utils/cal.c -+++ b/misc-utils/cal.c -@@ -498,7 +498,7 @@ monthly(int day, int month, int year) { - do_monthly(day, month, year, &out); - for (i = 0; i < FMT_ST_LINES; i++) { - my_putstring(out.s[i]); -- putchar('\n'); -+ my_putstring("\n"); - } - } - -@@ -533,8 +533,11 @@ monthly3(int day, int month, int year) { - do_monthly(day, next_month, next_year, &out_next); - - width = (julian ? J_WEEK_LEN : WEEK_LEN) -1; -- for (i = 0; i < 2; i++) -- printf("%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); -+ for (i = 0; i < 2; i++) { -+ snprintf(lineout, sizeof(lineout), -+ "%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); -+ my_putstring(lineout); -+ } - for (i = 2; i < FMT_ST_LINES; i++) { - int w1, w2, w3; - w1 = w2 = w3 = width; -@@ -562,7 +565,7 @@ j_yearly(int day, int year) { - - snprintf(lineout, sizeof(lineout), "%d", year); - center(lineout, J_WEEK_LEN*2 + J_HEAD_SEP - 1, 0); -- printf("\n\n"); -+ my_putstring("\n\n"); - - for (i = 0; i < 12; i++) - day_array(day, i + 1, year, days[i]); -@@ -571,8 +574,10 @@ j_yearly(int day, int year) { - for (month = 0; month < 12; month += 2) { - center(full_month[month], J_WEEK_LEN-1, J_HEAD_SEP+1); - center(full_month[month + 1], J_WEEK_LEN-1, 0); -- printf("\n%s%*s %s\n", j_day_headings, J_HEAD_SEP, "", -- j_day_headings); -+ snprintf(lineout, sizeof(lineout), -+ "\n%s%*s %s\n", j_day_headings, J_HEAD_SEP, "", -+ j_day_headings); -+ my_putstring(lineout); - for (row = 0; row < 6; row++) { - p = lineout; - for (which_cal = 0; which_cal < 2; which_cal++) { -@@ -584,10 +589,10 @@ j_yearly(int day, int year) { - *p = '\0'; - trim_trailing_spaces(lineout); - my_putstring(lineout); -- putchar('\n'); -+ my_putstring("\n"); - } - } -- printf("\n"); -+ my_putstring("\n"); - } - - void -@@ -598,7 +603,7 @@ yearly(int day, int year) { - - snprintf(lineout, sizeof(lineout), "%d", year); - center(lineout, WEEK_LEN*3 + HEAD_SEP*2 - 1, 0); -- printf("\n\n"); -+ my_putstring("\n\n"); - - for (i = 0; i < 12; i++) - day_array(day, i + 1, year, days[i]); -@@ -608,8 +613,10 @@ yearly(int day, int year) { - center(full_month[month], WEEK_LEN-1, HEAD_SEP+1); - center(full_month[month + 1], WEEK_LEN-1, HEAD_SEP+1); - center(full_month[month + 2], WEEK_LEN-1, 0); -- printf("\n%s%*s %s%*s %s\n", day_headings, HEAD_SEP, -- "", day_headings, HEAD_SEP, "", day_headings); -+ snprintf(lineout, sizeof(lineout), -+ "\n%s%*s %s%*s %s\n", day_headings, HEAD_SEP, -+ "", day_headings, HEAD_SEP, "", day_headings); -+ my_putstring(lineout); - for (row = 0; row < 6; row++) { - p = lineout; - for (which_cal = 0; which_cal < 3; which_cal++) { -@@ -621,10 +628,10 @@ yearly(int day, int year) { - *p = '\0'; - trim_trailing_spaces(lineout); - my_putstring(lineout); -- putchar('\n'); -+ my_putstring("\n"); - } - } -- putchar('\n'); -+ my_putstring("\n"); - } - - /* -@@ -773,10 +780,14 @@ void - center(const char *str, size_t len, int separate) - { - char lineout[FMT_ST_CHARS]; -+ - center_str(str, lineout, ARRAY_SIZE(lineout), len); -- fputs(lineout, stdout); -- if (separate) -- printf("%*s", separate, ""); -+ my_putstring(lineout); -+ -+ if (separate) { -+ snprintf(lineout, sizeof(lineout), "%*s", separate, ""); -+ my_putstring(lineout); -+ } - } - - static void __attribute__ ((__noreturn__)) usage(FILE * out) --- -1.8.1 - diff --git a/hexdump-do-not-segfault-when-iterating-over-an-empty.patch b/hexdump-do-not-segfault-when-iterating-over-an-empty.patch deleted file mode 100644 index c9472bd..0000000 --- a/hexdump-do-not-segfault-when-iterating-over-an-empty.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 85c24fe2b11cd136d43bbffd983014a3f967c25e Mon Sep 17 00:00:00 2001 -From: Ondrej Oprala -Date: Fri, 21 Dec 2012 13:04:04 +0100 -Subject: [PATCH 2/3] hexdump: do not segfault when iterating over an empty - format string - -Signed-off-by: Ondrej Oprala ---- - tests/commands.sh | 1 + - tests/expected/hexdump/empty-format | 1 + - tests/ts/hexdump/empty-format | 26 ++++++++++++++++++++++++++ - text-utils/parse.c | 16 +++++++++------- - 4 files changed, 37 insertions(+), 7 deletions(-) - create mode 100644 tests/expected/hexdump/empty-format - create mode 100755 tests/ts/hexdump/empty-format - -diff --git a/tests/commands.sh b/tests/commands.sh -index db1d4ac..3672095 100644 ---- a/tests/commands.sh -+++ b/tests/commands.sh -@@ -62,3 +62,4 @@ TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"$top_builddir/findmnt"} - - TS_CMD_FDISK=${TS_CMD_FDISK-"$top_builddir/fdisk"} - -+TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"$top_builddir/hexdump"} -diff --git a/tests/expected/hexdump/empty-format b/tests/expected/hexdump/empty-format -new file mode 100644 -index 0000000..9d60796 ---- /dev/null -+++ b/tests/expected/hexdump/empty-format -@@ -0,0 +1 @@ -+11 -\ No newline at end of file -diff --git a/tests/ts/hexdump/empty-format b/tests/ts/hexdump/empty-format -new file mode 100755 -index 0000000..4a3e528 ---- /dev/null -+++ b/tests/ts/hexdump/empty-format -@@ -0,0 +1,26 @@ -+#!/bin/bash -+ -+# This file is part of util-linux. -+# -+# This file is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This file is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+TS_TOPDIR="$(dirname $0)/../.." -+TS_DESC="format-strings" -+ -+. $TS_TOPDIR/functions.sh -+ts_init "$*" -+ -+INPUT=$(printf \\1) -+$TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT 2>&1 >> $TS_OUTPUT -+ -+$TS_CMD_HEXDUMP -n1 -ve '4 "%x"' -e '2 ""' <<< $INPUT 2>&1 >> $TS_OUTPUT -+ -+ts_finalize -diff --git a/text-utils/parse.c b/text-utils/parse.c -index 5f1e2bd..bd96961 100644 ---- a/text-utils/parse.c -+++ b/text-utils/parse.c -@@ -421,13 +421,15 @@ isint2: switch(fu->bcnt) { - !(fu->flags&F_SETREP) && fu->bcnt) - fu->reps += (blocksize - fs->bcnt) / fu->bcnt; - if (fu->reps > 1) { -- for (pr = fu->nextpr;; pr = pr->nextpr) -- if (!pr->nextpr) -- break; -- for (p1 = pr->fmt, p2 = NULL; *p1; ++p1) -- p2 = isspace((unsigned char)*p1) ? p1 : NULL; -- if (p2) -- pr->nospace = p2; -+ if (fu->nextpr) { -+ for (pr = fu->nextpr; ; pr = pr->nextpr) -+ if (!pr->nextpr) -+ break; -+ for (p1 = pr->fmt, p2 = NULL; *p1; ++p1) -+ p2 = isspace((unsigned char)*p1) ? p1 : NULL; -+ if (p2) -+ pr->nospace = p2; -+ } - } - } - } --- -1.8.1 - diff --git a/libblkid-add-support-for-btrfs-backup-superblock.patch b/libblkid-add-support-for-btrfs-backup-superblock.patch deleted file mode 100644 index e8a3ea8..0000000 --- a/libblkid-add-support-for-btrfs-backup-superblock.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d4a276491269b6502c15e0089fba6b616f5c5df8 Mon Sep 17 00:00:00 2001 -From: Goffredo Baroncelli -Date: Wed, 9 Jan 2013 22:14:43 +0100 -Subject: [PATCH] libblkid: add support for btrfs backup superblock - -Btrfs has three superblock. The first one is placed at 64KB, the second one at -64MB, the third one at 256GB. - -If the first superblock is valid except that the "magic field" is zeroed, btrfs -skips the check of the other superblocks. If the first superblock is fully -invalid, btrfs checks for the other superblock. - -So zeroing the first superblock "magic field" at the beginning seems that the -filesystem is wiped. But when the first superblock is overwritten (eg by -another filesystem), then the other two superblock may be considered valid, and -the filesystem may resurrect. - -This patch allow to find and wipe the other btrfs superblocks signature. - -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/btrfs.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c -index 039be42..1bd1df9 100644 ---- a/libblkid/src/superblocks/btrfs.c -+++ b/libblkid/src/superblocks/btrfs.c -@@ -87,6 +87,14 @@ const struct blkid_idinfo btrfs_idinfo = - .magics = - { - { .magic = "_BHRfS_M", .len = 8, .kboff = 64, .sboff = 0x40 }, -+ { .magic = "_BHRfS_M", -+ .len = 8, -+ .kboff = 64 * 1024, -+ .sboff = 0x40 }, -+ { .magic = "_BHRfS_M", -+ .len = 8, -+ .kboff = 256 * 1024 * 1024, -+ .sboff = 0x40 }, - { NULL } - } - }; --- -1.7.11.7 - diff --git a/libblkid-make-backup-superblock-visible-for-wipefs-8.patch b/libblkid-make-backup-superblock-visible-for-wipefs-8.patch deleted file mode 100644 index df06674..0000000 --- a/libblkid-make-backup-superblock-visible-for-wipefs-8.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -up util-linux-2.22.2/libblkid/src/blkidP.h.kzak util-linux-2.22.2/libblkid/src/blkidP.h ---- util-linux-2.22.2/libblkid/src/blkidP.h.kzak 2012-12-12 21:04:47.902355093 +0100 -+++ util-linux-2.22.2/libblkid/src/blkidP.h 2013-02-20 10:54:33.885606609 +0100 -@@ -224,6 +224,9 @@ struct blkid_struct_probe - - /* private per-probing flags */ - #define BLKID_PROBE_FL_IGNORE_PT (1 << 1) /* ignore partition table */ -+#define BLKID_PROBE_FL_IGNORE_BACKUP (1 << 2) /* ignore backup superblocks or PT */ -+ -+extern int blkid_probe_ignore_backup(blkid_probe pr); - - extern blkid_probe blkid_clone_probe(blkid_probe parent); - extern blkid_probe blkid_probe_get_wholedisk_probe(blkid_probe pr); -diff -up util-linux-2.22.2/libblkid/src/probe.c.kzak util-linux-2.22.2/libblkid/src/probe.c ---- util-linux-2.22.2/libblkid/src/probe.c.kzak 2012-12-12 21:04:47.903355101 +0100 -+++ util-linux-2.22.2/libblkid/src/probe.c 2013-02-20 11:02:48.525255696 +0100 -@@ -810,6 +810,7 @@ int blkid_probe_get_idmag(blkid_probe pr - static inline void blkid_probe_start(blkid_probe pr) - { - if (pr) { -+ DBG(DEBUG_LOWPROBE, printf("%p: start probe\n", pr)); - pr->cur_chain = NULL; - pr->prob_flags = 0; - blkid_probe_set_wiper(pr, 0, 0); -@@ -819,6 +820,7 @@ static inline void blkid_probe_start(blk - static inline void blkid_probe_end(blkid_probe pr) - { - if (pr) { -+ DBG(DEBUG_LOWPROBE, printf("%p: end probe\n", pr)); - pr->cur_chain = NULL; - pr->prob_flags = 0; - blkid_probe_set_wiper(pr, 0, 0); -@@ -1057,6 +1059,8 @@ int blkid_do_safeprobe(blkid_probe pr) - - blkid_probe_start(pr); - -+ pr->prob_flags |= BLKID_PROBE_FL_IGNORE_BACKUP; -+ - for (i = 0; i < BLKID_NCHAINS; i++) { - struct blkid_chain *chn; - -@@ -1679,3 +1683,7 @@ void blkid_probe_use_wiper(blkid_probe p - } - } - -+int blkid_probe_ignore_backup(blkid_probe pr) -+{ -+ return pr && (pr->prob_flags & BLKID_PROBE_FL_IGNORE_BACKUP); -+} -diff -up util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak util-linux-2.22.2/libblkid/src/superblocks/btrfs.c ---- util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak 2013-02-20 10:54:03.422381876 +0100 -+++ util-linux-2.22.2/libblkid/src/superblocks/btrfs.c 2013-02-20 10:54:33.886606616 +0100 -@@ -63,6 +63,11 @@ static int probe_btrfs(blkid_probe pr, c - { - struct btrfs_super_block *bfs; - -+ if (mag->kboff > 64 && blkid_probe_ignore_backup(pr)) { -+ DBG(DEBUG_LOWPROBE, printf("btrfs: found backup superblock, ignore\n")); -+ return 1; -+ } -+ - bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block); - if (!bfs) - return -1; diff --git a/libblkid-remove-optimization-from-verify-function.patch b/libblkid-remove-optimization-from-verify-function.patch deleted file mode 100644 index 7d40835..0000000 --- a/libblkid-remove-optimization-from-verify-function.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 2270b1ad90b394950f4fe215eb2fc1042020cef0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 1 Feb 2013 15:59:58 +0100 -Subject: [PATCH] libblkid: remove optimization from verify( funrtion - -Now libblkid (the cache based part) tries to probe for the cached -filesystem firstly. This optimization is broken, because: - - * new another superblock could be on the device and the original - is already obsolete - * we still need to probe for partitions and raids - * the code was too fragile - -The patch also suggests lsblk --fs in blkid.8 for end users. lsblk -read information from used db. - -Reported-by: Andreas Hofmeister -Signed-off-by: Karel Zak ---- - libblkid/src/verify.c | 76 ++++++++------------------------------------------- - misc-utils/blkid.8 | 11 ++++++++ - 2 files changed, 22 insertions(+), 65 deletions(-) - -diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c -index 4bab4de..0f48c48 100644 ---- a/libblkid/src/verify.c -+++ b/libblkid/src/verify.c -@@ -43,26 +43,6 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) - blkid_set_tag(dev, name, data, len); - } - } -- -- /* -- * remove obsolete tags -- */ -- if (!nvals || !blkid_probe_has_value(pr, "LABEL")) -- blkid_set_tag(dev, "LABEL", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "UUID")) -- blkid_set_tag(dev, "UUID", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "PART_ENTRY_UUID")) -- blkid_set_tag(dev, "PARTUUID", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "PART_ENTRY_NAME")) -- blkid_set_tag(dev, "PARTLABEL", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "TYPE")) -- blkid_set_tag(dev, "TYPE", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "SEC_TYPE")) -- blkid_set_tag(dev, "SEC_TYPE", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "EXT_JOURNAL")) /* extN */ -- blkid_set_tag(dev, "EXT_JOURNAL", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "MOUNT")) /* ocfs */ -- blkid_set_tag(dev, "MOUNT", NULL, 0); - } - - /* -@@ -76,9 +56,10 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) - */ - blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - { -+ blkid_tag_iterate iter; -+ const char *type, *value; - struct stat st; - time_t diff, now; -- char *fltr[2]; - int fd; - - if (!dev) -@@ -155,64 +136,29 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - return NULL; - } - -- blkid_probe_enable_superblocks(cache->probe, TRUE); -+ /* remove old cache info */ -+ iter = blkid_tag_iterate_begin(dev); -+ while (blkid_tag_next(iter, &type, &value) == 0) -+ blkid_set_tag(dev, type, NULL, 0); -+ blkid_tag_iterate_end(iter); - -+ /* enable superblocks probing */ -+ blkid_probe_enable_superblocks(cache->probe, TRUE); - blkid_probe_set_superblocks_flags(cache->probe, - BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | - BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE); - -- /* -- * If we already know the type, then try that first. -- */ -- if (dev->bid_type) { -- blkid_tag_iterate iter; -- const char *type, *value; -- -- fltr[0] = dev->bid_type; -- fltr[1] = NULL; -- -- blkid_probe_filter_superblocks_type(cache->probe, -- BLKID_FLTR_ONLYIN, fltr); -- -- if (blkid_do_probe(cache->probe) == 0) { -- /* -- * Cool, we found FS type, let's also read PART{UUID,LABEL} -- */ -- blkid_probe_enable_superblocks(cache->probe, FALSE); -- blkid_probe_enable_partitions(cache->probe, TRUE); -- blkid_probe_set_partitions_flags(cache->probe, BLKID_PARTS_ENTRY_DETAILS); -- if (blkid_do_probe(cache->probe) == 0) -- goto found_type; -- } -- -- blkid_probe_enable_superblocks(cache->probe, TRUE); -- blkid_probe_invert_superblocks_filter(cache->probe); -- -- /* -- * Zap the device filesystem information and try again -- */ -- DBG(DEBUG_PROBE, -- printf("previous fs type %s not valid, " -- "trying full probe\n", dev->bid_type)); -- iter = blkid_tag_iterate_begin(dev); -- while (blkid_tag_next(iter, &type, &value) == 0) -- blkid_set_tag(dev, type, 0, 0); -- blkid_tag_iterate_end(iter); -- } -- -+ /* enable partitions probing */ - blkid_probe_enable_partitions(cache->probe, TRUE); - blkid_probe_set_partitions_flags(cache->probe, BLKID_PARTS_ENTRY_DETAILS); - -- /* -- * Probe for all types. -- */ -+ /* probe */ - if (blkid_do_safeprobe(cache->probe)) { - /* found nothing or error */ - blkid_free_dev(dev); - dev = NULL; - } - --found_type: - if (dev) { - #ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - struct timeval tv; -diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 -index 2ba1ab4..eb8d716 100644 ---- a/misc-utils/blkid.8 -+++ b/misc-utils/blkid.8 -@@ -64,6 +64,17 @@ library. It can determine the type of content (e.g. filesystem or swap) - that a block device holds, and also attributes (tokens, NAME=value pairs) - from the content metadata (e.g. LABEL or UUID fields). - .PP -+Note that -+.B blkid -+reads information directly from devices and for non-root users -+it returns cached unverified information. It's better to use -+.B lsblk --fs -+to get user-friendly overview about filesystems and devices. -+.BR lsblk (8) -+is also easy to use in scripts. -+.B blkid -+is mostly designed for system services and to test libblkid functionality. -+.PP - .B blkid - has two main forms of operation: either searching for a device with a - specific NAME=value pair, or displaying NAME=value pairs for one or --- -1.8.1 - From 1ae81e57b4b84450ac1eb9239b037ae647688905 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Apr 2013 11:36:37 +0200 Subject: [PATCH 144/425] 2.23-0.7: remove unused patches Signed-off-by: Karel Zak --- agetty-replace-perms-660-to-620.patch | 45 ----- ...-ncurses-output-functions-and-printf.patch | 139 --------------- ...egfault-when-iterating-over-an-empty.patch | 95 ---------- ...-support-for-btrfs-backup-superblock.patch | 46 ----- ...ckup-superblock-visible-for-wipefs-8.patch | 64 ------- ...ve-optimization-from-verify-function.patch | 165 ------------------ util-linux.spec | 5 +- 7 files changed, 4 insertions(+), 555 deletions(-) delete mode 100644 agetty-replace-perms-660-to-620.patch delete mode 100644 cal-don-t-mix-ncurses-output-functions-and-printf.patch delete mode 100644 hexdump-do-not-segfault-when-iterating-over-an-empty.patch delete mode 100644 libblkid-add-support-for-btrfs-backup-superblock.patch delete mode 100644 libblkid-make-backup-superblock-visible-for-wipefs-8.patch delete mode 100644 libblkid-remove-optimization-from-verify-function.patch diff --git a/agetty-replace-perms-660-to-620.patch b/agetty-replace-perms-660-to-620.patch deleted file mode 100644 index ebf59b7..0000000 --- a/agetty-replace-perms-660-to-620.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7afbf6f20e1de62fb5595411d998703c95af8965 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 2 Jan 2013 08:23:00 +0100 -Subject: [PATCH 1/3] agetty: replace perms 660 to 620 - - ... the default is root:tty 620 - -Signed-off-by: Karel Zak ---- - login-utils/login.1 | 5 ++++- - term-utils/agetty.c | 2 +- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/login-utils/login.1 b/login-utils/login.1 -index 092213d..e37e5e6 100644 ---- a/login-utils/login.1 -+++ b/login-utils/login.1 -@@ -184,7 +184,10 @@ login failure. The default value is - (string) - .RS 4 - The terminal permissions. The default value is --.IR 0600 . -+.IR 0600 -+or -+.IR 0620 -+if tty group is used. - .RE - .PP - .B TTYGROUP -diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index 7ee252d..17ebfba 100644 ---- a/term-utils/agetty.c -+++ b/term-utils/agetty.c -@@ -894,7 +894,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op) - * Linux login(1) will change tty permissions. Use root owner and group - * with permission -rw------- for the period between getty and login. - */ -- if (chown(buf, 0, gid) || chmod(buf, (gid ? 0660 : 0600))) { -+ if (chown(buf, 0, gid) || chmod(buf, (gid ? 0620 : 0600))) { - if (errno == EROFS) - log_warn("%s: %m", buf); - else --- -1.8.1 - diff --git a/cal-don-t-mix-ncurses-output-functions-and-printf.patch b/cal-don-t-mix-ncurses-output-functions-and-printf.patch deleted file mode 100644 index 1641068..0000000 --- a/cal-don-t-mix-ncurses-output-functions-and-printf.patch +++ /dev/null @@ -1,139 +0,0 @@ -From c265cc40a8ece740084fbfb3ebd4c1894b3b29b7 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 17 Jan 2013 18:48:16 +0100 -Subject: [PATCH 3/3] cal: don't mix ncurses output functions and printf() - -Fedora 18 (ncurses-libs-5.9-7.20121017, glibc-2.16-28): - -$ cal | cat -Actual results: - January 2013 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 -9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31 - -Not sure where is the problem, but it's too fragile to mix two -output methods in one code. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=896447 -Signed-off-by: Karel Zak ---- - misc-utils/cal.c | 43 +++++++++++++++++++++++++++---------------- - 1 file changed, 27 insertions(+), 16 deletions(-) - -diff --git a/misc-utils/cal.c b/misc-utils/cal.c -index 60e85df..0e204b9 100644 ---- a/misc-utils/cal.c -+++ b/misc-utils/cal.c -@@ -498,7 +498,7 @@ monthly(int day, int month, int year) { - do_monthly(day, month, year, &out); - for (i = 0; i < FMT_ST_LINES; i++) { - my_putstring(out.s[i]); -- putchar('\n'); -+ my_putstring("\n"); - } - } - -@@ -533,8 +533,11 @@ monthly3(int day, int month, int year) { - do_monthly(day, next_month, next_year, &out_next); - - width = (julian ? J_WEEK_LEN : WEEK_LEN) -1; -- for (i = 0; i < 2; i++) -- printf("%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); -+ for (i = 0; i < 2; i++) { -+ snprintf(lineout, sizeof(lineout), -+ "%s %s %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]); -+ my_putstring(lineout); -+ } - for (i = 2; i < FMT_ST_LINES; i++) { - int w1, w2, w3; - w1 = w2 = w3 = width; -@@ -562,7 +565,7 @@ j_yearly(int day, int year) { - - snprintf(lineout, sizeof(lineout), "%d", year); - center(lineout, J_WEEK_LEN*2 + J_HEAD_SEP - 1, 0); -- printf("\n\n"); -+ my_putstring("\n\n"); - - for (i = 0; i < 12; i++) - day_array(day, i + 1, year, days[i]); -@@ -571,8 +574,10 @@ j_yearly(int day, int year) { - for (month = 0; month < 12; month += 2) { - center(full_month[month], J_WEEK_LEN-1, J_HEAD_SEP+1); - center(full_month[month + 1], J_WEEK_LEN-1, 0); -- printf("\n%s%*s %s\n", j_day_headings, J_HEAD_SEP, "", -- j_day_headings); -+ snprintf(lineout, sizeof(lineout), -+ "\n%s%*s %s\n", j_day_headings, J_HEAD_SEP, "", -+ j_day_headings); -+ my_putstring(lineout); - for (row = 0; row < 6; row++) { - p = lineout; - for (which_cal = 0; which_cal < 2; which_cal++) { -@@ -584,10 +589,10 @@ j_yearly(int day, int year) { - *p = '\0'; - trim_trailing_spaces(lineout); - my_putstring(lineout); -- putchar('\n'); -+ my_putstring("\n"); - } - } -- printf("\n"); -+ my_putstring("\n"); - } - - void -@@ -598,7 +603,7 @@ yearly(int day, int year) { - - snprintf(lineout, sizeof(lineout), "%d", year); - center(lineout, WEEK_LEN*3 + HEAD_SEP*2 - 1, 0); -- printf("\n\n"); -+ my_putstring("\n\n"); - - for (i = 0; i < 12; i++) - day_array(day, i + 1, year, days[i]); -@@ -608,8 +613,10 @@ yearly(int day, int year) { - center(full_month[month], WEEK_LEN-1, HEAD_SEP+1); - center(full_month[month + 1], WEEK_LEN-1, HEAD_SEP+1); - center(full_month[month + 2], WEEK_LEN-1, 0); -- printf("\n%s%*s %s%*s %s\n", day_headings, HEAD_SEP, -- "", day_headings, HEAD_SEP, "", day_headings); -+ snprintf(lineout, sizeof(lineout), -+ "\n%s%*s %s%*s %s\n", day_headings, HEAD_SEP, -+ "", day_headings, HEAD_SEP, "", day_headings); -+ my_putstring(lineout); - for (row = 0; row < 6; row++) { - p = lineout; - for (which_cal = 0; which_cal < 3; which_cal++) { -@@ -621,10 +628,10 @@ yearly(int day, int year) { - *p = '\0'; - trim_trailing_spaces(lineout); - my_putstring(lineout); -- putchar('\n'); -+ my_putstring("\n"); - } - } -- putchar('\n'); -+ my_putstring("\n"); - } - - /* -@@ -773,10 +780,14 @@ void - center(const char *str, size_t len, int separate) - { - char lineout[FMT_ST_CHARS]; -+ - center_str(str, lineout, ARRAY_SIZE(lineout), len); -- fputs(lineout, stdout); -- if (separate) -- printf("%*s", separate, ""); -+ my_putstring(lineout); -+ -+ if (separate) { -+ snprintf(lineout, sizeof(lineout), "%*s", separate, ""); -+ my_putstring(lineout); -+ } - } - - static void __attribute__ ((__noreturn__)) usage(FILE * out) --- -1.8.1 - diff --git a/hexdump-do-not-segfault-when-iterating-over-an-empty.patch b/hexdump-do-not-segfault-when-iterating-over-an-empty.patch deleted file mode 100644 index c9472bd..0000000 --- a/hexdump-do-not-segfault-when-iterating-over-an-empty.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 85c24fe2b11cd136d43bbffd983014a3f967c25e Mon Sep 17 00:00:00 2001 -From: Ondrej Oprala -Date: Fri, 21 Dec 2012 13:04:04 +0100 -Subject: [PATCH 2/3] hexdump: do not segfault when iterating over an empty - format string - -Signed-off-by: Ondrej Oprala ---- - tests/commands.sh | 1 + - tests/expected/hexdump/empty-format | 1 + - tests/ts/hexdump/empty-format | 26 ++++++++++++++++++++++++++ - text-utils/parse.c | 16 +++++++++------- - 4 files changed, 37 insertions(+), 7 deletions(-) - create mode 100644 tests/expected/hexdump/empty-format - create mode 100755 tests/ts/hexdump/empty-format - -diff --git a/tests/commands.sh b/tests/commands.sh -index db1d4ac..3672095 100644 ---- a/tests/commands.sh -+++ b/tests/commands.sh -@@ -62,3 +62,4 @@ TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"$top_builddir/findmnt"} - - TS_CMD_FDISK=${TS_CMD_FDISK-"$top_builddir/fdisk"} - -+TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"$top_builddir/hexdump"} -diff --git a/tests/expected/hexdump/empty-format b/tests/expected/hexdump/empty-format -new file mode 100644 -index 0000000..9d60796 ---- /dev/null -+++ b/tests/expected/hexdump/empty-format -@@ -0,0 +1 @@ -+11 -\ No newline at end of file -diff --git a/tests/ts/hexdump/empty-format b/tests/ts/hexdump/empty-format -new file mode 100755 -index 0000000..4a3e528 ---- /dev/null -+++ b/tests/ts/hexdump/empty-format -@@ -0,0 +1,26 @@ -+#!/bin/bash -+ -+# This file is part of util-linux. -+# -+# This file is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This file is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+TS_TOPDIR="$(dirname $0)/../.." -+TS_DESC="format-strings" -+ -+. $TS_TOPDIR/functions.sh -+ts_init "$*" -+ -+INPUT=$(printf \\1) -+$TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT 2>&1 >> $TS_OUTPUT -+ -+$TS_CMD_HEXDUMP -n1 -ve '4 "%x"' -e '2 ""' <<< $INPUT 2>&1 >> $TS_OUTPUT -+ -+ts_finalize -diff --git a/text-utils/parse.c b/text-utils/parse.c -index 5f1e2bd..bd96961 100644 ---- a/text-utils/parse.c -+++ b/text-utils/parse.c -@@ -421,13 +421,15 @@ isint2: switch(fu->bcnt) { - !(fu->flags&F_SETREP) && fu->bcnt) - fu->reps += (blocksize - fs->bcnt) / fu->bcnt; - if (fu->reps > 1) { -- for (pr = fu->nextpr;; pr = pr->nextpr) -- if (!pr->nextpr) -- break; -- for (p1 = pr->fmt, p2 = NULL; *p1; ++p1) -- p2 = isspace((unsigned char)*p1) ? p1 : NULL; -- if (p2) -- pr->nospace = p2; -+ if (fu->nextpr) { -+ for (pr = fu->nextpr; ; pr = pr->nextpr) -+ if (!pr->nextpr) -+ break; -+ for (p1 = pr->fmt, p2 = NULL; *p1; ++p1) -+ p2 = isspace((unsigned char)*p1) ? p1 : NULL; -+ if (p2) -+ pr->nospace = p2; -+ } - } - } - } --- -1.8.1 - diff --git a/libblkid-add-support-for-btrfs-backup-superblock.patch b/libblkid-add-support-for-btrfs-backup-superblock.patch deleted file mode 100644 index e8a3ea8..0000000 --- a/libblkid-add-support-for-btrfs-backup-superblock.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d4a276491269b6502c15e0089fba6b616f5c5df8 Mon Sep 17 00:00:00 2001 -From: Goffredo Baroncelli -Date: Wed, 9 Jan 2013 22:14:43 +0100 -Subject: [PATCH] libblkid: add support for btrfs backup superblock - -Btrfs has three superblock. The first one is placed at 64KB, the second one at -64MB, the third one at 256GB. - -If the first superblock is valid except that the "magic field" is zeroed, btrfs -skips the check of the other superblocks. If the first superblock is fully -invalid, btrfs checks for the other superblock. - -So zeroing the first superblock "magic field" at the beginning seems that the -filesystem is wiped. But when the first superblock is overwritten (eg by -another filesystem), then the other two superblock may be considered valid, and -the filesystem may resurrect. - -This patch allow to find and wipe the other btrfs superblocks signature. - -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/btrfs.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c -index 039be42..1bd1df9 100644 ---- a/libblkid/src/superblocks/btrfs.c -+++ b/libblkid/src/superblocks/btrfs.c -@@ -87,6 +87,14 @@ const struct blkid_idinfo btrfs_idinfo = - .magics = - { - { .magic = "_BHRfS_M", .len = 8, .kboff = 64, .sboff = 0x40 }, -+ { .magic = "_BHRfS_M", -+ .len = 8, -+ .kboff = 64 * 1024, -+ .sboff = 0x40 }, -+ { .magic = "_BHRfS_M", -+ .len = 8, -+ .kboff = 256 * 1024 * 1024, -+ .sboff = 0x40 }, - { NULL } - } - }; --- -1.7.11.7 - diff --git a/libblkid-make-backup-superblock-visible-for-wipefs-8.patch b/libblkid-make-backup-superblock-visible-for-wipefs-8.patch deleted file mode 100644 index df06674..0000000 --- a/libblkid-make-backup-superblock-visible-for-wipefs-8.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -up util-linux-2.22.2/libblkid/src/blkidP.h.kzak util-linux-2.22.2/libblkid/src/blkidP.h ---- util-linux-2.22.2/libblkid/src/blkidP.h.kzak 2012-12-12 21:04:47.902355093 +0100 -+++ util-linux-2.22.2/libblkid/src/blkidP.h 2013-02-20 10:54:33.885606609 +0100 -@@ -224,6 +224,9 @@ struct blkid_struct_probe - - /* private per-probing flags */ - #define BLKID_PROBE_FL_IGNORE_PT (1 << 1) /* ignore partition table */ -+#define BLKID_PROBE_FL_IGNORE_BACKUP (1 << 2) /* ignore backup superblocks or PT */ -+ -+extern int blkid_probe_ignore_backup(blkid_probe pr); - - extern blkid_probe blkid_clone_probe(blkid_probe parent); - extern blkid_probe blkid_probe_get_wholedisk_probe(blkid_probe pr); -diff -up util-linux-2.22.2/libblkid/src/probe.c.kzak util-linux-2.22.2/libblkid/src/probe.c ---- util-linux-2.22.2/libblkid/src/probe.c.kzak 2012-12-12 21:04:47.903355101 +0100 -+++ util-linux-2.22.2/libblkid/src/probe.c 2013-02-20 11:02:48.525255696 +0100 -@@ -810,6 +810,7 @@ int blkid_probe_get_idmag(blkid_probe pr - static inline void blkid_probe_start(blkid_probe pr) - { - if (pr) { -+ DBG(DEBUG_LOWPROBE, printf("%p: start probe\n", pr)); - pr->cur_chain = NULL; - pr->prob_flags = 0; - blkid_probe_set_wiper(pr, 0, 0); -@@ -819,6 +820,7 @@ static inline void blkid_probe_start(blk - static inline void blkid_probe_end(blkid_probe pr) - { - if (pr) { -+ DBG(DEBUG_LOWPROBE, printf("%p: end probe\n", pr)); - pr->cur_chain = NULL; - pr->prob_flags = 0; - blkid_probe_set_wiper(pr, 0, 0); -@@ -1057,6 +1059,8 @@ int blkid_do_safeprobe(blkid_probe pr) - - blkid_probe_start(pr); - -+ pr->prob_flags |= BLKID_PROBE_FL_IGNORE_BACKUP; -+ - for (i = 0; i < BLKID_NCHAINS; i++) { - struct blkid_chain *chn; - -@@ -1679,3 +1683,7 @@ void blkid_probe_use_wiper(blkid_probe p - } - } - -+int blkid_probe_ignore_backup(blkid_probe pr) -+{ -+ return pr && (pr->prob_flags & BLKID_PROBE_FL_IGNORE_BACKUP); -+} -diff -up util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak util-linux-2.22.2/libblkid/src/superblocks/btrfs.c ---- util-linux-2.22.2/libblkid/src/superblocks/btrfs.c.kzak 2013-02-20 10:54:03.422381876 +0100 -+++ util-linux-2.22.2/libblkid/src/superblocks/btrfs.c 2013-02-20 10:54:33.886606616 +0100 -@@ -63,6 +63,11 @@ static int probe_btrfs(blkid_probe pr, c - { - struct btrfs_super_block *bfs; - -+ if (mag->kboff > 64 && blkid_probe_ignore_backup(pr)) { -+ DBG(DEBUG_LOWPROBE, printf("btrfs: found backup superblock, ignore\n")); -+ return 1; -+ } -+ - bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block); - if (!bfs) - return -1; diff --git a/libblkid-remove-optimization-from-verify-function.patch b/libblkid-remove-optimization-from-verify-function.patch deleted file mode 100644 index 7d40835..0000000 --- a/libblkid-remove-optimization-from-verify-function.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 2270b1ad90b394950f4fe215eb2fc1042020cef0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 1 Feb 2013 15:59:58 +0100 -Subject: [PATCH] libblkid: remove optimization from verify( funrtion - -Now libblkid (the cache based part) tries to probe for the cached -filesystem firstly. This optimization is broken, because: - - * new another superblock could be on the device and the original - is already obsolete - * we still need to probe for partitions and raids - * the code was too fragile - -The patch also suggests lsblk --fs in blkid.8 for end users. lsblk -read information from used db. - -Reported-by: Andreas Hofmeister -Signed-off-by: Karel Zak ---- - libblkid/src/verify.c | 76 ++++++++------------------------------------------- - misc-utils/blkid.8 | 11 ++++++++ - 2 files changed, 22 insertions(+), 65 deletions(-) - -diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c -index 4bab4de..0f48c48 100644 ---- a/libblkid/src/verify.c -+++ b/libblkid/src/verify.c -@@ -43,26 +43,6 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) - blkid_set_tag(dev, name, data, len); - } - } -- -- /* -- * remove obsolete tags -- */ -- if (!nvals || !blkid_probe_has_value(pr, "LABEL")) -- blkid_set_tag(dev, "LABEL", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "UUID")) -- blkid_set_tag(dev, "UUID", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "PART_ENTRY_UUID")) -- blkid_set_tag(dev, "PARTUUID", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "PART_ENTRY_NAME")) -- blkid_set_tag(dev, "PARTLABEL", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "TYPE")) -- blkid_set_tag(dev, "TYPE", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "SEC_TYPE")) -- blkid_set_tag(dev, "SEC_TYPE", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "EXT_JOURNAL")) /* extN */ -- blkid_set_tag(dev, "EXT_JOURNAL", NULL, 0); -- if (!nvals || !blkid_probe_has_value(pr, "MOUNT")) /* ocfs */ -- blkid_set_tag(dev, "MOUNT", NULL, 0); - } - - /* -@@ -76,9 +56,10 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) - */ - blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - { -+ blkid_tag_iterate iter; -+ const char *type, *value; - struct stat st; - time_t diff, now; -- char *fltr[2]; - int fd; - - if (!dev) -@@ -155,64 +136,29 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - return NULL; - } - -- blkid_probe_enable_superblocks(cache->probe, TRUE); -+ /* remove old cache info */ -+ iter = blkid_tag_iterate_begin(dev); -+ while (blkid_tag_next(iter, &type, &value) == 0) -+ blkid_set_tag(dev, type, NULL, 0); -+ blkid_tag_iterate_end(iter); - -+ /* enable superblocks probing */ -+ blkid_probe_enable_superblocks(cache->probe, TRUE); - blkid_probe_set_superblocks_flags(cache->probe, - BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | - BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE); - -- /* -- * If we already know the type, then try that first. -- */ -- if (dev->bid_type) { -- blkid_tag_iterate iter; -- const char *type, *value; -- -- fltr[0] = dev->bid_type; -- fltr[1] = NULL; -- -- blkid_probe_filter_superblocks_type(cache->probe, -- BLKID_FLTR_ONLYIN, fltr); -- -- if (blkid_do_probe(cache->probe) == 0) { -- /* -- * Cool, we found FS type, let's also read PART{UUID,LABEL} -- */ -- blkid_probe_enable_superblocks(cache->probe, FALSE); -- blkid_probe_enable_partitions(cache->probe, TRUE); -- blkid_probe_set_partitions_flags(cache->probe, BLKID_PARTS_ENTRY_DETAILS); -- if (blkid_do_probe(cache->probe) == 0) -- goto found_type; -- } -- -- blkid_probe_enable_superblocks(cache->probe, TRUE); -- blkid_probe_invert_superblocks_filter(cache->probe); -- -- /* -- * Zap the device filesystem information and try again -- */ -- DBG(DEBUG_PROBE, -- printf("previous fs type %s not valid, " -- "trying full probe\n", dev->bid_type)); -- iter = blkid_tag_iterate_begin(dev); -- while (blkid_tag_next(iter, &type, &value) == 0) -- blkid_set_tag(dev, type, 0, 0); -- blkid_tag_iterate_end(iter); -- } -- -+ /* enable partitions probing */ - blkid_probe_enable_partitions(cache->probe, TRUE); - blkid_probe_set_partitions_flags(cache->probe, BLKID_PARTS_ENTRY_DETAILS); - -- /* -- * Probe for all types. -- */ -+ /* probe */ - if (blkid_do_safeprobe(cache->probe)) { - /* found nothing or error */ - blkid_free_dev(dev); - dev = NULL; - } - --found_type: - if (dev) { - #ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - struct timeval tv; -diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 -index 2ba1ab4..eb8d716 100644 ---- a/misc-utils/blkid.8 -+++ b/misc-utils/blkid.8 -@@ -64,6 +64,17 @@ library. It can determine the type of content (e.g. filesystem or swap) - that a block device holds, and also attributes (tokens, NAME=value pairs) - from the content metadata (e.g. LABEL or UUID fields). - .PP -+Note that -+.B blkid -+reads information directly from devices and for non-root users -+it returns cached unverified information. It's better to use -+.B lsblk --fs -+to get user-friendly overview about filesystems and devices. -+.BR lsblk (8) -+is also easy to use in scripts. -+.B blkid -+is mostly designed for system services and to test libblkid functionality. -+.PP - .B blkid - has two main forms of operation: either searching for a device with a - specific NAME=value pair, or displaying NAME=value pairs for one or --- -1.8.1 - diff --git a/util-linux.spec b/util-linux.spec index 3bac0be..cafc0bc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.6%{?dist} +Release: 0.7%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -788,6 +788,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Mon Apr 15 2013 Karel Zak 2.23-0.7 +- remove unused patches + * Mon Apr 15 2013 Karel Zak 2.23-0.6 - remove floppy from util-linux From 506ce7948f7cb4a8df5cac7c0080ee07bf4f82d9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 25 Apr 2013 13:09:58 +0200 Subject: [PATCH 145/425] 2.23-1: upgrade 2.23-rc2 -> 2.23 Signed-off-by: Karel Zak --- .gitignore | 1 + ...nt.nfs-segfault-rely-on-assert-rathe.patch | 1340 ----------------- sources | 2 +- util-linux.spec | 20 +- 4 files changed, 16 insertions(+), 1347 deletions(-) delete mode 100644 0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch diff --git a/.gitignore b/.gitignore index 94ddde1..3c0a5a5 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /util-linux-2.22.2.tar.xz /util-linux-2.23-rc1.tar.xz /util-linux-2.23-rc2.tar.xz +/util-linux-2.23.tar.xz diff --git a/0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch b/0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch deleted file mode 100644 index a2d2223..0000000 --- a/0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch +++ /dev/null @@ -1,1340 +0,0 @@ -From 4569bbeab783632c81ee14793da84b3e29444543 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 12 Apr 2013 12:35:34 +0200 -Subject: [PATCH] libmount: fix mount.nfs segfault, rely on assert() rather - than on nonnull - -We use - mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL); - -in mount.nfs, unfortunately mnt_optstr_append_option() has been marked -ass nonnull(1, 2). That's wrong because append and prepend should -robust enough to accept NULL as option name. - -The patch also removes almost all __attribute__((nonnull). It seems -better to rely on assert() to have usable feedback. In many cases -(nonnull) is premature optimization for the library. This attribute -makes sense for things like strlen() or so... - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=948274 -Signed-off-by: Karel Zak ---- - libmount/src/context.c | 55 ++++++++++-- - libmount/src/fs.c | 34 ++++++-- - libmount/src/libmount.h.in | 202 ++++++++++++++++----------------------------- - libmount/src/lock.c | 2 + - libmount/src/mountP.h | 4 +- - libmount/src/optstr.c | 26 +++++- - libmount/src/tab_parse.c | 8 +- - libmount/src/tab_update.c | 13 ++- - libmount/src/utils.c | 9 +- - libmount/src/version.c | 5 ++ - 10 files changed, 202 insertions(+), 156 deletions(-) - -diff --git a/libmount/src/context.c b/libmount/src/context.c -index 614d3f3..38f80de 100644 ---- a/libmount/src/context.c -+++ b/libmount/src/context.c -@@ -196,6 +196,7 @@ int mnt_reset_context(struct libmnt_context *cxt) - */ - int mnt_context_reset_status(struct libmnt_context *cxt) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - -@@ -207,6 +208,7 @@ int mnt_context_reset_status(struct libmnt_context *cxt) - - static int set_flag(struct libmnt_context *cxt, int flag, int enable) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - if (enable) { -@@ -227,7 +229,6 @@ static int set_flag(struct libmnt_context *cxt, int flag, int enable) - */ - int mnt_context_is_restricted(struct libmnt_context *cxt) - { -- assert(cxt); - return cxt->restricted; - } - -@@ -270,6 +271,7 @@ int mnt_context_is_restricted(struct libmnt_context *cxt) - */ - int mnt_context_set_optsmode(struct libmnt_context *cxt, int mode) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - cxt->optsmode = mode; -@@ -285,6 +287,7 @@ int mnt_context_set_optsmode(struct libmnt_context *cxt, int mode) - - int mnt_context_get_optsmode(struct libmnt_context *cxt) - { -+ assert(cxt); - return cxt->optsmode; - } - -@@ -663,6 +666,7 @@ int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs) - */ - struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) - { -+ assert(cxt); - if (!cxt) - return NULL; - if (!cxt->fs) { -@@ -681,6 +685,7 @@ struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) - */ - int mnt_context_set_source(struct libmnt_context *cxt, const char *source) - { -+ assert(cxt); - return mnt_fs_set_source(mnt_context_get_fs(cxt), source); - } - -@@ -692,6 +697,7 @@ int mnt_context_set_source(struct libmnt_context *cxt, const char *source) - */ - const char *mnt_context_get_source(struct libmnt_context *cxt) - { -+ assert(cxt); - return mnt_fs_get_source(mnt_context_get_fs(cxt)); - } - -@@ -704,6 +710,7 @@ const char *mnt_context_get_source(struct libmnt_context *cxt) - */ - int mnt_context_set_target(struct libmnt_context *cxt, const char *target) - { -+ assert(cxt); - return mnt_fs_set_target(mnt_context_get_fs(cxt), target); - } - -@@ -715,6 +722,7 @@ int mnt_context_set_target(struct libmnt_context *cxt, const char *target) - */ - const char *mnt_context_get_target(struct libmnt_context *cxt) - { -+ assert(cxt); - return mnt_fs_get_target(mnt_context_get_fs(cxt)); - } - -@@ -731,6 +739,7 @@ const char *mnt_context_get_target(struct libmnt_context *cxt) - */ - int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype) - { -+ assert(cxt); - return mnt_fs_set_fstype(mnt_context_get_fs(cxt), fstype); - } - -@@ -742,6 +751,7 @@ int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype) - */ - const char *mnt_context_get_fstype(struct libmnt_context *cxt) - { -+ assert(cxt); - return mnt_fs_get_fstype(mnt_context_get_fs(cxt)); - } - -@@ -754,6 +764,7 @@ const char *mnt_context_get_fstype(struct libmnt_context *cxt) - */ - int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr) - { -+ assert(cxt); - return mnt_fs_set_options(mnt_context_get_fs(cxt), optstr); - } - -@@ -766,6 +777,7 @@ int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr) - */ - int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr) - { -+ assert(cxt); - return mnt_fs_append_options(mnt_context_get_fs(cxt), optstr); - } - -@@ -784,6 +796,7 @@ int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr) - */ - const char *mnt_context_get_options(struct libmnt_context *cxt) - { -+ assert(cxt); - return mnt_fs_get_options(mnt_context_get_fs(cxt)); - } - -@@ -800,6 +813,7 @@ int mnt_context_set_fstype_pattern(struct libmnt_context *cxt, const char *patte - { - char *p = NULL; - -+ assert(cxt); - if (!cxt) - return -EINVAL; - if (pattern) { -@@ -825,6 +839,7 @@ int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *patt - { - char *p = NULL; - -+ assert(cxt); - if (!cxt) - return -EINVAL; - if (pattern) { -@@ -856,6 +871,7 @@ int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *patt - */ - int mnt_context_set_fstab(struct libmnt_context *cxt, struct libmnt_table *tb) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - if (!(cxt->flags & MNT_FL_EXTERN_FSTAB)) -@@ -879,9 +895,9 @@ int mnt_context_get_fstab(struct libmnt_context *cxt, struct libmnt_table **tb) - { - struct libmnt_cache *cache; - -+ assert(cxt); - if (!cxt) - return -EINVAL; -- - if (!cxt->fstab) { - int rc; - -@@ -921,9 +937,9 @@ int mnt_context_get_mtab(struct libmnt_context *cxt, struct libmnt_table **tb) - { - struct libmnt_cache *cache; - -+ assert(cxt); - if (!cxt) - return -EINVAL; -- - if (!cxt->mtab) { - int rc; - -@@ -962,6 +978,7 @@ int mnt_context_set_tabfilter(struct libmnt_context *cxt, - int (*fltr)(struct libmnt_fs *, void *), - void *data) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - -@@ -1002,6 +1019,8 @@ int mnt_context_get_table(struct libmnt_context *cxt, - struct libmnt_cache *cache; - int rc; - -+ assert(cxt); -+ assert(tb); - if (!cxt || !tb) - return -EINVAL; - -@@ -1042,6 +1061,7 @@ int mnt_context_get_table(struct libmnt_context *cxt, - int mnt_context_set_tables_errcb(struct libmnt_context *cxt, - int (*cb)(struct libmnt_table *tb, const char *filename, int line)) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - -@@ -1085,6 +1105,7 @@ int mnt_context_set_cache(struct libmnt_context *cxt, struct libmnt_cache *cache - */ - struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt) - { -+ assert(cxt); - if (!cxt || mnt_context_is_nocanonicalize(cxt)) - return NULL; - -@@ -1112,9 +1133,9 @@ int mnt_context_set_passwd_cb(struct libmnt_context *cxt, - char *(*get)(struct libmnt_context *), - void (*release)(struct libmnt_context *, char *)) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; -- - cxt->pwd_get_cb = get; - cxt->pwd_release_cb = release; - return 0; -@@ -1142,6 +1163,7 @@ int mnt_context_set_passwd_cb(struct libmnt_context *cxt, - */ - struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) - { -+ assert(cxt); - /* - * DON'T call this function within libmount, it will always allocate - * the lock. The mnt_update_* functions are able to allocate the lock -@@ -1181,6 +1203,7 @@ struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) - */ - int mnt_context_set_mflags(struct libmnt_context *cxt, unsigned long flags) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - -@@ -1213,6 +1236,8 @@ int mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags) - int rc = 0; - struct list_head *p; - -+ assert(cxt); -+ assert(flags); - if (!cxt || !flags) - return -EINVAL; - -@@ -1249,6 +1274,7 @@ int mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags) - */ - int mnt_context_set_user_mflags(struct libmnt_context *cxt, unsigned long flags) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - cxt->user_mountflags = flags; -@@ -1268,6 +1294,9 @@ int mnt_context_set_user_mflags(struct libmnt_context *cxt, unsigned long flags) - int mnt_context_get_user_mflags(struct libmnt_context *cxt, unsigned long *flags) - { - int rc = 0; -+ -+ assert(cxt); -+ assert(flags); - if (!cxt || !flags) - return -EINVAL; - -@@ -1299,6 +1328,7 @@ int mnt_context_get_user_mflags(struct libmnt_context *cxt, unsigned long *flags - */ - int mnt_context_set_mountdata(struct libmnt_context *cxt, void *data) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - cxt->mountdata = data; -@@ -1908,6 +1938,7 @@ int mnt_context_apply_fstab(struct libmnt_context *cxt) - */ - int mnt_context_tab_applied(struct libmnt_context *cxt) - { -+ assert(cxt); - return cxt->flags & MNT_FL_TAB_APPLIED; - } - -@@ -1949,6 +1980,7 @@ int mnt_context_propagation_only(struct libmnt_context *cxt) - */ - int mnt_context_get_status(struct libmnt_context *cxt) - { -+ assert(cxt); - return !cxt->syscall_status || !cxt->helper_exec_status; - } - -@@ -1960,6 +1992,7 @@ int mnt_context_get_status(struct libmnt_context *cxt) - */ - int mnt_context_helper_executed(struct libmnt_context *cxt) - { -+ assert(cxt); - return cxt->helper_exec_status != 1; - } - -@@ -1972,6 +2005,7 @@ int mnt_context_helper_executed(struct libmnt_context *cxt) - */ - int mnt_context_get_helper_status(struct libmnt_context *cxt) - { -+ assert(cxt); - return cxt->helper_status; - } - -@@ -1983,6 +2017,7 @@ int mnt_context_get_helper_status(struct libmnt_context *cxt) - */ - int mnt_context_syscall_called(struct libmnt_context *cxt) - { -+ assert(cxt); - return cxt->syscall_status != 1; - } - -@@ -1997,9 +2032,9 @@ int mnt_context_syscall_called(struct libmnt_context *cxt) - */ - int mnt_context_get_syscall_errno(struct libmnt_context *cxt) - { -+ assert(cxt); - if (cxt->syscall_status < 0) - return -cxt->syscall_status; -- - return 0; - } - -@@ -2017,6 +2052,7 @@ int mnt_context_get_syscall_errno(struct libmnt_context *cxt) - */ - int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status) - { -+ assert(cxt); - if (!cxt) - return -EINVAL; - -@@ -2063,8 +2099,11 @@ int mnt_context_strerror(struct libmnt_context *cxt __attribute__((__unused__)), - int mnt_context_init_helper(struct libmnt_context *cxt, int action, - int flags __attribute__((__unused__))) - { -- int rc = mnt_context_disable_helpers(cxt, TRUE); -+ int rc; - -+ assert(cxt); -+ -+ rc = mnt_context_disable_helpers(cxt, TRUE); - if (!rc) - rc = set_flag(cxt, MNT_FL_HELPER, 1); - if (!rc) -@@ -2115,6 +2154,7 @@ int mnt_context_is_fs_mounted(struct libmnt_context *cxt, - struct libmnt_table *mtab; - int rc; - -+ assert(cxt); - if (!cxt || !fs || !mounted) - return -EINVAL; - -@@ -2130,6 +2170,7 @@ static int mnt_context_add_child(struct libmnt_context *cxt, pid_t pid) - { - pid_t *pids; - -+ assert(cxt); - if (!cxt) - return -EINVAL; - -@@ -2149,6 +2190,7 @@ int mnt_fork_context(struct libmnt_context *cxt) - int rc = 0; - pid_t pid; - -+ assert(cxt); - if (!mnt_context_is_parent(cxt)) - return -EINVAL; - -@@ -2182,6 +2224,7 @@ int mnt_context_wait_for_children(struct libmnt_context *cxt, - { - int i; - -+ assert(cxt); - if (!cxt) - return -EINVAL; - -diff --git a/libmount/src/fs.c b/libmount/src/fs.c -index bb9006d..c95cdc7 100644 ---- a/libmount/src/fs.c -+++ b/libmount/src/fs.c -@@ -131,7 +131,6 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, - - if (!src) - return NULL; -- - if (!dest) { - dest = mnt_new_fs(); - if (!dest) -@@ -197,6 +196,7 @@ struct libmnt_fs *mnt_copy_mtab_fs(const struct libmnt_fs *fs) - { - struct libmnt_fs *n = mnt_new_fs(); - -+ assert(fs); - if (!n) - return NULL; - -@@ -249,6 +249,7 @@ err: - */ - void *mnt_fs_get_userdata(struct libmnt_fs *fs) - { -+ assert(fs); - return fs ? fs->userdata : NULL; - } - -@@ -263,6 +264,7 @@ void *mnt_fs_get_userdata(struct libmnt_fs *fs) - */ - int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data) - { -+ assert(fs); - if (!fs) - return -EINVAL; - fs->userdata = data; -@@ -303,6 +305,7 @@ const char *mnt_fs_get_srcpath(struct libmnt_fs *fs) - */ - const char *mnt_fs_get_source(struct libmnt_fs *fs) - { -+ assert(fs); - return fs ? fs->source : NULL; - } - -@@ -346,6 +349,7 @@ int mnt_fs_set_source(struct libmnt_fs *fs, const char *source) - char *p = NULL; - int rc; - -+ assert(fs); - if (!fs) - return -EINVAL; - -@@ -375,6 +379,7 @@ int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) - { - const char *p; - -+ assert(fs); - if (!fs) - return 0; - -@@ -401,6 +406,7 @@ int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) - */ - int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) - { -+ assert(fs); - return fs && streq_except_trailing_slash(mnt_fs_get_target(fs), path); - } - -@@ -439,6 +445,7 @@ int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) - */ - int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, const char **value) - { -+ assert(fs); - if (fs == NULL || !fs->tagname) - return -EINVAL; - if (name) -@@ -474,7 +481,6 @@ int mnt_fs_set_target(struct libmnt_fs *fs, const char *target) - char *p = NULL; - - assert(fs); -- - if (!fs) - return -EINVAL; - if (target) { -@@ -506,6 +512,7 @@ static int mnt_fs_get_flags(struct libmnt_fs *fs) - */ - int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags) - { -+ assert(fs); - if (!fs || !flags) - return -EINVAL; - -@@ -547,6 +554,7 @@ int mnt_fs_is_kernel(struct libmnt_fs *fs) - */ - int mnt_fs_is_swaparea(struct libmnt_fs *fs) - { -+ assert(fs); - return mnt_fs_get_flags(fs) & MNT_FS_SWAP; - } - -@@ -558,6 +566,7 @@ int mnt_fs_is_swaparea(struct libmnt_fs *fs) - */ - int mnt_fs_is_pseudofs(struct libmnt_fs *fs) - { -+ assert(fs); - return mnt_fs_get_flags(fs) & MNT_FS_PSEUDO; - } - -@@ -569,6 +578,7 @@ int mnt_fs_is_pseudofs(struct libmnt_fs *fs) - */ - int mnt_fs_is_netfs(struct libmnt_fs *fs) - { -+ assert(fs); - return mnt_fs_get_flags(fs) & MNT_FS_NET; - } - -@@ -622,6 +632,7 @@ int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype) - { - char *p = NULL; - -+ assert(fs); - if (!fs) - return -EINVAL; - if (fstype) { -@@ -700,9 +711,7 @@ char *mnt_fs_strdup_options(struct libmnt_fs *fs) - char *res; - - assert(fs); -- - errno = 0; -- - if (fs->optstr) - return strdup(fs->optstr); - -@@ -758,7 +767,6 @@ int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr) - char *v = NULL, *f = NULL, *u = NULL, *n = NULL; - - assert(fs); -- - if (!fs) - return -EINVAL; - if (optstr) { -@@ -801,7 +809,6 @@ int mnt_fs_append_options(struct libmnt_fs *fs, const char *optstr) - int rc; - - assert(fs); -- - if (!fs) - return -EINVAL; - if (!optstr) -@@ -842,7 +849,6 @@ int mnt_fs_prepend_options(struct libmnt_fs *fs, const char *optstr) - int rc; - - assert(fs); -- - if (!fs) - return -EINVAL; - if (!optstr) -@@ -932,6 +938,7 @@ int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr) - { - char *p = NULL; - -+ assert(fs); - if (!fs) - return -EINVAL; - if (optstr) { -@@ -974,6 +981,7 @@ int mnt_fs_append_attributes(struct libmnt_fs *fs, const char *optstr) - */ - int mnt_fs_prepend_attributes(struct libmnt_fs *fs, const char *optstr) - { -+ assert(fs); - if (!fs) - return -EINVAL; - if (!optstr) -@@ -1235,6 +1243,7 @@ int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, - { - char rc = 1; - -+ assert(fs); - if (!fs) - return -EINVAL; - if (fs->fs_optstr) -@@ -1260,6 +1269,9 @@ int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name, - { - char rc = 1; - -+ assert(fs); -+ if (!fs) -+ return -EINVAL; - if (fs->attrs) - rc = mnt_optstr_get_option(fs->attrs, name, value, valsz); - return rc; -@@ -1286,6 +1298,7 @@ int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, - { - int rc = 0; - -+ assert(fs); - if (!fs || !target || !fs->target) - return 0; - -@@ -1330,6 +1343,7 @@ int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, - char *cn; - const char *src, *t, *v; - -+ assert(fs); - if (!fs) - return 0; - -@@ -1403,6 +1417,7 @@ int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, - */ - int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types) - { -+ assert(fs); - return mnt_match_fstype(fs->fstype, types); - } - -@@ -1418,6 +1433,7 @@ int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types) - */ - int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) - { -+ assert(fs); - return mnt_match_options(mnt_fs_get_options(fs), options); - } - -@@ -1430,7 +1446,7 @@ int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) - */ - int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file) - { -- if (!fs) -+ if (!fs || !file) - return -EINVAL; - fprintf(file, "------ fs: %p\n", fs); - fprintf(file, "source: %s\n", mnt_fs_get_source(fs)); -@@ -1514,6 +1530,8 @@ int mnt_fs_to_mntent(struct libmnt_fs *fs, struct mntent **mnt) - int rc; - struct mntent *m; - -+ assert(fs); -+ assert(mnt); - if (!fs || !mnt) - return -EINVAL; - -diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in -index 1b5df82..db479e1 100644 ---- a/libmount/src/libmount.h.in -+++ b/libmount/src/libmount.h.in -@@ -187,8 +187,7 @@ enum { - extern void mnt_init_debug(int mask); - - /* version.c */ --extern int mnt_parse_version_string(const char *ver_string) -- __ul_attribute__((nonnull)); -+extern int mnt_parse_version_string(const char *ver_string); - extern int mnt_get_library_version(const char **ver_string); - extern int mnt_get_library_features(const char ***features); - -@@ -198,10 +197,8 @@ extern char *mnt_mangle(const char *str) - extern char *mnt_unmangle(const char *str) - __ul_attribute__((warn_unused_result)); - --extern int mnt_fstype_is_netfs(const char *type) -- __ul_attribute__((nonnull)); --extern int mnt_fstype_is_pseudofs(const char *type) -- __ul_attribute__((nonnull)); -+extern int mnt_fstype_is_netfs(const char *type); -+extern int mnt_fstype_is_pseudofs(const char *type); - - extern int mnt_match_fstype(const char *type, const char *pattern) - __ul_attribute__((warn_unused_result)); -@@ -212,7 +209,7 @@ extern const char *mnt_get_swaps_path(void); - extern const char *mnt_get_mtab_path(void); - extern int mnt_has_regular_mtab(const char **mtab, int *writable); - extern char *mnt_get_mountpoint(const char *path) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - - /* cache.c */ - extern struct libmnt_cache *mnt_new_cache(void) -@@ -224,8 +221,7 @@ extern int mnt_cache_read_tags(struct libmnt_cache *cache, const char *devname); - extern int mnt_cache_device_has_tag(struct libmnt_cache *cache, - const char *devname, - const char *token, -- const char *value) -- __ul_attribute__((nonnull)); -+ const char *value); - - extern char *mnt_cache_find_tag_value(struct libmnt_cache *cache, - const char *devname, const char *token); -@@ -245,24 +241,18 @@ extern char *mnt_pretty_path(const char *path, struct libmnt_cache *cache) - - /* optstr.c */ - extern int mnt_optstr_next_option(char **optstr, char **name, size_t *namesz, -- char **value, size_t *valuesz) -- __ul_attribute__((nonnull(1))); -+ char **value, size_t *valuesz); - extern int mnt_optstr_append_option(char **optstr, const char *name, -- const char *value) -- __ul_attribute__((nonnull(1, 2))); -+ const char *value); - extern int mnt_optstr_prepend_option(char **optstr, const char *name, -- const char *value) -- __ul_attribute__((nonnull(1, 2))); -+ const char *value); - - extern int mnt_optstr_get_option(const char *optstr, const char *name, - char **value, size_t *valsz); - extern int mnt_optstr_set_option(char **optstr, const char *name, -- const char *value) -- __ul_attribute__((nonnull(1, 2))); --extern int mnt_optstr_remove_option(char **optstr, const char *name) -- __ul_attribute__((nonnull)); --extern int mnt_optstr_deduplicate_option(char **optstr, const char *name) -- __ul_attribute__((nonnull)); -+ const char *value); -+extern int mnt_optstr_remove_option(char **optstr, const char *name); -+extern int mnt_optstr_deduplicate_option(char **optstr, const char *name); - - extern int mnt_split_optstr(const char *optstr, - char **user, char **vfs, char **fs, -@@ -301,11 +291,10 @@ extern const struct libmnt_optmap *mnt_get_builtin_optmap(int id); - - /* lock.c */ - extern struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern void mnt_free_lock(struct libmnt_lock *ml); - --extern void mnt_unlock_file(struct libmnt_lock *ml) -- __ul_attribute__((nonnull)); -+extern void mnt_unlock_file(struct libmnt_lock *ml); - extern int mnt_lock_file(struct libmnt_lock *ml); - extern int mnt_lock_block_signals(struct libmnt_lock *ml, int enable); - -@@ -314,27 +303,21 @@ extern struct libmnt_fs *mnt_new_fs(void) - __ul_attribute__((warn_unused_result)); - extern void mnt_free_fs(struct libmnt_fs *fs); - --extern void mnt_reset_fs(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern void mnt_reset_fs(struct libmnt_fs *fs); - extern struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, - const struct libmnt_fs *src) - __ul_attribute__((warn_unused_result)); --extern void *mnt_fs_get_userdata(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern void *mnt_fs_get_userdata(struct libmnt_fs *fs); - extern int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data); --extern const char *mnt_fs_get_source(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_source(struct libmnt_fs *fs); - extern int mnt_fs_set_source(struct libmnt_fs *fs, const char *source); - extern const char *mnt_fs_get_srcpath(struct libmnt_fs *fs); - - extern int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, -- const char **value) -- __ul_attribute__((nonnull(1))); --extern const char *mnt_fs_get_target(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+ const char **value); -+extern const char *mnt_fs_get_target(struct libmnt_fs *fs); - extern int mnt_fs_set_target(struct libmnt_fs *fs, const char *target); --extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs); - extern int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype); - - extern int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) -@@ -343,11 +326,11 @@ extern int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) - __ul_attribute__((warn_unused_result)); - - extern char *mnt_fs_strdup_options(struct libmnt_fs *fs) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern const char *mnt_fs_get_options(struct libmnt_fs *fs) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern const char *mnt_fs_get_optional_fields(struct libmnt_fs *fs) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags); - - extern int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr); -@@ -357,81 +340,56 @@ extern int mnt_fs_prepend_options(struct libmnt_fs *fs, const char *optstr); - extern int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, - char **value, size_t *valsz); - --extern const char *mnt_fs_get_fs_options(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern const char *mnt_fs_get_user_options(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_fs_options(struct libmnt_fs *fs); -+extern const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs); -+extern const char *mnt_fs_get_user_options(struct libmnt_fs *fs); - --extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs); - extern int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr); - extern int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name, - char **value, size_t *valsz); - extern int mnt_fs_append_attributes(struct libmnt_fs *fs, const char *optstr); - extern int mnt_fs_prepend_attributes(struct libmnt_fs *fs, const char *optstr); - --extern int mnt_fs_get_freq(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern int mnt_fs_get_freq(struct libmnt_fs *fs); - extern int mnt_fs_set_freq(struct libmnt_fs *fs, int freq); --extern int mnt_fs_get_passno(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern int mnt_fs_get_passno(struct libmnt_fs *fs); - extern int mnt_fs_set_passno(struct libmnt_fs *fs, int passno); --extern const char *mnt_fs_get_root(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_root(struct libmnt_fs *fs); - extern int mnt_fs_set_root(struct libmnt_fs *fs, const char *root); --extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs); - extern int mnt_fs_set_bindsrc(struct libmnt_fs *fs, const char *src); --extern int mnt_fs_get_id(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern int mnt_fs_get_parent_id(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern dev_t mnt_fs_get_devno(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern pid_t mnt_fs_get_tid(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern int mnt_fs_get_id(struct libmnt_fs *fs); -+extern int mnt_fs_get_parent_id(struct libmnt_fs *fs); -+extern dev_t mnt_fs_get_devno(struct libmnt_fs *fs); -+extern pid_t mnt_fs_get_tid(struct libmnt_fs *fs); - --extern const char *mnt_fs_get_swaptype(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern off_t mnt_fs_get_size(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern off_t mnt_fs_get_usedsize(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern int mnt_fs_get_priority(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern const char *mnt_fs_get_swaptype(struct libmnt_fs *fs); -+extern off_t mnt_fs_get_size(struct libmnt_fs *fs); -+extern off_t mnt_fs_get_usedsize(struct libmnt_fs *fs); -+extern int mnt_fs_get_priority(struct libmnt_fs *fs); - - extern int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, -- struct libmnt_cache *cache) -- __ul_attribute__((nonnull(1))); -+ struct libmnt_cache *cache); - extern int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, -- struct libmnt_cache *cache) -- __ul_attribute__((nonnull(1))); --extern int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types) -- __ul_attribute__((nonnull(1))); --extern int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) -- __ul_attribute__((nonnull(1))); --extern int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file) -- __ul_attribute__((nonnull)); -+ struct libmnt_cache *cache); -+extern int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types); -+extern int mnt_fs_match_options(struct libmnt_fs *fs, const char *options); -+extern int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file); - --extern int mnt_fs_is_kernel(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern int mnt_fs_is_swaparea(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern int mnt_fs_is_netfs(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); --extern int mnt_fs_is_pseudofs(struct libmnt_fs *fs) -- __ul_attribute__((nonnull)); -+extern int mnt_fs_is_kernel(struct libmnt_fs *fs); -+extern int mnt_fs_is_swaparea(struct libmnt_fs *fs); -+extern int mnt_fs_is_netfs(struct libmnt_fs *fs); -+extern int mnt_fs_is_pseudofs(struct libmnt_fs *fs); - - extern void mnt_free_mntent(struct mntent *mnt); - extern int mnt_fs_to_mntent(struct libmnt_fs *fs, struct mntent **mnt); - - /* tab-parse.c */ - extern struct libmnt_table *mnt_new_table_from_file(const char *filename) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern struct libmnt_table *mnt_new_table_from_dir(const char *dirname) -- __ul_attribute__((nonnull, warn_unused_result)); -+ __ul_attribute__((warn_unused_result)); - extern int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, - const char *filename); - extern int mnt_table_parse_file(struct libmnt_table *tb, const char *filename); -@@ -484,27 +442,21 @@ extern int mnt_table_find_next_fs(struct libmnt_table *tb, - void *userdata, - struct libmnt_fs **fs); - --extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) -- __ul_attribute__((nonnull)); -- -+extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs); - - /* tab_update.c */ - extern struct libmnt_update *mnt_new_update(void) - __ul_attribute__((warn_unused_result)); - extern void mnt_free_update(struct libmnt_update *upd); - --extern int mnt_update_is_ready(struct libmnt_update *upd) -- __ul_attribute__((nonnull)); -+extern int mnt_update_is_ready(struct libmnt_update *upd); - extern int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags, - const char *target, struct libmnt_fs *fs); - extern int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc); --extern unsigned long mnt_update_get_mflags(struct libmnt_update *upd) -- __ul_attribute__((nonnull)); -+extern unsigned long mnt_update_get_mflags(struct libmnt_update *upd); - extern int mnt_update_force_rdonly(struct libmnt_update *upd, int rdonly); --extern const char *mnt_update_get_filename(struct libmnt_update *upd) -- __ul_attribute__((nonnull)); --extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd) -- __ul_attribute__((nonnull)); -+extern const char *mnt_update_get_filename(struct libmnt_update *upd); -+extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd); - - /* tab_diff.c */ - enum { -@@ -578,8 +530,8 @@ extern int mnt_context_enable_loopdel(struct libmnt_context *cxt, int enable); - extern int mnt_context_enable_fork(struct libmnt_context *cxt, int enable); - extern int mnt_context_disable_swapmatch(struct libmnt_context *cxt, int disable); - --extern int mnt_context_get_optsmode(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern int mnt_context_get_optsmode(struct libmnt_context *cxt); -+ - extern int mnt_context_is_lazy(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); - extern int mnt_context_is_rdonly_umount(struct libmnt_context *cxt) -@@ -614,28 +566,22 @@ extern int mnt_context_wait_for_children(struct libmnt_context *cxt, - int *nchildren, int *nerrs); - - extern int mnt_context_is_fs_mounted(struct libmnt_context *cxt, -- struct libmnt_fs *fs, int *mounted) -- __ul_attribute__((nonnull)); -+ struct libmnt_fs *fs, int *mounted); - extern int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs); --extern struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt); - - extern int mnt_context_set_source(struct libmnt_context *cxt, const char *source); - extern int mnt_context_set_target(struct libmnt_context *cxt, const char *target); - extern int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype); - --extern const char *mnt_context_get_source(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); --extern const char *mnt_context_get_target(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); --extern const char *mnt_context_get_fstype(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern const char *mnt_context_get_source(struct libmnt_context *cxt); -+extern const char *mnt_context_get_target(struct libmnt_context *cxt); -+extern const char *mnt_context_get_fstype(struct libmnt_context *cxt); - - extern int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr); - extern int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr); - --extern const char *mnt_context_get_options(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern const char *mnt_context_get_options(struct libmnt_context *cxt); - - extern int mnt_context_set_fstype_pattern(struct libmnt_context *cxt, const char *pattern); - extern int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *pattern); -@@ -659,10 +605,8 @@ extern int mnt_context_get_table(struct libmnt_context *cxt, - struct libmnt_table **tb); - extern int mnt_context_set_cache(struct libmnt_context *cxt, - struct libmnt_cache *cache); --extern struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); --extern struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt); -+extern struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt); - extern int mnt_context_set_mflags(struct libmnt_context *cxt, - unsigned long flags); - extern int mnt_context_get_mflags(struct libmnt_context *cxt, -@@ -676,19 +620,14 @@ extern int mnt_context_set_mountdata(struct libmnt_context *cxt, void *data); - extern int mnt_context_apply_fstab(struct libmnt_context *cxt); - - extern int mnt_context_reset_status(struct libmnt_context *cxt); --extern int mnt_context_get_status(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern int mnt_context_get_status(struct libmnt_context *cxt); - --extern int mnt_context_helper_executed(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); --extern int mnt_context_get_helper_status(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern int mnt_context_helper_executed(struct libmnt_context *cxt); -+extern int mnt_context_get_helper_status(struct libmnt_context *cxt); - --extern int mnt_context_syscall_called(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern int mnt_context_syscall_called(struct libmnt_context *cxt); - --extern int mnt_context_get_syscall_errno(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern int mnt_context_get_syscall_errno(struct libmnt_context *cxt); - - extern int mnt_context_strerror(struct libmnt_context *cxt, char *buf, - size_t bufsiz); -@@ -720,8 +659,7 @@ extern int mnt_context_prepare_umount(struct libmnt_context *cxt) - extern int mnt_context_do_umount(struct libmnt_context *cxt); - extern int mnt_context_finalize_umount(struct libmnt_context *cxt); - --extern int mnt_context_tab_applied(struct libmnt_context *cxt) -- __ul_attribute__((nonnull)); -+extern int mnt_context_tab_applied(struct libmnt_context *cxt); - extern int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status); - - /* -diff --git a/libmount/src/lock.c b/libmount/src/lock.c -index 9e583cc..e73edf5 100644 ---- a/libmount/src/lock.c -+++ b/libmount/src/lock.c -@@ -53,6 +53,8 @@ struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id) - char *lo = NULL, *ln = NULL; - size_t losz; - -+ assert(datafile); -+ - /* for flock we use "foo.lock, for mtab "foo~" - */ - losz = strlen(datafile) + sizeof(".lock"); -diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h -index 065b815..e064a68 100644 ---- a/libmount/src/mountP.h -+++ b/libmount/src/mountP.h -@@ -26,7 +26,9 @@ - #define CONFIG_LIBMOUNT_DEBUG - - #ifdef CONFIG_LIBMOUNT_ASSERT --#include -+# include -+#else -+# define assert(x) - #endif - - /* -diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c -index a3a5d0a..5e9e708 100644 ---- a/libmount/src/optstr.c -+++ b/libmount/src/optstr.c -@@ -169,8 +169,7 @@ int mnt_optstr_next_option(char **optstr, char **name, size_t *namesz, - return mnt_optstr_parse_next(optstr, name, namesz, value, valuesz); - } - --static int __attribute__((nonnull(1, 2))) --__mnt_optstr_append_option(char **optstr, -+static int __mnt_optstr_append_option(char **optstr, - const char *name, size_t nsz, - const char *value, size_t vsz) - { -@@ -180,6 +179,7 @@ __mnt_optstr_append_option(char **optstr, - assert(name); - assert(*name); - assert(nsz); -+ assert(optstr); - - osz = *optstr ? strlen(*optstr) : 0; - -@@ -225,6 +225,8 @@ int mnt_optstr_append_option(char **optstr, const char *name, const char *value) - { - size_t vsz, nsz; - -+ assert(optstr); -+ - if (!name || !*name) - return 0; - -@@ -248,6 +250,11 @@ int mnt_optstr_prepend_option(char **optstr, const char *name, const char *value - int rc = 0; - char *tmp = *optstr; - -+ assert(optstr); -+ -+ if (!name || !*name) -+ return 0; -+ - *optstr = NULL; - - rc = mnt_optstr_append_option(optstr, name, value); -@@ -282,6 +289,9 @@ int mnt_optstr_get_option(const char *optstr, const char *name, - struct libmnt_optloc ol; - int rc; - -+ assert(optstr); -+ assert(name); -+ - mnt_init_optloc(&ol); - - rc = mnt_optstr_locate_option((char *) optstr, name, &ol); -@@ -307,8 +317,12 @@ int mnt_optstr_get_option(const char *optstr, const char *name, - int mnt_optstr_deduplicate_option(char **optstr, const char *name) - { - int rc; -- char *begin = NULL, *end = NULL, *opt = *optstr; -+ char *begin = NULL, *end = NULL, *opt; - -+ assert(optstr); -+ assert(name); -+ -+ opt = *optstr; - do { - struct libmnt_optloc ol; - -@@ -421,6 +435,9 @@ int mnt_optstr_set_option(char **optstr, const char *name, const char *value) - char *nameend; - int rc = 1; - -+ assert(optstr); -+ assert(name); -+ - if (!optstr) - return -EINVAL; - -@@ -467,6 +484,9 @@ int mnt_optstr_remove_option(char **optstr, const char *name) - struct libmnt_optloc ol; - int rc; - -+ assert(optstr); -+ assert(name); -+ - mnt_init_optloc(&ol); - - rc = mnt_optstr_locate_option(*optstr, name, &ol); -diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c -index 7368d8c..e930fd8 100644 ---- a/libmount/src/tab_parse.c -+++ b/libmount/src/tab_parse.c -@@ -720,7 +720,6 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) - struct stat st; - - assert(filename); -- - if (!filename) - return NULL; - if (stat(filename, &st)) -@@ -749,6 +748,7 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) - */ - struct libmnt_table *mnt_new_table_from_file(const char *filename) - { -+ assert(filename); - return __mnt_new_table_from_file(filename, MNT_FMT_GUESS); - } - -@@ -763,7 +763,6 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) - struct libmnt_table *tb; - - assert(dirname); -- - if (!dirname) - return NULL; - tb = mnt_new_table(); -@@ -793,6 +792,7 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) - int mnt_table_set_parser_errcb(struct libmnt_table *tb, - int (*cb)(struct libmnt_table *tb, const char *filename, int line)) - { -+ assert(tb); - if (!tb) - return -EINVAL; - tb->errcb = cb; -@@ -807,6 +807,7 @@ int mnt_table_set_parser_fltrcb(struct libmnt_table *tb, - int (*cb)(struct libmnt_fs *, void *), - void *data) - { -+ assert(tb); - if (!tb) - return -EINVAL; - -@@ -862,7 +863,6 @@ int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename) - int rc = 0; - - assert(tb); -- - if (!tb) - return -EINVAL; - if (!filename) -@@ -959,6 +959,8 @@ int mnt_table_parse_mtab(struct libmnt_table *tb, const char *filename) - const char *utab = NULL; - struct libmnt_table *u_tb; - -+ assert(tb); -+ - if (mnt_has_regular_mtab(&filename, NULL)) { - - DBG(TAB, mnt_debug_h(tb, "force %s usage", filename)); -diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c -index 044a13f..1e7f32b 100644 ---- a/libmount/src/tab_update.c -+++ b/libmount/src/tab_update.c -@@ -131,6 +131,7 @@ int mnt_update_set_filename(struct libmnt_update *upd, const char *filename, - */ - const char *mnt_update_get_filename(struct libmnt_update *upd) - { -+ assert(upd); - return upd ? upd->filename : NULL; - } - -@@ -143,6 +144,7 @@ const char *mnt_update_get_filename(struct libmnt_update *upd) - */ - int mnt_update_is_ready(struct libmnt_update *upd) - { -+ assert(upd); - return upd ? upd->ready : FALSE; - } - -@@ -227,6 +229,7 @@ int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags, - */ - struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd) - { -+ assert(upd); - return upd ? upd->fs : NULL; - } - -@@ -238,6 +241,7 @@ struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd) - */ - unsigned long mnt_update_get_mflags(struct libmnt_update *upd) - { -+ assert(upd); - return upd ? upd->mountflags : 0; - } - -@@ -252,6 +256,7 @@ int mnt_update_force_rdonly(struct libmnt_update *upd, int rdonly) - { - int rc = 0; - -+ assert(upd); - if (!upd || !upd->fs) - return -EINVAL; - -@@ -505,6 +510,7 @@ static int update_table(struct libmnt_update *upd, struct libmnt_table *tb) - int rc, fd; - char *uq = NULL; - -+ assert(upd); - if (!tb || !upd->filename) - return -EINVAL; - -@@ -566,8 +572,11 @@ leave: - - static int add_file_entry(struct libmnt_table *tb, struct libmnt_update *upd) - { -- struct libmnt_fs *fs = mnt_copy_fs(NULL, upd->fs); -+ struct libmnt_fs *fs; -+ -+ assert(upd); - -+ fs = mnt_copy_fs(NULL, upd->fs); - if (!fs) - return -ENOMEM; - -@@ -638,6 +647,7 @@ static int update_modify_target(struct libmnt_update *upd, struct libmnt_lock *l - struct libmnt_table *tb = NULL; - int rc = 0; - -+ assert(upd); - DBG(UPDATE, mnt_debug_h(upd, "%s: modify target", upd->filename)); - - if (lc) -@@ -726,7 +736,6 @@ int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc) - int rc = -EINVAL; - - assert(upd); -- - if (!upd || !upd->filename) - return -EINVAL; - if (!upd->ready) -diff --git a/libmount/src/utils.c b/libmount/src/utils.c -index c910035..c328414 100644 ---- a/libmount/src/utils.c -+++ b/libmount/src/utils.c -@@ -269,6 +269,8 @@ int mnt_fstype_is_pseudofs(const char *type) - "tmpfs" - }; - -+ assert(type); -+ - return !(bsearch(&type, pseudofs, ARRAY_SIZE(pseudofs), - sizeof(char*), fstype_cmp) == NULL); - } -@@ -281,6 +283,8 @@ int mnt_fstype_is_pseudofs(const char *type) - */ - int mnt_fstype_is_netfs(const char *type) - { -+ assert(type); -+ - if (strcmp(type, "cifs") == 0 || - strcmp(type, "smbfs") == 0 || - strncmp(type,"nfs", 3) == 0 || -@@ -859,10 +863,13 @@ int mnt_open_uniq_filename(const char *filename, char **name) - */ - char *mnt_get_mountpoint(const char *path) - { -- char *mnt = strdup(path); -+ char *mnt; - struct stat st; - dev_t dir, base; - -+ assert(path); -+ -+ mnt = strdup(path); - if (!mnt) - return NULL; - if (*mnt == '/' && *(mnt + 1) == '\0') -diff --git a/libmount/src/version.c b/libmount/src/version.c -index 00e4f99..00b7c03 100644 ---- a/libmount/src/version.c -+++ b/libmount/src/version.c -@@ -25,6 +25,9 @@ static const char *lib_features[] = { - #ifdef CONFIG_LIBMOUNT_DEBUG - "debug", - #endif -+#ifdef CONFIG_LIBMOUNT_ASSERT -+ "assert", -+#endif - NULL - }; - -@@ -39,6 +42,8 @@ int mnt_parse_version_string(const char *ver_string) - const char *cp; - int version = 0; - -+ assert(ver_string); -+ - for (cp = ver_string; *cp; cp++) { - if (*cp == '.') - continue; --- -1.8.1.4 - diff --git a/sources b/sources index 09b9945..8f64420 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -abf3d68b534237b9c336dd5bfbf058d9 util-linux-2.23-rc2.tar.xz +cf5e9bb402371beaaffc3a5f276d5783 util-linux-2.23.tar.xz diff --git a/util-linux.spec b/util-linux.spec index cafc0bc..4472484 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23 -Release: 0.7%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define cytune_archs %{ix86} alpha %{arm} @@ -77,10 +77,6 @@ Requires: libmount = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch3: util-linux-ng-2.22-login-lastlog.patch -### upstream pathes (2.23) -# 948274 - interruption code 0x4003B in libmount.so.1.1.0 -Patch100: 0001-libmount-fix-mount.nfs-segfault-rely-on-assert-rathe.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -234,6 +230,14 @@ make %{?_smp_mflags} # build nologin gcc $CFLAGS -o nologin nologin.c + +%check +#to run tests use "--with check" +%if %{?_with_check:1}%{!?_with_check:0} +make check +%endif + + %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} @@ -788,6 +792,10 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Thu Apr 25 2013 Karel Zak 2.23-1 +- upgrade to 2.23 +- add --with check to call make check + * Mon Apr 15 2013 Karel Zak 2.23-0.7 - remove unused patches From 067da383fc428ee5acb944ec204d5d06b59ff217 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 28 May 2013 12:24:56 +0200 Subject: [PATCH 146/425] 2.23.1: upgrade 2.23 -> 2.23.1 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux-2.23-agetty-clocal.patch | 144 ++++++++++++++++++++++++++++ util-linux.spec | 11 ++- 4 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 util-linux-2.23-agetty-clocal.patch diff --git a/.gitignore b/.gitignore index 3c0a5a5..1a70c4c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /util-linux-2.23-rc1.tar.xz /util-linux-2.23-rc2.tar.xz /util-linux-2.23.tar.xz +/util-linux-2.23.1.tar.xz diff --git a/sources b/sources index 8f64420..c5f8a87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf5e9bb402371beaaffc3a5f276d5783 util-linux-2.23.tar.xz +33ba55ce82f8e3b8d7a38fac0f62779a util-linux-2.23.1.tar.xz diff --git a/util-linux-2.23-agetty-clocal.patch b/util-linux-2.23-agetty-clocal.patch new file mode 100644 index 0000000..f48541a --- /dev/null +++ b/util-linux-2.23-agetty-clocal.patch @@ -0,0 +1,144 @@ +From ef264c830effc91add6da334204215f61eb8515e Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 23 May 2013 09:25:06 +0200 +Subject: [PATCH] agetty: allow full control on CLOCAL flag + +Now the -L option allows to explicitly enable CLOCAL flag. + +Unfortunately sometimes it's necessary to clear the flag. This patch +add optional argument = to specify 'auto', 'always' and 'never' +to control CLOCAL flag. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=816342 +Signed-off-by: Karel Zak +--- + term-utils/agetty.8 | 14 ++++++++++++-- + term-utils/agetty.c | 44 +++++++++++++++++++++++++++++++++++++------- + 2 files changed, 49 insertions(+), 9 deletions(-) + +diff --git a/term-utils/agetty.8 b/term-utils/agetty.8 +index 64a1dd2..8d5286c 100644 +--- a/term-utils/agetty.8 ++++ b/term-utils/agetty.8 +@@ -138,10 +138,20 @@ This allows the use of a non-standard login program (for example, + one that asks for a dial-up password or that uses a different + password file). + .TP +-\-L, \-\-local\-line +-Force the line to be a local line with no need for carrier detect. This can ++\-L, \-\-local\-line [=\fImode\fP] ++Control CLOCAL line flag, the optional argument \fImode\fP is 'auto', 'always' or 'never'. ++If the \fImode\fP argument is omitted then the default is 'always'. If the ++\-\-local\-line option is ommitted at all then the default is 'auto'. ++ ++The \fImode\fP 'always' forces 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. ++ ++The \fImode\fP 'never' explicitly clears CLOCAL flags from line setting and ++the carrier detect signal is expected on the line. ++ ++The \fImode\fP 'auto' (agetty default) does not modify CLOCAL setting ++and follows the setting enabled by kernel. + .TP + \-m, \-\-extract\-baud + Try to extract the baud rate the CONNECT status message +diff --git a/term-utils/agetty.c b/term-utils/agetty.c +index dd52f70..0d01e7e 100644 +--- a/term-utils/agetty.c ++++ b/term-utils/agetty.c +@@ -132,13 +132,20 @@ struct options { + int delay; /* Sleep seconds before prompt */ + int nice; /* Run login with this priority */ + int numspeed; /* number of baud rates to try */ ++ int clocal; /* CLOCAL_MODE_* */ + speed_t speeds[MAX_SPEED]; /* baud rates to be tried */ + }; + ++enum { ++ CLOCAL_MODE_AUTO = 0, ++ CLOCAL_MODE_ALWAYS, ++ CLOCAL_MODE_NEVER ++}; ++ + #define F_PARSE (1<<0) /* process modem status messages */ + #define F_ISSUE (1<<1) /* display /etc/issue */ + #define F_RTSCTS (1<<2) /* enable RTS/CTS flow control */ +-#define F_LOCAL (1<<3) /* force local */ ++ + #define F_INITSTRING (1<<4) /* initstring is set */ + #define F_WAITCRLF (1<<5) /* wait for CR or LF */ + #define F_CUSTISSUE (1<<6) /* give alternative issue file */ +@@ -314,7 +321,8 @@ int main(int argc, char **argv) + strlen(options.initstring)); + } + +- if (!serial_tty_option(&options, F_LOCAL)) ++ if ((options.flags & F_VCONSOLE) == 0 && ++ options.clocal == CLOCAL_MODE_ALWAYS) + /* Go to blocking write mode unless -L is specified. */ + fcntl(STDOUT_FILENO, F_SETFL, + fcntl(STDOUT_FILENO, F_GETFL, 0) & ~O_NONBLOCK); +@@ -541,7 +549,7 @@ static void parse_args(int argc, char **argv, struct options *op) + { "init-string", required_argument, 0, 'I' }, + { "noclear", no_argument, 0, 'J' }, + { "login-program", required_argument, 0, 'l' }, +- { "local-line", no_argument, 0, 'L' }, ++ { "local-line", optional_argument, 0, 'L' }, + { "extract-baud", no_argument, 0, 'm' }, + { "skip-login", no_argument, 0, 'n' }, + { "nonewline", no_argument, 0, 'N' }, +@@ -610,7 +618,18 @@ static void parse_args(int argc, char **argv, struct options *op) + op->login = optarg; + break; + case 'L': +- op->flags |= F_LOCAL; ++ /* -L and -L=always have the same meaning */ ++ op->clocal = CLOCAL_MODE_ALWAYS; ++ if (optarg) { ++ if (strcmp(optarg, "=always") == 0) ++ op->clocal = CLOCAL_MODE_ALWAYS; ++ else if (strcmp(optarg, "=never") == 0) ++ op->clocal = CLOCAL_MODE_NEVER; ++ else if (strcmp(optarg, "=auto") == 0) ++ op->clocal = CLOCAL_MODE_AUTO; ++ else ++ log_err(_("unssuported --local-line mode argument")); ++ } + break; + case 'm': + op->flags |= F_PARSE; +@@ -1097,8 +1116,19 @@ static void termio_init(struct options *op, struct termios *tp) + cfsetispeed(tp, ispeed); + cfsetospeed(tp, ospeed); + +- if (op->flags & F_LOCAL) +- tp->c_cflag |= CLOCAL; ++ /* The default is to follow setting from kernel, but it's possible ++ * to explicitly remove/add CLOCAL flag by -L[=]*/ ++ switch (op->clocal) { ++ case CLOCAL_MODE_ALWAYS: ++ tp->c_cflag |= CLOCAL; /* -L or -L=always */ ++ break; ++ case CLOCAL_MODE_NEVER: ++ tp->c_cflag &= ~CLOCAL; /* -L=never */ ++ break; ++ case CLOCAL_MODE_AUTO: /* -L=auto */ ++ break; ++ } ++ + #ifdef HAVE_STRUCT_TERMIOS_C_LINE + tp->c_line = 0; + #endif +@@ -1655,7 +1685,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) + fputs(_(" -i, --noissue do not display issue file\n"), out); + fputs(_(" -I, --init-string set init string\n"), out); + fputs(_(" -l, --login-program specify login program\n"), out); +- fputs(_(" -L, --local-line force local line\n"), out); ++ fputs(_(" -L, --local-line[=] cotrol local line flag\n"), out); + fputs(_(" -m, --extract-baud extract baud rate during connect\n"), out); + fputs(_(" -n, --skip-login do not prompt for login\n"), out); + fputs(_(" -o, --login-options options that are passed to login\n"), out); +-- +1.8.1.4 + diff --git a/util-linux.spec b/util-linux.spec index 4472484..065c8cd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.23 +Version: 2.23.1 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -75,7 +75,10 @@ Requires: libmount = %{version}-%{release} ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch3: util-linux-ng-2.22-login-lastlog.patch +Patch0: util-linux-ng-2.22-login-lastlog.patch + +### Backport from v2.24 +Patch1: util-linux-2.23-agetty-clocal.patch %description The util-linux package contains a large variety of low-level system @@ -792,6 +795,10 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Tue May 28 2013 Karel Zak 2.23.1-1 +- upgrade to 2.23.1 +- backport agetty --local-line path + * Thu Apr 25 2013 Karel Zak 2.23-1 - upgrade to 2.23 - add --with check to call make check From 85ffd93331a28a480c4f33b6995ebaca417a69dc Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 5 Jun 2013 14:50:03 +0200 Subject: [PATCH 147/425] 2.23.1-2: fix #962145 --- util-linux.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 065c8cd..3894a42 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -79,6 +79,8 @@ Patch0: util-linux-ng-2.22-login-lastlog.patch ### Backport from v2.24 Patch1: util-linux-2.23-agetty-clocal.patch +### 962145 - in.telnetd immediately closes connection +Patch2: util-linux-2.23-login-TCSANOW.patch %description The util-linux package contains a large variety of low-level system @@ -795,6 +797,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Wed Jun 5 2013 Karel Zak 2.23.1-2 +- fix #962145 - in.telnetd immediately closes connection + * Tue May 28 2013 Karel Zak 2.23.1-1 - upgrade to 2.23.1 - backport agetty --local-line path From e1b05c26c4a81c1e05b1ec507de108872f79c4d9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 5 Jun 2013 14:55:07 +0200 Subject: [PATCH 148/425] add missing patch --- util-linux-2.23-login-TCSANOW.patch | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 util-linux-2.23-login-TCSANOW.patch diff --git a/util-linux-2.23-login-TCSANOW.patch b/util-linux-2.23-login-TCSANOW.patch new file mode 100644 index 0000000..d3e8021 --- /dev/null +++ b/util-linux-2.23-login-TCSANOW.patch @@ -0,0 +1,70 @@ +From c5bb244ea3f9fe8d4dbe07080ec811e232629ff8 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 5 Jun 2013 14:31:00 +0200 +Subject: [PATCH] login: use TCSANOW to remove HUPCL + +Fedora 19, kernel 3.9, systemd 204, telnetd with socket activation. + +login(1) code: + + ttt.c_cflag &= ~HUPCL; + tcsetattr(0, TCSAFLUSH, &ttt); + + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); + + signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ + vhangup(); + signal(SIGHUP, SIG_DFL); + +strace : + + ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B9600 opost isig icanon echo ...}) = 0 + close(0) = 0 + close(1) = 0 + close(2) = 0 + --- SIGHUP {si_signo=SIGHUP, si_code=SI_KERNEL} --- + --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} --- + +++ killed by SIGTERM +++ + +It seems we get SIGHUP (and SIGTERM from systemd) before vhangup(). +The problem occur sometimes. + +I guess it's because TCSAFLUSH is not applied immediately, so it would +be probably better to use TCSANOW to make the code more robust. + +References: https://bugzilla.redhat.com/show_bug.cgi?id=962145 +Signed-off-by: Karel Zak +--- + login-utils/login.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/login-utils/login.c b/login-utils/login.c +index 442ad40..554c46d 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -395,7 +395,7 @@ static void init_tty(struct login_context *cxt) + } + + /* Kill processes left on this tty */ +- tcsetattr(0, TCSAFLUSH, &ttt); ++ tcsetattr(0, TCSANOW, &ttt); + + /* + * Let's close file decriptors before vhangup +@@ -1312,10 +1312,10 @@ int main(int argc, char **argv) + close(cnt); + + setpgrp(); /* set pgid to pid this means that setsid() will fail */ ++ init_tty(&cxt); + + openlog("login", LOG_ODELAY, LOG_AUTHPRIV); + +- init_tty(&cxt); + init_loginpam(&cxt); + + /* login -f, then the user has already been authenticated */ +-- +1.8.1.4 + From bf69284ddec1b58cc8baf1a9bd83083feecef1cd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 13 Jun 2013 11:40:47 +0200 Subject: [PATCH 149/425] 2.23.1-3: fix #972457 (agetty) Signed-off-by: Karel Zak --- util-linux-2.23-agetty-clocal.patch | 123 +++++++++++++++------------- util-linux.spec | 7 +- 2 files changed, 71 insertions(+), 59 deletions(-) diff --git a/util-linux-2.23-agetty-clocal.patch b/util-linux-2.23-agetty-clocal.patch index f48541a..2637a4a 100644 --- a/util-linux-2.23-agetty-clocal.patch +++ b/util-linux-2.23-agetty-clocal.patch @@ -1,50 +1,5 @@ -From ef264c830effc91add6da334204215f61eb8515e Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 23 May 2013 09:25:06 +0200 -Subject: [PATCH] agetty: allow full control on CLOCAL flag - -Now the -L option allows to explicitly enable CLOCAL flag. - -Unfortunately sometimes it's necessary to clear the flag. This patch -add optional argument = to specify 'auto', 'always' and 'never' -to control CLOCAL flag. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=816342 -Signed-off-by: Karel Zak ---- - term-utils/agetty.8 | 14 ++++++++++++-- - term-utils/agetty.c | 44 +++++++++++++++++++++++++++++++++++++------- - 2 files changed, 49 insertions(+), 9 deletions(-) - -diff --git a/term-utils/agetty.8 b/term-utils/agetty.8 -index 64a1dd2..8d5286c 100644 ---- a/term-utils/agetty.8 -+++ b/term-utils/agetty.8 -@@ -138,10 +138,20 @@ This allows the use of a non-standard login program (for example, - one that asks for a dial-up password or that uses a different - password file). - .TP --\-L, \-\-local\-line --Force the line to be a local line with no need for carrier detect. This can -+\-L, \-\-local\-line [=\fImode\fP] -+Control CLOCAL line flag, the optional argument \fImode\fP is 'auto', 'always' or 'never'. -+If the \fImode\fP argument is omitted then the default is 'always'. If the -+\-\-local\-line option is ommitted at all then the default is 'auto'. -+ -+The \fImode\fP 'always' forces 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. -+ -+The \fImode\fP 'never' explicitly clears CLOCAL flags from line setting and -+the carrier detect signal is expected on the line. -+ -+The \fImode\fP 'auto' (agetty default) does not modify CLOCAL setting -+and follows the setting enabled by kernel. - .TP - \-m, \-\-extract\-baud - Try to extract the baud rate the CONNECT status message diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index dd52f70..0d01e7e 100644 +index a23cf6d..054a1dd 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -132,13 +132,20 @@ struct options { @@ -69,17 +24,52 @@ index dd52f70..0d01e7e 100644 #define F_INITSTRING (1<<4) /* initstring is set */ #define F_WAITCRLF (1<<5) /* wait for CR or LF */ #define F_CUSTISSUE (1<<6) /* give alternative issue file */ -@@ -314,7 +321,8 @@ int main(int argc, char **argv) +@@ -235,6 +242,9 @@ static void login_options_to_argv(char *argv[], int *argc, char *str, char *user + static char *fakehost; + + #ifdef DEBUGGING ++#ifndef ++# define DEBUG_OUTPUT "/dev/ttyp0" ++#endif + #define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) + FILE *dbf; + #else +@@ -270,7 +280,7 @@ int main(int argc, char **argv) + sigaction(SIGINT, &sa, &sa_int); + + #ifdef DEBUGGING +- dbf = fopen("/dev/ttyp0", "w"); ++ dbf = fopen(DEBUG_OUTPUT, "w"); + for (int i = 1; i < argc; i++) + debug(argv[i]); + #endif /* DEBUGGING */ +@@ -311,8 +321,10 @@ int main(int argc, char **argv) strlen(options.initstring)); } - if (!serial_tty_option(&options, F_LOCAL)) -+ if ((options.flags & F_VCONSOLE) == 0 && -+ options.clocal == CLOCAL_MODE_ALWAYS) - /* Go to blocking write mode unless -L is specified. */ +- /* Go to blocking write mode unless -L is specified. */ ++ if (options.flags & F_VCONSOLE || options.clocal != CLOCAL_MODE_ALWAYS) ++ /* Go to blocking mode unless -L is specified, this change ++ * affects stdout, stdin and stderr as all the file descriptors ++ * are created by dup(). */ fcntl(STDOUT_FILENO, F_SETFL, fcntl(STDOUT_FILENO, F_GETFL, 0) & ~O_NONBLOCK); -@@ -541,7 +549,7 @@ static void parse_args(int argc, char **argv, struct options *op) + +@@ -420,6 +432,12 @@ int main(int argc, char **argv) + options.tty); + } + ++#ifdef DEBUGGING ++ fprintf(dbf, "read %c\n", ch); ++ if (close_stream(dbf) != 0) ++ log_err("write failed: %s", DEBUG_OUTPUT); ++#endif ++ + /* Let the login program take care of password validation. */ + execv(options.login, login_argv); + log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); +@@ -532,7 +550,7 @@ static void parse_args(int argc, char **argv, struct options *op) { "init-string", required_argument, 0, 'I' }, { "noclear", no_argument, 0, 'J' }, { "login-program", required_argument, 0, 'l' }, @@ -88,7 +78,7 @@ index dd52f70..0d01e7e 100644 { "extract-baud", no_argument, 0, 'm' }, { "skip-login", no_argument, 0, 'n' }, { "nonewline", no_argument, 0, 'N' }, -@@ -610,7 +618,18 @@ static void parse_args(int argc, char **argv, struct options *op) +@@ -601,7 +619,18 @@ static void parse_args(int argc, char **argv, struct options *op) op->login = optarg; break; case 'L': @@ -108,7 +98,7 @@ index dd52f70..0d01e7e 100644 break; case 'm': op->flags |= F_PARSE; -@@ -1097,8 +1116,19 @@ static void termio_init(struct options *op, struct termios *tp) +@@ -1088,8 +1117,19 @@ static void termio_init(struct options *op, struct termios *tp) cfsetispeed(tp, ispeed); cfsetospeed(tp, ospeed); @@ -130,7 +120,29 @@ index dd52f70..0d01e7e 100644 #ifdef HAVE_STRUCT_TERMIOS_C_LINE tp->c_line = 0; #endif -@@ -1655,7 +1685,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) +@@ -1410,9 +1450,10 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata + + if (read(STDIN_FILENO, &c, 1) < 1) { + +- /* Do not report trivial like EINTR/EIO errors. */ ++ /* The terminal could be open with O_NONBLOCK when ++ * -L (force CLOCAL) is specified... */ + if (errno == EINTR || errno == EAGAIN) { +- usleep(1000); ++ usleep(250000); + continue; + } + switch (errno) { +@@ -1633,7 +1674,7 @@ static speed_t bcode(char *s) + static void __attribute__ ((__noreturn__)) usage(FILE *out) + { + fputs(USAGE_HEADER, out); +- fprintf(out, _(" %1$s [options] line baud_rate,... [termtype]\n" ++ fprintf(out, _(" %1$s [options] line [baud_rate,...] [termtype]\n" + " %1$s [options] baud_rate,... line [termtype]\n"), program_invocation_short_name); + fputs(USAGE_OPTIONS, out); + fputs(_(" -8, --8bits assume 8-bit tty\n"), out); +@@ -1646,7 +1687,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) fputs(_(" -i, --noissue do not display issue file\n"), out); fputs(_(" -I, --init-string set init string\n"), out); fputs(_(" -l, --login-program specify login program\n"), out); @@ -139,6 +151,3 @@ index dd52f70..0d01e7e 100644 fputs(_(" -m, --extract-baud extract baud rate during connect\n"), out); fputs(_(" -n, --skip-login do not prompt for login\n"), out); fputs(_(" -o, --login-options options that are passed to login\n"), out); --- -1.8.1.4 - diff --git a/util-linux.spec b/util-linux.spec index 3894a42..b4de327 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -77,7 +77,7 @@ Requires: libmount = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: util-linux-ng-2.22-login-lastlog.patch -### Backport from v2.24 +### Backport from v2.24 + #972457 Patch1: util-linux-2.23-agetty-clocal.patch ### 962145 - in.telnetd immediately closes connection Patch2: util-linux-2.23-login-TCSANOW.patch @@ -797,6 +797,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Thu Jun 13 2013 Karel Zak 2.23.1-3 +- fix #972457 - agetty idle I/O polling causes elevated CPU usage + * Wed Jun 5 2013 Karel Zak 2.23.1-2 - fix #962145 - in.telnetd immediately closes connection From 2919d71edd9aeba03c2e4adcf5144535504aec76 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 31 Jul 2013 14:57:08 +0200 Subject: [PATCH 150/425] 2.23.2-1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux-2.23-agetty-clocal.patch | 9 ---- util-linux-2.23-login-TCSANOW.patch | 70 ----------------------------- util-linux.spec | 10 +++-- 5 files changed, 8 insertions(+), 84 deletions(-) delete mode 100644 util-linux-2.23-login-TCSANOW.patch diff --git a/.gitignore b/.gitignore index 1a70c4c..bc6174a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /util-linux-2.23-rc2.tar.xz /util-linux-2.23.tar.xz /util-linux-2.23.1.tar.xz +/util-linux-2.23.2.tar.xz diff --git a/sources b/sources index c5f8a87..ef9c1e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -33ba55ce82f8e3b8d7a38fac0f62779a util-linux-2.23.1.tar.xz +b39fde897334a4858bb2098edcce5b3f util-linux-2.23.2.tar.xz diff --git a/util-linux-2.23-agetty-clocal.patch b/util-linux-2.23-agetty-clocal.patch index 2637a4a..f68b33f 100644 --- a/util-linux-2.23-agetty-clocal.patch +++ b/util-linux-2.23-agetty-clocal.patch @@ -133,15 +133,6 @@ index a23cf6d..054a1dd 100644 continue; } switch (errno) { -@@ -1633,7 +1674,7 @@ static speed_t bcode(char *s) - static void __attribute__ ((__noreturn__)) usage(FILE *out) - { - fputs(USAGE_HEADER, out); -- fprintf(out, _(" %1$s [options] line baud_rate,... [termtype]\n" -+ fprintf(out, _(" %1$s [options] line [baud_rate,...] [termtype]\n" - " %1$s [options] baud_rate,... line [termtype]\n"), program_invocation_short_name); - fputs(USAGE_OPTIONS, out); - fputs(_(" -8, --8bits assume 8-bit tty\n"), out); @@ -1646,7 +1687,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) fputs(_(" -i, --noissue do not display issue file\n"), out); fputs(_(" -I, --init-string set init string\n"), out); diff --git a/util-linux-2.23-login-TCSANOW.patch b/util-linux-2.23-login-TCSANOW.patch deleted file mode 100644 index d3e8021..0000000 --- a/util-linux-2.23-login-TCSANOW.patch +++ /dev/null @@ -1,70 +0,0 @@ -From c5bb244ea3f9fe8d4dbe07080ec811e232629ff8 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Jun 2013 14:31:00 +0200 -Subject: [PATCH] login: use TCSANOW to remove HUPCL - -Fedora 19, kernel 3.9, systemd 204, telnetd with socket activation. - -login(1) code: - - ttt.c_cflag &= ~HUPCL; - tcsetattr(0, TCSAFLUSH, &ttt); - - close(STDIN_FILENO); - close(STDOUT_FILENO); - close(STDERR_FILENO); - - signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ - vhangup(); - signal(SIGHUP, SIG_DFL); - -strace : - - ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B9600 opost isig icanon echo ...}) = 0 - close(0) = 0 - close(1) = 0 - close(2) = 0 - --- SIGHUP {si_signo=SIGHUP, si_code=SI_KERNEL} --- - --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} --- - +++ killed by SIGTERM +++ - -It seems we get SIGHUP (and SIGTERM from systemd) before vhangup(). -The problem occur sometimes. - -I guess it's because TCSAFLUSH is not applied immediately, so it would -be probably better to use TCSANOW to make the code more robust. - -References: https://bugzilla.redhat.com/show_bug.cgi?id=962145 -Signed-off-by: Karel Zak ---- - login-utils/login.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/login-utils/login.c b/login-utils/login.c -index 442ad40..554c46d 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -395,7 +395,7 @@ static void init_tty(struct login_context *cxt) - } - - /* Kill processes left on this tty */ -- tcsetattr(0, TCSAFLUSH, &ttt); -+ tcsetattr(0, TCSANOW, &ttt); - - /* - * Let's close file decriptors before vhangup -@@ -1312,10 +1312,10 @@ int main(int argc, char **argv) - close(cnt); - - setpgrp(); /* set pgid to pid this means that setsid() will fail */ -+ init_tty(&cxt); - - openlog("login", LOG_ODELAY, LOG_AUTHPRIV); - -- init_tty(&cxt); - init_loginpam(&cxt); - - /* login -f, then the user has already been authenticated */ --- -1.8.1.4 - diff --git a/util-linux.spec b/util-linux.spec index b4de327..5ff4801 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.23.1 -Release: 3%{?dist} +Version: 2.23.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -79,8 +79,6 @@ Patch0: util-linux-ng-2.22-login-lastlog.patch ### Backport from v2.24 + #972457 Patch1: util-linux-2.23-agetty-clocal.patch -### 962145 - in.telnetd immediately closes connection -Patch2: util-linux-2.23-login-TCSANOW.patch %description The util-linux package contains a large variety of low-level system @@ -797,6 +795,10 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Wed Jul 31 2013 Karel Zak 2.23.2-1 +- upgrade to stable release 2.23.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23.2-ReleaseNotes + * Thu Jun 13 2013 Karel Zak 2.23.1-3 - fix #972457 - agetty idle I/O polling causes elevated CPU usage From 5a1ed95fbec4d91ce1847f785dd32d12a521ecdd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Aug 2013 09:59:14 +0200 Subject: [PATCH 151/425] 2.23.2-2: fix 990083 Signed-off-by: Karel Zak --- util-linux-su.pamd | 2 +- util-linux.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-su.pamd b/util-linux-su.pamd index 1981f58..030657f 100644 --- a/util-linux-su.pamd +++ b/util-linux-su.pamd @@ -4,7 +4,7 @@ auth sufficient pam_rootok.so #auth sufficient pam_wheel.so trust use_uid # Uncomment the following line to require a user to be in the "wheel" group. #auth required pam_wheel.so use_uid -auth include system-auth +auth substack system-auth auth include postlogin account sufficient pam_succeed_if.so uid = 0 use_uid quiet account include system-auth diff --git a/util-linux.spec b/util-linux.spec index 5ff4801..53ebd89 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -795,6 +795,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Thu Aug 1 2013 Karel Zak 2.23.2-2 +- fix 990083 - su doesn't work with pam_ecryptfs + * Wed Jul 31 2013 Karel Zak 2.23.2-1 - upgrade to stable release 2.23.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23.2-ReleaseNotes From d7262717becbc72d836d8077cda5fe0cb640e8ff Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Sep 2013 09:12:55 +0200 Subject: [PATCH 152/425] 2.23.2-3: refresh patches Signed-off-by: Karel Zak --- util-linux-2.23-agetty-clocal.patch | 33 +++++++++++++++----------- util-linux-ng-2.22-login-lastlog.patch | 8 +++---- util-linux.spec | 5 +++- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/util-linux-2.23-agetty-clocal.patch b/util-linux-2.23-agetty-clocal.patch index f68b33f..9e83e70 100644 --- a/util-linux-2.23-agetty-clocal.patch +++ b/util-linux-2.23-agetty-clocal.patch @@ -1,7 +1,6 @@ -diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index a23cf6d..054a1dd 100644 ---- a/term-utils/agetty.c -+++ b/term-utils/agetty.c +diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils/agetty.c +--- util-linux-2.23.2/term-utils/agetty.c.kzak 2013-07-30 11:14:18.124912322 +0200 ++++ util-linux-2.23.2/term-utils/agetty.c 2013-09-09 09:07:46.406689270 +0200 @@ -132,13 +132,20 @@ struct options { int delay; /* Sleep seconds before prompt */ int nice; /* Run login with this priority */ @@ -24,16 +23,22 @@ index a23cf6d..054a1dd 100644 #define F_INITSTRING (1<<4) /* initstring is set */ #define F_WAITCRLF (1<<5) /* wait for CR or LF */ #define F_CUSTISSUE (1<<6) /* give alternative issue file */ -@@ -235,6 +242,9 @@ static void login_options_to_argv(char *argv[], int *argc, char *str, char *user +@@ -235,10 +242,13 @@ static void login_options_to_argv(char * static char *fakehost; #ifdef DEBUGGING -+#ifndef -+# define DEBUG_OUTPUT "/dev/ttyp0" -+#endif - #define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) +-#define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) ++# ifndef DEBUG_OUTPUT ++# define DEBUG_OUTPUT "/dev/ttyp0" ++# endif ++# define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) FILE *dbf; #else +-#define debug(s) do { ; } while (0) ++# define debug(s) do { ; } while (0) + #endif + + int main(int argc, char **argv) @@ -270,7 +280,7 @@ int main(int argc, char **argv) sigaction(SIGINT, &sa, &sa_int); @@ -69,7 +74,7 @@ index a23cf6d..054a1dd 100644 /* Let the login program take care of password validation. */ execv(options.login, login_argv); log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); -@@ -532,7 +550,7 @@ static void parse_args(int argc, char **argv, struct options *op) +@@ -534,7 +552,7 @@ static void parse_args(int argc, char ** { "init-string", required_argument, 0, 'I' }, { "noclear", no_argument, 0, 'J' }, { "login-program", required_argument, 0, 'l' }, @@ -78,7 +83,7 @@ index a23cf6d..054a1dd 100644 { "extract-baud", no_argument, 0, 'm' }, { "skip-login", no_argument, 0, 'n' }, { "nonewline", no_argument, 0, 'N' }, -@@ -601,7 +619,18 @@ static void parse_args(int argc, char **argv, struct options *op) +@@ -603,7 +621,18 @@ static void parse_args(int argc, char ** op->login = optarg; break; case 'L': @@ -98,7 +103,7 @@ index a23cf6d..054a1dd 100644 break; case 'm': op->flags |= F_PARSE; -@@ -1088,8 +1117,19 @@ static void termio_init(struct options *op, struct termios *tp) +@@ -1090,8 +1119,19 @@ static void termio_init(struct options * cfsetispeed(tp, ispeed); cfsetospeed(tp, ospeed); @@ -120,7 +125,7 @@ index a23cf6d..054a1dd 100644 #ifdef HAVE_STRUCT_TERMIOS_C_LINE tp->c_line = 0; #endif -@@ -1410,9 +1450,10 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata +@@ -1412,9 +1452,10 @@ static char *get_logname(struct options if (read(STDIN_FILENO, &c, 1) < 1) { @@ -133,7 +138,7 @@ index a23cf6d..054a1dd 100644 continue; } switch (errno) { -@@ -1646,7 +1687,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) +@@ -1648,7 +1689,7 @@ static void __attribute__ ((__noreturn__ fputs(_(" -i, --noissue do not display issue file\n"), out); fputs(_(" -I, --init-string set init string\n"), out); fputs(_(" -l, --login-program specify login program\n"), out); diff --git a/util-linux-ng-2.22-login-lastlog.patch b/util-linux-ng-2.22-login-lastlog.patch index 73085d7..839193a 100644 --- a/util-linux-ng-2.22-login-lastlog.patch +++ b/util-linux-ng-2.22-login-lastlog.patch @@ -1,7 +1,7 @@ -diff -up util-linux-2.22.2/login-utils/login.c.kzak util-linux-2.22.2/login-utils/login.c ---- util-linux-2.22.2/login-utils/login.c.kzak 2012-12-12 21:04:47.906355128 +0100 -+++ util-linux-2.22.2/login-utils/login.c 2013-02-19 16:14:33.224339106 +0100 -@@ -514,7 +514,7 @@ static void log_lastlog(struct login_con +diff -up util-linux-2.23.2/login-utils/login.c.kzak util-linux-2.23.2/login-utils/login.c +--- util-linux-2.23.2/login-utils/login.c.kzak 2013-07-30 10:39:26.222738397 +0200 ++++ util-linux-2.23.2/login-utils/login.c 2013-09-09 09:01:39.923225757 +0200 +@@ -502,7 +502,7 @@ static void log_lastlog(struct login_con if (!cxt->pwd) return; diff --git a/util-linux.spec b/util-linux.spec index 53ebd89..075e97e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -795,6 +795,9 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Mon Sep 9 2013 Karel Zak 2.23.2-3 +- refresh patches + * Thu Aug 1 2013 Karel Zak 2.23.2-2 - fix 990083 - su doesn't work with pam_ecryptfs From 706e746809aa0f52221577eed60b505dbb572e47 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Sep 2013 09:22:51 +0200 Subject: [PATCH 153/425] 2.23.2-3: rename patches --- ...g.patch => 2.23-login-lastlog-create.patch | 11 +- ...y-clocal.patch => 2.24-agetty-clocal.patch | 102 +++++++++--------- util-linux.spec | 6 +- 3 files changed, 59 insertions(+), 60 deletions(-) rename util-linux-ng-2.22-login-lastlog.patch => 2.23-login-lastlog-create.patch (87%) rename util-linux-2.23-agetty-clocal.patch => 2.24-agetty-clocal.patch (68%) diff --git a/util-linux-ng-2.22-login-lastlog.patch b/2.23-login-lastlog-create.patch similarity index 87% rename from util-linux-ng-2.22-login-lastlog.patch rename to 2.23-login-lastlog-create.patch index 839193a..6db26e2 100644 --- a/util-linux-ng-2.22-login-lastlog.patch +++ b/2.23-login-lastlog-create.patch @@ -2,11 +2,10 @@ diff -up util-linux-2.23.2/login-utils/login.c.kzak util-linux-2.23.2/login-util --- util-linux-2.23.2/login-utils/login.c.kzak 2013-07-30 10:39:26.222738397 +0200 +++ util-linux-2.23.2/login-utils/login.c 2013-09-09 09:01:39.923225757 +0200 @@ -502,7 +502,7 @@ static void log_lastlog(struct login_con - if (!cxt->pwd) - return; - + if (!cxt->pwd) + return; + - fd = open(_PATH_LASTLOG, O_RDWR, 0); + fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); - if (fd < 0) - return; - + if (fd < 0) + return; diff --git a/util-linux-2.23-agetty-clocal.patch b/2.24-agetty-clocal.patch similarity index 68% rename from util-linux-2.23-agetty-clocal.patch rename to 2.24-agetty-clocal.patch index 9e83e70..c7e6f66 100644 --- a/util-linux-2.23-agetty-clocal.patch +++ b/2.24-agetty-clocal.patch @@ -2,13 +2,13 @@ diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils --- util-linux-2.23.2/term-utils/agetty.c.kzak 2013-07-30 11:14:18.124912322 +0200 +++ util-linux-2.23.2/term-utils/agetty.c 2013-09-09 09:07:46.406689270 +0200 @@ -132,13 +132,20 @@ struct options { - int delay; /* Sleep seconds before prompt */ - int nice; /* Run login with this priority */ - int numspeed; /* number of baud rates to try */ + int delay; /* Sleep seconds before prompt */ + int nice; /* Run login with this priority */ + int numspeed; /* number of baud rates to try */ + int clocal; /* CLOCAL_MODE_* */ - speed_t speeds[MAX_SPEED]; /* baud rates to be tried */ + speed_t speeds[MAX_SPEED]; /* baud rates to be tried */ }; - + +enum { + CLOCAL_MODE_AUTO = 0, + CLOCAL_MODE_ALWAYS, @@ -25,7 +25,7 @@ diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils #define F_CUSTISSUE (1<<6) /* give alternative issue file */ @@ -235,10 +242,13 @@ static void login_options_to_argv(char * static char *fakehost; - + #ifdef DEBUGGING -#define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) +# ifndef DEBUG_OUTPUT @@ -40,53 +40,53 @@ diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils int main(int argc, char **argv) @@ -270,7 +280,7 @@ int main(int argc, char **argv) - sigaction(SIGINT, &sa, &sa_int); - + sigaction(SIGINT, &sa, &sa_int); + #ifdef DEBUGGING - dbf = fopen("/dev/ttyp0", "w"); + dbf = fopen(DEBUG_OUTPUT, "w"); - for (int i = 1; i < argc; i++) - debug(argv[i]); + for (int i = 1; i < argc; i++) + debug(argv[i]); #endif /* DEBUGGING */ @@ -311,8 +321,10 @@ int main(int argc, char **argv) - strlen(options.initstring)); - } - + strlen(options.initstring)); + } + - if (!serial_tty_option(&options, F_LOCAL)) - /* Go to blocking write mode unless -L is specified. */ + if (options.flags & F_VCONSOLE || options.clocal != CLOCAL_MODE_ALWAYS) + /* Go to blocking mode unless -L is specified, this change + * affects stdout, stdin and stderr as all the file descriptors + * are created by dup(). */ - fcntl(STDOUT_FILENO, F_SETFL, - fcntl(STDOUT_FILENO, F_GETFL, 0) & ~O_NONBLOCK); - + fcntl(STDOUT_FILENO, F_SETFL, + fcntl(STDOUT_FILENO, F_GETFL, 0) & ~O_NONBLOCK); + @@ -420,6 +432,12 @@ int main(int argc, char **argv) - options.tty); - } - + options.tty); + } + +#ifdef DEBUGGING + fprintf(dbf, "read %c\n", ch); + if (close_stream(dbf) != 0) + log_err("write failed: %s", DEBUG_OUTPUT); +#endif + - /* Let the login program take care of password validation. */ - execv(options.login, login_argv); - log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); + /* Let the login program take care of password validation. */ + execv(options.login, login_argv); + log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); @@ -534,7 +552,7 @@ static void parse_args(int argc, char ** - { "init-string", required_argument, 0, 'I' }, - { "noclear", no_argument, 0, 'J' }, - { "login-program", required_argument, 0, 'l' }, + { "init-string", required_argument, 0, 'I' }, + { "noclear", no_argument, 0, 'J' }, + { "login-program", required_argument, 0, 'l' }, - { "local-line", no_argument, 0, 'L' }, + { "local-line", optional_argument, 0, 'L' }, - { "extract-baud", no_argument, 0, 'm' }, - { "skip-login", no_argument, 0, 'n' }, - { "nonewline", no_argument, 0, 'N' }, + { "extract-baud", no_argument, 0, 'm' }, + { "skip-login", no_argument, 0, 'n' }, + { "nonewline", no_argument, 0, 'N' }, @@ -603,7 +621,18 @@ static void parse_args(int argc, char ** - op->login = optarg; - break; - case 'L': + op->login = optarg; + break; + case 'L': - op->flags |= F_LOCAL; + /* -L and -L=always have the same meaning */ + op->clocal = CLOCAL_MODE_ALWAYS; @@ -100,13 +100,13 @@ diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils + else + log_err(_("unssuported --local-line mode argument")); + } - break; - case 'm': - op->flags |= F_PARSE; + break; + case 'm': + op->flags |= F_PARSE; @@ -1090,8 +1119,19 @@ static void termio_init(struct options * - cfsetispeed(tp, ispeed); - cfsetospeed(tp, ospeed); - + cfsetispeed(tp, ispeed); + cfsetospeed(tp, ospeed); + - if (op->flags & F_LOCAL) - tp->c_cflag |= CLOCAL; + /* The default is to follow setting from kernel, but it's possible @@ -123,27 +123,27 @@ diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils + } + #ifdef HAVE_STRUCT_TERMIOS_C_LINE - tp->c_line = 0; + tp->c_line = 0; #endif @@ -1412,9 +1452,10 @@ static char *get_logname(struct options - - if (read(STDIN_FILENO, &c, 1) < 1) { - + + if (read(STDIN_FILENO, &c, 1) < 1) { + - /* Do not report trivial like EINTR/EIO errors. */ + /* The terminal could be open with O_NONBLOCK when + * -L (force CLOCAL) is specified... */ - if (errno == EINTR || errno == EAGAIN) { + if (errno == EINTR || errno == EAGAIN) { - usleep(1000); + usleep(250000); - continue; - } - switch (errno) { + continue; + } + switch (errno) { @@ -1648,7 +1689,7 @@ static void __attribute__ ((__noreturn__ - fputs(_(" -i, --noissue do not display issue file\n"), out); - fputs(_(" -I, --init-string set init string\n"), out); - fputs(_(" -l, --login-program specify login program\n"), out); + fputs(_(" -i, --noissue do not display issue file\n"), out); + fputs(_(" -I, --init-string set init string\n"), out); + fputs(_(" -l, --login-program specify login program\n"), out); - fputs(_(" -L, --local-line force local line\n"), out); + fputs(_(" -L, --local-line[=] cotrol local line flag\n"), out); - fputs(_(" -m, --extract-baud extract baud rate during connect\n"), out); - fputs(_(" -n, --skip-login do not prompt for login\n"), out); - fputs(_(" -o, --login-options options that are passed to login\n"), out); + fputs(_(" -m, --extract-baud extract baud rate during connect\n"), out); + fputs(_(" -n, --skip-login do not prompt for login\n"), out); + fputs(_(" -o, --login-options options that are passed to login\n"), out); diff --git a/util-linux.spec b/util-linux.spec index 075e97e..5c84b50 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -75,10 +75,10 @@ Requires: libmount = %{version}-%{release} ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch0: util-linux-ng-2.22-login-lastlog.patch +Patch0: 2.23-login-lastlog-create.patch ### Backport from v2.24 + #972457 -Patch1: util-linux-2.23-agetty-clocal.patch +Patch1: 2.24-agetty-clocal.patch %description The util-linux package contains a large variety of low-level system @@ -796,7 +796,7 @@ fi %changelog * Mon Sep 9 2013 Karel Zak 2.23.2-3 -- refresh patches +- refresh and rename patches * Thu Aug 1 2013 Karel Zak 2.23.2-2 - fix 990083 - su doesn't work with pam_ecryptfs From 2cfecf35297a1effd57ba0f237bb967a9304c6fe Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Sep 2013 09:34:32 +0200 Subject: [PATCH 154/425] 2.23.2-3: #987787 --- 2.24-su-suppress-PAM-info-messages.patch | 48 ++++++++++++++++++++++++ util-linux.spec | 5 ++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 2.24-su-suppress-PAM-info-messages.patch diff --git a/2.24-su-suppress-PAM-info-messages.patch b/2.24-su-suppress-PAM-info-messages.patch new file mode 100644 index 0000000..3b54521 --- /dev/null +++ b/2.24-su-suppress-PAM-info-messages.patch @@ -0,0 +1,48 @@ +diff -up util-linux-2.23.2/login-utils/su-common.c.kzak util-linux-2.23.2/login-utils/su-common.c +--- util-linux-2.23.2/login-utils/su-common.c.kzak 2013-07-30 10:39:26.223738407 +0200 ++++ util-linux-2.23.2/login-utils/su-common.c 2013-09-09 09:32:05.497238691 +0200 +@@ -111,6 +111,9 @@ static int same_session = 0; + /* SU_MODE_{RUNUSER,SU} */ + static int su_mode; + ++/* Don't print PAM info messages (Last login, etc.). */ ++static int suppress_pam_info; ++ + static bool _pam_session_opened; + static bool _pam_cred_established; + static sig_atomic_t volatile caught_signal = false; +@@ -208,10 +211,23 @@ static void log_btmp(struct passwd const + updwtmp(_PATH_BTMP, &ut); + } + ++ ++static int su_pam_conv(int num_msg, const struct pam_message **msg, ++ struct pam_response **resp, void *appdata_ptr) ++{ ++ if (suppress_pam_info ++ && num_msg == 1 ++ && msg ++ && msg[0]->msg_style == PAM_TEXT_INFO) ++ return PAM_SUCCESS; ++ ++ return misc_conv(num_msg, msg, resp, appdata_ptr); ++} ++ + static struct pam_conv conv = + { +- misc_conv, +- NULL ++ su_pam_conv, ++ NULL + }; + + static void +@@ -902,6 +918,9 @@ su_main (int argc, char **argv, int mode + + init_groups (pw, groups, num_supp_groups); + ++ if (!simulate_login || command) ++ suppress_pam_info = 1; /* don't print PAM info messages */ ++ + create_watching_parent (); + /* Now we're in the child. */ diff --git a/util-linux.spec b/util-linux.spec index 5c84b50..72bc4f0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -77,8 +77,10 @@ Requires: libmount = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -### Backport from v2.24 + #972457 +# v2.24 backport: #972457 Patch1: 2.24-agetty-clocal.patch +# v2.24 backport: #987787 - Remove lastlogin from su +Patch2: 2.24-su-suppress-PAM-info-messages.patch %description The util-linux package contains a large variety of low-level system @@ -797,6 +799,7 @@ fi %changelog * Mon Sep 9 2013 Karel Zak 2.23.2-3 - refresh and rename patches +- fix #987787 - Remove lastlogin from su * Thu Aug 1 2013 Karel Zak 2.23.2-2 - fix 990083 - su doesn't work with pam_ecryptfs From 49ff57a01e5d87cd55cc42ea72cbbc16555d7106 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Sep 2013 09:48:59 +0200 Subject: [PATCH 155/425] 2.23.2-3: #950497 --- ...nicalize-for-conversion-from-loopdev.patch | 39 +++++++++++++++++++ util-linux.spec | 3 ++ 2 files changed, 42 insertions(+) create mode 100644 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch diff --git a/2.24-libmount-canonicalize-for-conversion-from-loopdev.patch b/2.24-libmount-canonicalize-for-conversion-from-loopdev.patch new file mode 100644 index 0000000..9778ec5 --- /dev/null +++ b/2.24-libmount-canonicalize-for-conversion-from-loopdev.patch @@ -0,0 +1,39 @@ +From 3f420a49dd4d0c413b635dd621aa34eebce2d3d2 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 5 Aug 2013 13:58:01 +0200 +Subject: [PATCH] libmount: canonicalize for conversion from loopdev backing + file + + # mount foo.img /mnt + # umount foo.img + umount: foo.img: not mounted + +The loopdev code (and sysfs backing_file) uses absolute paths, but +libmount does not canonicalize the path before lookup for the backing file. + +References: https://bugzilla.redhat.com/show_bug.cgi?id=950497 +Signed-off-by: Karel Zak +--- + libmount/src/context_umount.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c +index 2b791c4..b02902c 100644 +--- a/libmount/src/context_umount.c ++++ b/libmount/src/context_umount.c +@@ -161,7 +161,12 @@ try_loopdev: + struct stat st; + + if (stat(tgt, &st) == 0 && S_ISREG(st.st_mode)) { +- int count = loopdev_count_by_backing_file(tgt, &loopdev); ++ int count; ++ ++ cn_tgt = mnt_resolve_path(tgt, cache); ++ count = loopdev_count_by_backing_file(cn_tgt, &loopdev); ++ if (!cache) ++ free(cn_tgt); + if (count == 1) { + DBG(CXT, mnt_debug_h(cxt, + "umount: %s --> %s (retry)", tgt, loopdev)); +-- +1.8.1.4 diff --git a/util-linux.spec b/util-linux.spec index 72bc4f0..9b0da48 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -81,6 +81,8 @@ Patch0: 2.23-login-lastlog-create.patch Patch1: 2.24-agetty-clocal.patch # v2.24 backport: #987787 - Remove lastlogin from su Patch2: 2.24-su-suppress-PAM-info-messages.patch +# v2.24 backport: #950497 - problem umounting loop device +Patch3: 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch %description The util-linux package contains a large variety of low-level system @@ -800,6 +802,7 @@ fi * Mon Sep 9 2013 Karel Zak 2.23.2-3 - refresh and rename patches - fix #987787 - Remove lastlogin from su +- fix #950497 - problem umounting loop device * Thu Aug 1 2013 Karel Zak 2.23.2-2 - fix 990083 - su doesn't work with pam_ecryptfs From a6e628e5e795e31727a6253da7b3e1a96a4a54f0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Sep 2013 10:02:50 +0200 Subject: [PATCH 156/425] 2.23.2-3: #921498 --- 2.24-tests-portability.patch | 37 ++++++++++++++++++++++++++++++++++++ util-linux.spec | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 2.24-tests-portability.patch diff --git a/2.24-tests-portability.patch b/2.24-tests-portability.patch new file mode 100644 index 0000000..d16d020 --- /dev/null +++ b/2.24-tests-portability.patch @@ -0,0 +1,37 @@ +diff -up util-linux-2.23.2/tests/functions.sh.kzak util-linux-2.23.2/tests/functions.sh +--- util-linux-2.23.2/tests/functions.sh.kzak 2013-06-13 09:46:10.554651768 +0200 ++++ util-linux-2.23.2/tests/functions.sh 2013-09-09 10:01:23.355469268 +0200 +@@ -483,7 +483,7 @@ function ts_scsi_debug_init { + modprobe scsi_debug $* + [ "$?" == 0 ] || ts_die "Cannot init device" + +- DEVNAME=$(grep scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') ++ DEVNAME=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') + [ "x${DEVNAME}" == "x" ] && ts_die "Cannot find device" + + DEVICE="/dev/${DEVNAME}" +diff -up util-linux-2.23.2/tests/ts/cramfs/mkfs.kzak util-linux-2.23.2/tests/ts/cramfs/mkfs +--- util-linux-2.23.2/tests/ts/cramfs/mkfs.kzak 2013-06-13 09:46:10.557651793 +0200 ++++ util-linux-2.23.2/tests/ts/cramfs/mkfs 2013-09-09 10:01:23.355469268 +0200 +@@ -80,7 +80,7 @@ cd $TS_MOUNTPOINT + + ts_log "list the image" + export TZ='GMT-1' +-ls -laR --time-style=long-iso . >> $TS_OUTPUT ++ls -laR --time-style=long-iso . | sed 's:\. : :g' >> $TS_OUTPUT + echo >> $TS_OUTPUT + + ts_log "list checksums from new data" +diff -up util-linux-2.23.2/tests/ts/libmount/context-utab.kzak util-linux-2.23.2/tests/ts/libmount/context-utab +--- util-linux-2.23.2/tests/ts/libmount/context-utab.kzak 2013-06-13 09:46:10.561651827 +0200 ++++ util-linux-2.23.2/tests/ts/libmount/context-utab 2013-09-09 10:01:23.355469268 +0200 +@@ -85,7 +85,9 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \ + echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 + ts_finalize_subtest + ++ + if [ -x "/sbin/mkfs.btrfs" ]; then ++ $TS_CMD_WIPEFS -a $DEVICE &> /dev/null + ts_log "Create filesystem [btrfs]" + /sbin/mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null + udevadm settle diff --git a/util-linux.spec b/util-linux.spec index 9b0da48..8f01733 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -83,6 +83,8 @@ Patch1: 2.24-agetty-clocal.patch Patch2: 2.24-su-suppress-PAM-info-messages.patch # v2.24 backport: #950497 - problem umounting loop device Patch3: 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch +# v2.24 backport: #921498 - multiple internal testsuite failures +Patch4: 2.24-tests-portability.patch %description The util-linux package contains a large variety of low-level system @@ -803,6 +805,7 @@ fi - refresh and rename patches - fix #987787 - Remove lastlogin from su - fix #950497 - problem umounting loop device +- fix #921498 - multiple internal testsuite failures * Thu Aug 1 2013 Karel Zak 2.23.2-2 - fix 990083 - su doesn't work with pam_ecryptfs From f16c031219534aecdc662139084d531689955580 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Sep 2013 12:45:16 +0200 Subject: [PATCH 157/425] 2.23.2-4: #1005566 #1005194 --- 2.24-libfdisk-fix-SIGFPE.patch | 39 ++++++++++++++++++ 2.24-su-fix-lastlog-and-btmp-logging.patch | 47 ++++++++++++++++++++++ util-linux.spec | 11 ++++- 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 2.24-libfdisk-fix-SIGFPE.patch create mode 100644 2.24-su-fix-lastlog-and-btmp-logging.patch diff --git a/2.24-libfdisk-fix-SIGFPE.patch b/2.24-libfdisk-fix-SIGFPE.patch new file mode 100644 index 0000000..7ed13cc --- /dev/null +++ b/2.24-libfdisk-fix-SIGFPE.patch @@ -0,0 +1,39 @@ +From 44baaedaffee029dca76796b933412d97a19dff6 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 9 Sep 2013 10:57:50 +0200 +Subject: [PATCH] libfdisk: fix SIGFPE + + #0 recount_geometry at libfdisk/src/alignment.c:143 + #1 fdisk_discover_geometry at libfdisk/src/alignment.c:205 + #2 fdisk_context_assign_device at libfdisk/src/context.c:173 + #3 print_partition_table_from_option at fdisks/fdisk.c:924 + +References: https://bugzilla.redhat.com/show_bug.cgi?id=1005566 +Signed-off-by: Karel Zak +--- + libfdisk/src/alignment.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/libfdisk/src/alignment.c b/libfdisk/src/alignment.c +index ac44e73..4d4ab48 100644 +--- a/libfdisk/src/alignment.c ++++ b/libfdisk/src/alignment.c +@@ -193,11 +193,12 @@ int fdisk_discover_geometry(struct fdisk_context *cxt) + + /* what the kernel/bios thinks the geometry is */ + blkdev_get_geometry(cxt->dev_fd, &h, &s); +- if (!h && !s) { +- /* unable to discover geometry, use default values */ +- s = 63; ++ ++ /* defaults */ ++ if (!h) + h = 255; +- } ++ if (!s) ++ s = 63; + + /* obtained heads and sectors */ + cxt->geom.heads = h; +-- +1.8.1.4 diff --git a/2.24-su-fix-lastlog-and-btmp-logging.patch b/2.24-su-fix-lastlog-and-btmp-logging.patch new file mode 100644 index 0000000..db423e1 --- /dev/null +++ b/2.24-su-fix-lastlog-and-btmp-logging.patch @@ -0,0 +1,47 @@ +From 9b5dc4cb8d5d82c31c0cda898832998c21afc303 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 9 Sep 2013 12:24:01 +0200 +Subject: [PATCH] su: fix lastlog and btmp logging + +The su(1) logging code mix ups "old" and "new" passwd structs. The +result is things like + + Sep 9 11:50:45 x2 su: (to kzak) kzak on none + +in /var/log/messages. The right log entry is + + Sep 9 11:50:45 x2 su: (to root) kzak on pts/3 + +The bug has been introduced by commit c74a7af17c7a176c358dfaa8e1814786c89ebc14. + +References: https://bugzilla.redhat.com/show_bug.cgi?id=1005194 +Signed-off-by: Karel Zak +--- + login-utils/su-common.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index ade5c92..858af01 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -161,7 +161,7 @@ log_syslog(struct passwd const *pw, bool successful) + old_user = pwd ? pwd->pw_name : ""; + } + +- if (get_terminal_name(STDERR_FILENO, NULL, &tty, NULL) == 0 && tty) ++ if (get_terminal_name(STDERR_FILENO, NULL, &tty, NULL) != 0 || !tty) + tty = "none"; + + openlog (program_invocation_short_name, 0 , LOG_AUTH); +@@ -483,9 +483,6 @@ authenticate (const struct passwd *pw) + + done: + +- if (lpw && lpw->pw_name) +- pw = lpw; +- + log_syslog(pw, !is_pam_failure(retval)); + + if (is_pam_failure(retval)) +-- +1.8.1.4 diff --git a/util-linux.spec b/util-linux.spec index 8f01733..9e17119 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.23.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -85,6 +85,11 @@ Patch2: 2.24-su-suppress-PAM-info-messages.patch Patch3: 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch # v2.24 backport: #921498 - multiple internal testsuite failures Patch4: 2.24-tests-portability.patch +# v2.24 backport: #1005566 - recount_geometry: Process /usr/sbin/fdisk was killed by signal 8 (SIGFPE) +Patch5: 2.24-libfdisk-fix-SIGFPE.patch +# v2.24 backport: #1005194 - su generates incorrect log entries +Patch6: 2.24-su-fix-lastlog-and-btmp-logging.patch + %description The util-linux package contains a large variety of low-level system @@ -801,6 +806,10 @@ fi %{_libdir}/pkgconfig/uuid.pc %changelog +* Mon Sep 9 2013 Karel Zak 2.23.2-4 +- fix #1005566 - recount_geometry: Process /usr/sbin/fdisk was killed by signal 8 (SIGFPE) +- fix #1005194 - su generates incorrect log entries + * Mon Sep 9 2013 Karel Zak 2.23.2-3 - refresh and rename patches - fix #987787 - Remove lastlogin from su From 636ae6f91d10ceba72af715223e44b37e08bb890 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 27 Sep 2013 15:09:27 +0200 Subject: [PATCH 158/425] 2.24-0.1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + 2.24-agetty-clocal.patch | 149 ------------------ 2.24-libfdisk-fix-SIGFPE.patch | 39 ----- ...nicalize-for-conversion-from-loopdev.patch | 39 ----- 2.24-su-fix-lastlog-and-btmp-logging.patch | 47 ------ 2.24-su-suppress-PAM-info-messages.patch | 48 ------ 2.24-tests-portability.patch | 37 ----- sources | 2 +- util-linux.spec | 63 +++++--- 9 files changed, 44 insertions(+), 381 deletions(-) delete mode 100644 2.24-agetty-clocal.patch delete mode 100644 2.24-libfdisk-fix-SIGFPE.patch delete mode 100644 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch delete mode 100644 2.24-su-fix-lastlog-and-btmp-logging.patch delete mode 100644 2.24-su-suppress-PAM-info-messages.patch delete mode 100644 2.24-tests-portability.patch diff --git a/.gitignore b/.gitignore index bc6174a..a715348 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /util-linux-2.23.tar.xz /util-linux-2.23.1.tar.xz /util-linux-2.23.2.tar.xz +/util-linux-2.24-rc1.tar.xz diff --git a/2.24-agetty-clocal.patch b/2.24-agetty-clocal.patch deleted file mode 100644 index c7e6f66..0000000 --- a/2.24-agetty-clocal.patch +++ /dev/null @@ -1,149 +0,0 @@ -diff -up util-linux-2.23.2/term-utils/agetty.c.kzak util-linux-2.23.2/term-utils/agetty.c ---- util-linux-2.23.2/term-utils/agetty.c.kzak 2013-07-30 11:14:18.124912322 +0200 -+++ util-linux-2.23.2/term-utils/agetty.c 2013-09-09 09:07:46.406689270 +0200 -@@ -132,13 +132,20 @@ struct options { - int delay; /* Sleep seconds before prompt */ - int nice; /* Run login with this priority */ - int numspeed; /* number of baud rates to try */ -+ int clocal; /* CLOCAL_MODE_* */ - speed_t speeds[MAX_SPEED]; /* baud rates to be tried */ - }; - -+enum { -+ CLOCAL_MODE_AUTO = 0, -+ CLOCAL_MODE_ALWAYS, -+ CLOCAL_MODE_NEVER -+}; -+ - #define F_PARSE (1<<0) /* process modem status messages */ - #define F_ISSUE (1<<1) /* display /etc/issue */ - #define F_RTSCTS (1<<2) /* enable RTS/CTS flow control */ --#define F_LOCAL (1<<3) /* force local */ -+ - #define F_INITSTRING (1<<4) /* initstring is set */ - #define F_WAITCRLF (1<<5) /* wait for CR or LF */ - #define F_CUSTISSUE (1<<6) /* give alternative issue file */ -@@ -235,10 +242,13 @@ static void login_options_to_argv(char * - static char *fakehost; - - #ifdef DEBUGGING --#define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) -+# ifndef DEBUG_OUTPUT -+# define DEBUG_OUTPUT "/dev/ttyp0" -+# endif -+# define debug(s) do { fprintf(dbf,s); fflush(dbf); } while (0) - FILE *dbf; - #else --#define debug(s) do { ; } while (0) -+# define debug(s) do { ; } while (0) - #endif - - int main(int argc, char **argv) -@@ -270,7 +280,7 @@ int main(int argc, char **argv) - sigaction(SIGINT, &sa, &sa_int); - - #ifdef DEBUGGING -- dbf = fopen("/dev/ttyp0", "w"); -+ dbf = fopen(DEBUG_OUTPUT, "w"); - for (int i = 1; i < argc; i++) - debug(argv[i]); - #endif /* DEBUGGING */ -@@ -311,8 +321,10 @@ int main(int argc, char **argv) - strlen(options.initstring)); - } - -- if (!serial_tty_option(&options, F_LOCAL)) -- /* Go to blocking write mode unless -L is specified. */ -+ if (options.flags & F_VCONSOLE || options.clocal != CLOCAL_MODE_ALWAYS) -+ /* Go to blocking mode unless -L is specified, this change -+ * affects stdout, stdin and stderr as all the file descriptors -+ * are created by dup(). */ - fcntl(STDOUT_FILENO, F_SETFL, - fcntl(STDOUT_FILENO, F_GETFL, 0) & ~O_NONBLOCK); - -@@ -420,6 +432,12 @@ int main(int argc, char **argv) - options.tty); - } - -+#ifdef DEBUGGING -+ fprintf(dbf, "read %c\n", ch); -+ if (close_stream(dbf) != 0) -+ log_err("write failed: %s", DEBUG_OUTPUT); -+#endif -+ - /* Let the login program take care of password validation. */ - execv(options.login, login_argv); - log_err(_("%s: can't exec %s: %m"), options.tty, login_argv[0]); -@@ -534,7 +552,7 @@ static void parse_args(int argc, char ** - { "init-string", required_argument, 0, 'I' }, - { "noclear", no_argument, 0, 'J' }, - { "login-program", required_argument, 0, 'l' }, -- { "local-line", no_argument, 0, 'L' }, -+ { "local-line", optional_argument, 0, 'L' }, - { "extract-baud", no_argument, 0, 'm' }, - { "skip-login", no_argument, 0, 'n' }, - { "nonewline", no_argument, 0, 'N' }, -@@ -603,7 +621,18 @@ static void parse_args(int argc, char ** - op->login = optarg; - break; - case 'L': -- op->flags |= F_LOCAL; -+ /* -L and -L=always have the same meaning */ -+ op->clocal = CLOCAL_MODE_ALWAYS; -+ if (optarg) { -+ if (strcmp(optarg, "=always") == 0) -+ op->clocal = CLOCAL_MODE_ALWAYS; -+ else if (strcmp(optarg, "=never") == 0) -+ op->clocal = CLOCAL_MODE_NEVER; -+ else if (strcmp(optarg, "=auto") == 0) -+ op->clocal = CLOCAL_MODE_AUTO; -+ else -+ log_err(_("unssuported --local-line mode argument")); -+ } - break; - case 'm': - op->flags |= F_PARSE; -@@ -1090,8 +1119,19 @@ static void termio_init(struct options * - cfsetispeed(tp, ispeed); - cfsetospeed(tp, ospeed); - -- if (op->flags & F_LOCAL) -- tp->c_cflag |= CLOCAL; -+ /* The default is to follow setting from kernel, but it's possible -+ * to explicitly remove/add CLOCAL flag by -L[=]*/ -+ switch (op->clocal) { -+ case CLOCAL_MODE_ALWAYS: -+ tp->c_cflag |= CLOCAL; /* -L or -L=always */ -+ break; -+ case CLOCAL_MODE_NEVER: -+ tp->c_cflag &= ~CLOCAL; /* -L=never */ -+ break; -+ case CLOCAL_MODE_AUTO: /* -L=auto */ -+ break; -+ } -+ - #ifdef HAVE_STRUCT_TERMIOS_C_LINE - tp->c_line = 0; - #endif -@@ -1412,9 +1452,10 @@ static char *get_logname(struct options - - if (read(STDIN_FILENO, &c, 1) < 1) { - -- /* Do not report trivial like EINTR/EIO errors. */ -+ /* The terminal could be open with O_NONBLOCK when -+ * -L (force CLOCAL) is specified... */ - if (errno == EINTR || errno == EAGAIN) { -- usleep(1000); -+ usleep(250000); - continue; - } - switch (errno) { -@@ -1648,7 +1689,7 @@ static void __attribute__ ((__noreturn__ - fputs(_(" -i, --noissue do not display issue file\n"), out); - fputs(_(" -I, --init-string set init string\n"), out); - fputs(_(" -l, --login-program specify login program\n"), out); -- fputs(_(" -L, --local-line force local line\n"), out); -+ fputs(_(" -L, --local-line[=] cotrol local line flag\n"), out); - fputs(_(" -m, --extract-baud extract baud rate during connect\n"), out); - fputs(_(" -n, --skip-login do not prompt for login\n"), out); - fputs(_(" -o, --login-options options that are passed to login\n"), out); diff --git a/2.24-libfdisk-fix-SIGFPE.patch b/2.24-libfdisk-fix-SIGFPE.patch deleted file mode 100644 index 7ed13cc..0000000 --- a/2.24-libfdisk-fix-SIGFPE.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 44baaedaffee029dca76796b933412d97a19dff6 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 9 Sep 2013 10:57:50 +0200 -Subject: [PATCH] libfdisk: fix SIGFPE - - #0 recount_geometry at libfdisk/src/alignment.c:143 - #1 fdisk_discover_geometry at libfdisk/src/alignment.c:205 - #2 fdisk_context_assign_device at libfdisk/src/context.c:173 - #3 print_partition_table_from_option at fdisks/fdisk.c:924 - -References: https://bugzilla.redhat.com/show_bug.cgi?id=1005566 -Signed-off-by: Karel Zak ---- - libfdisk/src/alignment.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/libfdisk/src/alignment.c b/libfdisk/src/alignment.c -index ac44e73..4d4ab48 100644 ---- a/libfdisk/src/alignment.c -+++ b/libfdisk/src/alignment.c -@@ -193,11 +193,12 @@ int fdisk_discover_geometry(struct fdisk_context *cxt) - - /* what the kernel/bios thinks the geometry is */ - blkdev_get_geometry(cxt->dev_fd, &h, &s); -- if (!h && !s) { -- /* unable to discover geometry, use default values */ -- s = 63; -+ -+ /* defaults */ -+ if (!h) - h = 255; -- } -+ if (!s) -+ s = 63; - - /* obtained heads and sectors */ - cxt->geom.heads = h; --- -1.8.1.4 diff --git a/2.24-libmount-canonicalize-for-conversion-from-loopdev.patch b/2.24-libmount-canonicalize-for-conversion-from-loopdev.patch deleted file mode 100644 index 9778ec5..0000000 --- a/2.24-libmount-canonicalize-for-conversion-from-loopdev.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3f420a49dd4d0c413b635dd621aa34eebce2d3d2 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 5 Aug 2013 13:58:01 +0200 -Subject: [PATCH] libmount: canonicalize for conversion from loopdev backing - file - - # mount foo.img /mnt - # umount foo.img - umount: foo.img: not mounted - -The loopdev code (and sysfs backing_file) uses absolute paths, but -libmount does not canonicalize the path before lookup for the backing file. - -References: https://bugzilla.redhat.com/show_bug.cgi?id=950497 -Signed-off-by: Karel Zak ---- - libmount/src/context_umount.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c -index 2b791c4..b02902c 100644 ---- a/libmount/src/context_umount.c -+++ b/libmount/src/context_umount.c -@@ -161,7 +161,12 @@ try_loopdev: - struct stat st; - - if (stat(tgt, &st) == 0 && S_ISREG(st.st_mode)) { -- int count = loopdev_count_by_backing_file(tgt, &loopdev); -+ int count; -+ -+ cn_tgt = mnt_resolve_path(tgt, cache); -+ count = loopdev_count_by_backing_file(cn_tgt, &loopdev); -+ if (!cache) -+ free(cn_tgt); - if (count == 1) { - DBG(CXT, mnt_debug_h(cxt, - "umount: %s --> %s (retry)", tgt, loopdev)); --- -1.8.1.4 diff --git a/2.24-su-fix-lastlog-and-btmp-logging.patch b/2.24-su-fix-lastlog-and-btmp-logging.patch deleted file mode 100644 index db423e1..0000000 --- a/2.24-su-fix-lastlog-and-btmp-logging.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 9b5dc4cb8d5d82c31c0cda898832998c21afc303 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 9 Sep 2013 12:24:01 +0200 -Subject: [PATCH] su: fix lastlog and btmp logging - -The su(1) logging code mix ups "old" and "new" passwd structs. The -result is things like - - Sep 9 11:50:45 x2 su: (to kzak) kzak on none - -in /var/log/messages. The right log entry is - - Sep 9 11:50:45 x2 su: (to root) kzak on pts/3 - -The bug has been introduced by commit c74a7af17c7a176c358dfaa8e1814786c89ebc14. - -References: https://bugzilla.redhat.com/show_bug.cgi?id=1005194 -Signed-off-by: Karel Zak ---- - login-utils/su-common.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index ade5c92..858af01 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -161,7 +161,7 @@ log_syslog(struct passwd const *pw, bool successful) - old_user = pwd ? pwd->pw_name : ""; - } - -- if (get_terminal_name(STDERR_FILENO, NULL, &tty, NULL) == 0 && tty) -+ if (get_terminal_name(STDERR_FILENO, NULL, &tty, NULL) != 0 || !tty) - tty = "none"; - - openlog (program_invocation_short_name, 0 , LOG_AUTH); -@@ -483,9 +483,6 @@ authenticate (const struct passwd *pw) - - done: - -- if (lpw && lpw->pw_name) -- pw = lpw; -- - log_syslog(pw, !is_pam_failure(retval)); - - if (is_pam_failure(retval)) --- -1.8.1.4 diff --git a/2.24-su-suppress-PAM-info-messages.patch b/2.24-su-suppress-PAM-info-messages.patch deleted file mode 100644 index 3b54521..0000000 --- a/2.24-su-suppress-PAM-info-messages.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -up util-linux-2.23.2/login-utils/su-common.c.kzak util-linux-2.23.2/login-utils/su-common.c ---- util-linux-2.23.2/login-utils/su-common.c.kzak 2013-07-30 10:39:26.223738407 +0200 -+++ util-linux-2.23.2/login-utils/su-common.c 2013-09-09 09:32:05.497238691 +0200 -@@ -111,6 +111,9 @@ static int same_session = 0; - /* SU_MODE_{RUNUSER,SU} */ - static int su_mode; - -+/* Don't print PAM info messages (Last login, etc.). */ -+static int suppress_pam_info; -+ - static bool _pam_session_opened; - static bool _pam_cred_established; - static sig_atomic_t volatile caught_signal = false; -@@ -208,10 +211,23 @@ static void log_btmp(struct passwd const - updwtmp(_PATH_BTMP, &ut); - } - -+ -+static int su_pam_conv(int num_msg, const struct pam_message **msg, -+ struct pam_response **resp, void *appdata_ptr) -+{ -+ if (suppress_pam_info -+ && num_msg == 1 -+ && msg -+ && msg[0]->msg_style == PAM_TEXT_INFO) -+ return PAM_SUCCESS; -+ -+ return misc_conv(num_msg, msg, resp, appdata_ptr); -+} -+ - static struct pam_conv conv = - { -- misc_conv, -- NULL -+ su_pam_conv, -+ NULL - }; - - static void -@@ -902,6 +918,9 @@ su_main (int argc, char **argv, int mode - - init_groups (pw, groups, num_supp_groups); - -+ if (!simulate_login || command) -+ suppress_pam_info = 1; /* don't print PAM info messages */ -+ - create_watching_parent (); - /* Now we're in the child. */ diff --git a/2.24-tests-portability.patch b/2.24-tests-portability.patch deleted file mode 100644 index d16d020..0000000 --- a/2.24-tests-portability.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up util-linux-2.23.2/tests/functions.sh.kzak util-linux-2.23.2/tests/functions.sh ---- util-linux-2.23.2/tests/functions.sh.kzak 2013-06-13 09:46:10.554651768 +0200 -+++ util-linux-2.23.2/tests/functions.sh 2013-09-09 10:01:23.355469268 +0200 -@@ -483,7 +483,7 @@ function ts_scsi_debug_init { - modprobe scsi_debug $* - [ "$?" == 0 ] || ts_die "Cannot init device" - -- DEVNAME=$(grep scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') -+ DEVNAME=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') - [ "x${DEVNAME}" == "x" ] && ts_die "Cannot find device" - - DEVICE="/dev/${DEVNAME}" -diff -up util-linux-2.23.2/tests/ts/cramfs/mkfs.kzak util-linux-2.23.2/tests/ts/cramfs/mkfs ---- util-linux-2.23.2/tests/ts/cramfs/mkfs.kzak 2013-06-13 09:46:10.557651793 +0200 -+++ util-linux-2.23.2/tests/ts/cramfs/mkfs 2013-09-09 10:01:23.355469268 +0200 -@@ -80,7 +80,7 @@ cd $TS_MOUNTPOINT - - ts_log "list the image" - export TZ='GMT-1' --ls -laR --time-style=long-iso . >> $TS_OUTPUT -+ls -laR --time-style=long-iso . | sed 's:\. : :g' >> $TS_OUTPUT - echo >> $TS_OUTPUT - - ts_log "list checksums from new data" -diff -up util-linux-2.23.2/tests/ts/libmount/context-utab.kzak util-linux-2.23.2/tests/ts/libmount/context-utab ---- util-linux-2.23.2/tests/ts/libmount/context-utab.kzak 2013-06-13 09:46:10.561651827 +0200 -+++ util-linux-2.23.2/tests/ts/libmount/context-utab 2013-09-09 10:01:23.355469268 +0200 -@@ -85,7 +85,9 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \ - echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 - ts_finalize_subtest - -+ - if [ -x "/sbin/mkfs.btrfs" ]; then -+ $TS_CMD_WIPEFS -a $DEVICE &> /dev/null - ts_log "Create filesystem [btrfs]" - /sbin/mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null - udevadm settle diff --git a/sources b/sources index ef9c1e4..4eef457 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b39fde897334a4858bb2098edcce5b3f util-linux-2.23.2.tar.xz +cd484c6c03d8c1242cc1eae9ea1f040e util-linux-2.24-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 9e17119..5a2d7bd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.23.2 -Release: 4%{?dist} +Version: 2.24 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros %define cytune_archs %{ix86} alpha %{arm} @@ -25,9 +25,10 @@ BuildRequires: libutempter-devel Buildrequires: systemd-devel Buildrequires: libuser-devel BuildRequires: libcap-ng-devel +BuildRequires: python3-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -46,8 +47,9 @@ Conflicts: coreutils < 8.20 # eject has been merged into util-linux v2.22 Obsoletes: eject <= 2.1.5 Provides: eject = 2.1.6 -# sulogin, utmpdump merged into util-linux v2.22 -Conflicts: sysvinit-tools < 2.88-8 +# sulogin, utmpdump merged into util-linux v2.22; +# last, lastb merged into util-linux v2.24 +Conflicts: sysvinit-tools < 2.88-14 # old versions of e2fsprogs contain fsck, uuidgen Conflicts: e2fsprogs < 1.41.8-5 # rename from util-linux-ng back to util-linux @@ -77,20 +79,6 @@ Requires: libmount = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# v2.24 backport: #972457 -Patch1: 2.24-agetty-clocal.patch -# v2.24 backport: #987787 - Remove lastlogin from su -Patch2: 2.24-su-suppress-PAM-info-messages.patch -# v2.24 backport: #950497 - problem umounting loop device -Patch3: 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch -# v2.24 backport: #921498 - multiple internal testsuite failures -Patch4: 2.24-tests-portability.patch -# v2.24 backport: #1005566 - recount_geometry: Process /usr/sbin/fdisk was killed by signal 8 (SIGFPE) -Patch5: 2.24-libfdisk-fix-SIGFPE.patch -# v2.24 backport: #1005194 - su generates incorrect log entries -Patch6: 2.24-su-fix-lastlog-and-btmp-logging.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -201,6 +189,18 @@ uniqueness of time-based UUID generation even at very high rates on SMP systems. +%package -n python3-libmount +Summary: Python bindings for the libmount library +Group: Development/Libraries +Requires: libmount = %{version}-%{release} + +%description -n python3-libmount +The libmount-python package contains a module that permits applications +written in the Python programming language to use the interface +supplied by the libmount library to work with mount tables (fstab, +mountinfo, etc) and mount filesystems. + + %prep %setup -q -n %{name}-%{upstream_version} cp %{SOURCE8} %{SOURCE9} . @@ -218,13 +218,13 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ --disable-silent-rules \ - --disable-wall \ --disable-bfs \ --disable-pg \ --enable-socket-activation \ --enable-chfn-chsh \ --enable-write \ --enable-raw \ + --with-python=3 \ --with-udev \ --with-selinux \ --with-audit \ @@ -288,6 +288,8 @@ install -d ${RPM_BUILD_ROOT}/var/lib/libuuid # libtool junk rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a %ifarch %{sparc} rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid @@ -477,12 +479,15 @@ fi %{_bindir}/ipcs %{_bindir}/isosize %{_bindir}/kill +%{_bindir}/last +%{_bindir}/lastb %{_bindir}/logger %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu %{_bindir}/lslocks %{_bindir}/mcookie +%{_bindir}/mesg %{_bindir}/more %{_bindir}/mountpoint %{_bindir}/namei @@ -504,6 +509,7 @@ fi %{_bindir}/unshare %{_bindir}/utmpdump %{_bindir}/uuidgen +%{_bindir}/wall %{_bindir}/wdctl %{_bindir}/whereis %{_mandir}/man1/cal.1* @@ -525,11 +531,14 @@ fi %{_mandir}/man1/ipcrm.1* %{_mandir}/man1/ipcs.1* %{_mandir}/man1/kill.1* +%{_mandir}/man1/last.1* +%{_mandir}/man1/lastb.1* %{_mandir}/man1/logger.1* %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* %{_mandir}/man1/mcookie.1* +%{_mandir}/man1/mesg.1* %{_mandir}/man1/more.1* %{_mandir}/man1/mountpoint.1* %{_mandir}/man1/namei.1* @@ -551,6 +560,7 @@ fi %{_mandir}/man1/unshare.1* %{_mandir}/man1/utmpdump.1.gz %{_mandir}/man1/uuidgen.1* +%{_mandir}/man1/wall.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* %{_mandir}/man5/fstab.5* @@ -672,6 +682,7 @@ fi %{compldir}/lscpu %{compldir}/lslocks %{compldir}/mcookie +%{compldir}/mesg %{compldir}/mkfs %{compldir}/mkfs.cramfs %{compldir}/mkfs.minix @@ -706,6 +717,7 @@ fi %{compldir}/unshare %{compldir}/utmpdump %{compldir}/uuidgen +%{compldir}/wall %{compldir}/wdctl %{compldir}/whereis %{compldir}/wipefs @@ -805,7 +817,16 @@ fi %{_mandir}/man3/uuid_unparse.3* %{_libdir}/pkgconfig/uuid.pc +%files -n python3-libmount +%defattr(-, root, root) +%doc libmount/COPYING +%{_libdir}/python*/site-packages/libmount/* + %changelog +* Fri Sep 27 2013 Karel Zak 2.24-0.1 +- upgrade to upstream release v2.24-rc1 +- add python3 libmount binding + * Mon Sep 9 2013 Karel Zak 2.23.2-4 - fix #1005566 - recount_geometry: Process /usr/sbin/fdisk was killed by signal 8 (SIGFPE) - fix #1005194 - su generates incorrect log entries From 3c3df501f7a15280b0170018108ad2c14d50a046 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 23 Oct 2013 12:22:38 +0200 Subject: [PATCH 159/425] 2.24-1: upgrade, #1022217, nologin --- .gitignore | 1 + 2.25-libfdisk-gpt-recovery.patch | 122 +++++++++++++++++++++++++++++++ nologin.8 | 63 ---------------- nologin.c | 58 --------------- sources | 2 +- util-linux.spec | 30 ++++---- 6 files changed, 137 insertions(+), 139 deletions(-) create mode 100644 2.25-libfdisk-gpt-recovery.patch delete mode 100644 nologin.8 delete mode 100644 nologin.c diff --git a/.gitignore b/.gitignore index a715348..e9cb6f9 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /util-linux-2.23.1.tar.xz /util-linux-2.23.2.tar.xz /util-linux-2.24-rc1.tar.xz +/util-linux-2.24.tar.xz diff --git a/2.25-libfdisk-gpt-recovery.patch b/2.25-libfdisk-gpt-recovery.patch new file mode 100644 index 0000000..02863a2 --- /dev/null +++ b/2.25-libfdisk-gpt-recovery.patch @@ -0,0 +1,122 @@ +diff -up util-linux-2.24/libfdisk/src/gpt.c.kzak util-linux-2.24/libfdisk/src/gpt.c +--- util-linux-2.24/libfdisk/src/gpt.c.kzak 2013-10-21 13:03:38.782957983 +0200 ++++ util-linux-2.24/libfdisk/src/gpt.c 2013-10-23 12:16:01.062783977 +0200 +@@ -410,6 +410,46 @@ static int gpt_mknew_header_from_bkp(str + return 0; + } + ++static struct gpt_header *gpt_copy_header(struct fdisk_context *cxt, ++ struct gpt_header *src) ++{ ++ struct gpt_header *res; ++ ++ if (!cxt || !src) ++ return NULL; ++ ++ res = calloc(1, sizeof(*res)); ++ if (!res) { ++ fdisk_warn(cxt, _("failed to allocate GPT header")); ++ return NULL; ++ } ++ ++ res->my_lba = src->alternative_lba; ++ res->alternative_lba = src->my_lba; ++ ++ res->signature = src->signature; ++ res->revision = src->revision; ++ res->size = src->size; ++ res->npartition_entries = src->npartition_entries; ++ res->sizeof_partition_entry = src->sizeof_partition_entry; ++ res->first_usable_lba = src->first_usable_lba; ++ res->last_usable_lba = src->last_usable_lba; ++ ++ memcpy(&res->disk_guid, &src->disk_guid, sizeof(src->disk_guid)); ++ ++ ++ if (res->my_lba == GPT_PRIMARY_PARTITION_TABLE_LBA) ++ res->partition_entry_lba = cpu_to_le64(2); ++ else { ++ uint64_t esz = le32_to_cpu(src->npartition_entries) * sizeof(struct gpt_entry); ++ uint64_t esects = (esz + cxt->sector_size - 1) / cxt->sector_size; ++ ++ res->partition_entry_lba = cpu_to_le64(cxt->total_sectors - 1 - esects); ++ } ++ ++ return res; ++} ++ + /* + * Builds a clean new GPT header (currently under revision 1.0). + * +@@ -776,10 +816,13 @@ static struct gpt_header *gpt_read_heade + else + free(ents); + ++ DBG(LABEL, dbgprint("found valid GPT Header on LBA %ju", lba)); + return header; + invalid: + free(header); + free(ents); ++ ++ DBG(LABEL, dbgprint("read GPT Header on LBA %ju failed", lba)); + return NULL; + } + +@@ -1091,6 +1134,8 @@ static int gpt_probe_label(struct fdisk_ + + gpt = self_label(cxt); + ++ /* TODO: it would be nice to support scenario when GPT headers are OK, ++ * but PMBR is corrupt */ + mbr_type = valid_pmbr(cxt); + if (!mbr_type) + goto failed; +@@ -1102,20 +1147,36 @@ static int gpt_probe_label(struct fdisk_ + gpt->pheader = gpt_read_header(cxt, GPT_PRIMARY_PARTITION_TABLE_LBA, + &gpt->ents); + +- /* +- * TODO: If the primary GPT is corrupt, we must check the last LBA of the +- * device to see if it has a valid GPT Header and point to a valid GPT +- * Partition Entry Array. +- * If it points to a valid GPT Partition Entry Array, then software should +- * restore the primary GPT if allowed by platform policy settings. +- * +- * For now we just abort GPT probing! +- */ +- if (!gpt->pheader || !gpt->ents) ++ if (gpt->pheader) ++ /* primary OK, try backup from alternative LBA */ ++ gpt->bheader = gpt_read_header(cxt, ++ le64_to_cpu(gpt->pheader->alternative_lba), ++ NULL); ++ else ++ /* primary corrupted -- try last LBA */ ++ gpt->bheader = gpt_read_header(cxt, last_lba(cxt), &gpt->ents); ++ ++ if (!gpt->pheader && !gpt->bheader) + goto failed; + +- /* OK, probing passed, now initialize backup header and fdisk variables. */ +- gpt->bheader = gpt_read_header(cxt, last_lba(cxt), NULL); ++ /* primary OK, backup corrupted -- recovery */ ++ if (gpt->pheader && !gpt->bheader) { ++ fdisk_warnx(cxt, _("The backup GPT table is corrupt, but the " ++ "primary appears OK, so that will be used.")); ++ gpt->bheader = gpt_copy_header(cxt, gpt->pheader); ++ if (!gpt->bheader) ++ goto failed; ++ gpt_recompute_crc(gpt->bheader, gpt->ents); ++ ++ /* primary corrupted, backup OK -- recovery */ ++ } else if (!gpt->pheader && gpt->bheader) { ++ fdisk_warnx(cxt, _("The primary GPT table is corrupt, but the " ++ "backup appears OK, so that will be used.")); ++ gpt->pheader = gpt_copy_header(cxt, gpt->bheader); ++ if (!gpt->pheader) ++ goto failed; ++ gpt_recompute_crc(gpt->pheader, gpt->ents); ++ } + + cxt->label->nparts_max = le32_to_cpu(gpt->pheader->npartition_entries); + cxt->label->nparts_cur = partitions_in_use(gpt->pheader, gpt->ents); 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 index 4eef457..d70890c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd484c6c03d8c1242cc1eae9ea1f040e util-linux-2.24-rc1.tar.xz +4fac6443427f575fc5f3531a4ad2ca01 util-linux-2.24.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 5a2d7bd..072706c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc1 +%define upstream_version %{version} ### Macros %define cytune_archs %{ix86} alpha %{arm} @@ -33,8 +33,6 @@ Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd Source4: util-linux-60-raw.rules -Source8: nologin.c -Source9: nologin.8 Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd @@ -79,6 +77,9 @@ Requires: libmount = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# backport from v2.25: 1022217 - fdisk mishandles GPT corruption +Patch1: 2.25-libfdisk-gpt-recovery.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -203,7 +204,6 @@ mountinfo, etc) and mount filesystems. %prep %setup -q -n %{name}-%{upstream_version} -cp %{SOURCE8} %{SOURCE9} . for p in %{patches}; do %{__patch} -p1 -F%{_default_patch_fuzz} -i "$p" @@ -241,10 +241,6 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" # build util-linux make %{?_smp_mflags} -# build nologin -gcc $CFLAGS -o nologin nologin.c - - %check #to run tests use "--with check" %if %{?_with_check:1}%{!?_with_check:0} @@ -265,10 +261,6 @@ chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog # install util-linux make install DESTDIR=${RPM_BUILD_ROOT} -# install nologin -install -m 755 nologin ${RPM_BUILD_ROOT}%{_sbindir} -install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 - # raw echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 { @@ -339,14 +331,13 @@ for I in /sbin/sfdisk \ done %endif -# we install getopt-*.{bash,tcsh} as doc files +# we install getopt-*.{bash,tcsh} by %doc directive chmod 644 misc-utils/getopt-*.{bash,tcsh} -rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/* -rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt +rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* +rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt ln -sf /proc/mounts %{buildroot}/etc/mtab - # remove static libs rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a @@ -823,6 +814,11 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Oct 23 2013 Karel Zak 2.24-1 +- upgrade to upstream release v2.24 +- remove nologin (merged upstream) +- fix #1022217 - fdisk mishandles GPT corruption + * Fri Sep 27 2013 Karel Zak 2.24-0.1 - upgrade to upstream release v2.24-rc1 - add python3 libmount binding From 120f8c135118f9ae5240005ab0e102f8d489bedb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 18 Nov 2013 11:38:33 +0100 Subject: [PATCH 160/425] 2.24-2: #1031262 --- 2.25-lsblk-D-segfault.patch | 45 +++++++++++++++++++++++++++++++++++++ util-linux.spec | 7 +++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 2.25-lsblk-D-segfault.patch diff --git a/2.25-lsblk-D-segfault.patch b/2.25-lsblk-D-segfault.patch new file mode 100644 index 0000000..b8d0531 --- /dev/null +++ b/2.25-lsblk-D-segfault.patch @@ -0,0 +1,45 @@ +From 71d842c01992b3678de4da4773ed54f08c0ab4f6 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 18 Nov 2013 11:27:35 +0100 +Subject: [PATCH] lsblk: fix -D segfault + +References: https://bugzilla.redhat.com/show_bug.cgi?id=1031262 +Signed-off-by: Karel Zak +--- + misc-utils/lsblk.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index 9f7f1b6..9b53be3 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -903,7 +903,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line + if (cxt->discard && p) + tt_line_set_data(ln, col, p); + else +- tt_line_set_data(ln, col, "0"); ++ tt_line_set_data(ln, col, xstrdup("0")); + break; + case COL_DGRAN: + if (lsblk->bytes) +@@ -936,7 +936,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line + if (cxt->discard && p) + tt_line_set_data(ln, col, p); + else +- tt_line_set_data(ln, col, "0"); ++ tt_line_set_data(ln, col, xstrdup("0")); + break; + case COL_WSAME: + if (lsblk->bytes) +@@ -948,7 +948,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line + "queue/write_same_max_bytes", &x) == 0) + p = size_to_human_string(SIZE_SUFFIX_1LETTER, x); + } +- tt_line_set_data(ln, col, p ? p : "0"); ++ tt_line_set_data(ln, col, p ? p : xstrdup("0")); + break; + }; + } +-- +1.8.3.1 + diff --git a/util-linux.spec b/util-linux.spec index 072706c..d2ad458 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -79,6 +79,8 @@ Patch0: 2.23-login-lastlog-create.patch # backport from v2.25: 1022217 - fdisk mishandles GPT corruption Patch1: 2.25-libfdisk-gpt-recovery.patch +# backport from v2.25 (or v2.24.1) #1031262 - lsblk -D segfault +Patch2: 2.25-lsblk-D-segfault.patch %description The util-linux package contains a large variety of low-level system @@ -814,6 +816,9 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Nov 18 2013 Karel Zak 2.24-2 +- fix #1031262 - lsblk -D segfault + * Wed Oct 23 2013 Karel Zak 2.24-1 - upgrade to upstream release v2.24 - remove nologin (merged upstream) From ea09323fa77bb8ded4ab66cb9f85f4a4c5ad23f8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 21 Jan 2014 09:54:54 +0100 Subject: [PATCH 161/425] 2.24.1: upgrade --- .gitignore | 1 + 2.25-libfdisk-gpt-recovery.patch | 122 ------------------------------- 2.25-lsblk-D-segfault.patch | 45 ------------ sources | 2 +- util-linux.spec | 13 ++-- 5 files changed, 8 insertions(+), 175 deletions(-) delete mode 100644 2.25-libfdisk-gpt-recovery.patch delete mode 100644 2.25-lsblk-D-segfault.patch diff --git a/.gitignore b/.gitignore index e9cb6f9..1431adf 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /util-linux-2.23.2.tar.xz /util-linux-2.24-rc1.tar.xz /util-linux-2.24.tar.xz +/util-linux-2.24.1.tar.xz diff --git a/2.25-libfdisk-gpt-recovery.patch b/2.25-libfdisk-gpt-recovery.patch deleted file mode 100644 index 02863a2..0000000 --- a/2.25-libfdisk-gpt-recovery.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -up util-linux-2.24/libfdisk/src/gpt.c.kzak util-linux-2.24/libfdisk/src/gpt.c ---- util-linux-2.24/libfdisk/src/gpt.c.kzak 2013-10-21 13:03:38.782957983 +0200 -+++ util-linux-2.24/libfdisk/src/gpt.c 2013-10-23 12:16:01.062783977 +0200 -@@ -410,6 +410,46 @@ static int gpt_mknew_header_from_bkp(str - return 0; - } - -+static struct gpt_header *gpt_copy_header(struct fdisk_context *cxt, -+ struct gpt_header *src) -+{ -+ struct gpt_header *res; -+ -+ if (!cxt || !src) -+ return NULL; -+ -+ res = calloc(1, sizeof(*res)); -+ if (!res) { -+ fdisk_warn(cxt, _("failed to allocate GPT header")); -+ return NULL; -+ } -+ -+ res->my_lba = src->alternative_lba; -+ res->alternative_lba = src->my_lba; -+ -+ res->signature = src->signature; -+ res->revision = src->revision; -+ res->size = src->size; -+ res->npartition_entries = src->npartition_entries; -+ res->sizeof_partition_entry = src->sizeof_partition_entry; -+ res->first_usable_lba = src->first_usable_lba; -+ res->last_usable_lba = src->last_usable_lba; -+ -+ memcpy(&res->disk_guid, &src->disk_guid, sizeof(src->disk_guid)); -+ -+ -+ if (res->my_lba == GPT_PRIMARY_PARTITION_TABLE_LBA) -+ res->partition_entry_lba = cpu_to_le64(2); -+ else { -+ uint64_t esz = le32_to_cpu(src->npartition_entries) * sizeof(struct gpt_entry); -+ uint64_t esects = (esz + cxt->sector_size - 1) / cxt->sector_size; -+ -+ res->partition_entry_lba = cpu_to_le64(cxt->total_sectors - 1 - esects); -+ } -+ -+ return res; -+} -+ - /* - * Builds a clean new GPT header (currently under revision 1.0). - * -@@ -776,10 +816,13 @@ static struct gpt_header *gpt_read_heade - else - free(ents); - -+ DBG(LABEL, dbgprint("found valid GPT Header on LBA %ju", lba)); - return header; - invalid: - free(header); - free(ents); -+ -+ DBG(LABEL, dbgprint("read GPT Header on LBA %ju failed", lba)); - return NULL; - } - -@@ -1091,6 +1134,8 @@ static int gpt_probe_label(struct fdisk_ - - gpt = self_label(cxt); - -+ /* TODO: it would be nice to support scenario when GPT headers are OK, -+ * but PMBR is corrupt */ - mbr_type = valid_pmbr(cxt); - if (!mbr_type) - goto failed; -@@ -1102,20 +1147,36 @@ static int gpt_probe_label(struct fdisk_ - gpt->pheader = gpt_read_header(cxt, GPT_PRIMARY_PARTITION_TABLE_LBA, - &gpt->ents); - -- /* -- * TODO: If the primary GPT is corrupt, we must check the last LBA of the -- * device to see if it has a valid GPT Header and point to a valid GPT -- * Partition Entry Array. -- * If it points to a valid GPT Partition Entry Array, then software should -- * restore the primary GPT if allowed by platform policy settings. -- * -- * For now we just abort GPT probing! -- */ -- if (!gpt->pheader || !gpt->ents) -+ if (gpt->pheader) -+ /* primary OK, try backup from alternative LBA */ -+ gpt->bheader = gpt_read_header(cxt, -+ le64_to_cpu(gpt->pheader->alternative_lba), -+ NULL); -+ else -+ /* primary corrupted -- try last LBA */ -+ gpt->bheader = gpt_read_header(cxt, last_lba(cxt), &gpt->ents); -+ -+ if (!gpt->pheader && !gpt->bheader) - goto failed; - -- /* OK, probing passed, now initialize backup header and fdisk variables. */ -- gpt->bheader = gpt_read_header(cxt, last_lba(cxt), NULL); -+ /* primary OK, backup corrupted -- recovery */ -+ if (gpt->pheader && !gpt->bheader) { -+ fdisk_warnx(cxt, _("The backup GPT table is corrupt, but the " -+ "primary appears OK, so that will be used.")); -+ gpt->bheader = gpt_copy_header(cxt, gpt->pheader); -+ if (!gpt->bheader) -+ goto failed; -+ gpt_recompute_crc(gpt->bheader, gpt->ents); -+ -+ /* primary corrupted, backup OK -- recovery */ -+ } else if (!gpt->pheader && gpt->bheader) { -+ fdisk_warnx(cxt, _("The primary GPT table is corrupt, but the " -+ "backup appears OK, so that will be used.")); -+ gpt->pheader = gpt_copy_header(cxt, gpt->bheader); -+ if (!gpt->pheader) -+ goto failed; -+ gpt_recompute_crc(gpt->pheader, gpt->ents); -+ } - - cxt->label->nparts_max = le32_to_cpu(gpt->pheader->npartition_entries); - cxt->label->nparts_cur = partitions_in_use(gpt->pheader, gpt->ents); diff --git a/2.25-lsblk-D-segfault.patch b/2.25-lsblk-D-segfault.patch deleted file mode 100644 index b8d0531..0000000 --- a/2.25-lsblk-D-segfault.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 71d842c01992b3678de4da4773ed54f08c0ab4f6 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 18 Nov 2013 11:27:35 +0100 -Subject: [PATCH] lsblk: fix -D segfault - -References: https://bugzilla.redhat.com/show_bug.cgi?id=1031262 -Signed-off-by: Karel Zak ---- - misc-utils/lsblk.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index 9f7f1b6..9b53be3 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -903,7 +903,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line - if (cxt->discard && p) - tt_line_set_data(ln, col, p); - else -- tt_line_set_data(ln, col, "0"); -+ tt_line_set_data(ln, col, xstrdup("0")); - break; - case COL_DGRAN: - if (lsblk->bytes) -@@ -936,7 +936,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line - if (cxt->discard && p) - tt_line_set_data(ln, col, p); - else -- tt_line_set_data(ln, col, "0"); -+ tt_line_set_data(ln, col, xstrdup("0")); - break; - case COL_WSAME: - if (lsblk->bytes) -@@ -948,7 +948,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line - "queue/write_same_max_bytes", &x) == 0) - p = size_to_human_string(SIZE_SUFFIX_1LETTER, x); - } -- tt_line_set_data(ln, col, p ? p : "0"); -+ tt_line_set_data(ln, col, p ? p : xstrdup("0")); - break; - }; - } --- -1.8.3.1 - diff --git a/sources b/sources index d70890c..814dbe5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4fac6443427f575fc5f3531a4ad2ca01 util-linux-2.24.tar.xz +88d46ae23ca599ac5af9cf96b531590f util-linux-2.24.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index d2ad458..1f09649 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.24 -Release: 2%{?dist} +Version: 2.24.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -77,11 +77,6 @@ Requires: libmount = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# backport from v2.25: 1022217 - fdisk mishandles GPT corruption -Patch1: 2.25-libfdisk-gpt-recovery.patch -# backport from v2.25 (or v2.24.1) #1031262 - lsblk -D segfault -Patch2: 2.25-lsblk-D-segfault.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -816,6 +811,10 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Jan 20 2014 Karel Zak 2.24.1-1 +- upgrade to stable release 2.24.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.1-ReleaseNotes + * Mon Nov 18 2013 Karel Zak 2.24-2 - fix #1031262 - lsblk -D segfault From aca47746daf7a25f51f2ef15a5e167c52726ca85 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 Jan 2014 09:50:54 +0100 Subject: [PATCH 162/425] 2.24.1-2: use autosetup --- util-linux.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 1f09649..4ae2aba 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -200,11 +200,7 @@ mountinfo, etc) and mount filesystems. %prep -%setup -q -n %{name}-%{upstream_version} - -for p in %{patches}; do - %{__patch} -p1 -F%{_default_patch_fuzz} -i "$p" -done +%autosetup -p1 -n %{name}-%{upstream_version} %build unset LINGUAS || : @@ -811,6 +807,9 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jan 30 2014 Karel Zak 2.24.1-2 +- use rpm autosetup + * Mon Jan 20 2014 Karel Zak 2.24.1-1 - upgrade to stable release 2.24.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.1-ReleaseNotes From 90488bdc3bbfd62be56e48d20a0a5856b8881cd0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 25 Apr 2014 10:25:56 +0200 Subject: [PATCH 163/425] 2.24.2-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1431adf..fe0f141 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /util-linux-2.24-rc1.tar.xz /util-linux-2.24.tar.xz /util-linux-2.24.1.tar.xz +/util-linux-2.24.2.tar.xz diff --git a/sources b/sources index 814dbe5..5c8b843 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -88d46ae23ca599ac5af9cf96b531590f util-linux-2.24.1.tar.xz +3f191727a0d28f7204b755cf1b6ea0aa util-linux-2.24.2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 4ae2aba..9c32fa3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.24.1 -Release: 2%{?dist} +Version: 2.24.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -807,6 +807,10 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Apr 24 2014 Karel Zak 2.24.2-1 +- upgrade to stable release 2.24.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.2-ReleaseNotes + * Thu Jan 30 2014 Karel Zak 2.24.1-2 - use rpm autosetup From d9d58da0e7085d35e81b2107a9ec3e672eba0fb5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 7 May 2014 12:29:27 +0200 Subject: [PATCH 164/425] 2.24.2-2: use systemd scriptlets --- util-linux.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 9c32fa3..c381d78 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -398,6 +398,7 @@ useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ -c "UUID generator helper daemon" uuidd exit 0 +# Please, keep uuidd running after installation! %post -n uuidd if [ $1 -eq 1 ]; then # Package install, @@ -411,10 +412,10 @@ else fi %preun -n uuidd -if [ "$1" = 0 ]; then - /bin/systemctl stop uuidd.service > /dev/null 2>&1 || : - /bin/systemctl disable uuidd.service > /dev/null 2>&1 || : -fi +%systemd_preun uuidd.service + +%postun +%systemd_postun_with_restart uuidd.service %files -f %{name}.files @@ -807,6 +808,9 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed May 7 2014 Karel Zak 2.24.2-2 +- use systemd macroized scriptlets (#850355) + * Thu Apr 24 2014 Karel Zak 2.24.2-1 - upgrade to stable release 2.24.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.2-ReleaseNotes From f708bc4f814bac035ff56586eb82c5f1418f7d65 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 7 May 2014 12:33:19 +0200 Subject: [PATCH 165/425] 2.24.2-2: add missing -n uuidd --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index c381d78..b496f3c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -414,7 +414,7 @@ fi %preun -n uuidd %systemd_preun uuidd.service -%postun +%postun -n uuidd %systemd_postun_with_restart uuidd.service From ec1e4fccb352dd9a0b99fe0d892a10e327ae2f4b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 May 2014 10:41:52 +0200 Subject: [PATCH 166/425] 2.24.2-3: #1090638 - remove pam_securetty.so from .pamd files --- util-linux-login.pamd | 1 - util-linux-remote.pamd | 1 - util-linux.spec | 5 ++++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/util-linux-login.pamd b/util-linux-login.pamd index 3c03927..98e30d7 100644 --- a/util-linux-login.pamd +++ b/util-linux-login.pamd @@ -1,5 +1,4 @@ #%PAM-1.0 -auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so auth substack system-auth auth include postlogin account required pam_nologin.so diff --git a/util-linux-remote.pamd b/util-linux-remote.pamd index 2f22cc2..100ec98 100644 --- a/util-linux-remote.pamd +++ b/util-linux-remote.pamd @@ -1,5 +1,4 @@ #%PAM-1.0 -auth required pam_securetty.so auth substack password-auth auth include postlogin account required pam_nologin.so diff --git a/util-linux.spec b/util-linux.spec index b496f3c..01b530d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -808,6 +808,9 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon May 12 2014 Karel Zak 2.24.2-3 +- fix #1090638 - remove pam_securetty.so from .pamd files + * Wed May 7 2014 Karel Zak 2.24.2-2 - use systemd macroized scriptlets (#850355) From a8e3fb405f6698dae6c377c176b2b08511502b50 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 May 2014 11:37:27 +0200 Subject: [PATCH 167/425] 2.24.2-4: #1094935 - use systemd_post for uuidd --- util-linux.spec | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 01b530d..08f09fa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -400,16 +400,7 @@ exit 0 # Please, keep uuidd running after installation! %post -n uuidd -if [ $1 -eq 1 ]; then - # Package install, - /bin/systemctl enable uuidd.service >/dev/null 2>&1 || : - /bin/systemctl start uuidd.service > /dev/null 2>&1 || : -else - # Package upgrade - if /bin/systemctl --quiet is-enabled uuidd.service ; then - /bin/systemctl reenable uuidd.service >/dev/null 2>&1 || : - fi -fi +%systemd_post uuidd.service %preun -n uuidd %systemd_preun uuidd.service @@ -808,6 +799,9 @@ fi %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon May 12 2014 Karel Zak 2.24.2-4 +- fix #1094935 - script and/or trigger should not directly enable systemd units + * Mon May 12 2014 Karel Zak 2.24.2-3 - fix #1090638 - remove pam_securetty.so from .pamd files From 299715637f699225c8deb8f2c3eb080697236e11 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 28 May 2014 12:25:37 +0200 Subject: [PATCH 168/425] Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 08f09fa..1d9440b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -799,6 +799,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed May 28 2014 Kalev Lember - 2.24.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + * Mon May 12 2014 Karel Zak 2.24.2-4 - fix #1094935 - script and/or trigger should not directly enable systemd units From 5c303e7460f1fdffa8879aead37f2e69ef6d204d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:08:12 -0500 Subject: [PATCH 169/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 1d9440b..ba710e3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.24.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -799,6 +799,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 2.24.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed May 28 2014 Kalev Lember - 2.24.2-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 From b06e73cfcede31b25925e357dc824649f936277c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 19 Jun 2014 14:39:55 +0200 Subject: [PATCH 170/425] 2.25-0.1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 71 ++++++++++++++++++++++++++++++++++++------------- 3 files changed, 55 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index fe0f141..3280dbf 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /util-linux-2.24.tar.xz /util-linux-2.24.1.tar.xz /util-linux-2.24.2.tar.xz +/util-linux-2.25-rc1.tar.xz diff --git a/sources b/sources index 5c8b843..221284a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3f191727a0d28f7204b755cf1b6ea0aa util-linux-2.24.2.tar.xz +fd0c219f2c2cc765a9c6a29cd96fb091 util-linux-2.25-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index ba710e3..6d1b289 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,16 +1,15 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.24.2 -Release: 6%{?dist} +Version: 2.25 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros -%define cytune_archs %{ix86} alpha %{arm} %define compldir %{_datadir}/bash-completion/completions/ ### Dependencies @@ -71,6 +70,7 @@ Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} +Requires: libsmartcols = %{version}-%{release} ### Ready for upstream? ### @@ -84,6 +84,27 @@ others, Util-linux contains the fdisk configuration tool and the login program. +%package -n libsmartcols +Summary: Formatting library for ls-like programs. +Group: Development/Libraries +License: LGPLv2+ + +%description -n libsmartcols +This is library for ls-like terminal programs, part of util-linux. + + +%package -n libsmartcols-devel +Summary: Formatting library for ls-like programs. +Group: Development/Libraries +License: LGPLv2+ +Requires: libsmartcols = %{version}-%{release} +Requires: pkgconfig + +%description -n libsmartcols-devel +This is development library and headers for ls-like terminal programs, +part of util-linux. + + %package -n libmount Summary: Device mounting library Group: Development/Libraries @@ -213,19 +234,16 @@ export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" --disable-silent-rules \ --disable-bfs \ --disable-pg \ - --enable-socket-activation \ --enable-chfn-chsh \ --enable-write \ --enable-raw \ --with-python=3 \ + --with-systemd \ --with-udev \ --with-selinux \ --with-audit \ --with-utempter \ --disable-makeinstall-chown \ -%ifnarch %cytune_archs - --disable-cytune \ -%endif %ifarch s390 s390x --disable-hwclock \ --disable-fdformat @@ -332,7 +350,7 @@ rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt ln -sf /proc/mounts %{buildroot}/etc/mtab # remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount}.a +rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols}.a # find MO files %find_lang %name @@ -342,11 +360,11 @@ 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)$" \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)$" \ -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.*" \ + -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files %post @@ -391,6 +409,9 @@ done %post -n libmount -p /sbin/ldconfig %postun -n libmount -p /sbin/ldconfig +%post -n libsmartcols -p /sbin/ldconfig +%postun -n libsmartcols -p /sbin/ldconfig + %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -462,6 +483,7 @@ exit 0 %{_bindir}/lsblk %{_bindir}/lscpu %{_bindir}/lslocks +%{_bindir}/lslogins %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/more @@ -513,6 +535,7 @@ exit 0 %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* +%{_mandir}/man1/lslogins.1* %{_mandir}/man1/mcookie.1* %{_mandir}/man1/mesg.1* %{_mandir}/man1/more.1* @@ -540,6 +563,7 @@ exit 0 %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* %{_mandir}/man5/fstab.5* +%{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* %{_mandir}/man8/agetty.8* %{_mandir}/man8/blkdiscard.8* @@ -650,6 +674,7 @@ exit 0 %{compldir}/ipcrm %{compldir}/ipcs %{compldir}/isosize +%{compldir}/last %{compldir}/ldattach %{compldir}/logger %{compldir}/look @@ -724,13 +749,6 @@ exit 0 %{_bindir}/sunhostid %endif -%ifarch %cytune_archs -%{_bindir}/cytune -%{_mandir}/man8/cytune.8* -%{compldir}/cytune -%endif - - %files -n uuidd %defattr(-,root,root) %doc Documentation/licenses/COPYING.GPLv2 @@ -742,6 +760,19 @@ exit 0 %{compldir}/uuidd +%files -n libsmartcols +%defattr(-,root,root) +%doc libsmartcols/COPYING +%{_libdir}/libsmartcols.so.* + +%files -n libsmartcols-devel +%defattr(-,root,root) +%doc libsmartcols/COPYING +%{_libdir}/libsmartcols.so +%{_includedir}/libsmartcols +%{_libdir}/pkgconfig/smartcols.pc + + %files -n libmount %defattr(-,root,root) %doc libmount/COPYING @@ -799,6 +830,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jun 19 2014 Karel Zak 2.25-0.1 +- upgrade to release 2.25-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25-ReleaseNotes + * Sun Jun 08 2014 Fedora Release Engineering - 2.24.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 594dffa0d4b91fb921f85ac02af49b80da50f51c Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 25 Jun 2014 17:18:13 -0400 Subject: [PATCH 171/425] Fix libblkid's squashfs probe return checking. Related: rhbz#1112315 --- util-linux.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 6d1b289..8701e6c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -77,6 +77,9 @@ Requires: libsmartcols = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# 1112315 - libblkid: correct the return values in squashfs probe +Patch1: util-linux-squashfs-probe.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -830,6 +833,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Jun 25 2014 Peter Jones - 2.25-0.2 +- Fix libblkid's squashfs probe return checking. + Related: rhbz#1112315 + * Thu Jun 19 2014 Karel Zak 2.25-0.1 - upgrade to release 2.25-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25-ReleaseNotes From 9016a84fbaaacff644d26d0f30b4931ca8afb551 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 25 Jun 2014 17:21:26 -0400 Subject: [PATCH 172/425] Fix libblkid's squashfs probe return checking. Related: rhbz#1112315 --- util-linux-squashfs-probe.patch | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 util-linux-squashfs-probe.patch diff --git a/util-linux-squashfs-probe.patch b/util-linux-squashfs-probe.patch new file mode 100644 index 0000000..2e3779d --- /dev/null +++ b/util-linux-squashfs-probe.patch @@ -0,0 +1,46 @@ +From cbccd7a4f8ffcded136e83fb7c3aeedc393d312d Mon Sep 17 00:00:00 2001 +From: David Shea +Date: Mon, 23 Jun 2014 13:41:48 -0400 +Subject: [PATCH] libblkid: correct the return values in squashfs probe + +Returning -1 can cause squashfs v3 detection to make v4 detection fail. + +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/squashfs.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libblkid/src/superblocks/squashfs.c b/libblkid/src/superblocks/squashfs.c +index a35d60f..8ed2838 100644 +--- a/libblkid/src/superblocks/squashfs.c ++++ b/libblkid/src/superblocks/squashfs.c +@@ -41,7 +41,7 @@ static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) + major = le16_to_cpu(sq->s_major); + minor = le16_to_cpu(sq->s_minor); + if (major < 4) +- return -1; ++ return 1; + + blkid_probe_sprintf_version(pr, "%u.%u", major, minor); + +@@ -56,7 +56,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) + + sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); + if (!sq) +- return -1; ++ return errno ? -errno : 1; + + if (strcmp(mag->magic, "sqsh") == 0) { + major = be16_to_cpu(sq->s_major); +@@ -67,7 +67,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) + } + + if (major > 3) +- return -1; ++ return 1; + + blkid_probe_sprintf_version(pr, "%u.%u", major, minor); + +-- +1.9.3 + From 4be87e9faa0c1cee57f25e830d94df49b1eeafdb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 2 Jul 2014 12:31:03 +0200 Subject: [PATCH 173/425] 2.25-0.3: upgrade to -rc2 --- .gitignore | 1 + sources | 2 +- util-linux-squashfs-probe.patch | 46 --------------------------------- util-linux.spec | 10 +++---- 4 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 util-linux-squashfs-probe.patch diff --git a/.gitignore b/.gitignore index 3280dbf..9ddb152 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ /util-linux-2.24.1.tar.xz /util-linux-2.24.2.tar.xz /util-linux-2.25-rc1.tar.xz +/util-linux-2.25-rc2.tar.xz diff --git a/sources b/sources index 221284a..24abd48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fd0c219f2c2cc765a9c6a29cd96fb091 util-linux-2.25-rc1.tar.xz +9df5663b5b302a5219c2b7ba38868071 util-linux-2.25-rc2.tar.xz diff --git a/util-linux-squashfs-probe.patch b/util-linux-squashfs-probe.patch deleted file mode 100644 index 2e3779d..0000000 --- a/util-linux-squashfs-probe.patch +++ /dev/null @@ -1,46 +0,0 @@ -From cbccd7a4f8ffcded136e83fb7c3aeedc393d312d Mon Sep 17 00:00:00 2001 -From: David Shea -Date: Mon, 23 Jun 2014 13:41:48 -0400 -Subject: [PATCH] libblkid: correct the return values in squashfs probe - -Returning -1 can cause squashfs v3 detection to make v4 detection fail. - -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/squashfs.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libblkid/src/superblocks/squashfs.c b/libblkid/src/superblocks/squashfs.c -index a35d60f..8ed2838 100644 ---- a/libblkid/src/superblocks/squashfs.c -+++ b/libblkid/src/superblocks/squashfs.c -@@ -41,7 +41,7 @@ static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag) - major = le16_to_cpu(sq->s_major); - minor = le16_to_cpu(sq->s_minor); - if (major < 4) -- return -1; -+ return 1; - - blkid_probe_sprintf_version(pr, "%u.%u", major, minor); - -@@ -56,7 +56,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) - - sq = blkid_probe_get_sb(pr, mag, struct sqsh_super_block); - if (!sq) -- return -1; -+ return errno ? -errno : 1; - - if (strcmp(mag->magic, "sqsh") == 0) { - major = be16_to_cpu(sq->s_major); -@@ -67,7 +67,7 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) - } - - if (major > 3) -- return -1; -+ return 1; - - blkid_probe_sprintf_version(pr, "%u.%u", major, minor); - --- -1.9.3 - diff --git a/util-linux.spec b/util-linux.spec index 8701e6c..48c5f4b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -77,9 +77,6 @@ Requires: libsmartcols = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# 1112315 - libblkid: correct the return values in squashfs probe -Patch1: util-linux-squashfs-probe.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -833,6 +830,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jul 02 2014 Karel Zak 2.25-0.3 +- upgrade to release 2.25-rc2 + * Wed Jun 25 2014 Peter Jones - 2.25-0.2 - Fix libblkid's squashfs probe return checking. Related: rhbz#1112315 From 1fc81bb81956f86d3375b5c6a3713d419407cb4c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 2 Jul 2014 12:35:09 +0200 Subject: [PATCH 174/425] fix changelog date --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 48c5f4b..39e53b4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -830,7 +830,7 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog -* Thu Jul 02 2014 Karel Zak 2.25-0.3 +* Wed Jul 02 2014 Karel Zak 2.25-0.3 - upgrade to release 2.25-rc2 * Wed Jun 25 2014 Peter Jones - 2.25-0.2 From 9165bd23fd5a106db254d970faeffbb984cb9e53 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 22 Jul 2014 12:30:50 +0200 Subject: [PATCH 175/425] 2.25-1: new upstream version Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9ddb152..a03239f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /util-linux-2.24.2.tar.xz /util-linux-2.25-rc1.tar.xz /util-linux-2.25-rc2.tar.xz +/util-linux-2.25.tar.xz diff --git a/sources b/sources index 24abd48..2e97c41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9df5663b5b302a5219c2b7ba38868071 util-linux-2.25-rc2.tar.xz +4c78fdef4cb882caafad61e33cafbc14 util-linux-2.25.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 39e53b4..20065a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 0.3%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -830,6 +830,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Jul 22 2014 Karel Zak 2.25-1 +- upgrade to stable release 2.25 + * Wed Jul 02 2014 Karel Zak 2.25-0.3 - upgrade to release 2.25-rc2 From 361265db38fdf52223dd545d529b196a922bccf8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 24 Jul 2014 10:34:39 +0200 Subject: [PATCH 176/425] 2.25-2: fix unit files usage with in subpackages --- util-linux.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 20065a1..561e64c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -457,6 +457,8 @@ exit 0 %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab +%{_unitdir}/fstrim.* + %{_bindir}/cal %{_bindir}/chrt %{_bindir}/col @@ -754,7 +756,7 @@ exit 0 %doc Documentation/licenses/COPYING.GPLv2 %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd -%{_unitdir}/* +%{_unitdir}/uuidd.* %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd @@ -830,6 +832,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jul 24 2014 Karel Zak 2.25-2 +- remove fstrim unit files from uuidd subpackage + * Tue Jul 22 2014 Karel Zak 2.25-1 - upgrade to stable release 2.25 From ab1e5c59d662597d550d0241c35227ea94746701 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 6 Aug 2014 13:04:29 +0200 Subject: [PATCH 177/425] fix license handling --- util-linux.spec | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 561e64c..5d8a18a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -212,6 +212,7 @@ SMP systems. Summary: Python bindings for the libmount library Group: Development/Libraries Requires: libmount = %{version}-%{release} +License: LGPLv2+ %description -n python3-libmount The libmount-python package contains a module that permits applications @@ -433,7 +434,9 @@ exit 0 %files -f %{name}.files %defattr(-,root,root) %doc README NEWS AUTHORS -%doc Documentation/deprecated.txt Documentation/licenses/* +%doc Documentation/deprecated.txt +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/* %doc misc-utils/getopt-*.{bash,tcsh} %config(noreplace) %{_sysconfdir}/pam.d/chfn @@ -753,7 +756,8 @@ exit 0 %files -n uuidd %defattr(-,root,root) -%doc Documentation/licenses/COPYING.GPLv2 +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.GPLv2 %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd %{_unitdir}/uuidd.* @@ -764,12 +768,12 @@ exit 0 %files -n libsmartcols %defattr(-,root,root) -%doc libsmartcols/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libsmartcols/COPYING %{_libdir}/libsmartcols.so.* %files -n libsmartcols-devel %defattr(-,root,root) -%doc libsmartcols/COPYING %{_libdir}/libsmartcols.so %{_includedir}/libsmartcols %{_libdir}/pkgconfig/smartcols.pc @@ -777,12 +781,12 @@ exit 0 %files -n libmount %defattr(-,root,root) -%doc libmount/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/libmount.so.* %files -n libmount-devel %defattr(-,root,root) -%doc libmount/COPYING %{_libdir}/libmount.so %{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc @@ -804,12 +808,12 @@ exit 0 %files -n libuuid %defattr(-,root,root) -%doc libuuid/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.BSD-3 libuuid/COPYING %{_libdir}/libuuid.so.* %files -n libuuid-devel %defattr(-,root,root) -%doc libuuid/COPYING %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -828,10 +832,14 @@ exit 0 %files -n python3-libmount %defattr(-, root, root) -%doc libmount/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Aug 6 2014 Tom Callaway 2.25-3 +- fix license handling + * Thu Jul 24 2014 Karel Zak 2.25-2 - remove fstrim unit files from uuidd subpackage From 5de818c896ccf1dea83cc17953a4f51b3abdd4db Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 6 Aug 2014 13:05:20 +0200 Subject: [PATCH 178/425] fix license handling --- util-linux.spec | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 561e64c..5d8a18a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -212,6 +212,7 @@ SMP systems. Summary: Python bindings for the libmount library Group: Development/Libraries Requires: libmount = %{version}-%{release} +License: LGPLv2+ %description -n python3-libmount The libmount-python package contains a module that permits applications @@ -433,7 +434,9 @@ exit 0 %files -f %{name}.files %defattr(-,root,root) %doc README NEWS AUTHORS -%doc Documentation/deprecated.txt Documentation/licenses/* +%doc Documentation/deprecated.txt +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/* %doc misc-utils/getopt-*.{bash,tcsh} %config(noreplace) %{_sysconfdir}/pam.d/chfn @@ -753,7 +756,8 @@ exit 0 %files -n uuidd %defattr(-,root,root) -%doc Documentation/licenses/COPYING.GPLv2 +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.GPLv2 %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd %{_unitdir}/uuidd.* @@ -764,12 +768,12 @@ exit 0 %files -n libsmartcols %defattr(-,root,root) -%doc libsmartcols/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libsmartcols/COPYING %{_libdir}/libsmartcols.so.* %files -n libsmartcols-devel %defattr(-,root,root) -%doc libsmartcols/COPYING %{_libdir}/libsmartcols.so %{_includedir}/libsmartcols %{_libdir}/pkgconfig/smartcols.pc @@ -777,12 +781,12 @@ exit 0 %files -n libmount %defattr(-,root,root) -%doc libmount/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/libmount.so.* %files -n libmount-devel %defattr(-,root,root) -%doc libmount/COPYING %{_libdir}/libmount.so %{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc @@ -804,12 +808,12 @@ exit 0 %files -n libuuid %defattr(-,root,root) -%doc libuuid/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.BSD-3 libuuid/COPYING %{_libdir}/libuuid.so.* %files -n libuuid-devel %defattr(-,root,root) -%doc libuuid/COPYING %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -828,10 +832,14 @@ exit 0 %files -n python3-libmount %defattr(-, root, root) -%doc libmount/COPYING +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Aug 6 2014 Tom Callaway 2.25-3 +- fix license handling + * Thu Jul 24 2014 Karel Zak 2.25-2 - remove fstrim unit files from uuidd subpackage From 8d539d225f240d8c25b0c0ea3fa7d07126d3d60c Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 07:19:54 +0000 Subject: [PATCH 179/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5d8a18a..5cbbbce 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -837,6 +837,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 2.25-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Wed Aug 6 2014 Tom Callaway 2.25-3 - fix license handling From 71fd605ed8c74299c3ebac31d5625126f3480ab6 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 07:20:06 +0000 Subject: [PATCH 180/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5d8a18a..5cbbbce 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -837,6 +837,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 2.25-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Wed Aug 6 2014 Tom Callaway 2.25-3 - fix license handling From b079edfd1551b37f375f290b338dc8bc18525079 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Aug 2014 15:53:32 +0200 Subject: [PATCH 181/425] 2.25.1-rc1: new upstream version --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a03239f..4951bbe 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /util-linux-2.25-rc1.tar.xz /util-linux-2.25-rc2.tar.xz /util-linux-2.25.tar.xz +/util-linux-2.25.1-rc1.tar.xz diff --git a/sources b/sources index 2e97c41..00fa5ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4c78fdef4cb882caafad61e33cafbc14 util-linux-2.25.tar.xz +3c8bf9c9ccf2f1a3e8b7b7303be54543 util-linux-2.25.1-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 5cbbbce..2728e8f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.25 -Release: 4%{?dist} +Version: 2.25.1 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -837,6 +837,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Aug 27 2014 Karel Zak 2.25.1-0.1 +- upgrade to release 2.25.1-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes + * Mon Aug 18 2014 Fedora Release Engineering - 2.25-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From f789f0d9fc71337d73afba05d9f72473c128a0ba Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 3 Sep 2014 12:57:18 +0200 Subject: [PATCH 182/425] 2.25.1: new upstream version --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4951bbe..15671d6 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /util-linux-2.25-rc2.tar.xz /util-linux-2.25.tar.xz /util-linux-2.25.1-rc1.tar.xz +/util-linux-2.25.1.tar.xz diff --git a/sources b/sources index 00fa5ca..2fb41cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3c8bf9c9ccf2f1a3e8b7b7303be54543 util-linux-2.25.1-rc1.tar.xz +2ff36a8f8ede70f66c5ad0fb09e40e79 util-linux-2.25.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 2728e8f..10d8130 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25.1 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc1 +%define upstream_version %{version} ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -837,6 +837,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Sep 3 2014 Karel Zak 2.25.1-1 +- upgrade to stable 2.25.1 + * Wed Aug 27 2014 Karel Zak 2.25.1-0.1 - upgrade to release 2.25.1-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes From 89d447eb6c354f36129b6047eecab6afa8565014 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 24 Oct 2014 15:54:14 +0200 Subject: [PATCH 183/425] 2.25.2: new upstream version --- .gitignore | 1 + sources | 2 +- util-linux.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 15671d6..3e759bf 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ /util-linux-2.25.tar.xz /util-linux-2.25.1-rc1.tar.xz /util-linux-2.25.1.tar.xz +/util-linux-2.25.2.tar.xz diff --git a/sources b/sources index 2fb41cb..6c95b4d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2ff36a8f8ede70f66c5ad0fb09e40e79 util-linux-2.25.1.tar.xz +cab3d7be354000f629bc601238b629b3 util-linux-2.25.2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 10d8130..da83701 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.25.1 +Version: 2.25.2 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -335,7 +335,6 @@ echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 %ifarch %{sparc} for I in /sbin/sfdisk \ %{_mandir}/man8/sfdisk.8* \ - %doc Documentation/sfdisk.txt \ /sbin/cfdisk \ %{_mandir}/man8/cfdisk.8*; do @@ -741,7 +740,6 @@ exit 0 %endif %ifnarch %{sparc} -%doc Documentation/sfdisk.txt %{_sbindir}/cfdisk %{_sbindir}/sfdisk %{_mandir}/man8/cfdisk.8* @@ -837,8 +835,13 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Oct 24 2014 Karel Zak 2.25.2-1 +- upgrade to stable 2.25.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.2-ReleaseNotes + * Wed Sep 3 2014 Karel Zak 2.25.1-1 - upgrade to stable 2.25.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes * Wed Aug 27 2014 Karel Zak 2.25.1-0.1 - upgrade to release 2.25.1-rc1 From 34a74aadf6fe397e8aadb294e984c3080d232702 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 27 Nov 2014 14:39:25 +0100 Subject: [PATCH 184/425] 2.25.2-2: CVE-2014-9114 --- 2.26-libblkid-escape.patch | 126 +++++++++++++++++++++++++++++++++++++ util-linux.spec | 10 ++- 2 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 2.26-libblkid-escape.patch diff --git a/2.26-libblkid-escape.patch b/2.26-libblkid-escape.patch new file mode 100644 index 0000000..acde467 --- /dev/null +++ b/2.26-libblkid-escape.patch @@ -0,0 +1,126 @@ +diff -up util-linux-2.25.2/include/carefulputc.h.kzak util-linux-2.25.2/include/carefulputc.h +--- util-linux-2.25.2/include/carefulputc.h.kzak 2014-10-24 11:21:20.309387887 +0200 ++++ util-linux-2.25.2/include/carefulputc.h 2014-11-27 14:25:52.814604767 +0100 +@@ -38,6 +38,8 @@ static inline void fputs_quoted(const ch + for (p = data; p && *p; p++) { + if ((unsigned char) *p == 0x22 || /* " */ + (unsigned char) *p == 0x5c || /* \ */ ++ (unsigned char) *p == 0x60 || /* ` */ ++ (unsigned char) *p == 0x24 || /* $ */ + !isprint((unsigned char) *p) || + iscntrl((unsigned char) *p)) { + +diff -up util-linux-2.25.2/libblkid/src/read.c.kzak util-linux-2.25.2/libblkid/src/read.c +--- util-linux-2.25.2/libblkid/src/read.c.kzak 2014-09-16 14:37:06.147551766 +0200 ++++ util-linux-2.25.2/libblkid/src/read.c 2014-11-27 14:26:02.848721993 +0100 +@@ -252,15 +252,30 @@ static int parse_token(char **name, char + *value = skip_over_blank(*value + 1); + + if (**value == '"') { +- end = strchr(*value + 1, '"'); +- if (!end) { ++ char *p = end = *value + 1; ++ ++ /* convert 'foo\"bar' to 'foo"bar' */ ++ while (*p) { ++ if (*p == '\\') { ++ p++; ++ *end = *p; ++ } else { ++ *end = *p; ++ if (*p == '"') ++ break; ++ } ++ p++; ++ end++; ++ } ++ ++ if (*end != '"') { + DBG(READ, ul_debug("unbalanced quotes at: %s", *value)); + *cp = *value; + return -BLKID_ERR_CACHE; + } + (*value)++; + *end = '\0'; +- end++; ++ end = ++p; + } else { + end = skip_over_word(*value); + if (*end) { +diff -up util-linux-2.25.2/libblkid/src/save.c.kzak util-linux-2.25.2/libblkid/src/save.c +--- util-linux-2.25.2/libblkid/src/save.c.kzak 2014-09-16 14:37:06.147551766 +0200 ++++ util-linux-2.25.2/libblkid/src/save.c 2014-11-27 14:26:02.848721993 +0100 +@@ -26,6 +26,21 @@ + + #include "blkidP.h" + ++ ++static void save_quoted(const char *data, FILE *file) ++{ ++ const char *p; ++ ++ fputc('"', file); ++ for (p = data; p && *p; p++) { ++ if ((unsigned char) *p == 0x22 || /* " */ ++ (unsigned char) *p == 0x5c) /* \ */ ++ fputc('\\', file); ++ ++ fputc(*p, file); ++ } ++ fputc('"', file); ++} + static int save_dev(blkid_dev dev, FILE *file) + { + struct list_head *p; +@@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE + + if (dev->bid_pri) + fprintf(file, " PRI=\"%d\"", dev->bid_pri); ++ + list_for_each(p, &dev->bid_tags) { + blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); +- fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val); ++ ++ fputc(' ', file); /* space between tags */ ++ fputs(tag->bit_name, file); /* tag NAME */ ++ fputc('=', file); /* separator between NAME and VALUE */ ++ save_quoted(tag->bit_val, file); /* tag "VALUE" */ + } + fprintf(file, ">%s\n", dev->bid_name); + +diff -up util-linux-2.25.2/misc-utils/blkid.8.kzak util-linux-2.25.2/misc-utils/blkid.8 +--- util-linux-2.25.2/misc-utils/blkid.8.kzak 2013-09-18 15:50:12.690263681 +0200 ++++ util-linux-2.25.2/misc-utils/blkid.8 2014-11-27 14:26:02.849722005 +0100 +@@ -193,7 +193,10 @@ partitions. This output format is \fBDE + .TP + .B export + print key=value pairs for easy import into the environment; this output format +-is automatically enabled when I/O Limits (\fB-i\fR option) are requested ++is automatically enabled when I/O Limits (\fB-i\fR option) are requested. ++ ++The non-printing characters are encoded by ^ and M- notation and all ++potentially unsafe characters are escaped. + .RE + .TP + .BI \-O " offset" +diff -up util-linux-2.25.2/misc-utils/blkid.c.kzak util-linux-2.25.2/misc-utils/blkid.c +--- util-linux-2.25.2/misc-utils/blkid.c.kzak 2014-10-24 11:29:07.834363569 +0200 ++++ util-linux-2.25.2/misc-utils/blkid.c 2014-11-27 14:26:02.849722005 +0100 +@@ -306,7 +306,7 @@ static void print_value(int output, int + printf("DEVNAME=%s\n", devname); + fputs(name, stdout); + fputs("=", stdout); +- safe_print(value, valsz, NULL); ++ safe_print(value, valsz, " \\\"'$`<>"); + fputs("\n", stdout); + + } else { +@@ -315,7 +315,7 @@ static void print_value(int output, int + fputs(" ", stdout); + fputs(name, stdout); + fputs("=\"", stdout); +- safe_print(value, valsz, "\""); ++ safe_print(value, valsz, "\"\\"); + fputs("\"", stdout); + } + } diff --git a/util-linux.spec b/util-linux.spec index da83701..fc1cc2f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.25.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -27,7 +27,7 @@ BuildRequires: libcap-ng-devel BuildRequires: python3-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -77,6 +77,9 @@ Requires: libsmartcols = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# 1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid +Patch1: 2.26-libblkid-escape.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -835,6 +838,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Nov 27 2014 Karel Zak 2.25.2-2 +- fix #1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid + * Wed Oct 24 2014 Karel Zak 2.25.2-1 - upgrade to stable 2.25.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.2-ReleaseNotes From d6ff12d6dc574229aa54dc09736867dca254e84f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 15 Jan 2015 15:01:38 +0100 Subject: [PATCH 185/425] 2.26-0.1: upgrade to -rc1 --- .gitignore | 1 + 2.26-libblkid-escape.patch | 126 ------------------------------------- sources | 2 +- util-linux.spec | 60 +++++++++++++++--- 4 files changed, 55 insertions(+), 134 deletions(-) delete mode 100644 2.26-libblkid-escape.patch diff --git a/.gitignore b/.gitignore index 3e759bf..f3e242d 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /util-linux-2.25.1-rc1.tar.xz /util-linux-2.25.1.tar.xz /util-linux-2.25.2.tar.xz +/util-linux-2.26-rc1.tar.xz diff --git a/2.26-libblkid-escape.patch b/2.26-libblkid-escape.patch deleted file mode 100644 index acde467..0000000 --- a/2.26-libblkid-escape.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -up util-linux-2.25.2/include/carefulputc.h.kzak util-linux-2.25.2/include/carefulputc.h ---- util-linux-2.25.2/include/carefulputc.h.kzak 2014-10-24 11:21:20.309387887 +0200 -+++ util-linux-2.25.2/include/carefulputc.h 2014-11-27 14:25:52.814604767 +0100 -@@ -38,6 +38,8 @@ static inline void fputs_quoted(const ch - for (p = data; p && *p; p++) { - if ((unsigned char) *p == 0x22 || /* " */ - (unsigned char) *p == 0x5c || /* \ */ -+ (unsigned char) *p == 0x60 || /* ` */ -+ (unsigned char) *p == 0x24 || /* $ */ - !isprint((unsigned char) *p) || - iscntrl((unsigned char) *p)) { - -diff -up util-linux-2.25.2/libblkid/src/read.c.kzak util-linux-2.25.2/libblkid/src/read.c ---- util-linux-2.25.2/libblkid/src/read.c.kzak 2014-09-16 14:37:06.147551766 +0200 -+++ util-linux-2.25.2/libblkid/src/read.c 2014-11-27 14:26:02.848721993 +0100 -@@ -252,15 +252,30 @@ static int parse_token(char **name, char - *value = skip_over_blank(*value + 1); - - if (**value == '"') { -- end = strchr(*value + 1, '"'); -- if (!end) { -+ char *p = end = *value + 1; -+ -+ /* convert 'foo\"bar' to 'foo"bar' */ -+ while (*p) { -+ if (*p == '\\') { -+ p++; -+ *end = *p; -+ } else { -+ *end = *p; -+ if (*p == '"') -+ break; -+ } -+ p++; -+ end++; -+ } -+ -+ if (*end != '"') { - DBG(READ, ul_debug("unbalanced quotes at: %s", *value)); - *cp = *value; - return -BLKID_ERR_CACHE; - } - (*value)++; - *end = '\0'; -- end++; -+ end = ++p; - } else { - end = skip_over_word(*value); - if (*end) { -diff -up util-linux-2.25.2/libblkid/src/save.c.kzak util-linux-2.25.2/libblkid/src/save.c ---- util-linux-2.25.2/libblkid/src/save.c.kzak 2014-09-16 14:37:06.147551766 +0200 -+++ util-linux-2.25.2/libblkid/src/save.c 2014-11-27 14:26:02.848721993 +0100 -@@ -26,6 +26,21 @@ - - #include "blkidP.h" - -+ -+static void save_quoted(const char *data, FILE *file) -+{ -+ const char *p; -+ -+ fputc('"', file); -+ for (p = data; p && *p; p++) { -+ if ((unsigned char) *p == 0x22 || /* " */ -+ (unsigned char) *p == 0x5c) /* \ */ -+ fputc('\\', file); -+ -+ fputc(*p, file); -+ } -+ fputc('"', file); -+} - static int save_dev(blkid_dev dev, FILE *file) - { - struct list_head *p; -@@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE - - if (dev->bid_pri) - fprintf(file, " PRI=\"%d\"", dev->bid_pri); -+ - list_for_each(p, &dev->bid_tags) { - blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); -- fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val); -+ -+ fputc(' ', file); /* space between tags */ -+ fputs(tag->bit_name, file); /* tag NAME */ -+ fputc('=', file); /* separator between NAME and VALUE */ -+ save_quoted(tag->bit_val, file); /* tag "VALUE" */ - } - fprintf(file, ">%s\n", dev->bid_name); - -diff -up util-linux-2.25.2/misc-utils/blkid.8.kzak util-linux-2.25.2/misc-utils/blkid.8 ---- util-linux-2.25.2/misc-utils/blkid.8.kzak 2013-09-18 15:50:12.690263681 +0200 -+++ util-linux-2.25.2/misc-utils/blkid.8 2014-11-27 14:26:02.849722005 +0100 -@@ -193,7 +193,10 @@ partitions. This output format is \fBDE - .TP - .B export - print key=value pairs for easy import into the environment; this output format --is automatically enabled when I/O Limits (\fB-i\fR option) are requested -+is automatically enabled when I/O Limits (\fB-i\fR option) are requested. -+ -+The non-printing characters are encoded by ^ and M- notation and all -+potentially unsafe characters are escaped. - .RE - .TP - .BI \-O " offset" -diff -up util-linux-2.25.2/misc-utils/blkid.c.kzak util-linux-2.25.2/misc-utils/blkid.c ---- util-linux-2.25.2/misc-utils/blkid.c.kzak 2014-10-24 11:29:07.834363569 +0200 -+++ util-linux-2.25.2/misc-utils/blkid.c 2014-11-27 14:26:02.849722005 +0100 -@@ -306,7 +306,7 @@ static void print_value(int output, int - printf("DEVNAME=%s\n", devname); - fputs(name, stdout); - fputs("=", stdout); -- safe_print(value, valsz, NULL); -+ safe_print(value, valsz, " \\\"'$`<>"); - fputs("\n", stdout); - - } else { -@@ -315,7 +315,7 @@ static void print_value(int output, int - fputs(" ", stdout); - fputs(name, stdout); - fputs("=\"", stdout); -- safe_print(value, valsz, "\""); -+ safe_print(value, valsz, "\"\\"); - fputs("\"", stdout); - } - } diff --git a/sources b/sources index 6c95b4d..8269808 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cab3d7be354000f629bc601238b629b3 util-linux-2.25.2.tar.xz +f7e66c2f9f07057d368e407baa42d077 util-linux-2.26-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index fc1cc2f..380b85a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.25.2 -Release: 2%{?dist} +Version: 2.26 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -71,15 +71,13 @@ Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: libsmartcols = %{version}-%{release} +Requires: libfdisk = %{version}-%{release} ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# 1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid -Patch1: 2.26-libblkid-escape.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -87,6 +85,27 @@ others, Util-linux contains the fdisk configuration tool and the login program. +%package -n libfdisk +Summary: Partitioning library for fdisk-like programs. +Group: Development/Libraries +License: LGPLv2+ + +%description -n libfdisk +This is library for fdisk-like programs, part of util-linux. + + +%package -n libfdisk-devel +Summary: Partitioning library for fdisk-like programs. +Group: Development/Libraries +License: LGPLv2+ +Requires: libfdisk = %{version}-%{release} +Requires: pkgconfig + +%description -n libfdisk-devel +This is development library and headers for fdisk-like programs, +part of util-linux. + + %package -n libsmartcols Summary: Formatting library for ls-like programs. Group: Development/Libraries @@ -233,6 +252,8 @@ 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 -Wl,-z,relro -Wl,-z,now" +export DAEMON_CFLAGS="$SUID_CFLAGS" +export DAEMON_LDFLAGS="$SUID_LDFLAGS" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ --disable-silent-rules \ @@ -353,7 +374,7 @@ rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt ln -sf /proc/mounts %{buildroot}/etc/mtab # remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols}.a +rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a # find MO files %find_lang %name @@ -415,6 +436,9 @@ done %post -n libsmartcols -p /sbin/ldconfig %postun -n libsmartcols -p /sbin/ldconfig +%post -n libfdisk -p /sbin/ldconfig +%postun -n libfdisk -p /sbin/ldconfig + %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -614,6 +638,7 @@ exit 0 %{_mandir}/man8/umount.8* %{_mandir}/man8/wdctl.8.gz %{_mandir}/man8/wipefs.8* +%{_mandir}/man8/zramctl.8* %{_sbindir}/addpart %{_sbindir}/agetty %{_sbindir}/blkdiscard @@ -648,6 +673,7 @@ exit 0 %{_sbindir}/swapon %{_sbindir}/switch_root %{_sbindir}/wipefs +%{_sbindir}/zramctl %{compldir}/addpart %{compldir}/blkdiscard @@ -730,6 +756,7 @@ exit 0 %{compldir}/whereis %{compldir}/wipefs %{compldir}/write +%{compldir}/zramctl %ifnarch s390 s390x %{_sbindir}/clock @@ -767,6 +794,19 @@ exit 0 %{compldir}/uuidd +%files -n libfdisk +%defattr(-,root,root) +%{!?_licensedir:%global license %%doc} +%license Documentation/licenses/COPYING.LGPLv2.1 libfdisk/COPYING +%{_libdir}/libfdisk.so.* + +%files -n libfdisk-devel +%defattr(-,root,root) +%{_libdir}/libfdisk.so +%{_includedir}/libfdisk +%{_libdir}/pkgconfig/fdisk.pc + + %files -n libsmartcols %defattr(-,root,root) %{!?_licensedir:%global license %%doc} @@ -838,6 +878,12 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jan 15 2015 Karel Zak 2.26-0.1 +- upgrade to 2.26-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26-ReleaseNotes +- build with -pie for uuidd +- new command zramctl + * Thu Nov 27 2014 Karel Zak 2.25.2-2 - fix #1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid From 8e74662110e6e0df7b61226e8c793b245121ff3b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 16 Jan 2015 12:36:58 +0100 Subject: [PATCH 186/425] 2.26-0.2: fix #1182778 --- 2.26-rc2-remount.patch | 83 ++++++++++++++++++++++++++++++++++++++++++ util-linux.spec | 8 +++- 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 2.26-rc2-remount.patch diff --git a/2.26-rc2-remount.patch b/2.26-rc2-remount.patch new file mode 100644 index 0000000..1bc7d3c --- /dev/null +++ b/2.26-rc2-remount.patch @@ -0,0 +1,83 @@ +From 2498303575b85fe0a81dabb3775eb0a60a5f420a Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 16 Jan 2015 12:24:57 +0100 +Subject: [PATCH] libmount: revert "read mtab on remount" idea + +It's backwardly incompatible nonsense to prefer mtab on remount. + + mount -o remount /foo + +has to read mount options from fstab otherwise the remount has no +effect. (The ideal solution would be to read both mtab, then modify +the options according to fstab -- but for now more important is to be +backwardly compatible.) + +References: https://bugzilla.redhat.com/show_bug.cgi?id=1182778 +Signed-off-by: Karel Zak +--- + libmount/src/context.c | 7 +------ + sys-utils/mount.8 | 17 ++++++++--------- + 2 files changed, 9 insertions(+), 15 deletions(-) + +diff --git a/libmount/src/context.c b/libmount/src/context.c +index 14fa44b..f623f34 100644 +--- a/libmount/src/context.c ++++ b/libmount/src/context.c +@@ -2051,13 +2051,8 @@ int mnt_context_apply_fstab(struct libmnt_context *cxt) + cxt->optsmode &= ~MNT_OMODE_FORCE; + } + +- if (mnt_context_get_mflags(cxt, &mflags) == 0 && mflags & MS_REMOUNT) { +- /* preffer mtab on remount */ +- DBG(CXT, ul_debugobj(cxt, "force mtab parsing on remount")); +- cxt->optsmode |= MNT_OMODE_MTAB; +- cxt->optsmode &= ~MNT_OMODE_FSTAB; ++ if (mnt_context_get_mflags(cxt, &mflags) == 0 && mflags & MS_REMOUNT) + isremount = 1; +- } + + if (cxt->fs) { + src = mnt_fs_get_source(cxt->fs); +diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 +index 854268a..6941216 100644 +--- a/sys-utils/mount.8 ++++ b/sys-utils/mount.8 +@@ -1070,10 +1070,9 @@ Attempt to remount an already-mounted filesystem. This is commonly + used to change the mount flags for a filesystem, especially to make a + readonly filesystem writable. It does not change device or mount point. + +-The remount functionality follows the standard way the mount command works with +-options, but preferred source for the options is mtab (or /proc/self/mouninfo) +-rather than fstab. The mount command only does not read mtab +-when both the ++The remount functionality follows the standard way the mount command works ++with options from fstab. This means that the mount command only doesn't ++read fstab (or mtab) when both the + .I device + and + .I dir +@@ -1082,16 +1081,16 @@ are specified. + .B "mount \-o remount,rw /dev/foo /dir" + + After this call all old mount options are replaced and arbitrary stuff from +-mtab is ignored, except the loop= option which is internally generated and +-maintained by the mount command. ++fstab (or mtab) is ignored, except the loop= option which is internally ++generated and maintained by the mount command. + + .B "mount \-o remount,rw /dir" + +-After this call mount reads mtab and merges these options with ++After this call mount reads fstab and merges these options with + the options from the command line (\c + .B \-o\c +-). If no mtab (or /proc/self/mountinfo) is available than remount with unspecified +-source is allowed. ++). If no mountpoint found in fstab than remount with unspecified source is ++allowed. + .TP + .B ro + Mount the filesystem read-only. +-- +1.9.3 + diff --git a/util-linux.spec b/util-linux.spec index 380b85a..e03eb23 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -78,6 +78,9 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# 1182778 - util-linux 2.26-0.1.fc22 causes ro / and /home on boot +Patch1: 2.26-rc2-remount.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -878,6 +881,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Jan 16 2015 Karel Zak 2.26-0.2 +- fix 1182778 - remount causes ro / and /home on boot + * Thu Jan 15 2015 Karel Zak 2.26-0.1 - upgrade to 2.26-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26-ReleaseNotes From 55f81a38e76023f6eaa7cd9130ef38b0ce74733d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Feb 2015 15:08:35 +0100 Subject: [PATCH 187/425] 2.26-0.3: upgrade to -rc2 --- 2.26-rc2-remount.patch | 83 ------------------------------------------ util-linux.spec | 10 ++--- 2 files changed, 5 insertions(+), 88 deletions(-) delete mode 100644 2.26-rc2-remount.patch diff --git a/2.26-rc2-remount.patch b/2.26-rc2-remount.patch deleted file mode 100644 index 1bc7d3c..0000000 --- a/2.26-rc2-remount.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 2498303575b85fe0a81dabb3775eb0a60a5f420a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 16 Jan 2015 12:24:57 +0100 -Subject: [PATCH] libmount: revert "read mtab on remount" idea - -It's backwardly incompatible nonsense to prefer mtab on remount. - - mount -o remount /foo - -has to read mount options from fstab otherwise the remount has no -effect. (The ideal solution would be to read both mtab, then modify -the options according to fstab -- but for now more important is to be -backwardly compatible.) - -References: https://bugzilla.redhat.com/show_bug.cgi?id=1182778 -Signed-off-by: Karel Zak ---- - libmount/src/context.c | 7 +------ - sys-utils/mount.8 | 17 ++++++++--------- - 2 files changed, 9 insertions(+), 15 deletions(-) - -diff --git a/libmount/src/context.c b/libmount/src/context.c -index 14fa44b..f623f34 100644 ---- a/libmount/src/context.c -+++ b/libmount/src/context.c -@@ -2051,13 +2051,8 @@ int mnt_context_apply_fstab(struct libmnt_context *cxt) - cxt->optsmode &= ~MNT_OMODE_FORCE; - } - -- if (mnt_context_get_mflags(cxt, &mflags) == 0 && mflags & MS_REMOUNT) { -- /* preffer mtab on remount */ -- DBG(CXT, ul_debugobj(cxt, "force mtab parsing on remount")); -- cxt->optsmode |= MNT_OMODE_MTAB; -- cxt->optsmode &= ~MNT_OMODE_FSTAB; -+ if (mnt_context_get_mflags(cxt, &mflags) == 0 && mflags & MS_REMOUNT) - isremount = 1; -- } - - if (cxt->fs) { - src = mnt_fs_get_source(cxt->fs); -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index 854268a..6941216 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -1070,10 +1070,9 @@ Attempt to remount an already-mounted filesystem. This is commonly - used to change the mount flags for a filesystem, especially to make a - readonly filesystem writable. It does not change device or mount point. - --The remount functionality follows the standard way the mount command works with --options, but preferred source for the options is mtab (or /proc/self/mouninfo) --rather than fstab. The mount command only does not read mtab --when both the -+The remount functionality follows the standard way the mount command works -+with options from fstab. This means that the mount command only doesn't -+read fstab (or mtab) when both the - .I device - and - .I dir -@@ -1082,16 +1081,16 @@ are specified. - .B "mount \-o remount,rw /dev/foo /dir" - - After this call all old mount options are replaced and arbitrary stuff from --mtab is ignored, except the loop= option which is internally generated and --maintained by the mount command. -+fstab (or mtab) is ignored, except the loop= option which is internally -+generated and maintained by the mount command. - - .B "mount \-o remount,rw /dir" - --After this call mount reads mtab and merges these options with -+After this call mount reads fstab and merges these options with - the options from the command line (\c - .B \-o\c --). If no mtab (or /proc/self/mountinfo) is available than remount with unspecified --source is allowed. -+). If no mountpoint found in fstab than remount with unspecified source is -+allowed. - .TP - .B ro - Mount the filesystem read-only. --- -1.9.3 - diff --git a/util-linux.spec b/util-linux.spec index e03eb23..14b3167 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -78,9 +78,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# 1182778 - util-linux 2.26-0.1.fc22 causes ro / and /home on boot -Patch1: 2.26-rc2-remount.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -881,6 +878,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Feb 5 2015 Karel Zak 2.26-0.3 +- upgrade to 2.26-rc2 + * Fri Jan 16 2015 Karel Zak 2.26-0.2 - fix 1182778 - remount causes ro / and /home on boot From f6a3ca678493f6790cdc35ba184ba0e15ce6857d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Feb 2015 15:13:57 +0100 Subject: [PATCH 188/425] upload v2.26-rc2 sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f3e242d..6250bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ /util-linux-2.25.1.tar.xz /util-linux-2.25.2.tar.xz /util-linux-2.26-rc1.tar.xz +/util-linux-2.26-rc2.tar.xz diff --git a/sources b/sources index 8269808..57bf6c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f7e66c2f9f07057d368e407baa42d077 util-linux-2.26-rc1.tar.xz +cd12e74826ec1efa750a59ce1fd72057 util-linux-2.26-rc2.tar.xz From aa5805ac25f897f783fa41afe7b65be3d9299799 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 10 Feb 2015 11:30:36 +0100 Subject: [PATCH 189/425] 2.26-0.4: fix PPC build --- 2.26-setarch-ppc.patch | 33 +++++++++++++++++++++++++++++++++ util-linux.spec | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 2.26-setarch-ppc.patch diff --git a/2.26-setarch-ppc.patch b/2.26-setarch-ppc.patch new file mode 100644 index 0000000..93a80cd --- /dev/null +++ b/2.26-setarch-ppc.patch @@ -0,0 +1,33 @@ +From d9ca5dd4426c8bcc779750362bf905395b1b08ef Mon Sep 17 00:00:00 2001 +From: Ruediger Meier +Date: Mon, 9 Feb 2015 16:11:02 +0100 +Subject: [PATCH] setarch: fix typo (missing braces) for ppcle + +Introduced in 77eb13b9, noticed on ppc64le. + +CC: Sami Kerola +Signed-off-by: Ruediger Meier +--- + sys-utils/setarch.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c +index c8ca5f8..76892ab 100644 +--- a/sys-utils/setarch.c ++++ b/sys-utils/setarch.c +@@ -160,9 +160,9 @@ static int set_arch(const char *pers, unsigned long options, int list) + {PER_LINUX, "ppc64pseries", "ppc64"}, + {PER_LINUX, "ppc64iseries", "ppc64"}, + # else +- PER_LINUX32, "ppc32le", "ppcle"}, +- PER_LINUX32, "ppcle", "ppcle"}, +- PER_LINUX, "ppc64le", "ppc64le"}, ++ {PER_LINUX32, "ppc32le", "ppcle"}, ++ {PER_LINUX32, "ppcle", "ppcle"}, ++ {PER_LINUX, "ppc64le", "ppc64le"}, + # endif + #endif + #if defined(__x86_64__) || defined(__i386__) || defined(__ia64__) +-- +2.1.0 + diff --git a/util-linux.spec b/util-linux.spec index 14b3167..c3dd883 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -78,6 +78,9 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# fix PPC build +Patch1: 2.26-setarch-ppc.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -878,6 +881,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Feb 10 2015 Karel Zak 2.26-0.4 +- fix setarch build on PPC + * Thu Feb 5 2015 Karel Zak 2.26-0.3 - upgrade to 2.26-rc2 From 8b794a5fc5f46ba6c500585ace73cc0ebc19f15f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 19 Feb 2015 13:45:44 +0100 Subject: [PATCH 190/425] 2.26-1: upgrade to stable release --- .gitignore | 1 + 2.26-setarch-ppc.patch | 33 --------------------------------- sources | 2 +- util-linux.spec | 11 ++++++----- 4 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 2.26-setarch-ppc.patch diff --git a/.gitignore b/.gitignore index 6250bdc..83370dc 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /util-linux-2.25.2.tar.xz /util-linux-2.26-rc1.tar.xz /util-linux-2.26-rc2.tar.xz +/util-linux-2.26.tar.xz diff --git a/2.26-setarch-ppc.patch b/2.26-setarch-ppc.patch deleted file mode 100644 index 93a80cd..0000000 --- a/2.26-setarch-ppc.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d9ca5dd4426c8bcc779750362bf905395b1b08ef Mon Sep 17 00:00:00 2001 -From: Ruediger Meier -Date: Mon, 9 Feb 2015 16:11:02 +0100 -Subject: [PATCH] setarch: fix typo (missing braces) for ppcle - -Introduced in 77eb13b9, noticed on ppc64le. - -CC: Sami Kerola -Signed-off-by: Ruediger Meier ---- - sys-utils/setarch.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c -index c8ca5f8..76892ab 100644 ---- a/sys-utils/setarch.c -+++ b/sys-utils/setarch.c -@@ -160,9 +160,9 @@ static int set_arch(const char *pers, unsigned long options, int list) - {PER_LINUX, "ppc64pseries", "ppc64"}, - {PER_LINUX, "ppc64iseries", "ppc64"}, - # else -- PER_LINUX32, "ppc32le", "ppcle"}, -- PER_LINUX32, "ppcle", "ppcle"}, -- PER_LINUX, "ppc64le", "ppc64le"}, -+ {PER_LINUX32, "ppc32le", "ppcle"}, -+ {PER_LINUX32, "ppcle", "ppcle"}, -+ {PER_LINUX, "ppc64le", "ppc64le"}, - # endif - #endif - #if defined(__x86_64__) || defined(__i386__) || defined(__ia64__) --- -2.1.0 - diff --git a/sources b/sources index 57bf6c4..79b1640 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd12e74826ec1efa750a59ce1fd72057 util-linux-2.26-rc2.tar.xz +912c550a4e5c47c0ce9abd0733fa9a64 util-linux-2.26.tar.xz diff --git a/util-linux.spec b/util-linux.spec index c3dd883..6faec3f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26 -Release: 0.4%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -78,9 +78,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# fix PPC build -Patch1: 2.26-setarch-ppc.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -265,6 +262,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --enable-chfn-chsh \ --enable-write \ --enable-raw \ + --enable-libmount-force-mountinfo \ --with-python=3 \ --with-systemd \ --with-udev \ @@ -881,6 +879,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Feb 19 2015 Karel Zak 2.26-1 +- upgrade to stable release 2.26 + * Tue Feb 10 2015 Karel Zak 2.26-0.4 - fix setarch build on PPC From 0d11c1c42f8191b14dce93c856cabed0a3b62f4d Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sat, 21 Feb 2015 22:16:23 +0100 Subject: [PATCH 191/425] Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 6faec3f..77c91cd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -879,6 +879,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Sat Feb 21 2015 Till Maas - 2.26-2 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + * Thu Feb 19 2015 Karel Zak 2.26-1 - upgrade to stable release 2.26 From eab90e03d7bdd89c8914a1c63bd516b8321dfe78 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 19 Feb 2015 13:45:44 +0100 Subject: [PATCH 192/425] 2.26-1: upgrade to stable release --- .gitignore | 1 + 2.26-setarch-ppc.patch | 33 --------------------------------- sources | 2 +- util-linux.spec | 11 ++++++----- 4 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 2.26-setarch-ppc.patch diff --git a/.gitignore b/.gitignore index 6250bdc..83370dc 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /util-linux-2.25.2.tar.xz /util-linux-2.26-rc1.tar.xz /util-linux-2.26-rc2.tar.xz +/util-linux-2.26.tar.xz diff --git a/2.26-setarch-ppc.patch b/2.26-setarch-ppc.patch deleted file mode 100644 index 93a80cd..0000000 --- a/2.26-setarch-ppc.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d9ca5dd4426c8bcc779750362bf905395b1b08ef Mon Sep 17 00:00:00 2001 -From: Ruediger Meier -Date: Mon, 9 Feb 2015 16:11:02 +0100 -Subject: [PATCH] setarch: fix typo (missing braces) for ppcle - -Introduced in 77eb13b9, noticed on ppc64le. - -CC: Sami Kerola -Signed-off-by: Ruediger Meier ---- - sys-utils/setarch.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c -index c8ca5f8..76892ab 100644 ---- a/sys-utils/setarch.c -+++ b/sys-utils/setarch.c -@@ -160,9 +160,9 @@ static int set_arch(const char *pers, unsigned long options, int list) - {PER_LINUX, "ppc64pseries", "ppc64"}, - {PER_LINUX, "ppc64iseries", "ppc64"}, - # else -- PER_LINUX32, "ppc32le", "ppcle"}, -- PER_LINUX32, "ppcle", "ppcle"}, -- PER_LINUX, "ppc64le", "ppc64le"}, -+ {PER_LINUX32, "ppc32le", "ppcle"}, -+ {PER_LINUX32, "ppcle", "ppcle"}, -+ {PER_LINUX, "ppc64le", "ppc64le"}, - # endif - #endif - #if defined(__x86_64__) || defined(__i386__) || defined(__ia64__) --- -2.1.0 - diff --git a/sources b/sources index 57bf6c4..79b1640 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd12e74826ec1efa750a59ce1fd72057 util-linux-2.26-rc2.tar.xz +912c550a4e5c47c0ce9abd0733fa9a64 util-linux-2.26.tar.xz diff --git a/util-linux.spec b/util-linux.spec index c3dd883..6faec3f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26 -Release: 0.4%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version}-rc2 +%define upstream_version %{version} ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -78,9 +78,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# fix PPC build -Patch1: 2.26-setarch-ppc.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -265,6 +262,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --enable-chfn-chsh \ --enable-write \ --enable-raw \ + --enable-libmount-force-mountinfo \ --with-python=3 \ --with-systemd \ --with-udev \ @@ -881,6 +879,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Feb 19 2015 Karel Zak 2.26-1 +- upgrade to stable release 2.26 + * Tue Feb 10 2015 Karel Zak 2.26-0.4 - fix setarch build on PPC From 3fe05ecbfc63f39328bbd2542198e74365879bdb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 13 Apr 2015 18:02:32 +0200 Subject: [PATCH 193/425] 2.26.1-1: upgrade and fix sfdisk bugs --- .gitignore | 1 + ...ain-existing-boot-flag-when-resizing.patch | 62 +++ ...bfdisk-fix-symbols-versioning-script.patch | 41 ++ ...pport-bootbits-protection-from-p-MBR.patch | 357 ++++++++++++++++++ 2.27-sfdisk-enable-bootbits-protection.patch | 26 ++ 2.27-sfdisk-improve-N-warnings.patch | 62 +++ sources | 2 +- util-linux.spec | 17 +- 8 files changed, 565 insertions(+), 3 deletions(-) create mode 100644 2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch create mode 100644 2.27-libfdisk-fix-symbols-versioning-script.patch create mode 100644 2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch create mode 100644 2.27-sfdisk-enable-bootbits-protection.patch create mode 100644 2.27-sfdisk-improve-N-warnings.patch diff --git a/.gitignore b/.gitignore index 83370dc..4f7aeb9 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /util-linux-2.26-rc1.tar.xz /util-linux-2.26-rc2.tar.xz /util-linux-2.26.tar.xz +/util-linux-2.26.1.tar.xz diff --git a/2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch b/2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch new file mode 100644 index 0000000..d15014d --- /dev/null +++ b/2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch @@ -0,0 +1,62 @@ +From 376484140cb7ef117616ac2880bd8ec18381b18f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 13 Apr 2015 10:29:00 +0200 +Subject: [PATCH 2/5] libfdisk: (dos) retain existing boot flag when resizing + a partition + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210912 +Signed-off-by: Karel Zak +Co-Author: awilliam@redhat.com +--- + libfdisk/src/dos.c | 8 +++++--- + libfdisk/src/partition.c | 3 +-- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c +index dce9829..6468071 100644 +--- a/libfdisk/src/dos.c ++++ b/libfdisk/src/dos.c +@@ -1221,7 +1221,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n, + } + } + +- set_partition(cxt, n, 0, start, stop, sys, pa && pa->boot == 1 ? 1 : 0); ++ set_partition(cxt, n, 0, start, stop, sys, fdisk_partition_is_bootable(pa)); + if (n > 4) { + struct pte *pe = self_pte(cxt, n); + set_partition(cxt, n - 1, 1, pe->offset, stop, +@@ -1963,13 +1963,15 @@ static int dos_set_partition(struct fdisk_context *cxt, size_t n, + + set_partition(cxt, n, 0, start, start + size - 1, + pa->type ? pa->type->code : p->sys_ind, +- pa->boot == 1); ++ FDISK_IS_UNDEF(pa->boot) ? ++ p->boot_ind == ACTIVE_FLAG : ++ fdisk_partition_is_bootable(pa)); + } else { + DBG(LABEL, ul_debug("DOS: keep size, modify properties")); + if (pa->type) + p->sys_ind = pa->type->code; + if (!FDISK_IS_UNDEF(pa->boot)) +- p->boot_ind = pa->boot == 1 ? ACTIVE_FLAG : 0; ++ p->boot_ind = fdisk_partition_is_bootable(pa) ? ACTIVE_FLAG : 0; + } + + partition_set_changed(cxt, n, 1); +diff --git a/libfdisk/src/partition.c b/libfdisk/src/partition.c +index 03c0eb5..a0b9ca5 100644 +--- a/libfdisk/src/partition.c ++++ b/libfdisk/src/partition.c +@@ -757,8 +757,7 @@ int fdisk_partition_to_string(struct fdisk_partition *pa, + } + break; + case FDISK_FIELD_BOOT: +- if (fdisk_partition_is_bootable(pa)) +- rc = asprintf(&p, "%c", pa->boot ? '*' : ' '); ++ p = fdisk_partition_is_bootable(pa) ? strdup("*") : NULL; + break; + case FDISK_FIELD_START: + if (fdisk_partition_has_start(pa)) { +-- +2.1.0 + diff --git a/2.27-libfdisk-fix-symbols-versioning-script.patch b/2.27-libfdisk-fix-symbols-versioning-script.patch new file mode 100644 index 0000000..12f5ef1 --- /dev/null +++ b/2.27-libfdisk-fix-symbols-versioning-script.patch @@ -0,0 +1,41 @@ +From 6ece2f94849d5c61920d435804fb72b59503686f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 25 Mar 2015 11:08:22 +0100 +Subject: [PATCH 1/5] libfdisk: fix symbols versioning script + +Really stupid copy & past mistake. The libfdisk symbols should not be +prefixed by MOUNT_ suffix. + +This change makes binaries linked with libfdisk 2.26 incompatible with +new libfdisk. Fortunately, 2.26 has been the first release and very +probably the library has been used for util-linux fdisks only. + +Signed-off-by: Karel Zak +--- + libfdisk/src/libfdisk.sym | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/libfdisk/src/libfdisk.sym b/libfdisk/src/libfdisk.sym +index 8364fe7..541b247 100644 +--- a/libfdisk/src/libfdisk.sym ++++ b/libfdisk/src/libfdisk.sym +@@ -1,11 +1,12 @@ + /* + * The symbol versioning ensures that a new application requiring symbol foo; +- * can't run with old libblkid.so not providing foo; +- * version info can't enforce this since we never change the SONAME. ++ * can't run with old library.so not providing foo. ++ ++ * Version info can't enforce this since we never change the SONAME. + * +- * Copyright (C) 2014 Karel Zak ++ * Copyright (C) 2014-2015 Karel Zak + */ +-MOUNT_2.26 { ++FDISK_2.26 { + global: + fdisk_add_partition; + fdisk_align_lba; +-- +2.1.0 + diff --git a/2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch b/2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch new file mode 100644 index 0000000..0da79a9 --- /dev/null +++ b/2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch @@ -0,0 +1,357 @@ +From 4bcc9fdca681b48c54954924608b8c337d61fbad Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 13 Apr 2015 13:40:25 +0200 +Subject: [PATCH 4/5] libfdisk: support bootbits protection from (p)MBR + +Signed-off-by: Karel Zak +--- + include/pt-mbr.h | 1 + + libfdisk/docs/libfdisk-sections.txt | 6 ++- + libfdisk/src/context.c | 33 ++++++++++++++++- + libfdisk/src/dos.c | 5 ++- + libfdisk/src/fdiskP.h | 4 +- + libfdisk/src/gpt.c | 6 ++- + libfdisk/src/libfdisk.h.in | 2 + + libfdisk/src/libfdisk.sym | 5 +++ + libfdisk/src/sgi.c | 2 +- + libfdisk/src/sun.c | 2 +- + libfdisk/src/utils.c | 73 ++++++++++++++++++++++++++----------- + 11 files changed, 109 insertions(+), 30 deletions(-) + +diff --git a/include/pt-mbr.h b/include/pt-mbr.h +index 1279e3c..6957b95 100644 +--- a/include/pt-mbr.h ++++ b/include/pt-mbr.h +@@ -11,6 +11,7 @@ struct dos_partition { + } __attribute__((packed)); + + #define MBR_PT_OFFSET 0x1be ++#define MBR_PT_BOOTBITS_SIZE 440 + + static inline struct dos_partition *mbr_get_partition(unsigned char *mbr, int i) + { +diff --git a/libfdisk/docs/libfdisk-sections.txt b/libfdisk/docs/libfdisk-sections.txt +index 676d500..2d5cd92 100644 +--- a/libfdisk/docs/libfdisk-sections.txt ++++ b/libfdisk/docs/libfdisk-sections.txt +@@ -279,6 +279,7 @@ fdisk_unref_table + fdisk_context + fdisk_assign_device + fdisk_deassign_device ++fdisk_enable_bootbits_protection + fdisk_enable_details + fdisk_enable_listonly + fdisk_get_alignment_offset +@@ -297,22 +298,23 @@ fdisk_get_parent + fdisk_get_physector_size + fdisk_get_sector_size + fdisk_get_size_unit +-FDISK_PLURAL +-FDISK_SINGULAR + fdisk_get_unit + fdisk_get_units_per_sector + fdisk_has_label ++fdisk_has_protected_bootbits + fdisk_is_details + fdisk_is_labeltype + fdisk_is_listonly + fdisk_is_readonly + fdisk_new_context + fdisk_new_nested_context ++FDISK_PLURAL + fdisk_ref_context + fdisk_set_first_lba + fdisk_set_last_lba + fdisk_set_size_unit + fdisk_set_unit ++FDISK_SINGULAR + fdisk_unref_context + fdisk_use_cylinders + +diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c +index 84867b0..efc961c 100644 +--- a/libfdisk/src/context.c ++++ b/libfdisk/src/context.c +@@ -94,12 +94,13 @@ static int init_nested_from_parent(struct fdisk_context *cxt, int isnew) + cxt->user_log_sector = parent->user_log_sector; + cxt->user_pyh_sector = parent->user_pyh_sector; + +- /* parent <--> nested independent setting, initialize for new nested ++ /* parent <--> nested independent setting, initialize for new nested + * contexts only */ + if (isnew) { + cxt->listonly = parent->listonly; + cxt->display_details = parent->display_details; + cxt->display_in_cyl_units = parent->display_in_cyl_units; ++ cxt->protect_bootbits = parent->protect_bootbits; + } + + free(cxt->dev_path); +@@ -304,6 +305,36 @@ int fdisk_has_label(struct fdisk_context *cxt) + } + + /** ++ * fdisk_has_protected_bootbits: ++ * @cxt: fdisk context ++ * ++ * Returns: return 1 if boot bits protection enabled. ++ */ ++int fdisk_has_protected_bootbits(struct fdisk_context *cxt) ++{ ++ return cxt && cxt->protect_bootbits; ++} ++ ++/** ++ * fdisk_enable_bootbits_protection: ++ * @cxt: fdisk context ++ * @enable: 1 or 0 ++ * ++ * The library zeroizes all the first sector when create a new disk label by ++ * default. This function allows to control this behavior. For now it's ++ * supported for MBR and GPT. ++ * ++ * Returns: 0 on success, < 0 on error. ++ */ ++int fdisk_enable_bootbits_protection(struct fdisk_context *cxt, int enable) ++{ ++ if (!cxt) ++ return -EINVAL; ++ cxt->protect_bootbits = enable ? 1 : 0; ++ return 0; ++} ++ ++/** + * fdisk_get_npartitions: + * @cxt: context + * +diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c +index 6468071..f2308e3 100644 +--- a/libfdisk/src/dos.c ++++ b/libfdisk/src/dos.c +@@ -659,7 +659,10 @@ static int dos_create_disklabel(struct fdisk_context *cxt) + if (!has_id) + random_get_bytes(&id, sizeof(id)); + +- rc = fdisk_init_firstsector_buffer(cxt); ++ if (fdisk_has_protected_bootbits(cxt)) ++ rc = fdisk_init_firstsector_buffer(cxt, 0, MBR_PT_BOOTBITS_SIZE); ++ else ++ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); + if (rc) + return rc; + dos_init(cxt); +diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h +index dc561f3..0ca498d 100644 +--- a/libfdisk/src/fdiskP.h ++++ b/libfdisk/src/fdiskP.h +@@ -350,6 +350,7 @@ struct fdisk_context { + unsigned int readonly : 1, /* don't write to the device */ + display_in_cyl_units : 1, /* for obscure labels */ + display_details : 1, /* expert display mode */ ++ protect_bootbits : 1, /* don't zeroize fll irst sector */ + listonly : 1; /* list partition, nothing else */ + + int sizeunit; /* SIZE fields, FDISK_SIZEUNIT_* */ +@@ -402,7 +403,8 @@ extern int fdisk_apply_user_device_properties(struct fdisk_context *cxt); + extern void fdisk_zeroize_device_properties(struct fdisk_context *cxt); + + /* utils.c */ +-extern int fdisk_init_firstsector_buffer(struct fdisk_context *cxt); ++extern int fdisk_init_firstsector_buffer(struct fdisk_context *cxt, ++ unsigned int protect_off, unsigned int protect_size); + extern int fdisk_read_firstsector(struct fdisk_context *cxt); + extern char *fdisk_partname(const char *dev, size_t partno); + +diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c +index 61b0a32..22e2d16 100644 +--- a/libfdisk/src/gpt.c ++++ b/libfdisk/src/gpt.c +@@ -27,6 +27,7 @@ + #include "bitops.h" + #include "strutils.h" + #include "all-io.h" ++#include "pt-mbr.h" + + /** + * SECTION: gpt +@@ -406,7 +407,10 @@ static int gpt_mknew_pmbr(struct fdisk_context *cxt) + if (!cxt || !cxt->firstsector) + return -ENOSYS; + +- rc = fdisk_init_firstsector_buffer(cxt); ++ if (fdisk_has_protected_bootbits(cxt)) ++ rc = fdisk_init_firstsector_buffer(cxt, 0, MBR_PT_BOOTBITS_SIZE); ++ else ++ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); + if (rc) + return rc; + +diff --git a/libfdisk/src/libfdisk.h.in b/libfdisk/src/libfdisk.h.in +index 3aeef1e..78c0728 100644 +--- a/libfdisk/src/libfdisk.h.in ++++ b/libfdisk/src/libfdisk.h.in +@@ -211,6 +211,8 @@ enum { + int fdisk_set_size_unit(struct fdisk_context *cxt, int unit); + int fdisk_get_size_unit(struct fdisk_context *cxt); + ++int fdisk_has_protected_bootbits(struct fdisk_context *cxt); ++int fdisk_enable_bootbits_protection(struct fdisk_context *cxt, int enable); + + /* parttype.c */ + struct fdisk_parttype *fdisk_new_parttype(void); +diff --git a/libfdisk/src/libfdisk.sym b/libfdisk/src/libfdisk.sym +index 541b247..9f720ff 100644 +--- a/libfdisk/src/libfdisk.sym ++++ b/libfdisk/src/libfdisk.sym +@@ -239,3 +239,8 @@ global: + local: + *; + }; ++ ++FDISK_2.27 { ++ fdisk_enable_bootbits_protection; ++ fdisk_has_protected_bootbits; ++} FDISK_2.26; +diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c +index cd4cedf..7cc68b5 100644 +--- a/libfdisk/src/sgi.c ++++ b/libfdisk/src/sgi.c +@@ -965,7 +965,7 @@ static int sgi_create_disklabel(struct fdisk_context *cxt) + } + } + #endif +- rc = fdisk_init_firstsector_buffer(cxt); ++ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); + if (rc) + return rc; + +diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c +index d99c39f..27e3bdd 100644 +--- a/libfdisk/src/sun.c ++++ b/libfdisk/src/sun.c +@@ -209,7 +209,7 @@ static int sun_create_disklabel(struct fdisk_context *cxt) + assert(fdisk_is_label(cxt, SUN)); + + /* map first sector to header */ +- rc = fdisk_init_firstsector_buffer(cxt); ++ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); + if (rc) + return rc; + +diff --git a/libfdisk/src/utils.c b/libfdisk/src/utils.c +index 482a306..cc470d9 100644 +--- a/libfdisk/src/utils.c ++++ b/libfdisk/src/utils.c +@@ -10,14 +10,49 @@ + * @short_description: misc fdisk functions + */ + ++static int read_from_device(struct fdisk_context *cxt, ++ unsigned char *buf, ++ uintmax_t start, size_t size) ++{ ++ ssize_t r; ++ ++ assert(cxt); ++ ++ DBG(CXT, ul_debugobj(cxt, "reading: offset=%ju, size=%zu", ++ start, size)); ++ ++ r = lseek(cxt->dev_fd, start, SEEK_SET); ++ if (r == -1) ++ { ++ DBG(CXT, ul_debugobj(cxt, "failed to seek to offset %ju: %m", start)); ++ return -errno; ++ } ++ ++ r = read(cxt->dev_fd, buf, size); ++ if (r < 0 || r != size) { ++ if (!errno) ++ errno = EINVAL; /* probably too small file/device */ ++ DBG(CXT, ul_debugobj(cxt, "failed to read %zu from offset %ju: %m", ++ size, start)); ++ return -errno; ++ } ++ ++ return 0; ++} ++ ++ + /* + * Zeros in-memory first sector buffer + */ +-int fdisk_init_firstsector_buffer(struct fdisk_context *cxt) ++int fdisk_init_firstsector_buffer(struct fdisk_context *cxt, ++ unsigned int protect_off, ++ unsigned int protect_size) + { + if (!cxt) + return -EINVAL; + ++ assert(protect_off + protect_size <= cxt->sector_size); ++ + if (!cxt->firstsector || cxt->firstsector_bufsz != cxt->sector_size) { + /* Let's allocate a new buffer if no allocated yet, or the + * current buffer has incorrect size */ +@@ -36,43 +71,37 @@ int fdisk_init_firstsector_buffer(struct fdisk_context *cxt) + + DBG(CXT, ul_debugobj(cxt, "zeroize in-memory first sector buffer")); + memset(cxt->firstsector, 0, cxt->firstsector_bufsz); ++ ++ if (protect_size) { ++ /* ++ * It would be possible to reuse data from cxt->firstsector ++ * (call memset() for non-protected area only) and avoid one ++ * read() from the device, but it seems like a too fragile ++ * solution as we have no clue about stuff in the buffer -- ++ * maybe it was already modified. Let's re-read from the device ++ * to be sure. -- kzak 13-Apr-2015 ++ */ ++ DBG(CXT, ul_debugobj(cxt, "first sector protection enabled -- re-reading")); ++ read_from_device(cxt, cxt->firstsector, protect_off, protect_size); ++ } + return 0; + } + + int fdisk_read_firstsector(struct fdisk_context *cxt) + { +- ssize_t r; + int rc; + + assert(cxt); + assert(cxt->sector_size); + +- rc = fdisk_init_firstsector_buffer(cxt); ++ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); + if (rc) + return rc; + + assert(cxt->sector_size == cxt->firstsector_bufsz); + +- DBG(CXT, ul_debugobj(cxt, "reading first sector " +- "buffer [sector_size=%lu]", cxt->sector_size)); +- +- r = lseek(cxt->dev_fd, 0, SEEK_SET); +- if (r == -1) +- { +- DBG(CXT, ul_debugobj(cxt, "failed to seek to first sector %m")); +- return -errno; +- } +- +- r = read(cxt->dev_fd, cxt->firstsector, cxt->sector_size); + +- if (r != cxt->sector_size) { +- if (!errno) +- errno = EINVAL; /* probably too small file/device */ +- DBG(CXT, ul_debugobj(cxt, "failed to read first sector %m")); +- return -errno; +- } +- +- return 0; ++ return read_from_device(cxt, cxt->firstsector, 0, cxt->sector_size); + } + + /** +-- +2.1.0 + diff --git a/2.27-sfdisk-enable-bootbits-protection.patch b/2.27-sfdisk-enable-bootbits-protection.patch new file mode 100644 index 0000000..ddf7ae4 --- /dev/null +++ b/2.27-sfdisk-enable-bootbits-protection.patch @@ -0,0 +1,26 @@ +From 67414f247ef7a3177c1349de7e18fbfe7ad5f904 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 13 Apr 2015 13:41:10 +0200 +Subject: [PATCH 5/5] sfdisk: enable bootbits protection + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210428 +Signed-off-by: Karel Zak +--- + disk-utils/sfdisk.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c +index 8846df8..dcdae33 100644 +--- a/disk-utils/sfdisk.c ++++ b/disk-utils/sfdisk.c +@@ -190,6 +190,7 @@ static void sfdisk_init(struct sfdisk *sf) + if (!sf->cxt) + err(EXIT_FAILURE, _("failed to allocate libfdisk context")); + fdisk_set_ask(sf->cxt, ask_callback, (void *) sf); ++ fdisk_enable_bootbits_protection(sf->cxt, 1); + + if (sf->label_nested) { + struct fdisk_context *x = fdisk_new_nested_context(sf->cxt, +-- +2.1.0 + diff --git a/2.27-sfdisk-improve-N-warnings.patch b/2.27-sfdisk-improve-N-warnings.patch new file mode 100644 index 0000000..a628dff --- /dev/null +++ b/2.27-sfdisk-improve-N-warnings.patch @@ -0,0 +1,62 @@ +From 3275c1ac6d28c2257eb031277510bc9da99deedd Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 13 Apr 2015 12:08:50 +0200 +Subject: [PATCH 3/5] sfdisk: improve -N warnings + +Signed-off-by: Karel Zak +--- + disk-utils/sfdisk.8 | 9 ++++++++- + disk-utils/sfdisk.c | 9 +++++++-- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8 +index 66a8f99..0d63b6b 100644 +--- a/disk-utils/sfdisk.8 ++++ b/disk-utils/sfdisk.8 +@@ -57,7 +57,14 @@ input format. If standard input is a terminal, then \fBsfdisk\fR starts an + interactive session. + .sp + If the option \fB\-N\fR is specified, then the changes are applied to +-the partition addressed by \fIpartition-number\fR. ++the partition addressed by \fIpartition-number\fR. The unspecified fields ++of the partition are not modified. ++.sp ++Note that it's possible to address unused partition by \fB\-N\fR. For example ++MBR always contains 4 partitions, but the number of the used partitions may be ++smaller. In this case sfdisk follows the default values from the partition ++table and it does not use built-in defaults for the unused partition specified ++by \fB\-N\fR. See also \fB\---append\fR. + .TP + .BR \-a , " \-\-activate \fIdevice\fR [" \fIpartition-number\fR...] + Switch on the bootable flag. If no \fIpartition-number\fR is specified, +diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c +index 2e89d94..8846df8 100644 +--- a/disk-utils/sfdisk.c ++++ b/disk-utils/sfdisk.c +@@ -1109,16 +1109,21 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv) + */ + if (partno >= 0) { + size_t n; ++ + if (!fdisk_has_label(sf->cxt)) + errx(EXIT_FAILURE, _("%s: cannot modify partition %d: " + "no partition table was found"), +- devname, partno); ++ devname, partno + 1); + n = fdisk_get_npartitions(sf->cxt); + if ((size_t) partno > n) + errx(EXIT_FAILURE, _("%s: cannot modify partition %d: " + "partition table contains only %zu " + "partitions"), +- devname, partno, n); ++ devname, partno + 1, n); ++ ++ if (!fdisk_is_partition_used(sf->cxt, partno)) ++ fdisk_warnx(sf->cxt, _("warning: %s: partition %d is not defined yet"), ++ devname, partno + 1); + created = 1; + next_partno = partno; + } +-- +2.1.0 + diff --git a/sources b/sources index 79b1640..1cde402 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -912c550a4e5c47c0ce9abd0733fa9a64 util-linux-2.26.tar.xz +2308850946766677f3fabe0685e85de8 util-linux-2.26.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 6faec3f..6c26d6b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.26 +Version: 2.26.1 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -27,7 +27,7 @@ BuildRequires: libcap-ng-devel BuildRequires: python3-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -78,6 +78,13 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# upstream v2.27 / v2.26.2 backports (#1210428 and #1210912) +Patch1: 2.27-libfdisk-fix-symbols-versioning-script.patch +Patch2: 2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch +Patch3: 2.27-sfdisk-improve-N-warnings.patch +Patch4: 2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch +Patch5: 2.27-sfdisk-enable-bootbits-protection.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -879,6 +886,12 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Apr 13 2015 Karel Zak 2.26.1-1 +- upgrade to v2.26.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.1-ReleaseNotes +- fix #1210912 - sfdisk 2.26 does not retain existing boot flag when resizing a partition +- fix #1210428 - sfdisk 2.26 destroys existing boot sector when editing disk label + * Thu Feb 19 2015 Karel Zak 2.26-1 - upgrade to stable release 2.26 From 0b35981e89386aab4cab1f1b1c90e4e47813c085 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 Apr 2015 12:55:13 +0200 Subject: [PATCH 194/425] 2.26.2-1: upgrade to stable release --- .gitignore | 1 + ...ain-existing-boot-flag-when-resizing.patch | 62 --- ...bfdisk-fix-symbols-versioning-script.patch | 41 -- ...pport-bootbits-protection-from-p-MBR.patch | 357 ------------------ 2.27-sfdisk-enable-bootbits-protection.patch | 26 -- 2.27-sfdisk-improve-N-warnings.patch | 62 --- sources | 2 +- util-linux.spec | 13 +- 8 files changed, 7 insertions(+), 557 deletions(-) delete mode 100644 2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch delete mode 100644 2.27-libfdisk-fix-symbols-versioning-script.patch delete mode 100644 2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch delete mode 100644 2.27-sfdisk-enable-bootbits-protection.patch delete mode 100644 2.27-sfdisk-improve-N-warnings.patch diff --git a/.gitignore b/.gitignore index 4f7aeb9..a0ff80c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /util-linux-2.26-rc2.tar.xz /util-linux-2.26.tar.xz /util-linux-2.26.1.tar.xz +/util-linux-2.26.2.tar.xz diff --git a/2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch b/2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch deleted file mode 100644 index d15014d..0000000 --- a/2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 376484140cb7ef117616ac2880bd8ec18381b18f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 13 Apr 2015 10:29:00 +0200 -Subject: [PATCH 2/5] libfdisk: (dos) retain existing boot flag when resizing - a partition - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210912 -Signed-off-by: Karel Zak -Co-Author: awilliam@redhat.com ---- - libfdisk/src/dos.c | 8 +++++--- - libfdisk/src/partition.c | 3 +-- - 2 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c -index dce9829..6468071 100644 ---- a/libfdisk/src/dos.c -+++ b/libfdisk/src/dos.c -@@ -1221,7 +1221,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n, - } - } - -- set_partition(cxt, n, 0, start, stop, sys, pa && pa->boot == 1 ? 1 : 0); -+ set_partition(cxt, n, 0, start, stop, sys, fdisk_partition_is_bootable(pa)); - if (n > 4) { - struct pte *pe = self_pte(cxt, n); - set_partition(cxt, n - 1, 1, pe->offset, stop, -@@ -1963,13 +1963,15 @@ static int dos_set_partition(struct fdisk_context *cxt, size_t n, - - set_partition(cxt, n, 0, start, start + size - 1, - pa->type ? pa->type->code : p->sys_ind, -- pa->boot == 1); -+ FDISK_IS_UNDEF(pa->boot) ? -+ p->boot_ind == ACTIVE_FLAG : -+ fdisk_partition_is_bootable(pa)); - } else { - DBG(LABEL, ul_debug("DOS: keep size, modify properties")); - if (pa->type) - p->sys_ind = pa->type->code; - if (!FDISK_IS_UNDEF(pa->boot)) -- p->boot_ind = pa->boot == 1 ? ACTIVE_FLAG : 0; -+ p->boot_ind = fdisk_partition_is_bootable(pa) ? ACTIVE_FLAG : 0; - } - - partition_set_changed(cxt, n, 1); -diff --git a/libfdisk/src/partition.c b/libfdisk/src/partition.c -index 03c0eb5..a0b9ca5 100644 ---- a/libfdisk/src/partition.c -+++ b/libfdisk/src/partition.c -@@ -757,8 +757,7 @@ int fdisk_partition_to_string(struct fdisk_partition *pa, - } - break; - case FDISK_FIELD_BOOT: -- if (fdisk_partition_is_bootable(pa)) -- rc = asprintf(&p, "%c", pa->boot ? '*' : ' '); -+ p = fdisk_partition_is_bootable(pa) ? strdup("*") : NULL; - break; - case FDISK_FIELD_START: - if (fdisk_partition_has_start(pa)) { --- -2.1.0 - diff --git a/2.27-libfdisk-fix-symbols-versioning-script.patch b/2.27-libfdisk-fix-symbols-versioning-script.patch deleted file mode 100644 index 12f5ef1..0000000 --- a/2.27-libfdisk-fix-symbols-versioning-script.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 6ece2f94849d5c61920d435804fb72b59503686f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 25 Mar 2015 11:08:22 +0100 -Subject: [PATCH 1/5] libfdisk: fix symbols versioning script - -Really stupid copy & past mistake. The libfdisk symbols should not be -prefixed by MOUNT_ suffix. - -This change makes binaries linked with libfdisk 2.26 incompatible with -new libfdisk. Fortunately, 2.26 has been the first release and very -probably the library has been used for util-linux fdisks only. - -Signed-off-by: Karel Zak ---- - libfdisk/src/libfdisk.sym | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/libfdisk/src/libfdisk.sym b/libfdisk/src/libfdisk.sym -index 8364fe7..541b247 100644 ---- a/libfdisk/src/libfdisk.sym -+++ b/libfdisk/src/libfdisk.sym -@@ -1,11 +1,12 @@ - /* - * The symbol versioning ensures that a new application requiring symbol foo; -- * can't run with old libblkid.so not providing foo; -- * version info can't enforce this since we never change the SONAME. -+ * can't run with old library.so not providing foo. -+ -+ * Version info can't enforce this since we never change the SONAME. - * -- * Copyright (C) 2014 Karel Zak -+ * Copyright (C) 2014-2015 Karel Zak - */ --MOUNT_2.26 { -+FDISK_2.26 { - global: - fdisk_add_partition; - fdisk_align_lba; --- -2.1.0 - diff --git a/2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch b/2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch deleted file mode 100644 index 0da79a9..0000000 --- a/2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch +++ /dev/null @@ -1,357 +0,0 @@ -From 4bcc9fdca681b48c54954924608b8c337d61fbad Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 13 Apr 2015 13:40:25 +0200 -Subject: [PATCH 4/5] libfdisk: support bootbits protection from (p)MBR - -Signed-off-by: Karel Zak ---- - include/pt-mbr.h | 1 + - libfdisk/docs/libfdisk-sections.txt | 6 ++- - libfdisk/src/context.c | 33 ++++++++++++++++- - libfdisk/src/dos.c | 5 ++- - libfdisk/src/fdiskP.h | 4 +- - libfdisk/src/gpt.c | 6 ++- - libfdisk/src/libfdisk.h.in | 2 + - libfdisk/src/libfdisk.sym | 5 +++ - libfdisk/src/sgi.c | 2 +- - libfdisk/src/sun.c | 2 +- - libfdisk/src/utils.c | 73 ++++++++++++++++++++++++++----------- - 11 files changed, 109 insertions(+), 30 deletions(-) - -diff --git a/include/pt-mbr.h b/include/pt-mbr.h -index 1279e3c..6957b95 100644 ---- a/include/pt-mbr.h -+++ b/include/pt-mbr.h -@@ -11,6 +11,7 @@ struct dos_partition { - } __attribute__((packed)); - - #define MBR_PT_OFFSET 0x1be -+#define MBR_PT_BOOTBITS_SIZE 440 - - static inline struct dos_partition *mbr_get_partition(unsigned char *mbr, int i) - { -diff --git a/libfdisk/docs/libfdisk-sections.txt b/libfdisk/docs/libfdisk-sections.txt -index 676d500..2d5cd92 100644 ---- a/libfdisk/docs/libfdisk-sections.txt -+++ b/libfdisk/docs/libfdisk-sections.txt -@@ -279,6 +279,7 @@ fdisk_unref_table - fdisk_context - fdisk_assign_device - fdisk_deassign_device -+fdisk_enable_bootbits_protection - fdisk_enable_details - fdisk_enable_listonly - fdisk_get_alignment_offset -@@ -297,22 +298,23 @@ fdisk_get_parent - fdisk_get_physector_size - fdisk_get_sector_size - fdisk_get_size_unit --FDISK_PLURAL --FDISK_SINGULAR - fdisk_get_unit - fdisk_get_units_per_sector - fdisk_has_label -+fdisk_has_protected_bootbits - fdisk_is_details - fdisk_is_labeltype - fdisk_is_listonly - fdisk_is_readonly - fdisk_new_context - fdisk_new_nested_context -+FDISK_PLURAL - fdisk_ref_context - fdisk_set_first_lba - fdisk_set_last_lba - fdisk_set_size_unit - fdisk_set_unit -+FDISK_SINGULAR - fdisk_unref_context - fdisk_use_cylinders - -diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c -index 84867b0..efc961c 100644 ---- a/libfdisk/src/context.c -+++ b/libfdisk/src/context.c -@@ -94,12 +94,13 @@ static int init_nested_from_parent(struct fdisk_context *cxt, int isnew) - cxt->user_log_sector = parent->user_log_sector; - cxt->user_pyh_sector = parent->user_pyh_sector; - -- /* parent <--> nested independent setting, initialize for new nested -+ /* parent <--> nested independent setting, initialize for new nested - * contexts only */ - if (isnew) { - cxt->listonly = parent->listonly; - cxt->display_details = parent->display_details; - cxt->display_in_cyl_units = parent->display_in_cyl_units; -+ cxt->protect_bootbits = parent->protect_bootbits; - } - - free(cxt->dev_path); -@@ -304,6 +305,36 @@ int fdisk_has_label(struct fdisk_context *cxt) - } - - /** -+ * fdisk_has_protected_bootbits: -+ * @cxt: fdisk context -+ * -+ * Returns: return 1 if boot bits protection enabled. -+ */ -+int fdisk_has_protected_bootbits(struct fdisk_context *cxt) -+{ -+ return cxt && cxt->protect_bootbits; -+} -+ -+/** -+ * fdisk_enable_bootbits_protection: -+ * @cxt: fdisk context -+ * @enable: 1 or 0 -+ * -+ * The library zeroizes all the first sector when create a new disk label by -+ * default. This function allows to control this behavior. For now it's -+ * supported for MBR and GPT. -+ * -+ * Returns: 0 on success, < 0 on error. -+ */ -+int fdisk_enable_bootbits_protection(struct fdisk_context *cxt, int enable) -+{ -+ if (!cxt) -+ return -EINVAL; -+ cxt->protect_bootbits = enable ? 1 : 0; -+ return 0; -+} -+ -+/** - * fdisk_get_npartitions: - * @cxt: context - * -diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c -index 6468071..f2308e3 100644 ---- a/libfdisk/src/dos.c -+++ b/libfdisk/src/dos.c -@@ -659,7 +659,10 @@ static int dos_create_disklabel(struct fdisk_context *cxt) - if (!has_id) - random_get_bytes(&id, sizeof(id)); - -- rc = fdisk_init_firstsector_buffer(cxt); -+ if (fdisk_has_protected_bootbits(cxt)) -+ rc = fdisk_init_firstsector_buffer(cxt, 0, MBR_PT_BOOTBITS_SIZE); -+ else -+ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); - if (rc) - return rc; - dos_init(cxt); -diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h -index dc561f3..0ca498d 100644 ---- a/libfdisk/src/fdiskP.h -+++ b/libfdisk/src/fdiskP.h -@@ -350,6 +350,7 @@ struct fdisk_context { - unsigned int readonly : 1, /* don't write to the device */ - display_in_cyl_units : 1, /* for obscure labels */ - display_details : 1, /* expert display mode */ -+ protect_bootbits : 1, /* don't zeroize fll irst sector */ - listonly : 1; /* list partition, nothing else */ - - int sizeunit; /* SIZE fields, FDISK_SIZEUNIT_* */ -@@ -402,7 +403,8 @@ extern int fdisk_apply_user_device_properties(struct fdisk_context *cxt); - extern void fdisk_zeroize_device_properties(struct fdisk_context *cxt); - - /* utils.c */ --extern int fdisk_init_firstsector_buffer(struct fdisk_context *cxt); -+extern int fdisk_init_firstsector_buffer(struct fdisk_context *cxt, -+ unsigned int protect_off, unsigned int protect_size); - extern int fdisk_read_firstsector(struct fdisk_context *cxt); - extern char *fdisk_partname(const char *dev, size_t partno); - -diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c -index 61b0a32..22e2d16 100644 ---- a/libfdisk/src/gpt.c -+++ b/libfdisk/src/gpt.c -@@ -27,6 +27,7 @@ - #include "bitops.h" - #include "strutils.h" - #include "all-io.h" -+#include "pt-mbr.h" - - /** - * SECTION: gpt -@@ -406,7 +407,10 @@ static int gpt_mknew_pmbr(struct fdisk_context *cxt) - if (!cxt || !cxt->firstsector) - return -ENOSYS; - -- rc = fdisk_init_firstsector_buffer(cxt); -+ if (fdisk_has_protected_bootbits(cxt)) -+ rc = fdisk_init_firstsector_buffer(cxt, 0, MBR_PT_BOOTBITS_SIZE); -+ else -+ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); - if (rc) - return rc; - -diff --git a/libfdisk/src/libfdisk.h.in b/libfdisk/src/libfdisk.h.in -index 3aeef1e..78c0728 100644 ---- a/libfdisk/src/libfdisk.h.in -+++ b/libfdisk/src/libfdisk.h.in -@@ -211,6 +211,8 @@ enum { - int fdisk_set_size_unit(struct fdisk_context *cxt, int unit); - int fdisk_get_size_unit(struct fdisk_context *cxt); - -+int fdisk_has_protected_bootbits(struct fdisk_context *cxt); -+int fdisk_enable_bootbits_protection(struct fdisk_context *cxt, int enable); - - /* parttype.c */ - struct fdisk_parttype *fdisk_new_parttype(void); -diff --git a/libfdisk/src/libfdisk.sym b/libfdisk/src/libfdisk.sym -index 541b247..9f720ff 100644 ---- a/libfdisk/src/libfdisk.sym -+++ b/libfdisk/src/libfdisk.sym -@@ -239,3 +239,8 @@ global: - local: - *; - }; -+ -+FDISK_2.27 { -+ fdisk_enable_bootbits_protection; -+ fdisk_has_protected_bootbits; -+} FDISK_2.26; -diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c -index cd4cedf..7cc68b5 100644 ---- a/libfdisk/src/sgi.c -+++ b/libfdisk/src/sgi.c -@@ -965,7 +965,7 @@ static int sgi_create_disklabel(struct fdisk_context *cxt) - } - } - #endif -- rc = fdisk_init_firstsector_buffer(cxt); -+ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); - if (rc) - return rc; - -diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c -index d99c39f..27e3bdd 100644 ---- a/libfdisk/src/sun.c -+++ b/libfdisk/src/sun.c -@@ -209,7 +209,7 @@ static int sun_create_disklabel(struct fdisk_context *cxt) - assert(fdisk_is_label(cxt, SUN)); - - /* map first sector to header */ -- rc = fdisk_init_firstsector_buffer(cxt); -+ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); - if (rc) - return rc; - -diff --git a/libfdisk/src/utils.c b/libfdisk/src/utils.c -index 482a306..cc470d9 100644 ---- a/libfdisk/src/utils.c -+++ b/libfdisk/src/utils.c -@@ -10,14 +10,49 @@ - * @short_description: misc fdisk functions - */ - -+static int read_from_device(struct fdisk_context *cxt, -+ unsigned char *buf, -+ uintmax_t start, size_t size) -+{ -+ ssize_t r; -+ -+ assert(cxt); -+ -+ DBG(CXT, ul_debugobj(cxt, "reading: offset=%ju, size=%zu", -+ start, size)); -+ -+ r = lseek(cxt->dev_fd, start, SEEK_SET); -+ if (r == -1) -+ { -+ DBG(CXT, ul_debugobj(cxt, "failed to seek to offset %ju: %m", start)); -+ return -errno; -+ } -+ -+ r = read(cxt->dev_fd, buf, size); -+ if (r < 0 || r != size) { -+ if (!errno) -+ errno = EINVAL; /* probably too small file/device */ -+ DBG(CXT, ul_debugobj(cxt, "failed to read %zu from offset %ju: %m", -+ size, start)); -+ return -errno; -+ } -+ -+ return 0; -+} -+ -+ - /* - * Zeros in-memory first sector buffer - */ --int fdisk_init_firstsector_buffer(struct fdisk_context *cxt) -+int fdisk_init_firstsector_buffer(struct fdisk_context *cxt, -+ unsigned int protect_off, -+ unsigned int protect_size) - { - if (!cxt) - return -EINVAL; - -+ assert(protect_off + protect_size <= cxt->sector_size); -+ - if (!cxt->firstsector || cxt->firstsector_bufsz != cxt->sector_size) { - /* Let's allocate a new buffer if no allocated yet, or the - * current buffer has incorrect size */ -@@ -36,43 +71,37 @@ int fdisk_init_firstsector_buffer(struct fdisk_context *cxt) - - DBG(CXT, ul_debugobj(cxt, "zeroize in-memory first sector buffer")); - memset(cxt->firstsector, 0, cxt->firstsector_bufsz); -+ -+ if (protect_size) { -+ /* -+ * It would be possible to reuse data from cxt->firstsector -+ * (call memset() for non-protected area only) and avoid one -+ * read() from the device, but it seems like a too fragile -+ * solution as we have no clue about stuff in the buffer -- -+ * maybe it was already modified. Let's re-read from the device -+ * to be sure. -- kzak 13-Apr-2015 -+ */ -+ DBG(CXT, ul_debugobj(cxt, "first sector protection enabled -- re-reading")); -+ read_from_device(cxt, cxt->firstsector, protect_off, protect_size); -+ } - return 0; - } - - int fdisk_read_firstsector(struct fdisk_context *cxt) - { -- ssize_t r; - int rc; - - assert(cxt); - assert(cxt->sector_size); - -- rc = fdisk_init_firstsector_buffer(cxt); -+ rc = fdisk_init_firstsector_buffer(cxt, 0, 0); - if (rc) - return rc; - - assert(cxt->sector_size == cxt->firstsector_bufsz); - -- DBG(CXT, ul_debugobj(cxt, "reading first sector " -- "buffer [sector_size=%lu]", cxt->sector_size)); -- -- r = lseek(cxt->dev_fd, 0, SEEK_SET); -- if (r == -1) -- { -- DBG(CXT, ul_debugobj(cxt, "failed to seek to first sector %m")); -- return -errno; -- } -- -- r = read(cxt->dev_fd, cxt->firstsector, cxt->sector_size); - -- if (r != cxt->sector_size) { -- if (!errno) -- errno = EINVAL; /* probably too small file/device */ -- DBG(CXT, ul_debugobj(cxt, "failed to read first sector %m")); -- return -errno; -- } -- -- return 0; -+ return read_from_device(cxt, cxt->firstsector, 0, cxt->sector_size); - } - - /** --- -2.1.0 - diff --git a/2.27-sfdisk-enable-bootbits-protection.patch b/2.27-sfdisk-enable-bootbits-protection.patch deleted file mode 100644 index ddf7ae4..0000000 --- a/2.27-sfdisk-enable-bootbits-protection.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 67414f247ef7a3177c1349de7e18fbfe7ad5f904 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 13 Apr 2015 13:41:10 +0200 -Subject: [PATCH 5/5] sfdisk: enable bootbits protection - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210428 -Signed-off-by: Karel Zak ---- - disk-utils/sfdisk.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c -index 8846df8..dcdae33 100644 ---- a/disk-utils/sfdisk.c -+++ b/disk-utils/sfdisk.c -@@ -190,6 +190,7 @@ static void sfdisk_init(struct sfdisk *sf) - if (!sf->cxt) - err(EXIT_FAILURE, _("failed to allocate libfdisk context")); - fdisk_set_ask(sf->cxt, ask_callback, (void *) sf); -+ fdisk_enable_bootbits_protection(sf->cxt, 1); - - if (sf->label_nested) { - struct fdisk_context *x = fdisk_new_nested_context(sf->cxt, --- -2.1.0 - diff --git a/2.27-sfdisk-improve-N-warnings.patch b/2.27-sfdisk-improve-N-warnings.patch deleted file mode 100644 index a628dff..0000000 --- a/2.27-sfdisk-improve-N-warnings.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 3275c1ac6d28c2257eb031277510bc9da99deedd Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 13 Apr 2015 12:08:50 +0200 -Subject: [PATCH 3/5] sfdisk: improve -N warnings - -Signed-off-by: Karel Zak ---- - disk-utils/sfdisk.8 | 9 ++++++++- - disk-utils/sfdisk.c | 9 +++++++-- - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8 -index 66a8f99..0d63b6b 100644 ---- a/disk-utils/sfdisk.8 -+++ b/disk-utils/sfdisk.8 -@@ -57,7 +57,14 @@ input format. If standard input is a terminal, then \fBsfdisk\fR starts an - interactive session. - .sp - If the option \fB\-N\fR is specified, then the changes are applied to --the partition addressed by \fIpartition-number\fR. -+the partition addressed by \fIpartition-number\fR. The unspecified fields -+of the partition are not modified. -+.sp -+Note that it's possible to address unused partition by \fB\-N\fR. For example -+MBR always contains 4 partitions, but the number of the used partitions may be -+smaller. In this case sfdisk follows the default values from the partition -+table and it does not use built-in defaults for the unused partition specified -+by \fB\-N\fR. See also \fB\---append\fR. - .TP - .BR \-a , " \-\-activate \fIdevice\fR [" \fIpartition-number\fR...] - Switch on the bootable flag. If no \fIpartition-number\fR is specified, -diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c -index 2e89d94..8846df8 100644 ---- a/disk-utils/sfdisk.c -+++ b/disk-utils/sfdisk.c -@@ -1109,16 +1109,21 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv) - */ - if (partno >= 0) { - size_t n; -+ - if (!fdisk_has_label(sf->cxt)) - errx(EXIT_FAILURE, _("%s: cannot modify partition %d: " - "no partition table was found"), -- devname, partno); -+ devname, partno + 1); - n = fdisk_get_npartitions(sf->cxt); - if ((size_t) partno > n) - errx(EXIT_FAILURE, _("%s: cannot modify partition %d: " - "partition table contains only %zu " - "partitions"), -- devname, partno, n); -+ devname, partno + 1, n); -+ -+ if (!fdisk_is_partition_used(sf->cxt, partno)) -+ fdisk_warnx(sf->cxt, _("warning: %s: partition %d is not defined yet"), -+ devname, partno + 1); - created = 1; - next_partno = partno; - } --- -2.1.0 - diff --git a/sources b/sources index 1cde402..07fa975 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2308850946766677f3fabe0685e85de8 util-linux-2.26.1.tar.xz +9bdf368c395f1b70325d0eb22c7f48fb util-linux-2.26.2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 6c26d6b..d5fc753 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.26.1 +Version: 2.26.2 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -78,13 +78,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# upstream v2.27 / v2.26.2 backports (#1210428 and #1210912) -Patch1: 2.27-libfdisk-fix-symbols-versioning-script.patch -Patch2: 2.27-libfdisk-dos-retain-existing-boot-flag-when-resizing.patch -Patch3: 2.27-sfdisk-improve-N-warnings.patch -Patch4: 2.27-libfdisk-support-bootbits-protection-from-p-MBR.patch -Patch5: 2.27-sfdisk-enable-bootbits-protection.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -886,6 +879,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Apr 30 2015 Karel Zak 2.26.2-1 +- upgrade to v2.26.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.2-ReleaseNotes + * Mon Apr 13 2015 Karel Zak 2.26.1-1 - upgrade to v2.26.1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.1-ReleaseNotes From 05c81d18b214f3a4195fbe3a40b778be5a0e00b3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 Apr 2015 13:27:55 +0200 Subject: [PATCH 195/425] 2.26.2-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 83370dc..6139a25 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /util-linux-2.26-rc1.tar.xz /util-linux-2.26-rc2.tar.xz /util-linux-2.26.tar.xz +/util-linux-2.26.2.tar.xz diff --git a/sources b/sources index 79b1640..07fa975 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -912c550a4e5c47c0ce9abd0733fa9a64 util-linux-2.26.tar.xz +9bdf368c395f1b70325d0eb22c7f48fb util-linux-2.26.2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 77c91cd..af2f3dd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.26 -Release: 2%{?dist} +Version: 2.26.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -27,7 +27,7 @@ BuildRequires: libcap-ng-devel BuildRequires: python3-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -879,6 +879,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Apr 30 2015 Karel Zak - 2.26.2-1 +- upgrade to stable release 2.26.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.2-ReleaseNotes + * Sat Feb 21 2015 Till Maas - 2.26-2 - Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code From fa67a47381f0bdd3a960035ac892634cb484b188 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Mon, 15 Jun 2015 17:11:18 +0200 Subject: [PATCH 196/425] Adding STAGE1 bootstrap recipe --- STAGE1-util-linux | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 STAGE1-util-linux diff --git a/STAGE1-util-linux b/STAGE1-util-linux new file mode 100644 index 0000000..9e6d76a --- /dev/null +++ b/STAGE1-util-linux @@ -0,0 +1,12 @@ +srpm util-linux +mcd $BUILDDIR/$1 +cat < config.cache +ax_cv_have_tls=yes +scanf_cv_alloc_modifier=ms +EOF +$SRC/${1}-*/configure $TCONFIGARGS --without-ncurses \ + --prefix=/usr --libexecdir=/usr/lib${SUFFIX} --libdir=/usr/lib${SUFFIX} \ + --disable-wall --cache-file=config.cache --without-python --without-systemd +notparallel +make $J V=1 +make $J install DESTDIR=${ROOTFS} From ee6d69b1224ced5d9d1af309b54aa08f37b5048a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:44:05 +0000 Subject: [PATCH 197/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index af2f3dd..58e60cb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -879,6 +879,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 2.26.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Apr 30 2015 Karel Zak - 2.26.2-1 - upgrade to stable release 2.26.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.2-ReleaseNotes From b92fbbf0f87ac67f3d0f19f3dcb0403e42d79b91 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Tue, 30 Jun 2015 15:04:59 +0200 Subject: [PATCH 198/425] Adding --without-tinfo to STAGE1 recipe When the configure script finds no tinfo headers in the buildroot, it searches for them on the host's rootfs and when found there, it marks tinfo as present even when there's no compatible library installed for the target architecture. That causes the build to fail during cross-compiling. The above switch explicitly says we don't want tinfo. --- STAGE1-util-linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STAGE1-util-linux b/STAGE1-util-linux index 9e6d76a..f492ecb 100644 --- a/STAGE1-util-linux +++ b/STAGE1-util-linux @@ -4,7 +4,7 @@ cat < config.cache ax_cv_have_tls=yes scanf_cv_alloc_modifier=ms EOF -$SRC/${1}-*/configure $TCONFIGARGS --without-ncurses \ +$SRC/${1}-*/configure $TCONFIGARGS --without-ncurses --without-tinfo \ --prefix=/usr --libexecdir=/usr/lib${SUFFIX} --libdir=/usr/lib${SUFFIX} \ --disable-wall --cache-file=config.cache --without-python --without-systemd notparallel From 781e4d0274833764a48b67f8c76403a0b4b13ab4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 16 Jul 2015 12:13:18 +0200 Subject: [PATCH 199/425] 2.26.2-3: fix spec file dates --- util-linux.spec | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 58e60cb..49f1479 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.26.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -367,7 +367,7 @@ for I in /sbin/sfdisk \ done %endif -# we install getopt-*.{bash,tcsh} by %doc directive +# we install getopt-*.{bash,tcsh} by doc directive chmod 644 misc-utils/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt @@ -879,6 +879,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jul 16 2015 Karel Zak - 2.26.2-3 +- fix dates in the spec file + * Fri Jun 19 2015 Fedora Release Engineering - 2.26.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild @@ -911,7 +914,7 @@ exit 0 * Thu Nov 27 2014 Karel Zak 2.25.2-2 - fix #1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid -* Wed Oct 24 2014 Karel Zak 2.25.2-1 +* Fri Oct 24 2014 Karel Zak 2.25.2-1 - upgrade to stable 2.25.2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.2-ReleaseNotes @@ -1077,7 +1080,7 @@ exit 0 - apply pathes from upstream stable/v2.22 branch - fix #865961 - wipefs -a should use O_EXCL -* Thu Oct 10 2012 Karel Zak 2.22.1-1 +* Wed Oct 10 2012 Karel Zak 2.22.1-1 - upgrade to the release 2.22.1 * Wed Oct 3 2012 Karel Zak 2.22-2 @@ -1116,7 +1119,7 @@ exit 0 * Thu Feb 09 2012 Karel Zak 2.21-0.2 - fix #788703 - /run/blkid does not exist -* Thu Feb 07 2012 Karel Zak 2.21-0.1 +* Tue Feb 07 2012 Karel Zak 2.21-0.1 - upgrade to the release 2.21-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ReleaseNotes - add {fsck,mkfs}.minix @@ -1151,7 +1154,7 @@ exit 0 - upgrade to the release 2.20-rc2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-rc2-ChangeLog -* Fri Aug 2 2011 Karel Zak 2.20-0.1 +* Tue Aug 2 2011 Karel Zak 2.20-0.1 - upgrade to the release 2.20-rc1 ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-ReleaseNotes @@ -1259,7 +1262,7 @@ exit 0 - 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 +* Fri 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 @@ -1531,7 +1534,7 @@ exit 0 - 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 +* Thu 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 @@ -1655,11 +1658,11 @@ exit 0 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 +* Thu 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 +* Thu Mar 9 2006 Jesse Keating 2.13-0.19 - restorecon /var/log/lastlog * Wed Mar 8 2006 Karel Zak 2.13-0.17 @@ -1923,7 +1926,7 @@ exit 0 - 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 +* Sat 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. @@ -2022,7 +2025,7 @@ exit 0 * Wed Jul 23 2003 Elliot Lee 2.11y-22 - #100433 patch -* Mon Jun 14 2003 Elliot Lee 2.11y-20 +* Sat Jun 14 2003 Elliot Lee 2.11y-20 - #97381 patch * Wed Jun 04 2003 Elliot Lee @@ -2204,7 +2207,7 @@ slang-devel. * 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 +* Mon Jan 28 2002 Bill Nottingham 2.11n-4 - remove kbdrate (fixes kbd conflict) * Fri Dec 28 2001 Elliot Lee 2.11n-3 From 6278f8fb465f91a7de96aede89f6f5dd0fb65b96 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 16 Jul 2015 12:35:07 +0200 Subject: [PATCH 200/425] 2.26.2-3: add dependence on systemd --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index 49f1479..94c26ba 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -22,6 +22,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel BuildRequires: libutempter-devel Buildrequires: systemd-devel +BuildRequires: systemd Buildrequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: python3-devel From bfcb468173e27c5cfbb2e18ed346be9acaf48d52 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 31 Jul 2015 13:10:27 +0200 Subject: [PATCH 201/425] v2.27: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 14 +++++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6139a25..47d5645 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /util-linux-2.26-rc2.tar.xz /util-linux-2.26.tar.xz /util-linux-2.26.2.tar.xz +/util-linux-2.27-rc1.tar.xz diff --git a/sources b/sources index 07fa975..4481496 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9bdf368c395f1b70325d0eb22c7f48fb util-linux-2.26.2.tar.xz +500b9de1acc3601a69d6a0b2310da471 util-linux-2.27-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 94c26ba..97ace52 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.26.2 -Release: 3%{?dist} +Version: 2.27 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux -%define upstream_version %{version} +%define upstream_version %{version}-rc1 ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -515,6 +515,7 @@ exit 0 %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/lslogins %{_bindir}/mcookie @@ -568,6 +569,7 @@ exit 0 %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* +%{_mandir}/man1/lsipc.1* %{_mandir}/man1/lslogins.1* %{_mandir}/man1/mcookie.1* %{_mandir}/man1/mesg.1* @@ -716,6 +718,7 @@ exit 0 %{compldir}/losetup %{compldir}/lsblk %{compldir}/lscpu +%{compldir}/lsipc %{compldir}/lslocks %{compldir}/mcookie %{compldir}/mesg @@ -880,6 +883,11 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Jul 31 2015 Karel Zak - 2.27-0.1 +- upgrade to v2.27-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27-ReleaseNotes +- add lsipc + * Thu Jul 16 2015 Karel Zak - 2.26.2-3 - fix dates in the spec file From 185c052093bfbf83929466ef2395d9859f1d59ca Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 12 Aug 2015 10:56:45 +0200 Subject: [PATCH 202/425] 2.27-0.2: #1251320 and specfile portability --- util-linux.spec | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 97ace52..0bd415e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,19 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux %define upstream_version %{version}-rc1 +%if 0%{?fedora} >= 23 +%define pypkg python3 +%define pyver 3 +%else +%define pypkg python +%define pyver 2 +%endif ### Macros %define compldir %{_datadir}/bash-completion/completions/ @@ -25,10 +32,10 @@ Buildrequires: systemd-devel BuildRequires: systemd Buildrequires: libuser-devel BuildRequires: libcap-ng-devel -BuildRequires: python3-devel +BuildRequires: %{pypkg}-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{version}/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -231,13 +238,13 @@ uniqueness of time-based UUID generation even at very high rates on SMP systems. -%package -n python3-libmount +%package -n %{pypkg}-libmount Summary: Python bindings for the libmount library Group: Development/Libraries Requires: libmount = %{version}-%{release} License: LGPLv2+ -%description -n python3-libmount +%description -n %{pypkg}-libmount The libmount-python package contains a module that permits applications written in the Python programming language to use the interface supplied by the libmount library to work with mount tables (fstab, @@ -261,10 +268,11 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --disable-bfs \ --disable-pg \ --enable-chfn-chsh \ + --enable-usrdir-path \ --enable-write \ --enable-raw \ --enable-libmount-force-mountinfo \ - --with-python=3 \ + --with-python=%{pyver} \ --with-systemd \ --with-udev \ --with-selinux \ @@ -876,13 +884,17 @@ exit 0 %{_mandir}/man3/uuid_unparse.3* %{_libdir}/pkgconfig/uuid.pc -%files -n python3-libmount +%files -n %{pypkg}-libmount %defattr(-, root, root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Aug 12 2015 Karel Zak - 2.27-0.2 +- fix #1251320 - rfe: please change login to not add /bin:/sbin to $PATH +- apply patches from Lokesh Mandvekar to make spec file more portable + * Fri Jul 31 2015 Karel Zak - 2.27-0.1 - upgrade to v2.27-rc1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27-ReleaseNotes From 298e4e50ad38132e6e1f63ff8f832bfeb6e28904 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 13 Aug 2015 11:35:50 +0200 Subject: [PATCH 203/425] 2.27-0.3: small spec file changes --- util-linux.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 0bd415e..c194593 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,17 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux +### Macros %define upstream_version %{version}-rc1 +%define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') + +%define compldir %{_datadir}/bash-completion/completions/ + %if 0%{?fedora} >= 23 %define pypkg python3 %define pyver 3 @@ -16,8 +21,6 @@ URL: http://en.wikipedia.org/wiki/Util-linux %define pyver 2 %endif -### Macros -%define compldir %{_datadir}/bash-completion/completions/ ### Dependencies BuildRequires: audit-libs-devel >= 1.0.6 @@ -35,7 +38,7 @@ BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{version}/util-linux-%{upstream_version}.tar.xz +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -891,6 +894,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Aug 13 2015 Karel Zak - 2.27-0.3 +- improve version usage in source url + * Wed Aug 12 2015 Karel Zak - 2.27-0.2 - fix #1251320 - rfe: please change login to not add /bin:/sbin to $PATH - apply patches from Lokesh Mandvekar to make spec file more portable From 1dd1b6a1821dc1f9e88371c25452de9f476eb7e1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 24 Aug 2015 13:18:12 +0200 Subject: [PATCH 204/425] 2.27-0.4: upgrade to rc2 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 47d5645..b6eea61 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ /util-linux-2.26.tar.xz /util-linux-2.26.2.tar.xz /util-linux-2.27-rc1.tar.xz +/util-linux-2.27-rc2.tar.xz diff --git a/sources b/sources index 4481496..b48dcbd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -500b9de1acc3601a69d6a0b2310da471 util-linux-2.27-rc1.tar.xz +2fbd1d2a3f856155dd3231c2a61c2e98 util-linux-2.27-rc2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index c194593..1351282 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -894,6 +894,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Aug 24 2015 Karel Zak - 2.27-0.4 +- upgrade to v2.27-rc2 + * Thu Aug 13 2015 Karel Zak - 2.27-0.3 - improve version usage in source url From 1a7e2063fd9b810edb24945d6ca7cdf397623cef Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 7 Sep 2015 12:59:30 +0200 Subject: [PATCH 205/425] 2.27-1: upgrade to stable v2.27 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b6eea61..09813fe 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ /util-linux-2.26.2.tar.xz /util-linux-2.27-rc1.tar.xz /util-linux-2.27-rc2.tar.xz +/util-linux-2.27.tar.xz diff --git a/sources b/sources index b48dcbd..e14f656 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2fbd1d2a3f856155dd3231c2a61c2e98 util-linux-2.27-rc2.tar.xz +5b06bbda9309624ee7add15bc8d8ca22 util-linux-2.27.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 1351282..d4a17a9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27 -Release: 0.4%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -894,6 +894,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Sep 7 2015 Karel Zak - 2.27 +- upgrade to v2.27 + * Mon Aug 24 2015 Karel Zak - 2.27-0.4 - upgrade to v2.27-rc2 From 6af60835d37c4d6d6bfb5733e9ab04354073d69a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 2 Nov 2015 12:37:45 +0100 Subject: [PATCH 206/425] 2.27.1-1: upgrade to stable release --- .gitignore | 1 + sources | 2 +- util-linux.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 09813fe..f0b7163 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ /util-linux-2.27-rc1.tar.xz /util-linux-2.27-rc2.tar.xz /util-linux-2.27.tar.xz +/util-linux-2.27.1.tar.xz diff --git a/sources b/sources index e14f656..eb41972 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5b06bbda9309624ee7add15bc8d8ca22 util-linux-2.27.tar.xz +3cd2698d1363a2c64091c2dadc974647 util-linux-2.27.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index d4a17a9..7ca01bd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.27 +Version: 2.27.1 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -894,6 +894,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Nov 2 2015 Karel Zak - 2.27.1 +- upgrade to v2.27.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + * Mon Sep 7 2015 Karel Zak - 2.27 - upgrade to v2.27 From 9da9be552ab7ae7b5222e68c82d2057dc7bdd90c Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 10 Nov 2015 18:14:40 +0000 Subject: [PATCH 207/425] - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 7ca01bd..fa3fe5b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -894,6 +894,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Nov 10 2015 Fedora Release Engineering - 2.27.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + * Mon Nov 2 2015 Karel Zak - 2.27.1 - upgrade to v2.27.1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes From c9e662019e424711bc6ddd7c5c29c7a8e2df25b1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Nov 2015 12:23:52 +0100 Subject: [PATCH 208/425] 2.27.1-3: improve things for #1259745 --- 2.27-blkid-zfs-raid.patch | 13 +++++++++++++ util-linux.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 2.27-blkid-zfs-raid.patch diff --git a/2.27-blkid-zfs-raid.patch b/2.27-blkid-zfs-raid.patch new file mode 100644 index 0000000..14f6926 --- /dev/null +++ b/2.27-blkid-zfs-raid.patch @@ -0,0 +1,13 @@ +diff -up util-linux-2.27.1/libblkid/src/probe.c.kzak util-linux-2.27.1/libblkid/src/probe.c +diff -up util-linux-2.27.1/libblkid/src/superblocks/zfs.c.kzak util-linux-2.27.1/libblkid/src/superblocks/zfs.c +--- util-linux-2.27.1/libblkid/src/superblocks/zfs.c.kzak 2015-11-02 10:07:34.567648465 +0100 ++++ util-linux-2.27.1/libblkid/src/superblocks/zfs.c 2015-11-18 12:13:32.716188023 +0100 +@@ -258,7 +258,7 @@ static int probe_zfs(blkid_probe pr, con + const struct blkid_idinfo zfs_idinfo = + { + .name = "zfs_member", +- .usage = BLKID_USAGE_RAID, ++ .usage = BLKID_USAGE_FILESYSTEM, + .probefunc = probe_zfs, + .minsz = 64 * 1024 * 1024, + .magics = BLKID_NONE_MAGIC diff --git a/util-linux.spec b/util-linux.spec index fa3fe5b..46c997b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -88,6 +88,8 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# 1259745 - Can't start installation in Rawhide or F23 recent development images +Patch1: 2.27-blkid-zfs-raid.patch %description The util-linux package contains a large variety of low-level system @@ -894,6 +896,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Nov 18 2015 Karel Zak - 2.27.1-3 +- fix #1259745 - Can't start installation in Rawhide or F23 recent development images + * Tue Nov 10 2015 Fedora Release Engineering - 2.27.1-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 From 9f10eae074f834172f216585ed9ebd604e1ffbfa Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 18 Jan 2016 15:15:15 +0100 Subject: [PATCH 209/425] 2.27.1-3: fix #1299255 --- libblkid-minix.patch | 13 +++++++++++++ util-linux.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 libblkid-minix.patch diff --git a/libblkid-minix.patch b/libblkid-minix.patch new file mode 100644 index 0000000..c913938 --- /dev/null +++ b/libblkid-minix.patch @@ -0,0 +1,13 @@ +diff -up util-linux-2.27.1/libblkid/src/superblocks/minix.c.kzak util-linux-2.27.1/libblkid/src/superblocks/minix.c +--- util-linux-2.27.1/libblkid/src/superblocks/minix.c.kzak 2016-01-18 15:02:05.493738910 +0100 ++++ util-linux-2.27.1/libblkid/src/superblocks/minix.c 2016-01-18 15:04:20.020773281 +0100 +@@ -90,7 +90,8 @@ static int probe_minix(blkid_probe pr, c + struct minix_super_block *sb = (struct minix_super_block *) data; + int zones, ninodes, imaps, zmaps, firstz; + +- if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) ++ if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0 || ++ sb->s_log_zone_size != 0) + return 1; + + zones = version == 2 ? minix_swab32(swabme, sb->s_zones) : diff --git a/util-linux.spec b/util-linux.spec index 46c997b..2efa016 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -90,6 +90,8 @@ Requires: libfdisk = %{version}-%{release} Patch0: 2.23-login-lastlog-create.patch # 1259745 - Can't start installation in Rawhide or F23 recent development images Patch1: 2.27-blkid-zfs-raid.patch +# 1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS +Patch2: libblkid-minix.patch %description The util-linux package contains a large variety of low-level system @@ -896,6 +898,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Jan 18 2016 Karel Zak - 2.27.1-4 +- fix #1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS + * Wed Nov 18 2015 Karel Zak - 2.27.1-3 - fix #1259745 - Can't start installation in Rawhide or F23 recent development images From c3fa85dd816a1efb7391acb4a9bc93450417bc9f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 02:29:08 +0000 Subject: [PATCH 210/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 2efa016..a7383a6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.27.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -898,6 +898,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 2.27.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Mon Jan 18 2016 Karel Zak - 2.27.1-4 - fix #1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS From 3f8e6b01a10ec841065c82c2ec8161d62dcd218e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 22 Mar 2016 13:37:27 +0100 Subject: [PATCH 211/425] 2.28.0.1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 52 ++++++++++++++++++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index f0b7163..214cf02 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ /util-linux-2.27-rc2.tar.xz /util-linux-2.27.tar.xz /util-linux-2.27.1.tar.xz +/util-linux-2.28-rc1.tar.xz diff --git a/sources b/sources index eb41972..5b413b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3cd2698d1363a2c64091c2dadc974647 util-linux-2.27.1.tar.xz +0ef0f83e2f28774301247c1235d0d1b1 util-linux-2.28-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index a7383a6..74286c3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.27.1 -Release: 5%{?dist} +Version: 2.28 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -88,10 +88,8 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# 1259745 - Can't start installation in Rawhide or F23 recent development images -Patch1: 2.27-blkid-zfs-raid.patch -# 1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS -Patch2: libblkid-minix.patch +# temporary for v2.28-rc1 (fixed in upstream tree) +Patch1: 2.28-rc2-swapon.c %description The util-linux package contains a large variety of low-level system @@ -258,6 +256,16 @@ supplied by the libmount library to work with mount tables (fstab, mountinfo, etc) and mount filesystems. +%package -n util-linux-user +Summary: libuser based util-linux utilities +Group: System Environment/Base +Requires: util-linux = %{version}-%{release} +License: GPLv2 + +%description -n util-linux-user +chfn and chsh utilities with dependence on libuser + + %prep %autosetup -p1 -n %{name}-%{upstream_version} @@ -482,8 +490,6 @@ exit 0 %license Documentation/licenses/* %doc misc-utils/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 %config(noreplace) %{_sysconfdir}/pam.d/su @@ -496,8 +502,6 @@ exit 0 %attr(4755,root,root) %{_bindir}/umount %attr(4755,root,root) %{_bindir}/su %attr(755,root,root) %{_bindir}/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 @@ -533,6 +537,7 @@ exit 0 %{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/lslogins +%{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/more @@ -560,9 +565,7 @@ exit 0 %{_bindir}/wdctl %{_bindir}/whereis %{_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* @@ -634,7 +637,8 @@ exit 0 %{_mandir}/man8/ldattach.8* %{_mandir}/man8/losetup.8* %{_mandir}/man8/lsblk.8* -%{_mandir}/man8/lslocks.8.gz +%{_mandir}/man8/lslocks.8* +%{_mandir}/man8/lsns.8* %{_mandir}/man8/mkfs.8* %{_mandir}/man8/mkfs.cramfs.8* %{_mandir}/man8/mkfs.minix.8* @@ -700,9 +704,7 @@ exit 0 %{compldir}/blockdev %{compldir}/cal %{compldir}/chcpu -%{compldir}/chfn %{compldir}/chrt -%{compldir}/chsh %{compldir}/col %{compldir}/colcrt %{compldir}/colrm @@ -802,6 +804,18 @@ exit 0 %{_bindir}/sunhostid %endif + +%files -n util-linux-user +%config(noreplace) %{_sysconfdir}/pam.d/chfn +%config(noreplace) %{_sysconfdir}/pam.d/chsh +%attr(4711,root,root) %{_bindir}/chfn +%attr(4711,root,root) %{_bindir}/chsh +%{_mandir}/man1/chfn.1* +%{_mandir}/man1/chsh.1* +%{compldir}/chfn +%{compldir}/chsh + + %files -n uuidd %defattr(-,root,root) %{!?_licensedir:%global license %%doc} @@ -898,6 +912,12 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Mar 22 2016 Karel Zak - 2.28-0.1 +- upgrade to v2.27-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28-ReleaseNotes +- add patch to fix broken swapon +- add subpackage util-linux-user (utils with dependence on libuser) + * Fri Feb 05 2016 Fedora Release Engineering - 2.27.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From ae201aa504c042eeee36cf8b26b52eb22472aed5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 22 Mar 2016 13:53:06 +0100 Subject: [PATCH 212/425] commit missing patch --- 2.28-rc2-swapon.c | 649 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 649 insertions(+) create mode 100644 2.28-rc2-swapon.c diff --git a/2.28-rc2-swapon.c b/2.28-rc2-swapon.c new file mode 100644 index 0000000..70cc86e --- /dev/null +++ b/2.28-rc2-swapon.c @@ -0,0 +1,649 @@ +diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c +index 914e69a..97acf1e 100644 +--- a/sys-utils/swapon.c ++++ b/sys-utils/swapon.c +@@ -99,22 +99,33 @@ struct colinfo infos[] = { + [COL_LABEL] = { "LABEL", 0.20, 0, N_("swap label")}, + }; + +-/* control struct */ +-struct swapon_ctl { +- const char *device; /* device or file to be turned on */ +- const char *options; /* fstab-compatible option string */ ++ ++/* swap area properties */ ++struct swap_prop { ++ int discard; /* discard policy */ ++ int priority; /* non-prioritized swap by default */ ++ int no_fail; /* skip device if not exist */ ++}; ++ ++/* device description */ ++struct swap_device { ++ const char *path; /* device or file to be turned on */ + const char *label; /* swap label */ + const char *uuid; /* unique identifier */ +- int discard; /* discard policy */ ++ unsigned int pagesize; ++}; ++ ++/* control struct */ ++struct swapon_ctl { + int columns[ARRAY_SIZE(infos) * 2]; /* --show columns */ +- int ncolumns; /* number of columns */ +- int priority; /* non-prioritized swap by default */ +- unsigned int pagesize; /* swap page size */ ++ int ncolumns; /* number of columns */ ++ ++ struct swap_prop props; /* global settings for all devices */ ++ + unsigned int + all:1, /* turn on all swap devices */ + bytes:1, /* display --show in bytes */ + fix_page_size:1, /* reinitialize page size */ +- no_fail:1, /* skip devices that do not exist */ + no_heading:1, /* toggle --show headers */ + raw:1, /* toggle --show alignment */ + show:1, /* display --show information */ +@@ -288,14 +299,17 @@ static int show_table(struct swapon_ctl *ctl) + } + + /* calls mkswap */ +-static int swap_reinitialize(struct swapon_ctl *ctl) ++static int swap_reinitialize(struct swap_device *dev) + { + pid_t pid; + int status, ret; + char const *cmd[7]; + int idx=0; + +- warnx(_("%s: reinitializing the swap."), ctl->device); ++ assert(dev); ++ assert(dev->path); ++ ++ warnx(_("%s: reinitializing the swap."), dev->path); + + switch ((pid=fork())) { + case -1: /* fork error */ +@@ -312,15 +326,15 @@ static int swap_reinitialize(struct swapon_ctl *ctl) + } + + cmd[idx++] = "mkswap"; +- if (ctl->label) { ++ if (dev->label) { + cmd[idx++] = "-L"; +- cmd[idx++] = ctl->label; ++ cmd[idx++] = dev->label; + } +- if (ctl->uuid) { ++ if (dev->uuid) { + cmd[idx++] = "-U"; +- cmd[idx++] = ctl->uuid; ++ cmd[idx++] = dev->uuid; + } +- cmd[idx++] = ctl->device; ++ cmd[idx++] = dev->path; + cmd[idx++] = NULL; + execvp(cmd[0], (char * const *) cmd); + err(EXIT_FAILURE, _("failed to execute %s"), cmd[0]); +@@ -343,31 +357,36 @@ static int swap_reinitialize(struct swapon_ctl *ctl) + return -1; /* error */ + } + +-static int swap_rewrite_signature(const struct swapon_ctl *ctl) ++/* Replaces unwanted SWSUSPEND signature with swap signature */ ++static int swap_rewrite_signature(const struct swap_device *dev) + { + int fd, rc = -1; + +- fd = open(ctl->device, O_WRONLY); ++ assert(dev); ++ assert(dev->path); ++ assert(dev->pagesize); ++ ++ fd = open(dev->path, O_WRONLY); + if (fd == -1) { +- warn(_("cannot open %s"), ctl->device); ++ warn(_("cannot open %s"), dev->path); + return -1; + } + +- if (lseek(fd, ctl->pagesize - SWAP_SIGNATURE_SZ, SEEK_SET) < 0) { +- warn(_("%s: lseek failed"), ctl->device); ++ if (lseek(fd, dev->pagesize - SWAP_SIGNATURE_SZ, SEEK_SET) < 0) { ++ warn(_("%s: lseek failed"), dev->path); + goto err; + } + + if (write(fd, (void *) SWAP_SIGNATURE, + SWAP_SIGNATURE_SZ) != SWAP_SIGNATURE_SZ) { +- warn(_("%s: write signature failed"), ctl->device); ++ warn(_("%s: write signature failed"), dev->path); + goto err; + } + + rc = 0; + err: + if (close_fd(fd) != 0) { +- warn(_("write failed: %s"), ctl->device); ++ warn(_("write failed: %s"), dev->path); + rc = -1; + } + return rc; +@@ -375,6 +394,9 @@ err: + + static int swap_detect_signature(const char *buf, int *sig) + { ++ assert(buf); ++ assert(sig); ++ + if (memcmp(buf, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ) == 0) + *sig = SIG_SWAPSPACE; + +@@ -390,13 +412,16 @@ static int swap_detect_signature(const char *buf, int *sig) + return 1; + } + +-static char *swap_get_header(struct swapon_ctl *ctl, int fd, int *sig) ++static char *swap_get_header(int fd, int *sig, unsigned int *pagesize) + { + char *buf; + ssize_t datasz; + unsigned int page; + +- ctl->pagesize = 0; ++ assert(sig); ++ assert(pagesize); ++ ++ *pagesize = 0; + *sig = 0; + + buf = xmalloc(MAX_PAGESIZE); +@@ -415,12 +440,12 @@ static char *swap_get_header(struct swapon_ctl *ctl, int fd, int *sig) + if (datasz < 0 || (size_t) datasz < (page - SWAP_SIGNATURE_SZ)) + break; + if (swap_detect_signature(buf + page - SWAP_SIGNATURE_SZ, sig)) { +- ctl->pagesize = page; ++ *pagesize = page; + break; + } + } + +- if (ctl->pagesize) ++ if (*pagesize) + return buf; + err: + free(buf); +@@ -428,37 +453,34 @@ err: + } + + /* returns real size of swap space */ +-static unsigned long long swap_get_size(const struct swapon_ctl *ctl, const char *hdr) ++static unsigned long long swap_get_size(const struct swap_device *dev, ++ const char *hdr) + { + unsigned int last_page = 0; + const unsigned int swap_version = SWAP_VERSION; +- int flip = 0; + struct swap_header_v1_2 *s; + ++ assert(dev); ++ assert(dev->pagesize > 0); ++ + s = (struct swap_header_v1_2 *) hdr; +- if (s->version == swap_version) { ++ ++ if (s->version == swap_version) + last_page = s->last_page; +- } else if (swab32(s->version) == swap_version) { +- flip = 1; ++ else if (swab32(s->version) == swap_version) + last_page = swab32(s->last_page); +- } +- if (ctl->verbose) +- warnx(_("%s: found swap signature: version %ud, " +- "page-size %d, %s byte order"), +- ctl->device, +- swap_version, +- ctl->pagesize / 1024, +- flip ? _("different") : _("same")); +- +- return ((unsigned long long) last_page + 1) * ctl->pagesize; ++ ++ return ((unsigned long long) last_page + 1) * dev->pagesize; + } + +-static void swap_get_info(struct swapon_ctl *ctl, const char *hdr) ++static void swap_get_info(struct swap_device *dev, const char *hdr) + { + struct swap_header_v1_2 *s = (struct swap_header_v1_2 *) hdr; + ++ assert(dev); ++ + if (s && *s->volume_name) +- ctl->label = xstrdup(s->volume_name); ++ dev->label = xstrdup(s->volume_name); + + if (s && *s->uuid) { + const unsigned char *u = s->uuid; +@@ -471,11 +493,11 @@ static void swap_get_info(struct swapon_ctl *ctl, const char *hdr) + u[0], u[1], u[2], u[3], + u[4], u[5], u[6], u[7], + u[8], u[9], u[10], u[11], u[12], u[13], u[14], u[15]); +- ctl->uuid = xstrdup(str); ++ dev->uuid = xstrdup(str); + } + } + +-static int swapon_checks(struct swapon_ctl *ctl) ++static int swapon_checks(const struct swapon_ctl *ctl, struct swap_device *dev) + { + struct stat st; + int fd = -1, sig; +@@ -483,77 +505,88 @@ static int swapon_checks(struct swapon_ctl *ctl) + unsigned long long devsize = 0; + int permMask; + +- fd = open(ctl->device, O_RDONLY); ++ assert(ctl); ++ assert(dev); ++ assert(dev->path); ++ ++ fd = open(dev->path, O_RDONLY); + if (fd == -1) { +- warn(_("cannot open %s"), ctl->device); ++ warn(_("cannot open %s"), dev->path); + goto err; + } + + if (fstat(fd, &st) < 0) { +- warn(_("stat of %s failed"), ctl->device); ++ warn(_("stat of %s failed"), dev->path); + goto err; + } + + permMask = S_ISBLK(st.st_mode) ? 07007 : 07077; + if ((st.st_mode & permMask) != 0) + warnx(_("%s: insecure permissions %04o, %04o suggested."), +- ctl->device, st.st_mode & 07777, ++ dev->path, st.st_mode & 07777, + ~permMask & 0666); + + if (S_ISREG(st.st_mode) && st.st_uid != 0) + warnx(_("%s: insecure file owner %d, 0 (root) suggested."), +- ctl->device, st.st_uid); ++ dev->path, st.st_uid); + + /* test for holes by LBT */ + if (S_ISREG(st.st_mode)) { + if (st.st_blocks * 512 < st.st_size) { + warnx(_("%s: skipping - it appears to have holes."), +- ctl->device); ++ dev->path); + goto err; + } + devsize = st.st_size; + } + + if (S_ISBLK(st.st_mode) && blkdev_get_size(fd, &devsize)) { +- warnx(_("%s: get size failed"), ctl->device); ++ warnx(_("%s: get size failed"), dev->path); + goto err; + } + +- hdr = swap_get_header(ctl, fd, &sig); ++ hdr = swap_get_header(fd, &sig, &dev->pagesize); + if (!hdr) { +- warnx(_("%s: read swap header failed"), ctl->device); ++ warnx(_("%s: read swap header failed"), dev->path); + goto err; + } + +- if (sig == SIG_SWAPSPACE && ctl->pagesize) { +- unsigned long long swapsize = +- swap_get_size(ctl, hdr); ++ if (ctl->verbose) ++ warnx(_("%s: found signature [pagesize=%d, signature=%s]"), ++ dev->path, ++ dev->pagesize, ++ sig == SIG_SWAPSPACE ? "swap" : ++ sig == SIG_SWSUSPEND ? "suspend" : "unknown"); ++ ++ if (sig == SIG_SWAPSPACE && dev->pagesize) { ++ unsigned long long swapsize = swap_get_size(dev, hdr); + int syspg = getpagesize(); + + if (ctl->verbose) + warnx(_("%s: pagesize=%d, swapsize=%llu, devsize=%llu"), +- ctl->device, ctl->pagesize, swapsize, devsize); ++ dev->path, dev->pagesize, swapsize, devsize); + + if (swapsize > devsize) { + if (ctl->verbose) + warnx(_("%s: last_page 0x%08llx is larger" + " than actual size of swapspace"), +- ctl->device, swapsize); +- } else if (syspg < 0 || (unsigned int) syspg != ctl->pagesize) { ++ dev->path, swapsize); ++ ++ } else if (syspg < 0 || (unsigned int) syspg != dev->pagesize) { + if (ctl->fix_page_size) { + int rc; + +- swap_get_info(ctl, hdr); ++ swap_get_info(dev, hdr); + + warnx(_("%s: swap format pagesize does not match."), +- ctl->device); +- rc = swap_reinitialize(ctl); ++ dev->path); ++ rc = swap_reinitialize(dev); + if (rc < 0) + goto err; + } else + warnx(_("%s: swap format pagesize does not match. " + "(Use --fixpgsz to reinitialize it.)"), +- ctl->device); ++ dev->path); + } + } else if (sig == SIG_SWSUSPEND) { + /* We have to reinitialize swap with old (=useless) software suspend +@@ -562,8 +595,8 @@ static int swapon_checks(struct swapon_ctl *ctl) + */ + warnx(_("%s: software suspend data detected. " + "Rewriting the swap signature."), +- ctl->device); +- if (swap_rewrite_signature(ctl) < 0) ++ dev->path); ++ if (swap_rewrite_signature(dev) < 0) + goto err; + } + +@@ -577,33 +610,38 @@ err: + return -1; + } + +-static int do_swapon(struct swapon_ctl *ctl, const char *spec, int canonic) ++static int do_swapon(const struct swapon_ctl *ctl, ++ const struct swap_prop *prop, ++ const char *spec, ++ int canonic) + { ++ struct swap_device dev = { .path = NULL }; + int status; + int flags = 0; ++ int priority; + +- /* all initilized by do_swapon() */ +- ctl->device = ctl->label = ctl->uuid = NULL; +- +- if (ctl->verbose) +- printf(_("swapon %s\n"), ctl->device); ++ assert(ctl); ++ assert(prop); + + if (!canonic) { +- ctl->device = mnt_resolve_spec(spec, mntcache); +- if (!ctl->device) ++ dev.path = mnt_resolve_spec(spec, mntcache); ++ if (!dev.path) + return cannot_find(spec); + } else +- ctl->device = spec; ++ dev.path = spec; + +- if (swapon_checks(ctl)) ++ priority = prop->priority; ++ ++ if (swapon_checks(ctl, &dev)) + return -1; + + #ifdef SWAP_FLAG_PREFER +- if (ctl->priority >= 0) { +- if (ctl->priority > SWAP_FLAG_PRIO_MASK) +- ctl->priority = SWAP_FLAG_PRIO_MASK; ++ if (priority >= 0) { ++ if (priority > SWAP_FLAG_PRIO_MASK) ++ priority = SWAP_FLAG_PRIO_MASK; ++ + flags = SWAP_FLAG_PREFER +- | ((ctl->priority & SWAP_FLAG_PRIO_MASK) ++ | ((priority & SWAP_FLAG_PRIO_MASK) + << SWAP_FLAG_PRIO_SHIFT); + } + #endif +@@ -611,22 +649,25 @@ static int do_swapon(struct swapon_ctl *ctl, const char *spec, int canonic) + * Validate the discard flags passed and set them + * accordingly before calling sys_swapon. + */ +- if (ctl->discard && !(ctl->discard & ~SWAP_FLAGS_DISCARD_VALID)) { ++ if (prop->discard && !(prop->discard & ~SWAP_FLAGS_DISCARD_VALID)) { + /* + * If we get here with both discard policy flags set, + * we just need to tell the kernel to enable discards + * and it will do correctly, just as we expect. + */ +- if ((ctl->discard & SWAP_FLAG_DISCARD_ONCE) && +- (ctl->discard & SWAP_FLAG_DISCARD_PAGES)) ++ if ((prop->discard & SWAP_FLAG_DISCARD_ONCE) && ++ (prop->discard & SWAP_FLAG_DISCARD_PAGES)) + flags |= SWAP_FLAG_DISCARD; + else +- flags |= ctl->discard; ++ flags |= prop->discard; + } + +- status = swapon(ctl->device, flags); ++ if (ctl->verbose) ++ printf(_("swapon %s\n"), dev.path); ++ ++ status = swapon(dev.path, flags); + if (status < 0) +- warn(_("%s: swapon failed"), ctl->device); ++ warn(_("%s: swapon failed"), dev.path); + + return status; + } +@@ -634,45 +675,43 @@ static int do_swapon(struct swapon_ctl *ctl, const char *spec, int canonic) + static int swapon_by_label(struct swapon_ctl *ctl, const char *label) + { + char *device = mnt_resolve_tag("LABEL", label, mntcache); +- return device ? do_swapon(ctl, device, TRUE) : cannot_find(label); ++ return device ? do_swapon(ctl, &ctl->props, device, TRUE) : cannot_find(label); + } + + static int swapon_by_uuid(struct swapon_ctl *ctl, const char *uuid) + { + char *device = mnt_resolve_tag("UUID", uuid, mntcache); +- return device ? do_swapon(ctl, device, TRUE) : cannot_find(uuid); ++ return device ? do_swapon(ctl, &ctl->props, device, TRUE) : cannot_find(uuid); + } + + /* -o or fstab */ +-static int parse_options(struct swapon_ctl *ctl) ++static int parse_options(struct swap_prop *props, const char *options) + { + char *arg = NULL; + +- assert(ctl->options); +- assert(ctl->priority); +- assert(ctl->discard); +- assert(ctl->no_fail); ++ assert(props); ++ assert(options); + +- if (mnt_optstr_get_option(ctl->options, "nofail", NULL, 0) == 0) +- ctl->no_fail = 1; ++ if (mnt_optstr_get_option(options, "nofail", NULL, 0) == 0) ++ props->no_fail = 1; + +- if (mnt_optstr_get_option(ctl->options, "discard", &arg, NULL) == 0) { +- ctl->discard |= SWAP_FLAG_DISCARD; ++ if (mnt_optstr_get_option(options, "discard", &arg, NULL) == 0) { ++ props->discard |= SWAP_FLAG_DISCARD; + + if (arg) { + /* only single-time discards are wanted */ + if (strcmp(arg, "once") == 0) +- ctl->discard |= SWAP_FLAG_DISCARD_ONCE; ++ props->discard |= SWAP_FLAG_DISCARD_ONCE; + + /* do discard for every released swap page */ + if (strcmp(arg, "pages") == 0) +- ctl->discard |= SWAP_FLAG_DISCARD_PAGES; +- } ++ props->discard |= SWAP_FLAG_DISCARD_PAGES; ++ } + } + + arg = NULL; +- if (mnt_optstr_get_option(ctl->options, "pri", &arg, NULL) == 0 && arg) +- ctl->priority = atoi(arg); ++ if (mnt_optstr_get_option(options, "pri", &arg, NULL) == 0 && arg) ++ props->priority = atoi(arg); + + return 0; + } +@@ -696,24 +735,44 @@ static int swapon_all(struct swapon_ctl *ctl) + /* defaults */ + const char *opts; + const char *device; ++ struct swap_prop prop; /* per device setting */ + +- if (mnt_fs_get_option(fs, "noauto", NULL, NULL) == 0) ++ if (mnt_fs_get_option(fs, "noauto", NULL, NULL) == 0) { ++ if (ctl->verbose) ++ warnx(_("%s: noauto option -- ignored"), mnt_fs_get_source(fs)); + continue; ++ } ++ ++ /* default setting */ ++ prop = ctl->props; + ++ /* overwrite default by setting from fstab */ + opts = mnt_fs_get_options(fs); + if (opts) +- parse_options(ctl); ++ parse_options(&prop, opts); + ++ /* convert LABEL=, UUID= etc. from fstab to device name */ + device = mnt_resolve_spec(mnt_fs_get_source(fs), mntcache); + if (!device) { +- if (!ctl->no_fail) ++ if (!prop.no_fail) + status |= cannot_find(mnt_fs_get_source(fs)); + continue; + } + +- if (!is_active_swap(device) && +- (!ctl->no_fail || !access(device, R_OK))) +- status |= do_swapon(ctl, device, TRUE); ++ if (is_active_swap(device)) { ++ if (ctl->verbose) ++ warnx(_("%s: already active -- ignored"), device); ++ continue; ++ } ++ ++ if (prop.no_fail && access(device, R_OK) != 0) { ++ if (ctl->verbose) ++ warnx(_("%s: unaccessible -- ignored"), device); ++ continue; ++ } ++ ++ /* swapon */ ++ status |= do_swapon(ctl, &prop, device, TRUE); + } + + mnt_free_iter(itr); +@@ -775,6 +834,7 @@ int main(int argc, char *argv[]) + { + int status = 0, c; + size_t i; ++ char *options = NULL; + + enum { + BYTES_OPTION = CHAR_MAX + 1, +@@ -810,13 +870,16 @@ int main(int argc, char *argv[]) + }; + int excl_st[ARRAY_SIZE(excl)] = UL_EXCL_STATUS_INIT; + +- struct swapon_ctl ctl = { .priority = -1 }; ++ struct swapon_ctl ctl; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + atexit(close_stdout); + ++ memset(&ctl, 0, sizeof(struct swapon_ctl)); ++ ctl.props.priority = -1; ++ + mnt_init_debug(0); + mntcache = mnt_new_cache(); + +@@ -833,10 +896,10 @@ int main(int argc, char *argv[]) + usage(stdout); + break; + case 'o': +- ctl.options = optarg; ++ options = optarg; + break; + case 'p': /* priority */ +- ctl.priority = strtos16_or_err(optarg, ++ ctl.props.priority = strtos16_or_err(optarg, + _("failed to parse priority")); + break; + case 'L': +@@ -846,21 +909,21 @@ int main(int argc, char *argv[]) + add_uuid(optarg); + break; + case 'd': +- ctl.discard |= SWAP_FLAG_DISCARD; ++ ctl.props.discard |= SWAP_FLAG_DISCARD; + if (optarg) { + if (*optarg == '=') + optarg++; + + if (strcmp(optarg, "once") == 0) +- ctl.discard |= SWAP_FLAG_DISCARD_ONCE; ++ ctl.props.discard |= SWAP_FLAG_DISCARD_ONCE; + else if (strcmp(optarg, "pages") == 0) +- ctl.discard |= SWAP_FLAG_DISCARD_PAGES; ++ ctl.props.discard |= SWAP_FLAG_DISCARD_PAGES; + else + errx(EXIT_FAILURE, _("unsupported discard policy: %s"), optarg); + } + break; + case 'e': /* ifexists */ +- ctl.no_fail = 1; ++ ctl.props.no_fail = 1; + break; + case 'f': + ctl.fix_page_size = 1; +@@ -916,14 +979,14 @@ int main(int argc, char *argv[]) + return status; + } + +- if (ctl.no_fail && !ctl.all) ++ if (ctl.props.no_fail && !ctl.all) + usage(stderr); + + if (ctl.all) + status |= swapon_all(&ctl); + +- if (ctl.options) +- parse_options(&ctl); ++ if (options) ++ parse_options(&ctl.props, options); + + for (i = 0; i < numof_labels(); i++) + status |= swapon_by_label(&ctl, get_label(i)); +@@ -932,7 +995,7 @@ int main(int argc, char *argv[]) + status |= swapon_by_uuid(&ctl, get_uuid(i)); + + while (*argv != NULL) +- status |= do_swapon(&ctl, *argv++, FALSE); ++ status |= do_swapon(&ctl, &ctl.props, *argv++, FALSE); + + free_tables(); + mnt_unref_cache(mntcache); From c67f1a42d86f743c81029c09df5145fc6bf7f444 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 29 Mar 2016 11:19:22 +0200 Subject: [PATCH 213/425] 2.28.0.2: upgrade to rc2 --- .gitignore | 1 + 2.28-rc2-swapon.c | 649 ---------------------------------------------- sources | 2 +- util-linux.spec | 11 +- 4 files changed, 8 insertions(+), 655 deletions(-) delete mode 100644 2.28-rc2-swapon.c diff --git a/.gitignore b/.gitignore index 214cf02..2c3177e 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /util-linux-2.27.tar.xz /util-linux-2.27.1.tar.xz /util-linux-2.28-rc1.tar.xz +/util-linux-2.28-rc2.tar.xz diff --git a/2.28-rc2-swapon.c b/2.28-rc2-swapon.c deleted file mode 100644 index 70cc86e..0000000 --- a/2.28-rc2-swapon.c +++ /dev/null @@ -1,649 +0,0 @@ -diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c -index 914e69a..97acf1e 100644 ---- a/sys-utils/swapon.c -+++ b/sys-utils/swapon.c -@@ -99,22 +99,33 @@ struct colinfo infos[] = { - [COL_LABEL] = { "LABEL", 0.20, 0, N_("swap label")}, - }; - --/* control struct */ --struct swapon_ctl { -- const char *device; /* device or file to be turned on */ -- const char *options; /* fstab-compatible option string */ -+ -+/* swap area properties */ -+struct swap_prop { -+ int discard; /* discard policy */ -+ int priority; /* non-prioritized swap by default */ -+ int no_fail; /* skip device if not exist */ -+}; -+ -+/* device description */ -+struct swap_device { -+ const char *path; /* device or file to be turned on */ - const char *label; /* swap label */ - const char *uuid; /* unique identifier */ -- int discard; /* discard policy */ -+ unsigned int pagesize; -+}; -+ -+/* control struct */ -+struct swapon_ctl { - int columns[ARRAY_SIZE(infos) * 2]; /* --show columns */ -- int ncolumns; /* number of columns */ -- int priority; /* non-prioritized swap by default */ -- unsigned int pagesize; /* swap page size */ -+ int ncolumns; /* number of columns */ -+ -+ struct swap_prop props; /* global settings for all devices */ -+ - unsigned int - all:1, /* turn on all swap devices */ - bytes:1, /* display --show in bytes */ - fix_page_size:1, /* reinitialize page size */ -- no_fail:1, /* skip devices that do not exist */ - no_heading:1, /* toggle --show headers */ - raw:1, /* toggle --show alignment */ - show:1, /* display --show information */ -@@ -288,14 +299,17 @@ static int show_table(struct swapon_ctl *ctl) - } - - /* calls mkswap */ --static int swap_reinitialize(struct swapon_ctl *ctl) -+static int swap_reinitialize(struct swap_device *dev) - { - pid_t pid; - int status, ret; - char const *cmd[7]; - int idx=0; - -- warnx(_("%s: reinitializing the swap."), ctl->device); -+ assert(dev); -+ assert(dev->path); -+ -+ warnx(_("%s: reinitializing the swap."), dev->path); - - switch ((pid=fork())) { - case -1: /* fork error */ -@@ -312,15 +326,15 @@ static int swap_reinitialize(struct swapon_ctl *ctl) - } - - cmd[idx++] = "mkswap"; -- if (ctl->label) { -+ if (dev->label) { - cmd[idx++] = "-L"; -- cmd[idx++] = ctl->label; -+ cmd[idx++] = dev->label; - } -- if (ctl->uuid) { -+ if (dev->uuid) { - cmd[idx++] = "-U"; -- cmd[idx++] = ctl->uuid; -+ cmd[idx++] = dev->uuid; - } -- cmd[idx++] = ctl->device; -+ cmd[idx++] = dev->path; - cmd[idx++] = NULL; - execvp(cmd[0], (char * const *) cmd); - err(EXIT_FAILURE, _("failed to execute %s"), cmd[0]); -@@ -343,31 +357,36 @@ static int swap_reinitialize(struct swapon_ctl *ctl) - return -1; /* error */ - } - --static int swap_rewrite_signature(const struct swapon_ctl *ctl) -+/* Replaces unwanted SWSUSPEND signature with swap signature */ -+static int swap_rewrite_signature(const struct swap_device *dev) - { - int fd, rc = -1; - -- fd = open(ctl->device, O_WRONLY); -+ assert(dev); -+ assert(dev->path); -+ assert(dev->pagesize); -+ -+ fd = open(dev->path, O_WRONLY); - if (fd == -1) { -- warn(_("cannot open %s"), ctl->device); -+ warn(_("cannot open %s"), dev->path); - return -1; - } - -- if (lseek(fd, ctl->pagesize - SWAP_SIGNATURE_SZ, SEEK_SET) < 0) { -- warn(_("%s: lseek failed"), ctl->device); -+ if (lseek(fd, dev->pagesize - SWAP_SIGNATURE_SZ, SEEK_SET) < 0) { -+ warn(_("%s: lseek failed"), dev->path); - goto err; - } - - if (write(fd, (void *) SWAP_SIGNATURE, - SWAP_SIGNATURE_SZ) != SWAP_SIGNATURE_SZ) { -- warn(_("%s: write signature failed"), ctl->device); -+ warn(_("%s: write signature failed"), dev->path); - goto err; - } - - rc = 0; - err: - if (close_fd(fd) != 0) { -- warn(_("write failed: %s"), ctl->device); -+ warn(_("write failed: %s"), dev->path); - rc = -1; - } - return rc; -@@ -375,6 +394,9 @@ err: - - static int swap_detect_signature(const char *buf, int *sig) - { -+ assert(buf); -+ assert(sig); -+ - if (memcmp(buf, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ) == 0) - *sig = SIG_SWAPSPACE; - -@@ -390,13 +412,16 @@ static int swap_detect_signature(const char *buf, int *sig) - return 1; - } - --static char *swap_get_header(struct swapon_ctl *ctl, int fd, int *sig) -+static char *swap_get_header(int fd, int *sig, unsigned int *pagesize) - { - char *buf; - ssize_t datasz; - unsigned int page; - -- ctl->pagesize = 0; -+ assert(sig); -+ assert(pagesize); -+ -+ *pagesize = 0; - *sig = 0; - - buf = xmalloc(MAX_PAGESIZE); -@@ -415,12 +440,12 @@ static char *swap_get_header(struct swapon_ctl *ctl, int fd, int *sig) - if (datasz < 0 || (size_t) datasz < (page - SWAP_SIGNATURE_SZ)) - break; - if (swap_detect_signature(buf + page - SWAP_SIGNATURE_SZ, sig)) { -- ctl->pagesize = page; -+ *pagesize = page; - break; - } - } - -- if (ctl->pagesize) -+ if (*pagesize) - return buf; - err: - free(buf); -@@ -428,37 +453,34 @@ err: - } - - /* returns real size of swap space */ --static unsigned long long swap_get_size(const struct swapon_ctl *ctl, const char *hdr) -+static unsigned long long swap_get_size(const struct swap_device *dev, -+ const char *hdr) - { - unsigned int last_page = 0; - const unsigned int swap_version = SWAP_VERSION; -- int flip = 0; - struct swap_header_v1_2 *s; - -+ assert(dev); -+ assert(dev->pagesize > 0); -+ - s = (struct swap_header_v1_2 *) hdr; -- if (s->version == swap_version) { -+ -+ if (s->version == swap_version) - last_page = s->last_page; -- } else if (swab32(s->version) == swap_version) { -- flip = 1; -+ else if (swab32(s->version) == swap_version) - last_page = swab32(s->last_page); -- } -- if (ctl->verbose) -- warnx(_("%s: found swap signature: version %ud, " -- "page-size %d, %s byte order"), -- ctl->device, -- swap_version, -- ctl->pagesize / 1024, -- flip ? _("different") : _("same")); -- -- return ((unsigned long long) last_page + 1) * ctl->pagesize; -+ -+ return ((unsigned long long) last_page + 1) * dev->pagesize; - } - --static void swap_get_info(struct swapon_ctl *ctl, const char *hdr) -+static void swap_get_info(struct swap_device *dev, const char *hdr) - { - struct swap_header_v1_2 *s = (struct swap_header_v1_2 *) hdr; - -+ assert(dev); -+ - if (s && *s->volume_name) -- ctl->label = xstrdup(s->volume_name); -+ dev->label = xstrdup(s->volume_name); - - if (s && *s->uuid) { - const unsigned char *u = s->uuid; -@@ -471,11 +493,11 @@ static void swap_get_info(struct swapon_ctl *ctl, const char *hdr) - u[0], u[1], u[2], u[3], - u[4], u[5], u[6], u[7], - u[8], u[9], u[10], u[11], u[12], u[13], u[14], u[15]); -- ctl->uuid = xstrdup(str); -+ dev->uuid = xstrdup(str); - } - } - --static int swapon_checks(struct swapon_ctl *ctl) -+static int swapon_checks(const struct swapon_ctl *ctl, struct swap_device *dev) - { - struct stat st; - int fd = -1, sig; -@@ -483,77 +505,88 @@ static int swapon_checks(struct swapon_ctl *ctl) - unsigned long long devsize = 0; - int permMask; - -- fd = open(ctl->device, O_RDONLY); -+ assert(ctl); -+ assert(dev); -+ assert(dev->path); -+ -+ fd = open(dev->path, O_RDONLY); - if (fd == -1) { -- warn(_("cannot open %s"), ctl->device); -+ warn(_("cannot open %s"), dev->path); - goto err; - } - - if (fstat(fd, &st) < 0) { -- warn(_("stat of %s failed"), ctl->device); -+ warn(_("stat of %s failed"), dev->path); - goto err; - } - - permMask = S_ISBLK(st.st_mode) ? 07007 : 07077; - if ((st.st_mode & permMask) != 0) - warnx(_("%s: insecure permissions %04o, %04o suggested."), -- ctl->device, st.st_mode & 07777, -+ dev->path, st.st_mode & 07777, - ~permMask & 0666); - - if (S_ISREG(st.st_mode) && st.st_uid != 0) - warnx(_("%s: insecure file owner %d, 0 (root) suggested."), -- ctl->device, st.st_uid); -+ dev->path, st.st_uid); - - /* test for holes by LBT */ - if (S_ISREG(st.st_mode)) { - if (st.st_blocks * 512 < st.st_size) { - warnx(_("%s: skipping - it appears to have holes."), -- ctl->device); -+ dev->path); - goto err; - } - devsize = st.st_size; - } - - if (S_ISBLK(st.st_mode) && blkdev_get_size(fd, &devsize)) { -- warnx(_("%s: get size failed"), ctl->device); -+ warnx(_("%s: get size failed"), dev->path); - goto err; - } - -- hdr = swap_get_header(ctl, fd, &sig); -+ hdr = swap_get_header(fd, &sig, &dev->pagesize); - if (!hdr) { -- warnx(_("%s: read swap header failed"), ctl->device); -+ warnx(_("%s: read swap header failed"), dev->path); - goto err; - } - -- if (sig == SIG_SWAPSPACE && ctl->pagesize) { -- unsigned long long swapsize = -- swap_get_size(ctl, hdr); -+ if (ctl->verbose) -+ warnx(_("%s: found signature [pagesize=%d, signature=%s]"), -+ dev->path, -+ dev->pagesize, -+ sig == SIG_SWAPSPACE ? "swap" : -+ sig == SIG_SWSUSPEND ? "suspend" : "unknown"); -+ -+ if (sig == SIG_SWAPSPACE && dev->pagesize) { -+ unsigned long long swapsize = swap_get_size(dev, hdr); - int syspg = getpagesize(); - - if (ctl->verbose) - warnx(_("%s: pagesize=%d, swapsize=%llu, devsize=%llu"), -- ctl->device, ctl->pagesize, swapsize, devsize); -+ dev->path, dev->pagesize, swapsize, devsize); - - if (swapsize > devsize) { - if (ctl->verbose) - warnx(_("%s: last_page 0x%08llx is larger" - " than actual size of swapspace"), -- ctl->device, swapsize); -- } else if (syspg < 0 || (unsigned int) syspg != ctl->pagesize) { -+ dev->path, swapsize); -+ -+ } else if (syspg < 0 || (unsigned int) syspg != dev->pagesize) { - if (ctl->fix_page_size) { - int rc; - -- swap_get_info(ctl, hdr); -+ swap_get_info(dev, hdr); - - warnx(_("%s: swap format pagesize does not match."), -- ctl->device); -- rc = swap_reinitialize(ctl); -+ dev->path); -+ rc = swap_reinitialize(dev); - if (rc < 0) - goto err; - } else - warnx(_("%s: swap format pagesize does not match. " - "(Use --fixpgsz to reinitialize it.)"), -- ctl->device); -+ dev->path); - } - } else if (sig == SIG_SWSUSPEND) { - /* We have to reinitialize swap with old (=useless) software suspend -@@ -562,8 +595,8 @@ static int swapon_checks(struct swapon_ctl *ctl) - */ - warnx(_("%s: software suspend data detected. " - "Rewriting the swap signature."), -- ctl->device); -- if (swap_rewrite_signature(ctl) < 0) -+ dev->path); -+ if (swap_rewrite_signature(dev) < 0) - goto err; - } - -@@ -577,33 +610,38 @@ err: - return -1; - } - --static int do_swapon(struct swapon_ctl *ctl, const char *spec, int canonic) -+static int do_swapon(const struct swapon_ctl *ctl, -+ const struct swap_prop *prop, -+ const char *spec, -+ int canonic) - { -+ struct swap_device dev = { .path = NULL }; - int status; - int flags = 0; -+ int priority; - -- /* all initilized by do_swapon() */ -- ctl->device = ctl->label = ctl->uuid = NULL; -- -- if (ctl->verbose) -- printf(_("swapon %s\n"), ctl->device); -+ assert(ctl); -+ assert(prop); - - if (!canonic) { -- ctl->device = mnt_resolve_spec(spec, mntcache); -- if (!ctl->device) -+ dev.path = mnt_resolve_spec(spec, mntcache); -+ if (!dev.path) - return cannot_find(spec); - } else -- ctl->device = spec; -+ dev.path = spec; - -- if (swapon_checks(ctl)) -+ priority = prop->priority; -+ -+ if (swapon_checks(ctl, &dev)) - return -1; - - #ifdef SWAP_FLAG_PREFER -- if (ctl->priority >= 0) { -- if (ctl->priority > SWAP_FLAG_PRIO_MASK) -- ctl->priority = SWAP_FLAG_PRIO_MASK; -+ if (priority >= 0) { -+ if (priority > SWAP_FLAG_PRIO_MASK) -+ priority = SWAP_FLAG_PRIO_MASK; -+ - flags = SWAP_FLAG_PREFER -- | ((ctl->priority & SWAP_FLAG_PRIO_MASK) -+ | ((priority & SWAP_FLAG_PRIO_MASK) - << SWAP_FLAG_PRIO_SHIFT); - } - #endif -@@ -611,22 +649,25 @@ static int do_swapon(struct swapon_ctl *ctl, const char *spec, int canonic) - * Validate the discard flags passed and set them - * accordingly before calling sys_swapon. - */ -- if (ctl->discard && !(ctl->discard & ~SWAP_FLAGS_DISCARD_VALID)) { -+ if (prop->discard && !(prop->discard & ~SWAP_FLAGS_DISCARD_VALID)) { - /* - * If we get here with both discard policy flags set, - * we just need to tell the kernel to enable discards - * and it will do correctly, just as we expect. - */ -- if ((ctl->discard & SWAP_FLAG_DISCARD_ONCE) && -- (ctl->discard & SWAP_FLAG_DISCARD_PAGES)) -+ if ((prop->discard & SWAP_FLAG_DISCARD_ONCE) && -+ (prop->discard & SWAP_FLAG_DISCARD_PAGES)) - flags |= SWAP_FLAG_DISCARD; - else -- flags |= ctl->discard; -+ flags |= prop->discard; - } - -- status = swapon(ctl->device, flags); -+ if (ctl->verbose) -+ printf(_("swapon %s\n"), dev.path); -+ -+ status = swapon(dev.path, flags); - if (status < 0) -- warn(_("%s: swapon failed"), ctl->device); -+ warn(_("%s: swapon failed"), dev.path); - - return status; - } -@@ -634,45 +675,43 @@ static int do_swapon(struct swapon_ctl *ctl, const char *spec, int canonic) - static int swapon_by_label(struct swapon_ctl *ctl, const char *label) - { - char *device = mnt_resolve_tag("LABEL", label, mntcache); -- return device ? do_swapon(ctl, device, TRUE) : cannot_find(label); -+ return device ? do_swapon(ctl, &ctl->props, device, TRUE) : cannot_find(label); - } - - static int swapon_by_uuid(struct swapon_ctl *ctl, const char *uuid) - { - char *device = mnt_resolve_tag("UUID", uuid, mntcache); -- return device ? do_swapon(ctl, device, TRUE) : cannot_find(uuid); -+ return device ? do_swapon(ctl, &ctl->props, device, TRUE) : cannot_find(uuid); - } - - /* -o or fstab */ --static int parse_options(struct swapon_ctl *ctl) -+static int parse_options(struct swap_prop *props, const char *options) - { - char *arg = NULL; - -- assert(ctl->options); -- assert(ctl->priority); -- assert(ctl->discard); -- assert(ctl->no_fail); -+ assert(props); -+ assert(options); - -- if (mnt_optstr_get_option(ctl->options, "nofail", NULL, 0) == 0) -- ctl->no_fail = 1; -+ if (mnt_optstr_get_option(options, "nofail", NULL, 0) == 0) -+ props->no_fail = 1; - -- if (mnt_optstr_get_option(ctl->options, "discard", &arg, NULL) == 0) { -- ctl->discard |= SWAP_FLAG_DISCARD; -+ if (mnt_optstr_get_option(options, "discard", &arg, NULL) == 0) { -+ props->discard |= SWAP_FLAG_DISCARD; - - if (arg) { - /* only single-time discards are wanted */ - if (strcmp(arg, "once") == 0) -- ctl->discard |= SWAP_FLAG_DISCARD_ONCE; -+ props->discard |= SWAP_FLAG_DISCARD_ONCE; - - /* do discard for every released swap page */ - if (strcmp(arg, "pages") == 0) -- ctl->discard |= SWAP_FLAG_DISCARD_PAGES; -- } -+ props->discard |= SWAP_FLAG_DISCARD_PAGES; -+ } - } - - arg = NULL; -- if (mnt_optstr_get_option(ctl->options, "pri", &arg, NULL) == 0 && arg) -- ctl->priority = atoi(arg); -+ if (mnt_optstr_get_option(options, "pri", &arg, NULL) == 0 && arg) -+ props->priority = atoi(arg); - - return 0; - } -@@ -696,24 +735,44 @@ static int swapon_all(struct swapon_ctl *ctl) - /* defaults */ - const char *opts; - const char *device; -+ struct swap_prop prop; /* per device setting */ - -- if (mnt_fs_get_option(fs, "noauto", NULL, NULL) == 0) -+ if (mnt_fs_get_option(fs, "noauto", NULL, NULL) == 0) { -+ if (ctl->verbose) -+ warnx(_("%s: noauto option -- ignored"), mnt_fs_get_source(fs)); - continue; -+ } -+ -+ /* default setting */ -+ prop = ctl->props; - -+ /* overwrite default by setting from fstab */ - opts = mnt_fs_get_options(fs); - if (opts) -- parse_options(ctl); -+ parse_options(&prop, opts); - -+ /* convert LABEL=, UUID= etc. from fstab to device name */ - device = mnt_resolve_spec(mnt_fs_get_source(fs), mntcache); - if (!device) { -- if (!ctl->no_fail) -+ if (!prop.no_fail) - status |= cannot_find(mnt_fs_get_source(fs)); - continue; - } - -- if (!is_active_swap(device) && -- (!ctl->no_fail || !access(device, R_OK))) -- status |= do_swapon(ctl, device, TRUE); -+ if (is_active_swap(device)) { -+ if (ctl->verbose) -+ warnx(_("%s: already active -- ignored"), device); -+ continue; -+ } -+ -+ if (prop.no_fail && access(device, R_OK) != 0) { -+ if (ctl->verbose) -+ warnx(_("%s: unaccessible -- ignored"), device); -+ continue; -+ } -+ -+ /* swapon */ -+ status |= do_swapon(ctl, &prop, device, TRUE); - } - - mnt_free_iter(itr); -@@ -775,6 +834,7 @@ int main(int argc, char *argv[]) - { - int status = 0, c; - size_t i; -+ char *options = NULL; - - enum { - BYTES_OPTION = CHAR_MAX + 1, -@@ -810,13 +870,16 @@ int main(int argc, char *argv[]) - }; - int excl_st[ARRAY_SIZE(excl)] = UL_EXCL_STATUS_INIT; - -- struct swapon_ctl ctl = { .priority = -1 }; -+ struct swapon_ctl ctl; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - atexit(close_stdout); - -+ memset(&ctl, 0, sizeof(struct swapon_ctl)); -+ ctl.props.priority = -1; -+ - mnt_init_debug(0); - mntcache = mnt_new_cache(); - -@@ -833,10 +896,10 @@ int main(int argc, char *argv[]) - usage(stdout); - break; - case 'o': -- ctl.options = optarg; -+ options = optarg; - break; - case 'p': /* priority */ -- ctl.priority = strtos16_or_err(optarg, -+ ctl.props.priority = strtos16_or_err(optarg, - _("failed to parse priority")); - break; - case 'L': -@@ -846,21 +909,21 @@ int main(int argc, char *argv[]) - add_uuid(optarg); - break; - case 'd': -- ctl.discard |= SWAP_FLAG_DISCARD; -+ ctl.props.discard |= SWAP_FLAG_DISCARD; - if (optarg) { - if (*optarg == '=') - optarg++; - - if (strcmp(optarg, "once") == 0) -- ctl.discard |= SWAP_FLAG_DISCARD_ONCE; -+ ctl.props.discard |= SWAP_FLAG_DISCARD_ONCE; - else if (strcmp(optarg, "pages") == 0) -- ctl.discard |= SWAP_FLAG_DISCARD_PAGES; -+ ctl.props.discard |= SWAP_FLAG_DISCARD_PAGES; - else - errx(EXIT_FAILURE, _("unsupported discard policy: %s"), optarg); - } - break; - case 'e': /* ifexists */ -- ctl.no_fail = 1; -+ ctl.props.no_fail = 1; - break; - case 'f': - ctl.fix_page_size = 1; -@@ -916,14 +979,14 @@ int main(int argc, char *argv[]) - return status; - } - -- if (ctl.no_fail && !ctl.all) -+ if (ctl.props.no_fail && !ctl.all) - usage(stderr); - - if (ctl.all) - status |= swapon_all(&ctl); - -- if (ctl.options) -- parse_options(&ctl); -+ if (options) -+ parse_options(&ctl.props, options); - - for (i = 0; i < numof_labels(); i++) - status |= swapon_by_label(&ctl, get_label(i)); -@@ -932,7 +995,7 @@ int main(int argc, char *argv[]) - status |= swapon_by_uuid(&ctl, get_uuid(i)); - - while (*argv != NULL) -- status |= do_swapon(&ctl, *argv++, FALSE); -+ status |= do_swapon(&ctl, &ctl.props, *argv++, FALSE); - - free_tables(); - mnt_unref_cache(mntcache); diff --git a/sources b/sources index 5b413b9..10139d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0ef0f83e2f28774301247c1235d0d1b1 util-linux-2.28-rc1.tar.xz +ea0c349440708f28e6e3edbc715a467d util-linux-2.28-rc2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 74286c3..cf5661c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.28 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -88,8 +88,6 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# temporary for v2.28-rc1 (fixed in upstream tree) -Patch1: 2.28-rc2-swapon.c %description The util-linux package contains a large variety of low-level system @@ -912,8 +910,11 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Mar 29 2016 Karel Zak - 2.28-0.2 +- upgrade to v2.28-rc2 + * Tue Mar 22 2016 Karel Zak - 2.28-0.1 -- upgrade to v2.27-rc1 +- upgrade to v2.28-rc1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28-ReleaseNotes - add patch to fix broken swapon - add subpackage util-linux-user (utils with dependence on libuser) From e466e3cc2f6f6ae8d44dbcbce44aee1a2b32d22a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 29 Mar 2016 11:51:16 +0200 Subject: [PATCH 214/425] commit new completion scripts --- util-linux.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index cf5661c..67afb0a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -399,6 +399,9 @@ ln -sf /proc/mounts %{buildroot}/etc/mtab # remove static libs rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a +# temporary remove to avoid conflicts with bash-completion pkg +rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} + # find MO files %find_lang %name @@ -723,6 +726,7 @@ exit 0 %{compldir}/getopt %{compldir}/hexdump %{compldir}/ionice +%{compldir}/ipcmk %{compldir}/ipcrm %{compldir}/ipcs %{compldir}/isosize @@ -735,6 +739,8 @@ exit 0 %{compldir}/lscpu %{compldir}/lsipc %{compldir}/lslocks +%{compldir}/lslogins +%{compldir}/lsns %{compldir}/mcookie %{compldir}/mesg %{compldir}/mkfs @@ -742,6 +748,7 @@ exit 0 %{compldir}/mkfs.minix %{compldir}/mkswap %{compldir}/more +#%{compldir}/mount %{compldir}/mountpoint %{compldir}/namei %{compldir}/nsenter @@ -764,10 +771,12 @@ exit 0 %{compldir}/setterm %{compldir}/su %{compldir}/swaplabel +%{compldir}/swapoff %{compldir}/swapon %{compldir}/tailf %{compldir}/taskset %{compldir}/ul +#%{compldir}/umount %{compldir}/unshare %{compldir}/utmpdump %{compldir}/uuidgen From 77818367d0d98ea9be20061d568461151ec657fa Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 30 Mar 2016 15:04:47 +0200 Subject: [PATCH 215/425] 2.28-0.3: libblkid: bugfix --- 2.28-libblkid-mmap.patch | 160 +++++++++++++++++++++++++++++++++++++++ util-linux.spec | 7 +- 2 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 2.28-libblkid-mmap.patch diff --git a/2.28-libblkid-mmap.patch b/2.28-libblkid-mmap.patch new file mode 100644 index 0000000..e9fbaa8 --- /dev/null +++ b/2.28-libblkid-mmap.patch @@ -0,0 +1,160 @@ +From e04f386084c72df17e1d1e7d7d3e1e420a198442 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 30 Mar 2016 14:53:33 +0200 +Subject: [PATCH] libblkid: revert mmap usage + +The implementation has not been ready for I/O errors and it seems that +there is no elegant way how to resolve this issue. Linux returns +SIGBUS on mmap errors and play with signals (or longjumps) in shared +library is really bad idea. + +It also seems that mmaped devices have some unexpected side-effects +with page-cache where for example dd returns old data for already +modified device etc. + +Signed-off-by: Karel Zak +--- + libblkid/src/blkidP.h | 1 - + libblkid/src/probe.c | 90 ++------------------------------------------------- + 2 files changed, 2 insertions(+), 89 deletions(-) + +diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h +index 916deb0..e9a267e 100644 +--- a/libblkid/src/blkidP.h ++++ b/libblkid/src/blkidP.h +@@ -180,7 +180,6 @@ struct blkid_struct_probe + int fd; /* device file descriptor */ + uint64_t off; /* begin of data on the device */ + uint64_t size; /* end of data on the device */ +- size_t mmap_granularity; /* minimal size of mmaped buffer (PAGE_SIZE) */ + + dev_t devno; /* device number (st.st_rdev) */ + dev_t disk_devno; /* devno of the whole-disk or 0 */ +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 9c48462..34d97b8 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -104,7 +104,6 @@ + #include + #include + #include +-#include + + #ifdef HAVE_LIBUUID + # include +@@ -581,85 +580,6 @@ int __blkid_probe_filter_types(blkid_probe pr, int chain, int flag, char *names[ + return 0; + } + +-/* align to mmap granularity */ +-#define PROBE_ALIGN_OFF(p, o) ((o) & ~((p)->mmap_granularity - 1ULL)) +-/* default buffer sizes */ +-#define PROBE_MMAP_BEGINSIZ (1024ULL * 1024ULL * 2ULL) /* begin of the device */ +-#define PROBE_MMAP_ENDSIZ (1024ULL * 1024ULL * 2ULL) /* end of the device */ +-#define PROBE_MMAP_MIDSIZ (1024ULL * 1024ULL) /* middle of the device */ +- +-#define probe_is_mmap_wanted(p) (!S_ISCHR((p)->mode)) +- +-static struct blkid_bufinfo *mmap_buffer(blkid_probe pr, uint64_t real_off, uint64_t len) +-{ +- uint64_t map_len; +- uint64_t map_off = 0; +- struct blkid_bufinfo *bf = NULL; +- +- /* +- * libblkid heavily reads begin and end of the device, so it seems +- * better to mmap ~2MiB from the begin and end of the device to reduces +- * number of syscalls and necessary buffers. For random accees +- * somewhere in the middle of the device we use 1MiB buffers. +- */ +- if (!pr->mmap_granularity) +- pr->mmap_granularity = getpagesize(); +- +- /* begin of the device */ +- if (real_off == 0 || real_off + len < PROBE_MMAP_BEGINSIZ) { +- DBG(BUFFER, ul_debug("\tmapping begin of the device (max size: %"PRIu64")", pr->size)); +- map_off = 0; +- map_len = PROBE_MMAP_BEGINSIZ > pr->size ? pr->size : PROBE_MMAP_BEGINSIZ; +- +- +- /* end of the device */ +- } else if (real_off > pr->off + pr->size - PROBE_MMAP_ENDSIZ) { +- DBG(BUFFER, ul_debug("\tmapping end of the device (probing area: " +- "off=%"PRIu64", size=%"PRIu64")", pr->off, pr->size)); +- +- map_off = PROBE_ALIGN_OFF(pr, pr->off + pr->size - PROBE_MMAP_ENDSIZ); +- map_len = pr->off + pr->size - map_off; +- +- /* middle of the device */ +- } else { +- uint64_t minlen; +- +- map_off = PROBE_ALIGN_OFF(pr, real_off); +- minlen = real_off + len - map_off; +- +- map_len = minlen > PROBE_MMAP_MIDSIZ ? minlen : PROBE_MMAP_MIDSIZ; +- +- if (map_off + map_len > pr->off + pr->size) +- map_len = pr->size - map_off; +- } +- +- assert(map_off <= real_off); +- assert(map_off + map_len >= real_off + len); +- +- /* allocate buffer handler */ +- bf = malloc(sizeof(*bf)); +- if (!bf) { +- errno = ENOMEM; +- return NULL; +- } +- +- /* mmap into memmory */ +- bf->data = mmap(NULL, map_len, PROT_READ, MAP_SHARED, pr->fd, map_off); +- if (bf->data == MAP_FAILED) { +- DBG(BUFFER, ul_debug("\tmmap failed: %m")); +- free(bf); +- return NULL; +- } +- +- bf->off = map_off; +- bf->len = map_len; +- INIT_LIST_HEAD(&bf->bufs); +- +- DBG(BUFFER, ul_debug("\tmmap %p: off=%"PRIu64", len=%"PRIu64" (%"PRIu64" pages)", +- bf->data, map_off, map_len, map_len / pr->mmap_granularity)); +- return bf; +-} +- + static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint64_t len) + { + ssize_t ret; +@@ -759,10 +679,7 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, uint64_t off, uint64_t len + + /* not found; read from disk */ + if (!bf) { +- if (probe_is_mmap_wanted(pr)) +- bf = mmap_buffer(pr, real_off, len); +- else +- bf = read_buffer(pr, real_off, len); ++ bf = read_buffer(pr, real_off, len); + if (!bf) + return NULL; + +@@ -794,13 +711,10 @@ static void blkid_probe_reset_buffer(blkid_probe pr) + + DBG(BUFFER, ul_debug(" remove buffer: %p [off=%"PRIu64", len=%"PRIu64"]", + bf->data, bf->off, bf->len)); +- +- if (probe_is_mmap_wanted(pr)) +- munmap(bf->data, bf->len); + free(bf); + } + +- DBG(LOWPROBE, ul_debug(" buffers summary: %"PRIu64" bytes by %"PRIu64" read/mmap() calls", ++ DBG(LOWPROBE, ul_debug(" buffers summary: %"PRIu64" bytes by %"PRIu64" read() calls", + len, ct)); + + INIT_LIST_HEAD(&pr->buffers); +-- +2.4.3 + diff --git a/util-linux.spec b/util-linux.spec index 67afb0a..018315c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.28 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -88,6 +88,8 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch +# upstream patch, revert mmap() based probing +Patch1: 2.28-libblkid-mmap.patch %description The util-linux package contains a large variety of low-level system @@ -919,6 +921,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Mar 30 2016 Karel Zak - 2.28-0.3 +- fix libblkid + * Tue Mar 29 2016 Karel Zak - 2.28-0.2 - upgrade to v2.28-rc2 From 02e8b22b8e2789abb0ce04eef7512ea1b24c7ed5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 12 Apr 2016 13:38:27 +0200 Subject: [PATCH 216/425] 2.28.1: upgrade --- .gitignore | 1 + 2.28-libblkid-mmap.patch | 160 --------------------------------------- sources | 2 +- util-linux.spec | 9 ++- 4 files changed, 7 insertions(+), 165 deletions(-) delete mode 100644 2.28-libblkid-mmap.patch diff --git a/.gitignore b/.gitignore index 2c3177e..9dec953 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ /util-linux-2.27.1.tar.xz /util-linux-2.28-rc1.tar.xz /util-linux-2.28-rc2.tar.xz +/util-linux-2.28.tar.xz diff --git a/2.28-libblkid-mmap.patch b/2.28-libblkid-mmap.patch deleted file mode 100644 index e9fbaa8..0000000 --- a/2.28-libblkid-mmap.patch +++ /dev/null @@ -1,160 +0,0 @@ -From e04f386084c72df17e1d1e7d7d3e1e420a198442 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 30 Mar 2016 14:53:33 +0200 -Subject: [PATCH] libblkid: revert mmap usage - -The implementation has not been ready for I/O errors and it seems that -there is no elegant way how to resolve this issue. Linux returns -SIGBUS on mmap errors and play with signals (or longjumps) in shared -library is really bad idea. - -It also seems that mmaped devices have some unexpected side-effects -with page-cache where for example dd returns old data for already -modified device etc. - -Signed-off-by: Karel Zak ---- - libblkid/src/blkidP.h | 1 - - libblkid/src/probe.c | 90 ++------------------------------------------------- - 2 files changed, 2 insertions(+), 89 deletions(-) - -diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h -index 916deb0..e9a267e 100644 ---- a/libblkid/src/blkidP.h -+++ b/libblkid/src/blkidP.h -@@ -180,7 +180,6 @@ struct blkid_struct_probe - int fd; /* device file descriptor */ - uint64_t off; /* begin of data on the device */ - uint64_t size; /* end of data on the device */ -- size_t mmap_granularity; /* minimal size of mmaped buffer (PAGE_SIZE) */ - - dev_t devno; /* device number (st.st_rdev) */ - dev_t disk_devno; /* devno of the whole-disk or 0 */ -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 9c48462..34d97b8 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -104,7 +104,6 @@ - #include - #include - #include --#include - - #ifdef HAVE_LIBUUID - # include -@@ -581,85 +580,6 @@ int __blkid_probe_filter_types(blkid_probe pr, int chain, int flag, char *names[ - return 0; - } - --/* align to mmap granularity */ --#define PROBE_ALIGN_OFF(p, o) ((o) & ~((p)->mmap_granularity - 1ULL)) --/* default buffer sizes */ --#define PROBE_MMAP_BEGINSIZ (1024ULL * 1024ULL * 2ULL) /* begin of the device */ --#define PROBE_MMAP_ENDSIZ (1024ULL * 1024ULL * 2ULL) /* end of the device */ --#define PROBE_MMAP_MIDSIZ (1024ULL * 1024ULL) /* middle of the device */ -- --#define probe_is_mmap_wanted(p) (!S_ISCHR((p)->mode)) -- --static struct blkid_bufinfo *mmap_buffer(blkid_probe pr, uint64_t real_off, uint64_t len) --{ -- uint64_t map_len; -- uint64_t map_off = 0; -- struct blkid_bufinfo *bf = NULL; -- -- /* -- * libblkid heavily reads begin and end of the device, so it seems -- * better to mmap ~2MiB from the begin and end of the device to reduces -- * number of syscalls and necessary buffers. For random accees -- * somewhere in the middle of the device we use 1MiB buffers. -- */ -- if (!pr->mmap_granularity) -- pr->mmap_granularity = getpagesize(); -- -- /* begin of the device */ -- if (real_off == 0 || real_off + len < PROBE_MMAP_BEGINSIZ) { -- DBG(BUFFER, ul_debug("\tmapping begin of the device (max size: %"PRIu64")", pr->size)); -- map_off = 0; -- map_len = PROBE_MMAP_BEGINSIZ > pr->size ? pr->size : PROBE_MMAP_BEGINSIZ; -- -- -- /* end of the device */ -- } else if (real_off > pr->off + pr->size - PROBE_MMAP_ENDSIZ) { -- DBG(BUFFER, ul_debug("\tmapping end of the device (probing area: " -- "off=%"PRIu64", size=%"PRIu64")", pr->off, pr->size)); -- -- map_off = PROBE_ALIGN_OFF(pr, pr->off + pr->size - PROBE_MMAP_ENDSIZ); -- map_len = pr->off + pr->size - map_off; -- -- /* middle of the device */ -- } else { -- uint64_t minlen; -- -- map_off = PROBE_ALIGN_OFF(pr, real_off); -- minlen = real_off + len - map_off; -- -- map_len = minlen > PROBE_MMAP_MIDSIZ ? minlen : PROBE_MMAP_MIDSIZ; -- -- if (map_off + map_len > pr->off + pr->size) -- map_len = pr->size - map_off; -- } -- -- assert(map_off <= real_off); -- assert(map_off + map_len >= real_off + len); -- -- /* allocate buffer handler */ -- bf = malloc(sizeof(*bf)); -- if (!bf) { -- errno = ENOMEM; -- return NULL; -- } -- -- /* mmap into memmory */ -- bf->data = mmap(NULL, map_len, PROT_READ, MAP_SHARED, pr->fd, map_off); -- if (bf->data == MAP_FAILED) { -- DBG(BUFFER, ul_debug("\tmmap failed: %m")); -- free(bf); -- return NULL; -- } -- -- bf->off = map_off; -- bf->len = map_len; -- INIT_LIST_HEAD(&bf->bufs); -- -- DBG(BUFFER, ul_debug("\tmmap %p: off=%"PRIu64", len=%"PRIu64" (%"PRIu64" pages)", -- bf->data, map_off, map_len, map_len / pr->mmap_granularity)); -- return bf; --} -- - static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint64_t len) - { - ssize_t ret; -@@ -759,10 +679,7 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, uint64_t off, uint64_t len - - /* not found; read from disk */ - if (!bf) { -- if (probe_is_mmap_wanted(pr)) -- bf = mmap_buffer(pr, real_off, len); -- else -- bf = read_buffer(pr, real_off, len); -+ bf = read_buffer(pr, real_off, len); - if (!bf) - return NULL; - -@@ -794,13 +711,10 @@ static void blkid_probe_reset_buffer(blkid_probe pr) - - DBG(BUFFER, ul_debug(" remove buffer: %p [off=%"PRIu64", len=%"PRIu64"]", - bf->data, bf->off, bf->len)); -- -- if (probe_is_mmap_wanted(pr)) -- munmap(bf->data, bf->len); - free(bf); - } - -- DBG(LOWPROBE, ul_debug(" buffers summary: %"PRIu64" bytes by %"PRIu64" read/mmap() calls", -+ DBG(LOWPROBE, ul_debug(" buffers summary: %"PRIu64" bytes by %"PRIu64" read() calls", - len, ct)); - - INIT_LIST_HEAD(&pr->buffers); --- -2.4.3 - diff --git a/sources b/sources index 10139d0..12f80fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ea0c349440708f28e6e3edbc715a467d util-linux-2.28-rc2.tar.xz +e534e6ccc49107e5d31c329af798ef7d util-linux-2.28.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 018315c..451061e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.28 -Release: 0.3%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -88,8 +88,6 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.23-login-lastlog-create.patch -# upstream patch, revert mmap() based probing -Patch1: 2.28-libblkid-mmap.patch %description The util-linux package contains a large variety of low-level system @@ -921,6 +919,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Apr 12 2016 Karel Zak - 2.28-1 +- upgrade to stable v2.28 + * Wed Mar 30 2016 Karel Zak - 2.28-0.3 - fix libblkid From 2afb30fac64f6f7e8eb500bba326cde19157289c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 26 Apr 2016 12:48:18 +0200 Subject: [PATCH 217/425] v2.28-2: update a patch + /usr/bin/cat /builddir/build/SOURCES/2.23-login-lastlog-create.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch 1 out of 1 hunk FAILED -- saving rejects to file login-utils/login.c.rej Addresses: https://kojipkgs.fedoraproject.org/work/tasks/3930/13783930/build.log --- 2.23-login-lastlog-create.patch | 11 ----------- 2.28-login-lastlog-create.patch | 12 ++++++++++++ util-linux.spec | 7 +++++-- 3 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 2.23-login-lastlog-create.patch create mode 100644 2.28-login-lastlog-create.patch diff --git a/2.23-login-lastlog-create.patch b/2.23-login-lastlog-create.patch deleted file mode 100644 index 6db26e2..0000000 --- a/2.23-login-lastlog-create.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up util-linux-2.23.2/login-utils/login.c.kzak util-linux-2.23.2/login-utils/login.c ---- util-linux-2.23.2/login-utils/login.c.kzak 2013-07-30 10:39:26.222738397 +0200 -+++ util-linux-2.23.2/login-utils/login.c 2013-09-09 09:01:39.923225757 +0200 -@@ -502,7 +502,7 @@ static void log_lastlog(struct login_con - if (!cxt->pwd) - return; - -- fd = open(_PATH_LASTLOG, O_RDWR, 0); -+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); - if (fd < 0) - return; diff --git a/2.28-login-lastlog-create.patch b/2.28-login-lastlog-create.patch new file mode 100644 index 0000000..869543e --- /dev/null +++ b/2.28-login-lastlog-create.patch @@ -0,0 +1,12 @@ +diff -up util-linux-2.28/login-utils/login.c.kzak util-linux-2.28/login-utils/login.c +--- util-linux-2.28/login-utils/login.c.kzak 2016-03-08 14:28:16.724156218 +0100 ++++ util-linux-2.28/login-utils/login.c 2016-04-26 12:45:29.235326017 +0200 +@@ -510,7 +510,7 @@ static void log_lastlog(struct login_con + sa.sa_handler = SIG_IGN; + sigaction(SIGXFSZ, &sa, &oldsa_xfsz); + +- fd = open(_PATH_LASTLOG, O_RDWR, 0); ++ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); + if (fd < 0) + goto done; + diff --git a/util-linux.spec b/util-linux.spec index 451061e..11bf5d1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.28 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -87,7 +87,7 @@ Requires: libfdisk = %{version}-%{release} ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch0: 2.23-login-lastlog-create.patch +Patch0: 2.28-login-lastlog-create.patch %description The util-linux package contains a large variety of low-level system @@ -919,6 +919,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Apr 26 2016 Karel Zak - 2.28-2 +- refresh login-lastlog-create.patch + * Tue Apr 12 2016 Karel Zak - 2.28-1 - upgrade to stable v2.28 From de66720388fdd0e68a780b83e972f68addd11f71 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 13 Jun 2016 12:50:49 +0200 Subject: [PATCH 218/425] 2.28-3: fix #1234317 --- 2.28-libblkid-cdrom.patch | 34 ++++++++++++++++++++++++++++++++++ util-linux.spec | 8 +++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 2.28-libblkid-cdrom.patch diff --git a/2.28-libblkid-cdrom.patch b/2.28-libblkid-cdrom.patch new file mode 100644 index 0000000..2dddbc2 --- /dev/null +++ b/2.28-libblkid-cdrom.patch @@ -0,0 +1,34 @@ +From 55ad13c26fe5d0e606be5a83937f31b8cf576588 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 28 Apr 2016 13:54:01 +0200 +Subject: [PATCH] libblkid: make I/O errors on CDROMs non-fatal + +It seems too tricky to get a real size of the data track on hybrid +disks with audio+data. It seems overkill to analyze all header in +libblkid and on some disks it's probably possible to get I/O error +almost everywhere due to crazy copy protection etc. + +Signed-off-by: Karel Zak +--- + libblkid/src/probe.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 63baed3..5d9f701 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -615,7 +615,10 @@ static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint + if (ret != (ssize_t) len) { + DBG(LOWPROBE, ul_debug("\tread failed: %m")); + free(bf); +- if (ret >= 0) ++ ++ /* I/O errors on CDROMs are non-fatal to work with hybrid ++ * audio+data disks */ ++ if (ret >= 0 || blkid_probe_is_cdrom(pr)) + errno = 0; + return NULL; + } +-- +2.4.11 + diff --git a/util-linux.spec b/util-linux.spec index 11bf5d1..41e9a0f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.28 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -89,6 +89,9 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# upstream patch - #1234317 - CD / DVD are rarely automounted +Patch1: 2.28-libblkid-cdrom.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -919,6 +922,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Jun 13 2016 Karel Zak - 2.28-3 +- fix #1234317 - CD / DVD are rarely automounted + * Tue Apr 26 2016 Karel Zak - 2.28-2 - refresh login-lastlog-create.patch From e91f50c4067e02c29c88e494abc969c2682a9868 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 13:05:20 +0000 Subject: [PATCH 219/425] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 41e9a0f..2bc32c2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.28 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -922,6 +922,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 2.28-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Mon Jun 13 2016 Karel Zak - 2.28-3 - fix #1234317 - CD / DVD are rarely automounted From ef494ba0d6adac9d438fef98e66682b5f4b2f067 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 Aug 2016 09:59:05 +0200 Subject: [PATCH 220/425] v2.28.1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 11 ++++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 9dec953..0a2aa80 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ /util-linux-2.28-rc1.tar.xz /util-linux-2.28-rc2.tar.xz /util-linux-2.28.tar.xz +/util-linux-2.28.1.tar.xz diff --git a/sources b/sources index 12f80fa..76252b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e534e6ccc49107e5d31c329af798ef7d util-linux-2.28.tar.xz +e2d863efaf4fd330a42c5efe9f1b02b4 util-linux-2.28.1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 2bc32c2..d889c64 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.28 -Release: 4%{?dist} +Version: 2.28.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -89,9 +89,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# upstream patch - #1234317 - CD / DVD are rarely automounted -Patch1: 2.28-libblkid-cdrom.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -922,6 +919,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Aug 18 2016 Karel Zak - 2.28.1-1 +- upgrade to stable 2.28.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes + * Tue Jul 19 2016 Fedora Release Engineering - 2.28-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages From b106becc251de00126d96b9682f70f55249565f3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 7 Sep 2016 14:18:10 +0200 Subject: [PATCH 221/425] v2.28.2: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0a2aa80..a176805 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ /util-linux-2.28-rc2.tar.xz /util-linux-2.28.tar.xz /util-linux-2.28.1.tar.xz +/util-linux-2.28.2.tar.xz diff --git a/sources b/sources index 76252b8..c1b9e55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e2d863efaf4fd330a42c5efe9f1b02b4 util-linux-2.28.1.tar.xz +46a232a37bce45371a86d19300edc47a util-linux-2.28.2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index d889c64..b7e19b7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.28.1 +Version: 2.28.2 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -919,6 +919,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Sep 7 2016 Karel Zak - 2.28.2-1 +- upgrade to stable 2.28.2 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + * Thu Aug 18 2016 Karel Zak - 2.28.1-1 - upgrade to stable 2.28.1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes From c55c42ae5d813dd80a9ce080458d8fe3564e3930 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 30 Sep 2016 12:04:40 +0200 Subject: [PATCH 222/425] upgrade to v2.29-rc1 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a176805..bebe56b 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /util-linux-2.28.tar.xz /util-linux-2.28.1.tar.xz /util-linux-2.28.2.tar.xz +/util-linux-2.29-rc1.tar.xz diff --git a/sources b/sources index c1b9e55..87509f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -46a232a37bce45371a86d19300edc47a util-linux-2.28.2.tar.xz +e1db567452c1849a0b0b4e5d284a7c88 util-linux-2.29-rc1.tar.xz diff --git a/util-linux.spec b/util-linux.spec index b7e19b7..a7a0eae 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.28.2 -Release: 1%{?dist} +Version: 2.29 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -919,6 +919,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Sep 30 2016 Karel Zak - 2.29-0.1 +- upgrade to v2.29-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes + * Wed Sep 7 2016 Karel Zak - 2.28.2-1 - upgrade to stable 2.28.2 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes From b570e8a4eb516d823eef83ad1bfc6de0ae98a8c8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Oct 2016 15:30:01 +0200 Subject: [PATCH 223/425] upgrade to v2.29-rc2 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bebe56b..a67a702 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ /util-linux-2.28.1.tar.xz /util-linux-2.28.2.tar.xz /util-linux-2.29-rc1.tar.xz +/util-linux-2.29-rc2.tar.xz diff --git a/sources b/sources index 87509f9..b4e58a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e1db567452c1849a0b0b4e5d284a7c88 util-linux-2.29-rc1.tar.xz +a3afca4e2b2be54e46fd859b7c8495ec util-linux-2.29-rc2.tar.xz diff --git a/util-linux.spec b/util-linux.spec index a7a0eae..9a9c5c5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.29 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -919,6 +919,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Oct 19 2016 Karel Zak - 2.29-0.2 +- upgrade to v2.29-rc2 + * Fri Sep 30 2016 Karel Zak - 2.29-0.1 - upgrade to v2.29-rc1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes From 3d940d4e8372094b837a69f2ac5ca2e15422ec9b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 8 Nov 2016 12:47:08 +0100 Subject: [PATCH 224/425] upgrade to v2.29 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a67a702..634f034 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ /util-linux-2.28.2.tar.xz /util-linux-2.29-rc1.tar.xz /util-linux-2.29-rc2.tar.xz +/util-linux-2.29.tar.xz diff --git a/sources b/sources index b4e58a0..6ff3f41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a3afca4e2b2be54e46fd859b7c8495ec util-linux-2.29-rc2.tar.xz +07b6845f48a421ad5844aa9d58edb837 util-linux-2.29.tar.xz diff --git a/util-linux.spec b/util-linux.spec index 9a9c5c5..6f6b6e5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.29 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -919,6 +919,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Tue Nov 8 2016 Karel Zak - 2.29-1 +- upgrade to v2.29 + * Wed Oct 19 2016 Karel Zak - 2.29-0.2 - upgrade to v2.29-rc2 From d3eae21d6953421230a3375a8970b0e3400c66b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Dec 2016 18:20:38 +0100 Subject: [PATCH 225/425] Rebuild for Python 3.6 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 6f6b6e5..7976268 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.29 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -919,6 +919,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Dec 19 2016 Miro HronÄok - 2.29-2 +- Rebuild for Python 3.6 + * Tue Nov 8 2016 Karel Zak - 2.29-1 - upgrade to v2.29 From 07ed6e64f828b49c4649f27d2f7b6a6488af19d3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Jan 2017 15:52:13 +0100 Subject: [PATCH 226/425] upgrade to v2.29.1 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 634f034..e4b5960 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ /util-linux-2.29-rc1.tar.xz /util-linux-2.29-rc2.tar.xz /util-linux-2.29.tar.xz +/util-linux-2.29.1.tar.xz diff --git a/sources b/sources index 6ff3f41..aa163ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -07b6845f48a421ad5844aa9d58edb837 util-linux-2.29.tar.xz +SHA512 (util-linux-2.29.1.tar.xz) = 38493f2750174184c436254ae4e78cf02aecf9f75e9fca21096e47755f779deb42640a9c6298225b61e08a0c15d7ff344a378b7705be0c5b5e6ede7a5b0e2b6c diff --git a/util-linux.spec b/util-linux.spec index 7976268..9981b88 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.29 -Release: 2%{?dist} +Version: 2.29.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -919,6 +919,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Jan 20 2017 Karel Zak - 2.29.1-1 +- upgrade to v2.29.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes + * Mon Dec 19 2016 Miro HronÄok - 2.29-2 - Rebuild for Python 3.6 From 04f1d57f74fd4738d2c462a2302031bc92a186b9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 16:52:10 +0000 Subject: [PATCH 227/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 9981b88..f302b50 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.29.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -919,6 +919,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 2.29.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Jan 20 2017 Karel Zak - 2.29.1-1 - upgrade to v2.29.1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes From 4efad38df3458180a2f15d61a3ff89424d92d55e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 24 Feb 2017 12:25:37 +0100 Subject: [PATCH 228/425] upgrade to v2.29.2 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e4b5960..09915b9 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /util-linux-2.29-rc2.tar.xz /util-linux-2.29.tar.xz /util-linux-2.29.1.tar.xz +/util-linux-2.29.2.tar.xz diff --git a/sources b/sources index aa163ef..8f0791a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.29.1.tar.xz) = 38493f2750174184c436254ae4e78cf02aecf9f75e9fca21096e47755f779deb42640a9c6298225b61e08a0c15d7ff344a378b7705be0c5b5e6ede7a5b0e2b6c +SHA512 (util-linux-2.29.2.tar.xz) = 0a87e6758531f74276f3de7607ef545f324b9b36b444aa5d163140c5fb0f4f7602655d7ec9939f92550dcb320d922cd69521a2183199d463795e67d3c27fce79 diff --git a/util-linux.spec b/util-linux.spec index f302b50..51c6fcd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.29.1 -Release: 2%{?dist} +Version: 2.29.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -919,6 +919,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Feb 24 2017 Karel Zak - 2.29.2-1 +- upgrade to v2.29.2 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.2-ReleaseNotes + * Sat Feb 11 2017 Fedora Release Engineering - 2.29.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 77887c051be014ed63793db0c4fa583e6647e18d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 17 May 2017 10:51:15 +0200 Subject: [PATCH 229/425] upgrade to v2.30-rc1 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 27 +++++++++++++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 09915b9..4710341 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ /util-linux-2.29.tar.xz /util-linux-2.29.1.tar.xz /util-linux-2.29.2.tar.xz +/util-linux-2.30-rc1.tar.xz diff --git a/sources b/sources index 8f0791a..d02ddf2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.29.2.tar.xz) = 0a87e6758531f74276f3de7607ef545f324b9b36b444aa5d163140c5fb0f4f7602655d7ec9939f92550dcb320d922cd69521a2183199d463795e67d3c27fce79 +SHA512 (util-linux-2.30-rc1.tar.xz) = 8f1aeb6938924d21474bec660e775ab511e359906079d2660e81680b8940fcbc70086f5f95f2a31acabcafa56740d2ad21b0c4bff793146431b35e119714819b diff --git a/util-linux.spec b/util-linux.spec index 51c6fcd..ace22da 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.29.2 -Release: 1%{?dist} +Version: 2.30 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -516,9 +516,11 @@ exit 0 %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/chmem %{_bindir}/dmesg %{_bindir}/eject %{_bindir}/fallocate +%{_bindir}/fincore %{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt @@ -538,6 +540,7 @@ exit 0 %{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/lslogins +%{_bindir}/lsmem %{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg @@ -556,7 +559,6 @@ exit 0 %{_bindir}/setpriv %{_bindir}/setsid %{_bindir}/setterm -%{_bindir}/tailf %{_bindir}/taskset %{_bindir}/ul %{_bindir}/unshare @@ -574,6 +576,7 @@ exit 0 %{_mandir}/man1/dmesg.1* %{_mandir}/man1/eject.1* %{_mandir}/man1/fallocate.1* +%{_mandir}/man1/fincore.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* %{_mandir}/man1/hexdump.1* @@ -590,6 +593,7 @@ exit 0 %{_mandir}/man1/lscpu.1* %{_mandir}/man1/lsipc.1* %{_mandir}/man1/lslogins.1* +%{_mandir}/man1/lsmem.1* %{_mandir}/man1/mcookie.1* %{_mandir}/man1/mesg.1* %{_mandir}/man1/more.1* @@ -607,7 +611,6 @@ exit 0 %{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* -%{_mandir}/man1/tailf.1* %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* %{_mandir}/man1/unshare.1* @@ -622,8 +625,10 @@ exit 0 %{_mandir}/man8/agetty.8* %{_mandir}/man8/blkdiscard.8* %{_mandir}/man8/blkid.8* +%{_mandir}/man8/blkzone.8* %{_mandir}/man8/blockdev.8* %{_mandir}/man8/chcpu.8* +%{_mandir}/man8/chmem.8* %{_mandir}/man8/ctrlaltdel.8* %{_mandir}/man8/delpart.8* %{_mandir}/man8/fdisk.8* @@ -667,6 +672,7 @@ exit 0 %{_sbindir}/agetty %{_sbindir}/blkdiscard %{_sbindir}/blkid +%{_sbindir}/blkzone %{_sbindir}/blockdev %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -702,9 +708,11 @@ exit 0 %{compldir}/addpart %{compldir}/blkdiscard %{compldir}/blkid +%{compldir}/blkzone %{compldir}/blockdev %{compldir}/cal %{compldir}/chcpu +%{compldir}/chmem %{compldir}/chrt %{compldir}/col %{compldir}/colcrt @@ -716,6 +724,8 @@ exit 0 %{compldir}/eject %{compldir}/fallocate %{compldir}/fdisk +%{compldir}/fincore +%{compldir}/findfs %{compldir}/findmnt %{compldir}/flock %{compldir}/fsck @@ -740,6 +750,7 @@ exit 0 %{compldir}/lsipc %{compldir}/lslocks %{compldir}/lslogins +%{compldir}/lsmem %{compldir}/lsns %{compldir}/mcookie %{compldir}/mesg @@ -773,7 +784,6 @@ exit 0 %{compldir}/swaplabel %{compldir}/swapoff %{compldir}/swapon -%{compldir}/tailf %{compldir}/taskset %{compldir}/ul #%{compldir}/umount @@ -787,6 +797,7 @@ exit 0 %{compldir}/write %{compldir}/zramctl + %ifnarch s390 s390x %{_sbindir}/clock %{_sbindir}/fdformat @@ -919,6 +930,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed May 17 2017 Karel Zak - 2.30-0.1 +- upgrade to v2.30-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes + * Fri Feb 24 2017 Karel Zak - 2.29.2-1 - upgrade to v2.29.2 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.2-ReleaseNotes From 17b923cc1e92d6bdf567a338f60cf8e8d1eead2b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 2 Jun 2017 12:58:33 +0200 Subject: [PATCH 230/425] upgrade to v2.30 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4710341..bf0485b 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ /util-linux-2.29.1.tar.xz /util-linux-2.29.2.tar.xz /util-linux-2.30-rc1.tar.xz +/util-linux-2.30.tar.xz diff --git a/sources b/sources index d02ddf2..f0f16ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.30-rc1.tar.xz) = 8f1aeb6938924d21474bec660e775ab511e359906079d2660e81680b8940fcbc70086f5f95f2a31acabcafa56740d2ad21b0c4bff793146431b35e119714819b +SHA512 (util-linux-2.30.tar.xz) = 30e311768718508066829567200e975fd08a22360915b27c8839f368fe6d84c8eca6c2f69a60f113d934eea9934e49f05cd98c3db7fd6bc5ad8f7f770badbc97 diff --git a/util-linux.spec b/util-linux.spec index ace22da..a4cf198 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.30 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -930,6 +930,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Jun 2 2017 Karel Zak - 2.30-1 +- upgrade to v2.30 + * Wed May 17 2017 Karel Zak - 2.30-0.1 - upgrade to v2.30-rc1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes From cdab8b4a761bfd2e5eabdf961646b157810095ef Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 20 Jul 2017 14:16:09 +0200 Subject: [PATCH 231/425] upgrade to v2.30.1 Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bf0485b..acf0c92 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ /util-linux-2.29.2.tar.xz /util-linux-2.30-rc1.tar.xz /util-linux-2.30.tar.xz +/util-linux-2.30.1.tar.xz diff --git a/sources b/sources index f0f16ef..d78b616 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.30.tar.xz) = 30e311768718508066829567200e975fd08a22360915b27c8839f368fe6d84c8eca6c2f69a60f113d934eea9934e49f05cd98c3db7fd6bc5ad8f7f770badbc97 +SHA512 (util-linux-2.30.1.tar.xz) = bcf1807198660c133c380e13d6ba5dcdb7470c47bcaeea03ccc5a78a0d834e3df3d13ae5ffc35fd7f8fff7ba062629d4b1f5cde78452b846c9315c51c9e108f5 diff --git a/util-linux.spec b/util-linux.spec index a4cf198..972075e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.30 +Version: 2.30.1 Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base @@ -930,6 +930,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jul 20 2017 Karel Zak - 2.30.1-1 +- upgrade to v2.30.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.1-ReleaseNotes + * Fri Jun 2 2017 Karel Zak - 2.30-1 - upgrade to v2.30 From c186315fe82b9852455187006641cfc1afab86de Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:07:09 +0000 Subject: [PATCH 232/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 972075e..c02a1f6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.30.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -930,6 +930,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 2.30.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Jul 20 2017 Karel Zak - 2.30.1-1 - upgrade to v2.30.1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.1-ReleaseNotes From f898c964678274e7776d33d85f70839f683d4c29 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 2 Aug 2017 15:09:23 +0200 Subject: [PATCH 233/425] 2.30.1-3: fix #1390191 --- util-linux.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index c02a1f6..c7c9f76 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.30.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -394,7 +394,7 @@ chmod 644 misc-utils/getopt-*.{bash,tcsh} rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt -ln -sf /proc/mounts %{buildroot}/etc/mtab +ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a @@ -435,7 +435,7 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then fi fi if [ ! -L /etc/mtab ]; then - ln -fs /proc/mounts /etc/mtab + ln -sf ../proc/self/mounts %{buildroot}/etc/mtab fi %post -n libblkid @@ -930,6 +930,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Wed Aug 2 2017 Karel Zak - 2.30.1-3 +- fix #1390191 - systemd read-only container produces errors + * Thu Jul 27 2017 Fedora Release Engineering - 2.30.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From d8ee2107f14485db33cdf7dbd633d578bc6e041c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 4 Aug 2017 11:01:51 +0200 Subject: [PATCH 234/425] 2.30.1-4: fix post install script --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index c7c9f76..62c09e4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.30.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -435,7 +435,7 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then fi fi if [ ! -L /etc/mtab ]; then - ln -sf ../proc/self/mounts %{buildroot}/etc/mtab + ln -sf ../proc/self/mounts /etc/mtab fi %post -n libblkid @@ -930,6 +930,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Aug 4 2017 Karel Zak - 2.30.1-4 +- fix post install script + * Wed Aug 2 2017 Karel Zak - 2.30.1-3 - fix #1390191 - systemd read-only container produces errors From 8aba564a5f30229b192d4332a0aee63f6391dfba Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 14 Aug 2017 11:16:01 +0200 Subject: [PATCH 235/425] 2.30.1-5: ln-s more robust --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 62c09e4..83c4cdb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.30.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -435,7 +435,7 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then fi fi if [ ! -L /etc/mtab ]; then - ln -sf ../proc/self/mounts /etc/mtab + ln -sf ../proc/self/mounts /etc/mtab || : fi %post -n libblkid @@ -930,6 +930,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Aug 14 2017 Karel Zak - 2.30.1-5 +- make ln-s usage more robust + * Fri Aug 4 2017 Karel Zak - 2.30.1-4 - fix post install script From 558fdf8110e5ab2799c553e1c9e75b6a8e3eb23d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 22 Sep 2017 10:17:26 +0200 Subject: [PATCH 236/425] upgrade to v2.30.2 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index acf0c92..2ada1fd 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ /util-linux-2.30-rc1.tar.xz /util-linux-2.30.tar.xz /util-linux-2.30.1.tar.xz +/util-linux-2.30.2.tar.xz diff --git a/sources b/sources index d78b616..2cd4449 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.30.1.tar.xz) = bcf1807198660c133c380e13d6ba5dcdb7470c47bcaeea03ccc5a78a0d834e3df3d13ae5ffc35fd7f8fff7ba062629d4b1f5cde78452b846c9315c51c9e108f5 +SHA512 (util-linux-2.30.2.tar.xz) = b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d diff --git a/util-linux.spec b/util-linux.spec index 83c4cdb..29bca51 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.30.1 -Release: 5%{?dist} +Version: 2.30.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -930,6 +930,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Sep 22 2017 Karel Zak - 2.30.2-1 +- upgrade to v2.30.2 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.2-ReleaseNotes + * Mon Aug 14 2017 Karel Zak - 2.30.1-5 - make ln-s usage more robust From 93789c77213c06d1511edb39257ca6fdd590d342 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 22 Sep 2017 12:56:40 +0200 Subject: [PATCH 237/425] upgrade to v2.31-rc1 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2ada1fd..d8f51a7 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ /util-linux-2.30.tar.xz /util-linux-2.30.1.tar.xz /util-linux-2.30.2.tar.xz +/util-linux-2.31-rc1.tar.xz diff --git a/sources b/sources index 2cd4449..9e77ffc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.30.2.tar.xz) = b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d +SHA512 (util-linux-2.31-rc1.tar.xz) = 027815da2ee4d342ff1578d5bba71ea63dc1cd6816ad753c644b5422b693e9dfe35ab158101ac9d7f8b7dbee1d2cf97e4930b24ed247eba7be1312e5292c3f9f diff --git a/util-linux.spec b/util-linux.spec index 29bca51..9c92eb3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.30.2 -Release: 1%{?dist} +Version: 2.31 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -553,6 +553,7 @@ exit 0 %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev +%{_bindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -564,6 +565,7 @@ exit 0 %{_bindir}/unshare %{_bindir}/utmpdump %{_bindir}/uuidgen +%{_bindir}/uuidparse %{_bindir}/wall %{_bindir}/wdctl %{_bindir}/whereis @@ -616,6 +618,7 @@ exit 0 %{_mandir}/man1/unshare.1* %{_mandir}/man1/utmpdump.1.gz %{_mandir}/man1/uuidgen.1* +%{_mandir}/man1/uuidparse.1* %{_mandir}/man1/wall.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* @@ -657,6 +660,7 @@ exit 0 %{_mandir}/man8/rawdevices.8* %{_mandir}/man8/readprofile.8* %{_mandir}/man8/resizepart.8* +%{_mandir}/man8/rfkill.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* %{_mandir}/man8/sulogin.8.gz @@ -772,6 +776,7 @@ exit 0 %{compldir}/renice %{compldir}/resizepart %{compldir}/rev +%{compldir}/rfkill %{compldir}/rtcwake %{compldir}/runuser %{compldir}/script @@ -790,6 +795,7 @@ exit 0 %{compldir}/unshare %{compldir}/utmpdump %{compldir}/uuidgen +%{compldir}/uuidparse %{compldir}/wall %{compldir}/wdctl %{compldir}/whereis @@ -930,6 +936,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Fri Sep 22 2017 Karel Zak - 2.31-0.1 +- upgrade to v2.31-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.31/v2.31-ReleaseNotes + * Fri Sep 22 2017 Karel Zak - 2.30.2-1 - upgrade to v2.30.2 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.2-ReleaseNotes From 2cbb58aee9f9ccba1daabd38edde9640162da8a6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 25 Sep 2017 11:24:21 +0200 Subject: [PATCH 238/425] 2.31-0.2: disable rfkill Signed-off-by: Karel Zak --- util-linux.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 9c92eb3..83744c6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -278,6 +278,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ --disable-silent-rules \ + --disable-rfkill \ --disable-bfs \ --disable-pg \ --enable-chfn-chsh \ @@ -553,7 +554,7 @@ exit 0 %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev -%{_bindir}/rfkill +#%{_bindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -660,7 +661,7 @@ exit 0 %{_mandir}/man8/rawdevices.8* %{_mandir}/man8/readprofile.8* %{_mandir}/man8/resizepart.8* -%{_mandir}/man8/rfkill.8* +#%{_mandir}/man8/rfkill.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* %{_mandir}/man8/sulogin.8.gz @@ -776,7 +777,7 @@ exit 0 %{compldir}/renice %{compldir}/resizepart %{compldir}/rev -%{compldir}/rfkill +#%{compldir}/rfkill %{compldir}/rtcwake %{compldir}/runuser %{compldir}/script @@ -936,6 +937,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Sep 25 2017 Karel Zak - 2.31-0.2 +- temporary disable rfkill (fix #1494855) + * Fri Sep 22 2017 Karel Zak - 2.31-0.1 - upgrade to v2.31-rc1 http://ftp.kernel.org/pub/linux/utils/util-linux/v2.31/v2.31-ReleaseNotes From 208b062ff655c7ebfdacdd03b1d15bf10990c15f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Oct 2017 10:42:31 +0200 Subject: [PATCH 239/425] 2.31-0.3: upgrade to rc2, enable rfkill --- util-linux.spec | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 83744c6..58209f6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -55,6 +55,9 @@ Conflicts: coreutils < 8.20 # eject has been merged into util-linux v2.22 Obsoletes: eject <= 2.1.5 Provides: eject = 2.1.6 +# rfkill has been merged into util-linux v2.31 +Obsoletes: rfkill <= 0.5 +Provides: rfkill = 0.5 # sulogin, utmpdump merged into util-linux v2.22; # last, lastb merged into util-linux v2.24 Conflicts: sysvinit-tools < 2.88-14 @@ -278,7 +281,6 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ --disable-silent-rules \ - --disable-rfkill \ --disable-bfs \ --disable-pg \ --enable-chfn-chsh \ @@ -554,7 +556,7 @@ exit 0 %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev -#%{_bindir}/rfkill +%{_bindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -661,7 +663,7 @@ exit 0 %{_mandir}/man8/rawdevices.8* %{_mandir}/man8/readprofile.8* %{_mandir}/man8/resizepart.8* -#%{_mandir}/man8/rfkill.8* +%{_mandir}/man8/rfkill.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* %{_mandir}/man8/sulogin.8.gz @@ -777,7 +779,7 @@ exit 0 %{compldir}/renice %{compldir}/resizepart %{compldir}/rev -#%{compldir}/rfkill +%{compldir}/rfkill %{compldir}/rtcwake %{compldir}/runuser %{compldir}/script @@ -937,6 +939,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Oct 9 2017 Karel Zak - 2.31-0.3 +- upgrade to v2.31-rc2 +- enable rfkill + * Mon Sep 25 2017 Karel Zak - 2.31-0.2 - temporary disable rfkill (fix #1494855) From 8aba0e5c790700887a07824dae25cbae76191c29 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Oct 2017 10:49:50 +0200 Subject: [PATCH 240/425] new sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d8f51a7..0651f99 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ /util-linux-2.30.1.tar.xz /util-linux-2.30.2.tar.xz /util-linux-2.31-rc1.tar.xz +/util-linux-2.31-rc2.tar.xz diff --git a/sources b/sources index 9e77ffc..697cf7c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.31-rc1.tar.xz) = 027815da2ee4d342ff1578d5bba71ea63dc1cd6816ad753c644b5422b693e9dfe35ab158101ac9d7f8b7dbee1d2cf97e4930b24ed247eba7be1312e5292c3f9f +SHA512 (util-linux-2.31-rc2.tar.xz) = d5b882dbe566e5ad4cbf3ea328bc777ae643c271c4db4a119f270222ef50d89bdb2244524093df794caf0ec9a6b5f559c618f0e36f2c1e2ce30e24c60e876a97 From 401fd81490117cef8436227ad98764e85b874e81 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 9 Oct 2017 11:01:57 +0200 Subject: [PATCH 241/425] 2.31-0.4:fix losetup build error --- ...licting-types-for-loopcxt_set_blocks.patch | 44 +++++++++++++++++++ util-linux.spec | 10 +++-- 2 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch diff --git a/0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch b/0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch new file mode 100644 index 0000000..28e1980 --- /dev/null +++ b/0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch @@ -0,0 +1,44 @@ +From c4e60bc0807b04ab104594abc83301481d5d5995 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 4 Oct 2017 10:08:08 +0200 +Subject: [PATCH] =?UTF-8?q?losetup:=20fix=20conflicting=20types=20for=20?= + =?UTF-8?q?=E2=80=98loopcxt=5Fset=5Fblocksize=E2=80=99?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reported-by: Lars Wendler +Signed-off-by: Karel Zak +--- + lib/loopdev.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/lib/loopdev.c b/lib/loopdev.c +index 66fa4f669..819aada32 100644 +--- a/lib/loopdev.c ++++ b/lib/loopdev.c +@@ -1430,7 +1430,11 @@ int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio) + return 0; + } + +-int loopcxt_set_blocksize(struct loopdev_cxt *lc, unsigned long blocksize) ++/* ++ * Kernel uses "unsigned long" as ioctl arg, but we use u64 for all sizes to ++ * keep loopdev internal API simple. ++ */ ++int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) + { + int fd = loopcxt_get_fd(lc); + +@@ -1438,7 +1442,7 @@ int loopcxt_set_blocksize(struct loopdev_cxt *lc, unsigned long blocksize) + return -EINVAL; + + /* Kernels prior to v4.14 don't support this ioctl */ +- if (ioctl(fd, LOOP_SET_BLOCK_SIZE, blocksize) < 0) { ++ if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) blocksize) < 0) { + int rc = -errno; + DBG(CXT, ul_debugobj(lc, "LOOP_SET_BLOCK_SIZE failed: %m")); + return rc; +-- +2.13.6 + diff --git a/util-linux.spec b/util-linux.spec index 58209f6..842539c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -92,6 +92,9 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# upstream patch +Patch1: 0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -766,7 +769,6 @@ exit 0 %{compldir}/mkfs.minix %{compldir}/mkswap %{compldir}/more -#%{compldir}/mount %{compldir}/mountpoint %{compldir}/namei %{compldir}/nsenter @@ -794,7 +796,6 @@ exit 0 %{compldir}/swapon %{compldir}/taskset %{compldir}/ul -#%{compldir}/umount %{compldir}/unshare %{compldir}/utmpdump %{compldir}/uuidgen @@ -939,6 +940,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Oct 9 2017 Karel Zak - 2.31-0.4 +- fix build error + * Mon Oct 9 2017 Karel Zak - 2.31-0.3 - upgrade to v2.31-rc2 - enable rfkill From a56a94947c082cd04f8b0303b86aa9961f81e8c8 Mon Sep 17 00:00:00 2001 From: Rachel Sibley Date: Mon, 16 Oct 2017 16:00:11 -0400 Subject: [PATCH 242/425] Initial commit for downstream tests using standard test interface --- tests/tests.yml | 12 ++++++++ tests/various/Makefile | 64 ++++++++++++++++++++++++++++++++++++++++ tests/various/PURPOSE | 3 ++ tests/various/runtest.sh | 52 ++++++++++++++++++++++++++++++++ 4 files changed, 131 insertions(+) create mode 100644 tests/tests.yml create mode 100644 tests/various/Makefile create mode 100644 tests/various/PURPOSE create mode 100755 tests/various/runtest.sh diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..b6f2dd1 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +# Test which run in classic and docker environemnt +- hosts: localhost + tags: + - classic + - container + roles: + - role: standard-test-beakerlib + tests: + - various + required_packages: + - util-linux + - util-linux-user diff --git a/tests/various/Makefile b/tests/various/Makefile new file mode 100644 index 0000000..2357934 --- /dev/null +++ b/tests/various/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/util-linux/various +# Description: This test groups small sanity and regression tests for util-linux +# Author: Miroslav Vadkerti +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/util-linux/Sanity/various +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Miroslav Vadkerti " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "RunFor: util-linux" >> $(METADATA) + @echo "Requires: util-linux util-linux-user" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/various/PURPOSE b/tests/various/PURPOSE new file mode 100644 index 0000000..b4de79a --- /dev/null +++ b/tests/various/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/util-linux/various +Description: This test groups small sanity and regression tests for util-linux +Author: Miroslav Vadkerti diff --git a/tests/various/runtest.sh b/tests/various/runtest.sh new file mode 100755 index 0000000..32871f4 --- /dev/null +++ b/tests/various/runtest.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/util-linux/various +# Description: This test groups small sanity and regression tests for util-linux +# Author: Miroslav Vadkerti +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +#. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="util-linux" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlPhaseEnd + + rlPhaseStartTest "return code of chfn should be always 1 in case failure" + rlRun "chfn -f a:b" 1 + rlRun "chfn -o a:b" 1 + rlRun "chfn -p a:b" 1 + rlRun "chfn -h a:b" 1 + rlRun "chfn -x a:b" 1 + rlRun "chfn -f a -o b -p c -h d unknown-user" 1 + rlPhaseEnd + + rlPhaseStartCleanup + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 95b12b7aa0ddac68aaa7c46ccf8550534d20df8b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 23 Oct 2017 11:56:41 +0200 Subject: [PATCH 243/425] 2.31-1: upstream ugrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 13 ++++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0651f99..cd9cdca 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ /util-linux-2.30.2.tar.xz /util-linux-2.31-rc1.tar.xz /util-linux-2.31-rc2.tar.xz +/util-linux-2.31.tar.xz diff --git a/sources b/sources index 697cf7c..8d319dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.31-rc2.tar.xz) = d5b882dbe566e5ad4cbf3ea328bc777ae643c271c4db4a119f270222ef50d89bdb2244524093df794caf0ec9a6b5f559c618f0e36f2c1e2ce30e24c60e876a97 +SHA512 (util-linux-2.31.tar.xz) = 48b668526e96a132736b882090d0e33c20b4b3a0e1760502d83118ed98ccc9423d310848a2bb73f82f85e9c19f6191075ae2c5269b007e76be1fbd7b6b88fbf5 diff --git a/util-linux.spec b/util-linux.spec index 842539c..bbc05c2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 0.4%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -339,6 +339,9 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 # sbin -> bin mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw +# bin -> sbin (v2.31 bug, will be fixed in v2.31.1) +mv ${RPM_BUILD_ROOT}%{_bindir}/rfkill ${RPM_BUILD_ROOT}%{_sbindir}/rfkill + # And a dirs uuidd needs that the makefiles don't create install -d ${RPM_BUILD_ROOT}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid @@ -559,7 +562,6 @@ exit 0 %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev -%{_bindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -705,6 +707,7 @@ exit 0 %{_sbindir}/pivot_root %{_sbindir}/readprofile %{_sbindir}/resizepart +%{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/sulogin @@ -940,6 +943,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Oct 23 2017 Karel Zak - 2.31-1 +- upgrade to final v2.31 +- move rfkill to sbin (for backward compatibility) + * Mon Oct 9 2017 Karel Zak - 2.31-0.4 - fix build error From 3251a896f8363d9a71a56e8b798a7aaf146bd5ef Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 23 Oct 2017 12:29:38 +0200 Subject: [PATCH 244/425] 2.31-1: remove obsolete patch --- ...licting-types-for-loopcxt_set_blocks.patch | 44 ------------------- util-linux.spec | 3 -- 2 files changed, 47 deletions(-) delete mode 100644 0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch diff --git a/0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch b/0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch deleted file mode 100644 index 28e1980..0000000 --- a/0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch +++ /dev/null @@ -1,44 +0,0 @@ -From c4e60bc0807b04ab104594abc83301481d5d5995 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 4 Oct 2017 10:08:08 +0200 -Subject: [PATCH] =?UTF-8?q?losetup:=20fix=20conflicting=20types=20for=20?= - =?UTF-8?q?=E2=80=98loopcxt=5Fset=5Fblocksize=E2=80=99?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Reported-by: Lars Wendler -Signed-off-by: Karel Zak ---- - lib/loopdev.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/lib/loopdev.c b/lib/loopdev.c -index 66fa4f669..819aada32 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -1430,7 +1430,11 @@ int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio) - return 0; - } - --int loopcxt_set_blocksize(struct loopdev_cxt *lc, unsigned long blocksize) -+/* -+ * Kernel uses "unsigned long" as ioctl arg, but we use u64 for all sizes to -+ * keep loopdev internal API simple. -+ */ -+int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) - { - int fd = loopcxt_get_fd(lc); - -@@ -1438,7 +1442,7 @@ int loopcxt_set_blocksize(struct loopdev_cxt *lc, unsigned long blocksize) - return -EINVAL; - - /* Kernels prior to v4.14 don't support this ioctl */ -- if (ioctl(fd, LOOP_SET_BLOCK_SIZE, blocksize) < 0) { -+ if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) blocksize) < 0) { - int rc = -errno; - DBG(CXT, ul_debugobj(lc, "LOOP_SET_BLOCK_SIZE failed: %m")); - return rc; --- -2.13.6 - diff --git a/util-linux.spec b/util-linux.spec index bbc05c2..6ccff93 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -92,9 +92,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# upstream patch -Patch1: 0001-losetup-fix-conflicting-types-for-loopcxt_set_blocks.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 44205151811e8bf56ded49f13772e9a189a3ac34 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 30 Oct 2017 15:20:51 +0100 Subject: [PATCH 245/425] 2.31-2: dmesg fix --- ...-Revert-dmesg-fragment-concatenation.patch | 194 ++++++++++++++++++ util-linux.spec | 8 +- 2 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-dmesg-fragment-concatenation.patch diff --git a/0001-Revert-dmesg-fragment-concatenation.patch b/0001-Revert-dmesg-fragment-concatenation.patch new file mode 100644 index 0000000..7680766 --- /dev/null +++ b/0001-Revert-dmesg-fragment-concatenation.patch @@ -0,0 +1,194 @@ +From 8a6f0cfd96a3a7f0e72079407af4b8ed705c1ed2 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 30 Oct 2017 15:04:20 +0100 +Subject: [PATCH] Revert "dmesg: fragment concatenation" + +* introduces regressions +* stupid code; parse_kmsg_record() called more than once for each record + +This reverts commit 22eb2f0190d8a9850da750641439ccd284ac0bfe. +--- + sys-utils/dmesg.c | 117 ++++-------------------------------------------------- + 1 file changed, 7 insertions(+), 110 deletions(-) + +diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c +index b626380f7..6e5911a76 100644 +--- a/sys-utils/dmesg.c ++++ b/sys-utils/dmesg.c +@@ -20,7 +20,6 @@ + #include + #include + #include +-#include + + #include "c.h" + #include "colors.h" +@@ -179,8 +178,6 @@ struct dmesg_control { + int kmsg; /* /dev/kmsg file descriptor */ + ssize_t kmsg_first_read;/* initial read() return code */ + char kmsg_buf[BUFSIZ];/* buffer to read kmsg data */ +- char kmsg_saved[BUFSIZ];/* buffer to save line after fragment */ +- ssize_t kmsg_saved_size; /* if nonzero, read from kmsg_saved */ + + /* + * For the --file option we mmap whole file. The unnecessary (already +@@ -209,7 +206,6 @@ struct dmesg_record { + int level; + int facility; + struct timeval tv; +- char flags; + + const char *next; /* buffer with next unparsed record */ + size_t next_size; /* size of the next buffer */ +@@ -226,13 +222,6 @@ struct dmesg_record { + + static int read_kmsg(struct dmesg_control *ctl); + +- +-static int parse_kmsg_record(struct dmesg_control *ctl, +- struct dmesg_record *rec, +- char *buf, +- size_t sz); +- +- + static int set_level_color(int log_level, const char *mesg, size_t mesgsz) + { + int id = -1; +@@ -1024,101 +1013,15 @@ static void print_buffer(struct dmesg_control *ctl, + print_record(ctl, &rec); + } + +-/* +- * Read one record from kmsg, automatically concatenating message fragments +- */ + static ssize_t read_kmsg_one(struct dmesg_control *ctl) + { + ssize_t size; +- struct dmesg_record rec = { .flags = 0 }; +- char fragment_buf[BUFSIZ] = { 0 }; +- ssize_t fragment_offset = 0; +- +- if (ctl->kmsg_saved_size != 0) { +- size = ctl->kmsg_saved_size; +- memcpy(ctl->kmsg_buf, ctl->kmsg_saved, size); +- ctl->kmsg_saved_size = 0; +- return size; +- } + +- /* +- * kmsg returns EPIPE if record was modified while reading. +- * Read records until there is one with a flag different from 'c'/'+', +- * which indicates that a fragment (if it exists) is complete. +- */ ++ /* kmsg returns EPIPE if record was modified while reading */ + do { +- /* +- * If there is a fragment in progress, and we're in follow mode, +- * read with a timeout so that if no line is read in 100ms, we can +- * assume that the fragment is the last line in /dev/kmsg and it +- * is completed. +- */ +- if (ctl->follow && fragment_offset) { +- struct pollfd pfd = {.fd = ctl->kmsg, .events = POLLIN}; +- poll(&pfd, 1, 100); +- /* If 100ms has passed and kmsg has no data to read() */ +- if (!(pfd.revents & POLLIN)) { +- memcpy(ctl->kmsg_buf, fragment_buf, fragment_offset); +- return fragment_offset + 1; +- } +- } +- size = read(ctl->kmsg, ctl->kmsg_buf, sizeof(ctl->kmsg_buf) - 1); +- +- /* +- * If read() would have blocked and we have a fragment in +- * progress, assume that it's completed (ie. it was the last line +- * in the ring buffer) otherwise it won't be displayed until +- * another non-fragment message is logged. +- */ +- if (errno == EAGAIN && fragment_offset) { +- memcpy(ctl->kmsg_buf, fragment_buf, fragment_offset); +- return fragment_offset + 1; +- } +- +- if (parse_kmsg_record(ctl, &rec, ctl->kmsg_buf, +- (size_t) size) == 0) { +- /* +- * 'c' can indicate a start of a fragment or a +- * continuation, '+' is used in older kernels to +- * indicate a continuation. +- */ +- if (rec.flags == 'c' || rec.flags == '+') { +- if (!fragment_offset) { +- memcpy(fragment_buf, ctl->kmsg_buf, size); +- fragment_offset = size - 1; +- } else { +- /* +- * In case of a buffer overflow, just +- * truncate the fragment - no one should +- * be logging this much anyway +- */ +- ssize_t truncate_size = min( +- fragment_offset + rec.mesg_size, +- sizeof(fragment_buf)); +- +- memcpy(fragment_buf + fragment_offset, +- rec.mesg, truncate_size); +- fragment_offset += rec.mesg_size; +- } +- +- } else if (rec.flags == '-') { +- /* +- * If there was a fragment being built, move it +- * into kmsg_buf, but first save a copy of the +- * current message so that it doesn't get lost. +- */ +- if (fragment_offset) { +- memcpy(ctl->kmsg_saved, +- ctl->kmsg_buf, size); +- ctl->kmsg_saved_size = size; +- memcpy(ctl->kmsg_buf, +- fragment_buf, fragment_offset); +- return fragment_offset + 1; +- } +- } +- } +- } while ((size < 0 && errno == EPIPE) || +- (rec.flags == 'c' || rec.flags == '+')); ++ size = read(ctl->kmsg, ctl->kmsg_buf, ++ sizeof(ctl->kmsg_buf) - 1); ++ } while (size < 0 && errno == EPIPE); + + return size; + } +@@ -1212,17 +1115,11 @@ static int parse_kmsg_record(struct dmesg_control *ctl, + if (LAST_KMSG_FIELD(p)) + goto mesg; + +- /* D) flags */ +- rec->flags = *p; // flag is one char +- p = p + 1; +- if (LAST_KMSG_FIELD(p)) +- goto mesg; +- +- /* E) optional fields (ignore) */ ++ /* D) optional fields (ignore) */ + p = skip_item(p, end, ";"); + + mesg: +- /* F) message text */ ++ /* E) message text */ + rec->mesg = p; + p = skip_item(p, end, "\n"); + +@@ -1238,7 +1135,7 @@ mesg: + */ + unhexmangle_to_buffer(rec->mesg, (char *) rec->mesg, rec->mesg_size + 1); + +- /* G) message tags (ignore) */ ++ /* F) message tags (ignore) */ + + return 0; + } +-- +2.13.6 + diff --git a/util-linux.spec b/util-linux.spec index 6ccff93..dc01344 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -92,6 +92,9 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# upstream +Patch1: 0001-Revert-dmesg-fragment-concatenation.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -940,6 +943,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/* %changelog +* Mon Oct 30 2017 Karel Zak - 2.31-2 +- fix dmesg for multi-line records + * Mon Oct 23 2017 Karel Zak - 2.31-1 - upgrade to final v2.31 - move rfkill to sbin (for backward compatibility) From 55938ef1c2234684b829c2f6b69039f629952b45 Mon Sep 17 00:00:00 2001 From: Serhii Turivnyi Date: Fri, 15 Dec 2017 14:43:47 +0200 Subject: [PATCH 246/425] Add CI tests for Atomic Host using the standard test interface --- tests/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tests.yml b/tests/tests.yml index b6f2dd1..1cd94fc 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -3,6 +3,7 @@ tags: - classic - container + - atomic roles: - role: standard-test-beakerlib tests: From 58bac092a5897bb9ef1c2e08c2566c2dbedb7504 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 3 Jan 2018 16:24:53 +0100 Subject: [PATCH 247/425] Fix directory ownership in python subpackage --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index dc01344..00ca98e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -940,9 +940,12 @@ exit 0 %defattr(-, root, root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING -%{_libdir}/python*/site-packages/libmount/* +%{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jan 03 2018 Lumír Balhar - 2.31-3 +- Fix directory ownership in python subpackage + * Mon Oct 30 2017 Karel Zak - 2.31-2 - fix dmesg for multi-line records From 8039d29dfbb432ac97be1090201f4d49b6521707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 20 Jan 2018 23:08:40 +0100 Subject: [PATCH 248/425] Rebuilt for switch to libxcrypt --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 00ca98e..3bb6400 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -943,6 +943,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Sat Jan 20 2018 Björn Esser - 2.31-4 +- Rebuilt for switch to libxcrypt + * Wed Jan 03 2018 Lumír Balhar - 2.31-3 - Fix directory ownership in python subpackage From 3d667f8a82e3838814463a4bf1f40f7acfa499b7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:13:27 +0000 Subject: [PATCH 249/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 3bb6400..728a80b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.31 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -943,6 +943,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 2.31-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Jan 20 2018 Björn Esser - 2.31-4 - Rebuilt for switch to libxcrypt From d3224d47ec659949e47c090e75b1190773144f44 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 13 Feb 2018 13:42:48 +0100 Subject: [PATCH 250/425] 2.32-0.1: upstream upgrade --- .gitignore | 1 + ...-Revert-dmesg-fragment-concatenation.patch | 194 ------------------ sources | 2 +- util-linux.spec | 16 +- 4 files changed, 9 insertions(+), 204 deletions(-) delete mode 100644 0001-Revert-dmesg-fragment-concatenation.patch diff --git a/.gitignore b/.gitignore index cd9cdca..8ab6480 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ /util-linux-2.31-rc1.tar.xz /util-linux-2.31-rc2.tar.xz /util-linux-2.31.tar.xz +/util-linux-2.32-rc1.tar.xz diff --git a/0001-Revert-dmesg-fragment-concatenation.patch b/0001-Revert-dmesg-fragment-concatenation.patch deleted file mode 100644 index 7680766..0000000 --- a/0001-Revert-dmesg-fragment-concatenation.patch +++ /dev/null @@ -1,194 +0,0 @@ -From 8a6f0cfd96a3a7f0e72079407af4b8ed705c1ed2 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 30 Oct 2017 15:04:20 +0100 -Subject: [PATCH] Revert "dmesg: fragment concatenation" - -* introduces regressions -* stupid code; parse_kmsg_record() called more than once for each record - -This reverts commit 22eb2f0190d8a9850da750641439ccd284ac0bfe. ---- - sys-utils/dmesg.c | 117 ++++-------------------------------------------------- - 1 file changed, 7 insertions(+), 110 deletions(-) - -diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c -index b626380f7..6e5911a76 100644 ---- a/sys-utils/dmesg.c -+++ b/sys-utils/dmesg.c -@@ -20,7 +20,6 @@ - #include - #include - #include --#include - - #include "c.h" - #include "colors.h" -@@ -179,8 +178,6 @@ struct dmesg_control { - int kmsg; /* /dev/kmsg file descriptor */ - ssize_t kmsg_first_read;/* initial read() return code */ - char kmsg_buf[BUFSIZ];/* buffer to read kmsg data */ -- char kmsg_saved[BUFSIZ];/* buffer to save line after fragment */ -- ssize_t kmsg_saved_size; /* if nonzero, read from kmsg_saved */ - - /* - * For the --file option we mmap whole file. The unnecessary (already -@@ -209,7 +206,6 @@ struct dmesg_record { - int level; - int facility; - struct timeval tv; -- char flags; - - const char *next; /* buffer with next unparsed record */ - size_t next_size; /* size of the next buffer */ -@@ -226,13 +222,6 @@ struct dmesg_record { - - static int read_kmsg(struct dmesg_control *ctl); - -- --static int parse_kmsg_record(struct dmesg_control *ctl, -- struct dmesg_record *rec, -- char *buf, -- size_t sz); -- -- - static int set_level_color(int log_level, const char *mesg, size_t mesgsz) - { - int id = -1; -@@ -1024,101 +1013,15 @@ static void print_buffer(struct dmesg_control *ctl, - print_record(ctl, &rec); - } - --/* -- * Read one record from kmsg, automatically concatenating message fragments -- */ - static ssize_t read_kmsg_one(struct dmesg_control *ctl) - { - ssize_t size; -- struct dmesg_record rec = { .flags = 0 }; -- char fragment_buf[BUFSIZ] = { 0 }; -- ssize_t fragment_offset = 0; -- -- if (ctl->kmsg_saved_size != 0) { -- size = ctl->kmsg_saved_size; -- memcpy(ctl->kmsg_buf, ctl->kmsg_saved, size); -- ctl->kmsg_saved_size = 0; -- return size; -- } - -- /* -- * kmsg returns EPIPE if record was modified while reading. -- * Read records until there is one with a flag different from 'c'/'+', -- * which indicates that a fragment (if it exists) is complete. -- */ -+ /* kmsg returns EPIPE if record was modified while reading */ - do { -- /* -- * If there is a fragment in progress, and we're in follow mode, -- * read with a timeout so that if no line is read in 100ms, we can -- * assume that the fragment is the last line in /dev/kmsg and it -- * is completed. -- */ -- if (ctl->follow && fragment_offset) { -- struct pollfd pfd = {.fd = ctl->kmsg, .events = POLLIN}; -- poll(&pfd, 1, 100); -- /* If 100ms has passed and kmsg has no data to read() */ -- if (!(pfd.revents & POLLIN)) { -- memcpy(ctl->kmsg_buf, fragment_buf, fragment_offset); -- return fragment_offset + 1; -- } -- } -- size = read(ctl->kmsg, ctl->kmsg_buf, sizeof(ctl->kmsg_buf) - 1); -- -- /* -- * If read() would have blocked and we have a fragment in -- * progress, assume that it's completed (ie. it was the last line -- * in the ring buffer) otherwise it won't be displayed until -- * another non-fragment message is logged. -- */ -- if (errno == EAGAIN && fragment_offset) { -- memcpy(ctl->kmsg_buf, fragment_buf, fragment_offset); -- return fragment_offset + 1; -- } -- -- if (parse_kmsg_record(ctl, &rec, ctl->kmsg_buf, -- (size_t) size) == 0) { -- /* -- * 'c' can indicate a start of a fragment or a -- * continuation, '+' is used in older kernels to -- * indicate a continuation. -- */ -- if (rec.flags == 'c' || rec.flags == '+') { -- if (!fragment_offset) { -- memcpy(fragment_buf, ctl->kmsg_buf, size); -- fragment_offset = size - 1; -- } else { -- /* -- * In case of a buffer overflow, just -- * truncate the fragment - no one should -- * be logging this much anyway -- */ -- ssize_t truncate_size = min( -- fragment_offset + rec.mesg_size, -- sizeof(fragment_buf)); -- -- memcpy(fragment_buf + fragment_offset, -- rec.mesg, truncate_size); -- fragment_offset += rec.mesg_size; -- } -- -- } else if (rec.flags == '-') { -- /* -- * If there was a fragment being built, move it -- * into kmsg_buf, but first save a copy of the -- * current message so that it doesn't get lost. -- */ -- if (fragment_offset) { -- memcpy(ctl->kmsg_saved, -- ctl->kmsg_buf, size); -- ctl->kmsg_saved_size = size; -- memcpy(ctl->kmsg_buf, -- fragment_buf, fragment_offset); -- return fragment_offset + 1; -- } -- } -- } -- } while ((size < 0 && errno == EPIPE) || -- (rec.flags == 'c' || rec.flags == '+')); -+ size = read(ctl->kmsg, ctl->kmsg_buf, -+ sizeof(ctl->kmsg_buf) - 1); -+ } while (size < 0 && errno == EPIPE); - - return size; - } -@@ -1212,17 +1115,11 @@ static int parse_kmsg_record(struct dmesg_control *ctl, - if (LAST_KMSG_FIELD(p)) - goto mesg; - -- /* D) flags */ -- rec->flags = *p; // flag is one char -- p = p + 1; -- if (LAST_KMSG_FIELD(p)) -- goto mesg; -- -- /* E) optional fields (ignore) */ -+ /* D) optional fields (ignore) */ - p = skip_item(p, end, ";"); - - mesg: -- /* F) message text */ -+ /* E) message text */ - rec->mesg = p; - p = skip_item(p, end, "\n"); - -@@ -1238,7 +1135,7 @@ mesg: - */ - unhexmangle_to_buffer(rec->mesg, (char *) rec->mesg, rec->mesg_size + 1); - -- /* G) message tags (ignore) */ -+ /* F) message tags (ignore) */ - - return 0; - } --- -2.13.6 - diff --git a/sources b/sources index 8d319dc..d59c8b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.31.tar.xz) = 48b668526e96a132736b882090d0e33c20b4b3a0e1760502d83118ed98ccc9423d310848a2bb73f82f85e9c19f6191075ae2c5269b007e76be1fbd7b6b88fbf5 +SHA512 (util-linux-2.32-rc1.tar.xz) = 46ccffb1b10b9b386ac04d1d627ae291a2e710f723546d527c6ffdf30e276694f8c19d4cbb563a0a5f1e5a30f1b4be7a5009f7de5a26b11d761138861c711fc1 diff --git a/util-linux.spec b/util-linux.spec index 728a80b..e44bfd1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.31 -Release: 5%{?dist} +Version: 2.32 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -92,9 +92,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# upstream -Patch1: 0001-Revert-dmesg-fragment-concatenation.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -339,9 +336,6 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 # sbin -> bin mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw -# bin -> sbin (v2.31 bug, will be fixed in v2.31.1) -mv ${RPM_BUILD_ROOT}%{_bindir}/rfkill ${RPM_BUILD_ROOT}%{_sbindir}/rfkill - # And a dirs uuidd needs that the makefiles don't create install -d ${RPM_BUILD_ROOT}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid @@ -943,6 +937,10 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Feb 13 2018 Karel Zak - 2.32-0.1 +- upgrade to v2.32-rc1 + http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32-ReleaseNotes + * Fri Feb 09 2018 Fedora Release Engineering - 2.31-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 279eda57a9fa7510ae5d5fa06574c38ffc423cf3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 20 Feb 2018 12:20:35 +0100 Subject: [PATCH 251/425] 2.32-0.2: add BuildRequires gcc --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index e44bfd1..22b8b2c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -36,6 +36,7 @@ BuildRequires: systemd Buildrequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel +BuildRequires: gcc ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz @@ -937,6 +938,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Feb 20 2018 Karel Zak - 2.32-0.2 +- add BuildRequires gcc + * Tue Feb 13 2018 Karel Zak - 2.32-0.1 - upgrade to v2.32-rc1 http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32-ReleaseNotes From 4c91ee804ee7da95385cec0a738adaffb5f89802 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 21 Mar 2018 15:59:31 +0100 Subject: [PATCH 252/425] 2.32-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8ab6480..c38a79d 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ /util-linux-2.31-rc2.tar.xz /util-linux-2.31.tar.xz /util-linux-2.32-rc1.tar.xz +/util-linux-2.32.tar.xz diff --git a/sources b/sources index d59c8b7..492a6ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.32-rc1.tar.xz) = 46ccffb1b10b9b386ac04d1d627ae291a2e710f723546d527c6ffdf30e276694f8c19d4cbb563a0a5f1e5a30f1b4be7a5009f7de5a26b11d761138861c711fc1 +SHA512 (util-linux-2.32.tar.xz) = 320c8d364f014aba16483dd26564d7cb47804337567c3e9c2dc495f3865f524e7480d3fec7ef5a05b6e99763b0278da70fffe6d2b88f3f1a832ada5932556482 diff --git a/util-linux.spec b/util-linux.spec index 22b8b2c..b4e5ba0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,13 +2,13 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -938,6 +938,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Mar 21 2018 Karel Zak - 2.32-1 +- upgrade to v2.32 + * Tue Feb 20 2018 Karel Zak - 2.32-0.2 - add BuildRequires gcc From 3d6431f7c550d15b9fd518abbc14b2168bed4ee2 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Mar 2018 11:07:40 +0200 Subject: [PATCH 253/425] remove unused patches --- 2.27-blkid-zfs-raid.patch | 13 ------------- 2.28-libblkid-cdrom.patch | 34 ---------------------------------- libblkid-minix.patch | 13 ------------- 3 files changed, 60 deletions(-) delete mode 100644 2.27-blkid-zfs-raid.patch delete mode 100644 2.28-libblkid-cdrom.patch delete mode 100644 libblkid-minix.patch diff --git a/2.27-blkid-zfs-raid.patch b/2.27-blkid-zfs-raid.patch deleted file mode 100644 index 14f6926..0000000 --- a/2.27-blkid-zfs-raid.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up util-linux-2.27.1/libblkid/src/probe.c.kzak util-linux-2.27.1/libblkid/src/probe.c -diff -up util-linux-2.27.1/libblkid/src/superblocks/zfs.c.kzak util-linux-2.27.1/libblkid/src/superblocks/zfs.c ---- util-linux-2.27.1/libblkid/src/superblocks/zfs.c.kzak 2015-11-02 10:07:34.567648465 +0100 -+++ util-linux-2.27.1/libblkid/src/superblocks/zfs.c 2015-11-18 12:13:32.716188023 +0100 -@@ -258,7 +258,7 @@ static int probe_zfs(blkid_probe pr, con - const struct blkid_idinfo zfs_idinfo = - { - .name = "zfs_member", -- .usage = BLKID_USAGE_RAID, -+ .usage = BLKID_USAGE_FILESYSTEM, - .probefunc = probe_zfs, - .minsz = 64 * 1024 * 1024, - .magics = BLKID_NONE_MAGIC diff --git a/2.28-libblkid-cdrom.patch b/2.28-libblkid-cdrom.patch deleted file mode 100644 index 2dddbc2..0000000 --- a/2.28-libblkid-cdrom.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 55ad13c26fe5d0e606be5a83937f31b8cf576588 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 28 Apr 2016 13:54:01 +0200 -Subject: [PATCH] libblkid: make I/O errors on CDROMs non-fatal - -It seems too tricky to get a real size of the data track on hybrid -disks with audio+data. It seems overkill to analyze all header in -libblkid and on some disks it's probably possible to get I/O error -almost everywhere due to crazy copy protection etc. - -Signed-off-by: Karel Zak ---- - libblkid/src/probe.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 63baed3..5d9f701 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -615,7 +615,10 @@ static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint - if (ret != (ssize_t) len) { - DBG(LOWPROBE, ul_debug("\tread failed: %m")); - free(bf); -- if (ret >= 0) -+ -+ /* I/O errors on CDROMs are non-fatal to work with hybrid -+ * audio+data disks */ -+ if (ret >= 0 || blkid_probe_is_cdrom(pr)) - errno = 0; - return NULL; - } --- -2.4.11 - diff --git a/libblkid-minix.patch b/libblkid-minix.patch deleted file mode 100644 index c913938..0000000 --- a/libblkid-minix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up util-linux-2.27.1/libblkid/src/superblocks/minix.c.kzak util-linux-2.27.1/libblkid/src/superblocks/minix.c ---- util-linux-2.27.1/libblkid/src/superblocks/minix.c.kzak 2016-01-18 15:02:05.493738910 +0100 -+++ util-linux-2.27.1/libblkid/src/superblocks/minix.c 2016-01-18 15:04:20.020773281 +0100 -@@ -90,7 +90,8 @@ static int probe_minix(blkid_probe pr, c - struct minix_super_block *sb = (struct minix_super_block *) data; - int zones, ninodes, imaps, zmaps, firstz; - -- if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0) -+ if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0 || -+ sb->s_log_zone_size != 0) - return 1; - - zones = version == 2 ? minix_swab32(swabme, sb->s_zones) : From c96e764d51ae81f3a19c656bfd9c2ef3d5dcdf2c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Mar 2018 11:17:39 +0200 Subject: [PATCH 254/425] 2.32-2: fix #1560283 --- column-fix-leading-space-characters-bug.patch | 148 ++++++++++++++++++ util-linux.spec | 7 +- 2 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 column-fix-leading-space-characters-bug.patch diff --git a/column-fix-leading-space-characters-bug.patch b/column-fix-leading-space-characters-bug.patch new file mode 100644 index 0000000..e612d34 --- /dev/null +++ b/column-fix-leading-space-characters-bug.patch @@ -0,0 +1,148 @@ +From 651c5d428c2ef103ee8c5b1a310d6f29f0304744 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 27 Mar 2018 10:40:13 +0200 +Subject: [PATCH] column: fix leading space characters bug + +The bug has been introduced during column(1) rewrite. The function +read_input() need to skip leading space only temporary to detect empty +lines, but the rest of the code has to use the original buffer (line). +I've tried to fix one of the symptoms by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa +(alter), but this solution is unnecessary and too complex. + +Changes: + +* don't ignore leading space +* remove unnecessary stuff introduced by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa +* fix regression test with incorrect separator + +Addresses: https://github.com/karelzak/util-linux/issues/575 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 +Signed-off-by: Karel Zak +--- + tests/expected/column/table-input-separator-space | 2 +- + tests/ts/column/table | 2 +- + text-utils/column.c | 36 ++--------------------- + 4 files changed, 5 insertions(+), 38 deletions(-) + +diff --git a/tests/expected/column/table-input-separator-space b/tests/expected/column/table-input-separator-space +index 8a6513c11..25d9b5ab0 100644 +--- a/tests/expected/column/table-input-separator-space ++++ b/tests/expected/column/table-input-separator-space +@@ -1,5 +1,5 @@ + AAA BBBB C DDDD +-BBB CCCC DDD ++ BBB CCCC DDD + AA BB DD + AAAA B CC D + AA CC DD +diff --git a/tests/ts/column/table b/tests/ts/column/table +index 27b52e7c8..5c89d5eaf 100755 +--- a/tests/ts/column/table ++++ b/tests/ts/column/table +@@ -37,7 +37,7 @@ $TS_CMD_COLUMN --separator ',' --table $TS_SELF/files/table-sep >> $TS_OUTPUT 2> + ts_finalize_subtest + + ts_init_subtest "input-separator-space" +-$TS_CMD_COLUMN --separator ',' --table $TS_SELF/files/table-sep-space >> $TS_OUTPUT 2>&1 ++$TS_CMD_COLUMN --separator "$(echo -e '\t')" --table $TS_SELF/files/table-sep-space >> $TS_OUTPUT 2>&1 + ts_finalize_subtest + + ts_init_subtest "long" +diff --git a/text-utils/column.c b/text-utils/column.c +index 89d46d280..195814328 100644 +--- a/text-utils/column.c ++++ b/text-utils/column.c +@@ -86,7 +86,6 @@ struct column_control { + const char *tree_parent; + + wchar_t *input_separator; +- char *input_separator_raw; + const char *output_separator; + + wchar_t **ents; /* input entries */ +@@ -96,7 +95,6 @@ struct column_control { + unsigned int greedy :1, + json :1, + header_repeat :1, +- input_sep_space : 1, /* input separator contains space chars */ + tab_noheadings :1; + }; + +@@ -470,19 +468,7 @@ static int read_input(struct column_control *ctl, FILE *fp) + char *buf = NULL; + size_t bufsz = 0; + size_t maxents = 0; +- int rc = 0, is_space_sep = 0; +- +- /* Check if columns separator contains spaces chars */ +- if (ctl->mode == COLUMN_MODE_TABLE && ctl->input_separator_raw) { +- char *p; +- +- for (p = ctl->input_separator_raw; *p; p++) { +- if (isspace(*p)) { +- is_space_sep = 1; +- break; +- } +- } +- } ++ int rc = 0; + + /* Read input */ + do { +@@ -496,19 +482,6 @@ static int read_input(struct column_control *ctl, FILE *fp) + err(EXIT_FAILURE, _("read failed")); + } + str = (char *) skip_space(buf); +- +- /* The table columns separator could be a space. In this case +- * don't skip the separator if at begin of the line. For example: +- * +- * echo -e "\tcol1\tcol2\nrow\t1\t2" \ +- * | column -t -s "$(echo -e '\t')" --table-columns A,B,C +- */ +- if (is_space_sep && str > buf) { +- char *x = strpbrk(buf, ctl->input_separator_raw); +- if (x && x < str) +- str = x; +- } +- + if (str) { + p = strchr(str, '\n'); + if (p) +@@ -517,13 +490,13 @@ static int read_input(struct column_control *ctl, FILE *fp) + if (!str || !*str) + continue; + +- wcs = mbs_to_wcs(str); ++ wcs = mbs_to_wcs(buf); + if (!wcs) { + /* + * Convert broken sequences to \x and continue. + */ + size_t tmpsz = 0; +- char *tmp = mbs_invalid_encode(str, &tmpsz); ++ char *tmp = mbs_invalid_encode(buf, &tmpsz); + + if (!tmp) + err(EXIT_FAILURE, _("read failed")); +@@ -720,7 +693,6 @@ int main(int argc, char **argv) + + ctl.output_separator = " "; + ctl.input_separator = mbs_to_wcs("\t "); +- ctl.input_separator_raw = xstrdup("\t "); + + while ((c = getopt_long(argc, argv, "c:dE:eH:hi:JN:n:O:o:p:R:r:s:T:tVW:x", longopts, NULL)) != -1) { + +@@ -775,9 +747,7 @@ int main(int argc, char **argv) + break; + case 's': + free(ctl.input_separator); +- free(ctl.input_separator_raw); + ctl.input_separator = mbs_to_wcs(optarg); +- ctl.input_separator_raw = xstrdup(optarg); + ctl.greedy = 0; + break; + case 'T': +-- +2.14.3 + diff --git a/util-linux.spec b/util-linux.spec index b4e5ba0..4327696 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -92,6 +92,8 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# 1560283 - column does not properly handle spaces at beginning of tab-separated table columns +Patch1: column-fix-leading-space-characters-bug.patch %description The util-linux package contains a large variety of low-level system @@ -938,6 +940,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Mar 27 2018 Karel Zak - 2.32-2 +- fix #1560283 - column does not properly handle spaces at beginning of tab-separated table columns + * Wed Mar 21 2018 Karel Zak - 2.32-1 - upgrade to v2.32 From ba7c336b4c038f6815bf12f63dc433598709caec Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 10 Apr 2018 14:56:50 +0200 Subject: [PATCH 255/425] 2.32-3: improve ./configure --- util-linux.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 4327696..1332dfc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -290,7 +290,6 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --enable-usrdir-path \ --enable-write \ --enable-raw \ - --enable-libmount-force-mountinfo \ --with-python=%{pyver} \ --with-systemd \ --with-udev \ @@ -940,6 +939,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Apr 10 2018 Karel Zak - 2.32-3 +- remove unused build option --enable-libmount-force-mountinfo (it's default now) + * Tue Mar 27 2018 Karel Zak - 2.32-2 - fix #1560283 - column does not properly handle spaces at beginning of tab-separated table columns From c18880bcb1a8d606c702085d6e04d66f084b60bf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 11 Apr 2018 09:27:03 +0200 Subject: [PATCH 256/425] 2.32-4: fix uuidd.service --- util-linux.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 1332dfc..1214c00 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -477,9 +477,13 @@ useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ -c "UUID generator helper daemon" uuidd exit 0 -# Please, keep uuidd running after installation! +# Please, keep uuidd running after installation! Note that systemd_post is +# "systemctl preset" and it enable/disable service only. %post -n uuidd %systemd_post uuidd.service +if [ $1 -eq 1 ]; then + /bin/systemctl start uuidd.service > /dev/null 2>&1 || : +fi %preun -n uuidd %systemd_preun uuidd.service @@ -939,6 +943,9 @@ exit 0 %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Apr 11 2018 Karel Zak - 2.32-4 +- fix #1560642 - uuidd.service does not start + * Tue Apr 10 2018 Karel Zak - 2.32-3 - remove unused build option --enable-libmount-force-mountinfo (it's default now) From 437d842852f975d8c1f02ab34d745cd48d9db2ff Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 18 May 2018 10:47:36 +0200 Subject: [PATCH 257/425] 2.32-5: move /etc/adjtime from initscripts to util-linux --- util-linux.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 1214c00..9f4a38f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -50,6 +50,7 @@ Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd ### Obsoletes & Conflicts & Provides +Conflicts: initscripts < 9.79-4 Conflicts: bash-completion < 1:2.1-1 # su(1) and runuser(1) merged into util-linux v2.22 Conflicts: coreutils < 8.20 @@ -508,6 +509,8 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/runuser-l %config(noreplace) %{_prefix}/lib/udev/rules.d/60-raw.rules +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime + %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount %attr(4755,root,root) %{_bindir}/su @@ -943,6 +946,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri May 18 2018 Karel Zak - 2.32-5 +- move /etc/adjtime config from initscripts to util-linux + * Wed Apr 11 2018 Karel Zak - 2.32-4 - fix #1560642 - uuidd.service does not start From 4ada5eaed783c2bbfda5867cc551227ffeabad10 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 18 May 2018 11:08:27 +0200 Subject: [PATCH 258/425] add adjtime file --- adjtime | 2 ++ util-linux.spec | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 adjtime diff --git a/adjtime b/adjtime new file mode 100644 index 0000000..3127bd0 --- /dev/null +++ b/adjtime @@ -0,0 +1,2 @@ +0.0 0 0.0 +0 diff --git a/util-linux.spec b/util-linux.spec index 9f4a38f..9d352b0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -44,6 +44,7 @@ Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd Source4: util-linux-60-raw.rules +Source5: adjtime Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd @@ -343,6 +344,9 @@ mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw install -d ${RPM_BUILD_ROOT}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid +# /etc/adjtime +install -m 644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/adjtime + # libtool junk rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la From 5940ccada51ee0ebb95f26ff5a677bd5926db786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 19 Jun 2018 11:30:05 +0200 Subject: [PATCH 259/425] Rebuilt for Python 3.7 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 9d352b0..ecdc9ba 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -950,6 +950,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Jun 19 2018 Miro HronÄok - 2.32-6 +- Rebuilt for Python 3.7 + * Fri May 18 2018 Karel Zak - 2.32-5 - move /etc/adjtime config from initscripts to util-linux From 052fa90bc6f14ad4ef71265d03d377f87e087369 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:43:37 -0500 Subject: [PATCH 260/425] Remove needless use of %defattr --- util-linux.spec | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index ecdc9ba..4033752 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -498,7 +498,6 @@ fi %files -f %{name}.files -%defattr(-,root,root) %doc README NEWS AUTHORS %doc Documentation/deprecated.txt %{!?_licensedir:%global license %%doc} @@ -855,7 +854,6 @@ fi %files -n uuidd -%defattr(-,root,root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.GPLv2 %{_mandir}/man8/uuidd.8* @@ -867,51 +865,43 @@ fi %files -n libfdisk -%defattr(-,root,root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPLv2.1 libfdisk/COPYING %{_libdir}/libfdisk.so.* %files -n libfdisk-devel -%defattr(-,root,root) %{_libdir}/libfdisk.so %{_includedir}/libfdisk %{_libdir}/pkgconfig/fdisk.pc %files -n libsmartcols -%defattr(-,root,root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPLv2.1 libsmartcols/COPYING %{_libdir}/libsmartcols.so.* %files -n libsmartcols-devel -%defattr(-,root,root) %{_libdir}/libsmartcols.so %{_includedir}/libsmartcols %{_libdir}/pkgconfig/smartcols.pc %files -n libmount -%defattr(-,root,root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/libmount.so.* %files -n libmount-devel -%defattr(-,root,root) %{_libdir}/libmount.so %{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc %files -n libblkid -%defattr(-,root,root) %doc libblkid/COPYING %{_libdir}/libblkid.so.* %files -n libblkid-devel -%defattr(-,root,root) %doc libblkid/COPYING %{_libdir}/libblkid.so %{_includedir}/blkid @@ -920,13 +910,11 @@ fi %files -n libuuid -%defattr(-,root,root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.BSD-3 libuuid/COPYING %{_libdir}/libuuid.so.* %files -n libuuid-devel -%defattr(-,root,root) %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -944,7 +932,6 @@ fi %{_libdir}/pkgconfig/uuid.pc %files -n %{pypkg}-libmount -%defattr(-, root, root) %{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING %{_libdir}/python*/site-packages/libmount/ From bfac7fc8c6c0259f27c2f1b19707fd5f1549531a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:21:38 +0000 Subject: [PATCH 261/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 4033752..1ea6131 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -937,6 +937,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 2.32-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Tue Jun 19 2018 Miro HronÄok - 2.32-6 - Rebuilt for Python 3.7 From 59614e3019cdec5436e5380f388e2c2d59d33b06 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 Jul 2018 13:46:33 +0200 Subject: [PATCH 262/425] 2.32.1-1: upgrade Signed-off-by: Karel Zak --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c38a79d..8b3baae 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ /util-linux-2.31.tar.xz /util-linux-2.32-rc1.tar.xz /util-linux-2.32.tar.xz +/util-linux-2.32.1.tar.xz diff --git a/sources b/sources index 492a6ce..64b0161 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.32.tar.xz) = 320c8d364f014aba16483dd26564d7cb47804337567c3e9c2dc495f3865f524e7480d3fec7ef5a05b6e99763b0278da70fffe6d2b88f3f1a832ada5932556482 +SHA512 (util-linux-2.32.1.tar.xz) = 267fedae24a874ee4dc558081f6b8d07b33b955b0635f3348f021c111c17f2e95c01b2cbf909fe13c6ca448cbcf23c658c75f72f25749aa65e99f68fabb94698 diff --git a/util-linux.spec b/util-linux.spec index 1ea6131..9709bc3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.32 -Release: 7%{?dist} +Version: 2.32.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -94,8 +94,6 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# 1560283 - column does not properly handle spaces at beginning of tab-separated table columns -Patch1: column-fix-leading-space-characters-bug.patch %description The util-linux package contains a large variety of low-level system @@ -937,6 +935,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Jul 16 2018 Karel Zak - 2.32.1-1 +- upgrade to v2.32.1 + http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32.1-ReleaseNotes + * Sat Jul 14 2018 Fedora Release Engineering - 2.32-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From a3884eaf3e7582858fe0581912ee730664df2fab Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Nov 2018 10:09:29 +0100 Subject: [PATCH 263/425] 2.33-0.1: upgrade, ldconfig --- .gitignore | 1 + sources | 2 +- util-linux.spec | 40 +++++++++++++++++----------------------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 8b3baae..d4fe42f 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ /util-linux-2.32-rc1.tar.xz /util-linux-2.32.tar.xz /util-linux-2.32.1.tar.xz +/util-linux-2.33-rc2.tar.xz diff --git a/sources b/sources index 64b0161..d25ccf4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.32.1.tar.xz) = 267fedae24a874ee4dc558081f6b8d07b33b955b0635f3348f021c111c17f2e95c01b2cbf909fe13c6ca448cbcf23c658c75f72f25749aa65e99f68fabb94698 +SHA512 (util-linux-2.33-rc2.tar.xz) = 7a38a7408a42a47f4e67ead068b5418490c8871ed452613cd2459bd7af64b1a218dc4e826197730b2de60d5d757c02ef79dc7e0f8aeb3f24be9cf8934e40a5ad diff --git a/util-linux.spec b/util-linux.spec index 9709bc3..c9693c3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.32.1 -Release: 1%{?dist} +Version: 2.33 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -459,20 +459,6 @@ for I in /etc/blkid.tab /etc/blkid.tab.old \ fi done -%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 - -%post -n libsmartcols -p /sbin/ldconfig -%postun -n libsmartcols -p /sbin/ldconfig - -%post -n libfdisk -p /sbin/ldconfig -%postun -n libfdisk -p /sbin/ldconfig - %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -529,6 +515,7 @@ fi %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/choom %{_bindir}/chmem %{_bindir}/dmesg %{_bindir}/eject @@ -582,6 +569,7 @@ fi %{_bindir}/wdctl %{_bindir}/whereis %{_mandir}/man1/cal.1* +%{_mandir}/man1/choom.1* %{_mandir}/man1/chrt.1* %{_mandir}/man1/col.1* %{_mandir}/man1/colcrt.1* @@ -634,6 +622,7 @@ fi %{_mandir}/man1/wall.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* +%{_mandir}/man5/adjtime_config.5* %{_mandir}/man5/fstab.5* %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* @@ -853,7 +842,7 @@ fi %files -n uuidd %{!?_licensedir:%global license %%doc} -%license Documentation/licenses/COPYING.GPLv2 +%license Documentation/licenses/COPYING.GPL-2.0-or-later %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd %{_unitdir}/uuidd.* @@ -864,7 +853,7 @@ fi %files -n libfdisk %{!?_licensedir:%global license %%doc} -%license Documentation/licenses/COPYING.LGPLv2.1 libfdisk/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later libfdisk/COPYING %{_libdir}/libfdisk.so.* %files -n libfdisk-devel @@ -875,7 +864,7 @@ fi %files -n libsmartcols %{!?_licensedir:%global license %%doc} -%license Documentation/licenses/COPYING.LGPLv2.1 libsmartcols/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later libsmartcols/COPYING %{_libdir}/libsmartcols.so.* %files -n libsmartcols-devel @@ -886,7 +875,7 @@ fi %files -n libmount %{!?_licensedir:%global license %%doc} -%license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING %{_libdir}/libmount.so.* %files -n libmount-devel @@ -909,7 +898,7 @@ fi %files -n libuuid %{!?_licensedir:%global license %%doc} -%license Documentation/licenses/COPYING.BSD-3 libuuid/COPYING +%license Documentation/licenses/COPYING.BSD-3-Clause libuuid/COPYING %{_libdir}/libuuid.so.* %files -n libuuid-devel @@ -931,10 +920,15 @@ fi %files -n %{pypkg}-libmount %{!?_licensedir:%global license %%doc} -%license Documentation/licenses/COPYING.LGPLv2.1 libmount/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Nov 1 2018 Karel Zak - 2.33-0.1 +- Remove ldconfig scriptlet, now done via. transfiletrigger in glibc [James Antill] +- upgrade to v2.33-rc2 + http://www.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33-ReleaseNotes + * Mon Jul 16 2018 Karel Zak - 2.32.1-1 - upgrade to v2.32.1 http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32.1-ReleaseNotes From bdd2c5116bd14cba1773cd04af6b0994bf7eca7c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Nov 2018 11:24:45 +0100 Subject: [PATCH 264/425] fix build on s390 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index c9693c3..645861c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -622,7 +622,6 @@ fi %{_mandir}/man1/wall.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* -%{_mandir}/man5/adjtime_config.5* %{_mandir}/man5/fstab.5* %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* @@ -811,6 +810,7 @@ fi %{_mandir}/man8/fdformat.8* %{_mandir}/man8/hwclock.8* %{_mandir}/man8/clock.8* +%{_mandir}/man5/adjtime_config.5* %{compldir}/fdformat %{compldir}/hwclock %endif From ffe5e682638aa3549e12d159acc3f9e83cbae658 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 9 Jan 2019 11:54:05 +0100 Subject: [PATCH 265/425] 2.33.1-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d4fe42f..263a885 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ /util-linux-2.32.tar.xz /util-linux-2.32.1.tar.xz /util-linux-2.33-rc2.tar.xz +/util-linux-2.33.1.tar.xz diff --git a/sources b/sources index d25ccf4..4a5822a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.33-rc2.tar.xz) = 7a38a7408a42a47f4e67ead068b5418490c8871ed452613cd2459bd7af64b1a218dc4e826197730b2de60d5d757c02ef79dc7e0f8aeb3f24be9cf8934e40a5ad +SHA512 (util-linux-2.33.1.tar.xz) = 94ada47e472b62a612c26fd5a5b7423e09366690a8a96f777191a5d920981eb0f224474bc2f128e827299bf60062770011332757e1551a8cd3764b5c70ae4ba2 diff --git a/util-linux.spec b/util-linux.spec index 645861c..eaf19c6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,14 +1,14 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.33 -Release: 0.1%{?dist} +Version: 2.33.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -924,6 +924,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jan 9 2019 Karel Zak - 2.33.1-1 +- upgrade to v2.33.1 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.1-ReleaseNotes + * Thu Nov 1 2018 Karel Zak - 2.33-0.1 - Remove ldconfig scriptlet, now done via. transfiletrigger in glibc [James Antill] - upgrade to v2.33-rc2 From 7152f9510d5906d875849adf1b29286325d8487f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 14 Jan 2019 18:53:50 +0100 Subject: [PATCH 266/425] Rebuilt for libcrypt.so.2 (#1666033) --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index eaf19c6..a2bbaf5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.33.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -924,6 +924,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Jan 14 2019 Björn Esser - 2.33.1-2 +- Rebuilt for libcrypt.so.2 (#1666033) + * Wed Jan 9 2019 Karel Zak - 2.33.1-1 - upgrade to v2.33.1 https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.1-ReleaseNotes From 11d74871f220976cf2c399a886c5d1ca6e4ae429 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:29 +0100 Subject: [PATCH 267/425] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- util-linux.spec | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index a2bbaf5..0788e0b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -4,7 +4,6 @@ Name: util-linux Version: 2.33.1 Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain -Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux ### Macros @@ -104,7 +103,6 @@ program. %package -n libfdisk Summary: Partitioning library for fdisk-like programs. -Group: Development/Libraries License: LGPLv2+ %description -n libfdisk @@ -113,7 +111,6 @@ This is library for fdisk-like programs, part of util-linux. %package -n libfdisk-devel Summary: Partitioning library for fdisk-like programs. -Group: Development/Libraries License: LGPLv2+ Requires: libfdisk = %{version}-%{release} Requires: pkgconfig @@ -125,7 +122,6 @@ part of util-linux. %package -n libsmartcols Summary: Formatting library for ls-like programs. -Group: Development/Libraries License: LGPLv2+ %description -n libsmartcols @@ -134,7 +130,6 @@ This is library for ls-like terminal programs, part of util-linux. %package -n libsmartcols-devel Summary: Formatting library for ls-like programs. -Group: Development/Libraries License: LGPLv2+ Requires: libsmartcols = %{version}-%{release} Requires: pkgconfig @@ -146,7 +141,6 @@ part of util-linux. %package -n libmount Summary: Device mounting library -Group: Development/Libraries License: LGPLv2+ Requires: libblkid = %{version}-%{release} Requires: libuuid = %{version}-%{release} @@ -158,7 +152,6 @@ This is the device mounting library, part of util-linux. %package -n libmount-devel Summary: Device mounting library -Group: Development/Libraries License: LGPLv2+ Requires: libmount = %{version}-%{release} Requires: pkgconfig @@ -170,7 +163,6 @@ part of util-linux. %package -n libblkid Summary: Block device ID library -Group: Development/Libraries License: LGPLv2+ Requires: libuuid = %{version}-%{release} Conflicts: filesystem < 3 @@ -182,7 +174,6 @@ This is block device identification library, part of util-linux. %package -n libblkid-devel Summary: Block device ID library -Group: Development/Libraries License: LGPLv2+ Requires: libblkid = %{version}-%{release} Requires: pkgconfig @@ -194,7 +185,6 @@ part of util-linux. %package -n libuuid Summary: Universally unique ID library -Group: Development/Libraries License: BSD Conflicts: filesystem < 3 @@ -212,7 +202,6 @@ 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 @@ -233,7 +222,6 @@ 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: systemd @@ -249,7 +237,6 @@ SMP systems. %package -n %{pypkg}-libmount Summary: Python bindings for the libmount library -Group: Development/Libraries Requires: libmount = %{version}-%{release} License: LGPLv2+ @@ -262,7 +249,6 @@ mountinfo, etc) and mount filesystems. %package -n util-linux-user Summary: libuser based util-linux utilities -Group: System Environment/Base Requires: util-linux = %{version}-%{release} License: GPLv2 From 8645c3a8bdda655c1d2a8b30fbacaf883e888c2f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 10:59:49 +0000 Subject: [PATCH 268/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 0788e0b..f0dc513 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.33.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -910,6 +910,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 2.33.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jan 14 2019 Björn Esser - 2.33.1-2 - Rebuilt for libcrypt.so.2 (#1666033) From 6469bd527bcb629045957c4a4883cf1249e1fc63 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 7 Mar 2019 11:20:51 +0100 Subject: [PATCH 269/425] Remove obsolete scriptlets Signed-off-by: Igor Gnatenko --- util-linux.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index f0dc513..2f1fb51 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.33.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -433,8 +433,6 @@ if [ ! -L /etc/mtab ]; then fi %post -n libblkid -/sbin/ldconfig - ### Move blkid cache to /run [ -d /run/blkid ] || mkdir -p /run/blkid for I in /etc/blkid.tab /etc/blkid.tab.old \ @@ -910,6 +908,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Mar 07 2019 Igor Gnatenko - 2.33.1-4 +- Remove obsolete scriptlets + * Sun Feb 03 2019 Fedora Release Engineering - 2.33.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 5ecbe52e91fc554604ef1581978d0b2fec5ba908 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 9 Apr 2019 16:11:49 +0200 Subject: [PATCH 270/425] 2.33.2-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 263a885..a1ca0dd 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ /util-linux-2.32.1.tar.xz /util-linux-2.33-rc2.tar.xz /util-linux-2.33.1.tar.xz +/util-linux-2.33.2.tar.xz diff --git a/sources b/sources index 4a5822a..34116f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.33.1.tar.xz) = 94ada47e472b62a612c26fd5a5b7423e09366690a8a96f777191a5d920981eb0f224474bc2f128e827299bf60062770011332757e1551a8cd3764b5c70ae4ba2 +SHA512 (util-linux-2.33.2.tar.xz) = ac88790a0272366b384b54df19cb28318014d98819d5d96aa05528ff17ab57a8c66d012a2f1b59caca4c5d4ea669e8c041e1123517c1f1c2d9960ef701aaf749 diff --git a/util-linux.spec b/util-linux.spec index 2f1fb51..63863b3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.33.1 -Release: 4%{?dist} +Version: 2.33.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -908,6 +908,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Apr 9 2019 Karel Zak - 2.33.2-1 +- upgrade to v2.33.2 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.2-ReleaseNotes + * Thu Mar 07 2019 Igor Gnatenko - 2.33.1-4 - Remove obsolete scriptlets From 351fc04cd1b0d1e141ae91ee1cad3f13dce0b5aa Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 2 May 2019 10:03:39 +0200 Subject: [PATCH 271/425] 2.34-0.1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a1ca0dd..0bd62c5 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ /util-linux-2.33-rc2.tar.xz /util-linux-2.33.1.tar.xz /util-linux-2.33.2.tar.xz +/util-linux-2.34-rc1.tar.xz diff --git a/sources b/sources index 34116f3..67f556e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.33.2.tar.xz) = ac88790a0272366b384b54df19cb28318014d98819d5d96aa05528ff17ab57a8c66d012a2f1b59caca4c5d4ea669e8c041e1123517c1f1c2d9960ef701aaf749 +SHA512 (util-linux-2.34-rc1.tar.xz) = 4f968f04394f6beaafd60a84daf1db808ec486dbfa82d2f58b0678f93adc37477395a1b22c0c2af33f9652c5fa82f8bb3c1ce8b62146c983bce270fe45c1419b diff --git a/util-linux.spec b/util-linux.spec index 63863b3..84d45ce 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.33.2 -Release: 1%{?dist} +Version: 2.34 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -35,6 +35,7 @@ BuildRequires: systemd Buildrequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel +BuildRequires: pcre2-devel BuildRequires: gcc ### Sources @@ -60,6 +61,9 @@ Provides: eject = 2.1.6 # rfkill has been merged into util-linux v2.31 Obsoletes: rfkill <= 0.5 Provides: rfkill = 0.5 +# hardlink has been merged into util-linux v2.34 +Obsoletes: hardlink <= 1:1.3-9 +Provides: hardlink = 1:1.3-9 # sulogin, utmpdump merged into util-linux v2.22; # last, lastb merged into util-linux v2.24 Conflicts: sysvinit-tools < 2.88-14 @@ -276,6 +280,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --enable-usrdir-path \ --enable-write \ --enable-raw \ + --enable-hardlink \ --with-python=%{pyver} \ --with-systemd \ --with-udev \ @@ -508,6 +513,7 @@ fi %{_bindir}/findmnt %{_bindir}/flock %{_bindir}/getopt +%{_bindir}/hardlink %{_bindir}/hexdump %{_bindir}/ionice %{_bindir}/ipcmk @@ -565,6 +571,7 @@ fi %{_mandir}/man1/fincore.1* %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* +%{_mandir}/man1/hardlink.1* %{_mandir}/man1/hexdump.1* %{_mandir}/man1/ionice.1* %{_mandir}/man1/ipcmk.1* @@ -908,6 +915,11 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Apr 30 2019 Karel Zak - 2.34-0.1 +- add command hardlink(1) (merged into util-linux upstream) +- upgrade to v2.34-rc1 + http://www.kernel.org/pub/linux/utils/util-linux/v2.34/v2.34-ReleaseNotes + * Tue Apr 9 2019 Karel Zak - 2.33.2-1 - upgrade to v2.33.2 https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.2-ReleaseNotes From 7748eaf530fa705e9ccf8521ae499e8101487551 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 May 2019 12:44:03 +0200 Subject: [PATCH 272/425] 2.34-0.2: upgrade --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 84d45ce..2974e5a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -915,6 +915,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu May 30 2019 Karel Zak - 2.34-0.2 +- upgrade to v2.34-rc2 + * Tue Apr 30 2019 Karel Zak - 2.34-0.1 - add command hardlink(1) (merged into util-linux upstream) - upgrade to v2.34-rc1 From c0267df5f2bad9bd7dc45e3c9f7671bc62c2c902 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 May 2019 12:50:39 +0200 Subject: [PATCH 273/425] 2.34-0.2: new sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0bd62c5..b2bbd4f 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ /util-linux-2.33.1.tar.xz /util-linux-2.33.2.tar.xz /util-linux-2.34-rc1.tar.xz +/util-linux-2.34-rc2.tar.xz diff --git a/sources b/sources index 67f556e..3cfabf8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.34-rc1.tar.xz) = 4f968f04394f6beaafd60a84daf1db808ec486dbfa82d2f58b0678f93adc37477395a1b22c0c2af33f9652c5fa82f8bb3c1ce8b62146c983bce270fe45c1419b +SHA512 (util-linux-2.34-rc2.tar.xz) = 54ae5ab146a2f8185dd1e46b363d3f83fd6791eb95f83522307ea59dcf23be93a9496fd1ca10bb09788ebd429c62db8fcde8747ed793c7826340289efb4e77d0 From a495296401db9d5b759c0a55e7d1a26a766e0bcf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 14 Jun 2019 14:03:34 +0200 Subject: [PATCH 274/425] 2.34-1: upstream version upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b2bbd4f..6e5965e 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ /util-linux-2.33.2.tar.xz /util-linux-2.34-rc1.tar.xz /util-linux-2.34-rc2.tar.xz +/util-linux-2.34.tar.xz diff --git a/sources b/sources index 3cfabf8..d087cad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.34-rc2.tar.xz) = 54ae5ab146a2f8185dd1e46b363d3f83fd6791eb95f83522307ea59dcf23be93a9496fd1ca10bb09788ebd429c62db8fcde8747ed793c7826340289efb4e77d0 +SHA512 (util-linux-2.34.tar.xz) = 2d0b76f63d32e7afb7acf61a83fabbfd58baa34ab78b3a331ce87f9c676a5fd71c56a493ded95039540d2c46b6048caaa38d7fb4491eb3d52d7b09dc54655cd7 diff --git a/util-linux.spec b/util-linux.spec index 2974e5a..5f69681 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 0.2%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -915,6 +915,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Jun 14 2019 Karel Zak - 2.34-1 +- upgrade to v2.34 + * Thu May 30 2019 Karel Zak - 2.34-0.2 - upgrade to v2.34-rc2 From a1ba076eea57e74c3894b3aa76462c64e0b287fd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 24 Jul 2019 17:00:02 +0200 Subject: [PATCH 275/425] 2.34-2: add BuildRequires: librtas-devel --- util-linux.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5f69681..4ca5423 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -37,6 +37,9 @@ BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel BuildRequires: pcre2-devel BuildRequires: gcc +%ifarch ppc64le +BuildRequires: librtas-devel +%endif ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz @@ -915,6 +918,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jul 24 2019 Karel Zak - 2.34-2 +- fix lscpu compilation on ppc + * Fri Jun 14 2019 Karel Zak - 2.34-1 - upgrade to v2.34 From 4820f4132a7b7d3819524b22b7953d409b403dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 11:08:55 +0200 Subject: [PATCH 276/425] Rebuilt for Python 3.8 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 4ca5423..9e2da0b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -918,6 +918,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Aug 19 2019 Miro HronÄok - 2.34-3 +- Rebuilt for Python 3.8 + * Wed Jul 24 2019 Karel Zak - 2.34-2 - fix lscpu compilation on ppc From 4ac61ab4ac5d0847628f40030ee1ce509d168a65 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Sep 2019 13:04:30 +0200 Subject: [PATCH 277/425] 2.34-4: add BuildRequires: readline Note that the library is already in Fedora minimal base. --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 9e2da0b..29d47d3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -26,6 +26,7 @@ BuildRequires: audit-libs-devel >= 1.0.6 BuildRequires: gettext-devel BuildRequires: libselinux-devel BuildRequires: ncurses-devel +BuildRequires: readline-devel BuildRequires: pam-devel BuildRequires: zlib-devel BuildRequires: popt-devel @@ -918,6 +919,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Sep 05 2019 Karel Zak - 2.34-4 +- add BuildRequires: readline for fdisks + * Mon Aug 19 2019 Miro HronÄok - 2.34-3 - Rebuilt for Python 3.8 From 83243ee93c91083741fce8a02ad16233ec4196c4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 12 Sep 2019 11:31:43 +0200 Subject: [PATCH 278/425] 2.34-5: #1751290 (lsblk) --- ...-force-to-print-PKNAME-for-partition.patch | 33 +++++++++++++++++++ util-linux.spec | 8 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 lsblk-force-to-print-PKNAME-for-partition.patch diff --git a/lsblk-force-to-print-PKNAME-for-partition.patch b/lsblk-force-to-print-PKNAME-for-partition.patch new file mode 100644 index 0000000..9ccefea --- /dev/null +++ b/lsblk-force-to-print-PKNAME-for-partition.patch @@ -0,0 +1,33 @@ +From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Jun 2019 09:22:18 +0200 +Subject: [PATCH] lsblk: force to print PKNAME for partition + +PKNAME (parent kernel device name) is based on printed tree according +to parent -> child relationship. The tree is optional and not printed +if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old +versions print the PKNAME also in this case. + +Addresses: https://github.com/karelzak/util-linux/issues/813 +Signed-off-by: Karel Zak +--- + misc-utils/lsblk.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index e95af7af0..3ce6da730 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -1019,6 +1019,9 @@ static void device_to_scols( + DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name)); + ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name)); + ++ if (!parent && dev->wholedisk) ++ parent = dev->wholedisk; ++ + /* Do not print device more than one in --list mode */ + if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) + return; +-- +2.21.0 + diff --git a/util-linux.spec b/util-linux.spec index 29d47d3..e60744c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -102,6 +102,9 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# 1751290 - regression: lsblk not showing PKNAME in f31+ +Patch1: lsblk-force-to-print-PKNAME-for-partition.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -919,6 +922,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Sep 12 2019 Karel Zak - 2.34-5 +- fix #1751290 - regression: lsblk not showing PKNAME in f31+ + * Thu Sep 05 2019 Karel Zak - 2.34-4 - add BuildRequires: readline for fdisks From 707076abd5e6bed7ee0ab8ceca8ae0841fd82be8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 13 Sep 2019 09:53:00 +0200 Subject: [PATCH 279/425] 2.34-6: mountinfo issue --- libmount-improve-mountinfo-reliability.patch | 383 +++++++++++++++++++ util-linux.spec | 17 +- 2 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 libmount-improve-mountinfo-reliability.patch diff --git a/libmount-improve-mountinfo-reliability.patch b/libmount-improve-mountinfo-reliability.patch new file mode 100644 index 0000000..9366c94 --- /dev/null +++ b/libmount-improve-mountinfo-reliability.patch @@ -0,0 +1,383 @@ +From 32fe4f1dd8fbc104bd848e24de613122947f095a Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 28 Aug 2019 15:47:16 +0200 +Subject: [PATCH] libmount: improve mountinfo reliability +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The standard way how we read mount table is not reliable because +during the read() syscalls the table may be modified by some another +process. The changes in the table is possible to detect by poll() +event, and in this case it seems better to lseek to the begin of the file +and read it again. It's expensive, but better than races... + +This patch does not modify mountinfo parser, but it reads all file to +memory (by read()+poll()) and than it creates memory stream +from the buffer and use it rather than a regular file stream. + +It means the parser is still possible to use for normal files +(e.g. fstab) as well as for mountinfo and it's also portable to +systems where for some reason is no fmemopen(). + +Addresses: https://github.com/systemd/systemd/issues/10872 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1751447 +Upstream: http://github.com/karelzak/util-linux/commit/e4925f591c1bfb83719418b56b952830d15b77eb +Upstream: http://github.com/karelzak/util-linux/commit/ee551c909f95437fd9fcd162f398c069d0ce9720 +Reported-by: Zbigniew JÄ™drzejewski-Szmek +Signed-off-by: Karel Zak +--- +diff -up util-linux-2.34/configure.ac.kzak util-linux-2.34/configure.ac +--- util-linux-2.34/configure.ac.kzak 2019-06-14 12:34:02.892209368 +0200 ++++ util-linux-2.34/configure.ac 2019-09-13 09:19:54.155419473 +0200 +@@ -466,6 +466,7 @@ AC_CHECK_FUNCS([ \ + err \ + errx \ + explicit_bzero \ ++ fmemopen \ + fsync \ + utimensat \ + getdomainname \ +diff -up util-linux-2.34/libmount/src/mountP.h.kzak util-linux-2.34/libmount/src/mountP.h +--- util-linux-2.34/libmount/src/mountP.h.kzak 2019-05-09 14:15:40.637552762 +0200 ++++ util-linux-2.34/libmount/src/mountP.h 2019-09-13 09:19:54.155419473 +0200 +@@ -97,6 +97,7 @@ extern int mnt_valid_tagname(const char + extern int append_string(char **a, const char *b); + + extern const char *mnt_statfs_get_fstype(struct statfs *vfs); ++extern int is_procfs_fd(int fd); + extern int is_file_empty(const char *name); + + extern int mnt_is_readonly(const char *path) +@@ -121,6 +122,7 @@ extern void mnt_free_filesystems(char ** + + extern char *mnt_get_kernel_cmdline_option(const char *name); + extern int mnt_stat_mountpoint(const char *target, struct stat *st); ++extern FILE *mnt_get_procfs_memstream(int fd, char **membuf); + + /* tab.c */ + extern int is_mountinfo(struct libmnt_table *tb); +diff -up util-linux-2.34/libmount/src/tab_parse.c.kzak util-linux-2.34/libmount/src/tab_parse.c +--- util-linux-2.34/libmount/src/tab_parse.c.kzak 2019-05-09 14:15:40.638552755 +0200 ++++ util-linux-2.34/libmount/src/tab_parse.c 2019-09-13 09:19:54.156419468 +0200 +@@ -698,15 +698,7 @@ static int kernel_fs_postparse(struct li + return rc; + } + +-/** +- * mnt_table_parse_stream: +- * @tb: tab pointer +- * @f: file stream +- * @filename: filename used for debug and error messages +- * +- * Returns: 0 on success, negative number in case of error. +- */ +-int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) ++static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) + { + int rc = -1; + int flags = 0; +@@ -781,6 +773,40 @@ err: + } + + /** ++ * mnt_table_parse_stream: ++ * @tb: tab pointer ++ * @f: file stream ++ * @filename: filename used for debug and error messages ++ * ++ * Returns: 0 on success, negative number in case of error. ++ */ ++int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) ++{ ++ int fd, rc; ++ FILE *memf = NULL; ++ char *membuf = NULL; ++ ++ /* ++ * For /proc/#/{mountinfo,mount} we read all file to memory and use it ++ * as memory stream. For more details see mnt_read_procfs_file(). ++ */ ++ if ((fd = fileno(f)) >= 0 ++ && (tb->fmt == MNT_FMT_GUESS || ++ tb->fmt == MNT_FMT_MOUNTINFO || ++ tb->fmt == MNT_FMT_MTAB) ++ && is_procfs_fd(fd) ++ && (memf = mnt_get_procfs_memstream(fd, &membuf))) { ++ ++ rc = __table_parse_stream(tb, memf, filename); ++ fclose(memf); ++ free(membuf); ++ } else ++ rc = __table_parse_stream(tb, f, filename); ++ ++ return rc; ++} ++ ++/** + * mnt_table_parse_file: + * @tb: tab pointer + * @filename: file +@@ -795,18 +821,49 @@ err: + int mnt_table_parse_file(struct libmnt_table *tb, const char *filename) + { + FILE *f; +- int rc; ++ int rc, fd = -1; + + if (!filename || !tb) + return -EINVAL; + +- f = fopen(filename, "r" UL_CLOEXECSTR); ++ /* ++ * Try to use read()+poll() to realiably read all ++ * /proc/#/{mount,mountinfo} file to memory ++ */ ++ if (tb->fmt != MNT_FMT_SWAPS ++ && strncmp(filename, "/proc/", 6) == 0) { ++ ++ FILE *memf; ++ char *membuf = NULL; ++ ++ fd = open(filename, O_RDONLY|O_CLOEXEC); ++ if (fd < 0) { ++ rc = -errno; ++ goto done; ++ } ++ memf = mnt_get_procfs_memstream(fd, &membuf); ++ if (memf) { ++ rc = __table_parse_stream(tb, memf, filename); ++ ++ fclose(memf); ++ free(membuf); ++ close(fd); ++ goto done; ++ } ++ /* else fallback to fopen/fdopen() */ ++ } ++ ++ if (fd >= 0) ++ f = fdopen(fd, "r" UL_CLOEXECSTR); ++ else ++ f = fopen(filename, "r" UL_CLOEXECSTR); ++ + if (f) { +- rc = mnt_table_parse_stream(tb, f, filename); ++ rc = __table_parse_stream(tb, f, filename); + fclose(f); + } else + rc = -errno; +- ++done: + DBG(TAB, ul_debugobj(tb, "parsing done [filename=%s, rc=%d]", filename, rc)); + return rc; + } +@@ -863,7 +920,7 @@ static int __mnt_table_parse_dir(struct + + f = fopen_at(dd, d->d_name, O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); + if (f) { +- mnt_table_parse_stream(tb, f, d->d_name); ++ __table_parse_stream(tb, f, d->d_name); + fclose(f); + } + } +@@ -904,7 +961,7 @@ static int __mnt_table_parse_dir(struct + f = fopen_at(dirfd(dir), d->d_name, + O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); + if (f) { +- mnt_table_parse_stream(tb, f, d->d_name); ++ __table_parse_stream(tb, f, d->d_name); + fclose(f); + } + } +diff -up util-linux-2.34/libmount/src/utils.c.kzak util-linux-2.34/libmount/src/utils.c +--- util-linux-2.34/libmount/src/utils.c.kzak 2019-06-13 13:26:04.946525187 +0200 ++++ util-linux-2.34/libmount/src/utils.c 2019-09-13 09:19:54.157419462 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + + #include "strutils.h" +@@ -424,6 +425,12 @@ const char *mnt_statfs_get_fstype(struct + return NULL; + } + ++int is_procfs_fd(int fd) ++{ ++ struct statfs sfs; ++ ++ return fstatfs(fd, &sfs) == 0 && sfs.f_type == STATFS_PROC_MAGIC; ++} + + /** + * mnt_match_fstype: +@@ -1140,8 +1147,158 @@ done: + return 1; + } + ++#if defined(HAVE_FMEMOPEN) || defined(TEST_PROGRAM) ++ ++/* ++ * This function tries to minimize possible races when we read ++ * /proc/#/{mountinfo,mount} files. ++ * ++ * The idea is to minimize number of read()s and check by poll() that during ++ * the read the mount table has not been modified. If yes, than re-read it ++ * (with some limitations to avoid never ending loop). ++ * ++ * Returns: <0 error, 0 success, 1 too many attempts ++ */ ++static int read_procfs_file(int fd, char **buf, size_t *bufsiz) ++{ ++ size_t bufmax = 0; ++ int rc = 0, tries = 0, ninters = 0; ++ char *bufptr = NULL;; ++ ++ assert(buf); ++ assert(bufsiz); ++ ++ *bufsiz = 0; ++ *buf = NULL; ++ ++ do { ++ ssize_t ret; ++ ++ if (!bufptr || bufmax == *bufsiz) { ++ char *tmp; ++ ++ bufmax = bufmax ? bufmax * 2 : (16 * 1024); ++ tmp = realloc(*buf, bufmax); ++ if (!tmp) ++ break; ++ *buf = tmp; ++ bufptr = tmp + *bufsiz; ++ } ++ ++ errno = 0; ++ ret = read(fd, bufptr, bufmax - *bufsiz); ++ ++ if (ret < 0) { ++ /* error */ ++ if ((errno == EAGAIN || errno == EINTR) && (ninters++ < 5)) { ++ xusleep(200000); ++ continue; ++ } ++ break; ++ ++ } else if (ret > 0) { ++ /* success -- verify no event during read */ ++ struct pollfd fds[] = { ++ { .fd = fd, .events = POLLPRI } ++ }; ++ ++ rc = poll(fds, 1, 0); ++ if (rc < 0) ++ break; /* poll() error */ ++ if (rc > 0) { ++ /* event -- read all again */ ++ if (lseek(fd, 0, SEEK_SET) != 0) ++ break; ++ *bufsiz = 0; ++ bufptr = *buf; ++ tries++; ++ ++ if (tries > 10) ++ /* busy system? -- wait */ ++ xusleep(10000); ++ continue; ++ } ++ ++ /* successful read() without active poll() */ ++ (*bufsiz) += (size_t) ret; ++ bufptr += ret; ++ tries = ninters = 0; ++ } else { ++ /* end-of-file */ ++ goto success; ++ } ++ } while (tries <= 100); ++ ++ rc = errno ? -errno : 1; ++ free(*buf); ++ return rc; ++ ++success: ++ return 0; ++} ++ ++/* ++ * Create FILE stream for data from read_procfs_file() ++ */ ++FILE *mnt_get_procfs_memstream(int fd, char **membuf) ++{ ++ FILE *memf; ++ size_t sz = 0; ++ off_t cur; ++ ++ /* in case of error, rewind to the original position */ ++ cur = lseek(fd, 0, SEEK_CUR); ++ ++ if (read_procfs_file(fd, membuf, &sz) == 0 ++ && sz > 0 ++ && (memf = fmemopen(*membuf, sz, "r"))) ++ return memf; ++ ++ /* error */ ++ lseek(fd, cur, SEEK_SET); ++ return NULL; ++} ++#else ++FILE *mnt_get_procfs_memstream(int fd __attribute((__unused__)), ++ char **membuf __attribute((__unused__))) ++{ ++ return NULL; ++} ++#endif /* HAVE_FMEMOPEN */ ++ + + #ifdef TEST_PROGRAM ++static int test_proc_read(struct libmnt_test *ts, int argc, char *argv[]) ++{ ++ char *buf = NULL; ++ char *filename = argv[1]; ++ size_t bufsiz = 0; ++ int rc = 0, fd = open(filename, O_RDONLY); ++ ++ if (fd <= 0) { ++ warn("%s: cannot open", filename); ++ return -errno; ++ } ++ ++ rc = read_procfs_file(fd, &buf, &bufsiz); ++ close(fd); ++ ++ switch (rc) { ++ case 0: ++ fwrite(buf, 1, bufsiz, stdout); ++ free(buf); ++ break; ++ case 1: ++ warnx("too many attempts"); ++ break; ++ default: ++ warn("%s: cannot read", filename); ++ break; ++ } ++ ++ return rc; ++} ++ + static int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) + { + char *type = argv[1]; +@@ -1323,6 +1480,7 @@ int main(int argc, char *argv[]) + { "--guess-root", test_guess_root, "[]" }, + { "--mkdir", test_mkdir, "" }, + { "--statfs-type", test_statfs_type, "" }, ++ { "--read-procfs", test_proc_read, "" }, + + { NULL } + }; diff --git a/util-linux.spec b/util-linux.spec index e60744c..a3fdee6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.34 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -41,6 +41,10 @@ BuildRequires: gcc %ifarch ppc64le BuildRequires: librtas-devel %endif +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: bison ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz @@ -104,6 +108,8 @@ Patch0: 2.28-login-lastlog-create.patch # 1751290 - regression: lsblk not showing PKNAME in f31+ Patch1: lsblk-force-to-print-PKNAME-for-partition.patch +# https://github.com/systemd/systemd/issues/10872 +Patch2: libmount-improve-mountinfo-reliability.patch %description The util-linux package contains a large variety of low-level system @@ -273,6 +279,12 @@ chfn and chsh utilities with dependence on libuser %build unset LINGUAS || : +# unfortunately, we did changes to build-system +./autogen.sh + +# we modify .po files by RHEL patches +rm -f po/stamp* + export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -922,6 +934,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Sep 13 2019 Karel Zak - 2.34-6 +- fix https://github.com/systemd/systemd/issues/10872 + * Thu Sep 12 2019 Karel Zak - 2.34-5 - fix #1751290 - regression: lsblk not showing PKNAME in f31+ From 42ab31a080559a66ad6ec02aa10343a125cb48b3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 11 Dec 2019 12:57:10 +0100 Subject: [PATCH 280/425] 2.35-0.1: upgrade to usptream release --- .gitignore | 1 + libmount-improve-mountinfo-reliability.patch | 383 ------------------ ...-force-to-print-PKNAME-for-partition.patch | 33 -- sources | 2 +- util-linux.spec | 18 +- 5 files changed, 12 insertions(+), 425 deletions(-) delete mode 100644 libmount-improve-mountinfo-reliability.patch delete mode 100644 lsblk-force-to-print-PKNAME-for-partition.patch diff --git a/.gitignore b/.gitignore index 6e5965e..9102ba3 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,4 @@ /util-linux-2.34-rc1.tar.xz /util-linux-2.34-rc2.tar.xz /util-linux-2.34.tar.xz +/util-linux-2.35-rc1.tar.xz diff --git a/libmount-improve-mountinfo-reliability.patch b/libmount-improve-mountinfo-reliability.patch deleted file mode 100644 index 9366c94..0000000 --- a/libmount-improve-mountinfo-reliability.patch +++ /dev/null @@ -1,383 +0,0 @@ -From 32fe4f1dd8fbc104bd848e24de613122947f095a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 28 Aug 2019 15:47:16 +0200 -Subject: [PATCH] libmount: improve mountinfo reliability -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The standard way how we read mount table is not reliable because -during the read() syscalls the table may be modified by some another -process. The changes in the table is possible to detect by poll() -event, and in this case it seems better to lseek to the begin of the file -and read it again. It's expensive, but better than races... - -This patch does not modify mountinfo parser, but it reads all file to -memory (by read()+poll()) and than it creates memory stream -from the buffer and use it rather than a regular file stream. - -It means the parser is still possible to use for normal files -(e.g. fstab) as well as for mountinfo and it's also portable to -systems where for some reason is no fmemopen(). - -Addresses: https://github.com/systemd/systemd/issues/10872 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1751447 -Upstream: http://github.com/karelzak/util-linux/commit/e4925f591c1bfb83719418b56b952830d15b77eb -Upstream: http://github.com/karelzak/util-linux/commit/ee551c909f95437fd9fcd162f398c069d0ce9720 -Reported-by: Zbigniew JÄ™drzejewski-Szmek -Signed-off-by: Karel Zak ---- -diff -up util-linux-2.34/configure.ac.kzak util-linux-2.34/configure.ac ---- util-linux-2.34/configure.ac.kzak 2019-06-14 12:34:02.892209368 +0200 -+++ util-linux-2.34/configure.ac 2019-09-13 09:19:54.155419473 +0200 -@@ -466,6 +466,7 @@ AC_CHECK_FUNCS([ \ - err \ - errx \ - explicit_bzero \ -+ fmemopen \ - fsync \ - utimensat \ - getdomainname \ -diff -up util-linux-2.34/libmount/src/mountP.h.kzak util-linux-2.34/libmount/src/mountP.h ---- util-linux-2.34/libmount/src/mountP.h.kzak 2019-05-09 14:15:40.637552762 +0200 -+++ util-linux-2.34/libmount/src/mountP.h 2019-09-13 09:19:54.155419473 +0200 -@@ -97,6 +97,7 @@ extern int mnt_valid_tagname(const char - extern int append_string(char **a, const char *b); - - extern const char *mnt_statfs_get_fstype(struct statfs *vfs); -+extern int is_procfs_fd(int fd); - extern int is_file_empty(const char *name); - - extern int mnt_is_readonly(const char *path) -@@ -121,6 +122,7 @@ extern void mnt_free_filesystems(char ** - - extern char *mnt_get_kernel_cmdline_option(const char *name); - extern int mnt_stat_mountpoint(const char *target, struct stat *st); -+extern FILE *mnt_get_procfs_memstream(int fd, char **membuf); - - /* tab.c */ - extern int is_mountinfo(struct libmnt_table *tb); -diff -up util-linux-2.34/libmount/src/tab_parse.c.kzak util-linux-2.34/libmount/src/tab_parse.c ---- util-linux-2.34/libmount/src/tab_parse.c.kzak 2019-05-09 14:15:40.638552755 +0200 -+++ util-linux-2.34/libmount/src/tab_parse.c 2019-09-13 09:19:54.156419468 +0200 -@@ -698,15 +698,7 @@ static int kernel_fs_postparse(struct li - return rc; - } - --/** -- * mnt_table_parse_stream: -- * @tb: tab pointer -- * @f: file stream -- * @filename: filename used for debug and error messages -- * -- * Returns: 0 on success, negative number in case of error. -- */ --int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) -+static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) - { - int rc = -1; - int flags = 0; -@@ -781,6 +773,40 @@ err: - } - - /** -+ * mnt_table_parse_stream: -+ * @tb: tab pointer -+ * @f: file stream -+ * @filename: filename used for debug and error messages -+ * -+ * Returns: 0 on success, negative number in case of error. -+ */ -+int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) -+{ -+ int fd, rc; -+ FILE *memf = NULL; -+ char *membuf = NULL; -+ -+ /* -+ * For /proc/#/{mountinfo,mount} we read all file to memory and use it -+ * as memory stream. For more details see mnt_read_procfs_file(). -+ */ -+ if ((fd = fileno(f)) >= 0 -+ && (tb->fmt == MNT_FMT_GUESS || -+ tb->fmt == MNT_FMT_MOUNTINFO || -+ tb->fmt == MNT_FMT_MTAB) -+ && is_procfs_fd(fd) -+ && (memf = mnt_get_procfs_memstream(fd, &membuf))) { -+ -+ rc = __table_parse_stream(tb, memf, filename); -+ fclose(memf); -+ free(membuf); -+ } else -+ rc = __table_parse_stream(tb, f, filename); -+ -+ return rc; -+} -+ -+/** - * mnt_table_parse_file: - * @tb: tab pointer - * @filename: file -@@ -795,18 +821,49 @@ err: - int mnt_table_parse_file(struct libmnt_table *tb, const char *filename) - { - FILE *f; -- int rc; -+ int rc, fd = -1; - - if (!filename || !tb) - return -EINVAL; - -- f = fopen(filename, "r" UL_CLOEXECSTR); -+ /* -+ * Try to use read()+poll() to realiably read all -+ * /proc/#/{mount,mountinfo} file to memory -+ */ -+ if (tb->fmt != MNT_FMT_SWAPS -+ && strncmp(filename, "/proc/", 6) == 0) { -+ -+ FILE *memf; -+ char *membuf = NULL; -+ -+ fd = open(filename, O_RDONLY|O_CLOEXEC); -+ if (fd < 0) { -+ rc = -errno; -+ goto done; -+ } -+ memf = mnt_get_procfs_memstream(fd, &membuf); -+ if (memf) { -+ rc = __table_parse_stream(tb, memf, filename); -+ -+ fclose(memf); -+ free(membuf); -+ close(fd); -+ goto done; -+ } -+ /* else fallback to fopen/fdopen() */ -+ } -+ -+ if (fd >= 0) -+ f = fdopen(fd, "r" UL_CLOEXECSTR); -+ else -+ f = fopen(filename, "r" UL_CLOEXECSTR); -+ - if (f) { -- rc = mnt_table_parse_stream(tb, f, filename); -+ rc = __table_parse_stream(tb, f, filename); - fclose(f); - } else - rc = -errno; -- -+done: - DBG(TAB, ul_debugobj(tb, "parsing done [filename=%s, rc=%d]", filename, rc)); - return rc; - } -@@ -863,7 +920,7 @@ static int __mnt_table_parse_dir(struct - - f = fopen_at(dd, d->d_name, O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); - if (f) { -- mnt_table_parse_stream(tb, f, d->d_name); -+ __table_parse_stream(tb, f, d->d_name); - fclose(f); - } - } -@@ -904,7 +961,7 @@ static int __mnt_table_parse_dir(struct - f = fopen_at(dirfd(dir), d->d_name, - O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); - if (f) { -- mnt_table_parse_stream(tb, f, d->d_name); -+ __table_parse_stream(tb, f, d->d_name); - fclose(f); - } - } -diff -up util-linux-2.34/libmount/src/utils.c.kzak util-linux-2.34/libmount/src/utils.c ---- util-linux-2.34/libmount/src/utils.c.kzak 2019-06-13 13:26:04.946525187 +0200 -+++ util-linux-2.34/libmount/src/utils.c 2019-09-13 09:19:54.157419462 +0200 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - - #include "strutils.h" -@@ -424,6 +425,12 @@ const char *mnt_statfs_get_fstype(struct - return NULL; - } - -+int is_procfs_fd(int fd) -+{ -+ struct statfs sfs; -+ -+ return fstatfs(fd, &sfs) == 0 && sfs.f_type == STATFS_PROC_MAGIC; -+} - - /** - * mnt_match_fstype: -@@ -1140,8 +1147,158 @@ done: - return 1; - } - -+#if defined(HAVE_FMEMOPEN) || defined(TEST_PROGRAM) -+ -+/* -+ * This function tries to minimize possible races when we read -+ * /proc/#/{mountinfo,mount} files. -+ * -+ * The idea is to minimize number of read()s and check by poll() that during -+ * the read the mount table has not been modified. If yes, than re-read it -+ * (with some limitations to avoid never ending loop). -+ * -+ * Returns: <0 error, 0 success, 1 too many attempts -+ */ -+static int read_procfs_file(int fd, char **buf, size_t *bufsiz) -+{ -+ size_t bufmax = 0; -+ int rc = 0, tries = 0, ninters = 0; -+ char *bufptr = NULL;; -+ -+ assert(buf); -+ assert(bufsiz); -+ -+ *bufsiz = 0; -+ *buf = NULL; -+ -+ do { -+ ssize_t ret; -+ -+ if (!bufptr || bufmax == *bufsiz) { -+ char *tmp; -+ -+ bufmax = bufmax ? bufmax * 2 : (16 * 1024); -+ tmp = realloc(*buf, bufmax); -+ if (!tmp) -+ break; -+ *buf = tmp; -+ bufptr = tmp + *bufsiz; -+ } -+ -+ errno = 0; -+ ret = read(fd, bufptr, bufmax - *bufsiz); -+ -+ if (ret < 0) { -+ /* error */ -+ if ((errno == EAGAIN || errno == EINTR) && (ninters++ < 5)) { -+ xusleep(200000); -+ continue; -+ } -+ break; -+ -+ } else if (ret > 0) { -+ /* success -- verify no event during read */ -+ struct pollfd fds[] = { -+ { .fd = fd, .events = POLLPRI } -+ }; -+ -+ rc = poll(fds, 1, 0); -+ if (rc < 0) -+ break; /* poll() error */ -+ if (rc > 0) { -+ /* event -- read all again */ -+ if (lseek(fd, 0, SEEK_SET) != 0) -+ break; -+ *bufsiz = 0; -+ bufptr = *buf; -+ tries++; -+ -+ if (tries > 10) -+ /* busy system? -- wait */ -+ xusleep(10000); -+ continue; -+ } -+ -+ /* successful read() without active poll() */ -+ (*bufsiz) += (size_t) ret; -+ bufptr += ret; -+ tries = ninters = 0; -+ } else { -+ /* end-of-file */ -+ goto success; -+ } -+ } while (tries <= 100); -+ -+ rc = errno ? -errno : 1; -+ free(*buf); -+ return rc; -+ -+success: -+ return 0; -+} -+ -+/* -+ * Create FILE stream for data from read_procfs_file() -+ */ -+FILE *mnt_get_procfs_memstream(int fd, char **membuf) -+{ -+ FILE *memf; -+ size_t sz = 0; -+ off_t cur; -+ -+ /* in case of error, rewind to the original position */ -+ cur = lseek(fd, 0, SEEK_CUR); -+ -+ if (read_procfs_file(fd, membuf, &sz) == 0 -+ && sz > 0 -+ && (memf = fmemopen(*membuf, sz, "r"))) -+ return memf; -+ -+ /* error */ -+ lseek(fd, cur, SEEK_SET); -+ return NULL; -+} -+#else -+FILE *mnt_get_procfs_memstream(int fd __attribute((__unused__)), -+ char **membuf __attribute((__unused__))) -+{ -+ return NULL; -+} -+#endif /* HAVE_FMEMOPEN */ -+ - - #ifdef TEST_PROGRAM -+static int test_proc_read(struct libmnt_test *ts, int argc, char *argv[]) -+{ -+ char *buf = NULL; -+ char *filename = argv[1]; -+ size_t bufsiz = 0; -+ int rc = 0, fd = open(filename, O_RDONLY); -+ -+ if (fd <= 0) { -+ warn("%s: cannot open", filename); -+ return -errno; -+ } -+ -+ rc = read_procfs_file(fd, &buf, &bufsiz); -+ close(fd); -+ -+ switch (rc) { -+ case 0: -+ fwrite(buf, 1, bufsiz, stdout); -+ free(buf); -+ break; -+ case 1: -+ warnx("too many attempts"); -+ break; -+ default: -+ warn("%s: cannot read", filename); -+ break; -+ } -+ -+ return rc; -+} -+ - static int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) - { - char *type = argv[1]; -@@ -1323,6 +1480,7 @@ int main(int argc, char *argv[]) - { "--guess-root", test_guess_root, "[]" }, - { "--mkdir", test_mkdir, "" }, - { "--statfs-type", test_statfs_type, "" }, -+ { "--read-procfs", test_proc_read, "" }, - - { NULL } - }; diff --git a/lsblk-force-to-print-PKNAME-for-partition.patch b/lsblk-force-to-print-PKNAME-for-partition.patch deleted file mode 100644 index 9ccefea..0000000 --- a/lsblk-force-to-print-PKNAME-for-partition.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Jun 2019 09:22:18 +0200 -Subject: [PATCH] lsblk: force to print PKNAME for partition - -PKNAME (parent kernel device name) is based on printed tree according -to parent -> child relationship. The tree is optional and not printed -if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old -versions print the PKNAME also in this case. - -Addresses: https://github.com/karelzak/util-linux/issues/813 -Signed-off-by: Karel Zak ---- - misc-utils/lsblk.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index e95af7af0..3ce6da730 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -1019,6 +1019,9 @@ static void device_to_scols( - DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name)); - ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name)); - -+ if (!parent && dev->wholedisk) -+ parent = dev->wholedisk; -+ - /* Do not print device more than one in --list mode */ - if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) - return; --- -2.21.0 - diff --git a/sources b/sources index d087cad..b5659fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.34.tar.xz) = 2d0b76f63d32e7afb7acf61a83fabbfd58baa34ab78b3a331ce87f9c676a5fd71c56a493ded95039540d2c46b6048caaa38d7fb4491eb3d52d7b09dc54655cd7 +SHA512 (util-linux-2.35-rc1.tar.xz) = 1ecf0b6868409dad4a2cc6e7fda708b8bea939f0c2a02b97068d114dac316a3d27c27542e2b220fc4ebef307d6c78b4f318685c1b7877429689f794cb2d4dc7a diff --git a/util-linux.spec b/util-linux.spec index a3fdee6..e82cfc5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.34 -Release: 6%{?dist} +Version: 2.35 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -106,11 +106,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# 1751290 - regression: lsblk not showing PKNAME in f31+ -Patch1: lsblk-force-to-print-PKNAME-for-partition.patch -# https://github.com/systemd/systemd/issues/10872 -Patch2: libmount-improve-mountinfo-reliability.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -564,6 +559,7 @@ fi %{_bindir}/rev %{_bindir}/script %{_bindir}/scriptreplay +%{_bindir}/scriptlive %{_bindir}/setarch %{_bindir}/setpriv %{_bindir}/setsid @@ -619,6 +615,7 @@ fi %{_mandir}/man1/runuser.1* %{_mandir}/man1/script.1* %{_mandir}/man1/scriptreplay.1* +%{_mandir}/man1/scriptlive.1* %{_mandir}/man1/setpriv.1* %{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* @@ -791,6 +788,7 @@ fi %{compldir}/runuser %{compldir}/script %{compldir}/scriptreplay +%{compldir}/scriptlive %{compldir}/setarch %{compldir}/setpriv %{compldir}/setsid @@ -934,6 +932,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Dec 11 2019 Karel Zak - 2.35-0.1 +- upgrade to v2.35-rc1 + https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35-ReleaseNotes + * Fri Sep 13 2019 Karel Zak - 2.34-6 - fix https://github.com/systemd/systemd/issues/10872 From 2cde2b254661793ec8c21b75162a65446d933f1b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 12 Dec 2019 18:07:54 -0800 Subject: [PATCH 281/425] Revert upstream commit 7ef86a0 to fix RHBZ #1783066 --- ...t-tests-add-missing-ts_check_prog-xz.patch | 39 ++++ ...improve-handling-of-ISO-files-with-p.patch | 208 ++++++++++++++++++ util-linux.spec | 12 +- 3 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-tests-add-missing-ts_check_prog-xz.patch create mode 100644 0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch diff --git a/0001-Revert-tests-add-missing-ts_check_prog-xz.patch b/0001-Revert-tests-add-missing-ts_check_prog-xz.patch new file mode 100644 index 0000000..0ff1737 --- /dev/null +++ b/0001-Revert-tests-add-missing-ts_check_prog-xz.patch @@ -0,0 +1,39 @@ +From 908a490fa475c643f275ed1f4e3060ae17f51794 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 12 Dec 2019 17:19:56 -0800 +Subject: [PATCH 1/2] Revert "tests: add missing 'ts_check_prog xz'" + +This reverts commit a72a19865d72481c2dd40110919863121cc644bd. +--- + tests/ts/blkid/iso-partitions | 1 - + tests/ts/hardlink/options | 2 -- + 2 files changed, 3 deletions(-) + +diff --git a/tests/ts/blkid/iso-partitions b/tests/ts/blkid/iso-partitions +index 4aaa164f7..02fdd4e50 100755 +--- a/tests/ts/blkid/iso-partitions ++++ b/tests/ts/blkid/iso-partitions +@@ -25,7 +25,6 @@ ts_init "$*" + + ts_check_test_command "$TS_CMD_BLKID" + ts_check_test_command "$TS_CMD_PARTX" +-ts_check_prog xz + + ts_skip_nonroot + +diff --git a/tests/ts/hardlink/options b/tests/ts/hardlink/options +index bb445caf4..16d26c4ac 100755 +--- a/tests/ts/hardlink/options ++++ b/tests/ts/hardlink/options +@@ -23,8 +23,6 @@ TS_DESC="options" + ts_init "$*" + + ts_check_test_command "$TS_CMD_HARDLINK" +-ts_check_prog xz +-ts_check_prog tar + + SRCDIR="$TS_OUTDIR/testdir1" + +-- +2.24.0 + diff --git a/0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch b/0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch new file mode 100644 index 0000000..66f38a6 --- /dev/null +++ b/0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch @@ -0,0 +1,208 @@ +From f0e3bafa74b36f63e30ceb533b0f4e0844238f5b Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 12 Dec 2019 17:20:04 -0800 +Subject: [PATCH 2/2] Revert "libblkid: improve handling of ISO files with + partition tables" + +This reverts commit 7ef86a08914427d6486734614d7d3bbed1f108fe. +--- + libblkid/src/superblocks/iso9660.c | 37 --------- + .../blkid/iso-partitions-no_partitions | 9 --- + .../expected/blkid/iso-partitions-partitions | 25 ------ + tests/ts/blkid/iso-partitions | 71 ------------------ + tests/ts/blkid/iso-partitions.img.xz | Bin 1188 -> 0 bytes + 5 files changed, 142 deletions(-) + delete mode 100644 tests/expected/blkid/iso-partitions-no_partitions + delete mode 100644 tests/expected/blkid/iso-partitions-partitions + delete mode 100755 tests/ts/blkid/iso-partitions + delete mode 100644 tests/ts/blkid/iso-partitions.img.xz + +diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c +index 730939f70..8dc2e5394 100644 +--- a/libblkid/src/superblocks/iso9660.c ++++ b/libblkid/src/superblocks/iso9660.c +@@ -13,7 +13,6 @@ + */ + #include + #include +-#include + #include + #include + #include +@@ -166,37 +165,6 @@ static int is_str_empty(const unsigned char *str, size_t len) + return 1; + } + +-/* +- * The ISO format specifically avoids the first 32kb to allow for a +- * partition table to be added, if desired. +- * When an ISO contains a partition table, the usual thing to do is to +- * have a partition that points at the iso filesystem. In such case, +- * we want to only probe the iso metadata for the corresponding partition +- * device, avoiding returning the metadata for the parent block device. +- */ +-static bool isofs_belongs_to_device(blkid_probe pr) +-{ +- dev_t devno; +- blkid_partlist ls; +- +- /* Get device number, but if that fails, assume we aren't dealing +- * with partitions, and continue probing. */ +- devno = blkid_probe_get_devno(pr); +- if (!devno) +- return true; +- +- /* Get partition table, but if that fails, assume we aren't dealing +- * with partitions, and continue probing. */ +- ls = blkid_probe_get_partitions(pr); +- if (!ls) +- return true; +- +- /* Check that the device we're working with corresponds to an +- * entry in the partition table. If so, this is the correct +- * device to return the iso metadata on. */ +- return blkid_partlist_devno_to_partition(ls, devno) != NULL; +-} +- + /* iso9660 [+ Microsoft Joliet Extension] */ + static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) + { +@@ -212,11 +180,6 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) + if (!iso) + return errno ? -errno : 1; + +- /* Check if the iso metadata should be returned on a different device +- * instead of this one. */ +- if (!isofs_belongs_to_device(pr)) +- return 1; +- + memcpy(label, iso->volume_id, sizeof(label)); + + blkid_probe_set_block_size(pr, 2048); +diff --git a/tests/expected/blkid/iso-partitions-no_partitions b/tests/expected/blkid/iso-partitions-no_partitions +deleted file mode 100644 +index dbfd57a34..000000000 +--- a/tests/expected/blkid/iso-partitions-no_partitions ++++ /dev/null +@@ -1,9 +0,0 @@ +-ID_FS_BLOCK_SIZE=2048 +-ID_FS_PUBLISHER_ID=UTIL-LINUX +-ID_FS_UUID=2019-09-24-09-31-05-00 +-ID_FS_UUID_ENC=2019-09-24-09-31-05-00 +-ID_FS_VERSION=Joliet\x20Extension +-ID_FS_LABEL=ISOIMAGE +-ID_FS_LABEL_ENC=ISOIMAGE +-ID_FS_TYPE=iso9660 +-ID_FS_USAGE=filesystem +diff --git a/tests/expected/blkid/iso-partitions-partitions b/tests/expected/blkid/iso-partitions-partitions +deleted file mode 100644 +index e34ca39fc..000000000 +--- a/tests/expected/blkid/iso-partitions-partitions ++++ /dev/null +@@ -1,25 +0,0 @@ +-ID_PART_TABLE_TYPE=dos +--- +-ID_FS_BLOCK_SIZE=2048 +-ID_FS_PUBLISHER_ID=UTIL-LINUX +-ID_FS_UUID=2019-09-24-09-31-05-00 +-ID_FS_UUID_ENC=2019-09-24-09-31-05-00 +-ID_FS_VERSION=Joliet\x20Extension +-ID_FS_LABEL=ISOIMAGE +-ID_FS_LABEL_ENC=ISOIMAGE +-ID_FS_TYPE=iso9660 +-ID_FS_USAGE=filesystem +-ID_PART_TABLE_TYPE=dos +-ID_PART_ENTRY_SCHEME=dos +-ID_PART_ENTRY_TYPE=0x83 +-ID_PART_ENTRY_NUMBER=1 +-ID_PART_ENTRY_OFFSET=0 +-ID_PART_ENTRY_SIZE=136 +-ID_PART_ENTRY_DISK=__ts_majorminor__ +--- +-ID_PART_ENTRY_SCHEME=dos +-ID_PART_ENTRY_TYPE=0xef +-ID_PART_ENTRY_NUMBER=2 +-ID_PART_ENTRY_OFFSET=136 +-ID_PART_ENTRY_SIZE=4096 +-ID_PART_ENTRY_DISK=__ts_majorminor__ +diff --git a/tests/ts/blkid/iso-partitions b/tests/ts/blkid/iso-partitions +deleted file mode 100755 +index 02fdd4e50..000000000 +--- a/tests/ts/blkid/iso-partitions ++++ /dev/null +@@ -1,71 +0,0 @@ +-#!/bin/bash +- +-# +-# Copyright (C) 2019 Endless Mobile, Inc. +-# +-# This file is part of util-linux. +-# +-# This file is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This file is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +- +-TS_TOPDIR="${0%/*}/../.." +-TS_DESC="iso-partitions" +- +-. $TS_TOPDIR/functions.sh +- +-ts_init "$*" +- +-ts_check_test_command "$TS_CMD_BLKID" +-ts_check_test_command "$TS_CMD_PARTX" +- +-ts_skip_nonroot +- +-# set global variable TS_DEVICE +-ts_scsi_debug_init dev_size_mb=50 +- +-# This image (created by xorriso) has partition 1 pointing to the ISO +-# area, followed by an unformatted second partition. +-xz -dc ${TS_SELF}/iso-partitions.img.xz > ${TS_DEVICE} +-udevadm settle +- +-ts_init_subtest "partitions" +-$TS_CMD_PARTX -a ${TS_DEVICE} &>/dev/null +-udevadm settle +- +-# Check that the ISO metadata is not shown on the main disk device +-$TS_CMD_BLKID -p -o udev ${TS_DEVICE} >> $TS_OUTPUT +-echo -- >> $TS_OUTPUT +- +-# Check that the ISO metadata is shown on the "ISO partition" +-$TS_CMD_BLKID -p -o udev ${TS_DEVICE}1 >> $TS_OUTPUT +-echo -- >> $TS_OUTPUT +- +-# Check that the ISO metadata is not shown on the other partition +-$TS_CMD_BLKID -p -o udev ${TS_DEVICE}2 >> $TS_OUTPUT +- +-# substitute major/minor number before comparison +-sed -i \ +- -e 's/^\(ID_PART_ENTRY_DISK\)=.*/\1=__ts_majorminor__/' \ +- $TS_OUTPUT +- +-ts_finalize_subtest +- +-# Remove the partition table and check that the ISO metadata is shown on the +-# main disk device. +-ts_init_subtest "no_partitions" +-dd if=/dev/zero of=${TS_DEVICE} bs=512 count=1 &>/dev/null +-udevadm settle +-$TS_CMD_PARTX -d ${TS_DEVICE} &>/dev/null +-udevadm settle +-$TS_CMD_BLKID -p -o udev ${TS_DEVICE} >> $TS_OUTPUT +-ts_finalize_subtest +- +-ts_finalize + +-- +2.24.0 + diff --git a/util-linux.spec b/util-linux.spec index e82cfc5..023b9b0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -106,6 +106,13 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# Revert https://github.com/karelzak/util-linux/commit/7ef86a0 +# to fix boot of installer and live images as optical media: +# https://bugzilla.redhat.com/show_bug.cgi?id=1783066 +# Other reversion is needed for this revert to be clean +Patch1: 0001-Revert-tests-add-missing-ts_check_prog-xz.patch +Patch2: 0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -932,6 +939,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Dec 12 2019 Adam Williamson - 2.35-0.2 +- Revert upstream commit 7ef86a0 to fix RHBZ #1783066 + * Wed Dec 11 2019 Karel Zak - 2.35-0.1 - upgrade to v2.35-rc1 https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35-ReleaseNotes From a61dbe7cc64a558b02bd52c46e5fbe45bbaa3fe5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Dec 2019 13:26:39 +0100 Subject: [PATCH 282/425] 2.35-0.3: upgrade to upstream snapshot --- .gitignore | 1 + ...t-tests-add-missing-ts_check_prog-xz.patch | 39 ---- ...improve-handling-of-ISO-files-with-p.patch | 208 ------------------ sources | 2 +- util-linux.spec | 15 +- 5 files changed, 8 insertions(+), 257 deletions(-) delete mode 100644 0001-Revert-tests-add-missing-ts_check_prog-xz.patch delete mode 100644 0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch diff --git a/.gitignore b/.gitignore index 9102ba3..5cb48e9 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ /util-linux-2.34-rc2.tar.xz /util-linux-2.34.tar.xz /util-linux-2.35-rc1.tar.xz +/util-linux-2.35-rc1-20-63f8.tar.xz diff --git a/0001-Revert-tests-add-missing-ts_check_prog-xz.patch b/0001-Revert-tests-add-missing-ts_check_prog-xz.patch deleted file mode 100644 index 0ff1737..0000000 --- a/0001-Revert-tests-add-missing-ts_check_prog-xz.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 908a490fa475c643f275ed1f4e3060ae17f51794 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 12 Dec 2019 17:19:56 -0800 -Subject: [PATCH 1/2] Revert "tests: add missing 'ts_check_prog xz'" - -This reverts commit a72a19865d72481c2dd40110919863121cc644bd. ---- - tests/ts/blkid/iso-partitions | 1 - - tests/ts/hardlink/options | 2 -- - 2 files changed, 3 deletions(-) - -diff --git a/tests/ts/blkid/iso-partitions b/tests/ts/blkid/iso-partitions -index 4aaa164f7..02fdd4e50 100755 ---- a/tests/ts/blkid/iso-partitions -+++ b/tests/ts/blkid/iso-partitions -@@ -25,7 +25,6 @@ ts_init "$*" - - ts_check_test_command "$TS_CMD_BLKID" - ts_check_test_command "$TS_CMD_PARTX" --ts_check_prog xz - - ts_skip_nonroot - -diff --git a/tests/ts/hardlink/options b/tests/ts/hardlink/options -index bb445caf4..16d26c4ac 100755 ---- a/tests/ts/hardlink/options -+++ b/tests/ts/hardlink/options -@@ -23,8 +23,6 @@ TS_DESC="options" - ts_init "$*" - - ts_check_test_command "$TS_CMD_HARDLINK" --ts_check_prog xz --ts_check_prog tar - - SRCDIR="$TS_OUTDIR/testdir1" - --- -2.24.0 - diff --git a/0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch b/0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch deleted file mode 100644 index 66f38a6..0000000 --- a/0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch +++ /dev/null @@ -1,208 +0,0 @@ -From f0e3bafa74b36f63e30ceb533b0f4e0844238f5b Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 12 Dec 2019 17:20:04 -0800 -Subject: [PATCH 2/2] Revert "libblkid: improve handling of ISO files with - partition tables" - -This reverts commit 7ef86a08914427d6486734614d7d3bbed1f108fe. ---- - libblkid/src/superblocks/iso9660.c | 37 --------- - .../blkid/iso-partitions-no_partitions | 9 --- - .../expected/blkid/iso-partitions-partitions | 25 ------ - tests/ts/blkid/iso-partitions | 71 ------------------ - tests/ts/blkid/iso-partitions.img.xz | Bin 1188 -> 0 bytes - 5 files changed, 142 deletions(-) - delete mode 100644 tests/expected/blkid/iso-partitions-no_partitions - delete mode 100644 tests/expected/blkid/iso-partitions-partitions - delete mode 100755 tests/ts/blkid/iso-partitions - delete mode 100644 tests/ts/blkid/iso-partitions.img.xz - -diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c -index 730939f70..8dc2e5394 100644 ---- a/libblkid/src/superblocks/iso9660.c -+++ b/libblkid/src/superblocks/iso9660.c -@@ -13,7 +13,6 @@ - */ - #include - #include --#include - #include - #include - #include -@@ -166,37 +165,6 @@ static int is_str_empty(const unsigned char *str, size_t len) - return 1; - } - --/* -- * The ISO format specifically avoids the first 32kb to allow for a -- * partition table to be added, if desired. -- * When an ISO contains a partition table, the usual thing to do is to -- * have a partition that points at the iso filesystem. In such case, -- * we want to only probe the iso metadata for the corresponding partition -- * device, avoiding returning the metadata for the parent block device. -- */ --static bool isofs_belongs_to_device(blkid_probe pr) --{ -- dev_t devno; -- blkid_partlist ls; -- -- /* Get device number, but if that fails, assume we aren't dealing -- * with partitions, and continue probing. */ -- devno = blkid_probe_get_devno(pr); -- if (!devno) -- return true; -- -- /* Get partition table, but if that fails, assume we aren't dealing -- * with partitions, and continue probing. */ -- ls = blkid_probe_get_partitions(pr); -- if (!ls) -- return true; -- -- /* Check that the device we're working with corresponds to an -- * entry in the partition table. If so, this is the correct -- * device to return the iso metadata on. */ -- return blkid_partlist_devno_to_partition(ls, devno) != NULL; --} -- - /* iso9660 [+ Microsoft Joliet Extension] */ - static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) - { -@@ -212,11 +180,6 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) - if (!iso) - return errno ? -errno : 1; - -- /* Check if the iso metadata should be returned on a different device -- * instead of this one. */ -- if (!isofs_belongs_to_device(pr)) -- return 1; -- - memcpy(label, iso->volume_id, sizeof(label)); - - blkid_probe_set_block_size(pr, 2048); -diff --git a/tests/expected/blkid/iso-partitions-no_partitions b/tests/expected/blkid/iso-partitions-no_partitions -deleted file mode 100644 -index dbfd57a34..000000000 ---- a/tests/expected/blkid/iso-partitions-no_partitions -+++ /dev/null -@@ -1,9 +0,0 @@ --ID_FS_BLOCK_SIZE=2048 --ID_FS_PUBLISHER_ID=UTIL-LINUX --ID_FS_UUID=2019-09-24-09-31-05-00 --ID_FS_UUID_ENC=2019-09-24-09-31-05-00 --ID_FS_VERSION=Joliet\x20Extension --ID_FS_LABEL=ISOIMAGE --ID_FS_LABEL_ENC=ISOIMAGE --ID_FS_TYPE=iso9660 --ID_FS_USAGE=filesystem -diff --git a/tests/expected/blkid/iso-partitions-partitions b/tests/expected/blkid/iso-partitions-partitions -deleted file mode 100644 -index e34ca39fc..000000000 ---- a/tests/expected/blkid/iso-partitions-partitions -+++ /dev/null -@@ -1,25 +0,0 @@ --ID_PART_TABLE_TYPE=dos ---- --ID_FS_BLOCK_SIZE=2048 --ID_FS_PUBLISHER_ID=UTIL-LINUX --ID_FS_UUID=2019-09-24-09-31-05-00 --ID_FS_UUID_ENC=2019-09-24-09-31-05-00 --ID_FS_VERSION=Joliet\x20Extension --ID_FS_LABEL=ISOIMAGE --ID_FS_LABEL_ENC=ISOIMAGE --ID_FS_TYPE=iso9660 --ID_FS_USAGE=filesystem --ID_PART_TABLE_TYPE=dos --ID_PART_ENTRY_SCHEME=dos --ID_PART_ENTRY_TYPE=0x83 --ID_PART_ENTRY_NUMBER=1 --ID_PART_ENTRY_OFFSET=0 --ID_PART_ENTRY_SIZE=136 --ID_PART_ENTRY_DISK=__ts_majorminor__ ---- --ID_PART_ENTRY_SCHEME=dos --ID_PART_ENTRY_TYPE=0xef --ID_PART_ENTRY_NUMBER=2 --ID_PART_ENTRY_OFFSET=136 --ID_PART_ENTRY_SIZE=4096 --ID_PART_ENTRY_DISK=__ts_majorminor__ -diff --git a/tests/ts/blkid/iso-partitions b/tests/ts/blkid/iso-partitions -deleted file mode 100755 -index 02fdd4e50..000000000 ---- a/tests/ts/blkid/iso-partitions -+++ /dev/null -@@ -1,71 +0,0 @@ --#!/bin/bash -- --# --# Copyright (C) 2019 Endless Mobile, Inc. --# --# This file is part of util-linux. --# --# This file is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This file is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# -- --TS_TOPDIR="${0%/*}/../.." --TS_DESC="iso-partitions" -- --. $TS_TOPDIR/functions.sh -- --ts_init "$*" -- --ts_check_test_command "$TS_CMD_BLKID" --ts_check_test_command "$TS_CMD_PARTX" -- --ts_skip_nonroot -- --# set global variable TS_DEVICE --ts_scsi_debug_init dev_size_mb=50 -- --# This image (created by xorriso) has partition 1 pointing to the ISO --# area, followed by an unformatted second partition. --xz -dc ${TS_SELF}/iso-partitions.img.xz > ${TS_DEVICE} --udevadm settle -- --ts_init_subtest "partitions" --$TS_CMD_PARTX -a ${TS_DEVICE} &>/dev/null --udevadm settle -- --# Check that the ISO metadata is not shown on the main disk device --$TS_CMD_BLKID -p -o udev ${TS_DEVICE} >> $TS_OUTPUT --echo -- >> $TS_OUTPUT -- --# Check that the ISO metadata is shown on the "ISO partition" --$TS_CMD_BLKID -p -o udev ${TS_DEVICE}1 >> $TS_OUTPUT --echo -- >> $TS_OUTPUT -- --# Check that the ISO metadata is not shown on the other partition --$TS_CMD_BLKID -p -o udev ${TS_DEVICE}2 >> $TS_OUTPUT -- --# substitute major/minor number before comparison --sed -i \ -- -e 's/^\(ID_PART_ENTRY_DISK\)=.*/\1=__ts_majorminor__/' \ -- $TS_OUTPUT -- --ts_finalize_subtest -- --# Remove the partition table and check that the ISO metadata is shown on the --# main disk device. --ts_init_subtest "no_partitions" --dd if=/dev/zero of=${TS_DEVICE} bs=512 count=1 &>/dev/null --udevadm settle --$TS_CMD_PARTX -d ${TS_DEVICE} &>/dev/null --udevadm settle --$TS_CMD_BLKID -p -o udev ${TS_DEVICE} >> $TS_OUTPUT --ts_finalize_subtest -- --ts_finalize - --- -2.24.0 - diff --git a/sources b/sources index b5659fd..ff2c952 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.35-rc1.tar.xz) = 1ecf0b6868409dad4a2cc6e7fda708b8bea939f0c2a02b97068d114dac316a3d27c27542e2b220fc4ebef307d6c78b4f318685c1b7877429689f794cb2d4dc7a +SHA512 (util-linux-2.35-rc1-20-63f8.tar.xz) = 0ed274a3b9954e60376bdf7842570fb844769e938d025572b67a9330e2f538dd792463f382a59038588bf63f26ba88579035c919d4f771f1c020bf66f2cfee6a diff --git a/util-linux.spec b/util-linux.spec index 023b9b0..d1c5d18 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc1-20-63f8 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -106,13 +106,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# Revert https://github.com/karelzak/util-linux/commit/7ef86a0 -# to fix boot of installer and live images as optical media: -# https://bugzilla.redhat.com/show_bug.cgi?id=1783066 -# Other reversion is needed for this revert to be clean -Patch1: 0001-Revert-tests-add-missing-ts_check_prog-xz.patch -Patch2: 0002-Revert-libblkid-improve-handling-of-ISO-files-with-p.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -939,6 +932,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Dec 20 2019 Karel Zak - 2.35-0.3 +- upgrade to the upstream git snapshot (v2.35-rc1-20-g63f8c66af) +- fix #1783066 - Fedora-Rawhide images do not boot + * Thu Dec 12 2019 Adam Williamson - 2.35-0.2 - Revert upstream commit 7ef86a0 to fix RHBZ #1783066 From 80deb7724939e8130871e84abd0cd98a1c4d8b2f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Dec 2019 15:10:19 +0100 Subject: [PATCH 283/425] 2.35-0.4: fix agetty --- ...ep-freed-issue-file-pointer-zeroized.patch | 55 +++++++++++++++++++ util-linux.spec | 9 ++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0001-agetty-keep-freed-issue-file-pointer-zeroized.patch diff --git a/0001-agetty-keep-freed-issue-file-pointer-zeroized.patch b/0001-agetty-keep-freed-issue-file-pointer-zeroized.patch new file mode 100644 index 0000000..a5441b1 --- /dev/null +++ b/0001-agetty-keep-freed-issue-file-pointer-zeroized.patch @@ -0,0 +1,55 @@ +From 9418ba6d05feed6061f5343741b1bc56e7bde663 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Fri, 20 Dec 2019 15:05:33 +0100 +Subject: [PATCH] agetty: keep freed issue file pointer zeroized + +References: https://bugzilla.redhat.com/show_bug.cgi?id=1784536 +Signed-off-by: Karel Zak +--- + term-utils/agetty.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/term-utils/agetty.c b/term-utils/agetty.c +index 3c20acc98..dfc4921f5 100644 +--- a/term-utils/agetty.c ++++ b/term-utils/agetty.c +@@ -1820,8 +1820,12 @@ static int issuefile_read_stream( + if (fstat(fileno(f), &st) || !S_ISREG(st.st_mode)) + return 1; + +- if (!ie->output) +- ie->output = open_memstream(&ie->mem, &ie->mem_sz); ++ if (!ie->output) { ++ free(ie->mem); ++ ie->mem_sz = 0; ++ ie->mem = NULL; ++ ie->output = open_memstream(&ie->mem, &ie->mem_sz); ++ } + + while ((c = getc(f)) != EOF) { + if (c == '\\') +@@ -1965,8 +1969,10 @@ done: + if (netlink_groups != 0) + open_netlink(); + #endif +- if (ie->output) ++ if (ie->output) { + fclose(ie->output); ++ ie->output = NULL; ++ } + } + + /* This is --show-issue backend, executed by normal user on the current +@@ -1985,7 +1991,8 @@ static void show_issue(struct options *op) + + if (ie.mem_sz) + write_all(STDOUT_FILENO, ie.mem, ie.mem_sz); +- ++ if (ie.output) ++ fclose(ie.output); + free(ie.mem); + } + +-- +2.21.0 + diff --git a/util-linux.spec b/util-linux.spec index d1c5d18..88fd569 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -106,6 +106,10 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# 1784536 - Segfaults in agetty during Cloud image testing +Patch1: 0001-agetty-keep-freed-issue-file-pointer-zeroized.patch + + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -932,6 +936,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Dec 20 2019 Karel Zak - 2.35-0.4 +- fix #1784536 - Segfaults in agetty during Cloud image testing + * Fri Dec 20 2019 Karel Zak - 2.35-0.3 - upgrade to the upstream git snapshot (v2.35-rc1-20-g63f8c66af) - fix #1783066 - Fedora-Rawhide images do not boot From 7c4fd7f42a25750667b2381687db5927bcab9437 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 9 Jan 2020 10:48:10 +0100 Subject: [PATCH 284/425] 2.35-0.5: upgrade to usptream -rc2 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 11 +++++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 5cb48e9..ae470ca 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ /util-linux-2.34.tar.xz /util-linux-2.35-rc1.tar.xz /util-linux-2.35-rc1-20-63f8.tar.xz +/util-linux-2.35-rc2.tar.xz diff --git a/sources b/sources index ff2c952..0e7f23a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.35-rc1-20-63f8.tar.xz) = 0ed274a3b9954e60376bdf7842570fb844769e938d025572b67a9330e2f538dd792463f382a59038588bf63f26ba88579035c919d4f771f1c020bf66f2cfee6a +SHA512 (util-linux-2.35-rc2.tar.xz) = 7c59608ba64f9fb377d350dbed9ac332707537d862dd13da65be95b0837b2da7ca54c111dad05b08f08563ec32eeb117f27ce10c904bc7a56f7c7eca4ac1a754 diff --git a/util-linux.spec b/util-linux.spec index 88fd569..5965932 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1-20-63f8 +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -106,10 +106,6 @@ Requires: libfdisk = %{version}-%{release} # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# 1784536 - Segfaults in agetty during Cloud image testing -Patch1: 0001-agetty-keep-freed-issue-file-pointer-zeroized.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -936,6 +932,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Jan 9 2020 Karel Zak - 2.35-0.5 +- upgrade to v2.35-rc2 + * Fri Dec 20 2019 Karel Zak - 2.35-0.4 - fix #1784536 - Segfaults in agetty during Cloud image testing From b3e437baf20b8cc09f9bd2c8cf6ec05a5872d6d3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 21 Jan 2020 12:13:20 +0100 Subject: [PATCH 285/425] 2.35-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ae470ca..9733286 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,4 @@ /util-linux-2.35-rc1.tar.xz /util-linux-2.35-rc1-20-63f8.tar.xz /util-linux-2.35-rc2.tar.xz +/util-linux-2.35.tar.xz diff --git a/sources b/sources index 0e7f23a..29bcec3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.35-rc2.tar.xz) = 7c59608ba64f9fb377d350dbed9ac332707537d862dd13da65be95b0837b2da7ca54c111dad05b08f08563ec32eeb117f27ce10c904bc7a56f7c7eca4ac1a754 +SHA512 (util-linux-2.35.tar.xz) = c95d26b9037d6b877a247e6aeb58d17aa80f7e1bd6b523a4e0fde559fe07b3d924ece6d373300fefb65d1f206b3f990aeddb3a03605040e72ce6d6ee88591021 diff --git a/util-linux.spec b/util-linux.spec index 5965932..a4c57df 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35 -Release: 0.5%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -932,6 +932,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Jan 21 2020 Karel Zak - 2.35-1 +- upgrade to v2.35 + * Thu Jan 9 2020 Karel Zak - 2.35-0.5 - upgrade to v2.35-rc2 From 028de3ee58064f0ddef933bc54295af60fc424cb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 02:50:05 +0000 Subject: [PATCH 286/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index a4c57df..c950d86 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -932,6 +932,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 2.35-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Jan 21 2020 Karel Zak - 2.35-1 - upgrade to v2.35 From 086a8aa5c9b59573da9dd9a0232d679c226e33a6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 3 Feb 2020 11:08:00 +0100 Subject: [PATCH 287/425] 2.35.1-1: upstream upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 23 +++++++++++------------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 9733286..02b5d18 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ /util-linux-2.35-rc1-20-63f8.tar.xz /util-linux-2.35-rc2.tar.xz /util-linux-2.35.tar.xz +/util-linux-2.35.1.tar.xz diff --git a/sources b/sources index 29bcec3..519bfd7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.35.tar.xz) = c95d26b9037d6b877a247e6aeb58d17aa80f7e1bd6b523a4e0fde559fe07b3d924ece6d373300fefb65d1f206b3f990aeddb3a03605040e72ce6d6ee88591021 +SHA512 (util-linux-2.35.1.tar.xz) = 6e27e08bfc02378970f015decfea5a52d6c342c4c8f4ac48dd07d248485eb797e506d91d290dbbca344c3e5cfe1fc150db80a23d510367427232f5abeabe591a diff --git a/util-linux.spec b/util-linux.spec index c950d86..cfd586b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.35 -Release: 2%{?dist} +Version: 2.35.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -41,10 +41,12 @@ BuildRequires: gcc %ifarch ppc64le BuildRequires: librtas-devel %endif -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: bison + +# enable if make changes to build-system +#BuildRequires: autoconf +#BuildRequires: automake +#BuildRequires: libtool +#BuildRequires: bison ### Sources Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz @@ -274,12 +276,6 @@ chfn and chsh utilities with dependence on libuser %build unset LINGUAS || : -# unfortunately, we did changes to build-system -./autogen.sh - -# we modify .po files by RHEL patches -rm -f po/stamp* - export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -932,6 +928,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Feb 03 2020 Karel Zak - 2.35.1-1 +- upgrade to upstream bug fix release 2.35.1 + * Fri Jan 31 2020 Fedora Release Engineering - 2.35-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 523a7c4f54d89420e0b7e195b10adf0e776ab25a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Feb 2020 15:31:56 +0100 Subject: [PATCH 288/425] 2.35.1-2: sfdisk issue --- ...accept-sector-size-ignore-unknown-he.patch | 134 ++++++++++++++++++ util-linux.spec | 7 +- 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch diff --git a/0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch b/0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch new file mode 100644 index 0000000..9d624f2 --- /dev/null +++ b/0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch @@ -0,0 +1,134 @@ +From 00e53f17c8462cb34ece08cc10db60a7da29a305 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 4 Feb 2020 15:11:19 +0100 +Subject: [PATCH] libfdisk: (script) accept sector-size, ignore unknown headers + +- add sector-size between supported headers (already in --dump output) + +- report unknown headers by -ENOTSUP + +- ignore ENOTSUP in sfdisk (but print warning) and in fdisk_script_read_file() + +Addresses: https://github.com/karelzak/util-linux/issues/949 +Signed-off-by: Karel Zak +--- + disk-utils/sfdisk.c | 6 +++++- + libfdisk/src/script.c | 49 +++++++++++++++++++++++-------------------- + 2 files changed, 31 insertions(+), 24 deletions(-) + +diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c +index bb6e1c6df..c0bea7046 100644 +--- a/disk-utils/sfdisk.c ++++ b/disk-utils/sfdisk.c +@@ -1782,7 +1782,11 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv) + } + + rc = fdisk_script_read_line(dp, stdin, buf, sizeof(buf)); +- if (rc < 0) { ++ if (rc == -ENOTSUP) { ++ buf[sizeof(buf) - 1] = '\0'; ++ fdisk_warnx(sf->cxt, _("Unknown script header '%s' -- ignore."), buf); ++ continue; ++ } else if (rc < 0) { + DBG(PARSE, ul_debug("script parsing failed, trying sfdisk specific commands")); + buf[sizeof(buf) - 1] = '\0'; + rc = loop_control_commands(sf, dp, buf); +diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c +index a21771b6a..d3e67fa9c 100644 +--- a/libfdisk/src/script.c ++++ b/libfdisk/src/script.c +@@ -805,8 +805,12 @@ static inline int is_header_line(const char *s) + /* parses ": value", note modifies @s*/ + static int parse_line_header(struct fdisk_script *dp, char *s) + { +- int rc = -EINVAL; ++ size_t i; + char *name, *value; ++ static const char *supported[] = { ++ "label", "unit", "label-id", "device", "grain", ++ "first-lba", "last-lba", "table-length", "sector-size" ++ }; + + DBG(SCRIPT, ul_debugobj(dp, " parse header '%s'", s)); + +@@ -816,7 +820,7 @@ static int parse_line_header(struct fdisk_script *dp, char *s) + name = s; + value = strchr(s, ':'); + if (!value) +- goto done; ++ return -EINVAL; + *value = '\0'; + value++; + +@@ -825,32 +829,30 @@ static int parse_line_header(struct fdisk_script *dp, char *s) + ltrim_whitespace((unsigned char *) value); + rtrim_whitespace((unsigned char *) value); + ++ if (!*name || !*value) ++ return -EINVAL; ++ ++ /* check header name */ ++ for (i = 0; i < ARRAY_SIZE(supported); i++) { ++ if (strcmp(name, supported[i]) == 0) ++ break; ++ } ++ if (i == ARRAY_SIZE(supported)) ++ return -ENOTSUP; ++ ++ /* header specific actions */ + if (strcmp(name, "label") == 0) { + if (dp->cxt && !fdisk_get_label(dp->cxt, value)) +- goto done; /* unknown label name */ ++ return -EINVAL; /* unknown label name */ + dp->force_label = 1; ++ + } else if (strcmp(name, "unit") == 0) { + if (strcmp(value, "sectors") != 0) +- goto done; /* only "sectors" supported */ +- } else if (strcmp(name, "label-id") == 0 +- || strcmp(name, "device") == 0 +- || strcmp(name, "grain") == 0 +- || strcmp(name, "first-lba") == 0 +- || strcmp(name, "last-lba") == 0 +- || strcmp(name, "table-length") == 0) { +- ; /* whatever is possible */ +- } else +- goto done; /* unknown header */ ++ return -EINVAL; /* only "sectors" supported */ + +- if (*name && *value) +- rc = fdisk_script_set_header(dp, name, value); +-done: +- if (rc) +- DBG(SCRIPT, ul_debugobj(dp, "header parse error: " +- "[rc=%d, name='%s', value='%s']", +- rc, name, value)); +- return rc; ++ } + ++ return fdisk_script_set_header(dp, name, value); + } + + /* returns zero terminated string with next token and @str is updated */ +@@ -1363,7 +1365,8 @@ int fdisk_script_set_fgets(struct fdisk_script *dp, + * + * Reads next line into dump. + * +- * Returns: 0 on success, <0 on error, 1 when nothing to read. ++ * Returns: 0 on success, <0 on error, 1 when nothing to read. For unknown headers ++ * returns -ENOTSUP, it's usually safe to ignore this error. + */ + int fdisk_script_read_line(struct fdisk_script *dp, FILE *f, char *buf, size_t bufsz) + { +@@ -1428,7 +1431,7 @@ int fdisk_script_read_file(struct fdisk_script *dp, FILE *f) + + while (!feof(f)) { + rc = fdisk_script_read_line(dp, f, buf, sizeof(buf)); +- if (rc) ++ if (rc && rc != -ENOTSUP) + break; + } + +-- +2.24.1 + diff --git a/util-linux.spec b/util-linux.spec index cfd586b..0d44777 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -107,6 +107,8 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch +# https://github.com/karelzak/util-linux/issues/949 +Patch1: 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch %description The util-linux package contains a large variety of low-level system @@ -928,6 +930,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Feb 04 2020 Karel Zak - 2.35.1-2 +- fix sfdisk dump issue (util-linux github #949) + * Mon Feb 03 2020 Karel Zak - 2.35.1-1 - upgrade to upstream bug fix release 2.35.1 From 2831759869bed6e25a9a2f7dda67e9e8b844858a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Feb 2020 16:33:07 +0100 Subject: [PATCH 289/425] 2.35.1-3: fix fstrim.service --- ...e-Protect-setting-in-systemd-service.patch | 34 +++++++++++++++++++ util-linux.spec | 7 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch diff --git a/0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch b/0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch new file mode 100644 index 0000000..5ba1d2b --- /dev/null +++ b/0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch @@ -0,0 +1,34 @@ +From 61b384b36105fe682ddf16b9379f446d935603bc Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 4 Feb 2020 16:17:42 +0100 +Subject: [PATCH] fstrim: do not use Protect setting in systemd service + +The ProtectHome= and ProtectSystem= settings mounts all stuff for the service in read-only mode. + +The fstrim ioctl operates on read-only mountpoint file descriptor, but +on some read-only filesystem the operation can fail, so since +2d22ac64e4 we check for read-only volumes and skip it. + +References: Upstream: http://github.com/karelzak/util-linux/commit/2d22ac64e4d6e6732640f38b7232b5bcdc84a877 +Addresses: https://github.com/karelzak/util-linux/issues/948 +Signed-off-by: Karel Zak +--- + sys-utils/fstrim.service.in | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/sys-utils/fstrim.service.in b/sys-utils/fstrim.service.in +index a8b631730..b58728ef4 100644 +--- a/sys-utils/fstrim.service.in ++++ b/sys-utils/fstrim.service.in +@@ -6,8 +6,6 @@ ConditionVirtualization=!container + [Service] + Type=oneshot + ExecStart=@sbindir@/fstrim --fstab --verbose --quiet +-ProtectSystem=strict +-ProtectHome=read-only + PrivateDevices=no + PrivateNetwork=yes + PrivateUsers=no +-- +2.24.1 + diff --git a/util-linux.spec b/util-linux.spec index 0d44777..2e29cac 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -109,6 +109,8 @@ Requires: libfdisk = %{version}-%{release} Patch0: 2.28-login-lastlog-create.patch # https://github.com/karelzak/util-linux/issues/949 Patch1: 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch +# https://github.com/karelzak/util-linux/issues/948 +Patch2: 0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch %description The util-linux package contains a large variety of low-level system @@ -930,6 +932,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Feb 04 2020 Karel Zak - 2.35.1-3 +- fix fstrim.service (util-linux github #948) + * Tue Feb 04 2020 Karel Zak - 2.35.1-2 - fix sfdisk dump issue (util-linux github #949) From 20ae04497c34f190e461e47d01ea34c4bbac8116 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 6 Feb 2020 11:59:30 +0100 Subject: [PATCH 290/425] 2.35.1-4: enable fstrim.timer when upgrading During upgrades of Fedora 30/31 to 32/33, enable fstrim.timer per the new vendor preset so they're the same as a clean install. Addresses: https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer Addresses: https://pagure.io/fesco/issue/2309 --- util-linux.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 2e29cac..cd6f33d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -483,6 +483,8 @@ fi %postun -n uuidd %systemd_postun_with_restart uuidd.service +%triggerpostun -- fedora-release < 32 +%systemd_post fstrim.timer %files -f %{name}.files %doc README NEWS AUTHORS @@ -932,6 +934,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Feb 06 2020 Karel Zak - 2.35.1-4 +- add triggerpostun for fstrim.timer (#1785041, FESCo #2309) + * Tue Feb 04 2020 Karel Zak - 2.35.1-3 - fix fstrim.service (util-linux github #948) From f1bf9845c349d7c515ae9aed59e7e05591333f89 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 25 Feb 2020 15:57:29 +0100 Subject: [PATCH 291/425] 2.35.1-5: fix lsblk -P --- 0003-lsblk-fix-P-regression-from-v2.34.patch | 80 ++++++++++++++++++++ util-linux.spec | 7 +- 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 0003-lsblk-fix-P-regression-from-v2.34.patch diff --git a/0003-lsblk-fix-P-regression-from-v2.34.patch b/0003-lsblk-fix-P-regression-from-v2.34.patch new file mode 100644 index 0000000..6d9b6da --- /dev/null +++ b/0003-lsblk-fix-P-regression-from-v2.34.patch @@ -0,0 +1,80 @@ +From 91b636b5654576d0b808d0030ca9d773099e1db9 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 25 Feb 2020 15:31:23 +0100 +Subject: [PATCH] lsblk: fix -P regression from v2.34 + +Since v2.34 --list prints devices only once to make the output +user-readable. Unfortunately, it's regression for scripts/applications +where we need to parse lsblk output. So, let's make --pairs and --raw +backwardly compatible with versions before 2.34 and print all hierarchy. + +Addresses: https://github.com/ibm-s390-tools/s390-tools/issues/80 +Signed-off-by: Karel Zak +--- + misc-utils/lsblk.8 | 10 ++++++---- + misc-utils/lsblk.c | 9 +++++---- + 2 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/misc-utils/lsblk.8 b/misc-utils/lsblk.8 +index 373a80ee2..416b28298 100644 +--- a/misc-utils/lsblk.8 ++++ b/misc-utils/lsblk.8 +@@ -96,7 +96,8 @@ also \fB\-\-tree\fR if necessary. + .BR \-l , " \-\-list" + Produce output in the form of a list. The output does not provide information + about relationships between devices and since version 2.34 every device is +-printed only once. ++printed only once if \fB\-\-pairs\fR or \fB\-\-raw\fR not specified (the ++parsable outputs are maintained in backwardly compatible way). + .TP + .BR \-M , " \-\-merge" + Group parents of sub-trees to provide more readable output for RAIDs and +@@ -122,14 +123,15 @@ specified in the format \fI+list\fP (e.g., \fBlsblk \-o +UUID\fP). + Output all available columns. + .TP + .BR \-P , " \-\-pairs" +-Produce output in the form of key="value" pairs. +-All potentially unsafe characters are hex-escaped (\\x). ++Produce output in the form of key="value" pairs. The output lines are still ordered by ++dependencies. All potentially unsafe characters are hex-escaped (\\x). + .TP + .BR \-p , " \-\-paths" + Print full device paths. + .TP + .BR \-r , " \-\-raw" +-Produce output in raw format. All potentially unsafe characters are hex-escaped ++Produce output in raw format. The output lines are still ordered by ++dependencies. All potentially unsafe characters are hex-escaped + (\\x) in the NAME, KNAME, LABEL, PARTLABEL and MOUNTPOINT columns. + .TP + .BR \-S , " \-\-scsi" +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index 441655e24..72ac7b483 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -1058,8 +1058,8 @@ static void device_to_scols( + if (!parent && dev->wholedisk) + parent = dev->wholedisk; + +- /* Do not print device more than one in --list mode */ +- if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) ++ /* Do not print device more than once on --list if tree order is not requested */ ++ if (!(lsblk->flags & LSBLK_TREE) && !lsblk->force_tree_order && dev->is_printed) + return; + + if (lsblk->merge && list_count_entries(&dev->parents) > 1) { +@@ -2044,8 +2044,9 @@ int main(int argc, char *argv[]) + * /sys is no more sorted */ + lsblk->sort_id = COL_MAJMIN; + +- /* For --inverse --list we still follow parent->child relation */ +- if (lsblk->inverse && !(lsblk->flags & LSBLK_TREE)) ++ /* For --{inverse,raw,pairs} --list we still follow parent->child relation */ ++ if (!(lsblk->flags & LSBLK_TREE) ++ && (lsblk->inverse || lsblk->flags & LSBLK_EXPORT || lsblk->flags & LSBLK_RAW)) + lsblk->force_tree_order = 1; + + if (lsblk->sort_id >= 0 && column_id_to_number(lsblk->sort_id) < 0) { +-- +2.24.1 + diff --git a/util-linux.spec b/util-linux.spec index cd6f33d..ac93504 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -111,6 +111,8 @@ Patch0: 2.28-login-lastlog-create.patch Patch1: 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch # https://github.com/karelzak/util-linux/issues/948 Patch2: 0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch +# https://github.com/ibm-s390-tools/s390-tools/issues/80 +Patch3: 0003-lsblk-fix-P-regression-from-v2.34.patch %description The util-linux package contains a large variety of low-level system @@ -934,6 +936,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Feb 25 2020 Karel Zak - 2.35.1-5 +- fix lsblk -P output for RAIDs, etc. + * Thu Feb 06 2020 Karel Zak - 2.35.1-4 - add triggerpostun for fstrim.timer (#1785041, FESCo #2309) From 9a75633915424f681be1d7fbd570c81560804adf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 19 Mar 2020 10:22:45 +0100 Subject: [PATCH 292/425] 2.35.1-6: fix #1811506 (triggerpostun) --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index ac93504..91e90a9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -485,7 +485,7 @@ fi %postun -n uuidd %systemd_postun_with_restart uuidd.service -%triggerpostun -- fedora-release < 32 +%triggerpostun -- util-linux < 2.35 %systemd_post fstrim.timer %files -f %{name}.files @@ -936,6 +936,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Mar 19 2020 Karel Zak - 2.35.1-6 +- fix #1811506 (triggerpostun) + * Tue Feb 25 2020 Karel Zak - 2.35.1-5 - fix lsblk -P output for RAIDs, etc. From 580f0fece06126aa68c59586590a9f2531ba7cce Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 24 Mar 2020 13:50:01 +0100 Subject: [PATCH 293/425] Another attempt at enabling fstrim.timer on F32 upgrades (#1811506) Avoid using %systemd_post as it is guarding the trigger with '$1 -eq 1' which not true for %triggerpostun (it's 2 for updates in triggerpostun). Also, while at this, fine-tune the trigger condition to trigger for package updates from older F32 versions as well -- this makes it much easier to test this fix, and also fixes fstrim.timer for anyone who installed from F32 beta media. --- util-linux.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 91e90a9..a76c5a3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -485,8 +485,11 @@ fi %postun -n uuidd %systemd_postun_with_restart uuidd.service -%triggerpostun -- util-linux < 2.35 -%systemd_post fstrim.timer +%triggerpostun -- util-linux < 2.35.1-7 +if [ $1 -gt 1 ] && [ -x /usr/bin/systemctl ] ; then + # Enable fstrim.timer for upgrades to F32 + /usr/bin/systemctl --no-reload preset fstrim.timer || : +fi %files -f %{name}.files %doc README NEWS AUTHORS @@ -936,6 +939,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Mar 24 2020 Kalev Lember - 2.35.1-7 +- Another attempt at enabling fstrim.timer on F32 upgrades (#1811506) + * Thu Mar 19 2020 Karel Zak - 2.35.1-6 - fix #1811506 (triggerpostun) From 7c81cc769ffa275f94b333933d8de230c99a0e61 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 15 Apr 2020 09:57:05 +0200 Subject: [PATCH 294/425] 2.35.1-8: fix #1822226 #1823463 --- 0004-hwclock-make-glibc-2.31-compatible.patch | 165 ++++++++++++++++++ util-linux-login.pamd | 1 - util-linux.spec | 8 +- 3 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 0004-hwclock-make-glibc-2.31-compatible.patch diff --git a/0004-hwclock-make-glibc-2.31-compatible.patch b/0004-hwclock-make-glibc-2.31-compatible.patch new file mode 100644 index 0000000..2feec6a --- /dev/null +++ b/0004-hwclock-make-glibc-2.31-compatible.patch @@ -0,0 +1,165 @@ +From 0967f9a3f18e0320571db8dbc347c1e38b97f286 Mon Sep 17 00:00:00 2001 +From: J William Piggott +Date: Fri, 21 Feb 2020 20:03:47 -0500 +Subject: [PATCH] hwclock: make glibc 2.31 compatible + +______________________________________________________ +GNU C Library NEWS -- history of user-visible changes. +Version 2.31 +Deprecated and removed features, and other changes affecting compatibility: + +* The settimeofday function can still be used to set a system-wide time + zone when the operating system supports it. This is because the Linux + kernel reused the API, on some architectures, to describe a system-wide + time-zone-like offset between the software clock maintained by the kernel, + and the "RTC" clock that keeps time when the system is shut down. + + However, to reduce the odds of this offset being set by accident, + settimeofday can no longer be used to set the time and the offset + simultaneously. If both of its two arguments are non-null, the call + will fail (setting errno to EINVAL). + + Callers attempting to set this offset should also be prepared for the call + to fail and set errno to ENOSYS; this already happens on the Hurd and on + some Linux architectures. The Linux kernel maintainers are discussing a + more principled replacement for the reused API. After a replacement + becomes available, we will change settimeofday to fail with ENOSYS on all + platforms when its 'tzp' argument is not a null pointer. + + settimeofday itself is obsolescent according to POSIX. Programs that set + the system time should use clock_settime and/or the adjtime family of + functions instead. We may cease to make settimeofday available to newly + linked binaries after there is a replacement for Linux's time-zone-like + offset API. +______________________________________________________ + +hwclock(8) had one settimeofday(2) call where both args were set for +--hctosys when the RTC was ticking UTC. This allowed setting the system +time, timezone, and locking the warp_clock function with a single call. +That operation now takes 3 calls of settimeofday(2). + +Although this common operation now takes three calls, the overall logic +for the set_system_clock() function was simplified. + +Co-Author: Karel Zak +Signed-off-by: J William Piggott +--- + sys-utils/hwclock.c | 71 +++++++++++++++++++++++---------------------- + 1 file changed, 37 insertions(+), 34 deletions(-) + +diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c +index e736da717..1191a8571 100644 +--- a/sys-utils/hwclock.c ++++ b/sys-utils/hwclock.c +@@ -643,28 +643,28 @@ display_time(struct timeval hwctime) + * tz.tz_minuteswest argument and sets PCIL (see below). At boot settimeofday(2) + * has one-shot access to this function as shown in the table below. + * +- * +-------------------------------------------------------------------+ +- * | settimeofday(tv, tz) | +- * |-------------------------------------------------------------------| +- * | Arguments | System Time | PCIL | | warp_clock | +- * | tv | tz | set | warped | set | firsttime | locked | +- * |---------|---------|---------------|------|-----------|------------| +- * | pointer | NULL | yes | no | no | 1 | no | +- * | pointer | pointer | yes | no | no | 0 | yes | +- * | NULL | ptr2utc | no | no | no | 0 | yes | +- * | NULL | pointer | no | yes | yes | 0 | yes | +- * +-------------------------------------------------------------------+ ++ * +-------------------------------------------------------------------------+ ++ * | settimeofday(tv, tz) | ++ * |-------------------------------------------------------------------------| ++ * | Arguments | System Time | TZ | PCIL | | warp_clock | ++ * | tv | tz | set | warped | set | set | firsttime | locked | ++ * |---------|---------|---------------|-----|------|-----------|------------| ++ * | pointer | NULL | yes | no | no | no | 1 | no | ++ * | NULL | ptr2utc | no | no | yes | no | 0 | yes | ++ * | NULL | pointer | no | yes | yes | yes | 0 | yes | ++ * +-------------------------------------------------------------------------+ + * ptr2utc: tz.tz_minuteswest is zero (UTC). + * PCIL: persistent_clock_is_local, sets the "11 minute mode" timescale. + * firsttime: locks the warp_clock function (initialized to 1 at boot). ++ * Since glibc v2.31 settimeofday() will fail if both args are non NULL + * + * +---------------------------------------------------------------------------+ + * | op | RTC scale | settimeofday calls | + * |---------|-----------|-----------------------------------------------------| + * | systz | Local | 1) warps system time*, sets PCIL* and kernel tz | + * | systz | UTC | 1st) locks warp_clock* 2nd) sets kernel tz | +- * | hctosys | Local | 1st) sets PCIL* 2nd) sets system time and kernel tz | +- * | hctosys | UTC | 1) sets system time and kernel tz | ++ * | hctosys | Local | 1st) sets PCIL* & kernel tz 2nd) sets system time | ++ * | hctosys | UTC | 1st) locks warp* 2nd) sets tz 3rd) sets system time | + * +---------------------------------------------------------------------------+ + * * only on first call after boot + */ +@@ -675,42 +675,45 @@ set_system_clock(const struct hwclock_control *ctl, + struct tm broken; + int minuteswest; + int rc = 0; +- const struct timezone tz_utc = { 0 }; + + localtime_r(&newtime.tv_sec, &broken); + minuteswest = -get_gmtoff(&broken) / 60; + + if (ctl->verbose) { +- if (ctl->hctosys && !ctl->universal) +- printf(_("Calling settimeofday(NULL, %d) to set " +- "persistent_clock_is_local.\n"), minuteswest); +- if (ctl->systz && ctl->universal) ++ if (ctl->universal) { + puts(_("Calling settimeofday(NULL, 0) " +- "to lock the warp function.")); ++ "to lock the warp_clock function.")); ++ if (!( ctl->universal && !minuteswest )) ++ printf(_("Calling settimeofday(NULL, %d) " ++ "to set the kernel timezone.\n"), ++ minuteswest); ++ } else ++ printf(_("Calling settimeofday(NULL, %d) to warp " ++ "System time, set PCIL and the kernel tz.\n"), ++ minuteswest); ++ + if (ctl->hctosys) +- printf(_("Calling settimeofday(%ld.%06ld, %d)\n"), +- newtime.tv_sec, newtime.tv_usec, minuteswest); +- else { +- printf(_("Calling settimeofday(NULL, %d) "), minuteswest); +- if (ctl->universal) +- puts(_("to set the kernel timezone.")); +- else +- puts(_("to warp System time.")); +- } ++ printf(_("Calling settimeofday(%ld.%06ld, NULL) " ++ "to set the System time.\n"), ++ newtime.tv_sec, newtime.tv_usec); + } + + if (!ctl->testing) { ++ const struct timezone tz_utc = { 0 }; + const struct timezone tz = { minuteswest }; + +- if (ctl->hctosys && !ctl->universal) /* set PCIL */ +- rc = settimeofday(NULL, &tz); +- if (ctl->systz && ctl->universal) /* lock warp_clock */ ++ /* If UTC RTC: lock warp_clock and PCIL */ ++ if (ctl->universal) + rc = settimeofday(NULL, &tz_utc); +- if (!rc && ctl->hctosys) +- rc = settimeofday(&newtime, &tz); +- else if (!rc) ++ ++ /* Set kernel tz; if localtime RTC: warp_clock and set PCIL */ ++ if (!rc && !( ctl->universal && !minuteswest )) + rc = settimeofday(NULL, &tz); + ++ /* Set the System Clock */ ++ if ((!rc || errno == ENOSYS) && ctl->hctosys) ++ rc = settimeofday(&newtime, NULL); ++ + if (rc) { + warn(_("settimeofday() failed")); + return EXIT_FAILURE; +-- +2.25.2 + diff --git a/util-linux-login.pamd b/util-linux-login.pamd index 98e30d7..517b798 100644 --- a/util-linux-login.pamd +++ b/util-linux-login.pamd @@ -7,7 +7,6 @@ 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 diff --git a/util-linux.spec b/util-linux.spec index a76c5a3..eae7195 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -113,6 +113,8 @@ Patch1: 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch Patch2: 0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch # https://github.com/ibm-s390-tools/s390-tools/issues/80 Patch3: 0003-lsblk-fix-P-regression-from-v2.34.patch +# 1823463 - hwclock unable to set system time +Patch4: 0004-hwclock-make-glibc-2.31-compatible.patch %description The util-linux package contains a large variety of low-level system @@ -939,6 +941,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Apr 15 2020 Kalev Lember - 2.35.1-8 +- fix #1822226 - remove pam_console dependency +- fix #1823463 - hwclock unable to set system time + * Tue Mar 24 2020 Kalev Lember - 2.35.1-7 - Another attempt at enabling fstrim.timer on F32 upgrades (#1811506) From fe0e3c74370cd0ceee18fa66af86a0a197af6514 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 15 Apr 2020 10:29:57 +0200 Subject: [PATCH 295/425] 2.35.1-9: fix typo --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index eae7195..b3e9a50 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.1 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -941,7 +941,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog -* Wed Apr 15 2020 Kalev Lember - 2.35.1-8 +* Wed Apr 15 2020 Karel Zak - 2.35.1-9 +- fix copy & past bug in specfile changelog + +* Wed Apr 15 2020 Karel Zak - 2.35.1-8 - fix #1822226 - remove pam_console dependency - fix #1823463 - hwclock unable to set system time From 098671aa4dd2f67af290c1ba35f0508c701e63a1 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 13 May 2020 19:06:17 +0000 Subject: [PATCH 296/425] Minor conditional tweaks for ELN Signed-off-by: Troy Dawson tdawson@redhat.com --- util-linux.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index b3e9a50..0b40ae0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -12,14 +12,8 @@ URL: http://en.wikipedia.org/wiki/Util-linux %define compldir %{_datadir}/bash-completion/completions/ -%if 0%{?fedora} >= 23 %define pypkg python3 %define pyver 3 -%else -%define pypkg python -%define pyver 2 -%endif - ### Dependencies BuildRequires: audit-libs-devel >= 1.0.6 From e998a685f7dd16987f02b6b9b1acefb0bf9ee216 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 May 2020 16:47:06 +0200 Subject: [PATCH 297/425] 2.35.2-1: upstream stable update --- ...accept-sector-size-ignore-unknown-he.patch | 134 -------------- ...e-Protect-setting-in-systemd-service.patch | 34 ---- 0003-lsblk-fix-P-regression-from-v2.34.patch | 80 --------- 0004-hwclock-make-glibc-2.31-compatible.patch | 165 ------------------ util-linux.spec | 16 +- 5 files changed, 6 insertions(+), 423 deletions(-) delete mode 100644 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch delete mode 100644 0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch delete mode 100644 0003-lsblk-fix-P-regression-from-v2.34.patch delete mode 100644 0004-hwclock-make-glibc-2.31-compatible.patch diff --git a/0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch b/0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch deleted file mode 100644 index 9d624f2..0000000 --- a/0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 00e53f17c8462cb34ece08cc10db60a7da29a305 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 4 Feb 2020 15:11:19 +0100 -Subject: [PATCH] libfdisk: (script) accept sector-size, ignore unknown headers - -- add sector-size between supported headers (already in --dump output) - -- report unknown headers by -ENOTSUP - -- ignore ENOTSUP in sfdisk (but print warning) and in fdisk_script_read_file() - -Addresses: https://github.com/karelzak/util-linux/issues/949 -Signed-off-by: Karel Zak ---- - disk-utils/sfdisk.c | 6 +++++- - libfdisk/src/script.c | 49 +++++++++++++++++++++++-------------------- - 2 files changed, 31 insertions(+), 24 deletions(-) - -diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c -index bb6e1c6df..c0bea7046 100644 ---- a/disk-utils/sfdisk.c -+++ b/disk-utils/sfdisk.c -@@ -1782,7 +1782,11 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv) - } - - rc = fdisk_script_read_line(dp, stdin, buf, sizeof(buf)); -- if (rc < 0) { -+ if (rc == -ENOTSUP) { -+ buf[sizeof(buf) - 1] = '\0'; -+ fdisk_warnx(sf->cxt, _("Unknown script header '%s' -- ignore."), buf); -+ continue; -+ } else if (rc < 0) { - DBG(PARSE, ul_debug("script parsing failed, trying sfdisk specific commands")); - buf[sizeof(buf) - 1] = '\0'; - rc = loop_control_commands(sf, dp, buf); -diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c -index a21771b6a..d3e67fa9c 100644 ---- a/libfdisk/src/script.c -+++ b/libfdisk/src/script.c -@@ -805,8 +805,12 @@ static inline int is_header_line(const char *s) - /* parses ": value", note modifies @s*/ - static int parse_line_header(struct fdisk_script *dp, char *s) - { -- int rc = -EINVAL; -+ size_t i; - char *name, *value; -+ static const char *supported[] = { -+ "label", "unit", "label-id", "device", "grain", -+ "first-lba", "last-lba", "table-length", "sector-size" -+ }; - - DBG(SCRIPT, ul_debugobj(dp, " parse header '%s'", s)); - -@@ -816,7 +820,7 @@ static int parse_line_header(struct fdisk_script *dp, char *s) - name = s; - value = strchr(s, ':'); - if (!value) -- goto done; -+ return -EINVAL; - *value = '\0'; - value++; - -@@ -825,32 +829,30 @@ static int parse_line_header(struct fdisk_script *dp, char *s) - ltrim_whitespace((unsigned char *) value); - rtrim_whitespace((unsigned char *) value); - -+ if (!*name || !*value) -+ return -EINVAL; -+ -+ /* check header name */ -+ for (i = 0; i < ARRAY_SIZE(supported); i++) { -+ if (strcmp(name, supported[i]) == 0) -+ break; -+ } -+ if (i == ARRAY_SIZE(supported)) -+ return -ENOTSUP; -+ -+ /* header specific actions */ - if (strcmp(name, "label") == 0) { - if (dp->cxt && !fdisk_get_label(dp->cxt, value)) -- goto done; /* unknown label name */ -+ return -EINVAL; /* unknown label name */ - dp->force_label = 1; -+ - } else if (strcmp(name, "unit") == 0) { - if (strcmp(value, "sectors") != 0) -- goto done; /* only "sectors" supported */ -- } else if (strcmp(name, "label-id") == 0 -- || strcmp(name, "device") == 0 -- || strcmp(name, "grain") == 0 -- || strcmp(name, "first-lba") == 0 -- || strcmp(name, "last-lba") == 0 -- || strcmp(name, "table-length") == 0) { -- ; /* whatever is possible */ -- } else -- goto done; /* unknown header */ -+ return -EINVAL; /* only "sectors" supported */ - -- if (*name && *value) -- rc = fdisk_script_set_header(dp, name, value); --done: -- if (rc) -- DBG(SCRIPT, ul_debugobj(dp, "header parse error: " -- "[rc=%d, name='%s', value='%s']", -- rc, name, value)); -- return rc; -+ } - -+ return fdisk_script_set_header(dp, name, value); - } - - /* returns zero terminated string with next token and @str is updated */ -@@ -1363,7 +1365,8 @@ int fdisk_script_set_fgets(struct fdisk_script *dp, - * - * Reads next line into dump. - * -- * Returns: 0 on success, <0 on error, 1 when nothing to read. -+ * Returns: 0 on success, <0 on error, 1 when nothing to read. For unknown headers -+ * returns -ENOTSUP, it's usually safe to ignore this error. - */ - int fdisk_script_read_line(struct fdisk_script *dp, FILE *f, char *buf, size_t bufsz) - { -@@ -1428,7 +1431,7 @@ int fdisk_script_read_file(struct fdisk_script *dp, FILE *f) - - while (!feof(f)) { - rc = fdisk_script_read_line(dp, f, buf, sizeof(buf)); -- if (rc) -+ if (rc && rc != -ENOTSUP) - break; - } - --- -2.24.1 - diff --git a/0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch b/0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch deleted file mode 100644 index 5ba1d2b..0000000 --- a/0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 61b384b36105fe682ddf16b9379f446d935603bc Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 4 Feb 2020 16:17:42 +0100 -Subject: [PATCH] fstrim: do not use Protect setting in systemd service - -The ProtectHome= and ProtectSystem= settings mounts all stuff for the service in read-only mode. - -The fstrim ioctl operates on read-only mountpoint file descriptor, but -on some read-only filesystem the operation can fail, so since -2d22ac64e4 we check for read-only volumes and skip it. - -References: Upstream: http://github.com/karelzak/util-linux/commit/2d22ac64e4d6e6732640f38b7232b5bcdc84a877 -Addresses: https://github.com/karelzak/util-linux/issues/948 -Signed-off-by: Karel Zak ---- - sys-utils/fstrim.service.in | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/sys-utils/fstrim.service.in b/sys-utils/fstrim.service.in -index a8b631730..b58728ef4 100644 ---- a/sys-utils/fstrim.service.in -+++ b/sys-utils/fstrim.service.in -@@ -6,8 +6,6 @@ ConditionVirtualization=!container - [Service] - Type=oneshot - ExecStart=@sbindir@/fstrim --fstab --verbose --quiet --ProtectSystem=strict --ProtectHome=read-only - PrivateDevices=no - PrivateNetwork=yes - PrivateUsers=no --- -2.24.1 - diff --git a/0003-lsblk-fix-P-regression-from-v2.34.patch b/0003-lsblk-fix-P-regression-from-v2.34.patch deleted file mode 100644 index 6d9b6da..0000000 --- a/0003-lsblk-fix-P-regression-from-v2.34.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 91b636b5654576d0b808d0030ca9d773099e1db9 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 25 Feb 2020 15:31:23 +0100 -Subject: [PATCH] lsblk: fix -P regression from v2.34 - -Since v2.34 --list prints devices only once to make the output -user-readable. Unfortunately, it's regression for scripts/applications -where we need to parse lsblk output. So, let's make --pairs and --raw -backwardly compatible with versions before 2.34 and print all hierarchy. - -Addresses: https://github.com/ibm-s390-tools/s390-tools/issues/80 -Signed-off-by: Karel Zak ---- - misc-utils/lsblk.8 | 10 ++++++---- - misc-utils/lsblk.c | 9 +++++---- - 2 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/misc-utils/lsblk.8 b/misc-utils/lsblk.8 -index 373a80ee2..416b28298 100644 ---- a/misc-utils/lsblk.8 -+++ b/misc-utils/lsblk.8 -@@ -96,7 +96,8 @@ also \fB\-\-tree\fR if necessary. - .BR \-l , " \-\-list" - Produce output in the form of a list. The output does not provide information - about relationships between devices and since version 2.34 every device is --printed only once. -+printed only once if \fB\-\-pairs\fR or \fB\-\-raw\fR not specified (the -+parsable outputs are maintained in backwardly compatible way). - .TP - .BR \-M , " \-\-merge" - Group parents of sub-trees to provide more readable output for RAIDs and -@@ -122,14 +123,15 @@ specified in the format \fI+list\fP (e.g., \fBlsblk \-o +UUID\fP). - Output all available columns. - .TP - .BR \-P , " \-\-pairs" --Produce output in the form of key="value" pairs. --All potentially unsafe characters are hex-escaped (\\x). -+Produce output in the form of key="value" pairs. The output lines are still ordered by -+dependencies. All potentially unsafe characters are hex-escaped (\\x). - .TP - .BR \-p , " \-\-paths" - Print full device paths. - .TP - .BR \-r , " \-\-raw" --Produce output in raw format. All potentially unsafe characters are hex-escaped -+Produce output in raw format. The output lines are still ordered by -+dependencies. All potentially unsafe characters are hex-escaped - (\\x) in the NAME, KNAME, LABEL, PARTLABEL and MOUNTPOINT columns. - .TP - .BR \-S , " \-\-scsi" -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index 441655e24..72ac7b483 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -1058,8 +1058,8 @@ static void device_to_scols( - if (!parent && dev->wholedisk) - parent = dev->wholedisk; - -- /* Do not print device more than one in --list mode */ -- if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) -+ /* Do not print device more than once on --list if tree order is not requested */ -+ if (!(lsblk->flags & LSBLK_TREE) && !lsblk->force_tree_order && dev->is_printed) - return; - - if (lsblk->merge && list_count_entries(&dev->parents) > 1) { -@@ -2044,8 +2044,9 @@ int main(int argc, char *argv[]) - * /sys is no more sorted */ - lsblk->sort_id = COL_MAJMIN; - -- /* For --inverse --list we still follow parent->child relation */ -- if (lsblk->inverse && !(lsblk->flags & LSBLK_TREE)) -+ /* For --{inverse,raw,pairs} --list we still follow parent->child relation */ -+ if (!(lsblk->flags & LSBLK_TREE) -+ && (lsblk->inverse || lsblk->flags & LSBLK_EXPORT || lsblk->flags & LSBLK_RAW)) - lsblk->force_tree_order = 1; - - if (lsblk->sort_id >= 0 && column_id_to_number(lsblk->sort_id) < 0) { --- -2.24.1 - diff --git a/0004-hwclock-make-glibc-2.31-compatible.patch b/0004-hwclock-make-glibc-2.31-compatible.patch deleted file mode 100644 index 2feec6a..0000000 --- a/0004-hwclock-make-glibc-2.31-compatible.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 0967f9a3f18e0320571db8dbc347c1e38b97f286 Mon Sep 17 00:00:00 2001 -From: J William Piggott -Date: Fri, 21 Feb 2020 20:03:47 -0500 -Subject: [PATCH] hwclock: make glibc 2.31 compatible - -______________________________________________________ -GNU C Library NEWS -- history of user-visible changes. -Version 2.31 -Deprecated and removed features, and other changes affecting compatibility: - -* The settimeofday function can still be used to set a system-wide time - zone when the operating system supports it. This is because the Linux - kernel reused the API, on some architectures, to describe a system-wide - time-zone-like offset between the software clock maintained by the kernel, - and the "RTC" clock that keeps time when the system is shut down. - - However, to reduce the odds of this offset being set by accident, - settimeofday can no longer be used to set the time and the offset - simultaneously. If both of its two arguments are non-null, the call - will fail (setting errno to EINVAL). - - Callers attempting to set this offset should also be prepared for the call - to fail and set errno to ENOSYS; this already happens on the Hurd and on - some Linux architectures. The Linux kernel maintainers are discussing a - more principled replacement for the reused API. After a replacement - becomes available, we will change settimeofday to fail with ENOSYS on all - platforms when its 'tzp' argument is not a null pointer. - - settimeofday itself is obsolescent according to POSIX. Programs that set - the system time should use clock_settime and/or the adjtime family of - functions instead. We may cease to make settimeofday available to newly - linked binaries after there is a replacement for Linux's time-zone-like - offset API. -______________________________________________________ - -hwclock(8) had one settimeofday(2) call where both args were set for ---hctosys when the RTC was ticking UTC. This allowed setting the system -time, timezone, and locking the warp_clock function with a single call. -That operation now takes 3 calls of settimeofday(2). - -Although this common operation now takes three calls, the overall logic -for the set_system_clock() function was simplified. - -Co-Author: Karel Zak -Signed-off-by: J William Piggott ---- - sys-utils/hwclock.c | 71 +++++++++++++++++++++++---------------------- - 1 file changed, 37 insertions(+), 34 deletions(-) - -diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c -index e736da717..1191a8571 100644 ---- a/sys-utils/hwclock.c -+++ b/sys-utils/hwclock.c -@@ -643,28 +643,28 @@ display_time(struct timeval hwctime) - * tz.tz_minuteswest argument and sets PCIL (see below). At boot settimeofday(2) - * has one-shot access to this function as shown in the table below. - * -- * +-------------------------------------------------------------------+ -- * | settimeofday(tv, tz) | -- * |-------------------------------------------------------------------| -- * | Arguments | System Time | PCIL | | warp_clock | -- * | tv | tz | set | warped | set | firsttime | locked | -- * |---------|---------|---------------|------|-----------|------------| -- * | pointer | NULL | yes | no | no | 1 | no | -- * | pointer | pointer | yes | no | no | 0 | yes | -- * | NULL | ptr2utc | no | no | no | 0 | yes | -- * | NULL | pointer | no | yes | yes | 0 | yes | -- * +-------------------------------------------------------------------+ -+ * +-------------------------------------------------------------------------+ -+ * | settimeofday(tv, tz) | -+ * |-------------------------------------------------------------------------| -+ * | Arguments | System Time | TZ | PCIL | | warp_clock | -+ * | tv | tz | set | warped | set | set | firsttime | locked | -+ * |---------|---------|---------------|-----|------|-----------|------------| -+ * | pointer | NULL | yes | no | no | no | 1 | no | -+ * | NULL | ptr2utc | no | no | yes | no | 0 | yes | -+ * | NULL | pointer | no | yes | yes | yes | 0 | yes | -+ * +-------------------------------------------------------------------------+ - * ptr2utc: tz.tz_minuteswest is zero (UTC). - * PCIL: persistent_clock_is_local, sets the "11 minute mode" timescale. - * firsttime: locks the warp_clock function (initialized to 1 at boot). -+ * Since glibc v2.31 settimeofday() will fail if both args are non NULL - * - * +---------------------------------------------------------------------------+ - * | op | RTC scale | settimeofday calls | - * |---------|-----------|-----------------------------------------------------| - * | systz | Local | 1) warps system time*, sets PCIL* and kernel tz | - * | systz | UTC | 1st) locks warp_clock* 2nd) sets kernel tz | -- * | hctosys | Local | 1st) sets PCIL* 2nd) sets system time and kernel tz | -- * | hctosys | UTC | 1) sets system time and kernel tz | -+ * | hctosys | Local | 1st) sets PCIL* & kernel tz 2nd) sets system time | -+ * | hctosys | UTC | 1st) locks warp* 2nd) sets tz 3rd) sets system time | - * +---------------------------------------------------------------------------+ - * * only on first call after boot - */ -@@ -675,42 +675,45 @@ set_system_clock(const struct hwclock_control *ctl, - struct tm broken; - int minuteswest; - int rc = 0; -- const struct timezone tz_utc = { 0 }; - - localtime_r(&newtime.tv_sec, &broken); - minuteswest = -get_gmtoff(&broken) / 60; - - if (ctl->verbose) { -- if (ctl->hctosys && !ctl->universal) -- printf(_("Calling settimeofday(NULL, %d) to set " -- "persistent_clock_is_local.\n"), minuteswest); -- if (ctl->systz && ctl->universal) -+ if (ctl->universal) { - puts(_("Calling settimeofday(NULL, 0) " -- "to lock the warp function.")); -+ "to lock the warp_clock function.")); -+ if (!( ctl->universal && !minuteswest )) -+ printf(_("Calling settimeofday(NULL, %d) " -+ "to set the kernel timezone.\n"), -+ minuteswest); -+ } else -+ printf(_("Calling settimeofday(NULL, %d) to warp " -+ "System time, set PCIL and the kernel tz.\n"), -+ minuteswest); -+ - if (ctl->hctosys) -- printf(_("Calling settimeofday(%ld.%06ld, %d)\n"), -- newtime.tv_sec, newtime.tv_usec, minuteswest); -- else { -- printf(_("Calling settimeofday(NULL, %d) "), minuteswest); -- if (ctl->universal) -- puts(_("to set the kernel timezone.")); -- else -- puts(_("to warp System time.")); -- } -+ printf(_("Calling settimeofday(%ld.%06ld, NULL) " -+ "to set the System time.\n"), -+ newtime.tv_sec, newtime.tv_usec); - } - - if (!ctl->testing) { -+ const struct timezone tz_utc = { 0 }; - const struct timezone tz = { minuteswest }; - -- if (ctl->hctosys && !ctl->universal) /* set PCIL */ -- rc = settimeofday(NULL, &tz); -- if (ctl->systz && ctl->universal) /* lock warp_clock */ -+ /* If UTC RTC: lock warp_clock and PCIL */ -+ if (ctl->universal) - rc = settimeofday(NULL, &tz_utc); -- if (!rc && ctl->hctosys) -- rc = settimeofday(&newtime, &tz); -- else if (!rc) -+ -+ /* Set kernel tz; if localtime RTC: warp_clock and set PCIL */ -+ if (!rc && !( ctl->universal && !minuteswest )) - rc = settimeofday(NULL, &tz); - -+ /* Set the System Clock */ -+ if ((!rc || errno == ENOSYS) && ctl->hctosys) -+ rc = settimeofday(&newtime, NULL); -+ - if (rc) { - warn(_("settimeofday() failed")); - return EXIT_FAILURE; --- -2.25.2 - diff --git a/util-linux.spec b/util-linux.spec index b3e9a50..eae812e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.35.1 -Release: 9%{?dist} +Version: 2.35.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -107,14 +107,6 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.28-login-lastlog-create.patch -# https://github.com/karelzak/util-linux/issues/949 -Patch1: 0001-libfdisk-script-accept-sector-size-ignore-unknown-he.patch -# https://github.com/karelzak/util-linux/issues/948 -Patch2: 0002-fstrim-do-not-use-Protect-setting-in-systemd-service.patch -# https://github.com/ibm-s390-tools/s390-tools/issues/80 -Patch3: 0003-lsblk-fix-P-regression-from-v2.34.patch -# 1823463 - hwclock unable to set system time -Patch4: 0004-hwclock-make-glibc-2.31-compatible.patch %description The util-linux package contains a large variety of low-level system @@ -941,6 +933,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed May 20 2020 Karel Zak - 2.35.2-1 +- upgrade to upstream bug fix release 2.35.2 + https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35.2-ReleaseNotes + * Wed Apr 15 2020 Karel Zak - 2.35.1-9 - fix copy & past bug in specfile changelog From acc3919c15c179b9320353102820977c7719148c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 May 2020 17:09:41 +0200 Subject: [PATCH 298/425] new v2.35.2 tarball --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 02b5d18..1a63250 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,4 @@ /util-linux-2.35-rc2.tar.xz /util-linux-2.35.tar.xz /util-linux-2.35.1.tar.xz +/util-linux-2.35.2.tar.xz diff --git a/sources b/sources index 519bfd7..1716aeb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.35.1.tar.xz) = 6e27e08bfc02378970f015decfea5a52d6c342c4c8f4ac48dd07d248485eb797e506d91d290dbbca344c3e5cfe1fc150db80a23d510367427232f5abeabe591a +SHA512 (util-linux-2.35.2.tar.xz) = 59e038ba71aa74c9af6f927b357483a965f675ab3ffcd25cf0c1b043656312d2d2d07c55659fd3da69ede165bec313e0ae7e1cd73758e49681ae610604b399a2 From ed9b0d362726d3d2e9e5e3dc770e030616c167d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 26 May 2020 03:54:15 +0200 Subject: [PATCH 299/425] Rebuilt for Python 3.9 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index eae812e..b0e48f5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.35.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -933,6 +933,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue May 26 2020 Miro HronÄok - 2.35.2-2 +- Rebuilt for Python 3.9 + * Wed May 20 2020 Karel Zak - 2.35.2-1 - upgrade to upstream bug fix release 2.35.2 https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35.2-ReleaseNotes From f991f6faa904115c1487450a36cf3f1171fbb694 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 23 Jul 2020 14:51:41 +0200 Subject: [PATCH 300/425] 2.36-1: upgrade --- .gitignore | 1 + 2.28-login-lastlog-create.patch | 12 ------------ 2.36-login-lastlog-create.patch | 12 ++++++++++++ sources | 2 +- util-linux.spec | 27 +++++++++++++++++++-------- 5 files changed, 33 insertions(+), 21 deletions(-) delete mode 100644 2.28-login-lastlog-create.patch create mode 100644 2.36-login-lastlog-create.patch diff --git a/.gitignore b/.gitignore index 1a63250..3126fff 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ /util-linux-2.35.tar.xz /util-linux-2.35.1.tar.xz /util-linux-2.35.2.tar.xz +/util-linux-2.36.tar.xz diff --git a/2.28-login-lastlog-create.patch b/2.28-login-lastlog-create.patch deleted file mode 100644 index 869543e..0000000 --- a/2.28-login-lastlog-create.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up util-linux-2.28/login-utils/login.c.kzak util-linux-2.28/login-utils/login.c ---- util-linux-2.28/login-utils/login.c.kzak 2016-03-08 14:28:16.724156218 +0100 -+++ util-linux-2.28/login-utils/login.c 2016-04-26 12:45:29.235326017 +0200 -@@ -510,7 +510,7 @@ static void log_lastlog(struct login_con - sa.sa_handler = SIG_IGN; - sigaction(SIGXFSZ, &sa, &oldsa_xfsz); - -- fd = open(_PATH_LASTLOG, O_RDWR, 0); -+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); - if (fd < 0) - goto done; - diff --git a/2.36-login-lastlog-create.patch b/2.36-login-lastlog-create.patch new file mode 100644 index 0000000..e2523d3 --- /dev/null +++ b/2.36-login-lastlog-create.patch @@ -0,0 +1,12 @@ +diff -up util-linux-2.36/login-utils/login.c.kzak util-linux-2.36/login-utils/login.c +--- util-linux-2.36/login-utils/login.c.kzak 2020-07-23 14:13:26.777030764 +0200 ++++ util-linux-2.36/login-utils/login.c 2020-07-23 14:11:22.793686983 +0200 +@@ -585,7 +585,7 @@ static void log_lastlog(struct login_con + sa.sa_handler = SIG_IGN; + sigaction(SIGXFSZ, &sa, &oldsa_xfsz); + +- fd = open(_PATH_LASTLOG, O_RDWR, 0); ++ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); + if (fd < 0) + goto done; + offset = cxt->pwd->pw_uid * sizeof(ll); diff --git a/sources b/sources index 1716aeb..e271813 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.35.2.tar.xz) = 59e038ba71aa74c9af6f927b357483a965f675ab3ffcd25cf0c1b043656312d2d2d07c55659fd3da69ede165bec313e0ae7e1cd73758e49681ae610604b399a2 +SHA512 (util-linux-2.36.tar.xz) = cbb4975da8d99a1edd45514171d59ea7b019ce0f77a81e88b447a733f725e91c53540d9dc78bc626dc011dca129b8b150aaf9e64ccf62a4202ae816581acf4fd diff --git a/util-linux.spec b/util-linux.spec index e8cbc1a..55f4255 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.35.2 -Release: 2%{?dist} +Version: 2.36 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -100,7 +100,7 @@ Requires: libfdisk = %{version}-%{release} ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch0: 2.28-login-lastlog-create.patch +Patch0: 2.36-login-lastlog-create.patch %description The util-linux package contains a large variety of low-level system @@ -508,13 +508,13 @@ fi %{_unitdir}/fstrim.* %{_bindir}/cal +%{_bindir}/chmem +%{_bindir}/choom %{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column -%{_bindir}/choom -%{_bindir}/chmem %{_bindir}/dmesg %{_bindir}/eject %{_bindir}/fallocate @@ -528,6 +528,7 @@ fi %{_bindir}/ipcmk %{_bindir}/ipcrm %{_bindir}/ipcs +%{_bindir}/irqtop %{_bindir}/isosize %{_bindir}/kill %{_bindir}/last @@ -537,6 +538,7 @@ fi %{_bindir}/lsblk %{_bindir}/lscpu %{_bindir}/lsipc +%{_bindir}/lsirq %{_bindir}/lslocks %{_bindir}/lslogins %{_bindir}/lsmem @@ -553,8 +555,8 @@ fi %{_bindir}/renice %{_bindir}/rev %{_bindir}/script -%{_bindir}/scriptreplay %{_bindir}/scriptlive +%{_bindir}/scriptreplay %{_bindir}/setarch %{_bindir}/setpriv %{_bindir}/setsid @@ -587,6 +589,7 @@ fi %{_mandir}/man1/ipcmk.1* %{_mandir}/man1/ipcrm.1* %{_mandir}/man1/ipcs.1* +%{_mandir}/man1/irqtop.1* %{_mandir}/man1/kill.1* %{_mandir}/man1/last.1* %{_mandir}/man1/lastb.1* @@ -595,6 +598,7 @@ fi %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* %{_mandir}/man1/lsipc.1* +%{_mandir}/man1/lsirq.1* %{_mandir}/man1/lslogins.1* %{_mandir}/man1/lsmem.1* %{_mandir}/man1/mcookie.1* @@ -609,8 +613,8 @@ fi %{_mandir}/man1/rev.1* %{_mandir}/man1/runuser.1* %{_mandir}/man1/script.1* -%{_mandir}/man1/scriptreplay.1* %{_mandir}/man1/scriptlive.1* +%{_mandir}/man1/scriptreplay.1* %{_mandir}/man1/setpriv.1* %{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* @@ -746,6 +750,7 @@ fi %{compldir}/ipcmk %{compldir}/ipcrm %{compldir}/ipcs +%{compldir}/irqtop %{compldir}/isosize %{compldir}/last %{compldir}/ldattach @@ -755,6 +760,7 @@ fi %{compldir}/lsblk %{compldir}/lscpu %{compldir}/lsipc +%{compldir}/lsirq %{compldir}/lslocks %{compldir}/lslogins %{compldir}/lsmem @@ -782,8 +788,8 @@ fi %{compldir}/rtcwake %{compldir}/runuser %{compldir}/script -%{compldir}/scriptreplay %{compldir}/scriptlive +%{compldir}/scriptreplay %{compldir}/setarch %{compldir}/setpriv %{compldir}/setsid @@ -927,6 +933,11 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Jul 23 2020 Karel Zak - 2.36-1 +- upgrade to upstream release v2.36 + https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36-ReleaseNotes +- add irqtop and lsirq commands + * Tue May 26 2020 Miro HronÄok - 2.35.2-2 - Rebuilt for Python 3.9 From 5aecaa99fe04e1afc94945377d4ebaf4e009576d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:28:25 +0000 Subject: [PATCH 301/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 55f4255..6e0006b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -933,6 +933,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 2.36-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Jul 23 2020 Karel Zak - 2.36-1 - upgrade to upstream release v2.36 https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36-ReleaseNotes From 16f25ffc54770b552921cc99c22f3c4b069dedcd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 1 Sep 2020 12:45:28 +0200 Subject: [PATCH 302/425] 2.36-3: remove libmount mountinfo workaround --- ...unt-remove-read-mountinfo-workaround.patch | 396 ++++++++++++++++++ util-linux.spec | 8 +- 2 files changed, 403 insertions(+), 1 deletion(-) create mode 100644 libmount-remove-read-mountinfo-workaround.patch diff --git a/libmount-remove-read-mountinfo-workaround.patch b/libmount-remove-read-mountinfo-workaround.patch new file mode 100644 index 0000000..38f8e34 --- /dev/null +++ b/libmount-remove-read-mountinfo-workaround.patch @@ -0,0 +1,396 @@ +From 57898c3a7ee8fc5933cddd4526bb3980bef85a02 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 1 Sep 2020 10:15:14 +0200 +Subject: [PATCH] libmount: remove read-mountinfo workaround + +This workaround has been introduced by +http://github.com/karelzak/util-linux/commit/e4925f591c1bfb83719418b56b952830d15b77eb + +And originally requested by https://github.com/systemd/systemd/issues/10872 + +It seems we do not need it anymore as the problem should be fixed in kernel since 5.8 +(kernel commit 9f6c61f96f2d97cbb5f7fa85607bc398f843ff0f). + +Note that the libmount solution is very expensive as it repeats read() +many times (until we get consistent result) if kernel is busy with +mount table modification. This behaviour makes events management in +systemd (or other places) pretty difficult as read mountinfo takes +time on busy systems. + +Addresses: https://github.com/systemd/systemd/pull/16537 +Signed-off-by: Karel Zak +--- + configure.ac | 1 - + libmount/src/mountP.h | 2 - + libmount/src/tab_parse.c | 87 ++++---------------- + libmount/src/utils.c | 166 --------------------------------------- + 4 files changed, 15 insertions(+), 241 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2d178f3af..1e31ca3e2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -504,7 +504,6 @@ AC_CHECK_FUNCS([ \ + err \ + errx \ + explicit_bzero \ +- fmemopen \ + fsync \ + utimensat \ + getdomainname \ +diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h +index d8ba0abad..ee97c6b4a 100644 +--- a/libmount/src/mountP.h ++++ b/libmount/src/mountP.h +@@ -98,7 +98,6 @@ extern int mnt_valid_tagname(const char *tagname); + extern int append_string(char **a, const char *b); + + extern const char *mnt_statfs_get_fstype(struct statfs *vfs); +-extern int is_procfs_fd(int fd); + extern int is_file_empty(const char *name); + + extern int mnt_is_readonly(const char *path) +@@ -124,7 +123,6 @@ extern void mnt_free_filesystems(char **filesystems); + extern char *mnt_get_kernel_cmdline_option(const char *name); + extern int mnt_stat_mountpoint(const char *target, struct stat *st); + extern int mnt_lstat_mountpoint(const char *target, struct stat *st); +-extern FILE *mnt_get_procfs_memstream(int fd, char **membuf); + + /* tab.c */ + extern int is_mountinfo(struct libmnt_table *tb); +diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c +index 329987bcb..ac12dce54 100644 +--- a/libmount/src/tab_parse.c ++++ b/libmount/src/tab_parse.c +@@ -694,7 +694,15 @@ static int kernel_fs_postparse(struct libmnt_table *tb, + return rc; + } + +-static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) ++/** ++ * mnt_table_parse_stream: ++ * @tb: tab pointer ++ * @f: file stream ++ * @filename: filename used for debug and error messages ++ * ++ * Returns: 0 on success, negative number in case of error. ++ */ ++int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) + { + int rc = -1; + int flags = 0; +@@ -773,40 +781,6 @@ err: + return rc; + } + +-/** +- * mnt_table_parse_stream: +- * @tb: tab pointer +- * @f: file stream +- * @filename: filename used for debug and error messages +- * +- * Returns: 0 on success, negative number in case of error. +- */ +-int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) +-{ +- int fd, rc; +- FILE *memf = NULL; +- char *membuf = NULL; +- +- /* +- * For /proc/#/{mountinfo,mount} we read all file to memory and use it +- * as memory stream. For more details see mnt_read_procfs_file(). +- */ +- if ((fd = fileno(f)) >= 0 +- && (tb->fmt == MNT_FMT_GUESS || +- tb->fmt == MNT_FMT_MOUNTINFO || +- tb->fmt == MNT_FMT_MTAB) +- && is_procfs_fd(fd) +- && (memf = mnt_get_procfs_memstream(fd, &membuf))) { +- +- rc = __table_parse_stream(tb, memf, filename); +- fclose(memf); +- free(membuf); +- } else +- rc = __table_parse_stream(tb, f, filename); +- +- return rc; +-} +- + /** + * mnt_table_parse_file: + * @tb: tab pointer +@@ -822,49 +796,18 @@ int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filenam + int mnt_table_parse_file(struct libmnt_table *tb, const char *filename) + { + FILE *f; +- int rc, fd = -1; ++ int rc; + + if (!filename || !tb) + return -EINVAL; + +- /* +- * Try to use read()+poll() to realiably read all +- * /proc/#/{mount,mountinfo} file to memory +- */ +- if (tb->fmt != MNT_FMT_SWAPS +- && strncmp(filename, "/proc/", 6) == 0) { +- +- FILE *memf; +- char *membuf = NULL; +- +- fd = open(filename, O_RDONLY|O_CLOEXEC); +- if (fd < 0) { +- rc = -errno; +- goto done; +- } +- memf = mnt_get_procfs_memstream(fd, &membuf); +- if (memf) { +- rc = __table_parse_stream(tb, memf, filename); +- +- fclose(memf); +- free(membuf); +- close(fd); +- goto done; +- } +- /* else fallback to fopen/fdopen() */ +- } +- +- if (fd >= 0) +- f = fdopen(fd, "r" UL_CLOEXECSTR); +- else +- f = fopen(filename, "r" UL_CLOEXECSTR); +- ++ f = fopen(filename, "r" UL_CLOEXECSTR); + if (f) { +- rc = __table_parse_stream(tb, f, filename); ++ rc = mnt_table_parse_stream(tb, f, filename); + fclose(f); + } else + rc = -errno; +-done: ++ + DBG(TAB, ul_debugobj(tb, "parsing done [filename=%s, rc=%d]", filename, rc)); + return rc; + } +@@ -921,7 +864,7 @@ static int __mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname) + + f = fopen_at(dd, d->d_name, O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); + if (f) { +- __table_parse_stream(tb, f, d->d_name); ++ mnt_table_parse_stream(tb, f, d->d_name); + fclose(f); + } + } +@@ -962,7 +905,7 @@ static int __mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname) + f = fopen_at(dirfd(dir), d->d_name, + O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); + if (f) { +- __table_parse_stream(tb, f, d->d_name); ++ mnt_table_parse_stream(tb, f, d->d_name); + fclose(f); + } + } +diff --git a/libmount/src/utils.c b/libmount/src/utils.c +index 92829ebb0..40b45f11d 100644 +--- a/libmount/src/utils.c ++++ b/libmount/src/utils.c +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + #include + + #include "strutils.h" +@@ -448,13 +447,6 @@ const char *mnt_statfs_get_fstype(struct statfs *vfs) + return NULL; + } + +-int is_procfs_fd(int fd) +-{ +- struct statfs sfs; +- +- return fstatfs(fd, &sfs) == 0 && sfs.f_type == STATFS_PROC_MAGIC; +-} +- + /** + * mnt_match_fstype: + * @type: filesystem type +@@ -1174,164 +1166,7 @@ done: + return 1; + } + +-#if defined(HAVE_FMEMOPEN) || defined(TEST_PROGRAM) +- +-/* +- * This function tries to minimize possible races when we read +- * /proc/#/{mountinfo,mount} files. +- * +- * The idea is to minimize number of read()s and check by poll() that during +- * the read the mount table has not been modified. If yes, than re-read it +- * (with some limitations to avoid never ending loop). +- * +- * Returns: <0 error, 0 success, 1 too many attempts +- */ +-static int read_procfs_file(int fd, char **buf, size_t *bufsiz) +-{ +- size_t bufmax = 0; +- int rc = 0, tries = 0, ninters = 0; +- char *bufptr = NULL; +- +- assert(buf); +- assert(bufsiz); +- +- *bufsiz = 0; +- *buf = NULL; +- +- do { +- ssize_t ret; +- +- if (!bufptr || bufmax == *bufsiz) { +- char *tmp; +- +- bufmax = bufmax ? bufmax * 2 : (16 * 1024); +- tmp = realloc(*buf, bufmax); +- if (!tmp) +- break; +- *buf = tmp; +- bufptr = tmp + *bufsiz; +- } +- +- errno = 0; +- ret = read(fd, bufptr, bufmax - *bufsiz); +- +- if (ret < 0) { +- /* error */ +- if ((errno == EAGAIN || errno == EINTR) && (ninters++ < 5)) { +- xusleep(200000); +- continue; +- } +- break; +- +- } if (ret > 0) { +- /* success -- verify no event during read */ +- struct pollfd fds[] = { +- { .fd = fd, .events = POLLPRI } +- }; +- +- rc = poll(fds, 1, 0); +- if (rc < 0) +- break; /* poll() error */ +- if (rc > 0) { +- /* event -- read all again */ +- if (lseek(fd, 0, SEEK_SET) != 0) +- break; +- *bufsiz = 0; +- bufptr = *buf; +- tries++; +- +- if (tries > 10) +- /* busy system? -- wait */ +- xusleep(10000); +- continue; +- } +- +- /* successful read() without active poll() */ +- (*bufsiz) += (size_t) ret; +- bufptr += ret; +- tries = ninters = 0; +- } else { +- /* end-of-file */ +- goto success; +- } +- } while (tries <= 100); +- +- rc = errno ? -errno : 1; +- free(*buf); +- return rc; +- +-success: +- return 0; +-} +- +-/* +- * Create FILE stream for data from read_procfs_file() +- */ +-FILE *mnt_get_procfs_memstream(int fd, char **membuf) +-{ +- size_t sz = 0; +- off_t cur; +- +- *membuf = NULL; +- +- /* in case of error, rewind to the original position */ +- cur = lseek(fd, 0, SEEK_CUR); +- +- if (read_procfs_file(fd, membuf, &sz) == 0 && sz > 0) { +- FILE *memf = fmemopen(*membuf, sz, "r"); +- if (memf) +- return memf; /* success */ +- +- free(*membuf); +- *membuf = NULL; +- } +- +- /* error */ +- if (cur != (off_t) -1) +- lseek(fd, cur, SEEK_SET); +- return NULL; +-} +-#else +-FILE *mnt_get_procfs_memstream(int fd __attribute((__unused__)), +- char **membuf __attribute((__unused__))) +-{ +- return NULL; +-} +-#endif /* HAVE_FMEMOPEN */ +- +- + #ifdef TEST_PROGRAM +-static int test_proc_read(struct libmnt_test *ts, int argc, char *argv[]) +-{ +- char *buf = NULL; +- char *filename = argv[1]; +- size_t bufsiz = 0; +- int rc = 0, fd = open(filename, O_RDONLY); +- +- if (fd <= 0) { +- warn("%s: cannot open", filename); +- return -errno; +- } +- +- rc = read_procfs_file(fd, &buf, &bufsiz); +- close(fd); +- +- switch (rc) { +- case 0: +- fwrite(buf, 1, bufsiz, stdout); +- free(buf); +- break; +- case 1: +- warnx("too many attempts"); +- break; +- default: +- warn("%s: cannot read", filename); +- break; +- } +- +- return rc; +-} +- + static int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) + { + char *type = argv[1]; +@@ -1513,7 +1348,6 @@ int main(int argc, char *argv[]) + { "--guess-root", test_guess_root, "[]" }, + { "--mkdir", test_mkdir, "" }, + { "--statfs-type", test_statfs_type, "" }, +- { "--read-procfs", test_proc_read, "" }, + + { NULL } + }; +-- +2.25.4 + diff --git a/util-linux.spec b/util-linux.spec index 6e0006b..9819085 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -101,6 +101,9 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.36-login-lastlog-create.patch +# https://github.com/karelzak/util-linux/commit/57898c3a7ee8fc5933cddd4526bb3980bef85a02 +# The workaround is unnecessary on Fedora with kernel >= 5.8. +Patch1: libmount-remove-read-mountinfo-workaround.patch %description The util-linux package contains a large variety of low-level system @@ -933,6 +936,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Sep 01 2020 Karel Zak - 2.36-3 +- remove mountinfo workaround (unnecessary for kernel 5.8) + * Wed Jul 29 2020 Fedora Release Engineering - 2.36-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From b0e9e3bcb8bd546c41905e69efe1e7f2856bef11 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 27 Aug 2020 15:22:40 +0200 Subject: [PATCH 303/425] 2.36-3: #1860461 - sfdisk gaps and add autotools to BuildRequires --- ...t-free-sector-detection-if-partition.patch | 42 +++++++++++++++++++ ...unt-remove-read-mountinfo-workaround.patch | 0 util-linux.spec | 8 +++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 0001-libfdisk-fix-last-free-sector-detection-if-partition.patch rename libmount-remove-read-mountinfo-workaround.patch => 0002-libmount-remove-read-mountinfo-workaround.patch (100%) diff --git a/0001-libfdisk-fix-last-free-sector-detection-if-partition.patch b/0001-libfdisk-fix-last-free-sector-detection-if-partition.patch new file mode 100644 index 0000000..eca67e6 --- /dev/null +++ b/0001-libfdisk-fix-last-free-sector-detection-if-partition.patch @@ -0,0 +1,42 @@ +From 430952f254cddf1ccb47a5f8caf5b5cd64193c3a Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 10 Aug 2020 11:37:32 +0200 +Subject: [PATCH] libfdisk: fix last free sector detection if partition size + specified + +We need to skip useless gaps between partition if the gap is no large +enough for a new partition. Unfortunately, the current code checks +size of the gap, but does not care for location of the gap -- this is +good enough for dialog driven partitioning, but it's pretty bad if +start of the partition is explicitly specified (e.g. sfdisk). + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1860461 +Signed-off-by: Karel Zak +--- + libfdisk/src/dos.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c +index 176969883..890e33a26 100644 +--- a/libfdisk/src/dos.c ++++ b/libfdisk/src/dos.c +@@ -1274,14 +1274,14 @@ static int add_partition(struct fdisk_context *cxt, size_t n, + fdisk_sector_t last; + + rc = find_last_free(cxt, is_logical, start, limit, &last); +- + if (rc == 0 && last - start + 1 < fdisk_partition_get_size(pa)) { + DBG(LABEL, ul_debug("DOS: area <%ju,%ju> too small [wanted=%ju aval=%ju]", + (uintmax_t) start, (uintmax_t) last, + fdisk_partition_get_size(pa), + last - start)); + +- if (fdisk_partition_has_start(pa)) ++ if (fdisk_partition_has_start(pa) ++ && fdisk_partition_get_start(pa) <= last) + rc = -ENOSPC; + else { + start = last + 1; +-- +2.25.4 + diff --git a/libmount-remove-read-mountinfo-workaround.patch b/0002-libmount-remove-read-mountinfo-workaround.patch similarity index 100% rename from libmount-remove-read-mountinfo-workaround.patch rename to 0002-libmount-remove-read-mountinfo-workaround.patch diff --git a/util-linux.spec b/util-linux.spec index 9819085..b98ff97 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -32,6 +32,9 @@ BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel BuildRequires: pcre2-devel BuildRequires: gcc +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool %ifarch ppc64le BuildRequires: librtas-devel %endif @@ -101,9 +104,11 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.36-login-lastlog-create.patch +# 1860461 - sfdisk regression creating simple 3 partition MBR disk +Patch1: 0001-libfdisk-fix-last-free-sector-detection-if-partition.patch # https://github.com/karelzak/util-linux/commit/57898c3a7ee8fc5933cddd4526bb3980bef85a02 # The workaround is unnecessary on Fedora with kernel >= 5.8. -Patch1: libmount-remove-read-mountinfo-workaround.patch +Patch2: 0002-libmount-remove-read-mountinfo-workaround.patch %description The util-linux package contains a large variety of low-level system @@ -938,6 +943,7 @@ fi %changelog * Tue Sep 01 2020 Karel Zak - 2.36-3 - remove mountinfo workaround (unnecessary for kernel 5.8) +- fix #1860461 - sfdisk regression creating simple 3 partition MBR disk * Wed Jul 29 2020 Fedora Release Engineering - 2.36-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From b441300c920b353f75cb400c4726b561409b6268 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 12 Nov 2020 11:10:09 +0100 Subject: [PATCH 304/425] v2.36-4: Use make macros https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro [kzak@redhat.com: - port to the current master branch] --- util-linux.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index b98ff97..396faad 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -306,7 +306,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" %endif # build util-linux -make %{?_smp_mflags} +%make_build %check #to run tests use "--with check" @@ -326,7 +326,7 @@ touch ${RPM_BUILD_ROOT}/var/log/lastlog chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog # install util-linux -make install DESTDIR=${RPM_BUILD_ROOT} +%make_install # raw echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 @@ -941,6 +941,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Jul 14 2020 Tom Stellard - 2.36-4 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + * Tue Sep 01 2020 Karel Zak - 2.36-3 - remove mountinfo workaround (unnecessary for kernel 5.8) - fix #1860461 - sfdisk regression creating simple 3 partition MBR disk From c48435329aabbed661ee62ed8724dd990cf44bc5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 Nov 2020 14:56:03 +0100 Subject: [PATCH 305/425] 2.36.1: upgrade --- ...t-free-sector-detection-if-partition.patch | 42 ------------------- util-linux.spec | 12 +++--- 2 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 0001-libfdisk-fix-last-free-sector-detection-if-partition.patch diff --git a/0001-libfdisk-fix-last-free-sector-detection-if-partition.patch b/0001-libfdisk-fix-last-free-sector-detection-if-partition.patch deleted file mode 100644 index eca67e6..0000000 --- a/0001-libfdisk-fix-last-free-sector-detection-if-partition.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 430952f254cddf1ccb47a5f8caf5b5cd64193c3a Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 10 Aug 2020 11:37:32 +0200 -Subject: [PATCH] libfdisk: fix last free sector detection if partition size - specified - -We need to skip useless gaps between partition if the gap is no large -enough for a new partition. Unfortunately, the current code checks -size of the gap, but does not care for location of the gap -- this is -good enough for dialog driven partitioning, but it's pretty bad if -start of the partition is explicitly specified (e.g. sfdisk). - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1860461 -Signed-off-by: Karel Zak ---- - libfdisk/src/dos.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c -index 176969883..890e33a26 100644 ---- a/libfdisk/src/dos.c -+++ b/libfdisk/src/dos.c -@@ -1274,14 +1274,14 @@ static int add_partition(struct fdisk_context *cxt, size_t n, - fdisk_sector_t last; - - rc = find_last_free(cxt, is_logical, start, limit, &last); -- - if (rc == 0 && last - start + 1 < fdisk_partition_get_size(pa)) { - DBG(LABEL, ul_debug("DOS: area <%ju,%ju> too small [wanted=%ju aval=%ju]", - (uintmax_t) start, (uintmax_t) last, - fdisk_partition_get_size(pa), - last - start)); - -- if (fdisk_partition_has_start(pa)) -+ if (fdisk_partition_has_start(pa) -+ && fdisk_partition_get_start(pa) <= last) - rc = -ENOSPC; - else { - start = last + 1; --- -2.25.4 - diff --git a/util-linux.spec b/util-linux.spec index 396faad..85cf53a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.36 -Release: 4%{?dist} +Version: 2.36.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -104,11 +104,9 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: 2.36-login-lastlog-create.patch -# 1860461 - sfdisk regression creating simple 3 partition MBR disk -Patch1: 0001-libfdisk-fix-last-free-sector-detection-if-partition.patch # https://github.com/karelzak/util-linux/commit/57898c3a7ee8fc5933cddd4526bb3980bef85a02 # The workaround is unnecessary on Fedora with kernel >= 5.8. -Patch2: 0002-libmount-remove-read-mountinfo-workaround.patch +Patch1: 0002-libmount-remove-read-mountinfo-workaround.patch %description The util-linux package contains a large variety of low-level system @@ -941,6 +939,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Nov 16 2020 Karel Zak - 2.36.1-1 +- upgrade to stable upstream 2.36.1 + https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.1-ReleaseNotes + * Tue Jul 14 2020 Tom Stellard - 2.36-4 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro From 347549f079887ce61f62e6ffd3cdf29d1a245626 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 Nov 2020 15:32:39 +0100 Subject: [PATCH 306/425] upload sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3126fff..8149425 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ /util-linux-2.35.1.tar.xz /util-linux-2.35.2.tar.xz /util-linux-2.36.tar.xz +/util-linux-2.36.1.tar.xz diff --git a/sources b/sources index e271813..bf4b5be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.36.tar.xz) = cbb4975da8d99a1edd45514171d59ea7b019ce0f77a81e88b447a733f725e91c53540d9dc78bc626dc011dca129b8b150aaf9e64ccf62a4202ae816581acf4fd +SHA512 (util-linux-2.36.1.tar.xz) = 9dfd01ae4c16fa35015dafd222d555988b72e4d1d2fbadd140791b9ef78f84fa8254d4d08dc67cabf41e873338867f19e786b989d708ccfe5161c4f7679bba7a From 5977e189d6cfbb091395521ccc6d4c680cc1298b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 19 Nov 2020 11:50:25 +0100 Subject: [PATCH 307/425] 2.36.1-2: cleanup patches, fix 'symfollow' mount issue --- ...ep-freed-issue-file-pointer-zeroized.patch | 55 ------- column-fix-leading-space-characters-bug.patch | 148 ------------------ ...se-symfollow-for-helpers-on-user-mou.patch | 40 +++++ ...unt-remove-read-mountinfo-workaround.patch | 0 ...create.patch => login-lastlog-create.patch | 0 util-linux.spec | 13 +- 6 files changed, 50 insertions(+), 206 deletions(-) delete mode 100644 0001-agetty-keep-freed-issue-file-pointer-zeroized.patch delete mode 100644 column-fix-leading-space-characters-bug.patch create mode 100644 libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch rename 0002-libmount-remove-read-mountinfo-workaround.patch => libmount-remove-read-mountinfo-workaround.patch (100%) rename 2.36-login-lastlog-create.patch => login-lastlog-create.patch (100%) diff --git a/0001-agetty-keep-freed-issue-file-pointer-zeroized.patch b/0001-agetty-keep-freed-issue-file-pointer-zeroized.patch deleted file mode 100644 index a5441b1..0000000 --- a/0001-agetty-keep-freed-issue-file-pointer-zeroized.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9418ba6d05feed6061f5343741b1bc56e7bde663 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 20 Dec 2019 15:05:33 +0100 -Subject: [PATCH] agetty: keep freed issue file pointer zeroized - -References: https://bugzilla.redhat.com/show_bug.cgi?id=1784536 -Signed-off-by: Karel Zak ---- - term-utils/agetty.c | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index 3c20acc98..dfc4921f5 100644 ---- a/term-utils/agetty.c -+++ b/term-utils/agetty.c -@@ -1820,8 +1820,12 @@ static int issuefile_read_stream( - if (fstat(fileno(f), &st) || !S_ISREG(st.st_mode)) - return 1; - -- if (!ie->output) -- ie->output = open_memstream(&ie->mem, &ie->mem_sz); -+ if (!ie->output) { -+ free(ie->mem); -+ ie->mem_sz = 0; -+ ie->mem = NULL; -+ ie->output = open_memstream(&ie->mem, &ie->mem_sz); -+ } - - while ((c = getc(f)) != EOF) { - if (c == '\\') -@@ -1965,8 +1969,10 @@ done: - if (netlink_groups != 0) - open_netlink(); - #endif -- if (ie->output) -+ if (ie->output) { - fclose(ie->output); -+ ie->output = NULL; -+ } - } - - /* This is --show-issue backend, executed by normal user on the current -@@ -1985,7 +1991,8 @@ static void show_issue(struct options *op) - - if (ie.mem_sz) - write_all(STDOUT_FILENO, ie.mem, ie.mem_sz); -- -+ if (ie.output) -+ fclose(ie.output); - free(ie.mem); - } - --- -2.21.0 - diff --git a/column-fix-leading-space-characters-bug.patch b/column-fix-leading-space-characters-bug.patch deleted file mode 100644 index e612d34..0000000 --- a/column-fix-leading-space-characters-bug.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 651c5d428c2ef103ee8c5b1a310d6f29f0304744 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 27 Mar 2018 10:40:13 +0200 -Subject: [PATCH] column: fix leading space characters bug - -The bug has been introduced during column(1) rewrite. The function -read_input() need to skip leading space only temporary to detect empty -lines, but the rest of the code has to use the original buffer (line). -I've tried to fix one of the symptoms by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa -(alter), but this solution is unnecessary and too complex. - -Changes: - -* don't ignore leading space -* remove unnecessary stuff introduced by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa -* fix regression test with incorrect separator - -Addresses: https://github.com/karelzak/util-linux/issues/575 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 -Signed-off-by: Karel Zak ---- - tests/expected/column/table-input-separator-space | 2 +- - tests/ts/column/table | 2 +- - text-utils/column.c | 36 ++--------------------- - 4 files changed, 5 insertions(+), 38 deletions(-) - -diff --git a/tests/expected/column/table-input-separator-space b/tests/expected/column/table-input-separator-space -index 8a6513c11..25d9b5ab0 100644 ---- a/tests/expected/column/table-input-separator-space -+++ b/tests/expected/column/table-input-separator-space -@@ -1,5 +1,5 @@ - AAA BBBB C DDDD --BBB CCCC DDD -+ BBB CCCC DDD - AA BB DD - AAAA B CC D - AA CC DD -diff --git a/tests/ts/column/table b/tests/ts/column/table -index 27b52e7c8..5c89d5eaf 100755 ---- a/tests/ts/column/table -+++ b/tests/ts/column/table -@@ -37,7 +37,7 @@ $TS_CMD_COLUMN --separator ',' --table $TS_SELF/files/table-sep >> $TS_OUTPUT 2> - ts_finalize_subtest - - ts_init_subtest "input-separator-space" --$TS_CMD_COLUMN --separator ',' --table $TS_SELF/files/table-sep-space >> $TS_OUTPUT 2>&1 -+$TS_CMD_COLUMN --separator "$(echo -e '\t')" --table $TS_SELF/files/table-sep-space >> $TS_OUTPUT 2>&1 - ts_finalize_subtest - - ts_init_subtest "long" -diff --git a/text-utils/column.c b/text-utils/column.c -index 89d46d280..195814328 100644 ---- a/text-utils/column.c -+++ b/text-utils/column.c -@@ -86,7 +86,6 @@ struct column_control { - const char *tree_parent; - - wchar_t *input_separator; -- char *input_separator_raw; - const char *output_separator; - - wchar_t **ents; /* input entries */ -@@ -96,7 +95,6 @@ struct column_control { - unsigned int greedy :1, - json :1, - header_repeat :1, -- input_sep_space : 1, /* input separator contains space chars */ - tab_noheadings :1; - }; - -@@ -470,19 +468,7 @@ static int read_input(struct column_control *ctl, FILE *fp) - char *buf = NULL; - size_t bufsz = 0; - size_t maxents = 0; -- int rc = 0, is_space_sep = 0; -- -- /* Check if columns separator contains spaces chars */ -- if (ctl->mode == COLUMN_MODE_TABLE && ctl->input_separator_raw) { -- char *p; -- -- for (p = ctl->input_separator_raw; *p; p++) { -- if (isspace(*p)) { -- is_space_sep = 1; -- break; -- } -- } -- } -+ int rc = 0; - - /* Read input */ - do { -@@ -496,19 +482,6 @@ static int read_input(struct column_control *ctl, FILE *fp) - err(EXIT_FAILURE, _("read failed")); - } - str = (char *) skip_space(buf); -- -- /* The table columns separator could be a space. In this case -- * don't skip the separator if at begin of the line. For example: -- * -- * echo -e "\tcol1\tcol2\nrow\t1\t2" \ -- * | column -t -s "$(echo -e '\t')" --table-columns A,B,C -- */ -- if (is_space_sep && str > buf) { -- char *x = strpbrk(buf, ctl->input_separator_raw); -- if (x && x < str) -- str = x; -- } -- - if (str) { - p = strchr(str, '\n'); - if (p) -@@ -517,13 +490,13 @@ static int read_input(struct column_control *ctl, FILE *fp) - if (!str || !*str) - continue; - -- wcs = mbs_to_wcs(str); -+ wcs = mbs_to_wcs(buf); - if (!wcs) { - /* - * Convert broken sequences to \x and continue. - */ - size_t tmpsz = 0; -- char *tmp = mbs_invalid_encode(str, &tmpsz); -+ char *tmp = mbs_invalid_encode(buf, &tmpsz); - - if (!tmp) - err(EXIT_FAILURE, _("read failed")); -@@ -720,7 +693,6 @@ int main(int argc, char **argv) - - ctl.output_separator = " "; - ctl.input_separator = mbs_to_wcs("\t "); -- ctl.input_separator_raw = xstrdup("\t "); - - while ((c = getopt_long(argc, argv, "c:dE:eH:hi:JN:n:O:o:p:R:r:s:T:tVW:x", longopts, NULL)) != -1) { - -@@ -775,9 +747,7 @@ int main(int argc, char **argv) - break; - case 's': - free(ctl.input_separator); -- free(ctl.input_separator_raw); - ctl.input_separator = mbs_to_wcs(optarg); -- ctl.input_separator_raw = xstrdup(optarg); - ctl.greedy = 0; - break; - case 'T': --- -2.14.3 - diff --git a/libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch b/libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch new file mode 100644 index 0000000..edc7477 --- /dev/null +++ b/libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch @@ -0,0 +1,40 @@ +From 76bb9b30cfcf54b59591a57a3d2a747e514469b2 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 19 Nov 2020 09:49:16 +0100 +Subject: [PATCH] libmount: don't use "symfollow" for helpers on user mounts + +Addresses: https://github.com/karelzak/util-linux/issues/1193 +Signed-off-by: Karel Zak +--- + libmount/src/context_mount.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index 8c394c1ff..dd1786176 100644 +--- a/libmount/src/context_mount.c ++++ b/libmount/src/context_mount.c +@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) + * string, because there is nothing like MS_EXEC (we only have + * MS_NOEXEC in mount flags and we don't care about the original + * mount string in libmount for VFS options). ++ * ++ * This use-case makes sense for MS_SECURE flags only (see ++ * mnt_optstr_get_flags() and mnt_context_merge_mflags()). + */ + if (!(cxt->mountflags & MS_NOEXEC)) + mnt_optstr_append_option(optstr, "exec", NULL); +@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) + mnt_optstr_append_option(optstr, "suid", NULL); + if (!(cxt->mountflags & MS_NODEV)) + mnt_optstr_append_option(optstr, "dev", NULL); +- if (!(cxt->mountflags & MS_NOSYMFOLLOW)) +- mnt_optstr_append_option(optstr, "symfollow", NULL); + } + +- + if (cxt->flags & MNT_FL_SAVED_USER) + rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user); + if (rc) +-- +2.25.4 + diff --git a/0002-libmount-remove-read-mountinfo-workaround.patch b/libmount-remove-read-mountinfo-workaround.patch similarity index 100% rename from 0002-libmount-remove-read-mountinfo-workaround.patch rename to libmount-remove-read-mountinfo-workaround.patch diff --git a/2.36-login-lastlog-create.patch b/login-lastlog-create.patch similarity index 100% rename from 2.36-login-lastlog-create.patch rename to login-lastlog-create.patch diff --git a/util-linux.spec b/util-linux.spec index 85cf53a..4541839 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -103,10 +103,12 @@ Requires: libfdisk = %{version}-%{release} ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog -Patch0: 2.36-login-lastlog-create.patch +Patch0: login-lastlog-create.patch # https://github.com/karelzak/util-linux/commit/57898c3a7ee8fc5933cddd4526bb3980bef85a02 # The workaround is unnecessary on Fedora with kernel >= 5.8. -Patch1: 0002-libmount-remove-read-mountinfo-workaround.patch +Patch1: libmount-remove-read-mountinfo-workaround.patch +# usptream patch, https://github.com/karelzak/util-linux/issues/1193 +Patch2: libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch %description The util-linux package contains a large variety of low-level system @@ -939,6 +941,11 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Nov 19 2020 Karel Zak - 2.36.1-2 +- remove unused patches +- remove versions and seq.numbers from patch names +- fix mount "symfollow" issue (upstream patch) + * Mon Nov 16 2020 Karel Zak - 2.36.1-1 - upgrade to stable upstream 2.36.1 https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.1-ReleaseNotes From 08aad7c19083120c329d523810ec9d8ee609018a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:31:51 +0000 Subject: [PATCH 308/425] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index 4541839..fc87cac 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -16,6 +16,7 @@ URL: http://en.wikipedia.org/wiki/Util-linux %define pyver 3 ### Dependencies +BuildRequires: make BuildRequires: audit-libs-devel >= 1.0.6 BuildRequires: gettext-devel BuildRequires: libselinux-devel From b188598d3532ba6239c1278447e7b928d6ae386e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 14 Jan 2021 15:38:22 +0100 Subject: [PATCH 309/425] 2.36.1-3: improve uuidd scriptlets It seems we need to explicitly restart and uninstall uuiddd.socket unit too. --- util-linux.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index fc87cac..b86d8f3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -472,14 +472,17 @@ exit 0 # "systemctl preset" and it enable/disable service only. %post -n uuidd %systemd_post uuidd.service -if [ $1 -eq 1 ]; then +if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then + # install /bin/systemctl start uuidd.service > /dev/null 2>&1 || : fi %preun -n uuidd +%systemd_preun uuidd.socket %systemd_preun uuidd.service %postun -n uuidd +%systemd_postun_with_restart uuidd.socket %systemd_postun_with_restart uuidd.service %triggerpostun -- util-linux < 2.35.1-7 @@ -942,6 +945,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Jan 14 2021 Karel Zak - 2.36.1-3 +- improve uuidd scriptlets (fix #1767553) + * Thu Nov 19 2020 Karel Zak - 2.36.1-2 - remove unused patches - remove versions and seq.numbers from patch names @@ -949,7 +955,6 @@ fi * Mon Nov 16 2020 Karel Zak - 2.36.1-1 - upgrade to stable upstream 2.36.1 - https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.1-ReleaseNotes * Tue Jul 14 2020 Tom Stellard - 2.36-4 - Use make macros From 1c853c1f4ba6f4afeb9009710e49f0783af53720 Mon Sep 17 00:00:00 2001 From: Kelvin Fan Date: Wed, 27 Jan 2021 17:16:53 +0100 Subject: [PATCH 310/425] 2.36.1-4: Add patch to add /run/motd.d to default MOTD_FILE in login(1) --- login-default-motd-file.patch | 13 +++++++++++++ util-linux.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 login-default-motd-file.patch diff --git a/login-default-motd-file.patch b/login-default-motd-file.patch new file mode 100644 index 0000000..3670848 --- /dev/null +++ b/login-default-motd-file.patch @@ -0,0 +1,13 @@ +diff --git a/include/pathnames.h b/include/pathnames.h +index 3845d4c33..fac3a0783 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -41,7 +41,7 @@ + #ifndef _PATH_MAILDIR + # define _PATH_MAILDIR "/var/spool/mail" + #endif +-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd" ++#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d" + #ifndef _PATH_NOLOGIN + # define _PATH_NOLOGIN "/etc/nologin" + #endif diff --git a/util-linux.spec b/util-linux.spec index b86d8f3..e0da321 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.36.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -110,6 +110,9 @@ Patch0: login-lastlog-create.patch Patch1: libmount-remove-read-mountinfo-workaround.patch # usptream patch, https://github.com/karelzak/util-linux/issues/1193 Patch2: libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch +# Add `/run/motd.d` to the hardcoded MOTD_FILE +# https://github.com/coreos/console-login-helper-messages/issues/60 +Patch3: login-default-motd-file.patch %description The util-linux package contains a large variety of low-level system @@ -945,6 +948,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jan 27 2021 Kelvin Fan - 2.36.1-4 +- Add patch to add /run/motd.d to default MOTD_FILE in login(1) + * Thu Jan 14 2021 Karel Zak - 2.36.1-3 - improve uuidd scriptlets (fix #1767553) From 8abfa7439245c37968309eb89927ae22bcb884aa Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 12 Feb 2021 16:07:58 +0100 Subject: [PATCH 311/425] 2.36.2-1: upgrade --- .gitignore | 1 + ...se-symfollow-for-helpers-on-user-mou.patch | 40 ------------------- sources | 2 +- util-linux.spec | 12 +++--- 4 files changed, 9 insertions(+), 46 deletions(-) delete mode 100644 libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch diff --git a/.gitignore b/.gitignore index 8149425..fa06b03 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ /util-linux-2.35.2.tar.xz /util-linux-2.36.tar.xz /util-linux-2.36.1.tar.xz +/util-linux-2.36.2.tar.xz diff --git a/libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch b/libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch deleted file mode 100644 index edc7477..0000000 --- a/libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 76bb9b30cfcf54b59591a57a3d2a747e514469b2 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 19 Nov 2020 09:49:16 +0100 -Subject: [PATCH] libmount: don't use "symfollow" for helpers on user mounts - -Addresses: https://github.com/karelzak/util-linux/issues/1193 -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index 8c394c1ff..dd1786176 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) - * string, because there is nothing like MS_EXEC (we only have - * MS_NOEXEC in mount flags and we don't care about the original - * mount string in libmount for VFS options). -+ * -+ * This use-case makes sense for MS_SECURE flags only (see -+ * mnt_optstr_get_flags() and mnt_context_merge_mflags()). - */ - if (!(cxt->mountflags & MS_NOEXEC)) - mnt_optstr_append_option(optstr, "exec", NULL); -@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) - mnt_optstr_append_option(optstr, "suid", NULL); - if (!(cxt->mountflags & MS_NODEV)) - mnt_optstr_append_option(optstr, "dev", NULL); -- if (!(cxt->mountflags & MS_NOSYMFOLLOW)) -- mnt_optstr_append_option(optstr, "symfollow", NULL); - } - -- - if (cxt->flags & MNT_FL_SAVED_USER) - rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user); - if (rc) --- -2.25.4 - diff --git a/sources b/sources index bf4b5be..cb31284 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.36.1.tar.xz) = 9dfd01ae4c16fa35015dafd222d555988b72e4d1d2fbadd140791b9ef78f84fa8254d4d08dc67cabf41e873338867f19e786b989d708ccfe5161c4f7679bba7a +SHA512 (util-linux-2.36.2.tar.xz) = 6ab141f44ca4cb6b600081f10eae17e15d23abd122a37eb3ac6c845513a6a4396dc9dcff30b3032de80116ddde50e27dfbc86f92708c1051f84f0c919194664b diff --git a/util-linux.spec b/util-linux.spec index e0da321..4383207 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.36.1 -Release: 4%{?dist} +Version: 2.36.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: http://en.wikipedia.org/wiki/Util-linux @@ -108,11 +108,9 @@ Patch0: login-lastlog-create.patch # https://github.com/karelzak/util-linux/commit/57898c3a7ee8fc5933cddd4526bb3980bef85a02 # The workaround is unnecessary on Fedora with kernel >= 5.8. Patch1: libmount-remove-read-mountinfo-workaround.patch -# usptream patch, https://github.com/karelzak/util-linux/issues/1193 -Patch2: libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 -Patch3: login-default-motd-file.patch +Patch2: login-default-motd-file.patch %description The util-linux package contains a large variety of low-level system @@ -948,6 +946,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Feb 12 2021 Karel Zak - 2.36.2-1 +- upgrade to stable upstream 2.36.2 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.2-ReleaseNotes + * Wed Jan 27 2021 Kelvin Fan - 2.36.1-4 - Add patch to add /run/motd.d to default MOTD_FILE in login(1) From 2002e7d43829fffbabeeab583e09d80cc7f792b0 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Wed, 13 Jan 2021 22:17:52 +0000 Subject: [PATCH 312/425] 2.36.2-2: Spec file cleanup [kzak@redhat.com: - add changelog entry to spec file] --- util-linux.spec | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 4383207..19ac788 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,10 +1,10 @@ ### Header -Summary: A collection of basic system utilities +Summary: Collection of basic system utilities Name: util-linux Version: 2.36.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain -URL: http://en.wikipedia.org/wiki/Util-linux +URL: https://en.wikipedia.org/wiki/Util-linux ### Macros %define upstream_version %{version} @@ -47,7 +47,7 @@ BuildRequires: librtas-devel #BuildRequires: bison ### Sources -Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz +Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd @@ -130,7 +130,7 @@ This is library for fdisk-like programs, part of util-linux. %package -n libfdisk-devel Summary: Partitioning library for fdisk-like programs. License: LGPLv2+ -Requires: libfdisk = %{version}-%{release} +Requires: libfdisk%{?_isa} = %{version}-%{release} Requires: pkgconfig %description -n libfdisk-devel @@ -149,7 +149,7 @@ This is library for ls-like terminal programs, part of util-linux. %package -n libsmartcols-devel Summary: Formatting library for ls-like programs. License: LGPLv2+ -Requires: libsmartcols = %{version}-%{release} +Requires: libsmartcols%{?_isa} = %{version}-%{release} Requires: pkgconfig %description -n libsmartcols-devel @@ -160,8 +160,8 @@ part of util-linux. %package -n libmount Summary: Device mounting library License: LGPLv2+ -Requires: libblkid = %{version}-%{release} -Requires: libuuid = %{version}-%{release} +Requires: libblkid%{?_isa} = %{version}-%{release} +Requires: libuuid%{?_isa} = %{version}-%{release} Conflicts: filesystem < 3 %description -n libmount @@ -171,7 +171,7 @@ This is the device mounting library, part of util-linux. %package -n libmount-devel Summary: Device mounting library License: LGPLv2+ -Requires: libmount = %{version}-%{release} +Requires: libmount%{?_isa} = %{version}-%{release} Requires: pkgconfig %description -n libmount-devel @@ -182,7 +182,7 @@ part of util-linux. %package -n libblkid Summary: Block device ID library License: LGPLv2+ -Requires: libuuid = %{version}-%{release} +Requires: libuuid%{?_isa} = %{version}-%{release} Conflicts: filesystem < 3 Requires(post): coreutils @@ -193,7 +193,7 @@ This is block device identification library, part of util-linux. %package -n libblkid-devel Summary: Block device ID library License: LGPLv2+ -Requires: libblkid = %{version}-%{release} +Requires: libblkid%{?_isa} = %{version}-%{release} Requires: pkgconfig %description -n libblkid-devel @@ -221,7 +221,7 @@ See also the "uuid" package, which is a separate implementation. %package -n libuuid-devel Summary: Universally unique ID library License: BSD -Requires: libuuid = %{version}-%{release} +Requires: libuuid%{?_isa} = %{version}-%{release} Requires: pkgconfig %description -n libuuid-devel @@ -255,7 +255,7 @@ SMP systems. %package -n %{pypkg}-libmount Summary: Python bindings for the libmount library -Requires: libmount = %{version}-%{release} +Requires: libmount%{?_isa} = %{version}-%{release} License: LGPLv2+ %description -n %{pypkg}-libmount @@ -318,7 +318,6 @@ make check %install -rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} @@ -495,7 +494,6 @@ fi %files -f %{name}.files %doc README NEWS AUTHORS %doc Documentation/deprecated.txt -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/* %doc misc-utils/getopt-*.{bash,tcsh} @@ -863,7 +861,6 @@ fi %files -n uuidd -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.GPL-2.0-or-later %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd @@ -874,7 +871,6 @@ fi %files -n libfdisk -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPL-2.1-or-later libfdisk/COPYING %{_libdir}/libfdisk.so.* @@ -885,7 +881,6 @@ fi %files -n libsmartcols -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPL-2.1-or-later libsmartcols/COPYING %{_libdir}/libsmartcols.so.* @@ -896,7 +891,6 @@ fi %files -n libmount -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING %{_libdir}/libmount.so.* @@ -919,7 +913,6 @@ fi %files -n libuuid -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.BSD-3-Clause libuuid/COPYING %{_libdir}/libuuid.so.* @@ -941,11 +934,13 @@ fi %{_libdir}/pkgconfig/uuid.pc %files -n %{pypkg}-libmount -%{!?_licensedir:%global license %%doc} %license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Mar 2 2021 Karel Zak - 2.36.2-2 +- spec file cleanup https://src.fedoraproject.org/rpms/util-linux/pull-request/9 + * Fri Feb 12 2021 Karel Zak - 2.36.2-1 - upgrade to stable upstream 2.36.2 https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.2-ReleaseNotes From 05489e2334a12a20a70dc70f845ecf6529489d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:05 +0100 Subject: [PATCH 313/425] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- util-linux.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 19ac788..b4d2b67 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.36.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -938,6 +938,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 2.36.2-3 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Tue Mar 2 2021 Karel Zak - 2.36.2-2 - spec file cleanup https://src.fedoraproject.org/rpms/util-linux/pull-request/9 From 985b3cb330ab080d92c55e3a42ce4d6c09efede2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 21 Apr 2021 17:04:24 +0200 Subject: [PATCH 314/425] Make changelog chronological again --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index b4d2b67..615585a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -963,7 +963,7 @@ fi * Mon Nov 16 2020 Karel Zak - 2.36.1-1 - upgrade to stable upstream 2.36.1 -* Tue Jul 14 2020 Tom Stellard - 2.36-4 +* Thu Nov 12 2020 Tom Stellard - 2.36-4 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro From f00635cf14df42287c612f707ae1e3383d69fde3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 14 May 2021 10:42:53 +0200 Subject: [PATCH 315/425] 2.37-0.1: upgrade to upstream v2.37-rc2 --- .gitignore | 1 + ...unt-remove-read-mountinfo-workaround.patch | 396 ------------------ sources | 2 +- util-linux.spec | 27 +- 4 files changed, 19 insertions(+), 407 deletions(-) delete mode 100644 libmount-remove-read-mountinfo-workaround.patch diff --git a/.gitignore b/.gitignore index fa06b03..96efde9 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ /util-linux-2.36.tar.xz /util-linux-2.36.1.tar.xz /util-linux-2.36.2.tar.xz +/util-linux-2.37-rc2.tar.xz diff --git a/libmount-remove-read-mountinfo-workaround.patch b/libmount-remove-read-mountinfo-workaround.patch deleted file mode 100644 index 38f8e34..0000000 --- a/libmount-remove-read-mountinfo-workaround.patch +++ /dev/null @@ -1,396 +0,0 @@ -From 57898c3a7ee8fc5933cddd4526bb3980bef85a02 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 1 Sep 2020 10:15:14 +0200 -Subject: [PATCH] libmount: remove read-mountinfo workaround - -This workaround has been introduced by -http://github.com/karelzak/util-linux/commit/e4925f591c1bfb83719418b56b952830d15b77eb - -And originally requested by https://github.com/systemd/systemd/issues/10872 - -It seems we do not need it anymore as the problem should be fixed in kernel since 5.8 -(kernel commit 9f6c61f96f2d97cbb5f7fa85607bc398f843ff0f). - -Note that the libmount solution is very expensive as it repeats read() -many times (until we get consistent result) if kernel is busy with -mount table modification. This behaviour makes events management in -systemd (or other places) pretty difficult as read mountinfo takes -time on busy systems. - -Addresses: https://github.com/systemd/systemd/pull/16537 -Signed-off-by: Karel Zak ---- - configure.ac | 1 - - libmount/src/mountP.h | 2 - - libmount/src/tab_parse.c | 87 ++++---------------- - libmount/src/utils.c | 166 --------------------------------------- - 4 files changed, 15 insertions(+), 241 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 2d178f3af..1e31ca3e2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -504,7 +504,6 @@ AC_CHECK_FUNCS([ \ - err \ - errx \ - explicit_bzero \ -- fmemopen \ - fsync \ - utimensat \ - getdomainname \ -diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h -index d8ba0abad..ee97c6b4a 100644 ---- a/libmount/src/mountP.h -+++ b/libmount/src/mountP.h -@@ -98,7 +98,6 @@ extern int mnt_valid_tagname(const char *tagname); - extern int append_string(char **a, const char *b); - - extern const char *mnt_statfs_get_fstype(struct statfs *vfs); --extern int is_procfs_fd(int fd); - extern int is_file_empty(const char *name); - - extern int mnt_is_readonly(const char *path) -@@ -124,7 +123,6 @@ extern void mnt_free_filesystems(char **filesystems); - extern char *mnt_get_kernel_cmdline_option(const char *name); - extern int mnt_stat_mountpoint(const char *target, struct stat *st); - extern int mnt_lstat_mountpoint(const char *target, struct stat *st); --extern FILE *mnt_get_procfs_memstream(int fd, char **membuf); - - /* tab.c */ - extern int is_mountinfo(struct libmnt_table *tb); -diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c -index 329987bcb..ac12dce54 100644 ---- a/libmount/src/tab_parse.c -+++ b/libmount/src/tab_parse.c -@@ -694,7 +694,15 @@ static int kernel_fs_postparse(struct libmnt_table *tb, - return rc; - } - --static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) -+/** -+ * mnt_table_parse_stream: -+ * @tb: tab pointer -+ * @f: file stream -+ * @filename: filename used for debug and error messages -+ * -+ * Returns: 0 on success, negative number in case of error. -+ */ -+int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) - { - int rc = -1; - int flags = 0; -@@ -773,40 +781,6 @@ err: - return rc; - } - --/** -- * mnt_table_parse_stream: -- * @tb: tab pointer -- * @f: file stream -- * @filename: filename used for debug and error messages -- * -- * Returns: 0 on success, negative number in case of error. -- */ --int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) --{ -- int fd, rc; -- FILE *memf = NULL; -- char *membuf = NULL; -- -- /* -- * For /proc/#/{mountinfo,mount} we read all file to memory and use it -- * as memory stream. For more details see mnt_read_procfs_file(). -- */ -- if ((fd = fileno(f)) >= 0 -- && (tb->fmt == MNT_FMT_GUESS || -- tb->fmt == MNT_FMT_MOUNTINFO || -- tb->fmt == MNT_FMT_MTAB) -- && is_procfs_fd(fd) -- && (memf = mnt_get_procfs_memstream(fd, &membuf))) { -- -- rc = __table_parse_stream(tb, memf, filename); -- fclose(memf); -- free(membuf); -- } else -- rc = __table_parse_stream(tb, f, filename); -- -- return rc; --} -- - /** - * mnt_table_parse_file: - * @tb: tab pointer -@@ -822,49 +796,18 @@ int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filenam - int mnt_table_parse_file(struct libmnt_table *tb, const char *filename) - { - FILE *f; -- int rc, fd = -1; -+ int rc; - - if (!filename || !tb) - return -EINVAL; - -- /* -- * Try to use read()+poll() to realiably read all -- * /proc/#/{mount,mountinfo} file to memory -- */ -- if (tb->fmt != MNT_FMT_SWAPS -- && strncmp(filename, "/proc/", 6) == 0) { -- -- FILE *memf; -- char *membuf = NULL; -- -- fd = open(filename, O_RDONLY|O_CLOEXEC); -- if (fd < 0) { -- rc = -errno; -- goto done; -- } -- memf = mnt_get_procfs_memstream(fd, &membuf); -- if (memf) { -- rc = __table_parse_stream(tb, memf, filename); -- -- fclose(memf); -- free(membuf); -- close(fd); -- goto done; -- } -- /* else fallback to fopen/fdopen() */ -- } -- -- if (fd >= 0) -- f = fdopen(fd, "r" UL_CLOEXECSTR); -- else -- f = fopen(filename, "r" UL_CLOEXECSTR); -- -+ f = fopen(filename, "r" UL_CLOEXECSTR); - if (f) { -- rc = __table_parse_stream(tb, f, filename); -+ rc = mnt_table_parse_stream(tb, f, filename); - fclose(f); - } else - rc = -errno; --done: -+ - DBG(TAB, ul_debugobj(tb, "parsing done [filename=%s, rc=%d]", filename, rc)); - return rc; - } -@@ -921,7 +864,7 @@ static int __mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname) - - f = fopen_at(dd, d->d_name, O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); - if (f) { -- __table_parse_stream(tb, f, d->d_name); -+ mnt_table_parse_stream(tb, f, d->d_name); - fclose(f); - } - } -@@ -962,7 +905,7 @@ static int __mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname) - f = fopen_at(dirfd(dir), d->d_name, - O_RDONLY|O_CLOEXEC, "r" UL_CLOEXECSTR); - if (f) { -- __table_parse_stream(tb, f, d->d_name); -+ mnt_table_parse_stream(tb, f, d->d_name); - fclose(f); - } - } -diff --git a/libmount/src/utils.c b/libmount/src/utils.c -index 92829ebb0..40b45f11d 100644 ---- a/libmount/src/utils.c -+++ b/libmount/src/utils.c -@@ -19,7 +19,6 @@ - #include - #include - #include --#include - #include - - #include "strutils.h" -@@ -448,13 +447,6 @@ const char *mnt_statfs_get_fstype(struct statfs *vfs) - return NULL; - } - --int is_procfs_fd(int fd) --{ -- struct statfs sfs; -- -- return fstatfs(fd, &sfs) == 0 && sfs.f_type == STATFS_PROC_MAGIC; --} -- - /** - * mnt_match_fstype: - * @type: filesystem type -@@ -1174,164 +1166,7 @@ done: - return 1; - } - --#if defined(HAVE_FMEMOPEN) || defined(TEST_PROGRAM) -- --/* -- * This function tries to minimize possible races when we read -- * /proc/#/{mountinfo,mount} files. -- * -- * The idea is to minimize number of read()s and check by poll() that during -- * the read the mount table has not been modified. If yes, than re-read it -- * (with some limitations to avoid never ending loop). -- * -- * Returns: <0 error, 0 success, 1 too many attempts -- */ --static int read_procfs_file(int fd, char **buf, size_t *bufsiz) --{ -- size_t bufmax = 0; -- int rc = 0, tries = 0, ninters = 0; -- char *bufptr = NULL; -- -- assert(buf); -- assert(bufsiz); -- -- *bufsiz = 0; -- *buf = NULL; -- -- do { -- ssize_t ret; -- -- if (!bufptr || bufmax == *bufsiz) { -- char *tmp; -- -- bufmax = bufmax ? bufmax * 2 : (16 * 1024); -- tmp = realloc(*buf, bufmax); -- if (!tmp) -- break; -- *buf = tmp; -- bufptr = tmp + *bufsiz; -- } -- -- errno = 0; -- ret = read(fd, bufptr, bufmax - *bufsiz); -- -- if (ret < 0) { -- /* error */ -- if ((errno == EAGAIN || errno == EINTR) && (ninters++ < 5)) { -- xusleep(200000); -- continue; -- } -- break; -- -- } if (ret > 0) { -- /* success -- verify no event during read */ -- struct pollfd fds[] = { -- { .fd = fd, .events = POLLPRI } -- }; -- -- rc = poll(fds, 1, 0); -- if (rc < 0) -- break; /* poll() error */ -- if (rc > 0) { -- /* event -- read all again */ -- if (lseek(fd, 0, SEEK_SET) != 0) -- break; -- *bufsiz = 0; -- bufptr = *buf; -- tries++; -- -- if (tries > 10) -- /* busy system? -- wait */ -- xusleep(10000); -- continue; -- } -- -- /* successful read() without active poll() */ -- (*bufsiz) += (size_t) ret; -- bufptr += ret; -- tries = ninters = 0; -- } else { -- /* end-of-file */ -- goto success; -- } -- } while (tries <= 100); -- -- rc = errno ? -errno : 1; -- free(*buf); -- return rc; -- --success: -- return 0; --} -- --/* -- * Create FILE stream for data from read_procfs_file() -- */ --FILE *mnt_get_procfs_memstream(int fd, char **membuf) --{ -- size_t sz = 0; -- off_t cur; -- -- *membuf = NULL; -- -- /* in case of error, rewind to the original position */ -- cur = lseek(fd, 0, SEEK_CUR); -- -- if (read_procfs_file(fd, membuf, &sz) == 0 && sz > 0) { -- FILE *memf = fmemopen(*membuf, sz, "r"); -- if (memf) -- return memf; /* success */ -- -- free(*membuf); -- *membuf = NULL; -- } -- -- /* error */ -- if (cur != (off_t) -1) -- lseek(fd, cur, SEEK_SET); -- return NULL; --} --#else --FILE *mnt_get_procfs_memstream(int fd __attribute((__unused__)), -- char **membuf __attribute((__unused__))) --{ -- return NULL; --} --#endif /* HAVE_FMEMOPEN */ -- -- - #ifdef TEST_PROGRAM --static int test_proc_read(struct libmnt_test *ts, int argc, char *argv[]) --{ -- char *buf = NULL; -- char *filename = argv[1]; -- size_t bufsiz = 0; -- int rc = 0, fd = open(filename, O_RDONLY); -- -- if (fd <= 0) { -- warn("%s: cannot open", filename); -- return -errno; -- } -- -- rc = read_procfs_file(fd, &buf, &bufsiz); -- close(fd); -- -- switch (rc) { -- case 0: -- fwrite(buf, 1, bufsiz, stdout); -- free(buf); -- break; -- case 1: -- warnx("too many attempts"); -- break; -- default: -- warn("%s: cannot read", filename); -- break; -- } -- -- return rc; --} -- - static int test_match_fstype(struct libmnt_test *ts, int argc, char *argv[]) - { - char *type = argv[1]; -@@ -1513,7 +1348,6 @@ int main(int argc, char *argv[]) - { "--guess-root", test_guess_root, "[]" }, - { "--mkdir", test_mkdir, "" }, - { "--statfs-type", test_statfs_type, "" }, -- { "--read-procfs", test_proc_read, "" }, - - { NULL } - }; --- -2.25.4 - diff --git a/sources b/sources index cb31284..d14d216 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.36.2.tar.xz) = 6ab141f44ca4cb6b600081f10eae17e15d23abd122a37eb3ac6c845513a6a4396dc9dcff30b3032de80116ddde50e27dfbc86f92708c1051f84f0c919194664b +SHA512 (util-linux-2.37-rc2.tar.xz) = 9a7f301604c2ae914b8c33f17a22563ec0128e45d7687bf11142d190bb1f51adeff7f392efc27b87ac088c615097ccc270a886a5c912e363f4748b3ed6f5a6ef diff --git a/util-linux.spec b/util-linux.spec index 615585a..15526a9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.36.2 -Release: 3%{?dist} +Version: 2.37 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc2 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -36,6 +36,7 @@ BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool +BuildRequires: rubygem-asciidoctor %ifarch ppc64le BuildRequires: librtas-devel %endif @@ -105,12 +106,9 @@ Requires: libfdisk = %{version}-%{release} ### # 151635 - makeing /var/log/lastlog Patch0: login-lastlog-create.patch -# https://github.com/karelzak/util-linux/commit/57898c3a7ee8fc5933cddd4526bb3980bef85a02 -# The workaround is unnecessary on Fedora with kernel >= 5.8. -Patch1: libmount-remove-read-mountinfo-workaround.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 -Patch2: login-default-motd-file.patch +Patch1: login-default-motd-file.patch %description The util-linux package contains a large variety of low-level system @@ -295,6 +293,8 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --enable-write \ --enable-raw \ --enable-hardlink \ + --enable-fdformat \ + --enable-asciidoc \ --with-python=%{pyver} \ --with-systemd \ --with-udev \ @@ -402,9 +402,9 @@ done %endif # we install getopt-*.{bash,tcsh} by doc directive -chmod 644 misc-utils/getopt-*.{bash,tcsh} -rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* -rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt +#chmod 644 misc-utils/getopt-*.{bash,tcsh} +#rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* +#rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt ln -sf ../proc/self/mounts %{buildroot}/etc/mtab @@ -573,6 +573,7 @@ fi %{_bindir}/setsid %{_bindir}/setterm %{_bindir}/taskset +%{_bindir}/uclampset %{_bindir}/ul %{_bindir}/unshare %{_bindir}/utmpdump @@ -631,6 +632,7 @@ fi %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* %{_mandir}/man1/taskset.1* +%{_mandir}/man1/uclampset.1.* %{_mandir}/man1/ul.1* %{_mandir}/man1/unshare.1* %{_mandir}/man1/utmpdump.1.gz @@ -810,6 +812,7 @@ fi %{compldir}/swapoff %{compldir}/swapon %{compldir}/taskset +%{compldir}/uclampset %{compldir}/ul %{compldir}/unshare %{compldir}/utmpdump @@ -938,6 +941,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri May 14 2021 Karel Zak - 2.37-0.1 +- upgrade to v2.37-rc2 + https://kernel.org/pub/linux/utils/util-linux/v2.37/v2.37-ReleaseNotes + * Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 2.36.2-3 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From b50e3f3a0775402df458a0c0a08411b86271fcb6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 1 Jun 2021 12:23:41 +0200 Subject: [PATCH 316/425] 2.37-1: upgrade, add util-linux-core --- .gitignore | 1 + sources | 2 +- util-linux.spec | 227 ++++++++++++++++++++++++++---------------------- 3 files changed, 127 insertions(+), 103 deletions(-) diff --git a/.gitignore b/.gitignore index 96efde9..ab82158 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ /util-linux-2.36.1.tar.xz /util-linux-2.36.2.tar.xz /util-linux-2.37-rc2.tar.xz +/util-linux-2.37.tar.xz diff --git a/sources b/sources index d14d216..249ef34 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.37-rc2.tar.xz) = 9a7f301604c2ae914b8c33f17a22563ec0128e45d7687bf11142d190bb1f51adeff7f392efc27b87ac088c615097ccc270a886a5c912e363f4748b3ed6f5a6ef +SHA512 (util-linux-2.37.tar.xz) = 84cf1df46165f286caa1a1204b335dc1fc826a8e1d52a817c28eb80ef19734eccd6efdfb078e87ade9e4381a9102e59d4df83e9bb100e4c73aff2aa4bfb85615 diff --git a/util-linux.spec b/util-linux.spec index 15526a9..89ed926 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37 -Release: 0.1%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc2 +%define upstream_version %{version} %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -70,28 +70,15 @@ Provides: eject = 2.1.6 # rfkill has been merged into util-linux v2.31 Obsoletes: rfkill <= 0.5 Provides: rfkill = 0.5 -# hardlink has been merged into util-linux v2.34 -Obsoletes: hardlink <= 1:1.3-9 -Provides: hardlink = 1:1.3-9 # sulogin, utmpdump merged into util-linux v2.22; # last, lastb merged into util-linux v2.24 Conflicts: sysvinit-tools < 2.88-14 -# old versions of e2fsprogs contain fsck, uuidgen -Conflicts: e2fsprogs < 1.41.8-5 # rename from util-linux-ng back to util-linux Obsoletes: util-linux-ng < 2.19 Provides: util-linux-ng = %{version}-%{release} Conflicts: filesystem < 3 -Provides: /bin/dmesg -Provides: /bin/kill -Provides: /bin/more -Provides: /bin/mount -Provides: /bin/umount -Provides: /sbin/blkid -Provides: /sbin/blockdev -Provides: /sbin/findfs -Provides: /sbin/fsck Provides: /sbin/nologin +Provides: /sbin/findfs Requires(post): coreutils Requires: pam >= 1.1.3-7, /etc/pam.d/system-auth @@ -101,6 +88,7 @@ Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: libsmartcols = %{version}-%{release} Requires: libfdisk = %{version}-%{release} +Requires: util-linux-core = %{version}-%{release} ### Ready for upstream? ### @@ -117,6 +105,32 @@ others, Util-linux contains the fdisk configuration tool and the login program. +%package -n util-linux-core +Summary: The most essential utilities from the util-linux suite. +License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain +Provides: /bin/dmesg +Provides: /bin/kill +Provides: /bin/more +Provides: /bin/mount +Provides: /bin/umount +Provides: /sbin/blkid +Provides: /sbin/blockdev +Provides: /sbin/fsck +# hardlink has been merged into util-linux v2.34 +Obsoletes: hardlink <= 1:1.3-9 +Provides: hardlink = 1:1.3-9 +Requires: libuuid = %{version}-%{release} +Requires: libblkid = %{version}-%{release} +Requires: libmount = %{version}-%{release} +Requires: libsmartcols = %{version}-%{release} +# old versions of e2fsprogs contain fsck, uuidgen +Conflicts: e2fsprogs < 1.41.8-5 + +%description -n util-linux-core +This is a very basic set of Linux utilities that is necessary on +minimal installations. + + %package -n libfdisk Summary: Partitioning library for fdisk-like programs. License: LGPLv2+ @@ -429,6 +443,7 @@ 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|uname26)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files + %post # only for minimal buildroots without /var/log [ -d /var/log ] || mkdir -p /var/log @@ -446,6 +461,8 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : fi fi + +%post -n util-linux-core if [ ! -L /etc/mtab ]; then ln -sf ../proc/self/mounts /etc/mtab || : fi @@ -507,44 +524,30 @@ fi %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime -%attr(4755,root,root) %{_bindir}/mount -%attr(4755,root,root) %{_bindir}/umount %attr(4755,root,root) %{_bindir}/su %attr(755,root,root) %{_bindir}/login %attr(2755,root,tty) %{_bindir}/write %ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab %{_unitdir}/fstrim.* %{_bindir}/cal %{_bindir}/chmem %{_bindir}/choom -%{_bindir}/chrt %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column -%{_bindir}/dmesg %{_bindir}/eject %{_bindir}/fallocate %{_bindir}/fincore -%{_bindir}/findmnt -%{_bindir}/flock %{_bindir}/getopt -%{_bindir}/hardlink %{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs %{_bindir}/irqtop %{_bindir}/isosize -%{_bindir}/kill %{_bindir}/last %{_bindir}/lastb -%{_bindir}/logger %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu @@ -556,26 +559,19 @@ fi %{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg -%{_bindir}/more -%{_bindir}/mountpoint %{_bindir}/namei -%{_bindir}/nsenter %{_bindir}/prlimit %{_bindir}/raw %{_bindir}/rename -%{_bindir}/renice %{_bindir}/rev %{_bindir}/script %{_bindir}/scriptlive %{_bindir}/scriptreplay %{_bindir}/setarch %{_bindir}/setpriv -%{_bindir}/setsid %{_bindir}/setterm -%{_bindir}/taskset %{_bindir}/uclampset %{_bindir}/ul -%{_bindir}/unshare %{_bindir}/utmpdump %{_bindir}/uuidgen %{_bindir}/uuidparse @@ -584,28 +580,18 @@ fi %{_bindir}/whereis %{_mandir}/man1/cal.1* %{_mandir}/man1/choom.1* -%{_mandir}/man1/chrt.1* %{_mandir}/man1/col.1* %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* -%{_mandir}/man1/dmesg.1* %{_mandir}/man1/eject.1* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/fincore.1* -%{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* -%{_mandir}/man1/hardlink.1* %{_mandir}/man1/hexdump.1* -%{_mandir}/man1/ionice.1* -%{_mandir}/man1/ipcmk.1* -%{_mandir}/man1/ipcrm.1* -%{_mandir}/man1/ipcs.1* %{_mandir}/man1/irqtop.1* -%{_mandir}/man1/kill.1* %{_mandir}/man1/last.1* %{_mandir}/man1/lastb.1* -%{_mandir}/man1/logger.1* %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* @@ -615,26 +601,19 @@ fi %{_mandir}/man1/lsmem.1* %{_mandir}/man1/mcookie.1* %{_mandir}/man1/mesg.1* -%{_mandir}/man1/more.1* -%{_mandir}/man1/mountpoint.1* %{_mandir}/man1/namei.1* -%{_mandir}/man1/nsenter.1* %{_mandir}/man1/prlimit.1* %{_mandir}/man1/rename.1* -%{_mandir}/man1/renice.1* %{_mandir}/man1/rev.1* %{_mandir}/man1/runuser.1* %{_mandir}/man1/script.1* %{_mandir}/man1/scriptlive.1* %{_mandir}/man1/scriptreplay.1* %{_mandir}/man1/setpriv.1* -%{_mandir}/man1/setsid.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* -%{_mandir}/man1/taskset.1* %{_mandir}/man1/uclampset.1.* %{_mandir}/man1/ul.1* -%{_mandir}/man1/unshare.1* %{_mandir}/man1/utmpdump.1.gz %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/uuidparse.1* @@ -644,36 +623,27 @@ fi %{_mandir}/man5/fstab.5* %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* -%{_mandir}/man8/agetty.8* %{_mandir}/man8/blkdiscard.8* -%{_mandir}/man8/blkid.8* %{_mandir}/man8/blkzone.8* -%{_mandir}/man8/blockdev.8* %{_mandir}/man8/chcpu.8* %{_mandir}/man8/chmem.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/fsck.cramfs.8* %{_mandir}/man8/fsck.minix.8* %{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/fstrim.8* %{_mandir}/man8/isosize.8* %{_mandir}/man8/ldattach.8* -%{_mandir}/man8/losetup.8* %{_mandir}/man8/lsblk.8* %{_mandir}/man8/lslocks.8* %{_mandir}/man8/lsns.8* %{_mandir}/man8/mkfs.8* %{_mandir}/man8/mkfs.cramfs.8* %{_mandir}/man8/mkfs.minix.8* -%{_mandir}/man8/mkswap.8* -%{_mandir}/man8/mount.8* %{_mandir}/man8/nologin.8* -%{_mandir}/man8/partx.8* %{_mandir}/man8/pivot_root.8* %{_mandir}/man8/raw.8* %{_mandir}/man8/rawdevices.8* @@ -684,37 +654,26 @@ fi %{_mandir}/man8/setarch.8* %{_mandir}/man8/sulogin.8.gz %{_mandir}/man8/swaplabel.8* -%{_mandir}/man8/swapoff.8* -%{_mandir}/man8/swapon.8* -%{_mandir}/man8/switch_root.8* -%{_mandir}/man8/umount.8* %{_mandir}/man8/wdctl.8.gz %{_mandir}/man8/wipefs.8* %{_mandir}/man8/zramctl.8* %{_sbindir}/addpart -%{_sbindir}/agetty %{_sbindir}/blkdiscard -%{_sbindir}/blkid %{_sbindir}/blkzone -%{_sbindir}/blockdev %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel %{_sbindir}/delpart %{_sbindir}/fdisk %{_sbindir}/findfs -%{_sbindir}/fsck %{_sbindir}/fsck.cramfs %{_sbindir}/fsck.minix %{_sbindir}/fsfreeze %{_sbindir}/fstrim %{_sbindir}/ldattach -%{_sbindir}/losetup %{_sbindir}/mkfs %{_sbindir}/mkfs.cramfs %{_sbindir}/mkfs.minix -%{_sbindir}/mkswap %{_sbindir}/nologin -%{_sbindir}/partx %{_sbindir}/pivot_root %{_sbindir}/readprofile %{_sbindir}/resizepart @@ -723,53 +682,37 @@ fi %{_sbindir}/runuser %{_sbindir}/sulogin %{_sbindir}/swaplabel -%{_sbindir}/swapoff -%{_sbindir}/swapon -%{_sbindir}/switch_root %{_sbindir}/wipefs %{_sbindir}/zramctl %{compldir}/addpart %{compldir}/blkdiscard -%{compldir}/blkid %{compldir}/blkzone -%{compldir}/blockdev %{compldir}/cal %{compldir}/chcpu %{compldir}/chmem -%{compldir}/chrt %{compldir}/col %{compldir}/colcrt %{compldir}/colrm %{compldir}/column %{compldir}/ctrlaltdel %{compldir}/delpart -%{compldir}/dmesg %{compldir}/eject %{compldir}/fallocate %{compldir}/fdisk %{compldir}/fincore %{compldir}/findfs -%{compldir}/findmnt -%{compldir}/flock -%{compldir}/fsck %{compldir}/fsck.cramfs %{compldir}/fsck.minix %{compldir}/fsfreeze %{compldir}/fstrim %{compldir}/getopt %{compldir}/hexdump -%{compldir}/ionice -%{compldir}/ipcmk -%{compldir}/ipcrm -%{compldir}/ipcs %{compldir}/irqtop %{compldir}/isosize %{compldir}/last %{compldir}/ldattach -%{compldir}/logger %{compldir}/look -%{compldir}/losetup %{compldir}/lsblk %{compldir}/lscpu %{compldir}/lsipc @@ -783,18 +726,12 @@ fi %{compldir}/mkfs %{compldir}/mkfs.cramfs %{compldir}/mkfs.minix -%{compldir}/mkswap -%{compldir}/more -%{compldir}/mountpoint %{compldir}/namei -%{compldir}/nsenter -%{compldir}/partx %{compldir}/pivot_root %{compldir}/prlimit %{compldir}/raw %{compldir}/readprofile %{compldir}/rename -%{compldir}/renice %{compldir}/resizepart %{compldir}/rev %{compldir}/rfkill @@ -805,16 +742,11 @@ fi %{compldir}/scriptreplay %{compldir}/setarch %{compldir}/setpriv -%{compldir}/setsid %{compldir}/setterm %{compldir}/su %{compldir}/swaplabel -%{compldir}/swapoff -%{compldir}/swapon -%{compldir}/taskset %{compldir}/uclampset %{compldir}/ul -%{compldir}/unshare %{compldir}/utmpdump %{compldir}/uuidgen %{compldir}/uuidparse @@ -825,7 +757,6 @@ fi %{compldir}/write %{compldir}/zramctl - %ifnarch s390 s390x %{_sbindir}/clock %{_sbindir}/fdformat @@ -852,6 +783,94 @@ fi %endif +%files -n util-linux-core +%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab +%attr(4755,root,root) %{_bindir}/mount +%attr(4755,root,root) %{_bindir}/umount +%{_bindir}/chrt +%{_bindir}/dmesg +%{_bindir}/findmnt +%{_bindir}/flock +%{_bindir}/hardlink +%{_bindir}/ionice +%{_bindir}/ipcmk +%{_bindir}/ipcrm +%{_bindir}/ipcs +%{_bindir}/kill +%{_bindir}/logger +%{_bindir}/more +%{_bindir}/mountpoint +%{_bindir}/nsenter +%{_bindir}/renice +%{_bindir}/setsid +%{_bindir}/taskset +%{_bindir}/unshare +%{compldir}/blkid +%{compldir}/blockdev +%{compldir}/chrt +%{compldir}/dmesg +%{compldir}/findmnt +%{compldir}/flock +%{compldir}/fsck +%{compldir}/ionice +%{compldir}/ipcmk +%{compldir}/ipcrm +%{compldir}/ipcs +%{compldir}/logger +%{compldir}/losetup +%{compldir}/mkswap +%{compldir}/more +%{compldir}/mountpoint +%{compldir}/nsenter +%{compldir}/partx +%{compldir}/renice +%{compldir}/setsid +%{compldir}/swapoff +%{compldir}/swapon +%{compldir}/taskset +%{compldir}/unshare +%{_mandir}/man1/chrt.1* +%{_mandir}/man1/dmesg.1* +%{_mandir}/man1/flock.1* +%{_mandir}/man1/hardlink.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/more.1* +%{_mandir}/man1/mountpoint.1* +%{_mandir}/man1/nsenter.1* +%{_mandir}/man1/renice.1* +%{_mandir}/man1/setsid.1* +%{_mandir}/man1/taskset.1* +%{_mandir}/man1/unshare.1* +%{_mandir}/man8/agetty.8* +%{_mandir}/man8/blkid.8* +%{_mandir}/man8/blockdev.8* +%{_mandir}/man8/findmnt.8* +%{_mandir}/man8/fsck.8* +%{_mandir}/man8/losetup.8* +%{_mandir}/man8/mkswap.8* +%{_mandir}/man8/mount.8* +%{_mandir}/man8/partx.8* +%{_mandir}/man8/swapoff.8* +%{_mandir}/man8/swapon.8* +%{_mandir}/man8/switch_root.8* +%{_mandir}/man8/umount.8* +%{_sbindir}/agetty +%{_sbindir}/blkid +%{_sbindir}/blockdev +%{_sbindir}/fsck +%{_sbindir}/losetup +%{_sbindir}/mkswap +%{_sbindir}/partx +%{_sbindir}/swapoff +%{_sbindir}/swapon +%{_sbindir}/switch_root + + %files -n util-linux-user %config(noreplace) %{_sysconfdir}/pam.d/chfn %config(noreplace) %{_sysconfdir}/pam.d/chsh @@ -941,6 +960,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Jun 1 2021 Karel Zak - 2.37-1 +- upgrade to v2.37 +- introduce util-linux-core subpackage + * Fri May 14 2021 Karel Zak - 2.37-0.1 - upgrade to v2.37-rc2 https://kernel.org/pub/linux/utils/util-linux/v2.37/v2.37-ReleaseNotes From e86e462be56e6e9392cf98f947b992c0a2d03c96 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 21:19:06 +0200 Subject: [PATCH 317/425] Rebuilt for Python 3.10 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 89ed926..9df0647 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -960,6 +960,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Jun 04 2021 Python Maint - 2.37-2 +- Rebuilt for Python 3.10 + * Tue Jun 1 2021 Karel Zak - 2.37-1 - upgrade to v2.37 - introduce util-linux-core subpackage From cca6bc092d5451821b6bb70dfb2a868d1bb62d20 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jun 2021 11:55:56 +0100 Subject: [PATCH 318/425] Rebuild for updated pcre2 The package fails to install in Rawhide at the moment with: DEBUG util.py:444: Error: DEBUG util.py:444: Problem: package util-linux-2.37-2.fc35.x86_64 requires util-linux-core = 2.37-2.fc35, but none of the providers can be installed DEBUG util.py:444: - conflicting requests DEBUG util.py:444: - nothing provides libpcre2-posix.so.2()(64bit) needed by util-linux-core-2.37-2.fc35.x86_64 This is my attempt to see if I can fix this with a simple rebuild. If not I will file a bug. --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 9df0647..a1f80f5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -960,6 +960,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jun 16 2021 Richard W.M. Jones - 2.37-3 +- Rebuild for updated pcre2 + * Fri Jun 04 2021 Python Maint - 2.37-2 - Rebuilt for Python 3.10 From e7be6ae5f5d5bdb28d802d616b596304b6b3280e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 14 Jul 2021 17:40:22 +0200 Subject: [PATCH 319/425] 2.37-4: fix #1981729 (close_range(), remove raw(8) and PCRE2 use) --- hardlink-remove-pcre2posix.h-support.patch | 49 +++++++++++++++++ login-fix-close_range-use.patch | 62 ++++++++++++++++++++++ util-linux.spec | 41 +++++++------- 3 files changed, 131 insertions(+), 21 deletions(-) create mode 100644 hardlink-remove-pcre2posix.h-support.patch create mode 100644 login-fix-close_range-use.patch diff --git a/hardlink-remove-pcre2posix.h-support.patch b/hardlink-remove-pcre2posix.h-support.patch new file mode 100644 index 0000000..5c2368b --- /dev/null +++ b/hardlink-remove-pcre2posix.h-support.patch @@ -0,0 +1,49 @@ +diff -up util-linux-2.37/configure.ac.kzak util-linux-2.37/configure.ac +--- util-linux-2.37/configure.ac.kzak 2021-06-01 09:50:39.898388178 +0200 ++++ util-linux-2.37/configure.ac 2021-07-14 17:57:45.927112572 +0200 +@@ -1452,14 +1452,6 @@ UL_REQUIRES_HAVE([setpriv], [linux_capab + UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library]) + AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes]) + +-PKG_CHECK_MODULES([PCRE2_POSIX], [libpcre2-posix], +- [have_pcre2_posix=yes], +- [have_pcre2_posix=no]) +-AS_IF([test "x$have_pcre2_posix" = xyes ], [ +- AC_DEFINE([HAVE_PCRE2_POSIX], [1], [Define if libpcre2-posix is available]) +-]) +-AM_CONDITIONAL([HAVE_PCRE2_POSIX], [test "x$have_pcre2_posix" = xyes]) +- + AC_ARG_ENABLE([hardlink], + AS_HELP_STRING([--disable-hardlink], [do not build hardlink]), + [], [UL_DEFAULT_ENABLE([hardlink], [check])] +diff -up util-linux-2.37/misc-utils/hardlink.c.kzak util-linux-2.37/misc-utils/hardlink.c +--- util-linux-2.37/misc-utils/hardlink.c.kzak 2021-05-24 13:39:52.714045529 +0200 ++++ util-linux-2.37/misc-utils/hardlink.c 2021-07-14 17:57:51.910085213 +0200 +@@ -44,14 +44,7 @@ + #include "monotonic.h" + #include "optutils.h" + +-/* Use libpcre2posix if it's available */ +-#ifdef HAVE_PCRE2_POSIX +-# include +-# undef REG_NOSUB +-# define REG_NOSUB 0 /* we do want backreferences in PCRE mode */ +-#else +-# include /* regcomp(), regsearch() */ +-#endif ++#include /* regcomp(), regsearch() */ + + #ifdef HAVE_SYS_XATTR_H + # include /* listxattr, getxattr */ +diff -up util-linux-2.37/misc-utils/Makemodule.am.kzak util-linux-2.37/misc-utils/Makemodule.am +--- util-linux-2.37/misc-utils/Makemodule.am.kzak 2021-05-24 13:39:52.714045529 +0200 ++++ util-linux-2.37/misc-utils/Makemodule.am 2021-07-14 17:57:51.910085213 +0200 +@@ -244,8 +244,4 @@ dist_noinst_DATA += misc-utils/hardlink. + hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c + hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) + hardlink_CFLAGS = $(AM_CFLAGS) +-if HAVE_PCRE2_POSIX +-hardlink_LDADD += $(PCRE2_POSIX_LIBS) +-hardlink_CFLAGS += $(PCRE2_POSIX_CFLAGS) +-endif + endif diff --git a/login-fix-close_range-use.patch b/login-fix-close_range-use.patch new file mode 100644 index 0000000..6972c61 --- /dev/null +++ b/login-fix-close_range-use.patch @@ -0,0 +1,62 @@ +From b8d99a618baffb4fc03cda4c40e29778b6d77ad4 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 14 Jul 2021 17:25:57 +0200 +Subject: [PATCH] login: fix close_range() use + +This new syscall comes with three arguments (see kernel commit +278a5fbaed89dacd04e9d052f4594ffd0e0585de). Not sure why util-linux +assume only two. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1981729 +Signed-off-by: Karel Zak +--- + include/fileutils.h | 4 ++-- + lib/fileutils.c | 2 +- + login-utils/login.c | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include/fileutils.h b/include/fileutils.h +index ad54b952c..f86426b96 100644 +--- a/include/fileutils.h ++++ b/include/fileutils.h +@@ -82,9 +82,9 @@ static inline struct dirent *xreaddir(DIR *dp) + # if defined(SYS_close_range) + # include + # ifndef HAVE_CLOSE_RANGE +-static inline int close_range(unsigned int first, unsigned int last) ++static inline int close_range(unsigned int first, unsigned int last, int flags) + { +- return syscall(SYS_close_range, first, last); ++ return syscall(SYS_close_range, first, last, flags); + } + # endif + # define HAVE_CLOSE_RANGE 1 +diff --git a/lib/fileutils.c b/lib/fileutils.c +index 846b718c9..a979b03ac 100644 +--- a/lib/fileutils.c ++++ b/lib/fileutils.c +@@ -189,7 +189,7 @@ int main(int argc, char *argv[]) + ignore_result( dup(STDIN_FILENO) ); + + # ifdef HAVE_CLOSE_RANGE +- close_range(STDERR_FILENO + 1, ~0U); ++ close_range(STDERR_FILENO + 1, ~0U, 0); + # else + ul_close_all_fds(STDERR_FILENO + 1, ~0U); + # endif +diff --git a/login-utils/login.c b/login-utils/login.c +index 48e3fa2e2..d926466d3 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -1357,7 +1357,7 @@ static void initialize(int argc, char **argv, struct login_context *cxt) + #endif + } + #ifdef HAVE_CLOSE_RANGE +- close_range(STDERR_FILENO + 1, ~0U); ++ close_range(STDERR_FILENO + 1, ~0U, 0); + #else + ul_close_all_fds(STDERR_FILENO + 1, ~0U); + #endif +-- +2.31.1 + diff --git a/util-linux.spec b/util-linux.spec index a1f80f5..b35590d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -31,11 +31,11 @@ BuildRequires: systemd Buildrequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel -BuildRequires: pcre2-devel BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool +BuildRequires: bison BuildRequires: rubygem-asciidoctor %ifarch ppc64le BuildRequires: librtas-devel @@ -98,6 +98,14 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +### Upstream patches (remove ./autogen.sh call from build section when remove +### these patches) +### +# 1981729 - close_range() +Patch2: login-fix-close_range-use.patch +# Remove dependence on POSIX PCRE2 +Patch3: hardlink-remove-pcre2posix.h-support.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -292,6 +300,10 @@ chfn and chsh utilities with dependence on libuser %build unset LINGUAS || : +# unfortunately, we did changes to build-system +./autogen.sh + + export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -305,7 +317,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --enable-chfn-chsh \ --enable-usrdir-path \ --enable-write \ - --enable-raw \ + --disable-raw \ --enable-hardlink \ --enable-fdformat \ --enable-asciidoc \ @@ -343,19 +355,6 @@ chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog # install util-linux %make_install -# raw -echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 -{ - # see RH bugzilla #216664 - mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/udev/rules.d - pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/udev/rules.d - install -m 644 %{SOURCE4} ./60-raw.rules - popd -} - -# sbin -> bin -mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw - # And a dirs uuidd needs that the makefiles don't create install -d ${RPM_BUILD_ROOT}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid @@ -520,7 +519,6 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/pam.d/runuser %config(noreplace) %{_sysconfdir}/pam.d/runuser-l -%config(noreplace) %{_prefix}/lib/udev/rules.d/60-raw.rules %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime @@ -561,7 +559,6 @@ fi %{_bindir}/mesg %{_bindir}/namei %{_bindir}/prlimit -%{_bindir}/raw %{_bindir}/rename %{_bindir}/rev %{_bindir}/script @@ -645,8 +642,6 @@ fi %{_mandir}/man8/mkfs.minix.8* %{_mandir}/man8/nologin.8* %{_mandir}/man8/pivot_root.8* -%{_mandir}/man8/raw.8* -%{_mandir}/man8/rawdevices.8* %{_mandir}/man8/readprofile.8* %{_mandir}/man8/resizepart.8* %{_mandir}/man8/rfkill.8* @@ -729,7 +724,6 @@ fi %{compldir}/namei %{compldir}/pivot_root %{compldir}/prlimit -%{compldir}/raw %{compldir}/readprofile %{compldir}/rename %{compldir}/resizepart @@ -960,6 +954,11 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jul 14 2021 Karel Zak - 2.37-4 +- disable raw(8) - no more supported since Linux v5.14 (commit 03e4922f1c81fc2ed3a87b4f91a8d3aafc7e093) +- remove dependence on deprecated pcre2posix.h +- fix #1981729 - close_range() 3rd argument + * Wed Jun 16 2021 Richard W.M. Jones - 2.37-3 - Rebuild for updated pcre2 From 31097faf0c14a18abb7de526cc00a73a0c541ebd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 14 Jul 2021 18:20:13 +0200 Subject: [PATCH 320/425] 2.37-5: remove util-linux-60-raw.rules --- util-linux-60-raw.rules | 8 -------- util-linux.spec | 6 ++++-- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 util-linux-60-raw.rules diff --git a/util-linux-60-raw.rules b/util-linux-60-raw.rules deleted file mode 100644 index abbf79d..0000000 --- a/util-linux-60-raw.rules +++ /dev/null @@ -1,8 +0,0 @@ -# -# Enter raw device bindings here. -# -# An example would be: -# ACTION=="add", KERNEL=="sda", RUN+="/usr/bin/raw /dev/raw/raw1 %N" -# to bind /dev/raw/raw1 to /dev/sda, or -# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/usr/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.spec b/util-linux.spec index b35590d..5f966e2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -52,7 +52,6 @@ Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/ut Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd -Source4: util-linux-60-raw.rules Source5: adjtime Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd @@ -954,6 +953,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Jul 14 2021 Karel Zak - 2.37-5 +- remove unused util-linux-60-raw.rules + * Wed Jul 14 2021 Karel Zak - 2.37-4 - disable raw(8) - no more supported since Linux v5.14 (commit 03e4922f1c81fc2ed3a87b4f91a8d3aafc7e093) - remove dependence on deprecated pcre2posix.h From f9f53d46a264d8d5dfc4fdeca12cfd30d9687ea4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:13:49 +0000 Subject: [PATCH 321/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 5f966e2..f663829 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -953,6 +953,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.37-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jul 14 2021 Karel Zak - 2.37-5 - remove unused util-linux-60-raw.rules From 2abaf6eb96a5184981f2c45403db41816398f5b6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 17 Aug 2021 10:43:34 +0200 Subject: [PATCH 322/425] 2.37.2-1: upgrade --- .gitignore | 1 + hardlink-remove-pcre2posix.h-support.patch | 49 ----------------- login-fix-close_range-use.patch | 62 ---------------------- sources | 2 +- util-linux.spec | 16 +++--- 5 files changed, 8 insertions(+), 122 deletions(-) delete mode 100644 hardlink-remove-pcre2posix.h-support.patch delete mode 100644 login-fix-close_range-use.patch diff --git a/.gitignore b/.gitignore index ab82158..720d157 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ /util-linux-2.36.2.tar.xz /util-linux-2.37-rc2.tar.xz /util-linux-2.37.tar.xz +/util-linux-2.37.2.tar.xz diff --git a/hardlink-remove-pcre2posix.h-support.patch b/hardlink-remove-pcre2posix.h-support.patch deleted file mode 100644 index 5c2368b..0000000 --- a/hardlink-remove-pcre2posix.h-support.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up util-linux-2.37/configure.ac.kzak util-linux-2.37/configure.ac ---- util-linux-2.37/configure.ac.kzak 2021-06-01 09:50:39.898388178 +0200 -+++ util-linux-2.37/configure.ac 2021-07-14 17:57:45.927112572 +0200 -@@ -1452,14 +1452,6 @@ UL_REQUIRES_HAVE([setpriv], [linux_capab - UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library]) - AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes]) - --PKG_CHECK_MODULES([PCRE2_POSIX], [libpcre2-posix], -- [have_pcre2_posix=yes], -- [have_pcre2_posix=no]) --AS_IF([test "x$have_pcre2_posix" = xyes ], [ -- AC_DEFINE([HAVE_PCRE2_POSIX], [1], [Define if libpcre2-posix is available]) --]) --AM_CONDITIONAL([HAVE_PCRE2_POSIX], [test "x$have_pcre2_posix" = xyes]) -- - AC_ARG_ENABLE([hardlink], - AS_HELP_STRING([--disable-hardlink], [do not build hardlink]), - [], [UL_DEFAULT_ENABLE([hardlink], [check])] -diff -up util-linux-2.37/misc-utils/hardlink.c.kzak util-linux-2.37/misc-utils/hardlink.c ---- util-linux-2.37/misc-utils/hardlink.c.kzak 2021-05-24 13:39:52.714045529 +0200 -+++ util-linux-2.37/misc-utils/hardlink.c 2021-07-14 17:57:51.910085213 +0200 -@@ -44,14 +44,7 @@ - #include "monotonic.h" - #include "optutils.h" - --/* Use libpcre2posix if it's available */ --#ifdef HAVE_PCRE2_POSIX --# include --# undef REG_NOSUB --# define REG_NOSUB 0 /* we do want backreferences in PCRE mode */ --#else --# include /* regcomp(), regsearch() */ --#endif -+#include /* regcomp(), regsearch() */ - - #ifdef HAVE_SYS_XATTR_H - # include /* listxattr, getxattr */ -diff -up util-linux-2.37/misc-utils/Makemodule.am.kzak util-linux-2.37/misc-utils/Makemodule.am ---- util-linux-2.37/misc-utils/Makemodule.am.kzak 2021-05-24 13:39:52.714045529 +0200 -+++ util-linux-2.37/misc-utils/Makemodule.am 2021-07-14 17:57:51.910085213 +0200 -@@ -244,8 +244,4 @@ dist_noinst_DATA += misc-utils/hardlink. - hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c - hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) - hardlink_CFLAGS = $(AM_CFLAGS) --if HAVE_PCRE2_POSIX --hardlink_LDADD += $(PCRE2_POSIX_LIBS) --hardlink_CFLAGS += $(PCRE2_POSIX_CFLAGS) --endif - endif diff --git a/login-fix-close_range-use.patch b/login-fix-close_range-use.patch deleted file mode 100644 index 6972c61..0000000 --- a/login-fix-close_range-use.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b8d99a618baffb4fc03cda4c40e29778b6d77ad4 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 14 Jul 2021 17:25:57 +0200 -Subject: [PATCH] login: fix close_range() use - -This new syscall comes with three arguments (see kernel commit -278a5fbaed89dacd04e9d052f4594ffd0e0585de). Not sure why util-linux -assume only two. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1981729 -Signed-off-by: Karel Zak ---- - include/fileutils.h | 4 ++-- - lib/fileutils.c | 2 +- - login-utils/login.c | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/fileutils.h b/include/fileutils.h -index ad54b952c..f86426b96 100644 ---- a/include/fileutils.h -+++ b/include/fileutils.h -@@ -82,9 +82,9 @@ static inline struct dirent *xreaddir(DIR *dp) - # if defined(SYS_close_range) - # include - # ifndef HAVE_CLOSE_RANGE --static inline int close_range(unsigned int first, unsigned int last) -+static inline int close_range(unsigned int first, unsigned int last, int flags) - { -- return syscall(SYS_close_range, first, last); -+ return syscall(SYS_close_range, first, last, flags); - } - # endif - # define HAVE_CLOSE_RANGE 1 -diff --git a/lib/fileutils.c b/lib/fileutils.c -index 846b718c9..a979b03ac 100644 ---- a/lib/fileutils.c -+++ b/lib/fileutils.c -@@ -189,7 +189,7 @@ int main(int argc, char *argv[]) - ignore_result( dup(STDIN_FILENO) ); - - # ifdef HAVE_CLOSE_RANGE -- close_range(STDERR_FILENO + 1, ~0U); -+ close_range(STDERR_FILENO + 1, ~0U, 0); - # else - ul_close_all_fds(STDERR_FILENO + 1, ~0U); - # endif -diff --git a/login-utils/login.c b/login-utils/login.c -index 48e3fa2e2..d926466d3 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -1357,7 +1357,7 @@ static void initialize(int argc, char **argv, struct login_context *cxt) - #endif - } - #ifdef HAVE_CLOSE_RANGE -- close_range(STDERR_FILENO + 1, ~0U); -+ close_range(STDERR_FILENO + 1, ~0U, 0); - #else - ul_close_all_fds(STDERR_FILENO + 1, ~0U); - #endif --- -2.31.1 - diff --git a/sources b/sources index 249ef34..92733ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.37.tar.xz) = 84cf1df46165f286caa1a1204b335dc1fc826a8e1d52a817c28eb80ef19734eccd6efdfb078e87ade9e4381a9102e59d4df83e9bb100e4c73aff2aa4bfb85615 +SHA512 (util-linux-2.37.2.tar.xz) = 38f0fe820445e3bfa79550e6581c230f98c7661566ccc4daa51c7208a5f972c61b4e57dfc86bed074fdbc7c40bc79f856be8f6a05a8860c1c0cecc4208e8b81d diff --git a/util-linux.spec b/util-linux.spec index f663829..7b57def 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.37 -Release: 6%{?dist} +Version: 2.37.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -97,14 +97,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -### Upstream patches (remove ./autogen.sh call from build section when remove -### these patches) -### -# 1981729 - close_range() -Patch2: login-fix-close_range-use.patch -# Remove dependence on POSIX PCRE2 -Patch3: hardlink-remove-pcre2posix.h-support.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -804,6 +796,7 @@ fi %{compldir}/dmesg %{compldir}/findmnt %{compldir}/flock +%{compldir}/hardlink %{compldir}/fsck %{compldir}/ionice %{compldir}/ipcmk @@ -953,6 +946,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Aug 17 2021 Karel Zak - 2.37.2-1 +* upgrade to v2.37.2 + * Fri Jul 23 2021 Fedora Release Engineering - 2.37-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From b3ca809df8ef1ae8c94eb5f192cd7bf243ebf406 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:42:53 +0000 Subject: [PATCH 323/425] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 7b57def..01350e5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.37.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -946,6 +946,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 2.37.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Aug 17 2021 Karel Zak - 2.37.2-1 * upgrade to v2.37.2 From 93b5e7b623ce2adb59ac54989c8454ae776c4a90 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 31 Jan 2022 16:22:25 +0100 Subject: [PATCH 324/425] 2.38-0.1: upgrade to v2.38-rc1 --- util-linux.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 01350e5..a684802 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.37.2 -Release: 2%{?dist} +Version: 2.38 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version} +%define upstream_version %{version}-rc1 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -540,6 +540,7 @@ fi %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lsfd %{_bindir}/lsipc %{_bindir}/lsirq %{_bindir}/lslocks @@ -583,6 +584,7 @@ fi %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* +%{_mandir}/man1/lsfd.1* %{_mandir}/man1/lsipc.1* %{_mandir}/man1/lsirq.1* %{_mandir}/man1/lslogins.1* @@ -697,6 +699,7 @@ fi %{compldir}/irqtop %{compldir}/isosize %{compldir}/last +%{compldir}/lastb %{compldir}/ldattach %{compldir}/look %{compldir}/lsblk @@ -946,6 +949,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Jan 31 2022 Karel Zak - 2.38-0.1 +- upgrade to v2.38-rc1 + * Sat Jan 22 2022 Fedora Release Engineering - 2.37.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From f55af7b31ab6b4777f7d6d4e8a07545e3eac6037 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 31 Jan 2022 16:32:09 +0100 Subject: [PATCH 325/425] add v2.38-rc1 sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 720d157..648a0ae 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ /util-linux-2.37-rc2.tar.xz /util-linux-2.37.tar.xz /util-linux-2.37.2.tar.xz +/util-linux-2.38-rc1.tar.xz diff --git a/sources b/sources index 92733ce..7fbce13 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.37.2.tar.xz) = 38f0fe820445e3bfa79550e6581c230f98c7661566ccc4daa51c7208a5f972c61b4e57dfc86bed074fdbc7c40bc79f856be8f6a05a8860c1c0cecc4208e8b81d +SHA512 (util-linux-2.38-rc1.tar.xz) = bffcf794c633c927dd61a9813fc43cbbf996a08c788a63c754d745c9eadbe23abc161db25d4126e63422b694d73480f88e0d960b065d529190192f3b98690868 From f9a78e1defdb696b2572b808616f01c97090403e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 2 Feb 2022 11:23:26 +0100 Subject: [PATCH 326/425] 2.38-0.2: Release ownership of /var/log/lastlog /var/log directory is provided by filesystem package, no need to create it. And systemd >= 235 will create /var/log/lastlog owned by utmp. So release ownership of the file, and let systemd manage it. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1798685. Similar change in setup: https://pagure.io/setup/pull-request/30. --- util-linux.spec | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index a684802..91aa4dd 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -339,9 +339,6 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} 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}/var/log -touch ${RPM_BUILD_ROOT}/var/log/lastlog -chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog # install util-linux %make_install @@ -434,24 +431,6 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%post -# only for minimal buildroots without /var/log -[ -d /var/log ] || mkdir -p /var/log -touch /var/log/lastlog -chown root:root /var/log/lastlog -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 - %post -n util-linux-core if [ ! -L /etc/mtab ]; then ln -sf ../proc/self/mounts /etc/mtab || : @@ -517,8 +496,6 @@ fi %attr(755,root,root) %{_bindir}/login %attr(2755,root,tty) %{_bindir}/write -%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog - %{_unitdir}/fstrim.* %{_bindir}/cal @@ -949,6 +926,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Feb 2 2022 Karel Zak - 2.38-0.2 +- release ownership of /var/log/lastlog + * Mon Jan 31 2022 Karel Zak - 2.38-0.1 - upgrade to v2.38-rc1 From 5abc3df64a2abe48fddf67868f727bf3b7abe0af Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 2 Feb 2022 12:23:05 +0100 Subject: [PATCH 327/425] 2.38-0.3: add /usr/lib/tmpfiles.d/uuidd.conf --- util-linux.spec | 9 ++++++++- uuidd-tmpfiles.conf | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 uuidd-tmpfiles.conf diff --git a/util-linux.spec b/util-linux.spec index 91aa4dd..7d68c42 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -52,6 +52,7 @@ Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/ut Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd +Source4: uuidd-tmpfiles.conf Source5: adjtime Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd @@ -339,11 +340,13 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} 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}/usr/lib/tmpfiles.d # install util-linux %make_install # And a dirs uuidd needs that the makefiles don't create +install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/uuidd.conf install -d ${RPM_BUILD_ROOT}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid @@ -856,6 +859,7 @@ fi %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd +/usr/lib/tmpfiles.d/uuidd.conf %files -n libfdisk @@ -926,6 +930,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Feb 2 2022 Karel Zak - 2.38-0.3 +- add /usr/lib/tmpfiles.d/uuidd.conf (based on #2047952) + * Wed Feb 2 2022 Karel Zak - 2.38-0.2 - release ownership of /var/log/lastlog diff --git a/uuidd-tmpfiles.conf b/uuidd-tmpfiles.conf new file mode 100644 index 0000000..4158c7d --- /dev/null +++ b/uuidd-tmpfiles.conf @@ -0,0 +1 @@ +d /run/uuidd 2775 uuidd uuidd From f3b1a651770050268069c708fc6456593db93c54 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Mar 2022 09:54:43 +0100 Subject: [PATCH 328/425] 2.38-rc3: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 648a0ae..8d82a3c 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ /util-linux-2.37.tar.xz /util-linux-2.37.2.tar.xz /util-linux-2.38-rc1.tar.xz +/util-linux-2.38-rc3.tar.xz diff --git a/sources b/sources index 7fbce13..376b738 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.38-rc1.tar.xz) = bffcf794c633c927dd61a9813fc43cbbf996a08c788a63c754d745c9eadbe23abc161db25d4126e63422b694d73480f88e0d960b065d529190192f3b98690868 +SHA512 (util-linux-2.38-rc3.tar.xz) = b30d95afb829239320e6a7b586cf87e237aff5ddb254c01c4d525c298dd59b5850bea4abcd59b2a4f5a2300b7f84545b2ee8cd16375221abacc388a7f101dfcf diff --git a/util-linux.spec b/util-linux.spec index 7d68c42..587351b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc1 +%define upstream_version %{version}-rc3 %define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %define compldir %{_datadir}/bash-completion/completions/ @@ -930,6 +930,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Mar 16 2022 Karel Zak - 2.38-0.4 +- upgrade to v2.38-rc3 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38-ReleaseNotes + * Wed Feb 2 2022 Karel Zak - 2.38-0.3 - add /usr/lib/tmpfiles.d/uuidd.conf (based on #2047952) From c409cb50738333d0160f26833662b2679d24feae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 17 Feb 2022 13:52:25 +0100 Subject: [PATCH 329/425] Drop very old upgrade scriptlet for libblkid It was there in the initial commit in 2011, but it looks like it is older than that. --- util-linux.spec | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 587351b..98799a7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -196,7 +196,6 @@ Summary: Block device ID library License: LGPLv2+ Requires: libuuid%{?_isa} = %{version}-%{release} Conflicts: filesystem < 3 -Requires(post): coreutils %description -n libblkid This is block device identification library, part of util-linux. @@ -439,17 +438,6 @@ if [ ! -L /etc/mtab ]; then ln -sf ../proc/self/mounts /etc/mtab || : fi -%post -n libblkid -### Move blkid cache to /run -[ -d /run/blkid ] || mkdir -p /run/blkid -for I in /etc/blkid.tab /etc/blkid.tab.old \ - /etc/blkid/blkid.tab /etc/blkid/blkid.tab.old; do - - if [ -f "$I" ]; then - mv "$I" /run/blkid/ || : - fi -done - %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -930,6 +918,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Feb 17 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-0.5 +- Drop very old upgrade scriptlet for libblkid + * Wed Mar 16 2022 Karel Zak - 2.38-0.4 - upgrade to v2.38-rc3 https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38-ReleaseNotes From 3b965f951dd4902091378fe5b34db4877151a41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 17 Feb 2022 14:02:53 +0100 Subject: [PATCH 330/425] Modernize style Guidelines say %global should be used instead of %define. Also drop periods from Summary, add them to %description. %__sed and friends are deprecated. --- util-linux.spec | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 98799a7..85c482d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -7,13 +7,13 @@ License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%define upstream_version %{version}-rc3 -%define upstream_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') +%global upstream_version %{version}-rc3 +%global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') -%define compldir %{_datadir}/bash-completion/completions/ +%global compldir %{_datadir}/bash-completion/completions/ -%define pypkg python3 -%define pyver 3 +%global pypkg python3 +%global pyver 3 ### Dependencies BuildRequires: make @@ -26,9 +26,9 @@ BuildRequires: pam-devel BuildRequires: zlib-devel BuildRequires: popt-devel BuildRequires: libutempter-devel -Buildrequires: systemd-devel +BuildRequires: systemd-devel BuildRequires: systemd -Buildrequires: libuser-devel +BuildRequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel BuildRequires: gcc @@ -101,12 +101,12 @@ Patch1: login-default-motd-file.patch %description The util-linux 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 +others, util-linux contains the fdisk configuration tool and the login program. %package -n util-linux-core -Summary: The most essential utilities from the util-linux suite. +Summary: The most essential utilities from the util-linux suite License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Provides: /bin/dmesg Provides: /bin/kill @@ -132,7 +132,7 @@ minimal installations. %package -n libfdisk -Summary: Partitioning library for fdisk-like programs. +Summary: Partitioning library for fdisk-like programs License: LGPLv2+ %description -n libfdisk @@ -140,7 +140,7 @@ This is library for fdisk-like programs, part of util-linux. %package -n libfdisk-devel -Summary: Partitioning library for fdisk-like programs. +Summary: Partitioning library for fdisk-like programs License: LGPLv2+ Requires: libfdisk%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -151,7 +151,7 @@ part of util-linux. %package -n libsmartcols -Summary: Formatting library for ls-like programs. +Summary: Formatting library for ls-like programs License: LGPLv2+ %description -n libsmartcols @@ -159,7 +159,7 @@ This is library for ls-like terminal programs, part of util-linux. %package -n libsmartcols-devel -Summary: Formatting library for ls-like programs. +Summary: Formatting library for ls-like programs License: LGPLv2+ Requires: libsmartcols%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -277,12 +277,12 @@ mountinfo, etc) and mount filesystems. %package -n util-linux-user -Summary: libuser based util-linux utilities +Summary: util-linux utilities based on libuser Requires: util-linux = %{version}-%{release} License: GPLv2 %description -n util-linux-user -chfn and chsh utilities with dependence on libuser +chfn and chsh utilities with dependence on libuser. %prep From 6578411a87f61693a3d87aca79599613f4ef20f1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 30 Mar 2022 13:15:41 +0200 Subject: [PATCH 331/425] 2.38-1: upgrade, spec file cleanup --- .gitignore | 1 + sources | 2 +- util-linux.spec | 17 +++++++++-------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 8d82a3c..7ff827f 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ /util-linux-2.37.2.tar.xz /util-linux-2.38-rc1.tar.xz /util-linux-2.38-rc3.tar.xz +/util-linux-2.38.tar.xz diff --git a/sources b/sources index 376b738..ab8cbd7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.38-rc3.tar.xz) = b30d95afb829239320e6a7b586cf87e237aff5ddb254c01c4d525c298dd59b5850bea4abcd59b2a4f5a2300b7f84545b2ee8cd16375221abacc388a7f101dfcf +SHA512 (util-linux-2.38.tar.xz) = d0f7888f457592067938e216695871ce6475a45d83a092cc3fd72b8cf8fca145ca5f3a99122f1744ef60b4f773055cf4e178dc6c59cd30837172aee0b5597e8c diff --git a/util-linux.spec b/util-linux.spec index 85c482d..2dc911e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 0.5%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version}-rc3 +%global upstream_version %{version} %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -32,10 +32,6 @@ BuildRequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel BuildRequires: gcc -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: bison BuildRequires: rubygem-asciidoctor %ifarch ppc64le BuildRequires: librtas-devel @@ -291,8 +287,8 @@ chfn and chsh utilities with dependence on libuser. %build unset LINGUAS || : -# unfortunately, we did changes to build-system -./autogen.sh +# enable only when make a change to the build-system +#./autogen.sh export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" @@ -918,6 +914,11 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Mar 30 2022 Karel Zak - 2.38-1 +- upgrade to v2.38 +- don't (re)generate build-system +- modernize spec file style (thanks to Zbigniew) + * Thu Feb 17 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-0.5 - Drop very old upgrade scriptlet for libblkid From 6c5649c0b67e7349a88ecb2ac111abf5bcf37151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 17 Feb 2022 13:58:21 +0100 Subject: [PATCH 332/425] Simplify creation of /etc/mtab symlink It was created unconditionally in %post, so the original contents (if any) were overwritten. Listing is as %config was just misleading. Let's simply list the symlink as normal contents in the rpm, so that rpm can install the symlink for us. (The scriplet was missing a dependency on coreutils for ln, but let's not add that if we can drop the whole thing.) [kzak@redhat.com: - add %changelog entry] --- util-linux.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 2dc911e..47621d5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -429,11 +429,6 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%post -n util-linux-core -if [ ! -L /etc/mtab ]; then - ln -sf ../proc/self/mounts /etc/mtab || : -fi - %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -736,7 +731,6 @@ fi %files -n util-linux-core -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount %{_bindir}/chrt @@ -822,6 +816,7 @@ fi %{_sbindir}/swapoff %{_sbindir}/swapon %{_sbindir}/switch_root +/etc/mtab %files -n util-linux-user @@ -914,6 +909,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Mar 30 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-2 +- simplify creation of /etc/mtab symlink + * Wed Mar 30 2022 Karel Zak - 2.38-1 - upgrade to v2.38 - don't (re)generate build-system From 1f18765a680e68983a48da2d62eddb15062f9e80 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 13 Apr 2022 20:47:23 +0200 Subject: [PATCH 333/425] 2.38-3: fix changelog --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 47621d5..25de347 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -909,6 +909,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Apr 13 2022 Karel Zak - 2.38-3 +- fix spec file changelog order + * Wed Mar 30 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-2 - simplify creation of /etc/mtab symlink @@ -917,7 +920,7 @@ fi - don't (re)generate build-system - modernize spec file style (thanks to Zbigniew) -* Thu Feb 17 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-0.5 +* Thu Mar 17 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-0.5 - Drop very old upgrade scriptlet for libblkid * Wed Mar 16 2022 Karel Zak - 2.38-0.4 From f64c45563015d5ed8b512e58477db4201f336eeb Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 15:08:44 +0200 Subject: [PATCH 334/425] Rebuilt for Python 3.11 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 25de347..3396bab 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -909,6 +909,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Jun 13 2022 Python Maint - 2.38-4 +- Rebuilt for Python 3.11 + * Wed Apr 13 2022 Karel Zak - 2.38-3 - fix spec file changelog order From dd1f0e5a8273f50e35582b21f16e423b2da75c9c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:35:51 +0000 Subject: [PATCH 335/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 3396bab..1958f0e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -909,6 +909,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 2.38-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 2.38-4 - Rebuilt for Python 3.11 From c96992b25e6492579bd8aa62361f5e63267a0f56 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 4 Aug 2022 16:04:00 +0200 Subject: [PATCH 336/425] 2.38.1-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7ff827f..5272f49 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,4 @@ /util-linux-2.38-rc1.tar.xz /util-linux-2.38-rc3.tar.xz /util-linux-2.38.tar.xz +/util-linux-2.38.1.tar.xz diff --git a/sources b/sources index ab8cbd7..319cfac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.38.tar.xz) = d0f7888f457592067938e216695871ce6475a45d83a092cc3fd72b8cf8fca145ca5f3a99122f1744ef60b4f773055cf4e178dc6c59cd30837172aee0b5597e8c +SHA512 (util-linux-2.38.1.tar.xz) = 07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957 diff --git a/util-linux.spec b/util-linux.spec index 1958f0e..5e64215 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.38 -Release: 5%{?dist} +Version: 2.38.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -909,6 +909,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Thu Aug 4 2022 Karel Zak - 2.38.1-1 +- upgrade to v2.38.1 + https://kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes + * Sat Jul 23 2022 Fedora Release Engineering - 2.38-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 260ccc24c5fa4ef11a4b6e1275d45c59ae2096f7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 22 Aug 2022 12:00:27 +0200 Subject: [PATCH 337/425] 2.38.1-2: improve tmpfiles.d use --- util-linux.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 5e64215..8f1af25 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -335,13 +335,13 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} 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}/usr/lib/tmpfiles.d +mkdir -p ${RPM_BUILD_ROOT}%{_tmpfilesdir}/tmpfiles.d # install util-linux %make_install # And a dirs uuidd needs that the makefiles don't create -install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/uuidd.conf +install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_tmpfilesdir}/uuidd.conf install -d ${RPM_BUILD_ROOT}/run/uuidd install -d ${RPM_BUILD_ROOT}/var/lib/libuuid @@ -838,7 +838,7 @@ fi %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd -/usr/lib/tmpfiles.d/uuidd.conf +%{_tmpfilesdir}/uuidd.conf %files -n libfdisk @@ -909,6 +909,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Aug 22 2022 Karel Zak - 2.38.1-2 +- improve tmpfiles.d use in spec file + * Thu Aug 4 2022 Karel Zak - 2.38.1-1 - upgrade to v2.38.1 https://kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes From d65ce0b32ca8b7daf63088006c0231cac348c097 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 17 Dec 2022 21:40:37 +0100 Subject: [PATCH 338/425] Backport upstream patch to fix C99 issue in kill It is again necessary to run autotools during the build. Related to: --- util-linux-kill-c99.patch | 46 +++++++++++++++++++++++++++++++++++++++ util-linux.spec | 16 +++++++++----- 2 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 util-linux-kill-c99.patch diff --git a/util-linux-kill-c99.patch b/util-linux-kill-c99.patch new file mode 100644 index 0000000..7e02ab1 --- /dev/null +++ b/util-linux-kill-c99.patch @@ -0,0 +1,46 @@ +commit 84732a8849a08d42a9a95dcbee9005116be78eb8 +Author: Khem Raj +Date: Sun Aug 7 14:39:19 2022 -0700 + + check for sys/pidfd.h + + This header in newer glibc defines the signatures of functions + pidfd_send_signal() and pidfd_open() and when these functions are + defined by libc then we need to include the relevant header to get + the definitions. Clang 15+ has started to error out when function + signatures are missing. + + Fixes errors like + misc-utils/kill.c:402:6: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + if (pidfd_send_signal(pfd, ctl->numsig, &info, 0) < 0) + + Signed-off-by: Khem Raj + +diff --git a/configure.ac b/configure.ac +index d8b4d475103c2bab..4a35d17f81375c29 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -339,6 +339,7 @@ AC_CHECK_HEADERS([ \ + sys/mkdev.h \ + sys/mount.h \ + sys/param.h \ ++ sys/pidfd.h \ + sys/prctl.h \ + sys/resource.h \ + sys/sendfile.h \ +diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h +index eddede9767478be2..d9e33cbc57ae38c8 100644 +--- a/include/pidfd-utils.h ++++ b/include/pidfd-utils.h +@@ -4,8 +4,10 @@ + #ifdef HAVE_SYS_SYSCALL_H + # include + # if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open) ++# ifdef HAVE_SYS_PIDFD_H ++# include ++# endif + # include +- + # ifndef HAVE_PIDFD_SEND_SIGNAL + static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, + unsigned int flags) diff --git a/util-linux.spec b/util-linux.spec index 8f1af25..01eaff2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -38,10 +38,10 @@ BuildRequires: librtas-devel %endif # enable if make changes to build-system -#BuildRequires: autoconf -#BuildRequires: automake -#BuildRequires: libtool -#BuildRequires: bison +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: bison ### Sources Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz @@ -93,6 +93,7 @@ Patch0: login-lastlog-create.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +Patch2: util-linux-kill-c99.patch %description The util-linux package contains a large variety of low-level system @@ -288,7 +289,7 @@ chfn and chsh utilities with dependence on libuser. unset LINGUAS || : # enable only when make a change to the build-system -#./autogen.sh +./autogen.sh export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" @@ -909,6 +910,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Sat Dec 17 2022 Florian Weimer - 2.38.1-3 +- Backport upstream patch to fix C99 issue in kill + * Mon Aug 22 2022 Karel Zak - 2.38.1-2 - improve tmpfiles.d use in spec file From a04c11370c4ffda3206a0d8d99dadd795f039011 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:01:31 +0000 Subject: [PATCH 339/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 01eaff2..675e042 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -910,6 +910,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 2.38.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Dec 17 2022 Florian Weimer - 2.38.1-3 - Backport upstream patch to fix C99 issue in kill From a228e53a4b4b19dfc24b1fdf308c392c600ac0d4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 20 Mar 2023 13:55:14 +0100 Subject: [PATCH 340/425] 2.39-0.1: upgrade to -rc1 --- .gitignore | 1 + sources | 2 +- util-linux-kill-c99.patch | 46 --------------------------------------- util-linux.spec | 26 +++++++++++++++++----- 4 files changed, 23 insertions(+), 52 deletions(-) delete mode 100644 util-linux-kill-c99.patch diff --git a/.gitignore b/.gitignore index 5272f49..42a1049 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,4 @@ /util-linux-2.38-rc3.tar.xz /util-linux-2.38.tar.xz /util-linux-2.38.1.tar.xz +/util-linux-2.39-rc1.tar.xz diff --git a/sources b/sources index 319cfac..c70fd6f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.38.1.tar.xz) = 07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957 +SHA512 (util-linux-2.39-rc1.tar.xz) = e9981d7c65eed7cd3f96f590e2190c7c804b1767464c821cd9277c72aaf38b8407f324cf9e8f3b96eb96359a0746f21a01dfb6baa504f49c8c7e1aff2dc956b3 diff --git a/util-linux-kill-c99.patch b/util-linux-kill-c99.patch deleted file mode 100644 index 7e02ab1..0000000 --- a/util-linux-kill-c99.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit 84732a8849a08d42a9a95dcbee9005116be78eb8 -Author: Khem Raj -Date: Sun Aug 7 14:39:19 2022 -0700 - - check for sys/pidfd.h - - This header in newer glibc defines the signatures of functions - pidfd_send_signal() and pidfd_open() and when these functions are - defined by libc then we need to include the relevant header to get - the definitions. Clang 15+ has started to error out when function - signatures are missing. - - Fixes errors like - misc-utils/kill.c:402:6: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] - if (pidfd_send_signal(pfd, ctl->numsig, &info, 0) < 0) - - Signed-off-by: Khem Raj - -diff --git a/configure.ac b/configure.ac -index d8b4d475103c2bab..4a35d17f81375c29 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -339,6 +339,7 @@ AC_CHECK_HEADERS([ \ - sys/mkdev.h \ - sys/mount.h \ - sys/param.h \ -+ sys/pidfd.h \ - sys/prctl.h \ - sys/resource.h \ - sys/sendfile.h \ -diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h -index eddede9767478be2..d9e33cbc57ae38c8 100644 ---- a/include/pidfd-utils.h -+++ b/include/pidfd-utils.h -@@ -4,8 +4,10 @@ - #ifdef HAVE_SYS_SYSCALL_H - # include - # if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open) -+# ifdef HAVE_SYS_PIDFD_H -+# include -+# endif - # include -- - # ifndef HAVE_PIDFD_SEND_SIGNAL - static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, - unsigned int flags) diff --git a/util-linux.spec b/util-linux.spec index 675e042..31553e1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.38.1 -Release: 4%{?dist} +Version: 2.39 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version} +%global upstream_version %{version}-rc1 %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -93,7 +93,10 @@ Patch0: login-lastlog-create.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -Patch2: util-linux-kill-c99.patch +# upstream, already in >= v2.39-rc2 +Patch2: libmount-dont-ignore-autofs-mounts-by-default.patch +Patch3: mount-ignore-autofs-entries-in-mount-listing.patch + %description The util-linux package contains a large variety of low-level system @@ -289,7 +292,7 @@ chfn and chsh utilities with dependence on libuser. unset LINGUAS || : # enable only when make a change to the build-system -./autogen.sh +#./autogen.sh export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" @@ -491,6 +494,7 @@ fi %{_bindir}/eject %{_bindir}/fallocate %{_bindir}/fincore +%{_bindir}/fadvise %{_bindir}/getopt %{_bindir}/hexdump %{_bindir}/irqtop @@ -510,6 +514,7 @@ fi %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/namei +%{_bindir}/pipesz %{_bindir}/prlimit %{_bindir}/rename %{_bindir}/rev @@ -524,6 +529,7 @@ fi %{_bindir}/utmpdump %{_bindir}/uuidgen %{_bindir}/uuidparse +%{_bindir}/waitpid %{_bindir}/wall %{_bindir}/wdctl %{_bindir}/whereis @@ -534,6 +540,7 @@ fi %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* %{_mandir}/man1/eject.1* +%{_mandir}/man1/fadvise.1.* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/fincore.1* %{_mandir}/man1/getopt.1* @@ -552,6 +559,7 @@ fi %{_mandir}/man1/mcookie.1* %{_mandir}/man1/mesg.1* %{_mandir}/man1/namei.1* +%{_mandir}/man1/pipesz.1.* %{_mandir}/man1/prlimit.1* %{_mandir}/man1/rename.1* %{_mandir}/man1/rev.1* @@ -567,6 +575,7 @@ fi %{_mandir}/man1/utmpdump.1.gz %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/uuidparse.1* +%{_mandir}/man1/waitpid.1.* %{_mandir}/man1/wall.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* @@ -574,6 +583,7 @@ fi %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* %{_mandir}/man8/blkdiscard.8* +%{_mandir}/man8/blkpr.8.* %{_mandir}/man8/blkzone.8* %{_mandir}/man8/chcpu.8* %{_mandir}/man8/chmem.8* @@ -607,6 +617,7 @@ fi %{_mandir}/man8/zramctl.8* %{_sbindir}/addpart %{_sbindir}/blkdiscard +%{_sbindir}/blkpr %{_sbindir}/blkzone %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -676,6 +687,7 @@ fi %{compldir}/mkfs.cramfs %{compldir}/mkfs.minix %{compldir}/namei +%{compldir}/pipesz %{compldir}/pivot_root %{compldir}/prlimit %{compldir}/readprofile @@ -910,6 +922,10 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Mon Mar 20 2023 Karel Zak - 2.39-0.1 +- upgrade to v2.39-rc1 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes + * Sat Jan 21 2023 Fedora Release Engineering - 2.38.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 4ffd39d55313501f5886649736ffad72b402f16d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 21 Mar 2023 19:34:04 +0100 Subject: [PATCH 341/425] commit missing files --- ...dont-ignore-autofs-mounts-by-default.patch | 51 +++++++++++++++++++ ...nore-autofs-entries-in-mount-listing.patch | 35 +++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 libmount-dont-ignore-autofs-mounts-by-default.patch create mode 100644 mount-ignore-autofs-entries-in-mount-listing.patch diff --git a/libmount-dont-ignore-autofs-mounts-by-default.patch b/libmount-dont-ignore-autofs-mounts-by-default.patch new file mode 100644 index 0000000..3999040 --- /dev/null +++ b/libmount-dont-ignore-autofs-mounts-by-default.patch @@ -0,0 +1,51 @@ +From 7d08453551ccc5477f76f3e986c8351e8c5ab599 Mon Sep 17 00:00:00 2001 +From: Ian Kent +Date: Mon, 13 Mar 2023 09:42:56 +0800 +Subject: [PATCH] libmount: dont ignore autofs mounts by default + +Making libmount ingore autofs mounts by default can be a problem for +systemd, I remember now what the problem was. + +autofs multi-mounts can be nested (and often are, think of a tree of +NFS exports) where there are autofs file system mounts within NFS +mounts and together with autofs mount triggers. + +In this case systemd needs to see all the mounts at shutdown when it +is umounting the tree of mounts. We don't want to have to rely on +modifications having been made to systemd for this to work properly +so we can't make this the default behaviour in libmount. + +Fixes: 22147e08c987 (libmount: use autofs mount hint to ignore autofs mount entries) +Signed-off-by: Ian Kent +Cc: John Westerdale +Cc: Frank Hertz +Cc: Frank Sorenson +--- + libmount/src/context.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libmount/src/context.c b/libmount/src/context.c +index 8db6b6950..2df4716a7 100644 +--- a/libmount/src/context.c ++++ b/libmount/src/context.c +@@ -75,7 +75,7 @@ struct libmnt_context *mnt_new_context(void) + /* if we're really root and aren't running setuid */ + cxt->restricted = (uid_t) 0 == ruid && ruid == euid ? 0 : 1; + +- cxt->noautofs = 1; ++ cxt->noautofs = 0; + + DBG(CXT, ul_debugobj(cxt, "----> allocate %s", + cxt->restricted ? "[RESTRICTED]" : "")); +@@ -164,7 +164,7 @@ int mnt_reset_context(struct libmnt_context *cxt) + cxt->helper = NULL; + cxt->mountdata = NULL; + cxt->flags = MNT_FL_DEFAULT; +- cxt->noautofs = 1; ++ cxt->noautofs = 0; + cxt->has_selinux_opt = 0; + + cxt->map_linux = mnt_get_builtin_optmap(MNT_LINUX_MAP); +-- +2.39.2 + diff --git a/mount-ignore-autofs-entries-in-mount-listing.patch b/mount-ignore-autofs-entries-in-mount-listing.patch new file mode 100644 index 0000000..b9e838e --- /dev/null +++ b/mount-ignore-autofs-entries-in-mount-listing.patch @@ -0,0 +1,35 @@ +From 9004e76b4ba716022a7c851ffa7fbd9e9e4bf073 Mon Sep 17 00:00:00 2001 +From: Ian Kent +Date: Mon, 13 Mar 2023 09:43:02 +0800 +Subject: [PATCH] mount: ignore autofs entries in mount listing + +Since we can't enable use of ignoring autofs mounts that have the +"ignore" option present by default (systemd could get confused) it's +necessary to enable it for individual applications. + +The mount utility is one applcation we need it for so enable it. + +Signed-off-by: Ian Kent +Cc: John Westerdale +Cc: Frank Hertz +Cc: Frank Sorenson +--- + sys-utils/mount.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sys-utils/mount.c b/sys-utils/mount.c +index 6590272c7..dba6fcae9 100644 +--- a/sys-utils/mount.c ++++ b/sys-utils/mount.c +@@ -124,6 +124,8 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label) + struct libmnt_fs *fs; + struct libmnt_cache *cache = NULL; + ++ mnt_context_enable_noautofs(cxt, 1); ++ + if (mnt_context_get_mtab(cxt, &tb)) + err(MNT_EX_SYSERR, _("failed to read mtab")); + +-- +2.39.2 + From 3bf1f5a44fdf5648eb2a905d1013aa7e7e72d4e9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Apr 2023 14:59:49 +0200 Subject: [PATCH 342/425] 2.39-0.2: upgrade to -rc2 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 42a1049..e40de18 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,4 @@ /util-linux-2.38.tar.xz /util-linux-2.38.1.tar.xz /util-linux-2.39-rc1.tar.xz +/util-linux-2.39-rc2.tar.xz diff --git a/sources b/sources index c70fd6f..246d228 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39-rc1.tar.xz) = e9981d7c65eed7cd3f96f590e2190c7c804b1767464c821cd9277c72aaf38b8407f324cf9e8f3b96eb96359a0746f21a01dfb6baa504f49c8c7e1aff2dc956b3 +SHA512 (util-linux-2.39-rc2.tar.xz) = 11f5b8ed1eb90a4e7161369eafcf0157b205aeded221cd435f95a79d01901bdef289660486849778b3d3c15500db593cad24e0a7f87f52968c9c292ea68040c0 diff --git a/util-linux.spec b/util-linux.spec index 31553e1..cfd3724 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 0.1%{?dist} +Release: 0.2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -922,6 +922,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Apr 4 2023 Karel Zak - 2.39-0.2 +- upgrade to v2.39-rc2 + * Mon Mar 20 2023 Karel Zak - 2.39-0.1 - upgrade to v2.39-rc1 https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes From 5fa93ec5e0ee804f8c5df970b815f0459b9cfe30 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Apr 2023 19:34:43 +0200 Subject: [PATCH 343/425] fix spec file for -rc2 --- ...dont-ignore-autofs-mounts-by-default.patch | 51 ------------------- ...nore-autofs-entries-in-mount-listing.patch | 35 ------------- util-linux.spec | 8 +-- 3 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 libmount-dont-ignore-autofs-mounts-by-default.patch delete mode 100644 mount-ignore-autofs-entries-in-mount-listing.patch diff --git a/libmount-dont-ignore-autofs-mounts-by-default.patch b/libmount-dont-ignore-autofs-mounts-by-default.patch deleted file mode 100644 index 3999040..0000000 --- a/libmount-dont-ignore-autofs-mounts-by-default.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 7d08453551ccc5477f76f3e986c8351e8c5ab599 Mon Sep 17 00:00:00 2001 -From: Ian Kent -Date: Mon, 13 Mar 2023 09:42:56 +0800 -Subject: [PATCH] libmount: dont ignore autofs mounts by default - -Making libmount ingore autofs mounts by default can be a problem for -systemd, I remember now what the problem was. - -autofs multi-mounts can be nested (and often are, think of a tree of -NFS exports) where there are autofs file system mounts within NFS -mounts and together with autofs mount triggers. - -In this case systemd needs to see all the mounts at shutdown when it -is umounting the tree of mounts. We don't want to have to rely on -modifications having been made to systemd for this to work properly -so we can't make this the default behaviour in libmount. - -Fixes: 22147e08c987 (libmount: use autofs mount hint to ignore autofs mount entries) -Signed-off-by: Ian Kent -Cc: John Westerdale -Cc: Frank Hertz -Cc: Frank Sorenson ---- - libmount/src/context.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libmount/src/context.c b/libmount/src/context.c -index 8db6b6950..2df4716a7 100644 ---- a/libmount/src/context.c -+++ b/libmount/src/context.c -@@ -75,7 +75,7 @@ struct libmnt_context *mnt_new_context(void) - /* if we're really root and aren't running setuid */ - cxt->restricted = (uid_t) 0 == ruid && ruid == euid ? 0 : 1; - -- cxt->noautofs = 1; -+ cxt->noautofs = 0; - - DBG(CXT, ul_debugobj(cxt, "----> allocate %s", - cxt->restricted ? "[RESTRICTED]" : "")); -@@ -164,7 +164,7 @@ int mnt_reset_context(struct libmnt_context *cxt) - cxt->helper = NULL; - cxt->mountdata = NULL; - cxt->flags = MNT_FL_DEFAULT; -- cxt->noautofs = 1; -+ cxt->noautofs = 0; - cxt->has_selinux_opt = 0; - - cxt->map_linux = mnt_get_builtin_optmap(MNT_LINUX_MAP); --- -2.39.2 - diff --git a/mount-ignore-autofs-entries-in-mount-listing.patch b/mount-ignore-autofs-entries-in-mount-listing.patch deleted file mode 100644 index b9e838e..0000000 --- a/mount-ignore-autofs-entries-in-mount-listing.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9004e76b4ba716022a7c851ffa7fbd9e9e4bf073 Mon Sep 17 00:00:00 2001 -From: Ian Kent -Date: Mon, 13 Mar 2023 09:43:02 +0800 -Subject: [PATCH] mount: ignore autofs entries in mount listing - -Since we can't enable use of ignoring autofs mounts that have the -"ignore" option present by default (systemd could get confused) it's -necessary to enable it for individual applications. - -The mount utility is one applcation we need it for so enable it. - -Signed-off-by: Ian Kent -Cc: John Westerdale -Cc: Frank Hertz -Cc: Frank Sorenson ---- - sys-utils/mount.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sys-utils/mount.c b/sys-utils/mount.c -index 6590272c7..dba6fcae9 100644 ---- a/sys-utils/mount.c -+++ b/sys-utils/mount.c -@@ -124,6 +124,8 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label) - struct libmnt_fs *fs; - struct libmnt_cache *cache = NULL; - -+ mnt_context_enable_noautofs(cxt, 1); -+ - if (mnt_context_get_mtab(cxt, &tb)) - err(MNT_EX_SYSERR, _("failed to read mtab")); - --- -2.39.2 - diff --git a/util-linux.spec b/util-linux.spec index cfd3724..4de6676 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 0.2%{?dist} +Release: 0.3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version}-rc1 +%global upstream_version %{version}-rc2 %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -93,10 +93,6 @@ Patch0: login-lastlog-create.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -# upstream, already in >= v2.39-rc2 -Patch2: libmount-dont-ignore-autofs-mounts-by-default.patch -Patch3: mount-ignore-autofs-entries-in-mount-listing.patch - %description The util-linux package contains a large variety of low-level system From 09904cbd5605562abf0e14fc460185ad1306a94c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 5 Apr 2023 21:59:20 +0200 Subject: [PATCH 344/425] 2.39-0.4: fix libmount --- ...fix-superblock-rw-ro-reconfiguration.patch | 110 ++++++++++++++++++ util-linux.spec | 11 +- 2 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 libmount-fix-superblock-rw-ro-reconfiguration.patch diff --git a/libmount-fix-superblock-rw-ro-reconfiguration.patch b/libmount-fix-superblock-rw-ro-reconfiguration.patch new file mode 100644 index 0000000..7ffa945 --- /dev/null +++ b/libmount-fix-superblock-rw-ro-reconfiguration.patch @@ -0,0 +1,110 @@ +From c7ffe0cf6b7bdf62db70bd7700d6ed40d9106ba9 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 5 Apr 2023 21:44:55 +0200 +Subject: [PATCH] libmount: fix superblock rw/ro reconfiguration + +The classic mount(2) defaults to 'rw', but the new API does not reset +superblock to 'rw' if the flag is not explicitly used for +FSCONFIG_CMD_RECONFIGURE. + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2180593 +Signed-off-by: Karel Zak +--- + libmount/src/hook_mount.c | 47 +++++++++++++++++++++++++++------------ + 1 file changed, 33 insertions(+), 14 deletions(-) + +diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c +index 071dad783..117150dec 100644 +--- a/libmount/src/hook_mount.c ++++ b/libmount/src/hook_mount.c +@@ -111,14 +111,33 @@ static int hookset_deinit(struct libmnt_context *cxt, const struct libmnt_hookse + return 0; + } + ++static inline int fsconfig_set_value( ++ struct libmnt_context *cxt, ++ const struct libmnt_hookset *hs, ++ int fd, ++ const char *name, const char *value) ++{ ++ int rc; ++ ++ DBG(HOOK, ul_debugobj(hs, " fsconfig(name=%s,value=%s)", name, ++ value ? : "")); ++ if (value) ++ rc = fsconfig(fd, FSCONFIG_SET_STRING, name, value, 0); ++ else ++ rc = fsconfig(fd, FSCONFIG_SET_FLAG, name, NULL, 0); ++ ++ set_syscall_status(cxt, "fsconfig", rc == 0); ++ return rc; ++} + + static int configure_superblock(struct libmnt_context *cxt, +- const struct libmnt_hookset *hs, int fd) ++ const struct libmnt_hookset *hs, ++ int fd, int force_rwro) + { + struct libmnt_optlist *ol; + struct libmnt_iter itr; + struct libmnt_opt *opt; +- int rc; ++ int rc = 0, has_rwro = 0; + + DBG(HOOK, ul_debugobj(hs, " config FS")); + +@@ -136,22 +155,21 @@ static int configure_superblock(struct libmnt_context *cxt, + if (ent && mnt_opt_get_map(opt) == cxt->map_linux && + ent->id == MS_RDONLY) { + value = NULL; ++ has_rwro = 1; + } else if (!name || mnt_opt_get_map(opt) || mnt_opt_is_external(opt)) + continue; + +- DBG(HOOK, ul_debugobj(hs, " fsconfig(name=%s,value=%s)", name, value)); +- if (value) +- rc = fsconfig(fd, FSCONFIG_SET_STRING, name, value, 0); +- else +- rc = fsconfig(fd, FSCONFIG_SET_FLAG, name, NULL, 0); +- +- set_syscall_status(cxt, "fsconfig", rc == 0); ++ rc = fsconfig_set_value(cxt, hs, fd, name, value); + if (rc != 0) +- return -errno; ++ goto done; + } + +- DBG(HOOK, ul_debugobj(hs, " config done [rc=0]")); +- return 0; ++ if (force_rwro && !has_rwro) ++ rc = fsconfig_set_value(cxt, hs, fd, "rw", NULL); ++ ++done: ++ DBG(HOOK, ul_debugobj(hs, " config done [rc=%d]", rc)); ++ return rc != 0 && errno ? -errno : rc; + } + + static int open_fs_configuration_context(struct libmnt_context *cxt, +@@ -244,7 +262,7 @@ static int hook_create_mount(struct libmnt_context *cxt, + set_syscall_status(cxt, "fsconfig", rc == 0); + + if (!rc) +- rc = configure_superblock(cxt, hs, api->fd_fs); ++ rc = configure_superblock(cxt, hs, api->fd_fs, 0); + if (!rc) { + DBG(HOOK, ul_debugobj(hs, "create FS")); + rc = fsconfig(api->fd_fs, FSCONFIG_CMD_CREATE, NULL, NULL, 0); +@@ -301,8 +319,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt, + return -errno; + } + +- rc = configure_superblock(cxt, hs, api->fd_fs); ++ rc = configure_superblock(cxt, hs, api->fd_fs, 1); + if (!rc) { ++ DBG(HOOK, ul_debugobj(hs, "re-configurate FS")); + rc = fsconfig(api->fd_fs, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0); + set_syscall_status(cxt, "fsconfig", rc == 0); + } +-- +2.39.2 + diff --git a/util-linux.spec b/util-linux.spec index 4de6676..13d481c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 0.3%{?dist} +Release: 0.4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -94,6 +94,9 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +# upstream (#2180593) +Patch2: libmount-fix-superblock-rw-ro-reconfiguration.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -918,6 +921,12 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Apr 5 2023 Karel Zak - 2.39-0.4 +- fix #2180593 (superblock reconfiguration libmount issue) + +* Tue Apr 4 2023 Karel Zak - 2.39-0.3 +- fix spec file + * Tue Apr 4 2023 Karel Zak - 2.39-0.2 - upgrade to v2.39-rc2 From c87ed81c2c87f4b0f4461c1d9a5aaf2a59e00dd7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Apr 2023 11:39:42 +0200 Subject: [PATCH 345/425] 2.39-0.5: upgrade to 2.39-rc3 --- .gitignore | 1 + ...fix-superblock-rw-ro-reconfiguration.patch | 110 ------------------ sources | 2 +- util-linux.spec | 10 +- 4 files changed, 7 insertions(+), 116 deletions(-) delete mode 100644 libmount-fix-superblock-rw-ro-reconfiguration.patch diff --git a/.gitignore b/.gitignore index e40de18..a5f4144 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,4 @@ /util-linux-2.38.1.tar.xz /util-linux-2.39-rc1.tar.xz /util-linux-2.39-rc2.tar.xz +/util-linux-2.39-rc3.tar.xz diff --git a/libmount-fix-superblock-rw-ro-reconfiguration.patch b/libmount-fix-superblock-rw-ro-reconfiguration.patch deleted file mode 100644 index 7ffa945..0000000 --- a/libmount-fix-superblock-rw-ro-reconfiguration.patch +++ /dev/null @@ -1,110 +0,0 @@ -From c7ffe0cf6b7bdf62db70bd7700d6ed40d9106ba9 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 5 Apr 2023 21:44:55 +0200 -Subject: [PATCH] libmount: fix superblock rw/ro reconfiguration - -The classic mount(2) defaults to 'rw', but the new API does not reset -superblock to 'rw' if the flag is not explicitly used for -FSCONFIG_CMD_RECONFIGURE. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2180593 -Signed-off-by: Karel Zak ---- - libmount/src/hook_mount.c | 47 +++++++++++++++++++++++++++------------ - 1 file changed, 33 insertions(+), 14 deletions(-) - -diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c -index 071dad783..117150dec 100644 ---- a/libmount/src/hook_mount.c -+++ b/libmount/src/hook_mount.c -@@ -111,14 +111,33 @@ static int hookset_deinit(struct libmnt_context *cxt, const struct libmnt_hookse - return 0; - } - -+static inline int fsconfig_set_value( -+ struct libmnt_context *cxt, -+ const struct libmnt_hookset *hs, -+ int fd, -+ const char *name, const char *value) -+{ -+ int rc; -+ -+ DBG(HOOK, ul_debugobj(hs, " fsconfig(name=%s,value=%s)", name, -+ value ? : "")); -+ if (value) -+ rc = fsconfig(fd, FSCONFIG_SET_STRING, name, value, 0); -+ else -+ rc = fsconfig(fd, FSCONFIG_SET_FLAG, name, NULL, 0); -+ -+ set_syscall_status(cxt, "fsconfig", rc == 0); -+ return rc; -+} - - static int configure_superblock(struct libmnt_context *cxt, -- const struct libmnt_hookset *hs, int fd) -+ const struct libmnt_hookset *hs, -+ int fd, int force_rwro) - { - struct libmnt_optlist *ol; - struct libmnt_iter itr; - struct libmnt_opt *opt; -- int rc; -+ int rc = 0, has_rwro = 0; - - DBG(HOOK, ul_debugobj(hs, " config FS")); - -@@ -136,22 +155,21 @@ static int configure_superblock(struct libmnt_context *cxt, - if (ent && mnt_opt_get_map(opt) == cxt->map_linux && - ent->id == MS_RDONLY) { - value = NULL; -+ has_rwro = 1; - } else if (!name || mnt_opt_get_map(opt) || mnt_opt_is_external(opt)) - continue; - -- DBG(HOOK, ul_debugobj(hs, " fsconfig(name=%s,value=%s)", name, value)); -- if (value) -- rc = fsconfig(fd, FSCONFIG_SET_STRING, name, value, 0); -- else -- rc = fsconfig(fd, FSCONFIG_SET_FLAG, name, NULL, 0); -- -- set_syscall_status(cxt, "fsconfig", rc == 0); -+ rc = fsconfig_set_value(cxt, hs, fd, name, value); - if (rc != 0) -- return -errno; -+ goto done; - } - -- DBG(HOOK, ul_debugobj(hs, " config done [rc=0]")); -- return 0; -+ if (force_rwro && !has_rwro) -+ rc = fsconfig_set_value(cxt, hs, fd, "rw", NULL); -+ -+done: -+ DBG(HOOK, ul_debugobj(hs, " config done [rc=%d]", rc)); -+ return rc != 0 && errno ? -errno : rc; - } - - static int open_fs_configuration_context(struct libmnt_context *cxt, -@@ -244,7 +262,7 @@ static int hook_create_mount(struct libmnt_context *cxt, - set_syscall_status(cxt, "fsconfig", rc == 0); - - if (!rc) -- rc = configure_superblock(cxt, hs, api->fd_fs); -+ rc = configure_superblock(cxt, hs, api->fd_fs, 0); - if (!rc) { - DBG(HOOK, ul_debugobj(hs, "create FS")); - rc = fsconfig(api->fd_fs, FSCONFIG_CMD_CREATE, NULL, NULL, 0); -@@ -301,8 +319,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt, - return -errno; - } - -- rc = configure_superblock(cxt, hs, api->fd_fs); -+ rc = configure_superblock(cxt, hs, api->fd_fs, 1); - if (!rc) { -+ DBG(HOOK, ul_debugobj(hs, "re-configurate FS")); - rc = fsconfig(api->fd_fs, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0); - set_syscall_status(cxt, "fsconfig", rc == 0); - } --- -2.39.2 - diff --git a/sources b/sources index 246d228..4bfa7a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39-rc2.tar.xz) = 11f5b8ed1eb90a4e7161369eafcf0157b205aeded221cd435f95a79d01901bdef289660486849778b3d3c15500db593cad24e0a7f87f52968c9c292ea68040c0 +SHA512 (util-linux-2.39-rc3.tar.xz) = 8a93d32a5ceb38d50a4b2c8bfa48bcab7ec9b758c89b5a1a4f7fd74558dce37385bd7ea203345148d4389de4ea60ec42058f9d7889a8075d3e616773d085427e diff --git a/util-linux.spec b/util-linux.spec index 13d481c..947f446 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 0.4%{?dist} +Release: 0.5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version}-rc2 +%global upstream_version %{version}-rc3 %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -94,9 +94,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -# upstream (#2180593) -Patch2: libmount-fix-superblock-rw-ro-reconfiguration.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -921,6 +918,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Apr 19 2023 Karel Zak - 2.39-0.5 +- upgrade to v2.39-rc3 (fixes XFS and rw/ro issues) + * Wed Apr 5 2023 Karel Zak - 2.39-0.4 - fix #2180593 (superblock reconfiguration libmount issue) From 844dcc152cadf7b9d2bb77365534930e354c798f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 May 2023 11:36:49 +0200 Subject: [PATCH 346/425] 2.39-1: upgrade, add subpackage i18n, remove user --- .gitignore | 1 + sources | 2 +- util-linux.spec | 60 ++++++++++++++++++++++++++++--------------------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index a5f4144..db73f07 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,4 @@ /util-linux-2.39-rc1.tar.xz /util-linux-2.39-rc2.tar.xz /util-linux-2.39-rc3.tar.xz +/util-linux-2.39.tar.xz diff --git a/sources b/sources index 4bfa7a6..c2b8500 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39-rc3.tar.xz) = 8a93d32a5ceb38d50a4b2c8bfa48bcab7ec9b758c89b5a1a4f7fd74558dce37385bd7ea203345148d4389de4ea60ec42058f9d7889a8075d3e616773d085427e +SHA512 (util-linux-2.39.tar.xz) = 3d59a0f114c06be19ef7f86fca37ba5b9073823d011b3fc37997ddb00124b4505ea32903b78798a64dffbccf0ba645a692678ee845cc65a5b321824448a82a94 diff --git a/util-linux.spec b/util-linux.spec index 947f446..cdd23c2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,12 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 0.5%{?dist} +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version}-rc3 +%global upstream_version %{version} %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -28,20 +28,20 @@ BuildRequires: popt-devel BuildRequires: libutempter-devel BuildRequires: systemd-devel BuildRequires: systemd -BuildRequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: %{pypkg}-devel BuildRequires: gcc BuildRequires: rubygem-asciidoctor +BuildRequires: po4a %ifarch ppc64le BuildRequires: librtas-devel %endif # enable if make changes to build-system -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: bison +#BuildRequires: autoconf +#BuildRequires: automake +#BuildRequires: libtool +#BuildRequires: bison ### Sources Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz @@ -272,13 +272,14 @@ supplied by the libmount library to work with mount tables (fstab, mountinfo, etc) and mount filesystems. -%package -n util-linux-user -Summary: util-linux utilities based on libuser +%package -n util-linux-i18n +Summary: Internationalization pack for util-linux Requires: util-linux = %{version}-%{release} License: GPLv2 -%description -n util-linux-user -chfn and chsh utilities with dependence on libuser. +%description -n util-linux-i18n +Internationalization pack with translated messages and manual pages for +util-linux commands. %prep @@ -298,6 +299,7 @@ export DAEMON_CFLAGS="$SUID_CFLAGS" export DAEMON_LDFLAGS="$SUID_LDFLAGS" %configure \ --with-systemdsystemunitdir=%{_unitdir} \ + --without-user \ --disable-silent-rules \ --disable-bfs \ --disable-pg \ @@ -414,10 +416,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} # find MO files -%find_lang %name +%find_lang %{name} --all-name --with-man -# the files section supports only one -f option... -mv %{name}.lang %{name}.files +touch %{name}.files # create list of setarch(8) symlinks find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ @@ -471,12 +472,16 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/pam.d/runuser %config(noreplace) %{_sysconfdir}/pam.d/runuser-l +%config(noreplace) %{_sysconfdir}/pam.d/chfn +%config(noreplace) %{_sysconfdir}/pam.d/chsh %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime %attr(4755,root,root) %{_bindir}/su %attr(755,root,root) %{_bindir}/login %attr(2755,root,tty) %{_bindir}/write +%attr(4711,root,root) %{_bindir}/chfn +%attr(4711,root,root) %{_bindir}/chsh %{_unitdir}/fstrim.* @@ -530,7 +535,9 @@ fi %{_bindir}/wdctl %{_bindir}/whereis %{_mandir}/man1/cal.1* +%{_mandir}/man1/chfn.1* %{_mandir}/man1/choom.1* +%{_mandir}/man1/chsh.1* %{_mandir}/man1/col.1* %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* @@ -645,7 +652,9 @@ fi %{compldir}/blkzone %{compldir}/cal %{compldir}/chcpu +%{compldir}/chfn %{compldir}/chmem +%{compldir}/chsh %{compldir}/col %{compldir}/colcrt %{compldir}/colrm @@ -653,6 +662,7 @@ fi %{compldir}/ctrlaltdel %{compldir}/delpart %{compldir}/eject +%{compldir}/fadvise %{compldir}/fallocate %{compldir}/fdisk %{compldir}/fincore @@ -707,6 +717,7 @@ fi %{compldir}/uuidgen %{compldir}/uuidparse %{compldir}/wall +%{compldir}/waitpid %{compldir}/wdctl %{compldir}/whereis %{compldir}/wipefs @@ -828,17 +839,6 @@ fi /etc/mtab -%files -n util-linux-user -%config(noreplace) %{_sysconfdir}/pam.d/chfn -%config(noreplace) %{_sysconfdir}/pam.d/chsh -%attr(4711,root,root) %{_bindir}/chfn -%attr(4711,root,root) %{_bindir}/chsh -%{_mandir}/man1/chfn.1* -%{_mandir}/man1/chsh.1* -%{compldir}/chfn -%{compldir}/chsh - - %files -n uuidd %license Documentation/licenses/COPYING.GPL-2.0-or-later %{_mandir}/man8/uuidd.8* @@ -917,7 +917,17 @@ fi %license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING %{_libdir}/python*/site-packages/libmount/ +%files -n util-linux-i18n -f %{name}.lang + + %changelog +* Thu May 18 2023 Karel Zak - 2.39-1 +- upgrade to v2.39 +- remove dependence on libuser +- remove util-linux-user subpackage +- enable translated man pages +- add util-linux-i18n subpackage + * Wed Apr 19 2023 Karel Zak - 2.39-0.5 - upgrade to v2.39-rc3 (fixes XFS and rw/ro issues) From fe2d027119a38c85638389bec4da0449c98c7d31 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 18 May 2023 09:31:58 -0700 Subject: [PATCH 347/425] Have util-linux obsolete and provide util-linux-user --- util-linux.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index cdd23c2..d664c02 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -75,6 +75,10 @@ Provides: util-linux-ng = %{version}-%{release} Conflicts: filesystem < 3 Provides: /sbin/nologin Provides: /sbin/findfs +# util-linux-user was dropped in 2.39-1 and its contents moved back +# to util-linux +Obsoletes: util-linux-user < 2.39-1 +Provides: util-linux-user = %{version}-%{release} Requires(post): coreutils Requires: pam >= 1.1.3-7, /etc/pam.d/system-auth @@ -921,6 +925,9 @@ fi %changelog +* Thu May 18 2023 Adam Williamson - 2.39-2 +- Have util-linux obsolete and provide util-linux-user + * Thu May 18 2023 Karel Zak - 2.39-1 - upgrade to v2.39 - remove dependence on libuser From db855d07b8628cb876082f9b2cb481234dd54b14 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 22 May 2023 15:57:23 +0200 Subject: [PATCH 348/425] 2.39-3: fix mount options --- ...x-options-prepend-insert-and-merging.patch | 49 +++++++++++++++++++ util-linux.spec | 8 ++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 libmount-fix-options-prepend-insert-and-merging.patch diff --git a/libmount-fix-options-prepend-insert-and-merging.patch b/libmount-fix-options-prepend-insert-and-merging.patch new file mode 100644 index 0000000..b44c435 --- /dev/null +++ b/libmount-fix-options-prepend-insert-and-merging.patch @@ -0,0 +1,49 @@ +From c0267687fd7b41b00d523d1985182d7eb574effd Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 22 May 2023 15:00:25 +0200 +Subject: [PATCH] libmount: fix options prepend/insert and merging + + * the order of the new options should not be changed + (for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d") + + * make sure that options map is defined when merging options + +Fixes: https://github.com/util-linux/util-linux/issues/2238 +Signed-off-by: Karel Zak +--- + libmount/src/optlist.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c +index a8c1ad89a..f74e75928 100644 +--- a/libmount/src/optlist.c ++++ b/libmount/src/optlist.c +@@ -338,6 +338,7 @@ int mnt_optlist_merge_opts(struct libmnt_optlist *ls) + + /* remove inverted option */ + else if (opt->ent && x->ent ++ && opt->map == x->map + && opt->ent->id == x->ent->id + && (opt->ent->mask & MNT_INVERT + || x->ent->mask & MNT_INVERT)) +@@ -520,6 +521,8 @@ static int optlist_add_optstr(struct libmnt_optlist *ls, const char *optstr, + if (!opt) + return -ENOMEM; + opt->src = MNT_OPTSRC_STRING; ++ if (where) ++ where = &opt->opts; + } + + optlist_cleanup_cache(ls); +@@ -622,6 +625,8 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, + if (!opt) + return -ENOMEM; + opt->src = MNT_OPTSRC_FLAG; ++ if (where) ++ where = &opt->opts; + } + + optlist_cleanup_cache(ls); +-- +2.40.1 + diff --git a/util-linux.spec b/util-linux.spec index d664c02..209326a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -98,6 +98,9 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +### Upstream patches +Patch2: libmount-fix-options-prepend-insert-and-merging.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -925,6 +928,9 @@ fi %changelog +* Mon May 22 2023 Karel Zak - 2.39-3 +- fix mount options prepend/insert and merging (upstream) + * Thu May 18 2023 Adam Williamson - 2.39-2 - Have util-linux obsolete and provide util-linux-user From 7961e208cdb05edabb35275b0c24bb49ece495ac Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 25 May 2023 12:31:34 +0200 Subject: [PATCH 349/425] 2.39-4: libmount fix --- ...-call-hooks-after-mount.-type-helper.patch | 85 +++++++++++++++++++ util-linux.spec | 6 +- 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 libmount-don-t-call-hooks-after-mount.-type-helper.patch diff --git a/libmount-don-t-call-hooks-after-mount.-type-helper.patch b/libmount-don-t-call-hooks-after-mount.-type-helper.patch new file mode 100644 index 0000000..3f18334 --- /dev/null +++ b/libmount-don-t-call-hooks-after-mount.-type-helper.patch @@ -0,0 +1,85 @@ +From f94a7760ed7ce81389a6059f020238981627a70d Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 25 May 2023 11:48:24 +0200 +Subject: [PATCH] libmount: don't call hooks after mount. helper + +In case more filesystems are specified (or when libmount follows +/{etc,proc}/filesystems) then the library may try to use and +initialize the new API because for some filesystems, we need +exec(/sbin/mount.) and for another fsopen(). + +The hooks that use the API have to smart and detect that the mount +operation was done in external /sbin/mount. helper. And in this +case, the new API file descriptors must be ignored. + +The exception is propagation flags, mount(8) can set the flags after +exec(/sbin/mount.), for example, "mount -t ntfs --make-private". + +Fixes: https://github.com/util-linux/util-linux/issues/2267 +Signed-off-by: Karel Zak +--- + libmount/src/context_mount.c | 2 ++ + libmount/src/hook_mount.c | 13 +++++++++++++ + 2 files changed, 15 insertions(+) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index cbb4f1fdf..40f9ed073 100644 +--- a/libmount/src/context_mount.c ++++ b/libmount/src/context_mount.c +@@ -508,6 +508,8 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type) + assert(cxt->fs); + assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED)); + ++ mnt_context_reset_status(cxt); ++ + if (try_type) { + rc = mnt_context_prepare_helper(cxt, "mount", try_type); + if (rc) +diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c +index 924c71444..91483afa6 100644 +--- a/libmount/src/hook_mount.c ++++ b/libmount/src/hook_mount.c +@@ -239,6 +239,10 @@ static int hook_create_mount(struct libmnt_context *cxt, + int rc = 0; + + assert(cxt); ++ ++ if (mnt_context_helper_executed(cxt)) ++ return 0; ++ + assert(cxt->fs); + + api = get_sysapi(cxt); +@@ -309,6 +313,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt, + + assert(cxt); + ++ if (mnt_context_helper_executed(cxt)) ++ return 0; ++ + api = get_sysapi(cxt); + assert(api); + assert(api->fd_tree >= 0); +@@ -379,6 +386,9 @@ static int hook_set_vfsflags(struct libmnt_context *cxt, + uint64_t set = 0, clr = 0; + int rc = 0; + ++ if (mnt_context_helper_executed(cxt)) ++ return 0; ++ + DBG(HOOK, ul_debugobj(hs, "setting VFS flags")); + + ol = mnt_context_get_optlist(cxt); +@@ -471,6 +481,9 @@ static int hook_attach_target(struct libmnt_context *cxt, + const char *target; + int rc = 0; + ++ if (mnt_context_helper_executed(cxt)) ++ return 0; ++ + target = mnt_fs_get_target(cxt->fs); + if (!target) + return -EINVAL; +-- +2.40.1 + diff --git a/util-linux.spec b/util-linux.spec index 209326a..d7a57f9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -100,6 +100,7 @@ Patch1: login-default-motd-file.patch ### Upstream patches Patch2: libmount-fix-options-prepend-insert-and-merging.patch +Patch3: libmount-don-t-call-hooks-after-mount.-type-helper.patch %description The util-linux package contains a large variety of low-level system @@ -928,6 +929,9 @@ fi %changelog +* Thu May 25 2023 Karel Zak - 2.39-4 +- fix mount when /sbin/mount. executed + * Mon May 22 2023 Karel Zak - 2.39-3 - fix mount options prepend/insert and merging (upstream) From b04999a5a60a2df846706b6206f2ca32f773f1e8 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 20:42:57 +0200 Subject: [PATCH 350/425] Rebuilt for Python 3.12 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index d7a57f9..ac8aba1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -929,6 +929,9 @@ fi %changelog +* Tue Jun 13 2023 Python Maint - 2.39-5 +- Rebuilt for Python 3.12 + * Thu May 25 2023 Karel Zak - 2.39-4 - fix mount when /sbin/mount. executed From b2320e7499340f83741e02d67db4f4c68aa6f3f4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 28 Jun 2023 10:53:17 +0200 Subject: [PATCH 351/425] 2.39.1-1: upgrade --- .gitignore | 1 + ...-call-hooks-after-mount.-type-helper.patch | 85 ------------------- ...x-options-prepend-insert-and-merging.patch | 49 ----------- sources | 2 +- util-linux.spec | 11 +-- 5 files changed, 8 insertions(+), 140 deletions(-) delete mode 100644 libmount-don-t-call-hooks-after-mount.-type-helper.patch delete mode 100644 libmount-fix-options-prepend-insert-and-merging.patch diff --git a/.gitignore b/.gitignore index db73f07..bef3e67 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ /util-linux-2.39-rc2.tar.xz /util-linux-2.39-rc3.tar.xz /util-linux-2.39.tar.xz +/util-linux-2.39.1.tar.xz diff --git a/libmount-don-t-call-hooks-after-mount.-type-helper.patch b/libmount-don-t-call-hooks-after-mount.-type-helper.patch deleted file mode 100644 index 3f18334..0000000 --- a/libmount-don-t-call-hooks-after-mount.-type-helper.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f94a7760ed7ce81389a6059f020238981627a70d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 25 May 2023 11:48:24 +0200 -Subject: [PATCH] libmount: don't call hooks after mount. helper - -In case more filesystems are specified (or when libmount follows -/{etc,proc}/filesystems) then the library may try to use and -initialize the new API because for some filesystems, we need -exec(/sbin/mount.) and for another fsopen(). - -The hooks that use the API have to smart and detect that the mount -operation was done in external /sbin/mount. helper. And in this -case, the new API file descriptors must be ignored. - -The exception is propagation flags, mount(8) can set the flags after -exec(/sbin/mount.), for example, "mount -t ntfs --make-private". - -Fixes: https://github.com/util-linux/util-linux/issues/2267 -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 2 ++ - libmount/src/hook_mount.c | 13 +++++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index cbb4f1fdf..40f9ed073 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -508,6 +508,8 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type) - assert(cxt->fs); - assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED)); - -+ mnt_context_reset_status(cxt); -+ - if (try_type) { - rc = mnt_context_prepare_helper(cxt, "mount", try_type); - if (rc) -diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c -index 924c71444..91483afa6 100644 ---- a/libmount/src/hook_mount.c -+++ b/libmount/src/hook_mount.c -@@ -239,6 +239,10 @@ static int hook_create_mount(struct libmnt_context *cxt, - int rc = 0; - - assert(cxt); -+ -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - assert(cxt->fs); - - api = get_sysapi(cxt); -@@ -309,6 +313,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt, - - assert(cxt); - -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - api = get_sysapi(cxt); - assert(api); - assert(api->fd_tree >= 0); -@@ -379,6 +386,9 @@ static int hook_set_vfsflags(struct libmnt_context *cxt, - uint64_t set = 0, clr = 0; - int rc = 0; - -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - DBG(HOOK, ul_debugobj(hs, "setting VFS flags")); - - ol = mnt_context_get_optlist(cxt); -@@ -471,6 +481,9 @@ static int hook_attach_target(struct libmnt_context *cxt, - const char *target; - int rc = 0; - -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - target = mnt_fs_get_target(cxt->fs); - if (!target) - return -EINVAL; --- -2.40.1 - diff --git a/libmount-fix-options-prepend-insert-and-merging.patch b/libmount-fix-options-prepend-insert-and-merging.patch deleted file mode 100644 index b44c435..0000000 --- a/libmount-fix-options-prepend-insert-and-merging.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c0267687fd7b41b00d523d1985182d7eb574effd Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 22 May 2023 15:00:25 +0200 -Subject: [PATCH] libmount: fix options prepend/insert and merging - - * the order of the new options should not be changed - (for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d") - - * make sure that options map is defined when merging options - -Fixes: https://github.com/util-linux/util-linux/issues/2238 -Signed-off-by: Karel Zak ---- - libmount/src/optlist.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c -index a8c1ad89a..f74e75928 100644 ---- a/libmount/src/optlist.c -+++ b/libmount/src/optlist.c -@@ -338,6 +338,7 @@ int mnt_optlist_merge_opts(struct libmnt_optlist *ls) - - /* remove inverted option */ - else if (opt->ent && x->ent -+ && opt->map == x->map - && opt->ent->id == x->ent->id - && (opt->ent->mask & MNT_INVERT - || x->ent->mask & MNT_INVERT)) -@@ -520,6 +521,8 @@ static int optlist_add_optstr(struct libmnt_optlist *ls, const char *optstr, - if (!opt) - return -ENOMEM; - opt->src = MNT_OPTSRC_STRING; -+ if (where) -+ where = &opt->opts; - } - - optlist_cleanup_cache(ls); -@@ -622,6 +625,8 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, - if (!opt) - return -ENOMEM; - opt->src = MNT_OPTSRC_FLAG; -+ if (where) -+ where = &opt->opts; - } - - optlist_cleanup_cache(ls); --- -2.40.1 - diff --git a/sources b/sources index c2b8500..b3b2ccf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39.tar.xz) = 3d59a0f114c06be19ef7f86fca37ba5b9073823d011b3fc37997ddb00124b4505ea32903b78798a64dffbccf0ba645a692678ee845cc65a5b321824448a82a94 +SHA512 (util-linux-2.39.1.tar.xz) = 8fe2c9014f6161330610f7470b870855cecbd3fab9c187b75d8f22e16573c82516050479be39cfb9f7dd6d7ef1cc298d31d839b194dda5ec4daf0d1197ac71e9 diff --git a/util-linux.spec b/util-linux.spec index ac8aba1..220816e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.39 -Release: 5%{?dist} +Version: 2.39.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -98,9 +98,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -### Upstream patches -Patch2: libmount-fix-options-prepend-insert-and-merging.patch -Patch3: libmount-don-t-call-hooks-after-mount.-type-helper.patch %description The util-linux package contains a large variety of low-level system @@ -929,6 +926,10 @@ fi %changelog +* Wed Jun 28 2023 Karel Zak - 2.39.1-1 +- upgrade to v2.39.1 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.1-ReleaseNotes + * Tue Jun 13 2023 Python Maint - 2.39-5 - Rebuilt for Python 3.12 From 8760847a17a23d471c9677eea70a0e810183a61e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 28 Jun 2023 19:05:08 +0200 Subject: [PATCH 352/425] Rebuilt for Python 3.12 --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 220816e..c736375 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -926,6 +926,9 @@ fi %changelog +* Wed Jun 28 2023 Python Maint - 2.39.1-2 +- Rebuilt for Python 3.12 + * Wed Jun 28 2023 Karel Zak - 2.39.1-1 - upgrade to v2.39.1 https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.1-ReleaseNotes From 0b1e1d7cfe1b7175aa94cbb9c26d9fa74f87c07f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:19:50 +0000 Subject: [PATCH 353/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- util-linux.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index c736375..2c01fb0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -926,6 +926,9 @@ fi %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 2.39.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jun 28 2023 Python Maint - 2.39.1-2 - Rebuilt for Python 3.12 From 59309f26f2885dc6d3a3853c2db64eef36c217af Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 17 Aug 2023 12:13:31 +0200 Subject: [PATCH 354/425] 2.39.2-1: upgrade --- .gitignore | 1 + ...-regression-when-mounting-with-atime.patch | 133 ++++++++++++++++++ sources | 2 +- util-linux.spec | 13 +- 4 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 libmount-Fix-regression-when-mounting-with-atime.patch diff --git a/.gitignore b/.gitignore index bef3e67..66354fe 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ /util-linux-2.39-rc3.tar.xz /util-linux-2.39.tar.xz /util-linux-2.39.1.tar.xz +/util-linux-2.39.2.tar.xz diff --git a/libmount-Fix-regression-when-mounting-with-atime.patch b/libmount-Fix-regression-when-mounting-with-atime.patch new file mode 100644 index 0000000..1c98653 --- /dev/null +++ b/libmount-Fix-regression-when-mounting-with-atime.patch @@ -0,0 +1,133 @@ +From 2b99ee2526ae61be761b0e31c50e106dbec5e9e4 Mon Sep 17 00:00:00 2001 +From: Filipe Manana +Date: Thu, 17 Aug 2023 10:20:13 +0100 +Subject: [PATCH] libmount: Fix regression when mounting with atime + +A regression was introduced in v2.39 that causes mounting with the atime +option to fail: + + $ mkfs.ext4 -F /dev/sdi + $ mount -o atime /dev/sdi /mnt/sdi + mount: /mnt/sdi: not mount point or bad option. + dmesg(1) may have more information after failed mount system call. + +The failure comes from the mount_setattr(2) call returning -EINVAL. This +is because we pass an invalid value for the attr_clr argument. From a +strace capture we have: + + mount_setattr(4, "", AT_EMPTY_PATH, {attr_set=0, attr_clr=MOUNT_ATTR_NOATIME, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument) + +We can't pass MOUNT_ATTR_NOATIME to mount_setattr(2) through the attr_clr +argument because all atime options are exclusive, so in order to set atime +one has to pass MOUNT_ATTR__ATIME to attr_clr and leave attr_set as +MOUNT_ATTR_RELATIME (which is defined as a value of 0). + +This can be read from the man page for mount_setattr(2) and also from the +kernel source: + + $ cat fs/namespace.c + static int build_mount_kattr(const struct mount_attr *attr, size_t usize, + struct mount_kattr *kattr, unsigned int flags) + { + (...) + /* + * Since the MOUNT_ATTR_ values are an enum, not a bitmap, + * users wanting to transition to a different atime setting cannot + * simply specify the atime setting in @attr_set, but must also + * specify MOUNT_ATTR__ATIME in the @attr_clr field. + * So ensure that MOUNT_ATTR__ATIME can't be partially set in + * @attr_clr and that @attr_set can't have any atime bits set if + * MOUNT_ATTR__ATIME isn't set in @attr_clr. + */ + if (attr->attr_clr & MOUNT_ATTR__ATIME) { + if ((attr->attr_clr & MOUNT_ATTR__ATIME) != MOUNT_ATTR__ATIME) + return -EINVAL; + + /* + * Clear all previous time settings as they are mutually + * exclusive. + */ + kattr->attr_clr |= MNT_RELATIME | MNT_NOATIME; + switch (attr->attr_set & MOUNT_ATTR__ATIME) { + case MOUNT_ATTR_RELATIME: + kattr->attr_set |= MNT_RELATIME; + break; + case MOUNT_ATTR_NOATIME: + kattr->attr_set |= MNT_NOATIME; + break; + case MOUNT_ATTR_STRICTATIME: + break; + default: + return -EINVAL; + } + (...) + +So fix this by setting attr_clr MOUNT_ATTR__ATIME if we want to clear any +atime related option. + +Signed-off-by: Filipe Manana +--- + libmount/src/optlist.c | 13 ++++++++++++- + tests/expected/libmount/context-mount-flags | 3 +++ + tests/ts/libmount/context | 9 ++++++++- + 3 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c +index e93810b47..d0afc94f7 100644 +--- a/libmount/src/optlist.c ++++ b/libmount/src/optlist.c +@@ -875,7 +875,18 @@ int mnt_optlist_get_attrs(struct libmnt_optlist *ls, uint64_t *set, uint64_t *cl + + if (opt->ent->mask & MNT_INVERT) { + DBG(OPTLIST, ul_debugobj(ls, " clr: %s", opt->ent->name)); +- *clr |= x; ++ /* ++ * All atime settings are mutually exclusive so *clr must ++ * have MOUNT_ATTR__ATIME set. ++ * ++ * See the function fs/namespace.c:build_mount_kattr() ++ * in the linux kernel source. ++ */ ++ if (x == MOUNT_ATTR_RELATIME || x == MOUNT_ATTR_NOATIME || ++ x == MOUNT_ATTR_STRICTATIME) ++ *clr |= MOUNT_ATTR__ATIME; ++ else ++ *clr |= x; + } else { + DBG(OPTLIST, ul_debugobj(ls, " set: %s", opt->ent->name)); + *set |= x; +diff --git a/tests/expected/libmount/context-mount-flags b/tests/expected/libmount/context-mount-flags +index 960641863..eb71323dd 100644 +--- a/tests/expected/libmount/context-mount-flags ++++ b/tests/expected/libmount/context-mount-flags +@@ -3,3 +3,6 @@ ro,nosuid,noexec + successfully mounted + rw,nosuid,noexec + successfully umounted ++successfully mounted ++rw,relatime ++successfully umounted +diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context +index f5b47185e..a5d2e81a3 100755 +--- a/tests/ts/libmount/context ++++ b/tests/ts/libmount/context +@@ -116,8 +116,15 @@ $TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPU + + ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG + is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG +-ts_finalize_subtest + ++# Test that the atime option works after the migration to use the new kernel mount APIs. ++ts_run $TESTPROG --mount -o atime $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG ++$TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG ++is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG ++ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG ++is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG ++ ++ts_finalize_subtest + + ts_init_subtest "mount-loopdev" + mkdir -p $MOUNTPOINT &> /dev/null +-- +2.40.1 + diff --git a/sources b/sources index b3b2ccf..f9489ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39.1.tar.xz) = 8fe2c9014f6161330610f7470b870855cecbd3fab9c187b75d8f22e16573c82516050479be39cfb9f7dd6d7ef1cc298d31d839b194dda5ec4daf0d1197ac71e9 +SHA512 (util-linux-2.39.2.tar.xz) = cebecdd62749d0aeea2c4faf7ad1606426eff03ef3b15cd9c2df1126f216a4ed546d8fc3218c649fa95944eb87a98bb6a7cdd0bea31057c481c5cf608ffc19a3 diff --git a/util-linux.spec b/util-linux.spec index 2c01fb0..cdf1335 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.39.1 -Release: 3%{?dist} +Version: 2.39.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -98,6 +98,10 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +### Upstream +### +Patch2: libmount-Fix-regression-when-mounting-with-atime.patch + %description The util-linux package contains a large variety of low-level system @@ -926,6 +930,11 @@ fi %changelog +* Thu Aug 17 2023 Karel Zak - 2.39.2-1 +- fix libmount atime regression +- upgrade to v2.39.2 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.2-ReleaseNotes + * Sat Jul 22 2023 Fedora Release Engineering - 2.39.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 9a5289e70c21ec776bfc963a31fa56d7f90eb922 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 1 Dec 2023 20:12:29 +0100 Subject: [PATCH 355/425] Move sulogin to util-linux-core An initrd will almost always need sulogin installed for debugging purposes. This means that we're forced to install the full util-linux into initrds. Let's allow installing just util-linux-core in initrds by moving sulogin to util-linux-core. --- util-linux.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index cdf1335..41f7d0e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -622,7 +622,6 @@ fi %{_mandir}/man8/rfkill.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/setarch.8* -%{_mandir}/man8/sulogin.8.gz %{_mandir}/man8/swaplabel.8* %{_mandir}/man8/wdctl.8.gz %{_mandir}/man8/wipefs.8* @@ -651,7 +650,6 @@ fi %{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser -%{_sbindir}/sulogin %{_sbindir}/swaplabel %{_sbindir}/wipefs %{_sbindir}/zramctl @@ -831,6 +829,7 @@ fi %{_mandir}/man8/mkswap.8* %{_mandir}/man8/mount.8* %{_mandir}/man8/partx.8* +%{_mandir}/man8/sulogin.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/switch_root.8* @@ -842,6 +841,7 @@ fi %{_sbindir}/losetup %{_sbindir}/mkswap %{_sbindir}/partx +%{_sbindir}/sulogin %{_sbindir}/swapoff %{_sbindir}/swapon %{_sbindir}/switch_root @@ -930,6 +930,9 @@ fi %changelog +* Fri Dec 2 2023 Daan De Meyer - 2.39.2-2 +- Move sulogin to util-linux-core + * Thu Aug 17 2023 Karel Zak - 2.39.2-1 - fix libmount atime regression - upgrade to v2.39.2 From 58dc9b6959de1359fcc033f3e9520537f4d75863 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sun, 31 Dec 2023 12:05:50 +0100 Subject: [PATCH 356/425] 2.39.3-1: upgrade --- .gitignore | 1 + sources | 2 +- util-linux.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 66354fe..3116b34 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,4 @@ /util-linux-2.39.tar.xz /util-linux-2.39.1.tar.xz /util-linux-2.39.2.tar.xz +/util-linux-2.39.3.tar.xz diff --git a/sources b/sources index f9489ea..a8b2f3e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39.2.tar.xz) = cebecdd62749d0aeea2c4faf7ad1606426eff03ef3b15cd9c2df1126f216a4ed546d8fc3218c649fa95944eb87a98bb6a7cdd0bea31057c481c5cf608ffc19a3 +SHA512 (util-linux-2.39.3.tar.xz) = a2de1672f06ca5d2d431db1265a8499808770c3781019ec4a3a40170df4685826d8e3ca120841dcc5df4681ca8c935a993317bd0dc70465b21bf8e0efef65afa diff --git a/util-linux.spec b/util-linux.spec index 41f7d0e..da2df4c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.39.2 -Release: 2%{?dist} +Version: 2.39.3 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -930,6 +930,10 @@ fi %changelog +* Sun Dec 31 2023 Karel Zak - 2.39.3-1 +- upgrade to v2.39.3 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.3-ReleaseNotes + * Fri Dec 2 2023 Daan De Meyer - 2.39.2-2 - Move sulogin to util-linux-core From 302188f83333a90b9a79183f8a22c2132012654d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sun, 31 Dec 2023 12:08:22 +0100 Subject: [PATCH 357/425] fix date typo, remove obsolete patch --- util-linux.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index da2df4c..af943d7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -98,11 +98,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -### Upstream -### -Patch2: libmount-Fix-regression-when-mounting-with-atime.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -934,7 +929,7 @@ fi - upgrade to v2.39.3 https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.3-ReleaseNotes -* Fri Dec 2 2023 Daan De Meyer - 2.39.2-2 +* Sat Dec 2 2023 Daan De Meyer - 2.39.2-2 - Move sulogin to util-linux-core * Thu Aug 17 2023 Karel Zak - 2.39.2-1 From a16ce36c6f06a629f9e26f56735d587d22105fa5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 11 Jan 2024 15:18:52 +0100 Subject: [PATCH 358/425] 2.39.3-2: fix util-linux-i18n conflicts --- util-linux.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index af943d7..e937311 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -419,6 +419,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a # temporary remove to avoid conflicts with bash-completion pkg rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} +# remove unvanted translations (conflicts with shadow-utils) +rm -f $RPM_BUILD_ROOT%{_mandir}/*/man1/newgrp.* +rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vigr.* +rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vigw.* + + # find MO files %find_lang %{name} --all-name --with-man @@ -923,8 +929,10 @@ fi %files -n util-linux-i18n -f %{name}.lang - %changelog +* Thu Jan 11 2024 Karel Zak - 2.39.3-2 +- fix #2256391 util-linux-i18n conflicts with file from package shadow-utils + * Sun Dec 31 2023 Karel Zak - 2.39.3-1 - upgrade to v2.39.3 https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.3-ReleaseNotes From 8ecb7f1beee890631537d423bd33af2b7f936ae5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 25 Jan 2024 11:12:49 +0100 Subject: [PATCH 359/425] 2.39.3-3: fix libsmartcols --- libsmartcols-fix-columns-reduction.patch | 69 ++++++++++++++++++++++++ util-linux.spec | 7 ++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 libsmartcols-fix-columns-reduction.patch diff --git a/libsmartcols-fix-columns-reduction.patch b/libsmartcols-fix-columns-reduction.patch new file mode 100644 index 0000000..6c78ad9 --- /dev/null +++ b/libsmartcols-fix-columns-reduction.patch @@ -0,0 +1,69 @@ +From bb525b59190e3b40b2424f4f1febc22ca9c6b9f3 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 18 Jan 2024 13:09:24 +0100 +Subject: [PATCH] libsmartcols: fix columns reduction + +* reduce_to_68() does not care if subtract from column width is + possible (and width is size_t) + +* improve some calculations with 'double' + +Fixes: https://github.com/util-linux/util-linux/issues/2563 +Signed-off-by: Karel Zak +--- + libsmartcols/src/calculate.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c +index e9db3b299..84198da3b 100644 +--- a/libsmartcols/src/calculate.c ++++ b/libsmartcols/src/calculate.c +@@ -118,7 +118,7 @@ static void count_column_deviation(struct libscols_table *tb, struct libscols_co + } + + if (n) +- st->width_avg = sum / n; ++ st->width_avg = (double) sum / (double) n; + + /* count deviation */ + if (n > 1) { +@@ -133,7 +133,7 @@ static void count_column_deviation(struct libscols_table *tb, struct libscols_co + st->width_sqr_sum += diff * diff; /* aka pow(x, 2) */ + } + +- variance = st->width_sqr_sum / (n - 1); ++ variance = st->width_sqr_sum / (double) (n - 1); + st->width_deviation = sqrtroot(variance); + } + +@@ -240,8 +240,8 @@ static int cmp_deviation(struct list_head *a, struct list_head *b, + struct libscols_column *ca = list_entry(a, struct libscols_column, cl_columns); + struct libscols_column *cb = list_entry(b, struct libscols_column, cl_columns); + +- double xa = ca->wstat.width_avg + (3*ca->wstat.width_deviation); +- double xb = cb->wstat.width_avg + (3*cb->wstat.width_deviation); ++ double xa = ca->wstat.width_avg + (3.0 * ca->wstat.width_deviation); ++ double xb = cb->wstat.width_avg + (3.0 * cb->wstat.width_deviation); + + return cmp_numbers(xa, xb); + } +@@ -280,9 +280,15 @@ static void reduce_to_68(struct libscols_column *cl, size_t wanted) + if (st->width_deviation < 1.0) + return; + +- new = st->width_avg + st->width_deviation; ++ new = (size_t) (st->width_avg + st->width_deviation); ++ + if (new < st->width_min) + new = st->width_min; ++ else if (new > st->width_max) ++ new = st->width_max; ++ ++ if (new >= cl->width) ++ return; + + if (cl->width - new > wanted) + cl->width -= wanted; +-- +2.43.0 + diff --git a/util-linux.spec b/util-linux.spec index e937311..c0295e8 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -97,6 +97,8 @@ Patch0: login-lastlog-create.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +# 2258501 - dnf5 unusable with libsmartcols +Patch2: libsmartcols-fix-columns-reduction.patch %description The util-linux package contains a large variety of low-level system @@ -930,6 +932,9 @@ fi %files -n util-linux-i18n -f %{name}.lang %changelog +* Thu Jan 25 2024 Karel Zak - 2.39.3-3 +- fix #2258501 - dnf5 unusable with libsmartcols + * Thu Jan 11 2024 Karel Zak - 2.39.3-2 - fix #2256391 util-linux-i18n conflicts with file from package shadow-utils From c9ce0bbf549617eeadd0991285ecc20e15f8512f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 25 Jan 2024 13:09:13 +0100 Subject: [PATCH 360/425] 2.39.3-4: improve util-linux-i18n conflicts --- util-linux.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index c0295e8..50ead93 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -424,7 +424,7 @@ rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} # remove unvanted translations (conflicts with shadow-utils) rm -f $RPM_BUILD_ROOT%{_mandir}/*/man1/newgrp.* rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vigr.* -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vigw.* +rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vipw.* # find MO files @@ -932,6 +932,9 @@ fi %files -n util-linux-i18n -f %{name}.lang %changelog +* Thu Jan 25 2024 Karel Zak - 2.39.3-4 +- improve fix for #2256391 (util-linux-i18n conflicts) + * Thu Jan 25 2024 Karel Zak - 2.39.3-3 - fix #2258501 - dnf5 unusable with libsmartcols From bac574c2831f616bc45a4878089517120a1eda5b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 5 Feb 2024 10:29:29 +0100 Subject: [PATCH 361/425] 2.40-0.1: upgrade to v2.40-rc1 --- .gitignore | 1 + libsmartcols-fix-columns-reduction.patch | 69 ------------------------ sources | 2 +- util-linux.spec | 28 +++++++--- 4 files changed, 24 insertions(+), 76 deletions(-) delete mode 100644 libsmartcols-fix-columns-reduction.patch diff --git a/.gitignore b/.gitignore index 3116b34..3e24365 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,4 @@ /util-linux-2.39.1.tar.xz /util-linux-2.39.2.tar.xz /util-linux-2.39.3.tar.xz +/util-linux-2.40-rc1.tar.xz diff --git a/libsmartcols-fix-columns-reduction.patch b/libsmartcols-fix-columns-reduction.patch deleted file mode 100644 index 6c78ad9..0000000 --- a/libsmartcols-fix-columns-reduction.patch +++ /dev/null @@ -1,69 +0,0 @@ -From bb525b59190e3b40b2424f4f1febc22ca9c6b9f3 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 18 Jan 2024 13:09:24 +0100 -Subject: [PATCH] libsmartcols: fix columns reduction - -* reduce_to_68() does not care if subtract from column width is - possible (and width is size_t) - -* improve some calculations with 'double' - -Fixes: https://github.com/util-linux/util-linux/issues/2563 -Signed-off-by: Karel Zak ---- - libsmartcols/src/calculate.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c -index e9db3b299..84198da3b 100644 ---- a/libsmartcols/src/calculate.c -+++ b/libsmartcols/src/calculate.c -@@ -118,7 +118,7 @@ static void count_column_deviation(struct libscols_table *tb, struct libscols_co - } - - if (n) -- st->width_avg = sum / n; -+ st->width_avg = (double) sum / (double) n; - - /* count deviation */ - if (n > 1) { -@@ -133,7 +133,7 @@ static void count_column_deviation(struct libscols_table *tb, struct libscols_co - st->width_sqr_sum += diff * diff; /* aka pow(x, 2) */ - } - -- variance = st->width_sqr_sum / (n - 1); -+ variance = st->width_sqr_sum / (double) (n - 1); - st->width_deviation = sqrtroot(variance); - } - -@@ -240,8 +240,8 @@ static int cmp_deviation(struct list_head *a, struct list_head *b, - struct libscols_column *ca = list_entry(a, struct libscols_column, cl_columns); - struct libscols_column *cb = list_entry(b, struct libscols_column, cl_columns); - -- double xa = ca->wstat.width_avg + (3*ca->wstat.width_deviation); -- double xb = cb->wstat.width_avg + (3*cb->wstat.width_deviation); -+ double xa = ca->wstat.width_avg + (3.0 * ca->wstat.width_deviation); -+ double xb = cb->wstat.width_avg + (3.0 * cb->wstat.width_deviation); - - return cmp_numbers(xa, xb); - } -@@ -280,9 +280,15 @@ static void reduce_to_68(struct libscols_column *cl, size_t wanted) - if (st->width_deviation < 1.0) - return; - -- new = st->width_avg + st->width_deviation; -+ new = (size_t) (st->width_avg + st->width_deviation); -+ - if (new < st->width_min) - new = st->width_min; -+ else if (new > st->width_max) -+ new = st->width_max; -+ -+ if (new >= cl->width) -+ return; - - if (cl->width - new > wanted) - cl->width -= wanted; --- -2.43.0 - diff --git a/sources b/sources index a8b2f3e..07a0cbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39.3.tar.xz) = a2de1672f06ca5d2d431db1265a8499808770c3781019ec4a3a40170df4685826d8e3ca120841dcc5df4681ca8c935a993317bd0dc70465b21bf8e0efef65afa +SHA512 (util-linux-2.40-rc1.tar.xz) = ba307c4686c7989c1d563f19ca6a1c06c237de2fe063a51e28aaefee7a1afab49deb94abd80b4263c2d671f791798112b287dc3f1b3d73d755119e01883aaeb0 diff --git a/util-linux.spec b/util-linux.spec index 50ead93..d7c000a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,13 +1,13 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.39.3 -Release: 4%{?dist} +Version: 2.40 +Release: 0.1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version} +%global upstream_version %{version}-rc1 %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -97,8 +97,6 @@ Patch0: login-lastlog-create.patch # Add `/run/motd.d` to the hardcoded MOTD_FILE # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -# 2258501 - dnf5 unusable with libsmartcols -Patch2: libsmartcols-fix-columns-reduction.patch %description The util-linux package contains a large variety of low-level system @@ -309,6 +307,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --disable-silent-rules \ --disable-bfs \ --disable-pg \ + --disable-liblastlog2 \ --enable-chfn-chsh \ --enable-usrdir-path \ --enable-write \ @@ -505,6 +504,8 @@ fi %{_bindir}/colrm %{_bindir}/column %{_bindir}/eject +%{_bindir}/enosys +%{_bindir}/exch %{_bindir}/fallocate %{_bindir}/fincore %{_bindir}/fadvise @@ -517,6 +518,7 @@ fi %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu +%{_bindir}/lsclocks %{_bindir}/lsfd %{_bindir}/lsipc %{_bindir}/lsirq @@ -535,6 +537,7 @@ fi %{_bindir}/scriptlive %{_bindir}/scriptreplay %{_bindir}/setarch +%{_bindir}/setpgid %{_bindir}/setpriv %{_bindir}/setterm %{_bindir}/uclampset @@ -555,7 +558,9 @@ fi %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* %{_mandir}/man1/eject.1* -%{_mandir}/man1/fadvise.1.* +%{_mandir}/man1/enosys.1* +%{_mandir}/man1/exch.1* +%{_mandir}/man1/fadvise.1* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/fincore.1* %{_mandir}/man1/getopt.1* @@ -566,6 +571,7 @@ fi %{_mandir}/man1/login.1* %{_mandir}/man1/look.1* %{_mandir}/man1/lscpu.1* +%{_mandir}/man1/lsclocks.1* %{_mandir}/man1/lsfd.1* %{_mandir}/man1/lsipc.1* %{_mandir}/man1/lsirq.1* @@ -582,6 +588,7 @@ fi %{_mandir}/man1/script.1* %{_mandir}/man1/scriptlive.1* %{_mandir}/man1/scriptreplay.1* +%{_mandir}/man1/setpgid.1* %{_mandir}/man1/setpriv.1* %{_mandir}/man1/setterm.1* %{_mandir}/man1/su.1* @@ -595,6 +602,7 @@ fi %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* %{_mandir}/man5/fstab.5* +%{_mandir}/man5/scols-filter.5* %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* %{_mandir}/man8/blkdiscard.8* @@ -672,6 +680,8 @@ fi %{compldir}/ctrlaltdel %{compldir}/delpart %{compldir}/eject +%{compldir}/enosys +%{compldir}/exch %{compldir}/fadvise %{compldir}/fallocate %{compldir}/fdisk @@ -691,6 +701,7 @@ fi %{compldir}/look %{compldir}/lsblk %{compldir}/lscpu +%{compldir}/lsclocks %{compldir}/lsipc %{compldir}/lsirq %{compldir}/lslocks @@ -718,6 +729,7 @@ fi %{compldir}/scriptreplay %{compldir}/setarch %{compldir}/setpriv +%{compldir}/setpgid %{compldir}/setterm %{compldir}/su %{compldir}/swaplabel @@ -932,6 +944,10 @@ fi %files -n util-linux-i18n -f %{name}.lang %changelog +* Fri Feb 2 2024 Karel Zak - 2.40-0.1 +- upgrade to v2.40-rc1 +- add setpgid, enosys, exch and lsclocks commands + * Thu Jan 25 2024 Karel Zak - 2.39.3-4 - improve fix for #2256391 (util-linux-i18n conflicts) From 1d0d7588dd2bc5efd88533d4c6170ca978abb45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 10:42:42 +0100 Subject: [PATCH 362/425] Simplify systemd scriplets It is better to use a single %systemd_* macro to avoid some executions and repeated checks. --- util-linux.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index d7c000a..e2b6fb2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -454,16 +454,14 @@ exit 0 %systemd_post uuidd.service if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then # install - /bin/systemctl start uuidd.service > /dev/null 2>&1 || : + /usr/bin/systemctl start uuidd.service > /dev/null 2>&1 || : fi %preun -n uuidd -%systemd_preun uuidd.socket -%systemd_preun uuidd.service +%systemd_preun uuidd.socket uuidd.service %postun -n uuidd -%systemd_postun_with_restart uuidd.socket -%systemd_postun_with_restart uuidd.service +%systemd_postun_with_restart uuidd.socket uuidd.service %triggerpostun -- util-linux < 2.35.1-7 if [ $1 -gt 1 ] && [ -x /usr/bin/systemctl ] ; then From a4d9e81291467ad01ec62d23a69a3efa4966a38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 10:48:49 +0100 Subject: [PATCH 363/425] Replace systemd dependencies with just ordering systemd-units has been merged into systemd a long time ago. But we don't really need this dependency at all. Let's just declare ordering, so that this package is installed after systemd if both are installed in the same transaction. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_dependencies_on_the_systemd_package for discussion and justification. --- util-linux.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index e2b6fb2..4e0e82f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -253,10 +253,8 @@ See also the "uuid-devel" package, which is a separate implementation. Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Requires: libuuid = %{version}-%{release} License: GPLv2 -Requires: systemd Requires(pre): shadow-utils -Requires(post): systemd-units -Requires(preun): systemd-units +%{?systemd_ordering} %description -n uuidd The uuidd package contains a userspace daemon (uuidd) which guarantees From e5d9a1e3ef8c2d336a0d75686b6b2d82d4799db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 10:57:28 +0100 Subject: [PATCH 364/425] Add unit scriptlets for fstrim.service and .timer https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_scriptlets We want to "restart" the timer so that the it's rescheduled if there are any changes to frequency or other settings. This will not cause the timer to fire immediately. We don't restart the service itself, because, if it happens to be running, we want it to just finish as it was. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2262393 for new installations. A preset call was missing for fstrim.timer, so if util-linux was installed after systemd, the unit would not be enabled. --- util-linux.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 4e0e82f..7754a35 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -438,6 +438,15 @@ 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|uname26)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files +%post +%systemd_post fstrim.{service,timer} + +%preun +%systemd_preun fstrim.{service,timer} + +%postun +%systemd_postun_with_restart fstrim.timer +%systemd_postun fstrim.service %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd From dc6a971801c751b973a53f5a7372f529e5960fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 11:06:22 +0100 Subject: [PATCH 365/425] Enable fstrim.timer on upgrades This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2262393 for upgrades. Since the timer was not enabled previously, we want to enable it here so that https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer is actually true. --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 7754a35..7997a0e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -470,9 +470,9 @@ fi %postun -n uuidd %systemd_postun_with_restart uuidd.socket uuidd.service -%triggerpostun -- util-linux < 2.35.1-7 +%triggerpostun -- util-linux < 2.40-0.2 if [ $1 -gt 1 ] && [ -x /usr/bin/systemctl ] ; then - # Enable fstrim.timer for upgrades to F32 + # Enable fstrim.timer for upgrades from older versions /usr/bin/systemctl --no-reload preset fstrim.timer || : fi From b15359d1d4dac1c5f61a3e300813f9e85aac93d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 11:24:54 +0100 Subject: [PATCH 366/425] =?UTF-8?q?$RPM=5FBUILD=5FROOT=20=E2=86=92=20%{bui?= =?UTF-8?q?ldroot}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is shorter and also does not mess up the host system if somebody makes a typo. --- util-linux.spec | 56 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 7997a0e..268c5aa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -336,31 +336,31 @@ make check %install -mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -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}%{_tmpfilesdir}/tmpfiles.d +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_mandir}/man{1,6,8,5} +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} +mkdir -p %{buildroot}%{_tmpfilesdir}/tmpfiles.d # install util-linux %make_install # And a dirs uuidd needs that the makefiles don't create -install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_tmpfilesdir}/uuidd.conf -install -d ${RPM_BUILD_ROOT}/run/uuidd -install -d ${RPM_BUILD_ROOT}/var/lib/libuuid +install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/uuidd.conf +install -d %{buildroot}/run/uuidd +install -d %{buildroot}/var/lib/libuuid # /etc/adjtime -install -m 644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/adjtime +install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime # libtool junk -rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a +rm -rf %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la +rm -f %{buildroot}%{_libdir}/python*/site-packages/*.a %ifarch %{sparc} -rm -rf ${RPM_BUILD_ROOT}%{_bindir}/sunhostid -cat << E-O-F > ${RPM_BUILD_ROOT}%{_bindir}/sunhostid +rm -rf %{buildroot}%{_bindir}/sunhostid +cat << E-O-F > %{buildroot}%{_bindir}/sunhostid #!/bin/sh # this should be _bindir/sunhostid or somesuch. # Copyright 1999 Peter Jones, . @@ -372,12 +372,12 @@ echo \$idprom|dd bs=1 skip=27 count=6 echo ) 2>/dev/null E-O-F -chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid +chmod 755 %{buildroot}%{_bindir}/sunhostid %endif # PAM settings { - pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d + pushd %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE1} ./login install -m 644 %{SOURCE2} ./remote install -m 644 %{SOURCE3} ./chsh @@ -390,8 +390,8 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid } %ifnarch s390 s390x -ln -sf hwclock ${RPM_BUILD_ROOT}%{_sbindir}/clock -echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 +ln -sf hwclock %{buildroot}%{_sbindir}/clock +echo ".so man8/hwclock.8" > %{buildroot}%{_mandir}/man8/clock.8 %endif # unsupported on SPARCs @@ -401,27 +401,27 @@ for I in /sbin/sfdisk \ /sbin/cfdisk \ %{_mandir}/man8/cfdisk.8*; do - rm -f $RPM_BUILD_ROOT$I + rm -f %{buildroot}$I done %endif # we install getopt-*.{bash,tcsh} by doc directive #chmod 644 misc-utils/getopt-*.{bash,tcsh} -#rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt/* -#rmdir ${RPM_BUILD_ROOT}%{_datadir}/doc/util-linux/getopt +#rm -f %{buildroot}%{_datadir}/doc/util-linux/getopt/* +#rmdir %{buildroot}%{_datadir}/doc/util-linux/getopt ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a +rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a # temporary remove to avoid conflicts with bash-completion pkg -rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} +rm -f %{buildroot}%{compldir}/{mount,umount} # remove unvanted translations (conflicts with shadow-utils) -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man1/newgrp.* -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vigr.* -rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vipw.* +rm -f %{buildroot}%{_mandir}/*/man1/newgrp.* +rm -f %{buildroot}%{_mandir}/*/man8/vigr.* +rm -f %{buildroot}%{_mandir}/*/man8/vipw.* # find MO files @@ -430,11 +430,11 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/vipw.* touch %{name}.files # create list of setarch(8) symlinks -find $RPM_BUILD_ROOT%{_bindir}/ -regextype posix-egrep -type l \ +find %{buildroot}%{_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|uname26)$" \ -printf "%{_bindir}/%f\n" >> %{name}.files -find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ +find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files From ceb56aabcb56f63c095e4c928e28853578ca4bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 11:27:12 +0100 Subject: [PATCH 367/425] Replace loop by a single invocation with multiple arguments --- util-linux.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 268c5aa..83b980c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -396,13 +396,10 @@ echo ".so man8/hwclock.8" > %{buildroot}%{_mandir}/man8/clock.8 # unsupported on SPARCs %ifarch %{sparc} -for I in /sbin/sfdisk \ - %{_mandir}/man8/sfdisk.8* \ - /sbin/cfdisk \ - %{_mandir}/man8/cfdisk.8*; do - - rm -f %{buildroot}$I -done +rm -f %{buildroot}/sbin/sfdisk \ + %{buildroot}%{_mandir}/man8/sfdisk.8* \ + %{buildroot}/sbin/cfdisk \ + %{buildroot}%{_mandir}/man8/cfdisk.8* %endif # we install getopt-*.{bash,tcsh} by doc directive From 5854ee9f05f8c217cb105fa23a10f4d00f15b909 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 7 Feb 2024 12:54:33 +0100 Subject: [PATCH 368/425] add autorelease and autochangelog --- changelog | 2341 +++++++++++++++++++++++++++++++++++++++++++++++ util-linux.spec | 2340 +--------------------------------------------- 2 files changed, 2343 insertions(+), 2338 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..e9f4163 --- /dev/null +++ b/changelog @@ -0,0 +1,2341 @@ +* Wed Feb 7 2024 Karel Zak - 2.40-0.8 +- add autorelease and autochangelog + +* Fri Feb 2 2024 Karel Zak - 2.40-0.1 +- upgrade to v2.40-rc1 +- add setpgid, enosys, exch and lsclocks commands + +* Thu Jan 25 2024 Karel Zak - 2.39.3-4 +- improve fix for #2256391 (util-linux-i18n conflicts) + +* Thu Jan 25 2024 Karel Zak - 2.39.3-3 +- fix #2258501 - dnf5 unusable with libsmartcols + +* Thu Jan 11 2024 Karel Zak - 2.39.3-2 +- fix #2256391 util-linux-i18n conflicts with file from package shadow-utils + +* Sun Dec 31 2023 Karel Zak - 2.39.3-1 +- upgrade to v2.39.3 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.3-ReleaseNotes + +* Sat Dec 2 2023 Daan De Meyer - 2.39.2-2 +- Move sulogin to util-linux-core + +* Thu Aug 17 2023 Karel Zak - 2.39.2-1 +- fix libmount atime regression +- upgrade to v2.39.2 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.2-ReleaseNotes + +* Sat Jul 22 2023 Fedora Release Engineering - 2.39.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 28 2023 Python Maint - 2.39.1-2 +- Rebuilt for Python 3.12 + +* Wed Jun 28 2023 Karel Zak - 2.39.1-1 +- upgrade to v2.39.1 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.1-ReleaseNotes + +* Tue Jun 13 2023 Python Maint - 2.39-5 +- Rebuilt for Python 3.12 + +* Thu May 25 2023 Karel Zak - 2.39-4 +- fix mount when /sbin/mount. executed + +* Mon May 22 2023 Karel Zak - 2.39-3 +- fix mount options prepend/insert and merging (upstream) + +* Thu May 18 2023 Adam Williamson - 2.39-2 +- Have util-linux obsolete and provide util-linux-user + +* Thu May 18 2023 Karel Zak - 2.39-1 +- upgrade to v2.39 +- remove dependence on libuser +- remove util-linux-user subpackage +- enable translated man pages +- add util-linux-i18n subpackage + +* Wed Apr 19 2023 Karel Zak - 2.39-0.5 +- upgrade to v2.39-rc3 (fixes XFS and rw/ro issues) + +* Wed Apr 5 2023 Karel Zak - 2.39-0.4 +- fix #2180593 (superblock reconfiguration libmount issue) + +* Tue Apr 4 2023 Karel Zak - 2.39-0.3 +- fix spec file + +* Tue Apr 4 2023 Karel Zak - 2.39-0.2 +- upgrade to v2.39-rc2 + +* Mon Mar 20 2023 Karel Zak - 2.39-0.1 +- upgrade to v2.39-rc1 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes + +* Sat Jan 21 2023 Fedora Release Engineering - 2.38.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Dec 17 2022 Florian Weimer - 2.38.1-3 +- Backport upstream patch to fix C99 issue in kill + +* Mon Aug 22 2022 Karel Zak - 2.38.1-2 +- improve tmpfiles.d use in spec file + +* Thu Aug 4 2022 Karel Zak - 2.38.1-1 +- upgrade to v2.38.1 + https://kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes + +* Sat Jul 23 2022 Fedora Release Engineering - 2.38-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 2.38-4 +- Rebuilt for Python 3.11 + +* Wed Apr 13 2022 Karel Zak - 2.38-3 +- fix spec file changelog order + +* Wed Mar 30 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-2 +- simplify creation of /etc/mtab symlink + +* Wed Mar 30 2022 Karel Zak - 2.38-1 +- upgrade to v2.38 +- don't (re)generate build-system +- modernize spec file style (thanks to Zbigniew) + +* Thu Mar 17 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-0.5 +- Drop very old upgrade scriptlet for libblkid + +* Wed Mar 16 2022 Karel Zak - 2.38-0.4 +- upgrade to v2.38-rc3 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38-ReleaseNotes + +* Wed Feb 2 2022 Karel Zak - 2.38-0.3 +- add /usr/lib/tmpfiles.d/uuidd.conf (based on #2047952) + +* Wed Feb 2 2022 Karel Zak - 2.38-0.2 +- release ownership of /var/log/lastlog + +* Mon Jan 31 2022 Karel Zak - 2.38-0.1 +- upgrade to v2.38-rc1 + +* Sat Jan 22 2022 Fedora Release Engineering - 2.37.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Aug 17 2021 Karel Zak - 2.37.2-1 +* upgrade to v2.37.2 + +* Fri Jul 23 2021 Fedora Release Engineering - 2.37-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jul 14 2021 Karel Zak - 2.37-5 +- remove unused util-linux-60-raw.rules + +* Wed Jul 14 2021 Karel Zak - 2.37-4 +- disable raw(8) - no more supported since Linux v5.14 (commit 03e4922f1c81fc2ed3a87b4f91a8d3aafc7e093) +- remove dependence on deprecated pcre2posix.h +- fix #1981729 - close_range() 3rd argument + +* Wed Jun 16 2021 Richard W.M. Jones - 2.37-3 +- Rebuild for updated pcre2 + +* Fri Jun 04 2021 Python Maint - 2.37-2 +- Rebuilt for Python 3.10 + +* Tue Jun 1 2021 Karel Zak - 2.37-1 +- upgrade to v2.37 +- introduce util-linux-core subpackage + +* Fri May 14 2021 Karel Zak - 2.37-0.1 +- upgrade to v2.37-rc2 + https://kernel.org/pub/linux/utils/util-linux/v2.37/v2.37-ReleaseNotes + +* Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 2.36.2-3 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Mar 2 2021 Karel Zak - 2.36.2-2 +- spec file cleanup https://src.fedoraproject.org/rpms/util-linux/pull-request/9 + +* Fri Feb 12 2021 Karel Zak - 2.36.2-1 +- upgrade to stable upstream 2.36.2 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.2-ReleaseNotes + +* Wed Jan 27 2021 Kelvin Fan - 2.36.1-4 +- Add patch to add /run/motd.d to default MOTD_FILE in login(1) + +* Thu Jan 14 2021 Karel Zak - 2.36.1-3 +- improve uuidd scriptlets (fix #1767553) + +* Thu Nov 19 2020 Karel Zak - 2.36.1-2 +- remove unused patches +- remove versions and seq.numbers from patch names +- fix mount "symfollow" issue (upstream patch) + +* Mon Nov 16 2020 Karel Zak - 2.36.1-1 +- upgrade to stable upstream 2.36.1 + +* Thu Nov 12 2020 Tom Stellard - 2.36-4 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Tue Sep 01 2020 Karel Zak - 2.36-3 +- remove mountinfo workaround (unnecessary for kernel 5.8) +- fix #1860461 - sfdisk regression creating simple 3 partition MBR disk + +* Wed Jul 29 2020 Fedora Release Engineering - 2.36-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jul 23 2020 Karel Zak - 2.36-1 +- upgrade to upstream release v2.36 + https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36-ReleaseNotes +- add irqtop and lsirq commands + +* Tue May 26 2020 Miro HronÄok - 2.35.2-2 +- Rebuilt for Python 3.9 + +* Wed May 20 2020 Karel Zak - 2.35.2-1 +- upgrade to upstream bug fix release 2.35.2 + https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35.2-ReleaseNotes + +* Wed Apr 15 2020 Karel Zak - 2.35.1-9 +- fix copy & past bug in specfile changelog + +* Wed Apr 15 2020 Karel Zak - 2.35.1-8 +- fix #1822226 - remove pam_console dependency +- fix #1823463 - hwclock unable to set system time + +* Tue Mar 24 2020 Kalev Lember - 2.35.1-7 +- Another attempt at enabling fstrim.timer on F32 upgrades (#1811506) + +* Thu Mar 19 2020 Karel Zak - 2.35.1-6 +- fix #1811506 (triggerpostun) + +* Tue Feb 25 2020 Karel Zak - 2.35.1-5 +- fix lsblk -P output for RAIDs, etc. + +* Thu Feb 06 2020 Karel Zak - 2.35.1-4 +- add triggerpostun for fstrim.timer (#1785041, FESCo #2309) + +* Tue Feb 04 2020 Karel Zak - 2.35.1-3 +- fix fstrim.service (util-linux github #948) + +* Tue Feb 04 2020 Karel Zak - 2.35.1-2 +- fix sfdisk dump issue (util-linux github #949) + +* Mon Feb 03 2020 Karel Zak - 2.35.1-1 +- upgrade to upstream bug fix release 2.35.1 + +* Fri Jan 31 2020 Fedora Release Engineering - 2.35-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Karel Zak - 2.35-1 +- upgrade to v2.35 + +* Thu Jan 9 2020 Karel Zak - 2.35-0.5 +- upgrade to v2.35-rc2 + +* Fri Dec 20 2019 Karel Zak - 2.35-0.4 +- fix #1784536 - Segfaults in agetty during Cloud image testing + +* Fri Dec 20 2019 Karel Zak - 2.35-0.3 +- upgrade to the upstream git snapshot (v2.35-rc1-20-g63f8c66af) +- fix #1783066 - Fedora-Rawhide images do not boot + +* Thu Dec 12 2019 Adam Williamson - 2.35-0.2 +- Revert upstream commit 7ef86a0 to fix RHBZ #1783066 + +* Wed Dec 11 2019 Karel Zak - 2.35-0.1 +- upgrade to v2.35-rc1 + https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35-ReleaseNotes + +* Fri Sep 13 2019 Karel Zak - 2.34-6 +- fix https://github.com/systemd/systemd/issues/10872 + +* Thu Sep 12 2019 Karel Zak - 2.34-5 +- fix #1751290 - regression: lsblk not showing PKNAME in f31+ + +* Thu Sep 05 2019 Karel Zak - 2.34-4 +- add BuildRequires: readline for fdisks + +* Mon Aug 19 2019 Miro HronÄok - 2.34-3 +- Rebuilt for Python 3.8 + +* Wed Jul 24 2019 Karel Zak - 2.34-2 +- fix lscpu compilation on ppc + +* Fri Jun 14 2019 Karel Zak - 2.34-1 +- upgrade to v2.34 + +* Thu May 30 2019 Karel Zak - 2.34-0.2 +- upgrade to v2.34-rc2 + +* Tue Apr 30 2019 Karel Zak - 2.34-0.1 +- add command hardlink(1) (merged into util-linux upstream) +- upgrade to v2.34-rc1 + http://www.kernel.org/pub/linux/utils/util-linux/v2.34/v2.34-ReleaseNotes + +* Tue Apr 9 2019 Karel Zak - 2.33.2-1 +- upgrade to v2.33.2 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.2-ReleaseNotes + +* Thu Mar 07 2019 Igor Gnatenko - 2.33.1-4 +- Remove obsolete scriptlets + +* Sun Feb 03 2019 Fedora Release Engineering - 2.33.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 14 2019 Björn Esser - 2.33.1-2 +- Rebuilt for libcrypt.so.2 (#1666033) + +* Wed Jan 9 2019 Karel Zak - 2.33.1-1 +- upgrade to v2.33.1 + https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.1-ReleaseNotes + +* Thu Nov 1 2018 Karel Zak - 2.33-0.1 +- Remove ldconfig scriptlet, now done via. transfiletrigger in glibc [James Antill] +- upgrade to v2.33-rc2 + http://www.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33-ReleaseNotes + +* Mon Jul 16 2018 Karel Zak - 2.32.1-1 +- upgrade to v2.32.1 + http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32.1-ReleaseNotes + +* Sat Jul 14 2018 Fedora Release Engineering - 2.32-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro HronÄok - 2.32-6 +- Rebuilt for Python 3.7 + +* Fri May 18 2018 Karel Zak - 2.32-5 +- move /etc/adjtime config from initscripts to util-linux + +* Wed Apr 11 2018 Karel Zak - 2.32-4 +- fix #1560642 - uuidd.service does not start + +* Tue Apr 10 2018 Karel Zak - 2.32-3 +- remove unused build option --enable-libmount-force-mountinfo (it's default now) + +* Tue Mar 27 2018 Karel Zak - 2.32-2 +- fix #1560283 - column does not properly handle spaces at beginning of tab-separated table columns + +* Wed Mar 21 2018 Karel Zak - 2.32-1 +- upgrade to v2.32 + +* Tue Feb 20 2018 Karel Zak - 2.32-0.2 +- add BuildRequires gcc + +* Tue Feb 13 2018 Karel Zak - 2.32-0.1 +- upgrade to v2.32-rc1 + http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32-ReleaseNotes + +* Fri Feb 09 2018 Fedora Release Engineering - 2.31-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Jan 20 2018 Björn Esser - 2.31-4 +- Rebuilt for switch to libxcrypt + +* Wed Jan 03 2018 Lumír Balhar - 2.31-3 +- Fix directory ownership in python subpackage + +* Mon Oct 30 2017 Karel Zak - 2.31-2 +- fix dmesg for multi-line records + +* Mon Oct 23 2017 Karel Zak - 2.31-1 +- upgrade to final v2.31 +- move rfkill to sbin (for backward compatibility) + +* Mon Oct 9 2017 Karel Zak - 2.31-0.4 +- fix build error + +* Mon Oct 9 2017 Karel Zak - 2.31-0.3 +- upgrade to v2.31-rc2 +- enable rfkill + +* Mon Sep 25 2017 Karel Zak - 2.31-0.2 +- temporary disable rfkill (fix #1494855) + +* Fri Sep 22 2017 Karel Zak - 2.31-0.1 +- upgrade to v2.31-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.31/v2.31-ReleaseNotes + +* Fri Sep 22 2017 Karel Zak - 2.30.2-1 +- upgrade to v2.30.2 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.2-ReleaseNotes + +* Mon Aug 14 2017 Karel Zak - 2.30.1-5 +- make ln-s usage more robust + +* Fri Aug 4 2017 Karel Zak - 2.30.1-4 +- fix post install script + +* Wed Aug 2 2017 Karel Zak - 2.30.1-3 +- fix #1390191 - systemd read-only container produces errors + +* Thu Jul 27 2017 Fedora Release Engineering - 2.30.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jul 20 2017 Karel Zak - 2.30.1-1 +- upgrade to v2.30.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.1-ReleaseNotes + +* Fri Jun 2 2017 Karel Zak - 2.30-1 +- upgrade to v2.30 + +* Wed May 17 2017 Karel Zak - 2.30-0.1 +- upgrade to v2.30-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes + +* Fri Feb 24 2017 Karel Zak - 2.29.2-1 +- upgrade to v2.29.2 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.2-ReleaseNotes + +* Sat Feb 11 2017 Fedora Release Engineering - 2.29.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 20 2017 Karel Zak - 2.29.1-1 +- upgrade to v2.29.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes + +* Mon Dec 19 2016 Miro HronÄok - 2.29-2 +- Rebuild for Python 3.6 + +* Tue Nov 8 2016 Karel Zak - 2.29-1 +- upgrade to v2.29 + +* Wed Oct 19 2016 Karel Zak - 2.29-0.2 +- upgrade to v2.29-rc2 + +* Fri Sep 30 2016 Karel Zak - 2.29-0.1 +- upgrade to v2.29-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes + +* Wed Sep 7 2016 Karel Zak - 2.28.2-1 +- upgrade to stable 2.28.2 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes + +* Thu Aug 18 2016 Karel Zak - 2.28.1-1 +- upgrade to stable 2.28.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes + +* Tue Jul 19 2016 Fedora Release Engineering - 2.28-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Mon Jun 13 2016 Karel Zak - 2.28-3 +- fix #1234317 - CD / DVD are rarely automounted + +* Tue Apr 26 2016 Karel Zak - 2.28-2 +- refresh login-lastlog-create.patch + +* Tue Apr 12 2016 Karel Zak - 2.28-1 +- upgrade to stable v2.28 + +* Wed Mar 30 2016 Karel Zak - 2.28-0.3 +- fix libblkid + +* Tue Mar 29 2016 Karel Zak - 2.28-0.2 +- upgrade to v2.28-rc2 + +* Tue Mar 22 2016 Karel Zak - 2.28-0.1 +- upgrade to v2.28-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28-ReleaseNotes +- add patch to fix broken swapon +- add subpackage util-linux-user (utils with dependence on libuser) + +* Fri Feb 05 2016 Fedora Release Engineering - 2.27.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 18 2016 Karel Zak - 2.27.1-4 +- fix #1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS + +* Wed Nov 18 2015 Karel Zak - 2.27.1-3 +- fix #1259745 - Can't start installation in Rawhide or F23 recent development images + +* Tue Nov 10 2015 Fedora Release Engineering - 2.27.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Mon Nov 2 2015 Karel Zak - 2.27.1 +- upgrade to v2.27.1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes + +* Mon Sep 7 2015 Karel Zak - 2.27 +- upgrade to v2.27 + +* Mon Aug 24 2015 Karel Zak - 2.27-0.4 +- upgrade to v2.27-rc2 + +* Thu Aug 13 2015 Karel Zak - 2.27-0.3 +- improve version usage in source url + +* Wed Aug 12 2015 Karel Zak - 2.27-0.2 +- fix #1251320 - rfe: please change login to not add /bin:/sbin to $PATH +- apply patches from Lokesh Mandvekar to make spec file more portable + +* Fri Jul 31 2015 Karel Zak - 2.27-0.1 +- upgrade to v2.27-rc1 + http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27-ReleaseNotes +- add lsipc + +* Thu Jul 16 2015 Karel Zak - 2.26.2-3 +- fix dates in the spec file + +* Fri Jun 19 2015 Fedora Release Engineering - 2.26.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Apr 30 2015 Karel Zak - 2.26.2-1 +- upgrade to stable release 2.26.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.2-ReleaseNotes + +* Sat Feb 21 2015 Till Maas - 2.26-2 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Thu Feb 19 2015 Karel Zak 2.26-1 +- upgrade to stable release 2.26 + +* Tue Feb 10 2015 Karel Zak 2.26-0.4 +- fix setarch build on PPC + +* Thu Feb 5 2015 Karel Zak 2.26-0.3 +- upgrade to 2.26-rc2 + +* Fri Jan 16 2015 Karel Zak 2.26-0.2 +- fix 1182778 - remount causes ro / and /home on boot + +* Thu Jan 15 2015 Karel Zak 2.26-0.1 +- upgrade to 2.26-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26-ReleaseNotes +- build with -pie for uuidd +- new command zramctl + +* Thu Nov 27 2014 Karel Zak 2.25.2-2 +- fix #1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid + +* Fri Oct 24 2014 Karel Zak 2.25.2-1 +- upgrade to stable 2.25.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.2-ReleaseNotes + +* Wed Sep 3 2014 Karel Zak 2.25.1-1 +- upgrade to stable 2.25.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes + +* Wed Aug 27 2014 Karel Zak 2.25.1-0.1 +- upgrade to release 2.25.1-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes + +* Mon Aug 18 2014 Fedora Release Engineering - 2.25-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 6 2014 Tom Callaway 2.25-3 +- fix license handling + +* Thu Jul 24 2014 Karel Zak 2.25-2 +- remove fstrim unit files from uuidd subpackage + +* Tue Jul 22 2014 Karel Zak 2.25-1 +- upgrade to stable release 2.25 + +* Wed Jul 02 2014 Karel Zak 2.25-0.3 +- upgrade to release 2.25-rc2 + +* Wed Jun 25 2014 Peter Jones - 2.25-0.2 +- Fix libblkid's squashfs probe return checking. + Related: rhbz#1112315 + +* Thu Jun 19 2014 Karel Zak 2.25-0.1 +- upgrade to release 2.25-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25-ReleaseNotes + +* Sun Jun 08 2014 Fedora Release Engineering - 2.24.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 28 2014 Kalev Lember - 2.24.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Mon May 12 2014 Karel Zak 2.24.2-4 +- fix #1094935 - script and/or trigger should not directly enable systemd units + +* Mon May 12 2014 Karel Zak 2.24.2-3 +- fix #1090638 - remove pam_securetty.so from .pamd files + +* Wed May 7 2014 Karel Zak 2.24.2-2 +- use systemd macroized scriptlets (#850355) + +* Thu Apr 24 2014 Karel Zak 2.24.2-1 +- upgrade to stable release 2.24.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.2-ReleaseNotes + +* Thu Jan 30 2014 Karel Zak 2.24.1-2 +- use rpm autosetup + +* Mon Jan 20 2014 Karel Zak 2.24.1-1 +- upgrade to stable release 2.24.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.1-ReleaseNotes + +* Mon Nov 18 2013 Karel Zak 2.24-2 +- fix #1031262 - lsblk -D segfault + +* Wed Oct 23 2013 Karel Zak 2.24-1 +- upgrade to upstream release v2.24 +- remove nologin (merged upstream) +- fix #1022217 - fdisk mishandles GPT corruption + +* Fri Sep 27 2013 Karel Zak 2.24-0.1 +- upgrade to upstream release v2.24-rc1 +- add python3 libmount binding + +* Mon Sep 9 2013 Karel Zak 2.23.2-4 +- fix #1005566 - recount_geometry: Process /usr/sbin/fdisk was killed by signal 8 (SIGFPE) +- fix #1005194 - su generates incorrect log entries + +* Mon Sep 9 2013 Karel Zak 2.23.2-3 +- refresh and rename patches +- fix #987787 - Remove lastlogin from su +- fix #950497 - problem umounting loop device +- fix #921498 - multiple internal testsuite failures + +* Thu Aug 1 2013 Karel Zak 2.23.2-2 +- fix 990083 - su doesn't work with pam_ecryptfs + +* Wed Jul 31 2013 Karel Zak 2.23.2-1 +- upgrade to stable release 2.23.2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23.2-ReleaseNotes + +* Thu Jun 13 2013 Karel Zak 2.23.1-3 +- fix #972457 - agetty idle I/O polling causes elevated CPU usage + +* Wed Jun 5 2013 Karel Zak 2.23.1-2 +- fix #962145 - in.telnetd immediately closes connection + +* Tue May 28 2013 Karel Zak 2.23.1-1 +- upgrade to 2.23.1 +- backport agetty --local-line path + +* Thu Apr 25 2013 Karel Zak 2.23-1 +- upgrade to 2.23 +- add --with check to call make check + +* Mon Apr 15 2013 Karel Zak 2.23-0.7 +- remove unused patches + +* Mon Apr 15 2013 Karel Zak 2.23-0.6 +- remove floppy from util-linux + +* Fri Apr 12 2013 Karel Zak 2.23-0.5 +- fix #948274 - interruption code 0x4003B in libmount.so.1.1.0 + +* Wed Apr 10 2013 Karel Zak 2.23-0.4 +- upgrade to the release 2.23-rc2 + +* Wed Mar 27 2013 Karel Zak 2.23-0.3 +- libblkid ntfs bugfix for build on s390 + +* Wed Mar 27 2013 Karel Zak 2.23-0.2 +- add upstream patches for to fix umount and mount. + +* Fri Mar 22 2013 Karel Zak 2.23-0.1 +- upgrade to the release 2.23-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes +- add nsenter and blkdiscard +- remove tunelp + +* Wed Feb 20 2013 Karel Zak 2.22.2-6 +- fix #912778 - "runuser -l" doesn't register session to systemd + +* Tue Feb 19 2013 Karel Zak 2.22.2-5 +- fix #902512 - Dependency failed for /home (and blkid fails to tell UUID) +- refresh old patches + +* Wed Feb 6 2013 Karel Zak 2.22.2-4 +- improve convertion to mtab symlink in post script +- spec file cleanup (based on #894199) + +* Sun Feb 3 2013 Karel Zak 2.22.2-3 +- fix #882305 - agetty: unstable /dev/tty* permissions +- fix #885314 - hexdump segfault +- fix #896447 - No newlines in piped "cal" command +- fix libblkid cache usage (upstream patch) +- fix #905008 - uuidd: /usr/sbin/uuidd has incorrect file permissions + +* Tue Jan 15 2013 Karel Zak 2.22.2-2 +- fix #889888 - wipefs does not completely wipe btrfs volume + +* Thu Dec 13 2012 Karel Zak 2.22.2-1 +- upgrade to upstream maintenance release 2.22.2 + +* Mon Nov 19 2012 Karel Zak 2.22.1-5 +- sources cleanup + +* Fri Nov 16 2012 Karel Zak 2.22.1-4 +- fix #872787 - su: COMMAND not specified + +* Thu Nov 1 2012 Karel Zak 2.22.1-3 +- backport upstream runuser(1) +- enable su(1) + +* Thu Nov 1 2012 Karel Zak 2.22.1-2 +- apply pathes from upstream stable/v2.22 branch +- fix #865961 - wipefs -a should use O_EXCL + +* Wed Oct 10 2012 Karel Zak 2.22.1-1 +- upgrade to the release 2.22.1 + +* Wed Oct 3 2012 Karel Zak 2.22-2 +- remove obsolete references to e2fsprogs + +* Thu Sep 6 2012 Karel Zak 2.22-1 +- upgrade to the release 2.22 +- enable eject(1) from util-linux, obsolete original eject package +- fix #853164 - setuid program should have full RELRO +- fix #851230 - probe_ntfs: /usr/sbin/blkid was killed by SIGSEGV + +* Thu Aug 16 2012 Karel Zak 2.22-0.1 +- upgrade to the release 2.22-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/v2.22-ReleaseNotes +- add sulogin, utmpdump, lslocks, wdctl + +* Fri Jul 27 2012 Fedora Release Engineering - 2.21.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jun 13 2012 Karel Zak 2.21.2-2 +- replace udev dependenceis with systemd + +* Fri May 25 2012 Karel Zak 2.21.2-1 +- upgrade to bugfix release 2.21.2 +- fix #814699 - namei(1) incorrectly resolves relative symlinks +- fix #820707 - Impossible to unmount nfsv4/krb5 mounts after network disconnect +- fix #816877 - libmount does not close device fd before mount(2) +- fix #822705 - unable to login after installing + +* Fri Mar 30 2012 Karel Zak 2.21.1-1 +- upgrade to bugfix release 2.21.1 + +* Fri Feb 24 2012 Karel Zak 2.21-1 +- upgrade to release 2.21 + +* Thu Feb 09 2012 Karel Zak 2.21-0.2 +- fix #788703 - /run/blkid does not exist + +* Tue Feb 07 2012 Karel Zak 2.21-0.1 +- upgrade to the release 2.21-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ReleaseNotes +- add {fsck,mkfs}.minix +- add new command chcpu(8) +- add new command prlimit(1) +- enable raw(8) command +- move 60-raw.rules from /etc from /usr/lib/udev/rules.d +- move blkid cache from etc to /run/blkid + +* Wed Jan 25 2012 Harald Hoyer 2.20.1-5 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Sat Jan 14 2012 Fedora Release Engineering - 2.20.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Nov 22 2011 Karel Zak 2.20.1-3 +- fix #748216 - util-linux requires pam >= 1.1.3-7 +- remove ddate(1) + +* Wed Oct 26 2011 Fedora Release Engineering - 2.20.1-2 +- Rebuilt for glibc bug#747377 + +* Thu Oct 20 2011 Karel Zak 2.20.1-1 +- upgrade to the release 2.20.1 + ftp://ftp.infradead.org/pub/util-linux/v2.20/v2.20.1-ReleaseNotes + +* Mon Aug 29 2011 Karel Zak 2.20-1 +- upgrade to the release 2.20 + +* Wed Aug 17 2011 Karel Zak 2.20-0.2 +- upgrade to the release 2.20-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-rc2-ChangeLog + +* Tue Aug 2 2011 Karel Zak 2.20-0.1 +- upgrade to the release 2.20-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-ReleaseNotes + +* Mon Jul 4 2011 Karel Zak 2.19.1-2 +- fix #716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup +- fix #709681 - failure to mount if a mount point ends with a slash in /etc/fstab +- fix #709319 - 'mount -a' mounts already mounted directories +- fix kernel version parsing + +* Fri May 6 2011 Karel Zak 2.19.1-1 +- upgrade to the release 2.19.1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-ReleaseNotes + +* Wed Apr 20 2011 Karel Zak 2.19.1-0.1 +- upgrade to the release 2.19.1-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-rc1-ChangeLog + +* Mon Mar 7 2011 Karel Zak 2.19-2 +- fix #682502 - Broken source URL to floppy tarball, new version available +- upgrade to floppy-0.18 + +* Thu Feb 10 2011 Karel Zak 2.19-1 +- upgrade to the release 2.19 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes +- remove /sbin/mount.tmpfs -- integrated to mount(8) + +* Tue Feb 8 2011 Karel Zak 2.19-0.6 +- fix #665062 - add support for the postlogin PAM stack to util-linux-ng + +* Mon Feb 07 2011 Fedora Release Engineering - 2.19-0.5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 25 2011 Karel Zak 2.19-0.4 +- upgrade to the release 2.19-rc3 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc3-ChangeLog + +* Tue Jan 25 2011 Karel Zak 2.19-0.3 +- upgrade to the release 2.19-rc2 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc2-ChangeLog +- fix #671893 - SELinux is preventing /bin/chown from 'setattr' accesses + on the file mounts. + +* Wed Jan 19 2011 Karel Zak 2.19-0.2 +- clean up specfile (review #667416) + +* Wed Jan 5 2011 Karel Zak 2.19-0.1 +- upgrade to the release 2.19-rc1 + ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes + +* 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 + +* Fri 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 + +* Thu 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). + +* Thu Mar 9 2006 Jesse Keating 2.13-0.20 +- Better calling of restorecon as suggested by Bill Nottingham +- prereq restorecon to avoid ordering issues + +* Thu 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 + +* Sat 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 + +* Sat 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). + +* Mon 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/util-linux.spec b/util-linux.spec index 83b980c..85ab6d6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.40 -Release: 0.1%{?dist} +Release: %autorelease -p -e rc1 License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -946,2341 +946,5 @@ fi %files -n util-linux-i18n -f %{name}.lang %changelog -* Fri Feb 2 2024 Karel Zak - 2.40-0.1 -- upgrade to v2.40-rc1 -- add setpgid, enosys, exch and lsclocks commands +%autochangelog -* Thu Jan 25 2024 Karel Zak - 2.39.3-4 -- improve fix for #2256391 (util-linux-i18n conflicts) - -* Thu Jan 25 2024 Karel Zak - 2.39.3-3 -- fix #2258501 - dnf5 unusable with libsmartcols - -* Thu Jan 11 2024 Karel Zak - 2.39.3-2 -- fix #2256391 util-linux-i18n conflicts with file from package shadow-utils - -* Sun Dec 31 2023 Karel Zak - 2.39.3-1 -- upgrade to v2.39.3 - https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.3-ReleaseNotes - -* Sat Dec 2 2023 Daan De Meyer - 2.39.2-2 -- Move sulogin to util-linux-core - -* Thu Aug 17 2023 Karel Zak - 2.39.2-1 -- fix libmount atime regression -- upgrade to v2.39.2 - https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.2-ReleaseNotes - -* Sat Jul 22 2023 Fedora Release Engineering - 2.39.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jun 28 2023 Python Maint - 2.39.1-2 -- Rebuilt for Python 3.12 - -* Wed Jun 28 2023 Karel Zak - 2.39.1-1 -- upgrade to v2.39.1 - https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.1-ReleaseNotes - -* Tue Jun 13 2023 Python Maint - 2.39-5 -- Rebuilt for Python 3.12 - -* Thu May 25 2023 Karel Zak - 2.39-4 -- fix mount when /sbin/mount. executed - -* Mon May 22 2023 Karel Zak - 2.39-3 -- fix mount options prepend/insert and merging (upstream) - -* Thu May 18 2023 Adam Williamson - 2.39-2 -- Have util-linux obsolete and provide util-linux-user - -* Thu May 18 2023 Karel Zak - 2.39-1 -- upgrade to v2.39 -- remove dependence on libuser -- remove util-linux-user subpackage -- enable translated man pages -- add util-linux-i18n subpackage - -* Wed Apr 19 2023 Karel Zak - 2.39-0.5 -- upgrade to v2.39-rc3 (fixes XFS and rw/ro issues) - -* Wed Apr 5 2023 Karel Zak - 2.39-0.4 -- fix #2180593 (superblock reconfiguration libmount issue) - -* Tue Apr 4 2023 Karel Zak - 2.39-0.3 -- fix spec file - -* Tue Apr 4 2023 Karel Zak - 2.39-0.2 -- upgrade to v2.39-rc2 - -* Mon Mar 20 2023 Karel Zak - 2.39-0.1 -- upgrade to v2.39-rc1 - https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes - -* Sat Jan 21 2023 Fedora Release Engineering - 2.38.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Dec 17 2022 Florian Weimer - 2.38.1-3 -- Backport upstream patch to fix C99 issue in kill - -* Mon Aug 22 2022 Karel Zak - 2.38.1-2 -- improve tmpfiles.d use in spec file - -* Thu Aug 4 2022 Karel Zak - 2.38.1-1 -- upgrade to v2.38.1 - https://kernel.org/pub/linux/utils/util-linux/v2.38/v2.38.1-ReleaseNotes - -* Sat Jul 23 2022 Fedora Release Engineering - 2.38-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 2.38-4 -- Rebuilt for Python 3.11 - -* Wed Apr 13 2022 Karel Zak - 2.38-3 -- fix spec file changelog order - -* Wed Mar 30 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-2 -- simplify creation of /etc/mtab symlink - -* Wed Mar 30 2022 Karel Zak - 2.38-1 -- upgrade to v2.38 -- don't (re)generate build-system -- modernize spec file style (thanks to Zbigniew) - -* Thu Mar 17 2022 Zbigniew JÄ™drzejewski-Szmek - 2.38-0.5 -- Drop very old upgrade scriptlet for libblkid - -* Wed Mar 16 2022 Karel Zak - 2.38-0.4 -- upgrade to v2.38-rc3 - https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38-ReleaseNotes - -* Wed Feb 2 2022 Karel Zak - 2.38-0.3 -- add /usr/lib/tmpfiles.d/uuidd.conf (based on #2047952) - -* Wed Feb 2 2022 Karel Zak - 2.38-0.2 -- release ownership of /var/log/lastlog - -* Mon Jan 31 2022 Karel Zak - 2.38-0.1 -- upgrade to v2.38-rc1 - -* Sat Jan 22 2022 Fedora Release Engineering - 2.37.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Aug 17 2021 Karel Zak - 2.37.2-1 -* upgrade to v2.37.2 - -* Fri Jul 23 2021 Fedora Release Engineering - 2.37-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jul 14 2021 Karel Zak - 2.37-5 -- remove unused util-linux-60-raw.rules - -* Wed Jul 14 2021 Karel Zak - 2.37-4 -- disable raw(8) - no more supported since Linux v5.14 (commit 03e4922f1c81fc2ed3a87b4f91a8d3aafc7e093) -- remove dependence on deprecated pcre2posix.h -- fix #1981729 - close_range() 3rd argument - -* Wed Jun 16 2021 Richard W.M. Jones - 2.37-3 -- Rebuild for updated pcre2 - -* Fri Jun 04 2021 Python Maint - 2.37-2 -- Rebuilt for Python 3.10 - -* Tue Jun 1 2021 Karel Zak - 2.37-1 -- upgrade to v2.37 -- introduce util-linux-core subpackage - -* Fri May 14 2021 Karel Zak - 2.37-0.1 -- upgrade to v2.37-rc2 - https://kernel.org/pub/linux/utils/util-linux/v2.37/v2.37-ReleaseNotes - -* Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 2.36.2-3 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Tue Mar 2 2021 Karel Zak - 2.36.2-2 -- spec file cleanup https://src.fedoraproject.org/rpms/util-linux/pull-request/9 - -* Fri Feb 12 2021 Karel Zak - 2.36.2-1 -- upgrade to stable upstream 2.36.2 - https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36.2-ReleaseNotes - -* Wed Jan 27 2021 Kelvin Fan - 2.36.1-4 -- Add patch to add /run/motd.d to default MOTD_FILE in login(1) - -* Thu Jan 14 2021 Karel Zak - 2.36.1-3 -- improve uuidd scriptlets (fix #1767553) - -* Thu Nov 19 2020 Karel Zak - 2.36.1-2 -- remove unused patches -- remove versions and seq.numbers from patch names -- fix mount "symfollow" issue (upstream patch) - -* Mon Nov 16 2020 Karel Zak - 2.36.1-1 -- upgrade to stable upstream 2.36.1 - -* Thu Nov 12 2020 Tom Stellard - 2.36-4 -- Use make macros -- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro - -* Tue Sep 01 2020 Karel Zak - 2.36-3 -- remove mountinfo workaround (unnecessary for kernel 5.8) -- fix #1860461 - sfdisk regression creating simple 3 partition MBR disk - -* Wed Jul 29 2020 Fedora Release Engineering - 2.36-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jul 23 2020 Karel Zak - 2.36-1 -- upgrade to upstream release v2.36 - https://www.kernel.org/pub/linux/utils/util-linux/v2.36/v2.36-ReleaseNotes -- add irqtop and lsirq commands - -* Tue May 26 2020 Miro HronÄok - 2.35.2-2 -- Rebuilt for Python 3.9 - -* Wed May 20 2020 Karel Zak - 2.35.2-1 -- upgrade to upstream bug fix release 2.35.2 - https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35.2-ReleaseNotes - -* Wed Apr 15 2020 Karel Zak - 2.35.1-9 -- fix copy & past bug in specfile changelog - -* Wed Apr 15 2020 Karel Zak - 2.35.1-8 -- fix #1822226 - remove pam_console dependency -- fix #1823463 - hwclock unable to set system time - -* Tue Mar 24 2020 Kalev Lember - 2.35.1-7 -- Another attempt at enabling fstrim.timer on F32 upgrades (#1811506) - -* Thu Mar 19 2020 Karel Zak - 2.35.1-6 -- fix #1811506 (triggerpostun) - -* Tue Feb 25 2020 Karel Zak - 2.35.1-5 -- fix lsblk -P output for RAIDs, etc. - -* Thu Feb 06 2020 Karel Zak - 2.35.1-4 -- add triggerpostun for fstrim.timer (#1785041, FESCo #2309) - -* Tue Feb 04 2020 Karel Zak - 2.35.1-3 -- fix fstrim.service (util-linux github #948) - -* Tue Feb 04 2020 Karel Zak - 2.35.1-2 -- fix sfdisk dump issue (util-linux github #949) - -* Mon Feb 03 2020 Karel Zak - 2.35.1-1 -- upgrade to upstream bug fix release 2.35.1 - -* Fri Jan 31 2020 Fedora Release Engineering - 2.35-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Jan 21 2020 Karel Zak - 2.35-1 -- upgrade to v2.35 - -* Thu Jan 9 2020 Karel Zak - 2.35-0.5 -- upgrade to v2.35-rc2 - -* Fri Dec 20 2019 Karel Zak - 2.35-0.4 -- fix #1784536 - Segfaults in agetty during Cloud image testing - -* Fri Dec 20 2019 Karel Zak - 2.35-0.3 -- upgrade to the upstream git snapshot (v2.35-rc1-20-g63f8c66af) -- fix #1783066 - Fedora-Rawhide images do not boot - -* Thu Dec 12 2019 Adam Williamson - 2.35-0.2 -- Revert upstream commit 7ef86a0 to fix RHBZ #1783066 - -* Wed Dec 11 2019 Karel Zak - 2.35-0.1 -- upgrade to v2.35-rc1 - https://www.kernel.org/pub/linux/utils/util-linux/v2.35/v2.35-ReleaseNotes - -* Fri Sep 13 2019 Karel Zak - 2.34-6 -- fix https://github.com/systemd/systemd/issues/10872 - -* Thu Sep 12 2019 Karel Zak - 2.34-5 -- fix #1751290 - regression: lsblk not showing PKNAME in f31+ - -* Thu Sep 05 2019 Karel Zak - 2.34-4 -- add BuildRequires: readline for fdisks - -* Mon Aug 19 2019 Miro HronÄok - 2.34-3 -- Rebuilt for Python 3.8 - -* Wed Jul 24 2019 Karel Zak - 2.34-2 -- fix lscpu compilation on ppc - -* Fri Jun 14 2019 Karel Zak - 2.34-1 -- upgrade to v2.34 - -* Thu May 30 2019 Karel Zak - 2.34-0.2 -- upgrade to v2.34-rc2 - -* Tue Apr 30 2019 Karel Zak - 2.34-0.1 -- add command hardlink(1) (merged into util-linux upstream) -- upgrade to v2.34-rc1 - http://www.kernel.org/pub/linux/utils/util-linux/v2.34/v2.34-ReleaseNotes - -* Tue Apr 9 2019 Karel Zak - 2.33.2-1 -- upgrade to v2.33.2 - https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.2-ReleaseNotes - -* Thu Mar 07 2019 Igor Gnatenko - 2.33.1-4 -- Remove obsolete scriptlets - -* Sun Feb 03 2019 Fedora Release Engineering - 2.33.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 14 2019 Björn Esser - 2.33.1-2 -- Rebuilt for libcrypt.so.2 (#1666033) - -* Wed Jan 9 2019 Karel Zak - 2.33.1-1 -- upgrade to v2.33.1 - https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.1-ReleaseNotes - -* Thu Nov 1 2018 Karel Zak - 2.33-0.1 -- Remove ldconfig scriptlet, now done via. transfiletrigger in glibc [James Antill] -- upgrade to v2.33-rc2 - http://www.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33-ReleaseNotes - -* Mon Jul 16 2018 Karel Zak - 2.32.1-1 -- upgrade to v2.32.1 - http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32.1-ReleaseNotes - -* Sat Jul 14 2018 Fedora Release Engineering - 2.32-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro HronÄok - 2.32-6 -- Rebuilt for Python 3.7 - -* Fri May 18 2018 Karel Zak - 2.32-5 -- move /etc/adjtime config from initscripts to util-linux - -* Wed Apr 11 2018 Karel Zak - 2.32-4 -- fix #1560642 - uuidd.service does not start - -* Tue Apr 10 2018 Karel Zak - 2.32-3 -- remove unused build option --enable-libmount-force-mountinfo (it's default now) - -* Tue Mar 27 2018 Karel Zak - 2.32-2 -- fix #1560283 - column does not properly handle spaces at beginning of tab-separated table columns - -* Wed Mar 21 2018 Karel Zak - 2.32-1 -- upgrade to v2.32 - -* Tue Feb 20 2018 Karel Zak - 2.32-0.2 -- add BuildRequires gcc - -* Tue Feb 13 2018 Karel Zak - 2.32-0.1 -- upgrade to v2.32-rc1 - http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32-ReleaseNotes - -* Fri Feb 09 2018 Fedora Release Engineering - 2.31-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Jan 20 2018 Björn Esser - 2.31-4 -- Rebuilt for switch to libxcrypt - -* Wed Jan 03 2018 Lumír Balhar - 2.31-3 -- Fix directory ownership in python subpackage - -* Mon Oct 30 2017 Karel Zak - 2.31-2 -- fix dmesg for multi-line records - -* Mon Oct 23 2017 Karel Zak - 2.31-1 -- upgrade to final v2.31 -- move rfkill to sbin (for backward compatibility) - -* Mon Oct 9 2017 Karel Zak - 2.31-0.4 -- fix build error - -* Mon Oct 9 2017 Karel Zak - 2.31-0.3 -- upgrade to v2.31-rc2 -- enable rfkill - -* Mon Sep 25 2017 Karel Zak - 2.31-0.2 -- temporary disable rfkill (fix #1494855) - -* Fri Sep 22 2017 Karel Zak - 2.31-0.1 -- upgrade to v2.31-rc1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.31/v2.31-ReleaseNotes - -* Fri Sep 22 2017 Karel Zak - 2.30.2-1 -- upgrade to v2.30.2 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.2-ReleaseNotes - -* Mon Aug 14 2017 Karel Zak - 2.30.1-5 -- make ln-s usage more robust - -* Fri Aug 4 2017 Karel Zak - 2.30.1-4 -- fix post install script - -* Wed Aug 2 2017 Karel Zak - 2.30.1-3 -- fix #1390191 - systemd read-only container produces errors - -* Thu Jul 27 2017 Fedora Release Engineering - 2.30.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jul 20 2017 Karel Zak - 2.30.1-1 -- upgrade to v2.30.1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30.1-ReleaseNotes - -* Fri Jun 2 2017 Karel Zak - 2.30-1 -- upgrade to v2.30 - -* Wed May 17 2017 Karel Zak - 2.30-0.1 -- upgrade to v2.30-rc1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.30/v2.30-ReleaseNotes - -* Fri Feb 24 2017 Karel Zak - 2.29.2-1 -- upgrade to v2.29.2 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.2-ReleaseNotes - -* Sat Feb 11 2017 Fedora Release Engineering - 2.29.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 20 2017 Karel Zak - 2.29.1-1 -- upgrade to v2.29.1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes - -* Mon Dec 19 2016 Miro HronÄok - 2.29-2 -- Rebuild for Python 3.6 - -* Tue Nov 8 2016 Karel Zak - 2.29-1 -- upgrade to v2.29 - -* Wed Oct 19 2016 Karel Zak - 2.29-0.2 -- upgrade to v2.29-rc2 - -* Fri Sep 30 2016 Karel Zak - 2.29-0.1 -- upgrade to v2.29-rc1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-ReleaseNotes - -* Wed Sep 7 2016 Karel Zak - 2.28.2-1 -- upgrade to stable 2.28.2 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ReleaseNotes - -* Thu Aug 18 2016 Karel Zak - 2.28.1-1 -- upgrade to stable 2.28.1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes - -* Tue Jul 19 2016 Fedora Release Engineering - 2.28-4 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Mon Jun 13 2016 Karel Zak - 2.28-3 -- fix #1234317 - CD / DVD are rarely automounted - -* Tue Apr 26 2016 Karel Zak - 2.28-2 -- refresh login-lastlog-create.patch - -* Tue Apr 12 2016 Karel Zak - 2.28-1 -- upgrade to stable v2.28 - -* Wed Mar 30 2016 Karel Zak - 2.28-0.3 -- fix libblkid - -* Tue Mar 29 2016 Karel Zak - 2.28-0.2 -- upgrade to v2.28-rc2 - -* Tue Mar 22 2016 Karel Zak - 2.28-0.1 -- upgrade to v2.28-rc1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28-ReleaseNotes -- add patch to fix broken swapon -- add subpackage util-linux-user (utils with dependence on libuser) - -* Fri Feb 05 2016 Fedora Release Engineering - 2.27.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 18 2016 Karel Zak - 2.27.1-4 -- fix #1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS - -* Wed Nov 18 2015 Karel Zak - 2.27.1-3 -- fix #1259745 - Can't start installation in Rawhide or F23 recent development images - -* Tue Nov 10 2015 Fedora Release Engineering - 2.27.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 - -* Mon Nov 2 2015 Karel Zak - 2.27.1 -- upgrade to v2.27.1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27.1-ReleaseNotes - -* Mon Sep 7 2015 Karel Zak - 2.27 -- upgrade to v2.27 - -* Mon Aug 24 2015 Karel Zak - 2.27-0.4 -- upgrade to v2.27-rc2 - -* Thu Aug 13 2015 Karel Zak - 2.27-0.3 -- improve version usage in source url - -* Wed Aug 12 2015 Karel Zak - 2.27-0.2 -- fix #1251320 - rfe: please change login to not add /bin:/sbin to $PATH -- apply patches from Lokesh Mandvekar to make spec file more portable - -* Fri Jul 31 2015 Karel Zak - 2.27-0.1 -- upgrade to v2.27-rc1 - http://ftp.kernel.org/pub/linux/utils/util-linux/v2.27/v2.27-ReleaseNotes -- add lsipc - -* Thu Jul 16 2015 Karel Zak - 2.26.2-3 -- fix dates in the spec file - -* Fri Jun 19 2015 Fedora Release Engineering - 2.26.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Apr 30 2015 Karel Zak - 2.26.2-1 -- upgrade to stable release 2.26.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26.2-ReleaseNotes - -* Sat Feb 21 2015 Till Maas - 2.26-2 -- Rebuilt for Fedora 23 Change - https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code - -* Thu Feb 19 2015 Karel Zak 2.26-1 -- upgrade to stable release 2.26 - -* Tue Feb 10 2015 Karel Zak 2.26-0.4 -- fix setarch build on PPC - -* Thu Feb 5 2015 Karel Zak 2.26-0.3 -- upgrade to 2.26-rc2 - -* Fri Jan 16 2015 Karel Zak 2.26-0.2 -- fix 1182778 - remount causes ro / and /home on boot - -* Thu Jan 15 2015 Karel Zak 2.26-0.1 -- upgrade to 2.26-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.26/v2.26-ReleaseNotes -- build with -pie for uuidd -- new command zramctl - -* Thu Nov 27 2014 Karel Zak 2.25.2-2 -- fix #1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid - -* Fri Oct 24 2014 Karel Zak 2.25.2-1 -- upgrade to stable 2.25.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.2-ReleaseNotes - -* Wed Sep 3 2014 Karel Zak 2.25.1-1 -- upgrade to stable 2.25.1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes - -* Wed Aug 27 2014 Karel Zak 2.25.1-0.1 -- upgrade to release 2.25.1-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25.1-ReleaseNotes - -* Mon Aug 18 2014 Fedora Release Engineering - 2.25-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Wed Aug 6 2014 Tom Callaway 2.25-3 -- fix license handling - -* Thu Jul 24 2014 Karel Zak 2.25-2 -- remove fstrim unit files from uuidd subpackage - -* Tue Jul 22 2014 Karel Zak 2.25-1 -- upgrade to stable release 2.25 - -* Wed Jul 02 2014 Karel Zak 2.25-0.3 -- upgrade to release 2.25-rc2 - -* Wed Jun 25 2014 Peter Jones - 2.25-0.2 -- Fix libblkid's squashfs probe return checking. - Related: rhbz#1112315 - -* Thu Jun 19 2014 Karel Zak 2.25-0.1 -- upgrade to release 2.25-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/v2.25-ReleaseNotes - -* Sun Jun 08 2014 Fedora Release Engineering - 2.24.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed May 28 2014 Kalev Lember - 2.24.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 - -* Mon May 12 2014 Karel Zak 2.24.2-4 -- fix #1094935 - script and/or trigger should not directly enable systemd units - -* Mon May 12 2014 Karel Zak 2.24.2-3 -- fix #1090638 - remove pam_securetty.so from .pamd files - -* Wed May 7 2014 Karel Zak 2.24.2-2 -- use systemd macroized scriptlets (#850355) - -* Thu Apr 24 2014 Karel Zak 2.24.2-1 -- upgrade to stable release 2.24.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.2-ReleaseNotes - -* Thu Jan 30 2014 Karel Zak 2.24.1-2 -- use rpm autosetup - -* Mon Jan 20 2014 Karel Zak 2.24.1-1 -- upgrade to stable release 2.24.1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/v2.24.1-ReleaseNotes - -* Mon Nov 18 2013 Karel Zak 2.24-2 -- fix #1031262 - lsblk -D segfault - -* Wed Oct 23 2013 Karel Zak 2.24-1 -- upgrade to upstream release v2.24 -- remove nologin (merged upstream) -- fix #1022217 - fdisk mishandles GPT corruption - -* Fri Sep 27 2013 Karel Zak 2.24-0.1 -- upgrade to upstream release v2.24-rc1 -- add python3 libmount binding - -* Mon Sep 9 2013 Karel Zak 2.23.2-4 -- fix #1005566 - recount_geometry: Process /usr/sbin/fdisk was killed by signal 8 (SIGFPE) -- fix #1005194 - su generates incorrect log entries - -* Mon Sep 9 2013 Karel Zak 2.23.2-3 -- refresh and rename patches -- fix #987787 - Remove lastlogin from su -- fix #950497 - problem umounting loop device -- fix #921498 - multiple internal testsuite failures - -* Thu Aug 1 2013 Karel Zak 2.23.2-2 -- fix 990083 - su doesn't work with pam_ecryptfs - -* Wed Jul 31 2013 Karel Zak 2.23.2-1 -- upgrade to stable release 2.23.2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23.2-ReleaseNotes - -* Thu Jun 13 2013 Karel Zak 2.23.1-3 -- fix #972457 - agetty idle I/O polling causes elevated CPU usage - -* Wed Jun 5 2013 Karel Zak 2.23.1-2 -- fix #962145 - in.telnetd immediately closes connection - -* Tue May 28 2013 Karel Zak 2.23.1-1 -- upgrade to 2.23.1 -- backport agetty --local-line path - -* Thu Apr 25 2013 Karel Zak 2.23-1 -- upgrade to 2.23 -- add --with check to call make check - -* Mon Apr 15 2013 Karel Zak 2.23-0.7 -- remove unused patches - -* Mon Apr 15 2013 Karel Zak 2.23-0.6 -- remove floppy from util-linux - -* Fri Apr 12 2013 Karel Zak 2.23-0.5 -- fix #948274 - interruption code 0x4003B in libmount.so.1.1.0 - -* Wed Apr 10 2013 Karel Zak 2.23-0.4 -- upgrade to the release 2.23-rc2 - -* Wed Mar 27 2013 Karel Zak 2.23-0.3 -- libblkid ntfs bugfix for build on s390 - -* Wed Mar 27 2013 Karel Zak 2.23-0.2 -- add upstream patches for to fix umount and mount. - -* Fri Mar 22 2013 Karel Zak 2.23-0.1 -- upgrade to the release 2.23-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes -- add nsenter and blkdiscard -- remove tunelp - -* Wed Feb 20 2013 Karel Zak 2.22.2-6 -- fix #912778 - "runuser -l" doesn't register session to systemd - -* Tue Feb 19 2013 Karel Zak 2.22.2-5 -- fix #902512 - Dependency failed for /home (and blkid fails to tell UUID) -- refresh old patches - -* Wed Feb 6 2013 Karel Zak 2.22.2-4 -- improve convertion to mtab symlink in post script -- spec file cleanup (based on #894199) - -* Sun Feb 3 2013 Karel Zak 2.22.2-3 -- fix #882305 - agetty: unstable /dev/tty* permissions -- fix #885314 - hexdump segfault -- fix #896447 - No newlines in piped "cal" command -- fix libblkid cache usage (upstream patch) -- fix #905008 - uuidd: /usr/sbin/uuidd has incorrect file permissions - -* Tue Jan 15 2013 Karel Zak 2.22.2-2 -- fix #889888 - wipefs does not completely wipe btrfs volume - -* Thu Dec 13 2012 Karel Zak 2.22.2-1 -- upgrade to upstream maintenance release 2.22.2 - -* Mon Nov 19 2012 Karel Zak 2.22.1-5 -- sources cleanup - -* Fri Nov 16 2012 Karel Zak 2.22.1-4 -- fix #872787 - su: COMMAND not specified - -* Thu Nov 1 2012 Karel Zak 2.22.1-3 -- backport upstream runuser(1) -- enable su(1) - -* Thu Nov 1 2012 Karel Zak 2.22.1-2 -- apply pathes from upstream stable/v2.22 branch -- fix #865961 - wipefs -a should use O_EXCL - -* Wed Oct 10 2012 Karel Zak 2.22.1-1 -- upgrade to the release 2.22.1 - -* Wed Oct 3 2012 Karel Zak 2.22-2 -- remove obsolete references to e2fsprogs - -* Thu Sep 6 2012 Karel Zak 2.22-1 -- upgrade to the release 2.22 -- enable eject(1) from util-linux, obsolete original eject package -- fix #853164 - setuid program should have full RELRO -- fix #851230 - probe_ntfs: /usr/sbin/blkid was killed by SIGSEGV - -* Thu Aug 16 2012 Karel Zak 2.22-0.1 -- upgrade to the release 2.22-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/v2.22-ReleaseNotes -- add sulogin, utmpdump, lslocks, wdctl - -* Fri Jul 27 2012 Fedora Release Engineering - 2.21.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Wed Jun 13 2012 Karel Zak 2.21.2-2 -- replace udev dependenceis with systemd - -* Fri May 25 2012 Karel Zak 2.21.2-1 -- upgrade to bugfix release 2.21.2 -- fix #814699 - namei(1) incorrectly resolves relative symlinks -- fix #820707 - Impossible to unmount nfsv4/krb5 mounts after network disconnect -- fix #816877 - libmount does not close device fd before mount(2) -- fix #822705 - unable to login after installing - -* Fri Mar 30 2012 Karel Zak 2.21.1-1 -- upgrade to bugfix release 2.21.1 - -* Fri Feb 24 2012 Karel Zak 2.21-1 -- upgrade to release 2.21 - -* Thu Feb 09 2012 Karel Zak 2.21-0.2 -- fix #788703 - /run/blkid does not exist - -* Tue Feb 07 2012 Karel Zak 2.21-0.1 -- upgrade to the release 2.21-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ReleaseNotes -- add {fsck,mkfs}.minix -- add new command chcpu(8) -- add new command prlimit(1) -- enable raw(8) command -- move 60-raw.rules from /etc from /usr/lib/udev/rules.d -- move blkid cache from etc to /run/blkid - -* Wed Jan 25 2012 Harald Hoyer 2.20.1-5 -- install everything in /usr - https://fedoraproject.org/wiki/Features/UsrMove - -* Sat Jan 14 2012 Fedora Release Engineering - 2.20.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Nov 22 2011 Karel Zak 2.20.1-3 -- fix #748216 - util-linux requires pam >= 1.1.3-7 -- remove ddate(1) - -* Wed Oct 26 2011 Fedora Release Engineering - 2.20.1-2 -- Rebuilt for glibc bug#747377 - -* Thu Oct 20 2011 Karel Zak 2.20.1-1 -- upgrade to the release 2.20.1 - ftp://ftp.infradead.org/pub/util-linux/v2.20/v2.20.1-ReleaseNotes - -* Mon Aug 29 2011 Karel Zak 2.20-1 -- upgrade to the release 2.20 - -* Wed Aug 17 2011 Karel Zak 2.20-0.2 -- upgrade to the release 2.20-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-rc2-ChangeLog - -* Tue Aug 2 2011 Karel Zak 2.20-0.1 -- upgrade to the release 2.20-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/v2.20-ReleaseNotes - -* Mon Jul 4 2011 Karel Zak 2.19.1-2 -- fix #716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup -- fix #709681 - failure to mount if a mount point ends with a slash in /etc/fstab -- fix #709319 - 'mount -a' mounts already mounted directories -- fix kernel version parsing - -* Fri May 6 2011 Karel Zak 2.19.1-1 -- upgrade to the release 2.19.1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-ReleaseNotes - -* Wed Apr 20 2011 Karel Zak 2.19.1-0.1 -- upgrade to the release 2.19.1-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19.1-rc1-ChangeLog - -* Mon Mar 7 2011 Karel Zak 2.19-2 -- fix #682502 - Broken source URL to floppy tarball, new version available -- upgrade to floppy-0.18 - -* Thu Feb 10 2011 Karel Zak 2.19-1 -- upgrade to the release 2.19 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes -- remove /sbin/mount.tmpfs -- integrated to mount(8) - -* Tue Feb 8 2011 Karel Zak 2.19-0.6 -- fix #665062 - add support for the postlogin PAM stack to util-linux-ng - -* Mon Feb 07 2011 Fedora Release Engineering - 2.19-0.5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Karel Zak 2.19-0.4 -- upgrade to the release 2.19-rc3 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc3-ChangeLog - -* Tue Jan 25 2011 Karel Zak 2.19-0.3 -- upgrade to the release 2.19-rc2 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-rc2-ChangeLog -- fix #671893 - SELinux is preventing /bin/chown from 'setattr' accesses - on the file mounts. - -* Wed Jan 19 2011 Karel Zak 2.19-0.2 -- clean up specfile (review #667416) - -* Wed Jan 5 2011 Karel Zak 2.19-0.1 -- upgrade to the release 2.19-rc1 - ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/v2.19-ReleaseNotes - -* 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 - -* Fri 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 - -* Thu 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). - -* Thu Mar 9 2006 Jesse Keating 2.13-0.20 -- Better calling of restorecon as suggested by Bill Nottingham -- prereq restorecon to avoid ordering issues - -* Thu 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 - -* Sat 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 - -* Sat 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). - -* Mon 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. From 1d94d2966ad14311b3ad3c010f1116e81dc7ed42 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 15 Feb 2024 11:39:09 -0500 Subject: [PATCH 369/425] Backport https://github.com/util-linux/util-linux/commit/211a9da0b4e9704eea210d7944b723fa78272c79 xref https://github.com/coreos/rpm-ostree/issues/4830 --- ...apply-landlock-without-configuration.patch | 32 +++++++++++++++++++ util-linux.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 0001-setpriv-apply-landlock-without-configuration.patch diff --git a/0001-setpriv-apply-landlock-without-configuration.patch b/0001-setpriv-apply-landlock-without-configuration.patch new file mode 100644 index 0000000..287e5da --- /dev/null +++ b/0001-setpriv-apply-landlock-without-configuration.patch @@ -0,0 +1,32 @@ +From 211a9da0b4e9704eea210d7944b723fa78272c79 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Wed, 31 Jan 2024 18:01:08 +0100 +Subject: [PATCH] setpriv: apply landlock without configuration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes #2746 + +Signed-off-by: Thomas Weißschuh +--- + sys-utils/setpriv-landlock.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sys-utils/setpriv-landlock.c b/sys-utils/setpriv-landlock.c +index 153e748f6..00ad38c61 100644 +--- a/sys-utils/setpriv-landlock.c ++++ b/sys-utils/setpriv-landlock.c +@@ -166,6 +166,9 @@ void do_landlock(const struct setpriv_landlock_opts *opts) + struct list_head *entry; + int fd, ret; + ++ if (!opts->access_fs) ++ return; ++ + const struct landlock_ruleset_attr ruleset_attr = { + .handled_access_fs = opts->access_fs, + }; +-- +2.41.0 + diff --git a/util-linux.spec b/util-linux.spec index 85ab6d6..839ef65 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -98,6 +98,8 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +Patch2: 0001-setpriv-apply-landlock-without-configuration.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 0bd50d406feb47fb2a7f2b37a948bf4db506667e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 21 Feb 2024 11:30:53 +0100 Subject: [PATCH 370/425] use SPDX based identifiers for license field --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 839ef65..826ae17 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.40 Release: %autorelease -p -e rc1 -License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain +License: GPL-1.0-or-later AND GPL-2.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros From f0320c8ef7c46d0e3ac0ae50328ad7d0d136d318 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 28 Feb 2024 14:27:30 +0100 Subject: [PATCH 371/425] fix license related stuff Signed-off-by: Karel Zak (cherry picked from commit 2cc6ef8a87016c91db7fe5599abd8a863c77acdf) --- ...e-proper-XSPD-identifier-for-GPL-2.0.patch | 387 ++++++++++++++++++ util-linux.spec | 55 +-- 2 files changed, 419 insertions(+), 23 deletions(-) create mode 100644 0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch diff --git a/0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch b/0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch new file mode 100644 index 0000000..4e9c6ff --- /dev/null +++ b/0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch @@ -0,0 +1,387 @@ +Basede on upstream: + 9769e7b9562d5b856e95a93d0935f864be00baf9 + 1ea0695525dc89afaf3ef78807426e494683dc33 + +diff --git a/Documentation/licenses/COPYING.GPL-2.0-only b/Documentation/licenses/COPYING.GPL-2.0-only +new file mode 100644 +index 000000000..d159169d1 +--- /dev/null ++++ b/Documentation/licenses/COPYING.GPL-2.0-only +@@ -0,0 +1,339 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Lesser General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Lesser General ++Public License instead of this License. +diff --git a/README.licensing b/README.licensing +index 2af646246..4454f8392 100644 +--- a/README.licensing ++++ b/README.licensing +@@ -4,7 +4,7 @@ There is code under: + + * GPL-1.0-or-later - GNU General Public License version 1, or any later version + +- * GPL-2.0 - GNU General Public License version 2 ++ * GPL-2.0-only - GNU General Public License version 2 + + * GPL-2.0-or-later - GNU General Public License version 2, or any later version + +diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c +index d8fc3dc7b..2171f7623 100644 +--- a/sys-utils/lscpu-dmi.c ++++ b/sys-utils/lscpu-dmi.c +@@ -1,5 +1,5 @@ + /* +- * SPDX-License-Identifier: GPL-2.0 ++ * SPDX-License-Identifier: GPL-2.0-only + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c +index 73ada265b..8f7bac922 100644 +--- a/sys-utils/nsenter.c ++++ b/sys-utils/nsenter.c +@@ -1,5 +1,5 @@ + /* +- * SPDX-License-Identifier: GPL-2.0 ++ * SPDX-License-Identifier: GPL-2.0-only + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +-- +2.43.2 + diff --git a/util-linux.spec b/util-linux.spec index 826ae17..15ecb20 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.40 Release: %autorelease -p -e rc1 -License: GPL-1.0-or-later AND GPL-2.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain +License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros @@ -98,7 +98,9 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +#### Upstream Patch2: 0001-setpriv-apply-landlock-without-configuration.patch +Patch3: 0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch %description The util-linux package contains a large variety of low-level system @@ -109,7 +111,8 @@ program. %package -n util-linux-core Summary: The most essential utilities from the util-linux suite -License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain +License: GPL-2.0-only AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain + Provides: /bin/dmesg Provides: /bin/kill Provides: /bin/more @@ -135,7 +138,7 @@ minimal installations. %package -n libfdisk Summary: Partitioning library for fdisk-like programs -License: LGPLv2+ +License: LGPL-2.1-or-later %description -n libfdisk This is library for fdisk-like programs, part of util-linux. @@ -143,7 +146,7 @@ This is library for fdisk-like programs, part of util-linux. %package -n libfdisk-devel Summary: Partitioning library for fdisk-like programs -License: LGPLv2+ +License: LGPL-2.1-or-later Requires: libfdisk%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -154,7 +157,7 @@ part of util-linux. %package -n libsmartcols Summary: Formatting library for ls-like programs -License: LGPLv2+ +License: LGPL-2.1-or-later %description -n libsmartcols This is library for ls-like terminal programs, part of util-linux. @@ -162,7 +165,7 @@ This is library for ls-like terminal programs, part of util-linux. %package -n libsmartcols-devel Summary: Formatting library for ls-like programs -License: LGPLv2+ +License: LGPL-2.1-or-later Requires: libsmartcols%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -173,7 +176,7 @@ part of util-linux. %package -n libmount Summary: Device mounting library -License: LGPLv2+ +License: LGPL-2.1-or-later Requires: libblkid%{?_isa} = %{version}-%{release} Requires: libuuid%{?_isa} = %{version}-%{release} Conflicts: filesystem < 3 @@ -184,7 +187,7 @@ This is the device mounting library, part of util-linux. %package -n libmount-devel Summary: Device mounting library -License: LGPLv2+ +License: LGPL-2.1-or-later Requires: libmount%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -195,7 +198,7 @@ part of util-linux. %package -n libblkid Summary: Block device ID library -License: LGPLv2+ +License: LGPL-2.1-or-later Requires: libuuid%{?_isa} = %{version}-%{release} Conflicts: filesystem < 3 @@ -205,7 +208,7 @@ This is block device identification library, part of util-linux. %package -n libblkid-devel Summary: Block device ID library -License: LGPLv2+ +License: LGPL-2.1-or-later Requires: libblkid%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -216,7 +219,7 @@ part of util-linux. %package -n libuuid Summary: Universally unique ID library -License: BSD +License: BSD-3-Clause Conflicts: filesystem < 3 %description -n libuuid @@ -233,7 +236,7 @@ See also the "uuid" package, which is a separate implementation. %package -n libuuid-devel Summary: Universally unique ID library -License: BSD +License: BSD-3-Clause AND LGPL-2.1-or-later Requires: libuuid%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -254,7 +257,7 @@ See also the "uuid-devel" package, which is a separate implementation. %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs Requires: libuuid = %{version}-%{release} -License: GPLv2 +License: GPL-2.0-only Requires(pre): shadow-utils %{?systemd_ordering} @@ -267,7 +270,7 @@ SMP systems. %package -n %{pypkg}-libmount Summary: Python bindings for the libmount library Requires: libmount%{?_isa} = %{version}-%{release} -License: LGPLv2+ +License: LGPL-2.1-or-later %description -n %{pypkg}-libmount The libmount-python package contains a module that permits applications @@ -279,7 +282,7 @@ mountinfo, etc) and mount filesystems. %package -n util-linux-i18n Summary: Internationalization pack for util-linux Requires: util-linux = %{version}-%{release} -License: GPLv2 +License: GPL-2.0-or-later %description -n util-linux-i18n Internationalization pack with translated messages and manual pages for @@ -777,6 +780,7 @@ fi %files -n util-linux-core +%license Documentation/licenses/* %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount %{_bindir}/chrt @@ -868,7 +872,7 @@ fi %files -n uuidd -%license Documentation/licenses/COPYING.GPL-2.0-or-later +%license Documentation/licenses/COPYING.GPL-2.0-only %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd %{_unitdir}/uuidd.* @@ -879,41 +883,44 @@ fi %files -n libfdisk -%license Documentation/licenses/COPYING.LGPL-2.1-or-later libfdisk/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libfdisk.so.* %files -n libfdisk-devel +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libfdisk.so %{_includedir}/libfdisk %{_libdir}/pkgconfig/fdisk.pc %files -n libsmartcols -%license Documentation/licenses/COPYING.LGPL-2.1-or-later libsmartcols/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libsmartcols.so.* %files -n libsmartcols-devel +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libsmartcols.so %{_includedir}/libsmartcols %{_libdir}/pkgconfig/smartcols.pc %files -n libmount -%license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libmount.so.* %files -n libmount-devel +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libmount.so %{_includedir}/libmount %{_libdir}/pkgconfig/mount.pc %files -n libblkid -%doc libblkid/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libblkid.so.* %files -n libblkid-devel -%doc libblkid/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libblkid.so %{_includedir}/blkid %{_mandir}/man3/libblkid.3* @@ -921,10 +928,11 @@ fi %files -n libuuid -%license Documentation/licenses/COPYING.BSD-3-Clause libuuid/COPYING +%license Documentation/licenses/COPYING.BSD-3-Clause %{_libdir}/libuuid.so.* %files -n libuuid-devel +%license Documentation/licenses/COPYING.BSD-3-Clause Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libuuid.so %{_includedir}/uuid %{_mandir}/man3/uuid.3* @@ -942,10 +950,11 @@ fi %{_libdir}/pkgconfig/uuid.pc %files -n %{pypkg}-libmount -%license Documentation/licenses/COPYING.LGPL-2.1-or-later libmount/COPYING +%license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/python*/site-packages/libmount/ %files -n util-linux-i18n -f %{name}.lang +%license Documentation/licenses/COPYING.GPL-2.0-or-later %changelog %autochangelog From bc83b318ded4e7ed042511c40b1c4e14928ba841 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 29 Mar 2024 08:13:14 +0100 Subject: [PATCH 372/425] upgrade to v2.40 --- .gitignore | 1 + ...e-proper-XSPD-identifier-for-GPL-2.0.patch | 387 ------------------ ...apply-landlock-without-configuration.patch | 32 -- sources | 2 +- util-linux.spec | 14 +- 5 files changed, 6 insertions(+), 430 deletions(-) delete mode 100644 0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch delete mode 100644 0001-setpriv-apply-landlock-without-configuration.patch diff --git a/.gitignore b/.gitignore index 3e24365..fb30fd7 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,4 @@ /util-linux-2.39.2.tar.xz /util-linux-2.39.3.tar.xz /util-linux-2.40-rc1.tar.xz +/util-linux-2.40.tar.xz diff --git a/0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch b/0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch deleted file mode 100644 index 4e9c6ff..0000000 --- a/0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch +++ /dev/null @@ -1,387 +0,0 @@ -Basede on upstream: - 9769e7b9562d5b856e95a93d0935f864be00baf9 - 1ea0695525dc89afaf3ef78807426e494683dc33 - -diff --git a/Documentation/licenses/COPYING.GPL-2.0-only b/Documentation/licenses/COPYING.GPL-2.0-only -new file mode 100644 -index 000000000..d159169d1 ---- /dev/null -+++ b/Documentation/licenses/COPYING.GPL-2.0-only -@@ -0,0 +1,339 @@ -+ GNU GENERAL PUBLIC LICENSE -+ Version 2, June 1991 -+ -+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+License is intended to guarantee your freedom to share and change free -+software--to make sure the software is free for all its users. This -+General Public License applies to most of the Free Software -+Foundation's software and to any other program whose authors commit to -+using it. (Some other Free Software Foundation software is covered by -+the GNU Lesser General Public License instead.) You can apply it to -+your programs, too. -+ -+ When we speak of free software, we are referring to freedom, not -+price. Our General Public Licenses are designed to make sure that you -+have the freedom to distribute copies of free software (and charge for -+this service if you wish), that you receive source code or can get it -+if you want it, that you can change the software or use pieces of it -+in new free programs; and that you know you can do these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+anyone to deny you these rights or to ask you to surrender the rights. -+These restrictions translate to certain responsibilities for you if you -+distribute copies of the software, or if you modify it. -+ -+ For example, if you distribute copies of such a program, whether -+gratis or for a fee, you must give the recipients all the rights that -+you have. You must make sure that they, too, receive or can get the -+source code. And you must show them these terms so they know their -+rights. -+ -+ We protect your rights with two steps: (1) copyright the software, and -+(2) offer you this license which gives you legal permission to copy, -+distribute and/or modify the software. -+ -+ Also, for each author's protection and ours, we want to make certain -+that everyone understands that there is no warranty for this free -+software. If the software is modified by someone else and passed on, we -+want its recipients to know that what they have is not the original, so -+that any problems introduced by others will not reflect on the original -+authors' reputations. -+ -+ Finally, any free program is threatened constantly by software -+patents. We wish to avoid the danger that redistributors of a free -+program will individually obtain patent licenses, in effect making the -+program proprietary. To prevent this, we have made it clear that any -+patent must be licensed for everyone's free use or not licensed at all. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. -+ -+ GNU GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License applies to any program or other work which contains -+a notice placed by the copyright holder saying it may be distributed -+under the terms of this General Public License. The "Program", below, -+refers to any such program or work, and a "work based on the Program" -+means either the Program or any derivative work under copyright law: -+that is to say, a work containing the Program or a portion of it, -+either verbatim or with modifications and/or translated into another -+language. (Hereinafter, translation is included without limitation in -+the term "modification".) Each licensee is addressed as "you". -+ -+Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running the Program is not restricted, and the output from the Program -+is covered only if its contents constitute a work based on the -+Program (independent of having been made by running the Program). -+Whether that is true depends on what the Program does. -+ -+ 1. You may copy and distribute verbatim copies of the Program's -+source code as you receive it, in any medium, provided that you -+conspicuously and appropriately publish on each copy an appropriate -+copyright notice and disclaimer of warranty; keep intact all the -+notices that refer to this License and to the absence of any warranty; -+and give any other recipients of the Program a copy of this License -+along with the Program. -+ -+You may charge a fee for the physical act of transferring a copy, and -+you may at your option offer warranty protection in exchange for a fee. -+ -+ 2. You may modify your copy or copies of the Program or any portion -+of it, thus forming a work based on the Program, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) You must cause the modified files to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ b) You must cause any work that you distribute or publish, that in -+ whole or in part contains or is derived from the Program or any -+ part thereof, to be licensed as a whole at no charge to all third -+ parties under the terms of this License. -+ -+ c) If the modified program normally reads commands interactively -+ when run, you must cause it, when started running for such -+ interactive use in the most ordinary way, to print or display an -+ announcement including an appropriate copyright notice and a -+ notice that there is no warranty (or else, saying that you provide -+ a warranty) and that users may redistribute the program under -+ these conditions, and telling the user how to view a copy of this -+ License. (Exception: if the Program itself is interactive but -+ does not normally print such an announcement, your work based on -+ the Program is not required to print an announcement.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Program, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Program, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Program. -+ -+In addition, mere aggregation of another work not based on the Program -+with the Program (or with a work based on the Program) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may copy and distribute the Program (or a work based on it, -+under Section 2) in object code or executable form under the terms of -+Sections 1 and 2 above provided that you also do one of the following: -+ -+ a) Accompany it with the complete corresponding machine-readable -+ source code, which must be distributed under the terms of Sections -+ 1 and 2 above on a medium customarily used for software interchange; or, -+ -+ b) Accompany it with a written offer, valid for at least three -+ years, to give any third party, for a charge no more than your -+ cost of physically performing source distribution, a complete -+ machine-readable copy of the corresponding source code, to be -+ distributed under the terms of Sections 1 and 2 above on a medium -+ customarily used for software interchange; or, -+ -+ c) Accompany it with the information you received as to the offer -+ to distribute corresponding source code. (This alternative is -+ allowed only for noncommercial distribution and only if you -+ received the program in object code or executable form with such -+ an offer, in accord with Subsection b above.) -+ -+The source code for a work means the preferred form of the work for -+making modifications to it. For an executable work, complete source -+code means all the source code for all modules it contains, plus any -+associated interface definition files, plus the scripts used to -+control compilation and installation of the executable. However, as a -+special exception, the source code distributed need not include -+anything that is normally distributed (in either source or binary -+form) with the major components (compiler, kernel, and so on) of the -+operating system on which the executable runs, unless that component -+itself accompanies the executable. -+ -+If distribution of executable or object code is made by offering -+access to copy from a designated place, then offering equivalent -+access to copy the source code from the same place counts as -+distribution of the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 4. You may not copy, modify, sublicense, or distribute the Program -+except as expressly provided under this License. Any attempt -+otherwise to copy, modify, sublicense or distribute the Program is -+void, and will automatically terminate your rights under this License. -+However, parties who have received copies, or rights, from you under -+this License will not have their licenses terminated so long as such -+parties remain in full compliance. -+ -+ 5. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Program or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Program (or any work based on the -+Program), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Program or works based on it. -+ -+ 6. Each time you redistribute the Program (or any work based on the -+Program), the recipient automatically receives a license from the -+original licensor to copy, distribute or modify the Program subject to -+these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties to -+this License. -+ -+ 7. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Program at all. For example, if a patent -+license would not permit royalty-free redistribution of the Program by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Program. -+ -+If any portion of this section is held invalid or unenforceable under -+any particular circumstance, the balance of the section is intended to -+apply and the section as a whole is intended to apply in other -+circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system, which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 8. If the distribution and/or use of the Program is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Program under this License -+may add an explicit geographical distribution limitation excluding -+those countries, so that distribution is permitted only in or among -+countries not thus excluded. In such case, this License incorporates -+the limitation as if written in the body of this License. -+ -+ 9. The Free Software Foundation may publish revised and/or new versions -+of the General Public License from time to time. Such new versions will -+be similar in spirit to the present version, but may differ in detail to -+address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Program -+specifies a version number of this License which applies to it and "any -+later version", you have the option of following the terms and conditions -+either of that version or of any later version published by the Free -+Software Foundation. If the Program does not specify a version number of -+this License, you may choose any version ever published by the Free Software -+Foundation. -+ -+ 10. If you wish to incorporate parts of the Program into other free -+programs whose distribution conditions are different, write to the author -+to ask for permission. For software which is copyrighted by the Free -+Software Foundation, write to the Free Software Foundation; we sometimes -+make exceptions for this. Our decision will be guided by the two goals -+of preserving the free status of all derivatives of our free software and -+of promoting the sharing and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -+REPAIR OR CORRECTION. -+ -+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -+POSSIBILITY OF SUCH DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ How to Apply These Terms to Your New Programs -+ -+ If you develop a new program, and you want it to be of the greatest -+possible use to the public, the best way to achieve this is to make it -+free software which everyone can redistribute and change under these terms. -+ -+ To do so, attach the following notices to the program. It is safest -+to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least -+the "copyright" line and a pointer to where the full notice is found. -+ -+ -+ Copyright (C) -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with this program; if not, write to the Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+If the program is interactive, make it output a short notice like this -+when it starts in an interactive mode: -+ -+ Gnomovision version 69, Copyright (C) year name of author -+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -+ This is free software, and you are welcome to redistribute it -+ under certain conditions; type `show c' for details. -+ -+The hypothetical commands `show w' and `show c' should show the appropriate -+parts of the General Public License. Of course, the commands you use may -+be called something other than `show w' and `show c'; they could even be -+mouse-clicks or menu items--whatever suits your program. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the program, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program -+ `Gnomovision' (which makes passes at compilers) written by James Hacker. -+ -+ , 1 April 1989 -+ Ty Coon, President of Vice -+ -+This General Public License does not permit incorporating your program into -+proprietary programs. If your program is a subroutine library, you may -+consider it more useful to permit linking proprietary applications with the -+library. If this is what you want to do, use the GNU Lesser General -+Public License instead of this License. -diff --git a/README.licensing b/README.licensing -index 2af646246..4454f8392 100644 ---- a/README.licensing -+++ b/README.licensing -@@ -4,7 +4,7 @@ There is code under: - - * GPL-1.0-or-later - GNU General Public License version 1, or any later version - -- * GPL-2.0 - GNU General Public License version 2 -+ * GPL-2.0-only - GNU General Public License version 2 - - * GPL-2.0-or-later - GNU General Public License version 2, or any later version - -diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c -index d8fc3dc7b..2171f7623 100644 ---- a/sys-utils/lscpu-dmi.c -+++ b/sys-utils/lscpu-dmi.c -@@ -1,5 +1,5 @@ - /* -- * SPDX-License-Identifier: GPL-2.0 -+ * SPDX-License-Identifier: GPL-2.0-only - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c -index 73ada265b..8f7bac922 100644 ---- a/sys-utils/nsenter.c -+++ b/sys-utils/nsenter.c -@@ -1,5 +1,5 @@ - /* -- * SPDX-License-Identifier: GPL-2.0 -+ * SPDX-License-Identifier: GPL-2.0-only - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the --- -2.43.2 - diff --git a/0001-setpriv-apply-landlock-without-configuration.patch b/0001-setpriv-apply-landlock-without-configuration.patch deleted file mode 100644 index 287e5da..0000000 --- a/0001-setpriv-apply-landlock-without-configuration.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 211a9da0b4e9704eea210d7944b723fa78272c79 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Wed, 31 Jan 2024 18:01:08 +0100 -Subject: [PATCH] setpriv: apply landlock without configuration -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes #2746 - -Signed-off-by: Thomas Weißschuh ---- - sys-utils/setpriv-landlock.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/sys-utils/setpriv-landlock.c b/sys-utils/setpriv-landlock.c -index 153e748f6..00ad38c61 100644 ---- a/sys-utils/setpriv-landlock.c -+++ b/sys-utils/setpriv-landlock.c -@@ -166,6 +166,9 @@ void do_landlock(const struct setpriv_landlock_opts *opts) - struct list_head *entry; - int fd, ret; - -+ if (!opts->access_fs) -+ return; -+ - const struct landlock_ruleset_attr ruleset_attr = { - .handled_access_fs = opts->access_fs, - }; --- -2.41.0 - diff --git a/sources b/sources index 07a0cbb..26ecdeb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.40-rc1.tar.xz) = ba307c4686c7989c1d563f19ca6a1c06c237de2fe063a51e28aaefee7a1afab49deb94abd80b4263c2d671f791798112b287dc3f1b3d73d755119e01883aaeb0 +SHA512 (util-linux-2.40.tar.xz) = f06e61d4ee0e196223f7341ec75a16a6671f82d6e353823490ecff17e947bb169a6b65177e3ab0da6e733e079b24d6a77905a0e8bbfed82ca9aa22a3facb6180 diff --git a/util-linux.spec b/util-linux.spec index 15ecb20..bf1d64c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,12 +2,13 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.40 -Release: %autorelease -p -e rc1 +# -e rc1 +Release: %autorelease -p License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux ### Macros -%global upstream_version %{version}-rc1 +%global upstream_version %{version} %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global compldir %{_datadir}/bash-completion/completions/ @@ -48,7 +49,6 @@ Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/ut Source1: util-linux-login.pamd Source2: util-linux-remote.pamd Source3: util-linux-chsh-chfn.pamd -Source4: uuidd-tmpfiles.conf Source5: adjtime Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd @@ -98,10 +98,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -#### Upstream -Patch2: 0001-setpriv-apply-landlock-without-configuration.patch -Patch3: 0001-docs-use-proper-XSPD-identifier-for-GPL-2.0.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -345,13 +341,11 @@ mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man{1,6,8,5} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} -mkdir -p %{buildroot}%{_tmpfilesdir}/tmpfiles.d # install util-linux %make_install # And a dirs uuidd needs that the makefiles don't create -install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/uuidd.conf install -d %{buildroot}/run/uuidd install -d %{buildroot}/var/lib/libuuid @@ -879,7 +873,7 @@ fi %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd -%{_tmpfilesdir}/uuidd.conf +%{_tmpfilesdir}/uuidd-tmpfiles.conf %files -n libfdisk From 981295a856c8c691e1305e6876da93b85df026a1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 8 Apr 2024 10:58:15 +0200 Subject: [PATCH 373/425] remove pre-release option --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index bf1d64c..18e254a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,8 +2,8 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.40 -# -e rc1 -Release: %autorelease -p +# -p -e rc1 +Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux From e345fc8ab4fb999c4065c8d9a98e4deaef6e9242 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 6 May 2024 11:12:57 +0200 Subject: [PATCH 374/425] upgrade to stable v2.40.1 --- .gitignore | 1 + sources | 2 +- util-linux.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fb30fd7..9ecda1d 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,4 @@ /util-linux-2.39.3.tar.xz /util-linux-2.40-rc1.tar.xz /util-linux-2.40.tar.xz +/util-linux-2.40.1.tar.xz diff --git a/sources b/sources index 26ecdeb..442de23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.40.tar.xz) = f06e61d4ee0e196223f7341ec75a16a6671f82d6e353823490ecff17e947bb169a6b65177e3ab0da6e733e079b24d6a77905a0e8bbfed82ca9aa22a3facb6180 +SHA512 (util-linux-2.40.1.tar.xz) = 58ec6eb41d4b6bfc544a80e95c71b5f3798ab4d2a9435d3ee9e5edd56f9b3f09bcb154bdd70e002dc018938937e2e946ae731dcda0f86b362fc43423689e41fc diff --git a/util-linux.spec b/util-linux.spec index 18e254a..3d52c8d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.40 +Version: 2.40.1 # -p -e rc1 Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain From 8472af8e2cef61f096a69a8fcf25e8429fd741f8 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 08:51:30 +0200 Subject: [PATCH 375/425] Rebuilt for Python 3.13 From abe9339a371a544b2ad4ac8a7a152da0fae82a04 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 4 Jul 2024 10:39:33 +0200 Subject: [PATCH 376/425] upgrade from v2.40.1 to v2.40.2 https://kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.2-ReleaseNotes --- .gitignore | 1 + sources | 2 +- util-linux.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9ecda1d..89553dd 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ /util-linux-2.40-rc1.tar.xz /util-linux-2.40.tar.xz /util-linux-2.40.1.tar.xz +/util-linux-2.40.2.tar.xz diff --git a/sources b/sources index 442de23..6967bee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.40.1.tar.xz) = 58ec6eb41d4b6bfc544a80e95c71b5f3798ab4d2a9435d3ee9e5edd56f9b3f09bcb154bdd70e002dc018938937e2e946ae731dcda0f86b362fc43423689e41fc +SHA512 (util-linux-2.40.2.tar.xz) = ffe20b915a518a150401d429b0338bc7022190e4ca0ef91a6d9eea345db8c1e11ad01784163b8fcf978506f3f5cad473f29d5d4ef93a4c66a5ae0ebd9fb0c8f2 diff --git a/util-linux.spec b/util-linux.spec index 3d52c8d..0042b1a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.40.1 +Version: 2.40.2 # -p -e rc1 Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain From 480d4cbafaacec08ea9fe60d03b1f1380845ba6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 8 Apr 2024 21:24:08 +0200 Subject: [PATCH 377/425] Add workaround for borked autotools installation https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin Without this, build on a system with merged-sbin fails. [skip changelog] --- util-linux.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 0042b1a..6cd737d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -434,6 +434,11 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ -regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)\.8.*" \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files +%if "%{_sbindir}" == "%{_bindir}" +# Autotools installation script gets the location wrong :( +mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/ +%endif + %post %systemd_post fstrim.{service,timer} From c96f6dfba772a76c1c998e395fc9640156baf5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 10 Apr 2024 22:05:23 +0200 Subject: [PATCH 378/425] Add compat Providess for binaries under /usr/sbin https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin Requires:/usr/sbin/runuser is present in knot. BuildRequires: /usr/sbin{fsck,sfdisk} used by some other packages. --- util-linux.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 6cd737d..3919360 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -90,6 +90,14 @@ Requires: libsmartcols = %{version}-%{release} Requires: libfdisk = %{version}-%{release} Requires: util-linux-core = %{version}-%{release} +%if "%{_sbindir}" == "%{_bindir}" +# Compat symlinks for Requires in other packages. +# We rely on filesystem to create the symlinks for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/runuser +Provides: /usr/sbin/sfdisk +%endif + ### Ready for upstream? ### # 151635 - makeing /var/log/lastlog @@ -127,6 +135,13 @@ Requires: libsmartcols = %{version}-%{release} # old versions of e2fsprogs contain fsck, uuidgen Conflicts: e2fsprogs < 1.41.8-5 +%if "%{_sbindir}" == "%{_bindir}" +# Compat symlinks for Requires in other packages. +# We rely on filesystem to create the symlinks for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/fsck +%endif + %description -n util-linux-core This is a very basic set of Linux utilities that is necessary on minimal installations. From 479766f342fa0b4b2f2e89090ce623d0c8987e72 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:28:34 +0000 Subject: [PATCH 379/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 0921016466e03ce6d9700c3d15ef74fae6fa7296 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 14 Aug 2024 13:28:56 +0200 Subject: [PATCH 380/425] Fix whitespace issues --- util-linux.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 3919360..ae2dbca 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -494,7 +494,7 @@ fi %files -f %{name}.files %doc README NEWS AUTHORS -%doc Documentation/deprecated.txt +%doc Documentation/deprecated.txt %license Documentation/licenses/* %doc misc-utils/getopt-*.{bash,tcsh} @@ -972,4 +972,3 @@ fi %changelog %autochangelog - From 6975c91b719e1ad13d96215197d8b80ce1c62eac Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 14 Aug 2024 13:29:11 +0200 Subject: [PATCH 381/425] Remove setgid and tty group from /usr/bin/write We already require root privileges for /usr/bin/wall so let's do the same for /usr/bin/write. """ -rwxr-xr-x 1 root root 28456 Aug 14 02:00 /usr/bin/wall -rwxr-xr-x 1 root root 36792 Aug 14 02:00 /usr/bin/wdctl -rwxr-xr-x 1 root root 33160 Aug 14 02:00 /usr/bin/whereis -rwxr-xr-x 1 root root 24352 Aug 14 02:00 /usr/bin/write """ --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index ae2dbca..e1fc728 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -511,7 +511,6 @@ fi %attr(4755,root,root) %{_bindir}/su %attr(755,root,root) %{_bindir}/login -%attr(2755,root,tty) %{_bindir}/write %attr(4711,root,root) %{_bindir}/chfn %attr(4711,root,root) %{_bindir}/chsh @@ -570,6 +569,7 @@ fi %{_bindir}/wall %{_bindir}/wdctl %{_bindir}/whereis +%{_bindir}/write %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/choom.1* From 5a2471d6e5b0055cb607b30dc2e9613b312ffb74 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 23 Aug 2024 11:27:11 +0200 Subject: [PATCH 382/425] Move script utilities to util-linux-script subpackage This allows installing util-linux without pulling in the libutempter library which includes a setgid binary that I'd like to avoid installing on my systems. --- util-linux.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index e1fc728..6f01ef4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -299,6 +299,12 @@ License: GPL-2.0-or-later Internationalization pack with translated messages and manual pages for util-linux commands. +%package -n util-linux-script +Summary: The various script utilities +Requires: util-linux = %{version}-%{release} + +%description -n util-linux-script +The script, scriptreplay and scriptlive utilities. %prep %autosetup -p1 -n %{name}-%{upstream_version} @@ -553,9 +559,6 @@ fi %{_bindir}/prlimit %{_bindir}/rename %{_bindir}/rev -%{_bindir}/script -%{_bindir}/scriptlive -%{_bindir}/scriptreplay %{_bindir}/setarch %{_bindir}/setpgid %{_bindir}/setpriv @@ -970,5 +973,10 @@ fi %files -n util-linux-i18n -f %{name}.lang %license Documentation/licenses/COPYING.GPL-2.0-or-later +%files -n util-linux-script +%{_bindir}/script +%{_bindir}/scriptlive +%{_bindir}/scriptreplay + %changelog %autochangelog From 61d2c55ceb565b0fdc391aded5bd9af71ca026ec Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 3 Sep 2024 12:15:12 +0200 Subject: [PATCH 383/425] improve util-linux-script subpackage --- util-linux.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 6f01ef4..4017fe7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -300,11 +300,11 @@ Internationalization pack with translated messages and manual pages for util-linux commands. %package -n util-linux-script -Summary: The various script utilities +Summary: Utilities for creating and replaying typescripts of terminal session Requires: util-linux = %{version}-%{release} %description -n util-linux-script -The script, scriptreplay and scriptlive utilities. +The utilities scripts, scriptreplay, and scriptlive are used to create and replay terminal sessions. %prep %autosetup -p1 -n %{name}-%{upstream_version} @@ -609,9 +609,6 @@ fi %{_mandir}/man1/rename.1* %{_mandir}/man1/rev.1* %{_mandir}/man1/runuser.1* -%{_mandir}/man1/script.1* -%{_mandir}/man1/scriptlive.1* -%{_mandir}/man1/scriptreplay.1* %{_mandir}/man1/setpgid.1* %{_mandir}/man1/setpriv.1* %{_mandir}/man1/setterm.1* @@ -748,9 +745,6 @@ fi %{compldir}/rfkill %{compldir}/rtcwake %{compldir}/runuser -%{compldir}/script -%{compldir}/scriptlive -%{compldir}/scriptreplay %{compldir}/setarch %{compldir}/setpriv %{compldir}/setpgid @@ -977,6 +971,12 @@ fi %{_bindir}/script %{_bindir}/scriptlive %{_bindir}/scriptreplay +%{_mandir}/man1/script.1* +%{_mandir}/man1/scriptlive.1* +%{_mandir}/man1/scriptreplay.1* +%{compldir}/script +%{compldir}/scriptlive +%{compldir}/scriptreplay %changelog %autochangelog From 240d76d679c764ffc52573db7022ac296420c049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:42:55 +0100 Subject: [PATCH 384/425] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin From d6af9bf445c328efa44d6c3a7acb654a25552975 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 15 Jan 2025 11:19:34 +0100 Subject: [PATCH 385/425] upgrade to v2.40.4 https://www.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.4-ReleaseNotes https://www.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.3-ReleaseNotes --- .gitignore | 1 + sources | 2 +- util-linux.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 89553dd..9be7f90 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,4 @@ /util-linux-2.40.tar.xz /util-linux-2.40.1.tar.xz /util-linux-2.40.2.tar.xz +/util-linux-2.40.4.tar.xz diff --git a/sources b/sources index 6967bee..ed7ccad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.40.2.tar.xz) = ffe20b915a518a150401d429b0338bc7022190e4ca0ef91a6d9eea345db8c1e11ad01784163b8fcf978506f3f5cad473f29d5d4ef93a4c66a5ae0ebd9fb0c8f2 +SHA512 (util-linux-2.40.4.tar.xz) = 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124 diff --git a/util-linux.spec b/util-linux.spec index 4017fe7..7d3d4c5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.40.2 +Version: 2.40.4 # -p -e rc1 Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain From 0298d7d2a249367d277f081baec724dcc6431c19 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 14:00:04 +0000 Subject: [PATCH 386/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 56f4756f3ac033f9cc7b2be94847a3cb38ad8da1 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 3 Jan 2025 16:18:03 -0500 Subject: [PATCH 387/425] Conditionalize pam dependency pam is a host service, and is not used inside of flatpaks or toolboxes. --- util-linux.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 7d3d4c5..beae061 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -81,7 +81,8 @@ Obsoletes: util-linux-user < 2.39-1 Provides: util-linux-user = %{version}-%{release} Requires(post): coreutils -Requires: pam >= 1.1.3-7, /etc/pam.d/system-auth +Requires: (pam >= 1.1.3-7 if systemd) +Requires: (/etc/pam.d/system-auth if systemd) Requires: audit-libs >= 1.0.6 Requires: libuuid = %{version}-%{release} Requires: libblkid = %{version}-%{release} From 3abb2f6222109a9a7e9ab9126cb338a407f574ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 1 Feb 2025 19:58:02 +0100 Subject: [PATCH 388/425] Add explicit BR: libxcrypt-devel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index 7d3d4c5..d66fdbb 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -21,6 +21,7 @@ BuildRequires: make BuildRequires: audit-libs-devel >= 1.0.6 BuildRequires: gettext-devel BuildRequires: libselinux-devel +BuildRequires: libxcrypt-devel BuildRequires: ncurses-devel BuildRequires: readline-devel BuildRequires: pam-devel From 674f706e83053354b74c7ac65bfa41df8c316a52 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Feb 2025 10:43:12 +0100 Subject: [PATCH 389/425] add sysusers config for uuidd --- util-linux-uuidd-sysusers.conf | 1 + util-linux.spec | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 util-linux-uuidd-sysusers.conf diff --git a/util-linux-uuidd-sysusers.conf b/util-linux-uuidd-sysusers.conf new file mode 100644 index 0000000..afd02eb --- /dev/null +++ b/util-linux-uuidd-sysusers.conf @@ -0,0 +1 @@ +u uuidd - "UUID generator helper daemon" /var/lib/libuuid diff --git a/util-linux.spec b/util-linux.spec index d66fdbb..b8d0028 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -56,6 +56,9 @@ Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd +# temporary, will be in upstream >= v2.41 +Source16: util-linux-uuidd-sysusers.conf + ### Obsoletes & Conflicts & Provides Conflicts: initscripts < 9.79-4 Conflicts: bash-completion < 1:2.1-1 @@ -371,6 +374,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} install -d %{buildroot}/run/uuidd install -d %{buildroot}/var/lib/libuuid +install -m 644 -D %{SOURCE16} %{buildroot}%{_sysusersdir}/uuidd.conf + # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -892,6 +897,7 @@ fi %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd %{_tmpfilesdir}/uuidd-tmpfiles.conf +%{_sysusersdir}/uuidd.conf %files -n libfdisk From 3e609994974fb1e87c8c5617fd5d2ed69c8f1c33 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 12 Feb 2025 12:13:29 +0100 Subject: [PATCH 390/425] remove useradd (replaced by sysusers config) --- util-linux.spec | 7 ------- 1 file changed, 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index b09fbd5..1b968ec 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -477,13 +477,6 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/ %systemd_postun_with_restart fstrim.timer %systemd_postun fstrim.service -%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 - # Please, keep uuidd running after installation! Note that systemd_post is # "systemctl preset" and it enable/disable service only. %post -n uuidd From cd951d5e56b2bbb23183c0c8a5338580fb43343c Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 19 Feb 2025 14:50:05 -0500 Subject: [PATCH 391/425] backport blkid: allow up to 64k erofs block sizes This is a backport of [1], which should help us use EROFS in live media on ppc64le [2]. [1] https://github.com/karelzak/util-linux/commit/ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c [2] https://github.com/coreos/fedora-coreos-tracker/issues/1877 --- ...id-allow-up-to-64k-erofs-block-sizes.patch | 33 +++++++++++++++++++ util-linux.spec | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch diff --git a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch new file mode 100644 index 0000000..825c7d0 --- /dev/null +++ b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch @@ -0,0 +1,33 @@ +From ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Fri, 24 Jan 2025 08:37:12 -0600 +Subject: [PATCH] blkid: allow up to 64k erofs block sizes + +Today, mkfs.erofs defaults to page size for block size, but blkid +does not recognize this. Increase the limit to 64k. + +Reviewed-by: Gao Xiang +Signed-off-by: Eric Sandeen +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/erofs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c +index 05822460b..57fd80220 100644 +--- a/libblkid/src/superblocks/erofs.c ++++ b/libblkid/src/superblocks/erofs.c +@@ -73,8 +73,8 @@ static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) + if (!sb) + return errno ? -errno : BLKID_PROBE_NONE; + +- /* EROFS is restricted to 4KiB block size */ +- if (sb->blkszbits > 31 || (1U << sb->blkszbits) > 4096) ++ /* block size must be between 512 and 64k */ ++ if (sb->blkszbits < 9 || sb->blkszbits > 16) + return BLKID_PROBE_NONE; + + if (!erofs_verify_checksum(pr, mag, sb)) +-- +2.48.1 + diff --git a/util-linux.spec b/util-linux.spec index 1b968ec..f5198a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -111,6 +111,9 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +# Backport better support for erofs on ppc64le +Patch2: 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From e873a14a1d864adc9912834adb50e2237ea8c0b0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 May 2025 14:16:44 +0200 Subject: [PATCH 392/425] upgrade to upstream release v2.41 ... https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes - add lastlog2 library and PAM module - add new utils bits, coresched and lastlog2 --- .gitignore | 1 + ...mount-fix-no-canonicalize-regression.patch | 44 ++++++++ ...id-allow-up-to-64k-erofs-block-sizes.patch | 33 ------ ...ed-reference-to-add_namespace_for_ns.patch | 58 ++++++++++ ...e-compilation-without-USE_NS_GET_API.patch | 41 +++++++ ...scription-for-PACKET.PROTOCOL-column.patch | 42 +++++++ ...n-the-protocol-field-of-proc-net-pac.patch | 64 +++++++++++ ...include-cctype-fix-string-comparison.patch | 106 ++++++++++++++++++ ...dmnt-fix-k-option-parsing-regression.patch | 86 ++++++++++++++ ...unt-api-utils-include-linux-unistd.h.patch | 40 +++++++ ...not-use-strerror-on-shared-libraries.patch | 71 ++++++++++++ sources | 2 +- util-linux-uuidd-sysusers.conf | 1 - util-linux.spec | 84 ++++++++++++-- 14 files changed, 627 insertions(+), 46 deletions(-) create mode 100644 0000-libmount-fix-no-canonicalize-regression.patch delete mode 100644 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch create mode 100644 0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch create mode 100644 0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch create mode 100644 0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch create mode 100644 0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch create mode 100644 0005-include-cctype-fix-string-comparison.patch create mode 100644 0006-findmnt-fix-k-option-parsing-regression.patch create mode 100644 0007-include-mount-api-utils-include-linux-unistd.h.patch create mode 100644 0008-Do-not-use-strerror-on-shared-libraries.patch delete mode 100644 util-linux-uuidd-sysusers.conf diff --git a/.gitignore b/.gitignore index 9be7f90..d5db0c0 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ /util-linux-2.40.1.tar.xz /util-linux-2.40.2.tar.xz /util-linux-2.40.4.tar.xz +/util-linux-2.41.tar.xz diff --git a/0000-libmount-fix-no-canonicalize-regression.patch b/0000-libmount-fix-no-canonicalize-regression.patch new file mode 100644 index 0000000..7a19896 --- /dev/null +++ b/0000-libmount-fix-no-canonicalize-regression.patch @@ -0,0 +1,44 @@ +From a131545a35afeaf3b48fa42ddc876dd14f942486 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 24 Mar 2025 14:31:05 +0100 +Subject: libmount: fix --no-canonicalize regression + +Fixes: https://github.com/util-linux/util-linux/issues/3474 +Signed-off-by: Karel Zak +(cherry picked from commit 7dbfe31a83f45d5aef2b508697e9511c569ffbc8) +(cherry picked from commit 77723beaaaca654f72ac9538772e69fbafa8835d) +--- + libmount/src/context.c | 3 --- + sys-utils/mount.8.adoc | 2 +- + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/libmount/src/context.c b/libmount/src/context.c +index 0323cb23d..15a8ad3bb 100644 +--- a/libmount/src/context.c ++++ b/libmount/src/context.c +@@ -530,9 +530,6 @@ int mnt_context_is_xnocanonicalize( + assert(cxt); + assert(type); + +- if (mnt_context_is_nocanonicalize(cxt)) +- return 1; +- + ol = mnt_context_get_optlist(cxt); + if (!ol) + return 0; +diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc +index 4f23f8d1f..5103b91c5 100644 +--- a/sys-utils/mount.8.adoc ++++ b/sys-utils/mount.8.adoc +@@ -756,7 +756,7 @@ Allow to make a target directory (mountpoint) if it does not exist yet. The opti + *X-mount.nocanonicalize*[**=**_type_]:: + Allows disabling of canonicalization for mount source and target paths. By default, the `mount` command resolves all paths to their absolute paths without symlinks. However, this behavior may not be desired in certain situations, such as when binding a mount over a symlink, or a symlink over a directory or another symlink. The optional argument _type_ can be either "source" or "target" (mountpoint). If no _type_ is specified, then canonicalization is disabled for both types. This mount option does not affect the conversion of source tags (e.g. LABEL= or UUID=) and fstab processing. + + +-The command line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but it does not modify flags for open_tree syscalls. ++The command-line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but for backward compatibility, it does not modify open_tree syscall flags and does not allow the bind-mount over a symlink use case. + + + Note that *mount*(8) still sanitizes and canonicalizes the source and target paths specified on the command line by non-root users, regardless of the X-mount.nocanonicalize setting. + +-- +2.49.0 + diff --git a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch deleted file mode 100644 index 825c7d0..0000000 --- a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c Mon Sep 17 00:00:00 2001 -From: Eric Sandeen -Date: Fri, 24 Jan 2025 08:37:12 -0600 -Subject: [PATCH] blkid: allow up to 64k erofs block sizes - -Today, mkfs.erofs defaults to page size for block size, but blkid -does not recognize this. Increase the limit to 64k. - -Reviewed-by: Gao Xiang -Signed-off-by: Eric Sandeen -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/erofs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c -index 05822460b..57fd80220 100644 ---- a/libblkid/src/superblocks/erofs.c -+++ b/libblkid/src/superblocks/erofs.c -@@ -73,8 +73,8 @@ static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) - if (!sb) - return errno ? -errno : BLKID_PROBE_NONE; - -- /* EROFS is restricted to 4KiB block size */ -- if (sb->blkszbits > 31 || (1U << sb->blkszbits) > 4096) -+ /* block size must be between 512 and 64k */ -+ if (sb->blkszbits < 9 || sb->blkszbits > 16) - return BLKID_PROBE_NONE; - - if (!erofs_verify_checksum(pr, mag, sb)) --- -2.48.1 - diff --git a/0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch new file mode 100644 index 0000000..e2ae158 --- /dev/null +++ b/0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch @@ -0,0 +1,58 @@ +From 5f4a11bf3d99512c369b6ba901046d0943ee6d09 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt +Date: Tue, 25 Mar 2025 11:58:18 +0100 +Subject: lsns: fix undefined reference to add_namespace_for_nsfd #3483 + +Fixes: + +sys-utils/lsns-lsns.o: In function `read_process': +lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd' +collect2: error: ld returned 1 exit status + +Signed-off-by: Thomas Devoogdt +(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a) +(cherry picked from commit bd36a077e16eca888d843a0c30e77379aedfe350) +--- + sys-utils/lsns.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c +index 6b2dcba96..d046d69e3 100644 +--- a/sys-utils/lsns.c ++++ b/sys-utils/lsns.c +@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls, pid_t pid, uint64_t fd) + if (get_namespace(ls, sb.st_ino)) + goto out_nsfd; + ++#ifdef USE_NS_GET_API + add_namespace_for_nsfd(ls, nsfd, sb.st_ino); ++#endif ++ + out_nsfd: + close(nsfd); + out_sk: +@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls __attribute__((__unused__)), + { + } + #endif /* HAVE_LINUX_NET_NAMESPACE_H */ ++ + /* Read namespaces open(2)ed explicitly by the process specified by `pc'. */ + static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t pid) + { +@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t p + if (st.st_dev == ls->nsfs_dev) { + if (get_namespace(ls, st.st_ino)) + continue; ++#ifdef USE_NS_GET_API + int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju", (uintmax_t) num); + if (fd >= 0) { + add_namespace_for_nsfd(ls, fd, st.st_ino); + close(fd); + } ++#endif + } else if ((st.st_mode & S_IFMT) == S_IFSOCK) { + add_namespace_from_sock(ls, pid, num); + } +-- +2.49.0 + diff --git a/0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch b/0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch new file mode 100644 index 0000000..07685a2 --- /dev/null +++ b/0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch @@ -0,0 +1,41 @@ +From 45389b02bdc8adeeb35b81dd7ef1e20f0e84bd69 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 1 Apr 2025 14:36:36 +0200 +Subject: lsns: enhance compilation without USE_NS_GET_API + +- Move add_namespace_for_nsfd() declaration to the #ifdef block +(based on c62ed3d58602fd29fe12085f7caf03761ed91b81) + +References: 2ced43400f35f7bd45b29364e04166a63a06e16a +Signed-off-by: Karel Zak +(cherry picked from commit 05d494d32bd9941ae0edbe591cefc047de3e9052) +--- + sys-utils/lsns.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c +index d046d69e3..ede7a3992 100644 +--- a/sys-utils/lsns.c ++++ b/sys-utils/lsns.c +@@ -304,6 +304,9 @@ static inline const struct colinfo *get_column_info(unsigned num) + } + + #ifdef USE_NS_GET_API ++static struct lsns_namespace *add_namespace_for_nsfd(struct lsns *ls, int fd, ino_t ino); ++ ++ + /* Get the inode number for the parent namespace of the namespace `fd' specifies. + * If `pfd' is non-null, the file descriptor opening the parent namespace.*/ + static int get_parent_ns_ino(int fd, enum lsns_type lsns_type, ino_t *pino, int *pfd) +@@ -422,8 +425,6 @@ error: + return rc; + } + +-static struct lsns_namespace *add_namespace_for_nsfd(struct lsns *ls, int fd, ino_t ino); +- + static struct lsns_namespace *get_namespace(struct lsns *ls, ino_t ino) + { + struct list_head *p; +-- +2.49.0 + diff --git a/0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch b/0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch new file mode 100644 index 0000000..7a396cf --- /dev/null +++ b/0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch @@ -0,0 +1,42 @@ +From 6b7fa6aa3a0f59c81cba859563548dd5a0e3213c Mon Sep 17 00:00:00 2001 +From: Masatake YAMATO +Date: Mon, 6 Jan 2025 02:55:19 +0900 +Subject: lsfd: fix the description for PACKET.PROTOCOL column + +Signed-off-by: Masatake YAMATO +(cherry picked from commit df3b38fab56001537364302479b33cb104ef7411) +(cherry picked from commit b7b96894c2f27f8a361f5bab2a239c9f64034557) +--- + lsfd-cmd/lsfd.1.adoc | 2 +- + lsfd-cmd/lsfd.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc +index e9a01d26a..bd6885f82 100644 +--- a/lsfd-cmd/lsfd.1.adoc ++++ b/lsfd-cmd/lsfd.1.adoc +@@ -386,7 +386,7 @@ PACKET.IFACE <``string``>:: + Interface name associated with the packet socket. + + PACKET.PROTOCOL <``string``>:: +-L3 protocol associated with the packet socket. ++L2 protocol associated with the packet socket. + + PARTITION <``string``>:: + Block device name resolved by `/proc/partition`. +diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c +index 66c60a4e8..714083e70 100644 +--- a/lsfd-cmd/lsfd.c ++++ b/lsfd-cmd/lsfd.c +@@ -311,7 +311,7 @@ static const struct colinfo infos[] = { + N_("net interface associated with the packet socket") }, + [COL_PACKET_PROTOCOL] = { "PACKET.PROTOCOL", + 0, SCOLS_FL_RIGHT,SCOLS_JSON_STRING, +- N_("L3 protocol associated with the packet socket") }, ++ N_("L2 protocol associated with the packet socket") }, + [COL_PARTITION] = { "PARTITION", + 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING, + N_("block device name resolved by /proc/partition") }, +-- +2.49.0 + diff --git a/0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch b/0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch new file mode 100644 index 0000000..09efd07 --- /dev/null +++ b/0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch @@ -0,0 +1,64 @@ +From 20066a4dba10ea4893e0c8ec0d939e6a16f949d0 Mon Sep 17 00:00:00 2001 +From: Masatake YAMATO +Date: Mon, 6 Jan 2025 03:30:25 +0900 +Subject: lsfd: (bug fix) scan the protocol field of /proc/net/packet as a hex + number + +Signed-off-by: Masatake YAMATO +(cherry picked from commit 0da7e8201aa7b9b2c5d0e901c0ccfd6f3bdc54d3) +(cherry picked from commit 798e4da071a96b14c7449bced9f16dc351dc5d84) +--- + lsfd-cmd/sock-xinfo.c | 2 +- + tests/expected/lsfd/mkfds-mapped-packet-socket | 4 ++-- + tests/ts/lsfd/mkfds-mapped-packet-socket | 3 ++- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/lsfd-cmd/sock-xinfo.c b/lsfd-cmd/sock-xinfo.c +index f6811213a..42d8e0919 100644 +--- a/lsfd-cmd/sock-xinfo.c ++++ b/lsfd-cmd/sock-xinfo.c +@@ -2373,7 +2373,7 @@ static void load_xinfo_from_proc_packet(ino_t netns_inode) + unsigned long inode; + struct packet_xinfo *pkt; + +- if (sscanf(line, "%*x %*d %" SCNu16 " %" SCNu16 " %u %*d %*d %*d %lu", ++ if (sscanf(line, "%*x %*d %" SCNu16 " %" SCNx16 " %u %*d %*d %*d %lu", + &type, &protocol, &iface, &inode) < 4) + continue; + +diff --git a/tests/expected/lsfd/mkfds-mapped-packet-socket b/tests/expected/lsfd/mkfds-mapped-packet-socket +index ec8795b70..2e9db5eb5 100644 +--- a/tests/expected/lsfd/mkfds-mapped-packet-socket ++++ b/tests/expected/lsfd/mkfds-mapped-packet-socket +@@ -1,8 +1,8 @@ + PACKET + SOCK.PROTONAME: 0 +-type=raw protocol=all iface=lo raw PACKET lo all ++type=raw protocol=ppptalk iface=lo raw PACKET lo ppptalk + NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0 + PACKET + SOCK.PROTONAME: 0 +-type=dgram protocol=all iface=lo dgram PACKET lo all ++type=dgram protocol=ppptalk iface=lo dgram PACKET lo ppptalk + NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0 +diff --git a/tests/ts/lsfd/mkfds-mapped-packet-socket b/tests/ts/lsfd/mkfds-mapped-packet-socket +index 12c5ef6bc..c3a73c54e 100755 +--- a/tests/ts/lsfd/mkfds-mapped-packet-socket ++++ b/tests/ts/lsfd/mkfds-mapped-packet-socket +@@ -35,11 +35,12 @@ FD=3 + EXPR= + INTERFACE=lo + SOCKTYPE= ++PROTOCOL=$(printf "%d" 0x10) + ERR= + + for SOCKTYPE in RAW DGRAM; do + coproc MKFDS { "$TS_HELPER_MKFDS" mapped-packet-socket $FD \ +- interface=${INTERFACE} socktype=${SOCKTYPE}; } ++ interface=${INTERFACE} socktype=${SOCKTYPE} protocol=${PROTOCOL}; } + if read -u ${MKFDS[0]} PID; then + EXPR='(ASSOC == "shm") and (STTYPE == "SOCK") and (MODE == "-w-")' + ${TS_CMD_LSFD} -p "$PID" -n -o SOCK.PROTONAME -Q "${EXPR}" +-- +2.49.0 + diff --git a/0005-include-cctype-fix-string-comparison.patch b/0005-include-cctype-fix-string-comparison.patch new file mode 100644 index 0000000..9facf54 --- /dev/null +++ b/0005-include-cctype-fix-string-comparison.patch @@ -0,0 +1,106 @@ +From 63317155429b35347f869f5996e5c354a398c6d3 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 2 Apr 2025 11:00:47 +0200 +Subject: include/cctype: fix string comparison + +Reimplement c_strcasecmp() and c_strncasecmp() to be libc compatible +and fix c_strncasecmp() to avoid \0 misinterpretation. The original +implementation was pretty stupid (sorry). + +Signed-off-by: Karel Zak +(cherry picked from commit 259157b0c1a00806ff75188325e40ba10adf12ce) +(cherry picked from commit e6a7001bb539256cdd71e4f032c2842151814556) +--- + include/cctype.h | 55 ++++++++++++++++++++++++++++++++---------------- + 1 file changed, 37 insertions(+), 18 deletions(-) + +diff --git a/include/cctype.h b/include/cctype.h +index b673b6cff..e55c008b8 100644 +--- a/include/cctype.h ++++ b/include/cctype.h +@@ -23,6 +23,9 @@ + #ifndef UTIL_LINUX_CCTYPE_H + #define UTIL_LINUX_CCTYPE_H + ++#include ++#include ++ + /** + * The functions defined in this file assume the "C" locale and a character + * set without diacritics (ASCII-US or EBCDIC-US or something like that). +@@ -317,38 +320,54 @@ static inline int c_toupper (int c) + } + } + ++#define C_CTYPE_CMP(c1, c2) (((c1) > (c2)) - ((c1) < (c2))) ++ + static inline int c_strncasecmp(const char *a, const char *b, size_t n) + { +- int res = 0; ++ const unsigned char *p1 = (const unsigned char *) a; ++ const unsigned char *p2 = (const unsigned char *) b; ++ unsigned char x, y; + +- for (; n > 0; a++, b++, n--) { +- unsigned int x = (unsigned int) *a; +- unsigned int y = (unsigned int) *b; ++ if (n == 0 || p1 == p2) ++ return 0; + +- res = c_tolower(x) - c_tolower(y); +- if (res) +- break; +- } +- return res; ++ do { ++ x = c_tolower(*p1); ++ y = c_tolower(*p2); ++ ++ if (--n == 0 || x == '\0') ++ break; ++ ++p1, ++p2; ++ } while (x == y); ++ ++ if (UCHAR_MAX <= INT_MAX) ++ return x - y; ++ ++ return C_CTYPE_CMP(x, y); + } + + static inline int c_strcasecmp(const char *a, const char *b) + { +- int res = 0; ++ const unsigned char *p1 = (const unsigned char *) a; ++ const unsigned char *p2 = (const unsigned char *) b; ++ unsigned char x, y; + +- if (a == b) ++ if (p1 == p2) + return 0; + +- for (; *a != '\0'; a++, b++) { +- unsigned int x = (unsigned int) *a; +- unsigned int y = (unsigned int) *b; ++ do { ++ x = c_tolower(*p1); ++ y = c_tolower(*p2); + +- res = c_tolower(x) - c_tolower(y); +- if (res) ++ if (x == '\0') + break; +- } ++ ++p1, ++p2; ++ } while (x == y); + +- return res; ++ if (UCHAR_MAX <= INT_MAX) ++ return x - y; ++ ++ return C_CTYPE_CMP(x, y); + } + + #endif /* UTIL_LINUX_CCTYPE_H */ +-- +2.49.0 + diff --git a/0006-findmnt-fix-k-option-parsing-regression.patch b/0006-findmnt-fix-k-option-parsing-regression.patch new file mode 100644 index 0000000..111846d --- /dev/null +++ b/0006-findmnt-fix-k-option-parsing-regression.patch @@ -0,0 +1,86 @@ +From 450ec45368df36601f44ff4b385e04a5ca2f1134 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 7 Apr 2025 12:35:02 +0200 +Subject: findmnt: fix -k option parsing regression + +It's a really bad idea to change any existing short option to support +optional arguments. + +Fixes: https://github.com/util-linux/util-linux/issues/3512 +References: 841d15e5d13dd0cc56e450c8dcc592211d66be27 +Signed-off-by: Karel Zak +(cherry picked from commit 0ecaef693ea60aab709e79dd4a8eb2865ec08967) +(cherry picked from commit 9d4df7905ec03c3ea6e9bdf0aaa91e862168d29a) +--- + misc-utils/findmnt.8.adoc | 2 +- + misc-utils/findmnt.c | 13 +++++++++---- + 2 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc +index fe29afe77..bea0496ff 100644 +--- a/misc-utils/findmnt.8.adoc ++++ b/misc-utils/findmnt.8.adoc +@@ -87,7 +87,7 @@ Use JSON output format. + *-k*, *--kernel*[_=method_]:: + Reads information about filesystems from the kernel. This is the default output. The format is tree-like and only includes mount options managed by the kernel (see also *--mtab*). + + +-The optional argument _method_ can be either: ++The optional argument _method_ is supported only for the long variant (--kernel). The short variant (-k) defaults to the mountinfo method for backward compatibility. The supported methods can be either: + + + * *mountinfo* - this is the default method and it reads data from the _/proc/self/mountinfo_ file. + + +diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c +index fbfb84c94..b183a9c05 100644 +--- a/misc-utils/findmnt.c ++++ b/misc-utils/findmnt.c +@@ -1530,7 +1530,8 @@ static void __attribute__((__noreturn__)) usage(void) + fputs(_(" -F, --tab-file alternative file for -s, -m or -k options\n"), out); + fputs(_(" -m, --mtab search in table of mounted filesystems\n" + " (includes user space mount options)\n"), out); +- fputs(_(" -k, --kernel[=] search in kernel mount table (default)\n" ++ fputs(_(" -k alias to '--kernel mountinfo'\n"), out); ++ fputs(_(" --kernel[=] search in kernel mount table (default)\n" + " is mountinfo or listmount\n"), out); + fputs(_(" -N, --task use alternative namespace (/proc//mountinfo file)\n"), out); + fputs(_(" -p, --poll[=] monitor changes in table of mounted filesystems\n"), out); +@@ -1763,7 +1764,8 @@ int main(int argc, char *argv[]) + FINDMNT_OPT_SHADOWED, + FINDMNT_OPT_HYPERLINK, + FINDMNT_OPT_ID, +- FINDMNT_OPT_UNIQ_ID ++ FINDMNT_OPT_UNIQ_ID, ++ FINDMNT_OPT_KERNEL + }; + + static const struct option longopts[] = { +@@ -1780,7 +1782,7 @@ int main(int argc, char *argv[]) + { "help", no_argument, NULL, 'h' }, + { "invert", no_argument, NULL, 'i' }, + { "json", no_argument, NULL, 'J' }, +- { "kernel", optional_argument, NULL, 'k' }, ++ { "kernel", optional_argument, NULL, FINDMNT_OPT_KERNEL }, + { "list", no_argument, NULL, 'l' }, + { "mountpoint", required_argument, NULL, 'M' }, + { "mtab", no_argument, NULL, 'm' }, +@@ -1843,7 +1845,7 @@ int main(int argc, char *argv[]) + findmnt.flags |= FL_TREE; + + while ((c = getopt_long(argc, argv, +- "AabCcDd:ehIiJfF:o:O:p::PQ:k::lmM:nN:rst:uvRS:T:Uw:VxyH", ++ "AabCcDd:ehIiJfF:o:O:p::PQ:klmM:nN:rst:uvRS:T:Uw:VxyH", + longopts, NULL)) != -1) { + + err_exclusive_options(c, longopts, excl, excl_st); +@@ -1940,6 +1942,9 @@ int main(int argc, char *argv[]) + findmnt.flags &= ~FL_TREE; + break; + case 'k': ++ tabtype = TABTYPE_KERNEL_MOUNTINFO; ++ break; ++ case FINDMNT_OPT_KERNEL: + if (optarg) { + if (strcmp(optarg, "mountinfo") == 0) + tabtype = TABTYPE_KERNEL_MOUNTINFO; +-- +2.49.0 + diff --git a/0007-include-mount-api-utils-include-linux-unistd.h.patch b/0007-include-mount-api-utils-include-linux-unistd.h.patch new file mode 100644 index 0000000..01d3375 --- /dev/null +++ b/0007-include-mount-api-utils-include-linux-unistd.h.patch @@ -0,0 +1,40 @@ +From 598b6e97f6eb90771d3e7d57135405b2f2d20843 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sat, 19 Apr 2025 22:02:11 +0200 +Subject: include/mount-api-utils: include linux/unistd.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If SYS_statmount/SYS_listmount is not provided by the libc, +util-linux will fall back to __NR_statmount/__NR_listmount from the +kernel UAPI headers. +However it is not guaranteed that these symbols are actually visible in +mount-api-utils. + +Include linux/unistd.h which provides syscall numbers. +While this header is specific to Linux, the code is already using +linux/mount.h. + +Signed-off-by: Thomas Weißschuh +(cherry picked from commit 0033f97482a7979e0de71de0a16b583e8d74dbdc) +(cherry picked from commit 7e9665e31d57d16efa304d4421eb8c9d98d8eaf1) +--- + include/mount-api-utils.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h +index 5e1905c45..02bb326c6 100644 +--- a/include/mount-api-utils.h ++++ b/include/mount-api-utils.h +@@ -8,6 +8,7 @@ + #ifdef HAVE_LINUX_MOUNT_H + #include + #include ++#include + #include + #include + +-- +2.49.0 + diff --git a/0008-Do-not-use-strerror-on-shared-libraries.patch b/0008-Do-not-use-strerror-on-shared-libraries.patch new file mode 100644 index 0000000..d8b071a --- /dev/null +++ b/0008-Do-not-use-strerror-on-shared-libraries.patch @@ -0,0 +1,71 @@ +From f83c532a797b98f5e4d3f894744f3f2065c414ea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Sun, 13 Apr 2025 09:22:47 -0400 +Subject: Do not use strerror on shared libraries + +Using strerror is not safe in shared libraries as it is unknown +what the calling apps may do with the storage behind the scenes. +Using %m is ok, except in contexts that need to be as-safe. + +(cherry picked from commit c5850c36e14085cddf8db9e19d447d928fa153d0) +(cherry picked from commit 1f7a5b3c3cc1ad1ab1b72e68d0ae49cb171c5c45) +--- + libblkid/src/verify.c | 8 ++++---- + liblastlog2/src/lastlog2.c | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c +index 3b9754f57..abd3d1246 100644 +--- a/libblkid/src/verify.c ++++ b/libblkid/src/verify.c +@@ -73,8 +73,8 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) + diff = (uintmax_t)now - dev->bid_time; + + if (stat(dev->bid_name, &st) < 0) { +- DBG(PROBE, ul_debug("blkid_verify: error %s (%d) while " +- "trying to stat %s", strerror(errno), errno, ++ DBG(PROBE, ul_debug("blkid_verify: error %m (%d) while " ++ "trying to stat %s", errno, + dev->bid_name)); + open_err: + if ((errno == EPERM) || (errno == EACCES) || (errno == ENOENT)) { +@@ -128,8 +128,8 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) + + fd = open(dev->bid_name, O_RDONLY|O_CLOEXEC|O_NONBLOCK); + if (fd < 0) { +- DBG(PROBE, ul_debug("blkid_verify: error %s (%d) while " +- "opening %s", strerror(errno), errno, ++ DBG(PROBE, ul_debug("blkid_verify: error %m (%d) while " ++ "opening %s", errno, + dev->bid_name)); + goto open_err; + } +diff --git a/liblastlog2/src/lastlog2.c b/liblastlog2/src/lastlog2.c +index 2d3ab2050..020c77106 100644 +--- a/liblastlog2/src/lastlog2.c ++++ b/liblastlog2/src/lastlog2.c +@@ -559,8 +559,8 @@ ll2_import_lastlog(struct ll2_context *context, const char *lastlog_file, + + ll_fp = fopen(lastlog_file, "r"); + if (ll_fp == NULL) { +- if (error && asprintf(error, "Failed to open '%s': %s", +- lastlog_file, strerror(errno)) < 0) ++ if (error && asprintf(error, "Failed to open '%s': %m", ++ lastlog_file) < 0) + return -ENOMEM; + + return -1; +@@ -569,8 +569,8 @@ ll2_import_lastlog(struct ll2_context *context, const char *lastlog_file, + + if (fstat(fileno(ll_fp), &statll) != 0) { + retval = -1; +- if (error && asprintf(error, "Cannot get size of '%s': %s", +- lastlog_file, strerror(errno)) < 0) ++ if (error && asprintf(error, "Cannot get size of '%s': %m", ++ lastlog_file) < 0) + retval = -ENOMEM; + + goto done; +-- +2.49.0 + diff --git a/sources b/sources index ed7ccad..1094aa2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.40.4.tar.xz) = 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124 +SHA512 (util-linux-2.41.tar.xz) = 800ff92ee7a047732c0accb9dd759d6ed659947373ca72e0dd3ca601d0a6fed9db92c0838cfaff6bcdb8c08bdc1ffa675721893f42945885c57ccd59ab676318 diff --git a/util-linux-uuidd-sysusers.conf b/util-linux-uuidd-sysusers.conf deleted file mode 100644 index afd02eb..0000000 --- a/util-linux-uuidd-sysusers.conf +++ /dev/null @@ -1 +0,0 @@ -u uuidd - "UUID generator helper daemon" /var/lib/libuuid diff --git a/util-linux.spec b/util-linux.spec index f5198a1..b61f83c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.40.4 +Version: 2.41 # -p -e rc1 Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -56,9 +56,6 @@ Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd -# temporary, will be in upstream >= v2.41 -Source16: util-linux-uuidd-sysusers.conf - ### Obsoletes & Conflicts & Provides Conflicts: initscripts < 9.79-4 Conflicts: bash-completion < 1:2.1-1 @@ -93,6 +90,7 @@ Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: libsmartcols = %{version}-%{release} Requires: libfdisk = %{version}-%{release} +Requires: liblastlog2 = %{version}-%{release} Requires: util-linux-core = %{version}-%{release} %if "%{_sbindir}" == "%{_bindir}" @@ -111,8 +109,17 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -# Backport better support for erofs on ppc64le -Patch2: 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch +# Upstream patches (to be included in v2.41.1) +Patch2: 0000-libmount-fix-no-canonicalize-regression.patch +Patch3: 0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch +Patch4: 0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch +Patch5: 0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch +Patch6: 0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch +Patch7: 0005-include-cctype-fix-string-comparison.patch +Patch8: 0006-findmnt-fix-k-option-parsing-regression.patch +Patch9: 0007-include-mount-api-utils-include-linux-unistd.h.patch +Patch10: 0008-Do-not-use-strerror-on-shared-libraries.patch + %description The util-linux package contains a large variety of low-level system @@ -215,6 +222,25 @@ This is the device mounting development library and headers, part of util-linux. +%package -n liblastlog2 +Summary: lastlog database library and PAM module +License: BSD-2-Clause + +%description -n liblastlog2 +This is the lastlog database library and PAM module, part of util-linux. + + +%package -n liblastlog2-devel +Summary: lastlog database library +License: BSD-2-Clause +Requires: liblastlog2%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n liblastlog2-devel +This is the lastlog database development library and headers, +part of util-linux. + + %package -n libblkid Summary: Block device ID library License: LGPL-2.1-or-later @@ -335,7 +361,6 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --disable-silent-rules \ --disable-bfs \ --disable-pg \ - --disable-liblastlog2 \ --enable-chfn-chsh \ --enable-usrdir-path \ --enable-write \ @@ -378,8 +403,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} install -d %{buildroot}/run/uuidd install -d %{buildroot}/var/lib/libuuid -install -m 644 -D %{SOURCE16} %{buildroot}%{_sysusersdir}/uuidd.conf - # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -440,7 +463,7 @@ rm -f %{buildroot}/sbin/sfdisk \ ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs -rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a +rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk,lastlog2}.a # temporary remove to avoid conflicts with bash-completion pkg rm -f %{buildroot}%{compldir}/{mount,umount} @@ -473,6 +496,14 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/ %post %systemd_post fstrim.{service,timer} +### Enable after completing migration to lastlog2 +# %post -n liblastlog2 +# %systemd_post lastlog2-import.service +# +# %postun -n liblastlog2 +# %systemd_postun lastlog2-import.service +### + %preun %systemd_preun fstrim.{service,timer} @@ -525,6 +556,7 @@ fi %{_unitdir}/fstrim.* +%{_bindir}/bits %{_bindir}/cal %{_bindir}/chmem %{_bindir}/choom @@ -532,6 +564,7 @@ fi %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/coresched %{_bindir}/eject %{_bindir}/enosys %{_bindir}/exch @@ -544,6 +577,7 @@ fi %{_bindir}/isosize %{_bindir}/last %{_bindir}/lastb +%{_bindir}/lastlog2 %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu @@ -576,6 +610,8 @@ fi %{_bindir}/wdctl %{_bindir}/whereis %{_bindir}/write + +%{_mandir}/man1/bits.1* %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/choom.1* @@ -584,6 +620,7 @@ fi %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* +%{_mandir}/man1/coresched.1.* %{_mandir}/man1/eject.1* %{_mandir}/man1/enosys.1* %{_mandir}/man1/exch.1* @@ -643,6 +680,7 @@ fi %{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/fstrim.8* %{_mandir}/man8/isosize.8* +%{_mandir}/man8/lastlog2.8* %{_mandir}/man8/ldattach.8* %{_mandir}/man8/lsblk.8* %{_mandir}/man8/lslocks.8* @@ -721,6 +759,7 @@ fi %{compldir}/isosize %{compldir}/last %{compldir}/lastb +%{compldir}/lastlog2 %{compldir}/ldattach %{compldir}/look %{compldir}/lsblk @@ -894,7 +933,7 @@ fi %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd %{_tmpfilesdir}/uuidd-tmpfiles.conf -%{_sysusersdir}/uuidd.conf +%{_sysusersdir}/uuidd-sysusers.conf %files -n libfdisk @@ -930,6 +969,29 @@ fi %{_libdir}/pkgconfig/mount.pc +%files -n liblastlog2 +%license Documentation/licenses/COPYING.BSD-2-Clause +%{_libdir}/liblastlog2.so.* +%{_pam_moduledir}/pam_lastlog2.so +%{_tmpfilesdir}/lastlog2-tmpfiles.conf +%{_unitdir}/lastlog2* +%{_mandir}/man8/pam_lastlog2.8* + +%files -n liblastlog2-devel +%license Documentation/licenses/COPYING.BSD-2-Clause +%{_libdir}/liblastlog2.so +%{_includedir}/liblastlog2 +%{_libdir}/pkgconfig/lastlog2.pc +%{_mandir}/man3/lastlog2.3.* +%{_mandir}/man3/ll2_import_lastlog.3* +%{_mandir}/man3/ll2_read_all.3* +%{_mandir}/man3/ll2_read_entry.3* +%{_mandir}/man3/ll2_remove_entry.3* +%{_mandir}/man3/ll2_rename_user.3* +%{_mandir}/man3/ll2_update_login_time.3* +%{_mandir}/man3/ll2_write_entry.3* + + %files -n libblkid %license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libblkid.so.* From 67c133a8d4483b6606f954c1a160eff44d065656 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 May 2025 14:33:31 +0200 Subject: [PATCH 393/425] add BuildRequires for lastlog2 --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index b61f83c..82d6963 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -35,6 +35,7 @@ BuildRequires: %{pypkg}-devel BuildRequires: gcc BuildRequires: rubygem-asciidoctor BuildRequires: po4a +BuildRequires: sqlite-devel %ifarch ppc64le BuildRequires: librtas-devel %endif From ca46de6072d6aff16c71749055009504658e10fd Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:26:03 +0200 Subject: [PATCH 394/425] Rebuilt for Python 3.14 From 0e7e2e7599287de6b61a12f8450daa6824c46b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Jun 2025 12:40:32 +0200 Subject: [PATCH 395/425] Revert to util-linux-2.40.4-7 to rebuild it for Python 3.14 The revert is needed because of https://bodhi.fedoraproject.org/updates/FEDORA-2025-dd6b6950ff failures. This reverts commit e873a14a1d864adc9912834adb50e2237ea8c0b0 --- .gitignore | 1 - ...mount-fix-no-canonicalize-regression.patch | 44 -------- ...id-allow-up-to-64k-erofs-block-sizes.patch | 33 ++++++ ...ed-reference-to-add_namespace_for_ns.patch | 58 ---------- ...e-compilation-without-USE_NS_GET_API.patch | 41 ------- ...scription-for-PACKET.PROTOCOL-column.patch | 42 ------- ...n-the-protocol-field-of-proc-net-pac.patch | 64 ----------- ...include-cctype-fix-string-comparison.patch | 106 ------------------ ...dmnt-fix-k-option-parsing-regression.patch | 86 -------------- ...unt-api-utils-include-linux-unistd.h.patch | 40 ------- ...not-use-strerror-on-shared-libraries.patch | 71 ------------ sources | 2 +- util-linux-uuidd-sysusers.conf | 1 + util-linux.spec | 87 ++------------ 14 files changed, 47 insertions(+), 629 deletions(-) delete mode 100644 0000-libmount-fix-no-canonicalize-regression.patch create mode 100644 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch delete mode 100644 0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch delete mode 100644 0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch delete mode 100644 0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch delete mode 100644 0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch delete mode 100644 0005-include-cctype-fix-string-comparison.patch delete mode 100644 0006-findmnt-fix-k-option-parsing-regression.patch delete mode 100644 0007-include-mount-api-utils-include-linux-unistd.h.patch delete mode 100644 0008-Do-not-use-strerror-on-shared-libraries.patch create mode 100644 util-linux-uuidd-sysusers.conf diff --git a/.gitignore b/.gitignore index d5db0c0..9be7f90 100644 --- a/.gitignore +++ b/.gitignore @@ -99,4 +99,3 @@ /util-linux-2.40.1.tar.xz /util-linux-2.40.2.tar.xz /util-linux-2.40.4.tar.xz -/util-linux-2.41.tar.xz diff --git a/0000-libmount-fix-no-canonicalize-regression.patch b/0000-libmount-fix-no-canonicalize-regression.patch deleted file mode 100644 index 7a19896..0000000 --- a/0000-libmount-fix-no-canonicalize-regression.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a131545a35afeaf3b48fa42ddc876dd14f942486 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 24 Mar 2025 14:31:05 +0100 -Subject: libmount: fix --no-canonicalize regression - -Fixes: https://github.com/util-linux/util-linux/issues/3474 -Signed-off-by: Karel Zak -(cherry picked from commit 7dbfe31a83f45d5aef2b508697e9511c569ffbc8) -(cherry picked from commit 77723beaaaca654f72ac9538772e69fbafa8835d) ---- - libmount/src/context.c | 3 --- - sys-utils/mount.8.adoc | 2 +- - 2 files changed, 1 insertion(+), 4 deletions(-) - -diff --git a/libmount/src/context.c b/libmount/src/context.c -index 0323cb23d..15a8ad3bb 100644 ---- a/libmount/src/context.c -+++ b/libmount/src/context.c -@@ -530,9 +530,6 @@ int mnt_context_is_xnocanonicalize( - assert(cxt); - assert(type); - -- if (mnt_context_is_nocanonicalize(cxt)) -- return 1; -- - ol = mnt_context_get_optlist(cxt); - if (!ol) - return 0; -diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc -index 4f23f8d1f..5103b91c5 100644 ---- a/sys-utils/mount.8.adoc -+++ b/sys-utils/mount.8.adoc -@@ -756,7 +756,7 @@ Allow to make a target directory (mountpoint) if it does not exist yet. The opti - *X-mount.nocanonicalize*[**=**_type_]:: - Allows disabling of canonicalization for mount source and target paths. By default, the `mount` command resolves all paths to their absolute paths without symlinks. However, this behavior may not be desired in certain situations, such as when binding a mount over a symlink, or a symlink over a directory or another symlink. The optional argument _type_ can be either "source" or "target" (mountpoint). If no _type_ is specified, then canonicalization is disabled for both types. This mount option does not affect the conversion of source tags (e.g. LABEL= or UUID=) and fstab processing. - + --The command line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but it does not modify flags for open_tree syscalls. -+The command-line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but for backward compatibility, it does not modify open_tree syscall flags and does not allow the bind-mount over a symlink use case. - + - Note that *mount*(8) still sanitizes and canonicalizes the source and target paths specified on the command line by non-root users, regardless of the X-mount.nocanonicalize setting. - --- -2.49.0 - diff --git a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch new file mode 100644 index 0000000..825c7d0 --- /dev/null +++ b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch @@ -0,0 +1,33 @@ +From ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Fri, 24 Jan 2025 08:37:12 -0600 +Subject: [PATCH] blkid: allow up to 64k erofs block sizes + +Today, mkfs.erofs defaults to page size for block size, but blkid +does not recognize this. Increase the limit to 64k. + +Reviewed-by: Gao Xiang +Signed-off-by: Eric Sandeen +Signed-off-by: Karel Zak +--- + libblkid/src/superblocks/erofs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c +index 05822460b..57fd80220 100644 +--- a/libblkid/src/superblocks/erofs.c ++++ b/libblkid/src/superblocks/erofs.c +@@ -73,8 +73,8 @@ static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) + if (!sb) + return errno ? -errno : BLKID_PROBE_NONE; + +- /* EROFS is restricted to 4KiB block size */ +- if (sb->blkszbits > 31 || (1U << sb->blkszbits) > 4096) ++ /* block size must be between 512 and 64k */ ++ if (sb->blkszbits < 9 || sb->blkszbits > 16) + return BLKID_PROBE_NONE; + + if (!erofs_verify_checksum(pr, mag, sb)) +-- +2.48.1 + diff --git a/0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch deleted file mode 100644 index e2ae158..0000000 --- a/0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 5f4a11bf3d99512c369b6ba901046d0943ee6d09 Mon Sep 17 00:00:00 2001 -From: Thomas Devoogdt -Date: Tue, 25 Mar 2025 11:58:18 +0100 -Subject: lsns: fix undefined reference to add_namespace_for_nsfd #3483 - -Fixes: - -sys-utils/lsns-lsns.o: In function `read_process': -lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd' -collect2: error: ld returned 1 exit status - -Signed-off-by: Thomas Devoogdt -(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a) -(cherry picked from commit bd36a077e16eca888d843a0c30e77379aedfe350) ---- - sys-utils/lsns.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c -index 6b2dcba96..d046d69e3 100644 ---- a/sys-utils/lsns.c -+++ b/sys-utils/lsns.c -@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls, pid_t pid, uint64_t fd) - if (get_namespace(ls, sb.st_ino)) - goto out_nsfd; - -+#ifdef USE_NS_GET_API - add_namespace_for_nsfd(ls, nsfd, sb.st_ino); -+#endif -+ - out_nsfd: - close(nsfd); - out_sk: -@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls __attribute__((__unused__)), - { - } - #endif /* HAVE_LINUX_NET_NAMESPACE_H */ -+ - /* Read namespaces open(2)ed explicitly by the process specified by `pc'. */ - static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t pid) - { -@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t p - if (st.st_dev == ls->nsfs_dev) { - if (get_namespace(ls, st.st_ino)) - continue; -+#ifdef USE_NS_GET_API - int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju", (uintmax_t) num); - if (fd >= 0) { - add_namespace_for_nsfd(ls, fd, st.st_ino); - close(fd); - } -+#endif - } else if ((st.st_mode & S_IFMT) == S_IFSOCK) { - add_namespace_from_sock(ls, pid, num); - } --- -2.49.0 - diff --git a/0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch b/0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch deleted file mode 100644 index 07685a2..0000000 --- a/0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 45389b02bdc8adeeb35b81dd7ef1e20f0e84bd69 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 1 Apr 2025 14:36:36 +0200 -Subject: lsns: enhance compilation without USE_NS_GET_API - -- Move add_namespace_for_nsfd() declaration to the #ifdef block -(based on c62ed3d58602fd29fe12085f7caf03761ed91b81) - -References: 2ced43400f35f7bd45b29364e04166a63a06e16a -Signed-off-by: Karel Zak -(cherry picked from commit 05d494d32bd9941ae0edbe591cefc047de3e9052) ---- - sys-utils/lsns.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c -index d046d69e3..ede7a3992 100644 ---- a/sys-utils/lsns.c -+++ b/sys-utils/lsns.c -@@ -304,6 +304,9 @@ static inline const struct colinfo *get_column_info(unsigned num) - } - - #ifdef USE_NS_GET_API -+static struct lsns_namespace *add_namespace_for_nsfd(struct lsns *ls, int fd, ino_t ino); -+ -+ - /* Get the inode number for the parent namespace of the namespace `fd' specifies. - * If `pfd' is non-null, the file descriptor opening the parent namespace.*/ - static int get_parent_ns_ino(int fd, enum lsns_type lsns_type, ino_t *pino, int *pfd) -@@ -422,8 +425,6 @@ error: - return rc; - } - --static struct lsns_namespace *add_namespace_for_nsfd(struct lsns *ls, int fd, ino_t ino); -- - static struct lsns_namespace *get_namespace(struct lsns *ls, ino_t ino) - { - struct list_head *p; --- -2.49.0 - diff --git a/0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch b/0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch deleted file mode 100644 index 7a396cf..0000000 --- a/0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 6b7fa6aa3a0f59c81cba859563548dd5a0e3213c Mon Sep 17 00:00:00 2001 -From: Masatake YAMATO -Date: Mon, 6 Jan 2025 02:55:19 +0900 -Subject: lsfd: fix the description for PACKET.PROTOCOL column - -Signed-off-by: Masatake YAMATO -(cherry picked from commit df3b38fab56001537364302479b33cb104ef7411) -(cherry picked from commit b7b96894c2f27f8a361f5bab2a239c9f64034557) ---- - lsfd-cmd/lsfd.1.adoc | 2 +- - lsfd-cmd/lsfd.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc -index e9a01d26a..bd6885f82 100644 ---- a/lsfd-cmd/lsfd.1.adoc -+++ b/lsfd-cmd/lsfd.1.adoc -@@ -386,7 +386,7 @@ PACKET.IFACE <``string``>:: - Interface name associated with the packet socket. - - PACKET.PROTOCOL <``string``>:: --L3 protocol associated with the packet socket. -+L2 protocol associated with the packet socket. - - PARTITION <``string``>:: - Block device name resolved by `/proc/partition`. -diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c -index 66c60a4e8..714083e70 100644 ---- a/lsfd-cmd/lsfd.c -+++ b/lsfd-cmd/lsfd.c -@@ -311,7 +311,7 @@ static const struct colinfo infos[] = { - N_("net interface associated with the packet socket") }, - [COL_PACKET_PROTOCOL] = { "PACKET.PROTOCOL", - 0, SCOLS_FL_RIGHT,SCOLS_JSON_STRING, -- N_("L3 protocol associated with the packet socket") }, -+ N_("L2 protocol associated with the packet socket") }, - [COL_PARTITION] = { "PARTITION", - 0, SCOLS_FL_RIGHT, SCOLS_JSON_STRING, - N_("block device name resolved by /proc/partition") }, --- -2.49.0 - diff --git a/0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch b/0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch deleted file mode 100644 index 09efd07..0000000 --- a/0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 20066a4dba10ea4893e0c8ec0d939e6a16f949d0 Mon Sep 17 00:00:00 2001 -From: Masatake YAMATO -Date: Mon, 6 Jan 2025 03:30:25 +0900 -Subject: lsfd: (bug fix) scan the protocol field of /proc/net/packet as a hex - number - -Signed-off-by: Masatake YAMATO -(cherry picked from commit 0da7e8201aa7b9b2c5d0e901c0ccfd6f3bdc54d3) -(cherry picked from commit 798e4da071a96b14c7449bced9f16dc351dc5d84) ---- - lsfd-cmd/sock-xinfo.c | 2 +- - tests/expected/lsfd/mkfds-mapped-packet-socket | 4 ++-- - tests/ts/lsfd/mkfds-mapped-packet-socket | 3 ++- - 3 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lsfd-cmd/sock-xinfo.c b/lsfd-cmd/sock-xinfo.c -index f6811213a..42d8e0919 100644 ---- a/lsfd-cmd/sock-xinfo.c -+++ b/lsfd-cmd/sock-xinfo.c -@@ -2373,7 +2373,7 @@ static void load_xinfo_from_proc_packet(ino_t netns_inode) - unsigned long inode; - struct packet_xinfo *pkt; - -- if (sscanf(line, "%*x %*d %" SCNu16 " %" SCNu16 " %u %*d %*d %*d %lu", -+ if (sscanf(line, "%*x %*d %" SCNu16 " %" SCNx16 " %u %*d %*d %*d %lu", - &type, &protocol, &iface, &inode) < 4) - continue; - -diff --git a/tests/expected/lsfd/mkfds-mapped-packet-socket b/tests/expected/lsfd/mkfds-mapped-packet-socket -index ec8795b70..2e9db5eb5 100644 ---- a/tests/expected/lsfd/mkfds-mapped-packet-socket -+++ b/tests/expected/lsfd/mkfds-mapped-packet-socket -@@ -1,8 +1,8 @@ - PACKET - SOCK.PROTONAME: 0 --type=raw protocol=all iface=lo raw PACKET lo all -+type=raw protocol=ppptalk iface=lo raw PACKET lo ppptalk - NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0 - PACKET - SOCK.PROTONAME: 0 --type=dgram protocol=all iface=lo dgram PACKET lo all -+type=dgram protocol=ppptalk iface=lo dgram PACKET lo ppptalk - NAME,SOCK.TYPE,SOCK.PROTONAME,PACKET.IFACE,PACKET.PROTOCOL: 0 -diff --git a/tests/ts/lsfd/mkfds-mapped-packet-socket b/tests/ts/lsfd/mkfds-mapped-packet-socket -index 12c5ef6bc..c3a73c54e 100755 ---- a/tests/ts/lsfd/mkfds-mapped-packet-socket -+++ b/tests/ts/lsfd/mkfds-mapped-packet-socket -@@ -35,11 +35,12 @@ FD=3 - EXPR= - INTERFACE=lo - SOCKTYPE= -+PROTOCOL=$(printf "%d" 0x10) - ERR= - - for SOCKTYPE in RAW DGRAM; do - coproc MKFDS { "$TS_HELPER_MKFDS" mapped-packet-socket $FD \ -- interface=${INTERFACE} socktype=${SOCKTYPE}; } -+ interface=${INTERFACE} socktype=${SOCKTYPE} protocol=${PROTOCOL}; } - if read -u ${MKFDS[0]} PID; then - EXPR='(ASSOC == "shm") and (STTYPE == "SOCK") and (MODE == "-w-")' - ${TS_CMD_LSFD} -p "$PID" -n -o SOCK.PROTONAME -Q "${EXPR}" --- -2.49.0 - diff --git a/0005-include-cctype-fix-string-comparison.patch b/0005-include-cctype-fix-string-comparison.patch deleted file mode 100644 index 9facf54..0000000 --- a/0005-include-cctype-fix-string-comparison.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 63317155429b35347f869f5996e5c354a398c6d3 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 2 Apr 2025 11:00:47 +0200 -Subject: include/cctype: fix string comparison - -Reimplement c_strcasecmp() and c_strncasecmp() to be libc compatible -and fix c_strncasecmp() to avoid \0 misinterpretation. The original -implementation was pretty stupid (sorry). - -Signed-off-by: Karel Zak -(cherry picked from commit 259157b0c1a00806ff75188325e40ba10adf12ce) -(cherry picked from commit e6a7001bb539256cdd71e4f032c2842151814556) ---- - include/cctype.h | 55 ++++++++++++++++++++++++++++++++---------------- - 1 file changed, 37 insertions(+), 18 deletions(-) - -diff --git a/include/cctype.h b/include/cctype.h -index b673b6cff..e55c008b8 100644 ---- a/include/cctype.h -+++ b/include/cctype.h -@@ -23,6 +23,9 @@ - #ifndef UTIL_LINUX_CCTYPE_H - #define UTIL_LINUX_CCTYPE_H - -+#include -+#include -+ - /** - * The functions defined in this file assume the "C" locale and a character - * set without diacritics (ASCII-US or EBCDIC-US or something like that). -@@ -317,38 +320,54 @@ static inline int c_toupper (int c) - } - } - -+#define C_CTYPE_CMP(c1, c2) (((c1) > (c2)) - ((c1) < (c2))) -+ - static inline int c_strncasecmp(const char *a, const char *b, size_t n) - { -- int res = 0; -+ const unsigned char *p1 = (const unsigned char *) a; -+ const unsigned char *p2 = (const unsigned char *) b; -+ unsigned char x, y; - -- for (; n > 0; a++, b++, n--) { -- unsigned int x = (unsigned int) *a; -- unsigned int y = (unsigned int) *b; -+ if (n == 0 || p1 == p2) -+ return 0; - -- res = c_tolower(x) - c_tolower(y); -- if (res) -- break; -- } -- return res; -+ do { -+ x = c_tolower(*p1); -+ y = c_tolower(*p2); -+ -+ if (--n == 0 || x == '\0') -+ break; -+ ++p1, ++p2; -+ } while (x == y); -+ -+ if (UCHAR_MAX <= INT_MAX) -+ return x - y; -+ -+ return C_CTYPE_CMP(x, y); - } - - static inline int c_strcasecmp(const char *a, const char *b) - { -- int res = 0; -+ const unsigned char *p1 = (const unsigned char *) a; -+ const unsigned char *p2 = (const unsigned char *) b; -+ unsigned char x, y; - -- if (a == b) -+ if (p1 == p2) - return 0; - -- for (; *a != '\0'; a++, b++) { -- unsigned int x = (unsigned int) *a; -- unsigned int y = (unsigned int) *b; -+ do { -+ x = c_tolower(*p1); -+ y = c_tolower(*p2); - -- res = c_tolower(x) - c_tolower(y); -- if (res) -+ if (x == '\0') - break; -- } -+ ++p1, ++p2; -+ } while (x == y); - -- return res; -+ if (UCHAR_MAX <= INT_MAX) -+ return x - y; -+ -+ return C_CTYPE_CMP(x, y); - } - - #endif /* UTIL_LINUX_CCTYPE_H */ --- -2.49.0 - diff --git a/0006-findmnt-fix-k-option-parsing-regression.patch b/0006-findmnt-fix-k-option-parsing-regression.patch deleted file mode 100644 index 111846d..0000000 --- a/0006-findmnt-fix-k-option-parsing-regression.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 450ec45368df36601f44ff4b385e04a5ca2f1134 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 7 Apr 2025 12:35:02 +0200 -Subject: findmnt: fix -k option parsing regression - -It's a really bad idea to change any existing short option to support -optional arguments. - -Fixes: https://github.com/util-linux/util-linux/issues/3512 -References: 841d15e5d13dd0cc56e450c8dcc592211d66be27 -Signed-off-by: Karel Zak -(cherry picked from commit 0ecaef693ea60aab709e79dd4a8eb2865ec08967) -(cherry picked from commit 9d4df7905ec03c3ea6e9bdf0aaa91e862168d29a) ---- - misc-utils/findmnt.8.adoc | 2 +- - misc-utils/findmnt.c | 13 +++++++++---- - 2 files changed, 10 insertions(+), 5 deletions(-) - -diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc -index fe29afe77..bea0496ff 100644 ---- a/misc-utils/findmnt.8.adoc -+++ b/misc-utils/findmnt.8.adoc -@@ -87,7 +87,7 @@ Use JSON output format. - *-k*, *--kernel*[_=method_]:: - Reads information about filesystems from the kernel. This is the default output. The format is tree-like and only includes mount options managed by the kernel (see also *--mtab*). - + --The optional argument _method_ can be either: -+The optional argument _method_ is supported only for the long variant (--kernel). The short variant (-k) defaults to the mountinfo method for backward compatibility. The supported methods can be either: - + - * *mountinfo* - this is the default method and it reads data from the _/proc/self/mountinfo_ file. - + -diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c -index fbfb84c94..b183a9c05 100644 ---- a/misc-utils/findmnt.c -+++ b/misc-utils/findmnt.c -@@ -1530,7 +1530,8 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_(" -F, --tab-file alternative file for -s, -m or -k options\n"), out); - fputs(_(" -m, --mtab search in table of mounted filesystems\n" - " (includes user space mount options)\n"), out); -- fputs(_(" -k, --kernel[=] search in kernel mount table (default)\n" -+ fputs(_(" -k alias to '--kernel mountinfo'\n"), out); -+ fputs(_(" --kernel[=] search in kernel mount table (default)\n" - " is mountinfo or listmount\n"), out); - fputs(_(" -N, --task use alternative namespace (/proc//mountinfo file)\n"), out); - fputs(_(" -p, --poll[=] monitor changes in table of mounted filesystems\n"), out); -@@ -1763,7 +1764,8 @@ int main(int argc, char *argv[]) - FINDMNT_OPT_SHADOWED, - FINDMNT_OPT_HYPERLINK, - FINDMNT_OPT_ID, -- FINDMNT_OPT_UNIQ_ID -+ FINDMNT_OPT_UNIQ_ID, -+ FINDMNT_OPT_KERNEL - }; - - static const struct option longopts[] = { -@@ -1780,7 +1782,7 @@ int main(int argc, char *argv[]) - { "help", no_argument, NULL, 'h' }, - { "invert", no_argument, NULL, 'i' }, - { "json", no_argument, NULL, 'J' }, -- { "kernel", optional_argument, NULL, 'k' }, -+ { "kernel", optional_argument, NULL, FINDMNT_OPT_KERNEL }, - { "list", no_argument, NULL, 'l' }, - { "mountpoint", required_argument, NULL, 'M' }, - { "mtab", no_argument, NULL, 'm' }, -@@ -1843,7 +1845,7 @@ int main(int argc, char *argv[]) - findmnt.flags |= FL_TREE; - - while ((c = getopt_long(argc, argv, -- "AabCcDd:ehIiJfF:o:O:p::PQ:k::lmM:nN:rst:uvRS:T:Uw:VxyH", -+ "AabCcDd:ehIiJfF:o:O:p::PQ:klmM:nN:rst:uvRS:T:Uw:VxyH", - longopts, NULL)) != -1) { - - err_exclusive_options(c, longopts, excl, excl_st); -@@ -1940,6 +1942,9 @@ int main(int argc, char *argv[]) - findmnt.flags &= ~FL_TREE; - break; - case 'k': -+ tabtype = TABTYPE_KERNEL_MOUNTINFO; -+ break; -+ case FINDMNT_OPT_KERNEL: - if (optarg) { - if (strcmp(optarg, "mountinfo") == 0) - tabtype = TABTYPE_KERNEL_MOUNTINFO; --- -2.49.0 - diff --git a/0007-include-mount-api-utils-include-linux-unistd.h.patch b/0007-include-mount-api-utils-include-linux-unistd.h.patch deleted file mode 100644 index 01d3375..0000000 --- a/0007-include-mount-api-utils-include-linux-unistd.h.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 598b6e97f6eb90771d3e7d57135405b2f2d20843 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sat, 19 Apr 2025 22:02:11 +0200 -Subject: include/mount-api-utils: include linux/unistd.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If SYS_statmount/SYS_listmount is not provided by the libc, -util-linux will fall back to __NR_statmount/__NR_listmount from the -kernel UAPI headers. -However it is not guaranteed that these symbols are actually visible in -mount-api-utils. - -Include linux/unistd.h which provides syscall numbers. -While this header is specific to Linux, the code is already using -linux/mount.h. - -Signed-off-by: Thomas Weißschuh -(cherry picked from commit 0033f97482a7979e0de71de0a16b583e8d74dbdc) -(cherry picked from commit 7e9665e31d57d16efa304d4421eb8c9d98d8eaf1) ---- - include/mount-api-utils.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h -index 5e1905c45..02bb326c6 100644 ---- a/include/mount-api-utils.h -+++ b/include/mount-api-utils.h -@@ -8,6 +8,7 @@ - #ifdef HAVE_LINUX_MOUNT_H - #include - #include -+#include - #include - #include - --- -2.49.0 - diff --git a/0008-Do-not-use-strerror-on-shared-libraries.patch b/0008-Do-not-use-strerror-on-shared-libraries.patch deleted file mode 100644 index d8b071a..0000000 --- a/0008-Do-not-use-strerror-on-shared-libraries.patch +++ /dev/null @@ -1,71 +0,0 @@ -From f83c532a797b98f5e4d3f894744f3f2065c414ea Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= -Date: Sun, 13 Apr 2025 09:22:47 -0400 -Subject: Do not use strerror on shared libraries - -Using strerror is not safe in shared libraries as it is unknown -what the calling apps may do with the storage behind the scenes. -Using %m is ok, except in contexts that need to be as-safe. - -(cherry picked from commit c5850c36e14085cddf8db9e19d447d928fa153d0) -(cherry picked from commit 1f7a5b3c3cc1ad1ab1b72e68d0ae49cb171c5c45) ---- - libblkid/src/verify.c | 8 ++++---- - liblastlog2/src/lastlog2.c | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c -index 3b9754f57..abd3d1246 100644 ---- a/libblkid/src/verify.c -+++ b/libblkid/src/verify.c -@@ -73,8 +73,8 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - diff = (uintmax_t)now - dev->bid_time; - - if (stat(dev->bid_name, &st) < 0) { -- DBG(PROBE, ul_debug("blkid_verify: error %s (%d) while " -- "trying to stat %s", strerror(errno), errno, -+ DBG(PROBE, ul_debug("blkid_verify: error %m (%d) while " -+ "trying to stat %s", errno, - dev->bid_name)); - open_err: - if ((errno == EPERM) || (errno == EACCES) || (errno == ENOENT)) { -@@ -128,8 +128,8 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - - fd = open(dev->bid_name, O_RDONLY|O_CLOEXEC|O_NONBLOCK); - if (fd < 0) { -- DBG(PROBE, ul_debug("blkid_verify: error %s (%d) while " -- "opening %s", strerror(errno), errno, -+ DBG(PROBE, ul_debug("blkid_verify: error %m (%d) while " -+ "opening %s", errno, - dev->bid_name)); - goto open_err; - } -diff --git a/liblastlog2/src/lastlog2.c b/liblastlog2/src/lastlog2.c -index 2d3ab2050..020c77106 100644 ---- a/liblastlog2/src/lastlog2.c -+++ b/liblastlog2/src/lastlog2.c -@@ -559,8 +559,8 @@ ll2_import_lastlog(struct ll2_context *context, const char *lastlog_file, - - ll_fp = fopen(lastlog_file, "r"); - if (ll_fp == NULL) { -- if (error && asprintf(error, "Failed to open '%s': %s", -- lastlog_file, strerror(errno)) < 0) -+ if (error && asprintf(error, "Failed to open '%s': %m", -+ lastlog_file) < 0) - return -ENOMEM; - - return -1; -@@ -569,8 +569,8 @@ ll2_import_lastlog(struct ll2_context *context, const char *lastlog_file, - - if (fstat(fileno(ll_fp), &statll) != 0) { - retval = -1; -- if (error && asprintf(error, "Cannot get size of '%s': %s", -- lastlog_file, strerror(errno)) < 0) -+ if (error && asprintf(error, "Cannot get size of '%s': %m", -+ lastlog_file) < 0) - retval = -ENOMEM; - - goto done; --- -2.49.0 - diff --git a/sources b/sources index 1094aa2..ed7ccad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.41.tar.xz) = 800ff92ee7a047732c0accb9dd759d6ed659947373ca72e0dd3ca601d0a6fed9db92c0838cfaff6bcdb8c08bdc1ffa675721893f42945885c57ccd59ab676318 +SHA512 (util-linux-2.40.4.tar.xz) = 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124 diff --git a/util-linux-uuidd-sysusers.conf b/util-linux-uuidd-sysusers.conf new file mode 100644 index 0000000..afd02eb --- /dev/null +++ b/util-linux-uuidd-sysusers.conf @@ -0,0 +1 @@ +u uuidd - "UUID generator helper daemon" /var/lib/libuuid diff --git a/util-linux.spec b/util-linux.spec index 82d6963..a8e890d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,9 +1,9 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.41 +Version: 2.40.4 # -p -e rc1 -Release: %autorelease +Release: %autorelease -b7 License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -35,7 +35,6 @@ BuildRequires: %{pypkg}-devel BuildRequires: gcc BuildRequires: rubygem-asciidoctor BuildRequires: po4a -BuildRequires: sqlite-devel %ifarch ppc64le BuildRequires: librtas-devel %endif @@ -57,6 +56,9 @@ Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd +# temporary, will be in upstream >= v2.41 +Source16: util-linux-uuidd-sysusers.conf + ### Obsoletes & Conflicts & Provides Conflicts: initscripts < 9.79-4 Conflicts: bash-completion < 1:2.1-1 @@ -91,7 +93,6 @@ Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: libsmartcols = %{version}-%{release} Requires: libfdisk = %{version}-%{release} -Requires: liblastlog2 = %{version}-%{release} Requires: util-linux-core = %{version}-%{release} %if "%{_sbindir}" == "%{_bindir}" @@ -110,17 +111,8 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -# Upstream patches (to be included in v2.41.1) -Patch2: 0000-libmount-fix-no-canonicalize-regression.patch -Patch3: 0001-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch -Patch4: 0002-lsns-enhance-compilation-without-USE_NS_GET_API.patch -Patch5: 0003-lsfd-fix-the-description-for-PACKET.PROTOCOL-column.patch -Patch6: 0004-lsfd-bug-fix-scan-the-protocol-field-of-proc-net-pac.patch -Patch7: 0005-include-cctype-fix-string-comparison.patch -Patch8: 0006-findmnt-fix-k-option-parsing-regression.patch -Patch9: 0007-include-mount-api-utils-include-linux-unistd.h.patch -Patch10: 0008-Do-not-use-strerror-on-shared-libraries.patch - +# Backport better support for erofs on ppc64le +Patch2: 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch %description The util-linux package contains a large variety of low-level system @@ -223,25 +215,6 @@ This is the device mounting development library and headers, part of util-linux. -%package -n liblastlog2 -Summary: lastlog database library and PAM module -License: BSD-2-Clause - -%description -n liblastlog2 -This is the lastlog database library and PAM module, part of util-linux. - - -%package -n liblastlog2-devel -Summary: lastlog database library -License: BSD-2-Clause -Requires: liblastlog2%{?_isa} = %{version}-%{release} -Requires: pkgconfig - -%description -n liblastlog2-devel -This is the lastlog database development library and headers, -part of util-linux. - - %package -n libblkid Summary: Block device ID library License: LGPL-2.1-or-later @@ -362,6 +335,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --disable-silent-rules \ --disable-bfs \ --disable-pg \ + --disable-liblastlog2 \ --enable-chfn-chsh \ --enable-usrdir-path \ --enable-write \ @@ -404,6 +378,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} install -d %{buildroot}/run/uuidd install -d %{buildroot}/var/lib/libuuid +install -m 644 -D %{SOURCE16} %{buildroot}%{_sysusersdir}/uuidd.conf + # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -464,7 +440,7 @@ rm -f %{buildroot}/sbin/sfdisk \ ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs -rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk,lastlog2}.a +rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a # temporary remove to avoid conflicts with bash-completion pkg rm -f %{buildroot}%{compldir}/{mount,umount} @@ -497,14 +473,6 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/ %post %systemd_post fstrim.{service,timer} -### Enable after completing migration to lastlog2 -# %post -n liblastlog2 -# %systemd_post lastlog2-import.service -# -# %postun -n liblastlog2 -# %systemd_postun lastlog2-import.service -### - %preun %systemd_preun fstrim.{service,timer} @@ -557,7 +525,6 @@ fi %{_unitdir}/fstrim.* -%{_bindir}/bits %{_bindir}/cal %{_bindir}/chmem %{_bindir}/choom @@ -565,7 +532,6 @@ fi %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column -%{_bindir}/coresched %{_bindir}/eject %{_bindir}/enosys %{_bindir}/exch @@ -578,7 +544,6 @@ fi %{_bindir}/isosize %{_bindir}/last %{_bindir}/lastb -%{_bindir}/lastlog2 %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu @@ -611,8 +576,6 @@ fi %{_bindir}/wdctl %{_bindir}/whereis %{_bindir}/write - -%{_mandir}/man1/bits.1* %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/choom.1* @@ -621,7 +584,6 @@ fi %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* -%{_mandir}/man1/coresched.1.* %{_mandir}/man1/eject.1* %{_mandir}/man1/enosys.1* %{_mandir}/man1/exch.1* @@ -681,7 +643,6 @@ fi %{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/fstrim.8* %{_mandir}/man8/isosize.8* -%{_mandir}/man8/lastlog2.8* %{_mandir}/man8/ldattach.8* %{_mandir}/man8/lsblk.8* %{_mandir}/man8/lslocks.8* @@ -760,7 +721,6 @@ fi %{compldir}/isosize %{compldir}/last %{compldir}/lastb -%{compldir}/lastlog2 %{compldir}/ldattach %{compldir}/look %{compldir}/lsblk @@ -934,7 +894,7 @@ fi %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd %{_tmpfilesdir}/uuidd-tmpfiles.conf -%{_sysusersdir}/uuidd-sysusers.conf +%{_sysusersdir}/uuidd.conf %files -n libfdisk @@ -970,29 +930,6 @@ fi %{_libdir}/pkgconfig/mount.pc -%files -n liblastlog2 -%license Documentation/licenses/COPYING.BSD-2-Clause -%{_libdir}/liblastlog2.so.* -%{_pam_moduledir}/pam_lastlog2.so -%{_tmpfilesdir}/lastlog2-tmpfiles.conf -%{_unitdir}/lastlog2* -%{_mandir}/man8/pam_lastlog2.8* - -%files -n liblastlog2-devel -%license Documentation/licenses/COPYING.BSD-2-Clause -%{_libdir}/liblastlog2.so -%{_includedir}/liblastlog2 -%{_libdir}/pkgconfig/lastlog2.pc -%{_mandir}/man3/lastlog2.3.* -%{_mandir}/man3/ll2_import_lastlog.3* -%{_mandir}/man3/ll2_read_all.3* -%{_mandir}/man3/ll2_read_entry.3* -%{_mandir}/man3/ll2_remove_entry.3* -%{_mandir}/man3/ll2_rename_user.3* -%{_mandir}/man3/ll2_update_login_time.3* -%{_mandir}/man3/ll2_write_entry.3* - - %files -n libblkid %license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libblkid.so.* From 8e9f6cee443c7d9b32c37baef8a1df3a457aea16 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 9 Jun 2025 12:42:27 +0200 Subject: [PATCH 396/425] Rebuilt for Python 3.14 From bf8d5779df3e8f1996add8b6492db0ed0db39626 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 May 2025 14:16:44 +0200 Subject: [PATCH 397/425] upgrade to upstream release v2.41.1 ... https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes - add lastlog2 library and PAM module - add new utils bits, coresched and lastlog2 --- .gitignore | 2 + ...id-allow-up-to-64k-erofs-block-sizes.patch | 33 -------- sources | 2 +- util-linux-uuidd-sysusers.conf | 1 - util-linux.spec | 75 ++++++++++++++++--- 5 files changed, 66 insertions(+), 47 deletions(-) delete mode 100644 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch delete mode 100644 util-linux-uuidd-sysusers.conf diff --git a/.gitignore b/.gitignore index 9be7f90..1e5ca15 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,5 @@ /util-linux-2.40.1.tar.xz /util-linux-2.40.2.tar.xz /util-linux-2.40.4.tar.xz +/util-linux-2.41.tar.xz +/util-linux-2.41.1.tar.xz diff --git a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch b/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch deleted file mode 100644 index 825c7d0..0000000 --- a/0001-blkid-allow-up-to-64k-erofs-block-sizes.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ff0ac0f27dc3de7d250b2a69f6452bfeec104f8c Mon Sep 17 00:00:00 2001 -From: Eric Sandeen -Date: Fri, 24 Jan 2025 08:37:12 -0600 -Subject: [PATCH] blkid: allow up to 64k erofs block sizes - -Today, mkfs.erofs defaults to page size for block size, but blkid -does not recognize this. Increase the limit to 64k. - -Reviewed-by: Gao Xiang -Signed-off-by: Eric Sandeen -Signed-off-by: Karel Zak ---- - libblkid/src/superblocks/erofs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c -index 05822460b..57fd80220 100644 ---- a/libblkid/src/superblocks/erofs.c -+++ b/libblkid/src/superblocks/erofs.c -@@ -73,8 +73,8 @@ static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) - if (!sb) - return errno ? -errno : BLKID_PROBE_NONE; - -- /* EROFS is restricted to 4KiB block size */ -- if (sb->blkszbits > 31 || (1U << sb->blkszbits) > 4096) -+ /* block size must be between 512 and 64k */ -+ if (sb->blkszbits < 9 || sb->blkszbits > 16) - return BLKID_PROBE_NONE; - - if (!erofs_verify_checksum(pr, mag, sb)) --- -2.48.1 - diff --git a/sources b/sources index ed7ccad..9375746 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.40.4.tar.xz) = 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124 +SHA512 (util-linux-2.41.1.tar.xz) = 12cf37ab2d62d0378b16a40e0194ef7131ef1ad06737cca3f169cfc04b9da08a4233076c819b30705e8fb2c3b8d91a1d83aac4f036ce58b9cf5928f545e511a2 diff --git a/util-linux-uuidd-sysusers.conf b/util-linux-uuidd-sysusers.conf deleted file mode 100644 index afd02eb..0000000 --- a/util-linux-uuidd-sysusers.conf +++ /dev/null @@ -1 +0,0 @@ -u uuidd - "UUID generator helper daemon" /var/lib/libuuid diff --git a/util-linux.spec b/util-linux.spec index a8e890d..b6be115 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.40.4 +Version: 2.41.1 # -p -e rc1 Release: %autorelease -b7 License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -35,6 +35,7 @@ BuildRequires: %{pypkg}-devel BuildRequires: gcc BuildRequires: rubygem-asciidoctor BuildRequires: po4a +BuildRequires: sqlite-devel %ifarch ppc64le BuildRequires: librtas-devel %endif @@ -56,9 +57,6 @@ Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd -# temporary, will be in upstream >= v2.41 -Source16: util-linux-uuidd-sysusers.conf - ### Obsoletes & Conflicts & Provides Conflicts: initscripts < 9.79-4 Conflicts: bash-completion < 1:2.1-1 @@ -93,6 +91,7 @@ Requires: libblkid = %{version}-%{release} Requires: libmount = %{version}-%{release} Requires: libsmartcols = %{version}-%{release} Requires: libfdisk = %{version}-%{release} +Requires: liblastlog2 = %{version}-%{release} Requires: util-linux-core = %{version}-%{release} %if "%{_sbindir}" == "%{_bindir}" @@ -111,9 +110,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -# Backport better support for erofs on ppc64le -Patch2: 0001-blkid-allow-up-to-64k-erofs-block-sizes.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -215,6 +211,25 @@ This is the device mounting development library and headers, part of util-linux. +%package -n liblastlog2 +Summary: lastlog database library and PAM module +License: BSD-2-Clause + +%description -n liblastlog2 +This is the lastlog database library and PAM module, part of util-linux. + + +%package -n liblastlog2-devel +Summary: lastlog database library +License: BSD-2-Clause +Requires: liblastlog2%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n liblastlog2-devel +This is the lastlog database development library and headers, +part of util-linux. + + %package -n libblkid Summary: Block device ID library License: LGPL-2.1-or-later @@ -335,7 +350,6 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" --disable-silent-rules \ --disable-bfs \ --disable-pg \ - --disable-liblastlog2 \ --enable-chfn-chsh \ --enable-usrdir-path \ --enable-write \ @@ -378,8 +392,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} install -d %{buildroot}/run/uuidd install -d %{buildroot}/var/lib/libuuid -install -m 644 -D %{SOURCE16} %{buildroot}%{_sysusersdir}/uuidd.conf - # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -440,7 +452,7 @@ rm -f %{buildroot}/sbin/sfdisk \ ln -sf ../proc/self/mounts %{buildroot}/etc/mtab # remove static libs -rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a +rm -f %{buildroot}%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk,lastlog2}.a # temporary remove to avoid conflicts with bash-completion pkg rm -f %{buildroot}%{compldir}/{mount,umount} @@ -473,6 +485,14 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/ %post %systemd_post fstrim.{service,timer} +### Enable after completing migration to lastlog2 +# %post -n liblastlog2 +# %systemd_post lastlog2-import.service +# +# %postun -n liblastlog2 +# %systemd_postun lastlog2-import.service +### + %preun %systemd_preun fstrim.{service,timer} @@ -525,6 +545,7 @@ fi %{_unitdir}/fstrim.* +%{_bindir}/bits %{_bindir}/cal %{_bindir}/chmem %{_bindir}/choom @@ -532,6 +553,7 @@ fi %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/coresched %{_bindir}/eject %{_bindir}/enosys %{_bindir}/exch @@ -544,6 +566,7 @@ fi %{_bindir}/isosize %{_bindir}/last %{_bindir}/lastb +%{_bindir}/lastlog2 %{_bindir}/look %{_bindir}/lsblk %{_bindir}/lscpu @@ -576,6 +599,8 @@ fi %{_bindir}/wdctl %{_bindir}/whereis %{_bindir}/write + +%{_mandir}/man1/bits.1* %{_mandir}/man1/cal.1* %{_mandir}/man1/chfn.1* %{_mandir}/man1/choom.1* @@ -584,6 +609,7 @@ fi %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* +%{_mandir}/man1/coresched.1.* %{_mandir}/man1/eject.1* %{_mandir}/man1/enosys.1* %{_mandir}/man1/exch.1* @@ -643,6 +669,7 @@ fi %{_mandir}/man8/fsfreeze.8* %{_mandir}/man8/fstrim.8* %{_mandir}/man8/isosize.8* +%{_mandir}/man8/lastlog2.8* %{_mandir}/man8/ldattach.8* %{_mandir}/man8/lsblk.8* %{_mandir}/man8/lslocks.8* @@ -721,6 +748,7 @@ fi %{compldir}/isosize %{compldir}/last %{compldir}/lastb +%{compldir}/lastlog2 %{compldir}/ldattach %{compldir}/look %{compldir}/lsblk @@ -894,7 +922,7 @@ fi %dir %attr(2775, uuidd, uuidd) /run/uuidd %{compldir}/uuidd %{_tmpfilesdir}/uuidd-tmpfiles.conf -%{_sysusersdir}/uuidd.conf +%{_sysusersdir}/uuidd-sysusers.conf %files -n libfdisk @@ -930,6 +958,29 @@ fi %{_libdir}/pkgconfig/mount.pc +%files -n liblastlog2 +%license Documentation/licenses/COPYING.BSD-2-Clause +%{_libdir}/liblastlog2.so.* +%{_pam_moduledir}/pam_lastlog2.so +%{_tmpfilesdir}/lastlog2-tmpfiles.conf +%{_unitdir}/lastlog2* +%{_mandir}/man8/pam_lastlog2.8* + +%files -n liblastlog2-devel +%license Documentation/licenses/COPYING.BSD-2-Clause +%{_libdir}/liblastlog2.so +%{_includedir}/liblastlog2 +%{_libdir}/pkgconfig/lastlog2.pc +%{_mandir}/man3/lastlog2.3.* +%{_mandir}/man3/ll2_import_lastlog.3* +%{_mandir}/man3/ll2_read_all.3* +%{_mandir}/man3/ll2_read_entry.3* +%{_mandir}/man3/ll2_remove_entry.3* +%{_mandir}/man3/ll2_rename_user.3* +%{_mandir}/man3/ll2_update_login_time.3* +%{_mandir}/man3/ll2_write_entry.3* + + %files -n libblkid %license Documentation/licenses/COPYING.LGPL-2.1-or-later %{_libdir}/libblkid.so.* From 404f522557b6fe86fbfddc6a5b1657c055dbc791 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 24 Jun 2025 10:45:43 +0200 Subject: [PATCH 398/425] remove obsolete patch --- ...-regression-when-mounting-with-atime.patch | 133 ------------------ 1 file changed, 133 deletions(-) delete mode 100644 libmount-Fix-regression-when-mounting-with-atime.patch diff --git a/libmount-Fix-regression-when-mounting-with-atime.patch b/libmount-Fix-regression-when-mounting-with-atime.patch deleted file mode 100644 index 1c98653..0000000 --- a/libmount-Fix-regression-when-mounting-with-atime.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 2b99ee2526ae61be761b0e31c50e106dbec5e9e4 Mon Sep 17 00:00:00 2001 -From: Filipe Manana -Date: Thu, 17 Aug 2023 10:20:13 +0100 -Subject: [PATCH] libmount: Fix regression when mounting with atime - -A regression was introduced in v2.39 that causes mounting with the atime -option to fail: - - $ mkfs.ext4 -F /dev/sdi - $ mount -o atime /dev/sdi /mnt/sdi - mount: /mnt/sdi: not mount point or bad option. - dmesg(1) may have more information after failed mount system call. - -The failure comes from the mount_setattr(2) call returning -EINVAL. This -is because we pass an invalid value for the attr_clr argument. From a -strace capture we have: - - mount_setattr(4, "", AT_EMPTY_PATH, {attr_set=0, attr_clr=MOUNT_ATTR_NOATIME, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument) - -We can't pass MOUNT_ATTR_NOATIME to mount_setattr(2) through the attr_clr -argument because all atime options are exclusive, so in order to set atime -one has to pass MOUNT_ATTR__ATIME to attr_clr and leave attr_set as -MOUNT_ATTR_RELATIME (which is defined as a value of 0). - -This can be read from the man page for mount_setattr(2) and also from the -kernel source: - - $ cat fs/namespace.c - static int build_mount_kattr(const struct mount_attr *attr, size_t usize, - struct mount_kattr *kattr, unsigned int flags) - { - (...) - /* - * Since the MOUNT_ATTR_ values are an enum, not a bitmap, - * users wanting to transition to a different atime setting cannot - * simply specify the atime setting in @attr_set, but must also - * specify MOUNT_ATTR__ATIME in the @attr_clr field. - * So ensure that MOUNT_ATTR__ATIME can't be partially set in - * @attr_clr and that @attr_set can't have any atime bits set if - * MOUNT_ATTR__ATIME isn't set in @attr_clr. - */ - if (attr->attr_clr & MOUNT_ATTR__ATIME) { - if ((attr->attr_clr & MOUNT_ATTR__ATIME) != MOUNT_ATTR__ATIME) - return -EINVAL; - - /* - * Clear all previous time settings as they are mutually - * exclusive. - */ - kattr->attr_clr |= MNT_RELATIME | MNT_NOATIME; - switch (attr->attr_set & MOUNT_ATTR__ATIME) { - case MOUNT_ATTR_RELATIME: - kattr->attr_set |= MNT_RELATIME; - break; - case MOUNT_ATTR_NOATIME: - kattr->attr_set |= MNT_NOATIME; - break; - case MOUNT_ATTR_STRICTATIME: - break; - default: - return -EINVAL; - } - (...) - -So fix this by setting attr_clr MOUNT_ATTR__ATIME if we want to clear any -atime related option. - -Signed-off-by: Filipe Manana ---- - libmount/src/optlist.c | 13 ++++++++++++- - tests/expected/libmount/context-mount-flags | 3 +++ - tests/ts/libmount/context | 9 ++++++++- - 3 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c -index e93810b47..d0afc94f7 100644 ---- a/libmount/src/optlist.c -+++ b/libmount/src/optlist.c -@@ -875,7 +875,18 @@ int mnt_optlist_get_attrs(struct libmnt_optlist *ls, uint64_t *set, uint64_t *cl - - if (opt->ent->mask & MNT_INVERT) { - DBG(OPTLIST, ul_debugobj(ls, " clr: %s", opt->ent->name)); -- *clr |= x; -+ /* -+ * All atime settings are mutually exclusive so *clr must -+ * have MOUNT_ATTR__ATIME set. -+ * -+ * See the function fs/namespace.c:build_mount_kattr() -+ * in the linux kernel source. -+ */ -+ if (x == MOUNT_ATTR_RELATIME || x == MOUNT_ATTR_NOATIME || -+ x == MOUNT_ATTR_STRICTATIME) -+ *clr |= MOUNT_ATTR__ATIME; -+ else -+ *clr |= x; - } else { - DBG(OPTLIST, ul_debugobj(ls, " set: %s", opt->ent->name)); - *set |= x; -diff --git a/tests/expected/libmount/context-mount-flags b/tests/expected/libmount/context-mount-flags -index 960641863..eb71323dd 100644 ---- a/tests/expected/libmount/context-mount-flags -+++ b/tests/expected/libmount/context-mount-flags -@@ -3,3 +3,6 @@ ro,nosuid,noexec - successfully mounted - rw,nosuid,noexec - successfully umounted -+successfully mounted -+rw,relatime -+successfully umounted -diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context -index f5b47185e..a5d2e81a3 100755 ---- a/tests/ts/libmount/context -+++ b/tests/ts/libmount/context -@@ -116,8 +116,15 @@ $TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPU - - ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG - is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG --ts_finalize_subtest - -+# Test that the atime option works after the migration to use the new kernel mount APIs. -+ts_run $TESTPROG --mount -o atime $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG -+$TS_CMD_FINDMNT --kernel --mountpoint $MOUNTPOINT -o VFS-OPTIONS -n >> $TS_OUTPUT 2>> $TS_ERRLOG -+is_mounted $DEVICE || echo "$DEVICE not mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG -+ts_run $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG -+is_mounted $DEVICE && echo "$DEVICE still mounted" >> $TS_OUTPUT 2>> $TS_ERRLOG -+ -+ts_finalize_subtest - - ts_init_subtest "mount-loopdev" - mkdir -p $MOUNTPOINT &> /dev/null --- -2.40.1 - From b309d832e231b7d3be1f54d586c6419399812281 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 24 Jun 2025 11:02:22 +0200 Subject: [PATCH 399/425] Temporarily disable support for EROFS backing files. --- ...t-disable-EROFS-backing-file-support.patch | 89 +++++++++++++++++++ util-linux.spec | 4 + 2 files changed, 93 insertions(+) create mode 100644 0001-libmount-disable-EROFS-backing-file-support.patch diff --git a/0001-libmount-disable-EROFS-backing-file-support.patch b/0001-libmount-disable-EROFS-backing-file-support.patch new file mode 100644 index 0000000..0735aa6 --- /dev/null +++ b/0001-libmount-disable-EROFS-backing-file-support.patch @@ -0,0 +1,89 @@ +From 3b1b56c00b34e1d00349349a8a91d0add72ce97b Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 24 Jun 2025 10:56:58 +0200 +Subject: [PATCH] libmount: disable EROFS backing file support + +Let's temporarily use the old reliable loop devices rather than directly +mounting EROFS images. It seems some tools need to adapt to the change. +See https://github.com/dracut-ng/dracut-ng/issues/1384 + +Signed-off-by: Karel Zak +--- + libmount/src/context_mount.c | 35 ----------------------------------- + libmount/src/hook_loopdev.c | 7 ------- + 2 files changed, 42 deletions(-) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index fbb200708..4d6d53194 100644 +--- a/libmount/src/context_mount.c ++++ b/libmount/src/context_mount.c +@@ -961,24 +961,6 @@ int mnt_context_finalize_mount(struct libmnt_context *cxt) + return rc; + } + +-static int is_erofs_regfile(struct libmnt_context *cxt) +-{ +- const char *type = mnt_fs_get_fstype(cxt->fs); +- const char *src = mnt_fs_get_srcpath(cxt->fs); +- unsigned long flags = 0; +- struct stat st; +- +- if (!type || strcmp(type, "erofs") != 0) +- return 0; +- if (mnt_context_get_user_mflags(cxt, &flags)) +- return 0; +- if (flags & (MNT_MS_LOOP | MNT_MS_OFFSET | MNT_MS_SIZELIMIT)) +- return 0; /* it's already loopdev */ +- if (!src || stat(src, &st) != 0 || !S_ISREG(st.st_mode)) +- return 0; +- return 1; +-} +- + /** + * mnt_context_mount: + * @cxt: mount context +@@ -1083,23 +1065,6 @@ again: + } + } + +- /* +- * Try mount EROFS image again with loop device. +- * See hook_loopdev.c:is_loopdev_required() for more details. +- */ +- if (rc && mnt_context_get_syscall_errno(cxt) == ENOTBLK +- && is_erofs_regfile(cxt)) { +- struct libmnt_optlist *ol = mnt_context_get_optlist(cxt); +- +- mnt_context_reset_status(cxt); +- DBG(CXT, ul_debugobj(cxt, "enabling loop= for EROFS")); +- mnt_optlist_append_flags(ol, MNT_MS_LOOP, cxt->map_userspace); +- +- rc = mnt_context_call_hooks(cxt, MNT_STAGE_PREP_SOURCE); +- if (!rc) +- goto again; +- } +- + if (rc == 0) + rc = mnt_context_call_hooks(cxt, MNT_STAGE_POST); + +diff --git a/libmount/src/hook_loopdev.c b/libmount/src/hook_loopdev.c +index 444d69d6f..29e181fe8 100644 +--- a/libmount/src/hook_loopdev.c ++++ b/libmount/src/hook_loopdev.c +@@ -468,13 +468,6 @@ static int is_loopdev_required(struct libmnt_context *cxt, struct libmnt_optlist + } + } + +- /* The EROFS kernel driver can be compiled with EROFS_FS_BACKED_BY_FILE, +- * allowing for the mounting of a regular file as a filesystem without +- * a loop device. +- */ +- if (type && strcmp(type, "erofs") == 0) +- return 0; +- + /* Note that there is no restriction (on kernel side) that would + * prevent a regular file as a mount(2) source argument. A filesystem + * that is able to mount regular files could be implemented. For this +-- +2.49.0 + diff --git a/util-linux.spec b/util-linux.spec index b6be115..59baae4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -110,6 +110,10 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +# https://github.com/dracut-ng/dracut-ng/issues/1384 +# 2367956 - EROFS vs. the latest util-linux and kernel +Patch2: 0001-libmount-disable-EROFS-backing-file-support.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 7d135acec2bbf111f8b9b4920fb9f8f3791e4ef3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 24 Jun 2025 11:17:59 +0200 Subject: [PATCH 400/425] Fix ldattach build on recent glibc headers. --- 0001-ldattach-add-ifndef-BOTHER.patch | 29 +++++++++++++++++++++++++++ util-linux.spec | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 0001-ldattach-add-ifndef-BOTHER.patch diff --git a/0001-ldattach-add-ifndef-BOTHER.patch b/0001-ldattach-add-ifndef-BOTHER.patch new file mode 100644 index 0000000..602a518 --- /dev/null +++ b/0001-ldattach-add-ifndef-BOTHER.patch @@ -0,0 +1,29 @@ +From 4d2fc6b99db2f17a2562548af63454134ee910ec Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 24 Jun 2025 11:14:29 +0200 +Subject: [PATCH] ldattach: add ifndef BOTHER + +Signed-off-by: Karel Zak +(cherry picked from commit 5405c3e09057db82ed397e61443effa9614dbc4a) +--- + sys-utils/ldattach.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c +index e06047c71..25903b4eb 100644 +--- a/sys-utils/ldattach.c ++++ b/sys-utils/ldattach.c +@@ -241,7 +241,9 @@ static int my_cfsetspeed(struct termios *ts, int speed) + * checks for speed and supports Bxxx bit rates only)... + */ + #if _HAVE_STRUCT_TERMIOS_C_ISPEED +-# define BOTHER 0010000 /* non standard rate */ ++# ifndef BOTHER ++# define BOTHER 0010000 /* non standard rate */ ++# endif + dbg("using non-standard speeds"); + ts->c_ospeed = ts->c_ispeed = speed; + ts->c_cflag &= ~CBAUD; +-- +2.49.0 + diff --git a/util-linux.spec b/util-linux.spec index 59baae4..c6ebe25 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -114,6 +114,9 @@ Patch1: login-default-motd-file.patch # 2367956 - EROFS vs. the latest util-linux and kernel Patch2: 0001-libmount-disable-EROFS-backing-file-support.patch +# Upstream +Patch3: 0001-ldattach-add-ifndef-BOTHER.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 0382798ff415262c223a4bccc959fa6c5bb0dd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Tue, 24 Jun 2025 14:19:13 +0200 Subject: [PATCH 401/425] tests: migrate from STI to TMT Related: https://fedoraproject.org/wiki/Changes/DisableSTI --- .fmf/version | 1 + plans/ci.fmf | 5 +++++ tests/tests.yml | 13 ------------- tests/various/main.fmf | 13 +++++++++++++ tests/various/runtest.sh | 1 - 5 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/ci.fmf delete mode 100644 tests/tests.yml create mode 100644 tests/various/main.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 1cd94fc..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Test which run in classic and docker environemnt -- hosts: localhost - tags: - - classic - - container - - atomic - roles: - - role: standard-test-beakerlib - tests: - - various - required_packages: - - util-linux - - util-linux-user diff --git a/tests/various/main.fmf b/tests/various/main.fmf new file mode 100644 index 0000000..c71537e --- /dev/null +++ b/tests/various/main.fmf @@ -0,0 +1,13 @@ +summary: This test groups small sanity and regression tests for util-linux +description: '' +contact: Miroslav Vadkerti +component: + - util-linux +test: ./runtest.sh +framework: beakerlib +recommend: + - util-linux + - util-linux-user +duration: 10m +extra-summary: /CoreOS/util-linux/Sanity/various +extra-task: /CoreOS/util-linux/Sanity/various diff --git a/tests/various/runtest.sh b/tests/various/runtest.sh index 32871f4..4394d41 100755 --- a/tests/various/runtest.sh +++ b/tests/various/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -#. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="util-linux" From 164a6760ec0921afe1f043a6d08505636ca1bded Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 15 Jul 2025 14:24:23 +0200 Subject: [PATCH 402/425] enable lastlog2-import.service --- util-linux.spec | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index c6ebe25..bab8288 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -489,24 +489,26 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/ %endif + %post %systemd_post fstrim.{service,timer} -### Enable after completing migration to lastlog2 -# %post -n liblastlog2 -# %systemd_post lastlog2-import.service -# -# %postun -n liblastlog2 -# %systemd_postun lastlog2-import.service -### +%post -n liblastlog2 +%systemd_post lastlog2-import.service + %preun %systemd_preun fstrim.{service,timer} + %postun %systemd_postun_with_restart fstrim.timer %systemd_postun fstrim.service +%postun -n liblastlog2 +%systemd_postun lastlog2-import.service + + # Please, keep uuidd running after installation! Note that systemd_post is # "systemctl preset" and it enable/disable service only. %post -n uuidd From 04d2b6b0adde9e77f06540a80df3769cc6445ab0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:54:31 +0000 Subject: [PATCH 403/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 39c148ff89d0a3239125c1cd5da72b47dc1e7e4f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 5 Aug 2025 09:49:01 +0200 Subject: [PATCH 404/425] add /var/lib/liblastlog to files list --- util-linux.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index bab8288..8c13e0a 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -395,9 +395,10 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} # install util-linux %make_install -# And a dirs uuidd needs that the makefiles don't create +# And a dirs that the makefiles don't create install -d %{buildroot}/run/uuidd install -d %{buildroot}/var/lib/libuuid +install -d %{buildroot}/var/lib/liblastlog # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -969,6 +970,7 @@ fi %files -n liblastlog2 %license Documentation/licenses/COPYING.BSD-2-Clause +%dir /var/lib/liblastlog %{_libdir}/liblastlog2.so.* %{_pam_moduledir}/pam_lastlog2.so %{_tmpfilesdir}/lastlog2-tmpfiles.conf From b9ed3a9a740e6d0f49f22c9b6c7631ef3a6e6809 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 5 Aug 2025 09:59:26 +0200 Subject: [PATCH 405/425] use RPM macros for /var/lib and /run --- util-linux.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 8c13e0a..1c611f7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -396,9 +396,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} %make_install # And a dirs that the makefiles don't create -install -d %{buildroot}/run/uuidd -install -d %{buildroot}/var/lib/libuuid -install -d %{buildroot}/var/lib/liblastlog +install -d %{buildroot}%{_rundir}/uuidd +install -d %{buildroot}%{_sharedstatedir}/libuuid +install -d %{buildroot}%{_sharedstatedir}/liblastlog # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -928,8 +928,8 @@ fi %{_mandir}/man8/uuidd.8* %{_sbindir}/uuidd %{_unitdir}/uuidd.* -%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid -%dir %attr(2775, uuidd, uuidd) /run/uuidd +%dir %attr(2775, uuidd, uuidd) %{_sharedstatedir}/libuuid +%dir %attr(2775, uuidd, uuidd) %{_rundir}/uuidd %{compldir}/uuidd %{_tmpfilesdir}/uuidd-tmpfiles.conf %{_sysusersdir}/uuidd-sysusers.conf @@ -970,7 +970,7 @@ fi %files -n liblastlog2 %license Documentation/licenses/COPYING.BSD-2-Clause -%dir /var/lib/liblastlog +%dir %{_sharedstatedir}/liblastlog %{_libdir}/liblastlog2.so.* %{_pam_moduledir}/pam_lastlog2.so %{_tmpfilesdir}/lastlog2-tmpfiles.conf From 5679a7db71825414f41f195a67d8273e7f58ccd9 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:21:47 +0200 Subject: [PATCH 406/425] Rebuilt for Python 3.14.0rc2 bytecode From 9e2caeba0d5c3d0e7a09f8cf545645d4b794646a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 15:01:56 +0200 Subject: [PATCH 407/425] Rebuilt for Python 3.14.0rc3 bytecode From ba1905c6c74e0bcf789a2900d2eca23692faa1d6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 23 Oct 2025 12:59:14 +0200 Subject: [PATCH 408/425] upgrade to upstream release v2.41.2 --- .gitignore | 1 + 0001-ldattach-add-ifndef-BOTHER.patch | 29 --------------------------- sources | 2 +- util-linux.spec | 7 +++---- 4 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 0001-ldattach-add-ifndef-BOTHER.patch diff --git a/.gitignore b/.gitignore index 1e5ca15..cdfd72d 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,4 @@ /util-linux-2.40.4.tar.xz /util-linux-2.41.tar.xz /util-linux-2.41.1.tar.xz +/util-linux-2.41.2.tar.xz diff --git a/0001-ldattach-add-ifndef-BOTHER.patch b/0001-ldattach-add-ifndef-BOTHER.patch deleted file mode 100644 index 602a518..0000000 --- a/0001-ldattach-add-ifndef-BOTHER.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4d2fc6b99db2f17a2562548af63454134ee910ec Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 24 Jun 2025 11:14:29 +0200 -Subject: [PATCH] ldattach: add ifndef BOTHER - -Signed-off-by: Karel Zak -(cherry picked from commit 5405c3e09057db82ed397e61443effa9614dbc4a) ---- - sys-utils/ldattach.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c -index e06047c71..25903b4eb 100644 ---- a/sys-utils/ldattach.c -+++ b/sys-utils/ldattach.c -@@ -241,7 +241,9 @@ static int my_cfsetspeed(struct termios *ts, int speed) - * checks for speed and supports Bxxx bit rates only)... - */ - #if _HAVE_STRUCT_TERMIOS_C_ISPEED --# define BOTHER 0010000 /* non standard rate */ -+# ifndef BOTHER -+# define BOTHER 0010000 /* non standard rate */ -+# endif - dbg("using non-standard speeds"); - ts->c_ospeed = ts->c_ispeed = speed; - ts->c_cflag &= ~CBAUD; --- -2.49.0 - diff --git a/sources b/sources index 9375746..ce7b5d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.41.1.tar.xz) = 12cf37ab2d62d0378b16a40e0194ef7131ef1ad06737cca3f169cfc04b9da08a4233076c819b30705e8fb2c3b8d91a1d83aac4f036ce58b9cf5928f545e511a2 +SHA512 (util-linux-2.41.2.tar.xz) = 696c87e7cf185acc9b4b969ddade6155ea2945ae494eaecfd7b1f35d9607166cb09be79878fb793dd31b4d4dcac8c9be4be76af3886185db7ae8b58c303fb0cf diff --git a/util-linux.spec b/util-linux.spec index 1c611f7..ea4f5a9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.41.1 +Version: 2.41.2 # -p -e rc1 Release: %autorelease -b7 License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -114,9 +114,6 @@ Patch1: login-default-motd-file.patch # 2367956 - EROFS vs. the latest util-linux and kernel Patch2: 0001-libmount-disable-EROFS-backing-file-support.patch -# Upstream -Patch3: 0001-ldattach-add-ifndef-BOTHER.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -733,11 +730,13 @@ fi %{compldir}/chcpu %{compldir}/chfn %{compldir}/chmem +%{compldir}/choom %{compldir}/chsh %{compldir}/col %{compldir}/colcrt %{compldir}/colrm %{compldir}/column +%{compldir}/coresched %{compldir}/ctrlaltdel %{compldir}/delpart %{compldir}/eject From 7ef16d92f732410f09ee5fe6a22e033caea7bda5 Mon Sep 17 00:00:00 2001 From: Fxzx micah Date: Tue, 18 Nov 2025 19:22:12 +0000 Subject: [PATCH 409/425] liblastlog2 uses /var/lib/lastlog You can verify it through man pam_lastlog2. --- util-linux.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index ea4f5a9..0bc12e2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -395,7 +395,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps} # And a dirs that the makefiles don't create install -d %{buildroot}%{_rundir}/uuidd install -d %{buildroot}%{_sharedstatedir}/libuuid -install -d %{buildroot}%{_sharedstatedir}/liblastlog +install -d %{buildroot}%{_sharedstatedir}/lastlog # /etc/adjtime install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime @@ -969,7 +969,7 @@ fi %files -n liblastlog2 %license Documentation/licenses/COPYING.BSD-2-Clause -%dir %{_sharedstatedir}/liblastlog +%dir %{_sharedstatedir}/lastlog %{_libdir}/liblastlog2.so.* %{_pam_moduledir}/pam_lastlog2.so %{_tmpfilesdir}/lastlog2-tmpfiles.conf From 9c226720cb200a9bac460b0c6f4038b78e6bfe8d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 2 Dec 2025 16:37:43 +0100 Subject: [PATCH 410/425] backport upstream patches for GCC-15 - regenerate Fedora patches from the Git tree --- 0000-login-use-O_CREAT-on-lastlog.patch | 27 ++++++++ ...un-motd.d-to-the-hardcoded-MOTD_FILE.patch | 27 ++++++++ ...t-disable-EROFS-backing-file-support.patch | 8 +-- ...lkid-use-snprintf-instead-of-sprintf.patch | 58 ++++++++++++++++ ...x-bsearch-macro-usage-with-glibc-C23.patch | 42 ++++++++++++ ...nst-qualifier-discarded-warnings-in-.patch | 57 ++++++++++++++++ ...fix-const-qualifier-warnings-for-C23.patch | 45 +++++++++++++ ...fix-const-qualifier-warnings-for-C23.patch | 67 +++++++++++++++++++ ...st-qualifier-warning-in-mnt_parse_mo.patch | 54 +++++++++++++++ ...st-qualifier-warning-in-blkid_parse_.patch | 54 +++++++++++++++ ...qualifier-warnings-in-parse_callerid.patch | 34 ++++++++++ ...ualifier-warning-in-new_counter_spec.patch | 34 ++++++++++ ...-const-qualifier-warning-in-strnrstr.patch | 34 ++++++++++ ...fix-const-qualifier-warnings-for-C23.patch | 67 +++++++++++++++++++ ...qualifier-warning-in-readlink_to_nam.patch | 33 +++++++++ ...fix-const-qualifier-warnings-for-C23.patch | 49 ++++++++++++++ ...nst-qualifier-warning-in-parse_block.patch | 33 +++++++++ ...-qualifier-warning-in-get_max_partno.patch | 34 ++++++++++ ...onst-qualifier-warning-in-read_speed.patch | 33 +++++++++ login-default-motd-file.patch | 13 ---- login-lastlog-create.patch | 12 ---- util-linux.spec | 33 ++++++--- 22 files changed, 809 insertions(+), 39 deletions(-) create mode 100644 0000-login-use-O_CREAT-on-lastlog.patch create mode 100644 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch rename 0001-libmount-disable-EROFS-backing-file-support.patch => 0002-libmount-disable-EROFS-backing-file-support.patch (94%) create mode 100644 0003-libblkid-use-snprintf-instead-of-sprintf.patch create mode 100644 0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch create mode 100644 0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch create mode 100644 0006-lsns-fix-const-qualifier-warnings-for-C23.patch create mode 100644 0007-libmount-fix-const-qualifier-warnings-for-C23.patch create mode 100644 0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch create mode 100644 0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch create mode 100644 0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch create mode 100644 0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch create mode 100644 0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch create mode 100644 0013-logger-fix-const-qualifier-warnings-for-C23.patch create mode 100644 0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch create mode 100644 0015-whereis-fix-const-qualifier-warnings-for-C23.patch create mode 100644 0016-enosys-fix-const-qualifier-warning-in-parse_block.patch create mode 100644 0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch create mode 100644 0018-eject-fix-const-qualifier-warning-in-read_speed.patch delete mode 100644 login-default-motd-file.patch delete mode 100644 login-lastlog-create.patch diff --git a/0000-login-use-O_CREAT-on-lastlog.patch b/0000-login-use-O_CREAT-on-lastlog.patch new file mode 100644 index 0000000..39751c2 --- /dev/null +++ b/0000-login-use-O_CREAT-on-lastlog.patch @@ -0,0 +1,27 @@ +From a2357184ff3dc3beb001fcb12e1e4c0dcf8d0dbd Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 2 Dec 2025 16:15:44 +0100 +Subject: login: use O_CREAT on lastlog + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=151635 +Signed-off-by: Karel Zak +--- + login-utils/login.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/login-utils/login.c b/login-utils/login.c +index 321f9d6ce..edc69fd9a 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -682,7 +682,7 @@ static void log_lastlog(struct login_context *cxt) + sa.sa_handler = SIG_IGN; + sigaction(SIGXFSZ, &sa, &oldsa_xfsz); + +- fd = open(_PATH_LASTLOG, O_RDWR, 0); ++ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); + if (fd < 0) + goto done; + offset = cxt->pwd->pw_uid * sizeof(ll); +-- +2.51.1 + diff --git a/0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch b/0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch new file mode 100644 index 0000000..91d7f5c --- /dev/null +++ b/0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch @@ -0,0 +1,27 @@ +From 617a887a6ec7e433f6a9f4c60592ed38b12b9f18 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 2 Dec 2025 16:17:55 +0100 +Subject: login: add /run/motd.d` to the hardcoded MOTD_FILE + +Addresses: https://github.com/coreos/console-login-helper-messages/issues/60 +Signed-off-by: Karel Zak +--- + include/pathnames.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/pathnames.h b/include/pathnames.h +index 34ba11ca3..c91a077e1 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -41,7 +41,7 @@ + #ifndef _PATH_MAILDIR + # define _PATH_MAILDIR "/var/spool/mail" + #endif +-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd" ++#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d" + #ifndef _PATH_NOLOGIN + # define _PATH_NOLOGIN "/etc/nologin" + #endif +-- +2.51.1 + diff --git a/0001-libmount-disable-EROFS-backing-file-support.patch b/0002-libmount-disable-EROFS-backing-file-support.patch similarity index 94% rename from 0001-libmount-disable-EROFS-backing-file-support.patch rename to 0002-libmount-disable-EROFS-backing-file-support.patch index 0735aa6..2cb17a1 100644 --- a/0001-libmount-disable-EROFS-backing-file-support.patch +++ b/0002-libmount-disable-EROFS-backing-file-support.patch @@ -1,7 +1,7 @@ -From 3b1b56c00b34e1d00349349a8a91d0add72ce97b Mon Sep 17 00:00:00 2001 +From 93a62761843ff76187bd542fe717fa0c9b8f73a7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 24 Jun 2025 10:56:58 +0200 -Subject: [PATCH] libmount: disable EROFS backing file support +Subject: libmount: disable EROFS backing file support Let's temporarily use the old reliable loop devices rather than directly mounting EROFS images. It seems some tools need to adapt to the change. @@ -14,7 +14,7 @@ Signed-off-by: Karel Zak 2 files changed, 42 deletions(-) diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index fbb200708..4d6d53194 100644 +index ee3eadb05..e1d06a61e 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -961,24 +961,6 @@ int mnt_context_finalize_mount(struct libmnt_context *cxt) @@ -85,5 +85,5 @@ index 444d69d6f..29e181fe8 100644 * prevent a regular file as a mount(2) source argument. A filesystem * that is able to mount regular files could be implemented. For this -- -2.49.0 +2.51.1 diff --git a/0003-libblkid-use-snprintf-instead-of-sprintf.patch b/0003-libblkid-use-snprintf-instead-of-sprintf.patch new file mode 100644 index 0000000..6372a17 --- /dev/null +++ b/0003-libblkid-use-snprintf-instead-of-sprintf.patch @@ -0,0 +1,58 @@ +From 0cd0a9dd42a3249bbbee4855fbc406c4ca5fdd5b Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 6 Oct 2025 15:04:24 +0200 +Subject: libblkid: use snprintf() instead of sprintf() + +Replace sprintf() calls with snprintf() to ensure proper bounds +checking when formatting strings. + +In encode.c, the check now validates snprintf() return value instead +of pre-checking buffer size, providing more robust error handling. + +In probe.c, snprintf() is used with proper size calculation based on +remaining buffer space. + +Signed-off-by: Karel Zak +(cherry picked from commit 041380f4ca7244df624bf7efdb5e27fdd3144175) +(cherry picked from commit 917917253e60b0ba485cf6a27a2f993aa43e1eea) +--- + libblkid/src/encode.c | 6 ++++-- + libblkid/src/probe.c | 4 ++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/libblkid/src/encode.c b/libblkid/src/encode.c +index 8213873ee..4b83f6690 100644 +--- a/libblkid/src/encode.c ++++ b/libblkid/src/encode.c +@@ -191,9 +191,11 @@ int blkid_encode_string(const char *str, char *str_enc, size_t len) + j += seqlen; + i += (seqlen-1); + } else if (str[i] == '\\' || !is_whitelisted(str[i], NULL)) { +- if (len-j < 4) ++ int rc; ++ ++ rc = snprintf(&str_enc[j], len-j, "\\x%02x", (unsigned char) str[i]); ++ if (rc != 4) + goto err; +- sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); + j += 4; + } else { + if (len-j < 1) +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 61b93021c..a38f5990e 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -2012,8 +2012,8 @@ static void blkid_probe_log_csum_mismatch(blkid_probe pr, size_t n, const void * + int hex_size = min(sizeof(csum_hex), n * 2); + + for (int i = 0; i < hex_size; i+=2) { +- sprintf(&csum_hex[i], "%02X", ((const unsigned char *) csum)[i / 2]); +- sprintf(&expected_hex[i], "%02X", ((const unsigned char *) expected)[i / 2]); ++ snprintf(&csum_hex[i], sizeof(csum_hex) - i, "%02X", ((const unsigned char *) csum)[i / 2]); ++ snprintf(&expected_hex[i], sizeof(expected_hex) - i, "%02X", ((const unsigned char *) expected)[i / 2]); + } + + DBG(LOWPROBE, ul_debug( +-- +2.51.1 + diff --git a/0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch b/0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch new file mode 100644 index 0000000..c8fb5ea --- /dev/null +++ b/0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch @@ -0,0 +1,42 @@ +From 189960ccca3866461d4ee91c3b7ffb9dac6d0078 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Sat, 22 Nov 2025 10:41:08 -0300 +Subject: lsfd: fix bsearch macro usage with glibc C23 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +C23 requires bsearch to be a const preserving macro, build now fails +with + +../lsfd-cmd/lsfd.c:1879:75: error: macro ‘bsearch’ passed 6 arguments, but takes just 5 + 1879 | nfds, sizeof(struct pollfd), pollfdcmp)) + | ^ +In file included from ../include/c.h:17, + from ../lsfd-cmd/lsfd.c:48: +/usr/include/stdlib.h:987:10: note: macro ‘bsearch’ defined here + 987 | # define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \ + + add parenthesis around expression to fix it. + +(cherry picked from commit 711bda1441561bfd2eb6d45fe0bc789535c1f1a8) +--- + lsfd-cmd/lsfd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c +index 75cd1de58..9aae240fc 100644 +--- a/lsfd-cmd/lsfd.c ++++ b/lsfd-cmd/lsfd.c +@@ -1836,7 +1836,7 @@ static void mark_poll_fds_as_multiplexed(char *buf, + struct file *file = list_entry(f, struct file, files); + if (is_opened_file(file) && !file->multiplexed) { + int fd = file->association; +- if (bsearch(&(struct pollfd){.fd = fd,}, local.iov_base, ++ if (bsearch((&(struct pollfd){.fd = fd,}), local.iov_base, + nfds, sizeof(struct pollfd), pollfdcmp)) + file->multiplexed = 1; + } +-- +2.51.1 + diff --git a/0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch b/0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch new file mode 100644 index 0000000..a5064b0 --- /dev/null +++ b/0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch @@ -0,0 +1,57 @@ +From 638055dbe76ca0b3f87bcc0879e5810fadece18c Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 10:27:07 +0100 +Subject: lib, lscpu: fix const qualifier discarded warnings in bsearch + +Fix compilation warnings from newer compilers with stricter +const-correctness checks. When bsearch() searches in const arrays, +the result pointer must also be const to avoid discarding the +const qualifier. + +Fixed in: +- lib/color-names.c: searching in static const basic_schemes[] +- sys-utils/lscpu-cputype.c: searching in const pattern arrays + +The warnings were: + lib/color-names.c:62:13: error: assignment discards 'const' + qualifier from pointer target type + [-Werror=discarded-qualifiers] + +Signed-off-by: Karel Zak +(cherry picked from commit 0cef3e4f5aac19bc3623883ca64c66538aa9b442) +--- + lib/color-names.c | 3 ++- + sys-utils/lscpu-cputype.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/color-names.c b/lib/color-names.c +index 88c4ef957..daebcedae 100644 +--- a/lib/color-names.c ++++ b/lib/color-names.c +@@ -54,7 +54,8 @@ const char *color_sequence_from_colorname(const char *str) + { "white", UL_COLOR_WHITE }, + { "yellow", UL_COLOR_BOLD_YELLOW } + }; +- struct ul_color_name key = { .name = str }, *res; ++ struct ul_color_name key = { .name = str }; ++ const struct ul_color_name *res; + + if (!str) + return NULL; +diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c +index 3937a00a8..99b112bf9 100644 +--- a/sys-utils/lscpu-cputype.c ++++ b/sys-utils/lscpu-cputype.c +@@ -444,7 +444,8 @@ static char *key_cleanup(char *str, int *keynum) + + static const struct cpuinfo_pattern *cpuinfo_parse_line(char *str, char **value, int *keynum) + { +- struct cpuinfo_pattern key = { .id = 0 }, *pat; ++ struct cpuinfo_pattern key = { .id = 0 }; ++ const struct cpuinfo_pattern *pat; + char *p, *v; + char buf[CPUTYPE_PATTERN_BUFSZ] = { 0 }; + +-- +2.51.1 + diff --git a/0006-lsns-fix-const-qualifier-warnings-for-C23.patch b/0006-lsns-fix-const-qualifier-warnings-for-C23.patch new file mode 100644 index 0000000..8478b21 --- /dev/null +++ b/0006-lsns-fix-const-qualifier-warnings-for-C23.patch @@ -0,0 +1,45 @@ +From 986936d454b1f9165f5b35196a732db71a8d3b46 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 15:41:21 +0100 +Subject: lsns: fix const qualifier warnings for C23 + +Fix const qualifier discarded warnings in read_persistent_namespaces() +and is_path_included() functions. These warnings are reported by gcc 15 +which defaults to the C23 standard. + +The strchr() and strstr() functions return pointers into const strings, +so the receiving variables must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit dbe4c16973d5d0f69ba3bf1bd8942a51de9a0933) +--- + sys-utils/lsns.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c +index 812afe710..2ee078ac6 100644 +--- a/sys-utils/lsns.c ++++ b/sys-utils/lsns.c +@@ -1003,8 +1003,8 @@ static int read_persistent_namespaces(struct lsns *ls) + struct libmnt_fs *fs = NULL; + + while (mnt_table_next_fs(ls->tab, itr, &fs) == 0) { +- const char *root; +- char *p, *end = NULL; ++ const char *root, *p; ++ char *end = NULL; + ino_t ino; + int fd; + +@@ -1095,7 +1095,7 @@ static int is_path_included(const char *path_set, const char *elt, + { + size_t elt_len; + size_t path_set_len; +- char *tmp; ++ const char *tmp; + + + tmp = strstr(path_set, elt); +-- +2.51.1 + diff --git a/0007-libmount-fix-const-qualifier-warnings-for-C23.patch b/0007-libmount-fix-const-qualifier-warnings-for-C23.patch new file mode 100644 index 0000000..5f67a10 --- /dev/null +++ b/0007-libmount-fix-const-qualifier-warnings-for-C23.patch @@ -0,0 +1,67 @@ +From 04f796acef76bb18445f516f44838b95dba49883 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 15:45:55 +0100 +Subject: libmount: fix const qualifier warnings for C23 + +Fix const qualifier discarded warnings in optlist_add_flags(), +mnt_opt_value_with(), and mnt_optstr_apply_flags() functions. +These warnings are reported by gcc 15 which defaults to the C23 standard. + +The strchr() and strstr() functions return pointers into const strings, +so the receiving variables must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit c0c79c41527365ca7de30c75daaa018ea01fff97) +--- + libmount/src/optlist.c | 7 +++---- + libmount/src/optstr.c | 2 +- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c +index 256c592fd..1d32c2dd6 100644 +--- a/libmount/src/optlist.c ++++ b/libmount/src/optlist.c +@@ -601,7 +601,7 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, + + for (ent = map; ent && ent->name; ent++) { + +- char *p; ++ const char *p; + size_t sz; + struct libmnt_opt *opt; + +@@ -621,7 +621,7 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, + sz = p - ent->name; + p -= sz; + } else { +- p = (char *) ent->name; ++ p = ent->name; + sz = strlen(ent->name); /* alone "name" */ + } + +@@ -1162,8 +1162,7 @@ const char *mnt_opt_get_value(struct libmnt_opt *opt) + /* check if option value is @str or comma separated @str */ + int mnt_opt_value_with(struct libmnt_opt *opt, const char *str) + { +- char *p; +- const char *start = opt->value; ++ const char *p, *start = opt->value; + size_t len; + + if (!str || !opt->value || !*opt->value) +diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c +index ac20d8755..51526973d 100644 +--- a/libmount/src/optstr.c ++++ b/libmount/src/optstr.c +@@ -807,7 +807,7 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags, + const struct libmnt_optmap *ent; + struct ul_buffer buf = UL_INIT_BUFFER; + size_t sz; +- char *p; ++ const char *p; + + ul_buffer_refer_string(&buf, *optstr); + +-- +2.51.1 + diff --git a/0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch b/0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch new file mode 100644 index 0000000..d4355db --- /dev/null +++ b/0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch @@ -0,0 +1,54 @@ +From 1ba0d6e2c78f3423cb6427e4922f5949af7429e0 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:24:11 +0100 +Subject: libmount: fix const qualifier warning in mnt_parse_mountinfo_line + +Fix const qualifier discarded warning in mnt_parse_mountinfo_line(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The strstr() function returns a pointer into a const string, so +introduce a separate 'sep' variable to hold this const pointer, +keeping 'p' for non-const unmangle() results that need to be freed. + +Signed-off-by: Karel Zak +(cherry picked from commit 530bf5c5b071753e149699c638ad1820daf5c205) +--- + libmount/src/tab_parse.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c +index 3dd853880..3503c233c 100644 +--- a/libmount/src/tab_parse.c ++++ b/libmount/src/tab_parse.c +@@ -186,6 +186,7 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s) + int rc = 0; + unsigned int maj, min; + char *p; ++ const char *sep; + + fs->flags |= MNT_FS_KERNEL; + +@@ -242,15 +243,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s) + } + + /* (7) optional fields, terminated by " - " */ +- p = strstr(s, " - "); +- if (!p) { ++ sep = strstr(s, " - "); ++ if (!sep) { + DBG(TAB, ul_debug("mountinfo parse error: separator not found")); + return -EINVAL; + } +- if (p > s + 1) +- fs->opt_fields = strndup(s + 1, p - s - 1); ++ if (sep > s + 1) ++ fs->opt_fields = strndup(s + 1, sep - s - 1); + +- s = skip_separator(p + 3); ++ s = skip_separator(sep + 3); + + /* (8) FS type */ + p = unmangle(s, &s); +-- +2.51.1 + diff --git a/0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch b/0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch new file mode 100644 index 0000000..cd6b676 --- /dev/null +++ b/0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch @@ -0,0 +1,54 @@ +From 088509a327523fc25e2014c47035e587740ca564 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:28:41 +0100 +Subject: libblkid: fix const qualifier warning in blkid_parse_tag_string + +Fix const qualifier discarded warning in blkid_parse_tag_string(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The strchr() function returns a pointer into a const string, so +introduce a separate 'eq' variable to hold this const pointer for +finding the '=' separator. Also move the 'cp' variable declaration +into the block where it's actually used for quote handling. + +Signed-off-by: Karel Zak +(cherry picked from commit c45442ef125270d0ab2cb539747ccaf737d60d37) +--- + libblkid/src/tag.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/libblkid/src/tag.c b/libblkid/src/tag.c +index 178336505..f195c0625 100644 +--- a/libblkid/src/tag.c ++++ b/libblkid/src/tag.c +@@ -202,21 +202,23 @@ errout: + */ + int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val) + { +- char *name, *value, *cp; ++ char *name, *value; ++ const char *eq; + + DBG(TAG, ul_debug("trying to parse '%s' as a tag", token)); + +- if (!token || !(cp = strchr(token, '='))) ++ if (!token || !(eq = strchr(token, '='))) + return -1; + + name = strdup(token); + if (!name) + return -1; +- value = name + (cp - token); ++ value = name + (eq - token); + *value++ = '\0'; + if (*value == '"' || *value == '\'') { + char c = *value++; +- if (!(cp = strrchr(value, c))) ++ char *cp = strrchr(value, c); ++ if (!cp) + goto errout; /* missing closing quote */ + *cp = '\0'; + } +-- +2.51.1 + diff --git a/0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch b/0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch new file mode 100644 index 0000000..2d6f9d0 --- /dev/null +++ b/0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch @@ -0,0 +1,34 @@ +From d35ec59cf727c302cd499cc0d6efffd9efdcdce3 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:33:04 +0100 +Subject: dmesg: fix const qualifier warnings in parse_callerid + +Fix const qualifier discarded warnings in parse_callerid(). +These warnings are reported by gcc 15 which defaults to the C23 standard. + +The strchr() and strstr() functions return pointers into const strings, +so the receiving variables must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 40e6850d2b2ba2492d5f3e75656cb9bcce2806bb) +--- + sys-utils/dmesg.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c +index cccbd4067..cdf23b021 100644 +--- a/sys-utils/dmesg.c ++++ b/sys-utils/dmesg.c +@@ -844,8 +844,7 @@ static const char *parse_callerid(const char *p_str, const char *end, + const char *p_after; + const char *p_next; + size_t cid_size; +- char *p_scn; +- char *p_cid; ++ const char *p_scn, *p_cid; + + /* Check for PRINTK_CALLER prefix, must be before msg text */ + p_cid = strstr(p_str, DMESG_CALLER_PREFIX); +-- +2.51.1 + diff --git a/0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch b/0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch new file mode 100644 index 0000000..793e284 --- /dev/null +++ b/0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch @@ -0,0 +1,34 @@ +From 3a9950c35da4f1e7032d55f3c993fff390fde9c2 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:35:56 +0100 +Subject: lsfd: fix const qualifier warning in new_counter_spec + +Fix const qualifier discarded warning in new_counter_spec(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The function modifies the input string by inserting a null terminator +to split it into name and expression parts, so the parameter should +be char * rather than const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 014d2779afb4118d7117442eeed562e2c7b7594f) +--- + lsfd-cmd/lsfd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c +index 9aae240fc..2e83acf91 100644 +--- a/lsfd-cmd/lsfd.c ++++ b/lsfd-cmd/lsfd.c +@@ -2278,7 +2278,7 @@ static struct libscols_filter *new_filter(const char *expr, bool debug, struct l + return f; + } + +-static struct counter_spec *new_counter_spec(const char *spec_str) ++static struct counter_spec *new_counter_spec(char *spec_str) + { + char *sep; + struct counter_spec *spec; +-- +2.51.1 + diff --git a/0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch b/0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch new file mode 100644 index 0000000..7c78c52 --- /dev/null +++ b/0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch @@ -0,0 +1,34 @@ +From 6b3fa46d97201628b893f81c3bf3202aedd6ce30 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:38:18 +0100 +Subject: lsfd: fix const qualifier warning in strnrstr + +Fix const qualifier discarded warning in strnrstr(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The function returns a non-const pointer into the haystack parameter, +and callers modify the string through that pointer. Therefore, the +haystack parameter should be char * rather than const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 935f2ab21add95059a92208f69ef578708307481) +--- + lsfd-cmd/file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lsfd-cmd/file.c b/lsfd-cmd/file.c +index 32b08693d..5ea3ccc57 100644 +--- a/lsfd-cmd/file.c ++++ b/lsfd-cmd/file.c +@@ -387,7 +387,7 @@ void decode_source(char *buf, size_t bufsize, + dev_minor); + } + +-static char *strnrstr(const char *haystack, const char *needle, size_t needle_len) ++static char *strnrstr(char *haystack, const char *needle, size_t needle_len) + { + char *last = strstr(haystack, needle); + if (last == NULL) +-- +2.51.1 + diff --git a/0013-logger-fix-const-qualifier-warnings-for-C23.patch b/0013-logger-fix-const-qualifier-warnings-for-C23.patch new file mode 100644 index 0000000..7b661d7 --- /dev/null +++ b/0013-logger-fix-const-qualifier-warnings-for-C23.patch @@ -0,0 +1,67 @@ +From f7458f53c4cf63014de131434872e6c8fee6adab Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:43:38 +0100 +Subject: logger: fix const qualifier warnings for C23 + +Fix const qualifier discarded warnings in valid_structured_data_param() +and valid_structured_data_id() functions. These warnings are reported by +gcc 15 which defaults to the C23 standard. + +The strchr() and strstr() functions return pointers into const strings, +so the receiving variables must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 22c3b959ef381b35a55ed00cf6acd2507b461d4b) +--- + misc-utils/logger.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/misc-utils/logger.c b/misc-utils/logger.c +index f332a7d27..2a45b12bf 100644 +--- a/misc-utils/logger.c ++++ b/misc-utils/logger.c +@@ -699,10 +699,10 @@ static char *get_structured_data_string(struct logger_ctl *ctl) + + static int valid_structured_data_param(const char *str) + { +- char *s; +- char *eq = strchr(str, '='), +- *qm1 = strchr(str, '"'), +- *qm2 = qm1 ? ul_strchr_escaped(qm1 + 1, '"') : NULL; ++ const char *s; ++ const char *eq = strchr(str, '='), ++ *qm1 = strchr(str, '"'), ++ *qm2 = qm1 ? ul_strchr_escaped(qm1 + 1, '"') : NULL; + + /* something is missing */ + if (!eq || !qm1 || !qm2) +@@ -710,7 +710,7 @@ static int valid_structured_data_param(const char *str) + + /* ']' need to be escaped */ + for (s = qm1 + 1; s && *s; ) { +- char *p = strchr(s, ']'); ++ const char *p = strchr(s, ']'); + if (!p) + break; + if (p > qm2 || p == ul_strchr_escaped(s, ']')) +@@ -720,7 +720,7 @@ static int valid_structured_data_param(const char *str) + + /* '\' is allowed only before '[]"\' chars */ + for (s = qm1 + 1; s && *s; ) { +- char *p = strchr(s, '\\'); ++ const char *p = strchr(s, '\\'); + if (!p) + break; + if (!strchr("[]\"\\", *(p + 1))) +@@ -739,7 +739,7 @@ static int valid_structured_data_param(const char *str) + */ + static int valid_structured_data_id(const char *str) + { +- char *at = strchr(str, '@'); ++ const char *at = strchr(str, '@'); + const char *p; + + /* standardized IDs without @ */ +-- +2.51.1 + diff --git a/0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch b/0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch new file mode 100644 index 0000000..e5c7da6 --- /dev/null +++ b/0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch @@ -0,0 +1,33 @@ +From cb68695cf9d93fe8692c69ae3773e64364491d48 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:44:47 +0100 +Subject: namei: fix const qualifier warning in readlink_to_namei + +Fix const qualifier discarded warning in readlink_to_namei(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The strrchr() function returns a pointer into a const string, so the +receiving variable must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit e318417f00982bf496fd2359853b07ada3e3c544) +--- + misc-utils/namei.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc-utils/namei.c b/misc-utils/namei.c +index 0a9ed8df8..2c3049284 100644 +--- a/misc-utils/namei.c ++++ b/misc-utils/namei.c +@@ -100,7 +100,7 @@ readlink_to_namei(struct namei *nm, const char *path) + if (sz < 1) + err(EXIT_FAILURE, _("failed to read symlink: %s"), path); + if (*sym != '/') { +- char *p = strrchr(path, '/'); ++ const char *p = strrchr(path, '/'); + + if (p) { + isrel = 1; +-- +2.51.1 + diff --git a/0015-whereis-fix-const-qualifier-warnings-for-C23.patch b/0015-whereis-fix-const-qualifier-warnings-for-C23.patch new file mode 100644 index 0000000..2d41aef --- /dev/null +++ b/0015-whereis-fix-const-qualifier-warnings-for-C23.patch @@ -0,0 +1,49 @@ +From bc377ab3489beb493e940f01cfad7a2997c32550 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:46:22 +0100 +Subject: whereis: fix const qualifier warnings for C23 + +Fix const qualifier discarded warnings in dirlist_add_subdir() and +lookup() functions. These warnings are reported by gcc 15 which +defaults to the C23 standard. + +The strchr() and strrchr() functions return pointers into const strings, +so the receiving variables must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 01018b74163f9122c75179a7c991b0aa0f8c603c) +--- + misc-utils/whereis.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c +index b575e57ae..310512b30 100644 +--- a/misc-utils/whereis.c ++++ b/misc-utils/whereis.c +@@ -269,7 +269,7 @@ static void dirlist_add_subdir(struct wh_dirlist **ls, int type, const char *dir + char buf[PATH_MAX], *d; + DIR *dirp; + struct dirent *dp; +- char *postfix; ++ const char *postfix; + size_t len; + + postfix = strchr(dir, '*'); +@@ -473,11 +473,12 @@ static void lookup(const char *pattern, struct wh_dirlist *ls, int want) + { + char patbuf[PATH_MAX] = { 0 }; + int count = 0; +- char *wait = NULL, *p; ++ char *wait = NULL; ++ const char *p; + + /* canonicalize pattern -- remove path suffix etc. */ + p = strrchr(pattern, '/'); +- p = p ? p + 1 : (char *) pattern; ++ p = p ? p + 1 : pattern; + xstrncpy(patbuf, p, PATH_MAX); + + DBG(SEARCH, ul_debug("lookup dirs for '%s' (%s), want: %s %s %s", +-- +2.51.1 + diff --git a/0016-enosys-fix-const-qualifier-warning-in-parse_block.patch b/0016-enosys-fix-const-qualifier-warning-in-parse_block.patch new file mode 100644 index 0000000..4af94c8 --- /dev/null +++ b/0016-enosys-fix-const-qualifier-warning-in-parse_block.patch @@ -0,0 +1,33 @@ +From d2d6d2bba6470d3b38a284d7de874901e3cb6662 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:47:46 +0100 +Subject: enosys: fix const qualifier warning in parse_block + +Fix const qualifier discarded warning in parse_block(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The strchr() function returns a pointer into a const string, so the +receiving variable must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 70379d240dcf975d140160bb4c14cf1b3fe70bcc) +--- + misc-utils/enosys.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc-utils/enosys.c b/misc-utils/enosys.c +index 6afb27107..5f780ae98 100644 +--- a/misc-utils/enosys.c ++++ b/misc-utils/enosys.c +@@ -105,7 +105,7 @@ static struct blocked_number *parse_block(const char *s, int ret, const struct s + struct blocked_number *blocked; + const char *name, *error_name; + long blocked_number; +- char *colon; ++ const char *colon; + bool found; + size_t i; + +-- +2.51.1 + diff --git a/0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch b/0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch new file mode 100644 index 0000000..07b20c2 --- /dev/null +++ b/0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch @@ -0,0 +1,34 @@ +From d1ae6e00299866ae3ad8dd549302eaa9b499a24f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:48:53 +0100 +Subject: partx: fix const qualifier warning in get_max_partno + +Fix const qualifier discarded warning in get_max_partno(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The strrchr() function returns a pointer into a const string, so the +receiving variable must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit 4c94ce5d05d97420df7a512bbbaee8c4017414ae) +--- + disk-utils/partx.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/disk-utils/partx.c b/disk-utils/partx.c +index 347d5daad..a2df5d4c0 100644 +--- a/disk-utils/partx.c ++++ b/disk-utils/partx.c +@@ -218,7 +218,8 @@ err: + + static int get_max_partno(const char *disk, dev_t devno) + { +- char path[PATH_MAX], *parent, *dirname = NULL; ++ char path[PATH_MAX], *dirname = NULL; ++ const char *parent; + struct stat st; + DIR *dir; + struct dirent *d; +-- +2.51.1 + diff --git a/0018-eject-fix-const-qualifier-warning-in-read_speed.patch b/0018-eject-fix-const-qualifier-warning-in-read_speed.patch new file mode 100644 index 0000000..7f0b421 --- /dev/null +++ b/0018-eject-fix-const-qualifier-warning-in-read_speed.patch @@ -0,0 +1,33 @@ +From 84b1a2c93dcdb5b51d1273fa85776b1007411b58 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 27 Nov 2025 16:50:19 +0100 +Subject: eject: fix const qualifier warning in read_speed + +Fix const qualifier discarded warning in read_speed(). +This warning is reported by gcc 15 which defaults to the C23 standard. + +The strrchr() function returns a pointer into a const string, so the +receiving variable must be declared as const char *. + +Signed-off-by: Karel Zak +(cherry picked from commit cc1f2ac99b99eede36a58cf115a56bdfbc977e52) +--- + sys-utils/eject.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys-utils/eject.c b/sys-utils/eject.c +index 545642475..e6d4db102 100644 +--- a/sys-utils/eject.c ++++ b/sys-utils/eject.c +@@ -493,7 +493,7 @@ static void select_speed(const struct eject_control *ctl) + static int read_speed(const char *devname) + { + int drive_number = -1; +- char *name; ++ const char *name; + FILE *f; + + f = fopen(_PATH_PROC_CDROMINFO, "r"); +-- +2.51.1 + diff --git a/login-default-motd-file.patch b/login-default-motd-file.patch deleted file mode 100644 index 3670848..0000000 --- a/login-default-motd-file.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/pathnames.h b/include/pathnames.h -index 3845d4c33..fac3a0783 100644 ---- a/include/pathnames.h -+++ b/include/pathnames.h -@@ -41,7 +41,7 @@ - #ifndef _PATH_MAILDIR - # define _PATH_MAILDIR "/var/spool/mail" - #endif --#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd" -+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d" - #ifndef _PATH_NOLOGIN - # define _PATH_NOLOGIN "/etc/nologin" - #endif diff --git a/login-lastlog-create.patch b/login-lastlog-create.patch deleted file mode 100644 index e2523d3..0000000 --- a/login-lastlog-create.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up util-linux-2.36/login-utils/login.c.kzak util-linux-2.36/login-utils/login.c ---- util-linux-2.36/login-utils/login.c.kzak 2020-07-23 14:13:26.777030764 +0200 -+++ util-linux-2.36/login-utils/login.c 2020-07-23 14:11:22.793686983 +0200 -@@ -585,7 +585,7 @@ static void log_lastlog(struct login_con - sa.sa_handler = SIG_IGN; - sigaction(SIGXFSZ, &sa, &oldsa_xfsz); - -- fd = open(_PATH_LASTLOG, O_RDWR, 0); -+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); - if (fd < 0) - goto done; - offset = cxt->pwd->pw_uid * sizeof(ll); diff --git a/util-linux.spec b/util-linux.spec index ea4f5a9..0ceb1e9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -102,17 +102,30 @@ Provides: /usr/sbin/runuser Provides: /usr/sbin/sfdisk %endif -### Ready for upstream? -### -# 151635 - makeing /var/log/lastlog -Patch0: login-lastlog-create.patch -# Add `/run/motd.d` to the hardcoded MOTD_FILE -# https://github.com/coreos/console-login-helper-messages/issues/60 -Patch1: login-default-motd-file.patch +### Fedora specific patches +Patch0: 0000-login-use-O_CREAT-on-lastlog.patch +Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch -# https://github.com/dracut-ng/dracut-ng/issues/1384 -# 2367956 - EROFS vs. the latest util-linux and kernel -Patch2: 0001-libmount-disable-EROFS-backing-file-support.patch +### Temporary dracut workaround +Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch + +### Upstream backports (mostly for gcc-15) +Patch3: 0003-libblkid-use-snprintf-instead-of-sprintf.patch +Patch4: 0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch +Patch5: 0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch +Patch6: 0006-lsns-fix-const-qualifier-warnings-for-C23.patch +Patch7: 0007-libmount-fix-const-qualifier-warnings-for-C23.patch +Patch8: 0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch +Patch9: 0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch +Patch10: 0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch +Patch11: 0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch +Patch12: 0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch +Patch13: 0013-logger-fix-const-qualifier-warnings-for-C23.patch +Patch14: 0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch +Patch15: 0015-whereis-fix-const-qualifier-warnings-for-C23.patch +Patch16: 0016-enosys-fix-const-qualifier-warning-in-parse_block.patch +Patch17: 0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch +Patch18: 0018-eject-fix-const-qualifier-warning-in-read_speed.patch %description The util-linux package contains a large variety of low-level system From df438c4170ebad73b9ba2e60cd68b562474ba0ff Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Dec 2025 16:42:08 +0100 Subject: [PATCH 411/425] upgrade to upstream release v2.41.3 --- .gitignore | 1 + ...lkid-use-snprintf-instead-of-sprintf.patch | 58 ---------------- ...x-bsearch-macro-usage-with-glibc-C23.patch | 42 ------------ ...nst-qualifier-discarded-warnings-in-.patch | 57 ---------------- ...fix-const-qualifier-warnings-for-C23.patch | 45 ------------- ...fix-const-qualifier-warnings-for-C23.patch | 67 ------------------- ...st-qualifier-warning-in-mnt_parse_mo.patch | 54 --------------- ...st-qualifier-warning-in-blkid_parse_.patch | 54 --------------- ...qualifier-warnings-in-parse_callerid.patch | 34 ---------- ...ualifier-warning-in-new_counter_spec.patch | 34 ---------- ...-const-qualifier-warning-in-strnrstr.patch | 34 ---------- ...fix-const-qualifier-warnings-for-C23.patch | 67 ------------------- ...qualifier-warning-in-readlink_to_nam.patch | 33 --------- ...fix-const-qualifier-warnings-for-C23.patch | 49 -------------- ...nst-qualifier-warning-in-parse_block.patch | 33 --------- ...-qualifier-warning-in-get_max_partno.patch | 34 ---------- ...onst-qualifier-warning-in-read_speed.patch | 33 --------- sources | 2 +- util-linux.spec | 20 +----- 19 files changed, 3 insertions(+), 748 deletions(-) delete mode 100644 0003-libblkid-use-snprintf-instead-of-sprintf.patch delete mode 100644 0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch delete mode 100644 0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch delete mode 100644 0006-lsns-fix-const-qualifier-warnings-for-C23.patch delete mode 100644 0007-libmount-fix-const-qualifier-warnings-for-C23.patch delete mode 100644 0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch delete mode 100644 0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch delete mode 100644 0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch delete mode 100644 0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch delete mode 100644 0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch delete mode 100644 0013-logger-fix-const-qualifier-warnings-for-C23.patch delete mode 100644 0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch delete mode 100644 0015-whereis-fix-const-qualifier-warnings-for-C23.patch delete mode 100644 0016-enosys-fix-const-qualifier-warning-in-parse_block.patch delete mode 100644 0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch delete mode 100644 0018-eject-fix-const-qualifier-warning-in-read_speed.patch diff --git a/.gitignore b/.gitignore index cdfd72d..9c2726a 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,4 @@ /util-linux-2.41.tar.xz /util-linux-2.41.1.tar.xz /util-linux-2.41.2.tar.xz +/util-linux-2.41.3.tar.xz diff --git a/0003-libblkid-use-snprintf-instead-of-sprintf.patch b/0003-libblkid-use-snprintf-instead-of-sprintf.patch deleted file mode 100644 index 6372a17..0000000 --- a/0003-libblkid-use-snprintf-instead-of-sprintf.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0cd0a9dd42a3249bbbee4855fbc406c4ca5fdd5b Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 6 Oct 2025 15:04:24 +0200 -Subject: libblkid: use snprintf() instead of sprintf() - -Replace sprintf() calls with snprintf() to ensure proper bounds -checking when formatting strings. - -In encode.c, the check now validates snprintf() return value instead -of pre-checking buffer size, providing more robust error handling. - -In probe.c, snprintf() is used with proper size calculation based on -remaining buffer space. - -Signed-off-by: Karel Zak -(cherry picked from commit 041380f4ca7244df624bf7efdb5e27fdd3144175) -(cherry picked from commit 917917253e60b0ba485cf6a27a2f993aa43e1eea) ---- - libblkid/src/encode.c | 6 ++++-- - libblkid/src/probe.c | 4 ++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/libblkid/src/encode.c b/libblkid/src/encode.c -index 8213873ee..4b83f6690 100644 ---- a/libblkid/src/encode.c -+++ b/libblkid/src/encode.c -@@ -191,9 +191,11 @@ int blkid_encode_string(const char *str, char *str_enc, size_t len) - j += seqlen; - i += (seqlen-1); - } else if (str[i] == '\\' || !is_whitelisted(str[i], NULL)) { -- if (len-j < 4) -+ int rc; -+ -+ rc = snprintf(&str_enc[j], len-j, "\\x%02x", (unsigned char) str[i]); -+ if (rc != 4) - goto err; -- sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); - j += 4; - } else { - if (len-j < 1) -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 61b93021c..a38f5990e 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -2012,8 +2012,8 @@ static void blkid_probe_log_csum_mismatch(blkid_probe pr, size_t n, const void * - int hex_size = min(sizeof(csum_hex), n * 2); - - for (int i = 0; i < hex_size; i+=2) { -- sprintf(&csum_hex[i], "%02X", ((const unsigned char *) csum)[i / 2]); -- sprintf(&expected_hex[i], "%02X", ((const unsigned char *) expected)[i / 2]); -+ snprintf(&csum_hex[i], sizeof(csum_hex) - i, "%02X", ((const unsigned char *) csum)[i / 2]); -+ snprintf(&expected_hex[i], sizeof(expected_hex) - i, "%02X", ((const unsigned char *) expected)[i / 2]); - } - - DBG(LOWPROBE, ul_debug( --- -2.51.1 - diff --git a/0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch b/0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch deleted file mode 100644 index c8fb5ea..0000000 --- a/0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 189960ccca3866461d4ee91c3b7ffb9dac6d0078 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= -Date: Sat, 22 Nov 2025 10:41:08 -0300 -Subject: lsfd: fix bsearch macro usage with glibc C23 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -C23 requires bsearch to be a const preserving macro, build now fails -with - -../lsfd-cmd/lsfd.c:1879:75: error: macro ‘bsearch’ passed 6 arguments, but takes just 5 - 1879 | nfds, sizeof(struct pollfd), pollfdcmp)) - | ^ -In file included from ../include/c.h:17, - from ../lsfd-cmd/lsfd.c:48: -/usr/include/stdlib.h:987:10: note: macro ‘bsearch’ defined here - 987 | # define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \ - - add parenthesis around expression to fix it. - -(cherry picked from commit 711bda1441561bfd2eb6d45fe0bc789535c1f1a8) ---- - lsfd-cmd/lsfd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c -index 75cd1de58..9aae240fc 100644 ---- a/lsfd-cmd/lsfd.c -+++ b/lsfd-cmd/lsfd.c -@@ -1836,7 +1836,7 @@ static void mark_poll_fds_as_multiplexed(char *buf, - struct file *file = list_entry(f, struct file, files); - if (is_opened_file(file) && !file->multiplexed) { - int fd = file->association; -- if (bsearch(&(struct pollfd){.fd = fd,}, local.iov_base, -+ if (bsearch((&(struct pollfd){.fd = fd,}), local.iov_base, - nfds, sizeof(struct pollfd), pollfdcmp)) - file->multiplexed = 1; - } --- -2.51.1 - diff --git a/0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch b/0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch deleted file mode 100644 index a5064b0..0000000 --- a/0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 638055dbe76ca0b3f87bcc0879e5810fadece18c Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 10:27:07 +0100 -Subject: lib, lscpu: fix const qualifier discarded warnings in bsearch - -Fix compilation warnings from newer compilers with stricter -const-correctness checks. When bsearch() searches in const arrays, -the result pointer must also be const to avoid discarding the -const qualifier. - -Fixed in: -- lib/color-names.c: searching in static const basic_schemes[] -- sys-utils/lscpu-cputype.c: searching in const pattern arrays - -The warnings were: - lib/color-names.c:62:13: error: assignment discards 'const' - qualifier from pointer target type - [-Werror=discarded-qualifiers] - -Signed-off-by: Karel Zak -(cherry picked from commit 0cef3e4f5aac19bc3623883ca64c66538aa9b442) ---- - lib/color-names.c | 3 ++- - sys-utils/lscpu-cputype.c | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/lib/color-names.c b/lib/color-names.c -index 88c4ef957..daebcedae 100644 ---- a/lib/color-names.c -+++ b/lib/color-names.c -@@ -54,7 +54,8 @@ const char *color_sequence_from_colorname(const char *str) - { "white", UL_COLOR_WHITE }, - { "yellow", UL_COLOR_BOLD_YELLOW } - }; -- struct ul_color_name key = { .name = str }, *res; -+ struct ul_color_name key = { .name = str }; -+ const struct ul_color_name *res; - - if (!str) - return NULL; -diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c -index 3937a00a8..99b112bf9 100644 ---- a/sys-utils/lscpu-cputype.c -+++ b/sys-utils/lscpu-cputype.c -@@ -444,7 +444,8 @@ static char *key_cleanup(char *str, int *keynum) - - static const struct cpuinfo_pattern *cpuinfo_parse_line(char *str, char **value, int *keynum) - { -- struct cpuinfo_pattern key = { .id = 0 }, *pat; -+ struct cpuinfo_pattern key = { .id = 0 }; -+ const struct cpuinfo_pattern *pat; - char *p, *v; - char buf[CPUTYPE_PATTERN_BUFSZ] = { 0 }; - --- -2.51.1 - diff --git a/0006-lsns-fix-const-qualifier-warnings-for-C23.patch b/0006-lsns-fix-const-qualifier-warnings-for-C23.patch deleted file mode 100644 index 8478b21..0000000 --- a/0006-lsns-fix-const-qualifier-warnings-for-C23.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 986936d454b1f9165f5b35196a732db71a8d3b46 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 15:41:21 +0100 -Subject: lsns: fix const qualifier warnings for C23 - -Fix const qualifier discarded warnings in read_persistent_namespaces() -and is_path_included() functions. These warnings are reported by gcc 15 -which defaults to the C23 standard. - -The strchr() and strstr() functions return pointers into const strings, -so the receiving variables must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit dbe4c16973d5d0f69ba3bf1bd8942a51de9a0933) ---- - sys-utils/lsns.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c -index 812afe710..2ee078ac6 100644 ---- a/sys-utils/lsns.c -+++ b/sys-utils/lsns.c -@@ -1003,8 +1003,8 @@ static int read_persistent_namespaces(struct lsns *ls) - struct libmnt_fs *fs = NULL; - - while (mnt_table_next_fs(ls->tab, itr, &fs) == 0) { -- const char *root; -- char *p, *end = NULL; -+ const char *root, *p; -+ char *end = NULL; - ino_t ino; - int fd; - -@@ -1095,7 +1095,7 @@ static int is_path_included(const char *path_set, const char *elt, - { - size_t elt_len; - size_t path_set_len; -- char *tmp; -+ const char *tmp; - - - tmp = strstr(path_set, elt); --- -2.51.1 - diff --git a/0007-libmount-fix-const-qualifier-warnings-for-C23.patch b/0007-libmount-fix-const-qualifier-warnings-for-C23.patch deleted file mode 100644 index 5f67a10..0000000 --- a/0007-libmount-fix-const-qualifier-warnings-for-C23.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 04f796acef76bb18445f516f44838b95dba49883 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 15:45:55 +0100 -Subject: libmount: fix const qualifier warnings for C23 - -Fix const qualifier discarded warnings in optlist_add_flags(), -mnt_opt_value_with(), and mnt_optstr_apply_flags() functions. -These warnings are reported by gcc 15 which defaults to the C23 standard. - -The strchr() and strstr() functions return pointers into const strings, -so the receiving variables must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit c0c79c41527365ca7de30c75daaa018ea01fff97) ---- - libmount/src/optlist.c | 7 +++---- - libmount/src/optstr.c | 2 +- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c -index 256c592fd..1d32c2dd6 100644 ---- a/libmount/src/optlist.c -+++ b/libmount/src/optlist.c -@@ -601,7 +601,7 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, - - for (ent = map; ent && ent->name; ent++) { - -- char *p; -+ const char *p; - size_t sz; - struct libmnt_opt *opt; - -@@ -621,7 +621,7 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, - sz = p - ent->name; - p -= sz; - } else { -- p = (char *) ent->name; -+ p = ent->name; - sz = strlen(ent->name); /* alone "name" */ - } - -@@ -1162,8 +1162,7 @@ const char *mnt_opt_get_value(struct libmnt_opt *opt) - /* check if option value is @str or comma separated @str */ - int mnt_opt_value_with(struct libmnt_opt *opt, const char *str) - { -- char *p; -- const char *start = opt->value; -+ const char *p, *start = opt->value; - size_t len; - - if (!str || !opt->value || !*opt->value) -diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c -index ac20d8755..51526973d 100644 ---- a/libmount/src/optstr.c -+++ b/libmount/src/optstr.c -@@ -807,7 +807,7 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags, - const struct libmnt_optmap *ent; - struct ul_buffer buf = UL_INIT_BUFFER; - size_t sz; -- char *p; -+ const char *p; - - ul_buffer_refer_string(&buf, *optstr); - --- -2.51.1 - diff --git a/0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch b/0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch deleted file mode 100644 index d4355db..0000000 --- a/0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1ba0d6e2c78f3423cb6427e4922f5949af7429e0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:24:11 +0100 -Subject: libmount: fix const qualifier warning in mnt_parse_mountinfo_line - -Fix const qualifier discarded warning in mnt_parse_mountinfo_line(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The strstr() function returns a pointer into a const string, so -introduce a separate 'sep' variable to hold this const pointer, -keeping 'p' for non-const unmangle() results that need to be freed. - -Signed-off-by: Karel Zak -(cherry picked from commit 530bf5c5b071753e149699c638ad1820daf5c205) ---- - libmount/src/tab_parse.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c -index 3dd853880..3503c233c 100644 ---- a/libmount/src/tab_parse.c -+++ b/libmount/src/tab_parse.c -@@ -186,6 +186,7 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s) - int rc = 0; - unsigned int maj, min; - char *p; -+ const char *sep; - - fs->flags |= MNT_FS_KERNEL; - -@@ -242,15 +243,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s) - } - - /* (7) optional fields, terminated by " - " */ -- p = strstr(s, " - "); -- if (!p) { -+ sep = strstr(s, " - "); -+ if (!sep) { - DBG(TAB, ul_debug("mountinfo parse error: separator not found")); - return -EINVAL; - } -- if (p > s + 1) -- fs->opt_fields = strndup(s + 1, p - s - 1); -+ if (sep > s + 1) -+ fs->opt_fields = strndup(s + 1, sep - s - 1); - -- s = skip_separator(p + 3); -+ s = skip_separator(sep + 3); - - /* (8) FS type */ - p = unmangle(s, &s); --- -2.51.1 - diff --git a/0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch b/0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch deleted file mode 100644 index cd6b676..0000000 --- a/0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 088509a327523fc25e2014c47035e587740ca564 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:28:41 +0100 -Subject: libblkid: fix const qualifier warning in blkid_parse_tag_string - -Fix const qualifier discarded warning in blkid_parse_tag_string(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The strchr() function returns a pointer into a const string, so -introduce a separate 'eq' variable to hold this const pointer for -finding the '=' separator. Also move the 'cp' variable declaration -into the block where it's actually used for quote handling. - -Signed-off-by: Karel Zak -(cherry picked from commit c45442ef125270d0ab2cb539747ccaf737d60d37) ---- - libblkid/src/tag.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/libblkid/src/tag.c b/libblkid/src/tag.c -index 178336505..f195c0625 100644 ---- a/libblkid/src/tag.c -+++ b/libblkid/src/tag.c -@@ -202,21 +202,23 @@ errout: - */ - int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val) - { -- char *name, *value, *cp; -+ char *name, *value; -+ const char *eq; - - DBG(TAG, ul_debug("trying to parse '%s' as a tag", token)); - -- if (!token || !(cp = strchr(token, '='))) -+ if (!token || !(eq = strchr(token, '='))) - return -1; - - name = strdup(token); - if (!name) - return -1; -- value = name + (cp - token); -+ value = name + (eq - token); - *value++ = '\0'; - if (*value == '"' || *value == '\'') { - char c = *value++; -- if (!(cp = strrchr(value, c))) -+ char *cp = strrchr(value, c); -+ if (!cp) - goto errout; /* missing closing quote */ - *cp = '\0'; - } --- -2.51.1 - diff --git a/0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch b/0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch deleted file mode 100644 index 2d6f9d0..0000000 --- a/0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d35ec59cf727c302cd499cc0d6efffd9efdcdce3 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:33:04 +0100 -Subject: dmesg: fix const qualifier warnings in parse_callerid - -Fix const qualifier discarded warnings in parse_callerid(). -These warnings are reported by gcc 15 which defaults to the C23 standard. - -The strchr() and strstr() functions return pointers into const strings, -so the receiving variables must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 40e6850d2b2ba2492d5f3e75656cb9bcce2806bb) ---- - sys-utils/dmesg.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c -index cccbd4067..cdf23b021 100644 ---- a/sys-utils/dmesg.c -+++ b/sys-utils/dmesg.c -@@ -844,8 +844,7 @@ static const char *parse_callerid(const char *p_str, const char *end, - const char *p_after; - const char *p_next; - size_t cid_size; -- char *p_scn; -- char *p_cid; -+ const char *p_scn, *p_cid; - - /* Check for PRINTK_CALLER prefix, must be before msg text */ - p_cid = strstr(p_str, DMESG_CALLER_PREFIX); --- -2.51.1 - diff --git a/0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch b/0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch deleted file mode 100644 index 793e284..0000000 --- a/0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 3a9950c35da4f1e7032d55f3c993fff390fde9c2 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:35:56 +0100 -Subject: lsfd: fix const qualifier warning in new_counter_spec - -Fix const qualifier discarded warning in new_counter_spec(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The function modifies the input string by inserting a null terminator -to split it into name and expression parts, so the parameter should -be char * rather than const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 014d2779afb4118d7117442eeed562e2c7b7594f) ---- - lsfd-cmd/lsfd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c -index 9aae240fc..2e83acf91 100644 ---- a/lsfd-cmd/lsfd.c -+++ b/lsfd-cmd/lsfd.c -@@ -2278,7 +2278,7 @@ static struct libscols_filter *new_filter(const char *expr, bool debug, struct l - return f; - } - --static struct counter_spec *new_counter_spec(const char *spec_str) -+static struct counter_spec *new_counter_spec(char *spec_str) - { - char *sep; - struct counter_spec *spec; --- -2.51.1 - diff --git a/0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch b/0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch deleted file mode 100644 index 7c78c52..0000000 --- a/0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6b3fa46d97201628b893f81c3bf3202aedd6ce30 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:38:18 +0100 -Subject: lsfd: fix const qualifier warning in strnrstr - -Fix const qualifier discarded warning in strnrstr(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The function returns a non-const pointer into the haystack parameter, -and callers modify the string through that pointer. Therefore, the -haystack parameter should be char * rather than const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 935f2ab21add95059a92208f69ef578708307481) ---- - lsfd-cmd/file.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsfd-cmd/file.c b/lsfd-cmd/file.c -index 32b08693d..5ea3ccc57 100644 ---- a/lsfd-cmd/file.c -+++ b/lsfd-cmd/file.c -@@ -387,7 +387,7 @@ void decode_source(char *buf, size_t bufsize, - dev_minor); - } - --static char *strnrstr(const char *haystack, const char *needle, size_t needle_len) -+static char *strnrstr(char *haystack, const char *needle, size_t needle_len) - { - char *last = strstr(haystack, needle); - if (last == NULL) --- -2.51.1 - diff --git a/0013-logger-fix-const-qualifier-warnings-for-C23.patch b/0013-logger-fix-const-qualifier-warnings-for-C23.patch deleted file mode 100644 index 7b661d7..0000000 --- a/0013-logger-fix-const-qualifier-warnings-for-C23.patch +++ /dev/null @@ -1,67 +0,0 @@ -From f7458f53c4cf63014de131434872e6c8fee6adab Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:43:38 +0100 -Subject: logger: fix const qualifier warnings for C23 - -Fix const qualifier discarded warnings in valid_structured_data_param() -and valid_structured_data_id() functions. These warnings are reported by -gcc 15 which defaults to the C23 standard. - -The strchr() and strstr() functions return pointers into const strings, -so the receiving variables must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 22c3b959ef381b35a55ed00cf6acd2507b461d4b) ---- - misc-utils/logger.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/misc-utils/logger.c b/misc-utils/logger.c -index f332a7d27..2a45b12bf 100644 ---- a/misc-utils/logger.c -+++ b/misc-utils/logger.c -@@ -699,10 +699,10 @@ static char *get_structured_data_string(struct logger_ctl *ctl) - - static int valid_structured_data_param(const char *str) - { -- char *s; -- char *eq = strchr(str, '='), -- *qm1 = strchr(str, '"'), -- *qm2 = qm1 ? ul_strchr_escaped(qm1 + 1, '"') : NULL; -+ const char *s; -+ const char *eq = strchr(str, '='), -+ *qm1 = strchr(str, '"'), -+ *qm2 = qm1 ? ul_strchr_escaped(qm1 + 1, '"') : NULL; - - /* something is missing */ - if (!eq || !qm1 || !qm2) -@@ -710,7 +710,7 @@ static int valid_structured_data_param(const char *str) - - /* ']' need to be escaped */ - for (s = qm1 + 1; s && *s; ) { -- char *p = strchr(s, ']'); -+ const char *p = strchr(s, ']'); - if (!p) - break; - if (p > qm2 || p == ul_strchr_escaped(s, ']')) -@@ -720,7 +720,7 @@ static int valid_structured_data_param(const char *str) - - /* '\' is allowed only before '[]"\' chars */ - for (s = qm1 + 1; s && *s; ) { -- char *p = strchr(s, '\\'); -+ const char *p = strchr(s, '\\'); - if (!p) - break; - if (!strchr("[]\"\\", *(p + 1))) -@@ -739,7 +739,7 @@ static int valid_structured_data_param(const char *str) - */ - static int valid_structured_data_id(const char *str) - { -- char *at = strchr(str, '@'); -+ const char *at = strchr(str, '@'); - const char *p; - - /* standardized IDs without @ */ --- -2.51.1 - diff --git a/0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch b/0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch deleted file mode 100644 index e5c7da6..0000000 --- a/0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch +++ /dev/null @@ -1,33 +0,0 @@ -From cb68695cf9d93fe8692c69ae3773e64364491d48 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:44:47 +0100 -Subject: namei: fix const qualifier warning in readlink_to_namei - -Fix const qualifier discarded warning in readlink_to_namei(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The strrchr() function returns a pointer into a const string, so the -receiving variable must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit e318417f00982bf496fd2359853b07ada3e3c544) ---- - misc-utils/namei.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/misc-utils/namei.c b/misc-utils/namei.c -index 0a9ed8df8..2c3049284 100644 ---- a/misc-utils/namei.c -+++ b/misc-utils/namei.c -@@ -100,7 +100,7 @@ readlink_to_namei(struct namei *nm, const char *path) - if (sz < 1) - err(EXIT_FAILURE, _("failed to read symlink: %s"), path); - if (*sym != '/') { -- char *p = strrchr(path, '/'); -+ const char *p = strrchr(path, '/'); - - if (p) { - isrel = 1; --- -2.51.1 - diff --git a/0015-whereis-fix-const-qualifier-warnings-for-C23.patch b/0015-whereis-fix-const-qualifier-warnings-for-C23.patch deleted file mode 100644 index 2d41aef..0000000 --- a/0015-whereis-fix-const-qualifier-warnings-for-C23.patch +++ /dev/null @@ -1,49 +0,0 @@ -From bc377ab3489beb493e940f01cfad7a2997c32550 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:46:22 +0100 -Subject: whereis: fix const qualifier warnings for C23 - -Fix const qualifier discarded warnings in dirlist_add_subdir() and -lookup() functions. These warnings are reported by gcc 15 which -defaults to the C23 standard. - -The strchr() and strrchr() functions return pointers into const strings, -so the receiving variables must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 01018b74163f9122c75179a7c991b0aa0f8c603c) ---- - misc-utils/whereis.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c -index b575e57ae..310512b30 100644 ---- a/misc-utils/whereis.c -+++ b/misc-utils/whereis.c -@@ -269,7 +269,7 @@ static void dirlist_add_subdir(struct wh_dirlist **ls, int type, const char *dir - char buf[PATH_MAX], *d; - DIR *dirp; - struct dirent *dp; -- char *postfix; -+ const char *postfix; - size_t len; - - postfix = strchr(dir, '*'); -@@ -473,11 +473,12 @@ static void lookup(const char *pattern, struct wh_dirlist *ls, int want) - { - char patbuf[PATH_MAX] = { 0 }; - int count = 0; -- char *wait = NULL, *p; -+ char *wait = NULL; -+ const char *p; - - /* canonicalize pattern -- remove path suffix etc. */ - p = strrchr(pattern, '/'); -- p = p ? p + 1 : (char *) pattern; -+ p = p ? p + 1 : pattern; - xstrncpy(patbuf, p, PATH_MAX); - - DBG(SEARCH, ul_debug("lookup dirs for '%s' (%s), want: %s %s %s", --- -2.51.1 - diff --git a/0016-enosys-fix-const-qualifier-warning-in-parse_block.patch b/0016-enosys-fix-const-qualifier-warning-in-parse_block.patch deleted file mode 100644 index 4af94c8..0000000 --- a/0016-enosys-fix-const-qualifier-warning-in-parse_block.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d2d6d2bba6470d3b38a284d7de874901e3cb6662 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:47:46 +0100 -Subject: enosys: fix const qualifier warning in parse_block - -Fix const qualifier discarded warning in parse_block(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The strchr() function returns a pointer into a const string, so the -receiving variable must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 70379d240dcf975d140160bb4c14cf1b3fe70bcc) ---- - misc-utils/enosys.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/misc-utils/enosys.c b/misc-utils/enosys.c -index 6afb27107..5f780ae98 100644 ---- a/misc-utils/enosys.c -+++ b/misc-utils/enosys.c -@@ -105,7 +105,7 @@ static struct blocked_number *parse_block(const char *s, int ret, const struct s - struct blocked_number *blocked; - const char *name, *error_name; - long blocked_number; -- char *colon; -+ const char *colon; - bool found; - size_t i; - --- -2.51.1 - diff --git a/0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch b/0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch deleted file mode 100644 index 07b20c2..0000000 --- a/0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d1ae6e00299866ae3ad8dd549302eaa9b499a24f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:48:53 +0100 -Subject: partx: fix const qualifier warning in get_max_partno - -Fix const qualifier discarded warning in get_max_partno(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The strrchr() function returns a pointer into a const string, so the -receiving variable must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit 4c94ce5d05d97420df7a512bbbaee8c4017414ae) ---- - disk-utils/partx.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/disk-utils/partx.c b/disk-utils/partx.c -index 347d5daad..a2df5d4c0 100644 ---- a/disk-utils/partx.c -+++ b/disk-utils/partx.c -@@ -218,7 +218,8 @@ err: - - static int get_max_partno(const char *disk, dev_t devno) - { -- char path[PATH_MAX], *parent, *dirname = NULL; -+ char path[PATH_MAX], *dirname = NULL; -+ const char *parent; - struct stat st; - DIR *dir; - struct dirent *d; --- -2.51.1 - diff --git a/0018-eject-fix-const-qualifier-warning-in-read_speed.patch b/0018-eject-fix-const-qualifier-warning-in-read_speed.patch deleted file mode 100644 index 7f0b421..0000000 --- a/0018-eject-fix-const-qualifier-warning-in-read_speed.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 84b1a2c93dcdb5b51d1273fa85776b1007411b58 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 27 Nov 2025 16:50:19 +0100 -Subject: eject: fix const qualifier warning in read_speed - -Fix const qualifier discarded warning in read_speed(). -This warning is reported by gcc 15 which defaults to the C23 standard. - -The strrchr() function returns a pointer into a const string, so the -receiving variable must be declared as const char *. - -Signed-off-by: Karel Zak -(cherry picked from commit cc1f2ac99b99eede36a58cf115a56bdfbc977e52) ---- - sys-utils/eject.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys-utils/eject.c b/sys-utils/eject.c -index 545642475..e6d4db102 100644 ---- a/sys-utils/eject.c -+++ b/sys-utils/eject.c -@@ -493,7 +493,7 @@ static void select_speed(const struct eject_control *ctl) - static int read_speed(const char *devname) - { - int drive_number = -1; -- char *name; -+ const char *name; - FILE *f; - - f = fopen(_PATH_PROC_CDROMINFO, "r"); --- -2.51.1 - diff --git a/sources b/sources index ce7b5d9..96ed8d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.41.2.tar.xz) = 696c87e7cf185acc9b4b969ddade6155ea2945ae494eaecfd7b1f35d9607166cb09be79878fb793dd31b4d4dcac8c9be4be76af3886185db7ae8b58c303fb0cf +SHA512 (util-linux-2.41.3.tar.xz) = 3d299f0e05a4c982a04dbcbaaeff1222152feedf51c56c5dbdeb75999c68269d652a994f5cdf4c1ee42bb7b28475dd0792192c299fd9bc3b45198c5b153dad00 diff --git a/util-linux.spec b/util-linux.spec index 3068e99..0426af4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.41.2 +Version: 2.41.3 # -p -e rc1 Release: %autorelease -b7 License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -109,24 +109,6 @@ Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch ### Temporary dracut workaround Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch -### Upstream backports (mostly for gcc-15) -Patch3: 0003-libblkid-use-snprintf-instead-of-sprintf.patch -Patch4: 0004-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch -Patch5: 0005-lib-lscpu-fix-const-qualifier-discarded-warnings-in-.patch -Patch6: 0006-lsns-fix-const-qualifier-warnings-for-C23.patch -Patch7: 0007-libmount-fix-const-qualifier-warnings-for-C23.patch -Patch8: 0008-libmount-fix-const-qualifier-warning-in-mnt_parse_mo.patch -Patch9: 0009-libblkid-fix-const-qualifier-warning-in-blkid_parse_.patch -Patch10: 0010-dmesg-fix-const-qualifier-warnings-in-parse_callerid.patch -Patch11: 0011-lsfd-fix-const-qualifier-warning-in-new_counter_spec.patch -Patch12: 0012-lsfd-fix-const-qualifier-warning-in-strnrstr.patch -Patch13: 0013-logger-fix-const-qualifier-warnings-for-C23.patch -Patch14: 0014-namei-fix-const-qualifier-warning-in-readlink_to_nam.patch -Patch15: 0015-whereis-fix-const-qualifier-warnings-for-C23.patch -Patch16: 0016-enosys-fix-const-qualifier-warning-in-parse_block.patch -Patch17: 0017-partx-fix-const-qualifier-warning-in-get_max_partno.patch -Patch18: 0018-eject-fix-const-qualifier-warning-in-read_speed.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 4bac19fd38f59e72be7356578115428100710afc Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Dec 2025 16:53:44 +0100 Subject: [PATCH 412/425] add completition bits blkpr lsfd --- util-linux.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util-linux.spec b/util-linux.spec index 0426af4..fad72a3 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -719,7 +719,9 @@ fi %{_sbindir}/zramctl %{compldir}/addpart +%{compldir}/bits %{compldir}/blkdiscard +%{compldir}/blkpr %{compldir}/blkzone %{compldir}/cal %{compldir}/chcpu @@ -758,6 +760,7 @@ fi %{compldir}/lsblk %{compldir}/lscpu %{compldir}/lsclocks +%{compldir}/lsfd %{compldir}/lsipc %{compldir}/lsirq %{compldir}/lslocks From 06dbf9bb28d4f669f1aace6aa46607fbe9396284 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 Jan 2026 11:55:59 +0100 Subject: [PATCH 413/425] fix built on new gcc (bison based code and libblkid API) --- ...nore-Wunused-but-set-variable-for-bi.patch | 63 +++++++++++++++++++ ...const-from-blkid_partitions_get_name.patch | 44 +++++++++++++ util-linux.spec | 5 ++ 3 files changed, 112 insertions(+) create mode 100644 0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch create mode 100644 0004-blkid-Drop-const-from-blkid_partitions_get_name.patch diff --git a/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch b/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch new file mode 100644 index 0000000..2b48c5a --- /dev/null +++ b/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch @@ -0,0 +1,63 @@ +From b3e1a72d0272c8dc26db8c11c61cd4fed6a6b95f Mon Sep 17 00:00:00 2001 +From: Christian Goeschel Ndjomouo +Date: Tue, 6 Jan 2026 10:43:45 -0500 +Subject: build-sys: (gcc) ignore -Wunused-but-set-variable for bison + +[kzak@redhat.com: - merge two Christian's patches to make it more portable] + +Signed-off-by: Christian Goeschel Ndjomouo +Signed-off-by: Karel Zak +(cherry picked from commit db9047892a45c06bceb5768e7bb8c887289b9859) +(cherry picked from commit 718e4a76dd1262ce97f83dbc0c0fe9f97564ecbb) +--- + libsmartcols/src/filter-parser.y | 11 +++++++---- + sys-utils/hwclock-parse-date.y | 11 +++++++---- + 2 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/libsmartcols/src/filter-parser.y b/libsmartcols/src/filter-parser.y +index a7d41408e..23b05df33 100644 +--- a/libsmartcols/src/filter-parser.y ++++ b/libsmartcols/src/filter-parser.y +@@ -1,9 +1,12 @@ + %{ +-#ifdef __clang__ +-/* clang detects yynerrs as unused. +- * Will be fixed in future versions of bison. ++/* ++ * Compilers detect yynerrs as unused. Let's hope it will be fixed in future ++ * versions of Bison. + */ +-#pragma clang diagnostic ignored "-Wunused-but-set-variable" ++#if defined(__GNUC__) && !defined(__clang__) ++# pragma GCC diagnostic ignored "-Wunused-but-set-variable" ++#elif defined(__clang__) ++# pragma clang diagnostic ignored "-Wunused-but-set-variable" + #endif + + #include +diff --git a/sys-utils/hwclock-parse-date.y b/sys-utils/hwclock-parse-date.y +index 0d996cc87..7d6c38268 100644 +--- a/sys-utils/hwclock-parse-date.y ++++ b/sys-utils/hwclock-parse-date.y +@@ -34,11 +34,14 @@ + * TZ strings in dates. + */ + +-#ifdef __clang__ +-/* clang 15 detects yynerrs as unused. +- * Will be fixed in future versions of bison. ++/* ++ * Compilers detect yynerrs as unused. Let's hope it will be fixed in future ++ * versions of Bison. + */ +-#pragma clang diagnostic ignored "-Wunused-but-set-variable" ++#if defined(__GNUC__) && !defined(__clang__) ++# pragma GCC diagnostic ignored "-Wunused-but-set-variable" ++#elif defined(__clang__) ++# pragma clang diagnostic ignored "-Wunused-but-set-variable" + #endif + + /** +-- +2.52.0 + diff --git a/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch b/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch new file mode 100644 index 0000000..749b7f9 --- /dev/null +++ b/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch @@ -0,0 +1,44 @@ +From b994886e18307ef3002a63679fba4a6177f476cf Mon Sep 17 00:00:00 2001 +From: Daan De Meyer +Date: Wed, 26 Nov 2025 15:08:25 +0100 +Subject: blkid: Drop const from blkid_partitions_get_name() + +const for idx is useless as the value is copied anyway, so drop the +const. AFAIK this doesn't change ABI. + +(cherry picked from commit b243de928aab8565e264f4af1d776cc860689f64) +(cherry picked from commit 479133958af89a2afda442e158107b465301dfbb) +--- + libblkid/src/blkid.h.in | 2 +- + libblkid/src/partitions/partitions.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in +index 91fc3b0be..031650dbc 100644 +--- a/libblkid/src/blkid.h.in ++++ b/libblkid/src/blkid.h.in +@@ -340,7 +340,7 @@ extern uint64_t blkid_topology_get_diskseq(blkid_topology tp) + * partitions probing + */ + extern int blkid_known_pttype(const char *pttype); +-extern int blkid_partitions_get_name(const size_t idx, const char **name); ++extern int blkid_partitions_get_name(size_t idx, const char **name); + + extern int blkid_probe_enable_partitions(blkid_probe pr, int enable) + __ul_attribute__((nonnull)); +diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c +index 9df813c92..e838b3db1 100644 +--- a/libblkid/src/partitions/partitions.c ++++ b/libblkid/src/partitions/partitions.c +@@ -907,7 +907,7 @@ int blkid_known_pttype(const char *pttype) + * + * Returns: -1 if @idx is out of range, or 0 on success. + */ +-int blkid_partitions_get_name(const size_t idx, const char **name) ++int blkid_partitions_get_name(size_t idx, const char **name) + { + if (idx < ARRAY_SIZE(idinfos)) { + *name = idinfos[idx]->name; +-- +2.52.0 + diff --git a/util-linux.spec b/util-linux.spec index fad72a3..c67d24b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -109,6 +109,11 @@ Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch ### Temporary dracut workaround Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch +# Upstream backports +Patch3: 0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch +Patch4: 0004-blkid-Drop-const-from-blkid_partitions_get_name.patch + + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 4737f2d70274faa77e4b5e9ef117edb248599c14 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 Jan 2026 12:15:47 +0100 Subject: [PATCH 414/425] enable BuildRequires for parsers --- util-linux.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index c67d24b..f1f58a4 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -44,7 +44,8 @@ BuildRequires: librtas-devel #BuildRequires: autoconf #BuildRequires: automake #BuildRequires: libtool -#BuildRequires: bison +BuildRequires: bison +BuildRequires: flex ### Sources Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz From 47417a6e2e9737412879c5fd2ae1a8fea98e19af Mon Sep 17 00:00:00 2001 From: Nuo Cheng Date: Sat, 6 Dec 2025 01:10:43 +0000 Subject: [PATCH 415/425] Update util-linux-su.pamd fix variables not set in /etc/environment through command 'su --login' --- util-linux-su.pamd | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux-su.pamd b/util-linux-su.pamd index 030657f..5733201 100644 --- a/util-linux-su.pamd +++ b/util-linux-su.pamd @@ -1,4 +1,5 @@ #%PAM-1.0 +auth required pam_env.so auth sufficient pam_rootok.so # Uncomment the following line to implicitly trust users in the "wheel" group. #auth sufficient pam_wheel.so trust use_uid From 196be3f2a16d94149800f747c1468bfea7b9707a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 19:43:43 +0000 Subject: [PATCH 416/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From da7125e4bb4140112a50af0a7ff4b03d3b3d1d1b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 2 Apr 2026 14:26:48 +0200 Subject: [PATCH 417/425] upgrade to upstream release v2.42 --- .gitignore | 1 + ...t-disable-EROFS-backing-file-support.patch | 89 ------------------- ...nore-Wunused-but-set-variable-for-bi.patch | 63 ------------- ...const-from-blkid_partitions_get_name.patch | 44 --------- sources | 2 +- util-linux.spec | 18 ++-- 6 files changed, 11 insertions(+), 206 deletions(-) delete mode 100644 0002-libmount-disable-EROFS-backing-file-support.patch delete mode 100644 0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch delete mode 100644 0004-blkid-Drop-const-from-blkid_partitions_get_name.patch diff --git a/.gitignore b/.gitignore index 9c2726a..fa4f8f4 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ /util-linux-2.41.1.tar.xz /util-linux-2.41.2.tar.xz /util-linux-2.41.3.tar.xz +/util-linux-2.42.tar.xz diff --git a/0002-libmount-disable-EROFS-backing-file-support.patch b/0002-libmount-disable-EROFS-backing-file-support.patch deleted file mode 100644 index 2cb17a1..0000000 --- a/0002-libmount-disable-EROFS-backing-file-support.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 93a62761843ff76187bd542fe717fa0c9b8f73a7 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 24 Jun 2025 10:56:58 +0200 -Subject: libmount: disable EROFS backing file support - -Let's temporarily use the old reliable loop devices rather than directly -mounting EROFS images. It seems some tools need to adapt to the change. -See https://github.com/dracut-ng/dracut-ng/issues/1384 - -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 35 ----------------------------------- - libmount/src/hook_loopdev.c | 7 ------- - 2 files changed, 42 deletions(-) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index ee3eadb05..e1d06a61e 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -961,24 +961,6 @@ int mnt_context_finalize_mount(struct libmnt_context *cxt) - return rc; - } - --static int is_erofs_regfile(struct libmnt_context *cxt) --{ -- const char *type = mnt_fs_get_fstype(cxt->fs); -- const char *src = mnt_fs_get_srcpath(cxt->fs); -- unsigned long flags = 0; -- struct stat st; -- -- if (!type || strcmp(type, "erofs") != 0) -- return 0; -- if (mnt_context_get_user_mflags(cxt, &flags)) -- return 0; -- if (flags & (MNT_MS_LOOP | MNT_MS_OFFSET | MNT_MS_SIZELIMIT)) -- return 0; /* it's already loopdev */ -- if (!src || stat(src, &st) != 0 || !S_ISREG(st.st_mode)) -- return 0; -- return 1; --} -- - /** - * mnt_context_mount: - * @cxt: mount context -@@ -1083,23 +1065,6 @@ again: - } - } - -- /* -- * Try mount EROFS image again with loop device. -- * See hook_loopdev.c:is_loopdev_required() for more details. -- */ -- if (rc && mnt_context_get_syscall_errno(cxt) == ENOTBLK -- && is_erofs_regfile(cxt)) { -- struct libmnt_optlist *ol = mnt_context_get_optlist(cxt); -- -- mnt_context_reset_status(cxt); -- DBG(CXT, ul_debugobj(cxt, "enabling loop= for EROFS")); -- mnt_optlist_append_flags(ol, MNT_MS_LOOP, cxt->map_userspace); -- -- rc = mnt_context_call_hooks(cxt, MNT_STAGE_PREP_SOURCE); -- if (!rc) -- goto again; -- } -- - if (rc == 0) - rc = mnt_context_call_hooks(cxt, MNT_STAGE_POST); - -diff --git a/libmount/src/hook_loopdev.c b/libmount/src/hook_loopdev.c -index 444d69d6f..29e181fe8 100644 ---- a/libmount/src/hook_loopdev.c -+++ b/libmount/src/hook_loopdev.c -@@ -468,13 +468,6 @@ static int is_loopdev_required(struct libmnt_context *cxt, struct libmnt_optlist - } - } - -- /* The EROFS kernel driver can be compiled with EROFS_FS_BACKED_BY_FILE, -- * allowing for the mounting of a regular file as a filesystem without -- * a loop device. -- */ -- if (type && strcmp(type, "erofs") == 0) -- return 0; -- - /* Note that there is no restriction (on kernel side) that would - * prevent a regular file as a mount(2) source argument. A filesystem - * that is able to mount regular files could be implemented. For this --- -2.51.1 - diff --git a/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch b/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch deleted file mode 100644 index 2b48c5a..0000000 --- a/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch +++ /dev/null @@ -1,63 +0,0 @@ -From b3e1a72d0272c8dc26db8c11c61cd4fed6a6b95f Mon Sep 17 00:00:00 2001 -From: Christian Goeschel Ndjomouo -Date: Tue, 6 Jan 2026 10:43:45 -0500 -Subject: build-sys: (gcc) ignore -Wunused-but-set-variable for bison - -[kzak@redhat.com: - merge two Christian's patches to make it more portable] - -Signed-off-by: Christian Goeschel Ndjomouo -Signed-off-by: Karel Zak -(cherry picked from commit db9047892a45c06bceb5768e7bb8c887289b9859) -(cherry picked from commit 718e4a76dd1262ce97f83dbc0c0fe9f97564ecbb) ---- - libsmartcols/src/filter-parser.y | 11 +++++++---- - sys-utils/hwclock-parse-date.y | 11 +++++++---- - 2 files changed, 14 insertions(+), 8 deletions(-) - -diff --git a/libsmartcols/src/filter-parser.y b/libsmartcols/src/filter-parser.y -index a7d41408e..23b05df33 100644 ---- a/libsmartcols/src/filter-parser.y -+++ b/libsmartcols/src/filter-parser.y -@@ -1,9 +1,12 @@ - %{ --#ifdef __clang__ --/* clang detects yynerrs as unused. -- * Will be fixed in future versions of bison. -+/* -+ * Compilers detect yynerrs as unused. Let's hope it will be fixed in future -+ * versions of Bison. - */ --#pragma clang diagnostic ignored "-Wunused-but-set-variable" -+#if defined(__GNUC__) && !defined(__clang__) -+# pragma GCC diagnostic ignored "-Wunused-but-set-variable" -+#elif defined(__clang__) -+# pragma clang diagnostic ignored "-Wunused-but-set-variable" - #endif - - #include -diff --git a/sys-utils/hwclock-parse-date.y b/sys-utils/hwclock-parse-date.y -index 0d996cc87..7d6c38268 100644 ---- a/sys-utils/hwclock-parse-date.y -+++ b/sys-utils/hwclock-parse-date.y -@@ -34,11 +34,14 @@ - * TZ strings in dates. - */ - --#ifdef __clang__ --/* clang 15 detects yynerrs as unused. -- * Will be fixed in future versions of bison. -+/* -+ * Compilers detect yynerrs as unused. Let's hope it will be fixed in future -+ * versions of Bison. - */ --#pragma clang diagnostic ignored "-Wunused-but-set-variable" -+#if defined(__GNUC__) && !defined(__clang__) -+# pragma GCC diagnostic ignored "-Wunused-but-set-variable" -+#elif defined(__clang__) -+# pragma clang diagnostic ignored "-Wunused-but-set-variable" - #endif - - /** --- -2.52.0 - diff --git a/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch b/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch deleted file mode 100644 index 749b7f9..0000000 --- a/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch +++ /dev/null @@ -1,44 +0,0 @@ -From b994886e18307ef3002a63679fba4a6177f476cf Mon Sep 17 00:00:00 2001 -From: Daan De Meyer -Date: Wed, 26 Nov 2025 15:08:25 +0100 -Subject: blkid: Drop const from blkid_partitions_get_name() - -const for idx is useless as the value is copied anyway, so drop the -const. AFAIK this doesn't change ABI. - -(cherry picked from commit b243de928aab8565e264f4af1d776cc860689f64) -(cherry picked from commit 479133958af89a2afda442e158107b465301dfbb) ---- - libblkid/src/blkid.h.in | 2 +- - libblkid/src/partitions/partitions.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in -index 91fc3b0be..031650dbc 100644 ---- a/libblkid/src/blkid.h.in -+++ b/libblkid/src/blkid.h.in -@@ -340,7 +340,7 @@ extern uint64_t blkid_topology_get_diskseq(blkid_topology tp) - * partitions probing - */ - extern int blkid_known_pttype(const char *pttype); --extern int blkid_partitions_get_name(const size_t idx, const char **name); -+extern int blkid_partitions_get_name(size_t idx, const char **name); - - extern int blkid_probe_enable_partitions(blkid_probe pr, int enable) - __ul_attribute__((nonnull)); -diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c -index 9df813c92..e838b3db1 100644 ---- a/libblkid/src/partitions/partitions.c -+++ b/libblkid/src/partitions/partitions.c -@@ -907,7 +907,7 @@ int blkid_known_pttype(const char *pttype) - * - * Returns: -1 if @idx is out of range, or 0 on success. - */ --int blkid_partitions_get_name(const size_t idx, const char **name) -+int blkid_partitions_get_name(size_t idx, const char **name) - { - if (idx < ARRAY_SIZE(idinfos)) { - *name = idinfos[idx]->name; --- -2.52.0 - diff --git a/sources b/sources index 96ed8d3..51a58d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.41.3.tar.xz) = 3d299f0e05a4c982a04dbcbaaeff1222152feedf51c56c5dbdeb75999c68269d652a994f5cdf4c1ee42bb7b28475dd0792192c299fd9bc3b45198c5b153dad00 +SHA512 (util-linux-2.42.tar.xz) = 909bba6c38d43ca4cb9bd974c399b4f0537b54709ac43e8acc823d9d9979fbc7523572469eb452b13c86116675d6d2ebb3764444781204f7e5bd0156252635d7 diff --git a/util-linux.spec b/util-linux.spec index f1f58a4..9809b9f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.41.3 +Version: 2.42 # -p -e rc1 Release: %autorelease -b7 License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -107,14 +107,6 @@ Provides: /usr/sbin/sfdisk Patch0: 0000-login-use-O_CREAT-on-lastlog.patch Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch -### Temporary dracut workaround -Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch - -# Upstream backports -Patch3: 0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch -Patch4: 0004-blkid-Drop-const-from-blkid_partitions_get_name.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -561,6 +553,7 @@ fi %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column +%{_bindir}/copyfilerange %{_bindir}/coresched %{_bindir}/eject %{_bindir}/enosys @@ -568,6 +561,7 @@ fi %{_bindir}/fallocate %{_bindir}/fincore %{_bindir}/fadvise +%{_bindir}/getino %{_bindir}/getopt %{_bindir}/hexdump %{_bindir}/irqtop @@ -617,6 +611,7 @@ fi %{_mandir}/man1/colcrt.1* %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* +%{_mandir}/man1/copyfilerange.1* %{_mandir}/man1/coresched.1.* %{_mandir}/man1/eject.1* %{_mandir}/man1/enosys.1* @@ -624,6 +619,7 @@ fi %{_mandir}/man1/fadvise.1* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/fincore.1* +%{_mandir}/man1/getino.1* %{_mandir}/man1/getopt.1* %{_mandir}/man1/hexdump.1* %{_mandir}/man1/irqtop.1* @@ -739,6 +735,7 @@ fi %{compldir}/colcrt %{compldir}/colrm %{compldir}/column +%{compldir}/copyfilerange %{compldir}/coresched %{compldir}/ctrlaltdel %{compldir}/delpart @@ -754,6 +751,7 @@ fi %{compldir}/fsck.minix %{compldir}/fsfreeze %{compldir}/fstrim +%{compldir}/getino %{compldir}/getopt %{compldir}/hexdump %{compldir}/irqtop @@ -987,10 +985,12 @@ fi %{_libdir}/pkgconfig/lastlog2.pc %{_mandir}/man3/lastlog2.3.* %{_mandir}/man3/ll2_import_lastlog.3* +%{_mandir}/man3/ll2_new_context.3* %{_mandir}/man3/ll2_read_all.3* %{_mandir}/man3/ll2_read_entry.3* %{_mandir}/man3/ll2_remove_entry.3* %{_mandir}/man3/ll2_rename_user.3* +%{_mandir}/man3/ll2_unref_context.3* %{_mandir}/man3/ll2_update_login_time.3* %{_mandir}/man3/ll2_write_entry.3* From f89132526858f8e537f7dd4d6ca729eb19e0c804 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 19 May 2026 13:29:13 +0200 Subject: [PATCH 418/425] upgrade to upstream release v2.42.1 - fix pam_lastlog2 libpam linking (rhbz#2453457) --- .gitignore | 1 + ...ix-libpam-linking-in-autotools-build.patch | 59 +++++++++++++++++++ sources | 2 +- util-linux.spec | 5 +- 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch diff --git a/.gitignore b/.gitignore index fa4f8f4..99b84c3 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ /util-linux-2.41.2.tar.xz /util-linux-2.41.3.tar.xz /util-linux-2.42.tar.xz +/util-linux-2.42.1.tar.xz diff --git a/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch b/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch new file mode 100644 index 0000000..375d025 --- /dev/null +++ b/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch @@ -0,0 +1,59 @@ +From 5549462c4d10e7b9c67d2cf4e99a7735770e816d Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 19 May 2026 10:54:57 +0200 +Subject: [PATCH] pam_lastlog2: fix libpam linking in autotools build + +Move -lpam from LDFLAGS to LIBADD. When -lpam is in LDFLAGS it +appears on the linker command line before object files, so the +--as-needed linker flag (default on Fedora) discards it before +seeing any undefined PAM symbols. This results in pam_lastlog2.so +missing libpam.so in its ELF NEEDED entries. + +The module then fails to load with dlopen() if the calling process +does not itself link against libpam (e.g., systemd in Fedora 44+): + + PAM unable to dlopen(pam_lastlog2.so): undefined symbol: pam_syslog + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2453457 +Signed-off-by: Karel Zak +(cherry picked from commit 5683ed6320e00205146cbb3d0c76462733530eca) +--- + Makefile.in | 4 ++-- + pam_lastlog2/src/Makemodule.am | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 1234567..abcdefg 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -7596,9 +7596,9 @@ + @BUILD_PAM_LASTLOG2_TRUE@ $(SOLIB_CFLAGS) \ + @BUILD_PAM_LASTLOG2_TRUE@ -I$(ul_liblastlog2_incdir) + +-@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la ++@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la -lpam + @BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) \ +-@BUILD_PAM_LASTLOG2_TRUE@ -lpam -module -avoid-version -shared \ ++@BUILD_PAM_LASTLOG2_TRUE@ -module -avoid-version -shared \ + @BUILD_PAM_LASTLOG2_TRUE@ $(am__append_609) + POMAN_PO_FILES = $(wildcard po-man/*.po) + @ENABLE_ASCIIDOC_TRUE@@ENABLE_POMAN_TRUE@PO_STAMPS = po4a-gen.stamp +diff --git a/pam_lastlog2/src/Makemodule.am b/pam_lastlog2/src/Makemodule.am +index 629930853..876171e9f 100644 +--- a/pam_lastlog2/src/Makemodule.am ++++ b/pam_lastlog2/src/Makemodule.am +@@ -11,9 +11,9 @@ pam_lastlog2_la_CFLAGS = \ + $(SOLIB_CFLAGS) \ + -I$(ul_liblastlog2_incdir) + +-pam_lastlog2_la_LIBADD = liblastlog2.la ++pam_lastlog2_la_LIBADD = liblastlog2.la -lpam + +-pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -lpam -module -avoid-version -shared ++pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -module -avoid-version -shared + if HAVE_VSCRIPT + pam_lastlog2_la_LDFLAGS += $(VSCRIPT_LDFLAGS),$(top_srcdir)/pam_lastlog2/src/pam_lastlog2.sym + endif +-- +2.52.0 + diff --git a/sources b/sources index 51a58d9..aaa0b65 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.42.tar.xz) = 909bba6c38d43ca4cb9bd974c399b4f0537b54709ac43e8acc823d9d9979fbc7523572469eb452b13c86116675d6d2ebb3764444781204f7e5bd0156252635d7 +SHA512 (util-linux-2.42.1.tar.xz) = 18dd2cfc353e389e4eeb37375473e7b3d0ab7fcd059a881d7cd0815ddcaa7b5795db92fcf56e531089267c8e69936c4fd3abd97786aa111b115996203aadbca2 diff --git a/util-linux.spec b/util-linux.spec index 9809b9f..7f000f7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,9 +1,9 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.42 +Version: 2.42.1 # -p -e rc1 -Release: %autorelease -b7 +Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -106,6 +106,7 @@ Provides: /usr/sbin/sfdisk ### Fedora specific patches Patch0: 0000-login-use-O_CREAT-on-lastlog.patch Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch +Patch2: 0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch %description The util-linux package contains a large variety of low-level system From ad160404f25800844ad14e6afad574c237c75942 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 19 May 2026 13:49:26 +0200 Subject: [PATCH 419/425] fix pam_lastlog2 patch to modify only Makefile.in --- ...ix-libpam-linking-in-autotools-build.patch | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch b/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch index 375d025..233a7f8 100644 --- a/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch +++ b/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch @@ -18,9 +18,8 @@ Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2453457 Signed-off-by: Karel Zak (cherry picked from commit 5683ed6320e00205146cbb3d0c76462733530eca) --- - Makefile.in | 4 ++-- - pam_lastlog2/src/Makemodule.am | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1234567..abcdefg 100644 @@ -38,22 +37,6 @@ index 1234567..abcdefg 100644 @BUILD_PAM_LASTLOG2_TRUE@ $(am__append_609) POMAN_PO_FILES = $(wildcard po-man/*.po) @ENABLE_ASCIIDOC_TRUE@@ENABLE_POMAN_TRUE@PO_STAMPS = po4a-gen.stamp -diff --git a/pam_lastlog2/src/Makemodule.am b/pam_lastlog2/src/Makemodule.am -index 629930853..876171e9f 100644 ---- a/pam_lastlog2/src/Makemodule.am -+++ b/pam_lastlog2/src/Makemodule.am -@@ -11,9 +11,9 @@ pam_lastlog2_la_CFLAGS = \ - $(SOLIB_CFLAGS) \ - -I$(ul_liblastlog2_incdir) - --pam_lastlog2_la_LIBADD = liblastlog2.la -+pam_lastlog2_la_LIBADD = liblastlog2.la -lpam - --pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -lpam -module -avoid-version -shared -+pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -module -avoid-version -shared - if HAVE_VSCRIPT - pam_lastlog2_la_LDFLAGS += $(VSCRIPT_LDFLAGS),$(top_srcdir)/pam_lastlog2/src/pam_lastlog2.sym - endif -- 2.52.0 From 49c5ecdbfba0787839a9f956c9edc14ff6732a03 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 May 2026 10:28:46 +0200 Subject: [PATCH 420/425] make util-linux-i18n noarch (rhbz#2453891) --- util-linux.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux.spec b/util-linux.spec index 7f000f7..d22ef6c 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -315,6 +315,7 @@ mountinfo, etc) and mount filesystems. Summary: Internationalization pack for util-linux Requires: util-linux = %{version}-%{release} License: GPL-2.0-or-later +BuildArch: noarch %description -n util-linux-i18n Internationalization pack with translated messages and manual pages for From 62e94b8fcbad1c982cb623aee26d7e00838bf4d9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 May 2026 11:07:37 +0200 Subject: [PATCH 421/425] revert util-linux-i18n noarch (rhbz#2453891) --- util-linux.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index d22ef6c..7f000f7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -315,7 +315,6 @@ mountinfo, etc) and mount filesystems. Summary: Internationalization pack for util-linux Requires: util-linux = %{version}-%{release} License: GPL-2.0-or-later -BuildArch: noarch %description -n util-linux-i18n Internationalization pack with translated messages and manual pages for From e20697608b0484e6be54a7368c5e178f2457d9ff Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 3 Jun 2026 17:43:18 +0200 Subject: [PATCH 422/425] Rebuilt for Python 3.15 From d3c879ee069eb7fcc931120f4bc72b5b43b1ce95 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Jun 2026 14:54:51 +0200 Subject: [PATCH 423/425] upgrade to upstream release v2.42.2 --- .gitignore | 1 + ...ix-libpam-linking-in-autotools-build.patch | 42 ------------------- sources | 2 +- util-linux.spec | 3 +- 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch diff --git a/.gitignore b/.gitignore index 99b84c3..15c7c05 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ /util-linux-2.41.3.tar.xz /util-linux-2.42.tar.xz /util-linux-2.42.1.tar.xz +/util-linux-2.42.2.tar.xz diff --git a/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch b/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch deleted file mode 100644 index 233a7f8..0000000 --- a/0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5549462c4d10e7b9c67d2cf4e99a7735770e816d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 19 May 2026 10:54:57 +0200 -Subject: [PATCH] pam_lastlog2: fix libpam linking in autotools build - -Move -lpam from LDFLAGS to LIBADD. When -lpam is in LDFLAGS it -appears on the linker command line before object files, so the ---as-needed linker flag (default on Fedora) discards it before -seeing any undefined PAM symbols. This results in pam_lastlog2.so -missing libpam.so in its ELF NEEDED entries. - -The module then fails to load with dlopen() if the calling process -does not itself link against libpam (e.g., systemd in Fedora 44+): - - PAM unable to dlopen(pam_lastlog2.so): undefined symbol: pam_syslog - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2453457 -Signed-off-by: Karel Zak -(cherry picked from commit 5683ed6320e00205146cbb3d0c76462733530eca) ---- - Makefile.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 1234567..abcdefg 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -7596,9 +7596,9 @@ - @BUILD_PAM_LASTLOG2_TRUE@ $(SOLIB_CFLAGS) \ - @BUILD_PAM_LASTLOG2_TRUE@ -I$(ul_liblastlog2_incdir) - --@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la -+@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la -lpam - @BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) \ --@BUILD_PAM_LASTLOG2_TRUE@ -lpam -module -avoid-version -shared \ -+@BUILD_PAM_LASTLOG2_TRUE@ -module -avoid-version -shared \ - @BUILD_PAM_LASTLOG2_TRUE@ $(am__append_609) - POMAN_PO_FILES = $(wildcard po-man/*.po) - @ENABLE_ASCIIDOC_TRUE@@ENABLE_POMAN_TRUE@PO_STAMPS = po4a-gen.stamp --- -2.52.0 - diff --git a/sources b/sources index aaa0b65..8420d1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.42.1.tar.xz) = 18dd2cfc353e389e4eeb37375473e7b3d0ab7fcd059a881d7cd0815ddcaa7b5795db92fcf56e531089267c8e69936c4fd3abd97786aa111b115996203aadbca2 +SHA512 (util-linux-2.42.2.tar.xz) = 7415add0be2930654e322830808dde03ff6d511bd357f0679e6b6287a13ca79fe58ce4ac05edef86b76fb381b3a36ca2da9d3c31b5dc0a1d889c203156a57277 diff --git a/util-linux.spec b/util-linux.spec index 7f000f7..d92cb07 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.42.1 +Version: 2.42.2 # -p -e rc1 Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -106,7 +106,6 @@ Provides: /usr/sbin/sfdisk ### Fedora specific patches Patch0: 0000-login-use-O_CREAT-on-lastlog.patch Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch -Patch2: 0002-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch %description The util-linux package contains a large variety of low-level system From 9213a0ec8f2e3348008b124ea36bb7be3d88c745 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:18:23 +0000 Subject: [PATCH 424/425] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From a0317f94b5e9504715995fb11d8e8555737683cf Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 22 Jul 2026 10:16:14 +0200 Subject: [PATCH 425/425] Rebuilt for Python 3.15.0b4 ABI change