Hi All, I have a patch: 0001-iscsid-in-udeb-not-dependent-on-libsystemd-Closes-10.patch (attached)
Unfortunately I cannot create merge requests direct, or via email on the project. On Tue, 11 Jan 2022 at 20:03, Eugene Losowski-Gallagher < [email protected]> wrote: > Hi Ritesh, > > Thank you for the clarification on using "iscsistart". > > I have followed this up through the installer. > > To explain the use-case in its entirety: > 1) Use starts a machine on a TGT enabled (iscsi-target) network > 2) User tests the network by entering the host name of the tgt > # This is the step that fails! - uses "iscsiadm" which is dependent on > "iscsid" > 3) User selects the drives they want to use, and then proceed with setup > (formatting etc) > -- Installer continues as normal --- > > > Explanation of 2) > To perform the discovery and testing of the tgt the installer uses: > "iscsiadm" > This works via communicating with "iscsid" > And that takes us back to the libsystemd.so.0 dependency. > So we need to get "iscsid" running without the "libsystemd" dependency. > > > Explanation of 3) > "iscsistart" > 1) This is an application to start the initiator > - As far as I am aware this works fine, just requires a lot of parameters > to begin > > > So thinking about this (and looking at the repositories for the original > and debian versions): > 1) The upstream repository (https://github.com/open-iscsi/open-iscsi) has > a "NO_SYSTEMD" build > 2) The project gets built with autoconf (and this might the the cause of > my woes) - as systemd is detected at build time. > This is confirmed in the "debian/control" file - where it is a build > dependency. > > > To move forward on this: > Q1) Is it at all possible to make a "NO_SYSTEMD" build for the > "open-iscsi-udeb" package > - this is a define present in: > https://github.com/open-iscsi/open-iscsi > This will require some change(s) in the build setup for the udeb > (crucially not change the normal package!) > > Please can you let me know if that (i.e 2x builds) is acceptable? > > > That should in theory resolve the issue properly: > 1) *-udeb is not installed on the system > 2) systemd is (still) not used in the installer environment > 3) iscsid will start as it is not linked to systemd > 4) This allows iscsiadm to discover the iSCSI drives > 5) Installer for partman-iscsi works properly > > > I hope this allows (at least in theory) a way forward. > - At least explaining why it doesn't work as expected. > > The practicalities might be more difficult - but with your approval of the > overall strategy I can work on it. > > Many thanks > > Eugene > -- *Eugene Losowski-Gallagher* *Mob: *07825160923
From 5c31bbac1c04855eedd27c5b113ef83bc8ac4caa Mon Sep 17 00:00:00 2001 From: Eugene Losowski-Gallagher <[email protected]> Date: Mon, 16 May 2022 21:32:55 +0100 Subject: [PATCH] iscsid in udeb not dependent on libsystemd (Closes: #1003366) --- debian/rules | 29 ++++++++++++++++++++++------- usr/Makefile | 3 +++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index 2451953..22ccf63 100755 --- a/debian/rules +++ b/debian/rules @@ -20,9 +20,24 @@ override_dh_auto_configure: override_dh_auto_build: @# Let debhelper pass configure flags. + # Build standard open-iscsi dh_auto_configure --sourcedirectory=iscsiuio - CFLAGS="$(CPPFLAGS) $(CFLAGS)" dh_auto_build + mkdir -p usr-deb + mv usr/iscsid usr-deb/iscsid + mv usr/iscsistart usr-deb/iscsistart + mv usr/iscsiadm usr-deb/iscsiadm +ifneq ($(UDEB),) + (cd usr; make clean) + # Build No libsystemd version first for udeb integration + export NO_SYSTEMD=1; CFLAGS="$(CPPFLAGS) $(CFLAGS)" dh_auto_build + @# Move binaries to udeb directory + mkdir -p usr-udeb + mv usr/iscsid usr-udeb/iscsid + mv usr/iscsistart usr-udeb/iscsistart + mv usr/iscsiadm usr-udeb/iscsiadm +endif + override_dh_auto_install: @@ -33,9 +48,9 @@ override_dh_auto_install: dh_install -p libopeniscsiusr-dev libopeniscsiusr/libopeniscsiusr/ usr/include/ @# open-iscsi - dh_install -p open-iscsi usr/iscsid sbin/ - dh_install -p open-iscsi usr/iscsistart sbin/ - dh_install -p open-iscsi usr/iscsiadm sbin/ + dh_install -p open-iscsi usr-deb/iscsid sbin/ + dh_install -p open-iscsi usr-deb/iscsistart sbin/ + dh_install -p open-iscsi usr-deb/iscsiadm sbin/ dh_install -p open-iscsi utils/iscsi_discovery sbin/ dh_install -p open-iscsi utils/iscsi-iname sbin/ dh_install -p open-iscsi etc/iscsid.conf etc/iscsi/ @@ -63,9 +78,9 @@ override_dh_auto_install: ifneq ($(UDEB),) @# open-iscsi-udeb - dh_install -p open-iscsi-udeb usr/iscsid sbin/ - dh_install -p open-iscsi-udeb usr/iscsistart sbin/ - dh_install -p open-iscsi-udeb usr/iscsiadm sbin/ + dh_install -p open-iscsi-udeb usr-udeb/iscsid sbin/ + dh_install -p open-iscsi-udeb usr-udeb/iscsistart sbin/ + dh_install -p open-iscsi-udeb usr-udeb/iscsiadm sbin/ dh_install -p open-iscsi-udeb utils/iscsi_discovery sbin/ dh_install -p open-iscsi-udeb utils/iscsi-iname sbin/ dh_install -p open-iscsi-udeb etc/iscsid.conf etc/iscsi/ diff --git a/usr/Makefile b/usr/Makefile index 21bb154..d2676e2 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -43,7 +43,10 @@ ISCSI_LIB = -L$(TOPDIR)/libopeniscsiusr -lopeniscsiusr LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod) ifeq ($(NO_SYSTEMD),) LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd) +else +CFLAGS += -DNO_SYSTEMD endif + PROGRAMS = iscsid iscsiadm iscsistart # libc compat files -- 2.20.1

