/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
1
WARN=-O -Wall -Wformat=2 -Winit-self -Wmissing-include-dirs \
2
	-Wswitch-default -Wswitch-enum -Wunused-parameter \
304 by Teddy Hogeborn
Four new interrelated features:
3
	-Wstrict-aliasing=1 -Wextra -Wfloat-equal -Wundef -Wshadow \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
4
	-Wunsafe-loop-optimizations -Wpointer-arith \
5
	-Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings \
6
	-Wconversion -Wstrict-prototypes -Wold-style-definition \
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
7
	-Wpacked -Wnested-externs -Winline -Wvolatile-register-var
8
#	-Wunreachable-code 
9
#DEBUG=-ggdb3
28 by Teddy Hogeborn
* server.conf: New file.
10
# For info about _FORTIFY_SOURCE, see
389 by Teddy Hogeborn
* plugins.d/splashy.c: Use exit codes from <sysexits.h>.
11
# <http://www.kernel.org/doc/man-pages/online/pages/man7/feature_test_macros.7.html>
12
# and <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>.
395 by Teddy Hogeborn
Merge from release branch.
13
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC
14
LINK_FORTIFY_LD=-z relro -z now
15
LINK_FORTIFY=
16
ifndef BROKEN_PIE
17
FORTIFY += -fPIE
18
LINK_FORTIFY_LD += -fPIE
19
LINK_FORTIFY += -pie
20
endif
24.1.90 by Björn Påhlsson
fixed two bugs:
21
#COVERAGE=--coverage
24.1.51 by Björn Påhlsson
Added configuration files support for mandos-client
22
OPTIMIZE=-Os
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
23
LANGUAGE=-std=gnu99
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
24
htmldir=man
395 by Teddy Hogeborn
Merge from release branch.
25
version=1.0.14
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
26
SED=sed
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
27
28
## Use these settings for a traditional /usr/local install
29
# PREFIX=$(DESTDIR)/usr/local
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
30
# CONFDIR=$(DESTDIR)/etc/mandos
31
# KEYDIR=$(DESTDIR)/etc/mandos/keys
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
32
# MANDIR=$(PREFIX)/man
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
33
# INITRAMFSTOOLS=$(DESTDIR)/etc/initramfs-tools
34
##
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
35
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
36
## These settings are for a package-type install
96 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR, MANDIR): Use $(DESTDIR).
37
PREFIX=$(DESTDIR)/usr
38
CONFDIR=$(DESTDIR)/etc/mandos
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
39
KEYDIR=$(DESTDIR)/etc/keys/mandos
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
40
MANDIR=$(PREFIX)/share/man
41
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
42
##
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
43
345 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS): Use "pkg-config" instead of
44
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
45
GNUTLS_LIBS=$(shell pkg-config --libs gnutls)
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
46
AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core)
47
AVAHI_LIBS=$(shell pkg-config --libs avahi-core)
317 by Teddy Hogeborn
Use "getconf" to get correct LFS compile and link flags.
48
GPGME_CFLAGS=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
49
GPGME_LIBS=$(shell gpgme-config --libs; getconf LFS_LIBS; \
50
	getconf LFS_LDFLAGS)
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
51
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
52
# Do not change these two
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
53
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
54
	$(LANGUAGE) $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(GPGME_CFLAGS) \
55
	-DVERSION='"$(version)"'
257.1.1 by Mooie
Updated Makefile to use -fPIC.
56
LDFLAGS=$(COVERAGE) $(LINK_FORTIFY) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
57
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
58
# Commands to format a DocBook <refentry> document into a manual page
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
59
DOCBOOKTOMAN=$(strip cd $(dir $<); xsltproc --nonet --xinclude \
62 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Do not generate AUTHORS section.
60
	--param man.charmap.use.subset		0 \
61
	--param make.year.ranges		1 \
62
	--param make.single.year.ranges		1 \
63
	--param man.output.quietly		1 \
84 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Use the local manpages/docbook.xsl file, do
64
	--param man.authors.section.enabled	0 \
91 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Include all DocBook-to-manpage-related
65
	 /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
66
	$(notdir $<); \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
67
	$(MANPOST) $(notdir $@))
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
68
# DocBook-to-man post-processing to fix a '\n' escape bug
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
69
MANPOST=$(SED) --in-place --expression='s,\\\\en,\\en,g;s,\\n,\\en,g'
24.1.25 by Björn Påhlsson
* clients.conf.xml: Renamed to "mandos-clients.conf.xml".
70
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
71
DOCBOOKTOHTML=$(strip xsltproc --nonet --xinclude \
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
72
	--param make.year.ranges		1 \
73
	--param make.single.year.ranges		1 \
74
	--param man.output.quietly		1 \
75
	--param man.authors.section.enabled	0 \
76
	--param citerefentry.link		1 \
77
	--output $@ \
78
	/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
79
	$<; $(HTMLPOST) $@)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
