diff options
-rw-r--r-- | .gitignore | 19 | ||||
-rw-r--r-- | Makefile | 33 | ||||
-rw-r--r-- | RELNOTES | 5 | ||||
-rw-r--r-- | src/man/Makefile | 59 | ||||
-rw-r--r-- | src/man/firecfg.1.in (renamed from src/man/firecfg.txt) | 0 | ||||
-rw-r--r-- | src/man/firejail-login.5.in (renamed from src/man/firejail-login.txt) | 0 | ||||
-rw-r--r-- | src/man/firejail-profile.5.in (renamed from src/man/firejail-profile.txt) | 0 | ||||
-rw-r--r-- | src/man/firejail-users.5.in (renamed from src/man/firejail-users.txt) | 0 | ||||
-rw-r--r-- | src/man/firejail.1.in (renamed from src/man/firejail.txt) | 0 | ||||
-rw-r--r-- | src/man/firemon.1.in (renamed from src/man/firemon.txt) | 0 | ||||
-rw-r--r-- | src/man/jailcheck.1.in (renamed from src/man/jailcheck.txt) | 0 | ||||
-rwxr-xr-x | src/man/mkman.sh | 8 |
12 files changed, 51 insertions, 73 deletions
diff --git a/.gitignore b/.gitignore index 549f12738..2285c3e5d 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -6,9 +6,9 @@ | |||
6 | *.rpm | 6 | *.rpm |
7 | *.gcda | 7 | *.gcda |
8 | *.gcno | 8 | *.gcno |
9 | *.gz | ||
9 | *.DS_Store | 10 | *.DS_Store |
10 | .directory | 11 | .directory |
11 | *.man | ||
12 | .vscode | 12 | .vscode |
13 | /firejail-*/ | 13 | /firejail-*/ |
14 | autom4te.cache/ | 14 | autom4te.cache/ |
@@ -20,14 +20,6 @@ contrib/syntax/files/example | |||
20 | contrib/syntax/files/firejail-profile.lang | 20 | contrib/syntax/files/firejail-profile.lang |
21 | contrib/syntax/files/firejail.vim | 21 | contrib/syntax/files/firejail.vim |
22 | firejail-*.tar.xz | 22 | firejail-*.tar.xz |
23 | firejail-login.5 | ||
24 | firejail-profile.5 | ||
25 | firejail-config.5 | ||
26 | firejail-users.5 | ||
27 | firejail.1 | ||
28 | firemon.1 | ||
29 | firecfg.1 | ||
30 | jailcheck.1 | ||
31 | src/fnettrace-dns/fnettrace-dns | 23 | src/fnettrace-dns/fnettrace-dns |
32 | src/fnettrace-sni/fnettrace-sni | 24 | src/fnettrace-sni/fnettrace-sni |
33 | src/fnettrace-icmp/fnettrace-icmp | 25 | src/fnettrace-icmp/fnettrace-icmp |
@@ -68,10 +60,5 @@ __pycache__ | |||
68 | *.pyc | 60 | *.pyc |
69 | *.pyo | 61 | *.pyo |
70 | src/fnettrace/static-ip-map | 62 | src/fnettrace/static-ip-map |
71 | src/man/firecfg.1.gz | 63 | src/man/*.1 |
72 | src/man/firejail-login.5.gz | 64 | src/man/*.5 |
73 | src/man/firejail-profile.5.gz | ||
74 | src/man/firejail-users.5.gz | ||
75 | src/man/firejail.1.gz | ||
76 | src/man/firemon.1.gz | ||
77 | src/man/jailcheck.1.gz | ||
@@ -2,6 +2,10 @@ | |||
2 | ROOT = . | 2 | ROOT = . |
3 | -include config.mk | 3 | -include config.mk |
4 | 4 | ||
5 | ifneq ($(HAVE_MAN),no) | ||
6 | MAN_TARGET = man | ||
7 | endif | ||
8 | |||
5 | ifneq ($(HAVE_CONTRIB_INSTALL),no) | 9 | ifneq ($(HAVE_CONTRIB_INSTALL),no) |
6 | CONTRIB_TARGET = contrib | 10 | CONTRIB_TARGET = contrib |
7 | endif | 11 | endif |
@@ -14,11 +18,16 @@ SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfil | |||
14 | SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp | 18 | SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp |
15 | SBOX_APPS_NON_DUMPABLE += src/fnettrace/fnettrace src/fnettrace-dns/fnettrace-dns src/fnettrace-sni/fnettrace-sni | 19 | SBOX_APPS_NON_DUMPABLE += src/fnettrace/fnettrace src/fnettrace-dns/fnettrace-dns src/fnettrace-sni/fnettrace-sni |
16 | SBOX_APPS_NON_DUMPABLE += src/fnettrace-icmp/fnettrace-icmp | 20 | SBOX_APPS_NON_DUMPABLE += src/fnettrace-icmp/fnettrace-icmp |
17 | MYDIRS = src/lib src/man $(COMPLETIONDIRS) | 21 | MYDIRS = src/lib $(COMPLETIONDIRS) |
18 | MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so | 22 | MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so |
19 | COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion | 23 | COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion |
20 | SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32 seccomp.namespaces seccomp.namespaces.32 | 24 | SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32 seccomp.namespaces seccomp.namespaces.32 |
21 | 25 | ||
26 | MANPAGES1_IN := $(sort $(wildcard src/man/*.1.in)) | ||
27 | MANPAGES5_IN := $(sort $(wildcard src/man/*.5.in)) | ||
28 | MANPAGES1_GZ := $(MANPAGES1_IN:.in=.gz) | ||
29 | MANPAGES5_GZ := $(MANPAGES5_IN:.in=.gz) | ||
30 | |||
22 | SYSCALL_HEADERS := $(sort $(wildcard src/include/syscall*.h)) | 31 | SYSCALL_HEADERS := $(sort $(wildcard src/include/syscall*.h)) |
23 | 32 | ||
24 | # Lists of keywords used in profiles; used for generating syntax files. | 33 | # Lists of keywords used in profiles; used for generating syntax files. |
@@ -37,7 +46,7 @@ SYNTAX_FILES := $(SYNTAX_FILES_IN:.in=) | |||
37 | ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS) | 46 | ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS) |
38 | 47 | ||
39 | .PHONY: all | 48 | .PHONY: all |
40 | all: all_items mydirs filters $(CONTRIB_TARGET) | 49 | all: all_items mydirs filters $(MAN_TARGET) $(CONTRIB_TARGET) |
41 | 50 | ||
42 | config.mk config.sh: | 51 | config.mk config.sh: |
43 | @printf 'error: run ./configure to generate %s\n' "$@" >&2 | 52 | @printf 'error: run ./configure to generate %s\n' "$@" >&2 |
@@ -82,6 +91,10 @@ seccomp.namespaces: src/fseccomp/fseccomp | |||
82 | seccomp.namespaces.32: src/fseccomp/fseccomp | 91 | seccomp.namespaces.32: src/fseccomp/fseccomp |
83 | src/fseccomp/fseccomp restrict-namespaces seccomp.namespaces.32 cgroup,ipc,net,mnt,pid,time,user,uts | 92 | src/fseccomp/fseccomp restrict-namespaces seccomp.namespaces.32 cgroup,ipc,net,mnt,pid,time,user,uts |
84 | 93 | ||
94 | .PHONY: man | ||
95 | man: | ||
96 | $(MAKE) -C src/man | ||
97 | |||
85 | # Makes all targets in contrib/ | 98 | # Makes all targets in contrib/ |
86 | .PHONY: contrib | 99 | .PHONY: contrib |
87 | contrib: syntax | 100 | contrib: syntax |
@@ -150,6 +163,7 @@ clean: | |||
150 | for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \ | 163 | for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \ |
151 | $(MAKE) -C $$dir clean; \ | 164 | $(MAKE) -C $$dir clean; \ |
152 | done | 165 | done |
166 | $(MAKE) -C src/man clean | ||
153 | $(MAKE) -C test clean | 167 | $(MAKE) -C test clean |
154 | rm -f $(SECCOMP_FILTERS) | 168 | rm -f $(SECCOMP_FILTERS) |
155 | rm -f firejail*.rpm | 169 | rm -f firejail*.rpm |
@@ -242,13 +256,8 @@ endif | |||
242 | ifneq ($(HAVE_MAN),no) | 256 | ifneq ($(HAVE_MAN),no) |
243 | # man pages | 257 | # man pages |
244 | install -m 0755 -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 | 258 | install -m 0755 -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 |
245 | install -m 0644 src/man/firejail.1.gz $(DESTDIR)$(mandir)/man1/ | 259 | install -m 0644 $(MANPAGES1_GZ) $(DESTDIR)$(mandir)/man1/ |
246 | install -m 0644 src/man/firemon.1.gz $(DESTDIR)$(mandir)/man1/ | 260 | install -m 0644 $(MANPAGES5_GZ) $(DESTDIR)$(mandir)/man5/ |
247 | install -m 0644 src/man/firecfg.1.gz $(DESTDIR)$(mandir)/man1/ | ||
248 | install -m 0644 src/man/jailcheck.1.gz $(DESTDIR)$(mandir)/man1/ | ||
249 | install -m 0644 src/man/firejail-login.5.gz $(DESTDIR)$(mandir)/man5/ | ||
250 | install -m 0644 src/man/firejail-users.5.gz $(DESTDIR)$(mandir)/man5/ | ||
251 | install -m 0644 src/man/firejail-profile.5.gz $(DESTDIR)$(mandir)/man5/ | ||
252 | endif | 261 | endif |
253 | # bash completion | 262 | # bash completion |
254 | install -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions | 263 | install -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions |
@@ -276,10 +285,8 @@ uninstall: config.mk | |||
276 | rm -f $(DESTDIR)$(bindir)/jailcheck | 285 | rm -f $(DESTDIR)$(bindir)/jailcheck |
277 | rm -fr $(DESTDIR)$(libdir)/firejail | 286 | rm -fr $(DESTDIR)$(libdir)/firejail |
278 | rm -fr $(DESTDIR)$(datarootdir)/doc/firejail | 287 | rm -fr $(DESTDIR)$(datarootdir)/doc/firejail |
279 | for man in $(MANPAGES); do \ | 288 | rm -f $(addprefix $(DESTDIR)$(mandir)/man1/,$(notdir $(MANPAGES1_GZ))) |
280 | rm -f $(DESTDIR)$(mandir)/man5/$$man*; \ | 289 | rm -f $(addprefix $(DESTDIR)$(mandir)/man5/,$(notdir $(MANPAGES5_GZ))) |
281 | rm -f $(DESTDIR)$(mandir)/man1/$$man*; \ | ||
282 | done | ||
283 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail | 290 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail |
284 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon | 291 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon |
285 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg | 292 | rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg |
@@ -21,8 +21,6 @@ firejail (0.9.73) baseline; urgency=low | |||
21 | #5618) | 21 | #5618) |
22 | * bugfix: fix --hostname and --hosts-file commands | 22 | * bugfix: fix --hostname and --hosts-file commands |
23 | * bugfix: arp.c: ensure positive timeout on select(2) (#5806) | 23 | * bugfix: arp.c: ensure positive timeout on select(2) (#5806) |
24 | * build: fixed problem with seccomp filters and man pages built every | ||
25 | time when running make | ||
26 | * build: auto-generate syntax files (#5627) | 24 | * build: auto-generate syntax files (#5627) |
27 | * build: mark all phony targets as such (#5637) | 25 | * build: mark all phony targets as such (#5637) |
28 | * build: mkdeb.sh: pass all arguments to ./configure (#5654) | 26 | * build: mkdeb.sh: pass all arguments to ./configure (#5654) |
@@ -32,6 +30,9 @@ firejail (0.9.73) baseline; urgency=low | |||
32 | * build: remove -mretpoline and NO_EXTRA_CFLAGS (#5859) | 30 | * build: remove -mretpoline and NO_EXTRA_CFLAGS (#5859) |
33 | * build: disable all built-in implicit make rules (#5864) | 31 | * build: disable all built-in implicit make rules (#5864) |
34 | * build: organize and standardize make vars and targets (#5866) | 32 | * build: organize and standardize make vars and targets (#5866) |
33 | * build: fix seccomp filters and man pages always being rebuilt when running | ||
34 | make | ||
35 | * build: simplify code related to man pages (#5898) | ||
35 | * ci: always update the package db before installing packages (#5742) | 36 | * ci: always update the package db before installing packages (#5742) |
36 | * ci: fix codeql unable to download its own bundle (#5783) | 37 | * ci: fix codeql unable to download its own bundle (#5783) |
37 | * ci: split configure/build/install commands on gitlab (#5784) | 38 | * ci: split configure/build/install commands on gitlab (#5784) |
diff --git a/src/man/Makefile b/src/man/Makefile index 1c0d94244..526ed7fcb 100644 --- a/src/man/Makefile +++ b/src/man/Makefile | |||
@@ -2,44 +2,25 @@ | |||
2 | ROOT = ../.. | 2 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 3 | -include $(ROOT)/config.mk |
4 | 4 | ||
5 | all: firecfg.1.gz firejail.1.gz firejail-login.5.gz firejail-users.5.gz firejail-profile.5.gz firemon.1.gz jailcheck.1.gz | 5 | MOD_DIR := $(ROOT)/src/man |
6 | 6 | MANPAGES_IN := $(sort $(wildcard $(MOD_DIR)/*.in)) | |
7 | #firecfg.1.gz: firecfg.txt | 7 | MANPAGES_GZ := $(MANPAGES_IN:.in=.gz) |
8 | # gawk -f ./preproc.awk -- $(MANFLAGS) < $< > firecfg.1 | 8 | TARGET = $(MANPAGES_GZ) |
9 | # ./mkman.sh $(VERSION) firecfg.1 | 9 | |
10 | # gzip -n9 firecfg.1 | 10 | .PHONY: all |
11 | 11 | all: $(TARGET) | |
12 | # a small function to build a manpage | 12 | |
13 | define build | 13 | # foo.1: foo.1.in |
14 | gawk -f ./preproc.awk -- $(MANFLAGS) < $1 > $2 | 14 | $(MOD_DIR)/%: $(MOD_DIR)/%.in $(ROOT)/config.mk |
15 | ./mkman.sh $(VERSION) ./$2 | 15 | @printf 'Generating %s from %s\n' $@ $< |
16 | rm -f $2.gz | 16 | @gawk -f $(MOD_DIR)/preproc.awk -- $(MANFLAGS) <$< | \ |
17 | gzip -n9 $2 | 17 | $(MOD_DIR)/mkman.sh $(VERSION) >$@ |
18 | endef | 18 | |
19 | 19 | # foo.1.gz: foo.1 | |
20 | firecfg.1.gz: firecfg.txt | 20 | $(MOD_DIR)/%.gz: $(MOD_DIR)/% |
21 | $(call build,firecfg.txt,firecfg.1) | 21 | @printf 'Generating %s from %s\n' $@ $< |
22 | 22 | @rm -f $@ | |
23 | firejail.1.gz: firejail.txt | 23 | @gzip -n9 $< |
24 | $(call build,firejail.txt,firejail.1) | ||
25 | |||
26 | firejail-login.5.gz: firejail-login.txt | ||
27 | $(call build,firejail-login.txt,firejail-login.5) | ||
28 | |||
29 | firejail-users.5.gz: firejail-users.txt | ||
30 | $(call build,firejail-users.txt,firejail-users.5) | ||
31 | |||
32 | firejail-profile.5.gz: firejail-profile.txt | ||
33 | $(call build,firejail-profile.txt,firejail-profile.5) | ||
34 | |||
35 | firemon.1.gz: firemon.txt | ||
36 | $(call build,firemon.txt,firemon.1) | ||
37 | |||
38 | jailcheck.1.gz: jailcheck.txt | ||
39 | $(call build,jailcheck.txt,jailcheck.1) | ||
40 | 24 | ||
41 | .PHONY: clean | 25 | .PHONY: clean |
42 | clean:; rm -fr *.1 *.5 *.gz | 26 | clean:; rm -f *.1 *.5 *.gz |
43 | |||
44 | .PHONY: distclean | ||
45 | distclean: clean | ||
diff --git a/src/man/firecfg.txt b/src/man/firecfg.1.in index 42add6a41..42add6a41 100644 --- a/src/man/firecfg.txt +++ b/src/man/firecfg.1.in | |||
diff --git a/src/man/firejail-login.txt b/src/man/firejail-login.5.in index f03fc3c37..f03fc3c37 100644 --- a/src/man/firejail-login.txt +++ b/src/man/firejail-login.5.in | |||
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.5.in index fa294d888..fa294d888 100644 --- a/src/man/firejail-profile.txt +++ b/src/man/firejail-profile.5.in | |||
diff --git a/src/man/firejail-users.txt b/src/man/firejail-users.5.in index 7aa151680..7aa151680 100644 --- a/src/man/firejail-users.txt +++ b/src/man/firejail-users.5.in | |||
diff --git a/src/man/firejail.txt b/src/man/firejail.1.in index 19fc94ebd..19fc94ebd 100644 --- a/src/man/firejail.txt +++ b/src/man/firejail.1.in | |||
diff --git a/src/man/firemon.txt b/src/man/firemon.1.in index fb0cf1175..fb0cf1175 100644 --- a/src/man/firemon.txt +++ b/src/man/firemon.1.in | |||
diff --git a/src/man/jailcheck.txt b/src/man/jailcheck.1.in index e889ea91b..e889ea91b 100644 --- a/src/man/jailcheck.txt +++ b/src/man/jailcheck.1.in | |||
diff --git a/src/man/mkman.sh b/src/man/mkman.sh index b538b0126..0302e0778 100755 --- a/src/man/mkman.sh +++ b/src/man/mkman.sh | |||
@@ -5,8 +5,10 @@ | |||
5 | 5 | ||
6 | set -e | 6 | set -e |
7 | 7 | ||
8 | sed -i "s/VERSION/$1/g" "$2" | ||
9 | MONTH="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b)" | 8 | MONTH="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b)" |
10 | sed -i "s/MONTH/$MONTH/g" "$2" | ||
11 | YEAR="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)" | 9 | YEAR="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)" |
12 | sed -i "s/YEAR/$YEAR/g" "$2" | 10 | |
11 | sed \ | ||
12 | -e "s/VERSION/$1/g" \ | ||
13 | -e "s/MONTH/$MONTH/g" \ | ||
14 | -e "s/YEAR/$YEAR/g" | ||