/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
1
WARN:=-O -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self \
237.7.220 by Teddy Hogeborn
Update GCC warning flags and function attributes to GCC 4.7.
2
	-Wmissing-include-dirs -Wswitch-default -Wswitch-enum \
3
	-Wunused -Wuninitialized -Wstrict-overflow=5 \
4
	-Wsuggest-attribute=pure -Wsuggest-attribute=const \
5
	-Wsuggest-attribute=noreturn -Wfloat-equal -Wundef -Wshadow \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
6
	-Wunsafe-loop-optimizations -Wpointer-arith \
7
	-Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings \
237.7.220 by Teddy Hogeborn
Update GCC warning flags and function attributes to GCC 4.7.
8
	-Wconversion -Wlogical-op -Waggregate-return \
9
	-Wstrict-prototypes -Wold-style-definition \
10
	-Wmissing-format-attribute -Wnormalized=nfc -Wpacked \
11
	-Wredundant-decls -Wnested-externs -Winline -Wvla \
12
	-Wvolatile-register-var -Woverlength-strings
237.7.659 by Teddy Hogeborn
Only use sanitizing options when debugging
13
14
#DEBUG:=-ggdb3 -fsanitize=address $(SANITIZE)
15
## Check which sanitizing options can be used
16
#SANITIZE:=$(foreach option,$(ALL_SANITIZE_OPTIONS),$(shell \
17
#	echo 'int main(){}' | $(CC) --language=c $(option) \
18
#	/dev/stdin -o /dev/null >/dev/null 2>&1 && echo $(option)))
237.7.348 by Teddy Hogeborn
Use AddressSanitizer and UndefinedBehaviorSanitizer.
19
# <https://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/>
237.7.419 by Teddy Hogeborn
Makefile: Replace "-fsanitize=address" with "-fsanitize=leak"
20
ALL_SANITIZE_OPTIONS:=-fsanitize=leak -fsanitize=undefined \
237.7.365 by Teddy Hogeborn
Only use -fsanitize=... options if they work.
21
        -fsanitize=shift -fsanitize=integer-divide-by-zero \
22
        -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null \
23
        -fsanitize=return -fsanitize=signed-integer-overflow \
24
        -fsanitize=bounds -fsanitize=alignment \
25
        -fsanitize=object-size -fsanitize=float-divide-by-zero \
26
        -fsanitize=float-cast-overflow -fsanitize=nonnull-attribute \
27
        -fsanitize=returns-nonnull-attribute -fsanitize=bool \
237.7.665 by Teddy Hogeborn
Add another sanitizer option
28
        -fsanitize=enum -fsanitize-address-use-after-scope
237.7.659 by Teddy Hogeborn
Only use sanitizing options when debugging
29
30
# For info about _FORTIFY_SOURCE, see feature_test_macros(7)
31
# and <https://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>.
32
FORTIFY:=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
33
LINK_FORTIFY_LD:=-z relro -z now
34
LINK_FORTIFY:=
237.2.162 by Teddy Hogeborn
* Makefile (BROKEN_PIE): Add comment.
35
36
# If BROKEN_PIE is set, do not build with -pie
268 by Teddy Hogeborn
* Makefile: Don't use PIE if BROKEN_PIE is set.
37
ifndef BROKEN_PIE
38
FORTIFY += -fPIE
39
LINK_FORTIFY += -pie
40
endif
24.1.90 by Björn Påhlsson
fixed two bugs:
41
#COVERAGE=--coverage
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
42
OPTIMIZE:=-Os -fno-strict-aliasing
43
LANGUAGE:=-std=gnu11
44
htmldir:=man
383 by Teddy Hogeborn
* Makefile (version): Change to 1.8.4.
45
version:=1.8.4
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
46
SED:=sed
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
47
237.7.660 by Teddy Hogeborn
Makefile: Break long lines
48
USER:=$(firstword $(subst :, ,$(shell getent passwd _mandos \
49
	|| getent passwd nobody || echo 65534)))
50
GROUP:=$(firstword $(subst :, ,$(shell getent group _mandos \
51
	|| getent group nogroup || echo 65534)))
237.14.2 by Teddy Hogeborn
Directory with persistent state can now be changed with the "statedir"
52
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
53
## Use these settings for a traditional /usr/local install
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
54
# PREFIX:=$(DESTDIR)/usr/local
55
# CONFDIR:=$(DESTDIR)/etc/mandos
56
# KEYDIR:=$(DESTDIR)/etc/mandos/keys
57
# MANDIR:=$(PREFIX)/man
58
# INITRAMFSTOOLS:=$(DESTDIR)/etc/initramfs-tools
59
# STATEDIR:=$(DESTDIR)/var/lib/mandos
60
# LIBDIR:=$(PREFIX)/lib
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
61
##
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
62
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
63
## These settings are for a package-type install
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
64
PREFIX:=$(DESTDIR)/usr
65
CONFDIR:=$(DESTDIR)/etc/mandos
66
KEYDIR:=$(DESTDIR)/etc/keys/mandos
67
MANDIR:=$(PREFIX)/share/man
68
INITRAMFSTOOLS:=$(DESTDIR)/usr/share/initramfs-tools
69
STATEDIR:=$(DESTDIR)/var/lib/mandos
70
LIBDIR:=$(shell \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
71
	for d in \
72
	"/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null`" \
73
	"`rpm --eval='%{_libdir}' 2>/dev/null`" /usr/lib; do \
74
		if [ -d "$$d" -a "$$d" = "$${d%/}" ]; then \
75
			echo "$(DESTDIR)$$d"; \
76
			break; \
77
		fi; \
78
	done)
