From bb53cf1eded39125829d89069d57906c53e76a43 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Tue, 16 Dec 2014 22:13:52 +0000 Subject: [PATCH] gzip-1.6: Fix gzexe backup generation Signed-off-by: Timothy Gu --- app-arch/gzip/gzip-1.6.recipe | 4 +++- app-arch/gzip/patches/gzip-1.6.patchset | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 app-arch/gzip/patches/gzip-1.6.patchset diff --git a/app-arch/gzip/gzip-1.6.recipe b/app-arch/gzip/gzip-1.6.recipe index 4c4bfffab..16d7a5c17 100644 --- a/app-arch/gzip/gzip-1.6.recipe +++ b/app-arch/gzip/gzip-1.6.recipe @@ -7,7 +7,7 @@ HOMEPAGE="http://www.gzip.org/" SRC_URI="https://ftp.gnu.org/gnu/gzip/gzip-1.6.tar.xz" CHECKSUM_SHA256="37dfed1a485d53212c43b3fa2a7c7952f09bf5cd86e37121c222341ee1b27847" SOURCE_DIR="$portVersionedName" -REVISION="1" +REVISION="2" LICENSE="GNU GPL v3" COPYRIGHT="1992-1993 Jean-loup Gailly 1999-2013 Free Software Foundation, Inc." @@ -45,6 +45,8 @@ BUILD_PREREQUIRES=" cmd:awk " +PATCHES="${portVersionedName}.patchset" + BUILD() { export CFLAGS="-Wno-error" diff --git a/app-arch/gzip/patches/gzip-1.6.patchset b/app-arch/gzip/patches/gzip-1.6.patchset new file mode 100644 index 000000000..449115031 --- /dev/null +++ b/app-arch/gzip/patches/gzip-1.6.patchset @@ -0,0 +1,25 @@ +From 39ee8c0d94879bde10822f2b95caedde3d6842fb Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 16 Dec 2014 21:50:24 +0000 +Subject: [PATCH] gzexe: Fallback on file copying for backup + +BFS doesn't support hard links. + +Signed-off-by: Timothy Gu + +diff --git a/gzexe.in b/gzexe.in +index e458563..45e1900 100644 +--- a/gzexe.in ++++ b/gzexe.in +@@ -218,7 +218,7 @@ EOF + echo >&2 "$0: $tmp: cannot chmod" + continue + } +- ln -f "$file" "$file~" || { ++ ln -f "$file" "$file~" || cp -f "$file" "${file}~" || { + res=$? + echo >&2 "$0: cannot backup $i as $i~" + continue +-- +1.8.3.4 +