/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:30:34 UTC
  • Revision ID: teddy@recompile.se-20241122203034-92q7483wxv29tqev
mandos-monitor: avoid deprecation warnings from urwid

The urwid.FlowWidget class is deprecated.  Replace it with inheriting
from urwid.Widget, and setting the appropriate class attribute.

* mandos-monitor: Replace any mentions of urwid.FlowWidget with
  urwid.Widget.
  (MandosClientWidget): Inherit from "urwid.Widget" instead of
  "urwid.FlowWidget".  Also, move MandosClientPropertyCache to first
  in inheritance list so that its __init__ method can absorb the
  "proxy_object" and "properties" keyword arguments.
  (MandosClientWidget._sizing): New class attribute; set to
  "frozenset(["flow"])".

(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
 
292
 
# Uses nested functions
 
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
293
297
plugin-runner: LDFLAGS += -Xlinker --no-warn-execstack
294
298
dracut-module/password-agent: LDFLAGS += -Xlinker --no-warn-execstack
295
299
plugins.d/password-prompt: LDFLAGS += -Xlinker --no-warn-execstack
296
300
plugins.d/mandos-client: LDFLAGS += -Xlinker --no-warn-execstack
297
301
plugins.d/plymouth: LDFLAGS += -Xlinker --no-warn-execstack
 
302
endif
298
303
 
299
304
# Need to add the GnuTLS, Avahi and GPGME libraries
300
305
plugins.d/mandos-client: CFLAGS += $(GNUTLS_CFLAGS) $(strip \
414
419
                install -D --mode=u=rw,go=r sysusers.d-mandos.conf \
415
420
                        $(SYSUSERS)/mandos.conf; \
416
421
        fi
417
 
        install --directory $(PREFIX)/sbin
418
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
419
 
                mandos
420
 
        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) \
421
425
                mandos-ctl
422
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
426
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
423
427
                mandos-monitor
424
428
        install --directory $(CONFDIR)
425
429
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
474
478
        install --mode=u=rwx,go=rx \
475
479
                --target-directory=$(LIBDIR)/mandos \
476
480
                mandos-to-cryptroot-unlock
477
 
        install --directory $(PREFIX)/sbin
478
 
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
 
481
        install --directory $(BINDIR)
 
482
        install --mode=u=rwx,go=rx --target-directory=$(BINDIR) \
479
483
                mandos-keygen
480
484
        install --mode=u=rwx,go=rx \
481
485
                --target-directory=$(LIBDIR)/mandos/plugins.d \
541
545
.PHONY: install-client
542
546
install-client: install-client-nokey
543
547
# Post-installation stuff
544
 
        -$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
 
548
        -$(BINDIR)/mandos-keygen --dir "$(KEYDIR)"
545
549
        if command -v update-initramfs >/dev/null; then \
546
550
            update-initramfs -k all -u; \
547
551
        elif command -v dracut >/dev/null; then \
559
563
 
560
564
.PHONY: uninstall-server
561
565
uninstall-server:
562
 
        -rm --force $(PREFIX)/sbin/mandos \
563
 
                $(PREFIX)/sbin/mandos-ctl \
564
 
                $(PREFIX)/sbin/mandos-monitor \
 
566
        -rm --force $(BINDIR)/mandos \
 
567
                $(BINDIR)/mandos-ctl \
 
568
                $(BINDIR)/mandos-monitor \
565
569
                $(MANDIR)/man8/mandos.8.gz \
566
570
                $(MANDIR)/man8/mandos-monitor.8.gz \
567
571
                $(MANDIR)/man8/mandos-ctl.8.gz \
576
580
# to use it.
577
581
        ! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
578
582
                $(DESTDIR)/etc/crypttab
579
 
        -rm --force $(PREFIX)/sbin/mandos-keygen \
 
583
        -rm --force $(BINDIR)/mandos-keygen \
580
584
                $(LIBDIR)/mandos/plugin-runner \
581
585
                $(LIBDIR)/mandos/plugins.d/password-prompt \
582
586
                $(LIBDIR)/mandos/plugins.d/mandos-client \