diff options
author | Max Rees <maxcrees@me.com> | 2020-03-22 16:41:03 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2020-03-22 16:41:03 -0500 |
commit | f51115257428f62d5eba42955c7895b16dba0ebe (patch) | |
tree | d764ba77c575ac907c98b09f0ffc5b53b21a1df7 | |
parent | cf52fe9940f6e2205819493b5c8e18834239fe0b (diff) | |
download | packages-f51115257428f62d5eba42955c7895b16dba0ebe.tar.gz packages-f51115257428f62d5eba42955c7895b16dba0ebe.tar.bz2 packages-f51115257428f62d5eba42955c7895b16dba0ebe.tar.xz packages-f51115257428f62d5eba42955c7895b16dba0ebe.zip |
system/lvm2: fix crash on startup due to std fd nonsense
-rw-r--r-- | system/lvm2/APKBUILD | 4 | ||||
-rw-r--r-- | system/lvm2/fix-stdio-usage.patch | 30 |
2 files changed, 27 insertions, 7 deletions
diff --git a/system/lvm2/APKBUILD b/system/lvm2/APKBUILD index 4bb0d5d0c..3baea9c09 100644 --- a/system/lvm2/APKBUILD +++ b/system/lvm2/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Dan Theisen <djt@hxx.in> pkgname=lvm2 pkgver=2.03.08 -pkgrel=0 +pkgrel=1 pkgdesc="Logical Volume Manager 2 utilities" url="https://sourceware.org/lvm2/" arch="all" @@ -88,7 +88,7 @@ udev() { sha512sums="411c76de2acd8d7d707b60a4aab3f846004a1fbdc7b1d3f34d21af8ed45716adc0516b11491a26261580da7396d13a506e3994b32f5d1cefdf49c97e5d62d2e3 LVM2.2.03.08.tgz -62dd89e626adc86d1f9d7c575517b4454a362868e2fd3399813b61c1cc407316156456348cd4e8148542ee26124739d6c0e72f3dddee66662a40ca86f1bc3abd fix-stdio-usage.patch +bc4473c2f48ff6cab121f92211cd1b67589a6abadd8e32ffa366fed6ddbf9c87be695aa54a6e97b5b79203bf1a7d22cdb5974da84d38b4977592ef7a061612e7 fix-stdio-usage.patch 9272ec8c5184ef5dc776ead8f74132e072b7563b5119a3a38b712f00d92a1e3878c9b3a54eb2b01dcba038110c686b39d4c17ecd0eb258537e9217d7ed03c408 mallinfo.patch d190c40a137b006d7b63298069c93ff08d2804b990e85d44739cd7c48beec9a569903b98f0d940895fc7365723ba886acd7ef0e08f1f65a1a391d1c448ce080e mlockall-default-config.patch a853078660fd2fd943538924f56e81dc5793294e26b8f61d93e6188893f15f4a438d33792b341c1865d61e03f4a371b7c7ee0db5f4130ef7cb7aeaeb9290086a lvm.initd diff --git a/system/lvm2/fix-stdio-usage.patch b/system/lvm2/fix-stdio-usage.patch index d5cc43f65..6b7ee0eaa 100644 --- a/system/lvm2/fix-stdio-usage.patch +++ b/system/lvm2/fix-stdio-usage.patch @@ -1,6 +1,6 @@ ---- ./tools/lvmcmdline.c -+++ ./tools/lvmcmdline.c -@@ -1252,7 +1252,7 @@ +--- LVM2.2.03.08/tools/lvmcmdline.c 2020-02-11 03:59:27.000000000 -0600 ++++ LVM2.2.03.08/tools/lvmcmdline.c 2020-03-22 16:17:35.470100377 -0500 +@@ -3233,7 +3233,7 @@ static int _check_standard_fds(void) int err = is_valid_fd(STDERR_FILENO); if (!is_valid_fd(STDIN_FILENO) && @@ -9,7 +9,7 @@ if (err) perror("stdin stream open"); else -@@ -1262,7 +1262,7 @@ +@@ -3243,7 +3243,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDOUT_FILENO) && @@ -18,7 +18,7 @@ if (err) perror("stdout stream open"); /* else no stdout */ -@@ -1270,7 +1270,7 @@ +@@ -3251,7 +3251,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDERR_FILENO) && @@ -27,3 +27,23 @@ printf("stderr stream open: %s\n", strerror(errno)); return 0; +--- LVM2.2.03.08/lib/commands/toolcontext.c 2020-02-11 03:59:27.000000000 -0600 ++++ LVM2.2.03.08/lib/commands/toolcontext.c 2020-03-22 16:18:35.130101016 -0500 +@@ -1599,7 +1599,7 @@ struct cmd_context *create_toolcontext(u + /* FIXME Make this configurable? */ + reset_lvm_errno(1); + +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + /* Set in/out stream buffering before glibc */ + if (set_buffering + #ifdef SYS_gettid +@@ -1980,7 +1980,7 @@ void destroy_toolcontext(struct cmd_cont + + if (cmd->pending_delete_mem) + dm_pool_destroy(cmd->pending_delete_mem); +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + if (cmd->linebuffer) { + /* Reset stream buffering to defaults */ + if (is_valid_fd(STDIN_FILENO) && |