sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Ismael Luceno (c8eb217a99de22db222e86ae94d88df799127d83)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (c8eb217a99de22db222e86ae94d88df799127d83)
- Date: Sat, 31 Aug 2019 21:59:58 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
disk/lvm/HISTORY | 8 ++++-
disk/lvm/PRE_BUILD | 9 +++--
disk/lvm/patches/fix-stdio-usage.patch | 51
+++++++++++++++++++++++++++++++++
disk/lvm/patches/portability.patch | 29 ++++++++++++++++++
4 files changed, 93 insertions(+), 4 deletions(-)
New commits:
commit c8eb217a99de22db222e86ae94d88df799127d83
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
lvm: Fix build against musl
commit 1728d47e143aa101f9d6423071d8a8411c34f458
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
lvm: Simplify editing of po/Makefile.in
diff --git a/disk/lvm/HISTORY b/disk/lvm/HISTORY
index 9ee015f..18d3246 100644
--- a/disk/lvm/HISTORY
+++ b/disk/lvm/HISTORY
@@ -1,7 +1,13 @@
+2019-08-31 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD: Simplified editing of po/Makefile.in
+ * PRE_BUILD, patches/fix-stdio-usage.patch, patches/portability.patch:
+ Fixed build against musl
+
2019-07-08 Eric Sandall <sandalle AT sourcemage.org>
* DETAILS: Updated to 2.03.05
Update WEB_SITE to sourceware.org as redhat no longer hosts the
site.
- * PRE_BUILD: Fix non-working dummy de.po that breaks install even on
prior version
+ * PRE_BUILD: Fix non-working dummy de.po that breaks install even on
+ prior version
2019-05-18 Ismael Luceno <ismael AT sourcemage.org>
* DEPENDS: Update dependency; s/gettext/GETTEXT/
diff --git a/disk/lvm/PRE_BUILD b/disk/lvm/PRE_BUILD
index ba11d9b..044770e 100755
--- a/disk/lvm/PRE_BUILD
+++ b/disk/lvm/PRE_BUILD
@@ -1,4 +1,7 @@
default_pre_build &&
-# Don't try to install non-existent po/de.mo which isn't even bothered to be
created from the dummy file po/de.po
-sedit 's:^LANGS=de:#&:' "${SOURCE_DIRECTORY}"/po/Makefile.in &&
-sedit 's:^#TARGETS=\(.*\):TARGETS=\1:' "${SOURCE_DIRECTORY}"/po/Makefile.in
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches &&
+
+# Don't try to install non-existent po/de.mo which isn't even bothered to be
+# created from the dummy file po/de.po
+sedit 's:^LANGS=de:#&:;/^#TARGETS=/s/#//' po/Makefile.in
diff --git a/disk/lvm/patches/fix-stdio-usage.patch
b/disk/lvm/patches/fix-stdio-usage.patch
new file mode 100644
index 0000000..d36abf4
--- /dev/null
+++ b/disk/lvm/patches/fix-stdio-usage.patch
@@ -0,0 +1,51 @@
+Source: Void-Linux
+
+--- a/tools/lvmcmdline.c
++++ b/tools/lvmcmdline.c
+@@ -3135,7 +3135,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
+@@ -3145,7 +3145,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 */
+@@ -3153,7 +3153,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;
+--- a/lib/commands/toolcontext.c
++++ b/lib/commands/toolcontext.c
+@@ -1594,7 +1594,7 @@
+ /* 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) {
+ /* Allocate 2 buffers */
+@@ -1962,7 +1962,7 @@
+ if (cmd->libmem)
+ dm_pool_destroy(cmd->libmem);
+
+-#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 a/disk/lvm/patches/portability.patch
b/disk/lvm/patches/portability.patch
new file mode 100644
index 0000000..1ab9ca0
--- /dev/null
+++ b/disk/lvm/patches/portability.patch
@@ -0,0 +1,29 @@
+Portability fixes:
+
+- Use fcntl.h for O_RDONLY and friends.
+- Only use mallinfo with glibc.
+
+Source: Void-Linux
+
+--- a/libdaemon/server/daemon-server.c
++++ b/libdaemon/server/daemon-server.c
+@@ -16,6 +16,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
++++ b/lib/mm/memlock.c
+@@ -159,7 +159,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;
- [SM-Commit] GIT changes to master grimoire by Ismael Luceno (c8eb217a99de22db222e86ae94d88df799127d83), Ismael Luceno, 08/31/2019
Archive powered by MHonArc 2.6.24.