/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: 2008-10-03 09:32:30 UTC
  • Revision ID: teddy@fukt.bsnet.se-20081003093230-rshn19e0c19zz12i
* .bzrignore (plugins.d/askpass-fifo): Added.

* Makefile (FORTIFY): Added "-fstack-protector-all".
  (mandos, mandos-keygen): Use more strict regexps when updating the
                           version number.

* mandos (Client.__init__): Use os.path.expandvars() and
                            os.path.expanduser() on the "secfile"
                            config value.

* plugins.d/splashy.c: Update comments and order of #include's.
  (main): Check user and group when looking for running splashy
          process.  Do not ignore ENOENT from execl().  Use _exit()
          instead of "return" when an error happens in child
          processes.  Bug fix: Only wait for splashy_update
          completion if it was started.  Bug fix: detect failing
          waitpid().  Only kill splashy_update if it is running.  Do
          the killing of the old splashy process before the fork().
          Do setsid() and setuid(geteuid()) before starting the new
          splashy.  Report failing execl().

* plugins.d/usplash.c: Update comments and order of #include's.
  (main): Check user and group when looking for running usplash
          process.  Do not report execv() error if interrupted by a
          signal.

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