From: Arkadiusz Miśkiewicz Date: Wed, 5 Sep 2012 18:06:38 +0000 (+0200) Subject: - up to 2.22 (TODO: fix initrd build; remove su/sulogin/utmpdump from sysvinit) X-Git-Tag: auto/th/util-linux-2.22.1-1~9 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=4fa9d82403e4ee867b94b604b5fac374bc535b8c;p=packages%2Futil-linux.git - up to 2.22 (TODO: fix initrd build; remove su/sulogin/utmpdump from sysvinit) --- diff --git a/util-linux-diet.patch b/util-linux-diet.patch index 6e1930a..b027ee0 100644 --- a/util-linux-diet.patch +++ b/util-linux-diet.patch @@ -73,17 +73,17 @@ --- util-linux-2.19/misc-utils/findmnt.c~ 2011-01-31 16:43:47.000000000 +0100 +++ util-linux-2.19/misc-utils/findmnt.c 2011-02-10 20:54:23.100130391 +0100 @@ -30,6 +30,9 @@ - #endif - #include #include + #include + #include +#ifdef __dietlibc__ +#include /* for major and minor macros */ +#endif #include ---- util-linux-2.19/fsck/fsck.c~ 2011-02-07 16:19:29.000000000 +0100 -+++ util-linux-2.19/fsck/fsck.c 2011-02-10 21:09:27.024658725 +0100 +--- util-linux-2.19/disk-utils/fsck.c~ 2011-02-07 16:19:29.000000000 +0100 ++++ util-linux-2.19/disk-utils/fsck.c 2011-02-10 21:09:27.024658725 +0100 @@ -270,7 +270,13 @@ if (verbose) printf(_("Locking disk %s ... "), diskname); @@ -101,15 +101,22 @@ --- util-linux-2.21/configure.ac~ 2012-02-24 12:53:35.000000000 +0200 +++ util-linux-2.21/configure.ac 2012-03-05 21:03:25.833675080 +0200 -@@ -263,6 +263,8 @@ +@@ -311,6 +311,7 @@ lchown \ llseek \ lseek64 \ + mkostemp \ + nanosleep \ + personality \ + posix_fadvise \ +@@ -330,6 +331,7 @@ + usleep \ + warn \ + warnx \ + versionsort \ - scandirat \ - strtoull \ - sysconf \ + ]) + AC_FUNC_FSEEKO + --- util-linux-2.19/misc-utils/findfs.c~ 2011-01-31 16:43:47.000000000 +0100 +++ util-linux-2.19/misc-utils/findfs.c 2011-02-10 22:24:39.615735924 +0100 @@ -12,6 +12,7 @@ @@ -120,16 +127,6 @@ #include "nls.h" static void __attribute__((__noreturn__)) usage(int rc) ---- util-linux-2.19/term-utils/scriptreplay.c~ 2011-01-31 16:43:47.000000000 +0100 -+++ util-linux-2.19/term-utils/scriptreplay.c 2011-02-10 22:26:22.019069258 +0100 -@@ -28,6 +28,7 @@ - #include - #include - -+#include "c.h" - #include "nls.h" - - #define SCRIPT_MIN_DELAY 0.0001 /* from original sripreplay.pl */ --- util-linux-2.21/libmount/src/tab_parse.c~ 2012-03-05 21:00:14.000000000 +0200 +++ util-linux-2.21/libmount/src/tab_parse.c 2012-03-05 21:05:27.562569076 +0200 @@ -524,7 +524,13 @@ diff --git a/util-linux-ng-union-mount.patch b/util-linux-ng-union-mount.patch index aa5096d..74e9019 100644 --- a/util-linux-ng-union-mount.patch +++ b/util-linux-ng-union-mount.patch @@ -18,10 +18,10 @@ ftp://ftp.suse.com/pub/people/jblunck/union-mount/util-linux-2.13-union_mount.di mount/mount_constants.h | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) -diff --git a/mount/mount.c b/mount/mount.c +diff --git a/mount-deprecated/mount.c b/mount-deprecated/mount.c index 9cbc466..9bf766b 100644 ---- a/mount/mount.c -+++ b/mount/mount.c +--- a/mount-deprecated/mount.c ++++ b/mount-deprecated/mount.c @@ -138,6 +138,7 @@ static const struct opt_map opt_map[] = { { "sync", 0, 0, MS_SYNCHRONOUS}, /* synchronous I/O */ { "async", 0, 1, MS_SYNCHRONOUS}, /* asynchronous I/O */ @@ -48,10 +48,10 @@ index 9cbc466..9bf766b 100644 case '?': default: -diff --git a/mount/mount_constants.h b/mount/mount_constants.h +diff --git a/mount-deprecated/mount_constants.h b/mount-deprecated/mount_constants.h index dc3ca27..fb4c663 100644 ---- a/mount/mount_constants.h -+++ b/mount/mount_constants.h +--- a/mount-deprecated/mount_constants.h ++++ b/mount-deprecated/mount_constants.h @@ -39,6 +39,9 @@ flags had been set; if we have a union with more than one element - fail; if we have a stack or plain mount - mount atop of it, forming a stack. */ #define MS_OVER 0x200 /* 512 */ diff --git a/util-linux-procpartitions.patch b/util-linux-procpartitions.patch index b742f65..76e5a5a 100644 --- a/util-linux-procpartitions.patch +++ b/util-linux-procpartitions.patch @@ -22,8 +22,8 @@ drastic as it doesn't bail out like fsck does. while (fgets(line, sizeof(line), procpt)) { if (sscanf (line, " %d %d %d %[^\n ]", ---- util-linux-ng-2.17.2/fdisk/fdisk.c.orig 2010-03-22 09:21:34.000000000 +0100 -+++ util-linux-ng-2.17.2/fdisk/fdisk.c 2010-05-09 12:31:53.050933394 +0200 +--- util-linux-ng-2.17.2/fdisks/fdisk.c.orig 2010-03-22 09:21:34.000000000 +0100 ++++ util-linux-ng-2.17.2/fdisks/fdisk.c 2010-05-09 12:31:53.050933394 +0200 @@ -2844,12 +2844,14 @@ char line[128], ptname[128], devname[256]; int ma, mi; diff --git a/util-linux-swaponsymlink.patch b/util-linux-swaponsymlink.patch deleted file mode 100644 index a5200c6..0000000 --- a/util-linux-swaponsymlink.patch +++ /dev/null @@ -1,28 +0,0 @@ -When swap is a symlink, the swap entry in -/etc/fstab may not match /proc/swaps. That -means strcmp shouldn't be used for swapon. - ---- util-linux-2.12p/sys-utils/swapon.c.sopwith Wed Dec 22 04:50:19 2004 -+++ util-linux-2.12p/sys-utils/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.spec b/util-linux.spec index 1dab244..2524d55 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,6 +1,10 @@ # TODO -# /usr/share/getopt/getopt-parse.bash -# /usr/share/getopt/getopt-parse.tcsh +# - unpackaged files: +# /usr/share/getopt/getopt-parse.bash +# /usr/share/getopt/getopt-parse.tcsh +# - fix initrd build +# - some sysvinit binaries moved here: su(1):, sulogin(8), +# utmpdump(1): - has been merged from coreutils into util-linux # # Conditional build: %bcond_with uClibc # link initrd version with static glibc instead of uClibc @@ -32,12 +36,12 @@ Summary(ru.UTF-8): Набор базовых системных утилит д Summary(tr.UTF-8): Temel sistem araçları Summary(uk.UTF-8): Набір базових системних утиліт для Linux Name: util-linux -Version: 2.21.2 -Release: 3 +Version: 2.22 +Release: 0.1 License: GPL Group: Applications/System -Source0: https://www.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.xz -# Source0-md5: 54ba880f1d66782c2287ee2c898520e9 +Source0: https://www.kernel.org/pub/linux/utils/util-linux/v2.22/%{name}-%{version}.tar.xz +# Source0-md5: ba2d8cc12a937231c80a04f7f7149303 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 # Source1-md5: 3c940c7e7fe699eaa2ddb1bffb3de2fe Source2: login.pamd @@ -51,7 +55,7 @@ Patch4: %{name}-fhs.patch Patch5: %{name}-hotkeys.patch Patch7: %{name}-login-lastlog.patch Patch8: %{name}-procpartitions.patch -Patch9: %{name}-swaponsymlink.patch + Patch10: %{name}-diet.patch Patch11: no-openat.patch URL: http://userweb.kernel.org/~kzak/util-linux/ @@ -89,10 +93,12 @@ BuildRequires: glibc-static %endif Requires: libblkid = %{version}-%{release} Requires: pam >= %{pam_ver} +Provides: eject = %{version}-%{release} Provides: fdisk Provides: linux32 Provides: sparc32 Obsoletes: cramfs +Obsoletes: eject Obsoletes: ionice Obsoletes: linux32 Obsoletes: rawdevices @@ -527,7 +533,9 @@ Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupmod Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/usermod +Requires(post,preun,postun): systemd-units >= 38 Requires: libuuid = %{version}-%{release} +Requires: systemd-units >= 38 Provides: group(uuidd) Provides: user(uuidd) Conflicts: libuuid < 1.40.5-0.1 @@ -627,14 +635,14 @@ etykietę lub UUID - statycznie skonsolidowane na potrzeby initrd. %prep %setup -q -a1 -%patch0 -p1 +#%patch0 -p1 %patch1 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 + %patch10 -p1 %if %{without partx} %patch11 -p1 @@ -664,14 +672,21 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE %endif --disable-shared \ --enable-static \ + --disable-libblkid \ --disable-fsck \ --disable-cramfs \ --disable-raw \ --disable-libmount \ - --disable-login-utils \ + --disable-su \ + --disable-sulogin \ + --disable-chfn-chsh \ + --disable-login \ + --disable-newgrp \ + --disable-vipw \ --disable-schedutils \ --disable-silent-rules \ --disable-use-tty-group \ + --disable-utmpdump \ --disable-wall \ --without-audit \ --without-ncurses \ @@ -680,8 +695,6 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE # configure gets it unconditionally wrong %{__sed} -i -e 's/#define HAVE_WIDECHAR 1//' config.h -%{__sed} -i -e 's/ cal\$(EXEEXT) / /; s/ lsblk\$(EXEEXT)//' misc-utils/Makefile - for dir in libblkid libuuid disk-utils misc-utils fsck fdisk schedutils hwclock; do %{__make} -C $dir \ %if %{with uClibc} @@ -705,11 +718,19 @@ done --disable-silent-rules \ --disable-use-tty-group \ --disable-wall \ + --enable-su \ + --enable-sulogin \ + --enable-utmpdump \ + --enable-libblkid \ + --enable-chkdupexe \ --enable-ddate \ + --enable-chfn-chsh \ + --enable-login \ + --enable-newgrp \ + --enable-vipw \ --enable-line \ --enable-kill \ --enable-login-chown-vcs \ - --enable-login-utils \ --enable-partx \ --enable-write \ --with-audit \ @@ -884,6 +905,8 @@ fi %attr(755,root,root) /bin/dmesg %attr(755,root,root) /bin/kill %attr(755,root,root) /bin/more +%attr(755,root,root) /bin/su +%attr(755,root,root) /bin/wdctl %attr(755,root,root) /sbin/chcpu %attr(755,root,root) /sbin/ctrlaltdel @@ -897,6 +920,7 @@ fi %attr(755,root,root) /sbin/fstrim %attr(755,root,root) /sbin/mkfs %attr(755,root,root) /sbin/mkswap +%attr(755,root,root) /sbin/sulogin %attr(755,root,root) /sbin/swaplabel %if "%{pld_release}" != "ac" %attr(755,root,root) /sbin/switch_root @@ -910,6 +934,7 @@ fi %attr(755,root,root) %{_bindir}/column %attr(755,root,root) %{_bindir}/cytune %attr(755,root,root) %{_bindir}/ddate +%attr(755,root,root) %{_bindir}/eject %attr(755,root,root) %{_bindir}/flock %{?with_fallocate:%attr(755,root,root) %{_bindir}/fallocate} %attr(755,root,root) %{_bindir}/getopt @@ -923,6 +948,7 @@ fi %attr(755,root,root) %{_bindir}/logger %attr(755,root,root) %{_bindir}/look %attr(755,root,root) %{_bindir}/lscpu +%attr(755,root,root) %{_bindir}/lslocks %attr(755,root,root) %{_bindir}/mcookie %attr(755,root,root) %{_bindir}/namei %attr(755,root,root) %{_bindir}/pg @@ -939,11 +965,13 @@ fi %attr(755,root,root) %{_bindir}/taskset %attr(755,root,root) %{_bindir}/ul %attr(755,root,root) %{_bindir}/unshare +%attr(755,root,root) %{_bindir}/utmpdump %attr(755,root,root) %{_bindir}/whereis %attr(2755,root,tty) %{_bindir}/write %attr(755,root,root) %{_sbindir}/fdformat %attr(755,root,root) %{_sbindir}/ldattach %attr(755,root,root) %{_sbindir}/readprofile +%attr(755,root,root) %{_sbindir}/resizepart %attr(755,root,root) %{_sbindir}/rtcwake %{_mandir}/man1/cal.1* @@ -954,6 +982,7 @@ fi %{_mandir}/man1/column.1* %{_mandir}/man1/ddate.1* %{_mandir}/man1/dmesg.1* +%{_mandir}/man1/eject.1* %{?with_fallocate:%{_mandir}/man1/fallocate.1*} %{_mandir}/man1/flock.1* %{_mandir}/man1/getopt.1* @@ -983,6 +1012,7 @@ fi %{_mandir}/man1/taskset.1* %{_mandir}/man1/ul.1* %{_mandir}/man1/unshare.1* +%{_mandir}/man1/utmpdump.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* %if %{with partx} @@ -999,14 +1029,18 @@ fi %{_mandir}/man8/fstrim.8* %{_mandir}/man8/isosize.8* %{_mandir}/man8/ldattach.8* +%{_mandir}/man8/lslocks.8* %{_mandir}/man8/mkswap.8* %{_mandir}/man8/raw.8* %{_mandir}/man8/readprofile.8* +%{_mandir}/man8/resizepart.8* %{_mandir}/man8/rtcwake.8* %{_mandir}/man8/swaplabel.8* %if "%{pld_release}" != "ac" %{_mandir}/man8/switch_root.8* %endif +%{_mandir}/man8/sulogin.8* +%{_mandir}/man8/wdctl.8* %{_mandir}/man8/wipefs.8* %lang(de) %{_mandir}/de/man1/kill.1* @@ -1407,6 +1441,8 @@ fi %attr(6755,uuidd,uuidd) %{_sbindir}/uuidd %attr(2775,uuidd,uuidd) /var/lib/libuuid %{_mandir}/man8/uuidd.8* +%{systemdunitdir}/uuidd.service +%{systemdunitdir}/uuidd.socket %files -n libmount %defattr(644,root,root,755)