/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

Change the default value of the "checker" option command to make the
checker command be run-time dependent on the "host" client attribute
instead of reading it only once on startup:

* clients.conf (checker): Changed default commented-out value to
                          "fping -q -- %%(host)s".
* mandos (main): Changed default value for the "checker" config option
                 to "fping -q -- %%(host)s".
* mandos-clients.conf.xml (OPTIONS): Document changed default value.
  (EXAMPLE): Changed value of "checker".

* plugins.d/password-prompt.c: Whitespace changes only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#DEBUG=-ggdb3
10
10
# For info about _FORTIFY_SOURCE, see
11
11
# <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>
12
 
FORTIFY=-D_FORTIFY_SOURCE=2 # -fstack-protector-all
 
12
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -pie
 
13
LINK_FORTIFY=-z relro -pie
13
14
#COVERAGE=--coverage
14
15
OPTIMIZE=-Os
15
16
LANGUAGE=-std=gnu99
16
17
htmldir=man
17
 
version=1.0
 
18
version=1.0.3
18
19
SED=sed
19
20
 
20
21
## Use these settings for a traditional /usr/local install
44
45
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
45
46
        $(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) \
46
47
        -DVERSION='"$(version)"'
47
 
LDFLAGS=$(COVERAGE)
 
48
LDFLAGS=$(COVERAGE) $(foreach flag,$(LINK_FORTIFY),-Xlinker $(flag))
48
49
 
49
50
# Commands to format a DocBook <refentry> document into a manual page
50
51
DOCBOOKTOMAN=cd $(dir $<); xsltproc --nonet --xinclude \
69
70
        /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
70
71
        $<; $(HTMLPOST) $@
71
72
# Fix citerefentry links
72
 
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'
73
75
 
74
76
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
75
77
        plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
76
78
CPROGS=plugin-runner $(PLUGINS)
77
 
PROGS=mandos mandos-keygen $(CPROGS)
 
79
PROGS=mandos mandos-keygen mandos-list $(CPROGS)
78
80
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
79
81
        plugins.d/mandos-client.8mandos \
80
82
        plugins.d/password-prompt.8mandos mandos.conf.5 \
81
 
        mandos-clients.conf.5
 
83
        plugins.d/usplash.8mandos plugins.d/splashy.8mandos \
 
84
        plugins.d/askpass-fifo.8mandos mandos-clients.conf.5
82
85
 
83
86
htmldocs=$(addsuffix .xhtml,$(DOCS))
84
87
 
85
88
objects=$(addsuffix .o,$(CPROGS))
86
89
 
87
 
all: $(PROGS)
 
90
all: $(PROGS) mandos.lsm
88
91
 
89
92
doc: $(DOCS)
90
93
 
146
149
 
147
150
# Update all these files with version number $(version)
148
151
common.ent: Makefile
149
 
        $(SED) --in-place --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' $@
 
152
        $(SED) --in-place \
 
153
                --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' \
 
154
                $@
150
155
 
151
156
mandos: Makefile
152
 
        $(SED) --in-place --expression='s/^\(version = "\)[^"]*"/\1$(version)"/' $@
 
157
        $(SED) --in-place \
 
158
                --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
 
159
                $@
153
160
 
154
161
mandos-keygen: Makefile
155
 
        $(SED) --in-place --expression='s/^\(VERSION="\)[^"]*"/\1$(version)"/' $@
 
162
        $(SED) --in-place \
 
163
                --expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
 
164
                $@
 
165
 
 
166
mandos-list: Makefile
 
167
        $(SED) --in-place \
 
168
                --expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
 
169
                $@
 
170
 
 
171
mandos.lsm: Makefile
 
172
        $(SED) --in-place \
 
173
                --expression='s/^\(Version:\).*/\1\t$(version)/' \
 
174
                $@
 
175
        $(SED) --in-place \
 
176
                --expression='s/^\(Entered-date:\).*/\1\t$(shell date --rfc-3339=date --reference=Makefile)/' \
 
177
                $@
 
178
        $(SED) --in-place \
 
179
                --expression='s/\(mandos_\)[0-9.]\+\(\.orig\.tar\.gz\)/\1$(version)\2/' \
 
180
                $@
156
181
 
157
182
plugins.d/mandos-client: plugins.d/mandos-client.o
158
183
        $(LINK.o) $(GNUTLS_LIBS) $(AVAHI_LIBS) $(GPGME_LIBS) \
200
225
 
201
226
install: install-server install-client-nokey
202
227
 
203
 
install-html: $(htmldocs)
 
228
install-html: html
204
229
        install --directory $(htmldir)
205
230
        install --mode=u=rw,go=r --target-directory=$(htmldir) \
206
231
                $(htmldocs)
268
293
                > $(MANDIR)/man8/password-prompt.8mandos.gz
269
294
        gzip --best --to-stdout plugins.d/mandos-client.8mandos \
270
295
                > $(MANDIR)/man8/mandos-client.8mandos.gz
 
296
        gzip --best --to-stdout plugins.d/usplash.8mandos \
 
297
                > $(MANDIR)/man8/usplash.8mandos.gz
 
298
        gzip --best --to-stdout plugins.d/splashy.8mandos \
 
299
                > $(MANDIR)/man8/splashy.8mandos.gz
 
300
        gzip --best --to-stdout plugins.d/askpass-fifo.8mandos \
 
301
                > $(MANDIR)/man8/askpass-fifo.8mandos.gz
271
302
 
272
303
install-client: install-client-nokey
273
304
# Post-installation stuff
296
327
                $(PREFIX)/lib/mandos/plugins.d/mandos-client \
297
328
                $(PREFIX)/lib/mandos/plugins.d/usplash \
298
329
                $(PREFIX)/lib/mandos/plugins.d/splashy \
 
330
                $(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
299
331
                $(INITRAMFSTOOLS)/hooks/mandos \
300
332
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
301
333
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \
302
334
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
303
335
                $(MANDIR)/man8/mandos-keygen.8.gz \
304
336
                $(MANDIR)/man8/password-prompt.8mandos.gz \
 
337
                $(MANDIR)/man8/usplash.8mandos.gz \
 
338
                $(MANDIR)/man8/splashy.8mandos.gz \
 
339
                $(MANDIR)/man8/askpass-fifo.8mandos.gz \
305
340
                $(MANDIR)/man8/mandos-client.8mandos.gz
306
341
        -rmdir $(PREFIX)/lib/mandos/plugins.d $(CONFDIR)/plugins.d \
307
342
                 $(PREFIX)/lib/mandos $(CONFDIR) $(KEYDIR)