make install reports missing directories

Erich Eckner mandos at eckner.net
Sat Oct 12 18:12:37 CEST 2024


Hi Teddy,

sorry for the delay, I've been a bit busy :-/

On Mon, 9 Sep 2024, Teddy Hogeborn wrote:

> Erich Eckner <mandos at eckner.net> writes:
>
>> On Mon, 27 Nov 2023, Teddy Hogeborn wrote:
>>
>
> I have changed the Makefile to create directories as required.  I did
> not end up using -D everywhere, though.  But the effect should be the
> same.

Thanks, this works like a charm for me now :-)

>
>> (And I needed to make /sbin configurable, because arch uses /bin for
>> all executables and symlinks /sbin to /bin.) I'll try to wrap my hack
>> into a nice patch and send it your way :-)
>
> Please do.

I attached a patch to make the "sbin" configurable.

>
> /Teddy Hogeborn
>
> -- 
> The Mandos Project
> https://www.recompile.se/mandos
>

Regards,
Erich

P.S.: Sorry for not responding to all your good suggestions on how to 
solve my connection problems, but my mandos server has some hardware 
issues, and I'm struggling to get the server running elsewhere :-/
-------------- next part --------------
--- a/Makefile	2024-09-12 19:13:49.019811600 +0200
+++ b/Makefile	2024-10-12 15:30:35.826411432 +0200
@@ -69,6 +69,7 @@
 
 ## These settings are for a package-type install
 PREFIX:=$(DESTDIR)/usr
+BINDIR:=$(PREFIX)/sbin
 CONFDIR:=$(DESTDIR)/etc/mandos
 KEYDIR:=$(DESTDIR)/etc/keys/mandos
 MANDIR:=$(PREFIX)/share/man
@@ -417,12 +418,12 @@
 		install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
 			$(SYSUSERS)/mandos.conf; \
 	fi
-	install --directory $(PREFIX)/sbin
-	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
+	install --directory $(BINDIR)
+	install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
 		mandos
-	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
+	install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
 		mandos-ctl
-	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
+	install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
 		mandos-monitor
 	install --directory $(CONFDIR)
 	install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
@@ -477,8 +478,8 @@
 	install --mode=u=rwx,go=rx \
 		--target-directory=$(LIBDIR)/mandos \
 		mandos-to-cryptroot-unlock
-	install --directory $(PREFIX)/sbin
-	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
+	install --directory $(BINDIR)
+	install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
 		mandos-keygen
 	install --mode=u=rwx,go=rx \
 		--target-directory=$(LIBDIR)/mandos/plugins.d \
@@ -544,7 +545,7 @@
 .PHONY: install-client
 install-client: install-client-nokey
 # Post-installation stuff
-	-$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
+	-$(BINDIR)/mandos-keygen --dir "$(KEYDIR)"
 	if command -v update-initramfs >/dev/null; then \
 	    update-initramfs -k all -u; \
 	elif command -v dracut >/dev/null; then \
@@ -562,9 +563,9 @@
 
 .PHONY: uninstall-server
 uninstall-server:
-	-rm --force $(PREFIX)/sbin/mandos \
-		$(PREFIX)/sbin/mandos-ctl \
-		$(PREFIX)/sbin/mandos-monitor \
+	-rm --force $(BINDIR)/mandos \
+		$(BINDIR)/mandos-ctl \
+		$(BINDIR)/mandos-monitor \
 		$(MANDIR)/man8/mandos.8.gz \
 		$(MANDIR)/man8/mandos-monitor.8.gz \
 		$(MANDIR)/man8/mandos-ctl.8.gz \
@@ -579,7 +580,7 @@
 # to use it.
 	! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
 		$(DESTDIR)/etc/crypttab
-	-rm --force $(PREFIX)/sbin/mandos-keygen \
+	-rm --force $(BINDIR)/mandos-keygen \
 		$(LIBDIR)/mandos/plugin-runner \
 		$(LIBDIR)/mandos/plugins.d/password-prompt \
 		$(LIBDIR)/mandos/plugins.d/mandos-client \


More information about the Mandos-Dev mailing list