80
# Fix citerefentry links
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
81
HTMLPOST=$(SED) --in-place \
82
	--expression='s/\(<a class="citerefentry" href="\)\("><span class="citerefentry"><span class="refentrytitle">\)\([^<]*\)\(<\/span>(\)\([^)]*\)\()<\/span><\/a>\)/\1\3.\5\2\3\4\5\6/g'
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
83
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
84
PLUGINS=plugins.d/password-prompt plugins.d/mandos-client \
214 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/askpass-fifo".
85
	plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
86
CPROGS=plugin-runner $(PLUGINS)
24.1.121 by Björn Påhlsson
mandos-ctl: Added support for all client calls
87
PROGS=mandos mandos-keygen mandos-ctl $(CPROGS)
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
88
DOCS=mandos.8 plugin-runner.8mandos mandos-keygen.8 \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
89
	plugins.d/mandos-client.8mandos \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
90
	plugins.d/password-prompt.8mandos mandos.conf.5 \
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
91
	plugins.d/usplash.8mandos plugins.d/splashy.8mandos \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
92
	plugins.d/askpass-fifo.8mandos mandos-clients.conf.5
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
93
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
94
htmldocs=$(addsuffix .xhtml,$(DOCS))
95
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
96
objects=$(addsuffix .o,$(CPROGS))
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
97
233 by Teddy Hogeborn
* Makefile (all): Also depend on "mandos.lsm".
98
all: $(PROGS) mandos.lsm
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
99
100
doc: $(DOCS)
24.1.25 by Björn Påhlsson
* clients.conf.xml: Renamed to "mandos-clients.conf.xml".
101
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
102
html: $(htmldocs)
103
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
104
%.5: %.xml common.ent legalnotice.xml
105
	$(DOCBOOKTOMAN)
106
%.5.xhtml: %.xml common.ent legalnotice.xml
107
	$(DOCBOOKTOHTML)
108
109
%.8: %.xml common.ent legalnotice.xml
110
	$(DOCBOOKTOMAN)
111
%.8.xhtml: %.xml common.ent legalnotice.xml
112
	$(DOCBOOKTOHTML)
113
114
%.8mandos: %.xml common.ent legalnotice.xml
115
	$(DOCBOOKTOMAN)
116
%.8mandos.xhtml: %.xml common.ent legalnotice.xml
117
	$(DOCBOOKTOHTML)
118
119
mandos.8: mandos.xml common.ent mandos-options.xml overview.xml \
120
		legalnotice.xml
121
	$(DOCBOOKTOMAN)
122
mandos.8.xhtml: mandos.xml common.ent mandos-options.xml \
123
		overview.xml legalnotice.xml
124
	$(DOCBOOKTOHTML)
125
126
mandos-keygen.8: mandos-keygen.xml common.ent overview.xml \
127
		legalnotice.xml
128
	$(DOCBOOKTOMAN)
129
mandos-keygen.8.xhtml: mandos-keygen.xml common.ent overview.xml \
130
		 legalnotice.xml
131
	$(DOCBOOKTOHTML)
132
133
mandos.conf.5: mandos.conf.xml common.ent mandos-options.xml \
134
		legalnotice.xml
135
	$(DOCBOOKTOMAN)
136
mandos.conf.5.xhtml: mandos.conf.xml common.ent mandos-options.xml \
137
		legalnotice.xml
138
	$(DOCBOOKTOHTML)
139
140
plugin-runner.8mandos: plugin-runner.xml common.ent overview.xml \
141
		legalnotice.xml
142
	$(DOCBOOKTOMAN)
