aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar rusty-snake <41237666+rusty-snake@users.noreply.github.com>2020-04-04 19:40:11 +0200
committerLibravatar rusty-snake <41237666+rusty-snake@users.noreply.github.com>2020-04-04 19:40:11 +0200
commite8b60d782eccee13fae539732236e0b19111f706 (patch)
tree8698be4341cea7047a59889b7b50685a233946db
parentHarden signal-desktop.profile and add rules for Firefox (diff)
downloadfirejail-e8b60d782eccee13fae539732236e0b19111f706.tar.gz
firejail-e8b60d782eccee13fae539732236e0b19111f706.tar.zst
firejail-e8b60d782eccee13fae539732236e0b19111f706.zip
Speedup the buildsystem
- replaing 'include /etc/firejail/foobar.inc' with 'include $(sysconfdir)/firejail/foobar.inc' is useless since 0.9.58 - onetime calling install with globbing is faster the a loop calling install nearly 1000 times
-rw-r--r--Makefile.in9
-rwxr-xr-xmketc.sh13
2 files changed, 5 insertions, 17 deletions
diff --git a/Makefile.in b/Makefile.in
index afe8c9972..61889c017 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -128,13 +128,12 @@ endif
128 install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/. 128 install -c -m 0644 RELNOTES $(DESTDIR)/$(DOCDIR)/.
129 install -c -m 0644 etc/templates/* $(DESTDIR)/$(DOCDIR)/. 129 install -c -m 0644 etc/templates/* $(DESTDIR)/$(DOCDIR)/.
130 # etc files 130 # etc files
131 ./mketc.sh $(sysconfdir) $(BUSYBOX_WORKAROUND) 131ifeq ($(BUSYBOX_WORKAROUND),yes)
132 ./mketc.sh
133endif
132 install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail 134 install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail
133 for file in .etc/* etc/firejail.config; do \ 135 install -m 0644 -t $(DESTDIR)/$(sysconfdir)/firejail etc/{*.profile,*.inc,*.net,firejail.config}
134 install -c -m 0644 $$file $(DESTDIR)/$(sysconfdir)/firejail; \
135 done
136 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" 136 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;"
137 rm -fr .etc
138ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR) 137ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)
139 # install apparmor profile 138 # install apparmor profile
140 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;" 139 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;"
diff --git a/mketc.sh b/mketc.sh
index 8dbc72915..d9728f3c5 100755
--- a/mketc.sh
+++ b/mketc.sh
@@ -3,16 +3,6 @@
3# Copyright (C) 2014-2020 Firejail Authors 3# Copyright (C) 2014-2020 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6rm -fr .etc
7mkdir .etc
8
9for file in etc/*.profile etc/*.inc etc/*.net;
10do
11 sed "s;/etc/firejail;$1/firejail;g" $file > .$file
12done
13
14if [ "x$2" = "xyes" ]
15then
16sed -i -e ' 6sed -i -e '
171i# Workaround for systems where common UNIX utilities are symlinks to busybox.\ 71i# Workaround for systems where common UNIX utilities are symlinks to busybox.\
18# If this is not your case you can remove --enable-busybox-workaround from\ 8# If this is not your case you can remove --enable-busybox-workaround from\
@@ -23,5 +13,4 @@ noblacklist \${PATH}/su\
23noblacklist \${PATH}/sudo\ 13noblacklist \${PATH}/sudo\
24noblacklist \${PATH}/nc\ 14noblacklist \${PATH}/nc\
25noblacklist \${PATH}/crontab\ 15noblacklist \${PATH}/crontab\
26' .etc/disable-common.inc 16' etc/disable-common.inc
27fi