diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2019-03-02 14:46:57 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-03-03 19:45:10 +0100 |
commit | ac3bae907fc2bc648b4b40b0df1f325b72ae24c3 (patch) | |
tree | 9528302bc49886694a10fc60ab563b9d356e15a2 /tools/squashfskit4/patches | |
parent | 33201a3ad1087d107a8a66b4e2a73019021e2628 (diff) | |
download | upstream-ac3bae907fc2bc648b4b40b0df1f325b72ae24c3.tar.gz upstream-ac3bae907fc2bc648b4b40b0df1f325b72ae24c3.tar.bz2 upstream-ac3bae907fc2bc648b4b40b0df1f325b72ae24c3.zip |
tools/squashfskit: fix version detection on non-linux system
gnu date is present in our staging_dir which means squashfskit will fail
to build. Prevent also a race condition if coreutils is build after
squashfskit.
To prevent a race condition, depend on coreutils.
Acked-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'tools/squashfskit4/patches')
-rw-r--r-- | tools/squashfskit4/patches/0001-fix-version.sh.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/squashfskit4/patches/0001-fix-version.sh.patch b/tools/squashfskit4/patches/0001-fix-version.sh.patch new file mode 100644 index 0000000000..5f0894bc17 --- /dev/null +++ b/tools/squashfskit4/patches/0001-fix-version.sh.patch @@ -0,0 +1,21 @@ +--- a/squashfs-tools/version.sh ++++ b/squashfs-tools/version.sh +@@ -27,13 +27,11 @@ if [ -z "$OUTPUT" ] ; then + fi + + our_date() { +-case $(uname) in +-NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin) +- date -r "$1" "$2" +- ;; +-*) +- date -d "@$1" "$2" +-esac ++ if date --version 2>&1 | grep -q "GNU coreutils"; then ++ date -d "@$1" "$2" ++ else ++ date -r "$1" "$2" ++ fi + } + + try_version() { |