/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: 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:
15
15
OPTIMIZE=-Os
16
16
LANGUAGE=-std=gnu99
17
17
htmldir=man
18
 
version=1.0.1
 
18
version=1.0.2
19
19
SED=sed
20
20
 
21
21
## Use these settings for a traditional /usr/local install
70
70
        /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
71
71
        $<; $(HTMLPOST) $@
72
72
# Fix citerefentry links
73
 
HTMLPOST=$(SED) --in-place --expression='s/\(<a class="citerefentry" href="\)\("><span class="citerefentry"><span class="refentrytitle">\)\([^<]*\)\(<\/span>(\)\([^)]*\)\()<\/span><\/a>\)/\1\3.\5\2\3\4\5\6/g'
 
73
HTMLPOST=$(SED) --in-place \
 
74
        --expression='s/\(<a class="citerefentry" href="\)\("><span class="citerefentry"><span class="refentrytitle">\)\([^<]*\)\(<\/span>(\)\([^)]*\)\()<\/span><\/a>\)/\1\3.\5\2\3\4\5\6/g'
74
75
 
75
76
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
76
77
        plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
86
87
 
87
88
objects=$(addsuffix .o,$(CPROGS))
88
89
 
89
 
all: $(PROGS)
 
90
all: $(PROGS) mandos.lsm
90
91
 
91
92
doc: $(DOCS)
92
93
 
148
149
 
149
150
# Update all these files with version number $(version)
150
151
common.ent: Makefile
151
 
        $(SED) --in-place --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' $@
 
152
        $(SED) --in-place \
 
153
                --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' \
 
154
                $@
152
155
 
153
156
mandos: Makefile
154
 
        $(SED) --in-place --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' $@
 
157
        $(SED) --in-place \
 
158
                --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
 
159
                $@
155
160
 
156
161
mandos-keygen: Makefile
157
 
        $(SED) --in-place --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' $@
 
162
        $(SED) --in-place \
 
163
                --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
 
164
                $@
 
165
 
 
166
mandos.lsm: Makefile
 
167
        $(SED) --in-place \
 
168
                --expression='s/^\(Version:\).*/\1\t$(version)/' \
 
169
                $@
 
170
        $(SED) --in-place \
 
171
                --expression='s/^\(Entered-date:\).*/\1\t$(shell date --rfc-3339=date --reference=Makefile)/' \
 
172
                $@
158
173
 
159
174
plugins.d/mandos-client: plugins.d/mandos-client.o
160
175
        $(LINK.o) $(GNUTLS_LIBS) $(AVAHI_LIBS) $(GPGME_LIBS) \
202
217
 
203
218
install: install-server install-client-nokey
204
219
 
205
 
install-html: $(htmldocs)
 
220
install-html: html
206
221
        install --directory $(htmldir)
207
222
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
208
223
                $(htmldocs)