diff --git a/SOURCES/0000-login-create-var-log-lastlog.patch b/SOURCES/0000-login-create-var-log-lastlog.patch deleted file mode 100644 index debe2db..0000000 --- a/SOURCES/0000-login-create-var-log-lastlog.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2d57cb2d64ba4757dcfd9d0e7ed4873cae8a6fcd Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 20 Jun 2016 11:09:02 +0200 -Subject: [PATCH 0/6] login: create /var/log/lastlog - -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=151635 ---- - 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 09ee8f8ea..8c9e43292 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -506,7 +506,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; - --- -2.14.4 - diff --git a/SOURCES/0001-libblkid-Check-for-a-secondary-LUKS2-header.patch b/SOURCES/0001-libblkid-Check-for-a-secondary-LUKS2-header.patch deleted file mode 100644 index 07477ef..0000000 --- a/SOURCES/0001-libblkid-Check-for-a-secondary-LUKS2-header.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 768b91ef6f68661462494bed800505064eb97bc8 Mon Sep 17 00:00:00 2001 -From: Milan Broz <gmazyland@gmail.com> -Date: Wed, 11 Jul 2018 12:34:39 +0200 -Subject: [PATCH 1/6] libblkid: Check for a secondary LUKS2 header. - -This patch adds search for a secondary LUKS2 header, -if the primary one is corrupted. - -This patch is primarily needed for wipefs that should wipe -both signatures (otherwise LUKS2 header recovery can use -secondary header and revert wipefs action). - -Signed-off-by: Milan Broz <gmazyland@gmail.com> -Upstream: http://github.com/karelzak/util-linux/commit/8bee1a220db8effbe5a75ba9bc68840e019ea89a -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1595882 ---- - libblkid/src/superblocks/luks.c | 60 ++++++++++++++++++++++++++++++++--------- - 1 file changed, 47 insertions(+), 13 deletions(-) - -diff --git a/libblkid/src/superblocks/luks.c b/libblkid/src/superblocks/luks.c -index bc3d7f558..67d7cfcc5 100644 ---- a/libblkid/src/superblocks/luks.c -+++ b/libblkid/src/superblocks/luks.c -@@ -1,5 +1,6 @@ - /* - * Copyright (C) 2008 Karel Zak <kzak@redhat.com> -+ * Copyright (C) 2018 Milan Broz <gmazyland@gmail.com> - * - * Inspired by libvolume_id by - * Kay Sievers <kay.sievers@vrfy.org> -@@ -29,6 +30,15 @@ - #define LUKS2_CHECKSUM_ALG_L 32 - #define LUKS2_CHECKSUM_L 64 - -+#define LUKS_MAGIC "LUKS\xba\xbe" -+#define LUKS_MAGIC_2 "SKUL\xba\xbe" -+ -+/* Offsets for secondary header (for scan if primary header is corrupted). */ -+#define LUKS2_HDR2_OFFSETS { 0x04000, 0x008000, 0x010000, 0x020000, \ -+ 0x40000, 0x080000, 0x100000, 0x200000, 0x400000 } -+ -+static const uint64_t secondary_offsets[] = LUKS2_HDR2_OFFSETS; -+ - struct luks_phdr { - uint8_t magic[LUKS_MAGIC_L]; - uint16_t version; -@@ -59,18 +69,16 @@ struct luks2_phdr { - /* Padding to 4k, then JSON area */ - } __attribute__ ((packed)); - --static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag) -+static int luks_attributes(blkid_probe pr, struct luks2_phdr *header, uint64_t offset) - { -- struct luks_phdr *header_v1; -- struct luks2_phdr *header; - int version; -+ struct luks_phdr *header_v1; - -- header = blkid_probe_get_sb(pr, mag, struct luks2_phdr); -- if (header == NULL) -- return errno ? -errno : 1; -+ if (blkid_probe_set_magic(pr, offset, LUKS_MAGIC_L, (unsigned char *) &header->magic)) -+ return BLKID_PROBE_NONE; - - version = be16_to_cpu(header->version); -- blkid_probe_sprintf_version(pr, "%u", be16_to_cpu(header->version)); -+ blkid_probe_sprintf_version(pr, "%u", version); - - if (version == 1) { - header_v1 = (struct luks_phdr *)header; -@@ -84,7 +92,37 @@ static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag) - blkid_probe_set_id_label(pr, "SUBSYSTEM", - (unsigned char *) header->subsystem, LUKS2_LABEL_L); - } -- return 0; -+ -+ return BLKID_PROBE_OK; -+} -+ -+static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag __attribute__((__unused__))) -+{ -+ struct luks2_phdr *header; -+ size_t i; -+ -+ header = (struct luks2_phdr *) blkid_probe_get_buffer(pr, 0, sizeof(struct luks2_phdr)); -+ if (!header) -+ return errno ? -errno : BLKID_PROBE_NONE; -+ -+ if (!memcmp(header->magic, LUKS_MAGIC, LUKS_MAGIC_L)) { -+ /* LUKS primary header was found. */ -+ return luks_attributes(pr, header, 0); -+ } else { -+ /* No primary header, scan for known offsets of LUKS2 secondary header. */ -+ for (i = 0; i < ARRAY_SIZE(secondary_offsets); i++) { -+ header = (struct luks2_phdr *) blkid_probe_get_buffer(pr, -+ secondary_offsets[i], sizeof(struct luks2_phdr)); -+ -+ if (!header) -+ return errno ? -errno : BLKID_PROBE_NONE; -+ -+ if (!memcmp(header->magic, LUKS_MAGIC_2, LUKS_MAGIC_L)) -+ return luks_attributes(pr, header, secondary_offsets[i]); -+ } -+ } -+ -+ return BLKID_PROBE_NONE; - } - - const struct blkid_idinfo luks_idinfo = -@@ -92,9 +130,5 @@ const struct blkid_idinfo luks_idinfo = - .name = "crypto_LUKS", - .usage = BLKID_USAGE_CRYPTO, - .probefunc = probe_luks, -- .magics = -- { -- { .magic = "LUKS\xba\xbe", .len = 6 }, -- { NULL } -- } -+ .magics = BLKID_NONE_MAGIC - }; --- -2.14.4 - diff --git a/SOURCES/0002-losetup-keep-f-and-devname-mutually-exclusive.patch b/SOURCES/0002-losetup-keep-f-and-devname-mutually-exclusive.patch deleted file mode 100644 index 824595b..0000000 --- a/SOURCES/0002-losetup-keep-f-and-devname-mutually-exclusive.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 315960fa9a89248e9d56682c1915567d38fef431 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 7 Jun 2018 12:05:08 +0200 -Subject: [PATCH 2/6] losetup: keep -f and <devname> mutually exclusive - -losetup tries to blindly use specified device as well as search for -the first free device, the result is: - - # losetup /dev/loop1 -f /tmp/tfile_loop1 - losetup: /dev/loop1: failed to set up loop device: Invalid argument - -fixed version: - - # losetup /dev/loop10 -f img - losetup: unexpected arguments - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1614364 -Upstream: http://github.com/karelzak/util-linux/commit/c3f5a0f1d47dbc47f6d21da232d4eb1cfb7905db -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/losetup.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c -index 9c479c02d..e80ceacce 100644 ---- a/sys-utils/losetup.c -+++ b/sys-utils/losetup.c -@@ -749,6 +749,9 @@ int main(int argc, char **argv) - */ - act = A_CREATE; - file = argv[optind++]; -+ -+ if (optind < argc) -+ errx(EXIT_FAILURE, _("unexpected arguments")); - } - - if (list && !act && optind == argc) --- -2.14.4 - diff --git a/SOURCES/0003-mount-add-ext4-to-some-places-to-the-man-page.patch b/SOURCES/0003-mount-add-ext4-to-some-places-to-the-man-page.patch deleted file mode 100644 index 4cd8bee..0000000 --- a/SOURCES/0003-mount-add-ext4-to-some-places-to-the-man-page.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 4859f218a3be0ae90908fc0ddbef498a784e9b24 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 10 Aug 2018 16:27:41 +0200 -Subject: [PATCH 3/6] mount: add ext4 to some places to the man page - -Upstream: http://github.com/karelzak/util-linux/commit/d901e4275f7c1899518bab3b34424c90af8dc35e -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1614852 ---- - sys-utils/mount.8 | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index 562ecb187..1cc792979 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -880,7 +880,7 @@ output for extN filesystems). - The following options apply to any filesystem that is being - mounted (but not every filesystem actually honors them \(en e.g.\&, the - .B sync --option today has an effect only for ext2, ext3, fat, vfat and ufs): -+option today has an effect only for ext2, ext3, ext4, fat, vfat and ufs): - - .TP - .B async -@@ -916,7 +916,8 @@ The - .B 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 -+systems that are not normally running under SELinux, such as an ext3 or ext4 formatted -+ - disk from a non-SELinux workstation. You can also use - .B context= - on filesystems you do not trust, such as a floppy. It also helps in compatibility with -@@ -2314,7 +2315,7 @@ not specified or the filesystem is known for libblkid, for example: - .sp - .B "mount /tmp/disk.img /mnt" - .sp --.B "mount \-t ext3 /tmp/disk.img /mnt" -+.B "mount \-t ext4 /tmp/disk.img /mnt" - .sp - .RE - This type of mount knows about three options, namely -@@ -2462,7 +2463,7 @@ It is possible for a corrupted filesystem to cause a crash. - .PP - Some Linux filesystems don't support - .BR "\-o sync " nor " \-o dirsync" --(the ext2, ext3, fat and vfat filesystems -+(the ext2, ext3, ext4, fat and vfat filesystems - .I do - support synchronous updates (a la BSD) when mounted with the - .B sync --- -2.14.4 - diff --git a/SOURCES/0004-logger-add-S-to-the-man-page.patch b/SOURCES/0004-logger-add-S-to-the-man-page.patch deleted file mode 100644 index 5d19e66..0000000 --- a/SOURCES/0004-logger-add-S-to-the-man-page.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 56b9e31e6b9864bba07a25d2244ca0006eed5bb5 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 10 Aug 2018 16:55:14 +0200 -Subject: [PATCH 4/6] logger: add -S to the man page - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1614843 -Upstream: http://github.com/karelzak/util-linux/commit/1f6583930b1061c5e79e09a9f2e80caaf9eeb405 -Reported-by: Radka Skvarilova <rskvaril@redhat.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/logger.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/misc-utils/logger.1 b/misc-utils/logger.1 -index f121c4dc9..f9655978d 100644 ---- a/misc-utils/logger.1 -+++ b/misc-utils/logger.1 -@@ -224,7 +224,7 @@ produces: - .fi - .IP - .TP --.BR \-\-size " \fIsize -+.BR \-S , " -\-size " \fIsize - Sets the maximum permitted message size to \fIsize\fR. The default - is 1KiB characters, which is the limit traditionally used and specified - in RFC 3164. With RFC 5424, this limit has become flexible. A good assumption --- -2.14.4 - diff --git a/SOURCES/0005-lslogins-add-info-about-single-user-output-mode.patch b/SOURCES/0005-lslogins-add-info-about-single-user-output-mode.patch deleted file mode 100644 index 9fed222..0000000 --- a/SOURCES/0005-lslogins-add-info-about-single-user-output-mode.patch +++ /dev/null @@ -1,76 +0,0 @@ -From e73085fe74356df96b0e694c906f22f9c71a56c7 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 13 Aug 2018 13:49:26 +0200 -Subject: [PATCH 5/6] lslogins: add info about single-user output mode - -The supported command line synopsis is also - - lslogins foo - -and it provides different output than - - lslogins -l foo - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1614967 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - login-utils/lslogins.1 | 11 ++++++++++- - login-utils/lslogins.c | 2 +- - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/login-utils/lslogins.1 b/login-utils/lslogins.1 -index bd6955f82..effd42790 100644 ---- a/login-utils/lslogins.1 -+++ b/login-utils/lslogins.1 -@@ -9,10 +9,17 @@ lslogins \- display information about known users in the system - .RB [ \-s | \-u [ =\fIUID ]] - .RB [ \-g " \fIgroups\fR]" - .RB [ \-l " \fIlogins\fR]" -+.RB [\fIusername\fR] - .SH DESCRIPTION - .PP - Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /etc/passwd - and output the desired data. -+ -+The optional argument \fIusername\fR forces -+.BR lslogins -+to print all available details about the specified user only. In this case the -+output format is different than in case of \fB\-l\fR or \fB\-g\fR. -+ - .PP - The default action is to list info about all the users in the system. - .SH OPTIONS -@@ -39,7 +46,8 @@ Show information about supplementary groups. - .TP - \fB\-g\fR, \fB\-\-groups\fR=\fIgroups\fR - Only show data of users belonging to \fIgroups\fR. More than one group --may be specified; the list has to be comma-separated. -+may be specified; the list has to be comma-separated. The unknown group -+names are ignored. - - Note that relation between user and group may be invisible for primary group if - the user is not explicitly specify as group member (e.g. in /etc/group). If the -@@ -55,6 +63,7 @@ Display data containing information about the users' last login sessions. - \fB\-l\fR, \fB\-\-logins\fR=\fIlogins\fR - Only show data of users with a login specified in \fIlogins\fR (user names or user - IDS). More than one login may be specified; the list has to be comma-separated. -+The unknown login names are ignored. - .TP - \fB\-n\fR, \fB\-\-newline\fR - Display each piece of information on a separate line. -diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c -index 169962b72..501778e54 100644 ---- a/login-utils/lslogins.c -+++ b/login-utils/lslogins.c -@@ -1293,7 +1293,7 @@ static void __attribute__((__noreturn__)) usage(void) - size_t i; - - fputs(USAGE_HEADER, out); -- fprintf(out, _(" %s [options]\n"), program_invocation_short_name); -+ fprintf(out, _(" %s [options] [<username>]\n"), program_invocation_short_name); - - fputs(USAGE_SEPARATOR, out); - fputs(_("Display information about known users in the system.\n"), out); --- -2.14.4 - diff --git a/SOURCES/0006-lslogins-return-1-on-lslogins-nonexisting.patch b/SOURCES/0006-lslogins-return-1-on-lslogins-nonexisting.patch deleted file mode 100644 index 6a665f6..0000000 --- a/SOURCES/0006-lslogins-return-1-on-lslogins-nonexisting.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 0aa9097f9ecee3688b8659d7f7414f5fb26e147a Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 13 Aug 2018 14:16:28 +0200 -Subject: [PATCH 6/6] lslogins: return 1 on "lslogins nonexisting" - -The default behavior for -l and -g is to silently ignore unknown login -names, but this is very confusing when you explicitly specify just one -login name. - -Note that the current implementation also prints empty "Last log" for -nonexisting user. It seems ugly. - - # lslogins nonexisting - - Last logs: - -new version: - - # lslogins nonexisting - lt-lslogins: cannot found 'nonexisting' - # echo $? - 1 - -The -l and -g behaviour has not been changed. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1614967 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - login-utils/lslogins.1 | 3 ++- - login-utils/lslogins.c | 16 +++++++++++++--- - 2 files changed, 15 insertions(+), 4 deletions(-) - -diff --git a/login-utils/lslogins.1 b/login-utils/lslogins.1 -index effd42790..c831739d9 100644 ---- a/login-utils/lslogins.1 -+++ b/login-utils/lslogins.1 -@@ -18,7 +18,8 @@ and output the desired data. - The optional argument \fIusername\fR forces - .BR lslogins - to print all available details about the specified user only. In this case the --output format is different than in case of \fB\-l\fR or \fB\-g\fR. -+output format is different than in case of \fB\-l\fR or \fB\-g\fR and unknown -+is \fIusername\fR reported as an error. - - .PP - The default action is to list info about all the users in the system. -diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c -index 501778e54..6f804aa35 100644 ---- a/login-utils/lslogins.c -+++ b/login-utils/lslogins.c -@@ -266,6 +266,7 @@ struct lslogins_control { - const char *journal_path; - - unsigned int selinux_enabled : 1, -+ fail_on_unknown : 1, /* fail if user does not exist */ - ulist_on : 1, - noheadings : 1, - notrunc : 1; -@@ -653,6 +654,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c - uid_t uid; - errno = 0; - -+ errno = 0; - pwd = username ? getpwnam(username) : getpwent(); - if (!pwd) - return NULL; -@@ -675,6 +677,7 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c - return NULL; - } - -+ errno = 0; - grp = getgrgid(pwd->pw_gid); - if (!grp) - return NULL; -@@ -965,10 +968,16 @@ static int create_usertree(struct lslogins_control *ctl) - - if (ctl->ulist_on) { - for (n = 0; n < ctl->ulsiz; n++) { -- if (get_user(ctl, &user, ctl->ulist[n])) -+ int rc = get_user(ctl, &user, ctl->ulist[n]); -+ -+ if (ctl->fail_on_unknown && !user) { -+ warnx(_("cannot found '%s'"), ctl->ulist[n]); -+ return -1; -+ } -+ if (rc || !user) - continue; -- if (user) /* otherwise an invalid user name has probably been given */ -- tsearch(user, &ctl->usertree, cmp_uid); -+ -+ tsearch(user, &ctl->usertree, cmp_uid); - } - } else { - while ((user = get_next_user(ctl))) -@@ -1518,6 +1527,7 @@ int main(int argc, char *argv[]) - errx(EXIT_FAILURE, _("Only one user may be specified. Use -l for multiple users.")); - logins = argv[optind]; - outmode = OUT_PRETTY; -+ ctl->fail_on_unknown = 1; - } else if (argc != optind) - errx(EXIT_FAILURE, _("Only one user may be specified. Use -l for multiple users.")); - --- -2.14.4 - diff --git a/SOURCES/0007-libuuid-fix-name-based-UUIDs.patch b/SOURCES/0007-libuuid-fix-name-based-UUIDs.patch deleted file mode 100644 index 53b7144..0000000 --- a/SOURCES/0007-libuuid-fix-name-based-UUIDs.patch +++ /dev/null @@ -1,115 +0,0 @@ -From f942ba2c4c14b6bf7720e8316afe1971231553bc Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 31 Aug 2018 12:27:32 +0200 -Subject: [PATCH 7/8] libuuid: fix name-based UUIDs - -The current version is not fully compatible with RFC4122. It -incorrectly encodes UUID variant - - xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx - -where M is UUID version and N is UUID variant. - - $ python -c "import uuid ; print(uuid.uuid5(uuid.UUID(int=0), 'foo'))" - aa752cea-8222-5bc8-acd9-555b090c0ccb - ^^ - -Old version: - - $ uuidgen --namespace 00000000-0000-0000-0000-000000000000 --name 'foo' --sha1 - aa752cea-8222-5bc8-8cd9-555b090c0ccb - ^^ - -Fixed version: - ./uuidgen --namespace 00000000-0000-0000-0000-000000000000 --name 'foo' --sha1; - aa752cea-8222-5bc8-acd9-555b090c0ccb - ^^ - -The patch uses uuid_unpack and uuid_pack. It makes code more readable -and allow to access proper octens. The same way we already use for -time and random based UUIDs. - -Upstream: http://github.com/karelzak/util-linux/commit/d6ddf07d31dfdc894eb8e7e6842aa856342c526e -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1624877 -Addresses: https://github.com/karelzak/util-linux/issues/683 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libuuid/src/gen_uuid.c | 34 ++++++++++++++++------------------ - 1 file changed, 16 insertions(+), 18 deletions(-) - -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c -index a374e75c9..27c135db5 100644 ---- a/libuuid/src/gen_uuid.c -+++ b/libuuid/src/gen_uuid.c -@@ -96,9 +96,6 @@ - #define THREAD_LOCAL static - #endif - --/* index with UUID_VARIANT_xxx and shift 5 bits */ --static unsigned char variant_bits[] = { 0x00, 0x04, 0x06, 0x07 }; -- - #ifdef _WIN32 - static void gettimeofday (struct timeval *tv, void *dummy) - { -@@ -566,21 +563,22 @@ void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len - { - UL_MD5_CTX ctx; - char hash[UL_MD5LENGTH]; -+ uuid_t buf; -+ struct uuid uu; - - ul_MD5Init(&ctx); -- /* hash concatenation of well-known UUID with name */ - ul_MD5Update(&ctx, ns, sizeof(uuid_t)); - ul_MD5Update(&ctx, (const unsigned char *)name, len); -- - ul_MD5Final((unsigned char *)hash, &ctx); - -- memcpy(out, hash, sizeof(uuid_t)); -+ assert(sizeof(buf) <= sizeof(hash)); - -- out[6] &= ~(UUID_TYPE_MASK << UUID_TYPE_SHIFT); -- out[6] |= (UUID_TYPE_DCE_MD5 << UUID_TYPE_SHIFT); -+ memcpy(buf, hash, sizeof(buf)); -+ uuid_unpack(buf, &uu); - -- out[8] &= ~(UUID_VARIANT_MASK << UUID_VARIANT_SHIFT); -- out[8] |= (variant_bits[UUID_VARIANT_DCE] << UUID_VARIANT_SHIFT); -+ uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000; -+ uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x3000; -+ uuid_pack(&uu, out); - } - - /* -@@ -591,20 +589,20 @@ void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t le - { - UL_SHA1_CTX ctx; - char hash[UL_SHA1LENGTH]; -+ uuid_t buf; -+ struct uuid uu; - - ul_SHA1Init(&ctx); -- /* hash concatenation of well-known UUID with name */ - ul_SHA1Update(&ctx, ns, sizeof(uuid_t)); - ul_SHA1Update(&ctx, (const unsigned char *)name, len); -- - ul_SHA1Final((unsigned char *)hash, &ctx); - -- memcpy(out, hash, sizeof(uuid_t)); -+ assert(sizeof(buf) <= sizeof(hash)); - -- out[6] &= ~(UUID_TYPE_MASK << UUID_TYPE_SHIFT); -- out[6] |= (UUID_TYPE_DCE_SHA1 << UUID_TYPE_SHIFT); -+ memcpy(buf, hash, sizeof(buf)); -+ uuid_unpack(buf, &uu); - -- out[8] &= ~(UUID_VARIANT_MASK << UUID_VARIANT_SHIFT); -- out[8] |= (variant_bits[UUID_VARIANT_DCE] << UUID_VARIANT_SHIFT); -+ uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000; -+ uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x5000; -+ uuid_pack(&uu, out); - } -- --- -2.14.4 - diff --git a/SOURCES/0008-test-update-UUID-v5-tests.patch b/SOURCES/0008-test-update-UUID-v5-tests.patch deleted file mode 100644 index 5d134ee..0000000 --- a/SOURCES/0008-test-update-UUID-v5-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2f75c4cdf6992af034bf02de55ad2ea90608e1c0 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 31 Aug 2018 12:48:46 +0200 -Subject: [PATCH 8/8] test: update UUID v5 tests - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1624877 -Upstream: http://github.com/karelzak/util-linux/commit/7edaf221d610309874e866670dceb4e2f3a04070 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/expected/uuid/oids | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/expected/uuid/oids b/tests/expected/uuid/oids -index 4644848e8..c121cbeee 100644 ---- a/tests/expected/uuid/oids -+++ b/tests/expected/uuid/oids -@@ -1,4 +1,4 @@ - 3d813cbb-47fb-32ba-91df-831e1593ac29 - 5df41881-3aed-3515-88a7-2f4a814cf09e - 2ed6657d-e927-568b-95e1-2665a8aea6a2 --fcdc2122-78d2-59f7-91ed-041a561ef652 -+fcdc2122-78d2-59f7-b1ed-041a561ef652 --- -2.14.4 - diff --git a/SOURCES/0009-tests-enlarge-backing-file-for-fstab-btrfs.patch b/SOURCES/0009-tests-enlarge-backing-file-for-fstab-btrfs.patch deleted file mode 100644 index b5c9040..0000000 --- a/SOURCES/0009-tests-enlarge-backing-file-for-fstab-btrfs.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a0753a5452e293da56e1e8579d17b4eb19a7d6a2 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 30 Nov 2018 12:22:48 +0100 -Subject: [PATCH 09/14] tests: enlarge backing file for fstab-btrfs - -It seems the new limit for Btrfs is 47MiB. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1656437 -Upstream: http://github.com/karelzak/util-linux/commit/7174b93dfda08f87228bb7aec6274fe60af581bd -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/mount/fstab-btrfs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/ts/mount/fstab-btrfs b/tests/ts/mount/fstab-btrfs -index 090f52304..54c6bb8ba 100755 ---- a/tests/ts/mount/fstab-btrfs -+++ b/tests/ts/mount/fstab-btrfs -@@ -42,7 +42,7 @@ TS_MOUNTPOINT_SUBVOL="$TS_MOUNTPOINT-subvol" - TS_MOUNTPOINT_SUBVOLID="$TS_MOUNTPOINT-subvolid" - TS_MOUNTPOINT_BIND="$TS_MOUNTPOINT-bind" - --ts_device_init 42 -+ts_device_init 50 - DEVICE=$TS_LODEV - [ -d "$TS_MOUNTPOINT_CREATE" ] || mkdir -p "$TS_MOUNTPOINT_CREATE" - [ -d "$TS_MOUNTPOINT_DEFAULT" ] || mkdir -p "$TS_MOUNTPOINT_DEFAULT" --- -2.17.2 - diff --git a/SOURCES/0010-tests-make-lsns-netnsid-portable.patch b/SOURCES/0010-tests-make-lsns-netnsid-portable.patch deleted file mode 100644 index 691fd15..0000000 --- a/SOURCES/0010-tests-make-lsns-netnsid-portable.patch +++ /dev/null @@ -1,81 +0,0 @@ -From b48e972b3aa32710ed0495c35b2184f5d3ec9eb0 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 30 Nov 2018 12:24:15 +0100 -Subject: [PATCH 10/14] tests: make lsns-netnsid portable - -It seems ip(8) link-show command does not provide link-netnsid in all -cases (versions ?). Let's try to use "ip netns list-id" as fallback. - -This commit also add possibility to debug the script by $LOG variable. - -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1656437 -Upstream: http://github.com/karelzak/util-linux/commit/0d79f5805ff2d7651ec70b06753e908cc782857a -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/lsns/netnsid | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) - -diff --git a/tests/ts/lsns/netnsid b/tests/ts/lsns/netnsid -index 72c14de6c..9d04f28f0 100755 ---- a/tests/ts/lsns/netnsid -+++ b/tests/ts/lsns/netnsid -@@ -36,6 +36,7 @@ vethb=lsns-vethb - NS=LSNS-TEST-NETNSID-NS - FIFO=$TS_OUTDIR/FIFO-NETNSID - NULL=/dev/null -+LOG=/dev/null #/root/foo.log - - function cleanup { - ip link delete $vetha 2> $NULL || : -@@ -43,24 +44,47 @@ function cleanup { - rm -f $FIFO - } - -+echo "==Cleanup" >> $LOG - cleanup -+ -+echo "==Create FIFO" >> $LOG - mkfifo $FIFO - -+echo "==Netns ADD" >> $LOG - if ip netns add $NS && - ip link add name $vetha type veth peer name $vethb && - ip link set $vethb netns $NS; then -+ echo "===Netns EXEC" >> $LOG - ip netns exec $NS dd if=$FIFO bs=1 count=2 of=$NULL 2> $NULL & - PID=$! -+ echo "====PID=$PID" >> $LOG - else - cleanup - ts_skip "failed to initialize" - fi - { -+ echo "==Write to FIFO" >> $LOG - dd if=/dev/zero bs=1 count=1 2> $NULL - { -- ip -o link show dev $vetha > $NULL -+ echo "===IP output" >> $LOG -+ ip -o link show dev $vetha >> $LOG -+ - IP_ID=$(ip -o link show dev $vetha | sed -ne 's/.* *link-netnsid *\([0-9]*\)/\1/p') -+ echo "====ip show: IP_ID=$IP_ID" >> $LOG -+ -+ if [ "x$IP_ID" = "x" ]; then -+ echo "===IP output list id" >> $LOG -+ ip netns list-id >> $LOG -+ -+ IP_ID=$(ip netns list-id | awk "/name: $NS/ { print \$2 }") -+ echo "====ip list-id: IP_ID=$IP_ID" >> $LOG -+ fi -+ -+ echo "===LSNS output" >> $LOG -+ $TS_CMD_LSNS -o+NETNSID,NSFS --type net >> $LOG -+ - LSNS_ID=$($TS_CMD_LSNS -n -o NETNSID --type net --task $PID | { read VAL; echo $VAL; } ) -+ echo "===LSNS_ID=$LSNS_ID" >> $LOG - } - dd if=/dev/zero bs=1 count=1 2> $NULL - } > $FIFO --- -2.17.2 - diff --git a/SOURCES/0011-tests-break-up-large-strings-for-PySys_WriteStdout.patch b/SOURCES/0011-tests-break-up-large-strings-for-PySys_WriteStdout.patch deleted file mode 100644 index a293dc3..0000000 --- a/SOURCES/0011-tests-break-up-large-strings-for-PySys_WriteStdout.patch +++ /dev/null @@ -1,111 +0,0 @@ -From c2b650ebe33a001b3bf19912b136dbbff5495600 Mon Sep 17 00:00:00 2001 -From: Frank Schaefer <kelledin@gmail.com> -Date: Tue, 10 Jul 2018 20:21:02 -0500 -Subject: [PATCH 11/14] tests: break up large strings for PySys_WriteStdout() - -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1656437 -Upstream: http://github.com/karelzak/util-linux/commit/8a12ab57755afc36546834f175ef0b9e9376ba59 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/python/fs.c | 56 ++++++++++++++++++++++++++++++++++---------- - 1 file changed, 43 insertions(+), 13 deletions(-) - -diff --git a/libmount/python/fs.c b/libmount/python/fs.c -index d6490d248..634a914ef 100644 ---- a/libmount/python/fs.c -+++ b/libmount/python/fs.c -@@ -63,32 +63,62 @@ static PyObject *Fs_get_devno(FsObject *self) - return PyObjectResultInt(mnt_fs_get_devno(self->fs)); - } - -+static void _dump_debug_string(const char *lead, const char *s, char quote) -+{ -+ /* PySys_WriteStdout() will automatically truncate any '%s' token -+ * longer than a certain length (documented as 1000 bytes, but we -+ * give ourselves some margin here just in case). The only way I -+ * know to get around this is to print such strings in bite-sized -+ * chunks. -+ */ -+ static const unsigned int _PY_MAX_LEN = 900; -+ static const char *_PY_MAX_LEN_FMT = "%.900s"; -+ unsigned int len; -+ -+ if (lead != NULL) -+ PySys_WriteStdout("%s", lead); -+ -+ if (quote != 0) -+ PySys_WriteStdout("%c", quote); -+ -+ for (len = strlen(s); len > _PY_MAX_LEN; len -= _PY_MAX_LEN, s += _PY_MAX_LEN) -+ PySys_WriteStdout(_PY_MAX_LEN_FMT, s); -+ -+ if (len > 0) -+ PySys_WriteStdout(_PY_MAX_LEN_FMT, s); -+ -+ if (quote != 0) -+ PySys_WriteStdout("%c\n", quote); -+ else -+ PySys_WriteStdout("\n"); -+} -+ - #define Fs_print_debug_HELP "print_debug()\n\n" - static PyObject *Fs_print_debug(FsObject *self) - { - PySys_WriteStdout("------ fs: %p\n", self->fs); -- PySys_WriteStdout("source: %s\n", mnt_fs_get_source(self->fs)); -- PySys_WriteStdout("target: %s\n", mnt_fs_get_target(self->fs)); -- PySys_WriteStdout("fstype: %s\n", mnt_fs_get_fstype(self->fs)); -+ _dump_debug_string("source: ", mnt_fs_get_source(self->fs), 0); -+ _dump_debug_string("target: ", mnt_fs_get_target(self->fs), 0); -+ _dump_debug_string("fstype: ", mnt_fs_get_fstype(self->fs), 0); - - if (mnt_fs_get_options(self->fs)) -- PySys_WriteStdout("optstr: %s\n", mnt_fs_get_options(self->fs)); -+ _dump_debug_string("optstr: ", mnt_fs_get_options(self->fs), 0); - if (mnt_fs_get_vfs_options(self->fs)) -- PySys_WriteStdout("VFS-optstr: %s\n", mnt_fs_get_vfs_options(self->fs)); -+ _dump_debug_string("VFS-optstr: ", mnt_fs_get_vfs_options(self->fs), 0); - if (mnt_fs_get_fs_options(self->fs)) -- PySys_WriteStdout("FS-opstr: %s\n", mnt_fs_get_fs_options(self->fs)); -+ _dump_debug_string("FS-opstr: ", mnt_fs_get_fs_options(self->fs), 0); - if (mnt_fs_get_user_options(self->fs)) -- PySys_WriteStdout("user-optstr: %s\n", mnt_fs_get_user_options(self->fs)); -+ _dump_debug_string("user-optstr: ", mnt_fs_get_user_options(self->fs), 0); - if (mnt_fs_get_optional_fields(self->fs)) -- PySys_WriteStdout("optional-fields: '%s'\n", mnt_fs_get_optional_fields(self->fs)); -+ _dump_debug_string("optional-fields: ", mnt_fs_get_optional_fields(self->fs), '\''); - if (mnt_fs_get_attributes(self->fs)) -- PySys_WriteStdout("attributes: %s\n", mnt_fs_get_attributes(self->fs)); -+ _dump_debug_string("attributes: ", mnt_fs_get_attributes(self->fs), 0); - - if (mnt_fs_get_root(self->fs)) -- PySys_WriteStdout("root: %s\n", mnt_fs_get_root(self->fs)); -+ _dump_debug_string("root: ", mnt_fs_get_root(self->fs), 0); - - if (mnt_fs_get_swaptype(self->fs)) -- PySys_WriteStdout("swaptype: %s\n", mnt_fs_get_swaptype(self->fs)); -+ _dump_debug_string("swaptype: ", mnt_fs_get_swaptype(self->fs), 0); - if (mnt_fs_get_size(self->fs)) - PySys_WriteStdout("size: %jd\n", mnt_fs_get_size(self->fs)); - if (mnt_fs_get_usedsize(self->fs)) -@@ -97,7 +127,7 @@ static PyObject *Fs_print_debug(FsObject *self) - PySys_WriteStdout("priority: %d\n", mnt_fs_get_priority(self->fs)); - - if (mnt_fs_get_bindsrc(self->fs)) -- PySys_WriteStdout("bindsrc: %s\n", mnt_fs_get_bindsrc(self->fs)); -+ _dump_debug_string("bindsrc: ", mnt_fs_get_bindsrc(self->fs), 0); - if (mnt_fs_get_freq(self->fs)) - PySys_WriteStdout("freq: %d\n", mnt_fs_get_freq(self->fs)); - if (mnt_fs_get_passno(self->fs)) -@@ -112,7 +142,7 @@ static PyObject *Fs_print_debug(FsObject *self) - if (mnt_fs_get_tid(self->fs)) - PySys_WriteStdout("tid: %d\n", mnt_fs_get_tid(self->fs)); - if (mnt_fs_get_comment(self->fs)) -- PySys_WriteStdout("comment: '%s'\n", mnt_fs_get_comment(self->fs)); -+ _dump_debug_string("comment: ", mnt_fs_get_comment(self->fs), '\''); - return UL_IncRef(self); - } - /* --- -2.17.2 - diff --git a/SOURCES/0012-libmount-umount-make-mnt_stat_mountpoin-usable-for-r.patch b/SOURCES/0012-libmount-umount-make-mnt_stat_mountpoin-usable-for-r.patch deleted file mode 100644 index bc637b3..0000000 --- a/SOURCES/0012-libmount-umount-make-mnt_stat_mountpoin-usable-for-r.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0afd0613fc738659fb0ff490e4e069366dee4a94 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 10 Dec 2018 16:25:08 +0100 -Subject: [PATCH 12/14] libmount: (umount) make mnt_stat_mountpoin() usable for - relative paths - - # mount -o loop devicefile /mnt/test - # umount devicefile - umount: devicefile: not mounted. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653781 -Upstream: http://github.com/karelzak/util-linux/commit/2859592ecb7b48d47d2e34d589ea35f76e329416 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libmount/src/utils.c b/libmount/src/utils.c -index fd98d0529..c36187c07 100644 ---- a/libmount/src/utils.c -+++ b/libmount/src/utils.c -@@ -121,7 +121,7 @@ static int fstype_cmp(const void *v1, const void *v2) - int mnt_stat_mountpoint(const char *target, struct stat *st) - { - #ifdef AT_NO_AUTOMOUNT -- return fstatat(-1, target, st, AT_NO_AUTOMOUNT); -+ return fstatat(AT_FDCWD, target, st, AT_NO_AUTOMOUNT); - #else - return stat(target, st); - #endif --- -2.17.2 - diff --git a/SOURCES/0013-libfdisk-Fix-multipath-partition-seperators-for-user.patch b/SOURCES/0013-libfdisk-Fix-multipath-partition-seperators-for-user.patch deleted file mode 100644 index cb36706..0000000 --- a/SOURCES/0013-libfdisk-Fix-multipath-partition-seperators-for-user.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5aea6937edf77a753e0d504bb637214e116aaed2 Mon Sep 17 00:00:00 2001 -From: KyleMahlkuch <Kyle.Mahlkuch@ibm.com> -Date: Mon, 25 Jun 2018 14:52:01 -0500 -Subject: [PATCH 13/14] libfdisk: Fix multipath partition seperators for - user-friendly names - -The current code assumes "-part" is the only partition sepereator -but this is not true for some distros. - -For example in Ubuntu 18.04 fdisk does not print the correct names for -mpatha: - -~# ls -l /dev/mapper/mpatha* -lrwxrwxrwx 1 root root 7 Feb 1 04:39 /dev/mapper/mpatha -> ../dm-0 -lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha1 -> ../dm-4 -lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha2 -> ../dm-5 -lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha3 -> ../dm-6 - -~# fdisk -l /dev/mapper/mpatha -Device Boot Start End Sectors Size Id Type -/dev/mapper/mpatha-part1 2048 419432447 419430400 200G 83 Linux -/dev/mapper/mpatha-part2 419432448 838862847 419430400 200G 83 Linux -/dev/mapper/mpatha-part3 838862848 1258291199 419428352 200G 83 Linux - -Instead of assuming a partition seperator of "-part" this patch uses -access to check the file system for a partition seperator of "p" or -the absense of a partition seperator. If neither of these work the patch -defaults to "-part" like we had before this patch. - -Upstream: http://github.com/karelzak/util-linux/commit/73775189767195f1d9f5b6b6f6a54e51f61c4356 -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1655650 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libfdisk/src/utils.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/libfdisk/src/utils.c b/libfdisk/src/utils.c -index 5ba9e0466..54e28b2fa 100644 ---- a/libfdisk/src/utils.c -+++ b/libfdisk/src/utils.c -@@ -153,7 +153,20 @@ char *fdisk_partname(const char *dev, size_t partno) - if ((strncmp(dev, _PATH_DEV_BYID, sizeof(_PATH_DEV_BYID) - 1) == 0) || - strncmp(dev, _PATH_DEV_BYPATH, sizeof(_PATH_DEV_BYPATH) - 1) == 0 || - strncmp(dev, "/dev/mapper", sizeof("/dev/mapper") - 1) == 0) { -- p = "-part"; -+ asprintf(&res, "%.*s%zu", w, dev, partno); -+ if (access(res, F_OK) == 0){ -+ p = ""; -+ } else { -+ /* check for partition seperator "p" */ -+ p = "p"; -+ free(res); -+ asprintf(&res, "%.*s%s%zu", w, dev, p, partno); -+ if (access(res, F_OK) != 0){ -+ /* otherwise, default to "-path" */ -+ p = "-part"; -+ } -+ } -+ free(res); - } - - if (asprintf(&res, "%.*s%s%zu", w, dev, p, partno) <= 0) --- -2.17.2 - diff --git a/SOURCES/0014-blkid-make-PART_ENTRY_-tags-optional-add-no-part-det.patch b/SOURCES/0014-blkid-make-PART_ENTRY_-tags-optional-add-no-part-det.patch deleted file mode 100644 index 755fa4a..0000000 --- a/SOURCES/0014-blkid-make-PART_ENTRY_-tags-optional-add-no-part-det.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 64473a830dc93e7fcd246a64bb8389d66f0034b8 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 29 Nov 2018 13:21:36 +0100 -Subject: [PATCH 14/14] blkid: make PART_ENTRY_* tags optional (add - --no-part-details) - -blkid(8) returns information from partition table also for empty -partitions. This is necessary for example for udev, but it could be -confusing if you care about on-device content only. - -Default: - # blkid -p /dev/md0p1; echo $? - /dev/md0p1: PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="6d8796b1-01" PART_ENTRY_TYPE="0x83" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="204800" PART_ENTRY_DISK="9:0" - 0 - -With --no-part-details: - # blkid -p /dev/md0p1 --no-part-details; echo $? - 2 - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653413 -Upstream: http://github.com/karelzak/util-linux/commit/5e91d5dd716ebc6144bcb0cabb0ec847a678be9e -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/blkid.8 | 6 +++++- - misc-utils/blkid.c | 15 +++++++++++---- - 2 files changed, 16 insertions(+), 5 deletions(-) - -diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 -index 13b5edb4d..d1cec1dea 100644 ---- a/misc-utils/blkid.8 -+++ b/misc-utils/blkid.8 -@@ -35,6 +35,7 @@ blkid \- locate/print block device attributes - .IR list ] - .RB [ \-\-usages - .IR list ] -+.RB [ \-\-no\-part\-details ] - .IR device " ..." - - .IP \fBblkid\fR -@@ -114,6 +115,9 @@ Don't encode non-printing characters. The non-printing characters are encoded - by ^ and M- notation by default. Note that the \fB\-\-output udev\fR output format uses - a different encoding which cannot be disabled. - .TP -+\fB\-D\fR, \fB\-\-no\-part\-details\fR -+Don't print information (PART_ENTRY_* tags) from partition table in low-level probing mode. -+.TP - \fB\-g\fR, \fB\-\-garbage\-collect\fR - Perform a garbage collection pass on the blkid cache to remove - devices which no longer exist. -@@ -224,7 +228,7 @@ Note that low-level probing also returns information about partition table type - (PTTYPE tag) and partitions (PART_ENTRY_* tags). The tag names produced by - low-level probing are based on names used internally by libblkid and it may be - different than when executed without \fB\-\-probe\fR (for example PART_ENTRY_UUID= vs --PARTUUID=). -+PARTUUID=). See also \fB\-\-no\-part\-details\fR. - .TP - \fB\-s\fR, \fB\-\-match\-tag\fR \fItag\fR - For each (specified) device, show only the tags that match -diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c -index 4cd85317f..61a6994c2 100644 ---- a/misc-utils/blkid.c -+++ b/misc-utils/blkid.c -@@ -58,6 +58,7 @@ struct blkid_control { - lowprobe:1, - lowprobe_superblocks:1, - lowprobe_topology:1, -+ no_part_details:1, - raw_chars:1; - }; - -@@ -101,6 +102,7 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_( " -O, --offset <offset> probe at the given offset\n"), out); - fputs(_( " -u, --usages <list> filter by \"usage\" (e.g. -u filesystem,raid)\n"), out); - fputs(_( " -n, --match-types <list> filter by filesystem type (e.g. -n vfat,ext3)\n"), out); -+ fputs(_( " -D, --no-part-details don't print info from partition table\n"), out); - - fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(28)); -@@ -444,7 +446,7 @@ done: - return rc; - } - --static int lowprobe_superblocks(blkid_probe pr) -+static int lowprobe_superblocks(blkid_probe pr, struct blkid_control *ctl) - { - struct stat st; - int rc, fd = blkid_probe_get_fd(pr); -@@ -470,7 +472,8 @@ static int lowprobe_superblocks(blkid_probe pr) - return 0; /* partition table detected */ - } - -- blkid_probe_set_partitions_flags(pr, BLKID_PARTS_ENTRY_DETAILS); -+ if (!ctl->no_part_details) -+ blkid_probe_set_partitions_flags(pr, BLKID_PARTS_ENTRY_DETAILS); - blkid_probe_enable_superblocks(pr, 1); - - return blkid_do_safeprobe(pr); -@@ -509,7 +512,7 @@ static int lowprobe_device(blkid_probe pr, const char *devname, - if (ctl->lowprobe_topology) - rc = lowprobe_topology(pr); - if (rc >= 0 && ctl->lowprobe_superblocks) -- rc = lowprobe_superblocks(pr); -+ rc = lowprobe_superblocks(pr, ctl); - if (rc < 0) - goto done; - -@@ -661,6 +664,7 @@ int main(int argc, char **argv) - static const struct option longopts[] = { - { "cache-file", required_argument, NULL, 'c' }, - { "no-encoding", no_argument, NULL, 'd' }, -+ { "no-part-details", no_argument, NULL, 'D' }, - { "garbage-collect", no_argument, NULL, 'g' }, - { "output", required_argument, NULL, 'o' }, - { "list-filesystems", no_argument, NULL, 'k' }, -@@ -694,7 +698,7 @@ int main(int argc, char **argv) - strutils_set_exitcode(BLKID_EXIT_OTHER); - - while ((c = getopt_long (argc, argv, -- "c:dghilL:n:ko:O:ps:S:t:u:U:w:Vv", longopts, NULL)) != -1) { -+ "c:DdghilL:n:ko:O:ps:S:t:u:U:w:Vv", longopts, NULL)) != -1) { - - err_exclusive_options(c, NULL, excl, excl_st); - -@@ -705,6 +709,9 @@ int main(int argc, char **argv) - case 'd': - ctl.raw_chars = 1; - break; -+ case 'D': -+ ctl.no_part_details = 1; -+ break; - case 'L': - ctl.eval = 1; - search_value = xstrdup(optarg); --- -2.17.2 - diff --git a/SOURCES/0015-tests-add-missing-ts_check_test_command-calls.patch b/SOURCES/0015-tests-add-missing-ts_check_test_command-calls.patch deleted file mode 100644 index f9dcc0e..0000000 --- a/SOURCES/0015-tests-add-missing-ts_check_test_command-calls.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 9bccbbf06a91f4e7bf5c0cddadf18265dc2e9e4b Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 4 Mar 2019 16:42:30 +0100 -Subject: [PATCH 15/19] tests: add missing ts_check_test_command calls - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Upstream: http://github.com/karelzak/util-linux/commit/19e00ec9e9e9c36305cf2dd163d0333e2d72c671 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/fsck/ismounted | 2 ++ - tests/ts/hexdump/format-strings | 1 + - tests/ts/hexdump/highlighting | 1 + - tests/ts/ipcs/limits | 1 + - tests/ts/ipcs/limits2 | 1 + - tests/ts/ipcs/mk-rm-msg | 1 + - tests/ts/ipcs/mk-rm-sem | 1 + - tests/ts/ipcs/mk-rm-shm | 1 + - tests/ts/misc/swaplabel | 1 + - 9 files changed, 10 insertions(+) - -diff --git a/tests/ts/fsck/ismounted b/tests/ts/fsck/ismounted -index 2a55907a7..7d1fe6273 100755 ---- a/tests/ts/fsck/ismounted -+++ b/tests/ts/fsck/ismounted -@@ -22,6 +22,8 @@ ts_init "$*" - - ts_check_test_command "$TS_CMD_FDISK" - ts_check_test_command "$TS_CMD_MOUNT" -+ts_check_test_command "$TS_CMD_UMOUNT" -+ts_check_test_command "$TS_HELPER_ISMOUNTED" - - ts_skip_nonroot - ts_check_losetup -diff --git a/tests/ts/hexdump/format-strings b/tests/ts/hexdump/format-strings -index e6f9229a5..f2dc6a89b 100755 ---- a/tests/ts/hexdump/format-strings -+++ b/tests/ts/hexdump/format-strings -@@ -23,6 +23,7 @@ FILES="$TS_TOPDIR/ts/hexdump/files" - ts_init "$*" - - ts_check_test_command "$TS_CMD_HEXDUMP" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - # on big endian systems some of the subtests have different expected output - BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) -diff --git a/tests/ts/hexdump/highlighting b/tests/ts/hexdump/highlighting -index cf78f7b96..e57757978 100755 ---- a/tests/ts/hexdump/highlighting -+++ b/tests/ts/hexdump/highlighting -@@ -25,6 +25,7 @@ ADDRFMT='-e "%07.7_Ax\n"' - ts_init "$*" - - ts_check_test_command "$TS_CMD_HEXDUMP" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - # on big endian systems some of the subtests have different expected output - BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) -diff --git a/tests/ts/ipcs/limits b/tests/ts/ipcs/limits -index 7b64b3c17..671f23c77 100755 ---- a/tests/ts/ipcs/limits -+++ b/tests/ts/ipcs/limits -@@ -23,6 +23,7 @@ TS_DESC="limits overflow" - ts_init "$*" - - ts_check_test_command "$TS_CMD_IPCS" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - ts_skip_nonroot - ts_check_prog "bc" -diff --git a/tests/ts/ipcs/limits2 b/tests/ts/ipcs/limits2 -index d23c41a35..77ad70f9b 100755 ---- a/tests/ts/ipcs/limits2 -+++ b/tests/ts/ipcs/limits2 -@@ -23,6 +23,7 @@ TS_DESC="basic limits" - ts_init "$*" - - ts_check_test_command "$TS_CMD_IPCS" -+ts_check_test_command "$TS_HELPER_SYSINFO" - ts_check_prog "bc" - - . $TS_SELF/functions.sh -diff --git a/tests/ts/ipcs/mk-rm-msg b/tests/ts/ipcs/mk-rm-msg -index 25460e25d..de3682e87 100755 ---- a/tests/ts/ipcs/mk-rm-msg -+++ b/tests/ts/ipcs/mk-rm-msg -@@ -21,6 +21,7 @@ ts_init "$*" - ts_check_test_command "$TS_CMD_IPCS" - ts_check_test_command "$TS_CMD_IPCMK" - ts_check_test_command "$TS_CMD_IPCRM" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - . $TS_SELF/functions.sh - -diff --git a/tests/ts/ipcs/mk-rm-sem b/tests/ts/ipcs/mk-rm-sem -index 61e0cfdef..d7b505f7c 100755 ---- a/tests/ts/ipcs/mk-rm-sem -+++ b/tests/ts/ipcs/mk-rm-sem -@@ -21,6 +21,7 @@ ts_init "$*" - ts_check_test_command "$TS_CMD_IPCS" - ts_check_test_command "$TS_CMD_IPCMK" - ts_check_test_command "$TS_CMD_IPCRM" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - . $TS_SELF/functions.sh - -diff --git a/tests/ts/ipcs/mk-rm-shm b/tests/ts/ipcs/mk-rm-shm -index 838fb3f21..c21547b82 100755 ---- a/tests/ts/ipcs/mk-rm-shm -+++ b/tests/ts/ipcs/mk-rm-shm -@@ -21,6 +21,7 @@ ts_init "$*" - ts_check_test_command "$TS_CMD_IPCS" - ts_check_test_command "$TS_CMD_IPCMK" - ts_check_test_command "$TS_CMD_IPCRM" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - . $TS_SELF/functions.sh - -diff --git a/tests/ts/misc/swaplabel b/tests/ts/misc/swaplabel -index 646304508..22858b0ac 100755 ---- a/tests/ts/misc/swaplabel -+++ b/tests/ts/misc/swaplabel -@@ -20,6 +20,7 @@ ts_init "$*" - - ts_check_test_command "$TS_CMD_MKSWAP" - ts_check_test_command "$TS_CMD_SWAPLABEL" -+ts_check_test_command "$TS_HELPER_SYSINFO" - - # fallocate does not work on most file systems - function fallocate_or_skip() --- -2.20.1 - diff --git a/SOURCES/0016-tests-add-use-system-commands.patch b/SOURCES/0016-tests-add-use-system-commands.patch deleted file mode 100644 index 1e5003a..0000000 --- a/SOURCES/0016-tests-add-use-system-commands.patch +++ /dev/null @@ -1,357 +0,0 @@ -From 748fbfa9b1bb3b64b3fbc6b1e51d260d8376c791 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 4 Mar 2019 17:10:04 +0100 -Subject: [PATCH 16/19] tests: add --use-system-commands - -This change allows to use commands from $PATH rather than from -$top_builddir. There two basic use cases: - -* check differences between installed and git version - run.sh --use-system-command --show-diff - -* check system binaries by upstream tests (for example tests from - src.rpm package) - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Upstream: http://github.com/karelzak/util-linux/commit/43b4a4d3c720a4e65fe9de884cd73e0b1b94fbe -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/commands.sh | 194 ++++++++++++++++++++++----------------------- - tests/functions.sh | 34 ++++++-- - tests/run.sh | 33 +++++--- - 3 files changed, 146 insertions(+), 115 deletions(-) - -diff --git a/tests/commands.sh b/tests/commands.sh -index 1be2d25b4..93100caf6 100644 ---- a/tests/commands.sh -+++ b/tests/commands.sh -@@ -2,105 +2,105 @@ - TS_TESTUSER=${TS_TESTUSER:-"nobody"} - - # helpers --TS_HELPER_BYTESWAP="$top_builddir/test_byteswap" --TS_HELPER_CPUSET="$top_builddir/test_cpuset" --TS_HELPER_DMESG="$top_builddir/test_dmesg" --TS_HELPER_ISLOCAL="$top_builddir/test_islocal" --TS_HELPER_ISMOUNTED="$top_builddir/test_ismounted" --TS_HELPER_LIBFDISK_GPT="$top_builddir/test_fdisk_gpt" --TS_HELPER_LIBFDISK_MKPART="$top_builddir/sample-fdisk-mkpart" --TS_HELPER_LIBMOUNT_CONTEXT="$top_builddir/test_mount_context" --TS_HELPER_LIBFDISK_MKPART_FULLSPEC="$top_builddir/sample-fdisk-mkpart-fullspec" --TS_HELPER_LIBMOUNT_LOCK="$top_builddir/test_mount_lock" --TS_HELPER_LIBMOUNT_OPTSTR="$top_builddir/test_mount_optstr" --TS_HELPER_LIBMOUNT_TABDIFF="$top_builddir/test_mount_tab_diff" --TS_HELPER_LIBMOUNT_TAB="$top_builddir/test_mount_tab" --TS_HELPER_LIBMOUNT_UPDATE="$top_builddir/test_mount_tab_update" --TS_HELPER_LIBMOUNT_UTILS="$top_builddir/test_mount_utils" --TS_HELPER_LIBMOUNT_DEBUG="$top_builddir/test_mount_debug" --TS_HELPER_LIBSMARTCOLS_FROMFILE="$top_builddir/sample-scols-fromfile" --TS_HELPER_LIBSMARTCOLS_TITLE="$top_builddir/sample-scols-title" -+TS_HELPER_BYTESWAP="${ts_helpersdir}test_byteswap" -+TS_HELPER_CPUSET="${ts_helpersdir}test_cpuset" -+TS_HELPER_DMESG="${ts_helpersdir}test_dmesg" -+TS_HELPER_ISLOCAL="${ts_helpersdir}test_islocal" -+TS_HELPER_ISMOUNTED="${ts_helpersdir}test_ismounted" -+TS_HELPER_LIBFDISK_GPT="${ts_helpersdir}test_fdisk_gpt" -+TS_HELPER_LIBFDISK_MKPART="${ts_helpersdir}sample-fdisk-mkpart" -+TS_HELPER_LIBMOUNT_CONTEXT="${ts_helpersdir}test_mount_context" -+TS_HELPER_LIBFDISK_MKPART_FULLSPEC="${ts_helpersdir}sample-fdisk-mkpart-fullspec" -+TS_HELPER_LIBMOUNT_LOCK="${ts_helpersdir}test_mount_lock" -+TS_HELPER_LIBMOUNT_OPTSTR="${ts_helpersdir}test_mount_optstr" -+TS_HELPER_LIBMOUNT_TABDIFF="${ts_helpersdir}test_mount_tab_diff" -+TS_HELPER_LIBMOUNT_TAB="${ts_helpersdir}test_mount_tab" -+TS_HELPER_LIBMOUNT_UPDATE="${ts_helpersdir}test_mount_tab_update" -+TS_HELPER_LIBMOUNT_UTILS="${ts_helpersdir}test_mount_utils" -+TS_HELPER_LIBMOUNT_DEBUG="${ts_helpersdir}test_mount_debug" -+TS_HELPER_LIBSMARTCOLS_FROMFILE="${ts_helpersdir}sample-scols-fromfile" -+TS_HELPER_LIBSMARTCOLS_TITLE="${ts_helpersdir}sample-scols-title" - TS_HELPER_PYLIBMOUNT_CONTEXT="$top_srcdir/libmount/python/test_mount_context.py" - TS_HELPER_PYLIBMOUNT_TAB="$top_srcdir/libmount/python/test_mount_tab.py" - TS_HELPER_PYLIBMOUNT_UPDATE="$top_srcdir/libmount/python/test_mount_tab_update.py" --TS_HELPER_LOGGER="$top_builddir/test_logger" --TS_HELPER_LOGINDEFS="$top_builddir/test_logindefs" --TS_HELPER_MD5="$top_builddir/test_md5" --TS_HELPER_SHA1="$top_builddir/test_sha1" --TS_HELPER_MKFS_MINIX="$top_builddir/test_mkfs_minix" --TS_HELPER_MORE=${TS_HELPER_MORE-"$top_builddir/test_more"} --TS_HELPER_PARTITIONS="$top_builddir/sample-partitions" --TS_HELPER_PATHS="$top_builddir/test_pathnames" --TS_HELPER_SCRIPT="$top_builddir/test_script" --TS_HELPER_SIGRECEIVE="$top_builddir/test_sigreceive" --TS_HELPER_STRUTILS="$top_builddir/test_strutils" --TS_HELPER_SYSINFO="$top_builddir/test_sysinfo" --TS_HELPER_TIOCSTI="$top_builddir/test_tiocsti" --TS_HELPER_UUID_PARSER="$top_builddir/test_uuid_parser" --TS_HELPER_UUID_NAMESPACE="$top_builddir/test_uuid_namespace" --TS_HELPER_MBSENCODE="$top_builddir/test_mbsencode" --TS_HELPER_CAL="$top_builddir/test_cal" -+TS_HELPER_LOGGER="${ts_helpersdir}test_logger" -+TS_HELPER_LOGINDEFS="${ts_helpersdir}test_logindefs" -+TS_HELPER_MD5="${ts_helpersdir}test_md5" -+TS_HELPER_SHA1="${ts_helpersdir}test_sha1" -+TS_HELPER_MKFS_MINIX="${ts_helpersdir}test_mkfs_minix" -+TS_HELPER_MORE=${TS_HELPER_MORE-"${ts_helpersdir}test_more"} -+TS_HELPER_PARTITIONS="${ts_helpersdir}sample-partitions" -+TS_HELPER_PATHS="${ts_helpersdir}test_pathnames" -+TS_HELPER_SCRIPT="${ts_helpersdir}test_script" -+TS_HELPER_SIGRECEIVE="${ts_helpersdir}test_sigreceive" -+TS_HELPER_STRUTILS="${ts_helpersdir}test_strutils" -+TS_HELPER_SYSINFO="${ts_helpersdir}test_sysinfo" -+TS_HELPER_TIOCSTI="${ts_helpersdir}test_tiocsti" -+TS_HELPER_UUID_PARSER="${ts_helpersdir}test_uuid_parser" -+TS_HELPER_UUID_NAMESPACE="${ts_helpersdir}test_uuid_namespace" -+TS_HELPER_MBSENCODE="${ts_helpersdir}test_mbsencode" -+TS_HELPER_CAL="${ts_helpersdir}test_cal" - - # paths to commands --TS_CMD_ADDPART=${TS_CMD_ADDPART:-"$top_builddir/addpart"} --TS_CMD_DELPART=${TS_CMD_DELPART:-"$top_builddir/delpart"} --TS_CMD_BLKDISCARD=${TS_CMD_BLKID-"$top_builddir/blkdiscard"} --TS_CMD_BLKID=${TS_CMD_BLKID-"$top_builddir/blkid"} --TS_CMD_CAL=${TS_CMD_CAL-"$top_builddir/cal"} --TS_CMD_COLCRT=${TS_CMD_COLCRT:-"$top_builddir/colcrt"} --TS_CMD_COLRM=${TS_CMD_COLRM:-"$top_builddir/colrm"} --TS_CMD_COL=${TS_CMD_COL:-"$top_builddir/col"} --TS_CMD_COLUMN=${TS_CMD_COLUMN:-"$top_builddir/column"} --TS_CMD_EJECT=${TS_CMD_EJECT-"$top_builddir/eject"} --TS_CMD_FALLOCATE=${TS_CMD_FALLOCATE-"$top_builddir/fallocate"} --TS_CMD_FDISK=${TS_CMD_FDISK-"$top_builddir/fdisk"} --TS_CMD_FLOCK=${TS_CMD_FLOCK-"$top_builddir/flock"} --TS_CMD_SFDISK=${TS_CMD_SFDISK-"$top_builddir/sfdisk"} --TS_CMD_FINCORE=${TS_CMD_FINCORE-"$top_builddir/fincore"} --TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"$top_builddir/findmnt"} --TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"} --TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"} --TS_CMD_GETOPT=${TS_CMD_GETOPT-"$top_builddir/getopt"} --TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"$top_builddir/hexdump"} --TS_CMD_HWCLOCK=${TS_CMD_HWCLOCK-"$top_builddir/hwclock"} --TS_CMD_IONICE=${TS_CMD_IONICE-"$top_builddir/ionice"} --TS_CMD_IPCMK=${TS_CMD_IPCMK-"$top_builddir/ipcmk"} --TS_CMD_IPCRM=${TS_CMD_IPCRM-"$top_builddir/ipcrm"} --TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"} --TS_CMD_ISOSIZE=${TS_CMD_ISOSIZE-"$top_builddir/isosize"} --TS_CMD_KILL=${TS_CMD_KILL-"$top_builddir/kill"} --TS_CMD_LAST=${TS_CMD_LAST-"$top_builddir/last"} --TS_CMD_LINE=${TS_CMD_LINE-"$top_builddir/line"} --TS_CMD_LOOK=${TS_CMD_LOOK-"$top_builddir/look"} --TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"} --TS_CMD_LSBLK=${TS_CMD_LSBLK-"$top_builddir/lsblk"} --TS_CMD_LSCPU=${TS_CMD_LSCPU-"$top_builddir/lscpu"} --TS_CMD_LSMEM=${TS_CMD_LSMEM-"$top_builddir/lsmem"} --TS_CMD_LSNS=${TS_CMD_LSNS-"$top_builddir/lsns"} --TS_CMD_MCOOKIE=${TS_CMD_MCOOKIE-"$top_builddir/mcookie"} --TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"} --TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"} --TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"} --TS_CMD_MOUNT=${TS_CMD_MOUNT:-"$top_builddir/mount"} --TS_CMD_MOUNTPOINT=${TS_CMD_MOUNTPOINT:-"$top_builddir/mountpoint"} --TS_CMD_NAMEI=${TS_CMD_NAMEI-"$top_builddir/namei"} --TS_CMD_PARTX=${TS_CMD_PARTX-"$top_builddir/partx"} --TS_CMD_RENAME=${TS_CMD_RENAME-"$top_builddir/rename"} --TS_CMD_RUNUSER=${TS_CMD_RUNUSER-"$top_builddir/runuser"} --TS_CMD_REV=${TS_CMD_REV:-"$top_builddir/rev"} --TS_CMD_SCRIPT=${TS_CMD_SCRIPT-"$top_builddir/script"} --TS_CMD_SCRIPTREPLAY=${TS_CMD_SCRIPTREPLAY-"$top_builddir/scriptreplay"} --TS_CMD_SETARCH=${TS_CMD_SETARCH-"$top_builddir/setarch"} --TS_CMD_SETSID=${TS_CMD_SETSID-"$top_builddir/setsid"} --TS_CMD_SWAPLABEL=${TS_CMD_SWAPLABEL:-"$top_builddir/swaplabel"} --TS_CMD_SWAPOFF=${TS_CMD_SWAPOFF:-"$top_builddir/swapoff"} --TS_CMD_SWAPON=${TS_CMD_SWAPON:-"$top_builddir/swapon"} --TS_CMD_UL=${TS_CMD_UL-"$top_builddir/ul"} --TS_CMD_UMOUNT=${TS_CMD_UMOUNT:-"$top_builddir/umount"} --TS_CMD_UTMPDUMP=${TS_CMD_UTMPDUMP-"$top_builddir/utmpdump"} --TS_CMD_UUIDD=${TS_CMD_UUIDD-"$top_builddir/uuidd"} --TS_CMD_UUIDGEN=${TS_CMD_UUIDGEN-"$top_builddir/uuidgen"} --TS_CMD_UUIDPARSE=${TS_CMD_UUIDPARSE-"$top_builddir/uuidparse"} --TS_CMD_WHEREIS=${TS_CMD_WHEREIS-"$top_builddir/whereis"} --TS_CMD_WIPEFS=${TS_CMD_WIPEFS-"$top_builddir/wipefs"} --TS_CMD_CHRT=${TS_CMD_CHRT-"$top_builddir/chrt"} -+TS_CMD_ADDPART=${TS_CMD_ADDPART:-"${ts_commandsdir}addpart"} -+TS_CMD_DELPART=${TS_CMD_DELPART:-"${ts_commandsdir}delpart"} -+TS_CMD_BLKDISCARD=${TS_CMD_BLKID-"${ts_commandsdir}blkdiscard"} -+TS_CMD_BLKID=${TS_CMD_BLKID-"${ts_commandsdir}blkid"} -+TS_CMD_CAL=${TS_CMD_CAL-"${ts_commandsdir}cal"} -+TS_CMD_COLCRT=${TS_CMD_COLCRT:-"${ts_commandsdir}colcrt"} -+TS_CMD_COLRM=${TS_CMD_COLRM:-"${ts_commandsdir}colrm"} -+TS_CMD_COL=${TS_CMD_COL:-"${ts_commandsdir}col"} -+TS_CMD_COLUMN=${TS_CMD_COLUMN:-"${ts_commandsdir}column"} -+TS_CMD_EJECT=${TS_CMD_EJECT-"${ts_commandsdir}eject"} -+TS_CMD_FALLOCATE=${TS_CMD_FALLOCATE-"${ts_commandsdir}fallocate"} -+TS_CMD_FDISK=${TS_CMD_FDISK-"${ts_commandsdir}fdisk"} -+TS_CMD_FLOCK=${TS_CMD_FLOCK-"${ts_commandsdir}flock"} -+TS_CMD_SFDISK=${TS_CMD_SFDISK-"${ts_commandsdir}sfdisk"} -+TS_CMD_FINCORE=${TS_CMD_FINCORE-"${ts_commandsdir}fincore"} -+TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"${ts_commandsdir}findmnt"} -+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"${ts_commandsdir}fsck.cramfs"} -+TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"${ts_commandsdir}fsck.minix"} -+TS_CMD_GETOPT=${TS_CMD_GETOPT-"${ts_commandsdir}getopt"} -+TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"${ts_commandsdir}hexdump"} -+TS_CMD_HWCLOCK=${TS_CMD_HWCLOCK-"${ts_commandsdir}hwclock"} -+TS_CMD_IONICE=${TS_CMD_IONICE-"${ts_commandsdir}ionice"} -+TS_CMD_IPCMK=${TS_CMD_IPCMK-"${ts_commandsdir}ipcmk"} -+TS_CMD_IPCRM=${TS_CMD_IPCRM-"${ts_commandsdir}ipcrm"} -+TS_CMD_IPCS=${TS_CMD_IPCS:-"${ts_commandsdir}ipcs"} -+TS_CMD_ISOSIZE=${TS_CMD_ISOSIZE-"${ts_commandsdir}isosize"} -+TS_CMD_KILL=${TS_CMD_KILL-"${ts_commandsdir}kill"} -+TS_CMD_LAST=${TS_CMD_LAST-"${ts_commandsdir}last"} -+TS_CMD_LINE=${TS_CMD_LINE-"${ts_commandsdir}line"} -+TS_CMD_LOOK=${TS_CMD_LOOK-"${ts_commandsdir}look"} -+TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"${ts_commandsdir}losetup"} -+TS_CMD_LSBLK=${TS_CMD_LSBLK-"${ts_commandsdir}lsblk"} -+TS_CMD_LSCPU=${TS_CMD_LSCPU-"${ts_commandsdir}lscpu"} -+TS_CMD_LSMEM=${TS_CMD_LSMEM-"${ts_commandsdir}lsmem"} -+TS_CMD_LSNS=${TS_CMD_LSNS-"${ts_commandsdir}lsns"} -+TS_CMD_MCOOKIE=${TS_CMD_MCOOKIE-"${ts_commandsdir}mcookie"} -+TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"${ts_commandsdir}mkfs.cramfs"} -+TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"${ts_commandsdir}mkfs.minix"} -+TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"${ts_commandsdir}mkswap"} -+TS_CMD_MOUNT=${TS_CMD_MOUNT:-"${ts_commandsdir}mount"} -+TS_CMD_MOUNTPOINT=${TS_CMD_MOUNTPOINT:-"${ts_commandsdir}mountpoint"} -+TS_CMD_NAMEI=${TS_CMD_NAMEI-"${ts_commandsdir}namei"} -+TS_CMD_PARTX=${TS_CMD_PARTX-"${ts_commandsdir}partx"} -+TS_CMD_RENAME=${TS_CMD_RENAME-"${ts_commandsdir}rename"} -+TS_CMD_RUNUSER=${TS_CMD_RUNUSER-"${ts_commandsdir}runuser"} -+TS_CMD_REV=${TS_CMD_REV:-"${ts_commandsdir}rev"} -+TS_CMD_SCRIPT=${TS_CMD_SCRIPT-"${ts_commandsdir}script"} -+TS_CMD_SCRIPTREPLAY=${TS_CMD_SCRIPTREPLAY-"${ts_commandsdir}scriptreplay"} -+TS_CMD_SETARCH=${TS_CMD_SETARCH-"${ts_commandsdir}setarch"} -+TS_CMD_SETSID=${TS_CMD_SETSID-"${ts_commandsdir}setsid"} -+TS_CMD_SWAPLABEL=${TS_CMD_SWAPLABEL:-"${ts_commandsdir}swaplabel"} -+TS_CMD_SWAPOFF=${TS_CMD_SWAPOFF:-"${ts_commandsdir}swapoff"} -+TS_CMD_SWAPON=${TS_CMD_SWAPON:-"${ts_commandsdir}swapon"} -+TS_CMD_UL=${TS_CMD_UL-"${ts_commandsdir}ul"} -+TS_CMD_UMOUNT=${TS_CMD_UMOUNT:-"${ts_commandsdir}umount"} -+TS_CMD_UTMPDUMP=${TS_CMD_UTMPDUMP-"${ts_commandsdir}utmpdump"} -+TS_CMD_UUIDD=${TS_CMD_UUIDD-"${ts_commandsdir}uuidd"} -+TS_CMD_UUIDGEN=${TS_CMD_UUIDGEN-"${ts_commandsdir}uuidgen"} -+TS_CMD_UUIDPARSE=${TS_CMD_UUIDPARSE-"${ts_commandsdir}uuidparse"} -+TS_CMD_WHEREIS=${TS_CMD_WHEREIS-"${ts_commandsdir}whereis"} -+TS_CMD_WIPEFS=${TS_CMD_WIPEFS-"${ts_commandsdir}wipefs"} -+TS_CMD_CHRT=${TS_CMD_CHRT-"${ts_commandsdir}chrt"} -diff --git a/tests/functions.sh b/tests/functions.sh -index 2fb0ddb5f..ab607c4ce 100644 ---- a/tests/functions.sh -+++ b/tests/functions.sh -@@ -75,9 +75,19 @@ function ts_report { - } - - function ts_check_test_command { -- if [ ! -x "$1" ]; then -- ts_skip "${1##*/} not found" -- fi -+ case "$1" in -+ */*) -+ # paths -+ if [ ! -x "$1" ]; then -+ ts_skip "${1##*/} not found" -+ fi -+ ;; -+ *) -+ # just command names (e.g. --use-system-commands) -+ local cmd=$1 -+ type "$cmd" >/dev/null 2>&1 || ts_skip "missing in PATH: $cmd" -+ ;; -+ esac - } - - function ts_check_prog { -@@ -254,8 +264,20 @@ function ts_init_env { - top_srcdir=$(ts_abspath $top_srcdir) - top_builddir=$(ts_abspath $top_builddir) - -- # some ul commands search other ul commands in $PATH -- export PATH="$top_builddir:$PATH" -+ # We use helpser always from build tree -+ ts_helpersdir="${top_builddir}/" -+ -+ TS_USE_SYSTEM_COMMANDS=$(ts_has_option "use-system-commands" "$*") -+ if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then -+ # Don't define anything, just follow current PATH -+ ts_commandsdir="" -+ else -+ # The default is to use commands from build tree -+ ts_commandsdir="${top_builddir}/" -+ -+ # some ul commands search other ul commands in $PATH -+ export PATH="$ts_commandsdir:$PATH" -+ fi - - TS_SCRIPT="$mydir/$(basename $0)" - TS_SUBDIR=$(dirname $TS_SCRIPT) -@@ -319,6 +341,8 @@ function ts_init_env { - if [ "$TS_VERBOSE" == "yes" ]; then - echo - echo " script: $TS_SCRIPT" -+ echo " commands: $ts_commandsdir" -+ echo " helpers: $ts_helpersdir" - echo " sub dir: $TS_SUBDIR" - echo " top dir: $TS_TOPDIR" - echo " self: $TS_SELF" -diff --git a/tests/run.sh b/tests/run.sh -index f40c9f801..28f8ee25a 100755 ---- a/tests/run.sh -+++ b/tests/run.sh -@@ -20,6 +20,7 @@ TS_TOPDIR=$(cd ${0%/*} && pwd) - SUBTESTS= - EXCLUDETESTS= - OPTS= -+SYSCOMMANDS= - - top_srcdir= - top_builddir= -@@ -68,6 +69,11 @@ while [ -n "$1" ]; do - # these options are simply forwarded to the test scripts - OPTS="$OPTS $1" - ;; -+ --use-system-commands) -+ OPTS="$OPTS $1" -+ SYSCOMMANDS="yes" -+ ;; -+ - --nonroot) - if [ $(id -ru) -eq 0 ]; then - echo "Ignore util-linux test suite [non-root UID expected]." -@@ -98,18 +104,19 @@ while [ -n "$1" ]; do - echo "Usage: " - echo " $(basename $0) [options] [<component> ...]" - echo "Options:" -- echo " --force execute demanding tests" -- echo " --fake do not run, setup tests only" -- echo " --memcheck-valgrind run with valgrind" -- echo " --memcheck-asan enable ASAN (requires ./configure --enable-asan)" -- echo " --nolocks don't use flock to lock resources" -- echo " --verbose verbose mode" -- echo " --show-diff show diff from failed tests" -- echo " --nonroot ignore test suite if user is root" -- echo " --srcdir=<path> autotools top source directory" -- echo " --builddir=<path> autotools top build directory" -- echo " --parallel=<num> number of parallel test jobs, default: num cpus" -- echo " --exclude=<list> exclude tests by list '<utilname>/<testname> ..'" -+ echo " --force execute demanding tests" -+ echo " --fake do not run, setup tests only" -+ echo " --memcheck-valgrind run with valgrind" -+ echo " --memcheck-asan enable ASAN (requires ./configure --enable-asan)" -+ echo " --nolocks don't use flock to lock resources" -+ echo " --verbose verbose mode" -+ echo " --show-diff show diff from failed tests" -+ echo " --nonroot ignore test suite if user is root" -+ echo " --use-system-commands use PATH rather than builddir" -+ echo " --srcdir=<path> autotools top source directory" -+ echo " --builddir=<path> autotools top build directory" -+ echo " --parallel=<num> number of parallel test jobs, default: num cpus" -+ echo " --exclude=<list> exclude tests by list '<utilname>/<testname> ..'" - echo - exit 1 - ;; -@@ -148,7 +155,7 @@ if [ -n "$SUBTESTS" ]; then - fi - done - else -- if [ ! -f "$top_builddir/test_ttyutils" ]; then -+ if [ -z "$SYSCOMMANDS" -a ! -f "$top_builddir/test_ttyutils" ]; then - echo "Tests not compiled! Run 'make check' to fix the problem." - exit 1 - fi --- -2.20.1 - diff --git a/SOURCES/0017-tests-kill-do-not-use-shell-build-in.patch b/SOURCES/0017-tests-kill-do-not-use-shell-build-in.patch deleted file mode 100644 index 5ae2785..0000000 --- a/SOURCES/0017-tests-kill-do-not-use-shell-build-in.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 47b0f3480a88be94ef73973e73ad9f7fb8258cad Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 4 Mar 2019 17:28:15 +0100 -Subject: [PATCH 17/19] tests: (kill) do not use shell build-in - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Upstream: http://github.com/karelzak/util-linux/commit/2fadcded53add5b5b0ca7071f310a0f37c711c51 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/kill/all_processes | 5 +++++ - tests/ts/kill/name_to_number | 5 +++++ - tests/ts/kill/options | 5 +++++ - tests/ts/kill/print_pid | 5 +++++ - tests/ts/kill/queue | 5 +++++ - 5 files changed, 25 insertions(+) - -diff --git a/tests/ts/kill/all_processes b/tests/ts/kill/all_processes -index 2596ef02b..7a0c95931 100755 ---- a/tests/ts/kill/all_processes -+++ b/tests/ts/kill/all_processes -@@ -20,6 +20,11 @@ ts_init "$*" - - ts_skip_nonroot - -+# make sure we do not use shell built-in command -+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then -+ TS_CMD_KILL="/bin/kill" -+fi -+ - ts_check_test_command "$TS_CMD_KILL" - ts_check_test_command "$TS_HELPER_SIGRECEIVE" - -diff --git a/tests/ts/kill/name_to_number b/tests/ts/kill/name_to_number -index cde55c9ed..fd2aaafe0 100755 ---- a/tests/ts/kill/name_to_number -+++ b/tests/ts/kill/name_to_number -@@ -18,6 +18,11 @@ TS_DESC="name_to_number" - . "$TS_TOPDIR/functions.sh" - ts_init "$*" - -+# make sure we do not use shell built-in command -+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then -+ TS_CMD_KILL="/bin/kill" -+fi -+ - ts_check_test_command "$TS_CMD_KILL" - ts_check_test_command "$TS_HELPER_SIGRECEIVE" - -diff --git a/tests/ts/kill/options b/tests/ts/kill/options -index 2c82bbccc..ee9e52f47 100755 ---- a/tests/ts/kill/options -+++ b/tests/ts/kill/options -@@ -18,6 +18,11 @@ TS_DESC="options" - . "$TS_TOPDIR/functions.sh" - ts_init "$*" - -+# make sure we do not use shell built-in command -+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then -+ TS_CMD_KILL="/bin/kill" -+fi -+ - ts_check_test_command "$TS_CMD_KILL" - ts_check_test_command "$TS_HELPER_SIGRECEIVE" - -diff --git a/tests/ts/kill/print_pid b/tests/ts/kill/print_pid -index c6187f192..2a2a838ee 100755 ---- a/tests/ts/kill/print_pid -+++ b/tests/ts/kill/print_pid -@@ -18,6 +18,11 @@ TS_DESC="print_pid" - . "$TS_TOPDIR/functions.sh" - ts_init "$*" - -+# make sure we do not use shell built-in command -+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then -+ TS_CMD_KILL="/bin/kill" -+fi -+ - ts_check_test_command "$TS_CMD_KILL" - ts_check_test_command "$TS_HELPER_SIGRECEIVE" - -diff --git a/tests/ts/kill/queue b/tests/ts/kill/queue -index 992acf7a6..4727cbfc4 100755 ---- a/tests/ts/kill/queue -+++ b/tests/ts/kill/queue -@@ -18,6 +18,11 @@ TS_DESC="queue" - . "$TS_TOPDIR/functions.sh" - ts_init "$*" - -+# make sure we do not use shell built-in command -+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then -+ TS_CMD_KILL="/bin/kill" -+fi -+ - ts_check_test_command "$TS_CMD_KILL" - ts_check_test_command "$TS_HELPER_SIGRECEIVE" - --- -2.20.1 - diff --git a/SOURCES/0018-tests-add-missing-TS_CMD_UMOUNT-check.patch b/SOURCES/0018-tests-add-missing-TS_CMD_UMOUNT-check.patch deleted file mode 100644 index 66e45cc..0000000 --- a/SOURCES/0018-tests-add-missing-TS_CMD_UMOUNT-check.patch +++ /dev/null @@ -1,27 +0,0 @@ -From aa983f0eea49638f04de0fbafcd156c1472726ee Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 4 Mar 2019 17:32:03 +0100 -Subject: [PATCH 18/19] tests: add missing TS_CMD_UMOUNT check - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Upstream: http://github.com/karelzak/util-linux/commit/bb872a239ce9faae7ac672a9137945dd8e4ee964 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/libmount/loop | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/ts/libmount/loop b/tests/ts/libmount/loop -index b52b7476a..090b79fa4 100755 ---- a/tests/ts/libmount/loop -+++ b/tests/ts/libmount/loop -@@ -23,6 +23,7 @@ TS_DESC="losetup-loop" - ts_init "$*" - - ts_check_test_command "$TS_CMD_MOUNT" -+ts_check_test_command "$TS_CMD_UMOUNT" - ts_check_test_command "$TS_CMD_FINDMNT" - ts_check_test_command "$TS_CMD_LOSETUP" - --- -2.20.1 - diff --git a/SOURCES/0019-tests-add-noskip-commands.patch b/SOURCES/0019-tests-add-noskip-commands.patch deleted file mode 100644 index 28358fc..0000000 --- a/SOURCES/0019-tests-add-noskip-commands.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 9e92f2ff939a885b70d3a5d20e8c94f6e41e821b Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 5 Mar 2019 11:06:41 +0100 -Subject: [PATCH 19/19] tests: add --noskip-commands - -The default is SKIP missing commands on --use-system-commands, but -with --noskip-commands the test will FAIL. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Upstream: http://github.com/karelzak/util-linux/commit/7c90efa384cbb2ace873e2b90e8cc396a1719535 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/functions.sh | 9 ++++++++- - tests/run.sh | 2 ++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/tests/functions.sh b/tests/functions.sh -index ab607c4ce..0605a1320 100644 ---- a/tests/functions.sh -+++ b/tests/functions.sh -@@ -85,7 +85,13 @@ function ts_check_test_command { - *) - # just command names (e.g. --use-system-commands) - local cmd=$1 -- type "$cmd" >/dev/null 2>&1 || ts_skip "missing in PATH: $cmd" -+ type "$cmd" >/dev/null 2>&1 -+ if [ $? -ne 0 ]; then -+ if [ "$TS_NOSKIP_COMMANDS" = "yes" ]; then -+ ts_failed "missing in PATH: $cmd" -+ fi -+ ts_skip "missing in PATH: $cmd" -+ fi - ;; - esac - } -@@ -301,6 +307,7 @@ function ts_init_env { - - ts_init_core_env - -+ TS_NOSKIP_COMMANDS=$(ts_has_option "noskip-commands" "$*") - TS_VERBOSE=$(ts_has_option "verbose" "$*") - TS_SHOWDIFF=$(ts_has_option "show-diff" "$*") - TS_PARALLEL=$(ts_has_option "parallel" "$*") -diff --git a/tests/run.sh b/tests/run.sh -index 28f8ee25a..e8328cc5d 100755 ---- a/tests/run.sh -+++ b/tests/run.sh -@@ -65,6 +65,7 @@ while [ -n "$1" ]; do - --show-diff |\ - --verbose |\ - --skip-loopdevs |\ -+ --noskip-commands |\ - --parsable) - # these options are simply forwarded to the test scripts - OPTS="$OPTS $1" -@@ -113,6 +114,7 @@ while [ -n "$1" ]; do - echo " --show-diff show diff from failed tests" - echo " --nonroot ignore test suite if user is root" - echo " --use-system-commands use PATH rather than builddir" -+ echo " --noskip-commands fail on missing commands" - echo " --srcdir=<path> autotools top source directory" - echo " --builddir=<path> autotools top build directory" - echo " --parallel=<num> number of parallel test jobs, default: num cpus" --- -2.20.1 - diff --git a/SOURCES/0020-tests-add-missing-program-checks.patch b/SOURCES/0020-tests-add-missing-program-checks.patch deleted file mode 100644 index 06d9d8d..0000000 --- a/SOURCES/0020-tests-add-missing-program-checks.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 68ab6d9691e667f89f72bc7eb39a5300b2f6cbaf Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 5 Mar 2019 13:56:45 +0100 -Subject: [PATCH] tests: add missing program checks - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/cal/bigyear | 2 +- - tests/ts/cal/month | 2 +- - tests/ts/cal/sep1752 | 2 +- - tests/ts/misc/mbsencode | 2 ++ - tests/ts/misc/strtosize | 2 ++ - 5 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/tests/ts/cal/bigyear b/tests/ts/cal/bigyear -index d205c3afd..34139fd27 100755 ---- a/tests/ts/cal/bigyear -+++ b/tests/ts/cal/bigyear -@@ -18,7 +18,7 @@ TS_DESC="Year 2147483646" - . $TS_TOPDIR/functions.sh - ts_init "$*" - --ts_check_test_command "$TS_CMD_CAL" -+ts_check_test_command "$TS_HELPER_CAL" - - export TERM=linux - -diff --git a/tests/ts/cal/month b/tests/ts/cal/month -index 9794e90c0..37996acae 100755 ---- a/tests/ts/cal/month -+++ b/tests/ts/cal/month -@@ -22,7 +22,7 @@ TS_DESC="month" - . $TS_TOPDIR/functions.sh - ts_init "$*" - --ts_check_test_command "$TS_CMD_CAL" -+ts_check_test_command "$TS_HELPER_CAL" - - export TERM=linux - -diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752 -index 3128261cd..41c30d40e 100755 ---- a/tests/ts/cal/sep1752 -+++ b/tests/ts/cal/sep1752 -@@ -18,7 +18,7 @@ TS_DESC="September 1752" - . $TS_TOPDIR/functions.sh - ts_init "$*" - --ts_check_test_command "$TS_CMD_CAL" -+ts_check_test_command "$TS_HELPER_CAL" - - export TERM=linux - -diff --git a/tests/ts/misc/mbsencode b/tests/ts/misc/mbsencode -index 405d34c56..139148259 100755 ---- a/tests/ts/misc/mbsencode -+++ b/tests/ts/misc/mbsencode -@@ -22,6 +22,8 @@ TS_DESC="mbsencode" - . $TS_TOPDIR/functions.sh - ts_init "$*" - -+ts_check_test_command "$TS_HELPER_MBSENCODE" -+ - # These test may fail on some machines (locales, other libc...) - TS_KNOWN_FAIL="yes" - -diff --git a/tests/ts/misc/strtosize b/tests/ts/misc/strtosize -index 68b3b8bab..a5914a939 100755 ---- a/tests/ts/misc/strtosize -+++ b/tests/ts/misc/strtosize -@@ -21,6 +21,8 @@ TS_DESC="strtosize" - . $TS_TOPDIR/functions.sh - ts_init "$*" - -+ts_check_test_command "$TS_HELPER_STRUTILS" -+ - $TS_HELPER_STRUTILS --size -1 >> $TS_OUTPUT 2>&1 - $TS_HELPER_STRUTILS --size 0 >> $TS_OUTPUT 2>&1 - $TS_HELPER_STRUTILS --size 1 >> $TS_OUTPUT 2>&1 --- -2.20.1 - diff --git a/SOURCES/0021-tests-check-for-tar-and-b-g-zip.patch b/SOURCES/0021-tests-check-for-tar-and-b-g-zip.patch deleted file mode 100644 index 17199f8..0000000 --- a/SOURCES/0021-tests-check-for-tar-and-b-g-zip.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0c57e5fedce0e627debda3258e2203842b427572 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 11 Dec 2018 11:44:48 +0100 -Subject: [PATCH] tests: check for tar and {b,g}zip - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Upstream: http://github.com/karelzak/util-linux/commit/9e07672bb9989c88f6a7d8b8ab23158701fb4eec -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/lscpu/lscpu | 2 ++ - tests/ts/lsmem/lsmem | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/tests/ts/lscpu/lscpu b/tests/ts/lscpu/lscpu -index 70fbce9f3..ccf271149 100755 ---- a/tests/ts/lscpu/lscpu -+++ b/tests/ts/lscpu/lscpu -@@ -22,6 +22,8 @@ TS_TOPDIR="${0%/*}/../.." - - ts_init "$*" - -+ts_check_prog "tar" -+ts_check_prog "gzip" - ts_check_test_command "$TS_CMD_LSCPU" - - for dump in $(ls $TS_SELF/dumps/*.tar.gz | sort); do -diff --git a/tests/ts/lsmem/lsmem b/tests/ts/lsmem/lsmem -index f1a643f85..bedf4143f 100755 ---- a/tests/ts/lsmem/lsmem -+++ b/tests/ts/lsmem/lsmem -@@ -21,6 +21,8 @@ TS_TOPDIR="${0%/*}/../.." - ts_init "$*" - - ts_check_test_command "$TS_CMD_LSMEM" -+ts_check_prog "tar" -+ts_check_prog "bzip2" - - LSCOLUMNS="RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE" - --- -2.20.1 - diff --git a/SOURCES/0022-tests-make-mount-oloop-use-more-robust.patch b/SOURCES/0022-tests-make-mount-oloop-use-more-robust.patch deleted file mode 100644 index 6b05766..0000000 --- a/SOURCES/0022-tests-make-mount-oloop-use-more-robust.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 8822103e30121d95fa58b5e8b7ce8ce91d4e778e Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 3 Jun 2019 22:29:51 +0200 -Subject: [PATCH] tests: make mount -oloop use more robust - -The command creates loop device, so udevd is in the game and it seems -better to wait for him. - -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1681062 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/libmount/loop | 4 ++++ - tests/ts/libmount/loop-overlay | 11 +++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/tests/ts/libmount/loop b/tests/ts/libmount/loop -index 090b79fa4..50764781c 100755 ---- a/tests/ts/libmount/loop -+++ b/tests/ts/libmount/loop -@@ -65,6 +65,7 @@ ts_finalize_subtest - ts_init_subtest "file-o-loop" - [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT - $TS_CMD_MOUNT -oloop "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>&1 -+udevadm settle - $TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>&1 - udevadm settle - ts_log "Success" -@@ -89,6 +90,7 @@ else - [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT - LODEV=$( $TS_CMD_LOSETUP --find 2>> $TS_OUTPUT ) - $TS_CMD_MOUNT -oloop=$LODEV "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>&1 -+ udevadm settle - verify_mount_dev "$LODEV" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>&1 - $TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>&1 - udevadm settle -@@ -122,6 +124,7 @@ ts_init_subtest "o-loop-val-initialized" - LODEV=$( $TS_CMD_LOSETUP --show -f "$BACKFILE" 2>>$TS_OUTPUT) - $TS_CMD_MOUNT -oloop=$LODEV "$BACKFILE" "$TS_MOUNTPOINT" 2>&1 \ - | sed 's/:.*:/: <target>/; s/for .*/for <source>/' > $TS_OUTPUT -+udevadm settle - $TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>&1 - udevadm settle - ts_log "Success" -@@ -133,6 +136,7 @@ cp "$BACKFILE" "$BACKFILE"-2 - LODEV=$( $TS_CMD_LOSETUP --show -f "$BACKFILE"-2 2>> $TS_OUTPUT) - $TS_CMD_MOUNT -oloop=$LODEV "$BACKFILE" "$TS_MOUNTPOINT" 2>&1 \ - | sed 's/:.*:/: <target>/; s/for .*/for <source>/' > $TS_OUTPUT -+udevadm settle - $TS_CMD_LOSETUP --detach $LODEV >> $TS_OUTPUT 2>&1 - rm "$BACKFILE"-2 - udevadm settle -diff --git a/tests/ts/libmount/loop-overlay b/tests/ts/libmount/loop-overlay -index fffb823c0..1ba6eb06e 100755 ---- a/tests/ts/libmount/loop-overlay -+++ b/tests/ts/libmount/loop-overlay -@@ -43,23 +43,34 @@ dd if="$IMG" of="$IMG" oflag=append bs=1024k count=5 conv=notrunc &>/dev/null - - echo "second should fail" >>$TS_OUTPUT - $TS_CMD_MOUNT -oloop "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>&1 -+udevadm settle - $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \ - | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT -+udevadm settle - $TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>&1 -+udevadm settle - - echo "should succeed" >>$TS_OUTPUT - $TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>&1 -+udevadm settle - $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>&1 -+udevadm settle - $TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>&1 -+udevadm settle - $TS_CMD_UMOUNT "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>&1 -+udevadm settle - - echo "both should fail" >>$TS_OUTPUT - LOOPDEV=$($TS_CMD_LOSETUP --show -f --offset 1 --sizelimit $OFFSET "$IMG") -+udevadm settle - $TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" 2>&1 \ - | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT -+udevadm settle - $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \ - | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT -+udevadm settle - $TS_CMD_LOSETUP --detach $LOOPDEV -+udevadm settle - - ts_log "Success" - ts_finalize --- -2.21.0 - diff --git a/SOURCES/0023-libblkid-fix-file-descriptor-leak-in-blkid_verify.patch b/SOURCES/0023-libblkid-fix-file-descriptor-leak-in-blkid_verify.patch deleted file mode 100644 index 1c2f1c8..0000000 --- a/SOURCES/0023-libblkid-fix-file-descriptor-leak-in-blkid_verify.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e431bfeca0f3e7be2eba30be83260f20976f871d Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 31 Jul 2019 16:18:27 +0200 -Subject: [PATCH 23/24] libblkid: fix file descriptor leak in blkid_verify() - -The function blkid_verify() uses private device file descriptor and -uses blkid_probe_set_device() to assign the descriptor to low-level -probing code. Unfortunately, close() in this case is not enough as the -prober can internally open whole-disk device too. - -The library API has been extended so blkid_probe_set_device() -deallocates and close previously used prober for whole-disk. This new -functionality is used in blkid_verify() now. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1734553 -Upstream: http://github.com/karelzak/util-linux/commit/c4d6d1c54dcd0eff701236d396d88b1fc6251768 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/probe.c | 19 ++++++++++++++++--- - libblkid/src/verify.c | 4 +++- - 2 files changed, 19 insertions(+), 4 deletions(-) - -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 647ae416a..a6dc8416a 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -848,10 +848,15 @@ failed: - * @off: begin of probing area - * @size: size of probing area (zero means whole device/file) - * -- * Assigns the device to probe control struct, resets internal buffers and -- * resets the current probing. -+ * Assigns the device to probe control struct, resets internal buffers, resets -+ * the current probing, and close previously associated device (if open by -+ * libblkid). - * -- * Returns: -1 in case of failure, or 0 on success. -+ * If @fd is < 0 than only resets the prober and returns 1. Note that -+ * blkid_reset_probe() keeps the device associated with the prober, but -+ * blkid_probe_set_device() does complete reset. -+ * -+ * Returns: -1 in case of failure, 0 on success and 1 on reset. - */ - int blkid_probe_set_device(blkid_probe pr, int fd, - blkid_loff_t off, blkid_loff_t size) -@@ -866,6 +871,11 @@ int blkid_probe_set_device(blkid_probe pr, int fd, - if ((pr->flags & BLKID_FL_PRIVATE_FD) && pr->fd >= 0) - close(pr->fd); - -+ if (pr->disk_probe) { -+ blkid_free_probe(pr->disk_probe); -+ pr->disk_probe = NULL; -+ } -+ - pr->flags &= ~BLKID_FL_PRIVATE_FD; - pr->flags &= ~BLKID_FL_TINY_DEV; - pr->flags &= ~BLKID_FL_CDROM_DEV; -@@ -881,6 +891,9 @@ int blkid_probe_set_device(blkid_probe pr, int fd, - pr->wipe_size = 0; - pr->wipe_chain = NULL; - -+ if (fd < 0) -+ return 1; -+ - #if defined(POSIX_FADV_RANDOM) && defined(HAVE_POSIX_FADVISE) - /* Disable read-ahead */ - posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM); -diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c -index 7f44f5497..750378f8c 100644 ---- a/libblkid/src/verify.c -+++ b/libblkid/src/verify.c -@@ -184,9 +184,11 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) - dev->bid_name, (long long)st.st_rdev, dev->bid_type)); - } - -- blkid_reset_probe(cache->probe); -+ /* reset prober */ - blkid_probe_reset_superblocks_filter(cache->probe); -+ blkid_probe_set_device(cache->probe, -1, 0, 0); - close(fd); -+ - return dev; - } - --- -2.21.0 - diff --git a/SOURCES/0024-findmnt-verify-ignore-passno-for-XFS.patch b/SOURCES/0024-findmnt-verify-ignore-passno-for-XFS.patch deleted file mode 100644 index f0ed8c8..0000000 --- a/SOURCES/0024-findmnt-verify-ignore-passno-for-XFS.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 3f6de92999cf63e234265f51d6ee02134bc75ac3 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 12 Jun 2019 11:02:51 +0200 -Subject: [PATCH 24/24] findmnt: (verify) ignore passno for XFS - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1719069 -Upstream: http://github.com/karelzak/util-linux/commit/f5b7bf155b9881de5b99cc0a23b4dccf9a2d4af3 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/findmnt-verify.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/misc-utils/findmnt-verify.c b/misc-utils/findmnt-verify.c -index 1cc62def9..73e44a418 100644 ---- a/misc-utils/findmnt-verify.c -+++ b/misc-utils/findmnt-verify.c -@@ -28,7 +28,8 @@ struct verify_context { - int nwarnings; - int nerrors; - -- unsigned int target_printed : 1; -+ unsigned int target_printed : 1, -+ no_fsck : 1; - }; - - static void verify_mesg(struct verify_context *vfy, char type, const char *fmt, va_list ap) -@@ -408,6 +409,8 @@ static int verify_fstype(struct verify_context *vfy) - isauto = 1; - else if (strcmp(type, "swap") == 0) - isswap = 1; -+ else if (strcmp(type, "xfs") == 0) -+ vfy->no_fsck = 1; - - if (!isswap && !isauto && !none && !is_supported_filesystem(vfy, type)) - verify_warn(vfy, _("%s seems unsupported by the current kernel"), type); -@@ -422,6 +425,7 @@ static int verify_fstype(struct verify_context *vfy) - - if (realtype) { - isswap = strcmp(realtype, "swap") == 0; -+ vfy->no_fsck = strcmp(realtype, "xfs") == 0; - - if (type && !isauto && strcmp(type, realtype) != 0) - return verify_err(vfy, _("%s does not match with on-disk %s"), type, realtype); -@@ -440,7 +444,7 @@ static int verify_passno(struct verify_context *vfy) - int passno = mnt_fs_get_passno(vfy->fs); - const char *tgt = mnt_fs_get_target(vfy->fs); - -- if (tgt && strcmp("/", tgt) == 0 && passno != 1) -+ if (tgt && strcmp("/", tgt) == 0 && passno != 1 && !vfy->no_fsck) - return verify_warn(vfy, _("recommended root FS passno is 1 (current is %d)"), passno); - - return 0; -@@ -463,7 +467,7 @@ static int verify_filesystem(struct verify_context *vfy) - if (!rc) - rc = verify_fstype(vfy); - if (!rc) -- rc = verify_passno(vfy); -+ rc = verify_passno(vfy); /* depends on verify_fstype() */ - - return rc; - } -@@ -492,6 +496,8 @@ int verify_table(struct libmnt_table *tb) - - while (rc == 0 && (vfy.fs = get_next_fs(tb, itr))) { - vfy.target_printed = 0; -+ vfy.no_fsck = 0; -+ - if (check_order) - rc = verify_order(&vfy); - if (!rc) --- -2.21.0 - diff --git a/SOURCES/0025-partx-don-t-report-ENXIO-as-error-on-d.patch b/SOURCES/0025-partx-don-t-report-ENXIO-as-error-on-d.patch deleted file mode 100644 index 0afeed4..0000000 --- a/SOURCES/0025-partx-don-t-report-ENXIO-as-error-on-d.patch +++ /dev/null @@ -1,41 +0,0 @@ -From be5e6b14db3cdd09dab711572116d7ee39344875 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 21 Aug 2019 10:51:18 +0200 -Subject: [PATCH 25/26] partx: don't report ENXIO as error on -d - -The errno ENXIO should be ignored, unfortunately the current code uses -variable 'rc' for ioctl return code as well as for final del_parts() -return value. So, failed ioctl (which should be ignored) affects all -del_parts() status. - - # modprobe scsi_debug dev_size_mb=100 - # partx -d --nr 1-1024 /dev/sdc; echo $? - 1 - -The device dos not contains any partitions, so 0 return code is -expected in this case. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1739179 -Upstream: http://github.com/karelzak/util-linux/commit/53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - disk-utils/partx.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/disk-utils/partx.c b/disk-utils/partx.c -index e3443ea80..f3dcc9007 100644 ---- a/disk-utils/partx.c -+++ b/disk-utils/partx.c -@@ -327,8 +327,7 @@ static int del_parts(int fd, const char *device, dev_t devno, - } - - for (i = lower; i <= upper; i++) { -- rc = partx_del_partition(fd, i); -- if (rc == 0) { -+ if (partx_del_partition(fd, i) == 0) { - if (verbose) - printf(_("%s: partition #%d removed\n"), device, i); - continue; --- -2.21.0 - diff --git a/SOURCES/0026-partx-document-d-vs.-nr-and-fix-test.patch b/SOURCES/0026-partx-document-d-vs.-nr-and-fix-test.patch deleted file mode 100644 index 33b50ff..0000000 --- a/SOURCES/0026-partx-document-d-vs.-nr-and-fix-test.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 5a9269c019f9cb0b2d54444501beb74663670693 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 21 Aug 2019 13:42:22 +0200 -Subject: [PATCH 26/26] partx: document -d vs. --nr and fix test - -The commit ab025087f91b66ee8e23a16bc49eb0d9bd421d65 has disabled error -message, but unfortunately it keeps wrong return code. This has been fixed -by commit 53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555. - -This commit add hit about it to docs and fix regression test too. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1739179 -Upstream: http://github.com/karelzak/util-linux/commit/5200aa99d27e084b514e8b035db32f39b49562a3 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - disk-utils/partx.8 | 5 ++++- - tests/ts/partx/partx | 9 +++++++-- - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/disk-utils/partx.8 b/disk-utils/partx.8 -index af7313cb9..c6bbbae42 100644 ---- a/disk-utils/partx.8 -+++ b/disk-utils/partx.8 -@@ -53,7 +53,10 @@ Add the specified partitions, or read the disk and add all partitions. - Print the SIZE column in bytes rather than in human-readable format. - .TP - .BR \-d , " \-\-delete" --Delete the specified partitions or all partitions. -+Delete the specified partitions or all partitions. It is not error to -+remove non-existing partitions, so this option is possible to use together with -+large \fB\-\-nr\fR ranges without care about the current partitions set on -+the device. - .TP - .BR \-g , " \-\-noheadings" - Do not print a header line with \fB\-\-show\fR or \fB\-\-raw\fR. -diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx -index b21dc44ef..84c286a94 100755 ---- a/tests/ts/partx/partx -+++ b/tests/ts/partx/partx -@@ -137,9 +137,14 @@ udevadm settle - ts_init_subtest "delete-non-existent" - #attempt to remove it again - { -+ # remove non-existing partitions (ENXIO) is not error -+ # -+ # see ab025087f91b66ee8e23a16bc49eb0d9bd421d65 and -+ # 53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555 -+ # - $TS_CMD_PARTX -d --nr $PARTS $TS_DEVICE && -- echo "partx failed: removed non-existing partition" || -- echo "partx: OK" -+ echo "partx: OK" || -+ echo "partx failed: removed non-existing partition" - } >$TS_OUTPUT 2>&1 - ts_finalize_subtest - --- -2.21.0 - diff --git a/SOURCES/0027-libmount-improve-mountinfo-reliability.patch b/SOURCES/0027-libmount-improve-mountinfo-reliability.patch deleted file mode 100644 index c78f9ad..0000000 --- a/SOURCES/0027-libmount-improve-mountinfo-reliability.patch +++ /dev/null @@ -1,396 +0,0 @@ -From 32fe4f1dd8fbc104bd848e24de613122947f095a Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -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 <zbyszek@in.waw.pl> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - configure.ac | 1 + - libmount/src/mountP.h | 2 + - libmount/src/tab_parse.c | 87 +++++++++++++++++---- - libmount/src/utils.c | 158 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 233 insertions(+), 15 deletions(-) - -diff --git a/configure.ac b/configure.ac -index a05a294ad..245004890 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -456,6 +456,7 @@ AC_CHECK_FUNCS([ \ - err \ - errx \ - explicit_bzero \ -+ fmemopen \ - fsync \ - utimensat \ - getdomainname \ -diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h -index d47d26442..52a238ef3 100644 ---- a/libmount/src/mountP.h -+++ b/libmount/src/mountP.h -@@ -93,6 +93,7 @@ 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) -@@ -118,6 +119,7 @@ extern void mnt_free_filesystems(char **filesystems); - extern char *mnt_get_kernel_cmdline_option(const char *name); - extern int mnt_guess_system_root(dev_t devno, struct libmnt_cache *cache, char **path); - 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 --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c -index 3ed84ebc2..10fc68279 100644 ---- a/libmount/src/tab_parse.c -+++ b/libmount/src/tab_parse.c -@@ -603,15 +603,7 @@ static int kernel_fs_postparse(struct libmnt_table *tb, - 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; -@@ -685,6 +677,40 @@ 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 -@@ -700,18 +726,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; - } -@@ -768,7 +825,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) { -- mnt_table_parse_stream(tb, f, d->d_name); -+ __table_parse_stream(tb, f, d->d_name); - fclose(f); - } - } -@@ -809,7 +866,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) { -- mnt_table_parse_stream(tb, f, d->d_name); -+ __table_parse_stream(tb, f, d->d_name); - fclose(f); - } - } -diff --git a/libmount/src/utils.c b/libmount/src/utils.c -index c36187c07..f7d85d124 100644 ---- a/libmount/src/utils.c -+++ b/libmount/src/utils.c -@@ -14,6 +14,7 @@ - #include <fcntl.h> - #include <pwd.h> - #include <grp.h> -+#include <poll.h> - #include <blkid.h> - - #include "strutils.h" -@@ -408,6 +409,12 @@ 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: -@@ -1117,8 +1124,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]; -@@ -1300,6 +1457,7 @@ int main(int argc, char *argv[]) - { "--guess-root", test_guess_root, "[<maj:min>]" }, - { "--mkdir", test_mkdir, "<path>" }, - { "--statfs-type", test_statfs_type, "<path>" }, -+ { "--read-procfs", test_proc_read, "<path>" }, - - { NULL } - }; --- -2.21.0 - diff --git a/SOURCES/0028-libmount-use-fmemopen-in-more-robust-way-coverity-sc.patch b/SOURCES/0028-libmount-use-fmemopen-in-more-robust-way-coverity-sc.patch deleted file mode 100644 index e356bf4..0000000 --- a/SOURCES/0028-libmount-use-fmemopen-in-more-robust-way-coverity-sc.patch +++ /dev/null @@ -1,53 +0,0 @@ -From d9fe56d8da9015694fcba5f3dd850becff677ab5 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 20 Sep 2019 13:00:19 +0200 -Subject: [PATCH] libmount: use fmemopen() in more robust way [coverity scan] - -Upstream: http://github.com/karelzak/util-linux/commit/026f7d302066a4e6f5a69dc9818ec3180939f4a3 -Upstream: http://github.com/karelzak/util-linux/commit/bc747dfccf511419312ec872cefa90e25d83136a -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1751447 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/utils.c | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/libmount/src/utils.c b/libmount/src/utils.c -index f7d85d124..04e79f53f 100644 ---- a/libmount/src/utils.c -+++ b/libmount/src/utils.c -@@ -1219,20 +1219,26 @@ success: - */ - FILE *mnt_get_procfs_memstream(int fd, char **membuf) - { -- FILE *memf; - 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 -- && (memf = fmemopen(*membuf, sz, "r"))) -- return memf; -+ 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 */ -- lseek(fd, cur, SEEK_SET); -+ if (cur != (off_t) -1) -+ lseek(fd, cur, SEEK_SET); - return NULL; - } - #else --- -2.21.0 - diff --git a/SOURCES/0029-lscpu-use-the-first-VM-from-proc-sysinfo.patch b/SOURCES/0029-lscpu-use-the-first-VM-from-proc-sysinfo.patch deleted file mode 100644 index 9552768..0000000 --- a/SOURCES/0029-lscpu-use-the-first-VM-from-proc-sysinfo.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6f16035b81cd7feca02d6df8eff1bb954ed7e58d Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 4 Sep 2018 14:30:37 +0200 -Subject: [PATCH 29/32] lscpu: use the first VM from /proc/sysinfo - -Addresses: https://github.com/karelzak/util-linux/issues/685 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1739443 -Upstream: http://github.com/karelzak/util-linux/commit/350f5c8df2cb6edbfb5bae95f00a9fff446d236c -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index fd6d63bbf..1aa7bff4d 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -866,6 +866,7 @@ read_hypervisor(struct lscpu_desc *desc, struct lscpu_modifier *mod) - *(str--) = '\0'; - while ((str = strstr(desc->hypervisor, " "))) - memmove(str, str + 1, strlen(str)); -+ break; - } - fclose(fd); - } --- -2.21.0 - diff --git a/SOURCES/0030-tests-lscpu-s390-nested-virtualization.patch b/SOURCES/0030-tests-lscpu-s390-nested-virtualization.patch deleted file mode 100644 index fa71cbc..0000000 --- a/SOURCES/0030-tests-lscpu-s390-nested-virtualization.patch +++ /dev/null @@ -1,206 +0,0 @@ -From e10bdfc6cd623f02740cf2bcfd9867c56534c5e5 Mon Sep 17 00:00:00 2001 -From: Radka Skvarilova <rskvaril@redhat.com> -Date: Sun, 22 Sep 2019 13:49:45 +0200 -Subject: [PATCH 30/32] tests: lscpu s390 nested virtualization - -Signed-off-by: Radka Skvarilova <rskvaril@redhat.com> -Addresses:https://bugzilla.redhat.com/show_bug.cgi?id=1739443 -Upstream: http://github.com/karelzak/util-linux/commit/2062164894fffa314ecb7ac99dc6c98062484389 ---- - tests/expected/lscpu/lscpu-s390-nested-virt | 45 +++++++++++++++++++ - tests/ts/lscpu/dumps/s390-nested-virt.tar.gz | Bin 0 -> 7199 bytes - 2 files changed, 45 insertions(+) - create mode 100644 tests/expected/lscpu/lscpu-s390-nested-virt - create mode 100644 tests/ts/lscpu/dumps/s390-nested-virt.tar.gz - -diff --git a/tests/expected/lscpu/lscpu-s390-nested-virt b/tests/expected/lscpu/lscpu-s390-nested-virt -new file mode 100644 -index 000000000..2665fd8dc ---- /dev/null -+++ b/tests/expected/lscpu/lscpu-s390-nested-virt -@@ -0,0 +1,45 @@ -+CPU op-mode(s): 32-bit, 64-bit -+CPU(s): 2 -+On-line CPU(s) list: 0,1 -+Thread(s) per core: 1 -+Core(s) per socket: 1 -+Socket(s) per book: 1 -+Book(s) per drawer: 1 -+Drawer(s): 2 -+NUMA node(s): 1 -+Vendor ID: IBM/S390 -+Machine type: 2964 -+CPU dynamic MHz: 5000 -+CPU static MHz: 5000 -+BogoMIPS: 3033.00 -+Hypervisor: KVM/Linux -+Hypervisor vendor: KVM -+Virtualization type: full -+Dispatching mode: horizontal -+L1d cache: 256 KiB -+L1i cache: 192 KiB -+L2d cache: 4 MiB -+L2i cache: 4 MiB -+L3 cache: 64 MiB -+L4 cache: 480 MiB -+NUMA node0 CPU(s): 0,1 -+Vulnerability L1tf: Not affected -+Vulnerability Meltdown: Not affected -+Vulnerability Spec store bypass: Not affected -+Vulnerability Spectre v1: Mitigation; __user pointer sanitization -+Vulnerability Spectre v2: Mitigation; execute trampolines -+Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx -+ -+# The following is the parsable format, which can be fed to other -+# programs. Each different item in every column has an unique ID -+# starting from zero. -+# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i -+0,0,0,0,,0,0,0,0 -+1,1,1,0,,1,1,1,1 -+ -+# The following is the parsable format, which can be fed to other -+# programs. Each different item in every column has an unique ID -+# starting from zero. -+# CPU,Core,Socket,Node,,L1d,L1i,L2d,L2i -+0,0,0,0,,0,0,0,0 -+1,1,1,0,,1,1,1,1 -diff --git a/tests/ts/lscpu/dumps/s390-nested-virt.tar.gz b/tests/ts/lscpu/dumps/s390-nested-virt.tar.gz -new file mode 100644 -index 0000000000000000000000000000000000000000..7992699925395ed8d33b1e1466b74fc1aa235268 -GIT binary patch -literal 7199 -zcmb7|dpK14zsFsYO}nPFYuZ%PMd^Z336(4*TcRer3sNpgD3MZbv80PMNo`w{G9oG0 -zqzEx26v{10($JJUV=(5n*7}?^*}wgq^E~G{&vW`mYx%D4_jCJx-mecD^A|aJ^PPv} -z6bJ7eib<%-zkE8l+t#n8FlzI-@}kEz)axa}w(L)lt9PBsIIOAv%}zn7;nQdi5~WYu -zJ{neZKDMS$*w*%R=W)|!D?0w%vFL^?&s?4AW{mpAeg7e#;9SqG91c9*fS(3`-H^qX -z)Y3P;zr?$Q=%Hctr>gQ-q}<J=jcTt>_}aRkprjf_!Sec}n^BcIE<Kh$6ICsxLEF)U -z2h7a0<9p@z@7PR57h|28L}}W0O5H%8B+6(Z6dT=h7wg~7Q=C09oJMJ7jTe0DXWI)7 -zU12V%Wt!c5QS{b3@66McpO(MBP294MAAfMJFVJ?NclGMH!1?dmh$FMR59xe+^rhRE -z?=*WZ)n-*&!3vg+y^ZevH4fBS4)0<PSA08Ca&+txQER-){-ExWmq%*9pA9T-wAFPz -zD~vs)lWhNVM~$ZLLX$_;MzgKgRw~SWI!j|+Hbtds4%dV$&t1%2T2*ZwVBITJU9LI% -zstPMIEb>O=O+sXSYPld#Gv=x#>uuQE8!Mw%zW>{Khm+}=AL~*n*W=aKaa>K@OPx!P -zguV%1Gi}4PWz*(N3z^$bNkO8j|F|199x+Se`nIt}`;Lxl^yalL86sWBl5d$`PJFZV -zNm+ZiQo9+&<F)*65~<AZ4%k&@W4%}G1HK<HvVNP}7gqPzBkSS6P6_*oI;?FS+lslC -z^S(yYitT^ix8WSoc{0>DG_(<Wdnrv<+B@2|r{LT;GbibN&LWDfXz9+mmd0#En&$Sm -zEj-#aS5)ftSUuFqkP!FnYwv4`m%ch~!XD3FsPyKgN-=XRIsK~bAP0z>p0SmlkLwX; -zO@+<E?c$u9y7mK%)cOocq;JwOt*!~J!luLSeP=^b&Oj0y&!vF4s=HYKfY!Q@x>n&> -zb%o^pf&LUq1pBnAcfeJ))LRVEyaF(6Pp&pe3IqnMY=o3fvB>ABC4(bBCXz0skmYlS -zi$wF(I?npN{KE=h6QA-xwGq-frF{BXr4A8&CUy|cZ^c%MW~Mr9ewKdOQ~W)bmQfv+ -z`M!l$v}uz|+F<Zy+S9<78&@~`8k>w*Es7>W1S^T-8fkg)C5>7EnE3PN@{FKlTbixS -zfy8@Xn-%}6h;2*oNQt=oW4LRxyKSgZM@z+~wgEAe9^o~KYx~^;O1{4vT_)AJepS20 -z{5hB1V{<^0-xU)e?Qck_kM=cbu1;>R=wTzei5qlT8?qBO46|tLpfP@QIGz~WXcMJ8 -zx_e}~74>b_j2~F(hfVWg?;m~GQQ`PfVKvHR8nJ`V37aE{p2`RgrzGppx2|nz)#B2t -z-sv~R*+k?6;@Cm_udEpTjoW(rbfn1)zP445P3fjpdtH4~T~n47eq`s*7-iBMyPlmN -z!TC0~&#fA(+IUg0R$$j1jW_Z);Au~9@**tU%J<mMyY}72UbJ`awW?~C+uqgO`x{qj -zAhF`054Lpf*FCq@-=>^C<+yq_)|)qy7SwoQFR$0X^XdL>exr?jmgB`g3E2;khu^{d -z8B|@1YPMOH<I7wl;_mYx{y1E(IVSk#8#-RhObfE%>KR?l>U_R-S$N7?o7G%w#qhVs -zjvqW;NB3JlI&hmFU5g#K{Y!MH|Ev!+yZR3pw=h*JMtc3JDF<%nT<^EOcHC|Bh2xPd -z$F0K)Lh3brR?MF6_Vm8>`oG1~-L{z7f7)$uY=s8m^iaLueEkRJu}9RF-SqVPj(g2Y -z9$gNynJ!44`~_z>J=Cm3G+pq`@B{OId6+U?pr-%9s$n<1+_U6h35X<y6Sbj586VfG -z`mPAbyLPH$=<3*m6*2Z}T!eWScrj;^rQZgL>J))*!N6w91iJ7lD;tI7KRQ_WvxKq> -z2ey<Xl$mEGeP!%^&J~1i#Z`T{f$LAdpg*D^m~Mm>?NHL!93#p3&%TbEh}`{2!3Y}K -z5K^4C@ogOc*m!uJSuXLT#@Hb@I`C|Q#ej-bTu*7`#rR1D#85=Ry?qOEg04iYySqQ} -z(Sn@TLwG<*e}B)0>>`|xhUjqpvR$!}gfE~F(S#62{my+E!Q8eLw+!i9O}goSfAD|n -zJ1>%YemGg=yZ%^Fq;OwFeMWaH0|JFSPRQ96CK-2pTG3&txZFz6RGgz8>bU;T8tLr2 -zAFrj8XIbMS`*$O}mO9Sn8K+|N`0Rxe;XTE}CZLr%vIZ>5{kbSI)Y>X6J4_&Z-@xMg -zYX}L??d34GUXO|7bfe~v$V;so30`?a;|uhn(OxAxSlZPj8i3$@CxtO7I&a5y(H`gD -z;KaE!3#F>oPxMj!Oz?etol7^O7-z!nk*?N)91c4e@7ot!XS+;iXQ}UoLdKT_%<fWJ -zP*)4{k>e3TaypeAq>>)@B<S~jbZ-BTGlJ3PIaPijcWoT0O*y<_XI_)`vLuPx<I^2T -z2NW7LvOC{E>Ulb5t~uq@!2HVnAbrp>EvGRZ<vqjWjDJl+RgdU}k1nX%4)zCrWN0|0 -zWI;~wEq5G^BoLMP{r>7pacX-)#p1l<gFWc0kx?-XcTZ|Z`J+DsTy)=#r^L(>+c2)g -z@G2~qs`Yf|g-JyTb)YgVbH02DAvVy7Ib)pl(!Sklxx&O|?BN89H36~IMZmgv;((W7 -zf_5w4f>E|bdmP#HVAi3~s0o6NZiF<2I=DIWMD4Gy{Nr?oApg_g?BCN`5RL4{&jc$9 -zLO4AQh*G@JKVgO>`l#C}YC$9@uf~J_G=<+x!Q1sdq}K*;CKx^ZRiAgZzRQyv!l7AA -zbJ{EBG{A`6YcwyBh@I1Hteamn$IjgC?)$UNmv1Lch*)1iakv~93d7_k4?sVmdTw&& -zZ{GRD(!erWE1I71*|BIrwZP{Vj5+hy6<-$PEM*VyER(R?=k+0X>d)lVi+r8Cxv1_F -z!a`Akdb=7C4(5TQCm_@A!trPQtlDM)(q{&m+UpiHXzQfR@t&f4_yHU#y_%Nib-Y*J -z%LgtrPawbM5{#|Awv=#bF`^_Y)@y~(Azt!JwzAh}ltR$dL@R#9oxew!eVKCb^>(Pu -z{F0ep@bLFesn{tG^Qq)x6t&E6PHv$Zb@By5*fqw!^ydqRDXZ?q3$Miz&kuWZYg?Ys -zx_*BLSHoO!)|5IZii#zuHiw<zg(<jm5!|qs6;8F2J4+@%u5G!4TfwFZ`J_q_eWVkX -zmFp4-KeD$UZ6q()QC3QOz@0iWEhfaKTCkPJ5X~g$F*qw>xdk%22jT~uPMs%cDh=%R -zPkr#DQTlAV_kPQu_WZdX+31`_5Ha;v`0|j7Gi)sz7tLT2=$l3&CTxOpV&gc_z3{Bh -z=;INLq1HeY@1#h4JY_E;F(-BMIqDwa^K@{mYz%z^i{vG;LZIbCG#^pv1=(WSLx}D{ -zZ^-r<97pO?=)R$Szmz3I&N&gXJ&fph7(*x@1j-shOCCoH`piKw6Q+HKpC8mE!td{H -z@f)OU-z=2=YZojc3%OmSYY?QccaC#j4|`g9E@2gJjz#&O*KY<BLW-mJp)2<~yIl81 -z7S7JYX(88fCyz2B+S@e?y>Mtzdpk7aGy$RqRtgiSU&8PZD%HKwJ%-39g4vXA^vlCM -zg8oUVX)7!oMLbCJst&-^V$(bIptR&7FsCp@T15rImUZ!R&u+uC5zI+#kc*1fh7}U2 -zqk3Qw9)i_&biZ;pCDZ-B8+|D!MAg3j;dW6ssrb_Xn#zN?%}O87VOp0W1Wsx<$ox!5 -z=(lVZ)~6LY7hN~l*{avd=DC2fdeYBG=u9=8hEKaBpsDG>0J)UqR%;a9+_tM0$x56$ -zK2+Ejb{1!Kqe^#EaIGyO`C+*kt~o$&%#J_G^xXSfn|5T)ciol#oRZ6dQktj%nZEQ9 -z$8%7?@@_Tsb?lJ8`ohav&Zian2!@HU6P7OC{X+hQbp#*A77(*P3(!)c#}#O5FXrLb -zHiePq!zm5t)RTD_ZDrsUjHX&t1!@}3131(Hb^CcKqA~)7J8f~N!-|=j-rcZgu?5+- -zWbb^2&<oQW0tnmTw2Mio!V_Y^Af%7|cB)4vI_s*On5IegiROI}_eri@3Tb1={Z~Ye -z{--JyWeE1fLrR$mp(uq0&?+|}HcMntO{F>$aTonPZMq#g0_*=ApR(Y!BamzKh^6ub -ztsu7*$_V5d{46diPU(UQ30)-~&S(VVltD0)G88bfALPJ!9Bn{Uc9S<^0JQ^J^%(gH -z)SuXR4T8tvUJjIlMTJoqUhg(2Kr(^h42W7$6{-icMA#|Yf;9Sq7)CHHwN5yl@bxp4 -z;^ZAzB0s?PZjK{@g|HYdOzGvEDC$R70Br(IE;k?!djKn1jHnKBktaaGQL=oH5dw{e -zW%5!ej4C0NC%^@>2oDq8t8yd_hjTJVNUMSxVJ1PE@mHAGN#^1c0y#gynj(TPlk1XD -z^(Vk0U12kT(}%I^HzdM#1>uzWVKbUtFir~4jfCKW$4%*4=_S{zHzA?bKsANj<Yy{n -zUP(~RGO{8M36OZ8)T2w}38bJe3+J^%1V&f;CvE;f8%2IbHiM7~fqwxg1Vzn@OIIF~ -zJ<wlcG^GjtKYKp|%}>?nBOFBK5FtR+CJmGY0}+Aj22SSTK89kQP$7zzc|-OfVL!AF -zIF*5wVmI1BdS@p7xxv5QPChH+F>*g0{%5}%VE!{HE*NqHcu&aUC7qoN4_O<Uqv(oW -zbs%urQD!iC)T9d~vedf&Cx>5u8e>LKRqWtQLg_e%1wK5OwfJAJNk_ZHh~~W4EDby2 -zx?Uo1T~?4#5^jUh3$O)^4^dr44;V#2++_;8Gz2F)1{gVhVOp`NKBG~!Z<k!JIkAut -zn)zx^$w<HXUi#A@n-->1$&?l=yOL|^alV4lq9Adf>SiV?_lJb_!zTCcL;K$iyMymO -z<pFD;)Bw=WKt1R}u%?ubPz`U6=*>7e+W|NH5zJ~z2U2q$vu}`kyw-H;qgql2tyX75 -z@YjE?hO{B1M~$quPVm$C9~jZ#OfZIept3fuH5xj+nEhtsj`G(BI4g*_G;Bd`G~0%t -z2}dxxy7o8JvW7EDy0FxSV2y5-HE0Ye$ZddSD^ZJQLST%+MOCr`DvXjjw32dejQVdo -zE=389%BhwhDwBlZvqQY;)mBJ+J?3O7>#bWM?g1IIuYlYG{v}hgVa(-oGSg7EO8sbN -zmbcP=n?m##y9(>w!B~AFRPZr>^^@RFdXUy;oIlfz>_!6G+YF2+6|nl#^W(g$eer}J -zaHMZZVMq7nm2%xebYT*nCO`0#Av{c4OH5L}a8$?m2-OZ!NUhSS;B!{h#Q4}eceqi$ -z{(zwVN1ud6l9<}9+cP|F-D*@dRG_YDLf1M~HrwZ~AD7E7fV6t_yUP^;suu2CSAC;2 -zFMa@JPx#w><tQ2qArTNU#iU7qs9#brSfsV43D&MQ%oxh@oGJ<>TD8GpUp;C;2uJKH -z*)^C!yrMS`?scQnF5zsCPFI>?Xhd!kdw<=DbA{>?OO4mz$_f%KnUSk;dh+Ws!uLE; -zUxjX63^5l;A~^N`B!cQOB(iMirv}%K&VARqrj`9&0Y}tGrO9nZ3+uQZCOUs5?EC9$ -zewNam0Vkz5aDR&_>}qBbX&DbZW=5C;^4$Y0O{F}81rng<6Z?nQdjkk96%XimsEijp -zlfBqR(5I8nRlC5@ej>0_j2OdtSqI$Mi+&=IDj<=BXRx^!jVF*q*rM=Rb~YGCm%bLK -zE|p^vY}FfNXC3Dm+#5$aCFqrZ7=kXLIpa=C$k;w36FGs^d*okRIf0J7O2;F>H9-3t -zJBoKWMay)byg@KgJahg4Ths0}CxE*BG|t2cwv02YInLBK9|=wy5p7aU(Dj|cq9FI9 -zj1q>1NCAv)iu>7tk)oZ#33do|`<R%usB^L@zu4)HJ3X29;1aR<JK7+J7e_rOrk_2p -z&w^>&egP_3u?#;SUWU7#yvI7Ac8b|#&x27nxzo7S4;LbOic}O={O(eHm@L`vAV7W? -zG+##5{Bp?DpX}m0I6x0p%@m6msua@fMNoZWP~fDUVw}i0Q|`Cm#GP!HY?M<$Q1ll; -zE2#k}Q@&v<Y<0mWW03>)`Pasb?hQS|n)^LXIf)4~JX*n%ur14lY13a(PAZ?A7fcQi -zXDjs`tW%QT9JSoL+~2ZLI=sHF9m*mI&$4`$ObPvpOC!hnXY79M=Bf}-OfZD#=!OW0 -zzG&JtwR7!)Dya7tG02U@5>_;hZtpxizHV4<_;3!?o(PM5^==e>@Y{Sb@|#~2EHfzk -zD23ZVzo9^qk4zS`CG6Kz?JU34LE6^q*yKA>DyM2B@v)pQ9J2ltI>A@gXpboBe`Nn+ -z9!5g541dzW$}8;Ww7}Z!0=DX2-1>+Kvh|`eO>rjWN+vFB3*fY2IpgGz^4Ey2PR+TD -zO+5RniAfhoNhjA-p=3zOnit5#mW%u}$Z;IG2(n-&;r{;@5s;rJlI={U^FQ^IcMd1z -zQoTxk5Y?T8hfidLviY<+i0DCoYLQ<H>?X*XkDMwKvVsY=52==HQogHCNSaU{fqX}A -zkOf3i5~Z8ec8W?qpK2zBt#x4IOq1bAFT}|HBZLZ!uJVag{r_gU@1(IZnIvx%i34&3 -zG6<H6|FR5uJ7u6S`3c!MCV4_iqRe}c-sOs;HBU0i<a_nVe3Bd$ei~>WQOlW$ucn5{ -zu#r4nZ8C?>1TsF!93;4qT#yLcen!DT$|(Sf*omYBu8iP(!0F1rxhlud078RwD2^1{ -zbScsem#hC9xGC}=LhSS(0Fc3!Ozlw_yZi%g<lyjcW@H#b0?H?d_*e7ERb*Qx3u-b7 -z7szHHi*bcWMsB1Z|9Z|?3=!dzSs}-rNhXy=dyF-SQO6;8f&??>RPywPbX+(LW`weA -zEFzOfdOir-UZwI`T9wOJxz}oztS|i|7-R6@;6*#ok{6-{g?s;*@}_2Uv{qe8cn86y -zqicY1-V@6RBwnm(=ia?VusaD)Ebt1>_H?dGc;c1&=u|+?JnroMx?@Ins4+Vi`Xs;H -zxMI22>>g&?(t}_vaI<_mps%ZS8V?QG4PLpQzZzqE;6qRdzKl^LT7D-a)JR(x!TZ=k -z?dytfLT>BSXu?3(n}Ap2?1u?n&x;Vv@%29Y+Xlx3e1}V=y9CQhziKBB^>_Wf)#PO` -zF8U)R*4#HF?~wL4tSdeTeQs=78xgG)j#oQW57^&E95>#5vhURCtkw5VZK`Xk&bT&1 -zDNvtLYBFDgSN|l^TaXlxioC*oA0zDS%pDFCi}6bK5pfSYpKlPFe(-V51UhuD!#hE5 -z-ev!n8NEtgs#6s#-+x@-qa1s7{)Y0t2GQ)ZpC8&H37Qux_v9XW*HR;$Z`9--UOvG@ -zN8Cg6k1gt$p}P1M+T)hj;ii~S$KNj~R9+sdq15rK_Gmt@l!%YKHC^p?26q4MyKOpS -zFG^{559{WcKJ%+R>R(W^BjNp>vju{>TJBCkgx1>1=E{XW#~1rp9c@0gbW9M+*?z&; -zC2`K+e0u%1gndpubJxx;oNs$%b?Uaopn0OU+}vH+ZRx5!#)gwmw|x(In7(ON<SW-# -z;f)3vwAG%G#cZz!e(pWTI%xO&_Idr`U;MJBvP<n|V!E_V&uK<&pV!Xt@?{f$oZ8nX -zy>ilSDEPQvdhzHIdew_fehzWdhp?ygHR<_H*HnYnEbAHb?&~xyc{O3f+*9uFTKMvF -zOWY$j`sKWp_@3SpdrSPL!EwhA;W@>7LNsed2X9orUF3O_dQMXBfb^7c)|`OTj?||= -z>JK)}W5Ln`KsT52lzut=IldpL$5-#qw2~ZQRlOi`T4AOL4LrQ7Q+}hHwZQ4)?>eWB -zZ5Tz?K12n%7Fl?;6s7wqJ~XS?Uw`UIsq5ZBhkVI{9p*~gl<uo8ne%#8e8wW1E$QKx -zRBx>kC5Jm0?<7`R3sCj!O{rZC<Uo%bBBt5RRdx`Yhmi=dCEgj&p@!G@0^|2RxZ(O9 -z@xzlr3P!!ic_^SIfv0OWy2ppHAoXOefVS8&m#9!a`@`qk(BpLytW^jzWZRX&>Cd0~ -zIIr9HSXh2}4>6kYz*oeOv?y08gcqc}7m0WhoN;$*01PN)0?WW#g1&9vQ@sVI5Kf_C -zL>l?0hn+7spQ(~U>losD5eLlqAfdy(%#t?GLy6<$L^6L29Lq3xwx$K4U*Zn3D=@?| -zMzb7aQ@m<8CnoBXaIMdn(-j^nxu34&C}%xS1E*Qw6P}-<!BVeULZ>@p$O&tK5Aoc8 -zfs~KVRBB*Tt!u%>X>Vp~!pk@2x+z{wPlh4FCEgkQ=`U`fZ&mLb*y~xkKEqoj;5%~* -zIEoyZ8b$57IueL^y$@dA-1pFJKzVIq)g$6L&iXc!0}~a7_IHKP+K+Z0E%|!-<5&GN -zjw<3>&t*$l#oLY5zpl*rh#JY3yY@oXynfc^+#yH3=Th6Y4>g=<Ga>J8YcKlFT!$u~ -zU}h$^s+Aj*!kGRmg5qdO&I&L3*^3Ul-?>~uq%5kE(CDVnT(u4M-CNUBNu%BUi2BJ! -zPh2=Jj;*RtaKQNx;WG2G9dMOuN8=8i|I6T(=e2y0NWti}1f_5D7?+p(_g_E(Hg(Yb -L#Syu9MY;b1+Xr6l - -literal 0 -HcmV?d00001 - --- -2.21.0 - diff --git a/SOURCES/0031-chfn-don-t-append-extra-tailing-commas.patch b/SOURCES/0031-chfn-don-t-append-extra-tailing-commas.patch deleted file mode 100644 index 256b95f..0000000 --- a/SOURCES/0031-chfn-don-t-append-extra-tailing-commas.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 90d4faece26c328c40336a0e02b875515c503e30 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 19 Aug 2019 14:03:07 +0200 -Subject: [PATCH 31/32] chfn: don't append extra tailing commas - - # grep kzak /etc/passwd - kzak:x:1000:1000::/home/kzak:/bin/bash - - # chfn kzak - ... - grep kzak /etc/passwd - -old version: - kzak:x:1000:1000:Karel Zak,,,,:/home/kzak:/bin/bash - -fixed version: - kzak:x:1000:1000:Karel Zak:/home/kzak:/bin/bash - -Reported-by: Filip Dvorak <fdvorak@redhat.com> -References: f723cbf544a7eac2927634f2cb6d802437a2d519 -Upstream: http://github.com/karelzak/util-linux/commit/9210c0d225fd808da451d86055bf243a8b47a525 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1743555 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - login-utils/chfn.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/login-utils/chfn.c b/login-utils/chfn.c -index c5312fa0c..4f32604c5 100644 ---- a/login-utils/chfn.c -+++ b/login-utils/chfn.c -@@ -377,7 +377,7 @@ static int save_new_data(struct chfn_control *ctl) - ctl->newf.other); - - /* remove trailing empty fields (but not subfields of ctl->newf.other) */ -- if (!ctl->newf.other) { -+ if (!ctl->newf.other || !*ctl->newf.other) { - while (len > 0 && gecos[len - 1] == ',') - len--; - gecos[len] = 0; --- -2.21.0 - diff --git a/SOURCES/0032-tests-add-new-test-for-chfn-gecos.patch b/SOURCES/0032-tests-add-new-test-for-chfn-gecos.patch deleted file mode 100644 index 646efc0..0000000 --- a/SOURCES/0032-tests-add-new-test-for-chfn-gecos.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 447b7d7222bf8cb3591d611aa51917bd4453f8d6 Mon Sep 17 00:00:00 2001 -From: Radka Skvarilova <rskvaril@redhat.com> -Date: Mon, 16 Dec 2019 10:57:32 +0100 -Subject: [PATCH 32/32] tests: add new test for chfn gecos - -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1743555 -Upstream: http://github.com/karelzak/util-linux/commit/02238bff663ce5fe823980d8119f3871cc348764 -Upstream: http://github.com/karelzak/util-linux/commit/b2ef43864f24b1a9c0c67fe2a7177a5110da1b6e -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/commands.sh | 1 + - tests/expected/chfn/gecos | 6 ++++++ - tests/ts/chfn/gecos | 36 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 43 insertions(+) - create mode 100644 tests/expected/chfn/gecos - create mode 100755 tests/ts/chfn/gecos - -diff --git a/tests/commands.sh b/tests/commands.sh -index 93100caf6..b56381c9e 100644 ---- a/tests/commands.sh -+++ b/tests/commands.sh -@@ -104,3 +104,4 @@ TS_CMD_UUIDPARSE=${TS_CMD_UUIDPARSE-"${ts_commandsdir}uuidparse"} - TS_CMD_WHEREIS=${TS_CMD_WHEREIS-"${ts_commandsdir}whereis"} - TS_CMD_WIPEFS=${TS_CMD_WIPEFS-"${ts_commandsdir}wipefs"} - TS_CMD_CHRT=${TS_CMD_CHRT-"${ts_commandsdir}chrt"} -+TS_CMD_CHFN=${TS_CMD_CHFN-"${ts_commandsdir}chfn"} -diff --git a/tests/expected/chfn/gecos b/tests/expected/chfn/gecos -new file mode 100644 -index 000000000..af7b81b6c ---- /dev/null -+++ b/tests/expected/chfn/gecos -@@ -0,0 +1,6 @@ -+Initialize user -+testuser_chfn_test:x:9899:9899::/home/testuser_chfn_test:/bin/bash -+Changing finger information for testuser_chfn_test. -+ -+Finger information changed. -+testuser_chfn_test:x:9899:9899:test_gecos:/home/testuser_chfn_test:/bin/bash -diff --git a/tests/ts/chfn/gecos b/tests/ts/chfn/gecos -new file mode 100755 -index 000000000..aad27d40a ---- /dev/null -+++ b/tests/ts/chfn/gecos -@@ -0,0 +1,36 @@ -+#!/bin/bash -+ -+# -+# Copyright (C) 2019 Radka Skvarilova <rskvaril@redhat.com> -+# -+# 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="gecos" -+ -+. $TS_TOPDIR/functions.sh -+ts_init "$*" -+ -+ts_skip_nonroot -+ts_check_test_command "$TS_CMD_CHFN" -+ts_check_prog "useradd" -+ts_check_prog "userdel" -+ -+ts_log "Initialize user" -+useradd -u 9899 --shell /bin/bash testuser_chfn_test -+grep testuser /etc/passwd >> $TS_OUTPUT -+$TS_CMD_CHFN -f test_gecos testuser_chfn_test >>$TS_OUTPUT -+grep testuser /etc/passwd >> $TS_OUTPUT -+userdel --remove testuser_chfn_test &> /dev/null -+ts_finalize --- -2.21.0 - diff --git a/SOURCES/0033-tests-update-lscpu-test-for-RHEL8.patch b/SOURCES/0033-tests-update-lscpu-test-for-RHEL8.patch deleted file mode 100644 index 8ba4702..0000000 --- a/SOURCES/0033-tests-update-lscpu-test-for-RHEL8.patch +++ /dev/null @@ -1,83 +0,0 @@ -From b30f84e240bd60a23508797e33a4777cbaa50949 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 17 Dec 2019 10:53:47 +0100 -Subject: [PATCH] tests: update lscpu test for RHEL8 - -The test is originally from upstream (~v2.35), but RHEL-8 uses older -version with a little different output -- RHEL-8 has no vulnerability -fields and it counts cache sizes in different way. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1739443 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/expected/lscpu/lscpu-s390-nested-virt | 57 ++++++++++----------- - 1 file changed, 26 insertions(+), 31 deletions(-) - -diff --git a/tests/expected/lscpu/lscpu-s390-nested-virt b/tests/expected/lscpu/lscpu-s390-nested-virt -index 2665fd8dc..a6ab04f0b 100644 ---- a/tests/expected/lscpu/lscpu-s390-nested-virt -+++ b/tests/expected/lscpu/lscpu-s390-nested-virt -@@ -1,34 +1,29 @@ --CPU op-mode(s): 32-bit, 64-bit --CPU(s): 2 --On-line CPU(s) list: 0,1 --Thread(s) per core: 1 --Core(s) per socket: 1 --Socket(s) per book: 1 --Book(s) per drawer: 1 --Drawer(s): 2 --NUMA node(s): 1 --Vendor ID: IBM/S390 --Machine type: 2964 --CPU dynamic MHz: 5000 --CPU static MHz: 5000 --BogoMIPS: 3033.00 --Hypervisor: KVM/Linux --Hypervisor vendor: KVM --Virtualization type: full --Dispatching mode: horizontal --L1d cache: 256 KiB --L1i cache: 192 KiB --L2d cache: 4 MiB --L2i cache: 4 MiB --L3 cache: 64 MiB --L4 cache: 480 MiB --NUMA node0 CPU(s): 0,1 --Vulnerability L1tf: Not affected --Vulnerability Meltdown: Not affected --Vulnerability Spec store bypass: Not affected --Vulnerability Spectre v1: Mitigation; __user pointer sanitization --Vulnerability Spectre v2: Mitigation; execute trampolines --Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx -+CPU op-mode(s): 32-bit, 64-bit -+CPU(s): 2 -+On-line CPU(s) list: 0,1 -+Thread(s) per core: 1 -+Core(s) per socket: 1 -+Socket(s) per book: 1 -+Book(s) per drawer: 1 -+Drawer(s): 2 -+NUMA node(s): 1 -+Vendor ID: IBM/S390 -+Machine type: 2964 -+CPU dynamic MHz: 5000 -+CPU static MHz: 5000 -+BogoMIPS: 3033.00 -+Hypervisor: KVM/Linux -+Hypervisor vendor: KVM -+Virtualization type: full -+Dispatching mode: horizontal -+L1d cache: 128K -+L1i cache: 96K -+L2d cache: 2048K -+L2i cache: 2048K -+L3 cache: 65536K -+L4 cache: 491520K -+NUMA node0 CPU(s): 0,1 -+Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx - - # The following is the parsable format, which can be fed to other - # programs. Each different item in every column has an unique ID --- -2.21.0 - diff --git a/SOURCES/0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch b/SOURCES/0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch deleted file mode 100644 index 99cdd50..0000000 --- a/SOURCES/0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 60f97394878d8b540ee6a4fb9c9edaae2f90d0d0 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 17 Dec 2019 18:10:31 +0100 -Subject: [PATCH] tests: (fdisk) make sure we use the same sizes for MD devices - -It seems on some kernels MD can return error if the devices in RAID -have different size - - # mdadm -q --create /dev/md8 --chunk=64 --level=0 --raid-devices=2 /dev/sda1 /dev/sda2 - mdadm: RUN_ARRAY failed: Unknown error 524 - - # dmesg - ... - [ 1485.148435] md/raid0:md8: cannot assemble multi-zone RAID0 with default_layout setting - [ 1485.152306] md/raid0: please set raid.default_layout to 1 or 2 - [ 1485.154050] md: pers->run() failed ... - [ 1485.154104] md: md8 stopped. - -Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1784534 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/expected/fdisk/align-512-4K-md | 12 ++++++------ - tests/ts/fdisk/align-512-4K-md | 4 ++-- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md -index caca03154..3690c04c2 100644 ---- a/tests/expected/fdisk/align-512-4K-md -+++ b/tests/expected/fdisk/align-512-4K-md -@@ -16,7 +16,7 @@ Created a new <removed>. - Command (m for help): Partition type - p primary (1 primary, 0 extended, 3 free) - e extended (container for logical partitions) --Select (default p): Partition number (2-4, default 2): First sector (43008-102399, default 43008): Last sector, +sectors or +size{K,M,G,T,P} (43008-102399, default 102399): -+Select (default p): Partition number (2-4, default 2): First sector (51199-102399, default 51200): Last sector, +sectors or +size{K,M,G,T,P} (51200-102399, default 102399): - Created a new <removed>. - - Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors -@@ -27,8 +27,8 @@ Disklabel type: dos - Disk identifier: <removed> - - Device Boot Start End Sectors Size Id Type --<removed>1 2048 43007 40960 20M 83 Linux --<removed>2 43008 102399 59392 29M 83 Linux -+<removed>1 2048 51198 49151 24M 83 Linux -+<removed>2 51200 100350 49151 24M 83 Linux - - Command (m for help): The partition table has been altered. - Calling ioctl() to re-read partition table. -@@ -49,16 +49,16 @@ Created a new <removed>. - Command (m for help): Partition type - p primary (0 primary, 0 extended, 4 free) - e extended (container for logical partitions) --Select (default p): Partition number (1-4, default 1): First sector (2048-100095, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-100095, default 100095): -+Select (default p): Partition number (1-4, default 1): First sector (2048-97791, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-97791, default 97791): - Created a new <removed>. - - Command (m for help): Partition type - p primary (1 primary, 0 extended, 3 free) - e extended (container for logical partitions) --Select (default p): Partition number (2-4, default 2): First sector (22528-100095, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-100095, default 100095): -+Select (default p): Partition number (2-4, default 2): First sector (22528-97791, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-97791, default 97791): - Created a new <removed>. - --Command (m for help): Disk <removed>: 48.9 MiB, 51249152 bytes, 100096 sectors -+Command (m for help): Disk <removed>: 47.8 MiB, 50069504 bytes, 97792 sectors - Units: sectors of 1 * 512 = 512 bytes - Sector size (logical/physical): 512 bytes / 4096 bytes - I/O size (minimum/optimal): 65536 bytes / <removed> bytes -diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md -index 7f60a654f..68aaff0b7 100755 ---- a/tests/ts/fdisk/align-512-4K-md -+++ b/tests/ts/fdisk/align-512-4K-md -@@ -41,12 +41,12 @@ n - p - 1 - --+20M -++49150 - n - p - 2 - -- -++49150 - p - w - q --- -2.21.0 - diff --git a/SOURCES/0035-tests-mark-MD-tests-with-metadata-v0.90-as-KNOWN-FAI.patch b/SOURCES/0035-tests-mark-MD-tests-with-metadata-v0.90-as-KNOWN-FAI.patch deleted file mode 100644 index 8759594..0000000 --- a/SOURCES/0035-tests-mark-MD-tests-with-metadata-v0.90-as-KNOWN-FAI.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 3fd5c8e78a9758a6fc9310485d2428e300ad3b63 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 11 Jun 2020 10:55:25 +0200 -Subject: [PATCH 35/40] tests: mark MD tests with metadata v0.90 as KNOWN-FAIL - -metadata v0.90 is deprecated thing and unsupported to create by some new -mdadm versions. It's possible to assemble this array (with -default_layout=1 on modprobe raid0), but impossible to create a new -one. - -Upstream: http://github.com/karelzak/util-linux/commit/4ae96cf77b36660255d5870a4209480bbec47902 -Upstream: http://github.com/karelzak/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1826251 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/ts/blkid/md-raid0-whole | 3 +++ - tests/ts/blkid/md-raid1-part | 3 +++ - tests/ts/blkid/md-raid1-whole | 3 +++ - tests/ts/fdisk/align-512-4K-md | 3 +++ - 4 files changed, 12 insertions(+) - -diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole -index 45c6ee55b..1f3fc2634 100755 ---- a/tests/ts/blkid/md-raid0-whole -+++ b/tests/ts/blkid/md-raid0-whole -@@ -29,6 +29,9 @@ ts_skip_nonroot - ts_check_losetup - ts_check_prog "mdadm" - -+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12. -+TS_KNOWN_FAIL="yes" -+ - ts_log "Initialize devices" - IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}" - -diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part -index 3fa6395b0..3d42aadb8 100755 ---- a/tests/ts/blkid/md-raid1-part -+++ b/tests/ts/blkid/md-raid1-part -@@ -28,6 +28,9 @@ ts_check_test_command "$TS_CMD_BLKID" - ts_skip_nonroot - ts_check_prog "mdadm" - -+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12. -+TS_KNOWN_FAIL="yes" -+ - # set global variable TS_DEVICE - ts_scsi_debug_init dev_size_mb=51 sector_size=512 - -diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole -index ddf4a6934..6eba9cc8e 100755 ---- a/tests/ts/blkid/md-raid1-whole -+++ b/tests/ts/blkid/md-raid1-whole -@@ -29,6 +29,9 @@ ts_skip_nonroot - ts_check_losetup - ts_check_prog "mdadm" - -+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12. -+TS_KNOWN_FAIL="yes" -+ - ts_log "Initialize devices" - IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}" - -diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md -index 68aaff0b7..0a8e09bc1 100755 ---- a/tests/ts/fdisk/align-512-4K-md -+++ b/tests/ts/fdisk/align-512-4K-md -@@ -31,6 +31,9 @@ ts_check_test_command "$TS_CMD_FDISK" - ts_skip_nonroot - ts_check_prog "mdadm" - -+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12. -+TS_KNOWN_FAIL="yes" -+ - # set global variable TS_DEVICE - ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3 - DEVNAME=$(basename $TS_DEVICE) --- -2.25.4 - diff --git a/SOURCES/0036-libblkid-add-BitLocker-detection.patch b/SOURCES/0036-libblkid-add-BitLocker-detection.patch deleted file mode 100644 index 993bf9d..0000000 --- a/SOURCES/0036-libblkid-add-BitLocker-detection.patch +++ /dev/null @@ -1,284 +0,0 @@ -From ae7b79ff8a7fb576c018bc9a7eaf9e135b7b553e Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 24 Apr 2018 10:57:48 +0200 -Subject: [PATCH 36/40] libblkid: add BitLocker detection - -Supported: -* WinVista version -* Win7 and later versions (based on NTFS) -* BitLockerToGo (for removable media; based on FAT32) - -Unfortunately, it's without LABEL and UUID. It seems BitLocker does -not use volume_label and volume_serial stuff from NTFS header. - -Upstream: http://github.com/karelzak/util-linux/commit/136f89ce5ed8cd159a1c56b5a775dada2363ecd3 -Upstream: http://github.com/karelzak/util-linux/commit/47afae0caaa2b3440d6ac812079e3ada5f2aa0bd (bitlocker.c part) -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1812576 -Addresses: https://github.com/karelzak/util-linux/issues/617 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/Makemodule.am | 1 + - libblkid/src/superblocks/bitlocker.c | 191 +++++++++++++++++++++++++ - libblkid/src/superblocks/superblocks.c | 1 + - libblkid/src/superblocks/superblocks.h | 3 + - libblkid/src/superblocks/vfat.c | 3 + - 5 files changed, 199 insertions(+) - create mode 100644 libblkid/src/superblocks/bitlocker.c - -diff --git a/libblkid/src/Makemodule.am b/libblkid/src/Makemodule.am -index 0e1c765fb..ea0230702 100644 ---- a/libblkid/src/Makemodule.am -+++ b/libblkid/src/Makemodule.am -@@ -47,6 +47,7 @@ libblkid_la_SOURCES = \ - libblkid/src/superblocks/bcache.c \ - libblkid/src/superblocks/befs.c \ - libblkid/src/superblocks/bfs.c \ -+ libblkid/src/superblocks/bitlocker.c \ - libblkid/src/superblocks/btrfs.c \ - libblkid/src/superblocks/cramfs.c \ - libblkid/src/superblocks/ddf_raid.c \ -diff --git a/libblkid/src/superblocks/bitlocker.c b/libblkid/src/superblocks/bitlocker.c -new file mode 100644 -index 000000000..111edf39b ---- /dev/null -+++ b/libblkid/src/superblocks/bitlocker.c -@@ -0,0 +1,191 @@ -+/* -+ * Copyright (C) 2018 Karel Zak <kzak@redhat.com> -+ * -+ * This file may be redistributed under the terms of the -+ * GNU Lesser General Public License. -+ */ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <string.h> -+#include <errno.h> -+#include <ctype.h> -+#include <stdint.h> -+ -+#include "superblocks.h" -+ -+#define BDE_HDR_SIZE 512 -+#define BDE_HDR_OFFSET 0 -+ -+struct bde_header_win7 { -+/* 0 */ unsigned char boot_entry_point[3]; -+/* 3 */ unsigned char fs_signature[8]; -+/* 11 */ unsigned char __dummy1[67 - 11]; -+/* 67 */ uint32_t volume_serial; /* NTFS uses 64bit serial number */ -+/* 71 */ unsigned char volume_label[11]; /* "NO NAME\x20\x20\x20\x20" only */ -+/* 82 */ unsigned char __dummy2[160 - 82]; -+/* 160 */ unsigned char guid[16]; /* BitLocker specific GUID */ -+/* 176 */ uint64_t fve_metadata_offset; -+} __attribute__((packed)); -+ -+ -+struct bde_header_togo { -+/* 0 */ unsigned char boot_entry_point[3]; -+/* 3 */ unsigned char fs_signature[8]; -+/* 11 */ unsigned char __dummy[424 - 11]; -+/* 424 */ unsigned char guid[16]; -+/* 440 */ uint64_t fve_metadata_offset; -+} __attribute__((packed)); -+ -+ -+struct bde_fve_metadata { -+/* 0 */ unsigned char signature[8]; -+/* 8 */ uint16_t size; -+/* 10 */ uint16_t version; -+}; -+ -+enum { -+ BDE_VERSION_VISTA = 0, -+ BDE_VERSION_WIN7, -+ BDE_VERSION_TOGO -+}; -+ -+#define BDE_MAGIC_VISTA "\xeb\x52\x90-FVE-FS-" -+#define BDE_MAGIC_WIN7 "\xeb\x58\x90-FVE-FS-" -+#define BDE_MAGIC_TOGO "\xeb\x58\x90MSWIN4.1" -+ -+#define BDE_MAGIC_FVE "-FVE-FS-" -+ -+static int get_bitlocker_type(const unsigned char *buf) -+{ -+ size_t i; -+ static const char *map[] = { -+ [BDE_VERSION_VISTA] = BDE_MAGIC_VISTA, -+ [BDE_VERSION_WIN7] = BDE_MAGIC_WIN7, -+ [BDE_VERSION_TOGO] = BDE_MAGIC_TOGO -+ }; -+ -+ for (i = 0; i < ARRAY_SIZE(map); i++) { -+ if (memcmp(buf, map[i], 11) == 0) -+ return (int) i; -+ } -+ -+ return -1; -+} -+ -+/* Returns: < 0 error, 1 nothing, 0 success -+ */ -+static int get_bitlocker_headers(blkid_probe pr, -+ int *type, -+ const unsigned char **buf_hdr, -+ const unsigned char **buf_fve) -+{ -+ -+ const unsigned char *buf; -+ const struct bde_fve_metadata *fve; -+ uint64_t off = 0; -+ int kind; -+ -+ if (buf_hdr) -+ *buf_hdr = NULL; -+ if (buf_fve) -+ *buf_fve = NULL; -+ if (type) -+ *type = -1; -+ -+ buf = blkid_probe_get_buffer(pr, BDE_HDR_OFFSET, BDE_HDR_SIZE); -+ if (!buf) -+ return errno ? -errno : 1; -+ -+ kind = get_bitlocker_type(buf); -+ -+ /* Check BitLocker header */ -+ switch (kind) { -+ case BDE_VERSION_WIN7: -+ off = le64_to_cpu(((const struct bde_header_win7 *) buf)->fve_metadata_offset); -+ break; -+ case BDE_VERSION_TOGO: -+ off = le64_to_cpu(((const struct bde_header_togo *) buf)->fve_metadata_offset); -+ break; -+ case BDE_VERSION_VISTA: -+ goto done; -+ default: -+ goto nothing; -+ } -+ -+ if (!off) -+ goto nothing; -+ if (buf_hdr) -+ *buf_hdr = buf; -+ -+ /* Check Bitlocker FVE metadata header */ -+ buf = blkid_probe_get_buffer(pr, off, sizeof(struct bde_fve_metadata)); -+ if (!buf) -+ return errno ? -errno : 1; -+ -+ fve = (const struct bde_fve_metadata *) buf; -+ if (memcmp(fve->signature, BDE_MAGIC_FVE, sizeof(fve->signature)) != 0) -+ goto nothing; -+ if (buf_fve) -+ *buf_fve = buf; -+done: -+ if (type) -+ *type = kind; -+ return 0; -+nothing: -+ return 1; -+} -+ -+/* -+ * This is used by vFAT and NTFS prober to avoid collisions with bitlocker. -+ */ -+int blkid_probe_is_bitlocker(blkid_probe pr) -+{ -+ return get_bitlocker_headers(pr, NULL, NULL, NULL) == 0; -+} -+ -+static int probe_bitlocker(blkid_probe pr, -+ const struct blkid_idmag *mag __attribute__((__unused__))) -+{ -+ const unsigned char *buf_fve = NULL; -+ const unsigned char *buf_hdr = NULL; -+ int rc, kind; -+ -+ rc = get_bitlocker_headers(pr, &kind, &buf_hdr, &buf_fve); -+ if (rc) -+ return rc; -+ -+ if (kind == BDE_VERSION_WIN7) { -+ const struct bde_header_win7 *hdr = (const struct bde_header_win7 *) buf_hdr; -+ -+ /* Unfortunately, it seems volume_serial is always zero */ -+ blkid_probe_sprintf_uuid(pr, -+ (const unsigned char *) &hdr->volume_serial, -+ sizeof(hdr->volume_serial), -+ "%016d", le32_to_cpu(hdr->volume_serial)); -+ } -+ -+ if (buf_fve) { -+ const struct bde_fve_metadata *fve = (const struct bde_fve_metadata *) buf_fve; -+ -+ blkid_probe_sprintf_version(pr, "%d", fve->version); -+ } -+ return 0; -+} -+ -+/* See header details: -+ * https://github.com/libyal/libbde/blob/master/documentation/BitLocker%20Drive%20Encryption%20(BDE)%20format.asciidoc -+ */ -+const struct blkid_idinfo bitlocker_idinfo = -+{ -+ .name = "BitLocker", -+ .usage = BLKID_USAGE_CRYPTO, -+ .probefunc = probe_bitlocker, -+ .magics = -+ { -+ { .magic = BDE_MAGIC_VISTA, .len = 11 }, -+ { .magic = BDE_MAGIC_WIN7, .len = 11 }, -+ { .magic = BDE_MAGIC_TOGO, .len = 11 }, -+ { NULL } -+ } -+}; -diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c -index 076541d1a..6dfd2be64 100644 ---- a/libblkid/src/superblocks/superblocks.c -+++ b/libblkid/src/superblocks/superblocks.c -@@ -115,6 +115,7 @@ static const struct blkid_idinfo *idinfos[] = - &ubi_idinfo, - &vdo_idinfo, - &stratis_idinfo, -+ &bitlocker_idinfo, - - /* Filesystems */ - &vfat_idinfo, -diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h -index 2723fb1d5..d677f85bc 100644 ---- a/libblkid/src/superblocks/superblocks.h -+++ b/libblkid/src/superblocks/superblocks.h -@@ -81,6 +81,7 @@ extern const struct blkid_idinfo bcache_idinfo; - extern const struct blkid_idinfo mpool_idinfo; - extern const struct blkid_idinfo vdo_idinfo; - extern const struct blkid_idinfo stratis_idinfo; -+extern const struct blkid_idinfo bitlocker_idinfo; - - /* - * superblock functions -@@ -105,4 +106,6 @@ extern int blkid_probe_set_id_label(blkid_probe pr, const char *name, - extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name, - unsigned char *data, size_t len, int enc); - -+extern int blkid_probe_is_bitlocker(blkid_probe pr); -+ - #endif /* _BLKID_SUPERBLOCKS_H */ -diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c -index 3aeba018a..29b3c501c 100644 ---- a/libblkid/src/superblocks/vfat.c -+++ b/libblkid/src/superblocks/vfat.c -@@ -268,6 +268,9 @@ static int fat_valid_superblock(blkid_probe pr, - } - } - -+ if (blkid_probe_is_bitlocker(pr)) -+ return 0; -+ - return 1; /* valid */ - } - --- -2.25.4 - diff --git a/SOURCES/0037-blkid-retport-block-size-of-a-filesystem.patch b/SOURCES/0037-blkid-retport-block-size-of-a-filesystem.patch deleted file mode 100644 index 2795684..0000000 --- a/SOURCES/0037-blkid-retport-block-size-of-a-filesystem.patch +++ /dev/null @@ -1,1121 +0,0 @@ -From 9e9355c71c031f4d7445c30cb39bd6b33c10ff9d Mon Sep 17 00:00:00 2001 -From: Mikulas Patocka <mpatocka@redhat.com> -Date: Mon, 2 Sep 2019 12:28:39 +0200 -Subject: [PATCH 37/40] blkid: retport block size of a filesystem - -This patch extends libblkid, so that it reports filesystem block size. - -When blkid returns a specific number in the BLOCK_SIZE attribute, it -guarantees that all the bios submitted by the filesystem are aligned on -this boundary. - -We need this because when we want to enable dm-integrity or dm-writecache -on an existing filesystem, we need to know filesystem block size, so that -dm-integrity or dm-writecache is initialized with matching block size. - -We could always use block size 512 for dm-integrity and dm-writecache, but -that would cause metadata overhead and performance degradation. On the -other hand, if we used block size 4096, it would fail if the filesystem -has smaller blocksize. - -[kzak@redhat.com: - move vfat BLOCK_SIZE to probing function - - remove unwanted debug fprintf from ZFS prober] - -RHEL-8.3: add regression tests updates to teh patch too - -Upstream: http://github.com/karelzak/util-linux/commit/cd129b7d2fecd5f2013512936de2db1bf244aa75 -Upstream: http://github.com/karelzak/util-linux/commit/e7d318a9dd63c9fae8f07754ce12aa9af4dce089 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1817726 -Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/superblocks/befs.c | 3 + - libblkid/src/superblocks/btrfs.c | 1 + - libblkid/src/superblocks/exfat.c | 2 + - libblkid/src/superblocks/exfs.c | 4 + - libblkid/src/superblocks/ext.c | 3 + - libblkid/src/superblocks/f2fs.c | 2 + - libblkid/src/superblocks/gfs.c | 1 + - libblkid/src/superblocks/hfs.c | 2 + - libblkid/src/superblocks/hpfs.c | 1 + - libblkid/src/superblocks/iso9660.c | 2 + - libblkid/src/superblocks/jfs.c | 1 + - libblkid/src/superblocks/minix.c | 5 ++ - libblkid/src/superblocks/nilfs.c | 3 + - libblkid/src/superblocks/ntfs.c | 2 + - libblkid/src/superblocks/ocfs.c | 3 + - libblkid/src/superblocks/reiserfs.c | 10 ++- - libblkid/src/superblocks/romfs.c | 3 + - libblkid/src/superblocks/squashfs.c | 2 + - libblkid/src/superblocks/superblocks.c | 7 ++ - libblkid/src/superblocks/superblocks.h | 2 + - libblkid/src/superblocks/udf.c | 2 + - libblkid/src/superblocks/ufs.c | 5 ++ - libblkid/src/superblocks/vfat.c | 2 + - libblkid/src/superblocks/vxfs.c | 18 ++++- - libblkid/src/superblocks/xfs.c | 1 + - libblkid/src/superblocks/zfs.c | 74 ++++++++++++++----- - tests/expected/blkid/low-probe-befs | 1 + - tests/expected/blkid/low-probe-exfat | 1 + - tests/expected/blkid/low-probe-ext2 | 1 + - tests/expected/blkid/low-probe-ext3 | 1 + - tests/expected/blkid/low-probe-f2fs | 1 + - tests/expected/blkid/low-probe-fat | 1 + - tests/expected/blkid/low-probe-fat16_noheads | 1 + - .../blkid/low-probe-fat32_cp850_O_tilde | 1 + - .../expected/blkid/low-probe-fat32_label_64MB | 1 + - tests/expected/blkid/low-probe-gfs2 | 1 + - tests/expected/blkid/low-probe-hfsplus | 1 + - tests/expected/blkid/low-probe-hpfs | 1 + - tests/expected/blkid/low-probe-iso | 1 + - tests/expected/blkid/low-probe-iso-joliet | 1 + - tests/expected/blkid/low-probe-iso-rr-joliet | 1 + - tests/expected/blkid/low-probe-jbd | 1 + - tests/expected/blkid/low-probe-jfs | 1 + - tests/expected/blkid/low-probe-minix-BE | 1 + - tests/expected/blkid/low-probe-minix-LE | 1 + - tests/expected/blkid/low-probe-nilfs2 | 1 + - tests/expected/blkid/low-probe-ntfs | 1 + - tests/expected/blkid/low-probe-ocfs2 | 1 + - tests/expected/blkid/low-probe-reiser3 | 1 + - tests/expected/blkid/low-probe-reiser4 | 1 + - tests/expected/blkid/low-probe-romfs | 1 + - tests/expected/blkid/low-probe-small-fat32 | 1 + - tests/expected/blkid/low-probe-udf | 1 + - .../blkid/low-probe-udf-bdr-2.60-nero | 1 + - .../blkid/low-probe-udf-cd-mkudfiso-20100208 | 1 + - tests/expected/blkid/low-probe-udf-cd-nero-6 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-1 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-2 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-3 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-4 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-5 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-6 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-7 | 1 + - .../blkid/low-probe-udf-hdd-mkudffs-1.3-8 | 1 + - .../blkid/low-probe-udf-hdd-udfclient-0.7.5 | 1 + - .../blkid/low-probe-udf-hdd-udfclient-0.7.7 | 1 + - tests/expected/blkid/low-probe-udf-hdd-win7 | 1 + - tests/expected/blkid/low-probe-ufs | 1 + - tests/expected/blkid/low-probe-xfs | 1 + - tests/expected/blkid/low-probe-zfs | 1 + - 72 files changed, 186 insertions(+), 21 deletions(-) - -diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c -index 14af97217..516d80093 100644 ---- a/libblkid/src/superblocks/befs.c -+++ b/libblkid/src/superblocks/befs.c -@@ -519,6 +519,9 @@ static int probe_befs(blkid_probe pr, const struct blkid_idmag *mag) - blkid_probe_sprintf_uuid(pr, (unsigned char *) &volume_id, - sizeof(volume_id), "%016" PRIx64, - FS64_TO_CPU(volume_id, fs_le)); -+ -+ blkid_probe_set_block_size(pr, block_size); -+ - return BLKID_PROBE_OK; - } - -diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c -index 7ce3dfff8..f0fde700d 100644 ---- a/libblkid/src/superblocks/btrfs.c -+++ b/libblkid/src/superblocks/btrfs.c -@@ -74,6 +74,7 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag) - - blkid_probe_set_uuid(pr, bfs->fsid); - blkid_probe_set_uuid_as(pr, bfs->dev_item.uuid, "UUID_SUB"); -+ blkid_probe_set_block_size(pr, le32_to_cpu(bfs->sectorsize)); - - return 0; - } -diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c -index 4bf92eac8..7622320d3 100644 ---- a/libblkid/src/superblocks/exfat.c -+++ b/libblkid/src/superblocks/exfat.c -@@ -137,6 +137,8 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag) - blkid_probe_sprintf_version(pr, "%u.%u", - sb->version.vermaj, sb->version.vermin); - -+ blkid_probe_set_block_size(pr, BLOCK_SIZE(sb)); -+ - return BLKID_PROBE_OK; - } - -diff --git a/libblkid/src/superblocks/exfs.c b/libblkid/src/superblocks/exfs.c -index f717b6530..e0eafafc6 100644 ---- a/libblkid/src/superblocks/exfs.c -+++ b/libblkid/src/superblocks/exfs.c -@@ -170,7 +170,11 @@ static int probe_exfs(blkid_probe pr, const struct blkid_idmag *mag) - if (*xs->sb_fname != '\0') - blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname, - sizeof(xs->sb_fname)); -+ - blkid_probe_set_uuid(pr, xs->sb_uuid); -+ -+ blkid_probe_set_block_size(pr, be32_to_cpu(xs->sb_blocksize)); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/ext.c b/libblkid/src/superblocks/ext.c -index caf82c171..3870522fa 100644 ---- a/libblkid/src/superblocks/ext.c -+++ b/libblkid/src/superblocks/ext.c -@@ -187,6 +187,9 @@ static void ext_get_info(blkid_probe pr, int ver, struct ext2_super_block *es) - blkid_probe_sprintf_version(pr, "%u.%u", - le32_to_cpu(es->s_rev_level), - le16_to_cpu(es->s_minor_rev_level)); -+ -+ if (le32_to_cpu(es->s_log_block_size) < 32) -+ blkid_probe_set_block_size(pr, 1024U << le32_to_cpu(es->s_log_block_size)); - } - - -diff --git a/libblkid/src/superblocks/f2fs.c b/libblkid/src/superblocks/f2fs.c -index d1bf25a3a..255ef6384 100644 ---- a/libblkid/src/superblocks/f2fs.c -+++ b/libblkid/src/superblocks/f2fs.c -@@ -78,6 +78,8 @@ static int probe_f2fs(blkid_probe pr, const struct blkid_idmag *mag) - - blkid_probe_set_uuid(pr, sb->uuid); - blkid_probe_sprintf_version(pr, "%u.%u", vermaj, vermin); -+ if (le32_to_cpu(sb->log_blocksize) < 32) -+ blkid_probe_set_block_size(pr, 1U << le32_to_cpu(sb->log_blocksize)); - return 0; - } - -diff --git a/libblkid/src/superblocks/gfs.c b/libblkid/src/superblocks/gfs.c -index ea6036cb7..e22a6a3f9 100644 ---- a/libblkid/src/superblocks/gfs.c -+++ b/libblkid/src/superblocks/gfs.c -@@ -98,6 +98,7 @@ static int probe_gfs2(blkid_probe pr, const struct blkid_idmag *mag) - sizeof(sbd->sb_locktable)); - blkid_probe_set_uuid(pr, sbd->sb_uuid); - blkid_probe_set_version(pr, "1"); -+ blkid_probe_set_block_size(pr, be32_to_cpu(sbd->sb_bsize)); - return 0; - } - return 1; -diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c -index 7b0117405..185c42c92 100644 ---- a/libblkid/src/superblocks/hfs.c -+++ b/libblkid/src/superblocks/hfs.c -@@ -241,6 +241,8 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag) - if (blocksize < HFSPLUS_SECTOR_SIZE) - return 1; - -+ blkid_probe_set_block_size(pr, blocksize); -+ - memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); - cat_block = be32_to_cpu(extents[0].start_block); - -diff --git a/libblkid/src/superblocks/hpfs.c b/libblkid/src/superblocks/hpfs.c -index 0565d370c..dcf4520b6 100644 ---- a/libblkid/src/superblocks/hpfs.c -+++ b/libblkid/src/superblocks/hpfs.c -@@ -99,6 +99,7 @@ static int probe_hpfs(blkid_probe pr, const struct blkid_idmag *mag) - hbb->vol_serno[1], hbb->vol_serno[0]); - } - blkid_probe_sprintf_version(pr, "%u", version); -+ blkid_probe_set_block_size(pr, 512); - - return 0; - } -diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c -index 7356754ee..8dc2e5394 100644 ---- a/libblkid/src/superblocks/iso9660.c -+++ b/libblkid/src/superblocks/iso9660.c -@@ -182,6 +182,8 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) - - memcpy(label, iso->volume_id, sizeof(label)); - -+ blkid_probe_set_block_size(pr, 2048); -+ - if (!is_str_empty(iso->system_id, sizeof(iso->system_id))) - blkid_probe_set_id_label(pr, "SYSTEM_ID", - iso->system_id, sizeof(iso->system_id)); -diff --git a/libblkid/src/superblocks/jfs.c b/libblkid/src/superblocks/jfs.c -index 0f956ef00..3de8c2e3d 100644 ---- a/libblkid/src/superblocks/jfs.c -+++ b/libblkid/src/superblocks/jfs.c -@@ -52,6 +52,7 @@ static int probe_jfs(blkid_probe pr, const struct blkid_idmag *mag) - if (*((char *) js->js_label) != '\0') - blkid_probe_set_label(pr, js->js_label, sizeof(js->js_label)); - blkid_probe_set_uuid(pr, js->js_uuid); -+ blkid_probe_set_block_size(pr, le32_to_cpu(js->js_bsize)); - return 0; - } - -diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c -index c47378d73..674a1f17b 100644 ---- a/libblkid/src/superblocks/minix.c -+++ b/libblkid/src/superblocks/minix.c -@@ -80,6 +80,7 @@ static int probe_minix(blkid_probe pr, - unsigned long zones, ninodes, imaps, zmaps; - off_t firstz; - size_t zone_size; -+ unsigned block_size; - - data = blkid_probe_get_buffer(pr, 1024, - max(sizeof(struct minix_super_block), -@@ -103,6 +104,7 @@ static int probe_minix(blkid_probe pr, - zmaps = minix_swab16(swabme, sb->s_zmap_blocks); - firstz = minix_swab16(swabme, sb->s_firstdatazone); - zone_size = sb->s_log_zone_size; -+ block_size = 1024; - break; - } - case 3: { -@@ -114,6 +116,8 @@ static int probe_minix(blkid_probe pr, - zmaps = minix_swab16(swabme, sb->s_zmap_blocks); - firstz = minix_swab16(swabme, sb->s_firstdatazone); - zone_size = sb->s_log_zone_size; -+ block_size = minix_swab16(swabme, sb->s_blocksize); -+ - break; - } - default: -@@ -143,6 +147,7 @@ static int probe_minix(blkid_probe pr, - return 1; - - blkid_probe_sprintf_version(pr, "%d", version); -+ blkid_probe_set_block_size(pr, block_size); - return 0; - } - -diff --git a/libblkid/src/superblocks/nilfs.c b/libblkid/src/superblocks/nilfs.c -index 95538ef7b..423bd1ac4 100644 ---- a/libblkid/src/superblocks/nilfs.c -+++ b/libblkid/src/superblocks/nilfs.c -@@ -157,6 +157,9 @@ static int probe_nilfs2(blkid_probe pr, - (unsigned char *) &sb->s_magic)) - return 1; - -+ if (le32_to_cpu(sb->s_log_block_size) < 32) -+ blkid_probe_set_block_size(pr, 1024U << le32_to_cpu(sb->s_log_block_size)); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c -index 32973095b..5bfebbb78 100644 ---- a/libblkid/src/superblocks/ntfs.c -+++ b/libblkid/src/superblocks/ntfs.c -@@ -206,6 +206,8 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag) - attr_off += attr_len; - } - -+ blkid_probe_set_block_size(pr, sector_size); -+ - blkid_probe_sprintf_uuid(pr, - (unsigned char *) &ns->volume_serial, - sizeof(ns->volume_serial), -diff --git a/libblkid/src/superblocks/ocfs.c b/libblkid/src/superblocks/ocfs.c -index 3fe199d3f..463ed7bcf 100644 ---- a/libblkid/src/superblocks/ocfs.c -+++ b/libblkid/src/superblocks/ocfs.c -@@ -153,6 +153,9 @@ static int probe_ocfs2(blkid_probe pr, const struct blkid_idmag *mag) - le16_to_cpu(osb->s_major_rev_level), - le16_to_cpu(osb->s_minor_rev_level)); - -+ if (le32_to_cpu(osb->s_blocksize_bits) < 32) -+ blkid_probe_set_block_size(pr, 1U << le32_to_cpu(osb->s_blocksize_bits)); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/reiserfs.c b/libblkid/src/superblocks/reiserfs.c -index edbaaa946..6c5e5b0d7 100644 ---- a/libblkid/src/superblocks/reiserfs.c -+++ b/libblkid/src/superblocks/reiserfs.c -@@ -32,7 +32,8 @@ struct reiserfs_super_block { - - struct reiser4_super_block { - unsigned char rs4_magic[16]; -- uint16_t rs4_dummy[2]; -+ uint8_t rs4_dummy[3]; -+ uint8_t rs4_blocksize; - unsigned char rs4_uuid[16]; - unsigned char rs4_label[16]; - uint64_t rs4_dummy2; -@@ -73,22 +74,29 @@ static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag) - else - blkid_probe_set_version(pr, "3.5"); - -+ blkid_probe_set_block_size(pr, blocksize); -+ - return 0; - } - - static int probe_reiser4(blkid_probe pr, const struct blkid_idmag *mag) - { - struct reiser4_super_block *rs4; -+ unsigned int blocksize; - - rs4 = blkid_probe_get_sb(pr, mag, struct reiser4_super_block); - if (!rs4) - return errno ? -errno : 1; - -+ blocksize = rs4->rs4_blocksize * 256; -+ - if (*rs4->rs4_label) - blkid_probe_set_label(pr, rs4->rs4_label, sizeof(rs4->rs4_label)); - blkid_probe_set_uuid(pr, rs4->rs4_uuid); - blkid_probe_set_version(pr, "4"); - -+ blkid_probe_set_block_size(pr, blocksize); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/romfs.c b/libblkid/src/superblocks/romfs.c -index f3e9f8b05..1c2ac4315 100644 ---- a/libblkid/src/superblocks/romfs.c -+++ b/libblkid/src/superblocks/romfs.c -@@ -34,6 +34,9 @@ static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag) - if (*((char *) ros->ros_volume) != '\0') - blkid_probe_set_label(pr, ros->ros_volume, - sizeof(ros->ros_volume)); -+ -+ blkid_probe_set_block_size(pr, 1024); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/squashfs.c b/libblkid/src/superblocks/squashfs.c -index 7364beca2..4db842493 100644 ---- a/libblkid/src/superblocks/squashfs.c -+++ b/libblkid/src/superblocks/squashfs.c -@@ -71,6 +71,8 @@ static int probe_squashfs3(blkid_probe pr, const struct blkid_idmag *mag) - - blkid_probe_sprintf_version(pr, "%u.%u", vermaj, vermin); - -+ blkid_probe_set_block_size(pr, 1024); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c -index 6dfd2be64..a86a055fe 100644 ---- a/libblkid/src/superblocks/superblocks.c -+++ b/libblkid/src/superblocks/superblocks.c -@@ -74,6 +74,8 @@ - * @APPLICATION_ID: ISO9660 application identifier - * - * @BOOT_SYSTEM_ID: ISO9660 boot system identifier -+ * -+ * @BLOCK_SIZE: block size - */ - - static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn); -@@ -550,6 +552,11 @@ int blkid_probe_sprintf_version(blkid_probe pr, const char *fmt, ...) - return rc; - } - -+int blkid_probe_set_block_size(blkid_probe pr, unsigned block_size) -+{ -+ return blkid_probe_sprintf_value(pr, "BLOCK_SIZE", "%u", block_size); -+} -+ - static int blkid_probe_set_usage(blkid_probe pr, int usage) - { - struct blkid_chain *chn = blkid_probe_get_chain(pr); -diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h -index d677f85bc..d09046cfd 100644 ---- a/libblkid/src/superblocks/superblocks.h -+++ b/libblkid/src/superblocks/superblocks.h -@@ -106,6 +106,8 @@ extern int blkid_probe_set_id_label(blkid_probe pr, const char *name, - extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name, - unsigned char *data, size_t len, int enc); - -+int blkid_probe_set_block_size(blkid_probe pr, unsigned block_size); -+ - extern int blkid_probe_is_bitlocker(blkid_probe pr); - - #endif /* _BLKID_SUPERBLOCKS_H */ -diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c -index 97e79dab0..1ab8a1e26 100644 ---- a/libblkid/src/superblocks/udf.c -+++ b/libblkid/src/superblocks/udf.c -@@ -464,6 +464,8 @@ real_blksz: - * E.g. number 0x0150 is revision 1.50, number 0x0201 is revision 2.01. */ - blkid_probe_sprintf_version(pr, "%x.%02x", (unsigned int)(udf_rev >> 8), (unsigned int)(udf_rev & 0xFF)); - -+ blkid_probe_set_block_size(pr, bs); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/ufs.c b/libblkid/src/superblocks/ufs.c -index 6ef2acddc..7a8396c1c 100644 ---- a/libblkid/src/superblocks/ufs.c -+++ b/libblkid/src/superblocks/ufs.c -@@ -233,6 +233,11 @@ found: - (unsigned char *) &ufs->fs_magic)) - return 1; - -+ if (!is_be) -+ blkid_probe_set_block_size(pr, le32_to_cpu(ufs->fs_fsize)); -+ else -+ blkid_probe_set_block_size(pr, be32_to_cpu(ufs->fs_fsize)); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c -index 29b3c501c..4e93a0e41 100644 ---- a/libblkid/src/superblocks/vfat.c -+++ b/libblkid/src/superblocks/vfat.c -@@ -436,6 +436,8 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) - if (version) - blkid_probe_set_version(pr, version); - -+ blkid_probe_set_block_size(pr, sector_size); -+ - return 0; - } - -diff --git a/libblkid/src/superblocks/vxfs.c b/libblkid/src/superblocks/vxfs.c -index 19d284cbf..d9d26adcf 100644 ---- a/libblkid/src/superblocks/vxfs.c -+++ b/libblkid/src/superblocks/vxfs.c -@@ -12,6 +12,15 @@ - struct vxfs_super_block { - uint32_t vs_magic; - int32_t vs_version; -+ uint32_t vs_ctime; -+ uint32_t vs_cutime; -+ uint32_t __unused1; -+ uint32_t __unused2; -+ uint32_t vs_old_logstart; -+ uint32_t vs_old_logend; -+ uint32_t vs_bsize; -+ uint32_t vs_size; -+ uint32_t vs_dsize; - }; - - static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag) -@@ -22,7 +31,13 @@ static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag) - if (!vxs) - return errno ? -errno : 1; - -- blkid_probe_sprintf_version(pr, "%u", (unsigned int) vxs->vs_version); -+ if (le32_to_cpu(vxs->vs_magic) == 0xa501fcf5) { -+ blkid_probe_sprintf_version(pr, "%u", (unsigned int)le32_to_cpu(vxs->vs_version)); -+ blkid_probe_set_block_size(pr, le32_to_cpu(vxs->vs_bsize)); -+ } else if (be32_to_cpu(vxs->vs_magic) == 0xa501fcf5) { -+ blkid_probe_sprintf_version(pr, "%u", (unsigned int)be32_to_cpu(vxs->vs_version)); -+ blkid_probe_set_block_size(pr, be32_to_cpu(vxs->vs_bsize)); -+ } - return 0; - } - -@@ -35,6 +50,7 @@ const struct blkid_idinfo vxfs_idinfo = - .magics = - { - { .magic = "\365\374\001\245", .len = 4, .kboff = 1 }, -+ { .magic = "\245\001\374\365", .len = 4, .kboff = 8 }, - { NULL } - } - }; -diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c -index 99848f900..eb513ac3e 100644 ---- a/libblkid/src/superblocks/xfs.c -+++ b/libblkid/src/superblocks/xfs.c -@@ -173,6 +173,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) - blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname, - sizeof(xs->sb_fname)); - blkid_probe_set_uuid(pr, xs->sb_uuid); -+ blkid_probe_set_block_size(pr, xs->sb_sectsize * 256); - return 0; - } - -diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c -index ec3e1c5bf..cc779c02a 100644 ---- a/libblkid/src/superblocks/zfs.c -+++ b/libblkid/src/superblocks/zfs.c -@@ -37,6 +37,7 @@ struct zfs_uberblock { - - #define DATA_TYPE_UINT64 8 - #define DATA_TYPE_STRING 9 -+#define DATA_TYPE_DIRECTORY 19 - - struct nvpair { - uint32_t nvp_size; -@@ -60,32 +61,37 @@ struct nvuint64 { - uint64_t nvu_value; - }; - -+struct nvdirectory { -+ uint32_t nvd_type; -+ uint32_t nvd_unknown[3]; -+}; -+ - struct nvlist { - uint32_t nvl_unknown[3]; - struct nvpair nvl_nvpair; - }; - --static int zfs_process_value(blkid_probe pr, char *name, size_t namelen, -- void *value, size_t max_value_size) -+static void zfs_process_value(blkid_probe pr, char *name, size_t namelen, -+ void *value, size_t max_value_size, unsigned directory_level) - { - if (strncmp(name, "name", namelen) == 0 && -- sizeof(struct nvstring) <= max_value_size) { -+ sizeof(struct nvstring) <= max_value_size && -+ !directory_level) { - struct nvstring *nvs = value; - uint32_t nvs_type = be32_to_cpu(nvs->nvs_type); - uint32_t nvs_strlen = be32_to_cpu(nvs->nvs_strlen); - - if (nvs_type != DATA_TYPE_STRING || - (uint64_t)nvs_strlen + sizeof(*nvs) > max_value_size) -- return 0; -+ return; - - DBG(LOWPROBE, ul_debug("nvstring: type %u string %*s\n", - nvs_type, nvs_strlen, nvs->nvs_string)); - - blkid_probe_set_label(pr, nvs->nvs_string, nvs_strlen); -- -- return 1; - } else if (strncmp(name, "guid", namelen) == 0 && -- sizeof(struct nvuint64) <= max_value_size) { -+ sizeof(struct nvuint64) <= max_value_size && -+ !directory_level) { - struct nvuint64 *nvu = value; - uint32_t nvu_type = be32_to_cpu(nvu->nvu_type); - uint64_t nvu_value; -@@ -94,17 +100,16 @@ static int zfs_process_value(blkid_probe pr, char *name, size_t namelen, - nvu_value = be64_to_cpu(nvu_value); - - if (nvu_type != DATA_TYPE_UINT64) -- return 0; -+ return; - - DBG(LOWPROBE, ul_debug("nvuint64: type %u value %"PRIu64"\n", - nvu_type, nvu_value)); - - blkid_probe_sprintf_value(pr, "UUID_SUB", - "%"PRIu64, nvu_value); -- -- return 1; - } else if (strncmp(name, "pool_guid", namelen) == 0 && -- sizeof(struct nvuint64) <= max_value_size) { -+ sizeof(struct nvuint64) <= max_value_size && -+ !directory_level) { - struct nvuint64 *nvu = value; - uint32_t nvu_type = be32_to_cpu(nvu->nvu_type); - uint64_t nvu_value; -@@ -113,7 +118,7 @@ static int zfs_process_value(blkid_probe pr, char *name, size_t namelen, - nvu_value = be64_to_cpu(nvu_value); - - if (nvu_type != DATA_TYPE_UINT64) -- return 0; -+ return; - - DBG(LOWPROBE, ul_debug("nvuint64: type %u value %"PRIu64"\n", - nvu_type, nvu_value)); -@@ -121,10 +126,21 @@ static int zfs_process_value(blkid_probe pr, char *name, size_t namelen, - blkid_probe_sprintf_uuid(pr, (unsigned char *) &nvu_value, - sizeof(nvu_value), - "%"PRIu64, nvu_value); -- return 1; -- } -+ } else if (strncmp(name, "ashift", namelen) == 0 && -+ sizeof(struct nvuint64) <= max_value_size) { -+ struct nvuint64 *nvu = value; -+ uint32_t nvu_type = be32_to_cpu(nvu->nvu_type); -+ uint64_t nvu_value; - -- return 0; -+ memcpy(&nvu_value, &nvu->nvu_value, sizeof(nvu_value)); -+ nvu_value = be64_to_cpu(nvu_value); -+ -+ if (nvu_type != DATA_TYPE_UINT64) -+ return; -+ -+ if (nvu_value < 32) -+ blkid_probe_set_block_size(pr, 1U << nvu_value); -+ } - } - - static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) -@@ -133,7 +149,7 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) - struct nvlist *nvl; - struct nvpair *nvp; - size_t left = 4096; -- int found = 0; -+ unsigned directory_level = 0; - - offset = (offset & ~(VDEV_LABEL_SIZE - 1)) + VDEV_LABEL_NVPAIR; - -@@ -152,13 +168,21 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) - nvp = &nvl->nvl_nvpair; - left -= (unsigned char *)nvp - p; /* Already used up 12 bytes */ - -- while (left > sizeof(*nvp) && nvp->nvp_size != 0 && found < 3) { -+ while (left > sizeof(*nvp)) { - uint32_t nvp_size = be32_to_cpu(nvp->nvp_size); - uint32_t nvp_namelen = be32_to_cpu(nvp->nvp_namelen); - uint64_t namesize = ((uint64_t)nvp_namelen + 3) & ~3; - size_t max_value_size; - void *value; - -+ if (!nvp->nvp_size) { -+ if (!directory_level) -+ break; -+ directory_level--; -+ nvp_size = 8; -+ goto cont; -+ } -+ - DBG(LOWPROBE, ul_debug("left %zd nvp_size %u\n", - left, nvp_size)); - -@@ -174,9 +198,21 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) - max_value_size = nvp_size - (namesize + sizeof(*nvp)); - value = nvp->nvp_name + namesize; - -- found += zfs_process_value(pr, nvp->nvp_name, nvp_namelen, -- value, max_value_size); -+ if (sizeof(struct nvdirectory) <= max_value_size) { -+ struct nvdirectory *nvu = value; -+ if (be32_to_cpu(nvu->nvd_type) == DATA_TYPE_DIRECTORY) { -+ nvp_size = sizeof(*nvp) + namesize + sizeof(*nvu); -+ directory_level++; -+ goto cont; -+ } -+ } -+ -+ zfs_process_value(pr, nvp->nvp_name, nvp_namelen, -+ value, max_value_size, directory_level); - -+cont: -+ if (nvp_size > left) -+ break; - left -= nvp_size; - - nvp = (struct nvpair *)((char *)nvp + nvp_size); -diff --git a/tests/expected/blkid/low-probe-befs b/tests/expected/blkid/low-probe-befs -index b7f25cdd2..5717049d2 100644 ---- a/tests/expected/blkid/low-probe-befs -+++ b/tests/expected/blkid/low-probe-befs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LABEL=befs_test - ID_FS_LABEL_ENC=befs_test - ID_FS_TYPE=befs -diff --git a/tests/expected/blkid/low-probe-exfat b/tests/expected/blkid/low-probe-exfat -index b9defbdf9..59cb35225 100644 ---- a/tests/expected/blkid/low-probe-exfat -+++ b/tests/expected/blkid/low-probe-exfat -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=Новый_том - ID_FS_LABEL_ENC=Новый\x20том - ID_FS_TYPE=exfat -diff --git a/tests/expected/blkid/low-probe-ext2 b/tests/expected/blkid/low-probe-ext2 -index c70b85698..087da97a4 100644 ---- a/tests/expected/blkid/low-probe-ext2 -+++ b/tests/expected/blkid/low-probe-ext2 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LABEL=test-ext2 - ID_FS_LABEL_ENC=test-ext2 - ID_FS_TYPE=ext2 -diff --git a/tests/expected/blkid/low-probe-ext3 b/tests/expected/blkid/low-probe-ext3 -index 4bac43f57..8684884c1 100644 ---- a/tests/expected/blkid/low-probe-ext3 -+++ b/tests/expected/blkid/low-probe-ext3 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LABEL=test-ext3 - ID_FS_LABEL_ENC=test-ext3 - ID_FS_SEC_TYPE=ext2 -diff --git a/tests/expected/blkid/low-probe-f2fs b/tests/expected/blkid/low-probe-f2fs -index ee328640e..272905125 100644 ---- a/tests/expected/blkid/low-probe-f2fs -+++ b/tests/expected/blkid/low-probe-f2fs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=test-f2fs - ID_FS_LABEL_ENC=test-f2fs - ID_FS_TYPE=f2fs -diff --git a/tests/expected/blkid/low-probe-fat b/tests/expected/blkid/low-probe-fat -index 420121117..75f99434d 100644 ---- a/tests/expected/blkid/low-probe-fat -+++ b/tests/expected/blkid/low-probe-fat -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=TEST-FAT - ID_FS_LABEL_ENC=TEST-FAT - ID_FS_SEC_TYPE=msdos -diff --git a/tests/expected/blkid/low-probe-fat16_noheads b/tests/expected/blkid/low-probe-fat16_noheads -index ba47078d2..ff9ef2e69 100644 ---- a/tests/expected/blkid/low-probe-fat16_noheads -+++ b/tests/expected/blkid/low-probe-fat16_noheads -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=VTech_1070 - ID_FS_LABEL_ENC=VTech\x201070 - ID_FS_SEC_TYPE=msdos -diff --git a/tests/expected/blkid/low-probe-fat32_cp850_O_tilde b/tests/expected/blkid/low-probe-fat32_cp850_O_tilde -index 096bcbf2c..9ce58e3d9 100644 ---- a/tests/expected/blkid/low-probe-fat32_cp850_O_tilde -+++ b/tests/expected/blkid/low-probe-fat32_cp850_O_tilde -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=___ - ID_FS_LABEL_ENC=\xe5\xe5\xe5 - ID_FS_TYPE=vfat -diff --git a/tests/expected/blkid/low-probe-fat32_label_64MB b/tests/expected/blkid/low-probe-fat32_label_64MB -index 1179490cf..4a99f8ff6 100644 ---- a/tests/expected/blkid/low-probe-fat32_label_64MB -+++ b/tests/expected/blkid/low-probe-fat32_label_64MB -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=BINGO - ID_FS_LABEL_ENC=BINGO - ID_FS_TYPE=vfat -diff --git a/tests/expected/blkid/low-probe-gfs2 b/tests/expected/blkid/low-probe-gfs2 -index cd5a664b4..f04529bc0 100644 ---- a/tests/expected/blkid/low-probe-gfs2 -+++ b/tests/expected/blkid/low-probe-gfs2 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=mycluster:mygfs2 - ID_FS_LABEL_ENC=mycluster:mygfs2 - ID_FS_TYPE=gfs2 -diff --git a/tests/expected/blkid/low-probe-hfsplus b/tests/expected/blkid/low-probe-hfsplus -index f54b59f11..cc351a042 100644 ---- a/tests/expected/blkid/low-probe-hfsplus -+++ b/tests/expected/blkid/low-probe-hfsplus -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=123456789ABCDE - ID_FS_LABEL_ENC=123456789ABCDE - ID_FS_TYPE=hfsplus -diff --git a/tests/expected/blkid/low-probe-hpfs b/tests/expected/blkid/low-probe-hpfs -index 47ae1af28..7e4a12b97 100644 ---- a/tests/expected/blkid/low-probe-hpfs -+++ b/tests/expected/blkid/low-probe-hpfs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=P01_S16A - ID_FS_LABEL_ENC=P01\x20S16A - ID_FS_TYPE=hpfs -diff --git a/tests/expected/blkid/low-probe-iso b/tests/expected/blkid/low-probe-iso -index af9908aaa..082f0742a 100644 ---- a/tests/expected/blkid/low-probe-iso -+++ b/tests/expected/blkid/low-probe-iso -@@ -1,4 +1,5 @@ - ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=IsoVolumeName - ID_FS_LABEL_ENC=IsoVolumeName - ID_FS_SYSTEM_ID=LINUX -diff --git a/tests/expected/blkid/low-probe-iso-joliet b/tests/expected/blkid/low-probe-iso-joliet -index 0229a0d2c..06f529d03 100644 ---- a/tests/expected/blkid/low-probe-iso-joliet -+++ b/tests/expected/blkid/low-probe-iso-joliet -@@ -1,4 +1,5 @@ - ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=ThisWonderfulLabelIsVeryVeryLong - ID_FS_LABEL_ENC=ThisWonderfulLabelIsVeryVeryLong - ID_FS_SYSTEM_ID=LINUX -diff --git a/tests/expected/blkid/low-probe-iso-rr-joliet b/tests/expected/blkid/low-probe-iso-rr-joliet -index 14d550e90..bb3274db3 100644 ---- a/tests/expected/blkid/low-probe-iso-rr-joliet -+++ b/tests/expected/blkid/low-probe-iso-rr-joliet -@@ -1,4 +1,5 @@ - ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=ThisIsVolumeName - ID_FS_LABEL_ENC=ThisIsVolumeName - ID_FS_SYSTEM_ID=LINUX -diff --git a/tests/expected/blkid/low-probe-jbd b/tests/expected/blkid/low-probe-jbd -index 8dbcdbce0..c9f9f6b79 100644 ---- a/tests/expected/blkid/low-probe-jbd -+++ b/tests/expected/blkid/low-probe-jbd -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LOGUUID=0d7a07df-7b06-4829-bce7-3b9c3ece570c - ID_FS_TYPE=jbd - ID_FS_USAGE=other -diff --git a/tests/expected/blkid/low-probe-jfs b/tests/expected/blkid/low-probe-jfs -index 877fd168e..ac7d31bac 100644 ---- a/tests/expected/blkid/low-probe-jfs -+++ b/tests/expected/blkid/low-probe-jfs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=test-jfs - ID_FS_LABEL_ENC=test-jfs - ID_FS_TYPE=jfs -diff --git a/tests/expected/blkid/low-probe-minix-BE b/tests/expected/blkid/low-probe-minix-BE -index 9627799a3..f73f1b5db 100644 ---- a/tests/expected/blkid/low-probe-minix-BE -+++ b/tests/expected/blkid/low-probe-minix-BE -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_TYPE=minix - ID_FS_USAGE=filesystem - ID_FS_VERSION=1 -diff --git a/tests/expected/blkid/low-probe-minix-LE b/tests/expected/blkid/low-probe-minix-LE -index 9627799a3..f73f1b5db 100644 ---- a/tests/expected/blkid/low-probe-minix-LE -+++ b/tests/expected/blkid/low-probe-minix-LE -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_TYPE=minix - ID_FS_USAGE=filesystem - ID_FS_VERSION=1 -diff --git a/tests/expected/blkid/low-probe-nilfs2 b/tests/expected/blkid/low-probe-nilfs2 -index c6c9cab17..ff27e0b23 100644 ---- a/tests/expected/blkid/low-probe-nilfs2 -+++ b/tests/expected/blkid/low-probe-nilfs2 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=test-nilfs2 - ID_FS_LABEL_ENC=test-nilfs2 - ID_FS_TYPE=nilfs2 -diff --git a/tests/expected/blkid/low-probe-ntfs b/tests/expected/blkid/low-probe-ntfs -index aaaa077da..790157aaa 100644 ---- a/tests/expected/blkid/low-probe-ntfs -+++ b/tests/expected/blkid/low-probe-ntfs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=Новый_том - ID_FS_LABEL_ENC=Новый\x20том - ID_FS_TYPE=ntfs -diff --git a/tests/expected/blkid/low-probe-ocfs2 b/tests/expected/blkid/low-probe-ocfs2 -index 2328d21a0..9b84dbe67 100644 ---- a/tests/expected/blkid/low-probe-ocfs2 -+++ b/tests/expected/blkid/low-probe-ocfs2 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LABEL=test-ocfs2 - ID_FS_LABEL_ENC=test-ocfs2 - ID_FS_TYPE=ocfs2 -diff --git a/tests/expected/blkid/low-probe-reiser3 b/tests/expected/blkid/low-probe-reiser3 -index d376ecae1..1c4b1478d 100644 ---- a/tests/expected/blkid/low-probe-reiser3 -+++ b/tests/expected/blkid/low-probe-reiser3 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=TESTREISER - ID_FS_LABEL_ENC=TESTREISER - ID_FS_TYPE=reiserfs -diff --git a/tests/expected/blkid/low-probe-reiser4 b/tests/expected/blkid/low-probe-reiser4 -index 65d63aa65..66df064fd 100644 ---- a/tests/expected/blkid/low-probe-reiser4 -+++ b/tests/expected/blkid/low-probe-reiser4 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=TESTR4 - ID_FS_LABEL_ENC=TESTR4 - ID_FS_TYPE=reiser4 -diff --git a/tests/expected/blkid/low-probe-romfs b/tests/expected/blkid/low-probe-romfs -index 2eb982bc1..b56a6b881 100644 ---- a/tests/expected/blkid/low-probe-romfs -+++ b/tests/expected/blkid/low-probe-romfs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LABEL=test-romfs - ID_FS_LABEL_ENC=test-romfs - ID_FS_TYPE=romfs -diff --git a/tests/expected/blkid/low-probe-small-fat32 b/tests/expected/blkid/low-probe-small-fat32 -index 39239e6b3..5dba03ec3 100644 ---- a/tests/expected/blkid/low-probe-small-fat32 -+++ b/tests/expected/blkid/low-probe-small-fat32 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=TESTVFAT - ID_FS_LABEL_ENC=TESTVFAT - ID_FS_TYPE=vfat -diff --git a/tests/expected/blkid/low-probe-udf b/tests/expected/blkid/low-probe-udf -index 902fb82f0..869a335db 100644 ---- a/tests/expected/blkid/low-probe-udf -+++ b/tests/expected/blkid/low-probe-udf -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=test-udf - ID_FS_LABEL_ENC=test-udf - ID_FS_LOGICAL_VOLUME_ID=test-udf -diff --git a/tests/expected/blkid/low-probe-udf-bdr-2.60-nero b/tests/expected/blkid/low-probe-udf-bdr-2.60-nero -index c0b8867b5..fcf29b112 100644 ---- a/tests/expected/blkid/low-probe-udf-bdr-2.60-nero -+++ b/tests/expected/blkid/low-probe-udf-bdr-2.60-nero -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=Label - ID_FS_LABEL_ENC=Label - ID_FS_LOGICAL_VOLUME_ID=Label -diff --git a/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 b/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 -index f57dee08b..768d0d2f0 100644 ---- a/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 -+++ b/tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=Volume_Label - ID_FS_LABEL_ENC=Volume\x20Label - ID_FS_LOGICAL_VOLUME_ID=Volume Label -diff --git a/tests/expected/blkid/low-probe-udf-cd-nero-6 b/tests/expected/blkid/low-probe-udf-cd-nero-6 -index cf85ea9c5..41f9ff509 100644 ---- a/tests/expected/blkid/low-probe-udf-cd-nero-6 -+++ b/tests/expected/blkid/low-probe-udf-cd-nero-6 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=UDF_Label - ID_FS_LABEL_ENC=UDF\x20Label - ID_FS_LOGICAL_VOLUME_ID=UDF Label -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 -index 5446aec42..e26b2da0c 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=LinuxUDF - ID_FS_LABEL_ENC=LinuxUDF - ID_FS_LOGICAL_VOLUME_ID=LinuxUDF -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 -index b72fcac72..112768353 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=Label - ID_FS_LABEL_ENC=Label - ID_FS_LOGICAL_VOLUME_ID=Label -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 -index 20f148549..db9127d34 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=Label - ID_FS_LABEL_ENC=Label - ID_FS_LOGICAL_VOLUME_ID=Label -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 -index 34a2f49e3..f472284f3 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=Label - ID_FS_LABEL_ENC=Label - ID_FS_LOGICAL_VOLUME_ID=Label -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 -index 3fef2b3c6..6f4802ca0 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_LABEL=ÿ - ID_FS_LABEL_ENC=ÿ - ID_FS_LOGICAL_VOLUME_ID=ÿ -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 -index 28cd73603..0ae5b910e 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=1024 - ID_FS_LABEL=Label - ID_FS_LABEL_ENC=Label - ID_FS_LOGICAL_VOLUME_ID=Label -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 -index d84ae8964..1b98c21ed 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=Label - ID_FS_LABEL_ENC=Label - ID_FS_LOGICAL_VOLUME_ID=Label -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 -index d73914970..c22c96b0a 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - ID_FS_LABEL_ENC=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - ID_FS_LOGICAL_VOLUME_ID=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 -index a78606eea..c3b9d8a8a 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=4096 - ID_FS_LABEL=Label4096 - ID_FS_LABEL_ENC=Label4096 - ID_FS_LOGICAL_VOLUME_ID=Label4096 -diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 -index 448c8f90b..58c131f7d 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 -+++ b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=LinuxUDF - ID_FS_LABEL_ENC=LinuxUDF - ID_FS_LOGICAL_VOLUME_ID=LinuxUDF -diff --git a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 -index b33c814d6..18930cead 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 -+++ b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=discname - ID_FS_LABEL_ENC=discname - ID_FS_LOGICAL_VOLUME_ID=discname -diff --git a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 -index a47bd3f12..13e984167 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 -+++ b/tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=discname - ID_FS_LABEL_ENC=discname - ID_FS_LOGICAL_VOLUME_ID=discname -diff --git a/tests/expected/blkid/low-probe-udf-hdd-win7 b/tests/expected/blkid/low-probe-udf-hdd-win7 -index 759c8db3d..e68f180e5 100644 ---- a/tests/expected/blkid/low-probe-udf-hdd-win7 -+++ b/tests/expected/blkid/low-probe-udf-hdd-win7 -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=My_volume_label - ID_FS_LABEL_ENC=My\x20volume\x20label - ID_FS_LOGICAL_VOLUME_ID=My volume label -diff --git a/tests/expected/blkid/low-probe-ufs b/tests/expected/blkid/low-probe-ufs -index 96828d73e..256f065d2 100644 ---- a/tests/expected/blkid/low-probe-ufs -+++ b/tests/expected/blkid/low-probe-ufs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=2048 - ID_FS_TYPE=ufs - ID_FS_USAGE=filesystem - ID_FS_UUID=4b0e640aec56ac70 -diff --git a/tests/expected/blkid/low-probe-xfs b/tests/expected/blkid/low-probe-xfs -index f21d881a5..6eb1b4600 100644 ---- a/tests/expected/blkid/low-probe-xfs -+++ b/tests/expected/blkid/low-probe-xfs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=test-xfs - ID_FS_LABEL_ENC=test-xfs - ID_FS_TYPE=xfs -diff --git a/tests/expected/blkid/low-probe-zfs b/tests/expected/blkid/low-probe-zfs -index 952e0e591..0e7af2866 100644 ---- a/tests/expected/blkid/low-probe-zfs -+++ b/tests/expected/blkid/low-probe-zfs -@@ -1,3 +1,4 @@ -+ID_FS_BLOCK_SIZE=512 - ID_FS_LABEL=tank - ID_FS_LABEL_ENC=tank - ID_FS_TYPE=zfs_member --- -2.25.4 - diff --git a/SOURCES/0038-libblkid-xfs-fix-sector-size-calculation.patch b/SOURCES/0038-libblkid-xfs-fix-sector-size-calculation.patch deleted file mode 100644 index dd0d58d..0000000 --- a/SOURCES/0038-libblkid-xfs-fix-sector-size-calculation.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 28b89361bf574af24c2f9c857d0e5f7c84e2787c Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 3 Sep 2019 15:10:35 +0200 -Subject: [PATCH 38/40] libblkid: (xfs) fix sector size calculation - -Reported-by: Anatoly Pugachev <matorola@gmail.com> -Upstream: http://github.com/karelzak/util-linux/commit/2771d40b88660a11306aa5d4e200fc0ebebfe315 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1817726 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/superblocks/xfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c -index eb513ac3e..98e59ff7c 100644 ---- a/libblkid/src/superblocks/xfs.c -+++ b/libblkid/src/superblocks/xfs.c -@@ -173,7 +173,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag) - blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname, - sizeof(xs->sb_fname)); - blkid_probe_set_uuid(pr, xs->sb_uuid); -- blkid_probe_set_block_size(pr, xs->sb_sectsize * 256); -+ blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize)); - return 0; - } - --- -2.25.4 - diff --git a/SOURCES/0039-col-make-flush_line-a-little-bit-robust.patch b/SOURCES/0039-col-make-flush_line-a-little-bit-robust.patch deleted file mode 100644 index f586752..0000000 --- a/SOURCES/0039-col-make-flush_line-a-little-bit-robust.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 54e3d1414e1a031d6f635f8fcbe273eecfd65560 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 5 Feb 2019 12:06:00 +0100 -Subject: [PATCH 39/40] col: make flush_line() a little bit robust - -The code is horrible. The core of the problem are signed integers -and no check for the limits. - -This patch fixes c->c_column = cur_col; where c_column is "short" -and "cur_col" is int. Let's use "int" for all the variables. It's -really not perfect as for bigger lines it can segfault again... - -The patch also removes some unnecessary static variables. - -Upstream: http://github.com/karelzak/util-linux/commit/004356f05018e3bfcaddd2652846659a4d8481f3 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1803753 -Addresses: https://github.com/karelzak/util-linux/issues/749 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - text-utils/col.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/text-utils/col.c b/text-utils/col.c -index 3d9e15d26..c2f8db64d 100644 ---- a/text-utils/col.c -+++ b/text-utils/col.c -@@ -88,7 +88,7 @@ typedef char CSET; - typedef struct char_str { - #define CS_NORMAL 1 - #define CS_ALTERNATE 2 -- short c_column; /* column character is in */ -+ int c_column; /* column character is in */ - CSET c_set; /* character set (currently only 2) */ - wchar_t c_char; /* character in question */ - int c_width; /* character width */ -@@ -476,8 +476,9 @@ void flush_line(LINE *l) - nchars = l->l_line_len; - - if (l->l_needs_sort) { -- static CHAR *sorted; -- static int count_size, *count, i, save, sorted_size, tot; -+ static CHAR *sorted = NULL; -+ static int count_size = 0, *count = NULL, sorted_size = 0; -+ int i, tot; - - /* - * Do an O(n) sort on l->l_line by column being careful to -@@ -494,7 +495,7 @@ void flush_line(LINE *l) - (unsigned)sizeof(int) * count_size); - } - memset(count, 0, sizeof(int) * l->l_max_col + 1); -- for (i = nchars, c = l->l_line; --i >= 0; c++) -+ for (i = nchars, c = l->l_line; c && --i >= 0; c++) - count[c->c_column]++; - - /* -@@ -502,7 +503,7 @@ void flush_line(LINE *l) - * indices into new line. - */ - for (tot = 0, i = 0; i <= l->l_max_col; i++) { -- save = count[i]; -+ int save = count[i]; - count[i] = tot; - tot += save; - } --- -2.25.4 - diff --git a/SOURCES/0040-libmount-improve-smb-2-3-support.patch b/SOURCES/0040-libmount-improve-smb-2-3-support.patch deleted file mode 100644 index d30a197..0000000 --- a/SOURCES/0040-libmount-improve-smb-2-3-support.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2cd5219da87274db251a7f836efe6ac724b70e53 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 11 Mar 2020 10:38:37 +0100 -Subject: [PATCH 40/40] libmount: improve smb{2,3} support - -It seems kernel can use smb3 as fstype in mountinfo. - -Upstream: http://github.com/karelzak/util-linux/commit/36d80cb6c11b3064ed9fb29c7c8b101e3f266441 -Upstream: http://github.com/karelzak/util-linux/commit/b7ff4134beea53688ab3c01484cf59b2ce2d9ce9 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1812118 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/tab.c | 5 ++++- - libmount/src/utils.c | 1 + - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/libmount/src/tab.c b/libmount/src/tab.c -index eb61dd33e..74d60df3d 100644 ---- a/libmount/src/tab.c -+++ b/libmount/src/tab.c -@@ -1644,9 +1644,12 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) - if (root) { - const char *fstype = mnt_fs_get_fstype(fs); - -- if (fstype && strcmp(fstype, "cifs") == 0) { -+ if (fstype && (strcmp(fstype, "cifs") == 0 -+ || strcmp(fstype, "smb3") == 0)) { -+ - const char *unc_subdir = get_cifs_unc_subdir_path(src); - const char *path_on_fs = mnt_fs_get_root(fs); -+ - if (!unc_subdir || !path_on_fs || !streq_paths(unc_subdir, path_on_fs)) - continue; - } else { -diff --git a/libmount/src/utils.c b/libmount/src/utils.c -index 04e79f53f..e43588831 100644 ---- a/libmount/src/utils.c -+++ b/libmount/src/utils.c -@@ -315,6 +315,7 @@ int mnt_fstype_is_pseudofs(const char *type) - int mnt_fstype_is_netfs(const char *type) - { - if (strcmp(type, "cifs") == 0 || -+ strcmp(type, "smb3") == 0 || - strcmp(type, "smbfs") == 0 || - strncmp(type,"nfs", 3) == 0 || - strcmp(type, "afs") == 0 || --- -2.25.4 - diff --git a/SOURCES/0041-libmount-fix-mount-a-EBUSY-for-cifs.patch b/SOURCES/0041-libmount-fix-mount-a-EBUSY-for-cifs.patch deleted file mode 100644 index 28e915e..0000000 --- a/SOURCES/0041-libmount-fix-mount-a-EBUSY-for-cifs.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 618aedc9e892b206492c1720bec261b043c66263 Mon Sep 17 00:00:00 2001 -From: Roberto Bergantinos Corpas <rbergant@redhat.com> -Date: Mon, 27 Apr 2020 15:46:02 +0200 -Subject: [PATCH] libmount: fix mount -a EBUSY for cifs - -fstab: - - //rhel73/myshare/sub/path /mnt cifs - -after mount in mountinfo: - - # grep cifs /proc/self/mountinfo - 47 39 0:40 /sub/path /mnt rw,relatime shared:60 - cifs //rhel73/myshare/sub/path ... - ^^^^^^^^^ -or: - - # grep cifs /proc/self/mountinfo - 47 39 0:40 / /mnt rw,relatime shared:60 - cifs //rhel73/myshare/sub/path ... - ^ - -That is so since on kernel cifs code, cifs_get_root (which returns the -entry associated with mnt_root) return s_root if -CIFS_MOUNT_USE_PREFIX_PATH is set, no questions asked. - -This situation can occurr often on CIFS mounts, as CIFS servers limit -frequently scope of access to the root path. - -[kzak@redhat.com: - add more info to the commit message, - - clean up variable names] - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1829245 -Upstream: http://github.com/karelzak/util-linux/commit/31b3a523eca2fc7e5876ec5fd89094208fed0899 -Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/tab.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/libmount/src/tab.c b/libmount/src/tab.c -index 74d60df3d..cd97a1cb5 100644 ---- a/libmount/src/tab.c -+++ b/libmount/src/tab.c -@@ -1644,13 +1644,14 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) - if (root) { - const char *fstype = mnt_fs_get_fstype(fs); - -- if (fstype && (strcmp(fstype, "cifs") == 0 -- || strcmp(fstype, "smb3") == 0)) { -+ if (fstype && (strcmp(fstype, "cifs") == 0 || -+ strcmp(fstype, "smb3") == 0)) { - -- const char *unc_subdir = get_cifs_unc_subdir_path(src); -- const char *path_on_fs = mnt_fs_get_root(fs); -+ const char *sub = get_cifs_unc_subdir_path(src); -+ const char *r = mnt_fs_get_root(fs); - -- if (!unc_subdir || !path_on_fs || !streq_paths(unc_subdir, path_on_fs)) -+ if (!sub || !r || (!streq_paths(sub, r) && -+ !streq_paths("/", r))) - continue; - } else { - const char *r = mnt_fs_get_root(fs); --- -2.25.4 - diff --git a/SOURCES/0042-Manual-pages-losetup.8-Fix-direct-io-defaults.patch b/SOURCES/0042-Manual-pages-losetup.8-Fix-direct-io-defaults.patch deleted file mode 100644 index 19dbf34..0000000 --- a/SOURCES/0042-Manual-pages-losetup.8-Fix-direct-io-defaults.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0717177be22588d4e419de280eccd0eeafb15016 Mon Sep 17 00:00:00 2001 -From: Rupesh Girase <rgirase@redhat.com> -Date: Thu, 18 Jun 2020 19:17:41 +0530 -Subject: [PATCH] Manual pages: losetup.8: Fix "--direct-io" defaults - -"--direct-io" option is "off" by default while configuring -loop device but it's mentioned "on" in man page. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1848919 -Upstream: http://github.com/karelzak/util-linux/commit/4bee67e2d1a78abc52e89c6eb71f0efc8a278ce9 -Signed-off-by: Rupesh Girase <rgirase@redhat.com> ---- - sys-utils/losetup.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8 -index cdb9ed052..c87c231b6 100644 ---- a/sys-utils/losetup.8 -+++ b/sys-utils/losetup.8 -@@ -130,7 +130,7 @@ Set up a read-only loop device. - .BR \-\-direct\-io [ =on | off ] - Enable or disable direct I/O for the backing file. The optional argument - can be either \fBon\fR or \fBoff\fR. If the argument is omitted, it defaults --to \fBon\fR. -+to \fBoff\fR. - .TP - .BR \-v , " \-\-verbose" - Verbose mode. --- -2.25.4 - diff --git a/SOURCES/0043-chrt-use-SCHED_FLAG_RESET_ON_FORK-for-sched_setattr.patch b/SOURCES/0043-chrt-use-SCHED_FLAG_RESET_ON_FORK-for-sched_setattr.patch deleted file mode 100644 index 53a6454..0000000 --- a/SOURCES/0043-chrt-use-SCHED_FLAG_RESET_ON_FORK-for-sched_setattr.patch +++ /dev/null @@ -1,46 +0,0 @@ -From f575b6e0857087f46d54f494d9a435af715ea19d Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 1 Oct 2020 10:40:27 +0200 -Subject: [PATCH 43/55] chrt: use SCHED_FLAG_RESET_ON_FORK for sched_setattr() - -Reviewed by many people, used for years (but probably nobody uses -SCHED_DEADLINE with reset-on-fork), but we all missed: - -- sched_setscheduler() uses SCHED_RESET_ON_FORK (0x40000000) -- sched_setattr() uses SCHED_FLAG_RESET_ON_FORK (0x01) - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1884194 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - schedutils/chrt.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/schedutils/chrt.c b/schedutils/chrt.c -index b08c78ed8..15556bbad 100644 ---- a/schedutils/chrt.c -+++ b/schedutils/chrt.c -@@ -123,7 +123,7 @@ struct chrt_ctl { - uint64_t period; - - unsigned int all_tasks : 1, /* all threads of the PID */ -- reset_on_fork : 1, /* SCHED_RESET_ON_FORK */ -+ reset_on_fork : 1, /* SCHED_RESET_ON_FORK or SCHED_FLAG_RESET_ON_FORK */ - altered : 1, /* sched_set**() used */ - verbose : 1; /* verbose output */ - }; -@@ -376,9 +376,10 @@ static int set_sched_one(struct chrt_ctl *ctl, pid_t pid) - sa.sched_period = ctl->period; - sa.sched_deadline = ctl->deadline; - --# ifdef SCHED_RESET_ON_FORK -+# ifdef SCHED_FLAG_RESET_ON_FORK -+ /* Don't use SCHED_RESET_ON_FORK for sched_setattr()! */ - if (ctl->reset_on_fork) -- sa.sched_flags |= SCHED_RESET_ON_FORK; -+ sa.sched_flags |= SCHED_FLAG_RESET_ON_FORK; - # endif - errno = 0; - return sched_setattr(pid, &sa, 0); --- -2.29.2 - diff --git a/SOURCES/0044-chrt-don-t-restrict-reset-on-fork-add-more-info-to-m.patch b/SOURCES/0044-chrt-don-t-restrict-reset-on-fork-add-more-info-to-m.patch deleted file mode 100644 index 519b090..0000000 --- a/SOURCES/0044-chrt-don-t-restrict-reset-on-fork-add-more-info-to-m.patch +++ /dev/null @@ -1,146 +0,0 @@ -From c4caa5b973f9cdb4c43edea3c32cda62cdf15b3b Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 1 Oct 2020 11:20:01 +0200 -Subject: [PATCH 44/55] chrt: don't restrict --reset-on-fork, add more info to - man page - -The flag works (= kernel accepts it) for all scheduling policies -and sched_getattr() returns the flag for all policies. - -There is no reason for userspace to be more smart than kernel or hide -the flag when it prints sched_getattr()/sched_getscheduler() results. - - # chrt -v --reset-on-fork --batch 0 /bin/true - pid 1315019's new scheduling policy: SCHED_BATCH|SCHED_RESET_ON_FORK - - # chrt -v --reset-on-fork --fifo 1 /bin/true - pid 1315055's new scheduling policy: SCHED_FIFO|SCHED_RESET_ON_FORK - - # chrt -v --reset-on-fork --deadline --sched-period 10000 0 /bin/true - pid 1315182's new scheduling policy: SCHED_DEADLINE|SCHED_RESET_ON_FORK - - # chrt -v --reset-on-fork --idle 0 /bin/true - pid 1315247's new scheduling policy: SCHED_IDLE|SCHED_RESET_ON_FORK - - # chrt -v --reset-on-fork --rr 1 /bin/true - pid 1315275's new scheduling policy: SCHED_RR|SCHED_RESET_ON_FORK - - # chrt -v --reset-on-fork --other 0 /bin/true - pid 1315311's new scheduling policy: SCHED_OTHER|SCHED_RESET_ON_FORK - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1884194 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - schedutils/chrt.1 | 32 ++++++++++++++++++++++++++++---- - schedutils/chrt.c | 18 +++++------------- - 2 files changed, 33 insertions(+), 17 deletions(-) - -diff --git a/schedutils/chrt.1 b/schedutils/chrt.1 -index 4b8b1e9da..a9adfb316 100644 ---- a/schedutils/chrt.1 -+++ b/schedutils/chrt.1 -@@ -92,13 +92,37 @@ Specifies period parameter for SCHED_DEADLINE policy (Linux-specific). - Specifies deadline parameter for SCHED_DEADLINE policy (Linux-specific). - .TP - \fB\-R\fR, \fB\-\-reset-on-fork\fR --Add -+Use - .B SCHED_RESET_ON_FORK --flag to the -+or -+.B SCHED_FLAG_RESET_ON_FORK -+flag. Linux-specific, supported since 2.6.31. -+ -+Each thread has a reset-on-fork scheduling flag. When this flag is set, children created by -+.BR fork (2) -+do not inherit privileged scheduling policies. After the reset-on-fork flag has been enabled, -+it can be reset only if the thread has the -+.BR CAP_SYS_NICE -+capability. This flag is disabled in child processes created by -+.BR fork (2). -+ -+More precisely, if the reset-on-fork flag is set, -+the following rules apply for subsequently created children: -+.RS -+.IP * 3 -+If the calling thread has a scheduling policy of - .B SCHED_FIFO - or --.B SCHED_RR --scheduling policy (Linux-specific, supported since 2.6.31). -+.BR SCHED_RR , -+the policy is reset to -+.BR SCHED_OTHER -+in child processes. -+.IP * -+If the calling process has a negative nice value, -+the nice value is reset to zero in child processes. -+.RE -+ -+ - - .SH OPTIONS - .TP -diff --git a/schedutils/chrt.c b/schedutils/chrt.c -index 15556bbad..2a6f1e151 100644 ---- a/schedutils/chrt.c -+++ b/schedutils/chrt.c -@@ -152,7 +152,7 @@ static void __attribute__((__noreturn__)) usage(void) - - fputs(USAGE_SEPARATOR, out); - fputs(_("Scheduling options:\n"), out); -- fputs(_(" -R, --reset-on-fork set SCHED_RESET_ON_FORK for FIFO or RR\n"), out); -+ fputs(_(" -R, --reset-on-fork set reset-on-fork flag\n"), out); - fputs(_(" -T, --sched-runtime <ns> runtime parameter for DEADLINE\n"), out); - fputs(_(" -P, --sched-period <ns> period parameter for DEADLINE\n"), out); - fputs(_(" -D, --sched-deadline <ns> deadline parameter for DEADLINE\n"), out); -@@ -173,22 +173,19 @@ static void __attribute__((__noreturn__)) usage(void) - - static const char *get_policy_name(int policy) - { -+#ifdef SCHED_RESET_ON_FORK -+ policy &= ~SCHED_RESET_ON_FORK; -+#endif - switch (policy) { - case SCHED_OTHER: - return "SCHED_OTHER"; - case SCHED_FIFO: --#ifdef SCHED_RESET_ON_FORK -- case SCHED_FIFO | SCHED_RESET_ON_FORK: --#endif - return "SCHED_FIFO"; - #ifdef SCHED_IDLE - case SCHED_IDLE: - return "SCHED_IDLE"; - #endif - case SCHED_RR: --#ifdef SCHED_RESET_ON_FORK -- case SCHED_RR | SCHED_RESET_ON_FORK: --#endif - return "SCHED_RR"; - #ifdef SCHED_BATCH - case SCHED_BATCH: -@@ -257,7 +254,7 @@ fallback: - else - prio = sp.sched_priority; - # ifdef SCHED_RESET_ON_FORK -- if (policy == (SCHED_FIFO|SCHED_RESET_ON_FORK) || policy == (SCHED_BATCH|SCHED_RESET_ON_FORK)) -+ if (policy & SCHED_RESET_ON_FORK) - reset_on_fork = 1; - # endif - } -@@ -515,11 +512,6 @@ int main(int argc, char **argv) - errno = 0; - ctl->priority = strtos32_or_err(argv[optind], _("invalid priority argument")); - --#ifdef SCHED_RESET_ON_FORK -- if (ctl->reset_on_fork && ctl->policy != SCHED_FIFO && ctl->policy != SCHED_RR) -- errx(EXIT_FAILURE, _("--reset-on-fork option is supported for " -- "SCHED_FIFO and SCHED_RR policies only")); --#endif - #ifdef SCHED_DEADLINE - if ((ctl->runtime || ctl->deadline || ctl->period) && ctl->policy != SCHED_DEADLINE) - errx(EXIT_FAILURE, _("--sched-{runtime,deadline,period} options " --- -2.29.2 - diff --git a/SOURCES/0045-mount.8-clarify-no-suid-behavior-on-file-capabilitie.patch b/SOURCES/0045-mount.8-clarify-no-suid-behavior-on-file-capabilitie.patch deleted file mode 100644 index a65c8e6..0000000 --- a/SOURCES/0045-mount.8-clarify-no-suid-behavior-on-file-capabilitie.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8704fa57c3b93152df6c10fd6a35ebdd59e1a5b7 Mon Sep 17 00:00:00 2001 -From: Peter Wu <peter@lekensteyn.nl> -Date: Fri, 1 Feb 2019 15:40:53 +0100 -Subject: [PATCH 45/55] mount.8: clarify (no)suid behavior on file capabilities - -Clarify that the nosuid option also affects file capabilities and that -it only limits execution of programs. (setgid on directories still -inherit the group regardless of the nosuid option.) The new text is -taken from the mount(2) manual page from the man-pages project. - -Addresses: https://github.com/karelzak/util-linux/issues/482 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1855759 -Signed-off-by: Peter Wu <peter@lekensteyn.nl> ---- - sys-utils/mount.8 | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index 1cc792979..a4d7de2c0 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -1107,12 +1107,12 @@ or - Do not use the lazytime feature. - .TP - .B suid --Allow set-user-ID or set-group-ID bits to take --effect. -+Honor set-user-ID and set-group-ID bits or file capabilities when -+executing programs from this filesystem. - .TP - .B nosuid --Do not allow set-user-ID or set-group-ID bits to take --effect. -+Do not honor set-user-ID and set-group-ID bits or file capabilities when -+executing programs from this filesystem. - .TP - .B silent - Turn on the silent flag. --- -2.29.2 - diff --git a/SOURCES/0046-lsblk-Fall-back-to-ID_SERIAL.patch b/SOURCES/0046-lsblk-Fall-back-to-ID_SERIAL.patch deleted file mode 100644 index 603e628..0000000 --- a/SOURCES/0046-lsblk-Fall-back-to-ID_SERIAL.patch +++ /dev/null @@ -1,59 +0,0 @@ -From afe6545483a881ccde41dcaa6718c71c74b38d7b Mon Sep 17 00:00:00 2001 -From: Sven Wiltink <swiltink@transip.nl> -Date: Fri, 1 May 2020 16:35:40 +0200 -Subject: [PATCH 46/55] lsblk: Fall back to ID_SERIAL - -In some cases ID_SERIAL_SHORT isn't provided by libudev, but ID_SERIAL -is. An example of this are virtio devices. See the output of udevadm -info: -P: /devices/pci0000:00/0000:00:06.0/virtio2/block/vdb -N: vdb -S: disk/by-id/virtio-08491434ee711d3420e9 -S: disk/by-path/pci-0000:00:06.0 -S: disk/by-path/virtio-pci-0000:00:06.0 -E: DEVLINKS=/dev/disk/by-id/virtio-08491434ee711d3420e9 /dev/disk/by-path/pci-0000:00:06.0 /dev/disk/by-path/virtio-pci-0000:00:06.0 -E: DEVNAME=/dev/vdb -E: DEVPATH=/devices/pci0000:00/0000:00:06.0/virtio2/block/vdb -E: DEVTYPE=disk -E: ID_PATH=pci-0000:00:06.0 -E: ID_PATH_TAG=pci-0000_00_06_0 -E: ID_SERIAL=08491434ee711d3420e9 -E: MAJOR=252 -E: MINOR=16 -E: SUBSYSTEM=block -E: TAGS=:systemd: -E: USEC_INITIALIZED=1403804 - -[RHEL-8 backport: add ID_SERIAL and also ID_SCSI_SERIAL to be compatible with upstream] - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1861670 -Upstream: http://github.com/karelzak/util-linux/commit/e81d0f80068086147434fa947a4f723c00318772 -Upstream: http://github.com/karelzak/util-linux/commit/de6c2a4aec140e6086e278688d97f4655ced1a9a -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/lsblk.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index ae97f9f05..d0369d3e7 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -567,8 +567,14 @@ static int get_udev_properties(struct blkdev_cxt *cxt) - if (data) - cxt->wwn = xstrdup(data); - -- if ((data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT"))) -+ data = udev_device_get_property_value(dev, "ID_SCSI_SERIAL"); -+ if (!data) -+ data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT"); -+ if (!data) -+ data = udev_device_get_property_value(dev, "ID_SERIAL"); -+ if (data) - cxt->serial = xstrdup(data); -+ - udev_device_unref(dev); - cxt->probed = 1; - DBG(DEV, ul_debugobj(cxt, "%s: found udev properties", cxt->name)); --- -2.29.2 - diff --git a/SOURCES/0047-lscpu-avoid-segfault-on-PowerPC-systems-with-valid-h.patch b/SOURCES/0047-lscpu-avoid-segfault-on-PowerPC-systems-with-valid-h.patch deleted file mode 100644 index 21bca67..0000000 --- a/SOURCES/0047-lscpu-avoid-segfault-on-PowerPC-systems-with-valid-h.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4ac8e70822313b0c6b35ebf633c6e8fbca558998 Mon Sep 17 00:00:00 2001 -From: Thomas Abraham <tabraham@suse.com> -Date: Thu, 24 Sep 2020 14:52:33 -0400 -Subject: [PATCH 47/55] lscpu: avoid segfault on PowerPC systems with valid - hardware configurations - -ntypes greater than 1 is valid in some hardware configurations, and an assert() -on the value isn't necessary or very future proof - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883783 -Upstream: http://github.com/karelzak/util-linux/commit/cbe3304bc43b3fceb06fb6e5dd822bb59abf1b84 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index 1aa7bff4d..748d545b6 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -369,8 +369,6 @@ static void read_physical_info_powerpc(struct lscpu_desc *desc) - return; - - ntypes = strbe16toh(buf, 2); -- -- assert(ntypes <= 1); - if (!ntypes) - return; - --- -2.29.2 - diff --git a/SOURCES/0048-libfdisk-count-gaps-to-possible-size-when-resize.patch b/SOURCES/0048-libfdisk-count-gaps-to-possible-size-when-resize.patch deleted file mode 100644 index 86f4e98..0000000 --- a/SOURCES/0048-libfdisk-count-gaps-to-possible-size-when-resize.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b3c5c1f39db58b057bb581f1d3bebcbeedeee1cb Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 17 Sep 2018 11:58:50 +0200 -Subject: [PATCH 48/55] libfdisk: count gaps to possible size when resize - -The current code counts only partition sizes when it counts possible -space, but we have gaps between the partitions. It seems better to -count all based on offsets rather than sizes. - -Addresses: https://github.com/karelzak/util-linux/issues/693 -Upstream: http://github.com/karelzak/util-linux/commit/2f35c1ead621f42f32f7777232568cb03185b473 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1900498 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libfdisk/src/partition.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libfdisk/src/partition.c b/libfdisk/src/partition.c -index a790dc9c9..ebcf6bf5c 100644 ---- a/libfdisk/src/partition.c -+++ b/libfdisk/src/partition.c -@@ -1113,7 +1113,7 @@ static int resize_get_last_possible( - break; - } else { - last = pa; -- *maxsz += pa->size; -+ *maxsz = pa->size - (start - pa->start); - DBG(TAB, ul_debugobj(tb, " new max=%ju (last updated)", (uintmax_t) *maxsz)); - } - } --- -2.29.2 - diff --git a/SOURCES/0049-libmount-parser-fix-memory-leak-on-error-before-end-.patch b/SOURCES/0049-libmount-parser-fix-memory-leak-on-error-before-end-.patch deleted file mode 100644 index 9482386..0000000 --- a/SOURCES/0049-libmount-parser-fix-memory-leak-on-error-before-end-.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 780f79420073e0c09cd41afea28ac217a6d4ef29 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 26 Jun 2020 12:59:32 +0200 -Subject: [PATCH 49/55] libmount: (parser) fix memory leak on error before - end-of-file - -Let's simplify the loop where we add FS to the table. The optimization -for recoverable errors is a fragile overkill. The new code always -allocates and unrefs FS for each loop. - -Addresses: https://github.com/karelzak/util-linux/pull/1068 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1900498 -Upstream: http://github.com/karelzak/util-linux/commit/fe0d12d4f82269096f8d0cffc51ca9590814c284 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/fs.c | 2 +- - libmount/src/tab_parse.c | 49 ++++++++++++++++++++++------------------ - 2 files changed, 28 insertions(+), 23 deletions(-) - -diff --git a/libmount/src/fs.c b/libmount/src/fs.c -index def32253c..aae4961c3 100644 ---- a/libmount/src/fs.c -+++ b/libmount/src/fs.c -@@ -34,7 +34,7 @@ struct libmnt_fs *mnt_new_fs(void) - - fs->refcount = 1; - INIT_LIST_HEAD(&fs->ents); -- /*DBG(FS, ul_debugobj(fs, "alloc"));*/ -+ DBG(FS, ul_debugobj(fs, "alloc")); - return fs; - } - -diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c -index 10fc68279..719c1abca 100644 ---- a/libmount/src/tab_parse.c -+++ b/libmount/src/tab_parse.c -@@ -608,7 +608,6 @@ static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *fi - int rc = -1; - int flags = 0; - pid_t tid = -1; -- struct libmnt_fs *fs = NULL; - struct libmnt_parser pa = { .line = 0 }; - - assert(tb); -@@ -628,19 +627,25 @@ static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *fi - if (filename && strcmp(filename, _PATH_PROC_MOUNTS) == 0) - flags = MNT_FS_KERNEL; - -- while (!feof(f)) { -- if (!fs) { -- fs = mnt_new_fs(); -- if (!fs) -- goto err; -+ do { -+ struct libmnt_fs *fs; -+ -+ if (feof(f)) { -+ DBG(TAB, ul_debugobj(tb, "end-of-file")); -+ break; - } -+ fs = mnt_new_fs(); -+ if (!fs) -+ goto err; - -+ /* parse */ - rc = mnt_table_parse_next(&pa, tb, fs); - -- if (!rc && tb->fltrcb && tb->fltrcb(fs, tb->fltrcb_data)) -- rc = 1; /* filtered out by callback... */ -+ if (rc != 0 && tb->fltrcb && tb->fltrcb(fs, tb->fltrcb_data)) -+ rc = 1; /* error filtered out by callback... */ - -- if (!rc) { -+ /* add to the table */ -+ if (rc == 0) { - rc = mnt_table_add_fs(tb, fs); - fs->flags |= flags; - -@@ -651,21 +656,21 @@ static int __table_parse_stream(struct libmnt_table *tb, FILE *f, const char *fi - } - } - -- if (rc) { -- if (rc > 0) { -- mnt_reset_fs(fs); -- assert(fs->refcount == 1); -- continue; /* recoverable error, reuse fs*/ -- } -+ /* remove refernece (or deallocate on error) */ -+ mnt_unref_fs(fs); - -- mnt_unref_fs(fs); -- if (feof(f)) -- break; -- goto err; /* fatal error */ -+ /* recoverable error */ -+ if (rc > 0) { -+ DBG(TAB, ul_debugobj(tb, "recoverable error (continue)")); -+ continue; - } -- mnt_unref_fs(fs); -- fs = NULL; -- } -+ -+ /* fatal errors */ -+ if (rc < 0 && !feof(f)) { -+ DBG(TAB, ul_debugobj(tb, "fatal error")); -+ goto err; -+ } -+ } while (1); - - DBG(TAB, ul_debugobj(tb, "%s: stop parsing (%d entries)", - filename, mnt_table_get_nents(tb))); --- -2.29.2 - diff --git a/SOURCES/0050-lscpu-update-ARM-identifiers-tables.patch b/SOURCES/0050-lscpu-update-ARM-identifiers-tables.patch deleted file mode 100644 index bc3ae6c..0000000 --- a/SOURCES/0050-lscpu-update-ARM-identifiers-tables.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 6700a458ef1bcd8fe2c066411bc415bc43ccdb8a Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 15 Dec 2020 11:17:42 +0100 -Subject: [PATCH 50/55] lscpu: update ARM identifiers tables - -Use the latest upstream identifiers to add FUJITSU and HiSilicon -implementers and many new ARM CPUs. - -Upstream: http://github.com/karelzak/util-linux/commit/dd9b4cb32042def5b7767e26ebd294f7f52cd07f -Upstream: http://github.com/karelzak/util-linux/commit/a625b32e2c716723a28a49702a02c78274dd3bb6 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883056 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu-arm.c | 27 ++++++++++++++++++++++++--- - 1 file changed, 24 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c -index f3a746a62..2b178a72e 100644 ---- a/sys-utils/lscpu-arm.c -+++ b/sys-utils/lscpu-arm.c -@@ -49,7 +49,7 @@ static const struct id_part arm_part[] = { - { 0xc07, "Cortex-A7" }, - { 0xc08, "Cortex-A8" }, - { 0xc09, "Cortex-A9" }, -- { 0xc0d, "Cortex-A12" }, -+ { 0xc0d, "Cortex-A17" }, /* Originally A12 */ - { 0xc0f, "Cortex-A15" }, - { 0xc0e, "Cortex-A17" }, - { 0xc14, "Cortex-R4" }, -@@ -60,19 +60,28 @@ static const struct id_part arm_part[] = { - { 0xc21, "Cortex-M1" }, - { 0xc23, "Cortex-M3" }, - { 0xc24, "Cortex-M4" }, -- { 0xc20, "Cortex-M7" }, -+ { 0xc27, "Cortex-M7" }, - { 0xc60, "Cortex-M0+" }, - { 0xd01, "Cortex-A32" }, - { 0xd03, "Cortex-A53" }, - { 0xd04, "Cortex-A35" }, - { 0xd05, "Cortex-A55" }, -+ { 0xd06, "Cortex-A65" }, - { 0xd07, "Cortex-A57" }, - { 0xd08, "Cortex-A72" }, - { 0xd09, "Cortex-A73" }, - { 0xd0a, "Cortex-A75" }, -+ { 0xd0b, "Cortex-A76" }, -+ { 0xd0c, "Neoverse-N1" }, -+ { 0xd0d, "Cortex-A77" }, -+ { 0xd0e, "Cortex-A76AE" }, - { 0xd13, "Cortex-R52" }, - { 0xd20, "Cortex-M23" }, - { 0xd21, "Cortex-M33" }, -+ { 0xd41, "Cortex-A78" }, -+ { 0xd42, "Cortex-A78AE" }, -+ { 0xd4a, "Neoverse-E1" }, -+ { 0xd4b, "Cortex-A78C" }, - { -1, "unknown" }, - }; - -@@ -126,6 +135,7 @@ static const struct id_part samsung_part[] = { - static const struct id_part nvidia_part[] = { - { 0x000, "Denver" }, - { 0x003, "Denver 2" }, -+ { 0x004, "Carmel" }, - { -1, "unknown" }, - }; - -@@ -167,6 +177,16 @@ static const struct id_part intel_part[] = { - { -1, "unknown" }, - }; - -+static const struct id_part fujitsu_part[] = { -+ { 0x001, "A64FX" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part hisi_part[] = { -+ { 0xd01, "Kunpeng-920" }, /* aka tsv110 */ -+ { -1, "unknown" }, -+}; -+ - static const struct id_part unknown_part[] = { - { -1, "unknown" }, - }; -@@ -182,6 +202,8 @@ static const struct hw_impl hw_implementer[] = { - { 0x42, brcm_part, "Broadcom" }, - { 0x43, cavium_part, "Cavium" }, - { 0x44, dec_part, "DEC" }, -+ { 0x46, fujitsu_part, "FUJITSU" }, -+ { 0x48, hisi_part, "HiSilicon" }, - { 0x4e, nvidia_part, "Nvidia" }, - { 0x50, apm_part, "APM" }, - { 0x51, qcom_part, "Qualcomm" }, -@@ -191,7 +213,6 @@ static const struct hw_impl hw_implementer[] = { - { 0x69, intel_part, "Intel" }, - { -1, unknown_part, "unknown" }, - }; -- - void arm_cpu_decode(struct lscpu_desc *desc) - { - int j, impl, part; --- -2.29.2 - diff --git a/SOURCES/0051-lscpu-use-cluster-on-aarch64-machine-which-doesn-t-h.patch b/SOURCES/0051-lscpu-use-cluster-on-aarch64-machine-which-doesn-t-h.patch deleted file mode 100644 index 1d27e96..0000000 --- a/SOURCES/0051-lscpu-use-cluster-on-aarch64-machine-which-doesn-t-h.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 63d8d3e8d54326842677bc3d3a3e43a133846a71 Mon Sep 17 00:00:00 2001 -From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> -Date: Tue, 15 Dec 2020 12:07:38 +0100 -Subject: [PATCH 51/55] lscpu: use cluster on aarch64 machine which doesn't - have ACPI PPTT - -lscpu may show the wrong number of sockets if the machine is aarch64 and -doesn't have ACPI PPTT. - -That's because lscpu show the number of sockets by using a sysfs entry -(cpu/cpuX/topology/core_siblings). The sysfs entry is set by MPIDR_EL1 -register if the machine doesn't have ACPI PPTT. MPIDR_EL1 doesn't show -the physical socket information directly. It shows the affinity level. - -According to linux/arch/arm64/kernel/topology.c:store_cpu_topology(), -the top level of affinity is called as 'Cluster'. - -Use Cluster instead of Socket on the machine which doesn't have ACPI PPTT. - -Note, ARM SBBR v1.2 requires ACPI PPTT, so this patch is needed for the -machine which is based on SBBR v1.0 and v1.1. - -[kzak@redhat.com: - port to old code - - change semantic to be same as current upstream] - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883056 -Upstream: 73c0a766ffbe60e013b55cfd716d531b5a6ae22a -Upstream: https://marc.info/?l=util-linux-ng&m=159984070611464&w=2 -Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu.1 | 3 +++ - sys-utils/lscpu.c | 65 ++++++++++++++++++++++++++++++++++++++++++----- - sys-utils/lscpu.h | 3 +++ - 3 files changed, 65 insertions(+), 6 deletions(-) - -diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 -index b70f2e151..cf981d708 100644 ---- a/sys-utils/lscpu.1 -+++ b/sys-utils/lscpu.1 -@@ -47,6 +47,9 @@ The logical core number. A core can contain several CPUs. - .B SOCKET - The logical socket number. A socket can contain several cores. - .TP -+.B CLUSTER -+The logical cluster number. A cluster can contain several cores. -+.TP - .B BOOK - The logical book number. A book can contain several sockets. - .TP -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index 748d545b6..a8b448fa0 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -70,6 +70,7 @@ - #define _PATH_SYS_HYP_FEATURES "/sys/hypervisor/properties/features" - #define _PATH_SYS_CPU _PATH_SYS_SYSTEM "/cpu" - #define _PATH_SYS_NODE _PATH_SYS_SYSTEM "/node" -+#define _PATH_ACPI_PPTT "/sys/firmware/acpi/tables/PPTT" - #define _PATH_PROC_XEN "/proc/xen" - #define _PATH_PROC_XENCAP _PATH_PROC_XEN "/capabilities" - #define _PATH_PROC_CPUINFO "/proc/cpuinfo" -@@ -168,6 +169,7 @@ enum { - COL_CPU, - COL_CORE, - COL_SOCKET, -+ COL_CLUSTER, - COL_NODE, - COL_BOOK, - COL_DRAWER, -@@ -194,6 +196,7 @@ static struct lscpu_coldesc coldescs[] = - [COL_CPU] = { "CPU", N_("logical CPU number"), 1 }, - [COL_CORE] = { "CORE", N_("logical core number") }, - [COL_SOCKET] = { "SOCKET", N_("logical socket number") }, -+ [COL_CLUSTER] = { "CLUSTER", N_("logical cluster number") }, - [COL_NODE] = { "NODE", N_("logical NUMA node number") }, - [COL_BOOK] = { "BOOK", N_("logical book number") }, - [COL_DRAWER] = { "DRAWER", N_("logical drawer number") }, -@@ -383,6 +386,26 @@ static void read_physical_info_powerpc( - } - #endif - -+static int is_fallback_to_cluster(struct lscpu_desc *desc) -+{ -+ char *arch; -+ struct stat st; -+ struct utsname utsbuf; -+ -+ if (desc) -+ arch = desc->arch; -+ else { -+ if (uname(&utsbuf) == -1) -+ err(EXIT_FAILURE, _("error: uname failed")); -+ arch = utsbuf.machine; -+ } -+ -+ if (!(strcmp(arch, "aarch64")) && (stat(_PATH_ACPI_PPTT, &st) < 0)) -+ return 1; -+ else -+ return 0; -+} -+ - - static void - read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod) -@@ -1344,6 +1367,10 @@ get_cell_data(struct lscpu_desc *desc, int idx, int col, - snprintf(buf, bufsz, "%zu", i); - } - break; -+ case COL_CLUSTER: -+ if (!desc->is_cluster) -+ break; -+ /* fallthrough */ - case COL_SOCKET: - if (mod->physical) { - if (desc->socketids[idx] == -1) -@@ -1799,12 +1826,18 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) - if (fd) - fclose(fd); - } -+ -+ - if (desc->mtid) - threads_per_core = atoi(desc->mtid) + 1; - add_summary_n(tb, _("Thread(s) per core:"), - threads_per_core ?: desc->nthreads / desc->ncores); -- add_summary_n(tb, _("Core(s) per socket:"), -- cores_per_socket ?: desc->ncores / desc->nsockets); -+ if (desc->is_cluster) -+ add_summary_n(tb, _("Core(s) per cluster:"), -+ cores_per_socket ?: desc->ncores / desc->nsockets); -+ else -+ add_summary_n(tb, _("Core(s) per socket:"), -+ cores_per_socket ?: desc->ncores / desc->nsockets); - if (desc->nbooks) { - add_summary_n(tb, _("Socket(s) per book:"), - sockets_per_book ?: desc->nsockets / desc->nbooks); -@@ -1816,7 +1849,17 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) - add_summary_n(tb, _("Book(s):"), books_per_drawer ?: desc->nbooks); - } - } else { -- add_summary_n(tb, _("Socket(s):"), sockets_per_book ?: desc->nsockets); -+ if (desc->is_cluster) { -+ if (desc->nr_socket_on_cluster > 0) -+ add_summary_n(tb, _("Socket(s):"), desc->nr_socket_on_cluster); -+ else -+ add_summary_s(tb, _("Socket(s):"), "-"); -+ -+ add_summary_n(tb, _("Cluster(s):"), -+ sockets_per_book ?: desc->nsockets); -+ } else -+ add_summary_n(tb, _("Socket(s):"), -+ sockets_per_book ?: desc->nsockets); - } - } - if (desc->nnodes) -@@ -2060,10 +2103,13 @@ int main(int argc, char *argv[]) - qsort(desc->ecaches, desc->necaches, - sizeof(struct cpu_cache), cachecmp); - -+ desc->is_cluster = is_fallback_to_cluster(desc); -+ - read_nodes(desc); - read_hypervisor(desc, mod); - arm_cpu_decode(desc); - -+ - switch(mod->mode) { - case OUTPUT_SUMMARY: - print_summary(desc, mod); -@@ -2072,7 +2118,10 @@ int main(int argc, char *argv[]) - if (!ncolumns) { - columns[ncolumns++] = COL_CPU; - columns[ncolumns++] = COL_CORE; -- columns[ncolumns++] = COL_SOCKET; -+ if (desc->is_cluster) -+ columns[ncolumns++] = COL_CLUSTER; -+ else -+ columns[ncolumns++] = COL_SOCKET; - columns[ncolumns++] = COL_NODE; - columns[ncolumns++] = COL_CACHE; - mod->compat = 1; -@@ -2089,8 +2138,12 @@ int main(int argc, char *argv[]) - columns[ncolumns++] = COL_DRAWER; - if (desc->bookmaps) - columns[ncolumns++] = COL_BOOK; -- if (desc->socketmaps) -- columns[ncolumns++] = COL_SOCKET; -+ if (desc->socketmaps) { -+ if (desc->is_cluster) -+ columns[ncolumns++] = COL_CLUSTER; -+ else -+ columns[ncolumns++] = COL_SOCKET; -+ } - if (desc->coremaps) - columns[ncolumns++] = COL_CORE; - if (desc->caches) -diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h -index 3d1885a3e..bffa9df60 100644 ---- a/sys-utils/lscpu.h -+++ b/sys-utils/lscpu.h -@@ -158,6 +158,9 @@ struct lscpu_desc { - int physsockets; /* Physical sockets (modules) */ - int physchips; /* Physical chips */ - int physcoresperchip; /* Physical cores per chip */ -+ -+ int is_cluster; -+ int nr_socket_on_cluster; - }; - - enum { --- -2.29.2 - diff --git a/SOURCES/0052-lscpu-dmi-split-to-parse-dmi-table.patch b/SOURCES/0052-lscpu-dmi-split-to-parse-dmi-table.patch deleted file mode 100644 index b77d264..0000000 --- a/SOURCES/0052-lscpu-dmi-split-to-parse-dmi-table.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 60a1a900b22e6d714fbbde03322569ad4732b4ba Mon Sep 17 00:00:00 2001 -From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> -Date: Fri, 11 Sep 2020 09:53:26 -0400 -Subject: [PATCH 52/55] lscpu-dmi: split to parse dmi table - -Split out a function to parse dmi table. - -Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> ---- - sys-utils/lscpu-dmi.c | 60 ++++++++++++++++++++++++++++--------------- - 1 file changed, 40 insertions(+), 20 deletions(-) - -diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c -index 29bd2e4fc..9b57fe9e6 100644 ---- a/sys-utils/lscpu-dmi.c -+++ b/sys-utils/lscpu-dmi.c -@@ -42,6 +42,12 @@ struct dmi_header - uint8_t *data; - }; - -+struct dmi_info { -+ char *vendor; -+ char *product; -+ char *manufacturer; -+}; -+ - static int checksum(const uint8_t *buf, size_t len) - { - uint8_t sum = 0; -@@ -105,20 +111,13 @@ static char *dmi_string(const struct dmi_header *dm, uint8_t s) - return bp; - } - --static int hypervisor_from_dmi_table(uint32_t base, uint16_t len, -- uint16_t num, const char *devmem) -+static int parse_dmi_table(uint16_t len, uint16_t num, -+ uint8_t *data, -+ struct dmi_info *di) - { -- uint8_t *buf; -- uint8_t *data; -+ uint8_t *buf = data; -+ int rc = -1; - int i = 0; -- char *vendor = NULL; -- char *product = NULL; -- char *manufacturer = NULL; -- int rc = HYPER_NONE; -- -- data = buf = get_mem_chunk(base, len, devmem); -- if (!buf) -- goto done; - - /* 4 is the length of an SMBIOS structure header */ - while (i < num && data + 4 <= buf + len) { -@@ -142,11 +141,11 @@ static int hypervisor_from_dmi_table(uint32_t base, uint16_t len, - next += 2; - switch (h.type) { - case 0: -- vendor = dmi_string(&h, data[0x04]); -+ di->vendor = dmi_string(&h, data[0x04]); - break; - case 1: -- manufacturer = dmi_string(&h, data[0x04]); -- product = dmi_string(&h, data[0x05]); -+ di->manufacturer = dmi_string(&h, data[0x04]); -+ di->product = dmi_string(&h, data[0x05]); - break; - default: - break; -@@ -155,15 +154,36 @@ static int hypervisor_from_dmi_table(uint32_t base, uint16_t len, - data = next; - i++; - } -- if (manufacturer && !strcmp(manufacturer, "innotek GmbH")) -+ rc = 0; -+done: -+ return rc; -+} -+ -+static int hypervisor_from_dmi_table(uint32_t base, uint16_t len, -+ uint16_t num, const char *devmem) -+{ -+ uint8_t *data; -+ int rc = HYPER_NONE; -+ struct dmi_info di; -+ -+ data = get_mem_chunk(base, len, devmem); -+ if (!data) -+ return rc; -+ -+ memset(&di, 0, sizeof(struct dmi_info)); -+ rc = parse_dmi_table(len, num, data, &di); -+ if (rc < 0) -+ goto done; -+ -+ if (di.manufacturer && !strcmp(di.manufacturer, "innotek GmbH")) - rc = HYPER_INNOTEK; -- else if (manufacturer && strstr(manufacturer, "HITACHI") && -- product && strstr(product, "LPAR")) -+ else if (di.manufacturer && strstr(di.manufacturer, "HITACHI") && -+ di.product && strstr(di.product, "LPAR")) - rc = HYPER_HITACHI; -- else if (vendor && !strcmp(vendor, "Parallels")) -+ else if (di.vendor && !strcmp(di.vendor, "Parallels")) - rc = HYPER_PARALLELS; - done: -- free(buf); -+ free(data); - return rc; - } - --- -2.29.2 - diff --git a/SOURCES/0053-lscpu-add-helper-to-get-physical-sockets.patch b/SOURCES/0053-lscpu-add-helper-to-get-physical-sockets.patch deleted file mode 100644 index 8a384e0..0000000 --- a/SOURCES/0053-lscpu-add-helper-to-get-physical-sockets.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 32c4fe66ae9107a7fae556be02c1401e5046071b Mon Sep 17 00:00:00 2001 -From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> -Date: Fri, 11 Sep 2020 09:53:27 -0400 -Subject: [PATCH 53/55] lscpu: add helper to get physical sockets - -Add a helper function, get_number_of_physical_sockets_from_dmi(), -to get physical sockets from DMI table in case of the sysfs for -cpu topology doesn't have the physical socket information. - -get_number_of_physical_sockets_from_dmi() parse the DMI table -and counts the number of SMBIOS Processor Information (Type04) -structure. - -Note, ARM SBBR v1.0 and newer requires SMBIOS Processor Information -(Type04). And ARM SBBR v1.2 requires ACPI PPTT which has physical socket -information. So the helper function is useful for the machine base on -SBBR v1.0 and v1.1. - -Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> ---- - sys-utils/lscpu-dmi.c | 30 ++++++++++++++++++++++++++++++ - sys-utils/lscpu.h | 1 + - 2 files changed, 31 insertions(+) - -diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c -index 9b57fe9e6..31127f48a 100644 ---- a/sys-utils/lscpu-dmi.c -+++ b/sys-utils/lscpu-dmi.c -@@ -46,6 +46,7 @@ struct dmi_info { - char *vendor; - char *product; - char *manufacturer; -+ int sockets; - }; - - static int checksum(const uint8_t *buf, size_t len) -@@ -147,6 +148,9 @@ static int parse_dmi_table(uint16_t len, uint16_t num, - di->manufacturer = dmi_string(&h, data[0x04]); - di->product = dmi_string(&h, data[0x05]); - break; -+ case 4: -+ di->sockets++; -+ break; - default: - break; - } -@@ -323,3 +327,29 @@ done: - free(buf); - return rc < 0 ? HYPER_NONE : rc; - } -+ -+int get_number_of_physical_sockets_from_dmi(void) -+{ -+ static char const sys_fw_dmi_tables[] = _PATH_SYS_DMI; -+ struct dmi_info di; -+ struct stat st; -+ uint8_t *data; -+ int rc = -1; -+ -+ if (stat(sys_fw_dmi_tables, &st)) -+ return rc; -+ -+ data = get_mem_chunk(0, st.st_size, sys_fw_dmi_tables); -+ if (!data) -+ return rc; -+ -+ memset(&di, 0, sizeof(struct dmi_info)); -+ rc = parse_dmi_table(st.st_size, st.st_size/4, data, &di); -+ -+ free(data); -+ -+ if ((rc < 0) || !di.sockets) -+ return rc; -+ else -+ return di.sockets; -+} -diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h -index bffa9df60..b190afd21 100644 ---- a/sys-utils/lscpu.h -+++ b/sys-utils/lscpu.h -@@ -186,6 +186,7 @@ struct lscpu_modifier { - }; - - extern int read_hypervisor_dmi(void); -+extern int get_number_of_physical_sockets_from_dmi(void); - extern void arm_cpu_decode(struct lscpu_desc *desc); - - #endif /* LSCPU_H */ --- -2.29.2 - diff --git a/SOURCES/0054-lscpu-show-physical-socket-on-aarch64-without-ACPI-P.patch b/SOURCES/0054-lscpu-show-physical-socket-on-aarch64-without-ACPI-P.patch deleted file mode 100644 index 22ad472..0000000 --- a/SOURCES/0054-lscpu-show-physical-socket-on-aarch64-without-ACPI-P.patch +++ /dev/null @@ -1,51 +0,0 @@ -From ac6651b2bc599af707ccc96936bb028d31c1aea8 Mon Sep 17 00:00:00 2001 -From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> -Date: Fri, 11 Sep 2020 09:53:28 -0400 -Subject: [PATCH 54/56] lscpu: show physical socket on aarch64 without ACPI - PPTT - -Show the number of physical socket even if the sysfs doesn't have -the physical socket information. -Note, lscpu cannot show the number of socket info for unprivileged -users because it needs to access the DMI table. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883056 -Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu.c | 6 ++++-- - sys-utils/lscpu.h | 1 - - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index a8b448fa0..dc6dc97c3 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -1850,8 +1850,10 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) - } - } else { - if (desc->is_cluster) { -- if (desc->nr_socket_on_cluster > 0) -- add_summary_n(tb, _("Socket(s):"), desc->nr_socket_on_cluster); -+ int sockets = get_number_of_physical_sockets_from_dmi(); -+ -+ if (sockets > 0) -+ add_summary_n(tb, _("Socket(s):"), sockets); - else - add_summary_s(tb, _("Socket(s):"), "-"); - -diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h -index b190afd21..1aef8202d 100644 ---- a/sys-utils/lscpu.h -+++ b/sys-utils/lscpu.h -@@ -160,7 +160,6 @@ struct lscpu_desc { - int physcoresperchip; /* Physical cores per chip */ - - int is_cluster; -- int nr_socket_on_cluster; - }; - - enum { --- -2.29.2 - diff --git a/SOURCES/0055-lscpu-arm-read-vendor-and-model-from-BIOS.patch b/SOURCES/0055-lscpu-arm-read-vendor-and-model-from-BIOS.patch deleted file mode 100644 index 44ef972..0000000 --- a/SOURCES/0055-lscpu-arm-read-vendor-and-model-from-BIOS.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 7089a63d03b35743de533686906c451b917d0909 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 16 Dec 2020 13:08:51 +0100 -Subject: [PATCH 55/56] lscpu: (arm) read vendor and model from BIOS - -This patch backports the current upstream code to read CPU vendor and -model name from BIOS. - -Upstream: http://github.com/karelzak/util-linux/commit/8014104bea78f6f82cb82e16329b562e60ecdc87 -Upstream: http://github.com/karelzak/util-linux/commit/367c85c472869b75eaf770d4be0b360e30710b95 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883056 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1882740 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu-dmi.c | 44 +++++++++++++++++++++++++++++++++++++++++++ - sys-utils/lscpu.c | 7 +++++++ - sys-utils/lscpu.h | 3 +++ - 3 files changed, 54 insertions(+) - -diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c -index 31127f48a..3bdd7dcb2 100644 ---- a/sys-utils/lscpu-dmi.c -+++ b/sys-utils/lscpu-dmi.c -@@ -28,6 +28,7 @@ - #include <stdio.h> - - #include "lscpu.h" -+#include "all-io.h" - - #define _PATH_SYS_DMI "/sys/firmware/dmi/tables/DMI" - -@@ -353,3 +354,46 @@ int get_number_of_physical_sockets_from_dmi(void) - else - return di.sockets; - } -+ -+ -+#define _PATH_SYS_DMI_TYPE4 "/sys/firmware/dmi/entries/4-0/raw" -+#define PROC_MFR_OFFSET 0x07 -+#define PROC_VERSION_OFFSET 0x10 -+ -+/* -+ * Use firmware to get human readable names -+ */ -+int arm_smbios_decode(struct lscpu_desc *desc) -+{ -+ uint8_t data[8192]; -+ char buf[128], *str; -+ struct dmi_header h; -+ int fd; -+ ssize_t rs; -+ -+ fd = open(_PATH_SYS_DMI_TYPE4, O_RDONLY); -+ if (fd < 0) -+ return fd; -+ -+ rs = read_all(fd, (char *) data, 8192); -+ close(fd); -+ -+ if (rs == -1) -+ return -1; -+ -+ to_dmi_header(&h, data); -+ -+ str = dmi_string(&h, data[PROC_MFR_OFFSET]); -+ if (str) { -+ xstrncpy(buf, str, 127); -+ desc->bios_vendor = xstrdup(buf); -+ } -+ -+ str = dmi_string(&h, data[PROC_VERSION_OFFSET]); -+ if (str) { -+ xstrncpy(buf, str, 127); -+ desc->bios_modelname = xstrdup(buf); -+ } -+ -+ return 0; -+} -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index dc6dc97c3..70a797dd6 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -1868,6 +1868,8 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) - add_summary_n(tb, _("NUMA node(s):"), desc->nnodes); - if (desc->vendor) - add_summary_s(tb, _("Vendor ID:"), desc->vendor); -+ if (desc->bios_vendor) -+ add_summary_s(tb, _("BIOS Vendor ID:"), desc->bios_vendor); - if (desc->machinetype) - add_summary_s(tb, _("Machine type:"), desc->machinetype); - if (desc->family) -@@ -1876,6 +1878,8 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) - add_summary_s(tb, _("Model:"), desc->revision ? desc->revision : desc->model); - if (desc->modelname || desc->cpu) - add_summary_s(tb, _("Model name:"), desc->cpu ? desc->cpu : desc->modelname); -+ if (desc->bios_modelname) -+ add_summary_s(tb, _("BIOS Model name:"), desc->bios_modelname); - if (desc->stepping) - add_summary_s(tb, _("Stepping:"), desc->stepping); - if (desc->mhz) -@@ -2109,6 +2113,9 @@ int main(int argc, char *argv[]) - - read_nodes(desc); - read_hypervisor(desc, mod); -+ -+ if (mod->system == SYSTEM_LIVE) -+ arm_smbios_decode(desc); - arm_cpu_decode(desc); - - -diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h -index 1aef8202d..802719eeb 100644 ---- a/sys-utils/lscpu.h -+++ b/sys-utils/lscpu.h -@@ -79,10 +79,12 @@ struct polarization_modes { - struct lscpu_desc { - char *arch; - char *vendor; -+ char *bios_vendor; /* aarch64 */ - char *machinetype; /* s390 */ - char *family; - char *model; - char *modelname; -+ char *bios_modelname; /* aarch64 */ - char *revision; /* alternative for model (ppc) */ - char *cpu; /* alternative for modelname (ppc, sparc) */ - char *virtflag; /* virtualization flag (vmx, svm) */ -@@ -187,5 +189,6 @@ struct lscpu_modifier { - extern int read_hypervisor_dmi(void); - extern int get_number_of_physical_sockets_from_dmi(void); - extern void arm_cpu_decode(struct lscpu_desc *desc); -+extern int arm_smbios_decode(struct lscpu_desc *desc); - - #endif /* LSCPU_H */ --- -2.29.2 - diff --git a/SOURCES/0056-tests-update-sfdisk-resize.patch b/SOURCES/0056-tests-update-sfdisk-resize.patch deleted file mode 100644 index ebf256d..0000000 --- a/SOURCES/0056-tests-update-sfdisk-resize.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2193cfc5ee3f417e276c181fe39455646399153b Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 17 Sep 2018 16:22:14 +0200 -Subject: [PATCH 56/56] tests: update sfdisk resize - -Upstream: http://github.com/karelzak/util-linux/commit/a1b463d94afdae65ab5bfb192a58f1ceeb13679a -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1900498 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/expected/sfdisk/dos-resize-logical | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/expected/sfdisk/dos-resize-logical b/tests/expected/sfdisk/dos-resize-logical -index 9ceb9a327..a427ff010 100644 ---- a/tests/expected/sfdisk/dos-resize-logical -+++ b/tests/expected/sfdisk/dos-resize-logical -@@ -26,7 +26,7 @@ Device Boot Start End Sectors Size Id Type - <removed>3 6144 8191 2048 1M 83 Linux - <removed>4 8192 28671 20480 10M 5 Extended - <removed>5 10240 12287 2048 1M 83 Linux --<removed>6 14336 26623 12288 6M 83 Linux -+<removed>6 14336 28671 14336 7M 83 Linux - - The partition table has been altered. - Calling ioctl() to re-read partition table. --- -2.29.2 - diff --git a/SOURCES/0057-mesg-use-only-stat-to-get-the-current-terminal-statu.patch b/SOURCES/0057-mesg-use-only-stat-to-get-the-current-terminal-statu.patch deleted file mode 100644 index 62ff51f..0000000 --- a/SOURCES/0057-mesg-use-only-stat-to-get-the-current-terminal-statu.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 7ad815523618c2a053d28061054a44ae9108ceb0 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 12 Apr 2021 09:39:59 +0200 -Subject: [PATCH 57/63] mesg: use only stat() to get the current terminal - status - -open()+stat() does not work for example after su(1) (from root to -non-root). It seems better to use only stat() to get the current -terminal status. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1906157 -Upstream: http://github.com/karelzak/util-linux/commit/c0246ce059503bbc078122a50d564ca36a66f348 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - term-utils/mesg.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/term-utils/mesg.c b/term-utils/mesg.c -index 8714ad1aa..21a4a8581 100644 ---- a/term-utils/mesg.c -+++ b/term-utils/mesg.c -@@ -123,13 +123,10 @@ int main(int argc, char *argv[]) - - if ((tty = ttyname(STDERR_FILENO)) == NULL) - err(MESG_EXIT_FAILURE, _("ttyname failed")); -- if ((fd = open(tty, O_RDONLY)) < 0) -- err(MESG_EXIT_FAILURE, _("cannot open %s"), tty); -- if (fstat(fd, &sb)) -- err(MESG_EXIT_FAILURE, _("stat of %s failed"), tty); - - if (!*argv) { -- close(fd); -+ if (stat(tty, &sb)) -+ err(MESG_EXIT_FAILURE, _("stat of %s failed"), tty); - if (sb.st_mode & (S_IWGRP | S_IWOTH)) { - puts(_("is y")); - return IS_ALLOWED; -@@ -138,6 +135,11 @@ int main(int argc, char *argv[]) - return IS_NOT_ALLOWED; - } - -+ if ((fd = open(tty, O_RDONLY)) < 0) -+ err(MESG_EXIT_FAILURE, _("cannot open %s"), tty); -+ if (fstat(fd, &sb)) -+ err(MESG_EXIT_FAILURE, _("stat of %s failed"), tty); -+ - switch (rpmatch(argv[0])) { - case RPMATCH_YES: - #ifdef USE_TTY_GROUP --- -2.31.1 - diff --git a/SOURCES/0058-findmnt-add-option-to-list-all-fs-independent-flags.patch b/SOURCES/0058-findmnt-add-option-to-list-all-fs-independent-flags.patch deleted file mode 100644 index 827ab0c..0000000 --- a/SOURCES/0058-findmnt-add-option-to-list-all-fs-independent-flags.patch +++ /dev/null @@ -1,212 +0,0 @@ -From 2f04609de018013a36396e6a10b317607fb0b625 Mon Sep 17 00:00:00 2001 -From: Roberto Bergantinos Corpas <rbergant@redhat.com> -Date: Tue, 12 Jan 2021 11:58:53 +0100 -Subject: [PATCH 58/63] findmnt: add option to list all fs-independent flags - -It might be useful for security auditing purposes list all possible -mount flags/options including default set which are normally not listed. - -This patch adds "--vfs-all" option to list all fs-independent flags -on VFS-OPTIONS column, as well as libmount funcionality to accomplish -it. - -i.e.: - -$ findmnt -o VFS-OPTIONS -VFS-OPTIONS -rw,relatime -rw,nosuid,nodev,noexec,relatime -rw,nosuid,nodev,noexec,relatime -ro,nosuid,nodev,noexec -... - -$ findmnt --vfs-all -o VFS-OPTIONS -VFS-OPTIONS -rw,exec,suid,dev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow -rw,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow -rw,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow -ro,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,norelatime,nostrictatime,nolazytime,symfollow -... - -[kzak@redhat.com: - cleanup coding style and comments] - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1917852 -Upstream: http://github.com/karelzak/util-linux/commit/ff21f476f85ac9855452f4aac43a231c3c1e2ebc -Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/docs/libmount-sections.txt | 1 + - libmount/src/fs.c | 32 +++++++++++++++++++++++++++++ - libmount/src/libmount.h.in | 1 + - libmount/src/libmount.sym | 4 ++++ - misc-utils/findmnt.8 | 6 ++++++ - misc-utils/findmnt.c | 15 +++++++++++--- - misc-utils/findmnt.h | 2 ++ - 7 files changed, 58 insertions(+), 3 deletions(-) - -diff --git a/libmount/docs/libmount-sections.txt b/libmount/docs/libmount-sections.txt -index dea724b2f..f296c0611 100644 ---- a/libmount/docs/libmount-sections.txt -+++ b/libmount/docs/libmount-sections.txt -@@ -224,6 +224,7 @@ mnt_fs_get_usedsize - mnt_fs_get_userdata - mnt_fs_get_user_options - mnt_fs_get_vfs_options -+mnt_fs_get_vfs_options_all - mnt_fs_is_kernel - mnt_fs_is_netfs - mnt_fs_is_pseudofs -diff --git a/libmount/src/fs.c b/libmount/src/fs.c -index aae4961c3..34c09d66b 100644 ---- a/libmount/src/fs.c -+++ b/libmount/src/fs.c -@@ -924,6 +924,38 @@ const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs) - return fs ? fs->vfs_optstr : NULL; - } - -+/** -+ * mnt_fs_get_vfs_options_all: -+ * @fs: fstab/mtab entry pointer -+ * -+ * Returns: pointer to newlly allocated string (can be freed by free(3)) or -+ * NULL in case of error. The string contains all (including defaults) mount -+ * options. -+ */ -+char *mnt_fs_get_vfs_options_all(struct libmnt_fs *fs) -+{ -+ const struct libmnt_optmap *map = mnt_get_builtin_optmap(MNT_LINUX_MAP); -+ const struct libmnt_optmap *ent; -+ const char *opts = mnt_fs_get_options(fs); -+ char *result = NULL; -+ unsigned long flags = 0; -+ -+ if (!opts || mnt_optstr_get_flags(opts, &flags, map)) -+ return NULL; -+ -+ for (ent = map ; ent && ent->name ; ent++){ -+ if (ent->id & flags) { /* non-default value */ -+ if (!(ent->mask & MNT_INVERT)) -+ mnt_optstr_append_option(&result, ent->name, NULL); -+ else -+ continue; -+ } else if (ent->mask & MNT_INVERT) -+ mnt_optstr_append_option(&result, ent->name, NULL); -+ } -+ -+ return result; -+} -+ - /** - * mnt_fs_get_user_options: - * @fs: fstab/mtab entry pointer -diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in -index c61514b59..1d9a053e0 100644 ---- a/libmount/src/libmount.h.in -+++ b/libmount/src/libmount.h.in -@@ -452,6 +452,7 @@ extern int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, - 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 char *mnt_fs_get_vfs_options_all(struct libmnt_fs *fs); - - extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs); - extern int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr); -diff --git a/libmount/src/libmount.sym b/libmount/src/libmount.sym -index ca16cafa1..636c564eb 100644 ---- a/libmount/src/libmount.sym -+++ b/libmount/src/libmount.sym -@@ -322,3 +322,7 @@ MOUNT_2.30 { - mnt_context_enable_rwonly_mount; - mnt_context_get_excode; - } MOUNT_2.28; -+ -+MOUNT_2_37 { -+ mnt_fs_get_vfs_options_all; -+} MOUNT_2.30; -diff --git a/misc-utils/findmnt.8 b/misc-utils/findmnt.8 -index 58dd38625..41a37cb5f 100644 ---- a/misc-utils/findmnt.8 -+++ b/misc-utils/findmnt.8 -@@ -249,6 +249,12 @@ It's possible to specify source (device) or target (mountpoint) to filter mount - .TP - .BR "\-\-verbose" - Force findmnt to print more information (\fB\-\-verify\fP only for now). -+.TP -+.B \-\-vfs-all -+When used with -+.BR VFS-OPTIONS -+column, print all VFS (fs-independent) flags. This option is designed for auditing purposes to -+list also default VFS kernel mount options which are normally not listed. - .SH EXAMPLES - .IP "\fBfindmnt \-\-fstab \-t nfs\fP" - Prints all NFS filesystems defined in -diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c -index 184b6f7d7..a7b3af4f4 100644 ---- a/misc-utils/findmnt.c -+++ b/misc-utils/findmnt.c -@@ -542,7 +542,10 @@ static char *get_data(struct libmnt_fs *fs, int num) - str = xstrdup(mnt_fs_get_options(fs)); - break; - case COL_VFS_OPTIONS: -- str = xstrdup(mnt_fs_get_vfs_options(fs)); -+ if (flags & FL_VFS_ALL) -+ str = mnt_fs_get_vfs_options_all(fs); -+ else if (mnt_fs_get_vfs_options(fs)) -+ str = xstrdup(mnt_fs_get_vfs_options(fs)); - break; - case COL_FS_OPTIONS: - str = xstrdup(mnt_fs_get_fs_options(fs)); -@@ -1243,6 +1246,7 @@ static void __attribute__((__noreturn__)) usage(void) - fputc('\n', out); - fputs(_(" -x, --verify verify mount table content (default is fstab)\n"), out); - fputs(_(" --verbose print more details\n"), out); -+ fputs(_(" --vfs-all print all VFS options\n"), out); - - fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(24)); -@@ -1271,8 +1275,9 @@ int main(int argc, char *argv[]) - struct libscols_table *table = NULL; - - enum { -- FINDMNT_OPT_VERBOSE = CHAR_MAX + 1, -- FINDMNT_OPT_TREE -+ FINDMNT_OPT_VERBOSE = CHAR_MAX + 1, -+ FINDMNT_OPT_TREE, -+ FINDMNT_OPT_VFS_ALL - }; - - static const struct option longopts[] = { -@@ -1313,6 +1318,7 @@ int main(int argc, char *argv[]) - { "version", no_argument, NULL, 'V' }, - { "verbose", no_argument, NULL, FINDMNT_OPT_VERBOSE }, - { "tree", no_argument, NULL, FINDMNT_OPT_TREE }, -+ { "vfs-all", no_argument, NULL, FINDMNT_OPT_VFS_ALL }, - { NULL, 0, NULL, 0 } - }; - -@@ -1479,6 +1485,9 @@ int main(int argc, char *argv[]) - case FINDMNT_OPT_TREE: - force_tree = 1; - break; -+ case FINDMNT_OPT_VFS_ALL: -+ flags |= FL_VFS_ALL; -+ break; - default: - errtryhelp(EXIT_FAILURE); - } -diff --git a/misc-utils/findmnt.h b/misc-utils/findmnt.h -index fbaa38e82..9a277b68a 100644 ---- a/misc-utils/findmnt.h -+++ b/misc-utils/findmnt.h -@@ -19,6 +19,8 @@ enum { - FL_STRICTTARGET = (1 << 15), - FL_VERBOSE = (1 << 16), - -+ FL_VFS_ALL = (1 << 19), -+ - /* basic table settings */ - FL_ASCII = (1 << 20), - FL_RAW = (1 << 21), --- -2.31.1 - diff --git a/SOURCES/0059-nologin-Prevent-error-from-su-c.patch b/SOURCES/0059-nologin-Prevent-error-from-su-c.patch deleted file mode 100644 index 9dd8b4a..0000000 --- a/SOURCES/0059-nologin-Prevent-error-from-su-c.patch +++ /dev/null @@ -1,83 +0,0 @@ -From ae227f0eb3500b49fb78623f51ec9bd4366346ef Mon Sep 17 00:00:00 2001 -From: Stanislav Brabec <sbrabec@suse.cz> -Date: Thu, 10 Oct 2019 01:08:25 +0200 -Subject: [PATCH 59/63] nologin: Prevent error from su -c - -"su -c" can pass "-c" to nologin. It causes ugly error: - -su -c "echo OK" - man --nologin: invalid option -- 'c' -Try '-nologin --help' for more information. - -Accept -c to prevent this error. - -Upstream: http://github.com/karelzak/util-linux/commit/a174eefb41a2ce8b467bb7e1546953c8bd1223dd -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1922299 -Signed-off-by: Josef Cejka <jcejka@suse.com> -Signed-off-by: Stanislav Brabec <sbrabec@suse.cz> ---- - login-utils/nologin.8 | 11 +++++++++-- - login-utils/nologin.c | 9 +++++++-- - 2 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/login-utils/nologin.8 b/login-utils/nologin.8 -index ee5948443..9389a86c6 100644 ---- a/login-utils/nologin.8 -+++ b/login-utils/nologin.8 -@@ -18,9 +18,16 @@ The exit code returned by - is always 1. - .PP - .SH OPTIONS --.IP "\fB\-h, \-\-help\fP" -+ -+ -+.TP -+.IP "\fB\-c\fR, \fB\-\-command\fR \fIcommand\fR" -+Ignored. For compatibility with -+.I su -c "command" - user -+that would cause error otherwise. -+.IP "\fB\-h\fR, \fB\-\-help\fR" - Display help text and exit. --.IP "\fB-V, \-\-version" -+.IP "\fB-V\fR, \fB\-\-version\fR" - Display version information and exit. - .SH NOTES - .B nologin -diff --git a/login-utils/nologin.c b/login-utils/nologin.c -index b0b6a721c..293f568c1 100644 ---- a/login-utils/nologin.c -+++ b/login-utils/nologin.c -@@ -30,7 +30,8 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_("Politely refuse a login.\n"), out); - - fputs(USAGE_OPTIONS, out); -- printf(USAGE_HELP_OPTIONS(16)); -+ fputs(_(" -c, --command <command> does nothing (for compatibility with su -c)\n"), out); -+ printf(USAGE_HELP_OPTIONS(26)); - - printf(USAGE_MAN_TAIL("nologin(8)")); - exit(EXIT_FAILURE); -@@ -41,6 +42,7 @@ int main(int argc, char *argv[]) - int c, fd = -1; - struct stat st; - static const struct option longopts[] = { -+ { "command", required_argument, NULL, 'c' }, - { "help", 0, NULL, 'h' }, - { "version", 0, NULL, 'V' }, - { NULL, 0, NULL, 0 } -@@ -50,8 +52,11 @@ int main(int argc, char *argv[]) - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -- while ((c = getopt_long(argc, argv, "hV", longopts, NULL)) != -1) { -+ while ((c = getopt_long(argc, argv, "c:hV", longopts, NULL)) != -1) { - switch (c) { -+ case 'c': -+ /* Ignore the command, just don't print unknown option error. */ -+ break; - case 'h': - usage(); - break; --- -2.31.1 - diff --git a/SOURCES/0060-nologin-silently-ignore-well-known-shell-command-lin.patch b/SOURCES/0060-nologin-silently-ignore-well-known-shell-command-lin.patch deleted file mode 100644 index 03983d6..0000000 --- a/SOURCES/0060-nologin-silently-ignore-well-known-shell-command-lin.patch +++ /dev/null @@ -1,124 +0,0 @@ -From bfa7d299f8a497a835bc250bd765094ee06b8a01 Mon Sep 17 00:00:00 2001 -From: Sami Kerola <kerolasa@iki.fi> -Date: Sun, 17 Nov 2019 08:33:04 +0000 -Subject: [PATCH 60/63] nologin: silently ignore well known shell command-line - options - -nologin is typically used in /etc/passwd as a shell replacement. Hence it -is reasonable to ignore well known command-line options silently to avoid -unwanted ugly error messages. - -Addresses: https://github.com/karelzak/util-linux/issues/895 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1922299 -Upstream: http://github.com/karelzak/util-linux/commit/beb61b07c20ab902fec883a4bd087c45d2742dea -Requested-by: Lennart Poettering <lennart@poettering.net> -Signed-off-by: Sami Kerola <kerolasa@iki.fi> ---- - login-utils/nologin.8 | 32 ++++++++++++++++++++++++-------- - login-utils/nologin.c | 33 ++++++++++++++++++++++++++++----- - 2 files changed, 52 insertions(+), 13 deletions(-) - -diff --git a/login-utils/nologin.8 b/login-utils/nologin.8 -index 9389a86c6..d3882e2b1 100644 ---- a/login-utils/nologin.8 -+++ b/login-utils/nologin.8 -@@ -1,4 +1,4 @@ --.TH NOLOGIN 8 "September 2013" "util-linux" "System Administration" -+.TH NOLOGIN 8 "November 2019" "util-linux" "System Administration" - .SH NAME - nologin \- politely refuse a login - .SH SYNOPSIS -@@ -18,13 +18,29 @@ The exit code returned by - is always 1. - .PP - .SH OPTIONS -- -- --.TP --.IP "\fB\-c\fR, \fB\-\-command\fR \fIcommand\fR" --Ignored. For compatibility with --.I su -c "command" - user --that would cause error otherwise. -+\fB\-c\fR, \fB\-\-command\fR \fIcommand\fR -+.br -+\fB\-\-init-file\fR -+.br -+\fB\-i\fR \fB\-\-interactive\fR -+.br -+\fB\-\-init-file\fR \fIfile\fR -+.br -+\fB\-i\fR, \fB\-\-interactive\fR -+.br -+\fB\-l\fR, \fB\-\-login\fR -+.br -+\fB\-\-noprofile\fR -+.br -+\fB\-\-norc\fR -+.br -+\fB\-\-posix\fR -+.br -+\fB\-\-rcfile\fR \fIfile\fR -+.br -+\fB\-r\fR, \fB\-\-restricted\fR -+.IP -+These shell command-line options are ignored to avoid nologin error. - .IP "\fB\-h\fR, \fB\-\-help\fR" - Display help text and exit. - .IP "\fB-V\fR, \fB\-\-version\fR" -diff --git a/login-utils/nologin.c b/login-utils/nologin.c -index 293f568c1..567a9a2ca 100644 ---- a/login-utils/nologin.c -+++ b/login-utils/nologin.c -@@ -41,10 +41,25 @@ int main(int argc, char *argv[]) - { - int c, fd = -1; - struct stat st; -+ enum { -+ OPT_INIT_FILE = CHAR_MAX + 1, -+ OPT_NOPROFILE, -+ OPT_NORC, -+ OPT_POSIX, -+ OPT_RCFILE -+ }; - static const struct option longopts[] = { -- { "command", required_argument, NULL, 'c' }, -- { "help", 0, NULL, 'h' }, -- { "version", 0, NULL, 'V' }, -+ { "command", required_argument, NULL, 'c' }, -+ { "init-file", required_argument, NULL, OPT_INIT_FILE }, -+ { "interactive", no_argument, NULL, 'i' }, -+ { "login", no_argument, NULL, 'l' }, -+ { "noprofile", no_argument, NULL, OPT_NOPROFILE }, -+ { "norc", no_argument, NULL, OPT_NORC }, -+ { "posix", no_argument, NULL, OPT_POSIX }, -+ { "rcfile", required_argument, NULL, OPT_RCFILE }, -+ { "restricted", no_argument, NULL, 'r' }, -+ { "help", no_argument, NULL, 'h' }, -+ { "version", no_argument, NULL, 'V' }, - { NULL, 0, NULL, 0 } - }; - -@@ -52,10 +67,18 @@ int main(int argc, char *argv[]) - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -- while ((c = getopt_long(argc, argv, "c:hV", longopts, NULL)) != -1) { -+ while ((c = getopt_long(argc, argv, "c:ilrhV", longopts, NULL)) != -1) { - switch (c) { - case 'c': -- /* Ignore the command, just don't print unknown option error. */ -+ case OPT_INIT_FILE: -+ case 'i': -+ case 'l': -+ case OPT_NOPROFILE: -+ case OPT_NORC: -+ case OPT_POSIX: -+ case OPT_RCFILE: -+ case 'r': -+ /* Ignore well known shell command-line options */ - break; - case 'h': - usage(); --- -2.31.1 - diff --git a/SOURCES/0061-libsmartcols-introduce-default-sort-column.patch b/SOURCES/0061-libsmartcols-introduce-default-sort-column.patch deleted file mode 100644 index 861d5b6..0000000 --- a/SOURCES/0061-libsmartcols-introduce-default-sort-column.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 543e87865c5b9b7cb08ce8d55da1ef414154d213 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 24 Mar 2021 12:43:17 +0100 -Subject: [PATCH 61/63] libsmartcols: introduce default sort column - -* add default sort column, set by scols_sort_table() - -* sort tree according to default sort column also in scols_sort_table_by_tree() - -The function scols_sort_table() does not sort tree branches if tree -is not enabled. The function scols_sort_table_by_tree() does not care -if tree is enabled and it always follows parent->child relations. For -scols_sort_table_by_tree() we need to follow order in branches if -previously scols_sort_table() has been called. - -For example lsblk calls - - scols_sort_table(tb, cl); - scols_sort_table_by_tree(tb); - -for list-like output (for example lsblk -P) and users assume the -same order as for tree (lsblk --tree). - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 -Upstream: http://github.com/karelzak/util-linux/commit/529b51706ef06611a8165023f14e6593e06901de -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libsmartcols/src/smartcolsP.h | 3 ++ - libsmartcols/src/table.c | 60 ++++++++++++++++++++++++---------- - libsmartcols/src/table_print.c | 6 ++-- - misc-utils/lsblk.c | 6 ++-- - 4 files changed, 52 insertions(+), 23 deletions(-) - -diff --git a/libsmartcols/src/smartcolsP.h b/libsmartcols/src/smartcolsP.h -index 510e7a980..8037fb9f5 100644 ---- a/libsmartcols/src/smartcolsP.h -+++ b/libsmartcols/src/smartcolsP.h -@@ -160,6 +160,9 @@ struct libscols_table { - - struct list_head tb_columns; - struct list_head tb_lines; -+ -+ struct libscols_column *dflt_sort_column; /* default sort column, set by scols_sort_table() */ -+ - struct libscols_symbols *symbols; - struct libscols_cell title; /* optional table title (for humans) */ - -diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c -index 979a09a39..bbabc0817 100644 ---- a/libsmartcols/src/table.c -+++ b/libsmartcols/src/table.c -@@ -224,6 +224,8 @@ int scols_table_remove_column(struct libscols_table *tb, - - if (cl->flags & SCOLS_FL_TREE) - tb->ntreecols--; -+ if (tb->dflt_sort_column == cl) -+ tb->dflt_sort_column = NULL; - - DBG(TAB, ul_debugobj(tb, "remove column")); - list_del_init(&cl->cl_columns); -@@ -1362,41 +1364,63 @@ static int sort_line_children(struct libscols_line *ln, struct libscols_column * - return 0; - } - -+static int __scols_sort_tree(struct libscols_table *tb, struct libscols_column *cl) -+{ -+ struct libscols_line *ln; -+ struct libscols_iter itr; -+ -+ if (!tb || !cl || !cl->cmpfunc) -+ return -EINVAL; -+ -+ scols_reset_iter(&itr, SCOLS_ITER_FORWARD); -+ while (scols_table_next_line(tb, &itr, &ln) == 0) -+ sort_line_children(ln, cl); -+ return 0; -+} -+ - /** - * scols_sort_table: - * @tb: table -- * @cl: order by this column -+ * @cl: order by this column or NULL - * - * Orders the table by the column. See also scols_column_set_cmpfunc(). If the - * tree output is enabled then children in the tree are recursively sorted too. - * -+ * The column @cl is saved as the default sort column to the @tb and the next time -+ * is possible to call scols_sort_table(tb, NULL). The saved column is also used by -+ * scols_sort_table_by_tree(). -+ * - * Returns: 0, a negative value in case of an error. - */ - int scols_sort_table(struct libscols_table *tb, struct libscols_column *cl) - { -- if (!tb || !cl || !cl->cmpfunc) -+ if (!tb) -+ return -EINVAL; -+ if (!cl) -+ cl = tb->dflt_sort_column; -+ if (!cl || !cl->cmpfunc) - return -EINVAL; - -- DBG(TAB, ul_debugobj(tb, "sorting table")); -+ DBG(TAB, ul_debugobj(tb, "sorting table by %zu column", cl->seqnum)); - list_sort(&tb->tb_lines, cells_cmp_wrapper_lines, cl); - -- if (scols_table_is_tree(tb)) { -- struct libscols_line *ln; -- struct libscols_iter itr; -+ if (scols_table_is_tree(tb)) -+ __scols_sort_tree(tb, cl); - -- scols_reset_iter(&itr, SCOLS_ITER_FORWARD); -- while (scols_table_next_line(tb, &itr, &ln) == 0) -- sort_line_children(ln, cl); -- } -+ if (cl && cl != tb->dflt_sort_column) -+ tb->dflt_sort_column = cl; - - return 0; - } - -+/* -+ * Move all @ln's children after @ln in the table. -+ */ - static struct libscols_line *move_line_and_children(struct libscols_line *ln, struct libscols_line *pre) - { - if (pre) { - list_del_init(&ln->ln_lines); /* remove from old position */ -- list_add(&ln->ln_lines, &pre->ln_lines); /* add to the new place (behind @pre) */ -+ list_add(&ln->ln_lines, &pre->ln_lines); /* add to the new place (after @pre) */ - } - pre = ln; - -@@ -1418,7 +1442,10 @@ static struct libscols_line *move_line_and_children(struct libscols_line *ln, st - * @tb: table - * - * Reorders lines in the table by parent->child relation. Note that order of -- * the lines in the table is independent on the tree hierarchy. -+ * the lines in the table is independent on the tree hierarchy by default. -+ * -+ * The children of the lines are sorted according to the default sort column -+ * if scols_sort_table() has been previously called. - * - * Since: 2.30 - * -@@ -1434,13 +1461,12 @@ int scols_sort_table_by_tree(struct libscols_table *tb) - - DBG(TAB, ul_debugobj(tb, "sorting table by tree")); - -- scols_reset_iter(&itr, SCOLS_ITER_FORWARD); -- while (scols_table_next_line(tb, &itr, &ln) == 0) { -- if (ln->parent) -- continue; -+ if (tb->dflt_sort_column) -+ __scols_sort_tree(tb, tb->dflt_sort_column); - -+ scols_reset_iter(&itr, SCOLS_ITER_FORWARD); -+ while (scols_table_next_line(tb, &itr, &ln) == 0) - move_line_and_children(ln, NULL); -- } - - return 0; - } -diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c -index 8ecfc30e2..337dbbd84 100644 ---- a/libsmartcols/src/table_print.c -+++ b/libsmartcols/src/table_print.c -@@ -585,11 +585,9 @@ static int cell_to_buffer(struct libscols_table *tb, - - ce = scols_line_get_cell(ln, cl->seqnum); - data = ce ? scols_cell_get_data(ce) : NULL; -- if (!data) -- return 0; - - if (!scols_column_is_tree(cl)) -- return buffer_set_data(buf, data); -+ return data ? buffer_set_data(buf, data) : 0; - - /* - * Tree stuff -@@ -605,7 +603,7 @@ static int cell_to_buffer(struct libscols_table *tb, - buffer_set_art_index(buf); - } - -- if (!rc) -+ if (!rc && data) - rc = buffer_append_data(buf, data); - return rc; - } -diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c -index d0369d3e7..cc7894ecf 100644 ---- a/misc-utils/lsblk.c -+++ b/misc-utils/lsblk.c -@@ -1894,10 +1894,12 @@ 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) { - /* the sort column is not between output columns -- add as hidden */ - add_column(lsblk->sort_id); --- -2.31.1 - diff --git a/SOURCES/0062-libmount-accept-another-flags-on-MS_REMOUNT-MS_BIND.patch b/SOURCES/0062-libmount-accept-another-flags-on-MS_REMOUNT-MS_BIND.patch deleted file mode 100644 index 5a02957..0000000 --- a/SOURCES/0062-libmount-accept-another-flags-on-MS_REMOUNT-MS_BIND.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 8681757ee08361d78e4c74da8abae9d6df8623e7 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 28 May 2018 15:46:28 +0200 -Subject: [PATCH 62/63] libmount: accept another flags on MS_REMOUNT|MS_BIND - -The current libmount MS_REMOUNT|MS_BIND support is restricted to -MS_RDONLY (read-only bind mount). This is too restrictive as Linux -kernel supports bind-remount for arbitrary VFS flags. - -After this update you can use - - # mount /dev/sdc1 /mnt/A - # mount --bind -onosuid,noexec /mnt/A /mnt/B - - # findmnt /dev/sdc1 -oTARGET,SOURCE,FS-OPTIONS,VFS-OPTIONS - TARGET SOURCE FS-OPTIONS VFS-OPTIONS - /mnt/A /dev/sdc1 rw,stripe=512,data=ordered rw,relatime - /mnt/B /dev/sdc1 rw,stripe=512,data=ordered rw,nosuid,noexec,relatime - -The "mount --bind" is composed from two syscalls of course (1st is -bind, 2nd is bind,remount,nosuid,noexec). - -Addresses: https://github.com/karelzak/util-linux/issues/637 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1919529 -Upstream: http://github.com/karelzak/util-linux/commit/e82b77e9696a6dada96a7f3ea3ec20a63e8e7b9e -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/context_mount.c | 22 ++++++++-------------- - libmount/src/mountP.h | 3 +++ - sys-utils/mount.8 | 5 +++-- - 3 files changed, 14 insertions(+), 16 deletions(-) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index a6de36178..b88e60507 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -107,22 +107,16 @@ static int init_propagation(struct libmnt_context *cxt) - } - - /* -- * add additional mount(2) syscall request to implement "ro,bind", the first regular -- * mount(2) is the "bind" operation, the second is "remount,ro,bind" call. -- * -- * Note that we don't remove "ro" from the first syscall (kernel silently -- * ignores this flags for bind operation) -- maybe one day kernel will support -- * read-only binds in one step and then all will be done by the first mount(2) and the -- * second remount will be noop... -+ * add additional mount(2) syscall request to implement "bind,<flags>", the first regular -+ * mount(2) is the "bind" operation, the second is "remount,bind,<flags>" call. - */ --static int init_robind(struct libmnt_context *cxt) -+static int init_bind_remount(struct libmnt_context *cxt) - { - struct libmnt_addmount *ad; - int rc; - - assert(cxt); - assert(cxt->mountflags & MS_BIND); -- assert(cxt->mountflags & MS_RDONLY); - assert(!(cxt->mountflags & MS_REMOUNT)); - - DBG(CXT, ul_debugobj(cxt, "mount: initialize additional ro,bind mount")); -@@ -131,9 +125,9 @@ static int init_robind(struct libmnt_context *cxt) - if (!ad) - return -ENOMEM; - -- ad->mountflags = MS_REMOUNT | MS_BIND | MS_RDONLY; -- if (cxt->mountflags & MS_REC) -- ad->mountflags |= MS_REC; -+ ad->mountflags = cxt->mountflags; -+ ad->mountflags |= (MS_REMOUNT | MS_BIND); -+ - rc = mnt_context_append_additional_mount(cxt, ad); - if (rc) - return rc; -@@ -254,9 +248,9 @@ static int fix_optstr(struct libmnt_context *cxt) - return rc; - } - if ((cxt->mountflags & MS_BIND) -- && (cxt->mountflags & MS_RDONLY) -+ && (cxt->mountflags & MNT_BIND_SETTABLE) - && !(cxt->mountflags & MS_REMOUNT)) { -- rc = init_robind(cxt); -+ rc = init_bind_remount(cxt); - if (rc) - return rc; - } -diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h -index 52a238ef3..64a507e61 100644 ---- a/libmount/src/mountP.h -+++ b/libmount/src/mountP.h -@@ -363,6 +363,9 @@ struct libmnt_context - /* default flags */ - #define MNT_FL_DEFAULT 0 - -+/* Flags usable with MS_BIND|MS_REMOUNT */ -+#define MNT_BIND_SETTABLE (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME|MS_NODIRATIME|MS_RELATIME|MS_RDONLY) -+ - /* lock.c */ - extern int mnt_lock_use_simplelock(struct libmnt_lock *ml, int enable); - -diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 -index a4d7de2c0..291e65cb1 100644 ---- a/sys-utils/mount.8 -+++ b/sys-utils/mount.8 -@@ -410,8 +410,9 @@ will be writable, but the - will be read-only. - - It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and --relatime VFS entry flags by "remount,bind" operation. It's impossible to change --mount options recursively (for example with \fB-o rbind,ro\fR). -+relatime VFS entry flags by "remount,bind" operation. The another (for example -+filesystem specific flags) are silently ignored. It's impossible to change mount -+options recursively (for example with \fB-o rbind,ro\fR). - - .BR mount (8) - since v2.31 ignores the \fBbind\fR flag from --- -2.31.1 - diff --git a/SOURCES/0063-libmount-improve-MS_REC-usage.patch b/SOURCES/0063-libmount-improve-MS_REC-usage.patch deleted file mode 100644 index 467f70b..0000000 --- a/SOURCES/0063-libmount-improve-MS_REC-usage.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 9f7fe1b83fcc508dc3e05815d03dbbb752a1cfba Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 1 Jun 2018 12:16:19 +0200 -Subject: [PATCH 63/63] libmount: improve MS_REC usage - -libmount allows to split one library (mount(8)) call to multiple mount(2) -syscalls, for example - - --rbind --make-rslave - -in this case we have to be careful with MS_REC because the flag is -applied to multiple operations. - - # strace -e mount mount --rbind --make-rslave /mnt/A /mnt/B - -Old version: - - mount("/mnt/A", "/mnt/B", 0x13ecac0, MS_MGC_VAL|MS_BIND, NULL) = 0 - mount("none", "/mnt/B", NULL, MS_REC|MS_SLAVE, NULL) = 0 - -Fixed version: - - mount("/mnt/A", "/mnt/B", 0x1f22ac0, MS_MGC_VAL|MS_BIND|MS_REC, NULL) = 0 - mount("none", "/mnt/B", NULL, MS_REC|MS_SLAVE, NULL) = 0 - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1946921 -Upstream: http://github.com/karelzak/util-linux/commit/816773b475900909d42c2c8282a6ac50252cac22 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libmount/src/context.c | 5 +++++ - libmount/src/context_mount.c | 25 ++++++++++++++++++++++--- - libmount/src/optstr.c | 9 ++++++--- - 3 files changed, 33 insertions(+), 6 deletions(-) - -diff --git a/libmount/src/context.c b/libmount/src/context.c -index e7f1ee934..8e00b75a9 100644 ---- a/libmount/src/context.c -+++ b/libmount/src/context.c -@@ -1375,6 +1375,11 @@ struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt) - * - * both of these calls have the same effect. - * -+ * Be careful if you want to use MS_REC flag -- in this case the bit is applied -+ * to all bind/slave/etc. options. If you want to mix more propadation flags -+ * and/or bind, move operations than it's better to specify mount options by -+ * strings. -+ * - * Returns: 0 on success, negative number in case of error. - */ - int mnt_context_set_mflags(struct libmnt_context *cxt, unsigned long flags) -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index b88e60507..a8e84127c 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -73,6 +73,7 @@ static int init_propagation(struct libmnt_context *cxt) - char *opts = (char *) mnt_fs_get_vfs_options(cxt->fs); - size_t namesz; - struct libmnt_optmap const *maps[1]; -+ int rec_count = 0; - - if (!opts) - return 0; -@@ -86,9 +87,19 @@ static int init_propagation(struct libmnt_context *cxt) - struct libmnt_addmount *ad; - int rc; - -- if (!mnt_optmap_get_entry(maps, 1, name, namesz, &ent) -- || !ent -- || !(ent->id & MS_PROPAGATION)) -+ if (!mnt_optmap_get_entry(maps, 1, name, namesz, &ent) || !ent) -+ continue; -+ -+ DBG(CXT, ul_debugobj(cxt, " checking %s", ent->name)); -+ -+ /* Note that MS_REC may be used for more flags, so we have to keep -+ * track about number of recursive options to keep the MS_REC in the -+ * mountflags if necessary. -+ */ -+ if (ent->id & MS_REC) -+ rec_count++; -+ -+ if (!(ent->id & MS_PROPAGATION)) - continue; - - ad = mnt_new_addmount(); -@@ -96,13 +107,21 @@ static int init_propagation(struct libmnt_context *cxt) - return -ENOMEM; - - ad->mountflags = ent->id; -+ DBG(CXT, ul_debugobj(cxt, " adding extra mount(2) call for %s", ent->name)); - rc = mnt_context_append_additional_mount(cxt, ad); - if (rc) - return rc; - -+ DBG(CXT, ul_debugobj(cxt, " removing %s from primary mount(2) call", ent->name)); - cxt->mountflags &= ~ent->id; -+ -+ if (ent->id & MS_REC) -+ rec_count--; - } - -+ if (rec_count) -+ cxt->mountflags |= MS_REC; -+ - return 0; - } - -diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c -index 8248f0dee..cc077ffd9 100644 ---- a/libmount/src/optstr.c -+++ b/libmount/src/optstr.c -@@ -800,14 +800,17 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags, - if (rc) - goto err; - } -- if (!(ent->mask & MNT_INVERT)) -+ if (!(ent->mask & MNT_INVERT)) { - fl &= ~ent->id; -+ if (ent->id & MS_REC) -+ fl |= MS_REC; -+ } - } - } - } - -- /* add missing options */ -- if (fl) { -+ /* add missing options (but ignore fl if contains MS_REC only) */ -+ if (fl && fl != MS_REC) { - const struct libmnt_optmap *ent; - char *p; - --- -2.31.1 - diff --git a/SOURCES/0064-script-be-sensitive-to-another-SIGCHLD-ssi_codes.patch b/SOURCES/0064-script-be-sensitive-to-another-SIGCHLD-ssi_codes.patch deleted file mode 100644 index 943384e..0000000 --- a/SOURCES/0064-script-be-sensitive-to-another-SIGCHLD-ssi_codes.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 84009d2236c73efe7dc4b74372734d5b3306670b Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 5 Sep 2018 11:51:22 +0200 -Subject: [PATCH 64/72] script: be sensitive to another SIGCHLD ssi_codes - -The current signalfd handler cares on CLD_EXITED only. It's pretty -insufficient as there is more situations (and codes) when child no -more running. - -Addresses: https://github.com/karelzak/util-linux/issues/686 -Upstream: http://github.com/util-linux/util-linux/commit/27afe5016842c22d256ea9f88b598d637ca0df84 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - term-utils/script.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/term-utils/script.c b/term-utils/script.c -index d5ffa27f1..ff5f808de 100644 ---- a/term-utils/script.c -+++ b/term-utils/script.c -@@ -402,10 +402,15 @@ static void handle_signal(struct script_control *ctl, int fd) - - switch (info.ssi_signo) { - case SIGCHLD: -- DBG(SIGNAL, ul_debug(" get signal SIGCHLD")); -- if (info.ssi_code == CLD_EXITED) { -+ DBG(SIGNAL, ul_debug(" get signal SIGCHLD [ssi_code=%d, ssi_status=%d]", -+ info.ssi_code, info.ssi_status)); -+ if (info.ssi_code == CLD_EXITED -+ || info.ssi_code == CLD_KILLED -+ || info.ssi_code == CLD_DUMPED) { - wait_for_child(ctl, 0); - ctl->poll_timeout = 10; -+ -+ /* In case of ssi_code is CLD_TRAPPED, CLD_STOPPED, or CLD_CONTINUED */ - } else if (info.ssi_status == SIGSTOP && ctl->child) { - DBG(SIGNAL, ul_debug(" child stop by SIGSTOP -- stop parent too")); - kill(getpid(), SIGSTOP); -@@ -433,6 +438,7 @@ static void handle_signal(struct script_control *ctl, int fd) - default: - abort(); - } -+ DBG(SIGNAL, ul_debug("signal handle on FD %d done", fd)); - } - - static void do_io(struct script_control *ctl) --- -2.31.1 - diff --git a/SOURCES/0065-libfdisk-fix-partition-calculation-for-BLKPG_-ioctls.patch b/SOURCES/0065-libfdisk-fix-partition-calculation-for-BLKPG_-ioctls.patch deleted file mode 100644 index bcf806c..0000000 --- a/SOURCES/0065-libfdisk-fix-partition-calculation-for-BLKPG_-ioctls.patch +++ /dev/null @@ -1,60 +0,0 @@ -From be29de8b5dfe15972455d25e15068dc31d4376ac Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 6 May 2020 13:32:46 +0200 -Subject: [PATCH 65/72] libfdisk: fix partition calculation for BLKPG_* ioctls - -The include/partx.h interface we use in util-linux uses 512-byte -sectors, but libfdisk uses real sector sizes. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2016229 -Upstream: http://github.com/util-linux/util-linux/commit/6a4d53ce6466fc97c0ee13846cd1bf7bdd7bfef0 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libfdisk/src/context.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c -index 779a9a889..fe7eb9e7e 100644 ---- a/libfdisk/src/context.c -+++ b/libfdisk/src/context.c -@@ -813,6 +813,7 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org) - struct fdisk_partition **rem = NULL, **add = NULL, **upd = NULL; - int change, rc = 0, err = 0; - size_t nparts, i, nadds = 0, nupds = 0, nrems = 0; -+ unsigned int ssf; - - DBG(CXT, ul_debugobj(cxt, "rereading changes")); - -@@ -845,6 +846,9 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org) - goto done; - } - -+ /* sector size factor -- used to recount from real to 512-byte sectors */ -+ ssf = cxt->sector_size / 512; -+ - for (i = 0; i < nrems; i++) { - pa = rem[i]; - DBG(PART, ul_debugobj(pa, "#%zu calling BLKPG_DEL_PARTITION", pa->partno)); -@@ -856,7 +860,8 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org) - for (i = 0; i < nupds; i++) { - pa = upd[i]; - DBG(PART, ul_debugobj(pa, "#%zu calling BLKPG_RESIZE_PARTITION", pa->partno)); -- if (partx_resize_partition(cxt->dev_fd, pa->partno + 1, pa->start, pa->size) != 0) { -+ if (partx_resize_partition(cxt->dev_fd, pa->partno + 1, -+ pa->start * ssf, pa->size * ssf) != 0) { - fdisk_warn(cxt, _("Failed to update system information about partition %zu"), pa->partno + 1); - err++; - } -@@ -864,7 +869,8 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org) - for (i = 0; i < nadds; i++) { - pa = add[i]; - DBG(PART, ul_debugobj(pa, "#%zu calling BLKPG_ADD_PARTITION", pa->partno)); -- if (partx_add_partition(cxt->dev_fd, pa->partno + 1, pa->start, pa->size) != 0) { -+ if (partx_add_partition(cxt->dev_fd, pa->partno + 1, -+ pa->start * ssf, pa->size * ssf) != 0) { - fdisk_warn(cxt, _("Failed to add partition %zu to system"), pa->partno + 1); - err++; - } --- -2.31.1 - diff --git a/SOURCES/0066-libfdisk-fix-fdisk_reread_changes-for-extended-parti.patch b/SOURCES/0066-libfdisk-fix-fdisk_reread_changes-for-extended-parti.patch deleted file mode 100644 index da0b864..0000000 --- a/SOURCES/0066-libfdisk-fix-fdisk_reread_changes-for-extended-parti.patch +++ /dev/null @@ -1,48 +0,0 @@ -From aecaffc55dd763c34f61937b2047f0aaaeb4e6fc Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 6 Aug 2020 11:32:33 +0200 -Subject: [PATCH 66/74] libfdisk: fix fdisk_reread_changes() for extended - partitions - -Linux kernel assumes only 1KiB extended partition to avoid overlapping -with nested logical partitions. We need to follow this rule for -BLKPG_ADD_PARTITION. - -Addresses: https://github.com/karelzak/util-linux/issues/1112 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2041498 -Upstream: http://github.com/util-linux/util-linux/commit/33f50706fd7c1c5e53f8f355f12b685c6935f5a4 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libfdisk/src/context.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c -index fe7eb9e7e..114101980 100644 ---- a/libfdisk/src/context.c -+++ b/libfdisk/src/context.c -@@ -867,10 +867,21 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org) - } - } - for (i = 0; i < nadds; i++) { -+ uint64_t sz; -+ - pa = add[i]; -+ sz = pa->size * ssf; -+ - DBG(PART, ul_debugobj(pa, "#%zu calling BLKPG_ADD_PARTITION", pa->partno)); -+ -+ if (fdisk_is_label(cxt, DOS) && fdisk_partition_is_container(pa)) -+ /* Let's follow the Linux kernel and reduce -+ * DOS extended partition to 1 or 2 sectors. -+ */ -+ sz = min(sz, (uint64_t) 2); -+ - if (partx_add_partition(cxt->dev_fd, pa->partno + 1, -- pa->start * ssf, pa->size * ssf) != 0) { -+ pa->start * ssf, sz) != 0) { - fdisk_warn(cxt, _("Failed to add partition %zu to system"), pa->partno + 1); - err++; - } --- -2.31.1 - diff --git a/SOURCES/0067-logger-fix-size-use-for-stdin.patch b/SOURCES/0067-logger-fix-size-use-for-stdin.patch deleted file mode 100644 index 987a4f9..0000000 --- a/SOURCES/0067-logger-fix-size-use-for-stdin.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 7cc5bcfcb2340266a6b42370c9c4c02d8a325d5f Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 21 Oct 2021 18:47:40 +0200 -Subject: [PATCH 67/74] logger: fix --size use for stdin -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The stdin version counts log header into the message size, but -for example when it reads message from argv[] it counts only message -itself. - - $ logger --stderr --size 3 "abcd" - <13>Oct 21 18:48:29 kzak: abc - - $ echo "abcd" | logger --stderr --size 3 - logger: cannot allocate 18446744073709551597 bytes: Cannot allocate memory - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2011602 -Upstream: http://github.com/util-linux/util-linux/commit/58e4ee082bca100034791a4a74481f263bb30a25 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/logger.c | 16 ++++------------ - 1 file changed, 4 insertions(+), 12 deletions(-) - -diff --git a/misc-utils/logger.c b/misc-utils/logger.c -index ebdc56ec2..c20ef05f1 100644 ---- a/misc-utils/logger.c -+++ b/misc-utils/logger.c -@@ -957,11 +957,9 @@ static void logger_stdin(struct logger_ctl *ctl) - * update header timestamps and to reflect possible priority changes. - * The initial header is generated by logger_open(). - */ -- int has_header = 1; - int default_priority = ctl->pri; - int last_pri = default_priority; -- size_t max_usrmsg_size = ctl->max_message_size - strlen(ctl->hdr); -- char *const buf = xmalloc(max_usrmsg_size + 2 + 2); -+ char *buf = xmalloc(ctl->max_message_size + 2 + 2); - int pri; - int c; - size_t i; -@@ -988,27 +986,21 @@ static void logger_stdin(struct logger_ctl *ctl) - ctl->pri = default_priority; - - if (ctl->pri != last_pri) { -- has_header = 0; -- max_usrmsg_size = -- ctl->max_message_size - strlen(ctl->hdr); -+ generate_syslog_header(ctl); - last_pri = ctl->pri; - } - if (c != EOF && c != '\n') - c = getchar(); - } - -- while (c != EOF && c != '\n' && i < max_usrmsg_size) { -+ while (c != EOF && c != '\n' && i < ctl->max_message_size) { - buf[i++] = c; - c = getchar(); - } - buf[i] = '\0'; - -- if (i > 0 || !ctl->skip_empty_lines) { -- if (!has_header) -- generate_syslog_header(ctl); -+ if (i > 0 || !ctl->skip_empty_lines) - write_output(ctl, buf); -- has_header = 0; -- } - - if (c == '\n') /* discard line terminator */ - c = getchar(); --- -2.31.1 - diff --git a/SOURCES/0068-fstrim-improve-timer-setting.patch b/SOURCES/0068-fstrim-improve-timer-setting.patch deleted file mode 100644 index 0c4e534..0000000 --- a/SOURCES/0068-fstrim-improve-timer-setting.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ebb628f8b6e9564c036fce152f67512e5755dcfc Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 6 Dec 2021 13:20:37 +0100 -Subject: [PATCH 68/74] fstrim: improve timer setting - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1916151 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/fstrim.timer | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sys-utils/fstrim.timer b/sys-utils/fstrim.timer -index 3a3762d5c..54b3c18f5 100644 ---- a/sys-utils/fstrim.timer -+++ b/sys-utils/fstrim.timer -@@ -1,11 +1,13 @@ - [Unit] - Description=Discard unused blocks once a week - Documentation=man:fstrim -+ConditionVirtualization=!container - - [Timer] - OnCalendar=weekly - AccuracySec=1h - Persistent=true -+RandomizedDelaySec=6000 - - [Install] - WantedBy=timers.target --- -2.31.1 - diff --git a/SOURCES/0069-setpriv-implement-option-to-set-parent-death-signal.patch b/SOURCES/0069-setpriv-implement-option-to-set-parent-death-signal.patch deleted file mode 100644 index a4806c2..0000000 --- a/SOURCES/0069-setpriv-implement-option-to-set-parent-death-signal.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 0b421290e05862e1abbb5a82654bd2de9829dd58 Mon Sep 17 00:00:00 2001 -From: Patrick Steinhardt <ps@pks.im> -Date: Tue, 10 Apr 2018 12:08:21 +0100 -Subject: [PATCH 69/74] setpriv: implement option to set parent death signal - -When a process uses the syscall `prctl(PR_SET_PDEATHSIG, ...)`, it will -get notified with a process-defined signal as soon as its parent process -dies. This is for example being used by unshare(1)'s recently added -"--kill-child" option, causing the forked child to be killed as soon as -unshare itself dies. - -Unfortunately, some LSMs will cause the parent death signal to be reset -when a process changes credentials, with the most important ones being -SELinux and AppArmor. The following command will thus not work as -expected: - - unshare --fork --kill-child setpriv --reuid user <executable> - -As soon as setpriv changes UID, the parent death signal is cleared and -the child will never get signalled when unshare gets killed. - -Add a new option "--pdeathsig keep|clear|<signal>". Setting this flag -will cause us to either - -- restore the previously active parent death signal as soon as the - setpriv has applied all credential changes -- clear the parent death signal -- set the parent death signal to "<signal>" - -Furthermore, print out the currently set signal when dumping process -state. - -[kzak@redhat.com: - small changes in codding style] - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1894192 -Signed-off-by: Patrick Steinhardt <ps@pks.im> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/setpriv.1 | 6 ++++++ - sys-utils/setpriv.c | 49 +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 55 insertions(+) - -diff --git a/sys-utils/setpriv.1 b/sys-utils/setpriv.1 -index b900f6e08..f989bf33c 100644 ---- a/sys-utils/setpriv.1 -+++ b/sys-utils/setpriv.1 -@@ -139,6 +139,12 @@ is cleared by - .BR execve (2) - and is therefore not allowed. - .TP -+.BR "\-\-pdeathsig keep" | clear | <signal> -+Keep, clear or set the parent death signal. Some LSMs, most notably SELinux and -+AppArmor, clear the signal when the process' credentials change. Using -+\fB--pdeathsig keep\fR will restore the parent death signal after changing -+credentials to remedy that situation. -+.TP - .BI \-\-selinux\-label " label" - Request a particular SELinux transition (using a transition on exec, not - dyntrans). This will fail and cause -diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c -index 4147978cc..0d3a3b3c9 100644 ---- a/sys-utils/setpriv.c -+++ b/sys-utils/setpriv.c -@@ -38,6 +38,7 @@ - #include "strutils.h" - #include "xalloc.h" - #include "pathnames.h" -+#include "signames.h" - - #ifndef PR_SET_NO_NEW_PRIVS - # define PR_SET_NO_NEW_PRIVS 38 -@@ -102,6 +103,8 @@ struct privctx { - - /* securebits */ - int securebits; -+ /* parent death signal (<0 clear, 0 nothing, >0 signal) */ -+ int pdeathsig; - - /* LSMs */ - const char *selinux_label; -@@ -135,6 +138,8 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_(" --init-groups initialize supplementary groups\n"), out); - fputs(_(" --groups <group,...> set supplementary groups\n"), out); - fputs(_(" --securebits <bits> set securebits\n"), out); -+ fputs(_(" --pdeathsig keep|clear|<signame>\n" -+ " set or clear parent death signal\n"), out); - fputs(_(" --selinux-label <label> set SELinux label\n"), out); - fputs(_(" --apparmor-profile <pr> set AppArmor profile\n"), out); - -@@ -329,6 +334,24 @@ static void dump_groups(void) - free(groups); - } - -+static void dump_pdeathsig(void) -+{ -+ int pdeathsig; -+ -+ if (prctl(PR_GET_PDEATHSIG, &pdeathsig) != 0) { -+ warn(_("get pdeathsig failed")); -+ return; -+ } -+ -+ printf("Parent death signal: "); -+ if (pdeathsig && signum_to_signame(pdeathsig) != NULL) -+ printf("%s\n", signum_to_signame(pdeathsig)); -+ else if (pdeathsig) -+ printf("%d\n", pdeathsig); -+ else -+ printf("[none]\n"); -+} -+ - static void dump(int dumplevel) - { - int x; -@@ -392,6 +415,7 @@ static void dump(int dumplevel) - printf("\n"); - - dump_securebits(); -+ dump_pdeathsig(); - - if (access(_PATH_SYS_SELINUX, F_OK) == 0) - dump_label(_("SELinux label")); -@@ -438,6 +462,19 @@ static void parse_groups(struct privctx *opts, const char *str) - free(groups); - } - -+static void parse_pdeathsig(struct privctx *opts, const char *str) -+{ -+ if (!strcmp(str, "keep")) { -+ if (prctl(PR_GET_PDEATHSIG, &opts->pdeathsig) != 0) -+ errx(SETPRIV_EXIT_PRIVERR, -+ _("failed to get parent death signal")); -+ } else if (!strcmp(str, "clear")) { -+ opts->pdeathsig = -1; -+ } else if ((opts->pdeathsig = signame_to_signum(str)) < 0) { -+ errx(EXIT_FAILURE, _("unknown signal: %s"), str); -+ } -+} -+ - static void do_setresuid(const struct privctx *opts) - { - uid_t ruid, euid, suid; -@@ -711,6 +748,7 @@ int main(int argc, char **argv) - LISTCAPS, - CAPBSET, - SECUREBITS, -+ PDEATHSIG, - SELINUX_LABEL, - APPARMOR_PROFILE - }; -@@ -734,6 +772,7 @@ int main(int argc, char **argv) - { "groups", required_argument, NULL, GROUPS }, - { "bounding-set", required_argument, NULL, CAPBSET }, - { "securebits", required_argument, NULL, SECUREBITS }, -+ { "pdeathsig", required_argument, NULL, PDEATHSIG, }, - { "selinux-label", required_argument, NULL, SELINUX_LABEL }, - { "apparmor-profile", required_argument, NULL, APPARMOR_PROFILE }, - { "help", no_argument, NULL, 'h' }, -@@ -844,6 +883,12 @@ int main(int argc, char **argv) - _("duplicate --groups option")); - parse_groups(&opts, optarg); - break; -+ case PDEATHSIG: -+ if (opts.pdeathsig) -+ errx(EXIT_FAILURE, -+ _("duplicate --keep-pdeathsig option")); -+ parse_pdeathsig(&opts, optarg); -+ break; - case LISTCAPS: - list_caps = 1; - break; -@@ -989,6 +1034,10 @@ int main(int argc, char **argv) - do_caps(CAP_TYPE_AMBIENT, opts.ambient_caps); - } - -+ /* Clear or set parent death signal */ -+ if (opts.pdeathsig && prctl(PR_SET_PDEATHSIG, opts.pdeathsig < 0 ? 0 : opts.pdeathsig) != 0) -+ err(SETPRIV_EXIT_PRIVERR, _("set parent death signal failed")); -+ - execvp(argv[optind], argv + optind); - errexec(argv[optind]); - } --- -2.31.1 - diff --git a/SOURCES/0070-lib-sys-add-sysfs_chrdev_devno_to_devname.patch b/SOURCES/0070-lib-sys-add-sysfs_chrdev_devno_to_devname.patch deleted file mode 100644 index 24b5192..0000000 --- a/SOURCES/0070-lib-sys-add-sysfs_chrdev_devno_to_devname.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 0db1f9965e6791c651d0bccd095cbe3a87c6579c Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 25 Nov 2021 11:52:46 +0100 -Subject: [PATCH 70/74] lib/sys: add sysfs_chrdev_devno_to_devname() - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2026511 -Upstream: http://github.com/util-linux/util-linux/commit/ab5304a7a34bfa45d9bee205ca4e26f03db6e79d -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - include/pathnames.h | 1 + - include/sysfs.h | 2 ++ - lib/sysfs.c | 33 +++++++++++++++++++++++++++++++++ - 3 files changed, 36 insertions(+) - -diff --git a/include/pathnames.h b/include/pathnames.h -index 59cc66736..77f8b6e85 100644 ---- a/include/pathnames.h -+++ b/include/pathnames.h -@@ -102,6 +102,7 @@ - - #define _PATH_SYS_BLOCK "/sys/block" - #define _PATH_SYS_DEVBLOCK "/sys/dev/block" -+#define _PATH_SYS_DEVCHAR "/sys/dev/char" - #define _PATH_SYS_CLASS "/sys/class" - #define _PATH_SYS_SCSI "/sys/bus/scsi" - -diff --git a/include/sysfs.h b/include/sysfs.h -index 9a72a2009..e2fd0c1ba 100644 ---- a/include/sysfs.h -+++ b/include/sysfs.h -@@ -92,6 +92,8 @@ extern int sysfs_scsi_host_is(struct sysfs_cxt *cxt, const char *type); - extern int sysfs_scsi_has_attribute(struct sysfs_cxt *cxt, const char *attr); - extern int sysfs_scsi_path_contains(struct sysfs_cxt *cxt, const char *pattern); - -+extern char *sysfs_chrdev_devno_to_devname(dev_t devno, char *buf, size_t bufsiz); -+ - /** - * sysfs_devname_sys_to_dev: - * @name: devname to be converted in place -diff --git a/lib/sysfs.c b/lib/sysfs.c -index e5437f43a..ceec41d10 100644 ---- a/lib/sysfs.c -+++ b/lib/sysfs.c -@@ -1036,6 +1036,39 @@ int sysfs_scsi_path_contains(struct sysfs_cxt *cxt, const char *pattern) - return strstr(linkc, pattern) != NULL; - } - -+char *sysfs_chrdev_devno_to_devname(dev_t devno, char *buf, size_t bufsiz) -+{ -+ char link[PATH_MAX]; -+ char path[PATH_MAX]; -+ char *name; -+ ssize_t sz; -+ -+ sz = snprintf(path, sizeof(path), -+ _PATH_SYS_DEVCHAR "/%u:%u", major(devno), minor(devno)); -+ if (sz <= 0) -+ return NULL; -+ -+ /* read /sys/dev/char/<maj:min> link */ -+ sz = readlink(path, link, sizeof(link) - 1); -+ if (sz < 0) -+ return NULL; -+ link[sz] = '\0'; -+ -+ name = strrchr(link, '/'); -+ if (!name) -+ return NULL; -+ -+ name++; -+ sz = strlen(name); -+ if ((size_t) sz + 1 > bufsiz) -+ return NULL; -+ -+ memcpy(buf, name, sz + 1); -+ sysfs_devname_sys_to_dev(buf); -+ return buf; -+ -+} -+ - #ifdef TEST_PROGRAM_SYSFS - #include <errno.h> - #include <err.h> --- -2.31.1 - diff --git a/SOURCES/0071-libblkid-check-UBI-char-device-name.patch b/SOURCES/0071-libblkid-check-UBI-char-device-name.patch deleted file mode 100644 index 35f11b6..0000000 --- a/SOURCES/0071-libblkid-check-UBI-char-device-name.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7ce318610afcbb793e438332687c2f09844a86c2 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 25 Nov 2021 11:54:11 +0100 -Subject: [PATCH 71/74] libblkid: check UBI char device name - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2026511 -Upstream: http://github.com/util-linux/util-linux/commit/7eb6d9ce4526b968e30f7e538cbbbdf9938e5891 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/probe.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index a6dc8416a..49a62c47f 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -915,9 +915,17 @@ int blkid_probe_set_device(blkid_probe pr, int fd, - DBG(LOWPROBE, ul_debug("failed to get device size")); - goto err; - } -- } else if (S_ISCHR(sb.st_mode)) -+ } else if (S_ISCHR(sb.st_mode)) { -+ char buf[PATH_MAX]; -+ -+ if (!sysfs_chrdev_devno_to_devname(sb.st_rdev, buf, sizeof(buf)) -+ || strncmp(buf, "ubi", 3) != 0) { -+ DBG(LOWPROBE, ul_debug("no UBI char device")); -+ errno = EINVAL; -+ goto err; -+ } - devsiz = 1; /* UBI devices are char... */ -- else if (S_ISREG(sb.st_mode)) -+ } else if (S_ISREG(sb.st_mode)) - devsiz = sb.st_size; /* regular file */ - - pr->size = size ? (uint64_t)size : devsiz; --- -2.31.1 - diff --git a/SOURCES/0072-blkid-check-device-type-and-name-before-probe.patch b/SOURCES/0072-blkid-check-device-type-and-name-before-probe.patch deleted file mode 100644 index 89ccee6..0000000 --- a/SOURCES/0072-blkid-check-device-type-and-name-before-probe.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 90783d6294351229efdee5469dd8cd08d0057731 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 25 Nov 2021 11:54:26 +0100 -Subject: [PATCH 72/74] blkid: check device type and name before probe - -For calls "blkid /dev/*", it seems better to check the -device type and name before we open the device in libblkid. - -Upstream: http://github.com/util-linux/util-linux/commit/64cfe6ac37631a6347bd4005c72dd2d37e737f5e -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2026511 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/blkid.c | 27 +++++++++++++++++++++++++-- - 1 file changed, 25 insertions(+), 2 deletions(-) - -diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c -index 61a6994c2..bd4ce4a39 100644 ---- a/misc-utils/blkid.c -+++ b/misc-utils/blkid.c -@@ -46,6 +46,8 @@ - #define XALLOC_EXIT_CODE BLKID_EXIT_OTHER /* x.*alloc(), xstrndup() */ - #include "xalloc.h" - -+#include "sysfs.h" -+ - struct blkid_control { - int output; - uintmax_t offset; -@@ -813,8 +815,29 @@ int main(int argc, char **argv) - /* The rest of the args are device names */ - if (optind < argc) { - devices = xcalloc(argc - optind, sizeof(char *)); -- while (optind < argc) -- devices[numdev++] = argv[optind++]; -+ while (optind < argc) { -+ char *dev = argv[optind++]; -+ struct stat sb; -+ -+ if (stat(dev, &sb) != 0) -+ continue; -+ else if (S_ISBLK(sb.st_mode)) -+ ; -+ else if (S_ISREG(sb.st_mode)) -+ ; -+ else if (S_ISCHR(sb.st_mode)) { -+ char buf[PATH_MAX]; -+ -+ if (!sysfs_chrdev_devno_to_devname( -+ sb.st_rdev, buf, sizeof(buf))) -+ continue; -+ if (strncmp(buf, "ubi", 3) != 0) -+ continue; -+ } else -+ continue; -+ -+ devices[numdev++] = dev; -+ } - } - - /* convert LABEL/UUID lookup to evaluate request */ --- -2.31.1 - diff --git a/SOURCES/0073-blkid-don-t-print-all-devices-if-only-garbage-specif.patch b/SOURCES/0073-blkid-don-t-print-all-devices-if-only-garbage-specif.patch deleted file mode 100644 index 1bce104..0000000 --- a/SOURCES/0073-blkid-don-t-print-all-devices-if-only-garbage-specif.patch +++ /dev/null @@ -1,40 +0,0 @@ -From aa57abc10273f250a7ab6525bd45dc2bdc5e4b41 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 10 Jan 2022 16:32:44 +0100 -Subject: [PATCH 73/74] blkid: don't print all devices if only garbage - specified - -There is small regression. The old version (before -64cfe6ac37631a6347bd4005c72dd2d37e737f5e) returns nothing when - - # blkid /dontexist - -specified on command line. - -Upstream: http://github.com/util-linux/util-linux/commit/9e882685a3db3fd5e0870e7b94a4ea25ddc199c7 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2026511 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - misc-utils/blkid.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c -index bd4ce4a39..bc0d3465d 100644 ---- a/misc-utils/blkid.c -+++ b/misc-utils/blkid.c -@@ -838,6 +838,12 @@ int main(int argc, char **argv) - - devices[numdev++] = dev; - } -+ -+ if (!numdev) { -+ /* only unsupported devices specified */ -+ err = BLKID_EXIT_NOTFOUND; -+ goto exit; -+ } - } - - /* convert LABEL/UUID lookup to evaluate request */ --- -2.31.1 - diff --git a/SOURCES/0074-Complete-Linux-PAM-compliance-for-forked-child-in-su.patch b/SOURCES/0074-Complete-Linux-PAM-compliance-for-forked-child-in-su.patch deleted file mode 100644 index 3423a4c..0000000 --- a/SOURCES/0074-Complete-Linux-PAM-compliance-for-forked-child-in-su.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 9e7cedda86e5356d1723e6bd0bab5e38c4fe4a34 Mon Sep 17 00:00:00 2001 -From: "Andrew G. Morgan" <morgan@kernel.org> -Date: Sat, 27 Nov 2021 21:00:22 -0800 -Subject: [PATCH 74/74] Complete Linux-PAM compliance for forked child in su - and login. - -As documented here: - -http://www.linux-pam.org/Linux-PAM-html/adg-interface-by-app-expected.html#adg-pam_end - -The child that is about to exec*() the user shell is supposed to pam_end() -with PAM_DATA_SILENT. This gives the modules a last chance to do a minor -cleanup of the module state before the user's shell is launched. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1950187 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2033566 -Upstream: http://github.com/util-linux/util-linux/commit/4660286e9cdff6d95b49295674b96f83af10ea36 -Signed-off-by: Andrew G. Morgan <morgan@kernel.org> ---- - login-utils/login.c | 3 +++ - login-utils/su-common.c | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/login-utils/login.c b/login-utils/login.c -index 8c9e43292..9f50fe03b 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -1370,6 +1370,9 @@ int main(int argc, char **argv) - - childArgv[childArgc++] = NULL; - -+ /* http://www.linux-pam.org/Linux-PAM-html/adg-interface-by-app-expected.html#adg-pam_end */ -+ (void) pam_end(cxt.pamh, PAM_SUCCESS|PAM_DATA_SILENT); -+ - execvp(childArgv[0], childArgv + 1); - - if (!strcmp(childArgv[0], "/bin/sh")) -diff --git a/login-utils/su-common.c b/login-utils/su-common.c -index c1b1a04e4..825ff1d5a 100644 ---- a/login-utils/su-common.c -+++ b/login-utils/su-common.c -@@ -1428,6 +1428,9 @@ int su_main(int argc, char **argv, int mode) - if (su->simulate_login && chdir(su->pwd->pw_dir) != 0) - warn(_("warning: cannot change directory to %s"), su->pwd->pw_dir); - -+ /* http://www.linux-pam.org/Linux-PAM-html/adg-interface-by-app-expected.html#adg-pam_end */ -+ (void) pam_end(su->pamh, PAM_SUCCESS|PAM_DATA_SILENT); -+ - if (shell) - run_shell(su, shell, command, argv + optind, max(0, argc - optind)); - --- -2.31.1 - diff --git a/SOURCES/0075-lib-loopdev-retry-LOOP_SET_STATUS64-and-LOOP_SET_BLO.patch b/SOURCES/0075-lib-loopdev-retry-LOOP_SET_STATUS64-and-LOOP_SET_BLO.patch deleted file mode 100644 index a6e1ea1..0000000 --- a/SOURCES/0075-lib-loopdev-retry-LOOP_SET_STATUS64-and-LOOP_SET_BLO.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 97a5abd36eeab4e07a31b27f6a2c2078d42e2e33 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 8 Mar 2022 11:40:58 +0100 -Subject: lib/loopdev: retry LOOP_SET_STATUS64 and LOOP_SET_BLOCK_SIZE on - EAGAIN - -Upstream: http://github.com/util-linux/util-linux/commit/0ae7bb11c29aa11c8ef25b1ef2f82ee4701b856d -Upstream: http://github.com/util-linux/util-linux/commit/eab90ef8d4f66394285e0cff1dfc0a27242c05aa -Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=2058176 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - lib/loopdev.c | 42 +++++++++++++++++++++++++++++++++++++----- - 1 file changed, 37 insertions(+), 5 deletions(-) - -diff --git a/lib/loopdev.c b/lib/loopdev.c -index 54d337ea3..48af82aef 100644 ---- a/lib/loopdev.c -+++ b/lib/loopdev.c -@@ -42,6 +42,8 @@ - #include "blkdev.h" - #include "debug.h" - -+#define LOOPDEV_MAX_TRIES 10 -+ - /* - * Debug stuff (based on include/debug.h) - */ -@@ -1260,6 +1262,7 @@ int loopcxt_setup_device(struct loopdev_cxt *lc) - { - int file_fd, dev_fd, mode = O_RDWR, rc = -1, cnt = 0; - int errsv = 0; -+ int err, again; - - if (!lc || !*lc->device || !lc->filename) - return -EINVAL; -@@ -1331,7 +1334,17 @@ int loopcxt_setup_device(struct loopdev_cxt *lc) - - DBG(SETUP, ul_debugobj(lc, "LOOP_SET_FD: OK")); - -- if (ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info)) { -+ cnt = 0; -+ do { -+ err = ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info); -+ again = err && errno == EAGAIN; -+ if (again) { -+ xusleep(250000); -+ cnt++; -+ } -+ } while (again && cnt <= LOOPDEV_MAX_TRIES); -+ -+ if (err) { - rc = -errno; - errsv = errno; - DBG(SETUP, ul_debugobj(lc, "LOOP_SET_STATUS64 failed: %m")); -@@ -1376,7 +1389,7 @@ err: - */ - int loopcxt_set_status(struct loopdev_cxt *lc) - { -- int dev_fd, rc = -1; -+ int dev_fd, rc = -1, err, again, tries = 0; - - errno = 0; - dev_fd = loopcxt_get_fd(lc); -@@ -1387,7 +1400,16 @@ int loopcxt_set_status(struct loopdev_cxt *lc) - } - DBG(SETUP, ul_debugobj(lc, "device open: OK")); - -- if (ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info)) { -+ do { -+ err = ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info); -+ again = err && errno == EAGAIN; -+ if (again) { -+ xusleep(250000); -+ tries++; -+ } -+ } while (again && tries <= LOOPDEV_MAX_TRIES); -+ -+ if (err) { - rc = -errno; - DBG(SETUP, ul_debugobj(lc, "LOOP_SET_STATUS64 failed: %m")); - return rc; -@@ -1440,12 +1462,22 @@ int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio) - int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) - { - int fd = loopcxt_get_fd(lc); -+ int err, again, tries = 0; - - if (fd < 0) - return -EINVAL; - -- /* Kernels prior to v4.14 don't support this ioctl */ -- if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) blocksize) < 0) { -+ do { -+ /* Kernels prior to v4.14 don't support this ioctl */ -+ err = ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) blocksize); -+ again = err && errno == EAGAIN; -+ if (again) { -+ xusleep(250000); -+ tries++; -+ } -+ } while (again && tries <= LOOPDEV_MAX_TRIES); -+ -+ if (err) { - int rc = -errno; - DBG(CXT, ul_debugobj(lc, "LOOP_SET_BLOCK_SIZE failed: %m")); - return rc; --- -2.34.1 - diff --git a/SOURCES/0076-libblkid-fix-Atari-prober-logic.patch b/SOURCES/0076-libblkid-fix-Atari-prober-logic.patch deleted file mode 100644 index 98a492c..0000000 --- a/SOURCES/0076-libblkid-fix-Atari-prober-logic.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 214eaa70d8431161de03ea7903f814c102e87919 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Fri, 9 Oct 2020 13:06:08 +0200 -Subject: libblkid: fix Atari prober logic - -Addresses: https://github.com/karelzak/util-linux/issues/1159 -Addresses: https://github.com/karelzak/util-linux/issues/1116 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Upstream: http://github.com/util-linux/util-linux/commit/282ceadc3a72fc07dd0388b8880fd751490bb87f -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/partitions/atari.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c -index 1224a577c..b469ef5a1 100644 ---- a/libblkid/src/partitions/atari.c -+++ b/libblkid/src/partitions/atari.c -@@ -199,11 +199,10 @@ static int probe_atari_pt(blkid_probe pr, - - hdsize = blkid_probe_get_size(pr) / 512; - -- /* Look for validly looking primary partition */ -- for (i = 0; ; i++) { -- if (i >= ARRAY_SIZE(rs->part)) -- goto nothing; -- -+ /* -+ * At least one valid partition required -+ */ -+ for (i = 0; i < 4; i++) { - if (IS_PARTDEF_VALID(rs->part[i], hdsize)) { - blkid_probe_set_magic(pr, - offsetof(struct atari_rootsector, part[i]), -@@ -213,6 +212,9 @@ static int probe_atari_pt(blkid_probe pr, - } - } - -+ if (i == 4) -+ goto nothing; -+ - if (blkid_partitions_need_typeonly(pr)) - /* caller does not ask for details about partitions */ - return BLKID_PROBE_OK; --- -2.36.1 - diff --git a/SOURCES/0077-libblkid-make-Atari-more-robust.patch b/SOURCES/0077-libblkid-make-Atari-more-robust.patch deleted file mode 100644 index 9f19c48..0000000 --- a/SOURCES/0077-libblkid-make-Atari-more-robust.patch +++ /dev/null @@ -1,129 +0,0 @@ -From e7f0f5d3a80324e1430e979b0a170ded77b380e2 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 13 Oct 2020 16:19:20 +0200 -Subject: libblkid: make Atari more robust - -* ignore large disks -* check in-table stored device size -* check bad sectors list -* check partition dimensions against in-table device size - -Addresses: https://github.com/karelzak/util-linux/issues/1159 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Upstream: http://github.com/util-linux/util-linux/commit/282ceadc3a72fc07dd0388b8880fd751490bb87f -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/partitions/atari.c | 66 ++++++++++++++++++++++++--------- - 1 file changed, 48 insertions(+), 18 deletions(-) - -diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c -index b469ef5a1..c3f77117a 100644 ---- a/libblkid/src/partitions/atari.c -+++ b/libblkid/src/partitions/atari.c -@@ -74,16 +74,27 @@ static int linux_isalnum(unsigned char c) { - - #define IS_ACTIVE(partdef) ((partdef).flags & 1) - --#define IS_PARTDEF_VALID(partdef, hdsize) \ -- ( \ -- (partdef).flags & 1 && \ -- isalnum((partdef).id[0]) && \ -- isalnum((partdef).id[1]) && \ -- isalnum((partdef).id[2]) && \ -- be32_to_cpu((partdef).start) <= (hdsize) && \ -- be32_to_cpu((partdef).start) + \ -- be32_to_cpu((partdef).size) <= (hdsize) \ -- ) -+static int is_valid_dimension(uint32_t start, uint32_t size, uint32_t maxoff) -+{ -+ uint64_t end = start + size; -+ -+ return end >= start -+ && 0 < start && start <= maxoff -+ && 0 < size && size <= maxoff -+ && 0 < end && end <= maxoff; -+} -+ -+static int is_valid_partition(struct atari_part_def *part, uint32_t maxoff) -+{ -+ uint32_t start = be32_to_cpu(part->start), -+ size = be32_to_cpu(part->size); -+ -+ return (part->flags & 1) -+ && isalnum(part->id[0]) -+ && isalnum(part->id[1]) -+ && isalnum(part->id[2]) -+ && is_valid_dimension(start, size, maxoff); -+} - - static int is_id_common(char *id) - { -@@ -184,12 +195,20 @@ static int probe_atari_pt(blkid_probe pr, - unsigned i; - int has_xgm = 0; - int rc = 0; -- off_t hdsize; -+ uint32_t rssize; /* size in sectors from root sector */ -+ uint64_t size; /* size in sectors from system */ - - /* Atari partition is not defined for other sector sizes */ - if (blkid_probe_get_sectorsize(pr) != 512) - goto nothing; - -+ size = blkid_probe_get_size(pr) / 512; -+ -+ /* Atari is not well defined to support large disks */ -+ if (size > INT32_MAX) -+ goto nothing; -+ -+ /* read root sector */ - rs = (struct atari_rootsector *) blkid_probe_get_sector(pr, 0); - if (!rs) { - if (errno) -@@ -197,17 +216,29 @@ static int probe_atari_pt(blkid_probe pr, - goto nothing; - } - -- hdsize = blkid_probe_get_size(pr) / 512; -+ rssize = be32_to_cpu(rs->hd_size); -+ -+ /* check number of sectors stored in the root sector */ -+ if (rssize < 2 || rssize > size) -+ goto nothing; -+ -+ /* check list of bad blocks */ -+ if ((rs->bsl_start || rs->bsl_len) -+ && !is_valid_dimension(be32_to_cpu(rs->bsl_start), -+ be32_to_cpu(rs->bsl_len), -+ rssize)) -+ goto nothing; - - /* - * At least one valid partition required - */ - for (i = 0; i < 4; i++) { -- if (IS_PARTDEF_VALID(rs->part[i], hdsize)) { -- blkid_probe_set_magic(pr, -- offsetof(struct atari_rootsector, part[i]), -- sizeof(rs->part[i].flags) + sizeof(rs->part[i].id), -- (unsigned char *) &rs->part[i]); -+ if (is_valid_partition(&rs->part[i], rssize)) { -+ if (blkid_probe_set_magic(pr, -+ offsetof(struct atari_rootsector, part[i]), -+ sizeof(rs->part[i].flags) + sizeof(rs->part[i].id), -+ (unsigned char *) &rs->part[i])) -+ goto err; - break; - } - } -@@ -234,7 +265,6 @@ static int probe_atari_pt(blkid_probe pr, - blkid_partlist_increment_partno(ls); - continue; - } -- - if (!memcmp(p->id, "XGM", 3)) { - has_xgm = 1; - rc = parse_extended(pr, ls, tab, p); --- -2.36.1 - diff --git a/SOURCES/0078-libblkid-allow-a-lot-of-mac-partitions.patch b/SOURCES/0078-libblkid-allow-a-lot-of-mac-partitions.patch deleted file mode 100644 index 9cf4dc9..0000000 --- a/SOURCES/0078-libblkid-allow-a-lot-of-mac-partitions.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 2348779e225dd581c32c00108e017f5c1924e706 Mon Sep 17 00:00:00 2001 -From: Samanta Navarro <ferivoz@riseup.net> -Date: Sun, 8 Nov 2020 11:45:18 +0000 -Subject: libblkid: allow a lot of mac partitions - -If the map count is set to INT_MAX then the for loop does not stop -because its check is never false. - -I have not found a correct upper limit. The other partition logics have -a maximum amount (exception is atari.c). - -The loop itself wouldn't be endless. If the iteration reaches block 0 -then the signature will be wrong. This means that map count = INT_MAX -case would fail even if such a setup would be correct on disk. - -Upstream: http://github.com/util-linux/util-linux/commit/8f22adaaf30e9fd3bf83da0213b4a6525c9305cd -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Signed-off-by: Samanta Navarro <ferivoz@riseup.net> ---- - libblkid/src/partitions/mac.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c -index 4713d6042..2be91a620 100644 ---- a/libblkid/src/partitions/mac.c -+++ b/libblkid/src/partitions/mac.c -@@ -123,12 +123,12 @@ static int probe_mac_pt(blkid_probe pr, - ssf = block_size / 512; - nblks = be32_to_cpu(p->map_count); - -- for (i = 1; i <= nblks; ++i) { -+ for (i = 0; i < nblks; ++i) { - blkid_partition par; - uint32_t start; - uint32_t size; - -- p = (struct mac_partition *) get_mac_block(pr, block_size, i); -+ p = (struct mac_partition *) get_mac_block(pr, block_size, i + 1); - if (!p) { - if (errno) - return -errno; -@@ -141,7 +141,7 @@ static int probe_mac_pt(blkid_probe pr, - DBG(LOWPROBE, ul_debug( - "mac: inconsistent map_count in partition map, " - "entry[0]: %d, entry[%d]: %d", -- nblks, i - 1, -+ nblks, i, - be32_to_cpu(p->map_count))); - } - --- -2.36.1 - diff --git a/SOURCES/0079-libblkid-limit-amount-of-parsed-partitions.patch b/SOURCES/0079-libblkid-limit-amount-of-parsed-partitions.patch deleted file mode 100644 index e202558..0000000 --- a/SOURCES/0079-libblkid-limit-amount-of-parsed-partitions.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 24f5385f4a54b90f4b7674e23f30567591962bcb Mon Sep 17 00:00:00 2001 -From: Samanta Navarro <ferivoz@riseup.net> -Date: Tue, 10 Nov 2020 11:48:04 +0100 -Subject: libblkid: limit amount of parsed partitions - -The linux kernel does not support more than 256 partitions -(DISK_MAX_PARTS). The atari and mac block devices have no such limits. - -Use dos logical partition limit for atari as well (100). -Use the kernel limit for mac (256). - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Upstream: http://github.com/util-linux/util-linux/commit/c70b4f2a5b99876d230b8f4f413c3bb3ee6647f1 -Signed-off-by: Karel Zak <kzak@redhat.com> -Signed-off-by: Samanta Navarro <ferivoz@riseup.net> ---- - libblkid/src/partitions/atari.c | 6 +++++- - libblkid/src/partitions/mac.c | 15 +++++++++++---- - 2 files changed, 16 insertions(+), 5 deletions(-) - -diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c -index c3f77117a..fdd5498b5 100644 ---- a/libblkid/src/partitions/atari.c -+++ b/libblkid/src/partitions/atari.c -@@ -141,12 +141,16 @@ static int parse_extended(blkid_probe pr, blkid_partlist ls, - blkid_parttable tab, struct atari_part_def *part) - { - uint32_t x0start, xstart; -- unsigned i = 0; -+ unsigned ct = 0, i = 0; - int rc; - - x0start = xstart = be32_to_cpu(part->start); - while (1) { - struct atari_rootsector *xrs; -+ -+ if (++ct > 100) -+ break; -+ - xrs = (struct atari_rootsector *) blkid_probe_get_sector(pr, xstart); - if (!xrs) { - if (errno) -diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c -index 2be91a620..092d31d32 100644 ---- a/libblkid/src/partitions/mac.c -+++ b/libblkid/src/partitions/mac.c -@@ -79,7 +79,7 @@ static int probe_mac_pt(blkid_probe pr, - blkid_partlist ls; - uint16_t block_size; - uint16_t ssf; /* sector size fragment */ -- uint32_t nblks, i; -+ uint32_t nblks, nprts, i; - - - /* The driver descriptor record is always located at physical block 0, -@@ -122,8 +122,15 @@ static int probe_mac_pt(blkid_probe pr, - - ssf = block_size / 512; - nblks = be32_to_cpu(p->map_count); -- -- for (i = 0; i < nblks; ++i) { -+ if (nblks > 256) { -+ nprts = 256; -+ DBG(LOWPROBE, ul_debug( -+ "mac: map_count too large, entry[0]: %u, " -+ "enforcing limit of %u", nblks, nprts)); -+ } else -+ nprts = nblks; -+ -+ for (i = 0; i < nprts; ++i) { - blkid_partition par; - uint32_t start; - uint32_t size; -@@ -140,7 +147,7 @@ static int probe_mac_pt(blkid_probe pr, - if (be32_to_cpu(p->map_count) != nblks) { - DBG(LOWPROBE, ul_debug( - "mac: inconsistent map_count in partition map, " -- "entry[0]: %d, entry[%d]: %d", -+ "entry[0]: %u, entry[%u]: %u", - nblks, i, - be32_to_cpu(p->map_count))); - } --- -2.36.1 - diff --git a/SOURCES/0080-libblkid-mac-make-sure-block-size-is-large-enough-fu.patch b/SOURCES/0080-libblkid-mac-make-sure-block-size-is-large-enough-fu.patch deleted file mode 100644 index 2eafd83..0000000 --- a/SOURCES/0080-libblkid-mac-make-sure-block-size-is-large-enough-fu.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7180c1ad36a1f419e20e90ddfad0b2f77d8c018f Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 2 Jun 2022 16:02:54 +0200 -Subject: libblkid: (mac) make sure block size is large enough [fuzzing] - -Upstream: http://github.com/util-linux/util-linux/commit/4e12fbca62be10b09503cecc7507757874043474 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Reported-by: Thibault Guittet <tguittet@redhat.com> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/partitions/mac.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c -index 092d31d32..75a558b0a 100644 ---- a/libblkid/src/partitions/mac.c -+++ b/libblkid/src/partitions/mac.c -@@ -93,6 +93,8 @@ static int probe_mac_pt(blkid_probe pr, - } - - block_size = be16_to_cpu(md->block_size); -+ if (block_size < sizeof(struct mac_partition)) -+ goto nothing; - - /* The partition map always begins at physical block 1, - * the second block on the disk. --- -2.36.1 - diff --git a/SOURCES/0081-lscpu-don-t-read-from-HW-when-use-sys-snapshot.patch b/SOURCES/0081-lscpu-don-t-read-from-HW-when-use-sys-snapshot.patch deleted file mode 100644 index 0f12cee..0000000 --- a/SOURCES/0081-lscpu-don-t-read-from-HW-when-use-sys-snapshot.patch +++ /dev/null @@ -1,40 +0,0 @@ -From c223ad8f05d2d20a80e21dbb4b6240f11909f92c Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 14 Jul 2022 13:10:16 +0200 -Subject: lscpu: don;t read from HW when use /sys snapshot - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2069187 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/lscpu.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index 70a797dd6..01f8fba35 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -1850,7 +1850,10 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod) - } - } else { - if (desc->is_cluster) { -- int sockets = get_number_of_physical_sockets_from_dmi(); -+ int sockets = 0; -+ -+ if (mod->system == SYSTEM_LIVE) -+ sockets = get_number_of_physical_sockets_from_dmi(); - - if (sockets > 0) - add_summary_n(tb, _("Socket(s):"), sockets); -@@ -2109,7 +2112,8 @@ int main(int argc, char *argv[]) - qsort(desc->ecaches, desc->necaches, - sizeof(struct cpu_cache), cachecmp); - -- desc->is_cluster = is_fallback_to_cluster(desc); -+ if (mod->system == SYSTEM_LIVE) -+ desc->is_cluster = is_fallback_to_cluster(desc); - - read_nodes(desc); - read_hypervisor(desc, mod); --- -2.36.1 - diff --git a/SOURCES/0082-lslogins-improve-prefixes-interpretation.patch b/SOURCES/0082-lslogins-improve-prefixes-interpretation.patch deleted file mode 100644 index e41d75c..0000000 --- a/SOURCES/0082-lslogins-improve-prefixes-interpretation.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 818cd2018ca66e804ea30066c44572ca128a24a7 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 7 Jun 2022 09:11:56 +0200 -Subject: lslogins: improve prefixes interpretation - -It seems that for example 'passwd --lock' uses two exclamation marks -in password field. It seems better to assume arbitrary number of '!' -and '*' prefixes. - -The patch also makes description of the PWD-EMPTY output field more -explicit. - -Upstream: http://github.com/util-linux/util-linux/commit/c51cba1e838ae7e36a843ec785543492bb8737cd -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2093166 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - login-utils/lslogins.c | 31 +++++++++++++++++++++++++------ - 1 file changed, 25 insertions(+), 6 deletions(-) - -diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c -index 6f804aa35..b81afc6c7 100644 ---- a/login-utils/lslogins.c -+++ b/login-utils/lslogins.c -@@ -216,7 +216,7 @@ static const struct lslogins_coldesc coldescs[] = - { - [COL_USER] = { "USER", N_("user name"), N_("Username"), 0.1, SCOLS_FL_NOEXTREMES }, - [COL_UID] = { "UID", N_("user ID"), "UID", 1, SCOLS_FL_RIGHT}, -- [COL_PWDEMPTY] = { "PWD-EMPTY", N_("password not required"), N_("Password not required"), 1, SCOLS_FL_RIGHT }, -+ [COL_PWDEMPTY] = { "PWD-EMPTY", N_("password not defined"), N_("Password not required (empty)"), 1, SCOLS_FL_RIGHT }, - [COL_PWDDENY] = { "PWD-DENY", N_("login by password disabled"), N_("Login by password disabled"), 1, SCOLS_FL_RIGHT }, - [COL_PWDLOCK] = { "PWD-LOCK", N_("password defined, but locked"), N_("Password is locked"), 1, SCOLS_FL_RIGHT }, - [COL_NOLOGIN] = { "NOLOGIN", N_("log in disabled by nologin(8) or pam_nologin(8)"), N_("No login"), 1, SCOLS_FL_RIGHT }, -@@ -755,16 +755,24 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c - break; - case COL_PWDEMPTY: - if (shadow) { -- if (!*shadow->sp_pwdp) /* '\0' */ -+ const char *p = shadow->sp_pwdp; -+ -+ while (p && (*p == '!' || *p == '*')) -+ p++; -+ -+ if (!p || !*p) - user->pwd_empty = STATUS_TRUE; - } else - user->pwd_empty = STATUS_UNKNOWN; - break; - case COL_PWDDENY: - if (shadow) { -- if ((*shadow->sp_pwdp == '!' || -- *shadow->sp_pwdp == '*') && -- !valid_pwd(shadow->sp_pwdp + 1)) -+ const char *p = shadow->sp_pwdp; -+ -+ while (p && (*p == '!' || *p == '*')) -+ p++; -+ -+ if (p && *p && p != shadow->sp_pwdp && !valid_pwd(p)) - user->pwd_deny = STATUS_TRUE; - } else - user->pwd_deny = STATUS_UNKNOWN; -@@ -772,7 +780,18 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c - - case COL_PWDLOCK: - if (shadow) { -- if (*shadow->sp_pwdp == '!' && valid_pwd(shadow->sp_pwdp + 1)) -+ const char *p = shadow->sp_pwdp; -+ int i = 0; -+ -+ /* 'passwd --lock' uses two exclamation marks, -+ * shadow(5) describes the lock as "field which -+ * starts with an exclamation mark". Let's -+ * support more '!' ... -+ */ -+ while (p && *p == '!') -+ p++, i++; -+ -+ if (i != 0 && (!*p || valid_pwd(p))) - user->pwd_lock = STATUS_TRUE; - } else - user->pwd_lock = STATUS_UNKNOWN; --- -2.36.1 - diff --git a/SOURCES/0083-tests-update-atari-blkid-tests.patch b/SOURCES/0083-tests-update-atari-blkid-tests.patch deleted file mode 100644 index 6bd93f0..0000000 --- a/SOURCES/0083-tests-update-atari-blkid-tests.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 78be9c320883e77c2b5fdc676277a51efc98c723 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 13 Oct 2020 16:29:19 +0200 -Subject: tests: update atari blkid tests - -The old images of the atari label are truncated and in-table stored -sizes do not match with real images sizes -- libblkid checks it now. - -I have no idea how to generate ICD format, let's ignore it in tests -for now. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Upstream: http://github.com/util-linux/util-linux/commit/0d061b6e68bc74ce7d61524097b5d0f3becee437 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/expected/blkid/lowprobe-pt-atari-icd | 8 -------- - tests/expected/blkid/lowprobe-pt-atari-primary | 3 +++ - tests/expected/blkid/lowprobe-pt-atari-xgm | 10 +++------- - tests/ts/blkid/images-pt/atari-icd.img.xz | Bin 1920 -> 0 bytes - tests/ts/blkid/images-pt/atari-primary.img.xz | Bin 0 -> 932 bytes - tests/ts/blkid/images-pt/atari-xgm.img.xz | Bin 1920 -> 956 bytes - 6 files changed, 6 insertions(+), 15 deletions(-) - delete mode 100644 tests/expected/blkid/lowprobe-pt-atari-icd - create mode 100644 tests/expected/blkid/lowprobe-pt-atari-primary - delete mode 100644 tests/ts/blkid/images-pt/atari-icd.img.xz - create mode 100644 tests/ts/blkid/images-pt/atari-primary.img.xz - -diff --git a/tests/expected/blkid/lowprobe-pt-atari-icd b/tests/expected/blkid/lowprobe-pt-atari-icd -deleted file mode 100644 -index 29942b123..000000000 ---- a/tests/expected/blkid/lowprobe-pt-atari-icd -+++ /dev/null -@@ -1,8 +0,0 @@ --size: 8388608, sector size: 512, PT: atari, offset: 0, id=(null) ----- --#1: 65 4032 0x0 type='FAT' --#2: 4097 904 0x0 type='FOO' --#4: 12289 4096 0x0 type='BAR' --#5: 5002 1999 0x0 type='GEM' --#6: 7003 3238 0x0 type='RAW' --#7: 10241 2048 0x0 type='RAW' -diff --git a/tests/expected/blkid/lowprobe-pt-atari-primary b/tests/expected/blkid/lowprobe-pt-atari-primary -new file mode 100644 -index 000000000..472821e47 ---- /dev/null -+++ b/tests/expected/blkid/lowprobe-pt-atari-primary -@@ -0,0 +1,3 @@ -+size: 5242880, sector size: 512, PT: atari, offset: 0, id=(null) -+--- -+#1: 2 10238 0x0 type='RAW' -diff --git a/tests/expected/blkid/lowprobe-pt-atari-xgm b/tests/expected/blkid/lowprobe-pt-atari-xgm -index 4b7756655..a7dae6995 100644 ---- a/tests/expected/blkid/lowprobe-pt-atari-xgm -+++ b/tests/expected/blkid/lowprobe-pt-atari-xgm -@@ -1,8 +1,4 @@ --size: 8388608, sector size: 512, PT: atari, offset: 0, id=(null) -+size: 5242880, sector size: 512, PT: atari, offset: 0, id=(null) - --- --#1: 65 4032 0x0 type='FAT' --#2: 4097 904 0x0 type='FOO' --#3: 5002 1999 0x0 type='GEM' --#4: 7003 3238 0x0 type='RAW' --#5: 10241 2048 0x0 type='RAW' --#6: 12289 4096 0x0 type='BAR' -+#1: 2 9 0x0 type='RAW' -+#2: 14 10226 0x0 type='RAW' -diff --git a/tests/ts/blkid/images-pt/atari-icd.img.xz b/tests/ts/blkid/images-pt/atari-icd.img.xz -deleted file mode 100644 -index 00a2aba49a8f940c35b788fd693f966a31cd1aaf..0000000000000000000000000000000000000000 -GIT binary patch -literal 0 -HcmV?d00001 - -literal 1920 -zcmexsUKJ6=z`*kC+7>q^21Q0O1_p)_{ilon|NqLI8OvZIducK^<D#q<ONrmzr7PMy -z=Re+dD(FN^i0Z8=QGYU3)3SOsKNYUE<teKW$h*z@Da6KG##!?D_SzK}=ewS=QwkRf -zxzbX}@_f!Z)%e<woF9|fYR|0lp0G0f`-gY``AxPJey<QwNW16%FSdP&)8+C%F~2I4 -z{_B6tP6!P7a!FyfvS6dFJIf=9>Ecg5@jkusTr=nRy9*!Bn(bM`eR*oT<-}u76EuU~ -zr&{jenxVc;S-qm~ZIsPAhf|HgcYYYo_5QBSWhxk^uDJZlk@ka|=4h`oy~sXG;MryA -zIO|(4yiWFOUJ0<66IC1R`kF;$<I9dcO@CDFABkD|MgDka?b)(bopIG?ZiRV5-5 -z&wrJCJMneM`)PcKG6n8Gn6muo+=$TV!;Z6dyb-VXef4neVW0EN5;oQihkrbEc=K@o -zx0jV2|I?>O2rLg_J2GWu-_F>bn|D|)EpJ!*v${KQj{VzR>(-u`|K~x`ZzH*T0p2&o -zI-4YzQ@78Q>MqMUn_j_J&?R}Ab%JX4g_GgC#kn_Er2N@;{G{oT!>g3%?{7LTl&~r1 -z*sPkJ_H4EL-ks8A5cG>Zb+_(`db`H=OHtd`KiM;({>U6}*_GC3*O{IFD%<~0_S{B} -zIAt^L!kb^-#2H7;7G8c(H`jXWaenqoR^eP0x0jjMz0;S=ntyt=$t<^43C^Wa`_>-0 -zn)7LCqnV7@rul}KIZjS|we9MTwfEKjD!a`sVqAVcbjH02iV_QaLoQ$Lm6>2)J5?)m -z+4ZM<_KLr<4xZ|{k^g93P-0R3!R;b!3l;9v+iG1rUa|31OFLJ<z4Fz~B8qtzuU37w -z6A4Z#TNC-@X*4Ux&*Qh&{`noGU2;|~TEXe(-C)}vnkk&t4X3qo?r*jJaAdDu{3?Ds -z?=+_g!hHV)CjTg`i2T8Q_Wx83H~y7>YVQ4>WuO;!puhEVbK`;3BdWnazD_hVWL>)9 -zUH-uWUw59169reTO_1GnZlk(HOk~^3w4jK6F9(a&E)Q>o&j0_BF`3~_aq#lL`_|PM -zO3mNiYnWFsZ@F^(8;#Sg7pKnXs?(bINxk&D<N>xBzBB&bSbuc_Kc+u-9hd96{dU62 -zdy9&v9!&J;nWpuKafAQ2KRiy8H+G)6azfr>>9!ZUEsJ{hn{EH;vMu55vVwblapfAb -zxMqapUGF~CVIOb!`-J}sVcYGG8+IwL_`%kF^K1PzUTOPUszzJx7yZuII0hq?niBJy -ztHO<bZHoEeb??p39f4v$CnZ^ZH?w&9HG2Bb3&qh5R7@FV8>i*X|1ZF(LqR~lKc93~ -zM{UwbNSDCeSh)377bwKEDG0HlkOiq$@C5SPZ)#xt%D~Ft{N&Fs28N&OuDBU3?>)l6 -bc!#f{p@D_bU0QSFk@Vk8z<QQ}B{B*CjfKee - -diff --git a/tests/ts/blkid/images-pt/atari-primary.img.xz b/tests/ts/blkid/images-pt/atari-primary.img.xz -new file mode 100644 -index 0000000000000000000000000000000000000000..6f915fa8ad96578f32b0daeeb92d438046482478 -GIT binary patch -literal 932 -zcmexsUKJ6=z`*kC+7>q^21Q0O1_p)_{ilon|NG21IhKJT|L>o5D`zuK%~gJC<+=Ii -zjxFDrre11~o8UX~^*sr`-ND)CA`-a`g{vlPsQ4ms_SS~eoI5Q;loOk08+!D2evoWh -za^cV`_b30BuKD=6`BwT2=4;0@BCk29bN`)lS>&4=``*}-hYFe|Np9+Tq~OEO|Ip}x -zJ4;5zolM)LTaTWs>#-B)sg`FET(veqcGtO$>Jl-LZ7<V;BKEy3TNC-@X*4Ux&*Qh& -z{`noGU2;|~TEXe(-C)}vnkk&t4X3qo?r*jJaAdDu{3?Ds?=+_g!hHV)CjTg`i2T8Q -z_Wx83H~y7>YVQ4>WuO;!puhEVbK`;3BdWnazD_hVWL>)9UH-uWUw59169<{qE8fUY -zo&R5eQJdjSaq#lL`_|PMO3mNiYnWFsZ@F^(8;#Sg7pKnXs?(bINxk&D<N>xBzBB&b -zSbuc_{}AvSO=2{V-+t2s#$OCG2V;Pp`LJObFuO6V(c5<Fu|Ufz2FCwv4GjmFGA4R9 -PZak9yn+YVz5*Y;mtR2mT - -literal 0 -HcmV?d00001 - -diff --git a/tests/ts/blkid/images-pt/atari-xgm.img.xz b/tests/ts/blkid/images-pt/atari-xgm.img.xz -index bc2b8f94a77f5015ef7f91bb8acdc9950c8be7ad..a98c02de943eb1f70c5d09b7812fd237b0facb1b 100644 -GIT binary patch -delta 254 -zcmV<a00IAi54;DE8h=*-t6cy9Z~gqPsha_nZ6oD6NwupI8`mp<%bF(xLvD5Rc8W7` -zX)WzPD$MTS!%B(|Y-}5#$Apx#1e(KC*{Pqmx)SsG9Xw0f%eaQXL!_kre&U)tNOpTG -z*`SUYP}mJ59xhhp;RT@IihuacmkuJPZKAP=s%k;MCh}UW4>G(m3T!1071TaDPc176 -z%r3#|+u3QZtfaEW{3%z$%QU-cGO>PfMsWxu0c{gkG*2F%lPd=M1Y0KMdb1z~F#!dT -z0hR!nlZ*pGlY9kID9q|Q?7#p305pfRGwmY1>Hq<k2Y`UU0`E1BSh2)s`vL#}000D8 -ET8n^h+5i9m - -delta 911 -zcmV;A191Gj2Y?Td8h`ZzXk7p_9nzBv0itSzIT-tkb*P7lpX0X5Qpj9XCEAo){And- -zYK<xKajiWJc6bnO+XeDeJWCuy8RxfssL`KA%041j5>(WLc?9R2t|ec6RBZT@27Sz` -zOOUBo_werj4>Y!M_jnW_X5LT!U5BJX(|7z_`gvmiFY#+&QGZnQ(jc275rI8N1mYN% -z7v%B{<<#dXY{%}<@y#~8tP9hXhdGhPLXas^?`1i>3YaIhBPV!{?OHspK+1tr-1sq_ -zOZO`ZH4#=PA*a;DhrzO(E3P%s2bvJ((;Hqp+UQEjk15npIGkF2Q$_0pB(dp;yn_5C -zKjIcSPFeWwJAX-pwI>0p^9vxJ5{vOrh0paF?UCzL@0Je2X%OGwl&9sLSXEoYL7KSi -z7kK;C!)?P%&jT1dJAlLZ<v{G=zxL^Qi2rAoSP-XF2E>%9j=5dAv$#2>cZVkYtBX;b -zKkd4%t<0bN;Bxyi9^Oz(*%pa{7z1UunHr0BY|UqQ4u5cp8OsHbC2P>hSGyMrvv_3u -zzQ@Tm#KWp1pTB~~5@51y#+rP&KL&li?#e9y5l&so-G1aJhbZ^bTDPy{ypVsyoJ$?4 -zJI$^(&-ERT{vFP-2wo#L3vt=>>|Qfkn-izOEp0os#}5b6I#&uf+o6-(AknAKCP^m+ -zEB^#2tYI)UL`(v`beQMaSJV*sS*EXE2$I<^GcOj!0Hii26j3aN*&gGTU5Zv+1i&@u -zjId2o5C}?3I%5GFBrU@lP*l(vtk2>ZTe5<OTkisoMjv{FPqwYL0GjR*a@n;|`0^i< -zKLLl6&;loud;(qxcU-f=pa1azVUhzvSGva@irejwsotqou2fu#X_{6NcY&beo68>f -z$zE{PRc+w5GMeW^E4f@oa+%ryKCLFeKmd=m8Cq32;k}|hR%L!j^w4xxgPa6z%)Qy@ -zimjI||1RsAlMMk+M<v-$($uIxLJsc(-~zF}Sj>(8o4AFk??@Qc3})r~lth`4dR`1> -z^;L1tHfbGi`%8!rY(mS3KU@Hh&`z%=D3oy@J&z>elMn+h2}%2(tDpZ60W6XOI|uL2 -zV$Ccjl9Rv!H<Nq<dy{+uH3@OG>WZKL5CJQa1C*2A0vVHh0)H=n0rda{07K;b`Tzg` -l001+77wRp|PznG6*$#k!fCRGE)_JkSXZr#G00004Sz1dOv2XwY - --- -2.36.1 - diff --git a/SOURCES/0084-tests-update-atari-partx-tests.patch b/SOURCES/0084-tests-update-atari-partx-tests.patch deleted file mode 100644 index 2d004cd..0000000 --- a/SOURCES/0084-tests-update-atari-partx-tests.patch +++ /dev/null @@ -1,55 +0,0 @@ -From cf74ece6486dabfd4b84c90435348c04ff72ef54 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 13 Oct 2020 18:34:39 +0200 -Subject: tests: update atari partx tests - -Upstream: http://github.com/util-linux/util-linux/commit/017c0308c7d3b0d84bfc11e5863220bc32d640ba -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - tests/expected/partx/partx-image-atari-icd | 7 ------- - tests/expected/partx/partx-image-atari-primary | 2 ++ - tests/expected/partx/partx-image-atari-xgm | 10 +++------- - 3 files changed, 5 insertions(+), 14 deletions(-) - delete mode 100644 tests/expected/partx/partx-image-atari-icd - create mode 100644 tests/expected/partx/partx-image-atari-primary - -diff --git a/tests/expected/partx/partx-image-atari-icd b/tests/expected/partx/partx-image-atari-icd -deleted file mode 100644 -index 8677dff03..000000000 ---- a/tests/expected/partx/partx-image-atari-icd -+++ /dev/null -@@ -1,7 +0,0 @@ --NR START END SECTORS SIZE NAME UUID -- 1 65 4096 4032 2M -- 2 4097 5000 904 452K -- 4 12289 16384 4096 2M -- 5 5002 7000 1999 999.5K -- 6 7003 10240 3238 1.6M -- 7 10241 12288 2048 1M -diff --git a/tests/expected/partx/partx-image-atari-primary b/tests/expected/partx/partx-image-atari-primary -new file mode 100644 -index 000000000..044d319be ---- /dev/null -+++ b/tests/expected/partx/partx-image-atari-primary -@@ -0,0 +1,2 @@ -+NR START END SECTORS SIZE NAME UUID -+ 1 2 10239 10238 5M -diff --git a/tests/expected/partx/partx-image-atari-xgm b/tests/expected/partx/partx-image-atari-xgm -index 248d6a56a..557327c04 100644 ---- a/tests/expected/partx/partx-image-atari-xgm -+++ b/tests/expected/partx/partx-image-atari-xgm -@@ -1,7 +1,3 @@ --NR START END SECTORS SIZE NAME UUID -- 1 65 4096 4032 2M -- 2 4097 5000 904 452K -- 3 5002 7000 1999 999.5K -- 4 7003 10240 3238 1.6M -- 5 10241 12288 2048 1M -- 6 12289 16384 4096 2M -+NR START END SECTORS SIZE NAME UUID -+ 1 2 10 9 4.5K -+ 2 14 10239 10226 5M --- -2.36.1 - diff --git a/SOURCES/0085-libuuid-Implement-continuous-clock-handling-for-time.patch b/SOURCES/0085-libuuid-Implement-continuous-clock-handling-for-time.patch deleted file mode 100644 index 9495ff0..0000000 --- a/SOURCES/0085-libuuid-Implement-continuous-clock-handling-for-time.patch +++ /dev/null @@ -1,375 +0,0 @@ -From ccc5db8102728d37e2e28dd50da3370e8c8de33a Mon Sep 17 00:00:00 2001 -From: Michael Trapp <michael.trapp@sap.com> -Date: Mon, 20 Jun 2022 17:10:36 +0200 -Subject: libuuid: Implement continuous clock handling for time based UUIDs - -In a uuidd setup, the daemon is a singleton and can maintain it's own -resources for time based UUID generation. This requires a dedicated -'clock sequence range' but does not need any further lock/update of -the LIBUUID_CLOCK_FILE from uuidd. The range of available clock values -is extended by a continuous handling of the clock updates - instead of -updating the value to the current timestamp, it is incremented by -the number of requested UUIDs. - -[kzak@redhat.com: - backport from upstream v2.39 to to RHEL-8] - -Upstream: http://github.com/util-linux/util-linux/commit/3cfba7d39b66eff4307218fefd8bb34bb1621f83 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2141969 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libuuid/src/gen_uuid.c | 91 ++++++++++++++++++++++++++++++++++++++--- - libuuid/src/libuuid.sym | 1 + - libuuid/src/uuidd.h | 1 + - misc-utils/uuidd.8.in | 12 ++++++ - misc-utils/uuidd.c | 86 ++++++++++++++++++++++++++++++++++++-- - 5 files changed, 182 insertions(+), 9 deletions(-) - -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c -index 27c135db5..f557053f7 100644 ---- a/libuuid/src/gen_uuid.c -+++ b/libuuid/src/gen_uuid.c -@@ -209,6 +209,8 @@ static int get_node_id(unsigned char *node_id) - - /* Assume that the gettimeofday() has microsecond granularity */ - #define MAX_ADJUSTMENT 10 -+/* Reserve a clock_seq value for the 'continuous clock' implementation */ -+#define CLOCK_SEQ_CONT 0 - - /* - * Get clock from global sequence clock counter. -@@ -275,8 +277,10 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, - } - - if ((last.tv_sec == 0) && (last.tv_usec == 0)) { -- random_get_bytes(&clock_seq, sizeof(clock_seq)); -- clock_seq &= 0x3FFF; -+ do { -+ random_get_bytes(&clock_seq, sizeof(clock_seq)); -+ clock_seq &= 0x3FFF; -+ } while (clock_seq == CLOCK_SEQ_CONT); - gettimeofday(&last, NULL); - last.tv_sec--; - } -@@ -286,7 +290,9 @@ try_again: - if ((tv.tv_sec < last.tv_sec) || - ((tv.tv_sec == last.tv_sec) && - (tv.tv_usec < last.tv_usec))) { -- clock_seq = (clock_seq+1) & 0x3FFF; -+ do { -+ clock_seq = (clock_seq+1) & 0x3FFF; -+ } while (clock_seq == CLOCK_SEQ_CONT); - adjustment = 0; - last = tv; - } else if ((tv.tv_sec == last.tv_sec) && -@@ -331,6 +337,64 @@ try_again: - return ret; - } - -+/* -+ * Get current time in 100ns ticks. -+ */ -+static uint64_t get_clock_counter(void) -+{ -+ struct timeval tv; -+ uint64_t clock_reg; -+ -+ gettimeofday(&tv, NULL); -+ clock_reg = tv.tv_usec*10; -+ clock_reg += ((uint64_t) tv.tv_sec) * 10000000ULL; -+ -+ return clock_reg; -+} -+ -+/* -+ * Get continuous clock value. -+ * -+ * Return -1 if there is no further clock counter available, -+ * otherwise return 0. -+ * -+ * This implementation doesn't deliver clock counters based on -+ * the current time because last_clock_reg is only incremented -+ * by the number of requested UUIDs. -+ * max_clock_offset is used to limit the offset of last_clock_reg. -+ */ -+static int get_clock_cont(uint32_t *clock_high, -+ uint32_t *clock_low, -+ int num, -+ uint32_t max_clock_offset) -+{ -+ /* 100ns based time offset according to RFC 4122. 4.1.4. */ -+ const uint64_t reg_offset = (((uint64_t) 0x01B21DD2) << 32) + 0x13814000; -+ static uint64_t last_clock_reg = 0; -+ uint64_t clock_reg; -+ -+ if (last_clock_reg == 0) -+ last_clock_reg = get_clock_counter(); -+ -+ clock_reg = get_clock_counter(); -+ if (max_clock_offset) { -+ uint64_t clock_offset = max_clock_offset * 10000000ULL; -+ if (last_clock_reg < (clock_reg - clock_offset)) -+ last_clock_reg = clock_reg - clock_offset; -+ } -+ -+ clock_reg += MAX_ADJUSTMENT; -+ -+ if ((last_clock_reg + num) >= clock_reg) -+ return -1; -+ -+ *clock_high = (last_clock_reg + reg_offset) >> 32; -+ *clock_low = last_clock_reg + reg_offset; -+ last_clock_reg += num; -+ -+ return 0; -+} -+ - #if defined(HAVE_UUIDD) && defined(HAVE_SYS_UN_H) - - /* -@@ -403,7 +467,7 @@ static int get_uuid_via_daemon(int op __attribute__((__unused__)), - } - #endif - --int __uuid_generate_time(uuid_t out, int *num) -+static int __uuid_generate_time_internal(uuid_t out, int *num, uint32_t cont_offset) - { - static unsigned char node_id[6]; - static int has_init = 0; -@@ -423,7 +487,14 @@ int __uuid_generate_time(uuid_t out, int *num) - } - has_init = 1; - } -- ret = get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num); -+ if (cont_offset) { -+ ret = get_clock_cont(&clock_mid, &uu.time_low, *num, cont_offset); -+ uu.clock_seq = CLOCK_SEQ_CONT; -+ if (ret != 0) /* fallback to previous implpementation */ -+ ret = get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num); -+ } else { -+ ret = get_clock(&clock_mid, &uu.time_low, &uu.clock_seq, num); -+ } - uu.clock_seq |= 0x8000; - uu.time_mid = (uint16_t) clock_mid; - uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000; -@@ -432,6 +503,16 @@ int __uuid_generate_time(uuid_t out, int *num) - return ret; - } - -+int __uuid_generate_time(uuid_t out, int *num) -+{ -+ return __uuid_generate_time_internal(out, num, 0); -+} -+ -+int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset) -+{ -+ return __uuid_generate_time_internal(out, num, cont_offset); -+} -+ - /* - * Generate time-based UUID and store it to @out - * -diff --git a/libuuid/src/libuuid.sym b/libuuid/src/libuuid.sym -index 9e3e80035..0a072b703 100644 ---- a/libuuid/src/libuuid.sym -+++ b/libuuid/src/libuuid.sym -@@ -51,6 +51,7 @@ global: - UUIDD_PRIVATE { - global: - __uuid_generate_time; -+ __uuid_generate_time_cont; - __uuid_generate_random; - local: - *; -diff --git a/libuuid/src/uuidd.h b/libuuid/src/uuidd.h -index e55c86f2f..14a01ade2 100644 ---- a/libuuid/src/uuidd.h -+++ b/libuuid/src/uuidd.h -@@ -50,5 +50,6 @@ - - extern int __uuid_generate_time(uuid_t out, int *num); - extern void __uuid_generate_random(uuid_t out, int *num); -+extern int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont); - - #endif /* _UUID_UUID_H */ -diff --git a/misc-utils/uuidd.8.in b/misc-utils/uuidd.8.in -index 0a5cf471b..28bcb48b5 100644 ---- a/misc-utils/uuidd.8.in -+++ b/misc-utils/uuidd.8.in -@@ -16,6 +16,18 @@ universally unique identifiers (UUIDs), especially time-based UUIDs, - in a secure and guaranteed-unique fashion, even in the face of large - numbers of threads running on different CPUs trying to grab UUIDs. - .SH OPTIONS -+ -+.TP -+.BR \-C , " \-\-cont\-clock " [\fInumber\fR] -+Activate continuous clock handling for time based UUIDs. uuidd could use all -+possible clock values, beginning with the daemon's start time. The optional -+argument can be used to set a value for the max_clock_offset. This gurantees, -+that a clock value of a UUID will always be within the range of the -+max_clock_offset. '-C' or '--cont-clock' enables the feature with a default -+max_clock_offset of 2 hours. '-C<NUM>[hd]' or '--cont-clock=<NUM>[hd]' enables -+the feature with a max_clock_offset of NUM seconds. In case of an appended h or -+d, the NUM value is read in hours or days. The minimum value is 60 seconds, the -+maximum value is 365 days. - .TP - .BR \-d , " \-\-debug " - Run uuidd in debugging mode. This prevents uuidd from running as a daemon. -diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c -index 8b83d91c0..e3c0abad7 100644 ---- a/misc-utils/uuidd.c -+++ b/misc-utils/uuidd.c -@@ -49,6 +49,8 @@ struct uuidd_cxt_t { - const char *cleanup_pidfile; - const char *cleanup_socket; - uint32_t timeout; -+ uint32_t cont_clock_offset; -+ - unsigned int debug: 1, - quiet: 1, - no_fork: 1, -@@ -73,6 +75,8 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_(" -P, --no-pid do not create pid file\n"), out); - fputs(_(" -F, --no-fork do not daemonize using double-fork\n"), out); - fputs(_(" -S, --socket-activation do not create listening socket\n"), out); -+ fputs(_(" -C, --cont-clock[=<NUM>[hd]]\n"), out); -+ fputs(_(" activate continuous clock handling\n"), out); - fputs(_(" -d, --debug run in debugging mode\n"), out); - fputs(_(" -q, --quiet turn on quiet mode\n"), out); - fputs(USAGE_SEPARATOR, out); -@@ -401,6 +405,15 @@ static void server_loop(const char *socket_path, const char *pidfile_path, - pfd[POLLFD_SOCKET].fd = s; - pfd[POLLFD_SIGNAL].events = pfd[POLLFD_SOCKET].events = POLLIN | POLLERR | POLLHUP; - -+ num = 1; -+ if (uuidd_cxt->cont_clock_offset) { -+ /* trigger initialization */ -+ (void) __uuid_generate_time_cont(uu, &num, uuidd_cxt->cont_clock_offset); -+ if (uuidd_cxt->debug) -+ fprintf(stderr, _("max_clock_offset = %u sec\n"), -+ uuidd_cxt->cont_clock_offset); -+ } -+ - while (1) { - ret = poll(pfd, ARRAY_SIZE(pfd), - uuidd_cxt->timeout ? -@@ -458,7 +471,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path, - break; - case UUIDD_OP_TIME_UUID: - num = 1; -- __uuid_generate_time(uu, &num); -+ __uuid_generate_time_cont(uu, &num, uuidd_cxt->cont_clock_offset); - if (uuidd_cxt->debug) { - uuid_unparse(uu, str); - fprintf(stderr, _("Generated time UUID: %s\n"), str); -@@ -477,7 +490,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path, - reply_len = sizeof(uu); - break; - case UUIDD_OP_BULK_TIME_UUID: -- __uuid_generate_time(uu, &num); -+ __uuid_generate_time_cont(uu, &num, uuidd_cxt->cont_clock_offset); - if (uuidd_cxt->debug) { - uuid_unparse(uu, str); - fprintf(stderr, P_("Generated time UUID %s " -@@ -530,6 +543,64 @@ static void __attribute__ ((__noreturn__)) unexpected_size(int size) - errx(EXIT_FAILURE, _("Unexpected reply length from server %d"), size); - } - -+/* Backport from v2.39 lib/strutils.c */ -+static int ul_strtos64(const char *str, int64_t *num, int base) -+{ -+ char *end = NULL; -+ -+ if (str == NULL || *str == '\0') -+ return -(errno = EINVAL); -+ -+ errno = 0; -+ *num = (int64_t) strtoimax(str, &end, base); -+ -+ if (errno != 0) -+ return -errno; -+ if (str == end || (end && *end)) -+ return -(errno = EINVAL); -+ return 0; -+} -+ -+/* Backport from v2.39 lib/strutils.c */ -+static int64_t str2num_or_err(const char *str, int base, const char *errmesg, -+ int64_t low, int64_t up) -+{ -+ int64_t num = 0; -+ int rc; -+ -+ rc = ul_strtos64(str, &num, base); -+ if (rc == 0 && ((low && num < low) || (up && num > up))) -+ rc = -(errno = ERANGE); -+ -+ if (rc) { -+ if (errno == ERANGE) -+ err(EXIT_FAILURE, "%s: '%s'", errmesg, str); -+ errx(EXIT_FAILURE, "%s: '%s'", errmesg, str); -+ } -+ return num; -+} -+ -+static uint32_t parse_cont_clock(char *arg) -+{ -+ uint32_t min_val = 60, -+ max_val = (3600 * 24 * 365), -+ factor = 1; -+ char *p = &arg[strlen(arg)-1]; -+ -+ if ('h' == *p) { -+ *p = '\0'; -+ factor = 3600; -+ min_val = 1; -+ } -+ if ('d' == *p) { -+ *p = '\0'; -+ factor = 24 * 3600; -+ min_val = 1; -+ } -+ return factor * str2num_or_err(optarg, 10, _("failed to parse --cont-clock/-C"), -+ min_val, max_val / factor); -+} -+ - int main(int argc, char **argv) - { - const char *socket_path = UUIDD_SOCKET_PATH; -@@ -543,7 +614,7 @@ int main(int argc, char **argv) - int no_pid = 0; - int s_flag = 0; - -- struct uuidd_cxt_t uuidd_cxt = { .timeout = 0 }; -+ struct uuidd_cxt_t uuidd_cxt = { .timeout = 0, .cont_clock_offset = 0 }; - - static const struct option longopts[] = { - {"pid", required_argument, NULL, 'p'}, -@@ -556,6 +627,7 @@ int main(int argc, char **argv) - {"no-pid", no_argument, NULL, 'P'}, - {"no-fork", no_argument, NULL, 'F'}, - {"socket-activation", no_argument, NULL, 'S'}, -+ {"cont-clock", optional_argument, NULL, 'C'}, - {"debug", no_argument, NULL, 'd'}, - {"quiet", no_argument, NULL, 'q'}, - {"version", no_argument, NULL, 'V'}, -@@ -576,10 +648,16 @@ int main(int argc, char **argv) - atexit(close_stdout); - - while ((c = -- getopt_long(argc, argv, "p:s:T:krtn:PFSdqVh", longopts, -+ getopt_long(argc, argv, "p:s:T:krtn:PFSC::dqVh", longopts, - NULL)) != -1) { - err_exclusive_options(c, longopts, excl, excl_st); - switch (c) { -+ case 'C': -+ if (optarg != NULL) -+ uuidd_cxt.cont_clock_offset = parse_cont_clock(optarg); -+ else -+ uuidd_cxt.cont_clock_offset = 7200; /* default 2h */ -+ break; - case 'd': - uuidd_cxt.debug = 1; - break; --- -2.38.1 - diff --git a/SOURCES/0086-libuuid-check-clock-value-from-LIBUUID_CLOCK_FILE.patch b/SOURCES/0086-libuuid-check-clock-value-from-LIBUUID_CLOCK_FILE.patch deleted file mode 100644 index 4352651..0000000 --- a/SOURCES/0086-libuuid-check-clock-value-from-LIBUUID_CLOCK_FILE.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 44cebf3e692053541f362b62f88f327c2c96e70e Mon Sep 17 00:00:00 2001 -From: Michael Trapp <michael.trapp@sap.com> -Date: Tue, 2 Aug 2022 14:16:43 +0200 -Subject: libuuid: check clock value from LIBUUID_CLOCK_FILE - -The clock value from the LIBUUID_CLOCK_FILE must be checked in -case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must -be set to a new value. - -Signed-off-by: Karel Zak <kzak@redhat.com> -Upstream: http://github.com/util-linux/util-linux/commit/5d1424d85ac9e2a1369ee920038825c154ee5443 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2141969 ---- - libuuid/src/gen_uuid.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c -index f557053f7..8dc38559f 100644 ---- a/libuuid/src/gen_uuid.c -+++ b/libuuid/src/gen_uuid.c -@@ -274,6 +274,11 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, - last.tv_usec = tv2; - adjustment = a; - } -+ // reset in case of reserved CLOCK_SEQ_CONT -+ if (clock_seq == CLOCK_SEQ_CONT) { -+ last.tv_sec = 0; -+ last.tv_usec = 0; -+ } - } - - if ((last.tv_sec == 0) && (last.tv_usec == 0)) { --- -2.38.1 - diff --git a/SOURCES/0087-fstrim-backport-entries-de-duplication.patch b/SOURCES/0087-fstrim-backport-entries-de-duplication.patch deleted file mode 100644 index 921ad25..0000000 --- a/SOURCES/0087-fstrim-backport-entries-de-duplication.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 9272023b42febae7db1ec828016a980146095a83 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 2 Feb 2023 13:21:33 +0100 -Subject: fstrim: backport entries de-duplication - -Upstream: http://github.com/util-linux/util-linux/commit/9dbc073e4c58a56f68da8209df19789131446f5e -Upstream: http://github.com/util-linux/util-linux/commit/67f974d41d62c8b521fe81e1aac92562366f6a0a -Upstream: http://github.com/util-linux/util-linux/commit/20af6cee463cd6329b4f06db3282a09be942bd7a -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2121699 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/fstrim.c | 88 ++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 74 insertions(+), 14 deletions(-) - -diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c -index 70870ef69..6aa523d72 100644 ---- a/sys-utils/fstrim.c -+++ b/sys-utils/fstrim.c -@@ -35,6 +35,7 @@ - - #include <sys/ioctl.h> - #include <sys/stat.h> -+#include <sys/vfs.h> - #include <linux/fs.h> - - #include "nls.h" -@@ -43,6 +44,7 @@ - #include "closestream.h" - #include "pathnames.h" - #include "sysfs.h" -+#include "statfs_magic.h" - - #include <libmount.h> - -@@ -84,6 +86,7 @@ static int fstrim_filesystem(const char *path, struct fstrim_range *rangetpl, - goto done; - } - errno = 0; -+ - if (ioctl(fd, FITRIM, &range)) { - rc = errno == EOPNOTSUPP || errno == ENOTTY ? 1 : -errno; - -@@ -114,7 +117,7 @@ static int has_discard(const char *devname, struct sysfs_cxt *wholedisk) - struct sysfs_cxt cxt, *parent = NULL; - uint64_t dg = 0; - dev_t disk = 0, dev; -- int rc; -+ int rc, rdonly = 0; - - dev = sysfs_devname_to_devno(devname, NULL); - if (!dev) -@@ -139,11 +142,46 @@ static int has_discard(const char *devname, struct sysfs_cxt *wholedisk) - rc = sysfs_init(&cxt, dev, parent); - if (!rc) - rc = sysfs_read_u64(&cxt, "queue/discard_granularity", &dg); -+ if (!rc) -+ sysfs_scanf(&cxt, "ro", "%d", &rdonly); - - sysfs_deinit(&cxt); -- return rc == 0 && dg > 0; -+ return rc == 0 && dg > 0 && rdonly == 0; - } - -+static int is_unwanted_fs(struct libmnt_fs *fs, const char *tgt) -+{ -+ struct statfs vfs; -+ int fd, rc; -+ -+ if (mnt_fs_is_pseudofs(fs)) -+ return 1; -+ if (mnt_fs_is_netfs(fs)) -+ return 1; -+ if (mnt_fs_is_swaparea(fs)) -+ return 1; -+ if (mnt_fs_match_fstype(fs, "autofs")) -+ return 1; -+ if (mnt_fs_match_options(fs, "ro")) -+ return 1; -+ -+ fd = open(tgt, O_PATH); -+ if (fd < 0) -+ return 1; -+ rc = fstatfs(fd, &vfs) != 0 || vfs.f_type == STATFS_AUTOFS_MAGIC; -+ close(fd); -+ if (rc) -+ return 1; -+ -+ /* FITRIM on read-only filesystem can fail, and it can fail */ -+ if (access(tgt, W_OK) != 0) { -+ if (errno == EROFS) -+ return 1; -+ if (errno == EACCES) -+ return 1; -+ } -+ return 0; -+} - - static int uniq_fs_target_cmp( - struct libmnt_table *tb __attribute__((__unused__)), -@@ -182,30 +220,38 @@ static int fstrim_all(struct fstrim_range *rangetpl, int verbose) - - mnt_init_debug(0); - -- itr = mnt_new_iter(MNT_ITER_BACKWARD); -- if (!itr) -- err(MNT_EX_FAIL, _("failed to initialize libmount iterator")); -- - tab = mnt_new_table_from_file(_PATH_PROC_MOUNTINFO); - if (!tab) - err(MNT_EX_FAIL, _("failed to parse %s"), _PATH_PROC_MOUNTINFO); - -+ if (mnt_table_is_empty(tab)) { -+ mnt_unref_table(tab); -+ return MNT_EX_SUCCESS; -+ } -+ - /* de-duplicate by mountpoints */ - mnt_table_uniq_fs(tab, 0, uniq_fs_target_cmp); - -- /* de-duplicate by source */ -- mnt_table_uniq_fs(tab, MNT_UNIQ_FORWARD, uniq_fs_source_cmp); -+ itr = mnt_new_iter(MNT_ITER_BACKWARD); -+ if (!itr) -+ err(MNT_EX_FAIL, _("failed to initialize libmount iterator")); - -+ /* Remove useless entries and canonicalize the table */ - while (mnt_table_next_fs(tab, itr, &fs) == 0) { - const char *src = mnt_fs_get_srcpath(fs), - *tgt = mnt_fs_get_target(fs); - char *path; - int rc = 1; - -- if (!src || !tgt || *src != '/' || -- mnt_fs_is_pseudofs(fs) || -- mnt_fs_is_netfs(fs)) -+ if (!tgt || is_unwanted_fs(fs, tgt)) { -+ mnt_table_remove_fs(tab, fs); - continue; -+ } -+ -+ if (!src || *src != '/') { -+ mnt_table_remove_fs(tab, fs); -+ continue; -+ } - - /* Is it really accessible mountpoint? Not all mountpoints are - * accessible (maybe over mounted by another filesystem) */ -@@ -213,11 +259,25 @@ static int fstrim_all(struct fstrim_range *rangetpl, int verbose) - if (path && strcmp(path, tgt) == 0) - rc = 0; - free(path); -- if (rc) -+ if (rc) { -+ mnt_table_remove_fs(tab, fs); - continue; /* overlaying mount */ -+ } - -- if (!has_discard(src, &wholedisk)) -+ if (!has_discard(src, &wholedisk)) { -+ mnt_table_remove_fs(tab, fs); - continue; -+ } -+ } -+ -+ /* de-duplicate by source */ -+ mnt_table_uniq_fs(tab, MNT_UNIQ_FORWARD, uniq_fs_source_cmp); -+ -+ mnt_reset_iter(itr, MNT_ITER_BACKWARD); -+ -+ /* Do FITRIM */ -+ while (mnt_table_next_fs(tab, itr, &fs) == 0) { -+ const char *tgt = mnt_fs_get_target(fs); - cnt++; - - /* -@@ -231,10 +291,10 @@ static int fstrim_all(struct fstrim_range *rangetpl, int verbose) - if (fstrim_filesystem(tgt, rangetpl, verbose) < 0) - cnt_err++; - } -+ mnt_free_iter(itr); - - sysfs_deinit(&wholedisk); - mnt_unref_table(tab); -- mnt_free_iter(itr); - - if (cnt && cnt == cnt_err) - return MNT_EX_FAIL; /* all failed */ --- -2.39.1 - diff --git a/SOURCES/0088-tests-don-t-reply-on-scsi_debug-partitions.patch b/SOURCES/0088-tests-don-t-reply-on-scsi_debug-partitions.patch deleted file mode 100644 index 2ed72a4..0000000 --- a/SOURCES/0088-tests-don-t-reply-on-scsi_debug-partitions.patch +++ /dev/null @@ -1,66 +0,0 @@ -From a95ff5ed155c29734824f3a79350678901b22e43 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 11 Feb 2021 12:44:44 +0100 -Subject: tests: don't reply on scsi_debug partitions - -The disk layout as created by scsi_debug depends on kernel version. -Let's make the partition sizes hardcoded in our tests than rely on -kernel. - -Signed-off-by: Karel Zak <kzak@redhat.com> -Upstream: http://github.com/util-linux/util-linux/commit/15a37d00e5e59f0f628d0a6b6cd2f9636702fd7c -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2142496 ---- - tests/expected/partx/partx-detect-parts | 6 +++--- - tests/ts/partx/partx | 14 +++++++++++--- - 2 files changed, 14 insertions(+), 6 deletions(-) - -diff --git a/tests/expected/partx/partx-detect-parts b/tests/expected/partx/partx-detect-parts -index 33d42a58c..0adc85577 100644 ---- a/tests/expected/partx/partx-detect-parts -+++ b/tests/expected/partx/partx-detect-parts -@@ -1,5 +1,5 @@ - NR START END SECTORS SIZE NAME UUID -- 1 32 33791 33760 16.5M -- 2 33792 67583 33792 16.5M -- 3 67584 102399 34816 17M -+ 1 32 33791 33760 16.5M 1ddc8a79-01 -+ 2 33792 67583 33792 16.5M 1ddc8a79-02 -+ 3 67584 102399 34816 17M 1ddc8a79-03 - OK -diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx -index 84c286a94..6514ae62c 100755 ---- a/tests/ts/partx/partx -+++ b/tests/ts/partx/partx -@@ -26,6 +26,7 @@ ts_init "$*" - ts_check_test_command "$TS_CMD_PARTX" - ts_check_test_command "$TS_CMD_ADDPART" - ts_check_test_command "$TS_CMD_DELPART" -+ts_check_test_command "$TS_CMD_SFDISK" - - ts_skip_nonroot - -@@ -70,10 +71,17 @@ ts_init_subtest "delpart" - } >$TS_OUTPUT 2>&1 - ts_finalize_subtest - --ts_scsi_debug_rmmod - --# set global variable TS_DEVICE --ts_scsi_debug_init dev_size_mb=50 num_parts=$PARTS -+udevadm settle -+$TS_CMD_SFDISK $TS_DEVICE &> /dev/null <<EOF -+label: dos -+label-id: 0x1ddc8a79 -+32,33760,, -+33792,33792,, -+67584,34816,, -+EOF -+udevadm settle -+ - - ts_init_subtest "detect-parts" - { --- -2.39.1 - diff --git a/SOURCES/0089-libmount-use-generic-error-message-for-EACCES-on-umo.patch b/SOURCES/0089-libmount-use-generic-error-message-for-EACCES-on-umo.patch deleted file mode 100644 index 16f352c..0000000 --- a/SOURCES/0089-libmount-use-generic-error-message-for-EACCES-on-umo.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 301dc3d820434cbc65a7b5565d448e417293fcfb Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 2 Feb 2023 14:47:04 +0100 -Subject: libmount: use generic error message for EACCES on umount - -Signed-off-by: Karel Zak <kzak@redhat.com> -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2149394 ---- - libmount/src/context_umount.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c -index 240ec3be6..23aaae395 100644 ---- a/libmount/src/context_umount.c -+++ b/libmount/src/context_umount.c -@@ -1123,7 +1123,7 @@ int mnt_context_get_umount_excode( - snprintf(buf, bufsz, _("must be superuser to unmount")); - break; - case EACCES: -- snprintf(buf, bufsz, _("block devices are not permitted on filesystem")); -+ snprintf(buf, bufsz, _("filesystem not accessible")); - break; - default: - return mnt_context_get_generic_excode(syserr, buf, bufsz,_("umount(2) system call failed: %m")); --- -2.39.1 - diff --git a/SOURCES/0090-lslogins-man-explain-password-statuses.patch b/SOURCES/0090-lslogins-man-explain-password-statuses.patch deleted file mode 100644 index 7dbc434..0000000 --- a/SOURCES/0090-lslogins-man-explain-password-statuses.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ea1ad5e7260c770b21e547702b1e0acef9e4854c Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 2 Feb 2023 14:52:35 +0100 -Subject: lslogins: (man) explain password statuses - -Upstream: http://github.com/util-linux/util-linux/commit/95ea3dd4128b625ab12691229020ebc50d578e71 -Upstream: http://github.com/util-linux/util-linux/commit/8001bffb03eda8d23d6a04a5dc1469cce932ae36 -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2159544 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - login-utils/lslogins.1 | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/login-utils/lslogins.1 b/login-utils/lslogins.1 -index c831739d9..5c327caf5 100644 ---- a/login-utils/lslogins.1 -+++ b/login-utils/lslogins.1 -@@ -116,6 +116,24 @@ Delimit user entries with a nul character, instead of a newline. - - .SH NOTES - The default UID thresholds are read from /etc/login.defs. -+.SS "Password status" -+.sp -+Multiple fields describe password status. -+.sp -+\fB"Login by password disabled"\fP -+.RS 4 -+\*(Aqyes\*(Aq means that there is no valid password. The password hash is missing, or the hash method is unknown or contains invalid chars. -+.RE -+.sp -+\fB"Password not required (empty)"\fP -+.RS 4 -+The password is not set (hash is missing); this is common for locked system accounts. Not requiring a password does not mean the user can log\-in without a password. It depends on the password "lock" status. -+.RE -+.sp -+\fB"Password is locked"\fP -+.RS 4 -+The password is prefixed by \*(Aq!!\*(Aq, and the user cannot login although the password is set or empty. This is common for new accounts without a set password. -+.RE - - .SH EXIT STATUS - .TP --- -2.39.1 - diff --git a/SOURCES/0091-last-sync-utmp-strings-use-with-upstream-code.patch b/SOURCES/0091-last-sync-utmp-strings-use-with-upstream-code.patch deleted file mode 100644 index 6e0abc3..0000000 --- a/SOURCES/0091-last-sync-utmp-strings-use-with-upstream-code.patch +++ /dev/null @@ -1,245 +0,0 @@ -From 25f7136d326753cb0bb7612a98db6542c9fdc3bd Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Thu, 2 Feb 2023 15:22:52 +0100 -Subject: last: sync utmp strings use with upstream code - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2160321 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - include/strutils.h | 30 +++++++++++++++++++ - include/timeutils.h | 1 + - login-utils/last.c | 73 +++++++++++++++++++++++---------------------- - 3 files changed, 69 insertions(+), 35 deletions(-) - -diff --git a/include/strutils.h b/include/strutils.h -index 5d07fcc7c..193f1acbc 100644 ---- a/include/strutils.h -+++ b/include/strutils.h -@@ -65,6 +65,36 @@ static inline void xstrncpy(char *dest, const char *src, size_t n) - dest[n-1] = 0; - } - -+/* This is like strncpy(), but based on memcpy(), so compilers and static -+ * analyzers do not complain when sizeof(destination) is the same as 'n' and -+ * result is not terminated by zero. -+ * -+ * Use this function to copy string to logs with fixed sizes (wtmp/utmp. ...) -+ * where string terminator is optional. -+ */ -+static inline void * __attribute__((nonnull (1))) -+str2memcpy(void *dest, const char *src, size_t n) -+{ -+ size_t bytes = strlen(src) + 1; -+ -+ if (bytes > n) -+ bytes = n; -+ -+ memcpy(dest, src, bytes); -+ return dest; -+} -+ -+static inline char * __attribute__((nonnull (1))) -+mem2strcpy(char *dest, const void *src, size_t n, size_t nmax) -+{ -+ if (n + 1 > nmax) -+ n = nmax - 1; -+ -+ memset(dest, '\0', nmax); -+ memcpy(dest, src, n); -+ return dest; -+} -+ - static inline int strdup_to_offset(void *stru, size_t offset, const char *str) - { - char *n = NULL; -diff --git a/include/timeutils.h b/include/timeutils.h -index 230e6db5f..f1540a183 100644 ---- a/include/timeutils.h -+++ b/include/timeutils.h -@@ -74,6 +74,7 @@ enum { - ISO_TIMESTAMP_COMMA_GT = ISO_TIMESTAMP_COMMA_G | ISO_T - }; - -+#define CTIME_BUFSIZ 26 - #define ISO_BUFSIZ 42 - - int strtimeval_iso(struct timeval *tv, int flags, char *buf, size_t bufsz); -diff --git a/login-utils/last.c b/login-utils/last.c -index 80d77d20b..8f7c36984 100644 ---- a/login-utils/last.c -+++ b/login-utils/last.c -@@ -339,15 +339,22 @@ static int time_formatter(int fmt, char *dst, size_t dlen, time_t *when) - break; - case LAST_TIMEFTM_HHMM: - { -- struct tm *tm = localtime(when); -- if (!snprintf(dst, dlen, "%02d:%02d", tm->tm_hour, tm->tm_min)) -+ struct tm tm; -+ -+ localtime_r(when, &tm); -+ if (!snprintf(dst, dlen, "%02d:%02d", tm.tm_hour, tm.tm_min)) - ret = -1; - break; - } - case LAST_TIMEFTM_CTIME: -- snprintf(dst, dlen, "%s", ctime(when)); -+ { -+ char buf[CTIME_BUFSIZ]; -+ -+ ctime_r(when, buf); -+ snprintf(dst, dlen, "%s", buf); - ret = rtrim_whitespace((unsigned char *) dst); - break; -+ } - case LAST_TIMEFTM_ISO8601: - ret = strtime_iso(when, ISO_TIMESTAMP_T, dst, dlen); - break; -@@ -394,8 +401,7 @@ static int list(const struct last_control *ctl, struct utmpx *p, time_t logout_t - /* - * uucp and ftp have special-type entries - */ -- utline[0] = 0; -- strncat(utline, p->ut_line, sizeof(p->ut_line)); -+ mem2strcpy(utline, p->ut_line, sizeof(p->ut_line), sizeof(utline)); - if (strncmp(utline, "ftp", 3) == 0 && isdigit(utline[3])) - utline[3] = 0; - if (strncmp(utline, "uucp", 4) == 0 && isdigit(utline[4])) -@@ -447,48 +453,48 @@ static int list(const struct last_control *ctl, struct utmpx *p, time_t logout_t - - if (logout_time == currentdate) { - if (ctl->time_fmt > LAST_TIMEFTM_SHORT) { -- sprintf(logouttime, " still running"); -+ snprintf(logouttime, sizeof(logouttime), " still running"); - length[0] = 0; - } else { -- sprintf(logouttime, " still"); -- sprintf(length, "running"); -+ snprintf(logouttime, sizeof(logouttime), " still"); -+ snprintf(length, sizeof(length), "running"); - } - } else if (days) { -- sprintf(length, "(%d+%02d:%02d)", days, abs(hours), abs(mins)); /* hours and mins always shown as positive (w/o minus sign!) even if secs < 0 */ -+ snprintf(length, sizeof(length), "(%d+%02d:%02d)", days, abs(hours), abs(mins)); /* hours and mins always shown as positive (w/o minus sign!) even if secs < 0 */ - } else if (hours) { -- sprintf(length, " (%02d:%02d)", hours, abs(mins)); /* mins always shown as positive (w/o minus sign!) even if secs < 0 */ -+ snprintf(length, sizeof(length), " (%02d:%02d)", hours, abs(mins)); /* mins always shown as positive (w/o minus sign!) even if secs < 0 */ - } else if (secs >= 0) { -- sprintf(length, " (%02d:%02d)", hours, mins); -+ snprintf(length, sizeof(length), " (%02d:%02d)", hours, mins); - } else { -- sprintf(length, " (-00:%02d)", abs(mins)); /* mins always shown as positive (w/o minus sign!) even if secs < 0 */ -+ snprintf(length, sizeof(length), " (-00:%02d)", abs(mins)); /* mins always shown as positive (w/o minus sign!) even if secs < 0 */ - } - - switch(what) { - case R_CRASH: -- sprintf(logouttime, "- crash"); -+ snprintf(logouttime, sizeof(logouttime), "- crash"); - break; - case R_DOWN: -- sprintf(logouttime, "- down "); -+ snprintf(logouttime, sizeof(logouttime), "- down "); - break; - case R_NOW: - if (ctl->time_fmt > LAST_TIMEFTM_SHORT) { -- sprintf(logouttime, " still logged in"); -+ snprintf(logouttime, sizeof(logouttime), " still logged in"); - length[0] = 0; - } else { -- sprintf(logouttime, " still"); -- sprintf(length, "logged in"); -+ snprintf(logouttime, sizeof(logouttime), " still"); -+ snprintf(length, sizeof(length), "logged in"); - } - break; - case R_PHANTOM: - if (ctl->time_fmt > LAST_TIMEFTM_SHORT) { -- sprintf(logouttime, " gone - no logout"); -+ snprintf(logouttime, sizeof(logouttime), " gone - no logout"); - length[0] = 0; - } else if (ctl->time_fmt == LAST_TIMEFTM_SHORT) { -- sprintf(logouttime, " gone"); -- sprintf(length, "- no logout"); -+ snprintf(logouttime, sizeof(logouttime), " gone"); -+ snprintf(length, sizeof(length), "- no logout"); - } else { - logouttime[0] = 0; -- sprintf(length, "no logout"); -+ snprintf(length, sizeof(length), "no logout"); - } - break; - case R_TIMECHANGE: -@@ -508,15 +514,8 @@ static int list(const struct last_control *ctl, struct utmpx *p, time_t logout_t - r = -1; - if (ctl->usedns || ctl->useip) - r = dns_lookup(domain, sizeof(domain), ctl->useip, (int32_t*)p->ut_addr_v6); -- if (r < 0) { -- size_t sz = sizeof(p->ut_host); -- -- if (sz > sizeof(domain)) -- sz = sizeof(domain); -- -- xstrncpy(domain, p->ut_host, sz); -- } -- -+ if (r < 0) -+ mem2strcpy(domain, p->ut_host, sizeof(p->ut_host), sizeof(domain)); - - if (ctl->showhost) { - if (!ctl->altlist) { -@@ -607,10 +606,11 @@ static int is_phantom(const struct last_control *ctl, struct utmpx *ut) - - if (ut->ut_tv.tv_sec < ctl->boot_time.tv_sec) - return 1; -+ ut->ut_user[sizeof(ut->ut_user) - 1] = '\0'; - pw = getpwnam(ut->ut_user); - if (!pw) - return 1; -- sprintf(path, "/proc/%u/loginuid", ut->ut_pid); -+ snprintf(path, sizeof(path), "/proc/%u/loginuid", ut->ut_pid); - if (access(path, R_OK) == 0) { - unsigned int loginuid; - FILE *f = NULL; -@@ -624,8 +624,11 @@ static int is_phantom(const struct last_control *ctl, struct utmpx *ut) - return 1; - } else { - struct stat st; -+ char utline[sizeof(ut->ut_line) + 1]; -+ -+ mem2strcpy(utline, ut->ut_line, sizeof(ut->ut_line), sizeof(utline)); - -- sprintf(path, "/dev/%s", ut->ut_line); -+ snprintf(path, sizeof(path), "/dev/%s", utline); - if (stat(path, &st)) - return 1; - if (pw->pw_uid != st.st_uid) -@@ -736,7 +739,7 @@ static void process_wtmp_file(const struct last_control *ctl, - else { - if (ut.ut_type != DEAD_PROCESS && - ut.ut_user[0] && ut.ut_line[0] && -- strcmp(ut.ut_user, "LOGIN") != 0) -+ strncmp(ut.ut_user, "LOGIN", 5) != 0) - ut.ut_type = USER_PROCESS; - /* - * Even worse, applications that write ghost -@@ -749,7 +752,7 @@ static void process_wtmp_file(const struct last_control *ctl, - /* - * Clock changes. - */ -- if (strcmp(ut.ut_user, "date") == 0) { -+ if (strncmp(ut.ut_user, "date", 4) == 0) { - if (ut.ut_line[0] == '|') - ut.ut_type = OLD_TIME; - if (ut.ut_line[0] == '{') -@@ -784,7 +787,7 @@ static void process_wtmp_file(const struct last_control *ctl, - case RUN_LVL: - x = ut.ut_pid & 255; - if (ctl->extended) { -- sprintf(ut.ut_line, "(to lvl %c)", x); -+ snprintf(ut.ut_line, sizeof(ut.ut_line), "(to lvl %c)", x); - quit = list(ctl, &ut, lastrch, R_NORMAL); - } - if (x == '0' || x == '6') { --- -2.39.1 - diff --git a/SOURCES/0092-last-use-full-size-of-the-username.patch b/SOURCES/0092-last-use-full-size-of-the-username.patch deleted file mode 100644 index a676580..0000000 --- a/SOURCES/0092-last-use-full-size-of-the-username.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f435f80b9ae88caf9fe8af2e9b705dc8296ad6f3 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Mon, 13 Feb 2023 16:22:23 +0100 -Subject: last: use full size of the username - -utmp uses 32 bytes for username, last(1) truncates it to 31 when calls getpwnam(). - -Reported-by: Radka Skvarilova <rskvaril@redhat.com> -Signed-off-by: Karel Zak <kzak@redhat.com> -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2160321 -Upstream: http://github.com/util-linux/util-linux/commit/4b646f01600a5efcf16e8e8991010b49b250bdfe ---- - login-utils/last.1 | 4 ++++ - login-utils/last.c | 6 ++++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/login-utils/last.1 b/login-utils/last.1 -index 94b4ed012..9169abd35 100644 ---- a/login-utils/last.1 -+++ b/login-utils/last.1 -@@ -178,6 +178,10 @@ files to be used, they can be created with a simple - .BR touch (1) - command (for example, - .IR "touch /var/log/wtmp" ). -+ -+The utmp file format uses fixed sizes of strings, which means that very long strings are -+impossible to store in the file and impossible to display by last. The usual limits are 32 -+bytes for a user and line name and 256 bytes for a hostname. - .SH FILES - /var/log/wtmp - .br -diff --git a/login-utils/last.c b/login-utils/last.c -index 8f7c36984..41ce03894 100644 ---- a/login-utils/last.c -+++ b/login-utils/last.c -@@ -602,12 +602,14 @@ static int is_phantom(const struct last_control *ctl, struct utmpx *ut) - { - struct passwd *pw; - char path[sizeof(ut->ut_line) + 16]; -+ char user[sizeof(ut->ut_user) + 1]; - int ret = 0; - - if (ut->ut_tv.tv_sec < ctl->boot_time.tv_sec) - return 1; -- ut->ut_user[sizeof(ut->ut_user) - 1] = '\0'; -- pw = getpwnam(ut->ut_user); -+ -+ mem2strcpy(user, ut->ut_user, sizeof(ut->ut_user), sizeof(user)); -+ pw = getpwnam(user); - if (!pw) - return 1; - snprintf(path, sizeof(path), "/proc/%u/loginuid", ut->ut_pid); --- -2.39.1 - diff --git a/SOURCES/1000-setpriv-add-reset-env.patch b/SOURCES/1000-setpriv-add-reset-env.patch deleted file mode 100644 index 0abfca9..0000000 --- a/SOURCES/1000-setpriv-add-reset-env.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 29d625a085497be8babec7d2adfb3eeaa7114736 Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Wed, 22 Aug 2018 11:43:32 +0200 -Subject: [PATCH 1/2] setpriv: add --reset-env - -Clear environment in way like su(1), but PATH is set to hard-coded -defaults and /etc/login.defs is not used at all (I guess we want to -keep setpriv(1) simple). - -If you need anything more advanced than use env(1). - -Addresses: https://github.com/karelzak/util-linux/issues/325 -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - sys-utils/setpriv.1 | 9 +++++++ - sys-utils/setpriv.c | 57 ++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 65 insertions(+), 1 deletion(-) - -diff --git a/sys-utils/setpriv.1 b/sys-utils/setpriv.1 -index f989bf33c..e915316a9 100644 ---- a/sys-utils/setpriv.1 -+++ b/sys-utils/setpriv.1 -@@ -165,6 +165,15 @@ to abort if AppArmor is not in use, and the transition may be ignored or cause - .BR execve (2) - to fail at AppArmor's whim. - .TP -+.BI \-\-reset\-env -+Clears all the environment variables except TERM; initializes the environment variables HOME, SHELL, USER, LOGNAME -+according to the user's passwd entry; sets PATH to \fI/usr/local/bin:/bin:/usr/bin\fR for a regual user and to -+\fI/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\fR for root. -+.sp -+The environment variable PATH may be different on systems where /bin and /sbin -+are merged into /usr. The environment variable SHELL defaults to \fI/bin/sh\fR if none is given in the user's -+passwd entry. -+.TP - .BR \-V , " \-\-version" - Display version information and exit. - .TP -diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c -index 0d3a3b3c9..402b1cf1a 100644 ---- a/sys-utils/setpriv.c -+++ b/sys-utils/setpriv.c -@@ -39,6 +39,7 @@ - #include "xalloc.h" - #include "pathnames.h" - #include "signames.h" -+#include "env.h" - - #ifndef PR_SET_NO_NEW_PRIVS - # define PR_SET_NO_NEW_PRIVS 38 -@@ -56,6 +57,11 @@ - - #define SETPRIV_EXIT_PRIVERR 127 /* how we exit when we fail to set privs */ - -+/* The shell to set SHELL env.variable if none is given in the user's passwd entry. */ -+#define DEFAULT_SHELL "/bin/sh" -+ -+static gid_t get_group(const char *s, const char *err); -+ - enum cap_type { - CAP_TYPE_EFFECTIVE = CAPNG_EFFECTIVE, - CAP_TYPE_PERMITTED = CAPNG_PERMITTED, -@@ -83,6 +89,7 @@ struct privctx { - keep_groups:1, /* keep groups */ - clear_groups:1, /* remove groups */ - init_groups:1, /* initialize groups */ -+ reset_env:1, /* reset environment */ - have_securebits:1; /* remove groups */ - - /* uids and gids */ -@@ -138,10 +145,13 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_(" --init-groups initialize supplementary groups\n"), out); - fputs(_(" --groups <group,...> set supplementary groups\n"), out); - fputs(_(" --securebits <bits> set securebits\n"), out); -+ fputs(_(" --reset-env reset environment variables\n"), out); - fputs(_(" --pdeathsig keep|clear|<signame>\n" - " set or clear parent death signal\n"), out); - fputs(_(" --selinux-label <label> set SELinux label\n"), out); - fputs(_(" --apparmor-profile <pr> set AppArmor profile\n"), out); -+ fputs(_(" --reset-env clear all environment and initialize\n" -+ " HOME, SHELL, USER, LOGNAME and PATH\n"), out); - - fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(29)); -@@ -680,6 +690,36 @@ static void do_apparmor_profile(const char *label) - _("write failed: %s"), _PATH_PROC_ATTR_EXEC); - } - -+ -+static void do_reset_environ(struct passwd *pw) -+{ -+ char *term = getenv("TERM"); -+ -+ if (term) -+ term = xstrdup(term); -+#ifdef HAVE_CLEARENV -+ clearenv(); -+#else -+ environ = NULL; -+#endif -+ if (term) -+ xsetenv("TERM", term, 1); -+ -+ if (pw->pw_shell && *pw->pw_shell) -+ xsetenv("SHELL", pw->pw_shell, 1); -+ else -+ xsetenv("SHELL", DEFAULT_SHELL, 1); -+ -+ xsetenv("HOME", pw->pw_dir, 1); -+ xsetenv("USER", pw->pw_name, 1); -+ xsetenv("LOGNAME", pw->pw_name, 1); -+ -+ if (pw->pw_uid) -+ xsetenv("PATH", _PATH_DEFPATH, 1); -+ else -+ xsetenv("PATH", _PATH_DEFPATH_ROOT, 1); -+} -+ - static uid_t get_user(const char *s, const char *err) - { - struct passwd *pw; -@@ -750,7 +790,8 @@ int main(int argc, char **argv) - SECUREBITS, - PDEATHSIG, - SELINUX_LABEL, -- APPARMOR_PROFILE -+ APPARMOR_PROFILE, -+ RESET_ENV - }; - - static const struct option longopts[] = { -@@ -776,6 +817,7 @@ int main(int argc, char **argv) - { "selinux-label", required_argument, NULL, SELINUX_LABEL }, - { "apparmor-profile", required_argument, NULL, APPARMOR_PROFILE }, - { "help", no_argument, NULL, 'h' }, -+ { "reset-env", no_argument, NULL, RESET_ENV, }, - { "version", no_argument, NULL, 'V' }, - { NULL, 0, NULL, 0 } - }; -@@ -928,6 +970,9 @@ int main(int argc, char **argv) - _("duplicate --apparmor-profile option")); - opts.apparmor_profile = optarg; - break; -+ case RESET_ENV: -+ opts.reset_env = 1; -+ break; - case 'h': - usage(); - case 'V': -@@ -973,6 +1018,16 @@ int main(int argc, char **argv) - "can be found on the system"), - (long) opts.ruid); - -+ if (opts.reset_env) { -+ if (opts.have_passwd) -+ /* pwd according to --ruid or --reuid */ -+ pw = &opts.passwd; -+ else -+ /* pwd for the current user */ -+ pw = getpwuid(getuid()); -+ do_reset_environ(pw); -+ } -+ - if (opts.nnp && prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == -1) - err(EXIT_FAILURE, _("disallow granting new privileges failed")); - --- -2.38.1 - - -From 7f2c086340c755b3044f1786d4647c40c20200e3 Mon Sep 17 00:00:00 2001 -From: John W Higgins <wishdev@gmail.com> -Date: Mon, 17 Dec 2018 17:11:44 -0800 -Subject: [PATCH 2/2] Remove duplicate entry for reset-env from usage - -I assume the second entry was not desired in the original commit. Line 153-154 would appear to be a duplicate ---- - sys-utils/setpriv.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c -index 402b1cf1a..f4344bd52 100644 ---- a/sys-utils/setpriv.c -+++ b/sys-utils/setpriv.c -@@ -145,7 +145,6 @@ static void __attribute__((__noreturn__)) usage(void) - fputs(_(" --init-groups initialize supplementary groups\n"), out); - fputs(_(" --groups <group,...> set supplementary groups\n"), out); - fputs(_(" --securebits <bits> set securebits\n"), out); -- fputs(_(" --reset-env reset environment variables\n"), out); - fputs(_(" --pdeathsig keep|clear|<signame>\n" - " set or clear parent death signal\n"), out); - fputs(_(" --selinux-label <label> set SELinux label\n"), out); --- -2.38.1 - diff --git a/SOURCES/1001-losetup-avoid-infinite-busy-loop.patch b/SOURCES/1001-losetup-avoid-infinite-busy-loop.patch deleted file mode 100644 index 26fdc77..0000000 --- a/SOURCES/1001-losetup-avoid-infinite-busy-loop.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -Naur a/sys-utils/losetup.8 b/sys-utils/losetup.8 ---- a/sys-utils/losetup.8 2021-10-20 15:23:28.983136437 -0700 -+++ b/sys-utils/losetup.8 2021-10-20 15:23:54.314264432 -0700 -@@ -68,6 +68,13 @@ - file. - .B This setup may be dangerous, can cause data loss, corruption and overwrites. - Use \fB\-\-nooverlap\fR with \fB\-\-find\fR during setup to avoid this problem. -+.sp -+The loop device setup is not an atomic operation when used with \fB\-\-find\fP, and -+.B losetup -+does not protect this operation by any lock. The number of attempts is -+internally restricted to a maximum of 16. It is recommended to use for example -+.BR flock (1) -+to avoid a collision in heavily parallel use cases. - - .SH OPTIONS - The \fIsize\fR and \fIoffset\fR -@@ -170,6 +177,11 @@ - displays the status of a loop device, it returns 1 if the device - is not configured and 2 if an error occurred which prevented - determining the status of the device. -+.SH NOTES -+Since version 2.37 -+.B losetup -+uses LOOP_CONFIGURE ioctl to setup a new loop device by one ioctl call. The -+old versions use LOOP_SET_FD and LOOP_SET_STATUS64 ioctls to do the same. - - .SH FILES - .TP -diff -Naur a/sys-utils/losetup.c b/sys-utils/losetup.c ---- a/sys-utils/losetup.c 2021-10-20 15:23:28.902136028 -0700 -+++ b/sys-utils/losetup.c 2021-10-20 15:23:54.315264437 -0700 -@@ -463,7 +463,7 @@ - const char *file, uint64_t offset, uint64_t sizelimit) - { - int hasdev = loopcxt_has_device(lc); -- int rc = 0; -+ int rc = 0, ntries = 0; - - /* losetup --find --noverlap file.img */ - if (!hasdev && nooverlap) { -@@ -556,8 +556,12 @@ - rc = loopcxt_setup_device(lc); - if (rc == 0) - break; /* success */ -- if (errno == EBUSY && !hasdev) -+ -+ if (errno == EBUSY && !hasdev && ntries < 16) { -+ xusleep(200000); -+ ntries++; - continue; -+ } - - /* errors */ - errpre = hasdev && loopcxt_get_fd(lc) < 0 ? diff --git a/SOURCES/1002-losetup-increase-limit-of-setup-attempts.patch b/SOURCES/1002-losetup-increase-limit-of-setup-attempts.patch deleted file mode 100644 index 9f3b02a..0000000 --- a/SOURCES/1002-losetup-increase-limit-of-setup-attempts.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur a/sys-utils/losetup.c b/sys-utils/losetup.c ---- a/sys-utils/losetup.c 2021-10-20 15:24:27.694433107 -0700 -+++ b/sys-utils/losetup.c 2021-10-20 15:28:27.101642814 -0700 -@@ -557,7 +557,7 @@ - if (rc == 0) - break; /* success */ - -- if (errno == EBUSY && !hasdev && ntries < 16) { -+ if (errno == EBUSY && !hasdev && ntries < 64) { - xusleep(200000); - ntries++; - continue; diff --git a/SOURCES/1003-lib-loopdev-perform-retry-on-EAGAIN.patch b/SOURCES/1003-lib-loopdev-perform-retry-on-EAGAIN.patch deleted file mode 100644 index 810d1de..0000000 --- a/SOURCES/1003-lib-loopdev-perform-retry-on-EAGAIN.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur a/sys-utils/losetup.c b/sys-utils/losetup.c ---- a/sys-utils/losetup.c 2021-10-20 15:28:49.072753825 -0700 -+++ b/sys-utils/losetup.c 2021-10-20 15:29:07.938849143 -0700 -@@ -557,7 +557,7 @@ - if (rc == 0) - break; /* success */ - -- if (errno == EBUSY && !hasdev && ntries < 64) { -+ if ((errno == EBUSY || errno == EAGAIN) && !hasdev && ntries < 64) { - xusleep(200000); - ntries++; - continue; diff --git a/SOURCES/adjtime b/SOURCES/adjtime deleted file mode 100644 index 3127bd0..0000000 --- a/SOURCES/adjtime +++ /dev/null @@ -1,2 +0,0 @@ -0.0 0 0.0 -0 diff --git a/SOURCES/util-linux-60-raw.rules b/SOURCES/util-linux-60-raw.rules deleted file mode 100644 index abbf79d..0000000 --- a/SOURCES/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/SOURCES/util-linux-chsh-chfn.pamd b/SOURCES/util-linux-chsh-chfn.pamd deleted file mode 100644 index 2dbc0aa..0000000 --- a/SOURCES/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/SOURCES/util-linux-login.pamd b/SOURCES/util-linux-login.pamd deleted file mode 100644 index 98e30d7..0000000 --- a/SOURCES/util-linux-login.pamd +++ /dev/null @@ -1,17 +0,0 @@ -#%PAM-1.0 -auth substack system-auth -auth include postlogin -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 include postlogin --session optional pam_ck_connector.so diff --git a/SOURCES/util-linux-remote.pamd b/SOURCES/util-linux-remote.pamd deleted file mode 100644 index 100ec98..0000000 --- a/SOURCES/util-linux-remote.pamd +++ /dev/null @@ -1,15 +0,0 @@ -#%PAM-1.0 -auth substack password-auth -auth include postlogin -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 -session include postlogin diff --git a/SOURCES/util-linux-runuser-l.pamd b/SOURCES/util-linux-runuser-l.pamd deleted file mode 100644 index 7a9a48c..0000000 --- a/SOURCES/util-linux-runuser-l.pamd +++ /dev/null @@ -1,5 +0,0 @@ -#%PAM-1.0 -auth include runuser -session optional pam_keyinit.so force revoke --session optional pam_systemd.so -session include runuser diff --git a/SOURCES/util-linux-runuser.pamd b/SOURCES/util-linux-runuser.pamd deleted file mode 100644 index 37f0e84..0000000 --- a/SOURCES/util-linux-runuser.pamd +++ /dev/null @@ -1,5 +0,0 @@ -#%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/SOURCES/util-linux-su-l.pamd b/SOURCES/util-linux-su-l.pamd deleted file mode 100644 index 656a139..0000000 --- a/SOURCES/util-linux-su-l.pamd +++ /dev/null @@ -1,6 +0,0 @@ -#%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/SOURCES/util-linux-su.pamd b/SOURCES/util-linux-su.pamd deleted file mode 100644 index 5733201..0000000 --- a/SOURCES/util-linux-su.pamd +++ /dev/null @@ -1,15 +0,0 @@ -#%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 -# Uncomment the following line to require a user to be in the "wheel" group. -#auth required pam_wheel.so use_uid -auth substack 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/SOURCES/uuidd-tmpfiles.conf b/SOURCES/uuidd-tmpfiles.conf deleted file mode 100644 index 4158c7d..0000000 --- a/SOURCES/uuidd-tmpfiles.conf +++ /dev/null @@ -1 +0,0 @@ -d /run/uuidd 2775 uuidd uuidd diff --git a/SPECS/util-linux.spec b/SPECS/util-linux.spec deleted file mode 100644 index e0bd216..0000000 --- a/SPECS/util-linux.spec +++ /dev/null @@ -1,3366 +0,0 @@ -### Header -Summary: A collection of basic system utilities -Name: util-linux -Version: 2.32.1 -Release: 41.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_major %(eval echo %{version} | %{__sed} -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') - -%define compldir %{_datadir}/bash-completion/completions/ - -%if 0%{?fedora} >= 23 || 0%{?rhel} > 7 -%define pypkg python3 -%define pyver 3 -%else -%define pypkg python -%define pyver 2 -%endif - - -### Dependencies -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 -Buildrequires: systemd-devel -BuildRequires: systemd -Buildrequires: libuser-devel -BuildRequires: libcap-ng-devel -BuildRequires: %{pypkg}-devel -BuildRequires: gcc -%ifarch ppc64le -BuildRequires: librtas-devel -%endif -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: bison -BuildRequires: git-core - -### Sources -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 -Source4: util-linux-60-raw.rules -Source5: adjtime -Source6: uuidd-tmpfiles.conf -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 -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 -# 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 -# 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 - -Requires(post): coreutils -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} -Requires: libmount = %{version}-%{release} -Requires: libsmartcols = %{version}-%{release} -Requires: libfdisk = %{version}-%{release} - -### RHEL-8.0 -### -# 151635 - /var/log/secure spam finding lastlog -Patch0: 0000-login-create-var-log-lastlog.patch -# 1595882 - wipefs should erase also secondary LUKSv2 header -Patch1: 0001-libblkid-Check-for-a-secondary-LUKS2-header.patch -# 1614364 - losetup: /dev/loop1: failed to set up loop device -Patch2: 0002-losetup-keep-f-and-devname-mutually-exclusive.patch -# 1614852 - mount man page says sync option has no effect for ext4 -Patch3: 0003-mount-add-ext4-to-some-places-to-the-man-page.patch -# 1614843 - Man page of logger is missing -S option -Patch4: 0004-logger-add-S-to-the-man-page.patch -# 1614967 - Lslogins doesn't fail with nonexisting username -Patch5: 0005-lslogins-add-info-about-single-user-output-mode.patch -Patch6: 0006-lslogins-return-1-on-lslogins-nonexisting.patch -# 1624877 - libuuid: name-based UUIDs are not compatible with RFC4122 -Patch7: 0007-libuuid-fix-name-based-UUIDs.patch -Patch8: 0008-test-update-UUID-v5-tests.patch -# 1656437 - Failing tests from testsuite -Patch9: 0009-tests-enlarge-backing-file-for-fstab-btrfs.patch -Patch10: 0010-tests-make-lsns-netnsid-portable.patch -Patch11: 0011-tests-break-up-large-strings-for-PySys_WriteStdout.patch -# 1653781 - unable to umount by loop backing file -Patch12: 0012-libmount-umount-make-mnt_stat_mountpoin-usable-for-r.patch -# 1655650 - RHEL8.0 - fdisk -l shows the conflicting partitions name for the mpath -Patch13: 0013-libfdisk-Fix-multipath-partition-seperators-for-user.patch -# 1653413 - blkid: add --no-part-details to not return metadata from empty partitions -Patch14: 0014-blkid-make-PART_ENTRY_-tags-optional-add-no-part-det.patch - -### RHEL-8.1 -### -# 1681062 - Add gainting tests -Patch15: 0015-tests-add-missing-ts_check_test_command-calls.patch -Patch16: 0016-tests-add-use-system-commands.patch -Patch17: 0017-tests-kill-do-not-use-shell-build-in.patch -Patch18: 0018-tests-add-missing-TS_CMD_UMOUNT-check.patch -Patch19: 0019-tests-add-noskip-commands.patch -Patch20: 0020-tests-add-missing-program-checks.patch -Patch21: 0021-tests-check-for-tar-and-b-g-zip.patch -Patch22: 0022-tests-make-mount-oloop-use-more-robust.patch -# 1734553 - RHEL-8: blkid_get_dev() leak file descriptor to underlying block device -Patch23: 0023-libblkid-fix-file-descriptor-leak-in-blkid_verify.patch -# 1719069 - Findmnt warning "recommended root FS passno is 1" for XFS -Patch24: 0024-findmnt-verify-ignore-passno-for-XFS.patch -# 1739179 - partx failed on nvme devices with exit code 1 -Patch25: 0025-partx-don-t-report-ENXIO-as-error-on-d.patch -Patch26: 0026-partx-document-d-vs.-nr-and-fix-test.patch -# 1751447 - improve /proc/self/mountinfo reliability -Patch27: 0027-libmount-improve-mountinfo-reliability.patch -Patch28: 0028-libmount-use-fmemopen-in-more-robust-way-coverity-sc.patch - -### RHEL-8.2 -### -# 1739443 - lscpu reports wrong hypervisor in nested virt on s390x -Patch29: 0029-lscpu-use-the-first-VM-from-proc-sysinfo.patch -Patch30: 0030-tests-lscpu-s390-nested-virtualization.patch -# 1743555 - command chfn adds some useless commas with GECOS information into /etc/password -Patch31: 0031-chfn-don-t-append-extra-tailing-commas.patch -Patch32: 0032-tests-add-new-test-for-chfn-gecos.patch -# 1739443 - lscpu reports wrong hypervisor in nested virt on s390x -Patch33: 0033-tests-update-lscpu-test-for-RHEL8.patch -# CI fix -Patch34: 0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch - -### RHEL-8.3 -### -# 1826251 - remove MD metadata 0.90 based tests from util-linux CI -Patch35: 0035-tests-mark-MD-tests-with-metadata-v0.90-as-KNOWN-FAI.patch -# 1812576 - RFE: Bitlocker detection for RHEL 8.3 -Patch36: 0036-libblkid-add-BitLocker-detection.patch -# 1817726 - libblkid BLOCK_SIZE -Patch37: 0037-blkid-retport-block-size-of-a-filesystem.patch -Patch38: 0038-libblkid-xfs-fix-sector-size-calculation.patch -# 1803753 - col struct char_str c_column field should be of unsigned type and/or larger than 16 bit -Patch39: 0039-col-make-flush_line-a-little-bit-robust.patch -# 1812118 - mount -a always tries to mount smb3 share subdir despite being already mounted. -Patch40: 0040-libmount-improve-smb-2-3-support.patch -# 1829245 - mount -a tries to mount already mounted cifs shares when we cannot query up to root dir -Patch41: 0041-libmount-fix-mount-a-EBUSY-for-cifs.patch -# 1848919 - Update losetup man page to fix "--direct-io" defaults -Patch42: 0042-Manual-pages-losetup.8-Fix-direct-io-defaults.patch - -### RHEL-8.4 -### -# 1884194 - RHEL-8: chrt command does not support the -R option -Patch43: 0043-chrt-use-SCHED_FLAG_RESET_ON_FORK-for-sched_setattr.patch -Patch44: 0044-chrt-don-t-restrict-reset-on-fork-add-more-info-to-m.patch -# 1855759 - mount.8: clarify (no)suid behavior on file capabilities -Patch45: 0045-mount.8-clarify-no-suid-behavior-on-file-capabilitie.patch -# 1861670 - lsblk can not show serial information for virtio disk -Patch46: 0046-lsblk-Fall-back-to-ID_SERIAL.patch -# 1883783 - lscpu: avoid segfault on PowerPC systems with valid hardware configurations -Patch47: 0047-lscpu-avoid-segfault-on-PowerPC-systems-with-valid-h.patch -# 1900498 - libfdisk/libmount: backport two patches for upstream systemd -Patch48: 0048-libfdisk-count-gaps-to-possible-size-when-resize.patch -Patch49: 0049-libmount-parser-fix-memory-leak-on-error-before-end-.patch -# 1883056 - lscpu support for Fujitsu A64FX -Patch50: 0050-lscpu-update-ARM-identifiers-tables.patch -Patch51: 0051-lscpu-use-cluster-on-aarch64-machine-which-doesn-t-h.patch -Patch52: 0052-lscpu-dmi-split-to-parse-dmi-table.patch -Patch53: 0053-lscpu-add-helper-to-get-physical-sockets.patch -Patch54: 0054-lscpu-show-physical-socket-on-aarch64-without-ACPI-P.patch -# 1882740 lscpu: use SMBIOS Type 4 strings for CPU vendor and model on ARM -Patch55: 0055-lscpu-arm-read-vendor-and-model-from-BIOS.patch -# 1900498 - libfdisk/libmount: backport two patches for upstream systemd -Patch56: 0056-tests-update-sfdisk-resize.patch - -### RHEL-8.5 -### -# 1906157 - after su from root to a normal user mesg is unable to show current status -Patch57: 0057-mesg-use-only-stat-to-get-the-current-terminal-statu.patch -# 1917852 - findmnt: add option to list all fs-independent flags -Patch58: 0058-findmnt-add-option-to-list-all-fs-independent-flags.patch -# 1922299 - throws error using /sbin/nologin: invalid option -- 'c' -Patch59: 0059-nologin-Prevent-error-from-su-c.patch -Patch60: 0060-nologin-silently-ignore-well-known-shell-command-lin.patch -# 1940607 - lsblk sometimes returns block devices in wrong order with --pairs -Patch61: 0061-libsmartcols-introduce-default-sort-column.patch -# 1919529 - [RFE] RHEL-8: Support option flags with mount(8) --bind -Patch62: 0062-libmount-accept-another-flags-on-MS_REMOUNT-MS_BIND.patch -# 1946921 - RHEL8: mount --rbind -o rprivate doesn't do recursive bind mount -Patch63: 0063-libmount-improve-MS_REC-usage.patch - -### RHEL-8.6 -### -# 1988955 - script command continues without stopping. -Patch64: 0064-script-be-sensitive-to-another-SIGCHLD-ssi_codes.patch -# 2041498 - incorrect partition size calculation for BLKPG_* ioctls -Patch65: 0065-libfdisk-fix-partition-calculation-for-BLKPG_-ioctls.patch -Patch66: 0066-libfdisk-fix-fdisk_reread_changes-for-extended-parti.patch -# 2011602 - logger from util-linux incorrectly handles long messages -Patch67: 0067-logger-fix-size-use-for-stdin.patch -# 1916151 - [RFE] spread fstrim.timer across time -Patch68: 0068-fstrim-improve-timer-setting.patch -# 1894192 - Update or backport setpriv --pdeathsig -Patch69: 0069-setpriv-implement-option-to-set-parent-death-signal.patch -# 2026511 - blkid fails to complete when targeting non-block devices -Patch70: 0070-lib-sys-add-sysfs_chrdev_devno_to_devname.patch -Patch71: 0071-libblkid-check-UBI-char-device-name.patch -Patch72: 0072-blkid-check-device-type-and-name-before-probe.patch -Patch73: 0073-blkid-don-t-print-all-devices-if-only-garbage-specif.patch -# 1950187 - Ambient capabilities failed to applied to non-root user even when correct rules are in /etc/security/capability.conf -Patch74: 0074-Complete-Linux-PAM-compliance-for-forked-child-in-su.patch -# 2058176 - losetup Retry LOOP_SET_STATUS64 on EAGAIN -Patch75: 0075-lib-loopdev-retry-LOOP_SET_STATUS64-and-LOOP_SET_BLO.patch - -### RHEL-8.7 -### -# 2060030 - Please backport patches for atari partition detection to RHEL 8 -Patch76: 0076-libblkid-fix-Atari-prober-logic.patch -Patch77: 0077-libblkid-make-Atari-more-robust.patch -Patch78: 0078-libblkid-allow-a-lot-of-mac-partitions.patch -Patch79: 0079-libblkid-limit-amount-of-parsed-partitions.patch -Patch80: 0080-libblkid-mac-make-sure-block-size-is-large-enough-fu.patch -# 2069187 - Internal testsuite for lscpu failed on aarch64 -Patch81: 0081-lscpu-don-t-read-from-HW-when-use-sys-snapshot.patch -# 2093166 - lslogins reports incorrect "Password is locked" status -Patch82: 0082-lslogins-improve-prefixes-interpretation.patch -# 2060030 - Please backport patches for atari partition detection to RHEL 8 -Patch83: 0083-tests-update-atari-blkid-tests.patch -Patch84: 0084-tests-update-atari-partx-tests.patch - -### RHEL-8.8 -### -# 2141969 - Add --cont-clock feature for libuuid and uuidd [rhel-8] -Patch85: 0085-libuuid-Implement-continuous-clock-handling-for-time.patch -Patch86: 0086-libuuid-check-clock-value-from-LIBUUID_CLOCK_FILE.patch -# 2121699 - fstrim -av fails to trim root filesystem on Red Hat Coreos -Patch87: 0087-fstrim-backport-entries-de-duplication.patch -# 2142496 - update upstream tests -Patch88: 0088-tests-don-t-reply-on-scsi_debug-partitions.patch -# 2149394 - umount outputs inaccurate error message when umount() fails with EACCES -Patch89: 0089-libmount-use-generic-error-message-for-EACCES-on-umo.patch -# 2159544 - lslogins "Password is locked" status changed in util-linux-2.32.1-38 -Patch90: 0090-lslogins-man-explain-password-statuses.patch -# 2160321 - [last] ut->ut_user is not null terminated -Patch91: 0091-last-sync-utmp-strings-use-with-upstream-code.patch -Patch92: 0092-last-use-full-size-of-the-username.patch - -### Hyperscale (1000-9999) -### -Patch1000: 1000-setpriv-add-reset-env.patch -Patch1001: 1001-losetup-avoid-infinite-busy-loop.patch -Patch1002: 1002-losetup-increase-limit-of-setup-attempts.patch -Patch1003: 1003-lib-loopdev-perform-retry-on-EAGAIN.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 libfdisk -Summary: Partitioning library for fdisk-like programs. -Group: Development/Libraries -License: LGPLv2+ -Requires: libuuid = %{version}-%{release} -Requires: libblkid = %{version}-%{release} - -%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 -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 -License: LGPLv2+ -Requires: libblkid = %{version}-%{release} -Requires: libuuid = %{version}-%{release} -Conflicts: filesystem < 3 - -%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} -Conflicts: filesystem < 3 -Requires(post): coreutils - -%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 -Conflicts: filesystem < 3 - -%description -n libuuid -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 -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 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 -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: 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 -uniqueness of time-based UUID generation even at very high rates on -SMP systems. - - -%package -n %{pypkg}-libmount -Summary: Python bindings for the libmount library -Group: Development/Libraries -Requires: libmount = %{version}-%{release} -Requires: libblkid = %{version}-%{release} -Requires: libuuid = %{version}-%{release} -License: LGPLv2+ - -%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, -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 -Sgit -n %{name}-%{upstream_version} -# Temporary hack for https://bugzilla.redhat.com/show_bug.cgi?id=1960708 -mkdir -p backported-includes/linux -sed \ - -e '/CAP_LAST_CAP/i#define CAP_CHECKPOINT_RESTORE 40' \ - -e 's/CAP_LAST_CAP.*$/CAP_LAST_CAP CAP_CHECKPOINT_RESTORE/' \ - /usr/include/linux/capability.h > backported-includes/linux/capability.h - -%build -unset LINGUAS || : - -# unfortunately, we did changes to build-system -./autogen.sh - -# if we modify .po files by RHEL patches -rm -f po/stamp* - -export CFLAGS="-I$PWD/backported-includes -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 \ - --disable-assert \ - --with-systemdsystemunitdir=%{_unitdir} \ - --disable-silent-rules \ - --disable-bfs \ - --disable-pg \ - --enable-chfn-chsh \ - --enable-usrdir-path \ - --enable-write \ - --enable-raw \ - --with-python=%{pyver} \ - --with-systemd \ - --with-udev \ - --with-selinux \ - --with-audit \ - --with-utempter \ - --disable-makeinstall-chown \ -%ifarch s390 s390x - --disable-hwclock \ - --disable-fdformat -%endif - -# build util-linux -make %{?_smp_mflags} - -%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} -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} - -# install util-linux -make install DESTDIR=${RPM_BUILD_ROOT} - -# 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 -m 644 %{SOURCE6} ${RPM_BUILD_ROOT}%{_tmpfilesdir}/uuidd.conf -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 -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a - -%ifarch %{sparc} -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, <pjones@redhat.com> . -# 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 - install -m 644 %{SOURCE12} ./su - install -m 644 %{SOURCE13} ./su-l - install -m 644 %{SOURCE14} ./runuser - install -m 644 %{SOURCE15} ./runuser-l - popd -} - -%ifnarch s390 s390x -ln -sf hwclock ${RPM_BUILD_ROOT}%{_sbindir}/clock -echo ".so man8/hwclock.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/clock.8 -%endif - -# unsupported on SPARCs -%ifarch %{sparc} -for I in /sbin/sfdisk \ - %{_mandir}/man8/sfdisk.8* \ - /sbin/cfdisk \ - %{_mandir}/man8/cfdisk.8*; do - - rm -f $RPM_BUILD_ROOT$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 - -ln -sf ../proc/self/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 - -# 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|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|uname26)\.8.*" \ - -printf "%{_mandir}/man8/%f*\n" >> %{name}.files - -%post -if [ ! -L /etc/mtab ]; then - ln -sf ../proc/self/mounts /etc/mtab || : -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 \ - /etc/blkid/blkid.tab /etc/blkid/blkid.tab.old; do - - if [ -f "$I" ]; then - mv "$I" /run/blkid/ || : - 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 || \ -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 -%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 - -%postun -n uuidd -%systemd_postun_with_restart uuidd.service - - -%files -f %{name}.files -%defattr(-,root,root) -%doc README NEWS AUTHORS -%doc Documentation/deprecated.txt -%{!?_licensedir:%global license %%doc} -%license Documentation/licenses/* -%doc misc-utils/getopt-*.{bash,tcsh} - -%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/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 -%attr(755,root,root) %{_bindir}/login -%attr(2755,root,tty) %{_bindir}/write - -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab - -%{_unitdir}/fstrim.* - -%{_bindir}/cal -%{_bindir}/chrt -%{_bindir}/col -%{_bindir}/colcrt -%{_bindir}/colrm -%{_bindir}/column -%{_bindir}/chmem -%{_bindir}/dmesg -%{_bindir}/eject -%{_bindir}/fallocate -%{_bindir}/fincore -%{_bindir}/findmnt -%{_bindir}/flock -%{_bindir}/getopt -%{_bindir}/hexdump -%{_bindir}/ionice -%{_bindir}/ipcmk -%{_bindir}/ipcrm -%{_bindir}/ipcs -%{_bindir}/isosize -%{_bindir}/kill -%{_bindir}/last -%{_bindir}/lastb -%{_bindir}/logger -%{_bindir}/look -%{_bindir}/lsblk -%{_bindir}/lscpu -%{_bindir}/lsipc -%{_bindir}/lslocks -%{_bindir}/lslogins -%{_bindir}/lsmem -%{_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}/scriptreplay -%{_bindir}/setarch -%{_bindir}/setpriv -%{_bindir}/setsid -%{_bindir}/setterm -%{_bindir}/taskset -%{_bindir}/ul -%{_bindir}/unshare -%{_bindir}/utmpdump -%{_bindir}/uuidgen -%{_bindir}/uuidparse -%{_bindir}/wall -%{_bindir}/wdctl -%{_bindir}/whereis -%{_mandir}/man1/cal.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/hexdump.1* -%{_mandir}/man1/ionice.1* -%{_mandir}/man1/ipcmk.1* -%{_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/lsipc.1* -%{_mandir}/man1/lslogins.1* -%{_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/scriptreplay.1* -%{_mandir}/man1/setpriv.1* -%{_mandir}/man1/setsid.1* -%{_mandir}/man1/setterm.1* -%{_mandir}/man1/su.1* -%{_mandir}/man1/taskset.1* -%{_mandir}/man1/ul.1* -%{_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* -%{_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* -%{_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 -%{_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 -%{_sbindir}/rfkill -%{_sbindir}/rtcwake -%{_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}/isosize -%{compldir}/last -%{compldir}/ldattach -%{compldir}/logger -%{compldir}/look -%{compldir}/losetup -%{compldir}/lsblk -%{compldir}/lscpu -%{compldir}/lsipc -%{compldir}/lslocks -%{compldir}/lslogins -%{compldir}/lsmem -%{compldir}/lsns -%{compldir}/mcookie -%{compldir}/mesg -%{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 -%{compldir}/rtcwake -%{compldir}/runuser -%{compldir}/script -%{compldir}/scriptreplay -%{compldir}/setarch -%{compldir}/setpriv -%{compldir}/setsid -%{compldir}/setterm -%{compldir}/su -%{compldir}/swaplabel -%{compldir}/swapoff -%{compldir}/swapon -%{compldir}/taskset -%{compldir}/ul -%{compldir}/unshare -%{compldir}/utmpdump -%{compldir}/uuidgen -%{compldir}/uuidparse -%{compldir}/wall -%{compldir}/wdctl -%{compldir}/whereis -%{compldir}/wipefs -%{compldir}/write -%{compldir}/zramctl - - -%ifnarch s390 s390x -%{_sbindir}/clock -%{_sbindir}/fdformat -%{_sbindir}/hwclock -%{_mandir}/man8/fdformat.8* -%{_mandir}/man8/hwclock.8* -%{_mandir}/man8/clock.8* -%{compldir}/fdformat -%{compldir}/hwclock -%endif - -%ifnarch %{sparc} -%{_sbindir}/cfdisk -%{_sbindir}/sfdisk -%{_mandir}/man8/cfdisk.8* -%{_mandir}/man8/sfdisk.8* -%{compldir}/cfdisk -%{compldir}/sfdisk -%endif - -%ifarch %{sparc} -%{_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} -%license Documentation/licenses/COPYING.GPLv2 -%{_mandir}/man8/uuidd.8* -%{_sbindir}/uuidd -%{_unitdir}/uuidd.* -%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid -%dir %attr(2775, uuidd, uuidd) /run/uuidd -%{compldir}/uuidd -%{_tmpfilesdir}/uuidd.conf - - -%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 -%{_mandir}/man3/libblkid.3* -%{_libdir}/pkgconfig/blkid.pc - - -%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* -%{_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_generate_time_safe.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 - -%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 -* Sun Apr 02 2023 Davide Cavalca <dcavalca@centosproject.org> 2.32.1-41.1 -- Merge upstream changes for Hyperscale - -* Mon Feb 13 2023 Karel Zak <kzak@redhat.com> 2.32.1-41 -- improve #2160321 - [last] ut->ut_user is not null terminated - -* Mon Feb 06 2023 Karel Zak <kzak@redhat.com> 2.32.1-40 -- fix #2121699 - fstrim -av fails to trim root filesystem on Red Hat Coreos -- fix #2142496 - update upstream tests -- fix #2149394 - umount outputs inaccurate error message when umount() fails with EACCES -- fix #2159544 - lslogins "Password is locked" status changed in util-linux-2.32.1-38 -- fix #2160321 - [last] ut->ut_user is not null terminated - -* Fri Nov 11 2022 Karel Zak <kzak@redhat.com> 2.32.1-39 -- fix #2141969 - Add --cont-clock feature for libuuid and uuidd - -* Wed Nov 02 2022 Anita Zhang <anitazha@fb.com> 2.32.1-38.1 -- Merge C8s upstream changes -- Fix 1000-setpriv-add-reset-env.patch merge conflicts - -* Mon Aug 22 2022 Karel Zak <kzak@redhat.com> 2.32.1-38 -- improve tmpfiles.d use in spec file (related to #2059241) - -* Fri Jul 15 2022 Karel Zak <kzak@redhat.com> 2.32.1-37 -- update atari partition tests (related to #2060030) - -* Thu Jul 14 2022 Karel Zak <kzak@redhat.com> 2.32.1-36 -- fix #2060030 - Please backport patches for atari partition detection to RHEL 8 -- fix #2069187 - Internal testsuite for lscpu failed on aarch64 -- fix #2093166 - lslogins reports incorrect "Password is locked" status -- fix #2059241 - rpm -V / --verify reports bad user/group/mtime for /run/uuidd -- fix #2044592 - Move /var/log/lastlog ownership to systemd - -* Tue Mar 08 2022 Karel Zak <kzak@redhat.com> 2.32.1-35 -- fix #2058176 - losetup Retry LOOP_SET_STATUS64 on EAGAIN - -* Mon Jan 17 2022 Karel Zak <kzak@redhat.com> 2.32.1-34 -- rebuild after revert - -* Mon Jan 17 2022 Karel Zak <kzak@redhat.com> 2.32.1-32 -- change bug number (#2016229 to #2041498) - -* Tue Jan 11 2022 Karel Zak <kzak@redhat.com> 2.32.1-31 -- improve #2026511 fix - blkid fails to complete when targeting non-block devices -- fix #1950187 - Ambient capabilities failed to applied to non-root user - -* Mon Jan 03 2022 Karel Zak <kzak@redhat.com> 2.32.1-30 -- update lib-sys-add-sysfs_chrdev_devno_to_devname.patch (#2026511) - -* Tue Dec 07 2021 Karel Zak <kzak@redhat.com> 2.32.1-29 -- fix #1988955 - script command continues without stopping. -- fix #2041498 - incorrect partition size calculation for BLKPG_* ioctls -- fix #2011602 - logger from util-linux incorrectly handles long messages -- fix #1916151 - [RFE] spread fstrim.timer across time -- fix #1894192 - Update or backport setpriv --pdeathsig -- fix #2026511 - blkid fails to complete when targeting non-block devices - -* Wed Oct 20 2021 Davide Cavalca <dcavalca@centosproject.org> 2.32.1-27.4 -- Backport three losetup upstream fixes: - https://github.com/karelzak/util-linux/commit/3ff6fb802de1efafbd90af228f91461691ac190c - https://github.com/karelzak/util-linux/commit/75cd5e2f281cec16c7da49b65c0f3cadd51749b8 - https://github.com/karelzak/util-linux/commit/3e03cb680668e4d47286bc7e6ab43e47bb84c989 - -* Thu Jul 08 2021 Davide Cavalca <dcavalca@centosproject.org> 2.32.1-27.3 -- Rebuild against stock libuser and openldap packages - -* Mon Jun 07 2021 Karel Zak <kzak@redhat.com> 2.32.1-28 -- fix #1906157 - after su from root to a normal user mesg is unable to show current status -- fix #1917852 - findmnt: add option to list all fs-independent flags -- fix #1922299 - throws error using /sbin/nologin: invalid option -- 'c' -- fix #1940607 - lsblk sometimes returns block devices in wrong order with --pairs -- fix #1919529 - [RFE] RHEL-8: Support option flags with mount(8) --bind -- fix #1946921 - RHEL8: mount --rbind -o rprivate doesn't do recursive bind mount - -* Fri May 14 2021 Davide Cavalca <dcavalca@fb.com> 2.32.1-27.2 -- Add CAP_CHECKPOINT_RESTORE to capability.h for setpriv (#1960708) - -* Thu Apr 15 2021 Anita Zhang <anitazha@fb.com> 2.32.1-27.1 -- Backport https://github.com/karelzak/util-linux/commit/89f95425746e0371c033260c2bc0ef176eba6a37 - for setpriv --reset-env support -- Remove FB kernel headers BuildRequires since RH kernel has them - -* Tue Jan 19 2021 Karel Zak <kzak@redhat.com> 2.32.1-27 -- update lscpu-show-physical-socket-on-aarch64-without-ACPI-P.patch (#1882740) - -* Wed Dec 16 2020 Karel Zak <kzak@redhat.com> 2.32.1-26 -- update regression tests (related to #1900498) - -* Wed Dec 16 2020 Karel Zak <kzak@redhat.com> 2.32.1-25 -- fix #1884194 - RHEL-8: chrt command does not support the -R option -- fix #1855759 - mount.8: clarify (no)suid behavior on file capabilities -- fix #1861670 - lsblk can not show serial information for virtio disk -- fix #1883783 - lscpu: avoid segfault on PowerPC systems with valid hardware configurations -- fix #1900498 - libfdisk/libmount: backport two patches for upstream systemd -- fix #1883056 - lscpu support for Fujitsu A64FX -- fix #1882740 - lscpu: use SMBIOS Type 4 strings for CPU vendor and model on ARM - -* Wed Jul 22 2020 Davide Cavalca <dcavalca@fb.com> 2.32.1-24.fb1 -- Facebook rebuild -- Build against more recent kernel headers to properly support new - BPF capabilities - -* Fri Jun 26 2020 Karel Zak <kzak@redhat.com> 2.32.1-24 -- fix #1848919 - Update losetup man page to fix "--direct-io" defaults - -* Thu Jun 11 2020 Karel Zak <kzak@redhat.com> 2.32.1-23 -- fix #1826251 - remove MD metadata 0.90 based tests from util-linux CI -- fix #1812576 - RFE: Bitlocker detection for RHEL 8.3 -- fix #1817726 - add libblkid BLOCK_SIZE -- fix #1803753 - RHEL-8: col struct char_str c_column field should be of unsigned type and/or larger than 16 bit -- fix #1812118 - mount -a always tries to mount smb3 share subdir despite being already mounted -- fix #1824727 - util-linux: Include python3-libmount package in the release -- fix #1829245 - mount -a tries to mount already mounted cifs shares when we cannot query up to root dir - -* Tue Dec 17 2019 Karel Zak <kzak@redhat.com> 2.32.1-22 -- improve CI tests portability to rhel-8 kernel - -* Tue Dec 17 2019 Karel Zak <kzak@redhat.com> 2.32.1-21 -- add git to BuildRequires due to autosetup -Sgit - -* Tue Dec 17 2019 Karel Zak <kzak@redhat.com> 2.32.1-20 -- fix spec file typo - -* Tue Dec 17 2019 Karel Zak <kzak@redhat.com> 2.32.1-19 -- fix test for #1739443 - -* Mon Dec 16 2019 Karel Zak <kzak@redhat.com> 2.32.1-18 -- fix #1739443 - lscpu reports wrong hypervisor in nested virt on s390x -- fix #1743555 - command chfn adds some useless commas with GECOS information into /etc/password - -* Sat Sep 21 2019 Karel Zak <kzak@redhat.com> 2.32.1-17 -- fix error path in mountinfo patch (#1751447) - -* Fri Sep 20 2019 Karel Zak <kzak@redhat.com> 2.32.1-16 -- cleanup mountinfo libmount patch (#1751447) - -* Mon Sep 16 2019 Karel Zak <kzak@redhat.com> 2.32.1-15 -- fix #1751447 - improve /proc/self/mountinfo reliability - -* Tue Sep 03 2019 Karel Zak <kzak@redhat.com> 2.32.1-14 -- fix #1739179 - partx failed on nvme devices with exit code 1 - -* Mon Aug 05 2019 Karel Zak <kzak@redhat.com> 2.32.1-13 -- fix #1734553 - blkid_get_dev() leak file descriptor to underlying block device -- fix #1719069 - findmnt warning "recommended root FS passno is 1" for XFS - -* Tue Jul 30 2019 Karel Zak <kzak@redhat.com> 2.32.1-12 -- fix #1732769 - lscpu not showing Physical socket, chips information - -* Tue Jun 04 2019 Karel Zak <kzak@redhat.com> 2.32.1-11 -- fix #1681062 - improve loopdev use in gating tests - -* Mon Jun 03 2019 Karel Zak <kzak@redhat.com> 2.32.1-10 -- fix #1699310 - rpm -V setup fail on /var/log/lastlog -- fix #1702712 - pam_env bypassed for root user when using su - -* Tue Mar 05 2019 Karel Zak <kzak@redhat.com> 2.32.1-9 -- fix #1681062 - implement gating tests - -* Tue Dec 11 2018 Karel Zak <kzak@redhat.com> 2.32.1-8 -- fix #1658206 - improve dependence between subpackages - -* Tue Dec 11 2018 Karel Zak <kzak@redhat.com> 2.32.1-7 -- fix #1656437 - Failing tests from testsuite -- fix #1653781 - unable to umount by loop backing file -- fix #1655650 - RHEL8.0 - fdisk -l shows the conflicting partitions name for the mpath -- fix #1653413 - blkid: add --no-part-details to not return metadata from empty partitions - -* Tue Sep 04 2018 Karel Zak <kzak@redhat.com> 2.32.1-6 -- fix #1624877 - libuuid: name-based UUIDs are not compatible with RFC4122 - -* Mon Aug 13 2018 Karel Zak <kzak@redhat.com> 2.32.1-5 -- fix #1614967 - Lslogins doesn't fail with nonexisting username -- cleanup patches list - -* Fri Aug 10 2018 Karel Zak <kzak@redhat.com> 2.32.1-4 -- fix #1614364 - losetup: /dev/loop1: failed to set up loop device -- fix #1614852 - mount man page says sync option has no effect for ext4 -- fix #1614843 - Man page of logger is missing -S option - -* Wed Aug 08 2018 Karel Zak <kzak@redhat.com> 2.32.1-3 -- refresh lastlog patch -- fix #1595882 - wipefs should erase also secondary LUKSv2 header - -* Thu Aug 2 2018 Karel Zak <kzak@redhat.com> - 2.32.1-2 -* rebuild to verify build flags - -* Tue Jul 17 2018 Karel Zak <kzak@redhat.com> - 2.32.1-1 -- upgrade to v2.32.1 - http://www.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32.1-ReleaseNotes - -* Tue Jun 12 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.32-4 -- Build only the python3 bindings - -* Thu May 24 2018 Karel Zak <kzak@redhat.com> - 2.32-3 -- sync spec file with Fedora -- move /etc/adjtime config from initscripts to util-linux -- fix #1560642 - uuidd.service does not start -- remove unused build option --enable-libmount-force-mountinfo (it's default now) -- disable assert code - -* Tue Mar 27 2018 Karel Zak <kzak@redhat.com> - 2.32-2 -- fix #1560283 - column does not properly handle spaces at beginning of tab-separated table columns - -* Wed Mar 21 2018 Karel Zak <kzak@redhat.com> - 2.32-1 -- upgrade to v2.32 - -* Tue Feb 20 2018 Karel Zak <kzak@redhat.com> - 2.32-0.2 -- add BuildRequires gcc - -* Tue Feb 13 2018 Karel Zak <kzak@redhat.com> - 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 <releng@fedoraproject.org> - 2.31-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 2.31-4 -- Rebuilt for switch to libxcrypt - -* Wed Jan 03 2018 Lumír Balhar <lbalhar@redhat.com> - 2.31-3 -- Fix directory ownership in python subpackage - -* Mon Oct 30 2017 Karel Zak <kzak@redhat.com> - 2.31-2 -- fix dmesg for multi-line records - -* Mon Oct 23 2017 Karel Zak <kzak@redhat.com> - 2.31-1 -- upgrade to final v2.31 -- move rfkill to sbin (for backward compatibility) - -* Mon Oct 9 2017 Karel Zak <kzak@redhat.com> - 2.31-0.4 -- fix build error - -* Mon Oct 9 2017 Karel Zak <kzak@redhat.com> - 2.31-0.3 -- upgrade to v2.31-rc2 -- enable rfkill - -* Mon Sep 25 2017 Karel Zak <kzak@redhat.com> - 2.31-0.2 -- temporary disable rfkill (fix #1494855) - -* Fri Sep 22 2017 Karel Zak <kzak@redhat.com> - 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 <kzak@redhat.com> - 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 <kzak@redhat.com> - 2.30.1-5 -- make ln-s usage more robust - -* Fri Aug 4 2017 Karel Zak <kzak@redhat.com> - 2.30.1-4 -- fix post install script - -* Wed Aug 2 2017 Karel Zak <kzak@redhat.com> - 2.30.1-3 -- fix #1390191 - systemd read-only container produces errors - -* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.30.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jul 20 2017 Karel Zak <kzak@redhat.com> - 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 <kzak@redhat.com> - 2.30-1 -- upgrade to v2.30 - -* Wed May 17 2017 Karel Zak <kzak@redhat.com> - 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 <kzak@redhat.com> - 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 <releng@fedoraproject.org> - 2.29.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 20 2017 Karel Zak <kzak@redhat.com> - 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 <mhroncok@redhat.com> - 2.29-2 -- Rebuild for Python 3.6 - -* Tue Nov 8 2016 Karel Zak <kzak@redhat.com> - 2.29-1 -- upgrade to v2.29 - -* Wed Oct 19 2016 Karel Zak <kzak@redhat.com> - 2.29-0.2 -- upgrade to v2.29-rc2 - -* Fri Sep 30 2016 Karel Zak <kzak@redhat.com> - 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 <kzak@redhat.com> - 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 <kzak@redhat.com> - 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 <rel-eng@lists.fedoraproject.org> - 2.28-4 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Mon Jun 13 2016 Karel Zak <kzak@redhat.com> - 2.28-3 -- fix #1234317 - CD / DVD are rarely automounted - -* Tue Apr 26 2016 Karel Zak <kzak@redhat.com> - 2.28-2 -- refresh login-lastlog-create.patch - -* Tue Apr 12 2016 Karel Zak <kzak@redhat.com> - 2.28-1 -- upgrade to stable v2.28 - -* Wed Mar 30 2016 Karel Zak <kzak@redhat.com> - 2.28-0.3 -- fix libblkid - -* Tue Mar 29 2016 Karel Zak <kzak@redhat.com> - 2.28-0.2 -- upgrade to v2.28-rc2 - -* Tue Mar 22 2016 Karel Zak <kzak@redhat.com> - 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 <releng@fedoraproject.org> - 2.27.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 18 2016 Karel Zak <kzak@redhat.com> - 2.27.1-4 -- fix #1299255 - boot.iso (from 20160117 Rawhide compose) incorrectly detected as minix FS - -* Wed Nov 18 2015 Karel Zak <kzak@redhat.com> - 2.27.1-3 -- fix #1259745 - Can't start installation in Rawhide or F23 recent development images - -* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.27.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 - -* Mon Nov 2 2015 Karel Zak <kzak@redhat.com> - 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 <kzak@redhat.com> - 2.27 -- upgrade to v2.27 - -* Mon Aug 24 2015 Karel Zak <kzak@redhat.com> - 2.27-0.4 -- upgrade to v2.27-rc2 - -* Thu Aug 13 2015 Karel Zak <kzak@redhat.com> - 2.27-0.3 -- improve version usage in source url - -* Wed Aug 12 2015 Karel Zak <kzak@redhat.com> - 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 <kzak@redhat.com> - 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 <kzak@redhat.com> - 2.26.2-3 -- fix dates in the spec file - -* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.26.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Apr 30 2015 Karel Zak <kzak@redhat.com> - 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 <opensource@till.name> - 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 <kzak@redhat.com> 2.26-1 -- upgrade to stable release 2.26 - -* Tue Feb 10 2015 Karel Zak <kzak@redhat.com> 2.26-0.4 -- fix setarch build on PPC - -* Thu Feb 5 2015 Karel Zak <kzak@redhat.com> 2.26-0.3 -- upgrade to 2.26-rc2 - -* Fri Jan 16 2015 Karel Zak <kzak@redhat.com> 2.26-0.2 -- fix 1182778 - remount causes ro / and /home on boot - -* Thu Jan 15 2015 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.25.2-2 -- fix #1168490 - CVE-2014-9114 util-linux: command injection flaw in blkid - -* Fri Oct 24 2014 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 2.25-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Wed Aug 6 2014 Tom Callaway <spot@fedoraproject.org> 2.25-3 -- fix license handling - -* Thu Jul 24 2014 Karel Zak <kzak@redhat.com> 2.25-2 -- remove fstrim unit files from uuidd subpackage - -* Tue Jul 22 2014 Karel Zak <kzak@redhat.com> 2.25-1 -- upgrade to stable release 2.25 - -* Wed Jul 02 2014 Karel Zak <kzak@redhat.com> 2.25-0.3 -- upgrade to release 2.25-rc2 - -* Wed Jun 25 2014 Peter Jones <pjones@redhat.com> - 2.25-0.2 -- Fix libblkid's squashfs probe return checking. - Related: rhbz#1112315 - -* Thu Jun 19 2014 Karel Zak <kzak@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 2.24.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 2.24.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 - -* Mon May 12 2014 Karel Zak <kzak@redhat.com> 2.24.2-4 -- fix #1094935 - script and/or trigger should not directly enable systemd units - -* Mon May 12 2014 Karel Zak <kzak@redhat.com> 2.24.2-3 -- fix #1090638 - remove pam_securetty.so from .pamd files - -* Wed May 7 2014 Karel Zak <kzak@redhat.com> 2.24.2-2 -- use systemd macroized scriptlets (#850355) - -* Thu Apr 24 2014 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.24.1-2 -- use rpm autosetup - -* Mon Jan 20 2014 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.24-2 -- fix #1031262 - lsblk -D segfault - -* Wed Oct 23 2013 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.24-0.1 -- upgrade to upstream release v2.24-rc1 -- add python3 libmount binding - -* Mon Sep 9 2013 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.23.2-2 -- fix 990083 - su doesn't work with pam_ecryptfs - -* Wed Jul 31 2013 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.23.1-3 -- fix #972457 - agetty idle I/O polling causes elevated CPU usage - -* Wed Jun 5 2013 Karel Zak <kzak@redhat.com> 2.23.1-2 -- fix #962145 - in.telnetd immediately closes connection - -* Tue May 28 2013 Karel Zak <kzak@redhat.com> 2.23.1-1 -- upgrade to 2.23.1 -- backport agetty --local-line path - -* Thu Apr 25 2013 Karel Zak <kzak@redhat.com> 2.23-1 -- upgrade to 2.23 -- add --with check to call make check - -* Mon Apr 15 2013 Karel Zak <kzak@redhat.com> 2.23-0.7 -- remove unused patches - -* Mon Apr 15 2013 Karel Zak <kzak@redhat.com> 2.23-0.6 -- remove floppy from util-linux - -* Fri Apr 12 2013 Karel Zak <kzak@redhat.com> 2.23-0.5 -- fix #948274 - interruption code 0x4003B in libmount.so.1.1.0 - -* Wed Apr 10 2013 Karel Zak <kzak@redhat.com> 2.23-0.4 -- upgrade to the release 2.23-rc2 - -* Wed Mar 27 2013 Karel Zak <kzak@redhat.com> 2.23-0.3 -- libblkid ntfs bugfix for build on s390 - -* Wed Mar 27 2013 Karel Zak <kzak@redhat.com> 2.23-0.2 -- add upstream patches for to fix umount and mount.<type> - -* Fri Mar 22 2013 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.22.2-6 -- fix #912778 - "runuser -l" doesn't register session to systemd - -* Tue Feb 19 2013 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.22.2-4 -- improve convertion to mtab symlink in post script -- spec file cleanup (based on #894199) - -* Sun Feb 3 2013 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.22.2-2 -- fix #889888 - wipefs does not completely wipe btrfs volume - -* Thu Dec 13 2012 Karel Zak <kzak@redhat.com> 2.22.2-1 -- upgrade to upstream maintenance release 2.22.2 - -* Mon Nov 19 2012 Karel Zak <kzak@redhat.com> 2.22.1-5 -- sources cleanup - -* Fri Nov 16 2012 Karel Zak <kzak@redhat.com> 2.22.1-4 -- fix #872787 - su: COMMAND not specified - -* Thu Nov 1 2012 Karel Zak <kzak@redhat.com> 2.22.1-3 -- backport upstream runuser(1) -- enable su(1) - -* Thu Nov 1 2012 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.22.1-1 -- upgrade to the release 2.22.1 - -* Wed Oct 3 2012 Karel Zak <kzak@redhat.com> 2.22-2 -- remove obsolete references to e2fsprogs - -* Thu Sep 6 2012 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 2.21.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Wed Jun 13 2012 Karel Zak <kzak@redhat.com> 2.21.2-2 -- replace udev dependenceis with systemd - -* Fri May 25 2012 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.21.1-1 -- upgrade to bugfix release 2.21.1 - -* Fri Feb 24 2012 Karel Zak <kzak@redhat.com> 2.21-1 -- upgrade to release 2.21 - -* Thu Feb 09 2012 Karel Zak <kzak@redhat.com> 2.21-0.2 -- fix #788703 - /run/blkid does not exist - -* Tue Feb 07 2012 Karel Zak <kzak@redhat.com> 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 <harald@redhat.com> 2.20.1-5 -- install everything in /usr - https://fedoraproject.org/wiki/Features/UsrMove - -* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Nov 22 2011 Karel Zak <kzak@redhat.com> 2.20.1-3 -- fix #748216 - util-linux requires pam >= 1.1.3-7 -- remove ddate(1) - -* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20.1-2 -- Rebuilt for glibc bug#747377 - -* Thu Oct 20 2011 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.20-1 -- upgrade to the release 2.20 - -* Wed Aug 17 2011 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.19-0.6 -- fix #665062 - add support for the postlogin PAM stack to util-linux-ng - -* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.19-0.5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.19-0.2 -- clean up specfile (review #667416) - -* Wed Jan 5 2011 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.18-4 -- fix #623685 - please extend agetty to not require a baud rate to be specified - -* Thu Aug 5 2010 Karel Zak <kzak@redhat.com> 2.18-3 -- fix #620924 - /sbin/mount.tmpfs uses not available /usr/bin/id - -* Mon Aug 2 2010 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.17.1-2 -- fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) - -* Mon Feb 22 2010 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.17.1-0.1 -- upgrade to 2.17.1-rc1 - -* Tue Feb 16 2010 Karel Zak <kzak@redhat.com> 2.17-4 -- fix uuidd init script - -* Fri Feb 12 2010 Karel Zak <kzak@redhat.com> 2.17-3 -- fix #541402 - uuidd initscript lsb compliance - -* Fri Jan 8 2010 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.17-0.6 -- minor fixes in spec file (fix URL, add Requires, add LGPLv2+) - -* Wed Dec 9 2009 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.17-0.4 -- add clock.8 man page (manlink to hwclock) -- add --help to mount.tmpfs - -* Mon Nov 23 2009 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.16-13 -- fix spec file - -* Fri Oct 2 2009 Karel Zak <kzak@redhat.com> 2.16-12 -- release++ - -* Thu Oct 1 2009 Karel Zak <kzak@redhat.com> 2.16-11 -- fix #519237 - bash: cannot set terminal process group (-1): Inappropriate ioctl for device - -* Wed Sep 16 2009 Tomas Mraz <tmraz@redhat.com> - 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 <kzak@redhat.com> 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 <tmraz@redhat.com> - 2.16-8 -- rebuilt with new audit - -* Sun Aug 23 2009 Karel Zak <kzak@redhat.com> 2.16-7 -- fix #518572 - blkid requires ext2.ko to be decompressed on installation media - -* Thu Aug 13 2009 Karel Zak <kzak@redhat.com> 2.16-5 -- fix #513104 - blkid returns no fstype for ext2 device when ext2 module not loaded - -* Wed Aug 5 2009 Stepan Kasal <skasal@redhat.com> 2.16-4 -- set conflict with versions of e2fsprogs containing fsck - -* Thu Jul 30 2009 Karel Zak <kzak@redhat.com> 2.16-3 -- remove the mount.conf support (see #214891) - -* Mon Jul 27 2009 Karel Zak <kzak@redhat.com> 2.16-2 -- fix #214891 - add mount.conf and MTAB_LOCK_DIR= option - -* Sat Jul 25 2009 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.15.1-1 -- upgrade to 2.15.1 - -* Mon Jun 8 2009 Karel Zak <kzak@redhat.com> 2.15.1-0.2 -- set BuildRequires: e2fsprogs-devel -- add Requires: e2fsprogs-devel to libblkid-devel - -* Thu Jun 4 2009 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.14.2-8 -- fix #490769 - post scriptlet failed (thanks to Dan Horak) - -* Fri Mar 20 2009 Karel Zak <kzak@redhat.com> 2.14.2-7 -- fix some nits in mount.tmpfs - -* Fri Mar 20 2009 Karel Zak <kzak@redhat.com> 2.14.2-6 -- fix #491175 - mount of tmpfs FSs fail at boot - -* Thu Mar 19 2009 Karel Zak <kzak@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 2.14.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Feb 20 2009 Karel Zak <kzak@redhat.com> 2.14.2-3 -- add -r option to dmesg(1) - -* Mon Feb 9 2009 Karel Zak <kzak@redhat.com> 2.14.2-2 -- fix typo in spec file - -* Mon Feb 9 2009 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.14.2-0.1 -- upgrade to 2.14.2-rc1 -- refresh old patches - -* Fri Nov 21 2008 Karel Zak <kzak@redhat.com> 2.14.1-5 -- fix #472502 - problem with fdisk and use +sectors for the end of partition - -* Mon Oct 6 2008 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.14.1-2 -- remove obsolete pam-console support - -* Wed Sep 10 2008 Karel Zak <kzak@redhat.com> 2.14.1-1 -- upgrade to stable 2.14.1 - -* Thu Aug 14 2008 Karel Zak <kzak@redhat.com> 2.14.1-0.1 -- upgrade to 2.14.1-rc1 -- refresh old patches - -* Thu Jul 24 2008 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.14-2 -- fix #390691 - mount should check selinux context on mount, and warn on file_t - -* Mon Jun 9 2008 Karel Zak <kzak@redhat.com> 2.14-1 -- upgrade to stable util-linux-ng release - -* Mon May 19 2008 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13.1-9 -- fix audit log injection attack via login - -* Thu Apr 17 2008 Karel Zak <kzak@redhat.com> 2.13.1-8 -- fix location of the command raw(8) - -* Tue Apr 15 2008 Karel Zak <kzak@redhat.com> 2.13.1-7 -- fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND - -* Wed Apr 2 2008 Karel Zak <kzak@redhat.com> 2.13.1-6 -- fix 439984 - backport mkswap -U - -* Wed Mar 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.13.1-5 -- clean up sparc conditionals - -* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.13.1-4 -- Autorebuild for GCC 4.3 - -* Mon Jan 28 2008 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13.1-2 -- update to upstream 2.13.1-rc2 - -* Wed Dec 12 2007 Dan Walsh <dwalsh@redhat.com> 2.13.1-1 -- Fix pam files so that pam_keyinit happens after pam_selinux.so - -* Wed Dec 12 2007 Karel Zak <kzak@redhat.com> 2.13.1-0.2 -- remove viwp and vigr (in favour of shadow-utils) - -* Sun Dec 9 2007 Karel Zak <kzak@redhat.com> 2.13.1-0.1 -- update to the latest upstream stable branch - (commit: fda9d11739ee88c3b2f22a73f12ec019bd3b8335) - -* Wed Oct 31 2007 Karel Zak <kzak@redhat.com> 2.13-4 -- fix #354791 - blockdev command calls the blkpg ioctl with a wrong data structure - -* Tue Oct 16 2007 Karel Zak <kzak@redhat.com> 2.13-3 -- fix mount -L | -U segfault -- fix script die on SIGWINCH - -* Thu Oct 4 2007 Karel Zak <kzak@redhat.com> 2.13-2 -- update to the latest upstream stable branch - -* Tue Aug 28 2007 Karel Zak <kzak@redhat.com> 2.13-1 -- upgrade to stable util-linux-ng release - -* Fri Aug 24 2007 Karel Zak <kzak@redhat.com> 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 <jkeating@redhat.com> 2.13-0.58 -- Obsolete a sufficiently high enough version of setarch - -* Mon Aug 20 2007 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.56 -- fix obsoletes field - -* Mon Aug 20 2007 Karel Zak <kzak@redhat.com> 2.13-0.55 -- util-linux-ng includes setarch(1), define relevat Obsoletes+Provides - -* Mon Aug 20 2007 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.53 -- fix #252046 - review Request: util-linux-ng (util-linux replacement) - -* Mon Aug 13 2007 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <davidz@redhat.com> 2.13-0.50 -- include ConsoleKit session module by default (#229172) - -* Thu Jan 11 2007 Karel Zak <kzak@redhat.com> 2.13-0.49 -- fix #222293 - undocumented partx,addpart, delpart - -* Sun Dec 17 2006 Karel Zak <kzak@redhat.com> 2.13-0.48 -- fix paths in po/Makefile.in.in - -* Fri Dec 15 2006 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.46 -- fix leaking file descriptor in the more command (patch by Steve Grubb) - -* Wed Dec 13 2006 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <jkeating@redhat.com> - 2.13-0.43 -- rebuilt for unwind info generation, broken in gcc-4.1.1-21 - -* Wed Sep 20 2006 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.39 -- fix #199745 - non-existant simpleinit(8) mentioned in ctrlaltdel(8) - -* Thu Aug 10 2006 Dan Walsh <dwalsh@redhat.com> 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 <kzak@redhat.com> 2.13-0.37 -- fix #176494 - last -i returns strange IP addresses (patch by Bill Nottingham) - -* Thu Jul 27 2006 Karel Zak <kzak@redhat.com> 2.13-0.36 -- fix #198300, #199557 - util-linux "post" scriptlet failure - -* Thu Jul 27 2006 Steve Dickson <steved@redhat.com> 2.13-0.35 -- Added the -o fsc flag to nfsmount. - -* Wed Jul 26 2006 Karel Zak <kzak@redhat.com> 2.13-0.34 -- rebuild - -* Tue Jul 18 2006 Karel Zak <kzak@redhat.com> 2.13-0.33 -- add Requires(post): libselinux - -* Mon Jul 17 2006 Karel Zak <kzak@redhat.com> 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 <jkeating@redhat.com> - 2.13-0.31.1 -- rebuild - -* Tue Jul 11 2006 Karel Zak <kzak@redhat.com> 2.13-0.31 -- cleanup dependences for post and preun scriptlets - -* Mon Jul 10 2006 Karsten Hopp <karsten@redhat.de> 2.13-0.30 -- silence install in minimal buildroot without /var/log - -* Fri Jul 7 2006 Karel Zak <kzak@redhat.com> 2.13-0.29 -- include the raw command for RHELs - -* Mon Jun 26 2006 Florian La Roche <laroche@redhat.com> 2.13-0.28 -- move install-info parts from postun to preun - -* Wed Jun 21 2006 Dan Walsh <dwalsh@RedHat.com> 2.13-0.27 -- Only execute chcon on machines with selinux enabled - -* Wed Jun 14 2006 Steve Dickson <steved@redhat.com> 2.13-0.26 -- Remove unneeded header files from nfsmount.c - -* Mon Jun 12 2006 Karel Zak <kzak@redhat.com> 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 <dwalsh@RedHat.com> 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 <steved@redhat.com> 2.13-0.23 -- Fixed bug in patch for bz183713 which cause nfs4 mounts to fail. - -* Tue May 2 2006 Steve Dickson <steved@redhat.com> 2.13-0.22 -- Added syslog logging to background mounts as suggested - by a customer. - -* Mon May 1 2006 Steve Dickson <steved@redhat.com> 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 <jkeating@redhat.com> 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 <jkeating@redhat.com> 2.13-0.19 -- restorecon /var/log/lastlog - -* Wed Mar 8 2006 Karel Zak <kzak@redhat.com> 2.13-0.17 -- fix #181782 - mkswap selinux relabeling (fix util-linux-2.13-mkswap-selinux.patch) - -* Wed Feb 22 2006 Karel Zak <kzak@redhat.com> 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 <jkeating@redhat.com> - 2.13-0.15.1 -- bump again for double-long bug on ppc(64) - -* Wed Feb 8 2006 Peter Jones <pjones@redhat.com> 2.13-0.15 -- add "blockdev --rmpart N <device>" and "blockdev --rmparts <device>" - -* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.13-0.14.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Thu Jan 19 2006 Steve Dickson <steved@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.12 -- rebuilt - -* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> -- rebuilt - -* Fri Nov 25 2005 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.10.pre5 -- fix #171337 - mkfs.cramfs doesn't work correctly with empty files - -* Fri Oct 28 2005 Karel Zak <kzak@redhat.com> 2.13-0.9.pre5 -- rebuild - -* Wed Oct 26 2005 Karel Zak <kzak@redhat.com> 2.13-0.8.pre5 -- updated version of the patch for hwclock audit - -* Thu Oct 20 2005 Karel Zak <kzak@redhat.com> 2.13-0.7.pre5 -- fix #171337 - mkfs.cramfs dies creating installer image - -* Thu Oct 20 2005 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.13-0.5.pre4 -* fix #170564 - add audit message to login - -* Fri Oct 7 2005 Karel Zak <kzak@redhat.com> 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 <steved@redhat.com> 2.13-0.3.pre3 -- fix #170110 - Documentation for 'rsize' and 'wsize' NFS mount options - is misleading - -* Fri Sep 2 2005 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <kzak@redhat.com> 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 <katzj@redhat.com> - 2.12p-9.3 -- rebuild against new libe2fsprogs (and libblkid) to fix cramfs auto-detection - -* Mon May 2 2005 Karel Zak <kzak@redhat.com> 2.12p-9.2 -- rebuild - -* Mon May 2 2005 Karel Zak <kzak@redhat.com> 2.12p-9 -- fix #156597 - look - doesn't work with separators - -* Mon Apr 25 2005 Karel Zak <kzak@redhat.com> 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 <kzak@redhat.com> 2.12p-7 -- enable build with libblkid from e2fsprogs-devel -- remove workaround for duplicated labels - -* Thu Mar 31 2005 Steve Dickson <SteveD@RedHat.com> 2.12p-5 -- Fixed nfs mount to rollback correctly. - -* Fri Mar 25 2005 Karel Zak <kzak@redhat.com> 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 <sopwith@redhat.com> 2.12p-3 -- rebuilt - -* Fri Feb 25 2005 Steve Dickson <SteveD@RedHat.com> 2.12p-2 -- Changed nfsmount to only use reserve ports when necessary - (bz# 141773) - -* Thu Dec 23 2004 Elliot Lee <sopwith@redhat.com> 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 <sopwith@redhat.com> 2.12j-1 -- Update to util-linux-2.12j - -* Tue Dec 7 2004 Steve Dickson <SteveD@RedHat.com> 2.12a-20 -- Corrected a buffer overflow problem with nfs mounts. - (bz# 141733) - -* Wed Dec 01 2004 Elliot Lee <sopwith@redhat.com> 2.12a-19 -- Patches for various bugs. - -* Mon Nov 29 2004 Steve Dickson <SteveD@RedHat.com> 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 <sopwith@redhat.com> 2.12a-16 -- Add include_raw macro, build with it off for Fedora - -* Wed Oct 13 2004 Stephen C. Tweedie <sct@redhat.com> - 2.12a-15 -- Add raw patch to allow binding of devices not yet in /dev - -* Wed Oct 13 2004 John (J5) Palmieri <johnp@redhat.com> 2.12a-14 -- Add David Zeuthen's patch to enable the pamconsole flag #133941 - -* Wed Oct 13 2004 Stephen C. Tweedie <sct@redhat.com> 2.12a-13 -- Restore raw utils (bugzilla #130016) - -* Mon Oct 11 2004 Phil Knirsch <pknirsch@redhat.com> 2.12a-12 -- Add the missing remote entry in pam.d - -* Wed Oct 6 2004 Steve Dickson <SteveD@RedHat.com> -- Rechecked in some missing NFS mounting code. - -* Wed Sep 29 2004 Elliot Lee <sopwith@redhat.com> 2.12a-10 -- Make swaplabel support work with swapon -a -e - -* Tue Sep 28 2004 Steve Dickson <SteveD@RedHat.com> -- 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 <nalin@redhat.com> 2.12a-8 -- Fix #132196 - turn on SELinux support at build-time. - -* Wed Sep 15 2004 Phil Knirsch <pknirsch@redhat.com> 2.12a-7 -- Fix #91174 with pamstart.patch - -* Tue Aug 31 2004 Elliot Lee <sopwith@redhat.com> 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 <SteveD@RedHat.com> -- Made the NFS security checks more explicit to avoid confusion - (an upstream fix) -- Also removed a compilation warning - -* Wed Aug 11 2004 Alasdair Kergon <agk@redhat.com> -- Remove unused mount libdevmapper inclusion. - -* Wed Aug 11 2004 Alasdair Kergon <agk@redhat.com> -- 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 <SteveD@RedHat.com> -- Updated nfs man page to show that intr are on by - default for nfs4 - -* Thu Aug 05 2004 Jindrich Novy <jnovy@redhat.com> -- modified warning causing heart attack for >16 partitions, #107824 - -* Fri Jul 09 2004 Elliot Lee <sopwith@redhat.com> 2.12a-3 -- Fix #126623, #126572 -- Patch cleanup -- Remove agetty (use mgetty, agetty is broken) - -* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com> -- rebuilt - -* Thu Jun 03 2004 Elliot Lee <sopwith@redhat.com> 2.12a-1 -- Update to 2.12a -- Fix #122448 - -* Thu May 13 2004 Dan Walsh <dwalsh@RedHat.com> 2.12-19 -- Change pam_selinux to run last - -* Tue May 04 2004 Elliot Lee <sopwith@redhat.com> 2.12-18 -- Fix #122448 (autofs issues) - -* Fri Apr 23 2004 Elliot Lee <sopwith@redhat.com> 2.12-17 -- Fix #119157 by editing the patch -- Add patch145 to fix #119986 - -* Fri Apr 16 2004 Elliot Lee <sopwith@redhat.com> 2.12-16 -- Fix #118803 - -* Tue Mar 23 2004 Jeremy Katz <katzj@redhat.com> 2.12-15 -- mkcramfs: use PAGE_SIZE for default blocksize (#118681) - -* Sat Mar 20 2004 <SteveD@RedHat.com> -- 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 <dwalsh@RedHat.com> 2.12-13 -- Fix selinux ordering or pam for login - -* Tue Mar 16 2004 <SteveD@RedHat.com> -- 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 <SteveD@RedHat.com> -- 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 <SteveD@RedHat.com> -- Added two checks to the nfs4 path what will print warnings - when rpc.idmapd and rpc.gssd are not running. - -* Thu Mar 11 2004 <SteveD@RedHat.com> -- Reworked and updated the nfsv4 patches. - -* Wed Mar 10 2004 Dan Walsh <dwalsh@RedHat.com> -- Bump version - -* Wed Mar 10 2004 Steve Dickson <SteveD@RedHat.com> -- Tried to make nfs error message a bit more meaninful -- Cleaned up some warnings - -* Sun Mar 7 2004 Steve Dickson <SteveD@RedHat.com> -- Added pesudo flavors for nfsv4 mounts. -- Added BuildRequires: libselinux-devel and Requires: libselinux - when WITH_SELINUX is set. - -* Fri Feb 27 2004 Dan Walsh <dwalsh@redhat.com> 2.12-5 -- check for 2.6.3 kernel in mount options - -* Mon Feb 23 2004 Elliot Lee <sopwith@redhat.com> 2.12-4 -- Remove /bin/kill for #116100 - -* Fri Feb 20 2004 Dan Walsh <dwalsh@redhat.com> 2.12-3 -- rebuilt - -* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> -- rebuilt - -* Thu Feb 12 2004 Elliot Lee <sopwith@redhat.com> 2.12-1 -- Final 2.12 has been out for ages - might as well use it. - -* Wed Jan 28 2004 Steve Dickson <SteveD@RedHat.com> 2.12pre-4 -- Added mount patches that have NFS version 4 support - -* Mon Jan 26 2004 Elliot Lee <sopwith@redhat.com> 2.12pre-3 -- Provides: mount losetup - -* Mon Jan 26 2004 Dan Walsh <dwalsh@redhat.com> 2.12pre-2 -- Add multiple to /etc/pam.d/login for SELinux - -* Thu Jan 15 2004 Elliot Lee <sopwith@redhat.com> 2.12pre-1 -- 2.12pre-1 -- Merge mount/losetup packages into the main package (#112324) -- Lose separate - -* Mon Nov 3 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-35.sel -- remove selinux code from login and use pam_selinux - -* Thu Oct 30 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-34.sel -- turn on selinux - -* Fri Oct 24 2003 Elliot Lee <sopwith@redhat.com> 2.11y-34 -- Add BuildRequires: texinfo (from a bug# I don't remember) -- Fix #90588 with mountman patch142. - -* Mon Oct 6 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-33 -- turn off selinux - -* Thu Sep 25 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-32.sel -- turn on selinux -- remove context selection - -* Fri Sep 19 2003 Elliot Lee <sopwith@redhat.com> 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 <dwalsh@redhat.com> 2.11y-31 -- turn off selinux - -* Fri Sep 12 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-30.sel -- turn on selinux - -* Fri Sep 5 2003 Elliot Lee <sopwith@redhat.com> 2.11y-28 -- Fix #103004, #103954 - -* Fri Sep 5 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-27 -- turn off selinux - -* Thu Sep 4 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-26.sel -- build with selinux - -* Mon Aug 11 2003 Elliot Lee <sopwith@redhat.com> 2.11y-25 -- Use urandom instead for mkcramfs - -* Tue Jul 29 2003 Dan Walsh <dwalsh@redhat.com> 2.11y-24 -- add SELINUX 2.5 support - -* Wed Jul 23 2003 Elliot Lee <sopwith@redhat.com> 2.11y-22 -- #100433 patch - -* Sat Jun 14 2003 Elliot Lee <sopwith@redhat.com> 2.11y-20 -- #97381 patch - -* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> -- rebuilt - -* Mon Apr 21 2003 Elliot Lee <sopwith@redhat.com> 2.11y-17 -- Change patch128 to improve ipcs -l - -* Fri Apr 11 2003 Elliot Lee <sopwith@redhat.com> 2.11y-16 -- Fix #85407 - -* Fri Apr 11 2003 Elliot Lee <sopwith@redhat.com> 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 <msw@redhat.com> 2.11y-14 -- fix last login date display on AMD64 (#88574) - -* Mon Apr 7 2003 Jeremy Katz <katzj@redhat.com> 2.11y-13 -- include sfdisk on ppc - -* Fri Mar 28 2003 Jeremy Katz <katzj@redhat.com> 2.11y-12 -- add patch from msw to change mkcramfs blocksize with a command line option - -* Tue Mar 25 2003 Phil Knirsch <pknirsch@redhat.com> 2.11y-11 -- Fix segfault on s390x due to wrong usage of BLKGETSIZE. - -* Thu Mar 13 2003 Elliot Lee <sopwith@redhat.com> 2.11y-10 -- Really apply the ipcs patch. Doh. - -* Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com> -- rebuilt - -* Wed Feb 19 2003 Elliot Lee <sopwith@redhat.com> 2.11y-8 -- ipcs-84243.patch to fix #84243 - -* Thu Feb 13 2003 Yukihiro Nakai <ynakai@redhat.com> 2.11y-7 -- Update moremisc patch to fix swprintf()'s minimum field (bug #83361). - -* Mon Feb 03 2003 Elliot Lee <sopwith@redhat.com> 2.11y-6 -- Fix mcookie segfault on many 64-bit architectures (bug #83345). - -* Mon Feb 03 2003 Tim Waugh <twaugh@redhat.com> 2.11y-5 -- Fix underlined multibyte characters (bug #83376). - -* Sun Feb 02 2003 Florian La Roche <Florian.LaRoche@redhat.de> -- rebuild to have again a s390 rpm -- disable some more apps for mainframe - -* Wed Jan 29 2003 Elliot Lee <sopwith@redhat.com> 2.11y-4 -- util-linux-2.11y-umask-82552.patch - -* Wed Jan 22 2003 Tim Powers <timp@redhat.com> -- rebuilt - -* Mon Jan 13 2003 Elliot Lee <sopwith@redhat.com> 2.11y-2 -- Fix #81069, #75421 - -* Mon Jan 13 2003 Elliot Lee <sopwith@redhat.com> 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 <sopwith@redhat.com> 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 <sopwith@redhat.com> 2.11w-1 -- Update to 2.11w, resolve patch conflicts - -* Tue Oct 08 2002 Phil Knirsch <pknirsch@redhat.com> 2.11r-10hammer.3 -- Extended util-linux-2.11b-s390x patch to work again. - -* Thu Oct 03 2002 Elliot Lee <sopwith@redhat.com> 2.11r-10hammer.2 -- Add patch122 for hwclock on x86_64 - -* Thu Sep 12 2002 Than Ngo <than@redhat.com> 2.11r-10hammer.1 -- Fixed pam config files - -* Wed Sep 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.11r-10hammer -- Port to hammer - -* Fri Aug 30 2002 Elliot Lee <sopwith@redhat.com> 2.11r-10 -- Patch120 (hwclock) to fix #72140 -- Include isosize util - -* Wed Aug 7 2002 Elliot Lee <sopwith@redhat.com> 2.11r-9 -- Patch120 (skipraid2) to fix #70353, because the original patch was -totally useless. - -* Fri Aug 2 2002 Elliot Lee <sopwith@redhat.com> 2.11r-8 -- Patch119 (fdisk-add-primary) from #67898 - -* Wed Jul 24 2002 Elliot Lee <sopwith@redhat.com> 2.11r-7 -- Really add the gptsize patch, instead of what I think the patch says. -(+1) - -* Tue Jul 23 2002 Elliot Lee <sopwith@redhat.com> 2.11r-6 -- Add the sp[n].size part of the patch from #69603 - -* Mon Jul 22 2002 Florian La Roche <Florian.LaRoche@redhat.de> -- adjust mainframe patches - -* Tue Jul 2 2002 Bill Nottingham <notting@redhat.com> 2.11r-4 -- only require usermode if we're shipping kbdrate here - -* Fri Jun 28 2002 Trond Eivind Glomsrod <teg@redhat.com> 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 <sopwith@redhat.com> 2.11r-2 -- Remove swapondetect (patch301) until it avoids possible false positives. - -* Thu Jun 27 2002 Elliot Lee <sopwith@redhat.com> 2.11r-1 -- Update to 2.11r, wheeee -- Remove unused patches - -* Thu Jun 27 2002 Elliot Lee <sopwith@redhat.com> 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 <timp@redhat.com> -- automated rebuild - -* Thu Jun 20 2002 Elliot Lee <sopwith@redhat.com> 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 <teg@redhat.com> 2.11n-16 -- support large swap partitions -- add '-d' option to autodetect available swap partitions - -* Thu May 23 2002 Tim Powers <timp@redhat.com> -- automated rebuild - -* Wed May 15 2002 Elliot Lee <sopwith@redhat.com> 2.11n-14 -- Remove kbdrate (again). - -* Mon Apr 29 2002 Florian La Roche <Florian.LaRoche@redhat.de> -- 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 <sopwith@redhat.com> 2.11n-12 -- Don't strip binaries - rpm does it for us. - -* Sun Mar 31 2002 Elliot Lee <sopwith@redhat.com> 2.11n-11 -- Apply patch115 from ejb@ql.org for bug #61868 - -* Wed Mar 27 2002 Elliot Lee <sopwith@redhat.com> 2.11n-10 -- Finish fixing #60675 (ipcrm man page), updated the patch. -- Fix #61203 (patch114 - dumboctal.patch). - -* Tue Mar 12 2002 Elliot Lee <sopwith@redhat.com> 2.11n-9 -- Update ctty3 patch to ignore SIGHUP while dropping controlling terminal - -* Fri Mar 08 2002 Elliot Lee <sopwith@redhat.com> 2.11n-8 -- Update ctty3 patch to drop controlling terminal before forking. - -* Fri Mar 08 2002 Elliot Lee <sopwith@redhat.com> 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 <sopwith@redhat.com> 2.11n-6 -- Put kbdrate in, add usermode dep. - -* Tue Feb 26 2002 Elliot Lee <sopwith@redhat.com> 2.11n-5 -- Fix #60363 (tweak raw.8 man page, make rawdevices.8 symlink). - -* Mon Jan 28 2002 Bill Nottingham <notting@redhat.com> 2.11n-4 -- remove kbdrate (fixes kbd conflict) - -* Fri Dec 28 2001 Elliot Lee <sopwith@redhat.com> 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 <sopwith@redhat.com> 2.11n-1 -- Update to 2.11n -- Merge mount/losetup back in. - -* Tue Dec 04 2001 Elliot Lee <sopwith@redhat.com> 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 <sopwith@redhat.com> 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 <Florian.LaRoche@redhat.de> -- add nologin man-page for s390/s390x - -* Wed Oct 24 2001 Bernhard Rosenkraenzer <bero@redhat.com> 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 <sopwith@redhat.com> 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 <notting@redhat.com> -- fix permissions problem with vipw & shadow files, again (doh!) - -* Tue Oct 09 2001 Erik Troan <ewt@redhat.com> -- added patch from Olaf Kirch to fix possible pwent structure overwriting - -* Fri Sep 28 2001 Elliot Lee <sopwith@redhat.com> 2.11f-10 -- fdisk patch from arjan - -* Sun Aug 26 2001 Elliot Lee <sopwith@redhat.com> 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 <timp@redhat.com> -- don't require usermode - -* Mon Jul 30 2001 Elliot Lee <sopwith@redhat.com> 2.11f-7 -- Incorporate kbdrate back in. - -* Mon Jul 30 2001 Bill Nottingham <notting@redhat.com> -- 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 <Florian.LaRoche@redhat.de> -- correct s390x patch - -* Mon Jul 23 2001 Elliot Lee <sopwith@redhat.com> -- Add my megapatch (various bugs) -- Include pivot_root (#44828) - -* Thu Jul 12 2001 Bill Nottingham <notting@redhat.com> -- make shadow files 0400, not 0600 - -* Wed Jul 11 2001 Bill Nottingham <notting@redhat.com> -- fix permissions problem with vipw & shadow files - -* Mon Jun 18 2001 Florian La Roche <Florian.LaRoche@redhat.de> -- update to 2.11f, remove any merged patches -- add s390x patches for somewhat larger swap - -* Thu Jun 14 2001 Erik Troan <ewt@redhat.com> -- added --verbose patch to mkcramfs; it's much quieter by default now - -* Tue May 22 2001 Erik Troan <ewt@redhat.com> -- removed warning about starting partitions on cylinder 0 -- swap version2 - makes it unnecessary - -* Wed May 9 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.11b-2 -- Fix up s390x support - -* Mon May 7 2001 Bernhard Rosenkraenzer <bero@redhat.com> 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 <pbrown@redhat.com> 2.11a-4 -- /sbin/nologin from OpenBSD added. - -* Fri Apr 20 2001 Bernhard Rosenkraenzer <bero@redhat.com> 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 <ewt@redhat.com> -- 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 <msw@redhat.com> -- 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 <msw@redhat.com> -- 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 <msw@redhat.com> -- added mkcramfs (from linux/scripts/mkcramfs) - -* Mon Feb 26 2001 Tim Powers <timp@redhat.com> -- 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 <pbrown@redhat.com> -- use lang finder script -- install info files - -* Thu Feb 08 2001 Erik Troan <ewt@redhat.com> -- reverted login patch; seems to cause problems -- added agetty - -* Wed Feb 07 2001 Erik Troan <ewt@redhat.com> -- 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 <ewt@redhat.com> -- 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 <pbrown@redhat.com> -- danish translations added - -* Mon Jan 15 2001 Nalin Dahyabhai <nalin@redhat.com> -- fix segfault in login in btmp patch (#24025) - -* Mon Dec 11 2000 Oliver Paukstadt <oliver.paukstadt@millenux.com> -- ported to s390 - -* Wed Nov 01 2000 Florian La Roche <Florian.LaRoche@redhat.de> -- update to 2.10p -- update patch37 to newer fdisk version - -* Mon Oct 9 2000 Jeff Johnson <jbj@redhat.com> -- 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 <msw@redhat.com> -- rebuild to cope with glibc locale binary incompatibility, again - -* Mon Aug 14 2000 Jeff Johnson <jbj@redhat.com> -- setfdprm should open with O_WRONLY, not 3. - -* Fri Aug 11 2000 Jeff Johnson <jbj@redhat.com> -- fdformat should open with O_WRONLY, not 3. - -* Fri Jul 21 2000 Nalin Dahyabhai <nalin@redhat.com> -- make 'look' look in /usr/share/dict - -* Fri Jul 21 2000 Bill Nottingham <notting@redhat.com> -- put /usr/local/sbin:/usr/local/bin in root's path - -* Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com> -- rebuild to cope with glibc locale binary incompatibility - -* Thu Jul 13 2000 Prospector <bugzilla@redhat.com> -- automatic rebuild - -* Mon Jul 10 2000 Bill Nottingham <notting@redhat.com> -- enable hwclock to use /dev/efirtc on ia64 (gettext is fun. :( ) - -* Mon Jul 3 2000 Bill Nottingham <notting@redhat.com> -- move cfdisk to /usr/sbin, it depends on /usr stuff -- add rescuept - -* Fri Jun 23 2000 Bernhard Rosenkraenzer <bero@redhat.com> -- point more at the correct path to vi (for "v"), Bug #10882 - -* Sun Jun 4 2000 Jeff Johnson <jbj@redhat.com> -- FHS packaging changes. - -* Thu Jun 1 2000 Nalin Dahyabhai <nalin@redhat.com> -- modify PAM setup to use system-auth - -* Mon May 1 2000 Bill Nottingham <notting@redhat.com> -- eek, where did login go? (specfile tweaks) - -* Mon Apr 17 2000 Bernhard Rosenkraenzer <bero@redhat.com> -- 2.10k -- fix compilation with current glibc - -* Tue Mar 21 2000 Bernhard Rosenkraenzer <bero@redhat.com> -- 2.10h - -* Tue Mar 7 2000 Jeff Johnson <jbj@redhat.com> -- rebuild for sparc baud rates > 38400. - -* Sat Mar 4 2000 Matt Wilson <msw@redhat.com> -- use snprintf - not sprintf - when doing - sprintf ("%%s\n", _("Some string")) to avoid overflows and - segfaults. - -* Mon Feb 21 2000 Jeff Johnson <jbj@redhat.com> -- 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 <ewt@redhat.com> -- -v argument to mkswap wasn't working - -* Thu Feb 10 2000 Jakub Jelinek <jakub@redhat.com> -- Recognize 0xfd on Sun disklabels as RAID - -* Tue Feb 8 2000 Bill Nottingham <notting@redhat.com> -- more lives in /bin, and was linked against /usr/lib/libnurses. Bad. - -* Thu Feb 03 2000 Jakub Jelinek <jakub@redhat.com> -- update to 2.10f -- fix issues in the new realpath code, avoid leaking memory - -* Tue Feb 01 2000 Cristian Gafton <gafton@redhat.com> -- rebuild to fix dependencies -- add NFSv3 patches - -* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com> -- don't require csh - -* Mon Jan 24 2000 Nalin Dahyabhai <nalin@redhat.com> -- update to 2.10e -- add rename - -* Thu Jan 20 2000 Jeff Johnson <jbj@redhat.com> -- strip newlines in logger input. - -* Mon Jan 10 2000 Jeff Johnson <jbj@redhat.com> -- rebuild with correct ncurses libs. - -* Tue Dec 7 1999 Matt Wilson <msw@redhat.com> -- updated to util-linux 2.10c -- deprecated IMAP login mail notification patch17 -- deprecated raw patch22 -- depricated readprofile patch24 - -* Tue Dec 7 1999 Bill Nottingham <notting@redhat.com> -- add patch for readprofile - -* Thu Nov 18 1999 Michael K. Johnson <johnsonm@redhat.com> -- tunelp should come from util-linux - -* Tue Nov 9 1999 Jakub Jelinek <jakub@redhat.com> -- kbdrate cannot use /dev/port on sparc. - -* Wed Nov 3 1999 Jakub Jelinek <jakub@redhat.com> -- fix kbdrate on sparc. - -* Wed Oct 27 1999 Bill Nottingham <notting@redhat.com> -- ship hwclock on alpha. - -* Tue Oct 5 1999 Bill Nottingham <notting@redhat.com> -- don't ship symlinks to rdev if we don't ship rdev. - -* Tue Sep 07 1999 Cristian Gafton <gafton@redhat.com> -- add rawIO support from sct - -* Mon Aug 30 1999 Preston Brown <pbrown@redhat.com> -- don't display "new mail" message when the only piece of mail is from IMAP - -* Fri Aug 27 1999 Michael K. Johnson <johnsonm@redhat.com> -- kbdrate is now a console program - -* Thu Aug 26 1999 Jeff Johnson <jbj@redhat.com> -- 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 <jbj@redhat.com> -- tsort is now in textutils. - -* Wed Aug 4 1999 Bill Nottingham <notting@redhat.com> -- turn off setuid bit on login. Again. :( - -* Tue Aug 3 1999 Peter Jones, <pjones@redhat.com> -- hostid script for sparc (#3803). - -* Tue Aug 03 1999 Christian 'Dr. Disk' Hechelmann <drdisk@tc-gruppe.de> -- 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 <jbj@redhat.com> -- 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 <jbj@redhat.com> -- 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 <jbj@redhat.com> -- 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 <jbj@redhat.com> -- update to 2.9s. - -* Sat May 29 1999 Jeff Johnson <jbj@redhat.com> -- fix mkswap sets incorrect bits on sparc64 (#3140). - -* Thu Apr 15 1999 Jeff Johnson <jbj@redhat.com> -- on sparc64 random ioctls on clock interface cause kernel messages. - -* Thu Apr 15 1999 Jeff Johnson <jbj@redhat.com> -- improved raid patch (H.J. Lu). - -* Wed Apr 14 1999 Michael K. Johnson <johnsonm@redhat.com> -- added patch for smartraid controllers - -* Sat Apr 10 1999 Cristian Gafton <gafton@redhat.com> -- fix logging problems caused by setproctitle and PAM interaction - (#2045) - -* Wed Mar 31 1999 Jeff Johnson <jbj@redhat.com> -- include docs and examples for sfdisk (#1164) - -* Mon Mar 29 1999 Matt Wilson <msw@redhat.com> -- rtc is not working properly on alpha, we can't use hwclock yet. - -* Fri Mar 26 1999 Cristian Gafton <gafton@redhat.com> -- add patch to make mkswap more 64 bit friendly... Patch from - eranian@hpl.hp.com (ahem!) - -* Thu Mar 25 1999 Jeff Johnson <jbj@redhat.com> -- 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 <jj@ultra.linux.cz> -- 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 - <ankh@canuck.gen.nz> - -* Wed Mar 24 1999 Matt Wilson <msw@redhat.com> -- added pam_console back into pam.d/login - -* Tue Mar 23 1999 Matt Wilson <msw@redhat.com> -- updated to 2.9i -- added hwclock for sparcs and alpha - -* Mon Mar 22 1999 Erik Troan <ewt@redhat.com> -- added vigr to file list - -* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> -- auto rebuild in the new build environment (release 12) - -* Thu Mar 18 1999 Cristian Gafton <gafton@redhat.com> -- remove most of the ifnarch arm stuff - -* Mon Mar 15 1999 Michael Johnson <johnsonm@redhat.com> -- added pam_console.so to /etc/pam.d/login - -* Thu Feb 4 1999 Michael K. Johnson <johnsonm@redhat.com> -- .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 <jbj@redhat.com> -- strip fdisk in buildroot correctly (#718) - -* Mon Jan 11 1999 Cristian Gafton <gafton@redhat.com> -- have fdisk compiled on sparc and arm - -* Mon Jan 11 1999 Erik Troan <ewt@redhat.com> -- added beos partition type to fdisk - -* Wed Dec 30 1998 Cristian Gafton <gafton@redhat.com> -- incorporate fdisk on all arches - -* Sat Dec 5 1998 Jeff Johnson <jbj@redhat.com> -- restore PAM functionality at end of login (Bug #201) - -* Thu Dec 03 1998 Cristian Gafton <gafton@redhat.com> -- patch top build on the arm without PAM and related utilities, for now. -- build hwclock only on intel - -* Wed Nov 18 1998 Cristian Gafton <gafton@redhat.com> -- upgraded to version 2.9 - -* Thu Oct 29 1998 Bill Nottingham <notting@redhat.com> -- build for Raw Hide (slang-1.2.2) -- patch kbdrate wackiness so it builds with egcs - -* Tue Oct 13 1998 Erik Troan <ewt@redhat.com> -- patched more to use termcap - -* Mon Oct 12 1998 Erik Troan <ewt@redhat.com> -- added warning about alpha/bsd label starting cylinder - -* Mon Sep 21 1998 Erik Troan <ewt@redhat.com> -- use sigsetjmp/siglongjmp in more rather then sig'less versions - -* Fri Sep 11 1998 Jeff Johnson <jbj@redhat.com> -- explicit attrs for setuid/setgid programs - -* Thu Aug 27 1998 Cristian Gafton <gafton@redhat.com> -- sln is now included in glibc - -* Sun Aug 23 1998 Jeff Johnson <jbj@redhat.com> -- add cbm1581 floppy definitions (problem #787) - -* Mon Jun 29 1998 Jeff Johnson <jbj@redhat.com> -- remove /etc/nologin at end of shutdown/halt. - -* Fri Jun 19 1998 Jeff Johnson <jbj@redhat.com> -- add mount/losetup. - -* Thu Jun 18 1998 Jeff Johnson <jbj@redhat.com> -- update to 2.8 with 2.8b clean up. hostid now defunct? - -* Mon Jun 01 1998 David S. Miller <davem@dm.cobaltmicro.com> -- "more" now works properly on sparc - -* Sat May 02 1998 Jeff Johnson <jbj@redhat.com> -- Fix "fdisk -l" fault on mounted cdrom. (prob #513) - -* Fri Apr 24 1998 Prospector System <bugs@redhat.com> -- translations modified for de, fr, tr - -* Sat Apr 11 1998 Cristian Gafton <gafton@redhat.com> -- manhattan rebuild - -* Mon Dec 29 1997 Erik Troan <ewt@redhat.com> -- more didn't suspend properly on glibc -- use proper tc*() calls rather then ioctl's - -* Sun Dec 21 1997 Cristian Gafton <gafton@redhat.com> -- fixed a security problem in chfn and chsh accepting too - long gecos fields - -* Fri Dec 19 1997 Mike Wangsmo <wanger@redhat.com> -- removed "." from default path - -* Tue Dec 02 1997 Cristian Gafton <gafton@redhat.com> -- added (again) the vipw patch - -* Wed Oct 22 1997 Michael Fulbright <msf@redhat.com> -- minor cleanups for glibc 2.1 - -* Fri Oct 17 1997 Michael Fulbright <msf@redhat.com> -- added vfat32 filesystem type to list recognized by fdisk - -* Fri Oct 10 1997 Erik Troan <ewt@redhat.com> -- don't build clock on the alpha -- don't install chkdupexe - -* Thu Oct 02 1997 Michael K. Johnson <johnsonm@redhat.com> -- Update to new pam standard. -- BuildRoot. - -* Thu Sep 25 1997 Cristian Gafton <gafton@redhat.com> -- added rootok and setproctitle patches -- updated pam config files for chfn and chsh - -* Tue Sep 02 1997 Erik Troan <ewt@redhat.com> -- 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 <ewt@redhat.com> -- update to util-linux 2.7, fixed login problems - -* Wed Jun 25 1997 Erik Troan <ewt@redhat.com> -- 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 <johnsonm@redhat.com> -- LOG_AUTH --> LOG_AUTHPRIV in login and shutdown - -* Mon Mar 03 1997 Michael K. Johnson <johnsonm@redhat.com> -- Moved to new pam and from pam.conf to pam.d - -* Tue Feb 25 1997 Michael K. Johnson <johnsonm@redhat.com> -- 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.