open-iscsi does not honor exec_prefix at build time
APKBUILD
of open-iscsi has as exec_prefix=/usr
.
The Makefile has exec_prefix = /
At build time, exec_prefix=/usr
is not honored, this ends up in having binary files in /sbin
rather than /usr/sbin
.
So far, commit:28e8f052 has modified the path to /sbin
to make it work, but this actually was incomplete, since the init has also iscsi-iname
in the wrong, not existing, path.
In order to fix it, we can:
-
remove
exec_prefix
in Makefile and adjust the initd to have the all binaries called pointing to/sbin
-
patch the Makefile in order to correct exec_prefix, still fix the initd which basically reverts commit:28e8f052
I will leave the choice to @larena since he's the maintainer.
If we go to option .2 (which I prefer) this is a possible patch (which I've tested and it's working):
diff --git a/Makefile b/Makefile
index 7f52cc8..32a86d3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
DESTDIR ?=
prefix = /usr
-exec_prefix = /
+exec_prefix = $(prefix)
sbindir = $(exec_prefix)/sbin
bindir = $(exec_prefix)/bin
mandir = $(prefix)/share/man
.: Francesco Colista