From 54e141de26ca2baf086dd45864a80ebbd5d62ef90293bb8f8c081bc5bdba86d6 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Tue, 10 Aug 2010 15:01:05 +0000 Subject: [PATCH] add cpio-pattern-file-sigsegv.patch (bnc#629860) OBS-URL: https://build.opensuse.org/package/show/Archiving/cpio?expand=0&rev=23 --- cpio-close_files_after_copy.patch | 10 ++++------ cpio-pattern-file-sigsegv.patch | 21 +++++++++++++++++++++ cpio.changes | 5 +++++ cpio.spec | 22 ++++++++++++---------- 4 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 cpio-pattern-file-sigsegv.patch diff --git a/cpio-close_files_after_copy.patch b/cpio-close_files_after_copy.patch index a819eac..e4ac54f 100644 --- a/cpio-close_files_after_copy.patch +++ b/cpio-close_files_after_copy.patch @@ -1,13 +1,11 @@ Index: src/copyin.c =================================================================== ---- src/copyin.c.orig -+++ src/copyin.c -@@ -1484,7 +1484,20 @@ process_copy_in () - fputc ('\n', stderr); +--- src/copyin.c.orig 2010-08-10 16:45:19.000000000 +0200 ++++ src/copyin.c 2010-08-10 16:45:19.000000000 +0200 +@@ -1485,6 +1485,19 @@ process_copy_in () apply_delayed_set_stat (); -- -+ + + if (tty_in) + { + fclose(tty_in); diff --git a/cpio-pattern-file-sigsegv.patch b/cpio-pattern-file-sigsegv.patch new file mode 100644 index 0000000..2716b05 --- /dev/null +++ b/cpio-pattern-file-sigsegv.patch @@ -0,0 +1,21 @@ +Index: cpio-2.11/src/copyin.c +=================================================================== +--- cpio-2.11.orig/src/copyin.c 2010-08-10 16:45:19.000000000 +0200 ++++ cpio-2.11/src/copyin.c 2010-08-10 16:45:34.000000000 +0200 +@@ -862,6 +862,8 @@ read_pattern_file () + pattern_fp = fopen (pattern_file_name, "r"); + if (pattern_fp == NULL) + open_error (pattern_file_name); ++ else ++ { + while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL) + { + if (new_num_patterns >= max_new_patterns) +@@ -876,6 +878,7 @@ read_pattern_file () + } + if (ferror (pattern_fp) || fclose (pattern_fp) == EOF) + close_error (pattern_file_name); ++ } + + for (i = 0; i < num_patterns; ++i) + new_save_patterns[i] = save_patterns[i]; diff --git a/cpio.changes b/cpio.changes index 8de7cde..263d4a8 100644 --- a/cpio.changes +++ b/cpio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 10 14:48:32 UTC 2010 - puzel@novell.com + +- add cpio-pattern-file-sigsegv.patch (bnc#629860) + ------------------------------------------------------------------- Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de diff --git a/cpio.spec b/cpio.spec index 8533443..48f69e9 100644 --- a/cpio.spec +++ b/cpio.spec @@ -26,21 +26,22 @@ AutoReqProv: on Version: 2.11 Release: 2 Summary: A Backup and Archiving Utility -Source: %{name}-%{version}.tar.bz2 -Patch2: %{name}-use_new_ascii_format.patch +Source: cpio-%{version}.tar.bz2 +Patch2: cpio-use_new_ascii_format.patch #oouch what a ...?! pieces of code grabed from mt_st package to add missing functionality (e.g. density info) -Patch3: %{name}-mt.patch -Patch4: %{name}-use_sbin_rmt.patch -Patch5: %{name}-open_nonblock.patch +Patch3: cpio-mt.patch +Patch4: cpio-use_sbin_rmt.patch +Patch5: cpio-open_nonblock.patch #patch dir_perm reverts some things which were added by patch #7 chmodRaceC -Patch14: %{name}-dir_perm.patch -Patch15: %{name}-eof_tape_handling.patch +Patch14: cpio-dir_perm.patch +Patch15: cpio-eof_tape_handling.patch # make posibble to have device nodes with major number > 127 # Red Hat Bugzilla #450109 -Patch17: %{name}-dev_number.patch -Patch18: %{name}-default_tape_dev.patch +Patch17: cpio-dev_number.patch +Patch18: cpio-default_tape_dev.patch #PATCH-FIX-UPSTREAM cpio-2.10-close_files_after_copy.patch -Patch20: %{name}-close_files_after_copy.patch +Patch20: cpio-close_files_after_copy.patch +Patch21: cpio-pattern-file-sigsegv.patch PreReq: %install_info_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-lang = %{version} @@ -76,6 +77,7 @@ Authors: %patch17 %patch18 %patch20 +%patch21 -p1 #chmod 755 . #chmod u+w * #chmod a+r *