177 by Teddy Hogeborn
* Makefile (CONFDIR): Changed to be the same ("/etc/mandos") in both a
79
##
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
80
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
81
SYSTEMD:=$(DESTDIR)$(shell pkg-config systemd --variable=systemdsystemunitdir)
82
TMPFILES:=$(DESTDIR)$(shell pkg-config systemd --variable=tmpfilesdir)
237.7.186 by Teddy Hogeborn
Add systemd service support for Mandos server.
83
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
84
GNUTLS_CFLAGS:=$(shell pkg-config --cflags-only-I gnutls)
85
GNUTLS_LIBS:=$(shell pkg-config --libs gnutls)
86
AVAHI_CFLAGS:=$(shell pkg-config --cflags-only-I avahi-core)
87
AVAHI_LIBS:=$(shell pkg-config --libs avahi-core)
88
GPGME_CFLAGS:=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
89
GPGME_LIBS:=$(shell gpgme-config --libs; getconf LFS_LIBS; \
237.2.80 by Teddy Hogeborn
Use "getconf" to get correct LFS compile and link flags.
90
	getconf LFS_LDFLAGS)
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
91
LIBNL3_CFLAGS:=$(shell pkg-config --cflags-only-I libnl-route-3.0)
92
LIBNL3_LIBS:=$(shell pkg-config --libs libnl-route-3.0)
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
93
21 by Teddy Hogeborn
* Makefile (CFLAGS): Changed to use $(WARN), $(DEBUG), $(COVERAGE) and
94
# Do not change these two
237.7.659 by Teddy Hogeborn
Only use sanitizing options when debugging
95
CFLAGS+=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) \
237.7.497 by Teddy Hogeborn
Linking flags correction
96
	$(OPTIMIZE) $(LANGUAGE) -DVERSION='"$(version)"'
237.7.660 by Teddy Hogeborn
Makefile: Break long lines
97
LDFLAGS+=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(strip \
98
	) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
99
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
100
# Commands to format a DocBook <refentry> document into a manual page
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
101
DOCBOOKTOMAN=$(strip cd $(dir $<); xsltproc --nonet --xinclude \
62 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Do not generate AUTHORS section.
102
	--param man.charmap.use.subset		0 \
103
	--param make.year.ranges		1 \
104
	--param make.single.year.ranges		1 \
105
	--param man.output.quietly		1 \
84 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Use the local manpages/docbook.xsl file, do
106
	--param man.authors.section.enabled	0 \
237.7.143 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Don't show errors from "locale".
107
	/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
91 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Include all DocBook-to-manpage-related
108
	$(notdir $<); \
237.7.143 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Don't show errors from "locale".
109
	if locale --all 2>/dev/null | grep --regexp='^en_US\.utf8$$' \
110
	&& type man 2>/dev/null; then LANG=en_US.UTF-8 MANWIDTH=80 \
111
	man --warnings --encoding=UTF-8 --local-file $(notdir $@); \
112
	fi >/dev/null)
24.1.25 by Björn Påhlsson
* clients.conf.xml: Renamed to "mandos-clients.conf.xml".
113
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
114
DOCBOOKTOHTML=$(strip xsltproc --nonet --xinclude \
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
115
	--param make.year.ranges		1 \
116
	--param make.single.year.ranges		1 \
117
	--param man.output.quietly		1 \
118
	--param man.authors.section.enabled	0 \
119
	--param citerefentry.link		1 \
120
	--output $@ \
121
	/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
122
	$<; $(HTMLPOST) $@)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
