Skip to contentSkip to conversation

Make sbindir configurable

PATCH In review Coiby Xu 3 participants 3 messages Apr 24, 2024 – May 24, 2024

Subsystems (3)
lore
Share & tools
lore

Coiby Xu

author
#0 lore raw

PATCH 1/1 Make sbindir configurable

Fedora is going unify bin and sbin and /usr/sbin directory will become a symlink to bin [1]. So make sbindir configurable to support this case.

[1] https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

---
 Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Makefile +4 -2
index 55c9c7a..0cd2b03 100644
@@ -101,6 +101,8 @@ LINK_TEST_PROG="int main() { return 0; }"
 LIBS := $(LIBS) $(call try-run,\
 	echo $(LINK_TEST_PROG) | $(CC) -o "$$TMP" -x c - -lebl,-lebl,)
 
+sbindir ?= /usr/sbin
+
 all: makedumpfile
 
 $(OBJ_PART): $(SRC_PART)
@@ -126,8 +128,8 @@ clean:
 	rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5
 
 install:
-	install -m 755 -d ${DESTDIR}/usr/sbin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8
-	install -m 755 -t ${DESTDIR}/usr/sbin makedumpfile $(VPATH)makedumpfile-R.pl
+	install -m 755 -d ${DESTDIR}/${sbindir} ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8
+	install -m 755 -t ${DESTDIR}/${sbindir} makedumpfile $(VPATH)makedumpfile-R.pl
 	install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8
 	install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5
 	mkdir -p ${DESTDIR}/usr/share/makedumpfile/eppic_scripts
Signature · 7 lines
2.44.0


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw
Quoted 6 lines · Coiby Xu

Fedora is going unify bin and sbin and /usr/sbin directory will become a symlink to bin [1]. So make sbindir configurable to support this case.

[1] https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

Thank you for the patch, but sorry, we will be back on May 7 and then start to work on patches etc., so please wait for a while.

Thanks,
Kazu

Quoted 18 lines
---
  Makefile | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
Makefile +2 -0
index 55c9c7a..0cd2b03 100644
@@ -101,6 +101,8 @@ LINK_TEST_PROG="int main() { return 0; }"
  LIBS := $(LIBS) $(call try-run,\
  	echo $(LINK_TEST_PROG) | $(CC) -o "$$TMP" -x c - -lebl,-lebl,)
 
+sbindir ?= /usr/sbin
+
  all: makedumpfile
 
  $(OBJ_PART): $(SRC_PART)

Makefile clean: · line 135

Quoted 10 lines
Makefile +2 -2
@@ -126,8 +128,8 @@ clean:
  	rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5
 
  install:
-	install -m 755 -d ${DESTDIR}/usr/sbin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8
-	install -m 755 -t ${DESTDIR}/usr/sbin makedumpfile $(VPATH)makedumpfile-R.pl
+	install -m 755 -d ${DESTDIR}/${sbindir} ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8
+	install -m 755 -t ${DESTDIR}/${sbindir} makedumpfile $(VPATH)makedumpfile-R.pl
  	install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8
  	install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5
  	mkdir -p ${DESTDIR}/usr/share/makedumpfile/eppic_scripts

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
In reply to Coiby Xu
Quoted 24 lines · Coiby Xu

Fedora is going unify bin and sbin and /usr/sbin directory will become a symlink to bin [1]. So make sbindir configurable to support this case.

[1] https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

---
  Makefile | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
Makefile +2 -0
index 55c9c7a..0cd2b03 100644
@@ -101,6 +101,8 @@ LINK_TEST_PROG="int main() { return 0; }"
  LIBS := $(LIBS) $(call try-run,\
  	echo $(LINK_TEST_PROG) | $(CC) -o "$$TMP" -x c - -lebl,-lebl,)
 
+sbindir ?= /usr/sbin
+
  all: makedumpfile
 
  $(OBJ_PART): $(SRC_PART)

Makefile clean: · line 135

Quoted 10 lines
Makefile +2 -2
@@ -126,8 +128,8 @@ clean:
  	rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5
 
  install:
-	install -m 755 -d ${DESTDIR}/usr/sbin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8
-	install -m 755 -t ${DESTDIR}/usr/sbin makedumpfile $(VPATH)makedumpfile-R.pl
+	install -m 755 -d ${DESTDIR}/${sbindir} ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8
+	install -m 755 -t ${DESTDIR}/${sbindir} makedumpfile $(VPATH)makedumpfile-R.pl
  	install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8
  	install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5
  	mkdir -p ${DESTDIR}/usr/share/makedumpfile/eppic_scripts

Thank you, Coiby, for the patch. Sorry for the late apply the patch.

The sbindir variable should be all capital letter, such as SBINDIR. So, the patch is fixed as below.

https://github.com/makedumpfile/makedumpfile/commit/354fbdd01ccb15e405093f9a631ab8b2bd084830

Thanks,
Masa
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec