open-iscsi: remove package

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl
2025-09-18 18:57:45 +02:00
parent 1b4646456f
commit d635e5c156
12 changed files with 0 additions and 513 deletions

View File

@@ -1,87 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2012 Yann Cézard (eesprit@free.fr)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="open-iscsi"
PKG_VERSION="bf399411ed8a2f4047f928653ac8dd02ffd0f662"
PKG_SHA256="92b9f0a27a9a373b14eab7b12f1bfff5d4857695a688dc4434df8e7623354588"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/mikechristie/open-iscsi"
PKG_URL="https://github.com/mikechristie/open-iscsi/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_INIT="toolchain util-linux"
PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_TARGET="toolchain open-iscsi:host"
PKG_LONGDESC="The open-iscsi package allows you to mount iSCSI targets."
PKG_TOOLCHAIN="configure"
PKG_BUILD_FLAGS="-sysroot"
PKG_MAKE_OPTS_INIT="user"
PKG_MAKE_OPTS_TARGET="user"
pre_configure_init() {
export OPTFLAGS="${CFLAGS} ${LDFLAGS}"
}
configure_init() {
cd utils/open-isns
./configure --host=${TARGET_NAME} \
--build=${HOST_NAME} \
--with-security=no
cd ../..
}
makeinstall_init() {
mkdir -p ${INSTALL}/usr/sbin
cp -P ${PKG_BUILD}/usr/iscsistart ${INSTALL}/usr/sbin
}
pre_configure_host() {
export OPTFLAGS="${CFLAGS} ${LDFLAGS}"
}
configure_host() {
:
}
make_host() {
cd ${PKG_BUILD}/utils
make iscsi-iname
}
makeinstall_host() {
mkdir -p ${TOOLCHAIN}/bin
cp -P ${PKG_BUILD}/utils/iscsi-iname ${TOOLCHAIN}/bin
}
pre_configure_target() {
export OPTFLAGS="${CFLAGS} ${LDFLAGS}"
}
configure_target() {
cd utils/open-isns
./configure --host=${TARGET_NAME} \
--build=${HOST_NAME} \
--with-security=no
cd ${PKG_BUILD}
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/sbin
cp -P ${PKG_BUILD}/usr/iscsid ${INSTALL}/usr/sbin
cp -P ${PKG_BUILD}/usr/iscsiadm ${INSTALL}/usr/sbin
cp -P ${PKG_BUILD}/usr/iscsistart ${INSTALL}/usr/sbin
cp -P ${PKG_BUILD}/utils/iscsi-iname ${INSTALL}/usr/sbin
mkdir -p ${INSTALL}/etc/iscsi
cp -P ${PKG_BUILD}/etc/iscsid.conf ${INSTALL}/etc/iscsi
sed -i -e "s:= /sbin/iscsid:= /usr/sbin/iscsid:" ${INSTALL}/etc/iscsi/iscsid.conf
echo "InitiatorName=$(${TOOLCHAIN}/bin/iscsi-iname)" >${INSTALL}/etc/iscsi/initiatorname.iscsi
}
post_install() {
enable_service iscsi-initiator.service
}

View File

@@ -1,11 +0,0 @@
--- a/usr/Makefile 2011-08-05 11:54:52.000000000 +0200
+++ b/usr/Makefile 2011-08-05 11:55:06.000000000 +0200
@@ -63,7 +63,7 @@
iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
iscsistart.o statics.o
- $(CC) $(CFLAGS) -static $^ -o $@
+ $(CC) $(CFLAGS) $^ -o $@
clean:
rm -f *.o $(PROGRAMS) .depend $(LIBSYS)

View File