123
# Fix citerefentry links
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
124
HTMLPOST:=$(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
125
	--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.
126
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
127
PLUGINS:=plugins.d/password-prompt plugins.d/mandos-client \
237.2.188 by Teddy Hogeborn
* Makefile: Compile and install new "plymouth" plugin.
128
	plugins.d/usplash plugins.d/splashy plugins.d/askpass-fifo \
129
	plugins.d/plymouth
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
130
PLUGIN_HELPERS:=plugin-helpers/mandos-client-iprouteadddel
131
CPROGS:=plugin-runner $(PLUGINS) $(PLUGIN_HELPERS)
132
PROGS:=mandos mandos-keygen mandos-ctl mandos-monitor $(CPROGS)
133
DOCS:=mandos.8 mandos-keygen.8 mandos-monitor.8 mandos-ctl.8 \
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
134
	mandos.conf.5 mandos-clients.conf.5 plugin-runner.8mandos \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
135
	plugins.d/mandos-client.8mandos \
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
136
	plugins.d/password-prompt.8mandos plugins.d/usplash.8mandos \
137
	plugins.d/splashy.8mandos plugins.d/askpass-fifo.8mandos \
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
138
	plugins.d/plymouth.8mandos intro.8mandos
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
139
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
140
htmldocs:=$(addsuffix .xhtml,$(DOCS))
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
141
237.7.466 by Teddy Hogeborn
Use "simply expanded" variables in Makefile
142
objects:=$(addsuffix .o,$(CPROGS))
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
143
233 by Teddy Hogeborn
* Makefile (all): Also depend on "mandos.lsm".
144
all: $(PROGS) mandos.lsm
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
145
146
doc: $(DOCS)
24.1.25 by Björn Påhlsson
* clients.conf.xml: Renamed to "mandos-clients.conf.xml".
147
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
148
html: $(htmldocs)
149
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
150
%.5: %.xml common.ent legalnotice.xml
151
	$(DOCBOOKTOMAN)
152
%.5.xhtml: %.xml common.ent legalnotice.xml
153
	$(DOCBOOKTOHTML)
154
155
%.8: %.xml common.ent legalnotice.xml
156
	$(DOCBOOKTOMAN)
157
%.8.xhtml: %.xml common.ent legalnotice.xml
158
	$(DOCBOOKTOHTML)
159
160
%.8mandos: %.xml common.ent legalnotice.xml
161
	$(DOCBOOKTOMAN)
162
%.8mandos.xhtml: %.xml common.ent legalnotice.xml
163
	$(DOCBOOKTOHTML)
164
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
165
intro.8mandos: intro.xml common.ent legalnotice.xml
166
	$(DOCBOOKTOMAN)
167
intro.8mandos.xhtml: intro.xml common.ent legalnotice.xml
168
	$(DOCBOOKTOHTML)
169
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
170
mandos.8: mandos.xml common.ent mandos-options.xml overview.xml \
171
		legalnotice.xml
172
	$(DOCBOOKTOMAN)
173
mandos.8.xhtml: mandos.xml common.ent mandos-options.xml \
174
		overview.xml legalnotice.xml
175
	$(DOCBOOKTOHTML)
176
177
mandos-keygen.8: mandos-keygen.xml common.ent overview.xml \
178
		legalnotice.xml
179
	$(DOCBOOKTOMAN)
180
mandos-keygen.8.xhtml: mandos-keygen.xml common.ent overview.xml \
181
		 legalnotice.xml
182
	$(DOCBOOKTOHTML)
183
237.2.193 by teddy at bsnet
* mandos-monitor.xml: New.
184
mandos-monitor.8: mandos-monitor.xml common.ent overview.xml \
185
		legalnotice.xml
186
	$(DOCBOOKTOMAN)
187
mandos-monitor.8.xhtml: mandos-monitor.xml common.ent overview.xml \
188
		 legalnotice.xml
189
	$(DOCBOOKTOHTML)
190
237.2.197 by teddy at bsnet
* mandos-ctl.xml: New.
191
mandos-ctl.8: mandos-ctl.xml common.ent overview.xml \
192
		legalnotice.xml
193
	$(DOCBOOKTOMAN)
194
mandos-ctl.8.xhtml: mandos-ctl.xml common.ent overview.xml \
195
		 legalnotice.xml
196
	$(DOCBOOKTOHTML)
197
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
198
mandos.conf.5: mandos.conf.xml common.ent mandos-options.xml \
199
		legalnotice.xml
200
	$(DOCBOOKTOMAN)
201
mandos.conf.5.xhtml: mandos.conf.xml common.ent mandos-options.xml \
202
		legalnotice.xml
203
	$(DOCBOOKTOHTML)
204
205
plugin-runner.8mandos: plugin-runner.xml common.ent overview.xml \
206
		legalnotice.xml
207
	$(DOCBOOKTOMAN)
208
plugin-runner.8mandos.xhtml: plugin-runner.xml common.ent \
209
		overview.xml legalnotice.xml
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
210
	$(DOCBOOKTOHTML)
143 by Teddy Hogeborn
* Makefile (mandos.8): Add dependency on "overview.xml" and
211
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
212
plugins.d/mandos-client.8mandos: plugins.d/mandos-client.xml \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
213
					common.ent \
143 by Teddy Hogeborn
* Makefile (mandos.8): Add dependency on "overview.xml" and
214
					mandos-options.xml \
215
					overview.xml legalnotice.xml
91 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN): Include all DocBook-to-manpage-related
216
	$(DOCBOOKTOMAN)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
217
plugins.d/mandos-client.8mandos.xhtml: plugins.d/mandos-client.xml \
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
218
					common.ent \
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
219
					mandos-options.xml \
220
					overview.xml legalnotice.xml
221
	$(DOCBOOKTOHTML)
