/mandos/release

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

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2019-08-10 15:19:47 UTC
  • mto: This revision was merged to the branch mainline in revision 390.
  • Revision ID: teddy@recompile.se-20190810151947-wyw7cetrh1pvtw37
Simplification of Python 3 compatibility code

Normally, "class Foo:" in Python 2 creates a "classic" class, but in
Python 3, all classes are "new-style" classes, which you can get in
Python 2 by doing "class Foo(object):", i.e. inheriting from "object".
But, you can also get a new-style classes from "class Foo:" in Python
2 by setting the global "__metaclass__" variable to "type", which
makes the code less cluttered.  Note: it is still necessary to inherit
from "object" in Python 2 to get a new-style class if the class is
otherwise inheriting only from "classic" classes.

* mandos: Set "__metaclass__ = type" globally for Python 2, and remove
          inheriting from "object" in all places possible.
* mandos-ctl: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
94
92
 
95
93
GNUTLS_CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I gnutls)
96
94
GNUTLS_LIBS:=$(shell $(PKG_CONFIG) --libs gnutls)
392
390
                install --mode=u=rw,go=r tmpfiles.d-mandos.conf \
393
391
                        $(TMPFILES)/mandos.conf; \
394
392
        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
400
393
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
401
394
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
402
395
                mandos-ctl
436
429
        install --directory --mode=u=rwx $(KEYDIR) \
437
430
                $(LIBDIR)/mandos/plugins.d \
438
431
                $(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
444
432
        if [ "$(CONFDIR)" != "$(LIBDIR)/mandos" ]; then \
445
433
                install --mode=u=rwx \
446
434
                        --directory "$(CONFDIR)/plugins.d" \