summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:23:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:23:41 +0000
commit233be6e0bb85cd0320c198938f10c3443ca6d6c4 (patch)
treec8783175262d293c10e6eeba46a816ed310f9460 /debian
parentMerging upstream version 2.40.1. (diff)
downloadutil-linux-233be6e0bb85cd0320c198938f10c3443ca6d6c4.tar.xz
util-linux-233be6e0bb85cd0320c198938f10c3443ca6d6c4.zip
Merging debian version 2.40.1-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog16
-rw-r--r--debian/control2
-rw-r--r--debian/patches/debian/lsfd-usrbin.patch2
-rw-r--r--debian/patches/debian/man-getopt-examples.patch2
-rw-r--r--debian/patches/debian/sensible-pager.patch4
-rw-r--r--debian/patches/series24
-rw-r--r--debian/patches/upstream/Fix-misplaced-else-in-mnt_update_already_done.patch28
-rw-r--r--debian/patches/upstream/Fix-ul_path_read_buffer.patch25
-rw-r--r--debian/patches/upstream/Revert-lib-pager-Apply-pager-specific-fixes-only-when-nee.patch59
-rw-r--r--debian/patches/upstream/agetty-Don-t-override-TERM-passed-by-the-user.patch31
-rw-r--r--debian/patches/upstream/findmnt-always-zero-terminate-SOURCES-data.patch46
-rw-r--r--debian/patches/upstream/findmnt-revise-the-code-for-I-and-D-option.patch160
-rw-r--r--debian/patches/upstream/fsck-warn-if-fsck.-type-not-found-and-device-is-specified.patch78
-rw-r--r--debian/patches/upstream/libblkid-Fix-segfault-when-blkid.conf-doesn-t-exist.patch75
-rw-r--r--debian/patches/upstream/libblkid-topology-ioctl-correctly-handle-kernel-types.patch89
-rw-r--r--debian/patches/upstream/libblkid-topology-ioctl-simplify-ioctl-handling.patch117
-rw-r--r--debian/patches/upstream/libmount-Fix-access-check-for-utab-in-context.patch39
-rw-r--r--debian/patches/upstream/libmount-fix-comment-typo-for-mnt_fs_get_comment.patch23
-rw-r--r--debian/patches/upstream/libmount-utils-add-pidfs-to-pseudo-fs-list.patch21
-rw-r--r--debian/patches/upstream/libsmartcols-reset-wrap-after-calculation.patch88
-rw-r--r--debian/patches/upstream/lsblk-simplify-SOURCES-code.patch61
-rw-r--r--debian/patches/upstream/lsfd-add-LSFD_DEBUG-env-var-for-debugging.patch231
-rw-r--r--debian/patches/upstream/lslocks-don-t-abort-gathering-per-process-information-eve.patch77
-rw-r--r--debian/patches/upstream/lslocks-remove-a-unused-local-variable.patch37
-rw-r--r--debian/patches/upstream/lsns-fix-netns-use.patch33
-rw-r--r--debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch27
-rw-r--r--debian/patches/upstream/lsns-tolerate-lsns_ioctl-fd-NS_GET_-PARENT-USERNS-failing.patch49
-rw-r--r--debian/patches/upstream/pam_lastlog2-link-against-liblastlog.patch32
-rw-r--r--debian/patches/upstream/tests-lsfd-mkfds-multiplexing-skip-if-proc-pid-syscall-is.patch55
-rw-r--r--debian/patches/upstream/tests-test_mkfds-sockdiag-verify-the-recived-message.patch56
30 files changed, 145 insertions, 1442 deletions
diff --git a/debian/changelog b/debian/changelog
index ce9d7a7..d6b0422 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+util-linux (2.40.1-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Update Homepage: field.
+ * Drop upstream-applied patches.
+ * Apply new patches from upstream. (Closes: #1062208)
+
+ -- Chris Hofstaedtler <zeha@debian.org> Tue, 14 May 2024 12:53:27 +0200
+
util-linux (2.40-8~progress7.99u1) graograman-backports; urgency=medium
* Uploading to graograman-backports, remaining changes:
@@ -488,7 +497,8 @@ util-linux (2.39.3-2) unstable; urgency=medium
[ Gioele Barabucci ]
* Install manpages via dh_installman instead of dh_install
- * d/util-linux-locales.install: Do not install manpages when building with <nodoc>
+ * d/util-linux-locales.install: Do not install manpages when building with
+ <nodoc>
* d/control: Support <nodoc> build profile
-- Chris Hofstaedtler <zeha@debian.org> Tue, 05 Dec 2023 04:22:29 +0100
@@ -645,8 +655,8 @@ util-linux (2.38.1-3) unstable; urgency=medium
* Apply "rfkill: (man) List options for supported device types"
(Closes: #1019007)
- * Apply "lib/pty: Put master PTY into non-blocking mode and buffer its output to avoid deadlock"
- (Closes: #1003095)
+ * Apply "lib/pty: Put master PTY into non-blocking mode and buffer its output
+ to avoid deadlock" (Closes: #1003095)
* Gift /var/lib/libuuid to uuid-runtime. uuidd should be its only user, and
this should avoid piuparts errors.
* Remove pre-stable NEWS entries
diff --git a/debian/control b/debian/control
index ecc1737..378e967 100644
--- a/debian/control
+++ b/debian/control
@@ -45,7 +45,7 @@ Vcs-Browser: https://git.progress-linux.org/packages/graograman-backports/util-l
Vcs-Git: https://git.progress-linux.org/packages/graograman-backports/util-linux
XSBC-Original-Vcs-Browser: https://salsa.debian.org/debian/util-linux
XSBC-Original-Vcs-Git: https://salsa.debian.org/debian/util-linux.git
-Homepage: https://www.kernel.org/pub/linux/utils/util-linux/
+Homepage: https://github.com/util-linux/util-linux
Package: util-linux
Architecture: any
diff --git a/debian/patches/debian/lsfd-usrbin.patch b/debian/patches/debian/lsfd-usrbin.patch
index af8fa8b..8cd3f98 100644
--- a/debian/patches/debian/lsfd-usrbin.patch
+++ b/debian/patches/debian/lsfd-usrbin.patch
@@ -7,7 +7,7 @@ Subject: Install lsfd into /usr/bin
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am
-index 0720dda..562d114 100644
+index 6104c64..d48c5fb 100644
--- a/misc-utils/Makemodule.am
+++ b/misc-utils/Makemodule.am
@@ -274,7 +274,7 @@ hardlink_CFLAGS = $(AM_CFLAGS)
diff --git a/debian/patches/debian/man-getopt-examples.patch b/debian/patches/debian/man-getopt-examples.patch
index e335f69..e228353 100644
--- a/debian/patches/debian/man-getopt-examples.patch
+++ b/debian/patches/debian/man-getopt-examples.patch
@@ -9,7 +9,7 @@ Debian BTS #913049
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc-utils/getopt.1 b/misc-utils/getopt.1
-index fe9003e..571fe83 100644
+index a9fc54c..1a64a1a 100644
--- a/misc-utils/getopt.1
+++ b/misc-utils/getopt.1
@@ -155,7 +155,7 @@ In compatibility mode, leading \*(Aq\fB\-\fP\*(Aq and \*(Aq\fB+\fP\*(Aq characte
diff --git a/debian/patches/debian/sensible-pager.patch b/debian/patches/debian/sensible-pager.patch
index 56641f4..40b6bbf 100644
--- a/debian/patches/debian/sensible-pager.patch
+++ b/debian/patches/debian/sensible-pager.patch
@@ -8,10 +8,10 @@ Closes: #1014368
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pager.c b/lib/pager.c
-index 98814b5..5f62a78 100644
+index db7a989..47f1233 100644
--- a/lib/pager.c
+++ b/lib/pager.c
-@@ -231,7 +231,7 @@ static void __setup_pager(void)
+@@ -229,7 +229,7 @@ static void __setup_pager(void)
return;
if (!pager)
diff --git a/debian/patches/series b/debian/patches/series
index ab03306..dfb6e38 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,28 +4,10 @@ debian/hardlink-tests-known-failed.patch
debian/lsfd-usrbin.patch
debian/sensible-pager.patch
debian/tests-mark-lsfd-tests-failing-in-sbuild.patch
-upstream/lsfd-add-LSFD_DEBUG-env-var-for-debugging.patch
-upstream/tests-test_mkfds-sockdiag-verify-the-recived-message.patch
debian/tests-mark-fadvise-drop-as-known-failing-on-buildds.patch
-upstream/tests-lsfd-mkfds-multiplexing-skip-if-proc-pid-syscall-is.patch
upstream/audit-arch.h-add-defines-for-m68k-sh.patch
-upstream/Revert-lib-pager-Apply-pager-specific-fixes-only-when-nee.patch
-upstream/libblkid-Fix-segfault-when-blkid.conf-doesn-t-exist.patch
-upstream/pam_lastlog2-link-against-liblastlog.patch
-upstream/libblkid-topology-ioctl-correctly-handle-kernel-types.patch
-upstream/libblkid-topology-ioctl-simplify-ioctl-handling.patch
-upstream/findmnt-revise-the-code-for-I-and-D-option.patch
-upstream/Fix-misplaced-else-in-mnt_update_already_done.patch
-upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
-upstream/lsns-tolerate-lsns_ioctl-fd-NS_GET_-PARENT-USERNS-failing.patch
-upstream/lslocks-don-t-abort-gathering-per-process-information-eve.patch
-upstream/lslocks-remove-a-unused-local-variable.patch
-upstream/libsmartcols-reset-wrap-after-calculation.patch
-upstream/agetty-Don-t-override-TERM-passed-by-the-user.patch
-upstream/findmnt-always-zero-terminate-SOURCES-data.patch
-upstream/lsblk-simplify-SOURCES-code.patch
-upstream/libmount-Fix-access-check-for-utab-in-context.patch
-upstream/libmount-fix-comment-typo-for-mnt_fs_get_comment.patch
-upstream/lsns-fix-netns-use.patch
+upstream/Fix-ul_path_read_buffer.patch
+upstream/libmount-utils-add-pidfs-to-pseudo-fs-list.patch
+upstream/fsck-warn-if-fsck.-type-not-found-and-device-is-specified.patch
progress-linux/0001-agetty-prompt.patch
progress-linux/0002-login-prompt.patch
diff --git a/debian/patches/upstream/Fix-misplaced-else-in-mnt_update_already_done.patch b/debian/patches/upstream/Fix-misplaced-else-in-mnt_update_already_done.patch
deleted file mode 100644
index eca8867..0000000
--- a/debian/patches/upstream/Fix-misplaced-else-in-mnt_update_already_done.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Gavin Lloyd <gavinhungry@gmail.com>
-Date: Tue, 9 Apr 2024 17:38:02 -0700
-Subject: Fix misplaced else in mnt_update_already_done
-
-See 477401f0de
-
-(cherry picked from commit 6b316e0c9f1feb61bef3bb14b1356be8fbefcc17)
----
- libmount/src/tab_update.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c
-index 87512af..d44d190 100644
---- a/libmount/src/tab_update.c
-+++ b/libmount/src/tab_update.c
-@@ -982,9 +982,9 @@ int mnt_update_already_done(struct libmnt_update *upd)
- if (mnt_optstr_get_missing(fs->user_optstr, upd->fs->user_optstr, NULL) == 0) {
- upd->missing_options = 1;
- DBG(UPDATE, ul_debugobj(upd, " missing options detected"));
-- }
-- } else
-- rc = 1;
-+ } else
-+ rc = 1;
-+ }
-
- } else if (upd->target) {
- /* umount */
diff --git a/debian/patches/upstream/Fix-ul_path_read_buffer.patch b/debian/patches/upstream/Fix-ul_path_read_buffer.patch
new file mode 100644
index 0000000..c28b4db
--- /dev/null
+++ b/debian/patches/upstream/Fix-ul_path_read_buffer.patch
@@ -0,0 +1,25 @@
+From: Daan De Meyer <daan.j.demeyer@gmail.com>
+Date: Thu, 9 May 2024 12:32:31 +0200
+Subject: Fix ul_path_read_buffer()
+
+The current implementation cuts off the last character of the buffer
+if there is no trailing newline.
+
+(cherry picked from commit 6273c12257973cbd3c59a710049ee8a8027bbbb1)
+---
+ lib/path.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/path.c b/lib/path.c
+index 202f19a..f897599 100644
+--- a/lib/path.c
++++ b/lib/path.c
+@@ -682,7 +682,7 @@ int ul_path_read_buffer(struct path_cxt *pc, char *buf, size_t bufsz, const char
+ if (*(buf + rc - 1) == '\n')
+ buf[--rc] = '\0';
+ else
+- buf[rc - 1] = '\0';
++ buf[rc] = '\0';
+ }
+
+ return rc;
diff --git a/debian/patches/upstream/Revert-lib-pager-Apply-pager-specific-fixes-only-when-nee.patch b/debian/patches/upstream/Revert-lib-pager-Apply-pager-specific-fixes-only-when-nee.patch
deleted file mode 100644
index 6bd7244..0000000
--- a/debian/patches/upstream/Revert-lib-pager-Apply-pager-specific-fixes-only-when-nee.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Sat, 13 Apr 2024 09:42:39 +0200
-Subject: Revert "lib/pager: Apply pager-specific fixes only when needed"
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Less is not always detectable, as it can be hidden behind symlinks or
-wrapper as for example in a default Debian installation.
-Also testing for the literal string "less" does not match full path
-specifications like "/usr/bin/less".
-
-Instead always apply the fixes.
-
-This reverts commit c10ad975895372122f72c8d9da089b6ea69f778b.
-Closes #2951
-Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-Debian-Bug: 1068831
----
- lib/pager.c | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/lib/pager.c b/lib/pager.c
-index 5f62a78..47f1233 100644
---- a/lib/pager.c
-+++ b/lib/pager.c
-@@ -85,9 +85,7 @@ static int start_command(struct child_process *cmd)
- close(cmd->in);
- }
-
-- if (cmd->preexec_cb)
-- cmd->preexec_cb();
--
-+ cmd->preexec_cb();
- execvp(cmd->argv[0], (char *const*) cmd->argv);
- errexec(cmd->argv[0]);
- }
-@@ -142,7 +140,7 @@ static int finish_command(struct child_process *cmd)
- return wait_or_whine(cmd->pid);
- }
-
--static void pager_preexec_less(void)
-+static void pager_preexec(void)
- {
- /*
- * Work around bug in "less" by not starting it until we
-@@ -242,11 +240,7 @@ static void __setup_pager(void)
- pager_argv[2] = pager;
- pager_process.argv = pager_argv;
- pager_process.in = -1;
--
-- if (!strncmp(pager, "less", 4))
-- pager_process.preexec_cb = pager_preexec_less;
-- else
-- pager_process.preexec_cb = NULL;
-+ pager_process.preexec_cb = pager_preexec;
-
- if (start_command(&pager_process))
- return;
diff --git a/debian/patches/upstream/agetty-Don-t-override-TERM-passed-by-the-user.patch b/debian/patches/upstream/agetty-Don-t-override-TERM-passed-by-the-user.patch
deleted file mode 100644
index 11df871..0000000
--- a/debian/patches/upstream/agetty-Don-t-override-TERM-passed-by-the-user.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Daan De Meyer <daan.j.demeyer@gmail.com>
-Date: Fri, 19 Apr 2024 20:07:47 +0200
-Subject: agetty: Don't override TERM passed by the user
-
-Before 4869b259d68f65ea88df625ce8df9c0177d55a01, any TERM passed
-on the agetty command line would be used instead of the default TERM.
-After 4869b259d68f65ea88df625ce8df9c0177d55a01, the default TERM is
-used unconditionally.
-
-Fix the regression by checking if the user passed a custom TERM.
-
-Fixes: 4869b259d68f65ea88df625ce8df9c0177d55a01
-(cherry picked from commit af354e92111769d57e43eb4f1825c0d99c894ddb)
----
- term-utils/agetty.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/term-utils/agetty.c b/term-utils/agetty.c
-index 0fc6f15..0b9eb8b 100644
---- a/term-utils/agetty.c
-+++ b/term-utils/agetty.c
-@@ -1196,7 +1196,8 @@ static void open_tty(const char *tty, struct termios *tp, struct options *op)
- #endif
- }
-
-- op->term = get_terminal_default_type(op->tty, !(op->flags & F_VCONSOLE));
-+ if (!op->term)
-+ op->term = get_terminal_default_type(op->tty, !(op->flags & F_VCONSOLE));
- if (!op->term)
- log_err(_("failed to allocate memory: %m"));
-
diff --git a/debian/patches/upstream/findmnt-always-zero-terminate-SOURCES-data.patch b/debian/patches/upstream/findmnt-always-zero-terminate-SOURCES-data.patch
deleted file mode 100644
index b173277..0000000
--- a/debian/patches/upstream/findmnt-always-zero-terminate-SOURCES-data.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Sun, 21 Apr 2024 20:00:31 +0200
-Subject: findmnt: always zero-terminate SOURCES data
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-libsmartcols expects it's data fields to be zero terminated.
-See the call to strlen() in scols_column_greatest_wrap().
-ul_buffer however does not guarantee that termination,
-ul_buffer_append_strings() discard the zero-termination.
-
-Always zero-terminate in get_data_col_sources() and drop the now
-unnecessary variable "i".
-
-Closes: https://github.com/util-linux/util-linux/issues/2980
-Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-(cherry picked from commit 6594679e9af805075c282da35b1b2a8d767e403b)
----
- misc-utils/findmnt.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
-index 2e4d59e..f40b137 100644
---- a/misc-utils/findmnt.c
-+++ b/misc-utils/findmnt.c
-@@ -552,7 +552,6 @@ static char *get_vfs_attr(struct libmnt_fs *fs, int sizetype)
- static char *get_data_col_sources(struct libmnt_fs *fs, int evaluate, size_t *datasiz)
- {
- const char *tag = NULL, *p = NULL;
-- int i = 0;
- const char *device = NULL;
- char *val = NULL;
- blkid_dev_iterate iter;
-@@ -602,10 +601,8 @@ static char *get_data_col_sources(struct libmnt_fs *fs, int evaluate, size_t *da
- dev = blkid_verify(blk_cache, dev);
- if (!dev)
- continue;
-- if (i != 0)
-- ul_buffer_append_data(&buf, "\0", 1);
- ul_buffer_append_string(&buf, blkid_dev_devname(dev));
-- i++;
-+ ul_buffer_append_data(&buf, "\0", 1);
- }
- blkid_dev_iterate_end(iter);
- free(val);
diff --git a/debian/patches/upstream/findmnt-revise-the-code-for-I-and-D-option.patch b/debian/patches/upstream/findmnt-revise-the-code-for-I-and-D-option.patch
deleted file mode 100644
index 7ec4aaf..0000000
--- a/debian/patches/upstream/findmnt-revise-the-code-for-I-and-D-option.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Fri, 5 Apr 2024 22:40:36 +0900
-Subject: findmnt: revise the code for -I and -D option
-
-Fixes #2913.
-
-3dd79293b5b655da9d913dedd8facb08959a7826 added -I option.
-However, the code used bit flags (FL_DF and FL_DF_INODES) wrongly;
-the code broke the output of -D option.
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
-(cherry picked from commit aa0c45e8686df509c169121473d2cfb4fe18c3ea)
----
- misc-utils/findmnt.c | 28 ++++++++----------
- misc-utils/findmnt.h | 2 +-
- tests/expected/findmnt/df-options | 4 +++
- tests/ts/findmnt/df-options | 62 +++++++++++++++++++++++++++++++++++++++
- 4 files changed, 80 insertions(+), 16 deletions(-)
- create mode 100644 tests/expected/findmnt/df-options
- create mode 100755 tests/ts/findmnt/df-options
-
-diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
-index cc397da..2e4d59e 100644
---- a/misc-utils/findmnt.c
-+++ b/misc-utils/findmnt.c
-@@ -1636,7 +1636,7 @@ int main(int argc, char *argv[])
- break;
- case 'I':
- flags &= ~FL_TREE;
-- flags |= FL_DF_INODES;
-+ flags |= (FL_DF_INODES | FL_DF);
- break;
- case 'i':
- flags |= FL_INVERT;
-@@ -1775,22 +1775,20 @@ int main(int argc, char *argv[])
- if (collist)
- list_colunms(); /* print end exit */
-
-- if (!ncolumns && (flags & FL_DF_INODES)) {
-+ if (!ncolumns && (flags & FL_DF)) {
- add_column(columns, ncolumns++, COL_SOURCE);
- add_column(columns, ncolumns++, COL_FSTYPE);
-- add_column(columns, ncolumns++, COL_INO_TOTAL);
-- add_column(columns, ncolumns++, COL_INO_USED);
-- add_column(columns, ncolumns++, COL_INO_AVAIL);
-- add_column(columns, ncolumns++, COL_INO_USEPERC);
-- add_column(columns, ncolumns++, COL_TARGET);
-- }
-- else if (!ncolumns && (flags & FL_DF)) {
-- add_column(columns, ncolumns++, COL_SOURCE);
-- add_column(columns, ncolumns++, COL_FSTYPE);
-- add_column(columns, ncolumns++, COL_SIZE);
-- add_column(columns, ncolumns++, COL_USED);
-- add_column(columns, ncolumns++, COL_AVAIL);
-- add_column(columns, ncolumns++, COL_USEPERC);
-+ if (flags & FL_DF_INODES) {
-+ add_column(columns, ncolumns++, COL_INO_TOTAL);
-+ add_column(columns, ncolumns++, COL_INO_USED);
-+ add_column(columns, ncolumns++, COL_INO_AVAIL);
-+ add_column(columns, ncolumns++, COL_INO_USEPERC);
-+ } else {
-+ add_column(columns, ncolumns++, COL_SIZE);
-+ add_column(columns, ncolumns++, COL_USED);
-+ add_column(columns, ncolumns++, COL_AVAIL);
-+ add_column(columns, ncolumns++, COL_USEPERC);
-+ }
- add_column(columns, ncolumns++, COL_TARGET);
- }
-
-diff --git a/misc-utils/findmnt.h b/misc-utils/findmnt.h
-index 5c69450..85ab68d 100644
---- a/misc-utils/findmnt.h
-+++ b/misc-utils/findmnt.h
-@@ -24,7 +24,7 @@ enum {
- FL_SHADOWED = (1 << 20),
- FL_DELETED = (1 << 21),
- FL_SHELLVAR = (1 << 22),
-- FL_DF_INODES = (1 << 23) | FL_DF,
-+ FL_DF_INODES = (1 << 23),
-
- /* basic table settings */
- FL_ASCII = (1 << 25),
-diff --git a/tests/expected/findmnt/df-options b/tests/expected/findmnt/df-options
-new file mode 100644
-index 0000000..3f0f509
---- /dev/null
-+++ b/tests/expected/findmnt/df-options
-@@ -0,0 +1,4 @@
-+-D: OK
-+-I: OK
-+--df: OK
-+--dfi: OK
-diff --git a/tests/ts/findmnt/df-options b/tests/ts/findmnt/df-options
-new file mode 100755
-index 0000000..58208b9
---- /dev/null
-+++ b/tests/ts/findmnt/df-options
-@@ -0,0 +1,62 @@
-+#!/bin/bash
-+
-+# 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="the columns enabled with -D and -I options"
-+
-+. "$TS_TOPDIR"/functions.sh
-+ts_init "$*"
-+
-+ts_check_test_command "$TS_CMD_FINDMNT"
-+ts_check_prog "head"
-+
-+ts_cd "$TS_OUTDIR"
-+
-+D_expectation="SOURCE FSTYPE SIZE USED AVAIL USE% TARGET"
-+I_expectation="SOURCE FSTYPE INO.TOTAL INO.USED INO.AVAIL INO.USE% TARGET"
-+{
-+ if [[ $($TS_CMD_FINDMNT --raw -D | head -1) == "$D_expectation" ]]; then
-+ echo "-D: OK"
-+ else
-+ echo "-D: ERROR"
-+ $TS_CMD_FINDMNT --raw -D
-+ echo $?
-+ fi
-+
-+ if [[ $($TS_CMD_FINDMNT --raw -I | head -1) == "$I_expectation" ]]; then
-+ echo "-I: OK"
-+ else
-+ echo "-I: ERROR"
-+ $TS_CMD_FINDMNT --raw -I
-+ echo $?
-+ fi
-+
-+ if [[ $($TS_CMD_FINDMNT --raw --df | head -1) == "$D_expectation" ]]; then
-+ echo "--df: OK"
-+ else
-+ echo "--df: ERROR"
-+ $TS_CMD_FINDMNT --raw --df
-+ echo $?
-+ fi
-+
-+ if [[ $($TS_CMD_FINDMNT --raw --dfi | head -1) == "$I_expectation" ]]; then
-+ echo "--dfi: OK"
-+ else
-+ echo "--dfi: ERROR"
-+ $TS_CMD_FINDMNT --raw --dfi
-+ echo $?
-+ fi
-+} >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
-+
-+ts_finalize
diff --git a/debian/patches/upstream/fsck-warn-if-fsck.-type-not-found-and-device-is-specified.patch b/debian/patches/upstream/fsck-warn-if-fsck.-type-not-found-and-device-is-specified.patch
new file mode 100644
index 0000000..2abdfae
--- /dev/null
+++ b/debian/patches/upstream/fsck-warn-if-fsck.-type-not-found-and-device-is-specified.patch
@@ -0,0 +1,78 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 8 Feb 2024 12:42:51 +0100
+Subject: fsck: warn if fsck.<type> not found and device is specified
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+The fsck(8) command prints an error for certain 'required'
+filesystems, such as extN, if the corresponding fsck.<type> helper is
+not found. However, for other filesystems, it silently ignores the
+device. While this behavior is acceptable for the -A option, if a user
+explicitly specifies the device on the command line, it is probably a
+good idea to be more verbose and issue a warning that the device will
+be ignored. The warning is enabled only for interactive mode (only one
+device specified or -s).
+
+Note that some filesystems do not have an fsck utility, so caution is
+needed when issuing such warnings to prevent the generation of a large
+number of unwanted entries in system logs, etc."
+
+Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+
+Closes: #1062208
+---
+ disk-utils/fsck.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
+index c63ce1c..7dc12e6 100644
+--- a/disk-utils/fsck.c
++++ b/disk-utils/fsck.c
+@@ -902,7 +902,7 @@ static int wait_many(int flags)
+ * If the type isn't specified by the user, then use either the type
+ * specified in /etc/fstab, or DEFAULT_FSTYPE.
+ */
+-static int fsck_device(struct libmnt_fs *fs, int interactive)
++static int fsck_device(struct libmnt_fs *fs, int interactive, int warn_notfound)
+ {
+ char *progname, *progpath;
+ const char *type;
+@@ -929,6 +929,9 @@ static int fsck_device(struct libmnt_fs *fs, int interactive)
+ retval = ENOENT;
+ goto err;
+ }
++ if (warn_notfound)
++ warnx(_("fsck.%s not found; ignore %s"), type,
++ fs_get_device(fs));
+ return 0;
+ }
+
+@@ -1287,7 +1290,7 @@ static int check_all(void)
+ if (!skip_root &&
+ !fs_is_done(fs) &&
+ !(ignore_mounted && is_mounted(fs))) {
+- status |= fsck_device(fs, 1);
++ status |= fsck_device(fs, 1, 0);
+ status |= wait_many(FLAG_WAIT_ALL);
+ if (status > FSCK_EX_NONDESTRUCT) {
+ mnt_free_iter(itr);
+@@ -1350,7 +1353,7 @@ static int check_all(void)
+ /*
+ * Spawn off the fsck process
+ */
+- status |= fsck_device(fs, serialize);
++ status |= fsck_device(fs, serialize, 0);
+ fs_set_done(fs);
+
+ /*
+@@ -1688,7 +1691,7 @@ int main(int argc, char *argv[])
+ continue;
+ if (ignore_mounted && is_mounted(fs))
+ continue;
+- status |= fsck_device(fs, interactive);
++ status |= fsck_device(fs, interactive, interactive);
+ if (serialize ||
+ (max_running && (num_running >= max_running))) {
+ struct fsck_instance *inst;
diff --git a/debian/patches/upstream/libblkid-Fix-segfault-when-blkid.conf-doesn-t-exist.patch b/debian/patches/upstream/libblkid-Fix-segfault-when-blkid.conf-doesn-t-exist.patch
deleted file mode 100644
index 0e6490c..0000000
--- a/debian/patches/upstream/libblkid-Fix-segfault-when-blkid.conf-doesn-t-exist.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 1 Apr 2024 12:14:50 +0200
-Subject: libblkid: Fix segfault when blkid.conf doesn't exist
-
-* Move 'line' and 'uevent' to the beginning of the LIBECONF code.
-* Remove unwanted space between function name and arguments.
-* Check for 'line' pointer before dereferencing.
-
-References: https://github.com/util-linux/util-linux/pull/2883
-Signed-off-by: Karel Zak <kzak@redhat.com>
-(cherry picked from commit 7e357241b413a01c37b0b4d064bc0a47e3259361)
----
- libblkid/src/config.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/libblkid/src/config.c b/libblkid/src/config.c
-index 7b8b04f..66c1864 100644
---- a/libblkid/src/config.c
-+++ b/libblkid/src/config.c
-@@ -153,6 +153,8 @@ struct blkid_config *blkid_read_config(const char *filename)
- #else /* !HAVE_LIBECONF */
-
- static econf_file *file = NULL;
-+ char *line = NULL;
-+ bool uevent = false;
- econf_err error;
-
- if (filename) {
-@@ -187,7 +189,6 @@ struct blkid_config *blkid_read_config(const char *filename)
- }
- }
-
-- bool uevent = false;
- if ((error = econf_getBoolValue(file, NULL, "SEND_UEVENT", &uevent))) {
- if (error != ECONF_NOKEY) {
- DBG(CONFIG, ul_debug("couldn't fetch SEND_UEVENT corrently: %s", econf_errString(error)));
-@@ -209,7 +210,6 @@ struct blkid_config *blkid_read_config(const char *filename)
- }
- }
-
-- char *line = NULL;
- if ((error = econf_getStringValue(file, NULL, "EVALUATE", &line))) {
- conf->nevals = 0;
- if (error != ECONF_NOKEY) {
-@@ -219,7 +219,7 @@ struct blkid_config *blkid_read_config(const char *filename)
- DBG(CONFIG, ul_debug("key CACHE_FILE not found, using built-in default "));
- }
- } else {
-- if (*line && parse_evaluate(conf, line) == -1)
-+ if (line && *line && parse_evaluate(conf, line) == -1)
- goto err;
- }
-
-@@ -238,8 +238,8 @@ dflt:
- if (f)
- fclose(f);
- #else
-- econf_free (file);
-- free (line);
-+ econf_free(file);
-+ free(line);
- #endif
- return conf;
- err:
-@@ -248,8 +248,8 @@ err:
- #ifndef HAVE_LIBECONF
- fclose(f);
- #else
-- econf_free (file);
-- free (line);
-+ econf_free(file);
-+ free(line);
- #endif
- return NULL;
- }
diff --git a/debian/patches/upstream/libblkid-topology-ioctl-correctly-handle-kernel-types.patch b/debian/patches/upstream/libblkid-topology-ioctl-correctly-handle-kernel-types.patch
deleted file mode 100644
index 8f28f7f..0000000
--- a/debian/patches/upstream/libblkid-topology-ioctl-correctly-handle-kernel-types.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Tue, 2 Apr 2024 18:55:29 +0200
-Subject: libblkid: topology/ioctl: correctly handle kernel types
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Commit 5d71d711d07a ("libblkid: topolicy/ioctl: use union for multiple data types")
-incorrectly assumed that set_ulong and set_int refer to the type
-returned by the kernel. Instead the different function pointer names
-refer to the types of the function pointers.
-However all ioctls, except for the later added BLKGETDISKSEQ, return
-32bit integers.
-This made libblkid also interpret the upper 32bits too, leading to
-garbage values.
-
-Introduce a new member 'kernel_size' to also handle the 64bit
-BLKGETDISKSEQ.
-
-Drop data.ul as it is no actually used.
-
-Closes #2904
-Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-(cherry picked from commit a10081a52c48a5232db30d8e0a7a7570cc8163ae)
----
- libblkid/src/topology/ioctl.c | 29 +++++++++++++++++++----------
- 1 file changed, 19 insertions(+), 10 deletions(-)
-
-diff --git a/libblkid/src/topology/ioctl.c b/libblkid/src/topology/ioctl.c
-index 3560a2f..4be20e8 100644
---- a/libblkid/src/topology/ioctl.c
-+++ b/libblkid/src/topology/ioctl.c
-@@ -24,6 +24,7 @@
- static const struct topology_val {
-
- long ioc;
-+ size_t kernel_size;
-
- /* functions to set probing result */
- int (*set_ulong)(blkid_probe, unsigned long);
-@@ -31,11 +32,16 @@ static const struct topology_val {
- int (*set_u64)(blkid_probe, uint64_t);
-
- } topology_vals[] = {
-- { BLKALIGNOFF, NULL, blkid_topology_set_alignment_offset },
-- { BLKIOMIN, blkid_topology_set_minimum_io_size },
-- { BLKIOOPT, blkid_topology_set_optimal_io_size },
-- { BLKPBSZGET, blkid_topology_set_physical_sector_size },
-- { BLKGETDISKSEQ, .set_u64 = blkid_topology_set_diskseq },
-+ { BLKALIGNOFF, sizeof(int),
-+ .set_int = blkid_topology_set_alignment_offset },
-+ { BLKIOMIN, sizeof(int),
-+ .set_ulong = blkid_topology_set_minimum_io_size },
-+ { BLKIOOPT, sizeof(int),
-+ .set_ulong = blkid_topology_set_optimal_io_size },
-+ { BLKPBSZGET, sizeof(int),
-+ .set_ulong = blkid_topology_set_physical_sector_size },
-+ { BLKGETDISKSEQ, sizeof(uint64_t),
-+ .set_u64 = blkid_topology_set_diskseq },
- /* we read BLKSSZGET in topology.c */
- };
-
-@@ -48,18 +54,21 @@ static int probe_ioctl_tp(blkid_probe pr,
- const struct topology_val *val = &topology_vals[i];
- int rc = 1;
- union {
-- unsigned long ul;
-- int i;
-+ int s32;
- uint64_t u64;
-- } data;
-+ } data = { 0 };
-
- if (ioctl(pr->fd, val->ioc, &data) == -1)
- goto nothing;
-
-+ /* Convert from kernel to libblkid type */
-+ if (val->kernel_size == 4)
-+ data.u64 = data.s32;
-+
- if (val->set_int)
-- rc = val->set_int(pr, data.i);
-+ rc = val->set_int(pr, data.u64);
- else if (val->set_ulong)
-- rc = val->set_ulong(pr, data.ul);
-+ rc = val->set_ulong(pr, data.u64);
- else
- rc = val->set_u64(pr, data.u64);
-
diff --git a/debian/patches/upstream/libblkid-topology-ioctl-simplify-ioctl-handling.patch b/debian/patches/upstream/libblkid-topology-ioctl-simplify-ioctl-handling.patch
deleted file mode 100644
index 7dac8b2..0000000
--- a/debian/patches/upstream/libblkid-topology-ioctl-simplify-ioctl-handling.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Thu, 4 Apr 2024 07:24:58 +0200
-Subject: libblkid: topology/ioctl: simplify ioctl handling
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Coverity complains about the data copy within the union.
-Instead unroll the loop which is less code and easier to follow.
-
-Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-(cherry picked from commit 2ab95860db0b7423906911b8b9e9f231332c2c11)
----
- libblkid/src/topology/ioctl.c | 85 ++++++++++++++-----------------------------
- 1 file changed, 27 insertions(+), 58 deletions(-)
-
-diff --git a/libblkid/src/topology/ioctl.c b/libblkid/src/topology/ioctl.c
-index 4be20e8..7b15c9e 100644
---- a/libblkid/src/topology/ioctl.c
-+++ b/libblkid/src/topology/ioctl.c
-@@ -18,69 +18,38 @@
-
- #include "topology.h"
-
--/*
-- * ioctl topology values
-- */
--static const struct topology_val {
--
-- long ioc;
-- size_t kernel_size;
--
-- /* functions to set probing result */
-- int (*set_ulong)(blkid_probe, unsigned long);
-- int (*set_int)(blkid_probe, int);
-- int (*set_u64)(blkid_probe, uint64_t);
--
--} topology_vals[] = {
-- { BLKALIGNOFF, sizeof(int),
-- .set_int = blkid_topology_set_alignment_offset },
-- { BLKIOMIN, sizeof(int),
-- .set_ulong = blkid_topology_set_minimum_io_size },
-- { BLKIOOPT, sizeof(int),
-- .set_ulong = blkid_topology_set_optimal_io_size },
-- { BLKPBSZGET, sizeof(int),
-- .set_ulong = blkid_topology_set_physical_sector_size },
-- { BLKGETDISKSEQ, sizeof(uint64_t),
-- .set_u64 = blkid_topology_set_diskseq },
-- /* we read BLKSSZGET in topology.c */
--};
--
- static int probe_ioctl_tp(blkid_probe pr,
- const struct blkid_idmag *mag __attribute__((__unused__)))
- {
-- size_t i;
--
-- for (i = 0; i < ARRAY_SIZE(topology_vals); i++) {
-- const struct topology_val *val = &topology_vals[i];
-- int rc = 1;
-- union {
-- int s32;
-- uint64_t u64;
-- } data = { 0 };
--
-- if (ioctl(pr->fd, val->ioc, &data) == -1)
-- goto nothing;
--
-- /* Convert from kernel to libblkid type */
-- if (val->kernel_size == 4)
-- data.u64 = data.s32;
--
-- if (val->set_int)
-- rc = val->set_int(pr, data.u64);
-- else if (val->set_ulong)
-- rc = val->set_ulong(pr, data.u64);
-- else
-- rc = val->set_u64(pr, data.u64);
--
-- if (rc)
-- goto err;
-- }
-+ uint64_t u64;
-+ int s32;
-+
-+ if (ioctl(pr->fd, BLKALIGNOFF, &s32) == -1)
-+ return 1;
-+ if (blkid_topology_set_alignment_offset(pr, s32))
-+ return -1;
-+
-+ if (ioctl(pr->fd, BLKIOMIN, &s32) == -1)
-+ return 1;
-+ if (blkid_topology_set_minimum_io_size(pr, s32))
-+ return -1;
-+
-+ if (ioctl(pr->fd, BLKIOOPT, &s32) == -1)
-+ return 1;
-+ if (blkid_topology_set_optimal_io_size(pr, s32))
-+ return -1;
-+
-+ if (ioctl(pr->fd, BLKPBSZGET, &s32) == -1)
-+ return 1;
-+ if (blkid_topology_set_physical_sector_size(pr, s32))
-+ return -1;
-+
-+ if (ioctl(pr->fd, BLKGETDISKSEQ, &u64) == -1)
-+ return 1;
-+ if (blkid_topology_set_physical_sector_size(pr, u64))
-+ return -1;
-
- return 0;
--nothing:
-- return 1;
--err:
-- return -1;
- }
-
- const struct blkid_idinfo ioctl_tp_idinfo =
diff --git a/debian/patches/upstream/libmount-Fix-access-check-for-utab-in-context.patch b/debian/patches/upstream/libmount-Fix-access-check-for-utab-in-context.patch
deleted file mode 100644
index a305ec8..0000000
--- a/debian/patches/upstream/libmount-Fix-access-check-for-utab-in-context.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 22 Apr 2024 13:09:04 +0200
-Subject: libmount: Fix access check for utab in context
-
-The function mnt_has_regular_utab() properly detects that the utab is
-not writable, but this is ignored by the high-level context API. As a
-result, the library later attempts to update the file and ends up with
-a warning in mount(8):
-
- $ mkdir sys
- $ unshare --map-root-user --mount
- $ mount --rbind /sys sys
- $ umount --lazy sys; echo $?
- umount: /home/user/sys: filesystem was unmounted, but failed to update userspace mount table.
- 16
-
-In this case, the utab should be ignored.
-
-Fixes: https://github.com/util-linux/util-linux/issues/2981
-Signed-off-by: Karel Zak <kzak@redhat.com>
-(cherry picked from commit 97f7bfc0fdf74b6a6e220ba9d2f620386e660b29)
----
- libmount/src/context.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/libmount/src/context.c b/libmount/src/context.c
-index 952287a..5206c1d 100644
---- a/libmount/src/context.c
-+++ b/libmount/src/context.c
-@@ -367,8 +367,7 @@ const char *mnt_context_get_writable_tabpath(struct libmnt_context *cxt)
- {
- assert(cxt);
-
-- context_init_paths(cxt, 1);
-- return cxt->utab_path;
-+ return mnt_context_utab_writable(cxt) ? cxt->utab_path : NULL;
- }
-
-
diff --git a/debian/patches/upstream/libmount-fix-comment-typo-for-mnt_fs_get_comment.patch b/debian/patches/upstream/libmount-fix-comment-typo-for-mnt_fs_get_comment.patch
deleted file mode 100644
index 27f8867..0000000
--- a/debian/patches/upstream/libmount-fix-comment-typo-for-mnt_fs_get_comment.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
-Date: Mon, 22 Apr 2024 14:01:25 +0800
-Subject: libmount: fix comment typo for mnt_fs_get_comment()
-
-Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
-(cherry picked from commit c630dbc38f7cd1f838e65e2c43d8375bce1ec20f)
----
- libmount/src/fs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libmount/src/fs.c b/libmount/src/fs.c
-index 79e32a1..26f2c69 100644
---- a/libmount/src/fs.c
-+++ b/libmount/src/fs.c
-@@ -1454,7 +1454,7 @@ int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name,
- * mnt_fs_get_comment:
- * @fs: fstab/mtab/mountinfo entry pointer
- *
-- * Returns: 0 on success, 1 when not found the @name or negative number in case of error.
-+ * Returns: comment string
- */
- const char *mnt_fs_get_comment(struct libmnt_fs *fs)
- {
diff --git a/debian/patches/upstream/libmount-utils-add-pidfs-to-pseudo-fs-list.patch b/debian/patches/upstream/libmount-utils-add-pidfs-to-pseudo-fs-list.patch
new file mode 100644
index 0000000..9d0920a
--- /dev/null
+++ b/debian/patches/upstream/libmount-utils-add-pidfs-to-pseudo-fs-list.patch
@@ -0,0 +1,21 @@
+From: Mike Yuan <me@yhndnzj.com>
+Date: Sat, 11 May 2024 01:11:28 +0800
+Subject: libmount/utils: add pidfs to pseudo fs list
+
+(cherry picked from commit 62cf52f81d5baaba2cfe6dfe00aa4975ebd55d92)
+---
+ libmount/src/utils.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libmount/src/utils.c b/libmount/src/utils.c
+index a2f8ea0..94a877c 100644
+--- a/libmount/src/utils.c
++++ b/libmount/src/utils.c
+@@ -340,6 +340,7 @@ int mnt_fstype_is_pseudofs(const char *type)
+ "none",
+ "nsfs",
+ "overlay",
++ "pidfs",
+ "pipefs",
+ "proc",
+ "pstore",
diff --git a/debian/patches/upstream/libsmartcols-reset-wrap-after-calculation.patch b/debian/patches/upstream/libsmartcols-reset-wrap-after-calculation.patch
deleted file mode 100644
index 0f27560..0000000
--- a/debian/patches/upstream/libsmartcols-reset-wrap-after-calculation.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From: Karel Zak <kzak@redhat.com>
-Date: Tue, 16 Apr 2024 10:49:31 +0200
-Subject: libsmartcols: reset wrap after calculation
-
-Fixes: https://github.com/util-linux/util-linux/issues/2956
-Signed-off-by: Karel Zak <kzak@redhat.com>
-(cherry picked from commit 62f64717ec134b10c5a670403c2d8c43b608e671)
----
- libsmartcols/src/calculate.c | 7 +++++--
- libsmartcols/src/print.c | 20 +++++++++++++-------
- 2 files changed, 18 insertions(+), 9 deletions(-)
-
-diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c
-index 84198da..deabb07 100644
---- a/libsmartcols/src/calculate.c
-+++ b/libsmartcols/src/calculate.c
-@@ -413,10 +413,8 @@ int __scols_calculate(struct libscols_table *tb, struct ul_buffer *buf)
- size_t colsepsz;
- int sorted = 0;
-
--
- DBG(TAB, ul_debugobj(tb, "-----calculate-(termwidth=%zu)-----", tb->termwidth));
- tb->is_dummy_print = 1;
--
- colsepsz = scols_table_is_noencoding(tb) ?
- mbs_width(colsep(tb)) :
- mbs_safe_width(colsep(tb));
-@@ -430,6 +428,11 @@ int __scols_calculate(struct libscols_table *tb, struct ul_buffer *buf)
- while (scols_table_next_column(tb, &itr, &cl) == 0) {
- int is_last;
-
-+ memset(&cl->wstat, 0, sizeof(cl->wstat));
-+ cl->width = 0;
-+ cl->width_treeart = 0;
-+ scols_column_reset_wrap(cl);
-+
- if (scols_column_is_hidden(cl))
- continue;
-
-diff --git a/libsmartcols/src/print.c b/libsmartcols/src/print.c
-index 88ab5a2..ab279e3 100644
---- a/libsmartcols/src/print.c
-+++ b/libsmartcols/src/print.c
-@@ -764,11 +764,11 @@ notree:
- }
- }
-
-+done:
- /* reset wrapping after greatest chunk calculation */
- if (cal && scols_column_is_wrap(cl))
- scols_column_reset_wrap(cl);
-
--done:
- DBG(COL, ul_debugobj(cl, "__cursor_to_buffer rc=%d", rc));
- return rc;
- }
-@@ -802,8 +802,12 @@ static int print_line(struct libscols_table *tb,
- rc = __cursor_to_buffer(tb, buf, 0);
- if (!rc)
- rc = print_data(tb, buf);
-- if (!rc && scols_column_has_pending_wrap(cl))
-- pending = 1;
-+ if (!rc) {
-+ if (scols_column_has_pending_wrap(cl))
-+ pending = 1;
-+ else
-+ scols_column_reset_wrap(cl);
-+ }
- scols_table_reset_cursor(tb);
- }
- fputs_color_line_close(tb);
-@@ -827,10 +831,12 @@ static int print_line(struct libscols_table *tb,
- rc = __cursor_to_buffer(tb, buf, 0);
- if (!rc)
- rc = print_pending_data(tb, buf);
-- if (!rc && scols_column_has_pending_wrap(cl))
-- pending = 1;
-- if (!rc && !pending)
-- scols_column_reset_wrap(cl);
-+ if (!rc) {
-+ if (scols_column_has_pending_wrap(cl))
-+ pending = 1;
-+ else
-+ scols_column_reset_wrap(cl);
-+ }
- } else
- print_empty_cell(tb, cl, ln, NULL, ul_buffer_get_bufsiz(buf));
- scols_table_reset_cursor(tb);
diff --git a/debian/patches/upstream/lsblk-simplify-SOURCES-code.patch b/debian/patches/upstream/lsblk-simplify-SOURCES-code.patch
deleted file mode 100644
index e7cde87..0000000
--- a/debian/patches/upstream/lsblk-simplify-SOURCES-code.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 22 Apr 2024 11:51:56 +0200
-Subject: lsblk: simplify SOURCES code
-
-This complicated implementation originated from an early version of
-zero-separated items for libsmartcols. It is no longer necessary.
-
-References: https://github.com/util-linux/util-linux/pull/2983
-Signed-off-by: Karel Zak <kzak@redhat.com>
-(cherry picked from commit af4c7dac191abadc33aae75916583c890cd2ebc3)
----
- libsmartcols/src/column.c | 2 +-
- misc-utils/lsblk.c | 8 +++-----
- 2 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c
-index 5700bac..586a485 100644
---- a/libsmartcols/src/column.c
-+++ b/libsmartcols/src/column.c
-@@ -470,7 +470,7 @@ char *scols_wrapnl_nextchunk(const struct libscols_column *cl __attribute__((unu
- * This is built-in function for scols_column_set_wrapfunc(). This function
- * walk string separated by \0.
- *
-- * For example for data "AAA\0BBB\0CCC" the next chunk is "BBB".
-+ * For example for data "AAA\0BBB\0CCC\0" the next chunk is "BBB".
- *
- * Returns: next chunk
- *
-diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
-index 30bd2ed..15d9b19 100644
---- a/misc-utils/lsblk.c
-+++ b/misc-utils/lsblk.c
-@@ -935,8 +935,7 @@ static char *device_get_data(
- ul_buffer_append_string(&buf, "[SWAP]");
- else
- ul_buffer_append_string(&buf, mnt_fs_get_target(fs));
-- if (i + 1 < n)
-- ul_buffer_append_data(&buf, "\0", 1);
-+ ul_buffer_append_data(&buf, "\0", 1);
- }
- str = ul_buffer_get_data(&buf, datasiz, NULL);
- break;
-@@ -953,8 +952,7 @@ static char *device_get_data(
- if (mnt_fs_is_swaparea(fs))
- continue;
- ul_buffer_append_string(&buf, root ? root : "/");
-- if (i + 1 < n)
-- ul_buffer_append_data(&buf, "\0", 1);
-+ ul_buffer_append_data(&buf, "\0", 1);
- }
- str = ul_buffer_get_data(&buf, datasiz, NULL);
- break;
-@@ -1276,7 +1274,7 @@ static void device_fill_scols_cell(struct lsblk_device *dev,
- ce = scols_line_get_cell(ln, colnum);
- if (!ce)
- return;
-- rc = datasiz ? scols_cell_refer_memory(ce, data, datasiz + 1)
-+ rc = datasiz ? scols_cell_refer_memory(ce, data, datasiz)
- : scols_cell_refer_data(ce, data);
- if (rc)
- err(EXIT_FAILURE, _("failed to add output data"));
diff --git a/debian/patches/upstream/lsfd-add-LSFD_DEBUG-env-var-for-debugging.patch b/debian/patches/upstream/lsfd-add-LSFD_DEBUG-env-var-for-debugging.patch
deleted file mode 100644
index 32a1687..0000000
--- a/debian/patches/upstream/lsfd-add-LSFD_DEBUG-env-var-for-debugging.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Sat, 30 Mar 2024 18:47:03 +0900
-Subject: lsfd: add LSFD_DEBUG env var for debugging
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
----
- misc-utils/lsfd-sock-xinfo.c | 51 ++++++++++++++++++++++++++++++++++++++------
- misc-utils/lsfd.c | 10 +++++++++
- misc-utils/lsfd.h | 15 +++++++++++++
- 3 files changed, 70 insertions(+), 6 deletions(-)
-
-diff --git a/misc-utils/lsfd-sock-xinfo.c b/misc-utils/lsfd-sock-xinfo.c
-index a293806..71be41a 100644
---- a/misc-utils/lsfd-sock-xinfo.c
-+++ b/misc-utils/lsfd-sock-xinfo.c
-@@ -179,9 +179,12 @@ static void load_sock_xinfo_no_nsswitch(struct netns *nsobj)
- load_xinfo_from_proc_packet(netns);
-
- diagsd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_SOCK_DIAG);
-+ DBG(ENDPOINTS, ul_debug("made a diagnose socket [fd=%d; %s]", diagsd,
-+ (diagsd >= 0)? "successful": strerror(errno)));
- if (diagsd >= 0) {
- load_xinfo_from_diag_unix(diagsd, netns);
- close(diagsd);
-+ DBG(ENDPOINTS, ul_debug("close the diagnose socket"));
- }
-
- if (nsobj)
-@@ -337,6 +340,7 @@ static void send_diag_request(int diagsd, void *req, size_t req_size,
- bool (*cb)(ino_t, size_t, void *),
- ino_t netns)
- {
-+ int r;
- struct sockaddr_nl nladdr = {
- .nl_family = AF_NETLINK,
- };
-@@ -361,30 +365,45 @@ static void send_diag_request(int diagsd, void *req, size_t req_size,
-
- __attribute__((aligned(sizeof(void *)))) uint8_t buf[8192];
-
-- if (sendmsg(diagsd, &mhd, 0) < 0)
-+ r = sendmsg(diagsd, &mhd, 0);
-+ DBG(ENDPOINTS, ul_debug("sendmsg [rc=%d; %s]",
-+ r, (r >= 0)? "successful": strerror(errno)));
-+ if (r < 0)
- return;
-
- for (;;) {
- const struct nlmsghdr *h;
-- int r = recvfrom(diagsd, buf, sizeof(buf), 0, NULL, NULL);
-+ r = recvfrom(diagsd, buf, sizeof(buf), 0, NULL, NULL);
-+ DBG(ENDPOINTS, ul_debug("recvfrom [rc=%d; %s]",
-+ r, (r >= 0)? "successful": strerror(errno)));
- if (r < 0)
- return;
-
- h = (void *) buf;
-+ DBG(ENDPOINTS, ul_debug(" OK: %d", NLMSG_OK(h, (size_t)r)));
- if (!NLMSG_OK(h, (size_t)r))
- return;
-
- for (; NLMSG_OK(h, (size_t)r); h = NLMSG_NEXT(h, r)) {
-- if (h->nlmsg_type == NLMSG_DONE)
-+ if (h->nlmsg_type == NLMSG_DONE) {
-+ DBG(ENDPOINTS, ul_debug(" DONE"));
- return;
-- if (h->nlmsg_type == NLMSG_ERROR)
-+ }
-+ if (h->nlmsg_type == NLMSG_ERROR) {
-+ struct nlmsgerr *e = (struct nlmsgerr *)NLMSG_DATA(h);
-+ DBG(ENDPOINTS, ul_debug(" ERROR: %s",
-+ strerror(- e->error)));
- return;
-+ }
-
- if (h->nlmsg_type == SOCK_DIAG_BY_FAMILY) {
-+ DBG(ENDPOINTS, ul_debug(" FAMILY"));
- if (!cb(netns, h->nlmsg_len, NLMSG_DATA(h)))
- return;
- }
-+ DBG(ENDPOINTS, ul_debug(" NEXT"));
- }
-+ DBG(ENDPOINTS, ul_debug(" OK: 0"));
- }
- }
-
-@@ -639,6 +658,8 @@ static void load_xinfo_from_proc_unix(ino_t netns_inode)
- FILE *unix_fp;
-
- unix_fp = fopen("/proc/net/unix", "r");
-+ DBG(ENDPOINTS, ul_debug("open /proc/net/unix [fp=%p; %s]", unix_fp,
-+ unix_fp? "successful": strerror(errno)));
- if (!unix_fp)
- return;
-
-@@ -655,13 +676,18 @@ static void load_xinfo_from_proc_unix(ino_t netns_inode)
- unsigned long inode;
- struct unix_xinfo *ux;
- char path[UNIX_LINE_LEN + 1] = { 0 };
-+ int r;
-
-+ DBG(ENDPOINTS, ul_debug(" line: %s", line));
-
-- if (sscanf(line, "%*x: %*x %*x %" SCNx64 " %x %x %lu %"
-+ r = sscanf(line, "%*x: %*x %*x %" SCNx64 " %x %x %lu %"
- stringify_value(UNIX_LINE_LEN) "[^\n]",
-- &flags, &type, &st, &inode, path) < 4)
-+ &flags, &type, &st, &inode, path);
-+ DBG(ENDPOINTS, ul_debug(" scanf: %d", r));
-+ if (r < 4)
- continue;
-
-+ DBG(ENDPOINTS, ul_debug(" inode: %lu", inode));
- if (inode == 0)
- continue;
-
-@@ -675,10 +701,12 @@ static void load_xinfo_from_proc_unix(ino_t netns_inode)
- ux->st = st;
- xstrncpy(ux->path, path, sizeof(ux->path));
-
-+ DBG(ENDPOINTS, ul_debug(" path: %s", ux->path));
- add_sock_info(&ux->sock);
- }
-
- out:
-+ DBG(ENDPOINTS, ul_debug("close /proc/net/unix"));
- fclose(unix_fp);
- }
-
-@@ -712,6 +740,9 @@ static bool handle_diag_unix(ino_t netns __attribute__((__unused__)),
-
- if (diag->udiag_family != AF_UNIX)
- return false;
-+ DBG(ENDPOINTS, ul_debug(" UNIX"));
-+ DBG(ENDPOINTS, ul_debug(" LEN: %zu (>= %zu)", nlmsg_len,
-+ (size_t)(NLMSG_LENGTH(sizeof(*diag)))));
-
- if (nlmsg_len < NLMSG_LENGTH(sizeof(*diag)))
- return false;
-@@ -719,21 +750,29 @@ static bool handle_diag_unix(ino_t netns __attribute__((__unused__)),
- inode = (ino_t)diag->udiag_ino;
- xinfo = get_sock_xinfo(inode);
-
-+ DBG(ENDPOINTS, ul_debug(" inode: %llu", (unsigned long long)inode));
-+ DBG(ENDPOINTS, ul_debug(" xinfo: %p", xinfo));
-+
- if (xinfo == NULL)
- /* The socket is found in the diag response
- but not in the proc fs. */
- return true;
-
-+ DBG(ENDPOINTS, ul_debug(" xinfo->class == &unix_xinfo_class: %d",
-+ xinfo->class == &unix_xinfo_class));
- if (xinfo->class != &unix_xinfo_class)
- return true;
- unix_xinfo = (struct unix_xinfo *)xinfo;
-
- rta_len = nlmsg_len - NLMSG_LENGTH(sizeof(*diag));
-+ DBG(ENDPOINTS, ul_debug(" rta_len: %zu", rta_len));
- for (struct rtattr *attr = (struct rtattr *)(diag + 1);
- RTA_OK(attr, rta_len);
- attr = RTA_NEXT(attr, rta_len)) {
- size_t len = RTA_PAYLOAD(attr);
-
-+ DBG(ENDPOINTS, ul_debug(" len = %2zu, type: %d",
-+ rta_len, attr->rta_type));
- switch (attr->rta_type) {
- case UNIX_DIAG_NAME:
- unix_refill_name(xinfo, RTA_DATA(attr), len);
-diff --git a/misc-utils/lsfd.c b/misc-utils/lsfd.c
-index 771daef..4786d1d 100644
---- a/misc-utils/lsfd.c
-+++ b/misc-utils/lsfd.c
-@@ -84,6 +84,14 @@ static int kcmp(pid_t pid1 __attribute__((__unused__)),
-
- #include "lsfd.h"
-
-+UL_DEBUG_DEFINE_MASK(lsfd);
-+UL_DEBUG_DEFINE_MASKNAMES(lsfd) = UL_DEBUG_EMPTY_MASKNAMES;
-+
-+static void lsfd_init_debug(void)
-+{
-+ __UL_INIT_DEBUG_FROM_ENV(lsfd, LSFD_DEBUG_, 0, LSFD_DEBUG);
-+}
-+
- /*
- * /proc/$pid/mountinfo entries
- */
-@@ -2271,6 +2279,8 @@ int main(int argc, char *argv[])
- { NULL, 0, NULL, 0 },
- };
-
-+ lsfd_init_debug();
-+
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
-diff --git a/misc-utils/lsfd.h b/misc-utils/lsfd.h
-index 1859dc7..e646758 100644
---- a/misc-utils/lsfd.h
-+++ b/misc-utils/lsfd.h
-@@ -28,7 +28,11 @@
- #include <sys/stat.h>
- #include <dirent.h>
- #include <inttypes.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <stdlib.h>
-
-+#include "debug.h"
- #include "libsmartcols.h"
- #include "list.h"
- #include "nls.h"
-@@ -36,6 +40,17 @@
- #include "strutils.h"
- #include "xalloc.h"
-
-+/*
-+ * debug
-+ */
-+UL_DEBUG_DECLARE_MASK(lsfd);
-+
-+#define LSFD_DEBUG_INIT (1 << 1)
-+#define LSFD_DEBUG_ENDPOINTS (1 << 2)
-+#define LSFD_DEBUG_ALL 0xFFFF
-+
-+#define DBG(m, x) __UL_DBG(lsfd, LSFD_DEBUG_, m, x)
-+
- /*
- * column IDs
- */
diff --git a/debian/patches/upstream/lslocks-don-t-abort-gathering-per-process-information-eve.patch b/debian/patches/upstream/lslocks-don-t-abort-gathering-per-process-information-eve.patch
deleted file mode 100644
index 59abf34..0000000
--- a/debian/patches/upstream/lslocks-don-t-abort-gathering-per-process-information-eve.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Sat, 13 Apr 2024 03:59:39 +0900
-Subject: lslocks: don't abort gathering per-process information even if
- opening a /proc/[0-9]* fails
-
-If a process ($pid) taking a lock is gone while running lslocks,
-gathering per-process information for the process may fail in opening
-/proc/$pid. Though lslocks should work with incomplete information,
-the original code stopped gathering per-process information for the
-other processes.
-
-As a result of the original behavior, tests/ts/lslocks/lslocks really
-failed in an environment where multiple test cases ran simultaneously.
-
-Close #2624 again.
-See also #2633.
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
-(cherry picked from commit 20df923cc3d2da12a5296223c3ff0de7484cc587)
----
- misc-utils/lslocks.c | 6 ++----
- tests/ts/lslocks/lslocks | 11 -----------
- 2 files changed, 2 insertions(+), 15 deletions(-)
-
-diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c
-index 3d70b04..60f6595 100644
---- a/misc-utils/lslocks.c
-+++ b/misc-utils/lslocks.c
-@@ -513,10 +513,8 @@ static int get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
- if (procfs_dirent_get_pid(d, &pid) != 0)
- continue;
-
-- if (procfs_process_init_path(pc, pid) != 0) {
-- rc = -1;
-- break;
-- }
-+ if (procfs_process_init_path(pc, pid) != 0)
-+ continue;
-
- if (procfs_process_get_cmdname(pc, buf, sizeof(buf)) <= 0)
- continue;
-diff --git a/tests/ts/lslocks/lslocks b/tests/ts/lslocks/lslocks
-index 912fac8..a9ef69a 100755
---- a/tests/ts/lslocks/lslocks
-+++ b/tests/ts/lslocks/lslocks
-@@ -53,14 +53,6 @@ OFD_METHODS=(
- lease-w
- )
-
--SLEEP()
--{
-- # It appears that there is a time lag between locking and its
-- # visibility in /proc/locks. See the unstbale results of errors I
-- # observed in https://github.com/util-linux/util-linux/pull/2629.
-- sleep 1
--}
--
- DFD=18
- COLS_WITH_HOLDERS=COMMAND,TYPE,SIZE,MODE,START,END,HOLDERS
- run_lslocks()
-@@ -71,8 +63,6 @@ run_lslocks()
- rm -f "${FILE}"
- coproc MKFDS { "$TS_HELPER_MKFDS" make-regular-file $FD file="$FILE" lock=$m; }
- if read -r -u "${MKFDS[0]}" PID; then
-- SLEEP
--
- "$TS_CMD_LSLOCKS" ${OPTS} --pid "${PID}" -o "${COLS}"
- echo "# $m + ${COLS} + ${OPTS}": $?
- "$TS_CMD_LSLOCKS" ${OPTS} --pid "${PID}" -o PATH | sed -e 's#.*\('"$FILE0"'\)--[0-9]\+ *$#\1#'
-@@ -91,7 +81,6 @@ run_lslocks_with_co_holders()
- {
- rm -f "${FILE}"
- coproc MKFDS { "$TS_HELPER_MKFDS" make-regular-file $FD file="$FILE" lock=$m dupfd=$DFD; }
-- SLEEP
- if read -r -u "${MKFDS[0]}" PID; then
- "$TS_CMD_LSLOCKS" ${OPTS} --pid "${PID}" -o "${COLS_WITH_HOLDERS}" | sed -e "s/${PID},/1,/g"
- echo "# $m + ${COLS_WITH_HOLDERS} + ${OPTS}": ${PIPESTATUS[0]}
diff --git a/debian/patches/upstream/lslocks-remove-a-unused-local-variable.patch b/debian/patches/upstream/lslocks-remove-a-unused-local-variable.patch
deleted file mode 100644
index b1547cc..0000000
--- a/debian/patches/upstream/lslocks-remove-a-unused-local-variable.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Sat, 13 Apr 2024 04:13:03 +0900
-Subject: lslocks: remove a unused local variable
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
-(cherry picked from commit c8c85e8e54aa201766f2420e2a7c86ccfa8d5df0)
----
- misc-utils/lslocks.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c
-index 60f6595..176173f 100644
---- a/misc-utils/lslocks.c
-+++ b/misc-utils/lslocks.c
-@@ -490,12 +490,11 @@ static int get_pid_locks(void *locks, void (*add_lock)(void *, struct lock *), s
- return rc;
- }
-
--static int get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
-+static void get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
- {
- DIR *dir;
- struct dirent *d;
- struct path_cxt *pc = NULL;
-- int rc = 0;
-
- pc = ul_new_path(NULL);
- if (!pc)
-@@ -526,7 +525,7 @@ static int get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
- closedir(dir);
- ul_unref_path(pc);
-
-- return rc;
-+ return;
- }
-
- static int get_proc_locks(void *locks, void (*add_lock)(void *, struct lock *), void *fallback)
diff --git a/debian/patches/upstream/lsns-fix-netns-use.patch b/debian/patches/upstream/lsns-fix-netns-use.patch
deleted file mode 100644
index 1d1c8b6..0000000
--- a/debian/patches/upstream/lsns-fix-netns-use.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 22 Apr 2024 14:28:52 +0200
-Subject: lsns: fix netns use
-
- # ip netns add vpn
- # lsns -T -t net
- Segmentation fault (core dumped)
-
-The function interpolate_missing_namespaces() reads data from /proc.
-However, in the case of a persistent namespace, there is no procfs
-entry for the namespace. Therefore, this function should ignore it.
-
-Fixes: https://github.com/util-linux/util-linux/issues/2982
-Signed-off-by: Karel Zak <kzak@redhat.com>
-(cherry picked from commit 42880f54894c1d7fd113552ff8474566a2595a0d)
----
- sys-utils/lsns.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
-index 4ea01d2..6c87c47 100644
---- a/sys-utils/lsns.c
-+++ b/sys-utils/lsns.c
-@@ -793,6 +793,9 @@ static void interpolate_missing_namespaces(struct lsns *ls, struct lsns_namespac
- int fd_orphan, fd_missing;
- struct stat st;
-
-+ if (!orphan->proc)
-+ return;
-+
- orphan->related_ns[rela] = get_namespace(ls, orphan->related_id[rela]);
- if (orphan->related_ns[rela])
- return;
diff --git a/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch b/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
deleted file mode 100644
index fd57faf..0000000
--- a/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Mon, 15 Apr 2024 01:44:38 +0900
-Subject: lsns: report with warnx if a namespace related ioctl fails with
- ENOSYS
-
-Qemu userspace emulation reports ENOSYS if it doesn't support a given
-ioctl command.
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
-(cherry picked from commit 0a7a8fbc7a82dfbd9e925d1b4d4936bf4e011bc1)
----
- sys-utils/lsns.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
-index e68bdbe..1f3574f 100644
---- a/sys-utils/lsns.c
-+++ b/sys-utils/lsns.c
-@@ -68,7 +68,7 @@ UL_DEBUG_DEFINE_MASKNAMES(lsns) = UL_DEBUG_EMPTY_MASKNAMES;
-
- #define lsns_ioctl(fildes, request, ...) __extension__ ({ \
- int ret = ioctl(fildes, request, ##__VA_ARGS__); \
-- if (ret == -1 && errno == ENOTTY) \
-+ if (ret == -1 && (errno == ENOTTY || errno == ENOSYS)) \
- warnx("Unsupported ioctl %s", #request); \
- ret; })
-
diff --git a/debian/patches/upstream/lsns-tolerate-lsns_ioctl-fd-NS_GET_-PARENT-USERNS-failing.patch b/debian/patches/upstream/lsns-tolerate-lsns_ioctl-fd-NS_GET_-PARENT-USERNS-failing.patch
deleted file mode 100644
index ff17dc2..0000000
--- a/debian/patches/upstream/lsns-tolerate-lsns_ioctl-fd-NS_GET_-PARENT-USERNS-failing.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Sun, 14 Apr 2024 01:40:14 +0900
-Subject: lsns: tolerate lsns_ioctl(fd,
- NS_GET_{PARENT,USERNS}) failing with ENOSYS
-
-With the original code, "lsns/filedesc" test case failed on
-"build (qemu-user, s390x)" and "build (qemu-user, riscv64)".
-
-On the platforms, lsns_ioctl(fd, NS_GET_{PARENT,USERNS}) failed
-with ENOSYS. The error stoped the iteration for gathering
-information from /proc/[0-9]+. As a result, lsns printed
-nothing. We don't expect this behavior.
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
-(cherry picked from commit f2a8b20d9c63f771d1fddd639ea1ec3fe034dc6d)
----
- sys-utils/lsns.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
-index 1f3574f..4ea01d2 100644
---- a/sys-utils/lsns.c
-+++ b/sys-utils/lsns.c
-@@ -308,7 +308,11 @@ static int get_ns_ino(int dir, const char *nsname, ino_t *ino, ino_t *pino, ino_
- return -errno;
- if (strcmp(nsname, "pid") == 0 || strcmp(nsname, "user") == 0) {
- if ((pfd = lsns_ioctl(fd, NS_GET_PARENT)) < 0) {
-- if (errno == EPERM)
-+ if (errno == EPERM
-+ /* On the test platforms, "build (qemu-user, s390x)" and
-+ * "build (qemu-user, riscv64)", the ioctl reported ENOSYS.
-+ */
-+ || errno == ENOSYS)
- goto user;
- close(fd);
- return -errno;
-@@ -323,7 +327,11 @@ static int get_ns_ino(int dir, const char *nsname, ino_t *ino, ino_t *pino, ino_
- }
- user:
- if ((ofd = lsns_ioctl(fd, NS_GET_USERNS)) < 0) {
-- if (errno == EPERM)
-+ if (errno == EPERM
-+ /* On the test platforms, "build (qemu-user, s390x)" and
-+ * "build (qemu-user, riscv64)", the ioctl reported ENOSYS.
-+ */
-+ || errno == ENOSYS)
- goto out;
- close(fd);
- return -errno;
diff --git a/debian/patches/upstream/pam_lastlog2-link-against-liblastlog.patch b/debian/patches/upstream/pam_lastlog2-link-against-liblastlog.patch
deleted file mode 100644
index 6d299b2..0000000
--- a/debian/patches/upstream/pam_lastlog2-link-against-liblastlog.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Mon, 1 Apr 2024 22:53:32 +0200
-Subject: pam_lastlog2: link against liblastlog
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-While at it also drop the duplicated include path.
-
-Fixes #2897
-Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-(cherry picked from commit 2722b40012740372daf3585b7c071fcbede13359)
----
- pam_lastlog2/src/Makemodule.am | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/pam_lastlog2/src/Makemodule.am b/pam_lastlog2/src/Makemodule.am
-index 9884416..f9a9b6b 100644
---- a/pam_lastlog2/src/Makemodule.am
-+++ b/pam_lastlog2/src/Makemodule.am
-@@ -10,8 +10,9 @@ EXTRA_pam_lastlog2_la_DEPENDENCIES = \
- pam_lastlog2_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(SOLIB_CFLAGS) \
-- -I$(ul_liblastlog2_incdir) \
-- -Iliblastlog2/src
-+ -I$(ul_liblastlog2_incdir)
-+
-+pam_lastlog2_la_LIBADD = liblastlog2.la
-
- pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) -module -avoid-version -shared
- if HAVE_VSCRIPT
diff --git a/debian/patches/upstream/tests-lsfd-mkfds-multiplexing-skip-if-proc-pid-syscall-is.patch b/debian/patches/upstream/tests-lsfd-mkfds-multiplexing-skip-if-proc-pid-syscall-is.patch
deleted file mode 100644
index cdd72f6..0000000
--- a/debian/patches/upstream/tests-lsfd-mkfds-multiplexing-skip-if-proc-pid-syscall-is.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Fri, 5 Apr 2024 04:00:45 +0900
-Subject: tests: (lsfd::mkfds-multiplexing) skip if /proc/$pid/syscall is
- broken
-
-Close #2867
-Close #2887
-
-We should skip the test case on the platforms where /proc/$pid/syscall
-doesn't report correct system call number. On such platforms,
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
----
- tests/ts/lsfd/mkfds-multiplexing | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/tests/ts/lsfd/mkfds-multiplexing b/tests/ts/lsfd/mkfds-multiplexing
-index 8cc7f31..a53f6eb 100755
---- a/tests/ts/lsfd/mkfds-multiplexing
-+++ b/tests/ts/lsfd/mkfds-multiplexing
-@@ -26,6 +26,8 @@ ts_check_test_command "$TS_HELPER_MKFDS"
- # /proc/${PID}/syscall is rendered in the host side byteorder.
- ts_skip_qemu_user
-
-+ts_check_prog "cat"
-+ts_check_prog "cut"
- ts_check_prog "grep"
-
- ts_cd "$TS_OUTDIR"
-@@ -44,12 +46,24 @@ for multiplexer in pselect6 select poll ppoll; do
- } > "$TS_OUTPUT" 2>&1
-
- if read -r -u "${MKFDS[0]}" PID; then
-- if ! cat /proc/"${PID}"/syscall > /dev/null 2>&1; then
-+ syscall_line=$(cat /proc/"${PID}"/syscall 2>> "$TS_OUTPUT")
-+ syscall_status=$?
-+ if [[ "$syscall_status" != 0 ]]; then
- kill -CONT "${PID}"
- wait "${MKFDS_PID}"
- ts_skip_subtest "cannot open /proc/${PID}/syscall"
- continue
- fi
-+ syscall_n=$(cut -f1 -d' ' <<< "$syscall_line")
-+ # We assume the syscall number for the $multiplexer is not zero
-+ # on any platforms.
-+ if [[ "$syscall_n" == 0 ]]; then
-+ kill -CONT "${PID}"
-+ wait "${MKFDS_PID}"
-+ ts_skip_subtest "incorrect syscall number in /proc/${PID}/syscall"
-+ continue
-+ fi
-+
- {
- "${TS_CMD_LSFD}" -n -o ASSOC,XMODE -p "${PID}" -Q '(FD >= 10) && (FD <= 22)'
- echo "[$multiplexer] ASSOC,XMODE: $?"
diff --git a/debian/patches/upstream/tests-test_mkfds-sockdiag-verify-the-recived-message.patch b/debian/patches/upstream/tests-test_mkfds-sockdiag-verify-the-recived-message.patch
deleted file mode 100644
index efd9063..0000000
--- a/debian/patches/upstream/tests-test_mkfds-sockdiag-verify-the-recived-message.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From: Masatake YAMATO <yamato@redhat.com>
-Date: Tue, 2 Apr 2024 06:34:40 +0900
-Subject: tests: (test_mkfds::sockdiag) verify the recived message
-
-Signed-off-by: Masatake YAMATO <yamato@redhat.com>
----
- 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 39427ba..4b138c2 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) {