aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in303
1 files changed, 142 insertions, 161 deletions
diff --git a/Makefile.in b/Makefile.in
index be5ab837f..c94d8c7a4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,3 @@
1all: apps man filters
2MYLIBS = src/lib
3APPS = src/firejail src/firemon src/firecfg src/libtrace src/libtracelog src/ftee src/faudit src/fnet src/fseccomp src/fbuilder src/fcopy src/fldd src/libpostexecseccomp
4MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5
5SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.64 seccomp.block_secondary seccomp.mdwx
6
7prefix=@prefix@ 1prefix=@prefix@
8exec_prefix=@exec_prefix@ 2exec_prefix=@exec_prefix@
9bindir=@bindir@ 3bindir=@bindir@
@@ -16,43 +10,75 @@ VERSION=@PACKAGE_VERSION@
16NAME=@PACKAGE_NAME@ 10NAME=@PACKAGE_NAME@
17PACKAGE_TARNAME=@PACKAGE_TARNAME@ 11PACKAGE_TARNAME=@PACKAGE_TARNAME@
18DOCDIR=@docdir@ 12DOCDIR=@docdir@
19HAVE_SECCOMP=@HAVE_SECCOMP@
20HAVE_APPARMOR=@HAVE_APPARMOR@ 13HAVE_APPARMOR=@HAVE_APPARMOR@
21HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@ 14HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@
22HAVE_GIT_INSTALL=@HAVE_GIT_INSTALL@
23BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ 15BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@
16HAVE_SUID=@HAVE_SUID@
17HAVE_MAN=@HAVE_MAN@
24 18
25uids.h:; ./mkuid.sh 19ifneq ($(HAVE_MAN),no)
26 20MAN_TARGET = man
27.PHONY: mylibs $(MYLIBS) 21MAN_SRC = src/man
28mylibs: $(MYLIBS) uids.h 22endif
29$(MYLIBS):
30 $(MAKE) -C $@
31 23
32.PHONY: apps $(APPS) 24COMPLETIONDIRS = src/zsh_completion src/bash_completion
33apps: $(APPS) 25
34$(APPS): $(MYLIBS) uids.h 26.PHONY: all
27all: all_items mydirs $(MAN_TARGET) filters
28APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailcheck/jailcheck
29SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee src/fids/fids
30SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter
31MYDIRS = src/lib $(MAN_SRC) $(COMPLETIONDIRS)
32MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so
33COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion
34MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 jailcheck.1
35SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp
36SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32
37ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS)
38
39.PHONY: all_items $(ALL_ITEMS)
40all_items: $(ALL_ITEMS)
41$(ALL_ITEMS): $(MYDIRS)
42 $(MAKE) -C $(dir $@)
43
44.PHONY: mydirs $(MYDIRS)
45mydirs: $(MYDIRS)
46$(MYDIRS):
35 $(MAKE) -C $@ 47 $(MAKE) -C $@
36 48
37$(MANPAGES): $(wildcard src/man/*.txt) 49$(MANPAGES): src/man
38 ./mkman.sh $(VERSION) src/man/$(basename $@).txt $@ 50 ./mkman.sh $(VERSION) src/man/$(basename $@).man $@
39 51
40man: $(MANPAGES) 52man: $(MANPAGES)
41 53
42filters: src/fseccomp 54filters: $(SECCOMP_FILTERS) $(SBOX_APPS_NON_DUMPABLE)
43ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) 55seccomp: src/fseccomp/fseccomp src/fsec-optimize/fsec-optimize
44 src/fseccomp/fseccomp default seccomp 56 src/fseccomp/fseccomp default seccomp
57 src/fsec-optimize/fsec-optimize seccomp
58
59seccomp.debug: src/fseccomp/fseccomp src/fsec-optimize/fsec-optimize
45 src/fseccomp/fseccomp default seccomp.debug allow-debuggers 60 src/fseccomp/fseccomp default seccomp.debug allow-debuggers
61 src/fsec-optimize/fsec-optimize seccomp.debug
62
63seccomp.32: src/fseccomp/fseccomp src/fsec-optimize/fsec-optimize
46 src/fseccomp/fseccomp secondary 32 seccomp.32 64 src/fseccomp/fseccomp secondary 32 seccomp.32
47 src/fseccomp/fseccomp secondary 64 seccomp.64 65 src/fsec-optimize/fsec-optimize seccomp.32
66
67seccomp.block_secondary: src/fseccomp/fseccomp
48 src/fseccomp/fseccomp secondary block seccomp.block_secondary 68 src/fseccomp/fseccomp secondary block seccomp.block_secondary
69
70seccomp.mdwx: src/fseccomp/fseccomp
49 src/fseccomp/fseccomp memory-deny-write-execute seccomp.mdwx 71 src/fseccomp/fseccomp memory-deny-write-execute seccomp.mdwx
50endif
51 72
73seccomp.mdwx.32: src/fseccomp/fseccomp
74 src/fseccomp/fseccomp memory-deny-write-execute.32 seccomp.mdwx.32
75
76.PHONY: clean
52clean: 77clean:
53 for dir in $(APPS) $(MYLIBS); do \ 78 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \
54 $(MAKE) -C $$dir clean; \ 79 $(MAKE) -C $$dir clean; \
55 done 80 done
81 $(MAKE) -C test clean
56 rm -f $(MANPAGES) $(MANPAGES:%=%.gz) firejail*.rpm 82 rm -f $(MANPAGES) $(MANPAGES:%=%.gz) firejail*.rpm
57 rm -f $(SECCOMP_FILTERS) 83 rm -f $(SECCOMP_FILTERS)
58 rm -f test/utils/index.html* 84 rm -f test/utils/index.html*
@@ -67,132 +93,114 @@ clean:
67 rm -f test/sysutils/firejail_t* 93 rm -f test/sysutils/firejail_t*
68 cd test/compile; ./compile.sh --clean; cd ../.. 94 cd test/compile; ./compile.sh --clean; cd ../..
69 95
96.PHONY: distclean
70distclean: clean 97distclean: clean
71 for dir in $(APPS) $(MYLIBS); do \ 98 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \
72 $(MAKE) -C $$dir distclean; \ 99 $(MAKE) -C $$dir distclean; \
73 done 100 done
74 rm -fr Makefile autom4te.cache config.log config.status config.h uids.h 101 $(MAKE) -C test distclean
102 rm -fr Makefile autom4te.cache config.log config.status config.h src/common.mk mkdeb.sh
75 103
76realinstall: 104realinstall:
77 # firejail executable 105 # firejail executable
78 install -m 0755 -d $(DESTDIR)/$(bindir) 106 install -m 0755 -d $(DESTDIR)$(bindir)
79 install -c -m 0755 src/firejail/firejail $(DESTDIR)/$(bindir)/. 107 install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir)
80 chmod u+s $(DESTDIR)/$(bindir)/firejail 108ifeq ($(HAVE_SUID),yes)
109 chmod u+s $(DESTDIR)$(bindir)/firejail
110endif
81 # firemon executable 111 # firemon executable
82 install -c -m 0755 src/firemon/firemon $(DESTDIR)/$(bindir)/. 112 install -m 0755 src/firemon/firemon $(DESTDIR)$(bindir)
83 # firecfg executable 113 # firecfg executable
84 install -c -m 0755 src/firecfg/firecfg $(DESTDIR)/$(bindir)/. 114 install -m 0755 src/firecfg/firecfg $(DESTDIR)$(bindir)
115 # jailcheck executable
116 install -m 0755 src/jailcheck/jailcheck $(DESTDIR)$(bindir)
85 # libraries and plugins 117 # libraries and plugins
86 install -m 0755 -d $(DESTDIR)/$(libdir)/firejail 118 install -m 0755 -d $(DESTDIR)$(libdir)/firejail
87 install -c -m 0644 src/libtrace/libtrace.so $(DESTDIR)/$(libdir)/firejail/. 119 install -m 0644 -t $(DESTDIR)$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS) src/firecfg/firecfg.config
88 install -c -m 0644 src/libtracelog/libtracelog.so $(DESTDIR)/$(libdir)/firejail/. 120 install -m 0755 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS)
89 install -c -m 0644 src/libpostexecseccomp/libpostexecseccomp.so $(DESTDIR)/$(libdir)/firejail/. 121 # plugins w/o read permission (non-dumpable)
90 install -c -m 0755 src/ftee/ftee $(DESTDIR)/$(libdir)/firejail/. 122 install -m 0711 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS_NON_DUMPABLE)
91 install -c -m 0755 src/fshaper/fshaper.sh $(DESTDIR)/$(libdir)/firejail/. 123 install -m 0711 -t $(DESTDIR)$(libdir)/firejail src/fshaper/fshaper.sh
92ifeq ($(HAVE_GIT_INSTALL),-DHAVE_GIT_INSTALL)
93 install -c -m 0755 src/fgit/fgit-install.sh $(DESTDIR)/$(libdir)/firejail/.
94 install -c -m 0755 src/fgit/fgit-uninstall.sh $(DESTDIR)/$(libdir)/firejail/.
95endif
96
97 install -c -m 0644 src/firecfg/firecfg.config $(DESTDIR)/$(libdir)/firejail/.
98 install -c -m 0755 src/faudit/faudit $(DESTDIR)/$(libdir)/firejail/.
99 install -c -m 0755 src/fnet/fnet $(DESTDIR)/$(libdir)/firejail/.
100 install -c -m 0755 src/fcopy/fcopy $(DESTDIR)/$(libdir)/firejail/.
101 install -c -m 0755 src/fldd/fldd $(DESTDIR)/$(libdir)/firejail/.
102 install -c -m 0755 src/fbuilder/fbuilder $(DESTDIR)/$(libdir)/firejail/.
103ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP)
104 install -c -m 0755 src/fseccomp/fseccomp $(DESTDIR)/$(libdir)/firejail/.
105 install -c -m 0644 seccomp $(DESTDIR)/$(libdir)/firejail/.
106 install -c -m 0644 seccomp.debug $(DESTDIR)/$(libdir)/firejail/.
107 install -c -m 0644 seccomp.32 $(DESTDIR)/$(libdir)/firejail/.
108 install -c -m 0644 seccomp.64 $(DESTDIR)/$(libdir)/firejail/.
109 install -c -m 0644 seccomp.block_secondary $(DESTDIR)/$(libdir)/firejail/.
110 install -c -m 0644 seccomp.mdwx $(DESTDIR)/$(libdir)/firejail/.
111endif
112ifeq ($(HAVE_CONTRIB_INSTALL),yes) 124ifeq ($(HAVE_CONTRIB_INSTALL),yes)
113 install -c -m 0755 contrib/fix_private-bin.py $(DESTDIR)/$(libdir)/firejail/. 125 # contrib scripts
114 install -c -m 0755 contrib/fjclip.py $(DESTDIR)/$(libdir)/firejail/. 126 install -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh
115 install -c -m 0755 contrib/fjdisplay.py $(DESTDIR)/$(libdir)/firejail/. 127 # vim syntax
116 install -c -m 0755 contrib/fjresize.py $(DESTDIR)/$(libdir)/firejail/. 128 install -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect
117 install -c -m 0755 contrib/fj-mkdeb.py $(DESTDIR)/$(libdir)/firejail/. 129 install -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax
130 install -m 0644 contrib/vim/ftdetect/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect
131 install -m 0644 contrib/vim/syntax/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax
118endif 132endif
119 # documents 133 # documents
120 install -m 0755 -d $(DESTDIR)/$(DOCDIR) 134 install -m 0755 -d $(DESTDIR)$(DOCDIR)
121 install -c -m 0644 COPYING $(DESTDIR)/$(DOCDIR)/. 135 install -m 0644 -t $(DESTDIR)$(DOCDIR) COPYING README RELNOTES etc/templates/*
122 install -c -m 0644 README $(DESTDIR)/$(DOCDIR)/. 136 # profiles and settings
123 install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/. 137 install -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail
124 # etc files 138 install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config etc/ids.config
125 ./mketc.sh $(sysconfdir) $(BUSYBOX_WORKAROUND)
126 install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail
127 for file in .etc/* etc/firejail.config; do \
128 install -c -m 0644 $$file $(DESTDIR)/$(sysconfdir)/firejail; \
129 done
130 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" 139 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;"
131 rm -fr .etc 140ifeq ($(BUSYBOX_WORKAROUND),yes)
141 ./mketc.sh $(DESTDIR)$(sysconfdir)/firejail/disable-common.inc
142endif
132ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) 143ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)
133 # install apparmor profile 144 # install apparmor profile
134 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;" 145 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;"
135 install -c -m 0644 etc/firejail-default $(DESTDIR)/$(sysconfdir)/apparmor.d/. 146 install -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d
136 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;" 147 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;"
137 install -c -m 0644 etc/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/. 148 # install apparmor profile customization file
149 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default ]; then install -c -m 0644 etc/apparmor/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default; fi;"
138endif 150endif
151ifneq ($(HAVE_MAN),no)
139 # man pages 152 # man pages
140 install -m 0755 -d $(DESTDIR)/$(mandir)/man1 153 install -m 0755 -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5
141 install -m 0755 -d $(DESTDIR)/$(mandir)/man5
142 for man in $(MANPAGES); do \ 154 for man in $(MANPAGES); do \
143 rm -f $$man.gz; \ 155 rm -f $$man.gz; \
144 gzip -9n $$man; \ 156 gzip -9n $$man; \
145 case "$$man" in \ 157 case "$$man" in \
146 *.1) install -c -m 0644 $$man.gz $(DESTDIR)/$(mandir)/man1/; ;; \ 158 *.1) install -m 0644 $$man.gz $(DESTDIR)$(mandir)/man1/; ;; \
147 *.5) install -c -m 0644 $$man.gz $(DESTDIR)/$(mandir)/man5/; ;; \ 159 *.5) install -m 0644 $$man.gz $(DESTDIR)$(mandir)/man5/; ;; \
148 esac; \ 160 esac; \
149 done 161 done
150 rm -f $(MANPAGES) $(MANPAGES:%=%.gz) 162 rm -f $(MANPAGES) $(MANPAGES:%=%.gz)
163endif
151 # bash completion 164 # bash completion
152 install -m 0755 -d $(DESTDIR)/$(datarootdir)/bash-completion/completions 165 install -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions
153 install -c -m 0644 src/bash_completion/firejail.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail 166 install -m 0644 src/bash_completion/firejail.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail
154 install -c -m 0644 src/bash_completion/firemon.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firemon 167 install -m 0644 src/bash_completion/firemon.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon
155 install -c -m 0644 src/bash_completion/firecfg.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg 168 install -m 0644 src/bash_completion/firecfg.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg
169 # zsh completion
170 install -m 0755 -d $(DESTDIR)$(datarootdir)/zsh/site-functions
171 install -m 0644 src/zsh_completion/_firejail $(DESTDIR)$(datarootdir)/zsh/site-functions/
156 172
157install: all 173install: all
158 $(MAKE) realinstall 174 $(MAKE) realinstall
159 175
160install-strip: all 176install-strip: all
161 strip src/firejail/firejail 177 strip $(ALL_ITEMS)
162 strip src/firemon/firemon
163 strip src/firecfg/firecfg
164 strip src/libtrace/libtrace.so
165 strip src/libtracelog/libtracelog.so
166 strip src/libpostexecseccomp/libpostexecseccomp.so
167 strip src/ftee/ftee
168 strip src/faudit/faudit
169 strip src/fnet/fnet
170 strip src/fseccomp/fseccomp
171 strip src/fcopy/fcopy
172 strip src/fldd/fldd
173 strip src/fbuilder/fbuilder
174 $(MAKE) realinstall 178 $(MAKE) realinstall
175 179
176uninstall: 180uninstall:
177 rm -f $(DESTDIR)/$(bindir)/firejail 181 rm -f $(DESTDIR)$(bindir)/firejail
178 rm -f $(DESTDIR)/$(bindir)/firemon 182 rm -f $(DESTDIR)$(bindir)/firemon
179 rm -f $(DESTDIR)/$(bindir)/firecfg 183 rm -f $(DESTDIR)$(bindir)/firecfg
180 rm -fr $(DESTDIR)/$(libdir)/firejail 184 rm -fr $(DESTDIR)$(libdir)/firejail
181 rm -fr $(DESTDIR)/$(datarootdir)/doc/firejail 185 rm -fr $(DESTDIR)$(libdir)/jailcheck
186 rm -fr $(DESTDIR)$(datarootdir)/doc/firejail
182 for man in $(MANPAGES); do \ 187 for man in $(MANPAGES); do \
183 rm -f $(DESTDIR)/$(mandir)/man5/$$man*; \ 188 rm -f $(DESTDIR)$(mandir)/man5/$$man*; \
184 rm -f $(DESTDIR)/$(mandir)/man1/$$man*; \ 189 rm -f $(DESTDIR)$(mandir)/man1/$$man*; \
185 done 190 done
186 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail 191 rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail
187 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firemon 192 rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon
188 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg 193 rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg
194 @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)$(sysconfdir)/firejail', see #2038."
189 195
190DISTFILES = "src etc platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES" 196DISTFILES = "src etc m4 platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh.in COPYING README RELNOTES"
191DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils test/chroot" 197DISTFILES_TEST = "test/Makefile.in test/apps test/apps-x11 test/apps-x11-xorg test/root test/private-lib test/fnetfilter test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils test/chroot"
192 198
193dist: 199dist:
194 mv config.status config.status.old 200 mv config.status config.status.old
201 mv mkdeb.sh mkdeb.sh.old
195 make distclean 202 make distclean
203 mv mkdeb.sh.old mkdeb.sh
196 mv config.status.old config.status 204 mv config.status.old config.status
197 rm -fr $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.xz 205 rm -fr $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.xz
198 mkdir -p $(NAME)-$(VERSION)/test 206 mkdir -p $(NAME)-$(VERSION)/test
@@ -206,107 +214,80 @@ dist:
206asc:; ./mkasc.sh $(VERSION) 214asc:; ./mkasc.sh $(VERSION)
207 215
208deb: dist 216deb: dist
209 ./mkdeb.sh $(NAME) $(VERSION) 217 ./mkdeb.sh
210
211snap: all
212 cd platform/snap; ./snap.sh
213 218
214install-snap: snap 219deb-apparmor: dist
215 sudo snap remove faudit; sudo snap install faudit*.snap 220 ./mkdeb.sh -apparmor
216 221
217test-compile: dist 222test-compile: dist
218 cd test/compile; ./compile.sh $(NAME)-$(VERSION) 223 cd test/compile; ./compile.sh $(NAME)-$(VERSION)
219 224
220.PHONY: rpms 225.PHONY: rpms
221rpms: 226rpms: src/man
222 ./platform/rpm/mkrpm.sh $(NAME) $(VERSION) 227 ./platform/rpm/mkrpm.sh $(NAME) $(VERSION)
223 228
224extras: all 229extras: all
225 $(MAKE) -C extras/firetools 230 $(MAKE) -C extras/firetools
226 231
227cppcheck: clean 232cppcheck: clean
228 cppcheck --force . 233 cppcheck --force --error-exitcode=1 --enable=warning,performance .
229 234
230scan-build: clean 235scan-build: clean
231 scan-build make 236 NO_EXTRA_CFLAGS="yes" scan-build make
232
233 237
234# 238#
235# make test 239# make test
236# 240#
237 241
242TESTS=profiles private-lib apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter
243TEST_TARGETS=$(patsubst %,test-%,$(TESTS))
238 244
239test-profiles: 245$(TEST_TARGETS):
240 cd test/profiles; ./profiles.sh | grep TESTING 246 $(MAKE) -C test $(subst test-,,$@)
241
242test-apps:
243 cd test/apps; ./apps.sh | grep TESTING
244
245test-apps-x11:
246 cd test/apps-x11; ./apps-x11.sh | grep TESTING
247
248test-apps-x11-xorg:
249 cd test/apps-x11-xorg; ./apps-x11-xorg.sh | grep TESTING
250
251test-sysutils:
252 cd test/sysutils; ./sysutils.sh | grep TESTING
253
254test-utils:
255 cd test/utils; ./utils.sh | grep TESTING
256 247
257test-environment: 248test: test-profiles test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters
258 cd test/environment; ./environment.sh | grep TESTING 249 echo "TEST COMPLETE"
259
260test-filters:
261ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP)
262 cd test/filters; ./filters.sh | grep TESTING
263endif
264
265test-arguments:
266 cd test/arguments; ./arguments.sh | grep TESTING
267
268test-fs:
269 cd test/fs; ./fs.sh | grep TESTING
270
271test-fcopy:
272 cd test/fcopy; ./fcopy.sh | grep TESTING
273 250
274test: test-profiles test-fcopy test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments 251test-noprofiles: test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters
275 echo "TEST COMPLETE" 252 echo "TEST COMPLETE"
276 253
277test-travis: test-profiles test-fcopy test-fs test-utils test-sysutils test-environment test-filters test-arguments 254test-github: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment
278 echo "TEST COMPLETE" 255 echo "TEST COMPLETE"
279 256
280########################################## 257##########################################
281# Individual tests, some of them require root access 258# Individual tests, some of them require root access
282# The tests are very intrussive, by the time you are done 259# The tests are very intrusive, by the time you are done
283# with them you will need to restart your computer. 260# with them you will need to restart your computer.
284########################################## 261##########################################
285 262
263# a firejail-test account is required, public/private key setup
264test-ssh:
265 $(MAKE) -C test $(subst test-,,$@)
266
286# requires root access 267# requires root access
287test-chroot: 268test-chroot:
288 cd test/chroot; ./chroot.sh | grep testing 269 $(MAKE) -C test $(subst test-,,$@)
289 270
290# Huge appimage files, not included in "make dist" archive 271# Huge appimage files, not included in "make dist" archive
291test-appimage: 272test-appimage:
292 cd test/appimage; ./appimage.sh | grep TESTING 273 $(MAKE) -C test $(subst test-,,$@)
293 274
294# Root access, network devices are created before the test 275# Root access, network devices are created before the test
295# restart your computer to get rid of these devices 276# restart your computer to get rid of these devices
296test-network: 277test-network:
297 cd test/network; ./network.sh | grep TESTING 278 $(MAKE) -C test $(subst test-,,$@)
298 279
299# requires the same setup as test-network 280# requires the same setup as test-network
300test-stress: 281test-stress:
301 cd test/stress; ./stress.sh | grep TESTING 282 $(MAKE) -C test $(subst test-,,$@)
302 283
303# Tesets running a root user 284# Tests running a root user
304test-root: 285test-root:
305 cd test/root; su -c ./root.sh | grep TESTING 286 $(MAKE) -C test $(subst test-,,$@)
306 287
307# OverlayFS is not available on all platforms 288# OverlayFS is not available on all platforms
308test-overlay: 289test-overlay:
309 cd test/overlay; ./overlay.sh | grep TESTING 290 $(MAKE) -C test $(subst test-,,$@)
310 291
311# For testing hidepid system, the command to set it up is "mount -o remount,rw,hidepid=2 /proc" 292# For testing hidepid system, the command to set it up is "mount -o remount,rw,hidepid=2 /proc"
312 293