50
50
GROUP:=$(firstword $(subst :, ,$(shell getent group _mandos \
51
51
|| getent group nogroup || echo 65534)))
53
LINUXVERSION:=$(shell uname --kernel-release)
55
53
## Use these settings for a traditional /usr/local install
56
54
# PREFIX:=$(DESTDIR)/usr/local
57
55
# CONFDIR:=$(DESTDIR)/etc/mandos
73
71
STATEDIR:=$(DESTDIR)/var/lib/mandos
76
"/usr/lib/`dpkg-architecture \
77
-qDEB_HOST_MULTIARCH 2>/dev/null`" \
74
"/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null`" \
78
75
"`rpm --eval='%{_libdir}' 2>/dev/null`" /usr/lib; do \
79
76
if [ -d "$$d" -a "$$d" = "$${d%/}" ]; then \
80
77
echo "$(DESTDIR)$$d"; \
86
SYSTEMD:=$(DESTDIR)$(shell pkg-config systemd \
87
--variable=systemdsystemunitdir)
83
SYSTEMD:=$(DESTDIR)$(shell pkg-config systemd --variable=systemdsystemunitdir)
88
84
TMPFILES:=$(DESTDIR)$(shell pkg-config systemd --variable=tmpfilesdir)
90
86
GNUTLS_CFLAGS:=$(shell pkg-config --cflags-only-I gnutls)
316
312
./dracut-module/password-agent --test
318
314
# Run the client with a local config and key
319
run-client: all keydir/seckey.txt keydir/pubkey.txt \
320
keydir/tls-privkey.pem keydir/tls-pubkey.pem
321
@echo '######################################################'
322
@echo '# The following error messages are harmless and can #'
323
@echo '# be safely ignored: #'
324
@echo '## From plugin-runner: #'
325
@echo '# setgid: Operation not permitted #'
326
@echo '# setuid: Operation not permitted #'
327
@echo '## From askpass-fifo: #'
328
@echo '# mkfifo: Permission denied #'
329
@echo '## From mandos-client: #'
330
@echo '# Failed to raise privileges: Operation not permi... #'
331
@echo '# Warning: network hook "*" exited with status * #'
332
@echo '# ioctl SIOCSIFFLAGS +IFF_UP: Operation not permi... #'
333
@echo '# Failed to bring up interface "*": Operation not... #'
335
@echo '# (The messages are caused by not running as root, #'
336
@echo '# but you should NOT run "make run-client" as root #'
337
@echo '# unless you also unpacked and compiled Mandos as #'
338
@echo '# root, which is also NOT recommended.) #'
339
@echo '######################################################'
315
run-client: all keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem
316
@echo "###################################################################"
317
@echo "# The following error messages are harmless and can be safely #"
319
@echo "# From plugin-runner: setgid: Operation not permitted #"
320
@echo "# setuid: Operation not permitted #"
321
@echo "# From askpass-fifo: mkfifo: Permission denied #"
322
@echo "# From mandos-client: #"
323
@echo "# Failed to raise privileges: Operation not permitted #"
324
@echo "# Warning: network hook \"*\" exited with status * #"
326
@echo "# (The messages are caused by not running as root, but you should #"
327
@echo "# NOT run \"make run-client\" as root unless you also unpacked and #"
328
@echo "# compiled Mandos as root, which is also NOT recommended.) #"
329
@echo "###################################################################"
340
330
# We set GNOME_KEYRING_CONTROL to block pam_gnome_keyring
341
331
./plugin-runner --plugin-dir=plugins.d \
342
332
--plugin-helper-dir=plugin-helpers \
382
372
elif install --directory --mode=u=rwx $(STATEDIR); then \
383
373
chown -- $(USER):$(GROUP) $(STATEDIR) || :; \
385
if [ "$(TMPFILES)" != "$(DESTDIR)" \
386
-a -d "$(TMPFILES)" ]; then \
375
if [ "$(TMPFILES)" != "$(DESTDIR)" -a -d "$(TMPFILES)" ]; then \
387
376
install --mode=u=rw,go=r tmpfiles.d-mandos.conf \
388
377
$(TMPFILES)/mandos.conf; \
436
425
install --mode=u=rwx,go=rx \
437
426
--target-directory=$(LIBDIR)/mandos plugin-runner
438
427
install --mode=u=rwx,go=rx \
439
--target-directory=$(LIBDIR)/mandos \
440
mandos-to-cryptroot-unlock
428
--target-directory=$(LIBDIR)/mandos mandos-to-cryptroot-unlock
441
429
install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
443
431
install --mode=u=rwx,go=rx \
506
494
if command -v update-initramfs >/dev/null; then \
507
495
update-initramfs -k all -u; \
508
496
elif command -v dracut >/dev/null; then \
509
for initrd in $(DESTDIR)/boot/initr*-$(LINUXVERSION); do \
497
for initrd in $(DESTDIR)/boot/initr*-$(shell uname --kernel-release); do \
510
498
if [ -w "$$initrd" ]; then \
511
499
chmod go-r "$$initrd"; \
512
500
dracut --force "$$initrd"; \
565
553
if command -v update-initramfs >/dev/null; then \
566
554
update-initramfs -k all -u; \
567
555
elif command -v dracut >/dev/null; then \
568
for initrd in $(DESTDIR)/boot/initr*-$(LINUXVERSION); do \
556
for initrd in $(DESTDIR)/boot/initr*-$(shell uname --kernel-release); do \
569
557
test -w "$$initrd" && dracut --force "$$initrd"; \