Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] lvm2: update to 2.03.18
@ 2023-02-20 16:51 dkwo
  2023-02-20 16:53 ` dkwo
                   ` (38 more replies)
  0 siblings, 39 replies; 40+ messages in thread
From: dkwo @ 2023-02-20 16:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]

There is a new pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03.18
- I tested the changes in this PR: I've been using it since today, so it'd benefit from more testing.
- I built this PR locally for my native architecture, (x86_64-musl)

Incidentally, I tried to update it to get rid of this message at boot:
```
=> Activating LVM devices for dm-crypt...
File descriptor 7 (/dev/nvme0n1) leaked on vgchange invocation. Parent PID 190: /bin/sh
  2 logical volume(2) in volume group "cryptroot" now active
```
but it's still there, not sure if it's important.

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 13760 bytes --]

From 5541ef445b8955839e14ed508837c90db2b22769 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.18

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 126 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/includes.patch           |  16 +++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  38 +-----
 8 files changed, 174 insertions(+), 74 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/includes.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 0c1d545fbe27..d5c854f967d2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -235,8 +235,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libXfont.so.1 libXfont-1.4.0_1
@@ -667,7 +667,6 @@ libboost_python311.so.1.81.0 boost-python3-1.81.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.15 libcpuid-0.5.0_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 000000000000..b3bd43acf94b
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,126 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 031b8453b..df153eb09 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -73,7 +73,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		resize2fs "$DEVPATH"
+ 		if [ $? -eq 0 ]; then
+@@ -82,7 +82,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		xfs_growfs "$DEVPATH"
+ 		if [ $? -eq 0 ]; then
+@@ -109,7 +109,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
+ 		if [ $? -eq 0 ]; then
+@@ -162,7 +162,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(($NEWSIZEBYTES/1024))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		resize2fs "$DEVPATH" "$NEWSIZEKB"k
+@@ -208,7 +208,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
+ 		if [ $? -eq 0 ]; then
+@@ -307,7 +307,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -388,11 +388,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -404,7 +404,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -422,15 +422,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -440,7 +440,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112c..9162f08cfe36 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/includes.patch b/srcpkgs/lvm2/patches/includes.patch
new file mode 100644
index 000000000000..b52a0453226b
--- /dev/null
+++ b/srcpkgs/lvm2/patches/includes.patch
@@ -0,0 +1,16 @@
+From: https://git.alpinelinux.org/aports/plain/main/lvm2/includes.patch
+
+diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c
+index ab359d31c..e6160e3fa 100644
+--- a/tools/vgimportdevices.c
++++ b/tools/vgimportdevices.c
+@@ -16,6 +16,8 @@
+ #include "lib/cache/lvmcache.h"
+ #include "lib/device/device_id.h"
+ 
++#include <sys/file.h>
++
+ struct vgimportdevices_params {
+ 	uint32_t added_devices;
+ };
+
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc139951717..000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index eccc6145f004..564cc1403497 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,16 +1,17 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.187
-revision=2
+version=2.03.18
+revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel
+ thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -18,7 +19,7 @@ license="GPL-2.0-only, LGPL-2.1-only"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=0e0d521a863a5db2440f2e1e7627ba82b70273ae4ab0bbe130851db0d58e5af1
+checksum=9f683e2980d95c0dcebbd25c7c177032c5615d7267bfc885eabfce59280f4769
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -38,13 +39,6 @@ pre_configure() {
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
 }
@@ -83,21 +77,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
@ 2023-02-20 16:53 ` dkwo
  2023-02-22 23:08 ` [PR PATCH] [Updated] " dkwo
                   ` (37 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-02-20 16:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1437309229

Comment:
#39821

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
  2023-02-20 16:53 ` dkwo
@ 2023-02-22 23:08 ` dkwo
  2023-02-27 18:25 ` dkwo
                   ` (36 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-02-22 23:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03.18
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

Incidentally, I tried to update it to get rid of this message at boot:
```
=> Activating LVM devices...
File descriptor 7 (/dev/nvme0n1) leaked on vgchange invocation. Parent PID 190: /bin/sh
  2 logical volume(s) in volume group "cryptroot" now active
