From 2a571acddd0badaf9636649d98fd095757878348 Mon Sep 17 00:00:00 2001 From: TIAN Yuanhao Date: Sun, 9 Oct 2022 04:14:23 -0700 Subject: [PATCH] package/open-iscsi: new package Signed-off-by: TIAN Yuanhao Cc: Thomas Petazzoni Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/open-iscsi/Config.in | 18 ++++++++++++++++++ package/open-iscsi/open-iscsi.hash | 3 +++ package/open-iscsi/open-iscsi.mk | 29 +++++++++++++++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 package/open-iscsi/Config.in create mode 100644 package/open-iscsi/open-iscsi.hash create mode 100644 package/open-iscsi/open-iscsi.mk diff --git a/DEVELOPERS b/DEVELOPERS index 0bb4db81bb..0e116e92a3 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2791,6 +2791,7 @@ F: package/most/ N: TIAN Yuanhao F: package/cli11/ F: package/libsolv/ +F: package/open-iscsi/ F: package/open-isns/ F: package/reproc/ F: package/termcolor/ diff --git a/package/Config.in b/package/Config.in index 2adfcdbb1d..511e691ed3 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2408,6 +2408,7 @@ endif source "package/odhcp6c/Config.in" source "package/odhcploc/Config.in" source "package/olsr/Config.in" + source "package/open-iscsi/Config.in" source "package/open-lldp/Config.in" source "package/open-plc-utils/Config.in" source "package/openntpd/Config.in" diff --git a/package/open-iscsi/Config.in b/package/open-iscsi/Config.in new file mode 100644 index 0000000000..e55bbfd867 --- /dev/null +++ b/package/open-iscsi/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OPEN_ISCSI + bool "open-iscsi" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS # pthread + depends on !BR2_STATIC_LIBS # kmod + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPEN_ISNS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + help + iSCSI tools for Linux. + + https://www.open-iscsi.com + +comment "open-iscsi needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/open-iscsi/open-iscsi.hash b/package/open-iscsi/open-iscsi.hash new file mode 100644 index 0000000000..9fd651cae8 --- /dev/null +++ b/package/open-iscsi/open-iscsi.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 9565bdf6b68b223e1e0d455d9a04d7536724a3f5b5a254e9398d06b2a0c6b6d2 open-iscsi-2.1.8.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/open-iscsi/open-iscsi.mk b/package/open-iscsi/open-iscsi.mk new file mode 100644 index 0000000000..249253c64f --- /dev/null +++ b/package/open-iscsi/open-iscsi.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# open-iscsi +# +################################################################################ + +OPEN_ISCSI_VERSION = 2.1.8 +OPEN_ISCSI_SITE = $(call github,open-iscsi,open-iscsi,$(OPEN_ISCSI_VERSION)) +# The COPYING file says GPL-2.0, but there is some GPL-3.0+ code as +# well. See https://github.com/open-iscsi/open-iscsi/issues/379 +OPEN_ISCSI_LICENSE = GPL-2.0+, GPL-3.0+ +OPEN_ISCSI_LICENSE_FILES = COPYING +OPEN_ISCSI_DEPENDENCIES = kmod open-isns openssl util-linux + +OPEN_ISCSI_CONF_OPTS = -Ddbroot=/var/lib/iscsi + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +OPEN_ISCSI_DEPENDENCIES += systemd +OPEN_ISCSI_CONF_OPTS += -Dno_systemd=false +else +OPEN_ISCSI_CONF_OPTS += -Dno_systemd=true +endif + +define OPEN_ISCSI_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_SCSI_LOWLEVEL) + $(call KCONFIG_ENABLE_OPT,CONFIG_ISCSI_TCP) +endef + +$(eval $(meson-package))