tools: patch: Fix build by not modifing Makefile.am

A new test case was adding in one of the patches fixing a problem, this
also included a change in the test/Makefile.am to add this test case.
The build system detected a change in the Makefile.am and wants to
regenerate the Makefile.in, but this fails because automake-1.15 is not
installed yet. As automake depends on patch being build first, make sure
we do not modify the Makefile.am.

This fixes build problem seen by the build bots.

Fixes: 4797dddfde ("patch: apply upstream cve fixes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 759f111f8d)
This commit is contained in:
Hauke Mehrtens 2018-10-14 16:42:45 +02:00 committed by Jo-Philipp Wich
parent 1adb3b28a9
commit a10c67b057
2 changed files with 0 additions and 55 deletions

View File

@ -66,7 +66,6 @@ $(curdir)/bc/compile := $(curdir)/bison/compile
$(curdir)/findutils/compile := $(curdir)/bison/compile
$(curdir)/gengetopt/compile := $(curdir)/libtool/compile
$(curdir)/patchelf/compile := $(curdir)/libtool/compile
$(curdir)/patch/compile := $(curdir)/automake/compile
$(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile
$(curdir)/libressl/compile := $(curdir)/pkg-config/compile
$(curdir)/mkimage/compile += $(curdir)/libressl/compile

View File

@ -143,57 +143,3 @@ instead of rejecting them and carrying on.
if (ofp)
{
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ TESTS = \
crlf-handling \
dash-o-append \
deep-directories \
+ ed-style \
empty-files \
false-match \
fifo \
--- /dev/null
+++ b/tests/ed-style
@@ -0,0 +1,41 @@
+# Copyright (C) 2018 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# in any medium, are permitted without royalty provided the copyright
+# notice and this notice are preserved.
+
+. $srcdir/test-lib.sh
+
+require cat
+use_local_patch
+use_tmpdir
+
+# ==============================================================
+
+cat > ed1.diff <<EOF
+0a
+foo
+.
+EOF
+
+check 'patch -e foo -i ed1.diff' <<EOF
+EOF
+
+check 'cat foo' <<EOF
+foo
+EOF
+
+cat > ed2.diff <<EOF
+1337a
+r !echo bar
+,p
+EOF
+
+check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
+?
+Status: 2
+EOF
+
+check 'cat foo' <<EOF
+foo
+EOF