@@ -1,64 +0,0 @@
diff --git a/usr/Makefile b/usr/Makefile
index fd14a10..41b7140 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -66,6 +66,6 @@ clean:
rm -f *.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..440e24e 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -12,6 +12,6 @@ clean:
rm -f *.o $(PROGRAMS) .depend
depend:
- gcc $(CFLAGS) -M `ls *.c` > .depend
+ $(CC) $(CFLAGS) -M `ls *.c` > .depend
-include .depend
diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
index c72bb7f..3d2c2a5 100644
--- a/utils/fwparam_ibft/Makefile
+++ b/utils/fwparam_ibft/Makefile
@@ -38,6 +38,6 @@ clean:
$(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/open-isns/Makefile.in b/utils/open-isns/Makefile.in
index a27199c..a76649f 100644
--- a/utils/open-isns/Makefile.in
+++ b/utils/open-isns/Makefile.in
@@ -73,9 +73,9 @@ distclean::
rm -rf autom4te.cache
$(LIB): $(LIBOBJS)
- ar cr $@ $(LIBOBJS)
+ $(AR) cr $@ $(LIBOBJS)
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..effe013 100644
--- a/utils/sysdeps/Makefile
+++ b/utils/sysdeps/Makefile
@@ -10,6 +10,6 @@ clean:
rm -f *.o .depend
depend:
- gcc $(CFLAGS) -M `ls *.c` > .depend
+ $(CC) $(CFLAGS) -M `ls *.c` > .depend
-include .depend

View File

@@ -1,26 +0,0 @@
From d5b4400d2c50190474a6000d60f05deb95f97e0b Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Thu, 8 Aug 2013 18:08:44 +0300
Subject: [PATCH] enable multicast
source: https://groups.google.com/forum/#!msg/open-iscsi/nuLFqxgsHAA/53-JE3gNNjEJ
---
usr/iscsi_net_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/iscsi_net_util.c b/usr/iscsi_net_util.c
index 6d0ebf9..3801ac7 100644
--- a/usr/iscsi_net_util.c
+++ b/usr/iscsi_net_util.c
@@ -229,7 +229,7 @@ int net_setup_netdev(char *netdev, char *local_ip, char *mask, char *gateway,
/* Bring up interface */
memset(&ifr, 0, sizeof(ifr));
strlcpy(ifr.ifr_name, netdev, IFNAMSIZ);
- ifr.ifr_flags = IFF_UP | IFF_RUNNING;
+ ifr.ifr_flags = IFF_UP | IFF_RUNNING | IFF_MULTICAST;
if (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0) {
log_error("Could not bring up netdev %s (err %d - %s)",
netdev, errno, strerror(errno));
--
1.8.1.2

View File

@@ -1,25 +0,0 @@
diff -Naur open-iscsi-bf39941/Makefile open-iscsi-bf39941.patch/Makefile
--- open-iscsi-bf39941/Makefile 2013-08-08 17:06:46.000000000 +0200
+++ open-iscsi-bf39941.patch/Makefile 2013-08-08 18:02:13.009068581 +0200
@@ -26,20 +26,18 @@
all: user
-user: utils/open-isns/Makefile iscsiuio/Makefile
+user: utils/open-isns/Makefile
$(MAKE) -C utils/open-isns
$(MAKE) -C utils/sysdeps
$(MAKE) -C utils/fwparam_ibft
$(MAKE) -C usr
$(MAKE) -C utils
- $(MAKE) -C iscsiuio
@echo
@echo "Compilation complete Output file"
@echo "----------------------------------- ----------------"
@echo "Built iSCSI daemon: usr/iscsid"
@echo "Built management application: usr/iscsiadm"
@echo "Built boot tool: usr/iscsistart"
- @echo "Built iscsiuio daemon: iscsiuio/src/unix/iscsiuio"
@echo
@echo "Read README file for detailed information."

View File

@@ -1,124 +0,0 @@
From a8ce860b4462fbb22634c34a5d30cd0d482acb22 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Tue, 28 Jan 2020 16:36:56 -0800
Subject: [PATCH] Updates to support gcc -fno-common option.
This meant cleaning up the definition of some
global variables, so that they were only defined
in one place and refered to as external elsewhere.
---
include/iscsi_err.h | 6 ++++--
iscsiuio/configure | 2 +-
iscsiuio/configure.ac | 2 +-
iscsiuio/src/uip/uip.h | 4 ++--
usr/iscsi_err.c | 2 ++
usr/log.c | 1 +
usr/log.h | 2 +-
7 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/include/iscsi_err.h b/include/iscsi_err.h
index 125f443a2f25..a08f0fbfcea6 100644
--- a/include/iscsi_err.h
+++ b/include/iscsi_err.h
@@ -4,7 +4,7 @@
#ifndef _ISCSI_ERR_
#define _ISCSI_ERR_
-enum {
+enum iscsi_error_list {
ISCSI_SUCCESS = 0,
/* Generic error */
ISCSI_ERR = 1,
@@ -69,7 +69,9 @@ enum {
/* Always last. Indicates end of error code space */
ISCSI_MAX_ERR_VAL,
-} iscsi_err;
+};
+
+extern enum iscsi_error_list iscsi_err;
extern void iscsi_err_print_msg(int err);
extern char *iscsi_err_to_str(int err);
diff --git a/iscsiuio/configure b/iscsiuio/configure
index 2740598f5f87..e799c377b4ab 100755
--- a/iscsiuio/configure
+++ b/iscsiuio/configure
@@ -22729,7 +22729,7 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
done
done
;;
- default ) echo 'char *build_date = "'`date`'";' > src/unix/build_date.c && echo 'char *build_date;'> src/unix/build_date.h ;;
+ default ) echo 'char *build_date = "'`date`'";' > src/unix/build_date.c && echo 'extern char *build_date;'> src/unix/build_date.h ;;
esac
done
_ACEOF
diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac
index e9a5e32399ea..f51687bf56b5 100644
--- a/iscsiuio/configure.ac
+++ b/iscsiuio/configure.ac
@@ -62,7 +62,7 @@ AC_ARG_ENABLE(debug,
fi])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
-AC_CONFIG_COMMANDS([default],[[ echo 'char *build_date = "'`date`'";' > src/unix/build_date.c && echo 'char *build_date;'> src/unix/build_date.h]],[[]])
+AC_CONFIG_COMMANDS([default],[[ echo 'char *build_date = "'`date`'";' > src/unix/build_date.c && echo 'extern char *build_date;'> src/unix/build_date.h]],[[]])
AC_PREFIX_DEFAULT()
diff --git a/iscsiuio/src/uip/uip.h b/iscsiuio/src/uip/uip.h
index 0225f6a456f5..d8e2220bf357 100644
--- a/iscsiuio/src/uip/uip.h
+++ b/iscsiuio/src/uip/uip.h
@@ -70,8 +70,8 @@ struct uip_stack;
typedef u16_t uip_ip4addr_t[2];
typedef u16_t uip_ip6addr_t[8];
-const uip_ip6addr_t all_zeroes_addr6;
-const uip_ip4addr_t all_zeroes_addr4;
+extern const uip_ip6addr_t all_zeroes_addr6;
+extern const uip_ip4addr_t all_zeroes_addr4;
#define ETH_BUF(buf) ((struct uip_eth_hdr *)buf)
#define VLAN_ETH_BUF(buf) ((struct uip_vlan_eth_hdr *)buf)
diff --git a/usr/iscsi_err.c b/usr/iscsi_err.c
index 4fe1c53adce0..6b6a4124458a 100644
--- a/usr/iscsi_err.c
+++ b/usr/iscsi_err.c
@@ -21,6 +21,8 @@
#include "iscsi_err.h"
#include "log.h"
+enum iscsi_error_list iscsi_err;
+
static char *iscsi_err_msgs[] = {
/* 0 */ "",
/* 1 */ "unknown error",
diff --git a/usr/log.c b/usr/log.c
index 26c61d847793..f7c542eeb191 100644
--- a/usr/log.c
+++ b/usr/log.c
@@ -33,6 +33,7 @@
char *log_name;
int log_level = 0;
+struct logarea *la = NULL;
static int log_stop_daemon = 0;
static void (*log_func)(int prio, void *priv, const char *fmt, va_list ap);
diff --git a/usr/log.h b/usr/log.h
index 486a08ea08b2..c548791e73a1 100644
--- a/usr/log.h
+++ b/usr/log.h
@@ -64,7 +64,7 @@ struct logarea {
union semun semarg;
};
-struct logarea *la;
+extern struct logarea *la;
extern int log_init(char *program_name, int size,
void (*func)(int prio, void *priv, const char *fmt, va_list ap),
--
2.27.0

View File

@@ -1,25 +0,0 @@
From 61936357ef7d796c3f4fe95782309268be9e6a31 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Sat, 20 Jun 2020 19:37:42 +0200
Subject: [PATCH] Fix attribute
---
include/iscsi_if.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 20f2bc2961e9..6633bc528555 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -327,7 +327,7 @@ struct iscsi_iface_param_info {
uint8_t iface_type; /* IPv4 or IPv6 */
uint8_t param_type; /* iscsi_param_type */
uint8_t value[0]; /* length sized value follows */
-} __packed;
+} __attribute__((__packed__));
/*
* To keep the struct iscsi_uevent size the same for userspace code
--
2.27.0

View File

@@ -1,53 +0,0 @@
diff -Naur a/usr/idbm.c b/usr/idbm.c
--- a/usr/idbm.c 2013-07-29 12:13:36.000000000 -0700
+++ b/usr/idbm.c 2022-05-03 15:16:35.006014572 -0700
@@ -2647,9 +2647,9 @@
int idbm_init(idbm_get_config_file_fn *fn)
{
/* make sure root db dir is there */
- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
- if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
- log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
+ if (access(ISCSIVAR, F_OK) != 0) {
+ if (mkdir(ISCSIVAR, 0770) != 0) {
+ log_error("Could not make %s %d", ISCSIVAR,
errno);
return errno;
}
diff -Naur a/usr/idbm.h b/usr/idbm.h
--- a/usr/idbm.h 2013-07-29 12:13:36.000000000 -0700
+++ b/usr/idbm.h 2022-05-03 15:17:18.700644189 -0700
@@ -29,12 +29,13 @@
#include "list.h"
#include "flashnode.h"
-#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
-#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp"
-#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns"
-#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static"
-#define FW_CONFIG_DIR ISCSI_CONFIG_ROOT"fw"
-#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets"
+#define ISCSIVAR "/run/iscsi/"
+#define NODE_CONFIG_DIR ISCSIVAR"nodes"
+#define SLP_CONFIG_DIR ISCSIVAR"slp"
+#define ISNS_CONFIG_DIR ISCSIVAR"isns"
+#define STATIC_CONFIG_DIR ISCSIVAR"static"
+#define FW_CONFIG_DIR ISCSIVAR"fw"
+#define ST_CONFIG_DIR ISCSIVAR"send_targets"
#define ST_CONFIG_NAME "st_config"
#define ISNS_CONFIG_NAME "isns_config"
diff -Naur a/usr/iface.h b/usr/iface.h
--- a/usr/iface.h 2013-07-29 12:13:36.000000000 -0700
+++ b/usr/iface.h 2022-05-03 15:18:31.164688356 -0700
@@ -20,7 +20,9 @@
#ifndef ISCSI_IFACE_H
#define ISCSI_IFACE_H
-#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces"
+#include "idbm.h"
+
+#define IFACE_CONFIG_DIR ISCSIVAR"ifaces"
struct iface_rec;
struct list_head;

View File

@@ -1,63 +0,0 @@
From 0715d725fa2793b051f14509d07651a69bac81e7 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Sat, 2 Dec 2017 13:42:27 -0800
Subject: [PATCH] Rename local strings.[ch] to local_strings.[ch]
This avoids linker and human confusion with
the <usr/strings.h> include file. No functional
change.
---
usr/Makefile | 2 +-
usr/discovery.c | 2 +-
usr/{strings.c => local_strings.c} | 2 +-
usr/{strings.h => local_strings.h} | 0
4 files changed, 3 insertions(+), 3 deletions(-)
rename usr/{strings.c => local_strings.c} (99%)
rename usr/{strings.h => local_strings.h} (100%)
diff --git a/usr/Makefile b/usr/Makefile
index c1866b6a4..f0dcfe720 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -49,7 +49,7 @@
FW_BOOT_SRCS = $(wildcard ../utils/fwparam_ibft/*.o)
# core discovery files
-DISCOVERY_SRCS = $(FW_BOOT_SRCS) strings.o discovery.o
+DISCOVERY_SRCS = $(FW_BOOT_SRCS) local_strings.o discovery.o
all: $(PROGRAMS)
diff --git a/usr/discovery.c b/usr/discovery.c
index 6ee8bd915..8001af6fe 100644
--- a/usr/discovery.c
+++ b/usr/discovery.c
@@ -32,7 +32,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include "strings.h"
+#include "local_strings.h"
#include "types.h"
#include "iscsi_proto.h"
#include "initiator.h"
diff --git a/usr/strings.c b/usr/local_strings.c
similarity index 99%
rename from usr/strings.c
rename to usr/local_strings.c
index da5df288f..d0feb6d27 100644
--- a/usr/strings.c
+++ b/usr/local_strings.c
@@ -23,7 +23,7 @@
#include <errno.h>
#include <sys/param.h>
-#include "strings.h"
+#include "local_strings.h"
#include "log.h"
int str_init_buffer(struct str_buffer *s, size_t initial_allocation)
diff --git a/usr/strings.h b/usr/local_strings.h
similarity index 100%
rename from usr/strings.h
rename to usr/local_strings.h

View File

@@ -1,21 +0,0 @@
From 621ad28e4a278445e674986c9ddbf589dffaf228 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Sat, 2 Dec 2017 14:03:14 -0800
Subject: [PATCH] Fix undefined call to writev(): include <sys/uio.h>
---
usr/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/usr/io.c b/usr/io.c
index 48b233cf6..e4d00ae2c 100644
--- a/usr/io.c
+++ b/usr/io.c
@@ -28,6 +28,7 @@
#include <sys/ioctl.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
+#include <sys/uio.h>
#include "types.h"
#include "iscsi_proto.h"

View File

@@ -1,9 +0,0 @@
[Unit]
Description=Open-iSCSI initiator (i.e. client) service
After=syslog.target
[Service]
ExecStart=/usr/sbin/iscsid -f
[Install]
WantedBy=multi-user.target

View File

@@ -1,5 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022 Team LibreELEC (https://libreelec.tv)
d /run/lock/iscsi 0700 root root -
f /run/lock/iscsi/lock 0600 root root -