/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 debian/rules

  • Committer: Teddy Hogeborn
  • Date: 2008-12-10 01:26:02 UTC
  • mfrom: (237.1.2 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20081210012602-vhz3h75xkj24t340
First version of a somewhat complete D-Bus server interface.  Also
change user/group name to "_mandos".

* debian/mandos.postinst: Rename old "mandos" user and group to
                          "_mandos"; create "_mandos" user and group
                          if none exist.
* debian/mandos-client.postinst: - '' -

* initramfs-tools-hook: Try "_mandos" before "mandos" as user and
                        group name.

* mandos (_datetime_to_dbus_struct): New; was previously local.
  (Client.started): Renamed to "last_started".  All users changed.
  (Client.started): New; boolean.
  (Client.dbus_object_path): New.
  (Client.check_command): Renamed to "checker_command".  All users
                          changed.
  (Client.__init__): Set and use "self.dbus_object_path".  Set
                     "self.started".
  (Client.start): Update "self.started".  Emit "self.PropertyChanged"
                  signals for both "started" and "last_started".
  (Client.stop): Update "self.started".  Emit "self.PropertyChanged"
                 signal for "started".
  (Client.checker_callback): Take additional "command" argument.  All
                             callers changed. Emit
                             "self.PropertyChanged" signal.
  (Client.bump_timeout): Emit "self.PropertyChanged" signal for
                         "last_checked_ok".
  (Client.start_checker): Emit "self.PropertyChanged" signal for
                          "checker_running".
  (Client.stop_checker): Emit "self.PropertyChanged" signal for
                         "checker_running".
  (Client.still_valid): Bug fix: use "getattr(self, started, False)"
                        instead of "self.started" in case this client
                        object is so new that the "started" attribute
                        has not been created yet.
  (Client.IntervalChanged, Client.CheckerIsRunning, Client.GetChecker,
  Client.GetCreated, Client.GetFingerprint, Client.GetHost,
  Client.GetInterval, Client.GetName, Client.GetStarted,
  Client.GetTimeout, Client.StateChanged, Client.TimeoutChanged):
  Removed; all callers changed.
  (Client.CheckerCompleted): Add "condition" and "command" arguments.
                             All callers changed.
  (Client.GetAllProperties, Client.PropertyChanged): New.
  (Client.StillValid): Renamed to "IsStillValid".
  (Client.StartChecker): Changed to its own function to avoid the
                         return value from "Client.start_checker()".
  (Client.Stop): Changed to its own function to avoid the return value
                 from "Client.stop()".
  (main): Try "_mandos" before "mandos" as user and group name.
          Removed inner function "remove_from_clients".  New inner
          class "MandosServer".

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
# build-arch and build-indep targets  by Bill Allombert 2001
11
11
 
12
12
# Uncomment this to turn on verbose mode.
13
 
export DH_VERBOSE=1
 
13
#export DH_VERBOSE=1
14
14
 
15
15
# This has to be exported to make some magic below work.
16
16
export DH_OPTIONS
18
18
configure: configure-stamp
19
19
configure-stamp:
20
20
        dh_testdir
21
 
# Add here commands to configure the package.
22
21
        touch configure-stamp
23
22
 
24
 
#Architecture
25
23
build: build-arch build-indep
26
24
 
27
25
build-arch: build-arch-stamp
28
26
build-arch-stamp: configure-stamp
29
 
# Add here commands to compile the arch part of the package.
30
27
        dh_auto_build -- all doc
31
28
        touch $@
32
29
 
33
30
build-indep: build-indep-stamp
34
31
build-indep-stamp: configure-stamp
35
 
# Add here commands to compile the indep part of the package.
36
32
        dh_auto_build -- doc
37
33
        touch $@
38
34
 
40
36
        dh_testdir
41
37
        dh_testroot
42
38
        rm -f build-arch-stamp build-indep-stamp configure-stamp
43
 
# Add here commands to clean up after the build process.
44
39
        dh_auto_clean
45
40
        dh_clean
 
41
        debconf-updatepo
46
42
 
47
43
install: install-indep install-arch
48
44
install-indep:
50
46
        dh_testroot
51
47
        dh_prep
52
48
        dh_installdirs --indep
53
 
# Add here commands to install the indep part of the package into
54
 
# debian/<package>-doc.
55
49
        $(MAKE) DESTDIR=$(CURDIR)/debian/mandos install-server
56
50
        dh_lintian
57
 
        dh_installinit --onlyscripts --no-start
 
51
        dh_installinit --onlyscripts --no-start \
 
52
                --update-rcd-params="defaults 25 15"
58
53
        dh_install --indep
59
54
 
60
55
install-arch:
62
57
        dh_testroot
63
58
        dh_prep
64
59
        dh_installdirs --same-arch
65
 
 
66
 
# Add here commands to install the arch part of the package into
67
 
# debian/tmp.
68
60
        $(MAKE) DESTDIR=$(CURDIR)/debian/mandos-client install-client-nokey
69
61
        dh_lintian
70
62
        dh_install --same-arch
71
63
 
72
 
# Must not depend on anything. This is to be called by
73
 
# binary-arch/binary-indep
74
 
# in another 'make' thread.
75
64
binary-common:
76
65
        dh_testdir
77
66
        dh_testroot
78
67
        dh_installchangelogs
79
68
        dh_installdocs
80
 
#       dh_installexamples
81
 
#       dh_installmenu
82
 
#       dh_installdebconf
83
 
#       dh_installlogrotate
84
 
#       dh_installemacsen
85
 
#       dh_installpam
86
 
#       dh_installmime
87
 
#       dh_pycentral
88
 
#       dh_installinit
89
 
#       dh_installcron
90
 
#       dh_installinfo
91
 
#       dh_installman
 
69
        dh_installdebconf
92
70
        dh_link
93
71
        dh_strip
94
72
        dh_compress
95
73
        dh_fixperms --exclude etc/keys/mandos \
96
74
                --exclude etc/mandos/clients.conf \
 
75
                --exclude etc/mandos/plugins.d \
97
76
                --exclude usr/lib/mandos/plugins.d
98
 
#       dh_perl
99
 
        dh_makeshlibs
100
77
        dh_installdeb
101
78
        dh_shlibdeps
102
79
        dh_gencontrol
103
80
        dh_md5sums
104
81
        dh_builddeb
 
82
 
105
83
# Build architecture independant packages using the common target.
106
84
binary-indep: build-indep install-indep
107
85
        $(MAKE) -f debian/rules DH_OPTIONS=--indep binary-common