Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2b7bd1baf |
3 changed files with 142 additions and 2 deletions
26
0034-multipathd-Add-missing-ctype-include.patch
Normal file
26
0034-multipathd-Add-missing-ctype-include.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Bastian Germann <bage@debian.org>
|
||||
Date: Thu, 14 Oct 2021 00:34:33 +0200
|
||||
Subject: [PATCH] multipathd: Add missing ctype include
|
||||
|
||||
In uxclnt.c, there are isspace calls. Add an explicit include.
|
||||
|
||||
Signed-off-by: Bastian Germann <bage@debian.org>
|
||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
multipathd/uxclnt.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/multipathd/uxclnt.c b/multipathd/uxclnt.c
|
||||
index a76f8e29..f16a7309 100644
|
||||
--- a/multipathd/uxclnt.c
|
||||
+++ b/multipathd/uxclnt.c
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
+#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
103
0035-multipathd-replace-libreadline-with-libedit.patch
Normal file
103
0035-multipathd-replace-libreadline-with-libedit.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Fri, 12 Aug 2022 18:58:15 +0200
|
||||
Subject: [PATCH] multipathd: replace libreadline with libedit
|
||||
|
||||
Linking multipathd with libreadline may cause a license conflict,
|
||||
because libreadline is licensed under GPL-3.0-or-later, and
|
||||
libmultipath contains several files under GPL-2.0.
|
||||
|
||||
See:
|
||||
https://github.com/opensvc/multipath-tools/issues/36
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979095
|
||||
https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility
|
||||
|
||||
Replace the readline functionality with libedit, which comes under
|
||||
a BSD license. The readline library can still be enabled (e.g. for
|
||||
binaries not intended to be distributed) by running
|
||||
"make READLINE=libreadline".
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
Makefile.inc | 5 +++++
|
||||
multipathd/Makefile | 12 +++++++++++-
|
||||
multipathd/cli.c | 5 +++++
|
||||
multipathd/uxclnt.c | 6 ++++++
|
||||
4 files changed, 27 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.inc b/Makefile.inc
|
||||
index db35feb6..2f9aa1c2 100644
|
||||
--- a/Makefile.inc
|
||||
+++ b/Makefile.inc
|
||||
@@ -14,6 +14,11 @@
|
||||
#
|
||||
# Uncomment to disable dmevents polling support
|
||||
# ENABLE_DMEVENTS_POLL = 0
|
||||
+#
|
||||
+# Readline library to use, libedit or libreadline
|
||||
+# Caution: Using libreadline may make the multipathd binary undistributable,
|
||||
+# see https://github.com/opensvc/multipath-tools/issues/36
|
||||
+READLINE = libedit
|
||||
|
||||
PKGCONFIG ?= pkg-config
|
||||
|
||||
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
||||
index 393b6cbb..abd9ef6f 100644
|
||||
--- a/multipathd/Makefile
|
||||
+++ b/multipathd/Makefile
|
||||
@@ -15,7 +15,17 @@ CFLAGS += $(BIN_CFLAGS) -I$(multipathdir) -I$(mpathpersistdir) \
|
||||
LDFLAGS += $(BIN_LDFLAGS)
|
||||
LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \
|
||||
-L$(mpathcmddir) -lmpathcmd -ludev -ldl -lurcu -lpthread \
|
||||
- -ldevmapper -lreadline
|
||||
+ -ldevmapper
|
||||
+
|
||||
+ifeq ($(READLINE),libedit)
|
||||
+CFLAGS += -DUSE_LIBEDIT
|
||||
+LIBDEPS += -ledit
|
||||
+endif
|
||||
+ifeq ($(READLINE),libreadline)
|
||||
+CFLAGS += -DUSE_LIBREADLINE
|
||||
+LIBDEPS += -lreadline
|
||||
+endif
|
||||
+
|
||||
CFLAGS += $(shell $(PKGCONFIG) --modversion liburcu 2>/dev/null | \
|
||||
awk -F. '{ printf("-DURCU_VERSION=0x%06x", 256 * ( 256 * $$1 + $$2) + $$3); }')
|
||||
|
||||
diff --git a/multipathd/cli.c b/multipathd/cli.c
|
||||
index bdc9fb10..85d73dfb 100644
|
||||
--- a/multipathd/cli.c
|
||||
+++ b/multipathd/cli.c
|
||||
@@ -11,7 +11,12 @@
|
||||
#include "parser.h"
|
||||
#include "util.h"
|
||||
#include "version.h"
|
||||
+#ifdef USE_LIBEDIT
|
||||
+#include <editline/readline.h>
|
||||
+#endif
|
||||
+#ifdef USE_LIBREADLINE
|
||||
#include <readline/readline.h>
|
||||
+#endif
|
||||
|
||||
#include "mpath_cmd.h"
|
||||
#include "cli.h"
|
||||
diff --git a/multipathd/uxclnt.c b/multipathd/uxclnt.c
|
||||
index f16a7309..2c17d8fc 100644
|
||||
--- a/multipathd/uxclnt.c
|
||||
+++ b/multipathd/uxclnt.c
|
||||
@@ -16,8 +16,14 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <poll.h>
|
||||
+
|
||||
+#ifdef USE_LIBEDIT
|
||||
+#include <editline/readline.h>
|
||||
+#endif
|
||||
+#ifdef USE_LIBREADLINE
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
+#endif
|
||||
|
||||
#include "mpath_cmd.h"
|
||||
#include "uxsock.h"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: device-mapper-multipath
|
||||
Version: 0.8.6
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
|
|
@ -43,12 +43,15 @@ Patch0030: 0030-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
|||
Patch0031: 0031-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||
Patch0032: 0032-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
|
||||
Patch0033: 0033-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
|
||||
Patch0034: 0034-multipathd-Add-missing-ctype-include.patch
|
||||
Patch0035: 0035-multipathd-replace-libreadline-with-libedit.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: kpartx = %{version}-%{release}
|
||||
Requires: device-mapper >= 1.02.96
|
||||
Requires: userspace-rcu
|
||||
Requires: libedit
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
|
@ -66,7 +69,7 @@ Conflicts: udisks2 < 2.8.0-2
|
|||
# build/setup
|
||||
BuildRequires: libaio-devel, device-mapper-devel >= 1.02.89
|
||||
BuildRequires: libselinux-devel, libsepol-devel
|
||||
BuildRequires: readline-devel, ncurses-devel
|
||||
BuildRequires: libedit-devel, ncurses-devel
|
||||
BuildRequires: systemd-units, systemd-devel
|
||||
BuildRequires: json-c-devel, perl-interpreter, pkgconfig, gcc
|
||||
BuildRequires: userspace-rcu-devel
|
||||
|
|
@ -240,6 +243,14 @@ fi
|
|||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Wed Aug 24 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.6-6
|
||||
- Add 0034-multipathd-Add-missing-ctype-include.patch
|
||||
- Add 0035-multipathd-replace-libreadline-with-libedit.patch
|
||||
* replace readline with libedit, to avoid license conflicts. readline
|
||||
is licensed GPL v3, and multipathd includes code licensed gpl v2
|
||||
only.
|
||||
- Require libedit instead of readline
|
||||
|
||||
* Fri Jul 30 2021 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.6-5
|
||||
- Update to the head of the upstream staging branch plus redhat patches
|
||||
* Patches 0016-0018 are from the upstream staging branch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue