kiss-stj

My KISS Linux repo for software I use on my computers.
git clone https://git.stjo.hn/kiss-stj
Log | Files | Refs | README | LICENSE

commit f00b9269bdea858307aaa93b8095b9d3f03ebdd5
parent f5cd3dabfc06aa55631333c15422a46e84b15c66
Author: St John Karp <contact@stjo.hn>
Date:   Sat,  2 Jul 2022 15:50:41 -0400

firejail: Add package at version 0.9.70

I've included two of my own patches. One swaps a hard dependency on
gawk for generic awk, which seems to work fine with Busybox's awk.
The other fixes POSIX compliance in the mkman.sh script, which
depends on non-POSIX uses of sed and date. sed usage is easy enough
to fix, but POSIX date does barely anything compared to GNU date
and the easiest solution I've found in the past is just to use
Python instead.

Diffstat:
Aextra/firejail/build | 12++++++++++++
Aextra/firejail/checksums | 3+++
Aextra/firejail/depends | 1+
Aextra/firejail/patches/gawk.patch | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Aextra/firejail/patches/posix-date-sed.patch | 19+++++++++++++++++++
Aextra/firejail/sources | 3+++
Aextra/firejail/version | 1+
7 files changed, 91 insertions(+), 0 deletions(-)

diff --git a/extra/firejail/build b/extra/firejail/build @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +for file in patches/* ; do + patch -p1 < "$file" +done + +./configure \ + $KISS_CONFIGURE \ + --prefix=/usr \ + --enable-busybox-workaround && + make && + make install-strip diff --git a/extra/firejail/checksums b/extra/firejail/checksums @@ -0,0 +1,3 @@ +b77b67a4db7c01d69cb033a50aa7b1132dfaeb2cd97ce6412285235265b71b17 +4f7bc56405b0588fdbd4a8fa220119191aa5090441dde40bf86078caad90ec85 +14e2e8e6e58653ab0584066d081e348310a966237e9dadb1daa8655c438735c2 diff --git a/extra/firejail/depends b/extra/firejail/depends @@ -0,0 +1 @@ +python make diff --git a/extra/firejail/patches/gawk.patch b/extra/firejail/patches/gawk.patch @@ -0,0 +1,52 @@ +diff --git a/configure b/configure +index f6544c4..d1d375f 100755 +--- a/configure ++++ b/configure +@@ -3405,7 +3405,7 @@ if test "x$enable_man" != "xno"; then : + + HAVE_MAN="-DHAVE_MAN" + # Extract the first word of "gawk", so it can be a program name with args. +-set dummy gawk; ac_word=$2 ++set dummy awk; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_HAVE_GAWK+:} false; then : +diff --git a/src/bash_completion/Makefile.in b/src/bash_completion/Makefile.in +index f7db9e6..0712fdd 100644 +--- a/src/bash_completion/Makefile.in ++++ b/src/bash_completion/Makefile.in +@@ -4,7 +4,7 @@ all: firejail.bash_completion + include ../common.mk + + firejail.bash_completion: firejail.bash_completion.in +- gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp ++ awk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp + sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ + rm $@.tmp + +diff --git a/src/man/Makefile.in b/src/man/Makefile.in +index fbd2d79..20a9b20 100644 +--- a/src/man/Makefile.in ++++ b/src/man/Makefile.in +@@ -4,7 +4,7 @@ all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-pro + include ../common.mk + + %.man: %.txt +- gawk -f ./preproc.awk -- $(MANFLAGS) < $< > $@ ++ awk -f ./preproc.awk -- $(MANFLAGS) < $< > $@ + + .PHONY: clean + clean:; rm -fr *.man +diff --git a/src/zsh_completion/Makefile.in b/src/zsh_completion/Makefile.in +index a83cccf..34d8423 100644 +--- a/src/zsh_completion/Makefile.in ++++ b/src/zsh_completion/Makefile.in +@@ -4,7 +4,7 @@ all: _firejail + include ../common.mk + + _firejail: _firejail.in +- gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp ++ awk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp + sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ + rm $@.tmp + diff --git a/extra/firejail/patches/posix-date-sed.patch b/extra/firejail/patches/posix-date-sed.patch @@ -0,0 +1,19 @@ +diff --git a/mkman.sh b/mkman.sh +index 79ad162..9ce10af 100755 +--- a/mkman.sh ++++ b/mkman.sh +@@ -5,8 +5,9 @@ + + set -e + +-sed "s/VERSION/$1/g" "$2" > "$3" +-MONTH="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b)" +-sed -i "s/MONTH/$MONTH/g" "$3" +-YEAR="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)" +-sed -i "s/YEAR/$YEAR/g" "$3" ++MONTH="$(python -c "import datetime; print(datetime.datetime.utcfromtimestamp(${SOURCE_DATE_EPOCH:-$(date +%s)}).strftime('%b'))")" ++YEAR="$(python -c "import datetime; print(datetime.datetime.utcfromtimestamp(${SOURCE_DATE_EPOCH:-$(date +%s)}).strftime('%Y'))")" ++sed -e "s/VERSION/$1/g" \ ++ -e "s/MONTH/$MONTH/g" \ ++ -e "s/YEAR/$YEAR/g" \ ++ "$2" > "$3" diff --git a/extra/firejail/sources b/extra/firejail/sources @@ -0,0 +1,3 @@ +https://downloads.sourceforge.net/firejail/firejail-VERSION.tar.xz +patches/gawk.patch patches +patches/posix-date-sed.patch patches diff --git a/extra/firejail/version b/extra/firejail/version @@ -0,0 +1 @@ +0.9.70 1