```
but it's still there, not sure if it's important.

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 20304 bytes --]

From 5541ef445b8955839e14ed508837c90db2b22769 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH 1/2] lvm2: update to 2.03.18

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 126 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/includes.patch           |  16 +++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  38 +-----
 8 files changed, 174 insertions(+), 74 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/includes.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 0c1d545fbe27..d5c854f967d2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -235,8 +235,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libXfont.so.1 libXfont-1.4.0_1
@@ -667,7 +667,6 @@ libboost_python311.so.1.81.0 boost-python3-1.81.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.15 libcpuid-0.5.0_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 000000000000..b3bd43acf94b
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,126 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 031b8453b..df153eb09 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -73,7 +73,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		resize2fs "$DEVPATH"
+ 		if [ $? -eq 0 ]; then
+@@ -82,7 +82,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		xfs_growfs "$DEVPATH"
+ 		if [ $? -eq 0 ]; then
+@@ -109,7 +109,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
+ 		if [ $? -eq 0 ]; then
+@@ -162,7 +162,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(($NEWSIZEBYTES/1024))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		resize2fs "$DEVPATH" "$NEWSIZEKB"k
+@@ -208,7 +208,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
+ 		if [ $? -eq 0 ]; then
+@@ -307,7 +307,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -388,11 +388,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -404,7 +404,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -422,15 +422,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -440,7 +440,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112c..9162f08cfe36 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/includes.patch b/srcpkgs/lvm2/patches/includes.patch
new file mode 100644
index 000000000000..b52a0453226b
--- /dev/null
+++ b/srcpkgs/lvm2/patches/includes.patch
@@ -0,0 +1,16 @@
+From: https://git.alpinelinux.org/aports/plain/main/lvm2/includes.patch
+
+diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c
+index ab359d31c..e6160e3fa 100644
+--- a/tools/vgimportdevices.c
++++ b/tools/vgimportdevices.c
+@@ -16,6 +16,8 @@
+ #include "lib/cache/lvmcache.h"
+ #include "lib/device/device_id.h"
+ 
++#include <sys/file.h>
++
+ struct vgimportdevices_params {
+ 	uint32_t added_devices;
+ };
+
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc139951717..000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index eccc6145f004..564cc1403497 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,16 +1,17 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.187
-revision=2
+version=2.03.18
+revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel
+ thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -18,7 +19,7 @@ license="GPL-2.0-only, LGPL-2.1-only"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=0e0d521a863a5db2440f2e1e7627ba82b70273ae4ab0bbe130851db0d58e5af1
+checksum=9f683e2980d95c0dcebbd25c7c177032c5615d7267bfc885eabfce59280f4769
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -38,13 +39,6 @@ pre_configure() {
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
 }
@@ -83,21 +77,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}

From ce5364149c0850876a3e50a2415db08692b443b1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 22 Feb 2023 18:08:09 -0500
Subject: [PATCH 2/2] lvm 2.03.19

---
 .../0001-lvresize-use-POSIX-shell.patch       | 45 +++++++++----------
 srcpkgs/lvm2/patches/includes.patch           | 16 -------
 srcpkgs/lvm2/template                         |  6 +--
 3 files changed, 25 insertions(+), 42 deletions(-)
 delete mode 100644 srcpkgs/lvm2/patches/includes.patch

diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
index b3bd43acf94b..bac27ea1d9cf 100644
--- a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -8,7 +8,7 @@ Subject: [PATCH] lvresize: use POSIX shell
  1 file changed, 14 insertions(+), 14 deletions(-)
 
 diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
-index 031b8453b..df153eb09 100755
+index 90b1a97..1c48a71 100755
 --- a/scripts/lvresize_fs_helper.sh
 +++ b/scripts/lvresize_fs_helper.sh
 @@ -1,4 +1,4 @@
@@ -17,52 +17,52 @@ index 031b8453b..df153eb09 100755
  #
  # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
  #
-@@ -73,7 +73,7 @@ fsextend() {
+@@ -69,7 +69,7 @@ fsextend() {
  		fi
  	fi
  
 -	if [[ "$FSTYPE" == "ext"* ]]; then
 +	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
  		logmsg "resize2fs ${DEVPATH}"
- 		resize2fs "$DEVPATH"
- 		if [ $? -eq 0 ]; then
-@@ -82,7 +82,7 @@ fsextend() {
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
  			logmsg "resize2fs failed"
  			RESIZEFS_FAILED=1
  		fi
 -	elif [[ "$FSTYPE" == "xfs" ]]; then
 +	elif [ "$FSTYPE" = "xfs" ]; then
  		logmsg "xfs_growfs ${DEVPATH}"
- 		xfs_growfs "$DEVPATH"
- 		if [ $? -eq 0 ]; then
-@@ -109,7 +109,7 @@ fsextend() {
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
  
  	# If the fs was temporarily unmounted, now remount it.
  	# Not considered a command failure if this fails.
 -	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
 +	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
  		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
- 		mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
- 		if [ $? -eq 0 ]; then
-@@ -162,7 +162,7 @@ fsreduce() {
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
  		fi
  	fi
  
 -	if [[ "$FSTYPE" == "ext"* ]]; then
 +	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
- 		NEWSIZEKB=$(($NEWSIZEBYTES/1024))
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
  		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
- 		resize2fs "$DEVPATH" "$NEWSIZEKB"k
-@@ -208,7 +208,7 @@ fsreduce() {
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
  
  	# If the fs was temporarily unmounted, now remount it.
  	# Not considered a command failure if this fails.
 -	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
 +	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
  		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
- 		mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
- 		if [ $? -eq 0 ]; then
-@@ -307,7 +307,7 @@ DO_FSCK=0
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
  # mounted and the script unmounted it.
  REMOUNT=0
  
@@ -71,7 +71,7 @@ index 031b8453b..df153eb09 100755
  	errorexit "${SCRIPTNAME} must be run as root."
  fi
  
-@@ -388,11 +388,11 @@ done
+@@ -372,11 +372,11 @@ done
  #
  
  # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
@@ -85,7 +85,7 @@ index 031b8453b..df153eb09 100755
  	case "$FSTYPE" in
  	  ext[234]) ;;
  	  "xfs")    ;;
-@@ -404,7 +404,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
  	fi
  fi
  
@@ -94,7 +94,7 @@ index 031b8453b..df153eb09 100755
  	errorexit "Missing required --cryptpath for --cryptresize."
  fi
  
-@@ -422,15 +422,15 @@ if [ ! -e "$DEVPATH" ]; then
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
  	errorexit "Device does not exist \"$DEVPATH\"."
  fi
  
@@ -113,7 +113,7 @@ index 031b8453b..df153eb09 100755
  	errorexit "Cannot use --fsck with xfs."
  fi
  
-@@ -440,7 +440,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
  		errorexit "Failed to create temp dir."
  	fi
  	# In case the script terminates without doing cleanup
@@ -122,5 +122,4 @@ index 031b8453b..df153eb09 100755
  		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
  			logmsg "exit unmount ${TMPDIR}"
  			umount "$TMPDIR"
--- 
-2.38.1
+
diff --git a/srcpkgs/lvm2/patches/includes.patch b/srcpkgs/lvm2/patches/includes.patch
deleted file mode 100644
index b52a0453226b..000000000000
--- a/srcpkgs/lvm2/patches/includes.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-From: https://git.alpinelinux.org/aports/plain/main/lvm2/includes.patch
-
-diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c
-index ab359d31c..e6160e3fa 100644
---- a/tools/vgimportdevices.c
-+++ b/tools/vgimportdevices.c
-@@ -16,6 +16,8 @@
- #include "lib/cache/lvmcache.h"
- #include "lib/device/device_id.h"
- 
-+#include <sys/file.h>
-+
- struct vgimportdevices_params {
- 	uint32_t added_devices;
- };
-
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index 564cc1403497..3662efa419f4 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,11 +1,11 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.03.18
+version=2.03.19
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
  --enable-fsadm --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
@@ -19,7 +19,7 @@ license="GPL-2.0-only, LGPL-2.1-only"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=9f683e2980d95c0dcebbd25c7c177032c5615d7267bfc885eabfce59280f4769
+checksum=ec9ff9f1d998ce2b05f1ad22ddcf9401d202d0215811dc468d78cba6b0b26879
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
  2023-02-20 16:53 ` dkwo
  2023-02-22 23:08 ` [PR PATCH] [Updated] " dkwo
@ 2023-02-27 18:25 ` dkwo
  2023-03-14 13:25 ` mhmdanas
                   ` (35 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-02-27 18:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03.18
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

Incidentally, I tried to update it to get rid of this message at boot:
```
=> Activating LVM devices...
File descriptor 7 (/dev/nvme0n1) leaked on vgchange invocation. Parent PID 190: /bin/sh
  2 logical volume(s) in volume group "cryptroot" now active
```
but it's still there, not sure if it's important.

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 13075 bytes --]

From 031e8f226d759ea16c588d989e68e5379b0ec4d2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.19.

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  38 +-----
 7 files changed, 157 insertions(+), 74 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 538ff08ce5ff..441069a59bf5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -235,8 +235,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libXfont.so.1 libXfont-1.4.0_1
@@ -667,7 +667,6 @@ libboost_python311.so.1.81.0 boost-python3-1.81.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.15 libcpuid-0.5.0_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 000000000000..bac27ea1d9cf
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112c..9162f08cfe36 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc139951717..000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index eccc6145f004..3662efa419f4 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,16 +1,17 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.187
-revision=2
+version=2.03.19
+revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel
+ thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -18,7 +19,7 @@ license="GPL-2.0-only, LGPL-2.1-only"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=0e0d521a863a5db2440f2e1e7627ba82b70273ae4ab0bbe130851db0d58e5af1
+checksum=ec9ff9f1d998ce2b05f1ad22ddcf9401d202d0215811dc468d78cba6b0b26879
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -38,13 +39,6 @@ pre_configure() {
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
 }