143
plugin-runner.8mandos.xhtml: plugin-runner.xml common.ent \
144
		overview.xml legalnotice.xml
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
145
	$(DOCBOOKTOHTML)
143 by Teddy Hogeborn
* Makefile (mandos.8): Add dependency on "overview.xml" and
146
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
147
plugins.d/mandos-client.8mandos: plugins.d/mandos-client.xml \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
148
					common.ent \
143 by Teddy Hogeborn
* Makefile (mandos.8): Add dependency on "overview.xml" and
149
					mandos-options.xml \
150
					overview.xml legalnotice.xml
91 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Include all DocBook-to-manpage-related
151
	$(DOCBOOKTOMAN)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
152
plugins.d/mandos-client.8mandos.xhtml: plugins.d/mandos-client.xml \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
153
					common.ent \
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
154
					mandos-options.xml \
155
					overview.xml legalnotice.xml
156
	$(DOCBOOKTOHTML)
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
157
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
158
# Update all these files with version number $(version)
159
common.ent: Makefile
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
160
	$(strip $(SED) --in-place \
318 by Teddy Hogeborn
* Makefile (common.ent): Update "version" entity correctly.
161
		--expression='s/^\(<!ENTITY version "\)[^"]*">$$/\1$(version)">/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
162
		$@)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
163
164
mandos: Makefile
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
165
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
166
		--expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
167
		$@)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
168
169
mandos-keygen: Makefile
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
170
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
171
		--expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
172
		$@)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
173
24.1.121 by Björn Påhlsson
mandos-ctl: Added support for all client calls
174
mandos-ctl: Makefile
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
175
	$(strip $(SED) --in-place \
240 by Teddy Hogeborn
Merge "mandos-list" from belorn.
176
		--expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
177
		$@)
240 by Teddy Hogeborn
Merge "mandos-list" from belorn.
178
233 by Teddy Hogeborn
* Makefile (all): Also depend on "mandos.lsm".
179
mandos.lsm: Makefile
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
180
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
181
		--expression='s/^\(Version:\).*/\1\t$(version)/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
182
		$@)
183
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
184
		--expression='s/^\(Entered-date:\).*/\1\t$(shell date --rfc-3339=date --reference=Makefile)/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
185
		$@)
186
	$(strip $(SED) --in-place \
255 by Teddy Hogeborn
* Makefile (mandos.lsm): Also update file name using version number.
187
		--expression='s/\(mandos_\)[0-9.]\+\(\.orig\.tar\.gz\)/\1$(version)\2/' \
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
188
		$@)
233 by Teddy Hogeborn
* Makefile (all): Also depend on "mandos.lsm".
189
398 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
190
plugins.d/mandos-client: plugins.d/mandos-client.c
191
	$(LINK.c) $(GNUTLS_LIBS) $(AVAHI_LIBS) $(GPGME_LIBS) $(strip\
192
		) $(COMMON) $^ $(LOADLIBES) $(LDLIBS) -o $@
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
193
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
194
.PHONY : all doc html clean distclean run-client run-server install \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
195
	install-server install-client uninstall uninstall-server \
196
	uninstall-client purge purge-server purge-client
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
197
1 by Björn Påhlsson
First working version with: IPv6, GnuTLS, X.509 certificates, DN
198
clean:
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
199
	-rm --force $(CPROGS) $(objects) $(htmldocs) $(DOCS) core
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
200
201
distclean: clean
202
mostlyclean: clean
203
maintainer-clean: clean
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
204
	-rm --force --recursive keydir confdir
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
205
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
206
check:	all
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
207
	./mandos --check
208
141 by Teddy Hogeborn
* Makefile (run-client): Add "--config-file=plugin-runner.conf".
209
# Run the client with a local config and key
159 by Teddy Hogeborn
* Makefile (run-client): Do not depend on the key ring files.
210
run-client: all keydir/seckey.txt keydir/pubkey.txt
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
211
	./plugin-runner --plugin-dir=plugins.d \
141 by Teddy Hogeborn
* Makefile (run-client): Add "--config-file=plugin-runner.conf".
212
		--config-file=plugin-runner.conf \
260 by Teddy Hogeborn
* Makefile (run-client): Pass $(CLIENTARGS) to plugin-runner.
213
		--options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
