diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-10-08 07:03:58 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-10-08 07:04:49 +0000 |
commit | 2e7e4206a16a6e5cbd67403e39389a57e6dfe741 (patch) | |
tree | b8bcf5a53acd964b1386c4b8c0d5872864b3e3fc /main/lvm2 | |
parent | 21edb0b26d14c4e3bbbf5f463b1ede63b9f8b32d (diff) | |
download | aports-2e7e4206a16a6e5cbd67403e39389a57e6dfe741.tar.bz2 aports-2e7e4206a16a6e5cbd67403e39389a57e6dfe741.tar.xz |
main/lvm2: upgrade to 2.02.103, and fix musl build
Diffstat (limited to 'main/lvm2')
-rw-r--r-- | main/lvm2/APKBUILD | 17 | ||||
-rw-r--r-- | main/lvm2/fix-stdio-usage.patch | 111 |
2 files changed, 124 insertions, 4 deletions
diff --git a/main/lvm2/APKBUILD b/main/lvm2/APKBUILD index 279623247c..7954e9a2e7 100644 --- a/main/lvm2/APKBUILD +++ b/main/lvm2/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lvm2 -pkgver=2.02.102 +pkgver=2.02.103 pkgrel=0 pkgdesc="Logical Volume Manager 2 utilities" url="http://sourceware.org/lvm2/" @@ -9,6 +9,7 @@ license="GPL" depends= makedepends="pkgconfig" source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz + fix-stdio-usage.patch lvm.initd lvm.confd " @@ -19,6 +20,11 @@ _builddir="$srcdir/LVM2.$pkgver" prepare() { cd "$_builddir" update_config_sub || return 1 + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build () { @@ -68,12 +74,15 @@ libs() { mv "$pkgdir"/lib/liblvm2*.so.* "$subpkgdir"/lib/ } -md5sums="cfce545d87abf42ae4c9e0aae704619e LVM2.2.02.102.tgz +md5sums="e427e3494aaf86da2d363f344deb3837 LVM2.2.02.103.tgz +2395ae17f924ebf25e9737d02f758f8f fix-stdio-usage.patch 260dba1a691ea2ae86a3c49b39f1dd7d lvm.initd ec36d5fe4561220304e406c5c797e71f lvm.confd" -sha256sums="7392705663f814e4cc547fb22dc6e29b7c8929fd98ca998c6dd1a9e4b92df6a1 LVM2.2.02.102.tgz +sha256sums="71c5a2e8842ed2f13f52e02b44eb183110a3410dedd1e117348e4eecc29d3c2a LVM2.2.02.103.tgz +79c5379cbf660f8dabd45359463c77a40b5a83153b54c67ce36049260dac9071 fix-stdio-usage.patch 0be9b5503c4713fb848ad050ac4e57138770d72d639f536d32cc1a77b1ecc221 lvm.initd e2ff57977ace6098e1a2efc8a1f6796e8bf6e5dd148e4c105bb647ffc6f79230 lvm.confd" -sha512sums="a2b81d231412fea13d4b83109b55f75ccb56bef4806fbefeae057d2ab8a1012387148ee14d7ae4143ea16149b1679c92e1a13f9e9b28cf5eef50448629163195 LVM2.2.02.102.tgz +sha512sums="1a9920947312e3e248bff7ff5d5eb54dec3f3b05eb3388fa92f95369b26ae8e6838186f87d817b09e8c635ddc3cdf51bc1d07c2a9d65fd7eab33598998bb7afe LVM2.2.02.103.tgz +c4d55b366a60926baadf431dd382012eb808490c0bb514e01503d526cfd7ae573efa2d60a92bd5f6f451b54b11fb5cf827f45cec35cfcdee6aa291674cc776dd fix-stdio-usage.patch 97bd0524b3982e54cc41cec7d9cc2433d30f49175eeca95661f25906e414885d512ba21de3bbbca4a9c5496ba69b0aac9d977168d6e76f95d70ae37f3a3f65c7 lvm.initd 07caf8fa942290f3c953cc2463aaf55bac01d0bcb9351daf3880fa4d0eefb67fe00761c46a7a4da91cd2f8e492a12fed35853a15dc939cd80d19d3303bc3951d lvm.confd" diff --git a/main/lvm2/fix-stdio-usage.patch b/main/lvm2/fix-stdio-usage.patch new file mode 100644 index 0000000000..71fa5bfae1 --- /dev/null +++ b/main/lvm2/fix-stdio-usage.patch @@ -0,0 +1,111 @@ +--- LVM2.2.02.103.orig/lib/commands/toolcontext.c ++++ LVM2.2.02.103/lib/commands/toolcontext.c +@@ -1336,7 +1336,10 @@ + /* + * Close and reopen stream on file descriptor fd. + */ +-static int _reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream) ++#ifdef __GLIBC__ ++#define _reopen_stream(stream, fd, mode, name) __reopen_stream(stream, fd, mode, name, &stream) ++ ++static int __reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream) + { + int fd_copy, new_fd; + +@@ -1363,6 +1366,9 @@ + + return 1; + } ++#else ++#define _reopen_stream(stream, fd, mode, name) (freopen(NULL, mode, stream) != NULL) ++#endif + + /* Entry point */ + struct cmd_context *create_toolcontext(unsigned is_long_lived, +@@ -1371,7 +1377,6 @@ + unsigned threaded) + { + struct cmd_context *cmd; +- FILE *new_stream; + int flags; + + #ifdef M_MMAP_MAX +@@ -1421,9 +1426,8 @@ + if (is_valid_fd(STDIN_FILENO) && + ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) && + (flags & O_ACCMODE) != O_WRONLY) { +- if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream)) ++ if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin")) + goto_out; +- stdin = new_stream; + if (setvbuf(stdin, cmd->linebuffer, _IOLBF, linebuffer_size)) { + log_sys_error("setvbuf", ""); + goto out; +@@ -1433,9 +1437,8 @@ + if (is_valid_fd(STDOUT_FILENO) && + ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) && + (flags & O_ACCMODE) != O_RDONLY) { +- if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream)) ++ if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout")) + goto_out; +- stdout = new_stream; + if (setvbuf(stdout, cmd->linebuffer + linebuffer_size, + _IOLBF, linebuffer_size)) { + log_sys_error("setvbuf", ""); +@@ -1715,7 +1718,6 @@ + void destroy_toolcontext(struct cmd_context *cmd) + { + struct dm_config_tree *cft_cmdline; +- FILE *new_stream; + int flags; + + if (cmd->dump_filter && cmd->filter && cmd->filter->dump && +@@ -1752,8 +1754,7 @@ + if (is_valid_fd(STDIN_FILENO) && + ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) && + (flags & O_ACCMODE) != O_WRONLY) { +- if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream)) { +- stdin = new_stream; ++ if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin")) { + setlinebuf(stdin); + } else + cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */ +@@ -1762,8 +1763,7 @@ + if (is_valid_fd(STDOUT_FILENO) && + ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) && + (flags & O_ACCMODE) != O_RDONLY) { +- if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream)) { +- stdout = new_stream; ++ if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout")) { + setlinebuf(stdout); + } else + cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */ +--- LVM2.2.02.103.orig/tools/lvmcmdline.c ++++ LVM2.2.02.103/tools/lvmcmdline.c +@@ -1252,7 +1252,7 @@ + int err = is_valid_fd(STDERR_FILENO); + + if (!is_valid_fd(STDIN_FILENO) && +- !(stdin = fopen(_PATH_DEVNULL, "r"))) { ++ !freopen(_PATH_DEVNULL, "r", stdin)) { + if (err) + perror("stdin stream open"); + else +@@ -1262,7 +1262,7 @@ + } + + if (!is_valid_fd(STDOUT_FILENO) && +- !(stdout = fopen(_PATH_DEVNULL, "w"))) { ++ !freopen(_PATH_DEVNULL, "w", stdout)) { + if (err) + perror("stdout stream open"); + /* else no stdout */ +@@ -1270,7 +1270,7 @@ + } + + if (!is_valid_fd(STDERR_FILENO) && +- !(stderr = fopen(_PATH_DEVNULL, "w"))) { ++ !freopen(_PATH_DEVNULL, "w", stderr)) { + printf("stderr stream open: %s\n", + strerror(errno)); + return 0; |