diff options
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 303 |
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 @@ | |||
1 | all: apps man filters | ||
2 | MYLIBS = src/lib | ||
3 | APPS = 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 | ||
4 | MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 | ||
5 | SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.64 seccomp.block_secondary seccomp.mdwx | ||
6 | |||
7 | prefix=@prefix@ | 1 | prefix=@prefix@ |
8 | exec_prefix=@exec_prefix@ | 2 | exec_prefix=@exec_prefix@ |
9 | bindir=@bindir@ | 3 | bindir=@bindir@ |
@@ -16,43 +10,75 @@ VERSION=@PACKAGE_VERSION@ | |||
16 | NAME=@PACKAGE_NAME@ | 10 | NAME=@PACKAGE_NAME@ |
17 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ | 11 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ |
18 | DOCDIR=@docdir@ | 12 | DOCDIR=@docdir@ |
19 | HAVE_SECCOMP=@HAVE_SECCOMP@ | ||
20 | HAVE_APPARMOR=@HAVE_APPARMOR@ | 13 | HAVE_APPARMOR=@HAVE_APPARMOR@ |
21 | HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@ | 14 | HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@ |
22 | HAVE_GIT_INSTALL=@HAVE_GIT_INSTALL@ | ||
23 | BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ | 15 | BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ |
16 | HAVE_SUID=@HAVE_SUID@ | ||
17 | HAVE_MAN=@HAVE_MAN@ | ||
24 | 18 | ||
25 | uids.h:; ./mkuid.sh | 19 | ifneq ($(HAVE_MAN),no) |
26 | 20 | MAN_TARGET = man | |
27 | .PHONY: mylibs $(MYLIBS) | 21 | MAN_SRC = src/man |
28 | mylibs: $(MYLIBS) uids.h | 22 | endif |
29 | $(MYLIBS): | ||
30 | $(MAKE) -C $@ | ||
31 | 23 | ||
32 | .PHONY: apps $(APPS) | 24 | COMPLETIONDIRS = src/zsh_completion src/bash_completion |
33 | apps: $(APPS) | 25 | |
34 | $(APPS): $(MYLIBS) uids.h | 26 | .PHONY: all |
27 | all: all_items mydirs $(MAN_TARGET) filters | ||
28 | APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailcheck/jailcheck | ||
29 | SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee src/fids/fids | ||
30 | SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter | ||
31 | MYDIRS = src/lib $(MAN_SRC) $(COMPLETIONDIRS) | ||
32 | MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so | ||
33 | COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion | ||
34 | MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 jailcheck.1 | ||
35 | SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp | ||
36 | SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32 | ||
37 | ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS) | ||
38 | |||
39 | .PHONY: all_items $(ALL_ITEMS) | ||
40 | all_items: $(ALL_ITEMS) | ||
41 | $(ALL_ITEMS): $(MYDIRS) | ||
42 | $(MAKE) -C $(dir $@) | ||
43 | |||
44 | .PHONY: mydirs $(MYDIRS) | ||
45 | mydirs: $(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 | ||
40 | man: $(MANPAGES) | 52 | man: $(MANPAGES) |
41 | 53 | ||
42 | filters: src/fseccomp | 54 | filters: $(SECCOMP_FILTERS) $(SBOX_APPS_NON_DUMPABLE) |
43 | ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) | 55 | seccomp: 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 | |||
59 | seccomp.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 | |||
63 | seccomp.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 | |||
67 | seccomp.block_secondary: src/fseccomp/fseccomp | ||
48 | src/fseccomp/fseccomp secondary block seccomp.block_secondary | 68 | src/fseccomp/fseccomp secondary block seccomp.block_secondary |
69 | |||
70 | seccomp.mdwx: src/fseccomp/fseccomp | ||
49 | src/fseccomp/fseccomp memory-deny-write-execute seccomp.mdwx | 71 | src/fseccomp/fseccomp memory-deny-write-execute seccomp.mdwx |
50 | endif | ||
51 | 72 | ||
73 | seccomp.mdwx.32: src/fseccomp/fseccomp | ||
74 | src/fseccomp/fseccomp memory-deny-write-execute.32 seccomp.mdwx.32 | ||
75 | |||
76 | .PHONY: clean | ||
52 | clean: | 77 | clean: |
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 | ||
70 | distclean: clean | 97 | distclean: 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 | ||
76 | realinstall: | 104 | realinstall: |
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 | 108 | ifeq ($(HAVE_SUID),yes) |
109 | chmod u+s $(DESTDIR)$(bindir)/firejail | ||
110 | endif | ||
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 |
92 | ifeq ($(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/. | ||
95 | endif | ||
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/. | ||
103 | ifeq ($(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/. | ||
111 | endif | ||
112 | ifeq ($(HAVE_CONTRIB_INSTALL),yes) | 124 | ifeq ($(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 | ||
118 | endif | 132 | endif |
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 | 140 | ifeq ($(BUSYBOX_WORKAROUND),yes) |
141 | ./mketc.sh $(DESTDIR)$(sysconfdir)/firejail/disable-common.inc | ||
142 | endif | ||
132 | ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) | 143 | ifeq ($(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;" | ||
138 | endif | 150 | endif |
151 | ifneq ($(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) |
163 | endif | ||
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 | ||
157 | install: all | 173 | install: all |
158 | $(MAKE) realinstall | 174 | $(MAKE) realinstall |
159 | 175 | ||
160 | install-strip: all | 176 | install-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 | ||
176 | uninstall: | 180 | uninstall: |
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 | ||
190 | DISTFILES = "src etc platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES" | 196 | DISTFILES = "src etc m4 platform contrib configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh.in COPYING README RELNOTES" |
191 | DISTFILES_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" | 197 | DISTFILES_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 | ||
193 | dist: | 199 | dist: |
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: | |||
206 | asc:; ./mkasc.sh $(VERSION) | 214 | asc:; ./mkasc.sh $(VERSION) |
207 | 215 | ||
208 | deb: dist | 216 | deb: dist |
209 | ./mkdeb.sh $(NAME) $(VERSION) | 217 | ./mkdeb.sh |
210 | |||
211 | snap: all | ||
212 | cd platform/snap; ./snap.sh | ||
213 | 218 | ||
214 | install-snap: snap | 219 | deb-apparmor: dist |
215 | sudo snap remove faudit; sudo snap install faudit*.snap | 220 | ./mkdeb.sh -apparmor |
216 | 221 | ||
217 | test-compile: dist | 222 | test-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 |
221 | rpms: | 226 | rpms: src/man |
222 | ./platform/rpm/mkrpm.sh $(NAME) $(VERSION) | 227 | ./platform/rpm/mkrpm.sh $(NAME) $(VERSION) |
223 | 228 | ||
224 | extras: all | 229 | extras: all |
225 | $(MAKE) -C extras/firetools | 230 | $(MAKE) -C extras/firetools |
226 | 231 | ||
227 | cppcheck: clean | 232 | cppcheck: clean |
228 | cppcheck --force . | 233 | cppcheck --force --error-exitcode=1 --enable=warning,performance . |
229 | 234 | ||
230 | scan-build: clean | 235 | scan-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 | ||
242 | TESTS=profiles private-lib apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter | ||
243 | TEST_TARGETS=$(patsubst %,test-%,$(TESTS)) | ||
238 | 244 | ||
239 | test-profiles: | 245 | $(TEST_TARGETS): |
240 | cd test/profiles; ./profiles.sh | grep TESTING | 246 | $(MAKE) -C test $(subst test-,,$@) |
241 | |||
242 | test-apps: | ||
243 | cd test/apps; ./apps.sh | grep TESTING | ||
244 | |||
245 | test-apps-x11: | ||
246 | cd test/apps-x11; ./apps-x11.sh | grep TESTING | ||
247 | |||
248 | test-apps-x11-xorg: | ||
249 | cd test/apps-x11-xorg; ./apps-x11-xorg.sh | grep TESTING | ||
250 | |||
251 | test-sysutils: | ||
252 | cd test/sysutils; ./sysutils.sh | grep TESTING | ||
253 | |||
254 | test-utils: | ||
255 | cd test/utils; ./utils.sh | grep TESTING | ||
256 | 247 | ||
257 | test-environment: | 248 | test: 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 | |||
260 | test-filters: | ||
261 | ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) | ||
262 | cd test/filters; ./filters.sh | grep TESTING | ||
263 | endif | ||
264 | |||
265 | test-arguments: | ||
266 | cd test/arguments; ./arguments.sh | grep TESTING | ||
267 | |||
268 | test-fs: | ||
269 | cd test/fs; ./fs.sh | grep TESTING | ||
270 | |||
271 | test-fcopy: | ||
272 | cd test/fcopy; ./fcopy.sh | grep TESTING | ||
273 | 250 | ||
274 | test: 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 | 251 | test-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 | ||
277 | test-travis: test-profiles test-fcopy test-fs test-utils test-sysutils test-environment test-filters test-arguments | 254 | test-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 | ||
264 | test-ssh: | ||
265 | $(MAKE) -C test $(subst test-,,$@) | ||
266 | |||
286 | # requires root access | 267 | # requires root access |
287 | test-chroot: | 268 | test-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 |
291 | test-appimage: | 272 | test-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 |
296 | test-network: | 277 | test-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 |
300 | test-stress: | 281 | test-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 |
304 | test-root: | 285 | test-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 |
308 | test-overlay: | 289 | test-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 | ||