16 by Teddy Hogeborn
* Makefile: Include targets for all binaries.
222
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
223
# Update all these files with version number $(version)
224
common.ent: Makefile
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
225
	$(strip $(SED) --in-place \
237.2.81 by Teddy Hogeborn
* Makefile (common.ent): Update "version" entity correctly.
226
		--expression='s/^\(<!ENTITY version "\)[^"]*">$$/\1$(version)">/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
227
		$@)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
228
229
mandos: Makefile
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
230
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
231
		--expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
232
		$@)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
233
234
mandos-keygen: Makefile
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
235
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
236
		--expression='s/^\(VERSION="\)[^"]*"$$/\1$(version)"/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
237
		$@)
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
238
24.1.121 by Björn Påhlsson
mandos-ctl: Added support for all client calls
239
mandos-ctl: Makefile
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
240
	$(strip $(SED) --in-place \
237.2.3 by Teddy Hogeborn
Merge "mandos-list" from belorn.
241
		--expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
242
		$@)
237.2.3 by Teddy Hogeborn
Merge "mandos-list" from belorn.
243
237.2.193 by teddy at bsnet
* mandos-monitor.xml: New.
244
mandos-monitor: Makefile
245
	$(strip $(SED) --in-place \
246
		--expression='s/^\(version = "\)[^"]*"$$/\1$(version)"/' \
247
		$@)
248
233 by Teddy Hogeborn
* Makefile (all): Also depend on "mandos.lsm".
249
mandos.lsm: Makefile
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
250
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
251
		--expression='s/^\(Version:\).*/\1\t$(version)/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
252
		$@)
253
	$(strip $(SED) --in-place \
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
254
		--expression='s/^\(Entered-date:\).*/\1\t$(shell date --rfc-3339=date --reference=Makefile)/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
255
		$@)
256
	$(strip $(SED) --in-place \
237.2.18 by Teddy Hogeborn
* Makefile (mandos.lsm): Also update file name using version number.
257
		--expression='s/\(mandos_\)[0-9.]\+\(\.orig\.tar\.gz\)/\1$(version)\2/' \
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
258
		$@)
