internal/rosa/package: lvm2
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 3m0s
Test / Hakurei (push) Successful in 4m36s
Test / Sandbox (race detector) (push) Successful in 5m48s
Test / Hakurei (race detector) (push) Successful in 7m6s
Test / ShareFS (push) Successful in 7m19s
Test / Flake checks (push) Successful in 1m6s
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 3m0s
Test / Hakurei (push) Successful in 4m36s
Test / Sandbox (race detector) (push) Successful in 5m48s
Test / Hakurei (race detector) (push) Successful in 7m6s
Test / ShareFS (push) Successful in 7m19s
Test / Flake checks (push) Successful in 1m6s
This is only really packaged for devmapper, and will eventually be replaced by a native implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
|
||||||
|
index 60739af..8b3fdf7 100644
|
||||||
|
--- a/lib/commands/toolcontext.c
|
||||||
|
+++ b/lib/commands/toolcontext.c
|
||||||
|
@@ -1661,6 +1661,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
|
||||||
|
reset_lvm_errno(1);
|
||||||
|
|
||||||
|
/* Set in/out stream buffering before glibc */
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
if (set_buffering
|
||||||
|
&& !cmd->running_on_valgrind /* Skipping within valgrind execution. */
|
||||||
|
#ifdef SYS_gettid
|
||||||
|
@@ -1704,6 +1705,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
|
||||||
|
} else if (!set_buffering)
|
||||||
|
/* Without buffering, must not use stdin/stdout */
|
||||||
|
init_silent(1);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Environment variable LVM_SYSTEM_DIR overrides this below.
|
||||||
|
@@ -2038,6 +2040,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
|
||||||
|
if (cmd->cft_def_hash)
|
||||||
|
dm_hash_destroy(cmd->cft_def_hash);
|
||||||
|
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
if (!cmd->running_on_valgrind && cmd->linebuffer) {
|
||||||
|
int flags;
|
||||||
|
/* Reset stream buffering to defaults */
|
||||||
|
@@ -2061,6 +2064,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
|
||||||
|
|
||||||
|
free(cmd->linebuffer);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
destroy_config_context(cmd);
|
||||||
|
|
||||||
|
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
|
||||||
|
index 7209ebd..778c8c0 100644
|
||||||
|
--- a/tools/lvmcmdline.c
|
||||||
|
+++ b/tools/lvmcmdline.c
|
||||||
|
@@ -3378,7 +3378,7 @@ static int _check_standard_fds(void)
|
||||||
|
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
|
||||||
|
@@ -3388,7 +3388,7 @@ static int _check_standard_fds(void)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 */
|
||||||
|
@@ -3396,7 +3396,7 @@ static int _check_standard_fds(void)
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package lvm2 {
|
||||||
|
description = "userspace toolset that provide logical volume management facilities";
|
||||||
|
website = "https://sourceware.org/lvm2";
|
||||||
|
anitya = 5354;
|
||||||
|
|
||||||
|
version# = "2.03.41";
|
||||||
|
source = remoteTar {
|
||||||
|
url = "https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2."+version+".tgz";
|
||||||
|
compress = gzip;
|
||||||
|
checksum = "M3L0oaeEG-0FvL7gYoeLwWIm-RBtKa4-ojwezRqL8xqiyU_5N7uE2bvwTeVJ154z";
|
||||||
|
};
|
||||||
|
patches = [
|
||||||
|
"fix-stdio-usage.patch",
|
||||||
|
"remove-man.patch",
|
||||||
|
];
|
||||||
|
|
||||||
|
exec = make {
|
||||||
|
// requires root
|
||||||
|
skipCheck = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
inputs = [
|
||||||
|
pkg-config,
|
||||||
|
|
||||||
|
libaio,
|
||||||
|
kernel-headers,
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index bf011ff4f..86713f2cd 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -18,7 +18,7 @@ top_builddir = @top_builddir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
|
||||||
|
-SUBDIRS = libdm conf daemons include lib libdaemon man scripts tools
|
||||||
|
+SUBDIRS = libdm conf daemons include lib libdaemon scripts tools
|
||||||
|
|
||||||
|
ifeq ("@UDEV_RULES@", "yes")
|
||||||
|
SUBDIRS += udev
|
||||||
Reference in New Issue
Block a user