From 5441fd4c4f158f999ffd309f64fceca611448d38 Mon Sep 17 00:00:00 2001 From: Tanish Yadav Date: Mon, 27 May 2024 19:27:46 +0530 Subject: [PATCH 1/4] util-linux-common: update to 2.40.1 --- common/shlibs | 1 + srcpkgs/liblastlog2 | 1 + srcpkgs/liblastlog2-devel | 1 + srcpkgs/util-linux-common/template | 44 ++++++++++++++++++++++++++---- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 120000 srcpkgs/liblastlog2 create mode 120000 srcpkgs/liblastlog2-devel diff --git a/common/shlibs b/common/shlibs index 6289c6b8576cfb..21af54fda8616e 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 a166247a5d0756..d85f3a9a60b4c7 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 @@ -14,19 +14,24 @@ 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 " 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 @@ -77,6 +82,7 @@ libfdisk-devel_package() { vmove usr/include/libfdisk } } + libmount_package() { short_desc="Library for mount(8)" depends="${sourcepkg}>=${version}_1" @@ -84,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" @@ -95,6 +102,7 @@ libmount-devel_package() { vmove usr/include/libmount } } + libblkid_package() { short_desc="Library to handle device identification" depends="${sourcepkg}>=${version}_1" @@ -102,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" @@ -114,6 +123,7 @@ libblkid-devel_package() { vmove usr/share/man/man3/libblkid.3 } } + libuuid_package() { short_desc="UUID library" depends="${sourcepkg}>=${version}_1" @@ -127,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" @@ -139,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" @@ -149,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" @@ -156,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 b8c07a40287a6b7317fc3117927bb7526812d031 Mon Sep 17 00:00:00 2001 From: Tanish Yadav Date: Wed, 29 May 2024 11:57:45 +0530 Subject: [PATCH 2/4] util-linux: update to 2.40.1 --- .../patches/su-common-fix-ptr-truncate.patch | 58 ------------------- srcpkgs/util-linux/template | 19 ++++-- 2 files changed, 13 insertions(+), 64 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 -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 ---- - 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 - #include - #include -+#include - #include - #ifdef HAVE_SECURITY_PAM_MISC_H - # include -@@ -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..cc15af24a20013 100644 --- a/srcpkgs/util-linux/template +++ b/srcpkgs/util-linux/template @@ -1,33 +1,38 @@ # 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" 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 " 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 284da1aba01b8968aacc482fec6a5fb43455b173 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sun, 9 Jun 2024 09:50:56 -0400 Subject: [PATCH 3/4] chroot-util-linux: update to 2.40.1. --- srcpkgs/chroot-util-linux/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/chroot-util-linux/template b/srcpkgs/chroot-util-linux/template index e2c3c5f49ed70b..86117bca0c8d77 100644 --- a/srcpkgs/chroot-util-linux/template +++ b/srcpkgs/chroot-util-linux/template @@ -1,6 +1,6 @@ # Template file for 'chroot-util-linux' pkgname=chroot-util-linux -version=2.38.1 +version=2.40.1 revision=1 bootstrap=yes build_style=gnu-configure @@ -10,14 +10,14 @@ configure_args="--without-ncurses --without-ncursesw --without-udev --disable-mountpoint --disable-fallocate --disable-unshare --disable-nls --disable-wall --disable-chfn-chsh-password --disable-su --disable-sulogin --disable-login --disable-runuser --disable-setpriv --disable-libsmartcols - --without-readline scanf_cv_alloc_modifier=as" + --disable-liblastlog2 --without-readline scanf_cv_alloc_modifier=as" makedepends="zlib-devel" short_desc="Miscellaneous linux utilities -- for xbps-src use" maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="http://userweb.kernel.org/~kzak/util-linux-ng" distfiles="${KERNEL_SITE}/utils/util-linux/v${version%.*}/util-linux-${version}.tar.xz" -checksum=60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f +checksum=59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f conflicts="util-linux>=0" provides="util-linux-${version}_${revision}" repository=bootstrap From 07d00c7966b2ec045ec819e97ad5f69be0d0f617 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sun, 2 Jun 2024 06:38:30 -0400 Subject: [PATCH 4/4] 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 +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 "