From 4ff6b59cdba305412f102d67e7c021804d818cf6 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Apr 07 2010 14:43:57 +0000 Subject: - Rebase to 2.4.2 - Drop reap_subpipe patch, upstream has a fix - Resolves: #576513 --- diff --git a/.cvsignore b/.cvsignore index 4c5ae6e..bd78480 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ bison-2.4.tar.bz2 bison-2.4.1.tar.bz2 +bison-2.4.2.tar.bz2 diff --git a/bison-2.4-reap_subpipe.patch b/bison-2.4-reap_subpipe.patch deleted file mode 100644 index 3f72c3e..0000000 --- a/bison-2.4-reap_subpipe.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff -urp bison-2.4-pm/lib/subpipe.c bison-2.4/lib/subpipe.c ---- bison-2.4-pm/lib/subpipe.c 2008-07-14 10:56:12.000000000 +0200 -+++ bison-2.4/lib/subpipe.c 2008-11-20 14:37:42.000000000 +0100 -@@ -143,7 +143,9 @@ create_subpipe (char const * const *argv - } - - --/* Wait for the subprocess to exit. */ -+/* Wait for the subprocess to exit. PROGRAM==NULL means errors -+ shouldn't be emitted, typically becuase we are reaping the subpipe -+ in response to some other error. */ - - void - reap_subpipe (pid_t pid, char const *program) -@@ -151,11 +153,14 @@ reap_subpipe (pid_t pid, char const *pro - #if HAVE_WAITPID || defined waitpid - int wstatus; - if (waitpid (pid, &wstatus, 0) < 0) -- error (EXIT_FAILURE, errno, "waitpid"); -+ { -+ if (program) -+ error (EXIT_FAILURE, errno, "waitpid"); -+ } - else - { - int status = WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -1; -- if (status) -+ if (status && program) - error (EXIT_FAILURE, 0, - _(status == 126 - ? "subsidiary program `%s' could not be invoked" -diff -urp bison-2.4-pm/src/output.c bison-2.4/src/output.c ---- bison-2.4-pm/src/output.c 2008-11-02 19:09:10.000000000 +0100 -+++ bison-2.4/src/output.c 2008-11-20 14:39:08.000000000 +0100 -@@ -467,6 +467,21 @@ prepare_actions (void) - | Call the skeleton parser. | - `---------------------------*/ - -+static pid_t pid = 0; -+ -+/* Clean up opened pipe. */ -+static void -+die (void) -+{ -+ static int dying = 0; -+ if (pid && !dying) -+ { -+ dying = 1; -+ reap_subpipe (pid, NULL); -+ pid = 0; -+ } -+} -+ - static void - output_skeleton (void) - { -@@ -474,7 +489,6 @@ output_skeleton (void) - FILE *out; - int filter_fd[2]; - char const *argv[9]; -- pid_t pid; - - /* Compute the names of the package data dir and skeleton files. */ - char const m4sugar[] = "m4sugar/m4sugar.m4"; -@@ -586,6 +600,7 @@ output_skeleton (void) - scan_skel (in); - xfclose (in); - reap_subpipe (pid, m4); -+ pid = 0; - timevar_pop (TV_M4); - } - -@@ -653,6 +669,14 @@ prepare (void) - void - output (void) - { -+ /* Register shutdown handler. */ -+ static int registered = 0; -+ if (!registered) -+ { -+ registered = 1; -+ atexit (die); -+ } -+ - obstack_init (&format_obstack); - - prepare_symbols (); diff --git a/bison.spec b/bison.spec index 085c535..ccf083c 100644 --- a/bison.spec +++ b/bison.spec @@ -1,11 +1,10 @@ Summary: A GNU general-purpose parser generator Name: bison -Version: 2.4.1 -Release: 5%{?dist} +Version: 2.4.2 +Release: 1%{?dist} License: GPLv3+ Group: Development/Tools Source: ftp://ftp.gnu.org/pub/gnu/bison/bison-%{version}.tar.bz2 -Patch1: bison-2.4-reap_subpipe.patch URL: http://www.gnu.org/software/bison/ BuildRoot: %{_tmppath}/%{name}-root BuildRequires: m4 >= 1.4 java-1.6.0-openjdk-devel @@ -62,7 +61,6 @@ Bison manual section for more information. %prep %setup -q -%patch1 -p1 %build %configure @@ -121,6 +119,11 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 7 2010 Petr Machata - 2.4.2-1 +- Rebase to 2.4.2 +- Drop reap_subpipe patch, upstream has a fix +- Resolves: #576513 + * Fri Mar 5 2010 Petr Machata - 2.4.1-5 - Fix the license tag - Install COPYING diff --git a/sources b/sources index 5112b04..ba5ff9b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -84e80a2a192c1a4c02d43fbf2bcc4ca4 bison-2.4.1.tar.bz2 +63584004613aaef2d3dca19088eb1654 bison-2.4.2.tar.bz2