diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-09-02 17:40:47 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-09-02 12:52:45 -0700 |
commit | 215df6e5bab38e8d5a907c35d74254304e3fe8e7 (patch) | |
tree | c10bf6aeff8db370b20fd6bc2e648c3a098c3424 /meta-networking/recipes-daemons/iscsi-initiator-utils/files | |
parent | e78130c9bcace6fede233885a12b682d677405fb (diff) | |
download | meta-openembedded-215df6e5bab38e8d5a907c35d74254304e3fe8e7.tar.gz |
iscsi-initiator-utils: 2.0.876 -> 2.0.877
License-Update: Update GPLv2 License information
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons/iscsi-initiator-utils/files')
2 files changed, 180 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Make-iscsid-systemd-usage-optional.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Make-iscsid-systemd-usage-optional.patch new file mode 100644 index 000000000..08248d358 --- /dev/null +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Make-iscsid-systemd-usage-optional.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 365efb2fd3062065af4b6eb3dc1661b96557dae8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Wed, 21 Aug 2019 16:37:53 +0800 | ||
4 | Subject: [PATCH] Make iscsid systemd usage optional | ||
5 | |||
6 | Upstream-Status: Backport[https://github.com/open-iscsi/open-iscsi | ||
7 | /commit/f71581bd641dc26d330cb8b97e5ec272dd08f811] | ||
8 | |||
9 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
10 | --- | ||
11 | Makefile | 5 +++++ | ||
12 | usr/Makefile | 2 ++ | ||
13 | usr/iscsid.c | 6 ++++++ | ||
14 | 3 files changed, 13 insertions(+) | ||
15 | |||
16 | diff --git a/Makefile b/Makefile | ||
17 | index c533e9d..1ef0921 100644 | ||
18 | --- a/Makefile | ||
19 | +++ b/Makefile | ||
20 | @@ -39,6 +39,11 @@ ifneq (,$(CFLAGS)) | ||
21 | export CFLAGS | ||
22 | endif | ||
23 | |||
24 | +# export systemd disablement if set | ||
25 | +ifneq ($(NO_SYSTEMD),) | ||
26 | +export NO_SYSTEMD | ||
27 | +endif | ||
28 | + | ||
29 | # Random comments: | ||
30 | # using '$(MAKE)' instead of just 'make' allows make to run in parallel | ||
31 | # over multiple makefile. | ||
32 | diff --git a/usr/Makefile b/usr/Makefile | ||
33 | index f9445ad..0203127 100644 | ||
34 | --- a/usr/Makefile | ||
35 | +++ b/usr/Makefile | ||
36 | @@ -41,7 +41,9 @@ CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \ | ||
37 | CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod) | ||
38 | ISCSI_LIB = -L$(TOPDIR)/libopeniscsiusr -lopeniscsiusr | ||
39 | LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod) | ||
40 | +ifneq ($(NO_SYSTEMD),) | ||
41 | LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd) | ||
42 | +endif | ||
43 | PROGRAMS = iscsid iscsiadm iscsistart | ||
44 | |||
45 | # libc compat files | ||
46 | diff --git a/usr/iscsid.c b/usr/iscsid.c | ||
47 | index 0c98440..164325e 100644 | ||
48 | --- a/usr/iscsid.c | ||
49 | +++ b/usr/iscsid.c | ||
50 | @@ -34,7 +34,9 @@ | ||
51 | #include <sys/wait.h> | ||
52 | #include <sys/types.h> | ||
53 | #include <sys/stat.h> | ||
54 | +#ifndef NO_SYSTEMD | ||
55 | #include <systemd/sd-daemon.h> | ||
56 | +#endif | ||
57 | |||
58 | #include "iscsid.h" | ||
59 | #include "mgmt_ipc.h" | ||
60 | @@ -339,6 +341,7 @@ static void missing_iname_warn(char *initiatorname_file) | ||
61 | /* called right before we enter the event loop */ | ||
62 | static void set_state_to_ready(void) | ||
63 | { | ||
64 | +#ifndef NO_SYSTEMD | ||
65 | if (sessions_to_recover) | ||
66 | sd_notify(0, "READY=1\n" | ||
67 | "RELOADING=1\n" | ||
68 | @@ -346,14 +349,17 @@ static void set_state_to_ready(void) | ||
69 | else | ||
70 | sd_notify(0, "READY=1\n" | ||
71 | "STATUS=Ready to process requests\n"); | ||
72 | +#endif | ||
73 | } | ||
74 | |||
75 | /* called when recovery process has been reaped */ | ||
76 | static void set_state_done_reloading(void) | ||
77 | { | ||
78 | +#ifndef NO_SYSTEMD | ||
79 | sessions_to_recover = 0; | ||
80 | sd_notifyf(0, "READY=1\n" | ||
81 | "STATUS=Ready to process requests\n"); | ||
82 | +#endif | ||
83 | } | ||
84 | |||
85 | int main(int argc, char *argv[]) | ||
86 | -- | ||
87 | 2.7.4 | ||
88 | |||
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Use-pkg-config-in-Makefiles-for-newer-libraries.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Use-pkg-config-in-Makefiles-for-newer-libraries.patch new file mode 100644 index 000000000..37b764e85 --- /dev/null +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Use-pkg-config-in-Makefiles-for-newer-libraries.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | From e9b49664e969fd5cad1abef7b8b59e1fb8d02a47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lee Duncan <lduncan@suse.com> | ||
3 | Date: Mon, 12 Nov 2018 13:10:04 -0800 | ||
4 | Subject: [PATCH] Use pkg-config in Makefiles for newer libraries. | ||
5 | |||
6 | These two recently-added libraries can be in different | ||
7 | locations on different distros, so use pkg-config to | ||
8 | added the appropriate actions in the make files. | ||
9 | |||
10 | Upstream-Status: Backport[https://github.com/open-iscsi/open-iscsi/commit/ | ||
11 | 623a81123c494f5c69dc6616bd72e838862e2f1f#diff-c4bf6688222ad28c9719cfaf88c16329] | ||
12 | |||
13 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
14 | --- | ||
15 | libopeniscsiusr/Makefile | 8 +++++++- | ||
16 | usr/Makefile | 11 ++++++++--- | ||
17 | 2 files changed, 15 insertions(+), 4 deletions(-) | ||
18 | |||
19 | diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile | ||
20 | index bf7c96c..a045a45 100644 | ||
21 | --- a/libopeniscsiusr/Makefile | ||
22 | +++ b/libopeniscsiusr/Makefile | ||
23 | @@ -23,6 +23,8 @@ endif | ||
24 | INCLUDE_DIR ?= $(prefix)/include | ||
25 | PKGCONF_DIR ?= $(LIB_DIR)/pkgconfig | ||
26 | |||
27 | +PKG_CONFIG = /usr/bin/pkg-config | ||
28 | + | ||
29 | LIBISCSI_USR_DIR=$(TOPDIR)/libopeniscsiusr | ||
30 | |||
31 | LIBISCSI_USR_VERSION_MAJOR=0 | ||
32 | @@ -43,13 +45,17 @@ OBJS = context.o misc.o session.o sysfs.o iface.o idbm.o node.o default.o | ||
33 | |||
34 | CFLAGS ?= -O2 -g | ||
35 | CFLAGS += -Wall -Werror -Wextra -fvisibility=hidden -fPIC | ||
36 | +CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod) | ||
37 | + | ||
38 | +LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod) | ||
39 | |||
40 | LIBADD = | ||
41 | |||
42 | all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc | ||
43 | |||
44 | $(LIBS): $(OBJS) | ||
45 | - $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD) | ||
46 | + @echo CFLAGS= $(CFLAGS) | ||
47 | + $(CC) $(CFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LDFLAGS) $(LIBADD) | ||
48 | ln -sf $@ $(DEVLIB) | ||
49 | |||
50 | $(LIBS_MAJOR): $(LIBS) | ||
51 | diff --git a/usr/Makefile b/usr/Makefile | ||
52 | index f9445ad..f1c35aa 100644 | ||
53 | --- a/usr/Makefile | ||
54 | +++ b/usr/Makefile | ||
55 | @@ -32,11 +32,16 @@ IPC_OBJ=ioctl.o | ||
56 | endif | ||
57 | endif | ||
58 | |||
59 | +PKG_CONFIG = /usr/bin/pkg-config | ||
60 | + | ||
61 | CFLAGS ?= -O2 -g | ||
62 | WARNFLAGS ?= -Wall -Wstrict-prototypes | ||
63 | CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \ | ||
64 | -I$(TOPDIR)/libopeniscsiusr | ||
65 | +CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod) | ||
66 | ISCSI_LIB = -L$(TOPDIR)/libopeniscsiusr -lopeniscsiusr | ||
67 | +LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod) | ||
68 | +LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd) | ||
69 | PROGRAMS = iscsid iscsiadm iscsistart | ||
70 | |||
71 | # libc compat files | ||
72 | @@ -60,14 +65,14 @@ all: $(PROGRAMS) | ||
73 | |||
74 | iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \ | ||
75 | iscsid.o session_mgmt.o discoveryd.o mntcheck.o | ||
76 | - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lisns -lcrypto -lrt -lmount $(ISCSI_LIB) | ||
77 | + $(CC) $(CFLAGS) $^ -o $@ -lisns -lcrypto -lrt -lmount $(LDFLAGS) $(ISCSI_LIB) | ||
78 | |||
79 | iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o mntcheck.o | ||
80 | - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lisns -lcrypto -lmount $(ISCSI_LIB) | ||
81 | + $(CC) $(CFLAGS) $^ -o $@ -lisns -lcrypto -lmount $(LDFLAGS) $(ISCSI_LIB) | ||
82 | |||
83 | iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ | ||
84 | iscsistart.o statics.o | ||
85 | - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt $(ISCSI_LIB) | ||
86 | + $(CC) $(CFLAGS) $^ -o $@ -lrt $(LDFLAGS) $(ISCSI_LIB) | ||
87 | clean: | ||
88 | rm -f *.o $(PROGRAMS) .depend $(LIBSYS) | ||
89 | |||
90 | -- | ||
91 | 2.7.4 | ||
92 | |||