From c73b19d5049312ac7ba91d223081610614217717 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Mon, 18 Jan 2021 18:53:33 +0530 Subject: [PATCH 1/2] sys-block/open-iscsi: Sync from Gentoo sync ref: 3e85eb9a786a79658e0abdb357f92f06ebf2a154 Signed-off-by: Sayan Chowdhury --- .../sys-block/open-iscsi/Manifest | 5 +- .../open-iscsi/files/initiatorname.iscsi | 3 +- .../sys-block/open-iscsi/files/iscsid-conf.d | 1 + .../files/iscsid-initiatorname.service | 10 -- .../sys-block/open-iscsi/files/iscsid.service | 16 -- .../sys-block/open-iscsi/files/iscsid.socket | 9 - .../files/open-iscsi-2.0.873-Makefiles.patch | 161 ------------------ ...-2.0.873-remove-kernel-version-check.patch | 42 ----- .../files/open-iscsi-2.1.1-Makefiles.patch | 30 ++-- .../open-iscsi/files/open-iscsi.conf | 2 - .../sys-block/open-iscsi/metadata.xml | 14 +- .../open-iscsi/open-iscsi-2.0.873-r3.ebuild | 90 ---------- ...i-2.1.2.ebuild => open-iscsi-2.1.3.ebuild} | 2 +- 13 files changed, 34 insertions(+), 351 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-initiatorname.service delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.service delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.socket delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-remove-kernel-version-check.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild rename sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/{open-iscsi-2.1.2.ebuild => open-iscsi-2.1.3.ebuild} (98%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/Manifest index c5ee4a19fd..db79f4c65f 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/Manifest @@ -1,2 +1,5 @@ -DIST open-iscsi-2.0-873.tar.gz 667069 SHA256 7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9 SHA512 4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b WHIRLPOOL 05af106f11da9f9f02c10edd5412d0f99816349e06e192059700eb1ae24a36027c3f0d7ed423aa7bb1c0b9d8b3aa1b6aa72a2aadb00f27762edf16b7f7d08c09 +DIST open-iscsi-2.0-873.tar.gz 667069 BLAKE2B edb427f8483c31499cdde644bbf8d658952952fa8d52a232537e7e6ec71d2d237dcd4e8759de21b65cac757678c7d71c22bd2fe71ed1e7ac152ae8396f080061 SHA512 4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b +DIST open-iscsi-2.0.875.tar.gz 635121 BLAKE2B 34a7083087c53ed0e59d293d26efe166b09c5ea18b6022869cc9ff3d2edb2fb8b69e2c1ce6c9011bd20fc590b02dafd6d7c13d8bfa1eae6408c4bace13992e5e SHA512 1709011d7d12d3dd9278a0d775af064d5f7da37357f35d6d5c5b3aa8ec16385c28b201b1261f4581dbbbbca3d815015ed8696e1694aa19f3231132f90d1e5b36 +DIST open-iscsi-2.1.1.tar.gz 616859 BLAKE2B 7004b0866e55837f06cfe9e45f49f6a482932fda8a2c21c55819d658fb96113f1913290d490f28baccea86ceb755c63b73bd010b201f974c9803d39fbf5d0672 SHA512 88dbea433fe5266714c5c73ce4b60dfb8ddeffcaad4ff77abbdda2a865d29d4307ca51b8f45376f54542b19baed30d5f2f1836a8c136eb0af840f489f47e4fb3 DIST open-iscsi-2.1.2.tar.gz 617407 BLAKE2B 13a8c70d8a4618262c746cce3f2c66c04b577b35918d993c29fff041d292ef9e60b4d39c6d6a308d306b8303d08e7aac81b9927157361eaf47e694e9ae1e365a SHA512 a0b1fc4aa2acadbf3a69fa636a47fec527fff75748fccfa83c9540f3ac05c71835a406503b15480ed25fe4fb780e58e0dd21760cccc7f7ef07128d1aef8ee2e3 +DIST open-iscsi-2.1.3.tar.gz 619746 BLAKE2B 884e24ae6e16578f3cbd8ccea2557e820d4bf4d20c7f88890100ca93f48df88dc7284cc4eca19d93187516fd21a2c5b71eb53f0d8fe395d2ce42fd202dc355d6 SHA512 0de417dc45b765458c5a1f09029b5df9b5c18d45d7a8fb6b38d539b7013f512a3c8731d5046f554611eccc77b93fea0df30fe4932d79cea44776ac944c398a52 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/initiatorname.iscsi b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/initiatorname.iscsi index 9a80438ee9..22179903c5 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/initiatorname.iscsi +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/initiatorname.iscsi @@ -1,6 +1,5 @@ -# Copyright 1999-2005 Gentoo Technologies, Inc. +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Id$ # # This file must contain a InitiatorName entry! # white space is significent here! diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-conf.d b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-conf.d index bfa07054b6..02e584fbce 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-conf.d +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-conf.d @@ -15,3 +15,4 @@ AUTOSTARTTARGETS="yes" # if set to "strict", iscsid will stop, if connecting the # autostart targets failed # AUTOSTART="strict" + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-initiatorname.service b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-initiatorname.service deleted file mode 100644 index 064392c7c8..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid-initiatorname.service +++ /dev/null @@ -1,10 +0,0 @@ -# Generate an iSCSI initiator name if one doesn't already exist -[Unit] -Description=iSCSI initiator name generator -After=systemd-tmpfiles-setup.service -ConditionPathExists=!/etc/iscsi/initiatorname.iscsi -DefaultDependencies=no - -[Service] -Type=oneshot -ExecStart=/bin/sh -c 'echo InitiatorName=iqn.2016-04.com.flatcar.iscsi:$(/etc/iscsi/initiatorname.iscsi' diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.service b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.service deleted file mode 100644 index 322d37eee5..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Open-iSCSI -Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) -After=network.target NetworkManager-wait-online.service iscsid-initiatorname.service iscsiuio.service tgtd.service targetcli.service -Requires=iscsid-initiatorname.service - -[Service] -Type=forking -PIDFile=/var/run/iscsid.pid -ExecStart=/usr/sbin/iscsid -ExecStartPost=-/sbin/iscsiadm -m node --loginall=automatic -ExecStop=-/sbin/iscsiadm -m node --logoutall=all -ExecStop=/sbin/iscsiadm -k 0 2 - -[Install] -WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.socket b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.socket deleted file mode 100644 index 832451d7a0..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsid.socket +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Open-iSCSI iscsid Socket -Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) - -[Socket] -ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE - -[Install] -WantedBy=sockets.target diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch deleted file mode 100644 index db5d6d14ec..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch +++ /dev/null @@ -1,161 +0,0 @@ -diff --git a/Makefile b/Makefile -index c5d9700..4dbff18 100644 ---- a/Makefile -+++ b/Makefile -@@ -14,8 +14,8 @@ mandir = $(prefix)/share/man - etcdir = /etc - initddir = $(etcdir)/init.d - --MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 --PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname -+MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 doc/iscsistart.8 doc/iscsi-iname.8 -+PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname usr/iscsistart - INSTALL = install - ETCFILES = etc/iscsid.conf - IFACEFILES = etc/iface.example -@@ -84,11 +84,11 @@ install_programs: $(PROGRAMS) - # ugh, auto-detection is evil - # Gentoo maintains their own init.d stuff - install_initd: -- if [ -f /etc/debian_version ]; then \ -+ if [ -f $(DESTDIR)$(etcdir)/debian_version ]; then \ - $(MAKE) install_initd_debian ; \ -- elif [ -f /etc/redhat-release ]; then \ -+ elif [ -f $(DESTDIR)$(etcdir)/redhat-release ]; then \ - $(MAKE) install_initd_redhat ; \ -- elif [ -f /etc/SuSE-release ]; then \ -+ elif [ -f $(DESTDIR)$(etcdir)/SuSE-release ]; then \ - $(MAKE) install_initd_suse ; \ - fi - -@@ -115,7 +115,7 @@ install_iface: $(IFACEFILES) - $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces - - install_etc: $(ETCFILES) -- if [ ! -f /etc/iscsi/iscsid.conf ]; then \ -+ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/iscsid.conf ]; then \ - $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \ - $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \ - fi -@@ -128,11 +128,11 @@ install_kernel: - $(MAKE) -C kernel install_kernel - - install_iname: -- if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then \ -- echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \ -+ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ]; then \ -+ echo "InitiatorName=`$(DESTDIR)$(sbindir)/iscsi-iname`" > $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ; \ - echo "***************************************************" ; \ -- echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \ -- echo "To override edit /etc/iscsi/initiatorname.iscsi" ; \ -+ echo "Setting InitiatorName to `cat $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi`" ; \ -+ echo "To override edit $(etcdir)/iscsi/initiatorname.iscsi" ; \ - echo "***************************************************" ; \ - fi - -diff --git a/usr/Makefile b/usr/Makefile -index 673b7f1..83507f3 100644 ---- a/usr/Makefile -+++ b/usr/Makefile -@@ -54,18 +54,18 @@ all: $(PROGRAMS) - - iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \ - iscsid.o session_mgmt.o discoveryd.o -- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns - - iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o -- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns - - iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ - iscsistart.o statics.o -- $(CC) $(CFLAGS) -static $^ -o $@ -+ $(CC) $(CFLAGS) -static $(LDFLAGS) $^ -o $@ - clean: -- rm -f *.o $(PROGRAMS) .depend $(LIBSYS) -+ $(RM) *.o $(PROGRAMS) .depend $(LIBSYS) - - depend: -- gcc $(CFLAGS) -M `ls *.c` > .depend -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend - - -include .depend -diff --git a/utils/Makefile b/utils/Makefile -index 2c7e891..62c49fa 100644 ---- a/utils/Makefile -+++ b/utils/Makefile -@@ -1,17 +1,18 @@ - # This Makefile will work only with GNU make. - --CFLAGS += $(OPTFLAGS) -O2 -fno-inline -Wall -Wstrict-prototypes -g -+OPTFLAGS ?= -O2 -g -+CFLAGS += $(OPTFLAGS) -fno-inline -Wall -Wstrict-prototypes - PROGRAMS = iscsi-iname - - all: $(PROGRAMS) - - iscsi-iname: md5.o iscsi-iname.o -- $(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@ -+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@ - - clean: -- rm -f *.o $(PROGRAMS) .depend -+ $(RM) *.o $(PROGRAMS) .depend - - depend: -- gcc $(CFLAGS) -M `ls *.c` > .depend -+ $(GCC) $(CFLAGS) -M `ls *.c` > .depend - - -include .depend -diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile -index c72bb7f..a36c2d2 100644 ---- a/utils/fwparam_ibft/Makefile -+++ b/utils/fwparam_ibft/Makefile -@@ -26,18 +26,18 @@ OBJS := fw_entry.o fwparam_sysfs.o $(SYSDEPS_OBJS) ../../usr/iscsi_net_util.o - OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o - CLEANFILES = $(OBJS) *.output *~ - --OPTFLAGS ?= -O2 -g -fPIC -+OPTFLAGS ?= -O2 -g - WARNFLAGS ?= -Wall -Wstrict-prototypes --CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../../include -I../../usr -D_GNU_SOURCE -+CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -fPIC -I../../include -I../../usr -D_GNU_SOURCE - - all: $(OBJS) - - clean: -- rm -f *.o $(CLEANFILES) .depend -+ $(RM) *.o $(CLEANFILES) .depend - - $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h - - depend: -- gcc $(CFLAGS) -M `ls *.c` > .depend -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend - - -include .depend -diff --git a/utils/sysdeps/Makefile b/utils/sysdeps/Makefile -index 53c10e5..19cfe19 100644 ---- a/utils/sysdeps/Makefile -+++ b/utils/sysdeps/Makefile -@@ -1,15 +1,16 @@ - # This Makefile will work only with GNU make. - --CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -O2 -fno-inline -Wall -Wstrict-prototypes -g -+OPTFLAGS ?= -O2 -g -+CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -fno-inline -Wall -Wstrict-prototypes - - SYSDEPS_OBJS=sysdeps.o - - all: $(SYSDEPS_OBJS) - - clean: -- rm -f *.o .depend -+ $(RM) *.o .depend - - depend: -- gcc $(CFLAGS) -M `ls *.c` > .depend -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend - - -include .depend diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-remove-kernel-version-check.patch b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-remove-kernel-version-check.patch deleted file mode 100644 index 1c7f1c0445..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.0.873-remove-kernel-version-check.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d5629f76e1775550692be0d94c8e7f82a96f657d Mon Sep 17 00:00:00 2001 -From: Nick Owens -Date: Thu, 17 Sep 2015 15:27:14 -0700 -Subject: [PATCH] remove kernel version check - ---- - usr/Makefile | 18 +----------------- - 1 file changed, 1 insertion(+), 17 deletions(-) - -diff --git a/usr/Makefile b/usr/Makefile -index 5ac0726..9c436df 100644 ---- a/usr/Makefile -+++ b/usr/Makefile -@@ -2,24 +2,8 @@ - - OSNAME=$(shell uname -s) - --# allow users to override these --# eg to compile for a kernel that you aren't currently running --KERNELRELEASE ?= $(shell uname -r) --KSRC ?= /lib/modules/$(KERNELRELEASE)/build -- --KSUBLEVEL=$(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ -- sed 's/^[ \t]*//;s/[ \t]*$$//') -- - ifeq ($(OSNAME),Linux) -- ifeq ($(KSUBLEVEL),11) -- IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE -- else -- ifeq ($(KSUBLEVEL),12) -- IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE -- else -- IPC_CFLAGS=-DNETLINK_ISCSI=8 -D_GNU_SOURCE -- endif -- endif -+IPC_CFLAGS=-DNETLINK_ISCSI=8 -D_GNU_SOURCE - IPC_OBJ=netlink.o - else - ifeq ($(OSNAME),FreeBSD) --- -2.4.6 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch index 02e651e27c..014e0731dd 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch @@ -2,18 +2,18 @@ +++ b/libopeniscsiusr/Makefile @@ -44,7 +44,7 @@ EXTRA_MAN_FILES = libopeniscsiusr.h.3 OBJS = context.o misc.o session.o sysfs.o iface.o idbm.o node.o default.o - + CFLAGS ?= -O2 -g -CFLAGS += -Wall -Werror -Wextra -fvisibility=hidden -fPIC +CFLAGS += -Wall -Wextra -fvisibility=hidden -fPIC CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod) - + LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod) --- a/usr/Makefile +++ b/usr/Makefile @@ -35,7 +35,7 @@ endif PKG_CONFIG = /usr/bin/pkg-config - + CFLAGS ?= -O2 -g -WARNFLAGS ?= -Wall -Wextra -Werror -Wstrict-prototypes -fno-common +WARNFLAGS ?= -Wall -Wextra -Wstrict-prototypes -fno-common @@ -26,53 +26,53 @@ clean: - rm -f *.o $(PROGRAMS) .depend $(LIBSYS) + $(RM) *.o $(PROGRAMS) .depend $(LIBSYS) - + depend: - gcc $(CFLAGS) -M `ls *.c` > .depend + $(CC) $(CFLAGS) -M `ls *.c` > .depend - + -include .depend --- a/utils/Makefile +++ b/utils/Makefile @@ -10,9 +10,9 @@ iscsi-iname: md5.o iscsi-iname.o $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@ - + clean: - rm -f *.o $(PROGRAMS) .depend + $(RM) *.o $(PROGRAMS) .depend - + depend: - gcc $(CFLAGS) -M `ls *.c` > .depend + $(CC) $(CFLAGS) -M `ls *.c` > .depend - + -include .depend --- a/utils/fwparam_ibft/Makefile +++ b/utils/fwparam_ibft/Makefile @@ -41,11 +41,11 @@ LDFLAGS += -L$(TOPDIR)/libopeniscsiusr -liscsiusr all: $(OBJS) - + clean: - rm -f *.o $(CLEANFILES) .depend + $(RM) *.o $(CLEANFILES) .depend - + $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h - + depend: - gcc $(CFLAGS) -M `ls *.c` > .depend + $(CC) $(CFLAGS) -M `ls *.c` > .depend - + -include .depend --- a/utils/sysdeps/Makefile +++ b/utils/sysdeps/Makefile @@ -8,9 +8,9 @@ SYSDEPS_OBJS=sysdeps.o all: $(SYSDEPS_OBJS) - + clean: - rm -f *.o .depend + $(RM) *.o .depend - + depend: - gcc $(CFLAGS) -M `ls *.c` > .depend + $(CC) $(CFLAGS) -M `ls *.c` > .depend - + -include .depend diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf deleted file mode 100644 index de0024a00b..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf +++ /dev/null @@ -1,2 +0,0 @@ -d /var/db/iscsi 0700 root root - - -C /etc/iscsi - - - - /usr/share/iscsi diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/metadata.xml index 96a2d58636..b84660b0b8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/metadata.xml @@ -1,5 +1,15 @@ - + -base-system + + base-system@gentoo.org + Gentoo Base System + + + Support iSCSI over TCP + Support iSCSI over RDMA + + + open-iscsi/open-iscsi + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild deleted file mode 100644 index 4cf50a3223..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit versionator linux-info eutils flag-o-matic toolchain-funcs systemd - -MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)" - -DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" -HOMEPAGE="http://www.open-iscsi.org/" -SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86" -IUSE="debug slp" - -DEPEND="slp? ( net-libs/openslp )" -RDEPEND="${DEPEND} - virtual/udev - sys-fs/lsscsi - sys-apps/util-linux" - -S="${WORKDIR}/${MY_PV}" - -pkg_setup() { - linux-info_pkg_setup - - if kernel_is -lt 2 6 16; then - ewarn "Sorry, your kernel must be 2.6.16-rc5 or newer!" - fi - - # Needs to be done, as iscsid currently only starts, when having the iSCSI - # support loaded as module. Kernel builtion options don't work. See this for - # more information: - # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 - # If there's a new release, check whether this is still valid! - CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" - if linux_config_exists; then - for module in ${CONFIG_CHECK_MODULES}; do - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" - done - fi -} - -src_prepare() { - epatch "${FILESDIR}"/${P}-Makefiles.patch - epatch "${FILESDIR}"/${P}-remove-kernel-version-check.patch - - sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die - sed -i -e 's:^node.startup = manual:node.startup = automatic:' etc/iscsid.conf || die -} - -src_configure() { - cd utils/open-isns || die - - # SSL (--with-security) is broken - econf $(use_with slp) \ - --without-security -} - -src_compile() { - use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI - - CFLAGS="" \ - emake \ - OPTFLAGS="${CFLAGS}" \ - AR="$(tc-getAR)" CC="$(tc-getCC)" \ - user -} - -src_install() { - emake DESTDIR="${D}" sbindir="usr/sbin/" install - - dodoc README THANKS - - docinto test/ - dodoc test/* - - systemd_dounit "${FILESDIR}"/iscsid.service - systemd_dounit "${FILESDIR}"/iscsid.socket - systemd_dounit "${FILESDIR}"/iscsid-initiatorname.service - systemd_dotmpfilesd "${FILESDIR}"/open-iscsi.conf - - fperms 600 /etc/iscsi/iscsid.conf - rm "${D}"/etc/iscsi/initiatorname.iscsi - mv "${D}"/etc/iscsi "${D}"/usr/share/iscsi -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild similarity index 98% rename from sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.2.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild index 5cd13279e9..d7ff6b5250 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0/0.2" -KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" IUSE="debug infiniband libressl +tcp rdma systemd" DEPEND=" From 1cbe7c1fd2fa796481827173d2ae4f928177f830 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Mon, 18 Jan 2021 19:09:28 +0530 Subject: [PATCH 2/2] sys-block/open-iscsi: Apply Flatcar patches Signed-off-by: Sayan Chowdhury --- .../open-iscsi/files/iscsi-init.service | 9 +++ .../open-iscsi/files/open-iscsi.conf | 2 + .../open-iscsi/open-iscsi-2.1.3.ebuild | 63 +++++-------------- 3 files changed, 28 insertions(+), 46 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsi-init.service create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsi-init.service b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsi-init.service new file mode 100644 index 0000000000..c78005c549 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsi-init.service @@ -0,0 +1,9 @@ +[Unit] +Description=One time configuration for iscsi.service +After=systemd-tmpfiles-setup.service +ConditionPathExists=!/etc/iscsi/initiatorname.iscsi + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/sh -c 'echo "InitiatorName=`/usr/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi' diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf new file mode 100644 index 0000000000..de0024a00b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf @@ -0,0 +1,2 @@ +d /var/db/iscsi 0700 root root - - +C /etc/iscsi - - - - /usr/share/iscsi diff --git a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild index d7ff6b5250..997c97fca9 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0/0.2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" IUSE="debug infiniband libressl +tcp rdma systemd" DEPEND=" @@ -37,8 +37,9 @@ PATCHES=( pkg_setup() { linux-info_pkg_setup + # Flatcar: use ewarn instead of die if kernel_is -lt 2 6 16; then - die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + ewarn "Sorry, your kernel must be 2.6.16-rc5 or newer!" fi # Needs to be done, as iscsid currently only starts, when having the iSCSI @@ -46,34 +47,19 @@ pkg_setup() { # more information: # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 # If there's a new release, check whether this is still valid! - TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" - RDMA_MODULES="INFINIBAND_ISER" - INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS" - CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )" + CONFIG_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" if linux_config_exists; then - if use tcp; then - for module in ${TCP_MODULES}; do - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" done - fi - if use infiniband; then - for module in ${INFINIBAND_MODULES}; do - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" - done - fi - if use rdma; then - for module in ${RDMA_MODULES}; do - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$ - done - fi fi } src_prepare() { sed -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' \ -i etc/iscsid.conf || die - sed -e 's@\(/sbin/\)@/usr\1@' \ - -i etc/systemd/iscsi* || die + sed -e 's:^node.startup = manual:node.startup = automatic:' \ + -i etc/iscsid.conf || die default pushd iscsiuio >/dev/null || die @@ -87,9 +73,9 @@ src_configure() { } src_compile() { - # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build - # is messed up already here, so it's not making it that much worse. - KSRC="${KV_DIR}" CFLAGS="" \ + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + CFLAGS="" \ emake \ OPTFLAGS="${CFLAGS} ${CPPFLAGS} $(usex systemd '' -DNO_SYSTEMD)" \ AR="$(tc-getAR)" CC="$(tc-getCC)" \ @@ -98,21 +84,15 @@ src_compile() { } src_install() { - emake DESTDIR="${ED}" sbindir="/usr/sbin" install + emake DESTDIR="${D}" sbindir="/usr/sbin" install # Upstream make is not deterministic, per bug #601514 - rm -f "${ED}"/etc/initiatorname.iscsi + rm -f "${D}"/etc/initiatorname.iscsi dodoc README THANKS docinto test/ dodoc $(find test -maxdepth 1 -type f ! -name ".*") - insinto /etc/iscsi - newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example - - newconfd "${FILESDIR}"/iscsid-conf.d iscsid - newinitd "${FILESDIR}"/iscsid-init.d iscsid - local unit local units=( iscsi.service @@ -122,19 +102,10 @@ src_install() { for unit in ${units[@]} ; do systemd_dounit etc/systemd/${unit} done + systemd_dounit "${FILESDIR}"/iscsi-init.service + systemd_dotmpfilesd "${FILESDIR}"/open-iscsi.conf - keepdir /var/db/iscsi - fperms 700 /var/db/iscsi fperms 600 /etc/iscsi/iscsid.conf -} - -pkg_postinst() { - in='/etc/iscsi/initiatorname.iscsi' - if [[ ! -f "${EROOT}${in}" ]] && [[ -f "${EROOT}${in}.example" ]] ; then - { - cat "${EROOT}${in}.example" - echo "# InitiatorName generated by ${CATEGORY}/${PF} at $(date -uR)" - echo "InitiatorName=$(${ROOT}/usr/sbin/iscsi-iname)" - } >> "${EROOT}${in}.tmp" && mv -f "${EROOT}${in}.tmp" "${EROOT}${in}" - fi + rm "${D}"/etc/iscsi/initiatorname.iscsi + mv "${D}"/etc/iscsi "${D}"/usr/share/iscsi }