214
		$(CLIENTARGS)
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
215
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
216
# Used by run-client
217
keydir/seckey.txt keydir/pubkey.txt: mandos-keygen
218
	install --directory keydir
219
	./mandos-keygen --dir keydir --force
220
221
# Run the server with a local config
222
run-server: confdir/mandos.conf confdir/clients.conf
292 by Teddy Hogeborn
* Makefile (run-server): Use "--no-dbus" unconditionally.
223
	./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
224
225
# Used by run-server
226
confdir/mandos.conf: mandos.conf
227
	install --directory confdir
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
228
	install --mode=u=rw,go=r $^ $@
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
229
confdir/clients.conf: clients.conf keydir/seckey.txt
230
	install --directory confdir
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
231
	install --mode=u=rw $< $@
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
232
# Add a client password
233
	./mandos-keygen --dir keydir --password >> $@
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
234
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
235
install: install-server install-client-nokey
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
236
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
237
install-html: html
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
238
	install --directory $(htmldir)
239
	install --mode=u=rw,go=r --target-directory=$(htmldir) \
240
		$(htmldocs)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
241
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
242
install-server: doc
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
243
	install --directory $(CONFDIR)
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
244
	install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
245
	install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
246
		mandos.conf
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
247
	install --mode=u=rw --target-directory=$(CONFDIR) \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
248
		clients.conf
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
249
	install --mode=u=rwx,go=rx init.d-mandos \
250
		$(DESTDIR)/etc/init.d/mandos
251
	install --mode=u=rw,go=r default-mandos \
252
		$(DESTDIR)/etc/default/mandos
200 by Teddy Hogeborn
* Makefile: Put the init script before avahi-daemon.
253
	if [ -z $(DESTDIR) ]; then \
254
		update-rc.d mandos defaults 25 15;\
255
	fi
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
256
	gzip --best --to-stdout mandos.8 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
257
		> $(MANDIR)/man8/mandos.8.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
258
	gzip --best --to-stdout mandos.conf.5 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
259
		> $(MANDIR)/man5/mandos.conf.5.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
260
	gzip --best --to-stdout mandos-clients.conf.5 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
261
		> $(MANDIR)/man5/mandos-clients.conf.5.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
262
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
263
install-client-nokey: all doc
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
264
	install --directory $(PREFIX)/lib/mandos $(CONFDIR)
265
	install --directory --mode=u=rwx $(KEYDIR) \
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
266
		$(PREFIX)/lib/mandos/plugins.d
170 by Teddy Hogeborn
* Makefile (install-client): Add "/etc/plugins.d/README".
267
	if [ "$(CONFDIR)" != "$(PREFIX)/lib/mandos" ]; then \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
268
		install --mode=u=rwx \
199 by Teddy Hogeborn
* Makefile: Bug fix: fix syntax error.
269
			--directory "$(CONFDIR)/plugins.d"; \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
270
	fi
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
271
	install --mode=u=rwx,go=rx \
272
		--target-directory=$(PREFIX)/lib/mandos plugin-runner
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
273
	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
274
		mandos-keygen
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
275
	install --mode=u=rwx,go=rx \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
276
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
277
		plugins.d/password-prompt
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
278
	install --mode=u=rwxs,go=rx \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
279
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
280
		plugins.d/mandos-client
208 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/usplash".
281
	install --mode=u=rwxs,go=rx \
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
282
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
283
		plugins.d/usplash
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
284
	install --mode=u=rwxs,go=rx \
285
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
286
		plugins.d/splashy
214 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/askpass-fifo".
287
	install --mode=u=rwxs,go=rx \
288
		--target-directory=$(PREFIX)/lib/mandos/plugins.d \
289
		plugins.d/askpass-fifo
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
290
	install initramfs-tools-hook \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
291
		$(INITRAMFSTOOLS)/hooks/mandos
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
292
	install --mode=u=rw,go=r initramfs-tools-hook-conf \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
293
		$(INITRAMFSTOOLS)/conf-hooks.d/mandos
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
294
	install initramfs-tools-script \
302 by Teddy Hogeborn
* Makefile (install-client-nokey): Move "initramfs-tools-script" from
295
		$(INITRAMFSTOOLS)/scripts/init-premount/mandos
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
296
	install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
297
	gzip --best --to-stdout mandos-keygen.8 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