233 by Teddy Hogeborn
* Makefile (all): Also depend on "mandos.lsm".
259
237.7.659 by Teddy Hogeborn
Only use sanitizing options when debugging
260
# Need to add the GnuTLS, Avahi and GPGME libraries
237.2.161 by Teddy Hogeborn
* Makefile (DOCBOOKTOMAN, DOCBOOKTOHTML, common.ent, mandos,
261
plugins.d/mandos-client: plugins.d/mandos-client.c
237.7.659 by Teddy Hogeborn
Only use sanitizing options when debugging
262
	$(LINK.c) $^ $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(strip\
237.7.662 by Teddy Hogeborn
Stop linking to librt
263
		) $(GPGME_CFLAGS) $(GNUTLS_LIBS) $(strip\
237.7.659 by Teddy Hogeborn
Only use sanitizing options when debugging
264
		) $(AVAHI_LIBS) $(GPGME_LIBS) $(LOADLIBES) $(strip\
265
		) $(LDLIBS) -o $@
81 by Teddy Hogeborn
* Makefile (GNUTLS_CFLAGS, GNUTLS_LIBS, AVAHI_CFLAGS, AVAHI_LIBS,
266
237.7.666 by Teddy Hogeborn
Client: Document requirement of libnl-route library
267
# Need to add the libnl-route library
237.25.4 by Teddy Hogeborn
Add plugin for mandos-client to add and delete local routes.
268
plugin-helpers/mandos-client-iprouteadddel: plugin-helpers/mandos-client-iprouteadddel.c
269
	$(LINK.c) $(LIBNL3_CFLAGS) $^ $(LIBNL3_LIBS) $(strip\
270
		) $(LOADLIBES) $(LDLIBS) -o $@
271
237.7.213 by Teddy Hogeborn
* Makefile (WARN): Re-add "-Wunreachable-code".
272
.PHONY : all doc html clean distclean mostlyclean maintainer-clean \
273
	check run-client run-server install install-html \
274
	install-server install-client-nokey install-client uninstall \
275
	uninstall-server uninstall-client purge purge-server \
276
	purge-client
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
277
1 by Björn Påhlsson
First working version with: IPv6, GnuTLS, X.509 certificates, DN
278
clean:
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
279
	-rm --force $(CPROGS) $(objects) $(htmldocs) $(DOCS) core
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
280
281
distclean: clean
282
mostlyclean: clean
283
maintainer-clean: clean
237.14.2 by Teddy Hogeborn
Directory with persistent state can now be changed with the "statedir"
284
	-rm --force --recursive keydir confdir statedir
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
285
237.7.664 by Teddy Hogeborn
Debian package change: Add autopkgtest support
286
check: all
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
287
	./mandos --check
237.7.156 by Teddy Hogeborn
* Makefile (check): Also check mandos-ctl.
288
	./mandos-ctl --check
237.7.664 by Teddy Hogeborn
Debian package change: Add autopkgtest support
289
	./mandos-keygen --version
290
	./plugin-runner --version
291
	./plugin-helpers/mandos-client-iprouteadddel --version
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
292
141 by Teddy Hogeborn
* Makefile (run-client): Add "--config-file=plugin-runner.conf".
293
# Run the client with a local config and key
237.7.510 by Teddy Hogeborn
Add support for using raw public keys in TLS (RFC 7250)
294
run-client: all keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem
269.2.1 by teddy at bsnet
* Makefile (run-server, run-client): Add notices about harmless error
295
	@echo "###################################################################"
296
	@echo "# The following error messages are harmless and can be safely     #"
237.7.433 by Teddy Hogeborn
Makefile: Clarify message when running client.
297
	@echo "# ignored:                                                        #"
237.7.254 by Teddy Hogeborn
mandos-client: Better error messages.
298
	@echo "# From plugin-runner: setgid: Operation not permitted             #"
299
	@echo "#                     setuid: Operation not permitted             #"
269.2.1 by teddy at bsnet
* Makefile (run-server, run-client): Add notices about harmless error
300
	@echo "# From askpass-fifo:  mkfifo: Permission denied                   #"
237.7.254 by Teddy Hogeborn
mandos-client: Better error messages.
301
	@echo "# From mandos-client:                                             #"
302
	@echo "#             Failed to raise privileges: Operation not permitted #"
303
	@echo "#             Warning: network hook \"*\" exited with status *      #"
237.7.433 by Teddy Hogeborn
Makefile: Clarify message when running client.
304
	@echo "#                                                                 #"
305
	@echo "# (The messages are caused by not running as root, but you should #"
306
	@echo "# NOT run \"make run-client\" as root unless you also unpacked and  #"
307
	@echo "# compiled Mandos as root, which is also NOT recommended.)        #"
269.2.1 by teddy at bsnet
* Makefile (run-server, run-client): Add notices about harmless error
308
	@echo "###################################################################"
237.7.254 by Teddy Hogeborn
mandos-client: Better error messages.
309
# We set GNOME_KEYRING_CONTROL to block pam_gnome_keyring
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
310
	./plugin-runner --plugin-dir=plugins.d \
237.25.1 by Teddy Hogeborn
Add a plugin helper directory, available to all plugins.
311
		--plugin-helper-dir=plugin-helpers \
141 by Teddy Hogeborn
* Makefile (run-client): Add "--config-file=plugin-runner.conf".
312
		--config-file=plugin-runner.conf \
237.7.510 by Teddy Hogeborn
Add support for using raw public keys in TLS (RFC 7250)
313
		--options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt,--tls-privkey=keydir/tls-privkey.pem,--tls-pubkey=keydir/tls-pubkey.pem,--network-hook-dir=network-hooks.d \
237.7.254 by Teddy Hogeborn
mandos-client: Better error messages.
314
		--env-for=mandos-client:GNOME_KEYRING_CONTROL= \
237.2.23 by Teddy Hogeborn
* Makefile (run-client): Pass $(CLIENTARGS) to plugin-runner.
315
		$(CLIENTARGS)
47 by Teddy Hogeborn
* plugbasedclient.c: Renamed to "mandos-client.c". All users changed.
316
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
317
# Used by run-client
237.7.510 by Teddy Hogeborn
Add support for using raw public keys in TLS (RFC 7250)
318
keydir/seckey.txt keydir/pubkey.txt keydir/tls-privkey.pem keydir/tls-pubkey.pem: mandos-keygen
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
319
	install --directory keydir
320
	./mandos-keygen --dir keydir --force
321
322
# Run the server with a local config
237.7.122 by Teddy Hogeborn
* mandos: White space and other misc. format fixes only.
323
run-server: confdir/mandos.conf confdir/clients.conf statedir
237.14.2 by Teddy Hogeborn
Directory with persistent state can now be changed with the "statedir"
324
	./mandos --debug --no-dbus --configdir=confdir \
325
		--statedir=statedir $(SERVERARGS)
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
326
327
# Used by run-server
328
confdir/mandos.conf: mandos.conf
329
	install --directory confdir
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
330
	install --mode=u=rw,go=r $^ $@
237.7.510 by Teddy Hogeborn
Add support for using raw public keys in TLS (RFC 7250)
331
confdir/clients.conf: clients.conf keydir/seckey.txt keydir/tls-pubkey.pem
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
332
	install --directory confdir
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
333
	install --mode=u=rw $< $@
104 by Teddy Hogeborn
* Makefile (maintainer-clean): Also remove "confdir".
334
# Add a client password
237.7.256 by Teddy Hogeborn
mandos-keygen: Generate "checker" option to use SSH fingerprints.
335
	./mandos-keygen --dir keydir --password --no-ssh >> $@
237.14.2 by Teddy Hogeborn
Directory with persistent state can now be changed with the "statedir"
336
statedir:
337
	install --directory statedir
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
338
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
339
install: install-server install-client-nokey
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
340
235 by Teddy Hogeborn
* INSTALL: Fixed typo.
341
install-html: html
217 by Teddy Hogeborn
* .bzrignore: Added "man" directory (created by "make install-html").
342
	install --directory $(htmldir)
343
	install --mode=u=rw,go=r --target-directory=$(htmldir) \
344
		$(htmldocs)
216 by Teddy Hogeborn
* Makefile: Add HTML rules for manual pages.
345
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
346
install-server: doc
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
347
	install --directory $(CONFDIR)
237.7.191 by Teddy Hogeborn
Don't require /var/lib/mandos to be installed with user & group.
348
	if install --directory --mode=u=rwx --owner=$(USER) \
349
		--group=$(GROUP) $(STATEDIR); then \
350
		:; \
351
	elif install --directory --mode=u=rwx $(STATEDIR); then \
352
		chown -- $(USER):$(GROUP) $(STATEDIR) || :; \
353
	fi
237.7.386 by Teddy Hogeborn
Server: New tmpfiles.d file for persistent state directory
354
	if [ "$(TMPFILES)" != "$(DESTDIR)" -a -d "$(TMPFILES)" ]; then \
237.7.390 by Teddy Hogeborn
Server: Do not set execute bit on tmpfiles.d/mandos.conf
355
		install --mode=u=rw,go=r tmpfiles.d-mandos.conf \
237.7.386 by Teddy Hogeborn
Server: New tmpfiles.d file for persistent state directory
356
			$(TMPFILES)/mandos.conf; \
357
	fi
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
358
	install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
237.2.193 by teddy at bsnet
* mandos-monitor.xml: New.
359
	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
360
		mandos-ctl
361
	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
362
		mandos-monitor
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
363
	install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
364
		mandos.conf
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
365
	install --mode=u=rw --target-directory=$(CONFDIR) \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
366
		clients.conf
237.6.1 by teddy at bsnet
* Makefile (install-server): Install dbus-mandos.conf as
367
	install --mode=u=rw,go=r dbus-mandos.conf \
368
		$(DESTDIR)/etc/dbus-1/system.d/mandos.conf
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
369
	install --mode=u=rwx,go=rx init.d-mandos \
370
		$(DESTDIR)/etc/init.d/mandos
237.7.186 by Teddy Hogeborn
Add systemd service support for Mandos server.
371
	if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \
237.7.187 by Teddy Hogeborn
Bug fix: Make sure systemd service file is installed.
372
		install --mode=u=rw,go=r mandos.service $(SYSTEMD); \
237.7.186 by Teddy Hogeborn
Add systemd service support for Mandos server.
373
	fi
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
374
	install --mode=u=rw,go=r default-mandos \
375
		$(DESTDIR)/etc/default/mandos
200 by Teddy Hogeborn
* Makefile: Put the init script before avahi-daemon.
376
	if [ -z $(DESTDIR) ]; then \
377
		update-rc.d mandos defaults 25 15;\
378
	fi
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
379
	gzip --best --to-stdout mandos.8 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
380
		> $(MANDIR)/man8/mandos.8.gz
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
381
	gzip --best --to-stdout mandos-monitor.8 \
382
		> $(MANDIR)/man8/mandos-monitor.8.gz
383
	gzip --best --to-stdout mandos-ctl.8 \
384
		> $(MANDIR)/man8/mandos-ctl.8.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
385
	gzip --best --to-stdout mandos.conf.5 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
386
		> $(MANDIR)/man5/mandos.conf.5.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
387
	gzip --best --to-stdout mandos-clients.conf.5 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
388
		> $(MANDIR)/man5/mandos-clients.conf.5.gz
237.7.97 by teddy at recompile
* Makefile (install-server): Add intro(8mandos) man page.
389
	gzip --best --to-stdout intro.8mandos \
390
		> $(MANDIR)/man8/intro.8mandos.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
391
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
392
install-client-nokey: all doc
237.7.188 by Teddy Hogeborn
Use architecture libdir.
393
	install --directory $(LIBDIR)/mandos $(CONFDIR)
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
394
	install --directory --mode=u=rwx $(KEYDIR) \
237.25.6 by Teddy Hogeborn
Fix minor bugs and typos and add some more debug output.
395
		$(LIBDIR)/mandos/plugins.d \
396
		$(LIBDIR)/mandos/plugin-helpers
237.7.188 by Teddy Hogeborn
Use architecture libdir.
397
	if [ "$(CONFDIR)" != "$(LIBDIR)/mandos" ]; then \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
398
		install --mode=u=rwx \
237.7.387 by Teddy Hogeborn
Client: Make plugin helper override directory mode u=rwx,go=
399
			--directory "$(CONFDIR)/plugins.d" \
400
			"$(CONFDIR)/plugin-helpers"; \
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
401
	fi
237.16.17 by Teddy Hogeborn
* Makefile (install-client-nokey): Create network hook directory.
402
	install --mode=u=rwx,go=rx --directory \
403
		"$(CONFDIR)/network-hooks.d"
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
404
	install --mode=u=rwx,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
405
		--target-directory=$(LIBDIR)/mandos plugin-runner
237.7.501 by Teddy Hogeborn
Adapt to changes in cryptsetup; use "cryptroot-unlock" program
406
	install --mode=u=rwx,go=rx \
407
		--target-directory=$(LIBDIR)/mandos mandos-to-cryptroot-unlock
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
408
	install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
409
		mandos-keygen
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
410
	install --mode=u=rwx,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
411
		--target-directory=$(LIBDIR)/mandos/plugins.d \
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
412
		plugins.d/password-prompt
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
413
	install --mode=u=rwxs,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
414
		--target-directory=$(LIBDIR)/mandos/plugins.d \
171 by Teddy Hogeborn
Renamed "password-request" to "mandos-client".
415
		plugins.d/mandos-client
208 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/usplash".
416
	install --mode=u=rwxs,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
417
		--target-directory=$(LIBDIR)/mandos/plugins.d \
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
418
		plugins.d/usplash
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
419
	install --mode=u=rwxs,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
420
		--target-directory=$(LIBDIR)/mandos/plugins.d \
205 by Teddy Hogeborn
* Makefile (PLUGINS, uninstall-client,
421
		plugins.d/splashy
214 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/askpass-fifo".
422
	install --mode=u=rwxs,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
423
		--target-directory=$(LIBDIR)/mandos/plugins.d \
214 by Teddy Hogeborn
* Makefile (PLUGINS): Added "plugins.d/askpass-fifo".
424
		plugins.d/askpass-fifo
237.2.188 by Teddy Hogeborn
* Makefile: Compile and install new "plymouth" plugin.
425
	install --mode=u=rwxs,go=rx \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
426
		--target-directory=$(LIBDIR)/mandos/plugins.d \
237.2.188 by Teddy Hogeborn
* Makefile: Compile and install new "plymouth" plugin.
427
		plugins.d/plymouth
237.7.384 by Teddy Hogeborn
Client: Fix permissions on plugin helper directory.
428
	install --mode=u=rwx,go=rx \
237.25.6 by Teddy Hogeborn
Fix minor bugs and typos and add some more debug output.
429
		--target-directory=$(LIBDIR)/mandos/plugin-helpers \
430
		plugin-helpers/mandos-client-iprouteadddel
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
431
	install initramfs-tools-hook \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
432
		$(INITRAMFSTOOLS)/hooks/mandos
237.7.502 by Teddy Hogeborn
Move UMASK setting to more proper place
433
	install --mode=u=rw,go=r initramfs-tools-conf \
434
		$(INITRAMFSTOOLS)/conf.d/mandos-conf
237.7.647 by Teddy Hogeborn
Installation: Fix UMASK even if set by some other initramfs hook
435
	install --mode=u=rw,go=r initramfs-tools-conf-hook \
436
		$(INITRAMFSTOOLS)/conf-hooks.d/zz-mandos
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
437
	install initramfs-tools-script \
237.2.65 by Teddy Hogeborn
* Makefile (install-client-nokey): Move "initramfs-tools-script" from
438
		$(INITRAMFSTOOLS)/scripts/init-premount/mandos
237.7.501 by Teddy Hogeborn
Adapt to changes in cryptsetup; use "cryptroot-unlock" program
439
	install initramfs-tools-script-stop \
440
		$(INITRAMFSTOOLS)/scripts/local-premount/mandos
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
441
	install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
442
	gzip --best --to-stdout mandos-keygen.8 \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
443
		> $(MANDIR)/man8/mandos-keygen.8.gz
444
	gzip --best --to-stdout plugin-runner.8mandos \
445
		> $(MANDIR)/man8/plugin-runner.8mandos.gz
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
446
	gzip --best --to-stdout plugins.d/mandos-client.8mandos \
447
		> $(MANDIR)/man8/mandos-client.8mandos.gz
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
448
	gzip --best --to-stdout plugins.d/password-prompt.8mandos \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
449
		> $(MANDIR)/man8/password-prompt.8mandos.gz
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
450
	gzip --best --to-stdout plugins.d/usplash.8mandos \
451
		> $(MANDIR)/man8/usplash.8mandos.gz
452
	gzip --best --to-stdout plugins.d/splashy.8mandos \
453
		> $(MANDIR)/man8/splashy.8mandos.gz
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
454
	gzip --best --to-stdout plugins.d/askpass-fifo.8mandos \
455
		> $(MANDIR)/man8/askpass-fifo.8mandos.gz
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
456
	gzip --best --to-stdout plugins.d/plymouth.8mandos \
457
		> $(MANDIR)/man8/plymouth.8mandos.gz
182 by Teddy Hogeborn
* Makefile (install): Use "install-client-nokey".
458
459
install-client: install-client-nokey
166 by Teddy Hogeborn
* Makefile (confdir/clients.conf): Tighten permissions to "u=rw".
460
# Post-installation stuff
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
461
	-$(PREFIX)/sbin/mandos-keygen --dir "$(KEYDIR)"
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
462
	update-initramfs -k all -u
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
463
	echo "Now run mandos-keygen --password --dir $(KEYDIR)"
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
464
465
uninstall: uninstall-server uninstall-client
466
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
467
uninstall-server:
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
468
	-rm --force $(PREFIX)/sbin/mandos \
237.2.193 by teddy at bsnet
* mandos-monitor.xml: New.
469
		$(PREFIX)/sbin/mandos-ctl \
470
		$(PREFIX)/sbin/mandos-monitor \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
471
		$(MANDIR)/man8/mandos.8.gz \
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
472
		$(MANDIR)/man8/mandos-monitor.8.gz \
473
		$(MANDIR)/man8/mandos-ctl.8.gz \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
474
		$(MANDIR)/man5/mandos.conf.5.gz \
475
		$(MANDIR)/man5/mandos-clients.conf.5.gz
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
476
	update-rc.d -f mandos remove
163 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): Removed.
477
	-rmdir $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
478
479
uninstall-client:
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
480
# Refuse to uninstall client if /etc/crypttab is explicitly configured
481
# to use it.
482
	! grep --regexp='^ *[^ #].*keyscript=[^,=]*/mandos/' \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
483
		$(DESTDIR)/etc/crypttab
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
484
	-rm --force $(PREFIX)/sbin/mandos-keygen \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
485
		$(LIBDIR)/mandos/plugin-runner \
486
		$(LIBDIR)/mandos/plugins.d/password-prompt \
487
		$(LIBDIR)/mandos/plugins.d/mandos-client \
488
		$(LIBDIR)/mandos/plugins.d/usplash \
489
		$(LIBDIR)/mandos/plugins.d/splashy \
490
		$(LIBDIR)/mandos/plugins.d/askpass-fifo \
491
		$(LIBDIR)/mandos/plugins.d/plymouth \
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
492
		$(INITRAMFSTOOLS)/hooks/mandos \
493
		$(INITRAMFSTOOLS)/conf-hooks.d/mandos \
237.2.65 by Teddy Hogeborn
* Makefile (install-client-nokey): Move "initramfs-tools-script" from
494
		$(INITRAMFSTOOLS)/scripts/init-premount/mandos \
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
495
		$(MANDIR)/man8/mandos-keygen.8.gz \
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
496
		$(MANDIR)/man8/plugin-runner.8mandos.gz \
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
497
		$(MANDIR)/man8/mandos-client.8mandos.gz
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
498
		$(MANDIR)/man8/password-prompt.8mandos.gz \
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
499
		$(MANDIR)/man8/usplash.8mandos.gz \
500
		$(MANDIR)/man8/splashy.8mandos.gz \
226 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/askpass-fifo.8mandos".
501
		$(MANDIR)/man8/askpass-fifo.8mandos.gz \
237.2.198 by teddy at bsnet
* Makefile (DOCS): Added "plymouth.8mandos".
502
		$(MANDIR)/man8/plymouth.8mandos.gz \
237.7.188 by Teddy Hogeborn
Use architecture libdir.
503
	-rmdir $(LIBDIR)/mandos/plugins.d $(CONFDIR)/plugins.d \
504
		 $(LIBDIR)/mandos $(CONFDIR) $(KEYDIR)
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
505
	update-initramfs -k all -u
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
506
507
purge: purge-server purge-client
508
509
purge-server: uninstall-server
162 by Teddy Hogeborn
* Makefile (PIDDIR, USER, GROUP): New variables.
510
	-rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
237.6.1 by teddy at bsnet
* Makefile (install-server): Install dbus-mandos.conf as
511
		$(DESTDIR)/etc/dbus-1/system.d/mandos.conf
175 by Teddy Hogeborn
* Makefile: Clearly separate "local" install variable settings from
512
		$(DESTDIR)/etc/default/mandos \
513
		$(DESTDIR)/etc/init.d/mandos \
237.7.186 by Teddy Hogeborn
Add systemd service support for Mandos server.
514
		$(SYSTEMD)/mandos.service \
237.7.185 by Teddy Hogeborn
Fix fallback to /var/run if /run does not exist for Makefile.
515
		$(DESTDIR)/run/mandos.pid \
516
		$(DESTDIR)/var/run/mandos.pid
74 by Teddy Hogeborn
* Makefile (PREFIX, CONFDIR): New.
517
	-rmdir $(CONFDIR)
67 by Teddy Hogeborn
* mandos-keygen: New program to generate new client keys on
518
519
purge-client: uninstall-client
237.7.510 by Teddy Hogeborn
Add support for using raw public keys in TLS (RFC 7250)
520
	-shred --remove $(KEYDIR)/seckey.txt $(KEYDIR)/tls-privkey.pem
161 by Teddy Hogeborn
* Makefile (purge-client): Also remove "plugin-runner.conf".
521
	-rm --force $(CONFDIR)/plugin-runner.conf \
237.7.510 by Teddy Hogeborn
Add support for using raw public keys in TLS (RFC 7250)
522
		$(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt \
523
		$(KEYDIR)/tls-pubkey.txt $(KEYDIR)/tls-privkey.txt
160 by Teddy Hogeborn
* Makefile: Changed to use symbolic instead of octal modes throughout.
524
	-rmdir $(KEYDIR) $(CONFDIR)/plugins.d $(CONFDIR)