diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/linux.scm | 17 | ||||
-rw-r--r-- | gnu/packages/patches/multipath-tools-sans-systemd.patch | 83 |
3 files changed, 99 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index ab2bac9bc5..025dfe114b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1275,6 +1275,7 @@ dist_patch_DATA = \ %D%/packages/patches/mozjs38-version-detection.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ + %D%/packages/patches/multipath-tools-sans-systemd.patch \ %D%/packages/patches/mumps-build-parallelism.patch \ %D%/packages/patches/mumps-shared-libseq.patch \ %D%/packages/patches/mumps-shared-mumps.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 793036a3ff..2d8acea0e3 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4182,7 +4182,7 @@ arrays when needed.") (define-public multipath-tools (package (name "multipath-tools") - (version "0.8.3") + (version "0.8.4") (source (origin (method git-fetch) (uri (git-reference @@ -4191,7 +4191,8 @@ arrays when needed.") (file-name (git-file-name name version)) (sha256 (base32 - "02kdbk3gv3fx5dg445scz3l4lg0sznlv037qkjgpw9xkw4l50cfd")) + "14n8pcgnliicqxzc40xvjxk4cafm4qx7a3rsx5qva74r3ydzx8rn")) + (patches (search-patches "multipath-tools-sans-systemd.patch")) (modules '((guix build utils))) (snippet '(begin @@ -4205,9 +4206,12 @@ arrays when needed.") (build-system gnu-build-system) (arguments '(#:tests? #f ; no tests + #:parallel-build? #f ;XXX: broken in 0.8.4 #:make-flags (list "CC=gcc" (string-append "DESTDIR=" (assoc-ref %outputs "out")) + ;; Install Udev rules below this directory, relative + ;; to the prefix. "SYSTEMDPATH=lib" (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") @@ -4229,6 +4233,15 @@ arrays when needed.") (("/usr/include/libudev.h") (string-append udev "/include/libudev.h"))) #t))) + (add-after 'unpack 'fix-maybe-uninitialized-variable + (lambda _ + ;; This variable gets initialized later if needed, but GCC 7 + ;; fails to notice. Should be fixed for > 0.8.4. + ;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html + (substitute* "libmultipath/structs_vec.c" + (("bool is_queueing;") + "bool is_queueing = false;")) + #t)) (delete 'configure)))) ; no configure script (native-inputs `(("perl" ,perl) diff --git a/gnu/packages/patches/multipath-tools-sans-systemd.patch b/gnu/packages/patches/multipath-tools-sans-systemd.patch new file mode 100644 index 0000000000..8f3144718c --- /dev/null +++ b/gnu/packages/patches/multipath-tools-sans-systemd.patch @@ -0,0 +1,83 @@ +Fix various compiler warnings when built without systemd. + +Submitted upstream at <https://www.redhat.com/archives/dm-devel/2020-May/thread.html>. + +diff --git a/libmultipath/config.c b/libmultipath/config.c +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -696,7 +696,7 @@ process_config_dir(struct config *conf, char *dir) + pthread_cleanup_pop(1); + } + +-static void set_max_checkint_from_watchdog(struct config *conf) ++static void set_max_checkint_from_watchdog(__attribute__((unused)) struct config *conf) + { + #ifdef USE_SYSTEMD + char *envp = getenv("WATCHDOG_USEC"); +diff --git a/multipathd/main.c b/multipathd/main.c +--- a/multipathd/main.c ++++ b/multipathd/main.c +@@ -176,6 +176,7 @@ daemon_status(void) + /* + * I love you too, systemd ... + */ ++#ifdef USE_SYSTEMD + static const char * + sd_notify_status(enum daemon_status state) + { +@@ -195,7 +196,6 @@ sd_notify_status(enum daemon_status state) + return NULL; + } + +-#ifdef USE_SYSTEMD + static void do_sd_notify(enum daemon_status old_state, + enum daemon_status new_state) + { +@@ -247,7 +247,9 @@ enum daemon_status wait_for_state_change_if(enum daemon_status oldstate, + static void __post_config_state(enum daemon_status state) + { + if (state != running_state && running_state != DAEMON_SHUTDOWN) { +- enum daemon_status old_state = running_state; ++ /* save state for sd_notify */ ++ enum daemon_status ++ __attribute__((unused)) old_state = running_state; + + running_state = state; + pthread_cond_broadcast(&config_cond); +@@ -272,7 +274,9 @@ int set_config_state(enum daemon_status state) + pthread_cleanup_push(config_cleanup, NULL); + pthread_mutex_lock(&config_lock); + if (running_state != state) { +- enum daemon_status old_state = running_state; ++ /* save state for sd_notify */ ++ enum daemon_status ++ __attribute__((unused)) old_state = running_state; + + if (running_state == DAEMON_SHUTDOWN) + rc = EINVAL; +@@ -2280,7 +2284,6 @@ checkerloop (void *ap) + struct timespec last_time; + struct config *conf; + int foreign_tick = 0; +- bool use_watchdog; + + pthread_cleanup_push(rcu_unregister, NULL); + rcu_register_thread(); +@@ -2292,11 +2295,15 @@ checkerloop (void *ap) + get_monotonic_time(&last_time); + last_time.tv_sec -= 1; + +- /* use_watchdog is set from process environment and never changes */ + conf = get_multipath_config(); +- use_watchdog = conf->use_watchdog; + put_multipath_config(conf); + ++#ifdef USE_SYSTEMD ++ /* use_watchdog is set from process environment and never changes */ ++ bool use_watchdog; ++ use_watchdog = conf->use_watchdog; ++#endif ++ + while (1) { + struct timespec diff_time, start_time, end_time; + int num_paths = 0, strict_timing, rc = 0; |