From de84b4d1cfb6e76654f8a563fd8e228e15af6bce Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sat, 22 Jul 2023 12:47:00 -0300 Subject: build: format DISTFILES / DISTFILES_TEST --- Makefile | 52 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 93fcb4e9a..a473363d5 100644 --- a/Makefile +++ b/Makefile @@ -293,24 +293,40 @@ uninstall: config.mk @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)$(sysconfdir)/firejail', see #2038." DISTFILES = \ -COPYING \ -Makefile \ -README \ -RELNOTES \ -config.mk.in \ -config.sh.in \ -configure \ -configure.ac \ -contrib \ -etc \ -install.sh \ -m4 \ -mkdeb.sh \ -mketc.sh \ -platform \ -src - -DISTFILES_TEST = test/Makefile test/apps test/apps-x11 test/apps-x11-xorg test/capabilities test/private-lib test/fnetfilter test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils + COPYING \ + Makefile \ + README \ + RELNOTES \ + config.mk.in \ + config.sh.in \ + configure \ + configure.ac \ + contrib \ + etc \ + install.sh \ + m4 \ + mkdeb.sh \ + mketc.sh \ + platform \ + src + +DISTFILES_TEST = \ + test/Makefile \ + test/apps \ + test/apps-x11 \ + test/apps-x11-xorg \ + test/capabilities \ + test/private-lib \ + test/fnetfilter \ + test/fcopy \ + test/environment \ + test/profiles \ + test/utils \ + test/compile \ + test/filters \ + test/network \ + test/fs \ + test/sysutils .PHONY: dist dist: config.mk -- cgit v1.2.3-54-g00ecf From 64c5ebaf0b2ebffaa41c0707a2613e7f53954bf8 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sat, 22 Jul 2023 12:47:24 -0300 Subject: build: sort DISTFILES_TEST --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index a473363d5..bf0438228 100644 --- a/Makefile +++ b/Makefile @@ -316,17 +316,17 @@ DISTFILES_TEST = \ test/apps-x11 \ test/apps-x11-xorg \ test/capabilities \ - test/private-lib \ - test/fnetfilter \ - test/fcopy \ - test/environment \ - test/profiles \ - test/utils \ test/compile \ + test/environment \ + test/fcopy \ test/filters \ - test/network \ + test/fnetfilter \ test/fs \ - test/sysutils + test/network \ + test/private-lib \ + test/profiles \ + test/sysutils \ + test/utils .PHONY: dist dist: config.mk -- cgit v1.2.3-54-g00ecf From ce21a299aa965be2addcdf5a20f8289926643c94 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 23 Jul 2023 04:22:15 -0300 Subject: build: remove remaining svn-related code The only other svn-related code seems to have been removed on commit 7e1c057ae ("make testing", 2016-04-23). --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index bf0438228..cb71b007e 100644 --- a/Makefile +++ b/Makefile @@ -340,7 +340,6 @@ dist: config.mk cp -a $(DISTFILES) $(TARNAME)-$(VERSION) cp -a $(DISTFILES_TEST) $(TARNAME)-$(VERSION)/test rm -rf $(TARNAME)-$(VERSION)/src/tools - find $(TARNAME)-$(VERSION) -name .svn -delete tar -cJvf $(TARNAME)-$(VERSION).tar.xz $(TARNAME)-$(VERSION) rm -fr $(TARNAME)-$(VERSION) -- cgit v1.2.3-54-g00ecf From 16dc7448ca0682c73ddd3150d93bcb62c60f7933 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Thu, 27 Jul 2023 08:46:09 -0300 Subject: fnetlock: fix unused bw variable warning This is breaking build-clang on CI[1]: make -C src/fnetlock/ make[1]: Entering directory '/home/runner/work/firejail/firejail/src/fnetlock' clang-14 [...] -c main.c -o main.o main.c:97:11: error: variable 'bw' set but not used [-Werror,-Wunused-but-set-variable] unsigned bw = 0; // bandwidth calculations ^ 1 error generated. make[1]: *** [../../src/prog.mk:16: main.o] Error 1 make: *** [Makefile:58: src/fnetlock/fnetlock] Error 2 Added on commit 8e4b847cd ("split nettrace executable ^Cto netrace and netlock", 2023-07-25). [1]: https://github.com/netblue30/firejail/actions/runs/5669072674/job/15361026508 Cc: @netblue30 --- src/fnetlock/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fnetlock/main.c b/src/fnetlock/main.c index b76be029d..d4169b7e1 100644 --- a/src/fnetlock/main.c +++ b/src/fnetlock/main.c @@ -94,7 +94,8 @@ static void run_trace(void) { unsigned start = time(NULL); unsigned char buf[MAX_BUF_SIZE]; - unsigned bw = 0; // bandwidth calculations + // FIXME: error: variable 'bw' set but not used [-Werror,-Wunused-but-set-variable] + //unsigned bw = 0; // bandwidth calculations int printed = 0; while (1) { @@ -149,7 +150,8 @@ static void run_trace(void) { #endif // filter out loopback traffic if (buf[12] != 127 && buf[16] != 127) { - bw += bytes + 14; // assume a 14 byte Ethernet layer + // FIXME: error: variable 'bw' set but not used [-Werror,-Wunused-but-set-variable] + //bw += bytes + 14; // assume a 14 byte Ethernet layer uint32_t ip_src; memcpy(&ip_src, buf + 12, 4); -- cgit v1.2.3-54-g00ecf From 640bb303d19f48d357e0fc58b989ac1188546491 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 23 Jul 2023 04:34:37 -0300 Subject: build: make dist depend on just clean The clean target is currently enough to remove all generated files other than the ones directly in the root directory, so to simplify the dist target, make it depend on clean instead of distclean. See commit 5f2785290 ("build: remove unnecessary distclean targets", 2023-07-15) / PR #5911. Relates to #5142 #5182. --- Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index cb71b007e..4551ebad2 100644 --- a/Makefile +++ b/Makefile @@ -329,12 +329,7 @@ DISTFILES_TEST = \ test/utils .PHONY: dist -dist: config.mk - mv config.sh config.sh.old - mv config.status config.status.old - $(MAKE) distclean - mv config.status.old config.status - mv config.sh.old config.sh +dist: clean config.mk rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz mkdir -p $(TARNAME)-$(VERSION)/test cp -a $(DISTFILES) $(TARNAME)-$(VERSION) -- cgit v1.2.3-54-g00ecf From e0e597ab55c6dc7c3db7accd3be3a472642fa346 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 23 Jul 2023 04:40:11 -0300 Subject: build: make asc use config.sh Similarly to mkdeb.sh. Relates to #5140. --- Makefile | 4 ++-- mkasc.sh | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 4551ebad2..6e3593d20 100644 --- a/Makefile +++ b/Makefile @@ -339,8 +339,8 @@ dist: clean config.mk rm -fr $(TARNAME)-$(VERSION) .PHONY: asc -asc: config.mk - ./mkasc.sh $(VERSION) +asc: config.sh + ./mkasc.sh .PHONY: deb deb: dist config.sh diff --git a/mkasc.sh b/mkasc.sh index de9bf9851..62c1b1180 100755 --- a/mkasc.sh +++ b/mkasc.sh @@ -3,11 +3,13 @@ # Copyright (C) 2014-2023 Firejail Authors # License GPL v2 -echo "Calculating SHA256 for all files in /transfer - firejail version $1" +. "$(dirname "$0")/config.sh" + +printf 'Calculating SHA256 for all files in /transfer - %s version %s' "$TARNAME" "$VERSION" cd /transfer || exit 1 -sha256sum ./* > "firejail-$1-unsigned" -gpg --clearsign --digest-algo SHA256 < "firejail-$1-unsigned" > "firejail-$1.asc" -gpg --verify "firejail-$1.asc" -gpg --detach-sign --armor "firejail-$1.tar.xz" -rm "firejail-$1-unsigned" +sha256sum ./* > "$TARNAME-$VERSION-unsigned" +gpg --clearsign --digest-algo SHA256 < "$TARNAME-$VERSION-unsigned" > "$TARNAME-$VERSION.asc" +gpg --verify "$TARNAME-$VERSION.asc" +gpg --detach-sign --armor "$TARNAME-$VERSION.tar.xz" +rm "$TARNAME-$VERSION-unsigned" -- cgit v1.2.3-54-g00ecf