/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: 2019-11-03 18:44:41 UTC
  • Revision ID: teddy@recompile.se-20191103184441-1vhjuf06hjqgfohh
mandos-monitor: Use Python's standard loggging module

* mandos-monitor: Use Python's standard loggging module, also for
                  warnings.  Suppress BytesWarning from urwid when
                  exiting.
  (log): New global logger object.  This replaces UserInterface
        log_message().
  (MandosClientWidget.__init__): Remove "logger" argument.
  (MandosClientWidget.using_timer): Wrap self.update_timer using new
                                    glib_safely() function.
  (glib_safely): New function to log any exceptions instead of letting
                 exceptions propagate up to GLib.
  (UserInterface.__init__): Remove "log_level" argument.  Set new
                            "loghandler" attribute, instance of new
                            "UILogHandler".
  (UserInterface.log_message): Removed.
  (UserInterface.log_message_raw): Renamed to "add_log_line"; all
                                   callers changed.  Also fix
                                   off-by-one error in max_log_length
                                   logic.
  (UserInterface.run): Add self.loghandler to logger "log". Wrap
                       self.process_input using new glib_safely()
                       function.
  (UserInterface.stop): Remove self.loghandler from logger "log".
  (UserInterface.process_input): Make verbosity toggle affect log
                                 level of logger "log".
  (UILogHandler): New.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
LANGUAGE:=-std=gnu11
44
44
FEATURES:=-D_FILE_OFFSET_BITS=64
45
45
htmldir:=man
46
 
version:=1.8.7
 
46
version:=1.8.9
47
47
SED:=sed
48
48
PKG_CONFIG?=pkg-config
49
49
 
89
89
                        --variable=systemdsystemunitdir)
90
90
TMPFILES:=$(DESTDIR)$(shell $(PKG_CONFIG) systemd \
91
91
                        --variable=tmpfilesdir)
 
92
SYSUSERS:=$(DESTDIR)$(shell $(PKG_CONFIG) systemd \
 
93
                        --variable=sysusersdir)
92
94
 
93
95
GNUTLS_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I gnutls)
94
96
GNUTLS_LIBS:=$(shell $(PKG_CONFIG) --libs gnutls)
390
392
                install --mode=u=rw,go=r tmpfiles.d-mandos.conf \
391
393
                        $(TMPFILES)/mandos.conf; \
392
394
        fi
 
395
        if [ "$(SYSUSERS)" != "$(DESTDIR)" \
 
396
                        -a -d "$(SYSUSERS)" ]; then \
 
397
                install --mode=u=rw,go=r sysusers.d-mandos.conf \
 
398
                        $(SYSUSERS)/mandos.conf; \
 
399
        fi
393
400
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
394
401
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
395
402
                mandos-ctl
429
436
        install --directory --mode=u=rwx $(KEYDIR) \
430
437
                $(LIBDIR)/mandos/plugins.d \
431
438
                $(LIBDIR)/mandos/plugin-helpers
 
439
        if [ "$(SYSUSERS)" != "$(DESTDIR)" \
 
440
                        -a -d "$(SYSUSERS)" ]; then \
 
441
                install --mode=u=rw,go=r sysusers.d-mandos.conf \
 
442
                        $(SYSUSERS)/mandos-client.conf; \
 
443
        fi
432
444
        if [ "$(CONFDIR)" != "$(LIBDIR)/mandos" ]; then \
433
445
                install --mode=u=rwx \
434
446
                        --directory "$(CONFDIR)/plugins.d" \