@@ -83,21 +77,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (2 preceding siblings ...)
  2023-02-27 18:25 ` dkwo
@ 2023-03-14 13:25 ` mhmdanas
  2023-03-14 19:14 ` dkwo
                   ` (34 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-03-14 13:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 174 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1468100496

Comment:
Can this be updated to 2.03.19?

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (3 preceding siblings ...)
  2023-03-14 13:25 ` mhmdanas
@ 2023-03-14 19:14 ` dkwo
  2023-03-14 19:14 ` dkwo
                   ` (33 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-03-14 19:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1468688022

Comment:
it's already in the 2nd commit

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (4 preceding siblings ...)
  2023-03-14 19:14 ` dkwo
@ 2023-03-14 19:14 ` dkwo
  2023-03-15  8:55 ` mhmdanas
                   ` (32 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-03-14 19:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1468688022

Comment:
it's already in the commit

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (5 preceding siblings ...)
  2023-03-14 19:14 ` dkwo
@ 2023-03-15  8:55 ` mhmdanas
  2023-03-15  8:55 ` mhmdanas
                   ` (31 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-03-15  8:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1469600387

Comment:
Ah, the outdated PR title misled me.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (6 preceding siblings ...)
  2023-03-15  8:55 ` mhmdanas
@ 2023-03-15  8:55 ` mhmdanas
  2023-03-15  8:57 ` mhmdanas
                   ` (30 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-03-15  8:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1469600388

Comment:
Ah, the outdated PR title misled me.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (7 preceding siblings ...)
  2023-03-15  8:55 ` mhmdanas
@ 2023-03-15  8:57 ` mhmdanas
  2023-04-29 23:00 ` [PR PATCH] [Updated] " dkwo
                   ` (29 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-03-15  8:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1469600387

Comment:
Ah, the outdated PR title misled me.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03.18
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (8 preceding siblings ...)
  2023-03-15  8:57 ` mhmdanas
@ 2023-04-29 23:00 ` dkwo
  2023-04-29 23:04 ` lvm2: update to 2.03 series dkwo
                   ` (28 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-04-29 23:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03.18
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

Incidentally, I tried to update it to get rid of this message at boot:
```
=> Activating LVM devices...
File descriptor 7 (/dev/nvme0n1) leaked on vgchange invocation. Parent PID 190: /bin/sh
  2 logical volume(s) in volume group "cryptroot" now active
```
but it's still there, not sure if it's important.

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 13168 bytes --]

From 04027ac8fcaf3d7640e74225c6257b41f967d232 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.21

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  41 ++----
 7 files changed, 159 insertions(+), 75 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index e282bbd1f588..5b5bfa918bab 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -236,8 +236,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libXfont.so.1 libXfont-1.4.0_1
@@ -670,7 +670,6 @@ libboost_python311.so.1.81.0 boost-python3-1.81.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.15 libcpuid-0.5.0_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 000000000000..bac27ea1d9cf
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112c..9162f08cfe36 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc139951717..000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index eccc6145f004..3d3170535516 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.187
-revision=2
+version=2.03.21
+revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel
+ thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=0e0d521a863a5db2440f2e1e7627ba82b70273ae4ab0bbe130851db0d58e5af1
+checksum=1e261921d621998adc37960c615de784c6145c7f737a80b781f3108fbec67a7e
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -38,15 +39,9 @@ pre_configure() {
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (9 preceding siblings ...)
  2023-04-29 23:00 ` [PR PATCH] [Updated] " dkwo
@ 2023-04-29 23:04 ` dkwo
  2023-06-29 20:03 ` dkwo
                   ` (27 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-04-29 23:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1528891611

Comment:
updated to v21, which incidentally should also work with 16k page sizes.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (10 preceding siblings ...)
  2023-04-29 23:04 ` lvm2: update to 2.03 series dkwo
@ 2023-06-29 20:03 ` dkwo
  2023-06-29 20:15 ` Duncaen
                   ` (26 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-06-29 20:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1613739192

Comment:
@Duncaen Can you take a look?

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (11 preceding siblings ...)
  2023-06-29 20:03 ` dkwo
@ 2023-06-29 20:15 ` Duncaen
  2023-06-30 17:16 ` [PR PATCH] [Updated] " dkwo
                   ` (25 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: Duncaen @ 2023-06-29 20:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1613756024

Comment:
I don't have any lvm setup.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (12 preceding siblings ...)
  2023-06-29 20:15 ` Duncaen
@ 2023-06-30 17:16 ` dkwo
  2023-06-30 18:13 ` mhmdanas
                   ` (24 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-06-30 17:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 13914 bytes --]

From ad6abc8f727fa5d96da49211dfdbfdccbd47c8e2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.21

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  41 ++----
 srcpkgs/removed-packages/template             |   5 +-
 8 files changed, 162 insertions(+), 77 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index ef71bae3f9a7..35b242254c9d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -236,8 +236,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -668,7 +668,6 @@ libboost_python311.so.1.82.0 boost-python3-1.82.0.alpha_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82ce..000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 000000000000..bac27ea1d9cf
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112c..9162f08cfe36 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc139951717..000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index eccc6145f004..3d3170535516 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.187
-revision=2
+version=2.03.21
+revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel
+ thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=0e0d521a863a5db2440f2e1e7627ba82b70273ae4ab0bbe130851db0d58e5af1
+checksum=1e261921d621998adc37960c615de784c6145c7f737a80b781f3108fbec67a7e
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -38,15 +39,9 @@ pre_configure() {
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index bdd9a27b2906..3271a9491d0e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20230627
-revision=2
+version=0.1.20230630
+revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -318,6 +318,7 @@ replaces="
  libglib-static<=2.58.3_5
  libgtkhtml<=4.10.0_1
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (13 preceding siblings ...)
  2023-06-30 17:16 ` [PR PATCH] [Updated] " dkwo
@ 2023-06-30 18:13 ` mhmdanas
  2023-06-30 18:22 ` dkwo
                   ` (23 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-06-30 18:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1615008124

Comment:
I use the FDE setup as detailed in https://docs.voidlinux.org/installation/guides/fde.html, so I'll be testing this and reporting back. Fingers crossed this won't break my boot. :)

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (14 preceding siblings ...)
  2023-06-30 18:13 ` mhmdanas
@ 2023-06-30 18:22 ` dkwo
  2023-07-01  9:41 ` mhmdanas
                   ` (22 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-06-30 18:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1615027857

Comment:
Thanks. I also tested this on my setup in the past, and it worked fine.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (15 preceding siblings ...)
  2023-06-30 18:22 ` dkwo
@ 2023-07-01  9:41 ` mhmdanas
  2023-07-01 15:37 ` dkwo
                   ` (21 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-07-01  9:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1615797854

Comment:
I booted my FDE installation with lvm2 built from this PR. I get this error at runit stage 1 though:
```
[    18.554315] udevd[992]: failed to execute '/usr/lib64/udev/no' 'no --no-block --property DefaultDependencies=no --unit lvm-activate-voidvm /usr/bin/lvm vgchange -aay --autoactivation event voidvm': No such file or directory
```
(I had to copy this manually from a picture of the TTY, so apologies for any typos)

Otherwise the system booted up just fine.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (16 preceding siblings ...)
  2023-07-01  9:41 ` mhmdanas
@ 2023-07-01 15:37 ` dkwo
  2023-07-01 17:02 ` dkwo
                   ` (20 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-07-01 15:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1615964889

Comment:
@mhmdanas I don't see that warning, using FDE too. Maybe it's related to the initramfs being used?
Mine (tinyramfs) mounts by UUID, and this Gentoo guide describes four options: https://wiki.gentoo.org/wiki/Custom_Initramfs#LVM

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (17 preceding siblings ...)
  2023-07-01 15:37 ` dkwo
@ 2023-07-01 17:02 ` dkwo
  2023-07-02 10:11 ` mhmdanas
                   ` (19 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-07-01 17:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1615999243

Comment:
Debian has this https://github.com/chimera-linux/cports/blob/master/main/lvm2/patches/udev-no-systemd.patch

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (18 preceding siblings ...)
  2023-07-01 17:02 ` dkwo
@ 2023-07-02 10:11 ` mhmdanas
  2023-07-03 20:46 ` mhmdanas
                   ` (18 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-07-02 10:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1616573027

Comment:
@dkwo I use dracut for my initramfs.

> Debian has this https://github.com/chimera-linux/cports/blob/master/main/lvm2/patches/udev-no-systemd.patch

Alright, I'll try out the patch and see if it gets rid of the error message.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (19 preceding siblings ...)
  2023-07-02 10:11 ` mhmdanas
@ 2023-07-03 20:46 ` mhmdanas
  2023-07-04 12:36 ` dkwo
                   ` (17 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-07-03 20:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1619133314

Comment:
With that patch, the error seems to go away.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (20 preceding siblings ...)
  2023-07-03 20:46 ` mhmdanas
@ 2023-07-04 12:36 ` dkwo
  2023-07-28 19:41 ` [PR PATCH] [Updated] " dkwo
                   ` (16 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-07-04 12:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1620171530

Comment:
I can include the patch, if this is preferred.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (21 preceding siblings ...)
  2023-07-04 12:36 ` dkwo
@ 2023-07-28 19:41 ` dkwo
  2023-07-28 19:45 ` dkwo
                   ` (15 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-07-28 19:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 15680 bytes --]

From 09f9221e832d9bf83f6ed3186b22107ca6bc312d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH 1/2] lvm2: update to 2.03.21

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  41 ++----
 srcpkgs/removed-packages/template             |   4 +-
 8 files changed, 162 insertions(+), 76 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index c71817b11b51f..c3747a5d99363 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -242,8 +242,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -674,7 +674,6 @@ libboost_python311.so.1.82.0 boost-python3-1.82.0.alpha_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 0000000000000..bac27ea1d9cf6
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112cf..9162f08cfe360 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc1399517178..0000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index eccc6145f004c..3d3170535516d 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.187
-revision=2
+version=2.03.21
+revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel
+ thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=0e0d521a863a5db2440f2e1e7627ba82b70273ae4ab0bbe130851db0d58e5af1
+checksum=1e261921d621998adc37960c615de784c6145c7f737a80b781f3108fbec67a7e
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -38,15 +39,9 @@ pre_configure() {
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 5b0e0047ee3e6..5becdb16cc796 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20230728
+version=0.1.20230729
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -320,6 +320,8 @@ replaces="
  libglib-static<=2.58.3_5
  libgtkhtml<=4.10.0_1
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
+ liblvm2app-devel<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

From 31a4f13f3cb5363b950fa4566c111f7aadf703b9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:37:43 -0400
Subject: [PATCH 2/2] lvm2: import patch for udev

---
 srcpkgs/lvm2/patches/newudev.patch | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/lvm2/patches/newudev.patch

diff --git a/srcpkgs/lvm2/patches/newudev.patch b/srcpkgs/lvm2/patches/newudev.patch
new file mode 100644
index 0000000000000..df15ced5c20e4
--- /dev/null
+++ b/srcpkgs/lvm2/patches/newudev.patch
@@ -0,0 +1,26 @@
+commit 9f9924cab244b2065ebf6de869f434cc1f336469
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Wed Nov 16 12:26:51 2022 +0100
+
+    support new udev activation without systemd
+    
+    Debian import: https://salsa.debian.org/lvm-team/lvm2/-/commit/2340adad4b3875331be1ba7abba881cc1b6e6738
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 14e7dd2..b32b94a 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,8 +76,14 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
++TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
++
+ ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
++LABEL="lvm_direct_vgchange"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++GOTO="lvm_end"
++
+ LABEL="lvm_end"

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (22 preceding siblings ...)
  2023-07-28 19:41 ` [PR PATCH] [Updated] " dkwo
@ 2023-07-28 19:45 ` dkwo
  2023-07-28 19:46 ` mhmdanas
                   ` (14 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-07-28 19:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1656234635

Comment:
Know any maintainer who can test this?

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (23 preceding siblings ...)
  2023-07-28 19:45 ` dkwo
@ 2023-07-28 19:46 ` mhmdanas
  2023-08-05 19:36 ` [PR PATCH] [Updated] " dkwo
                   ` (13 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-07-28 19:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1656235394

Comment:
I'd squash the second commit into the first.

> Know any maintainer who can test this?

Not as far as I know.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (24 preceding siblings ...)
  2023-07-28 19:46 ` mhmdanas
@ 2023-08-05 19:36 ` dkwo
  2023-08-05 19:52 ` dkwo
                   ` (12 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-08-05 19:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 16793 bytes --]

From 7fba51e04135cb71f4517cda3ac82cea640cf571 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH 1/2] lvm2: update to 2.03.21

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/newudev.patch            |  26 ++++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  44 ++----
 srcpkgs/removed-packages/template             |   4 +-
 9 files changed, 187 insertions(+), 80 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/newudev.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 9f4553e6ccc2b..b11a6e4d76f76 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -242,8 +242,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -674,7 +674,6 @@ libboost_python311.so.1.82.0 boost-python3-1.82.0.alpha_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 0000000000000..bac27ea1d9cf6
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112cf..9162f08cfe360 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/newudev.patch b/srcpkgs/lvm2/patches/newudev.patch
new file mode 100644
index 0000000000000..df15ced5c20e4
--- /dev/null
+++ b/srcpkgs/lvm2/patches/newudev.patch
@@ -0,0 +1,26 @@
+commit 9f9924cab244b2065ebf6de869f434cc1f336469
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Wed Nov 16 12:26:51 2022 +0100
+
+    support new udev activation without systemd
+    
+    Debian import: https://salsa.debian.org/lvm-team/lvm2/-/commit/2340adad4b3875331be1ba7abba881cc1b6e6738
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 14e7dd2..b32b94a 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,8 +76,14 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
++TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
++
+ ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
++LABEL="lvm_direct_vgchange"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++GOTO="lvm_end"
++
+ LABEL="lvm_end"
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc1399517178..0000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index 28d973a4cc5a2..e9b72641e24e6 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.188
+version=2.03.21
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel
+ readline-devel thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=7101e8b0816ad77e4390fed9749a090214ba520061cd083437871e19e50cc9bd
+checksum=1e261921d621998adc37960c615de784c6145c7f737a80b781f3108fbec67a7e
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -28,25 +29,14 @@ case $XBPS_TARGET_MACHINE in
 	*-musl) configure_args+=" --enable-static_link";;
 esac
 
-do_check() {
-	# requires opening /dev/kmsg which requires root
-	:
-}
-
 pre_configure() {
 	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
 }
 
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +73,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b6eeff565fe4..f4f2351ea0d23 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20230728
+version=0.1.20230729
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -321,6 +321,8 @@ replaces="
  libgroff<=1.22.4_3
  libgtkhtml<=4.10.0_1
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
+ liblvm2app-devel<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

From f4b0b1bd11ceae22ded6e8f9403e01f173745d39 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 5 Aug 2023 21:36:21 +0200
Subject: [PATCH 2/2] lvm2: update to 2.03.22

---
 srcpkgs/lvm2/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index e9b72641e24e6..0b96385230fa5 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,6 +1,6 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.03.21
+version=2.03.22
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
@@ -19,7 +19,7 @@ license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=1e261921d621998adc37960c615de784c6145c7f737a80b781f3108fbec67a7e
+checksum=4c5a6923bd1ace7ce04474608a84937ce053ba91b1ace9f0b0017268e732dc7c
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (25 preceding siblings ...)
  2023-08-05 19:36 ` [PR PATCH] [Updated] " dkwo
@ 2023-08-05 19:52 ` dkwo
  2023-08-05 19:53 ` dkwo
                   ` (11 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-08-05 19:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 15710 bytes --]

From bf161ed786ac5e7d376978243d2af80cb0a0cb25 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.22

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/newudev.patch            |  26 ++++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  47 ++-----
 srcpkgs/removed-packages/template             |   4 +-
 9 files changed, 191 insertions(+), 79 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/newudev.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 9f4553e6ccc2b..b11a6e4d76f76 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -242,8 +242,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -674,7 +674,6 @@ libboost_python311.so.1.82.0 boost-python3-1.82.0.alpha_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 0000000000000..bac27ea1d9cf6
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112cf..9162f08cfe360 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/newudev.patch b/srcpkgs/lvm2/patches/newudev.patch
new file mode 100644
index 0000000000000..df15ced5c20e4
--- /dev/null
+++ b/srcpkgs/lvm2/patches/newudev.patch
@@ -0,0 +1,26 @@
+commit 9f9924cab244b2065ebf6de869f434cc1f336469
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Wed Nov 16 12:26:51 2022 +0100
+
+    support new udev activation without systemd
+    
+    Debian import: https://salsa.debian.org/lvm-team/lvm2/-/commit/2340adad4b3875331be1ba7abba881cc1b6e6738
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 14e7dd2..b32b94a 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,8 +76,14 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
++TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
++
+ ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
++LABEL="lvm_direct_vgchange"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++GOTO="lvm_end"
++
+ LABEL="lvm_end"
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc1399517178..0000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index 28d973a4cc5a2..4e3fca5a6e029 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.188
+version=2.03.22
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel
+ readline-devel thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=7101e8b0816ad77e4390fed9749a090214ba520061cd083437871e19e50cc9bd
+checksum=4c5a6923bd1ace7ce04474608a84937ce053ba91b1ace9f0b0017268e732dc7c
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -28,25 +29,19 @@ case $XBPS_TARGET_MACHINE in
 	*-musl) configure_args+=" --enable-static_link";;
 esac
 
+pre_configure() {
+	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
+}
+
 do_check() {
 	# requires opening /dev/kmsg which requires root
 	:
 }
 
-pre_configure() {
-	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
-}
-
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 6b6eeff565fe4..f4f2351ea0d23 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20230728
+version=0.1.20230729
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -321,6 +321,8 @@ replaces="
  libgroff<=1.22.4_3
  libgtkhtml<=4.10.0_1
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
+ liblvm2app-devel<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (26 preceding siblings ...)
  2023-08-05 19:52 ` dkwo
@ 2023-08-05 19:53 ` dkwo
  2023-08-05 20:01 ` leahneukirchen
                   ` (10 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-08-05 19:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1666591460

Comment:
@leahneukirchen can you perhaps take a look?

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (27 preceding siblings ...)
  2023-08-05 19:53 ` dkwo
@ 2023-08-05 20:01 ` leahneukirchen
  2023-09-08  9:12 ` [PR PATCH] [Updated] " dkwo
                   ` (9 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: leahneukirchen @ 2023-08-05 20:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1666592869

Comment:
Yes, i just need to reboot 🙈

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (28 preceding siblings ...)
  2023-08-05 20:01 ` leahneukirchen
@ 2023-09-08  9:12 ` dkwo
  2023-10-11 19:16 ` dkwo
                   ` (8 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-09-08  9:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 15700 bytes --]

From 640159ac8209334cc599a5f11a652d9ad5d4930b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.22

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/newudev.patch            |  26 ++++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  47 ++-----
 srcpkgs/removed-packages/template             |   4 +-
 9 files changed, 191 insertions(+), 79 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/newudev.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 531b3345e230f..7190c56d201d3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -235,8 +235,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -667,7 +667,6 @@ libboost_python311.so.1.83.0 boost-python3-1.83.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 0000000000000..bac27ea1d9cf6
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112cf..9162f08cfe360 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/newudev.patch b/srcpkgs/lvm2/patches/newudev.patch
new file mode 100644
index 0000000000000..df15ced5c20e4
--- /dev/null
+++ b/srcpkgs/lvm2/patches/newudev.patch
@@ -0,0 +1,26 @@
+commit 9f9924cab244b2065ebf6de869f434cc1f336469
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Wed Nov 16 12:26:51 2022 +0100
+
+    support new udev activation without systemd
+    
+    Debian import: https://salsa.debian.org/lvm-team/lvm2/-/commit/2340adad4b3875331be1ba7abba881cc1b6e6738
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 14e7dd2..b32b94a 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,8 +76,14 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
++TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
++
+ ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
++LABEL="lvm_direct_vgchange"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++GOTO="lvm_end"
++
+ LABEL="lvm_end"
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc1399517178..0000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index 28d973a4cc5a2..4e3fca5a6e029 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.188
+version=2.03.22
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel
+ readline-devel thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=7101e8b0816ad77e4390fed9749a090214ba520061cd083437871e19e50cc9bd
+checksum=4c5a6923bd1ace7ce04474608a84937ce053ba91b1ace9f0b0017268e732dc7c
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -28,25 +29,19 @@ case $XBPS_TARGET_MACHINE in
 	*-musl) configure_args+=" --enable-static_link";;
 esac
 
+pre_configure() {
+	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
+}
+
 do_check() {
 	# requires opening /dev/kmsg which requires root
 	:
 }
 
-pre_configure() {
-	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
-}
-
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index b0594a3f16f8a..6a2da9667acc3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20230905
+version=0.1.20230908
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -330,6 +330,8 @@ replaces="
  libllvm8<=8.0.1_5
  libllvm9<=9.0.1_8
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
+ liblvm2app-devel<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (29 preceding siblings ...)
  2023-09-08  9:12 ` [PR PATCH] [Updated] " dkwo
@ 2023-10-11 19:16 ` dkwo
  2023-10-11 19:20 ` dkwo
                   ` (7 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-10-11 19:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 15700 bytes --]

From 0591897b9f762e20af9c7b200839c20e30402951 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.22

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/newudev.patch            |  26 ++++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  47 ++-----
 srcpkgs/removed-packages/template             |   4 +-
 9 files changed, 191 insertions(+), 79 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/newudev.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index 932ae5dae9732..c4b4470162fc5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -235,8 +235,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -664,7 +664,6 @@ libboost_python312.so.1.83.0 boost-python3-1.83.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 0000000000000..bac27ea1d9cf6
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112cf..9162f08cfe360 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/newudev.patch b/srcpkgs/lvm2/patches/newudev.patch
new file mode 100644
index 0000000000000..df15ced5c20e4
--- /dev/null
+++ b/srcpkgs/lvm2/patches/newudev.patch
@@ -0,0 +1,26 @@
+commit 9f9924cab244b2065ebf6de869f434cc1f336469
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Wed Nov 16 12:26:51 2022 +0100
+
+    support new udev activation without systemd
+    
+    Debian import: https://salsa.debian.org/lvm-team/lvm2/-/commit/2340adad4b3875331be1ba7abba881cc1b6e6738
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 14e7dd2..b32b94a 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,8 +76,14 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
++TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
++
+ ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
++LABEL="lvm_direct_vgchange"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++GOTO="lvm_end"
++
+ LABEL="lvm_end"
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc1399517178..0000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index 28d973a4cc5a2..4e3fca5a6e029 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.188
+version=2.03.22
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel
+ readline-devel thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=7101e8b0816ad77e4390fed9749a090214ba520061cd083437871e19e50cc9bd
+checksum=4c5a6923bd1ace7ce04474608a84937ce053ba91b1ace9f0b0017268e732dc7c
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -28,25 +29,19 @@ case $XBPS_TARGET_MACHINE in
 	*-musl) configure_args+=" --enable-static_link";;
 esac
 
+pre_configure() {
+	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
+}
+
 do_check() {
 	# requires opening /dev/kmsg which requires root
 	:
 }
 
-pre_configure() {
-	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
-}
-
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index df0473fd64287..b98cafaafce1b 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231007
+version=0.1.20231011
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -341,6 +341,8 @@ replaces="
  libllvm8<=8.0.1_5
  libllvm9<=9.0.1_8
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
+ liblvm2app-devel<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (30 preceding siblings ...)
  2023-10-11 19:16 ` dkwo
@ 2023-10-11 19:20 ` dkwo
  2023-10-11 21:46 ` leahneukirchen
                   ` (6 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-10-11 19:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1758381211

Comment:
Rebased. @leahneukirchen Maybe this one too? ;)

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (31 preceding siblings ...)
  2023-10-11 19:20 ` dkwo
@ 2023-10-11 21:46 ` leahneukirchen
  2023-10-11 22:02 ` dkwo
                   ` (5 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: leahneukirchen @ 2023-10-11 21:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1758592896

Comment:
Please rebase.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (32 preceding siblings ...)
  2023-10-11 21:46 ` leahneukirchen
@ 2023-10-11 22:02 ` dkwo
  2023-11-13 15:16 ` mhmdanas
                   ` (4 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-10-11 22:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1758610792

Comment:
Rebased.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (33 preceding siblings ...)
  2023-10-11 22:02 ` dkwo
@ 2023-11-13 15:16 ` mhmdanas
  2023-11-13 15:34 ` leahneukirchen
                   ` (3 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: mhmdanas @ 2023-11-13 15:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1808359355

Comment:
Been using this for 10 days on x86_64-glibc, with no issues as far as I can tell.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (34 preceding siblings ...)
  2023-11-13 15:16 ` mhmdanas
@ 2023-11-13 15:34 ` leahneukirchen
  2023-11-14  5:10 ` [PR PATCH] [Updated] " dkwo
                   ` (2 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: leahneukirchen @ 2023-11-13 15:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1808393374

Comment:
Please rebase again, then let's merge this.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Updated] lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (35 preceding siblings ...)
  2023-11-13 15:34 ` leahneukirchen
@ 2023-11-14  5:10 ` dkwo
  2023-11-14  5:16 ` dkwo
  2023-11-14 13:04 ` [PR PATCH] [Merged]: " leahneukirchen
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-11-14  5:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages lvm2
https://github.com/void-linux/void-packages/pull/42363

lvm2: update to 2.03 series
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

A patch file from https://github.com/void-linux/void-packages/pull/42363.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lvm2-42363.patch --]
[-- Type: text/x-diff, Size: 15700 bytes --]

From b57d3d2b802a47f6fbf990cf5aea458580e46926 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 20 Feb 2023 11:32:51 -0500
Subject: [PATCH] lvm2: update to 2.03.22

---
 common/shlibs                                 |   5 +-
 srcpkgs/liblvm2app                            |   1 -
 srcpkgs/liblvm2app-devel                      |   1 -
 .../0001-lvresize-use-POSIX-shell.patch       | 125 ++++++++++++++++++
 srcpkgs/lvm2/patches/fix-stdio-usage.patch    |  34 +++--
 srcpkgs/lvm2/patches/newudev.patch            |  26 ++++
 srcpkgs/lvm2/patches/portability.patch        |  27 ----
 srcpkgs/lvm2/template                         |  47 ++-----
 srcpkgs/removed-packages/template             |   4 +-
 9 files changed, 191 insertions(+), 79 deletions(-)
 delete mode 120000 srcpkgs/liblvm2app
 delete mode 120000 srcpkgs/liblvm2app-devel
 create mode 100644 srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
 create mode 100644 srcpkgs/lvm2/patches/newudev.patch
 delete mode 100644 srcpkgs/lvm2/patches/portability.patch

diff --git a/common/shlibs b/common/shlibs
index dc08c7989c039..1a721780f8545 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -235,8 +235,8 @@ libgnutlsxx.so.30 gnutls-3.7.4_1
 libgnutls-dane.so.0 gnutls-3.6.12_1
 libdevmapper.so.1.02 device-mapper-2.02.110_1
 libdevmapper-event.so.1.02 device-mapper-2.02.110_1
-libdevmapper-event-lvm2.so.2.02 device-mapper-2.02.110_1
-liblvm2cmd.so.2.02 device-mapper-2.02.54_1
+libdevmapper-event-lvm2.so.2.03 device-mapper-2.03.18_1
+liblvm2cmd.so.2.03 device-mapper-2.03.18_1
 libprop.so.0 proplib-0.1_1
 libfontenc.so.1 libfontenc-1.0.4_1
 libx86.so.1 libx86-1.1_1
@@ -664,7 +664,6 @@ libboost_python312.so.1.83.0 boost-python3-1.83.0_1
 libexempi.so.8 exempi-2.5.0_1
 libatasmart.so.4 libatasmart-0.17_1
 libsgutils2-1.45.so.2 libsgutils-1.45_1
-liblvm2app.so.2.2 liblvm2app-2.02.54_1
 libcpufreq.so.0 libcpufreq-007_1
 libcpuid.so.16 libcpuid-0.6.2_1
 libgucharmap_2_90.so.7 gucharmap-3.0.0_1
diff --git a/srcpkgs/liblvm2app b/srcpkgs/liblvm2app
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/liblvm2app-devel b/srcpkgs/liblvm2app-devel
deleted file mode 120000
index 90f3860e82cef..0000000000000
--- a/srcpkgs/liblvm2app-devel
+++ /dev/null
@@ -1 +0,0 @@
-lvm2
\ No newline at end of file
diff --git a/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
new file mode 100644
index 0000000000000..bac27ea1d9cf6
--- /dev/null
+++ b/srcpkgs/lvm2/patches/0001-lvresize-use-POSIX-shell.patch
@@ -0,0 +1,125 @@
+From 50fe324ff953eedd210054ffc21715d22134b3c1 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 11:55:34 +0100
+Subject: [PATCH] lvresize: use POSIX shell
+
+---
+ scripts/lvresize_fs_helper.sh | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
+index 90b1a97..1c48a71 100755
+--- a/scripts/lvresize_fs_helper.sh
++++ b/scripts/lvresize_fs_helper.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Copyright (C) 2022 Red Hat, Inc. All rights reserved.
+ #
+@@ -69,7 +69,7 @@ fsextend() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		logmsg "resize2fs ${DEVPATH}"
+ 		if resize2fs "$DEVPATH"; then
+ 			logmsg "resize2fs done"
+@@ -77,7 +77,7 @@ fsextend() {
+ 			logmsg "resize2fs failed"
+ 			RESIZEFS_FAILED=1
+ 		fi
+-	elif [[ "$FSTYPE" == "xfs" ]]; then
++	elif [ "$FSTYPE" = "xfs" ]; then
+ 		logmsg "xfs_growfs ${DEVPATH}"
+ 		if xfs_growfs "$DEVPATH"; then
+ 			logmsg "xfs_growfs done"
+@@ -102,7 +102,7 @@ fsextend() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -151,7 +151,7 @@ fsreduce() {
+ 		fi
+ 	fi
+ 
+-	if [[ "$FSTYPE" == "ext"* ]]; then
++	if [ "${FSTYPE#ext}" != "$FSTYPE" ]; then
+ 		NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
+ 		logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
+ 		if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
+@@ -194,7 +194,7 @@ fsreduce() {
+ 
+ 	# If the fs was temporarily unmounted, now remount it.
+ 	# Not considered a command failure if this fails.
+-	if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
++	if [ "$DO_UNMOUNT" -eq 1 ] && [ "$REMOUNT" -eq 1 ]; then
+ 		logmsg "remount ${DEVPATH} ${MOUNTDIR}"
+ 		if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
+ 			logmsg "remount done"
+@@ -291,7 +291,7 @@ DO_FSCK=0
+ # mounted and the script unmounted it.
+ REMOUNT=0
+ 
+-if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
++if [ "$(id -u)" != 0 ]; then
+ 	errorexit "${SCRIPTNAME} must be run as root."
+ fi
+ 
+@@ -372,11 +372,11 @@ done
+ #
+ 
+ # There are three top level commands: --fsextend, --fsreduce, --cryptresize.
+-if [[ "$DO_FSEXTEND" -eq 0 && "$DO_FSREDUCE" -eq 0 && "$DO_CRYPTRESIZE" -eq 0 ]]; then
++if [ "$DO_FSEXTEND" -eq 0 ] && [ "$DO_FSREDUCE" -eq 0 ]  && [ "$DO_CRYPTRESIZE" -eq 0 ]; then
+ 	errorexit "Missing --fsextend|--fsreduce|--cryptresize."
+ fi
+ 
+-if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
++if [ "$DO_FSEXTEND" -eq 1 ] || [ "$DO_FSREDUCE" -eq 1 ]; then
+ 	case "$FSTYPE" in
+ 	  ext[234]) ;;
+ 	  "xfs")    ;;
+@@ -388,7 +388,7 @@ if [[ "$DO_FSEXTEND" -eq 1 || "$DO_FSREDUCE" -eq 1 ]]; then
+ 	fi
+ fi
+ 
+-if [[ "$DO_CRYPTRESIZE" -eq 1 && -z "$CRYPTPATH" ]]; then
++if [ "$DO_CRYPTRESIZE" -eq 1 ] && [ -z "$CRYPTPATH" ]; then
+ 	errorexit "Missing required --cryptpath for --cryptresize."
+ fi
+ 
+@@ -406,15 +406,15 @@ if [ ! -e "$DEVPATH" ]; then
+ 	errorexit "Device does not exist \"$DEVPATH\"."
+ fi
+ 
+-if [[ "$DO_UNMOUNT" -eq 1 && -z "$MOUNTDIR" ]]; then
++if [ "$DO_UNMOUNT" -eq 1 ] && [ -z "$MOUNTDIR" ]; then
+ 	errorexit "Missing required --mountdir for --unmount."
+ fi
+ 
+-if [[ "$DO_FSREDUCE" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSREDUCE" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot reduce xfs."
+ fi
+ 
+-if [[ "$DO_FSCK" -eq 1 && "$FSTYPE" == "xfs" ]]; then
++if [ "$DO_FSCK" -eq 1 ] && [ "$FSTYPE" = "xfs" ]; then
+ 	errorexit "Cannot use --fsck with xfs."
+ fi
+ 
+@@ -424,7 +424,7 @@ if [ "$DO_MOUNT" -eq 1 ]; then
+ 		errorexit "Failed to create temp dir."
+ 	fi
+ 	# In case the script terminates without doing cleanup
+-	function finish {
++	finish() {
+ 		if [ "$TMP_MOUNT_DONE" -eq 1 ]; then
+ 			logmsg "exit unmount ${TMPDIR}"
+ 			umount "$TMPDIR"
+
diff --git a/srcpkgs/lvm2/patches/fix-stdio-usage.patch b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
index c4809186112cf..9162f08cfe360 100644
--- a/srcpkgs/lvm2/patches/fix-stdio-usage.patch
+++ b/srcpkgs/lvm2/patches/fix-stdio-usage.patch
@@ -1,8 +1,18 @@
-diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c
-index 95fb343..5baea40 100644
+From 63b1c7332bee6080bffecf9ce9d75ff15d799166 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 16 Nov 2022 10:42:39 +0100
+Subject: [PATCH] fix stdio usage
+
+---
+ lib/commands/toolcontext.c | 4 ++--
+ tools/lvmcmdline.c         | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index b630554a9..f20080d18 100644
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
+@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
  	/* FIXME Make this configurable? */
  	reset_lvm_errno(1);
  
@@ -11,20 +21,20 @@ index 95fb343..5baea40 100644
  	/* Set in/out stream buffering before glibc */
  	if (set_buffering
  #ifdef SYS_gettid
-@@ -2274,7 +2274,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
+ 		dm_hash_destroy(cmd->cft_def_hash);
  
- 	if (cmd->pending_delete_mem)
- 		dm_pool_destroy(cmd->pending_delete_mem);
+ 	dm_device_list_destroy(&cmd->cache_dm_devs);
 -#ifndef VALGRIND_POOL
 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	if (cmd->linebuffer) {
  		/* Reset stream buffering to defaults */
  		if (is_valid_fd(STDIN_FILENO) &&
-diff --git tools/lvmcmdline.c tools/lvmcmdline.c
-index 0840c65..9503922 100644
+diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
+index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3109,7 +3109,7 @@ static int _check_standard_fds(void)
+@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)
  	int err = is_valid_fd(STDERR_FILENO);
  
  	if (!is_valid_fd(STDIN_FILENO) &&
@@ -33,7 +43,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdin stream open");
  		else
-@@ -3119,7 +3119,7 @@ static int _check_standard_fds(void)
+@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDOUT_FILENO) &&
@@ -42,7 +52,7 @@ index 0840c65..9503922 100644
  		if (err)
  			perror("stdout stream open");
  		/* else no stdout */
-@@ -3127,7 +3127,7 @@ static int _check_standard_fds(void)
+@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void)
  	}
  
  	if (!is_valid_fd(STDERR_FILENO) &&
@@ -51,3 +61,5 @@ index 0840c65..9503922 100644
  		printf("stderr stream open: %s\n",
  		       strerror(errno));
  		return 0;
+-- 
+2.38.1
diff --git a/srcpkgs/lvm2/patches/newudev.patch b/srcpkgs/lvm2/patches/newudev.patch
new file mode 100644
index 0000000000000..df15ced5c20e4
--- /dev/null
+++ b/srcpkgs/lvm2/patches/newudev.patch
@@ -0,0 +1,26 @@
+commit 9f9924cab244b2065ebf6de869f434cc1f336469
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date:   Wed Nov 16 12:26:51 2022 +0100
+
+    support new udev activation without systemd
+    
+    Debian import: https://salsa.debian.org/lvm-team/lvm2/-/commit/2340adad4b3875331be1ba7abba881cc1b6e6738
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 14e7dd2..b32b94a 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,8 +76,14 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
++TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
++
+ ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
++LABEL="lvm_direct_vgchange"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++GOTO="lvm_end"
++
+ LABEL="lvm_end"
diff --git a/srcpkgs/lvm2/patches/portability.patch b/srcpkgs/lvm2/patches/portability.patch
deleted file mode 100644
index dcc1399517178..0000000000000
--- a/srcpkgs/lvm2/patches/portability.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Portability fixes:
-
-- Use fcntl.h for O_RDONLY and friends.
-- Only use mallinfo with glibc.
-
---- a/libdaemon/server/daemon-server.c      2014-11-29 00:07:42.000000000 +0100
-+++ b/libdaemon/server/daemon-server.c      2014-12-28 08:22:40.985928408 +0100
-@@ -14,6 +14,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
- 
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
-
---- a/lib/mm/memlock.c	2016-06-07 08:00:46.557058318 +0200
-+++ b/lib/mm/memlock.c	2016-06-07 08:01:25.453505793 +0200
-@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
- 
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- 	void *stack_mem;
- 	struct rlimit limit;
- 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
diff --git a/srcpkgs/lvm2/template b/srcpkgs/lvm2/template
index 28d973a4cc5a2..4e3fca5a6e029 100644
--- a/srcpkgs/lvm2/template
+++ b/srcpkgs/lvm2/template
@@ -1,24 +1,25 @@
 # Template file for 'lvm2'
 pkgname=lvm2
-version=2.02.188
+version=2.03.22
 revision=1
 build_style=gnu-configure
 configure_args="--disable-selinux --enable-readline --enable-pkgconfig
- --enable-fsadm --enable-applib --enable-dmeventd --enable-cmdlib
- --enable-udev_sync --enable-udev_rules --enable-lvmetad
+ --enable-fsadm --enable-dmeventd --enable-cmdlib
+ --enable-udev_sync --enable-udev_rules --without-systemd-run
  --with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
  --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
  --with-default-locking-dir=/run/lock/lvm"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libaio-devel libblkid-devel readline-devel"
+makedepends="eudev-libudev-devel libaio-devel libblkid-devel
+ readline-devel thin-provisioning-tools"
 depends="thin-provisioning-tools"
 short_desc="Logical Volume Manager 2 utilities"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2.0-only, LGPL-2.1-only"
+license="GPL-2.0-only, LGPL-2.1-only, BSD-2-Clause"
 homepage="https://sourceware.org/lvm2/"
 changelog="https://abi-laboratory.pro/?view=changelog&l=lvm2&v=${version}"
 distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
-checksum=7101e8b0816ad77e4390fed9749a090214ba520061cd083437871e19e50cc9bd
+checksum=4c5a6923bd1ace7ce04474608a84937ce053ba91b1ace9f0b0017268e732dc7c
 conf_files="/etc/lvm/*.conf /etc/lvm/profile/*"
 make_dirs="
  /etc/lvm/archive 0755 root root
@@ -28,25 +29,19 @@ case $XBPS_TARGET_MACHINE in
 	*-musl) configure_args+=" --enable-static_link";;
 esac
 
+pre_configure() {
+	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
+}
+
 do_check() {
 	# requires opening /dev/kmsg which requires root
 	:
 }
 
-pre_configure() {
-	sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
-}
-
 post_install() {
-	sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
-	case $XBPS_TARGET_MACHINE in
-		*-musl)
-			sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
-		;;
-	esac
-	vsv lvmetad
 	vmkdir usr/bin
 	mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
+	vlicense COPYING.BSD
 }
 
 device-mapper-devel_package() {
@@ -83,21 +78,3 @@ device-mapper_package() {
 		vsv dmeventd
 	}
 }
-
-liblvm2app-devel_package() {
-	depends="device-mapper-devel-${version}_${revision} libblkid-devel
-	 liblvm2app-${version}_${revision}"
-	short_desc="LVM2 application library - development files"
-	pkg_install() {
-		vmove usr/include/lvm2app.h
-		vmove "usr/lib/pkgconfig/lvm2app*"
-		vmove usr/lib/liblvm2app.so
-	}
-}
-
-liblvm2app_package() {
-	short_desc="LVM2 application library"
-	pkg_install() {
-		vmove "usr/lib/liblvm2app.so.*"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c25c5c3e720ea..e3af23ee31cb5 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231110
+version=0.1.20231114
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -345,6 +345,8 @@ replaces="
  libllvm8<=8.0.1_5
  libllvm9<=9.0.1_8
  liblrzip<=0.641_1
+ liblvm2app<=2.02.187
+ liblvm2app-devel<=2.02.187
  libmagick6-devel<=6.9.12.12_2
  libmagick6-perl<=6.9.12.12_2
  libmagick6<=6.9.12.12_2

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (36 preceding siblings ...)
  2023-11-14  5:10 ` [PR PATCH] [Updated] " dkwo
@ 2023-11-14  5:16 ` dkwo
  2023-11-14 13:04 ` [PR PATCH] [Merged]: " leahneukirchen
  38 siblings, 0 replies; 40+ messages in thread
From: dkwo @ 2023-11-14  5:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/42363#issuecomment-1809562476

Comment:
rebased

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PR PATCH] [Merged]: lvm2: update to 2.03 series
  2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
                   ` (37 preceding siblings ...)
  2023-11-14  5:16 ` dkwo
@ 2023-11-14 13:04 ` leahneukirchen
  38 siblings, 0 replies; 40+ messages in thread
From: leahneukirchen @ 2023-11-14 13:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

There's a merged pull request on the void-packages repository

lvm2: update to 2.03 series
https://github.com/void-linux/void-packages/pull/42363

Description:
- I tested the changes in this PR: yes
- I built this PR locally for my native architecture, (x86_64-musl)

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2023-11-14 13:04 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 16:51 [PR PATCH] lvm2: update to 2.03.18 dkwo
2023-02-20 16:53 ` dkwo
2023-02-22 23:08 ` [PR PATCH] [Updated] " dkwo
2023-02-27 18:25 ` dkwo
2023-03-14 13:25 ` mhmdanas
2023-03-14 19:14 ` dkwo
2023-03-14 19:14 ` dkwo
2023-03-15  8:55 ` mhmdanas
2023-03-15  8:55 ` mhmdanas
2023-03-15  8:57 ` mhmdanas
2023-04-29 23:00 ` [PR PATCH] [Updated] " dkwo
2023-04-29 23:04 ` lvm2: update to 2.03 series dkwo
2023-06-29 20:03 ` dkwo
2023-06-29 20:15 ` Duncaen
2023-06-30 17:16 ` [PR PATCH] [Updated] " dkwo
2023-06-30 18:13 ` mhmdanas
2023-06-30 18:22 ` dkwo
2023-07-01  9:41 ` mhmdanas
2023-07-01 15:37 ` dkwo
2023-07-01 17:02 ` dkwo
2023-07-02 10:11 ` mhmdanas
2023-07-03 20:46 ` mhmdanas
2023-07-04 12:36 ` dkwo
2023-07-28 19:41 ` [PR PATCH] [Updated] " dkwo
2023-07-28 19:45 ` dkwo
2023-07-28 19:46 ` mhmdanas
2023-08-05 19:36 ` [PR PATCH] [Updated] " dkwo
2023-08-05 19:52 ` dkwo
2023-08-05 19:53 ` dkwo
2023-08-05 20:01 ` leahneukirchen
2023-09-08  9:12 ` [PR PATCH] [Updated] " dkwo
2023-10-11 19:16 ` dkwo
2023-10-11 19:20 ` dkwo
2023-10-11 21:46 ` leahneukirchen
2023-10-11 22:02 ` dkwo
2023-11-13 15:16 ` mhmdanas
2023-11-13 15:34 ` leahneukirchen
2023-11-14  5:10 ` [PR PATCH] [Updated] " dkwo
2023-11-14  5:16 ` dkwo
2023-11-14 13:04 ` [PR PATCH] [Merged]: " leahneukirchen

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).