Minor release. Mostly bugfixes to enosys and lsfd. * Introduce ipcmk. No busybox counterpart. * Remove patches. They've been included in this release.
Signed-off-by: Christian Melki <christian.me...@t2data.com> --- .../0001-build-sys-add-disable-waitpid.patch | 28 ----- ...y-build-when-pidfd_open-is-available.patch | 42 ------- ...ck-for-availability-of-mount_setattr.patch | 105 ------------------ patches/util-linux-2.39/autogen.sh | 1 - patches/util-linux-2.39/series | 6 - rules/util-linux.in | 6 + rules/util-linux.make | 5 +- 7 files changed, 9 insertions(+), 184 deletions(-) delete mode 100644 patches/util-linux-2.39/0001-build-sys-add-disable-waitpid.patch delete mode 100644 patches/util-linux-2.39/0002-waitpid-only-build-when-pidfd_open-is-available.patch delete mode 100644 patches/util-linux-2.39/0003-libmount-check-for-availability-of-mount_setattr.patch delete mode 120000 patches/util-linux-2.39/autogen.sh delete mode 100644 patches/util-linux-2.39/series diff --git a/patches/util-linux-2.39/0001-build-sys-add-disable-waitpid.patch b/patches/util-linux-2.39/0001-build-sys-add-disable-waitpid.patch deleted file mode 100644 index d6130e7e6..000000000 --- a/patches/util-linux-2.39/0001-build-sys-add-disable-waitpid.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Frantisek Sumsal <franti...@sumsal.cz> -Date: Thu, 18 May 2023 18:56:15 +0200 -Subject: [PATCH] build-sys: add --disable-waitpid - -The new pidfd stuff waitpid uses is not compatible with older kernel -headers, but the rest of the util-linux is still perfectly fine, so -allow disabling just the waitpid utility to make the builds happy again. ---- - configure.ac | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 6fac9cb4f0a9..30799c35ac6d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1847,7 +1847,11 @@ UL_BUILD_INIT([fadvise], [check]) - UL_REQUIRES_LINUX([fadvise]) - AM_CONDITIONAL([BUILD_FADVISE], [test "x$build_fadvise" = xyes]) - --UL_BUILD_INIT([waitpid], [check]) -+AC_ARG_ENABLE([waitpid], -+ AS_HELP_STRING([--disable-waitpid], [do not build waitpid]), -+ [], [UL_DEFAULT_ENABLE([waitpidd], [check])] -+) -+UL_BUILD_INIT([waitpid]) - UL_REQUIRES_LINUX([waitpid]) - AM_CONDITIONAL([BUILD_WAITPID], [test "x$build_waitpid" = xyes]) - diff --git a/patches/util-linux-2.39/0002-waitpid-only-build-when-pidfd_open-is-available.patch b/patches/util-linux-2.39/0002-waitpid-only-build-when-pidfd_open-is-available.patch deleted file mode 100644 index e2576d56c..000000000 --- a/patches/util-linux-2.39/0002-waitpid-only-build-when-pidfd_open-is-available.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <tho...@t-8ch.de> -Date: Mon, 22 May 2023 18:24:47 +0200 -Subject: [PATCH] waitpid: only build when pidfd_open is available -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes #2256 - -[k...@redhat.com: - fix UL_BUILD_INIT() use] - -Signed-off-by: Thomas Weißschuh <tho...@t-8ch.de> -Signed-off-by: Karel Zak <k...@redhat.com> ---- - configure.ac | 1 + - meson.build | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 30799c35ac6d..11f2d599dde5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1853,6 +1853,7 @@ AC_ARG_ENABLE([waitpid], - ) - UL_BUILD_INIT([waitpid]) - UL_REQUIRES_LINUX([waitpid]) -+UL_REQUIRES_SYSCALL_CHECK([waitpid], [UL_CHECK_SYSCALL([pidfd_open])], [pidfd_open]) - AM_CONDITIONAL([BUILD_WAITPID], [test "x$build_waitpid" = xyes]) - - UL_BUILD_INIT([getopt], [yes]) -diff --git a/meson.build b/meson.build -index c56f83b1fa53..641d23674776 100644 ---- a/meson.build -+++ b/meson.build -@@ -2843,6 +2843,7 @@ if not is_disabler(exe) - bashcompletions += ['fadvise'] - endif - -+# XXX: HAVE_PIDFD_OPEN - exe = executable( - 'waitpid', - waitpid_sources, diff --git a/patches/util-linux-2.39/0003-libmount-check-for-availability-of-mount_setattr.patch b/patches/util-linux-2.39/0003-libmount-check-for-availability-of-mount_setattr.patch deleted file mode 100644 index 5ac625b22..000000000 --- a/patches/util-linux-2.39/0003-libmount-check-for-availability-of-mount_setattr.patch +++ /dev/null @@ -1,105 +0,0 @@ -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <tho...@t-8ch.de> -Date: Sat, 20 May 2023 06:38:20 +0200 -Subject: [PATCH] libmount: check for availability of mount_setattr -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If mount_setattr is not available but needed fall back to the legacy -mount API. - -Fixes #2247 - -Signed-off-by: Thomas Weißschuh <tho...@t-8ch.de> ---- - libmount/src/hook_mount.c | 23 +++++++++++++++++++++-- - tests/expected/mount/fallback-mount_setattr | 1 + - tests/ts/mount/fallback | 16 ++++++++++++++++ - 3 files changed, 38 insertions(+), 2 deletions(-) - create mode 100644 tests/expected/mount/fallback-mount_setattr - -diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c -index a324637cb73e..01de9e1c5739 100644 ---- a/libmount/src/hook_mount.c -+++ b/libmount/src/hook_mount.c -@@ -510,6 +510,15 @@ static inline int fsopen_is_supported(void) - return rc; - } - -+static inline int mount_setattr_is_supported(void) -+{ -+ int rc; -+ -+ errno = 0; -+ rc = mount_setattr(-1, NULL, 0, NULL, 0); -+ return !(rc == -1 && errno == ENOSYS); -+} -+ - /* - * open_tree() and fsopen() - */ -@@ -675,9 +684,14 @@ static int hook_prepare(struct libmnt_context *cxt, - /* call mount_setattr() */ - if (!rc - && cxt->helper == NULL -- && (set != 0 || clr != 0 || (flags & MS_REMOUNT))) -+ && (set != 0 || clr != 0 || (flags & MS_REMOUNT))) { -+ if (!mount_setattr_is_supported()) { -+ hookset_deinit(cxt, hs); -+ return 1; -+ } - rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT, NULL, - hook_set_vfsflags); -+ } - - /* call move_mount() to attach target */ - if (!rc -@@ -688,9 +702,14 @@ static int hook_prepare(struct libmnt_context *cxt, - hook_attach_target); - - /* set propagation (has to be attached to VFS) */ -- if (!rc && mnt_optlist_get_propagation(ol)) -+ if (!rc && mnt_optlist_get_propagation(ol)) { -+ if (!mount_setattr_is_supported()) { -+ hookset_deinit(cxt, hs); -+ return 1; -+ } - rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT_POST, NULL, - hook_set_propagation); -+ } - - DBG(HOOK, ul_debugobj(hs, "prepare mount done [rc=%d]", rc)); - return rc; -diff --git a/tests/expected/mount/fallback-mount_setattr b/tests/expected/mount/fallback-mount_setattr -new file mode 100644 -index 000000000000..3e18ebf09ec4 ---- /dev/null -+++ b/tests/expected/mount/fallback-mount_setattr -@@ -0,0 +1 @@ -+private -diff --git a/tests/ts/mount/fallback b/tests/ts/mount/fallback -index fe932ee78a62..1f0c47d6763f 100755 ---- a/tests/ts/mount/fallback -+++ b/tests/ts/mount/fallback -@@ -68,5 +68,21 @@ $TS_CMD_UMOUNT $MOUNTPOINT - ts_finalize_subtest - - -+ts_init_subtest "mount_setattr" -+"$TS_CMD_MOUNT" "$DEVICE" "$MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG -+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts" -+$TS_CMD_ENOSYS -s mount_setattr -- \ -+ "$TS_CMD_MOUNT" -o remount,ro "$MOUNTPOINT" \ -+ >> $TS_OUTPUT 2>> $TS_ERRLOG -+$TS_CMD_FINDMNT --kernel --mountpoint "$MOUNTPOINT" --options "ro" &> /dev/null -+[ "$?" == "0" ] || ts_die "Cannot find read-only in $MOUNTPOINT in /proc/self/mountinfo" -+$TS_CMD_ENOSYS -s mount_setattr -- \ -+ "$TS_CMD_MOUNT" --make-slave "$MOUNTPOINT" \ -+ >> $TS_OUTPUT 2>> $TS_ERRLOG -+$TS_CMD_FINDMNT -n --kernel --mountpoint "$MOUNTPOINT" -o PROPAGATION >> $TS_OUTPUT -+$TS_CMD_UMOUNT $MOUNTPOINT -+ts_finalize_subtest -+ -+ - ts_finalize - diff --git a/patches/util-linux-2.39/autogen.sh b/patches/util-linux-2.39/autogen.sh deleted file mode 120000 index 9f8a4cb7d..000000000 --- a/patches/util-linux-2.39/autogen.sh +++ /dev/null @@ -1 +0,0 @@ -../autogen.sh \ No newline at end of file diff --git a/patches/util-linux-2.39/series b/patches/util-linux-2.39/series deleted file mode 100644 index c34fa1c28..000000000 --- a/patches/util-linux-2.39/series +++ /dev/null @@ -1,6 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-build-sys-add-disable-waitpid.patch -0002-waitpid-only-build-when-pidfd_open-is-available.patch -0003-libmount-check-for-availability-of-mount_setattr.patch -# 10fdd106143b7ca5d1d69ef1ecd0f970 - git-ptx-patches magic diff --git a/rules/util-linux.in b/rules/util-linux.in index 5c0ccf058..b906ba0f3 100644 --- a/rules/util-linux.in +++ b/rules/util-linux.in @@ -344,6 +344,12 @@ config UTIL_LINUX_HWCLOCK comment "BusyBox' hwclock is selected!" depends on BUSYBOX_HWCLOCK +config UTIL_LINUX_IPCMK + bool + prompt "ipcmk" + help + ipcmk lets you create various SysV IPC objects. + config UTIL_LINUX_IPCRM bool prompt "ipcrm" diff --git a/rules/util-linux.make b/rules/util-linux.make index cf2a0e85b..d6bc52c0f 100644 --- a/rules/util-linux.make +++ b/rules/util-linux.make @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_UTIL_LINUX) += util-linux # # Paths and names # -UTIL_LINUX_VERSION := 2.39 -UTIL_LINUX_MD5 := 16579e594a8ef2e6236b38b9ab36cccf +UTIL_LINUX_VERSION := 2.39.1 +UTIL_LINUX_MD5 := c542cd7c0726254e4b3006a9b428201a UTIL_LINUX := util-linux-$(UTIL_LINUX_VERSION) UTIL_LINUX_SUFFIX := tar.xz UTIL_LINUX_BASENAME := v$(if $(filter 2,$(basename $(UTIL_LINUX_VERSION))),$(UTIL_LINUX_VERSION),$(basename $(UTIL_LINUX_VERSION))) @@ -114,6 +114,7 @@ UTIL_LINUX_CONF_OPT := \ --$(call ptx/endis, PTXCONF_UTIL_LINUX_PIVOT_ROOT)-pivot_root \ --$(call ptx/endis, PTXCONF_UTIL_LINUX_LSMEM)-lsmem \ --$(call ptx/endis, PTXCONF_UTIL_LINUX_CHMEM)-chmem \ + --$(call ptx/endis, PTXCONF_UTIL_LINUX_IPCMK)-ipcmk \ --$(call ptx/endis, PTXCONF_UTIL_LINUX_IPCRM)-ipcrm \ --$(call ptx/endis, PTXCONF_UTIL_LINUX_IPCS)-ipcs \ --$(call ptx/endis, PTXCONF_UTIL_LINUX_IRQTOP)-irqtop \ -- 2.34.1