From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] util-linux: update to 2.40.1
Date: Sun, 02 Jun 2024 13:34:50 +0200 [thread overview]
Message-ID: <20240602113450.BD03B25251@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50538@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/tanpsi/void-packages util-linux
https://github.com/void-linux/void-packages/pull/50538
util-linux: update to 2.40.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-GLIBC)
A patch file from https://github.com/void-linux/void-packages/pull/50538.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-util-linux-50538.patch --]
[-- Type: text/x-diff, Size: 15586 bytes --]
From c298fe87b16a6e8517202c852dc8cbabf05e5119 Mon Sep 17 00:00:00 2001
From: Tanish Yadav <devtany@gmail.com>
Date: Mon, 27 May 2024 19:27:46 +0530
Subject: [PATCH 1/5] util-linux-common: update to 2.40.1
---
srcpkgs/util-linux-common/template | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/util-linux-common/template b/srcpkgs/util-linux-common/template
index a166247a5d0756..3d9d2b25e72d59 100644
--- a/srcpkgs/util-linux-common/template
+++ b/srcpkgs/util-linux-common/template
@@ -1,8 +1,8 @@
# Template file for 'util-linux-common'
# Keep this package sync with util-linux
pkgname=util-linux-common
-version=2.39.3
-revision=2
+version=2.40.1
+revision=1
build_style=gnu-configure
configure_args="
--disable-all-programs
@@ -26,7 +26,11 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
distfiles="${KERNEL_SITE}/utils/util-linux/v${version%.${version#*.*.}}/util-linux-${version}.tar.xz"
-checksum=7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f
+checksum=59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ] && [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then
+ configure_args+=" --disable-year2038"
+fi
post_extract() {
# hung inside xbps-src
From 7bbf4f5b33d9f77e56268d8d3425e7db4348ef7d Mon Sep 17 00:00:00 2001
From: Tanish Yadav <devtany@gmail.com>
Date: Wed, 29 May 2024 11:57:45 +0530
Subject: [PATCH 2/5] util-linux: update to 2.40.1
---
.../patches/su-common-fix-ptr-truncate.patch | 58 -------------------
srcpkgs/util-linux/template | 15 +++--
2 files changed, 11 insertions(+), 62 deletions(-)
delete mode 100644 srcpkgs/util-linux/patches/su-common-fix-ptr-truncate.patch
diff --git a/srcpkgs/util-linux/patches/su-common-fix-ptr-truncate.patch b/srcpkgs/util-linux/patches/su-common-fix-ptr-truncate.patch
deleted file mode 100644
index 24cdb7de3e5429..00000000000000
--- a/srcpkgs/util-linux/patches/su-common-fix-ptr-truncate.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 77454e58d58f904cfdc02d3ca5bb65f1bd8739fc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 3 Dec 2023 19:59:46 -0800
-Subject: [PATCH] login-utils: include libgen.h for basename API
-
-musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler
-
-include libgen.h for using the posix declaration of the funciton.
-
-Fixes
-
-../util-linux-2.39.2/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
- 847 | shell_basename = basename(shell);
- | ^
-
-[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- login-utils/su-common.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/login-utils/su-common.c b/login-utils/su-common.c
-index c5c0102e5..06ce5dba2 100644
---- a/login-utils/su-common.c
-+++ b/login-utils/su-common.c
-@@ -26,6 +26,7 @@
- #include <sys/types.h>
- #include <pwd.h>
- #include <grp.h>
-+#include <libgen.h>
- #include <security/pam_appl.h>
- #ifdef HAVE_SECURITY_PAM_MISC_H
- # include <security/pam_misc.h>
-@@ -840,17 +841,20 @@ static void run_shell(
- su->simulate_login ? " login" : "",
- su->fast_startup ? " fast-start" : ""));
-
-+ char* tmp = xstrdup(shell);
- if (su->simulate_login) {
- char *arg0;
- char *shell_basename;
-
-- shell_basename = basename(shell);
-+ shell_basename = basename(tmp);
- arg0 = xmalloc(strlen(shell_basename) + 2);
- arg0[0] = '-';
- strcpy(arg0 + 1, shell_basename);
- args[0] = arg0;
-- } else
-- args[0] = basename(shell);
-+ } else {
-+ args[0] = basename(tmp);
-+ }
-+ free(tmp);
-
- if (su->fast_startup)
- args[argno++] = "-f";
diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 64f262c25a4a59..3ba301453222bd 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,13 +1,14 @@
# Template file for 'util-linux'
# Keep this package sync with util-linux-common
pkgname=util-linux
-version=2.39.3
-revision=2
+version=2.40.1
+revision=1
build_style=gnu-configure
configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown
--enable-libblkid --enable-fsck --disable-rpath --enable-fs-paths-extra=/usr/sbin:/usr/bin
--enable-vipw --enable-newgrp --enable-chfn-chsh --with-systemdsystemunitdir=no
- --with-udev --without-python --enable-write --disable-libmount-mountfd-support"
+ --with-udev --without-python --enable-write --disable-libmount-mountfd-support
+ --disable-liblastlog2 --disable-pam-lastlog2"
hostmakedepends="gettext pkg-config"
makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel
eudev-libudev-devel"
@@ -22,12 +23,16 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/v${version%.${version#*.*.}}/${pkgname}-${version}.tar.xz"
-checksum=7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f
+checksum=59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libxcrypt-devel"
fi
+if [ "$XBPS_TARGET_LIBC" = "musl" ] && [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then
+ configure_args+=" --disable-year2038"
+fi
+
# Create uuidd system account for uuidd.
system_accounts="_uuidd"
_uuidd_homedir="/var/empty"
@@ -37,6 +42,8 @@ replaces="rfkill>=0"
# XXX musl needs this for switch_root(8).
CFLAGS="-D_DIRENT_HAVE_D_TYPE"
+# XXX currently packaged musl doesn't provide __NR_landlock_* macros
+CFLAGS+=" -D__NR_landlock_create_ruleset=444 -D__NR_landlock_add_rule=445 -D__NR_landlock_restrict_self=446"
alternatives="
logger:logger:/usr/bin/${pkgname}-logger
From 9579618939fe90aa6ef70ad554153f71b1103a42 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jun 2024 06:37:06 -0400
Subject: [PATCH 3/5] fixup! util-linux-common: update to 2.40.1
---
common/shlibs | 1 +
srcpkgs/liblastlog2 | 1 +
srcpkgs/liblastlog2-devel | 1 +
srcpkgs/util-linux-common/template | 34 ++++++++++++++++++++++++++++--
4 files changed, 35 insertions(+), 2 deletions(-)
create mode 120000 srcpkgs/liblastlog2
create mode 120000 srcpkgs/liblastlog2-devel
diff --git a/common/shlibs b/common/shlibs
index 279bf10d77d26e..df35d4815fb9d9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -209,6 +209,7 @@ libpsx.so.2 libcap-2.45_1
liblzma.so.5 liblzma-5.0.0_1
libuuid.so.1 libuuid-2.18_1
libblkid.so.1 libblkid-2.18_1
+liblastlog2.so.2 liblastlog2-2.40.1_1
libidn.so.12 libidn-1.35_1
libusb-1.0.so.0 libusb-1.0.0_1
libusb-0.1.so.4 libusb-compat-0.1.0_1
diff --git a/srcpkgs/liblastlog2 b/srcpkgs/liblastlog2
new file mode 120000
index 00000000000000..9b5553747383e5
--- /dev/null
+++ b/srcpkgs/liblastlog2
@@ -0,0 +1 @@
+util-linux-common
\ No newline at end of file
diff --git a/srcpkgs/liblastlog2-devel b/srcpkgs/liblastlog2-devel
new file mode 120000
index 00000000000000..9b5553747383e5
--- /dev/null
+++ b/srcpkgs/liblastlog2-devel
@@ -0,0 +1 @@
+util-linux-common
\ No newline at end of file
diff --git a/srcpkgs/util-linux-common/template b/srcpkgs/util-linux-common/template
index 3d9d2b25e72d59..d85f3a9a60b4c7 100644
--- a/srcpkgs/util-linux-common/template
+++ b/srcpkgs/util-linux-common/template
@@ -14,12 +14,13 @@ configure_args="
--enable-libmount
--enable-libsmartcols
--enable-libuuid
+ --enable-liblastlog2
--exec-prefix=\${prefix}
--with-systemdsystemunitdir=no
--without-python
- --without-udev --disable-libmount-mountfd-support"
+ --without-udev"
hostmakedepends="gettext pkg-config"
-makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel sqlite-devel"
checkdepends="xz tar iproute2 socat procps-ng bc"
short_desc="Miscellaneous linux utilities - common files"
maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -81,6 +82,7 @@ libfdisk-devel_package() {
vmove usr/include/libfdisk
}
}
+
libmount_package() {
short_desc="Library for mount(8)"
depends="${sourcepkg}>=${version}_1"
@@ -88,6 +90,7 @@ libmount_package() {
vmove "usr/lib/libmount.so.*"
}
}
+
libmount-devel_package() {
depends="libblkid-devel>=${version}_1<=${version}_9999
libmount>=${version}_1<=${version}_9999"
@@ -99,6 +102,7 @@ libmount-devel_package() {
vmove usr/include/libmount
}
}
+
libblkid_package() {
short_desc="Library to handle device identification"
depends="${sourcepkg}>=${version}_1"
@@ -106,6 +110,7 @@ libblkid_package() {
vmove "usr/lib/libblkid.so.*"
}
}
+
libblkid-devel_package() {
depends="zlib-devel libuuid-devel>=${version}_1<=${version}_9999
libblkid>=${version}_1<=${version}_9999"
@@ -118,6 +123,7 @@ libblkid-devel_package() {
vmove usr/share/man/man3/libblkid.3
}
}
+
libuuid_package() {
short_desc="UUID library"
depends="${sourcepkg}>=${version}_1"
@@ -131,6 +137,7 @@ libuuid_package() {
vmove "usr/lib/libuuid.so.*"
}
}
+
libuuid-devel_package() {
depends="libuuid>=${version}_${revision}<=${version}_9999"
short_desc="UUID library development files"
@@ -143,6 +150,7 @@ libuuid-devel_package() {
vmove usr/share/man/man3/uuid*
}
}
+
libsmartcols-devel_package() {
depends="libsmartcols>=${version}_${revision}<=${version}_9999"
short_desc="Table or Tree library from util-linux - development files"
@@ -153,6 +161,7 @@ libsmartcols-devel_package() {
vmove usr/lib/pkgconfig/smartcols*
}
}
+
libsmartcols_package() {
short_desc="Table or Tree library from util-linux"
depends="${sourcepkg}>=${version}_1"
@@ -160,3 +169,24 @@ libsmartcols_package() {
vmove usr/lib/libsmartcols.so.*
}
}
+
+liblastlog2-devel_package() {
+ depends="libsmartcols>=${version}_${revision}<=${version}_9999"
+ short_desc+="Lastlog replacement library from util-linux - development files"
+ pkg_install() {
+ vmove usr/share/man/man3/lastlog2*
+ vmove usr/share/man/man3/ll2*
+ vmove usr/include/liblastlog2
+ vmove usr/lib/pkgconfig/lastlog2*
+ vmove usr/lib/liblastlog2.a
+ vmove usr/lib/liblastlog2.so
+ }
+}
+
+liblastlog2_package() {
+ short_desc="Lastlog replacement library from util-linux"
+ depends="${sourcepkg}>=${version}_1"
+ pkg_install() {
+ vmove usr/lib/liblastlog2.so.*
+ }
+}
From 45cbc08b38d7ca36c7603dd13489e488bb15542b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jun 2024 06:38:03 -0400
Subject: [PATCH 4/5] fixup! util-linux: update to 2.40.1
---
srcpkgs/util-linux/template | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 3ba301453222bd..cc15af24a20013 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -7,16 +7,16 @@ build_style=gnu-configure
configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown
--enable-libblkid --enable-fsck --disable-rpath --enable-fs-paths-extra=/usr/sbin:/usr/bin
--enable-vipw --enable-newgrp --enable-chfn-chsh --with-systemdsystemunitdir=no
- --with-udev --without-python --enable-write --disable-libmount-mountfd-support
- --disable-liblastlog2 --disable-pam-lastlog2"
+ --with-udev --without-python --enable-write"
hostmakedepends="gettext pkg-config"
makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel
- eudev-libudev-devel"
+ eudev-libudev-devel sqlite-devel"
depends="libfdisk>=${version}_1<=${version}_9999
libblkid>=${version}_1<=${version}_9999
libmount>=${version}_1<=${version}_9999
libsmartcols>=${version}_1<=${version}_9999
- libuuid>=${version}_1<=${version}_9999"
+ libuuid>=${version}_1<=${version}_9999
+ liblastlog2>=${version}_1<=${version}_9999"
checkdepends="xz tar iproute2 socat procps-ng bc"
short_desc="Miscellaneous linux utilities"
maintainer="Enno Boland <gottox@voidlinux.org>"
From 445ab57e19c1d2bebc2363fa2e59d74a7e4d9f15 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jun 2024 06:38:30 -0400
Subject: [PATCH 5/5] runit-void: fix remount for overlay
---
.../runit-void/patches/util-linux-2.40.patch | 59 +++++++++++++++++++
srcpkgs/runit-void/template | 2 +-
2 files changed, 60 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/runit-void/patches/util-linux-2.40.patch
diff --git a/srcpkgs/runit-void/patches/util-linux-2.40.patch b/srcpkgs/runit-void/patches/util-linux-2.40.patch
new file mode 100644
index 00000000000000..0c75ad64e73c3a
--- /dev/null
+++ b/srcpkgs/runit-void/patches/util-linux-2.40.patch
@@ -0,0 +1,59 @@
+From 4f745732b8b56a54dd2ce87157c00d44255eda3b Mon Sep 17 00:00:00 2001
+From: classabbyamp <void@placeviolette.net>
+Date: Sun, 2 Jun 2024 06:31:30 -0400
+Subject: [PATCH] core-services, shutdown.d: force legacy mount iface for
+ remount
+
+With util-linux>=2.40, filesystems that do not support remounting with
+different options fail because the new kernel mount interface is used.
+This breaks booting an overlayfs (like live ISOs).
+
+By setting `LIBMOUNT_FORCE_MOUNT2=always`, we force `mount(8)` to use
+the old kernel mount interface, which ignores changed options.
+
+see also:
+* https://github.com/util-linux/util-linux/issues/2576
+* https://github.com/void-linux/void-mklive/issues/369
+---
+ core-services/03-filesystems.sh | 4 ++--
+ shutdown.d/80-filesystems.sh | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh
+index bb7eac0..6035cad 100644
+--- a/core-services/03-filesystems.sh
++++ b/core-services/03-filesystems.sh
+@@ -3,7 +3,7 @@
+ [ -n "$VIRTUALIZATION" ] && return 0
+
+ msg "Remounting rootfs read-only..."
+-mount -o remount,ro / || emergency_shell
++LIBMOUNT_FORCE_MOUNT2=always mount -o remount,ro / || emergency_shell
+
+ if [ -x /sbin/dmraid -o -x /bin/dmraid ]; then
+ msg "Activating dmraid devices..."
+@@ -74,7 +74,7 @@ if [ -z "$FASTBOOT" ]; then
+ fi
+
+ msg "Mounting rootfs read-write..."
+-mount -o remount,rw / || emergency_shell
++LIBMOUNT_FORCE_MOUNT2=always mount -o remount,rw / || emergency_shell
+
+ msg "Mounting all non-network filesystems..."
+ mount -a -t "nosysfs,nonfs,nonfs4,nosmbfs,nocifs" -O no_netdev || emergency_shell
+diff --git a/shutdown.d/80-filesystems.sh b/shutdown.d/80-filesystems.sh
+index 95dcce4..7a83de3 100644
+--- a/shutdown.d/80-filesystems.sh
++++ b/shutdown.d/80-filesystems.sh
+@@ -3,7 +3,7 @@ if [ -z "$VIRTUALIZATION" ]; then
+ swapoff -a
+ umount -r -a -t nosysfs,noproc,nodevtmpfs,notmpfs
+ msg "Remounting rootfs read-only..."
+- mount -o remount,ro /
++ LIBMOUNT_FORCE_MOUNT2=always mount -o remount,ro /
+ fi
+
+ sync
+--
+2.45.1
+
diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index 1858738a88180f..dc74a41785cab0 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
# Template file for 'runit-void'
pkgname=runit-void
version=20231124
-revision=4
+revision=5
build_style=gnu-makefile
short_desc="Void Linux runit scripts"
maintainer="Enno Boland <gottox@voidlinux.org>"
next prev parent reply other threads:[~2024-06-02 11:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 14:18 [PR PATCH] " tanpsi
2024-05-28 10:28 ` [PR PATCH] [Updated] " tanpsi
2024-05-28 17:45 ` tanpsi
2024-05-29 6:30 ` [PR PATCH] [Updated] " tanpsi
2024-05-29 6:36 ` tanpsi
2024-06-02 9:27 ` [PR REVIEW] " classabbyamp
2024-06-02 10:38 ` [PR PATCH] [Updated] " classabbyamp
2024-06-02 11:34 ` classabbyamp [this message]
2024-06-02 15:07 ` [PR REVIEW] " tanpsi
2024-06-02 17:34 ` tanpsi
2024-06-02 17:50 ` [PR REVIEW] " classabbyamp
2024-06-02 17:51 ` classabbyamp
2024-06-09 13:53 ` [PR PATCH] [Updated] " classabbyamp
2024-06-09 14:04 ` classabbyamp
2024-06-10 17:08 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240602113450.BD03B25251@inbox.vuxu.org \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).