From 9c657ad4d7866f46c44169324b4cf4701afb3863afbeaab413f5fe8eba2447a4 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Mon, 29 Jan 2018 16:19:06 +0000 Subject: [PATCH] Accepting request 570667 from home:sbrabec:branches:util-linux-2.31.1 - Update to version 2.31.1: * blkid: Add support for LUKS2 and new LABEL attributes. * move rfkill to /usr/sbin (boo#1076134). * fsck.cramfs: Fix bus error on broken file system. * hwclock: add iso-8601 overflow check * libmount: * Allow MNT_FORCE and MNT_DETACH at umount * add nsfs between pseudo filesystems * lscpu: Treat read failure on Xen Hypervisor properties as non-fatal * sha1: endian fixes (affects util_linux_bigendian.patch) * documentation updates * other fixes and improvements - Fix regressions in 2.31.1: * sha1 on s390* (update util_linux_bigendian.patch). * fsck.cramfs on ppc64le (util-linux-cramfs.patch). OBS-URL: https://build.opensuse.org/request/show/570667 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=361 --- python-libmount.changes | 20 ++ python-libmount.spec | 12 +- rfkill-block@.service | 2 +- rfkill-unblock@.service | 2 +- util-linux-2.31.1.tar.sign | 16 ++ util-linux-2.31.1.tar.xz | 3 + util-linux-2.31.tar.sign | 16 -- util-linux-2.31.tar.xz | 3 - util-linux-cramfs.patch | 406 +++++++++++++++++++++++++++++++++++++ util-linux-systemd.changes | 20 ++ util-linux-systemd.spec | 9 +- util-linux.changes | 20 ++ util-linux.spec | 9 +- util_linux_bigendian.patch | 195 ++---------------- 14 files changed, 525 insertions(+), 208 deletions(-) create mode 100644 util-linux-2.31.1.tar.sign create mode 100644 util-linux-2.31.1.tar.xz delete mode 100644 util-linux-2.31.tar.sign delete mode 100644 util-linux-2.31.tar.xz create mode 100644 util-linux-cramfs.patch diff --git a/python-libmount.changes b/python-libmount.changes index 79db2f4..d19368a 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Jan 29 16:39:59 CET 2018 - sbrabec@suse.com + +- Update to version 2.31.1: + * blkid: Add support for LUKS2 and new LABEL attributes. + * move rfkill to /usr/sbin (boo#1076134). + * fsck.cramfs: Fix bus error on broken file system. + * hwclock: add iso-8601 overflow check + * libmount: + * Allow MNT_FORCE and MNT_DETACH at umount + * add nsfs between pseudo filesystems + * lscpu: Treat read failure on Xen Hypervisor properties as + non-fatal + * sha1: endian fixes (affects util_linux_bigendian.patch) + * documentation updates + * other fixes and improvements +- Fix regressions in 2.31.1: + * sha1 on s390* (update util_linux_bigendian.patch). + * fsck.cramfs on ppc64le (util-linux-cramfs.patch). + ------------------------------------------------------------------- Sun Jan 21 20:15:00 UTC 2018 - jengelh@inai.de diff --git a/python-libmount.spec b/python-libmount.spec index 9ad81b7..2dd0b95 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -73,7 +73,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %group_pl +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.31 +Version: 2.31.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -166,6 +166,8 @@ Patch2: util-linux-lsmem-memory-zone-2.patch Patch3: util-linux-lsmem-memory-zone-3.patch # Add four commits from upstream to pass tests on ppc64 Patch4: util_linux_bigendian.patch +# PATCH-FIX-UPSTREAM util-linux-cramfs.patch sbrabec@suse.com -- Fix fsck.cramfs failure on ppc64le. +Patch5: util-linux-cramfs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -390,7 +392,6 @@ SMP systems. %if %build_util_linux %package -n python-libmount Summary: %summary_pl -License: GPL-2.0+ Group: %group_pl %description -n python-libmount @@ -408,6 +409,7 @@ library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -645,7 +647,6 @@ make install DEST=%{buildroot} popd install -Dm644 %{SOURCE41} %{buildroot}%{_unitdir}/rfkill-block@.service install -Dm644 %{SOURCE42} %{buildroot}%{_unitdir}/rfkill-unblock@.service -ln -s "../bin/rfkill" %{buildroot}%{_sbindir}/rfkill %endif # # util-linux install @@ -985,8 +986,6 @@ getent passwd uuidd >/dev/null || \ %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev -%{_bindir}/rfkill -%{_sbindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -1037,6 +1036,7 @@ getent passwd uuidd >/dev/null || \ %{_sbindir}/raw %{_sbindir}/rcraw %{_sbindir}/resizepart +%{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/setctsid diff --git a/rfkill-block@.service b/rfkill-block@.service index 4292a69..4c807df 100644 --- a/rfkill-block@.service +++ b/rfkill-block@.service @@ -4,7 +4,7 @@ After=rfkill-unblock@all.service [Service] Type=oneshot -ExecStart=/usr/bin/rfkill block %I +ExecStart=/usr/sbin/rfkill block %I [Install] WantedBy=multi-user.target diff --git a/rfkill-unblock@.service b/rfkill-unblock@.service index b2f447e..760d705 100644 --- a/rfkill-unblock@.service +++ b/rfkill-unblock@.service @@ -4,7 +4,7 @@ After=rfkill-block@all.service [Service] Type=oneshot -ExecStart=/usr/bin/rfkill unblock %I +ExecStart=/usr/sbin/rfkill unblock %I [Install] WantedBy=multi-user.target diff --git a/util-linux-2.31.1.tar.sign b/util-linux-2.31.1.tar.sign new file mode 100644 index 0000000..a84d188 --- /dev/null +++ b/util-linux-2.31.1.tar.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAlo5LQkACgkQ5LcdXuw5 +woSyww//djBJmPc3Jvy7eJSVjC3xbFgro7wHaAM0BSFYgiW1aSsR04sSwGIEMtbv +EMOyF83qVKSoiWb57VOeJGSCWXUPkMPaTzretEyaD5IH3rHBDp7Q5oTUMlNmLnoT +q86oYBKNXox5bbLHPqpQaLUGGJWIjz9suRtT1Uau+ZKRudO3f9YZCJBnCkqTpqX+ +7TqPK53Gen1jw3u7kz1CRDMsTllfV1Gw+hhq8YI/xPApTLRIcBWq9DUVu9v5PHjQ +M8rh9d3693mgkhtPQAGShKpC8nz0013AOG8bJm0yL69YWlVdhFDR2DColxZE1nEe +3T7aZPZCseObHR1rqMUngKMD6B6D7XPfexWuWXRHgr7Aayz6S/IOYTvTjtBkgNri +KJ+QDn/6Xs5xTsWu6wSh7wXfjtwk7NuLY1pVo9pL3r4KmfIBbODwE80FKSqCwHJm +kI7J2QIiaKGWfry6vqrUgECGY48f1W0PNfgCbdJDW1HsVCvTaUiXfIc++HTxgxpv +6IcU1a4ikVT9zRMVE5ypgZPIkwSaGJgeV1YwCa9qanM3dx86D/DTzLVdr/Nhvn96 +uPdp287aebllU+O1QK/79q5pf/UcBofgNc9GsVgtqlKNYN+REuoqYsDQ/Sz12kor +SdF/tR3qtdTucdD/4fUcF2Uv8RLmc4cknZdz37ld6q0TSeyZShE= +=uflt +-----END PGP SIGNATURE----- diff --git a/util-linux-2.31.1.tar.xz b/util-linux-2.31.1.tar.xz new file mode 100644 index 0000000..005e472 --- /dev/null +++ b/util-linux-2.31.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a51b16fa9cd51d26ef9ab52d2f1de12403b810fc8252bf7d478df91b3cddf11 +size 4510096 diff --git a/util-linux-2.31.tar.sign b/util-linux-2.31.tar.sign deleted file mode 100644 index 732793b..0000000 --- a/util-linux-2.31.tar.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAlnoipIACgkQ5LcdXuw5 -woSnthAAhqdxus2J9uxERU1JwMJxiDpjwZnRR3NFHvBlY04maoaniAsVlQG8uWWr -xE13jVkiG2hc+llt4UhDJA3sT0Hz1elNOKJD6fsZ598fptTYvF3fqLjstuJGCVyF -hDio8lqAqurnpX3jtyG0tNrT3CVIUU2jrTq9QXqpB8jq699ez8xulMdU+VEqmbOg -E5i5skWxfnaYxleXN8WkV+5WZx2tczWufLqVbLcUE7bOUyiEAubmXhbm9xgOJ8pX -cUrOverbfvopZYlIUB44UcNYyWsj12r7/aIQBh2q6xmv5wOOAiZzFMBh4eZu07vc -jZFKv2GYxVBU+e/1ERH0x4xbxCRXV9l1G9+V/H9GSbGCHK0+/0r7MzXf+QiADowx -YkqROTvfTagNVPBbzU0pNeTsQs+AZg49JhTcCBVtk1yxufOK3BuRqU5PtuDBQCw4 -u8Z/kkZSdaOexJeaBJDhHEvPTCkAUBcuppU9tJ8dZ+3Orpdb8ghbBOxS3VUKIHn5 -FAnaC7OLPPB2uBTKrG5JH+mUnXCTYfctEPB3D/Rnjsyjs+T8h6zf5cnQ6NFvXPxw -xm8FA3bcKvdSVcLwqFQLkvORfy1/Ju53HRDABSDLe4yjTUi8oAj4hqbR607/XPMA -ZYBRRZntdKNLcrQUjnawjaExXcR2oACocaZ8Ul+mpaXsmjKIEc8= -=u6TW ------END PGP SIGNATURE----- diff --git a/util-linux-2.31.tar.xz b/util-linux-2.31.tar.xz deleted file mode 100644 index 5272549..0000000 --- a/util-linux-2.31.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9be7cdcf4fc5c5064a226599acdda6bdf3d86c640152ba01ea642d91108dc8a -size 4503892 diff --git a/util-linux-cramfs.patch b/util-linux-cramfs.patch new file mode 100644 index 0000000..fd3a008 --- /dev/null +++ b/util-linux-cramfs.patch @@ -0,0 +1,406 @@ +commit 68ac426949170bb3802a6d610f366f24aa0bb734 +Author: Ruediger Meier +Date: Tue Jan 23 16:59:25 2018 +0100 + + fsck.cramfs: fix error message + + errno is invalid in case that we just read(3) too short. + + Signed-off-by: Ruediger Meier + +commit c990f94cbcc68c7bab47458a09e361ce0791b6d8 +Author: Ruediger Meier +Date: Tue Jan 23 16:59:24 2018 +0100 + + tests: rewrite fsck-bad-header + + Fix test for systems with pagesize != 4096 + Loop over many combinations of sizes, endianness and blocksizes. + + Signed-off-by: Ruediger Meier + +commit 2374b1ab75c66c9ecea86fc97abb6d6c048bcf45 +Author: Ruediger Meier +Date: Tue Jan 23 16:59:23 2018 +0100 + + fsck.cramfs: fix crash when superblock size is too small + + This hopefully fixes the original problem addressed by the reverted + patch 7cb962c7. + + The bug was introduced by myself in + f991dbd3 "fsck.cramfs: allow smaller superblock sizes" + + CC: Tobias Stoeckmann + Signed-off-by: Ruediger Meier + +commit 919e372da872bcc37502783e80564654569edb22 +Author: Ruediger Meier +Date: Tue Jan 23 16:59:22 2018 +0100 + + Revert "fsck.cramfs: Fix bus error on broken file system." + + This reverts commit 7cb962c77015e9383b53eeb22ce732cb5216bbc3. + + It can't be right that we mmap (start + super.size) bytes from a file + which is usually only super.size bytes large. The patch "fixed" a + problem when super.size is bad but now it fails for the correct case: + + $ mkdir -p root/subdir + $ ./mkfs.cramfs -p root cramfs + $ ./fsck.cramfs cramfs + Bus error (core dumped) + + We will fix the original problem later. + + CC: Tobias Stoeckmann + Signed-off-by: Ruediger Meier + +diff -urN util-linux-2.31.1.orig/disk-utils/fsck.cramfs.c util-linux-2.31.1/disk-utils/fsck.cramfs.c +--- util-linux-2.31.1.orig/disk-utils/fsck.cramfs.c 2017-12-14 15:26:35.141144200 +0100 ++++ util-linux-2.31.1/disk-utils/fsck.cramfs.c 2018-01-26 18:41:01.001095311 +0100 +@@ -192,7 +192,7 @@ + errx(FSCK_EX_ERROR, _("unsupported filesystem features")); + + /* What are valid superblock sizes? */ +- if (super.size < sizeof(struct cramfs_super)) ++ if (super.size < *start + sizeof(struct cramfs_super)) + errx(FSCK_EX_UNCORRECTED, _("superblock size (%d) too small"), + super.size); + +@@ -220,24 +220,28 @@ + crc = crc32(0L, NULL, 0); + + buf = +- mmap(NULL, start + super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ++ mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); + if (buf == MAP_FAILED) { + buf = +- mmap(NULL, start + super.size, PROT_READ | PROT_WRITE, ++ mmap(NULL, super.size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (buf != MAP_FAILED) { +- if (lseek(fd, start, SEEK_SET) == (off_t) -1) ++ ssize_t tmp; ++ if (lseek(fd, 0, SEEK_SET) == (off_t) -1) + err(FSCK_EX_ERROR, _("seek on %s failed"), filename); +- if (read(fd, (unsigned char *) buf + start, super.size) != +- (ssize_t) super.size) ++ tmp = read(fd, buf, super.size); ++ if (tmp < 0) + err(FSCK_EX_ERROR, _("cannot read %s"), filename); ++ if (tmp != (ssize_t) super.size) ++ errx(FSCK_EX_ERROR, _("failed to read %"PRIu32" bytes from file %s"), ++ super.size, filename); + } + } + if (buf != MAP_FAILED) { + ((struct cramfs_super *)((unsigned char *) buf + start))->fsid.crc = + crc32(0L, NULL, 0); +- crc = crc32(crc, (unsigned char *) buf + start, super.size); +- munmap(buf, start + super.size); ++ crc = crc32(crc, (unsigned char *) buf + start, super.size - start); ++ munmap(buf, super.size); + } else { + int retval; + size_t length = 0; +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header 2017-12-14 15:26:46.585066844 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header 1970-01-01 01:00:00.000000000 +0100 +@@ -1,2 +0,0 @@ +-fsck.cramfs: file extends past end of filesystem +-fsck.cramfs: crc error +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-nopad-4K-be util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-nopad-4K-be +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-nopad-4K-be 1970-01-01 01:00:00.000000000 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-nopad-4K-be 2018-01-26 18:40:57.401031690 +0100 +@@ -0,0 +1,29 @@ ++## size: 0 ++fsck.cramfs: superblock size (0) too small ++ret: 4 ++ ++## size: 75 ++fsck.cramfs: superblock size (75) too small ++ret: 4 ++ ++## size: 76 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4095 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4096 ++ret: 0 ++ ++## size: 4097 ++fsck.cramfs: file length too short ++ret: 4 ++ ++## size: 4294967295 ++fsck.cramfs: file length too short ++ret: 4 ++ +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-nopad-4K-le util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-nopad-4K-le +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-nopad-4K-le 1970-01-01 01:00:00.000000000 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-nopad-4K-le 2018-01-26 18:40:57.401031690 +0100 +@@ -0,0 +1,29 @@ ++## size: 0 ++fsck.cramfs: superblock size (0) too small ++ret: 4 ++ ++## size: 75 ++fsck.cramfs: superblock size (75) too small ++ret: 4 ++ ++## size: 76 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4095 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4096 ++ret: 0 ++ ++## size: 4097 ++fsck.cramfs: file length too short ++ret: 4 ++ ++## size: 4294967295 ++fsck.cramfs: file length too short ++ret: 4 ++ +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-4K-be util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-4K-be +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-4K-be 1970-01-01 01:00:00.000000000 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-4K-be 2018-01-26 18:40:57.401031690 +0100 +@@ -0,0 +1,29 @@ ++## size: 76 ++fsck.cramfs: superblock size (76) too small ++ret: 4 ++ ++## size: 587 ++fsck.cramfs: superblock size (587) too small ++ret: 4 ++ ++## size: 588 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4095 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4096 ++ret: 0 ++ ++## size: 4097 ++fsck.cramfs: file length too short ++ret: 4 ++ ++## size: 4294967295 ++fsck.cramfs: file length too short ++ret: 4 ++ +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-4K-le util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-4K-le +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-4K-le 1970-01-01 01:00:00.000000000 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-4K-le 2018-01-26 18:40:57.401031690 +0100 +@@ -0,0 +1,29 @@ ++## size: 76 ++fsck.cramfs: superblock size (76) too small ++ret: 4 ++ ++## size: 587 ++fsck.cramfs: superblock size (587) too small ++ret: 4 ++ ++## size: 588 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4095 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 4096 ++ret: 0 ++ ++## size: 4097 ++fsck.cramfs: file length too short ++ret: 4 ++ ++## size: 4294967295 ++fsck.cramfs: file length too short ++ret: 4 ++ +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-64K-be util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-64K-be +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-64K-be 1970-01-01 01:00:00.000000000 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-64K-be 2018-01-26 18:40:57.401031690 +0100 +@@ -0,0 +1,29 @@ ++## size: 76 ++fsck.cramfs: superblock size (76) too small ++ret: 4 ++ ++## size: 587 ++fsck.cramfs: superblock size (587) too small ++ret: 4 ++ ++## size: 588 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 65535 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 65536 ++ret: 0 ++ ++## size: 65537 ++fsck.cramfs: file length too short ++ret: 4 ++ ++## size: 4294967295 ++fsck.cramfs: file length too short ++ret: 4 ++ +diff -urN util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-64K-le util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-64K-le +--- util-linux-2.31.1.orig/tests/expected/cramfs/fsck-bad-header-pad-64K-le 1970-01-01 01:00:00.000000000 +0100 ++++ util-linux-2.31.1/tests/expected/cramfs/fsck-bad-header-pad-64K-le 2018-01-26 18:40:57.401031690 +0100 +@@ -0,0 +1,29 @@ ++## size: 76 ++fsck.cramfs: superblock size (76) too small ++ret: 4 ++ ++## size: 587 ++fsck.cramfs: superblock size (587) too small ++ret: 4 ++ ++## size: 588 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 65535 ++fsck.cramfs: file extends past end of filesystem ++fsck.cramfs: crc error ++ret: 4 ++ ++## size: 65536 ++ret: 0 ++ ++## size: 65537 ++fsck.cramfs: file length too short ++ret: 4 ++ ++## size: 4294967295 ++fsck.cramfs: file length too short ++ret: 4 ++ +diff -urN util-linux-2.31.1.orig/tests/ts/cramfs/fsck-bad-header util-linux-2.31.1/tests/ts/cramfs/fsck-bad-header +--- util-linux-2.31.1.orig/tests/ts/cramfs/fsck-bad-header 2017-12-14 15:26:46.585066844 +0100 ++++ util-linux-2.31.1/tests/ts/cramfs/fsck-bad-header 2018-01-26 18:40:57.401031690 +0100 +@@ -16,7 +16,7 @@ + # GNU General Public License for more details. + # + TS_TOPDIR="${0%/*}/../.." +-TS_DESC="fsck endianness" ++TS_DESC="fsck bad header" + + . $TS_TOPDIR/functions.sh + ts_init "$*" +@@ -25,14 +25,78 @@ + ts_check_test_command "$TS_CMD_FSCKCRAMFS" + ts_check_prog "dd" + +-IMAGE_SOURCE="$TS_OUTDIR/${TS_TESTNAME}-data/root" ++function num2binary() ++{ ++ local num=$1 ++ local endian=$2 ++ ++ test "$num" -ge 0 -a "$num" -le 4294967295 || return 1 ++ test "$endian" = "be" -o "$endian" = "le" || return 1 ++ ++ # how to do that easier? ++ if test "$endian" = "be"; then ++ echo -en "$(printf "%08x" "$1" | sed 's/\(..\)/\\x\1/g')" ++ else ++ echo -en "$(printf "%08x" "$1" | sed 's/^\(..\)\(..\)\(..\)\(..\)$/\\x\4\\x\3\\x\2\\x\1/')" ++ fi ++} ++ ++function fsck_loop_sizes() ++{ ++ local endian=$1 # be, le ++ local seek=$2 # 4 for nopad, 516 for pad ++ shift 2 # the rest are sizes to loop over ++ ++ for size in "$@"; do ++ ts_log "## size: $size" ++ cp -a "$IMAGE_FILE" "$IMAGE_FILE.tmp" ++ num2binary "$size" $endian | ++ dd of="$IMAGE_FILE.tmp" bs=1 seek="$seek" count=4 conv=notrunc &> /dev/null ++ $TS_CMD_FSCKCRAMFS "$IMAGE_FILE.tmp" >> $TS_OUTPUT 2>&1 ++ ts_log "ret: $? ++" ++ done ++ rm -f "$IMAGE_FILE" ++} ++ ++ ++IMAGE_SOURCE="$TS_OUTDIR/${TS_TESTNAME}-data" + IMAGE_FILE="$TS_OUTDIR/${TS_TESTNAME}-cramfs.img" + + mkdir -p "${IMAGE_SOURCE}/subdir" &> /dev/null +-$TS_CMD_MKCRAMFS -p -N big $IMAGE_SOURCE $IMAGE_FILE &> /dev/null +-echo -ne \\00\\x4c | +- dd of=$IMAGE_FILE bs=1 seek=518 count=2 conv=notrunc &> /dev/null +-$TS_CMD_FSCKCRAMFS $IMAGE_FILE >> $TS_OUTPUT 2>&1 ++ ++ts_init_subtest "nopad-4K-be" ++$TS_CMD_MKCRAMFS -N big -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null ++fsck_loop_sizes be 4 0 75 76 4095 4096 4097 4294967295 ++rm -f "$IMAGE_FILE" ++ts_finalize_subtest ++ ++ts_init_subtest "nopad-4K-le" ++$TS_CMD_MKCRAMFS -N little -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null ++fsck_loop_sizes le 4 0 75 76 4095 4096 4097 4294967295 ++ts_finalize_subtest ++ ++ts_init_subtest "pad-4K-be" ++$TS_CMD_MKCRAMFS -p -N big -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null ++fsck_loop_sizes be 516 76 587 588 4095 4096 4097 4294967295 ++ts_finalize_subtest ++ ++ts_init_subtest "pad-4K-le" ++$TS_CMD_MKCRAMFS -p -N little -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null ++fsck_loop_sizes le 516 76 587 588 4095 4096 4097 4294967295 ++ts_finalize_subtest ++ ++ts_init_subtest "pad-64K-be" ++$TS_CMD_MKCRAMFS -p -N big -b 65536 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null ++fsck_loop_sizes be 516 76 587 588 65535 65536 65537 4294967295 ++ts_finalize_subtest ++ ++ts_init_subtest "pad-64K-le" ++$TS_CMD_MKCRAMFS -p -N little -b 65536 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null ++fsck_loop_sizes le 516 76 587 588 65535 65536 65537 4294967295 ++ts_finalize_subtest ++ ++rm -rf "$IMAGE_SOURCE" "$IMAGE_FILE.tmp" + + ts_finalize + diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 79db2f4..d19368a 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Jan 29 16:39:59 CET 2018 - sbrabec@suse.com + +- Update to version 2.31.1: + * blkid: Add support for LUKS2 and new LABEL attributes. + * move rfkill to /usr/sbin (boo#1076134). + * fsck.cramfs: Fix bus error on broken file system. + * hwclock: add iso-8601 overflow check + * libmount: + * Allow MNT_FORCE and MNT_DETACH at umount + * add nsfs between pseudo filesystems + * lscpu: Treat read failure on Xen Hypervisor properties as + non-fatal + * sha1: endian fixes (affects util_linux_bigendian.patch) + * documentation updates + * other fixes and improvements +- Fix regressions in 2.31.1: + * sha1 on s390* (update util_linux_bigendian.patch). + * fsck.cramfs on ppc64le (util-linux-cramfs.patch). + ------------------------------------------------------------------- Sun Jan 21 20:15:00 UTC 2018 - jengelh@inai.de diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 03dd714..3ef3163 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.31 +Version: 2.31.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -166,6 +166,8 @@ Patch2: util-linux-lsmem-memory-zone-2.patch Patch3: util-linux-lsmem-memory-zone-3.patch # Add four commits from upstream to pass tests on ppc64 Patch4: util_linux_bigendian.patch +# PATCH-FIX-UPSTREAM util-linux-cramfs.patch sbrabec@suse.com -- Fix fsck.cramfs failure on ppc64le. +Patch5: util-linux-cramfs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -407,6 +409,7 @@ library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -644,7 +647,6 @@ make install DEST=%{buildroot} popd install -Dm644 %{SOURCE41} %{buildroot}%{_unitdir}/rfkill-block@.service install -Dm644 %{SOURCE42} %{buildroot}%{_unitdir}/rfkill-unblock@.service -ln -s "../bin/rfkill" %{buildroot}%{_sbindir}/rfkill %endif # # util-linux install @@ -984,8 +986,6 @@ getent passwd uuidd >/dev/null || \ %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev -%{_bindir}/rfkill -%{_sbindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -1036,6 +1036,7 @@ getent passwd uuidd >/dev/null || \ %{_sbindir}/raw %{_sbindir}/rcraw %{_sbindir}/resizepart +%{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/setctsid diff --git a/util-linux.changes b/util-linux.changes index 79db2f4..d19368a 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Jan 29 16:39:59 CET 2018 - sbrabec@suse.com + +- Update to version 2.31.1: + * blkid: Add support for LUKS2 and new LABEL attributes. + * move rfkill to /usr/sbin (boo#1076134). + * fsck.cramfs: Fix bus error on broken file system. + * hwclock: add iso-8601 overflow check + * libmount: + * Allow MNT_FORCE and MNT_DETACH at umount + * add nsfs between pseudo filesystems + * lscpu: Treat read failure on Xen Hypervisor properties as + non-fatal + * sha1: endian fixes (affects util_linux_bigendian.patch) + * documentation updates + * other fixes and improvements +- Fix regressions in 2.31.1: + * sha1 on s390* (update util_linux_bigendian.patch). + * fsck.cramfs on ppc64le (util-linux-cramfs.patch). + ------------------------------------------------------------------- Sun Jan 21 20:15:00 UTC 2018 - jengelh@inai.de diff --git a/util-linux.spec b/util-linux.spec index 1279d0a..d0e1e22 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -116,7 +116,7 @@ BuildRequires: libmount-devel %endif %endif #END SECOND STAGE DEPENDENCIES -Version: 2.31 +Version: 2.31.1 Release: 0 # util-linux is a base package and uuidd pre-requiring pwdutils pulls # that into the core build cycle. pwdutils also pulls in the whole @@ -166,6 +166,8 @@ Patch2: util-linux-lsmem-memory-zone-2.patch Patch3: util-linux-lsmem-memory-zone-3.patch # Add four commits from upstream to pass tests on ppc64 Patch4: util_linux_bigendian.patch +# PATCH-FIX-UPSTREAM util-linux-cramfs.patch sbrabec@suse.com -- Fix fsck.cramfs failure on ppc64le. +Patch5: util-linux-cramfs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -407,6 +409,7 @@ library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # # setctsid cp -p %{S:22} %{S:23} . @@ -644,7 +647,6 @@ make install DEST=%{buildroot} popd install -Dm644 %{SOURCE41} %{buildroot}%{_unitdir}/rfkill-block@.service install -Dm644 %{SOURCE42} %{buildroot}%{_unitdir}/rfkill-unblock@.service -ln -s "../bin/rfkill" %{buildroot}%{_sbindir}/rfkill %endif # # util-linux install @@ -984,8 +986,6 @@ getent passwd uuidd >/dev/null || \ %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev -%{_bindir}/rfkill -%{_sbindir}/rfkill %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch @@ -1036,6 +1036,7 @@ getent passwd uuidd >/dev/null || \ %{_sbindir}/raw %{_sbindir}/rcraw %{_sbindir}/resizepart +%{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser %{_sbindir}/setctsid diff --git a/util_linux_bigendian.patch b/util_linux_bigendian.patch index 4de91ec..dd052bd 100644 --- a/util_linux_bigendian.patch +++ b/util_linux_bigendian.patch @@ -1,26 +1,6 @@ -commit 3bd55be742aec60a93ebcdebc325b49737cd6642 -Author: Karel Zak -Date: Tue Dec 12 11:29:02 2017 +0100 - - lib/sha1: use ul_/UL_prefix for symbols - - Unfortunately, the symbols are visible in statically compiled libuuid - and the names are too generic. - - Addresses: https://github.com/karelzak/util-linux/issues/548 - Signed-off-by: Karel Zak - -commit b4db227582f1d0a14c7b63de8d57e6052b753d57 -Author: Karel Zak -Date: Tue Dec 12 11:38:17 2017 +0100 - - test_sha1: update helper - - Signed-off-by: Karel Zak - commit 3ae2cb49d9a8c20de1892c691b7cc86f4deb280c Author: Karel Zak -Date: Tue Dec 12 11:42:28 2017 +0100 +Date: Tue Dec 12 11:42:28 2017 +0100 lib/sha1: fix indention @@ -31,7 +11,7 @@ Date: Tue Dec 12 11:42:28 2017 +0100 commit 4ff4b1106e8c6a71cce59ca40a2019342a92d47d Author: Karel Zak -Date: Tue Jan 2 11:08:03 2018 +0100 +Date: Tue Jan 2 11:08:03 2018 +0100 lib/sha1: use proper WORDS_BIGENDIAN macro @@ -41,80 +21,8 @@ Date: Tue Jan 2 11:08:03 2018 +0100 Reported-by: Andreas Schwab Signed-off-by: Karel Zak ---- - include/sha1.h | 47 +---- - lib/sha1.c | 426 ++++++++++++++++++++-------------------------- - libuuid/src/gen_uuid.c | 12 - - tests/helpers/test_sha1.c | 12 - - 4 files changed, 219 insertions(+), 278 deletions(-) - -Index: util-linux-2.31/include/sha1.h -=================================================================== ---- util-linux-2.31.orig/include/sha1.h -+++ util-linux-2.31/include/sha1.h -@@ -1,5 +1,5 @@ --#ifndef SHA1_H --#define SHA1_H -+#ifndef UTIL_LINUX_SHA1_H -+#define UTIL_LINUX_SHA1_H - - /* - SHA-1 in C -@@ -9,38 +9,19 @@ - - #include "stdint.h" - --#define SHA1LENGTH 20 -+#define UL_SHA1LENGTH 20 - - typedef struct - { -- uint32_t state[5]; -- uint32_t count[2]; -- unsigned char buffer[64]; --} SHA1_CTX; -- --void SHA1Transform( -- uint32_t state[5], -- const unsigned char buffer[64] -- ); -- --void SHA1Init( -- SHA1_CTX * context -- ); -- --void SHA1Update( -- SHA1_CTX * context, -- const unsigned char *data, -- uint32_t len -- ); -- --void SHA1Final( -- unsigned char digest[SHA1LENGTH], -- SHA1_CTX * context -- ); -- --void SHA1( -- char *hash_out, -- const char *str, -- unsigned len); -+ uint32_t state[5]; -+ uint32_t count[2]; -+ unsigned char buffer[64]; -+} UL_SHA1_CTX; -+ -+void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); -+void ul_SHA1Init(UL_SHA1_CTX *context); -+void ul_SHA1Update(UL_SHA1_CTX *context, const unsigned char *data, uint32_t len); -+void ul_SHA1Final(unsigned char digest[UL_SHA1LENGTH], UL_SHA1_CTX *context); -+void ul_SHA1(char *hash_out, const char *str, unsigned len); - --#endif /* SHA1_H */ -+#endif /* UTIL_LINUX_SHA1_H */ -Index: util-linux-2.31/lib/sha1.c -=================================================================== ---- util-linux-2.31.orig/lib/sha1.c -+++ util-linux-2.31/lib/sha1.c +--- util-linux-2.31.1/lib/sha1.c 2017-12-19 13:52:18.459949048 +0100 ++++ util-linux-2.31.1/lib/sha1.c 2018-01-26 17:51:47.456559746 +0100 @@ -1,43 +1,31 @@ /* -SHA-1 in C @@ -173,14 +81,14 @@ Index: util-linux-2.31/lib/sha1.c #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) -@@ -48,249 +36,221 @@ A million repetitions of "a" +@@ -48,249 +36,221 @@ #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); - /* Hash a single 512-bit block. This is the core of the algorithm. */ --void SHA1Transform( +-void ul_SHA1Transform( - uint32_t state[5], - const unsigned char buffer[64] -) @@ -420,8 +328,8 @@ Index: util-linux-2.31/lib/sha1.c - /* SHA1Init - Initialize new context */ --void SHA1Init( -- SHA1_CTX * context +-void ul_SHA1Init( +- UL_SHA1_CTX * context -) +void ul_SHA1Init(UL_SHA1_CTX *context) { @@ -444,8 +352,8 @@ Index: util-linux-2.31/lib/sha1.c - /* Run your data through this. */ --void SHA1Update( -- SHA1_CTX * context, +-void ul_SHA1Update( +- UL_SHA1_CTX * context, - const unsigned char *data, - uint32_t len -) @@ -465,10 +373,10 @@ Index: util-linux-2.31/lib/sha1.c - if ((j + len) > 63) - { - memcpy(&context->buffer[j], data, (i = 64 - j)); -- SHA1Transform(context->state, context->buffer); +- ul_SHA1Transform(context->state, context->buffer); - for (; i + 63 < len; i += 64) - { -- SHA1Transform(context->state, &data[i]); +- ul_SHA1Transform(context->state, &data[i]); - } - j = 0; - } @@ -495,9 +403,9 @@ Index: util-linux-2.31/lib/sha1.c - /* Add padding and return the message digest. */ --void SHA1Final( +-void ul_SHA1Final( - unsigned char digest[20], -- SHA1_CTX * context +- UL_SHA1_CTX * context -) +void ul_SHA1Final(unsigned char digest[20], UL_SHA1_CTX *context) { @@ -548,13 +456,13 @@ Index: util-linux-2.31/lib/sha1.c + } #endif - c = 0200; -- SHA1Update(context, &c, 1); +- ul_SHA1Update(context, &c, 1); - while ((context->count[0] & 504) != 448) - { - c = 0000; -- SHA1Update(context, &c, 1); +- ul_SHA1Update(context, &c, 1); - } -- SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ +- ul_SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ - for (i = 0; i < 20; i++) - { - digest[i] = (unsigned char) @@ -579,21 +487,21 @@ Index: util-linux-2.31/lib/sha1.c + memset(&finalcount, '\0', sizeof(finalcount)); } --void SHA1( +-void ul_SHA1( - char *hash_out, - const char *str, - unsigned len) +void ul_SHA1(char *hash_out, const char *str, unsigned len) { -- SHA1_CTX ctx; +- UL_SHA1_CTX ctx; - unsigned int ii; + UL_SHA1_CTX ctx; + unsigned int ii; -- SHA1Init(&ctx); +- ul_SHA1Init(&ctx); - for (ii=0; ii