/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 at bsnet
  • Date: 2010-08-16 19:00:59 UTC
  • mto: (237.2.183 mandos-local)
  • mto: This revision was merged to the branch mainline in revision 270.
  • Revision ID: teddy@fukt.bsnet.se-20100816190059-69vvi27up95cgbbl
* Makefile (run-server, run-client): Add notices about harmless error
                                     messages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
WARN=-O -Wall -Wformat=2 -Winit-self -Wmissing-include-dirs \
2
2
        -Wswitch-default -Wswitch-enum -Wunused-parameter \
3
 
        -Wstrict-aliasing=2 -Wextra -Wfloat-equal -Wundef -Wshadow \
 
3
        -Wstrict-aliasing=1 -Wextra -Wfloat-equal -Wundef -Wshadow \
4
4
        -Wunsafe-loop-optimizations -Wpointer-arith \
5
5
        -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings \
6
6
        -Wconversion -Wstrict-prototypes -Wold-style-definition \
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 -fPIC -fPIE
13
 
LINK_FORTIFY_LD=-z relro -fPIE
14
 
LINK_FORTIFY=-pie
 
12
FORTIFY=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC
 
13
LINK_FORTIFY_LD=-z relro -z now
 
14
LINK_FORTIFY=
 
15
ifndef BROKEN_PIE
 
16
FORTIFY += -fPIE
 
17
LINK_FORTIFY_LD += -fPIE
 
18
LINK_FORTIFY += -pie
 
19
endif
15
20
#COVERAGE=--coverage
16
21
OPTIMIZE=-Os
17
22
LANGUAGE=-std=gnu99
18
23
htmldir=man
19
 
version=1.0.5
 
24
version=1.0.14
20
25
SED=sed
21
26
 
22
27
## Use these settings for a traditional /usr/local install
35
40
INITRAMFSTOOLS=$(DESTDIR)/usr/share/initramfs-tools
36
41
##
37
42
 
38
 
GNUTLS_CFLAGS=$(shell libgnutls-config --cflags)
39
 
GNUTLS_LIBS=$(shell libgnutls-config --libs)
 
43
GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls)
 
44
GNUTLS_LIBS=$(shell pkg-config --libs gnutls)
40
45
AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core)
41
46
AVAHI_LIBS=$(shell pkg-config --libs avahi-core)
42
 
GPGME_CFLAGS=$(shell gpgme-config --cflags)
43
 
GPGME_LIBS=$(shell gpgme-config --libs)
 
47
GPGME_CFLAGS=$(shell gpgme-config --cflags; getconf LFS_CFLAGS)
 
48
GPGME_LIBS=$(shell gpgme-config --libs; getconf LFS_LIBS; \
 
49
        getconf LFS_LDFLAGS)
44
50
 
45
51
# Do not change these two
46
52
CFLAGS=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
151
157
# Update all these files with version number $(version)
152
158
common.ent: Makefile
153
159
        $(SED) --in-place \
154
 
                --expression='s/^\(<ENTITY VERSION "\)[^"]*">$$/\1$(version)"/' \
 
160
                --expression='s/^\(<!ENTITY version "\)[^"]*">$$/\1$(version)">/' \
155
161
                $@
156
162
 
157
163
mandos: Makefile
201
207
 
202
208
# Run the client with a local config and key
203
209
run-client: all keydir/seckey.txt keydir/pubkey.txt
 
210
        @echo "###################################################################"
 
211
        @echo "# The following error messages are harmless and can be safely     #"
 
212
        @echo "# ignored.  The messages are caused by not running as root, but   #"
 
213
        @echo "# you should NOT run \"make run-client\" as root unless you also    #"
 
214
        @echo "# unpacked and compiled Mandos as root, which is NOT recommended. #"
 
215
        @echo "# From plugin-runner: setuid: Operation not permitted             #"
 
216
        @echo "# From askpass-fifo:  mkfifo: Permission denied                   #"
 
217
        @echo "# From mandos-client: setuid: Operation not permitted             #"
 
218
        @echo "#                     seteuid: Operation not permitted            #"
 
219
        @echo "#                     klogctl: Operation not permitted            #"
 
220
        @echo "###################################################################"
204
221
        ./plugin-runner --plugin-dir=plugins.d \
205
222
                --config-file=plugin-runner.conf \
206
223
                --options-for=mandos-client:--seckey=keydir/seckey.txt,--pubkey=keydir/pubkey.txt \
213
230
 
214
231
# Run the server with a local config
215
232
run-server: confdir/mandos.conf confdir/clients.conf
216
 
        ./mandos --debug --configdir=confdir $(SERVERARGS)
 
233
        @echo "#################################################################"
 
234
        @echo "# NOTE: Please IGNORE errors about \"No permission to bind to    #"
 
235
        @echo "# interface\" or \"Could not open file u'/var/run/mandos.pid'\" -  #"
 
236
        @echo "# they are harmless and are caused by the server not running as #"
 
237
        @echo "# root.  Do NOT run \"make run-server\" server as root if you did #"
 
238
        @echo "# not also unpack and compile it as root.                       #"
 
239
        @echo "#################################################################"
 
240
        ./mandos --debug --no-dbus --configdir=confdir $(SERVERARGS)
217
241
 
218
242
# Used by run-server
219
243
confdir/mandos.conf: mandos.conf
285
309
        install --mode=u=rw,go=r initramfs-tools-hook-conf \
286
310
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos
287
311
        install initramfs-tools-script \
288
 
                $(INITRAMFSTOOLS)/scripts/local-top/mandos
 
312
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos
289
313
        install --mode=u=rw,go=r plugin-runner.conf $(CONFDIR)
290
314
        gzip --best --to-stdout mandos-keygen.8 \
291
315
                > $(MANDIR)/man8/mandos-keygen.8.gz
332
356
                $(PREFIX)/lib/mandos/plugins.d/askpass-fifo \
333
357
                $(INITRAMFSTOOLS)/hooks/mandos \
334
358
                $(INITRAMFSTOOLS)/conf-hooks.d/mandos \
335
 
                $(INITRAMFSTOOLS)/scripts/local-top/mandos \
 
359
                $(INITRAMFSTOOLS)/scripts/init-premount/mandos \
336
360
                $(MANDIR)/man8/plugin-runner.8mandos.gz \
337
361
                $(MANDIR)/man8/mandos-keygen.8.gz \
338
362
                $(MANDIR)/man8/password-prompt.8mandos.gz \