From: dkwo <dkwo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] lvm2: update to 2.03.18
Date: Mon, 20 Feb 2023 17:51:56 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42363@inbox.vuxu.org> (raw)
[-- 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.*"
- }
-}
next reply other threads:[~2023-02-20 16:51 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 16:51 dkwo [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42363@inbox.vuxu.org \
--to=dkwo@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).