/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-09-05 07:11:24 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080905071124-9dq11jq5rfd6zfxf
* Makefile: Changed to use symbolic instead of octal modes throughout.
  (KEYDIR): New variable for the key directory.
  (install-server): Bug fix: remove "--parents" from install args.
  (install-client): Bug fix: - '' -  Also create key directory.  Do
                    not chmod plugin dir.  Create custom plugin directory
                    if not the same as normal plugin directory.  Add
                    "--dir" option to "mandos-keygen".  Add note about
                    running "mandos-keygen --password".
  (uninstall-server): Do not depend on the installed server binary,
                      since this made it impossible to do a purge
                      after an uninstall.
  (purge-client): Shred seckey.txt.  Use $(KEYDIR).

* README: Improved wording.

* initramfs-tools-hook: Use a loop to find prefix.  Also find keydir.
                        Remove "${DESTDIR}" from "copy_exec".  Do not
                        try to copy literal "*" if no custom plugins
                        are found.  Copy key files from keydir, not
                        config dir.  Only repair mode on directories
                        that actually exist.  Do not run chmod if
                        nothing needs repairing.

* plugin-runner.conf: New file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
KEYDIR=$(DESTDIR)/etc/keys/mandos
22
22
# MANDIR=/usr/local/man
23
23
MANDIR=$(DESTDIR)/usr/share/man
24
 
PIDDIR=/var/run/mandos
25
 
USER=nobody
26
 
GROUP=nogroup
27
24
 
28
25
GNUTLS_CFLAGS=$(shell libgnutls-config --cflags)
29
26
GNUTLS_LIBS=$(shell libgnutls-config --libs)
138
135
install-server: doc
139
136
        install --directory $(CONFDIR) $(MANDIR)/man5 \
140
137
                $(MANDIR)/man8
141
 
        install --mode=u=rwx,go=rx --owner=$(USER) --group=$(GROUP) \
142
 
                --directory $(PIDDIR)
143
138
        install --mode=u=rwx,go=rx mandos $(PREFIX)/sbin/mandos
144
 
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) \
145
 
                mandos.conf
 
139
        install --mode=u=rw,go=r --target-directory=$(CONFDIR) mandos.conf
146
140
        install --mode=u=rw,g=r --target-directory=$(CONFDIR) \
147
141
                clients.conf
148
 
        install --mode=u=rwx,go=rx init.d-mandos /etc/init.d/mandos
149
 
        install --mode=u=rw,go=r default-mandos /etc/default/mandos
150
 
        update-rc.d mandos defaults
151
142
        gzip --best --to-stdout mandos.8 \
152
143
                > $(MANDIR)/man8/mandos.8.gz
153
144
        gzip --best --to-stdout mandos.conf.5 \
159
150
        install --directory $(PREFIX)/lib/mandos $(CONFDIR) \
160
151
                $(MANDIR)/man8
161
152
        install --directory --mode=u=rwx $(KEYDIR)
162
 
        install --directory --mode=u=rwx \
163
 
                $(PREFIX)/lib/mandos/plugins.d
 
153
        install --directory --mode=u=rwx $(PREFIX)/lib/mandos/plugins.d
164
154
        if [ "$(CONFDIR)/plugins.d" \
165
155
                        != "$(PREFIX)/lib/mandos/plugins.d" ]; then \
166
156
                        install --directory "$(CONFDIR)/plugins.d"; \
167
157
                fi
168
 
        install --mode=u=rwx,go=rx \
169
 
                --target-directory=$(PREFIX)/lib/mandos plugin-runner
 
158
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/lib/mandos \
 
159
                plugin-runner
170
160
        install --mode=u=rwx,go=rx --target-directory=$(PREFIX)/sbin \
171
161
                mandos-keygen
172
162
        install --mode=u=rwx,go=rx \
204
194
                $(MANDIR)/man8/mandos.8.gz \
205
195
                $(MANDIR)/man5/mandos.conf.5.gz \
206
196
                $(MANDIR)/man5/mandos-clients.conf.5.gz
207
 
        update-rc.d -f mandos remove
208
 
        -rmdir $(CONFDIR) $(PIDDIR)
 
197
        -rmdir $(CONFDIR)
209
198
 
210
199
uninstall-client:
211
200
# Refuse to uninstall client if /etc/crypttab is explicitly configured
229
218
purge: purge-server purge-client
230
219
 
231
220
purge-server: uninstall-server
232
 
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf \
233
 
                /etc/default/mandos /etc/init.d/mandos
 
221
        -rm --force $(CONFDIR)/mandos.conf $(CONFDIR)/clients.conf
234
222
        -rmdir $(CONFDIR)
235
223
 
236
224
purge-client: uninstall-client
237
225
        -shred --remove $(KEYDIR)/seckey.txt
238
 
        -rm --force $(CONFDIR)/plugin-runner.conf \
239
 
                $(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt
 
226
        -rm --force $(KEYDIR)/pubkey.txt $(KEYDIR)/seckey.txt
240
227
        -rmdir $(KEYDIR) $(CONFDIR)/plugins.d $(CONFDIR)