summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2013-10-15 08:33:01 +0000
committerLars Wendler <polynomial-c@gentoo.org>2013-10-15 08:33:01 +0000
commit5d1f99fa63713f79276581fa6687ac3da9235fef (patch)
tree0062baa6a3509d962e4237b143ee38565acd9ee6 /sys-devel/patch/files
parentStable for alpha, wrt bug #480908 (diff)
downloadhistorical-5d1f99fa63713f79276581fa6687ac3da9235fef.tar.gz
historical-5d1f99fa63713f79276581fa6687ac3da9235fef.tar.bz2
historical-5d1f99fa63713f79276581fa6687ac3da9235fef.zip
Revbump to fix segfault on nonexisting dir (bug #485182). Removed old versions
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0x981CA6FC
Diffstat (limited to 'sys-devel/patch/files')
-rw-r--r--sys-devel/patch/files/patch-2.7.1-initialize_data_structures_early_enough.patch74
-rw-r--r--sys-devel/patch/files/patch-2.7.1-prevent_depend_on_autotools.patch45
2 files changed, 119 insertions, 0 deletions
diff --git a/sys-devel/patch/files/patch-2.7.1-initialize_data_structures_early_enough.patch b/sys-devel/patch/files/patch-2.7.1-initialize_data_structures_early_enough.patch
new file mode 100644
index 000000000000..90da0d1b2c59
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.1-initialize_data_structures_early_enough.patch
@@ -0,0 +1,74 @@
+From 291ec175812b7ba291d124e4cf2fbf9efec590c8 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@linbit.com>
+Date: Thu, 04 Oct 2012 10:33:09 +0000
+Subject: Initialize data structures early enough
+
+* src/patch.c (main): Initialize data structures early enough, before error
+paths can access them.
+* tests/bad-usage: Test bad command line usage.
+* tests/Makefile.am (TESTS): Add bad-usage here.
+---
+diff --git a/src/patch.c b/src/patch.c
+index 828943b..0255fbb 100644
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -150,6 +150,10 @@ main (int argc, char **argv)
+ else if ((version_control = getenv ("VERSION_CONTROL")))
+ version_control_context = "$VERSION_CONTROL";
+
++ init_backup_hash_table ();
++ init_files_to_delete ();
++ init_files_to_output ();
++
+ /* parse switches */
+ Argc = argc;
+ Argv = argv;
+@@ -162,10 +166,6 @@ main (int argc, char **argv)
+ if (make_backups | backup_if_mismatch)
+ backup_type = get_version (version_control_context, version_control);
+
+- init_backup_hash_table ();
+- init_files_to_delete ();
+- init_files_to_output ();
+-
+ init_output (&outstate);
+ if (outfile)
+ outstate.ofp = open_outfile (outfile);
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 02fc6de..5cea52d 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -20,6 +20,7 @@ TESTS = \
+ asymmetric-hunks \
+ backup-prefix-suffix \
+ bad-filenames \
++ bad-usage \
+ concat-git-diff \
+ copy-rename \
+ corrupt-reject-files \
+diff --git a/tests/bad-usage b/tests/bad-usage
+new file mode 100644
+index 0000000..022eeda
+--- a/dev/null
++++ b/tests/bad-usage
+@@ -0,0 +1,18 @@
++# Copyright (C) 2009, 2011-2012 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
++
++# ==============================================================
++
++check 'patch -px || echo "status: $?"' <<EOF
++$PATCH: **** strip count x is not a number
++status: 2
++EOF
+--
+cgit v0.9.0.2
diff --git a/sys-devel/patch/files/patch-2.7.1-prevent_depend_on_autotools.patch b/sys-devel/patch/files/patch-2.7.1-prevent_depend_on_autotools.patch
new file mode 100644
index 000000000000..72cf62d768f0
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.1-prevent_depend_on_autotools.patch
@@ -0,0 +1,45 @@
+Simple patch to prevent sys-devel/patch needing to depend on autotools to
+be built, which would likely make stage1 people unhappy.
+
+By: Doug Goldstein <cardoe@gentoo.org>
+Ref: bug #478548
+
+By: Lars Wendler <polynomial-c@gentoo.org>
+Ref: bug #485182
+---
+--- a/tests/Makefile.in
++++ b/tests/Makefile.in
+@@ -1075,6 +1075,7 @@
+ asymmetric-hunks \
+ backup-prefix-suffix \
+ bad-filenames \
++ bad-usage \
+ concat-git-diff \
+ copy-rename \
+ corrupt-reject-files \
+@@ -1104,6 +1105,7 @@
+ reject-format \
+ remember-backup-files \
+ remember-reject-files \
++ remove-directories \
+ symlinks \
+ unmodified-files
+
+@@ -1294,6 +1296,8 @@
+ @p='backup-prefix-suffix'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ bad-filenames.log: bad-filenames
+ @p='bad-filenames'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++bad-usage.log: bad-usage
++ @p='bad-usage'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ concat-git-diff.log: concat-git-diff
+ @p='concat-git-diff'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ copy-rename.log: copy-rename
+@@ -1352,6 +1356,8 @@
+ @p='remember-backup-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ remember-reject-files.log: remember-reject-files
+ @p='remember-reject-files'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++remove-directories.log: remove-directories
++ @p='remove-directories'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ symlinks.log: symlinks
+ @p='symlinks'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ unmodified-files.log: unmodified-files