From 796cf6f6e15a893a7d1bac7e5ee4d2bc2dc6e962aa2cc9ff5ded0fa96061971c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 4 Apr 2024 22:34:28 +0000 Subject: [PATCH 01/11] Accepting request 1164989 from home:kukuk:cleanup - Update to release 2.40 * Add lastlog2 * agetty: Load autologin user from agetty.autologin credential * agetty: use get_terminal_default_type() * agetty: use sd_get_sessions() for number of users (#2088) * blockdev: add support for BLKGETZONESZ * cfdisk: ask y/n before wipe * cfdisk: properly handle out-of-order partitions during resize * chcpu: document limitations of -g * chsh: use libeconf to read /etc/shells * column: fix -l * column: fix memory leak * dmesg: fix FD leak * dmesg: fix delta calculation * dmesg: fix wrong size calculation * dmesg: support reading kmsg format from file * enosys: a new small command to make syscalls fail with ENOSYS * exch: new command to atomically exchanges paths between two files * fdisk: add support for partition resizing * fdisk: remove usage of VLA * fincore: add --output-all * findmnt: add --list-columns * findmnt: add -I, --dfi options for imitating the output of df -i * findmnt: add inode-related columns for implementing "df -i" like output * hexdump: add '--one-byte-hex' format option * hwclock: add support for RTC_VL_READ/RTC_VL_CLR ioctls * login: initialize noauth from login.noauth credential * lsblk: add --filter * lsblk: add --highlight * lsblk: add --list-columns OBS-URL: https://build.opensuse.org/request/show/1164989 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=552 --- ...ibblkid-try-LUKS2-first-when-probing.patch | 44 --- skip-lsfd-tests-PR2888.patch | 60 +++ tests-increase-delay-for-waitpid-test.patch | 36 -- use-logind-not-utmp.patch | 357 ------------------ util-linux-2.39.3.tar.sign | 16 - util-linux-2.39.3.tar.xz | 3 - util-linux-2.40.tar.sign | 16 + util-linux-2.40.tar.xz | 3 + util-linux-fix-tests-with-64k-pagesize.patch | 276 -------------- util-linux.changes | 54 +++ util-linux.spec | 80 +++- 11 files changed, 203 insertions(+), 742 deletions(-) delete mode 100644 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch create mode 100644 skip-lsfd-tests-PR2888.patch delete mode 100644 tests-increase-delay-for-waitpid-test.patch delete mode 100644 use-logind-not-utmp.patch delete mode 100644 util-linux-2.39.3.tar.sign delete mode 100644 util-linux-2.39.3.tar.xz create mode 100644 util-linux-2.40.tar.sign create mode 100644 util-linux-2.40.tar.xz delete mode 100644 util-linux-fix-tests-with-64k-pagesize.patch diff --git a/0001-Revert-libblkid-try-LUKS2-first-when-probing.patch b/0001-Revert-libblkid-try-LUKS2-first-when-probing.patch deleted file mode 100644 index da6b46a..0000000 --- a/0001-Revert-libblkid-try-LUKS2-first-when-probing.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 93ba7961779789217a1f814ce3110ff8c040c8c3 Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Wed, 12 Jul 2023 15:48:27 +0200 -Subject: [PATCH] Revert "libblkid: try LUKS2 first when probing" -References: https://github.com/util-linux/util-linux/pull/2373 - -mdadm superblocks before 1.1 are placed at the end of the device, which -means that the data contained inside the array starts at offset 0. For -LUKS inside MD, blkid falsely detects this as plain LUKS instead of a -linux_raid_member. This causes e.g. dracut to not assemble the array -during boot and system startup fails. - -This reverts commit b8889c0a214aeb3dd47bf1ab280fe5534b64d2aa. ---- - libblkid/src/superblocks/superblocks.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c -index fb0392707..c7789a15b 100644 ---- a/libblkid/src/superblocks/superblocks.c -+++ b/libblkid/src/superblocks/superblocks.c -@@ -94,11 +94,6 @@ static int blkid_probe_set_usage(blkid_probe pr, int usage); - */ - static const struct blkid_idinfo *idinfos[] = - { -- /* In case the volume is locked with OPAL we are going to get -- * an I/O error when reading past the LUKS header, so try it -- * first. */ -- &luks_idinfo, -- - /* RAIDs */ - &linuxraid_idinfo, - &ddfraid_idinfo, -@@ -124,6 +119,7 @@ static const struct blkid_idinfo *idinfos[] = - &snapcow_idinfo, - &verity_hash_idinfo, - &integrity_idinfo, -+ &luks_idinfo, - &vmfs_volume_idinfo, - &ubi_idinfo, - &vdo_idinfo, --- -2.41.0 - diff --git a/skip-lsfd-tests-PR2888.patch b/skip-lsfd-tests-PR2888.patch new file mode 100644 index 0000000..9363695 --- /dev/null +++ b/skip-lsfd-tests-PR2888.patch @@ -0,0 +1,60 @@ +From f98a4c12b366ae2b5e01fa30d72eef34f3bab681 Mon Sep 17 00:00:00 2001 +From: Masatake YAMATO +Date: Tue, 2 Apr 2024 06:34:40 +0900 +Subject: [PATCH 2/2] tests: (test_mkfds::sockdiag) verify the recieved message + to detect whether the socket is usable or not + +Close #2822. + +Signed-off-by: Masatake YAMATO +--- + tests/helpers/test_mkfds.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c +index 39427ba09a..4b138c2efd 100644 +--- a/tests/helpers/test_mkfds.c ++++ b/tests/helpers/test_mkfds.c +@@ -3200,6 +3200,25 @@ static int send_diag_request(int diagsd, void *req, size_t req_size) + return 0; + } + ++static int recv_diag_request(int diagsd) ++{ ++ __attribute__((aligned(sizeof(void *)))) uint8_t buf[8192]; ++ const struct nlmsghdr *h; ++ int r = recvfrom(diagsd, buf, sizeof(buf), 0, NULL, NULL);; ++ if (r < 0) ++ return errno; ++ ++ h = (void *)buf; ++ if (!NLMSG_OK(h, (size_t)r)) ++ return -1; ++ ++ if (h->nlmsg_type == NLMSG_ERROR) { ++ struct nlmsgerr *e = (struct nlmsgerr *)NLMSG_DATA(h); ++ return - e->error; ++ } ++ return 0; ++} ++ + static void *make_sockdiag(const struct factory *factory, struct fdesc fdescs[], + int argc, char ** argv) + { +@@ -3243,6 +3262,16 @@ static void *make_sockdiag(const struct factory *factory, struct fdesc fdescs[], + err(EXIT_FAILURE, "failed in sendmsg()"); + } + ++ e = recv_diag_request(diagsd); ++ if (e != 0) { ++ close (diagsd); ++ if (e == ENOENT) ++ err(EXIT_ENOENT, "failed in recvfrom()"); ++ if (e > 0) ++ err(EXIT_FAILURE, "failed in recvfrom()"); ++ if (e < 0) ++ errx(EXIT_FAILURE, "failed in recvfrom() => -1"); ++ } + + if (diagsd != fdescs[0].fd) { + if (dup2(diagsd, fdescs[0].fd) < 0) { diff --git a/tests-increase-delay-for-waitpid-test.patch b/tests-increase-delay-for-waitpid-test.patch deleted file mode 100644 index 2538ff6..0000000 --- a/tests-increase-delay-for-waitpid-test.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4524f5d6b7d90684f2b205e472cd65a682d5fab5 Mon Sep 17 00:00:00 2001 -From: Goldwyn Rodrigues -Date: Wed, 29 Nov 2023 11:36:23 -0600 -Subject: [PATCH] tests: increase delay for waitpid test -References: bsc#1217651 - -In some test executions on s390x, the waitpid test fails because 1 -gets printed before 2. - -[ 557s] --- /home/abuild/rpmbuild/BUILD/util-linux-2.39.2/tests/expected/misc/waitpid-normal 2023-06-14 09:11:15.910887765 +0000 -[ 557s] +++ /home/abuild/rpmbuild/BUILD/util-linux-2.39.2/tests/output/misc/waitpid-normal 2023-11-27 23:30:30.406675022 +0000 -[ 557s] @@ -1,4 +1,4 @@ -[ 557s] 3 -[ 557s] -2 -[ 557s] 1 -[ 557s] +2 -[ 557s] 4 - -Increase the time to print 1, so the test numbers are printed in -expected order. - -Signed-off-by: Goldwyn Rodrigues - -diff --git a/tests/ts/misc/waitpid b/tests/ts/misc/waitpid -index daed74fe0..904222c05 100755 ---- a/tests/ts/misc/waitpid -+++ b/tests/ts/misc/waitpid -@@ -24,7 +24,7 @@ ts_check_test_command "$TS_CMD_WAITPID" - - ts_init_subtest normal - --(sleep 0.2; echo 1 >> "$TS_OUTPUT") & -+(sleep 0.5; echo 1 >> "$TS_OUTPUT") & - BG1="$!" - - (sleep 0.1; echo 2 >> "$TS_OUTPUT") & diff --git a/use-logind-not-utmp.patch b/use-logind-not-utmp.patch deleted file mode 100644 index fdf36ac..0000000 --- a/use-logind-not-utmp.patch +++ /dev/null @@ -1,357 +0,0 @@ -From: Thorsten Kukuk -Date: 2023-08-17 08:03:09+0000 -References: https://github.com/util-linux/util-linux/pull/2100 - -diff --git a/configure.ac b/configure.ac -index d631b062d2..17d3ab703b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2491,6 +2491,7 @@ AS_IF([test "x$with_systemd" != xno], [ - [*:yes], - AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available]) - AC_DEFINE([USE_SYSTEMD], [1], [Define if systemd support is wanted ]) -+ AC_CHECK_DECLS([sd_session_get_username], [], [], [#include ]) - ) - ]) - AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes]) -diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am -index 07004d43ca..1542320422 100644 ---- a/term-utils/Makemodule.am -+++ b/term-utils/Makemodule.am -@@ -98,6 +98,10 @@ dist_noinst_DATA += term-utils/wall.1.adoc - wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) - wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) - wall_LDADD = $(LDADD) libcommon.la -+if HAVE_SYSTEMD -+wall_LDADD += $(SYSTEMD_LIBS) -+wall_CFLAGS += $(SYSTEMD_CFLAGS) -+endif - if USE_TTY_GROUP - if MAKEINSTALL_DO_CHOWN - install-exec-hook-wall:: -diff --git a/term-utils/wall.c b/term-utils/wall.c -index c601d3e5b7..313b1bdee5 100644 ---- a/term-utils/wall.c -+++ b/term-utils/wall.c -@@ -61,6 +61,11 @@ - #include - #include - -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+# include -+# include -+#endif -+ - #include "nls.h" - #include "xalloc.h" - #include "strutils.h" -@@ -246,6 +251,37 @@ int main(int argc, char **argv) - - iov.iov_base = mbuf; - iov.iov_len = mbufsize; -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+ if (sd_booted() > 0) { -+ char **sessions_list; -+ int sessions; -+ -+ sessions = sd_get_sessions(&sessions_list); -+ if (sessions < 0) -+ errx(EXIT_FAILURE, _("error getting sessions: %s"), -+ strerror(-sessions)); -+ -+ for (int i = 0; i < sessions; i++) { -+ char *name, *tty; -+ int r; -+ -+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0) -+ errx(EXIT_FAILURE, _("get user name failed: %s"), strerror (-r)); -+ -+ if (!(group_buf && !is_gr_member(name, group_buf))) { -+ if (sd_session_get_tty(sessions_list[i], &tty) >= 0) { -+ if ((p = ttymsg(&iov, 1, tty, timeout)) != NULL) -+ warnx("%s", p); -+ -+ free(tty); -+ } -+ } -+ free(name); -+ free(sessions_list[i]); -+ } -+ free(sessions_list); -+ } else { -+#endif - while((utmpptr = getutxent())) { - if (!utmpptr->ut_user[0]) - continue; -@@ -269,6 +305,9 @@ int main(int argc, char **argv) - warnx("%s", p); - } - endutxent(); -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+ } -+#endif - free(mbuf); - free_group_workspace(group_buf); - exit(EXIT_SUCCESS); - -From e915e6baeba3cbce154336a4f1f24a8be93e85ae Mon Sep 17 00:00:00 2001 -From: Thorsten Kukuk -Date: Wed, 31 May 2023 08:57:01 +0200 -Subject: [PATCH 2/3] agetty: use sd_get_sessions() for number of users (#2088) - ---- - term-utils/Makemodule.am | 4 ++++ - term-utils/agetty.c | 28 ++++++++++++++++++++++------ - 2 files changed, 26 insertions(+), 6 deletions(-) - -diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am -index 1542320422..b7037fb116 100644 ---- a/term-utils/Makemodule.am -+++ b/term-utils/Makemodule.am -@@ -58,6 +58,10 @@ endif - if HAVE_ECONF - agetty_LDADD += -leconf - endif -+if HAVE_SYSTEMD -+agetty_LDADD += $(SYSTEMD_LIBS) -+agetty_CFLAGS = $(SYSTEMD_CFLAGS) -+endif - endif # BUILD_AGETTY - - -diff --git a/term-utils/agetty.c b/term-utils/agetty.c -index cf8725537b..6bc3e5b5a8 100644 ---- a/term-utils/agetty.c -+++ b/term-utils/agetty.c -@@ -73,6 +73,11 @@ - # endif - #endif - -+#ifdef USE_SYSTEMD -+# include -+# include -+#endif -+ - #ifdef __linux__ - # include - # define USE_SYSLOG -@@ -2864,12 +2869,23 @@ static void output_special_char(struct issue *ie, - case 'U': - { - int users = 0; -- struct utmpx *ut; -- setutxent(); -- while ((ut = getutxent())) -- if (ut->ut_type == USER_PROCESS) -- users++; -- endutxent(); -+#ifdef USE_SYSTEMD -+ if (sd_booted() > 0) { -+ users = sd_get_sessions(NULL); -+ if (users < 0) -+ users = 0; -+ } else { -+#endif -+ users = 0; -+ struct utmpx *ut; -+ setutxent(); -+ while ((ut = getutxent())) -+ if (ut->ut_type == USER_PROCESS) -+ users++; -+ endutxent(); -+#ifdef USE_SYSTEMD -+ } -+#endif - if (c == 'U') - fprintf(ie->output, P_("%d user", "%d users", users), users); - else - -From 5c62c27001467f3ef0baaa66ae4e3bb80a0298a6 Mon Sep 17 00:00:00 2001 -From: Thorsten Kukuk -Date: Wed, 31 May 2023 09:00:09 +0200 -Subject: [PATCH 3/3] write: query logind for list of users with tty (#2088) - ---- - term-utils/Makemodule.am | 4 ++ - term-utils/write.c | 130 +++++++++++++++++++++++++++++++++++---- - 2 files changed, 123 insertions(+), 11 deletions(-) - -diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am -index b7037fb116..1efe1c57e3 100644 ---- a/term-utils/Makemodule.am -+++ b/term-utils/Makemodule.am -@@ -126,6 +126,10 @@ write_SOURCES = term-utils/write.c - write_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) - write_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) - write_LDADD = $(LDADD) libcommon.la -+if HAVE_SYSTEMD -+write_LDADD += $(SYSTEMD_LIBS) -+write_CFLAGS += $(SYSTEMD_CFLAGS) -+endif - - if USE_TTY_GROUP - if MAKEINSTALL_DO_CHOWN -diff --git a/term-utils/write.c b/term-utils/write.c -index 8b86e9a9d5..8aa450d563 100644 ---- a/term-utils/write.c -+++ b/term-utils/write.c -@@ -59,6 +59,11 @@ - #include - #include - -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+# include -+# include -+#endif -+ - #include "c.h" - #include "carefulputc.h" - #include "closestream.h" -@@ -131,19 +136,56 @@ static int check_utmp(const struct write_control *ctl) - { - struct utmpx *u; - int res = 1; -- -- utmpxname(_PATH_UTMP); -- setutxent(); -- -- while ((u = getutxent())) { -- if (strncmp(ctl->dst_login, u->ut_user, sizeof(u->ut_user)) == 0 && -- strncmp(ctl->dst_tty_name, u->ut_line, sizeof(u->ut_line)) == 0) { -- res = 0; -- break; -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+ if (sd_booted() > 0) { -+ char **sessions_list; -+ int sessions = sd_get_sessions(&sessions_list); -+ if (sessions < 0) -+ errx(EXIT_FAILURE, _("error getting sessions: %s"), -+ strerror(-sessions)); -+ -+ for (int i = 0; i < sessions; i++) { -+ -+ char *name, *tty; -+ int r; -+ -+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0) -+ errx(EXIT_FAILURE, _("get user name failed: %s"), strerror (-r)); -+ if (sd_session_get_tty(sessions_list[i], &tty) < 0) { -+ free(name); -+ continue; -+ } -+ -+ if (strcmp(ctl->dst_login, name) == 0 && -+ strcmp(ctl->dst_tty_name, tty) == 0) { -+ free(name); -+ free(tty); -+ res = 0; -+ break; -+ } -+ free(name); -+ free(tty); -+ } -+ for (int i = 0; i < sessions; i++) -+ free(sessions_list[i]); -+ free(sessions_list); -+ } else { -+#endif -+ utmpxname(_PATH_UTMP); -+ setutxent(); -+ -+ while ((u = getutxent())) { -+ if (strncmp(ctl->dst_login, u->ut_user, sizeof(u->ut_user)) == 0 && -+ strncmp(ctl->dst_tty_name, u->ut_line, sizeof(u->ut_line)) == 0) { -+ res = 0; -+ break; -+ } - } -- } - -- endutxent(); -+ endutxent(); -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+ } -+#endif - return res; - } - -@@ -163,6 +205,69 @@ static void search_utmp(struct write_control *ctl) - struct utmpx *u; - time_t best_atime = 0, tty_atime; - int num_ttys = 0, valid_ttys = 0, tty_writeable = 0, user_is_me = 0; -+ -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+ if (sd_booted() > 0) { -+ char path[256]; -+ char **sessions_list; -+ int sessions = sd_get_sessions(&sessions_list); -+ if (sessions < 0) -+ errx(EXIT_FAILURE, _("error getting sessions: %s"), -+ strerror(-sessions)); -+ -+ for (int i = 0; i < sessions; i++) { -+ char *name, *tty; -+ int r; -+ -+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0) -+ errx(EXIT_FAILURE, _("get user name failed: %s"), strerror (-r)); -+ -+ if (strcmp(ctl->dst_login, name) != 0) { -+ free(name); -+ continue; -+ } -+ -+ if (sd_session_get_tty(sessions_list[i], &tty) < 0) { -+ free(name); -+ continue; -+ } -+ -+ num_ttys++; -+ snprintf(path, sizeof(path), "/dev/%s", tty); -+ if (check_tty(path, &tty_writeable, &tty_atime, 0)) { -+ /* bad term? skip */ -+ free(name); -+ free(tty); -+ continue; -+ } -+ if (ctl->src_uid && !tty_writeable) { -+ /* skip ttys with msgs off */ -+ free(name); -+ free(tty); -+ continue; -+ } -+ if (strcmp(tty, ctl->src_tty_name) == 0) { -+ user_is_me = 1; -+ free(name); -+ free(tty); -+ /* don't write to yourself */ -+ continue; -+ } -+ valid_ttys++; -+ if (best_atime < tty_atime) { -+ best_atime = tty_atime; -+ free(ctl->dst_tty_path); -+ ctl->dst_tty_path = xstrdup(path); -+ ctl->dst_tty_name = ctl->dst_tty_path + 5; -+ } -+ free(name); -+ free(tty); -+ } -+ for (int i = 0; i < sessions; i++) -+ free(sessions_list[i]); -+ free(sessions_list); -+ } else { -+#endif - char path[sizeof(u->ut_line) + 6]; - - utmpxname(_PATH_UTMP); -@@ -197,6 +302,9 @@ static void search_utmp(struct write_control *ctl) - } - - endutxent(); -+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1 -+ } -+#endif - if (num_ttys == 0) - errx(EXIT_FAILURE, _("%s is not logged in"), ctl->dst_login); - if (valid_ttys == 0) { diff --git a/util-linux-2.39.3.tar.sign b/util-linux-2.39.3.tar.sign deleted file mode 100644 index e9c061b..0000000 --- a/util-linux-2.39.3.tar.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmVuLVMACgkQ5LcdXuw5 -woTWRg/+KBoZc5EjgFEUQMGzblNyuqrvcFqCbhEcoaEEMtEKPrQGVZgwgs+SZcel -n0ygCOes7M/nNmAvn4dVM8sZRvEPKjdRFErmghNuWKfZLbE9szadNcnPunmzZ1Nc -Cd2E1R6bo0B5X3tZ4ISW3keAnWKlnRucPIrW2qZiWT36LfJT4s9vZ/dyAnJ3eAtQ -aFgUVMWRwDFYYr79iXq6Wq60bHbxw1HT+KrpoLEkjIXN+DmuSffVQfjmCpamT1UH -oGgUGDhrUFr8XRUC0q07n1CxxgirjlR+KeLDiNAXuzGTWK2naBYCtCwGJpxM5Dvd -cyKenmCC1Ie+cl9m3w7MfP7WgtoPogpttEiZ1lsLJcDEbeuAu1z+O/B52YwOi7O3 -WLpe6bqW/dQsAljC6q2UMZrwnRjK7Zr5CwkTlV/o0DuCmAidcoXEZAcVQDvY1H6k -uYD9NFtQotS0ufOFH08AJxBYWVznbmiNG7NdGeMm/ysfe807fQYD25FYhP4/r4jt -k6qWnfDrt9OooFNx6e7s2cBZSkTmJzJ8nxGv0a4WgOhZ6hnLpx/Cv2RIpux5DeMq -wOuWuMDF9lOVWiv6iWiuy8shQ+hGF4+riFy8LfqJZf94wqZmp0tA8CHKFSDI99iC -ci4tz2MEpQqeVeEx1sd18DRjkXycs5Wmy7ZAUtqnR1rUxKbhVLo= -=4wcm ------END PGP SIGNATURE----- diff --git a/util-linux-2.39.3.tar.xz b/util-linux-2.39.3.tar.xz deleted file mode 100644 index 813c9b0..0000000 --- a/util-linux-2.39.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f -size 8526168 diff --git a/util-linux-2.40.tar.sign b/util-linux-2.40.tar.sign new file mode 100644 index 0000000..4157924 --- /dev/null +++ b/util-linux-2.40.tar.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmYECuEACgkQ5LcdXuw5 +woTCTg/9HwvHA+Gzd1rMO4UakgavnNqxzFP0rcC5HTTPHHX7rXLWVtd4u2pjStCt +EWodiy7doRRuVOAKwn93nygt/m22w23omfODdTWejCAX1ALx00LliiySkFDFWUlY +angRDG4p8nyLn03I3XBAWEvcWa7OIM4ddXlEuWSTNHTeBWSzCs0be0bbFgws2m/p +ejqo7CAHXNVx4lbtsgLQgemAkr6WhALxPEcBrXj2V/rwYF8a/uwnWK3AfGDaTeoK +DeYYsgWGkQdsPL3GDPiDttYtO9sJC8THvEOA1l0pzRyA0lI4hRbcqTXD+kvLGrZq +csk5dprZ+CvejmBtagymQoSfAEJH0b6rKBmzJYhgbKreM8byy51sQ4pmUVAB/pBz +MGAtj7PAAwcrot3CC5whMHsnB77qx0xBDlxrc+3BUKgZBiVhqe55gVGh2LnLdgCa +rAVA3QhjgZlvuH/EsVJIv0cCIBMpYTyUJLDW1Or1CLDKAl+nR2Xu9X9Hj5sXc3In +k9oU6i8/DOi1EZWJqwhf4nFZMFHgwgkHHaOXDLwlTTCFN11pOrEAnxRcsC/319Za +RlfMhX56J+GYhmFW8I5OxRrvS6PInZ4WZ/1+Qzdmas/nqBGbnctZGqv3bF/Cp/qQ +KAYTcaGqvjURmM9vcRWKjW33ZtGkD8JDrt1DvC3yQ/R/h+/Hy6I= +=7ZO0 +-----END PGP SIGNATURE----- diff --git a/util-linux-2.40.tar.xz b/util-linux-2.40.tar.xz new file mode 100644 index 0000000..940fbf8 --- /dev/null +++ b/util-linux-2.40.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d57a626081f9ead02fa44c63a6af162ec19c58f53e993f206ab7c3a6641c2cd7 +size 8762888 diff --git a/util-linux-fix-tests-with-64k-pagesize.patch b/util-linux-fix-tests-with-64k-pagesize.patch deleted file mode 100644 index 3996bae..0000000 --- a/util-linux-fix-tests-with-64k-pagesize.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 8b36444f447949c3ab477f2c43b45a94c30ee7bf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sun, 21 May 2023 21:42:14 +0200 -Subject: [PATCH 1/4] fadvise: (test) dynamically calculate expected test - values -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Thomas Weißschuh ---- - tests/ts/fadvise/drop | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop -index 7c7eee5dc..86c0d5b0a 100755 ---- a/tests/ts/fadvise/drop -+++ b/tests/ts/fadvise/drop -@@ -16,7 +16,7 @@ ts_check_prog "sleep" - ts_cd "$TS_OUTDIR" - - FILE="ddtest" --BS=4k -+BS=4096 - COUNT=8 - - FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")" -@@ -41,22 +41,22 @@ create_file() { - echo - - create_file -- echo "offset: 8192" -- "$TS_CMD_FADVISE" -o 8192 "$FILE" -+ echo "offset: $(( 2 * $BS ))" -+ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE" - echo status: $? - "$TS_CMD_FINCORE" "$FILE" - echo - - create_file -- echo "length: 16384" -- "$TS_CMD_FADVISE" -l 16384 "$FILE" -+ echo "length: $(( 4 * $BS ))" -+ "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE" - echo status: $? - "$TS_CMD_FINCORE" "$FILE" - echo - - create_file -- echo "offset: 8192, length: 16384 fd: 42" -- "$TS_CMD_FADVISE" -o 8192 -l 16384 --fd 42 42<"$FILE" -+ echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42" -+ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE" - echo status: $? - "$TS_CMD_FINCORE" "$FILE" - echo --- -2.40.0 - - -From e5009e773fc801eca887dd43b721cd1b1aa327be Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sun, 21 May 2023 21:43:38 +0200 -Subject: [PATCH 2/4] fadvise: (tests) factor out calls to "fincore" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This will make it easier to pass argument later. - -Signed-off-by: Thomas Weißschuh ---- - tests/ts/fadvise/drop | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop -index 86c0d5b0a..8869b7da4 100755 ---- a/tests/ts/fadvise/drop -+++ b/tests/ts/fadvise/drop -@@ -28,37 +28,41 @@ create_file() { - dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null - } - -+do_fincore() { -+ "$TS_CMD_FINCORE" "$FILE" -+} -+ - { - create_file -- "$TS_CMD_FINCORE" "$FILE" -+ do_fincore - echo - - create_file - echo "whole file" - "$TS_CMD_FADVISE" "$FILE" - echo status: $? -- "$TS_CMD_FINCORE" "$FILE" -+ do_fincore - echo - - create_file - echo "offset: $(( 2 * $BS ))" - "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE" - echo status: $? -- "$TS_CMD_FINCORE" "$FILE" -+ do_fincore - echo - - create_file - echo "length: $(( 4 * $BS ))" - "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE" - echo status: $? -- "$TS_CMD_FINCORE" "$FILE" -+ do_fincore - echo - - create_file - echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42" - "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE" - echo status: $? -- "$TS_CMD_FINCORE" "$FILE" -+ do_fincore - echo - - rm "$FILE" --- -2.40.0 - - -From 33980996d0b429fc59c40f8352633c0a21a0f96a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sun, 21 May 2023 21:44:20 +0200 -Subject: [PATCH 3/4] fadvise: (test) don't compare fincore page counts -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These depend on the machines pagesize and are therefore not a good -comparision. - -Signed-off-by: Thomas Weißschuh ---- - tests/expected/fadvise/drop | 20 ++++++++++---------- - tests/ts/fadvise/drop | 2 +- - 2 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop -index f2360b56f..25f23e050 100644 ---- a/tests/expected/fadvise/drop -+++ b/tests/expected/fadvise/drop -@@ -1,23 +1,23 @@ -- RES PAGES SIZE FILE -- 32K 8 32K ddtest -+ RES SIZE FILE -+ 32K 32K ddtest - - whole file - status: 0 --RES PAGES SIZE FILE -- 0B 0 32K ddtest -+RES SIZE FILE -+ 0B 32K ddtest - - offset: 8192 - status: 0 --RES PAGES SIZE FILE -- 8K 2 32K ddtest -+RES SIZE FILE -+ 8K 32K ddtest - - length: 16384 - status: 0 -- RES PAGES SIZE FILE -- 16K 4 32K ddtest -+ RES SIZE FILE -+ 16K 32K ddtest - - offset: 8192, length: 16384 fd: 42 - status: 0 -- RES PAGES SIZE FILE -- 16K 4 32K ddtest -+ RES SIZE FILE -+ 16K 32K ddtest - -diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop -index 8869b7da4..6c4298e87 100755 ---- a/tests/ts/fadvise/drop -+++ b/tests/ts/fadvise/drop -@@ -29,7 +29,7 @@ create_file() { - } - - do_fincore() { -- "$TS_CMD_FINCORE" "$FILE" -+ "$TS_CMD_FINCORE" -o RES,SIZE,FILE "$FILE" - } - - { --- -2.40.0 - - -From c0f31b79f5d1c665cdc057fb32f4d161d28aa5b2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sun, 21 May 2023 21:45:10 +0200 -Subject: [PATCH 4/4] fadvise: (test) test with 64k blocks -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This will allow the tests to also pass on systems with 64k pagesizes. - -Closes #2249 -Signed-off-by: Thomas Weißschuh ---- - tests/expected/fadvise/drop | 26 +++++++++++++------------- - tests/ts/fadvise/drop | 2 +- - 2 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop -index 25f23e050..e7bb26b6e 100644 ---- a/tests/expected/fadvise/drop -+++ b/tests/expected/fadvise/drop -@@ -1,23 +1,23 @@ -- RES SIZE FILE -- 32K 32K ddtest -+ RES SIZE FILE -+ 512K 512K ddtest - - whole file - status: 0 --RES SIZE FILE -- 0B 32K ddtest -+RES SIZE FILE -+ 0B 512K ddtest - --offset: 8192 -+offset: 131072 - status: 0 --RES SIZE FILE -- 8K 32K ddtest -+ RES SIZE FILE -+ 128K 512K ddtest - --length: 16384 -+length: 262144 - status: 0 -- RES SIZE FILE -- 16K 32K ddtest -+ RES SIZE FILE -+ 256K 512K ddtest - --offset: 8192, length: 16384 fd: 42 -+offset: 131072, length: 262144 fd: 42 - status: 0 -- RES SIZE FILE -- 16K 32K ddtest -+ RES SIZE FILE -+ 256K 512K ddtest - -diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop -index 6c4298e87..45dcb9110 100755 ---- a/tests/ts/fadvise/drop -+++ b/tests/ts/fadvise/drop -@@ -16,7 +16,7 @@ ts_check_prog "sleep" - ts_cd "$TS_OUTDIR" - - FILE="ddtest" --BS=4096 -+BS=65536 - COUNT=8 - - FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")" --- -2.40.0 - diff --git a/util-linux.changes b/util-linux.changes index 5b8ba48..d4e3321 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,57 @@ +------------------------------------------------------------------- +Thu Apr 4 12:27:18 UTC 2024 - Thorsten Kukuk + +- Update to release 2.40 + * Add lastlog2 + * agetty: Load autologin user from agetty.autologin credential + * agetty: use get_terminal_default_type() + * agetty: use sd_get_sessions() for number of users (#2088) + * blockdev: add support for BLKGETZONESZ + * cfdisk: ask y/n before wipe + * cfdisk: properly handle out-of-order partitions during resize + * chcpu: document limitations of -g + * chsh: use libeconf to read /etc/shells + * column: fix -l + * column: fix memory leak + * dmesg: fix FD leak + * dmesg: fix delta calculation + * dmesg: fix wrong size calculation + * dmesg: support reading kmsg format from file + * enosys: a new small command to make syscalls fail with ENOSYS + * exch: new command to atomically exchanges paths between two files + * fdisk: add support for partition resizing + * fdisk: remove usage of VLA + * fincore: add --output-all + * findmnt: add --list-columns + * findmnt: add -I, --dfi options for imitating the output of df -i + * findmnt: add inode-related columns for implementing "df -i" like output + * hexdump: add '--one-byte-hex' format option + * hwclock: add support for RTC_VL_READ/RTC_VL_CLR ioctls + * login: initialize noauth from login.noauth credential + * lsblk: add --filter + * lsblk: add --highlight + * lsblk: add --list-columns + * lsclocks: new command to show clocks + * lscpu: even more Arm part numbers + * mkfs.minix: handle 64bit time on 32bit system + * mkswap: implement --file + * mkswap: implement --offset + * mount: add --map-users and --map-groups convenience options + * nsenter: add option `-c` to join the cgroup of target process + * setarch: add riscv64/riscv32 support + * setpgid: new command to run a program in a new process group + * uuidd: add cont_clock persistence + * uuidgen: add option --count + * wall: query logind for list of users with tty (#2088) + * write: query logind for list of users with tty (#2088) + * libuuid: improved support for 64-bit time +- skip-lsfd-tests-PR2888.patch: skip some lsfd tests which OBS does + not support (https://github.com/util-linux/util-linux/issues/2822) +- use-logind-not-utmp.patch: removed, accepted upstream +- tests-increase-delay-for-waitpid-test.patch: removed, upstreamed +- 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch: reverted upstream +- util-linux-fix-tests-with-64k-pagesize.patch: was a backport + ------------------------------------------------------------------- Fri Feb 9 17:56:16 UTC 2024 - Stanislav Brabec diff --git a/util-linux.spec b/util-linux.spec index 7dbce33..a4359e7 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,7 +20,7 @@ # Parts description: # core: libraries, all binaries except those dependent on libsystemd -# systemd: binaries dependent on systemd, man pages (generator is dependent on ruby) +# systemd: binaries dependent on systemd or sqlite3, man pages (generator is dependent on ruby) # python: Python bindings %if "%{flavor}" == "" @@ -85,11 +85,11 @@ Group: Development/Languages/Python %endif # ulbuild == python -Version: 2.39.3 +Version: 2.40 Release: 0 License: GPL-2.0-or-later URL: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-%{version}.tar.xz Source2: util-linux-login_defs-check.sh Source3: util-linux-rpmlintrc Source7: baselibs.conf @@ -107,10 +107,7 @@ Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch Patch3: util-linux-bash-completion-su-chsh-l.patch -Patch4: 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch -Patch5: util-linux-fix-tests-with-64k-pagesize.patch -Patch6: use-logind-not-utmp.patch -Patch7: tests-increase-delay-for-waitpid-test.patch +Patch4: skip-lsfd-tests-PR2888.patch BuildRequires: audit-devel BuildRequires: bc @@ -132,7 +129,7 @@ BuildRequires: utempter-devel %endif BuildRequires: zlib-devel Requires(post): permissions -Requires(verify):permissions +Requires(verify): permissions # util-linux is part of VMInstall, but we can well build without it # Helps shorten a cycle and eliminate a bootstrap issue #!BuildIgnore: util-linux @@ -148,12 +145,16 @@ BuildRequires: libudev-devel BuildRequires: socat BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(sqlite3) BuildRequires: rubygem(asciidoctor) Supplements: (util-linux and systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/bin/logger # man pages were moved to -systemd subpackage with 2.38.x (SLE15 SP6, Leap 15.6) Conflicts: util-linux < 2.38 +# lastlog2 got merged into util-linux 2.40 +Provides: lastlog2 = %{version}-%{release} +Obsoletes: lastlog2 <= 1.3.1 %systemd_requires %endif # ulsubset == systemd @@ -368,6 +369,27 @@ unique IDs (UUIDs). %endif # ulsubset == core +%if "%ulsubset" == "systemd" +%package -n liblastlog2-2 +Summary: Library to report most recent login of users +License: BSD-2-Clause +Group: System/Libraries + +%description -n liblastlog2-2 +The liblastlog2 library provides various interfaces to read, write or modify the lastlog 2 database. + +%package -n liblastlog2-devel +Summary: Development files for the lastlog2 library +License: BSD-2-Clause +Group: Development/Libraries/C and C++ +Requires: liblastlog2-2 = %{version} + +%description -n liblastlog2-devel +Files to develop applications using the liblastlog2 library. + +%endif +# ulsubset == systemd + #################### # Systemd packages # #################### @@ -377,7 +399,7 @@ Summary: Tools for writing to TTYs License: BSD-3-Clause Requires(pre): group(tty) Requires(post): permissions -Requires(verify):permissions +Requires(verify): permissions Provides: util-linux:%{_bindir}/mesg Provides: util-linux:%{_bindir}/wall Provides: util-linux:%{_bindir}/write @@ -450,7 +472,7 @@ configure_options+="--without-python " # ulbuild == base %if "%ulsubset" == "core" -configure_options+="--without-systemd " +configure_options+="--without-systemd --disable-liblastlog2" %endif # ulsubset == core @@ -651,6 +673,12 @@ ln -sf /sbin/service %{buildroot}%{_sbindir}/rcfstrim %endif # ulsubset == core, ulbuild == base +%if "%ulsubset" == "systemd" +# No *.la packages +rm -r %{buildroot}%{_pam_moduledir}/*.la +%endif +# ulsubset == systemd + %endif # ulbuild == base @@ -853,6 +881,10 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %post -n util-linux-tty-tools %set_permissions %{_bindir}/wall %{_bindir}/write +%post -n liblastlog2-2 -p /sbin/ldconfig + +%postun -n liblastlog2-2 -p /sbin/ldconfig + %endif %dnl # ulsubset == systemd, pre & post %dnl @@ -947,6 +979,8 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_bindir}/colrm %core %{_bindir}/column %core %{_bindir}/dmesg +%core %{_bindir}/enosys +%core %{_bindir}/exch %core %{_bindir}/fadvise %core %{_bindir}/fallocate %core %{_bindir}/fincore @@ -980,6 +1014,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %endif # ul_extra_bin_sbin +%core %{_bindir}/lsclocks %core %{_bindir}/lscpu %core %{_bindir}/lsfd %core %{_bindir}/lsipc @@ -1001,6 +1036,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_bindir}/scriptlive %core %{_bindir}/scriptreplay %core %{_bindir}/setarch +%core %{_bindir}/setpgid %core %{_bindir}/setpriv %core %{_bindir}/setsid %core %{_bindir}/taskset @@ -1155,7 +1191,9 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/colrm.1.gz %core %{_mandir}/man1/column.1.gz %core %{_mandir}/man1/dmesg.1.gz +%core %{_mandir}/man1/enosys.1.gz %core %{_mandir}/man1/eject.1.gz +%core %{_mandir}/man1/exch.1.gz %core %{_mandir}/man1/fadvise.1.gz %core %{_mandir}/man1/fallocate.1.gz %core %{_mandir}/man1/fincore.1.gz @@ -1179,6 +1217,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/login.1.gz %core %{_mandir}/man1/look.1.gz %core %{_mandir}/man1/lscpu.1.gz +%core %{_mandir}/man1/lsclocks.1.gz %core %{_mandir}/man1/lsfd.1.gz %core %{_mandir}/man1/lsipc.1.gz %core %{_mandir}/man1/lsirq.1.gz @@ -1199,6 +1238,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/script.1.gz %core %{_mandir}/man1/scriptlive.1.gz %core %{_mandir}/man1/scriptreplay.1.gz +%core %{_mandir}/man1/setpgid.1.gz %core %{_mandir}/man1/setterm.1.gz %core %{_mandir}/man1/taskset.1.gz %core %{_mandir}/man1/ul.1.gz @@ -1214,6 +1254,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/waitpid.1.gz %core %{_mandir}/man5/adjtime_config.5.gz %core %{_mandir}/man5/fstab.5.gz +%core %{_mandir}/man5/scols-filter.5.gz %core %{_mandir}/man5/terminal-colors.d.5.gz %core %{_mandir}/man8/addpart.8.gz %core %{_mandir}/man8/agetty.8.gz @@ -1314,14 +1355,19 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : # ul_extra_bin_sbin %{_bindir}/findmnt +%{_bindir}/lastlog2 %{_bindir}/logger %{_bindir}/lsblk %{_bindir}/lslogins +%{_pam_moduledir}/pam_lastlog2.so %{_mandir}/man8/findmnt.8.gz +%{_mandir}/man8/lastlog2.8.gz %{_mandir}/man1/logger.1.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man1/lslogins.1.gz +%{_mandir}/man8/pam_lastlog2.8.gz +%{_unitdir}/lastlog2-import.service # Exclude core binaries bash-completion %exclude %{_datadir}/bash-completion/completions/addpart @@ -1342,6 +1388,8 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/delpart %exclude %{_datadir}/bash-completion/completions/dmesg %exclude %{_datadir}/bash-completion/completions/eject +%exclude %{_datadir}/bash-completion/completions/enosys +%exclude %{_datadir}/bash-completion/completions/exch %exclude %{_datadir}/bash-completion/completions/fallocate %exclude %{_datadir}/bash-completion/completions/fadvise %exclude %{_datadir}/bash-completion/completions/fdformat @@ -1369,6 +1417,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/ldattach %exclude %{_datadir}/bash-completion/completions/look %exclude %{_datadir}/bash-completion/completions/losetup +%exclude %{_datadir}/bash-completion/completions/lsclocks %exclude %{_datadir}/bash-completion/completions/lscpu %exclude %{_datadir}/bash-completion/completions/lsipc %exclude %{_datadir}/bash-completion/completions/lsirq @@ -1402,6 +1451,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/scriptlive %exclude %{_datadir}/bash-completion/completions/scriptreplay %exclude %{_datadir}/bash-completion/completions/setarch +%exclude %{_datadir}/bash-completion/completions/setpgid %exclude %{_datadir}/bash-completion/completions/setpriv %exclude %{_datadir}/bash-completion/completions/setsid %exclude %{_datadir}/bash-completion/completions/setterm @@ -1426,6 +1476,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/zramctl %{_datadir}/bash-completion/completions/findmnt +%{_datadir}/bash-completion/completions/lastlog2 %{_datadir}/bash-completion/completions/logger %{_datadir}/bash-completion/completions/lsblk %{_datadir}/bash-completion/completions/lslogins @@ -1602,6 +1653,15 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{_datadir}/bash-completion/completions/write %{_datadir}/bash-completion/completions/mesg +%files -n liblastlog2-2 +%{_libdir}/liblastlog2.so.2 +%{_libdir}/liblastlog2.so.2.* + +%files -n liblastlog2-devel +%{_libdir}/liblastlog2.so +%{_mandir}/man3/lastlog2.3.gz +%{_mandir}/man3/ll2_* + %endif # ulsubset == systemd From d78c89125836d090ebbf043f2e24623e9631c80429a44ba385e7eea7f1b3fd08 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 5 Apr 2024 10:33:55 +0000 Subject: [PATCH 02/11] Accepting request 1165500 from home:kukuk:cleanup - liblastlog2-devel: * Obsolete/provide lastlog2-devel for migration * Add header file to filelist OBS-URL: https://build.opensuse.org/request/show/1165500 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=553 --- util-linux.changes | 7 +++++++ util-linux.spec | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/util-linux.changes b/util-linux.changes index d4e3321..5f9bd83 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 5 09:33:46 UTC 2024 - Thorsten Kukuk + +- liblastlog2-devel: + * Obsolete/provide lastlog2-devel for migration + * Add header file to filelist + ------------------------------------------------------------------- Thu Apr 4 12:27:18 UTC 2024 - Thorsten Kukuk diff --git a/util-linux.spec b/util-linux.spec index a4359e7..768a782 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -383,6 +383,8 @@ Summary: Development files for the lastlog2 library License: BSD-2-Clause Group: Development/Libraries/C and C++ Requires: liblastlog2-2 = %{version} +Provides: lastlog2-devel = %{version}-%{release} +Obsoletes: lastlog2-devel <= 1.3.1 %description -n liblastlog2-devel Files to develop applications using the liblastlog2 library. @@ -1659,6 +1661,8 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %files -n liblastlog2-devel %{_libdir}/liblastlog2.so +%dir %{_includedir}/liblastlog2 +%{_includedir}/liblastlog2/lastlog2.h %{_mandir}/man3/lastlog2.3.gz %{_mandir}/man3/ll2_* From 8629e901ee4ce58ac46963dcae00589e9c75eb46c343a1d8f2045d224bd6cdf5 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 5 Apr 2024 15:48:05 +0000 Subject: [PATCH 03/11] Accepting request 1165691 from home:sbrabec:branches:ALP-fixes Return accidentally removed structured comments. OBS-URL: https://build.opensuse.org/request/show/1165691 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=554 --- util-linux.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index 768a782..be96eab 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -103,12 +103,13 @@ Source14: runuser.pamd Source15: runuser-l.pamd Source16: su-l.pamd Source51: blkid.conf +# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch +# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion. Patch3: util-linux-bash-completion-su-chsh-l.patch Patch4: skip-lsfd-tests-PR2888.patch - BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel From 494c422074ee0384f7a11e353fd0895c2690d99d489e92ed367353c7993260c9 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Sat, 6 Apr 2024 17:34:38 +0000 Subject: [PATCH 04/11] Accepting request 1165857 from home:sbrabec:branches:ALP-fixes - Re-enable lsfd tests using mkfds, as it is fixed now. OBS-URL: https://build.opensuse.org/request/show/1165857 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=555 --- util-linux.changes | 5 +++++ util-linux.spec | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 5f9bd83..a33332b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 5 15:55:44 UTC 2024 - Stanislav Brabec + +- Re-enable lsfd tests using mkfds, as it is fixed now. + ------------------------------------------------------------------- Fri Apr 5 09:33:46 UTC 2024 - Thorsten Kukuk diff --git a/util-linux.spec b/util-linux.spec index be96eab..993e354 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -733,8 +733,6 @@ export TS_OPT_misc_setarch_known_fail="yes" # Succeeds in local build, fails in OBS. export TS_OPT_hardlink_options_known_fail="yes" -export TS_OPT_lsfd_mkfds_rw_character_device_known_fail="yes" -export TS_OPT_lsfd_mkfds_symlink_known_fail="yes" # This does not work with a chroot build: / is not a mountpoint export TS_OPT_misc_mountpoint_known_fail="yes" # From 00862c3ba1eedf3b1e809c31d9436044a2a9a71f34f3e3701146e041034f555a Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Sun, 7 Apr 2024 20:16:21 +0000 Subject: [PATCH 05/11] Accepting request 1165983 from home:Andreas_Schwab:Factory - Skip tests marked as ts_skip_qemu_user when running under qemu - Mark racy lslocks test as known fail OBS-URL: https://build.opensuse.org/request/show/1165983 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=556 --- util-linux.changes | 6 ++++++ util-linux.spec | 16 ++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index a33332b..16e4a8b 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Apr 6 19:53:02 UTC 2024 - Andreas Schwab + +- Skip tests marked as ts_skip_qemu_user when running under qemu +- Mark racy lslocks test as known fail + ------------------------------------------------------------------- Fri Apr 5 15:55:44 UTC 2024 - Stanislav Brabec diff --git a/util-linux.spec b/util-linux.spec index 993e354..ac675ce 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -712,18 +712,8 @@ rm -r %{buildroot}{%{_bindir},%{_mandir},%{_datadir},%{_includedir},%{_libdir}/{ # mark some tests "known_fail" # %if 0%{?qemu_user_space_build} -export TS_OPT_fdisk_gpt_known_fail="yes" -export TS_OPT_fdisk_oddinput_known_fail="yes" -export TS_OPT_fdisk_sunlabel_known_fail="yes" -export TS_OPT_fincore_count_known_fail="yes" -export TS_OPT_libfdisk_gpt_known_fail="yes" -export TS_OPT_misc_flock_known_fail="yes" -export TS_OPT_misc_ionice_known_fail="yes" -export TS_OPT_misc_swaplabel_known_fail="yes" -export TS_OPT_kill_name_to_number_known_fail="yes" -export TS_OPT_kill_print_pid_known_fail="yes" -export TS_OPT_kill_queue_known_fail="yes" -export TS_OPT_uuid_uuidd_known_fail="yes" +# skip tests marked as ts_skip_qemu_user +export QEMU_USER=1 # unsupported syscall in script(1) ... might be fixed in qemu export TS_OPT_script_known_fail="yes" # may segfault on qemu-user-space @@ -735,6 +725,8 @@ export TS_OPT_misc_setarch_known_fail="yes" export TS_OPT_hardlink_options_known_fail="yes" # This does not work with a chroot build: / is not a mountpoint export TS_OPT_misc_mountpoint_known_fail="yes" +# This test appears to be racy +export TS_OPT_lslocks_lslocks_known_fail=yes # # hacks export PATH="$PATH:/sbin:/usr/sbin" From 8d2428ba269ee89e6217d45c3d4e569c245e74eb53fb66267b669ee53bfd7b7f Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Mon, 8 Apr 2024 12:51:13 +0000 Subject: [PATCH 06/11] Accepting request 1166119 from home:kukuk:cleanup - Add new lastlog2 sub-package (to solve migration problems due to rpm %post/%postun ordering) * Add pam-config calls to enable pam_lastlog2 * Add lastlog2.conf systemd-tmpfile to create database directory OBS-URL: https://build.opensuse.org/request/show/1166119 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=557 --- tmpfiles.lastlog2.conf | 5 +++++ util-linux.changes | 8 +++++++ util-linux.spec | 50 ++++++++++++++++++++++++++++++++++-------- 3 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 tmpfiles.lastlog2.conf diff --git a/tmpfiles.lastlog2.conf b/tmpfiles.lastlog2.conf new file mode 100644 index 0000000..d6dce30 --- /dev/null +++ b/tmpfiles.lastlog2.conf @@ -0,0 +1,5 @@ +# This file is for lastlog2/pam_lastlog2. +# +# See tmpfiles.d(5) for details +# +d /var/lib/lastlog 0755 - - - diff --git a/util-linux.changes b/util-linux.changes index 16e4a8b..9781913 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Apr 8 08:37:09 UTC 2024 - Thorsten Kukuk + +- Add new lastlog2 sub-package (to solve migration problems due to + rpm %post/%postun ordering) + * Add pam-config calls to enable pam_lastlog2 + * Add lastlog2.conf systemd-tmpfile to create database directory + ------------------------------------------------------------------- Sat Apr 6 19:53:02 UTC 2024 - Andreas Schwab diff --git a/util-linux.spec b/util-linux.spec index ac675ce..99e175e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -102,6 +102,7 @@ Source13: %{_name}.keyring Source14: runuser.pamd Source15: runuser-l.pamd Source16: su-l.pamd +Source17: tmpfiles.lastlog2.conf Source51: blkid.conf # PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff @@ -153,9 +154,6 @@ Supplements: (util-linux and systemd) Provides: util-linux:/bin/logger # man pages were moved to -systemd subpackage with 2.38.x (SLE15 SP6, Leap 15.6) Conflicts: util-linux < 2.38 -# lastlog2 got merged into util-linux 2.40 -Provides: lastlog2 = %{version}-%{release} -Obsoletes: lastlog2 <= 1.3.1 %systemd_requires %endif # ulsubset == systemd @@ -371,6 +369,17 @@ unique IDs (UUIDs). # ulsubset == core %if "%ulsubset" == "systemd" + +%package -n lastlog2 +Summary: Reports most recent login of users +License: BSD-2-Clause +Group: System/Base +Requires(pre): pam-config >= 2.4 +Requires(post): pam-config >= 2.4 + +%description -n lastlog2 +pam_lastlog2 and lastlog2 are Y2038 safe versions of the old lastlog utility. pam_lastlog2 collects all data in a sqlite3 database and lastlog2 formats and prints the contents. The username, port, and last login time will be printed. + %package -n liblastlog2-2 Summary: Library to report most recent login of users License: BSD-2-Clause @@ -643,6 +652,9 @@ mkdir -p %{buildroot}/run/uuidd # create it for uuidd. See boo#1206690. mkdir -p %{buildroot}%{_sharedstatedir}/libuuid/ touch %{buildroot}%{_sharedstatedir}/libuuid/clock.txt +# Install systemd-tmpfile for lastlog database +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 644 %{SOURCE17} %{buildroot}%{_tmpfilesdir}/lastlog2.conf %endif # ulsubset == systemd, ulbuild == base @@ -845,6 +857,23 @@ done %postun %service_del_postun fstrim.service fstrim.timer +%pre -n lastlog2 +%service_add_pre lastlog2-import.service + +%post -n lastlog2 +%tmpfiles_create lastlog2.conf +%service_add_post lastlog2-import.service +%{_sbindir}/pam-config -a --lastlog2 --lastlog2-silent_if=gdm,gdm-password,lxdm,lightdm,mdm,sddm + +%preun -n lastlog2 +%service_del_preun lastlog2-import.service + +%postun -n lastlog2 +if [ "$1" -eq 0 ]; then + %{_sbindir}/pam-config -d --lastlog2 +fi +%service_del_postun lastlog2-import.service + %pre -n uuidd %if 0%{?suse_version} < 1330 @@ -1348,19 +1377,14 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : # ul_extra_bin_sbin %{_bindir}/findmnt -%{_bindir}/lastlog2 %{_bindir}/logger %{_bindir}/lsblk %{_bindir}/lslogins -%{_pam_moduledir}/pam_lastlog2.so %{_mandir}/man8/findmnt.8.gz -%{_mandir}/man8/lastlog2.8.gz %{_mandir}/man1/logger.1.gz %{_mandir}/man8/lsblk.8.gz %{_mandir}/man1/lslogins.1.gz -%{_mandir}/man8/pam_lastlog2.8.gz -%{_unitdir}/lastlog2-import.service # Exclude core binaries bash-completion %exclude %{_datadir}/bash-completion/completions/addpart @@ -1469,7 +1493,6 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/zramctl %{_datadir}/bash-completion/completions/findmnt -%{_datadir}/bash-completion/completions/lastlog2 %{_datadir}/bash-completion/completions/logger %{_datadir}/bash-completion/completions/lsblk %{_datadir}/bash-completion/completions/lslogins @@ -1646,6 +1669,15 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{_datadir}/bash-completion/completions/write %{_datadir}/bash-completion/completions/mesg +%files -n lastlog2 +%{_bindir}/lastlog2 +%{_pam_moduledir}/pam_lastlog2.so +%{_mandir}/man8/lastlog2.8.gz +%{_mandir}/man8/pam_lastlog2.8.gz +%{_unitdir}/lastlog2-import.service +%{_tmpfilesdir}/lastlog2.conf +%{_datadir}/bash-completion/completions/lastlog2 + %files -n liblastlog2-2 %{_libdir}/liblastlog2.so.2 %{_libdir}/liblastlog2.so.2.* From ca9a9a56c42fa1b11c3d1928277d4e99265ed021c7d711841a25e58e10ae59c9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 15 Apr 2024 14:11:45 +0000 Subject: [PATCH 07/11] Accepting request 1167819 from home:schubi2 - Added "Requires.private: libeconf" in order to build with static libeconf.a . OBS-URL: https://build.opensuse.org/request/show/1167819 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=558 --- static_lib.patch | 10 ++++++++++ util-linux.changes | 6 ++++++ util-linux.spec | 7 ++++--- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 static_lib.patch diff --git a/static_lib.patch b/static_lib.patch new file mode 100644 index 0000000..9b5d507 --- /dev/null +++ b/static_lib.patch @@ -0,0 +1,10 @@ +diff -ur org/libblkid/blkid.pc.in patch/libblkid/blkid.pc.in +--- org/libblkid/blkid.pc.in 2024-01-31 11:02:15.460811568 +0100 ++++ patch/libblkid/blkid.pc.in 2024-04-15 15:19:34.288703597 +0200 +@@ -6,5 +6,6 @@ + Name: blkid + Description: Block device id library + Version: @LIBBLKID_VERSION@ ++Requires.private: libeconf + Cflags: -I${includedir}/blkid + Libs: -L${libdir} -lblkid diff --git a/util-linux.changes b/util-linux.changes index 9781913..a4a3622 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 15 13:27:41 UTC 2024 - Stefan Schubert + +- Added "Requires.private: libeconf" in order to build with static + libeconf.a . + ------------------------------------------------------------------- Mon Apr 8 08:37:09 UTC 2024 - Thorsten Kukuk diff --git a/util-linux.spec b/util-linux.spec index 99e175e..ccf4b94 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -111,6 +111,7 @@ Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch # PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion. Patch3: util-linux-bash-completion-su-chsh-l.patch Patch4: skip-lsfd-tests-PR2888.patch +Patch5: static_lib.patch BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -118,7 +119,7 @@ BuildRequires: fdupes BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: libcap-ng-devel -BuildRequires: libeconf-devel +BuildRequires: libeconf-devel-static BuildRequires: libselinux-devel BuildRequires: libsepol-devel BuildRequires: libtool @@ -131,7 +132,7 @@ BuildRequires: utempter-devel %endif BuildRequires: zlib-devel Requires(post): permissions -Requires(verify): permissions +Requires(verify):permissions # util-linux is part of VMInstall, but we can well build without it # Helps shorten a cycle and eliminate a bootstrap issue #!BuildIgnore: util-linux @@ -411,7 +412,7 @@ Summary: Tools for writing to TTYs License: BSD-3-Clause Requires(pre): group(tty) Requires(post): permissions -Requires(verify): permissions +Requires(verify):permissions Provides: util-linux:%{_bindir}/mesg Provides: util-linux:%{_bindir}/wall Provides: util-linux:%{_bindir}/write From fbce8abdecccf311220ab041efde89c989a9960f7f807331e8457609e15a4a27 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 15 Apr 2024 14:51:02 +0000 Subject: [PATCH 08/11] update patch description add patch to .changes file to please the bots OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=559 --- static_lib.patch | 21 +++++++++++++++++++++ util-linux.changes | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/static_lib.patch b/static_lib.patch index 9b5d507..d196cb1 100644 --- a/static_lib.patch +++ b/static_lib.patch @@ -1,3 +1,24 @@ +From: Stefan Schubert +From: Jan Engelhardt +Date: 2024-04-15T13:34:15Z + +[Original description: Added "Requires.private: libeconf" in order to +build with static libeconf.a.] + +This patch addresses a build failure in libblkid-using programs when +one attempts to static-link the program: + +$ g++ blkid_get_cache.cpp -static `pkg-config blkid --cflags --libs --static` +ld: libblkid.a(la-config.o): in function `blkid_read_config': +libblkid/src/config.c:160:(.text+0x150): undefined reference to `econf_readFile' +ld: libblkid/src/config.c:241:(.text+0x1a1): undefined reference to `econf_freeFile' + +The patch is not upstreamable in this form, as the presence of the +Requires.private line needs to be conditionalized upon +``HAVE_LIBECONF`` (cf. meson.build/configure.ac). + +[Description updated; --jengelh] + diff -ur org/libblkid/blkid.pc.in patch/libblkid/blkid.pc.in --- org/libblkid/blkid.pc.in 2024-01-31 11:02:15.460811568 +0100 +++ patch/libblkid/blkid.pc.in 2024-04-15 15:19:34.288703597 +0200 diff --git a/util-linux.changes b/util-linux.changes index a4a3622..5bca087 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,8 +1,8 @@ ------------------------------------------------------------------- Mon Apr 15 13:27:41 UTC 2024 - Stefan Schubert -- Added "Requires.private: libeconf" in order to build with static - libeconf.a . +- Added static_lib.patch to resolve build failure when using + libblkid.pc in --static mode ------------------------------------------------------------------- Mon Apr 8 08:37:09 UTC 2024 - Thorsten Kukuk From a2db911746b07400d968cb3548d0f7411347d5b2587c49cc17d51bf1e61e8dbe Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 18 Apr 2024 12:23:28 +0000 Subject: [PATCH 09/11] Add missing libblkid-devel-static -> libeconf-devel-static relation OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=560 --- util-linux.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index ccf4b94..347fc06 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -132,7 +132,7 @@ BuildRequires: utempter-devel %endif BuildRequires: zlib-devel Requires(post): permissions -Requires(verify):permissions +Requires(verify): permissions # util-linux is part of VMInstall, but we can well build without it # Helps shorten a cycle and eliminate a bootstrap issue #!BuildIgnore: util-linux @@ -248,6 +248,7 @@ Summary: Development files for the filesystem detection library License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Requires: libblkid-devel = %{version} +Requires: libeconf-devel-static %description -n libblkid-devel-static Files needed to develop applications using the library for filesystem @@ -412,7 +413,7 @@ Summary: Tools for writing to TTYs License: BSD-3-Clause Requires(pre): group(tty) Requires(post): permissions -Requires(verify):permissions +Requires(verify): permissions Provides: util-linux:%{_bindir}/mesg Provides: util-linux:%{_bindir}/wall Provides: util-linux:%{_bindir}/write From a7b911f7cf057e955e6395cc2db18e62915b5980092f76e87d5e1f0f58c75722 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 7 May 2024 08:28:01 +0000 Subject: [PATCH 10/11] Accepting request 1172372 from home:sbrabec:branches:util-linux-sub - Don't delete binaries not common for all architectures. Create an util-linux-extra subpackage instead, so users of third party tools can use them. (bsc#1222285) OBS-URL: https://build.opensuse.org/request/show/1172372 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=561 --- util-linux.changes | 7 +++++ util-linux.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/util-linux.changes b/util-linux.changes index 5bca087..6f810cf 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 6 17:09:08 UTC 2024 - Stanislav Brabec + +- Don't delete binaries not common for all architectures. Create an + util-linux-extra subpackage instead, so users of third party + tools can use them. (bsc#1222285) + ------------------------------------------------------------------- Mon Apr 15 13:27:41 UTC 2024 - Stefan Schubert diff --git a/util-linux.spec b/util-linux.spec index 347fc06..8dc0164 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -225,6 +225,18 @@ mount program, the fdisk configuration tool, and more. # Core packages # ################# %if "%ulsubset" == "core" +%ifarch s390 s390x ia64 m68k sparc +%package -n util-linux-extra +Summary: A collection of basic system utilities - extra utilities +License: GPL-2.0-or-later +Group: System/Base + +%description -n util-linux-extra +This package contains an util-linux tools that have no real use on a +particular platform. It contains programs that are not well usable for the +platform, but they can be required by scripts or third party tools. +%endif + %package -n libblkid1 Summary: Filesystem detection library License: LGPL-2.1-or-later @@ -613,6 +625,7 @@ chmod 755 %{buildroot}%{_sbindir}/flushb # arch dependent +%if "%ulsubset" != "core" %ifarch s390 s390x rm -f %{buildroot}%{_sysconfdir}/fdprm rm -f %{buildroot}%{_bindir}/setterm @@ -638,6 +651,8 @@ rm -f %{buildroot}%{_sbindir}/fdisk rm -f %{buildroot}%{_mandir}/man8/fdisk.8* %endif # arch ia64 m68k +%endif +# ulsubset != core # create list of setarch(8) symlinks find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ @@ -1568,6 +1583,56 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : # Core packages files # ####################### %if "%ulsubset" == "core" +%ifarch s390 s390x ia64 m68k sparc +%files -n util-linux-extra +# +# Files not common for all architectures +%ifarch ia64 m68k + +%if %{ul_extra_bin_sbin} +%core /sbin/fdisk +%endif +# ul_extra_bin_sbin + +%core %{_sbindir}/fdisk +%core %{_mandir}/man8/fdisk.8.gz +%endif +# arch ia64 m68k + +%ifarch %sparc ia64 m68k +%core %{_mandir}/man8/cfdisk.8.gz +%core %{_mandir}/man8/sfdisk.8.gz + +%if %{ul_extra_bin_sbin} +%core /sbin/cfdisk +%core /sbin/sfdisk +%endif +# ul_extra_bin_sbin + +%core %{_sbindir}/cfdisk +%core %{_sbindir}/sfdisk +%endif +# arch sparc ia64 m68k + +%ifarch s390 s390x +%core %{_sbindir}/fdformat + +%if %{ul_extra_bin_sbin} +%core /sbin/hwclock +%endif +# ul_extra_bin_sbin + +%core %{_sbindir}/hwclock +%core %{_bindir}/setterm +%core %{_sbindir}/tunelp +%core %{_mandir}/man8/fdformat.8.gz +%core %{_mandir}/man8/hwclock.8.gz +%core %{_mandir}/man8/tunelp.8.gz +%endif +# arch s390 +%endif +# arch s390 s390x ia64 m68k sparc + %files -n libblkid1 %{_libdir}/libblkid.so.1 %{_libdir}/libblkid.so.1.* From 2e3ca9416a0a9ebf5eb6242dfe4fee3244156e007904684f4a1f87927c6594d1 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Thu, 9 May 2024 12:12:43 +0000 Subject: [PATCH 11/11] Accepting request 1172771 from home:kukuk:cleanup - Update to version 2.40.1 * agetty: don't overwrite TERM passed by the user * fsck.minix: fix possible overrun * libblkid: fix segfault when blkid.conf doesn't exist * libfdisk: add initializer to geometry * libmount: fix access check for utab in context * libmount: fix umount --read-only * lsns: fix netns use - Drop skip-lsfd-tests-PR2888.patch, was a backport OBS-URL: https://build.opensuse.org/request/show/1172771 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=562 --- skip-lsfd-tests-PR2888.patch | 60 ------------------------------------ util-linux-2.40.1.tar.sign | 16 ++++++++++ util-linux-2.40.1.tar.xz | 3 ++ util-linux-2.40.tar.sign | 16 ---------- util-linux-2.40.tar.xz | 3 -- util-linux.changes | 13 ++++++++ util-linux.spec | 3 +- 7 files changed, 33 insertions(+), 81 deletions(-) delete mode 100644 skip-lsfd-tests-PR2888.patch create mode 100644 util-linux-2.40.1.tar.sign create mode 100644 util-linux-2.40.1.tar.xz delete mode 100644 util-linux-2.40.tar.sign delete mode 100644 util-linux-2.40.tar.xz diff --git a/skip-lsfd-tests-PR2888.patch b/skip-lsfd-tests-PR2888.patch deleted file mode 100644 index 9363695..0000000 --- a/skip-lsfd-tests-PR2888.patch +++ /dev/null @@ -1,60 +0,0 @@ -From f98a4c12b366ae2b5e01fa30d72eef34f3bab681 Mon Sep 17 00:00:00 2001 -From: Masatake YAMATO -Date: Tue, 2 Apr 2024 06:34:40 +0900 -Subject: [PATCH 2/2] tests: (test_mkfds::sockdiag) verify the recieved message - to detect whether the socket is usable or not - -Close #2822. - -Signed-off-by: Masatake YAMATO ---- - tests/helpers/test_mkfds.c | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - -diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c -index 39427ba09a..4b138c2efd 100644 ---- a/tests/helpers/test_mkfds.c -+++ b/tests/helpers/test_mkfds.c -@@ -3200,6 +3200,25 @@ static int send_diag_request(int diagsd, void *req, size_t req_size) - return 0; - } - -+static int recv_diag_request(int diagsd) -+{ -+ __attribute__((aligned(sizeof(void *)))) uint8_t buf[8192]; -+ const struct nlmsghdr *h; -+ int r = recvfrom(diagsd, buf, sizeof(buf), 0, NULL, NULL);; -+ if (r < 0) -+ return errno; -+ -+ h = (void *)buf; -+ if (!NLMSG_OK(h, (size_t)r)) -+ return -1; -+ -+ if (h->nlmsg_type == NLMSG_ERROR) { -+ struct nlmsgerr *e = (struct nlmsgerr *)NLMSG_DATA(h); -+ return - e->error; -+ } -+ return 0; -+} -+ - static void *make_sockdiag(const struct factory *factory, struct fdesc fdescs[], - int argc, char ** argv) - { -@@ -3243,6 +3262,16 @@ static void *make_sockdiag(const struct factory *factory, struct fdesc fdescs[], - err(EXIT_FAILURE, "failed in sendmsg()"); - } - -+ e = recv_diag_request(diagsd); -+ if (e != 0) { -+ close (diagsd); -+ if (e == ENOENT) -+ err(EXIT_ENOENT, "failed in recvfrom()"); -+ if (e > 0) -+ err(EXIT_FAILURE, "failed in recvfrom()"); -+ if (e < 0) -+ errx(EXIT_FAILURE, "failed in recvfrom() => -1"); -+ } - - if (diagsd != fdescs[0].fd) { - if (dup2(diagsd, fdescs[0].fd) < 0) { diff --git a/util-linux-2.40.1.tar.sign b/util-linux-2.40.1.tar.sign new file mode 100644 index 0000000..4ca2db7 --- /dev/null +++ b/util-linux-2.40.1.tar.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmY4lxMACgkQ5LcdXuw5 +woSckw//ZmoxCcjdDBv5LkAK0Yl5EMKZYzkvqswsp/Uwllgevb/FcCGwZ+F49RM3 +H8F5Kj5CIJW9wh2UNWxaMm4MxcGd3eG2NEwgYh8RiXSS84zEL78yaIJLyFlPziMp +kZb0fpc2HpyCzDrvtlw6S5TGkUUx2uFqTQQG7GFd6TOlbPpGp4OpqY3adf85mwmr +NKy0XbYLo6sqGENz6Uklbf5Qhc19UEEc1jScOYNpkuCxhRQguxq3Jc6W8A8DQkjB +EWaw9Q1XYDV3Bnd40F0K+bo3CYB6z3pMM51NlsYxV0fKt/SoEvJw3S7u3VcbtJWn +S6xl6q/sMINDrMIpSL5PAAg5yoBNIIoWW7OxSh0nv6ctp9dmln0sKBtXNr09zTWT +q9mLUt7LwXB6LT3XI64262vF21bKq/hQO8IObsx8vfPSlp1SyGq7VqGh6QVbkjx6 +2vA7ueV5jfIKiAlZAcXz6NHjwxcBqYq7wASeUEmYPgh5lb4HBOuOgatYBNAmQoxp +2t5AXPPhI/u95GRa4WntpgqlQm/1CKA9kHiezvO4P0lnpUluT24DXclMTcq4xaiN +ci+dzVF2EPRoPJgYy9crKNsr7dftVtvAVXIRk3UaTwDe1o7OK4vSykDc0PSNxsHQ +mMabBuFt17oweonotSOZ8z7blHnCVnzZWVxyIxC3Pw/0ChHFAkw= +=68JD +-----END PGP SIGNATURE----- diff --git a/util-linux-2.40.1.tar.xz b/util-linux-2.40.1.tar.xz new file mode 100644 index 0000000..ea93fed --- /dev/null +++ b/util-linux-2.40.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f +size 8823784 diff --git a/util-linux-2.40.tar.sign b/util-linux-2.40.tar.sign deleted file mode 100644 index 4157924..0000000 --- a/util-linux-2.40.tar.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmYECuEACgkQ5LcdXuw5 -woTCTg/9HwvHA+Gzd1rMO4UakgavnNqxzFP0rcC5HTTPHHX7rXLWVtd4u2pjStCt -EWodiy7doRRuVOAKwn93nygt/m22w23omfODdTWejCAX1ALx00LliiySkFDFWUlY -angRDG4p8nyLn03I3XBAWEvcWa7OIM4ddXlEuWSTNHTeBWSzCs0be0bbFgws2m/p -ejqo7CAHXNVx4lbtsgLQgemAkr6WhALxPEcBrXj2V/rwYF8a/uwnWK3AfGDaTeoK -DeYYsgWGkQdsPL3GDPiDttYtO9sJC8THvEOA1l0pzRyA0lI4hRbcqTXD+kvLGrZq -csk5dprZ+CvejmBtagymQoSfAEJH0b6rKBmzJYhgbKreM8byy51sQ4pmUVAB/pBz -MGAtj7PAAwcrot3CC5whMHsnB77qx0xBDlxrc+3BUKgZBiVhqe55gVGh2LnLdgCa -rAVA3QhjgZlvuH/EsVJIv0cCIBMpYTyUJLDW1Or1CLDKAl+nR2Xu9X9Hj5sXc3In -k9oU6i8/DOi1EZWJqwhf4nFZMFHgwgkHHaOXDLwlTTCFN11pOrEAnxRcsC/319Za -RlfMhX56J+GYhmFW8I5OxRrvS6PInZ4WZ/1+Qzdmas/nqBGbnctZGqv3bF/Cp/qQ -KAYTcaGqvjURmM9vcRWKjW33ZtGkD8JDrt1DvC3yQ/R/h+/Hy6I= -=7ZO0 ------END PGP SIGNATURE----- diff --git a/util-linux-2.40.tar.xz b/util-linux-2.40.tar.xz deleted file mode 100644 index 940fbf8..0000000 --- a/util-linux-2.40.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d57a626081f9ead02fa44c63a6af162ec19c58f53e993f206ab7c3a6641c2cd7 -size 8762888 diff --git a/util-linux.changes b/util-linux.changes index 6f810cf..4c6a7bf 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed May 8 14:06:51 UTC 2024 - Thorsten Kukuk + +- Update to version 2.40.1 + * agetty: don't overwrite TERM passed by the user + * fsck.minix: fix possible overrun + * libblkid: fix segfault when blkid.conf doesn't exist + * libfdisk: add initializer to geometry + * libmount: fix access check for utab in context + * libmount: fix umount --read-only + * lsns: fix netns use +- Drop skip-lsfd-tests-PR2888.patch, was a backport + ------------------------------------------------------------------- Mon May 6 17:09:08 UTC 2024 - Stanislav Brabec diff --git a/util-linux.spec b/util-linux.spec index 8dc0164..fce4065 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -85,7 +85,7 @@ Group: Development/Languages/Python %endif # ulbuild == python -Version: 2.40 +Version: 2.40.1 Release: 0 License: GPL-2.0-or-later URL: https://www.kernel.org/pub/linux/utils/util-linux/ @@ -110,7 +110,6 @@ Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch # PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion. Patch3: util-linux-bash-completion-su-chsh-l.patch -Patch4: skip-lsfd-tests-PR2888.patch Patch5: static_lib.patch BuildRequires: audit-devel BuildRequires: bc