/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2024-11-22 20:28:54 UTC
  • Revision ID: teddy@recompile.se-20241122202854-dycuf117byxhxl32
mandos-monitor: Avoid debug messages from urwid

Avoid debug messages from urwid.  Any logging output before the screen
has been set up will mangle the screen.

* mandos-monitor: When setting up logging, set urwid to only show log
  messages of level INFO or above.

(Thanks to an anonymous contributor for reporting this.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
LANGUAGE:=-std=gnu11
45
45
CPPFLAGS+=-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
46
46
htmldir:=man
47
 
version:=1.8.16
 
47
version:=1.8.17
48
48
SED:=sed
49
49
PKG_CONFIG?=pkg-config
50
50
 
57
57
 
58
58
## Use these settings for a traditional /usr/local install
59
59
# PREFIX:=$(DESTDIR)/usr/local
 
60
# BINDIR:=$(PREFIX)/sbin
60
61
# CONFDIR:=$(DESTDIR)/etc/mandos
61
62
# KEYDIR:=$(DESTDIR)/etc/mandos/keys
62
63
# MANDIR:=$(PREFIX)/man
69
70
 
70
71
## These settings are for a package-type install
71
72
PREFIX:=$(DESTDIR)/usr
 
73
BINDIR:=$(PREFIX)/sbin
72
74
CONFDIR:=$(DESTDIR)/etc/mandos
73
75
KEYDIR:=$(DESTDIR)/etc/keys/mandos
74
76
MANDIR:=$(PREFIX)/share/man
289
291
                --expression='s/\(mandos_\)[0-9.]\+\(\.orig\.tar\.gz\)/\1$(version)\2/' \
290
292
                $@)
291
293
 
 
294
# Does the linker support the --no-warn-execstack option?
 
295
ifeq ($(shell echo 'int main(){}'|$(CC) --language=c /dev/stdin -o /dev/null -Xlinker --no-warn-execstack >/dev/null 2>&1 && echo yes),yes)
 
296
# These programs use nested functions, which uses an executable stack
 
297
plugin-runner: LDFLAGS += -Xlinker --no-warn-execstack
 
298
dracut-module/password-agent: LDFLAGS += -Xlinker --no-warn-execstack
 
299
plugins.d/password-prompt: LDFLAGS += -Xlinker --no-warn-execstack
 
300
plugins.d/mandos-client: LDFLAGS += -Xlinker --no-warn-execstack
 
301
plugins.d/plymouth: LDFLAGS += -Xlinker --no-warn-execstack
 
302
endif
 
303
 
292
304
# Need to add the GnuTLS, Avahi and GPGME libraries
293
305
plugins.d/mandos-client: CFLAGS += $(GNUTLS_CFLAGS) $(strip \
294
306
        ) $(AVAHI_CFLAGS) $(GPGME_CFLAGS)
407
419
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
408
420
                        $(SYSUSERS)/mandos.conf; \
409
421
        fi
410
 
        install --directory $(PREFIX)/sbin
411
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
412
 
                mandos
413
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
422
        install --directory $(BINDIR)
 
423
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) mandos
 
424
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
414
425
                mandos-ctl
415
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
426
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
416
427
                mandos-monitor
417
428
        install --directory $(CONFDIR)
418
429
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
467
478
        install --mode=u=rwx,go=rx \
468
479
                --target-directory=$(LIBDIR)/mandos \
469
480
                mandos-to-cryptroot-unlock
470
 
        install --directory $(PREFIX)/sbin
471
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
481
        install --directory $(BINDIR)
 
482
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
472
483
                mandos-keygen
473
484
        install --mode=u=rwx,go=rx \
474
485
                --target-directory=$(LIBDIR)/mandos/plugins.d \
534
545
.PHONY: install-client
535
546
install-client: install-client-nokey
536
547
# Post-installation stuff
537
 
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
 
548
        -$(BINDIR)/mandos-keygen --dir "$(KEYDIR)"
538
549
        if command -v update-initramfs >/dev/null; then \
539
550
            update-initramfs -k all -u; \
540
551
        elif command -v dracut >/dev/null; then \
552
563
 
553
564
.PHONY: uninstall-server
554
565
uninstall-server:
555
 
        -rm --force $(PREFIX)/sbin/mandos \
556
 
                $(PREFIX)/sbin/mandos-ctl \
557
 
                $(PREFIX)/sbin/mandos-monitor \
 
566
        -rm --force $(BINDIR)/mandos \
 
567
                $(BINDIR)/mandos-ctl \
 
568
                $(BINDIR)/mandos-monitor \
558
569
                $(MANDIR)/man8/mandos.8.gz \
559
570
                $(MANDIR)/man8/mandos-monitor.8.gz \
560
571
                $(MANDIR)/man8/mandos-ctl.8.gz \
569
580
# to use it.
570
581
        ! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
571
582
                $(DESTDIR)/etc/crypttab
572
 
        -rm --force $(PREFIX)/sbin/mandos-keygen \
 
583
        -rm --force $(BINDIR)/mandos-keygen \
573
584
                $(LIBDIR)/mandos/plugin-runner \
574
585
                $(LIBDIR)/mandos/plugins.d/password-prompt \
575
586
                $(LIBDIR)/mandos/plugins.d/mandos-client \