298
		> $(MANDIR)/man8/mandos-keygen.8.gz
299
	gzip --best --to-stdout plugin-runner.8mandos \
300
		> $(MANDIR)/man8/plugin-runner.8mandos.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
301
	gzip --best --to-stdout plugins.d/password-prompt.8mandos \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
302
		> $(MANDIR)/man8/password-prompt.8mandos.gz
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
303
	gzip --best --to-stdout plugins.d/mandos-client.8mandos \
304
		> $(MANDIR)/man8/mandos-client.8mandos.gz
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
305
	gzip --best --to-stdout plugins.d/usplash.8mandos \
306
		> $(MANDIR)/man8/usplash.8mandos.gz
307
	gzip --best --to-stdout plugins.d/splashy.8mandos \
308
		> $(MANDIR)/man8/splashy.8mandos.gz
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
309
	gzip --best --to-stdout plugins.d/askpass-fifo.8mandos \
310
		> $(MANDIR)/man8/askpass-fifo.8mandos.gz
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
311
312
install-client: install-client-nokey
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
313
# Post-installation stuff
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
314
	-$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
315
	update-initramfs -k all -u
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
316
	echo "Now run mandos-keygen --password --dir $(KEYDIR)"
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
317
318
uninstall: uninstall-server uninstall-client
319
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
320
uninstall-server:
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
321
	-rm --force $(PREFIX)/sbin/mandos \
322
		$(MANDIR)/man8/mandos.8.gz \
323
		$(MANDIR)/man5/mandos.conf.5.gz \
324
		$(MANDIR)/man5/mandos-clients.conf.5.gz
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
325
	update-rc.d -f mandos remove
163 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): Removed.
326
	-rmdir $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
327
328
uninstall-client:
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
329
# Refuse to uninstall client if /etc/crypttab is explicitly configured
330
# to use it.
331
	! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
332
		$(DESTDIR)/etc/crypttab
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
333
	-rm --force $(PREFIX)/sbin/mandos-keygen \
334
		$(PREFIX)/lib/mandos/plugin-runner \
335
		$(PREFIX)/lib/mandos/plugins.d/password-prompt \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
336
		$(PREFIX)/lib/mandos/plugins.d/mandos-client \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
337
		$(PREFIX)/lib/mandos/plugins.d/usplash \
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
338
		$(PREFIX)/lib/mandos/plugins.d/splashy \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
339
		$(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
340
		$(INITRAMFSTOOLS)/hooks/mandos \
341
		$(INITRAMFSTOOLS)/conf-hooks.d/mandos \
302 by Teddy Hogeborn
* Makefile (install-client-nokey): Move "initramfs-tools-script" from
342
		$(INITRAMFSTOOLS)/scripts/init-premount/mandos \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
343
		$(MANDIR)/man8/plugin-runner.8mandos.gz \
344
		$(MANDIR)/man8/mandos-keygen.8.gz \
345
		$(MANDIR)/man8/password-prompt.8mandos.gz \
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
346
		$(MANDIR)/man8/usplash.8mandos.gz \
347
		$(MANDIR)/man8/splashy.8mandos.gz \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
348
		$(MANDIR)/man8/askpass-fifo.8mandos.gz \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
349
		$(MANDIR)/man8/mandos-client.8mandos.gz
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
350
	-rmdir $(PREFIX)/lib/mandos/plugins.d $(CONFDIR)/plugins.d \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
351
		 $(PREFIX)/lib/mandos $(CONFDIR) $(KEYDIR)
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
352
	update-initramfs -k all -u
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
353
354
purge: purge-server purge-client
355
356
purge-server: uninstall-server
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
357
	-rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
358
		$(DESTDIR)/etc/default/mandos \
359
		$(DESTDIR)/etc/init.d/mandos \
360
		$(DESTDIR)/var/run/mandos.pid
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
361
	-rmdir $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
362
363
purge-client: uninstall-client
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
364
	-shred --remove $(KEYDIR)/seckey.txt
161 by Teddy Hogeborn
* Makefile (purge-client): Also remove "plugin-runner.conf".
365
	-rm --force $(CONFDIR)/plugin-runner.conf \
366
		$(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
367
	-rmdir $(KEYDIR) $(CONFDIR)/plugins.d $(CONFDIR)