summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-12-14 09:38:11 +0100
committerRemi Collet <fedora@famillecollet.com>2014-12-14 09:38:11 +0100
commitae3652c020cbaeafbcd07135559193a04900698d (patch)
tree9ccf5ffd62fda8fc9a06a80f3ef54dbcffc7f5af
import from RHEL-6HEADmaster
-rw-r--r--bison-2.4-reap_subpipe.patch87
-rw-r--r--bison.spec334
2 files changed, 421 insertions, 0 deletions
diff --git a/bison-2.4-reap_subpipe.patch b/bison-2.4-reap_subpipe.patch
new file mode 100644
index 0000000..3f72c3e
--- /dev/null
+++ b/bison-2.4-reap_subpipe.patch
@@ -0,0 +1,87 @@
+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
new file mode 100644
index 0000000..54a2cd4
--- /dev/null
+++ b/bison.spec
@@ -0,0 +1,334 @@
+Summary: A GNU general-purpose parser generator
+Name: bison
+Version: 2.4.1
+Release: 5%{?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
+Requires: m4 >= 1.4
+Requires(post): /sbin/install-info
+Requires(preun): /sbin/install-info
+
+%description
+Bison is a general purpose parser generator that converts a grammar
+description for an LALR(1) context-free grammar into a C program to
+parse that grammar. Bison can be used to develop a wide range of
+language parsers, from ones used in simple desk calculators to complex
+programming languages. Bison is upwardly compatible with Yacc, so any
+correctly written Yacc grammar should work with Bison without any
+changes. If you know Yacc, you shouldn't have any trouble using
+Bison. You do need to be very proficient in C programming to be able
+to use Bison. Bison is only needed on systems that are used for
+development.
+
+If your system will be used for C development, you should install
+Bison.
+
+%package devel
+Summary: -ly library for development using Bison-generated parsers
+Group: Development/Libraries
+
+%description devel
+The bison-devel package contains the -ly library sometimes used by
+programs using Bison-generated parsers. If you are developing programs
+using Bison, you might want to link with this library. This library
+is not required by all Bison-generated parsers, but may be employed by
+simple programs to supply minimal support for the generated parsers.
+
+# -ly is kept static. It only contains two symbols: main and yyerror,
+# and both of these are extremely simple (couple lines of C total).
+# It doesn't really pay off to introduce a shared library for that.
+#
+# Therefore -devel subpackage could have been created as -static, but
+# the split was done in Jan 2005, which predates current guidelines.
+# Besides there is logic to that: the library is devel in the sense
+# that the generated parser could be distributed together with other
+# sources, and only bison-devel would be necessary to wrap the build.
+
+%package runtime
+Summary: Runtime support files used by Bison-generated parsers
+Group: Development/Libraries
+
+%description runtime
+The bison-runtime package contains files used at runtime by parsers
+that Bison generates. Packages whose binaries contain parsers
+generated by Bison should depend on bison-runtime to ensure that
+these files are available. See the Internationalization in the
+Bison manual section for more information.
+
+%prep
+%setup -q
+%patch1 -p1
+
+%build
+%configure
+make
+
+%check
+make check
+#make maintainer-check
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%makeinstall
+
+# Remove unpackaged files.
+rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
+rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
+rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/yacc*
+
+%find_lang %{name}
+%find_lang %{name}-runtime
+
+gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/bison.info*
+
+%post
+if [ -f %{_infodir}/bison.info.gz ]; then # for --excludedocs
+ /sbin/install-info %{_infodir}/bison.info.gz %{_infodir}/dir --entry="* bison: (bison). The GNU parser generator." || :
+fi
+
+%preun
+if [ $1 = 0 ]; then
+ if [ -f %{_infodir}/bison.info.gz ]; then # for --excludedocs
+ /sbin/install-info --delete %{_infodir}/bison.info.gz %{_infodir}/dir --entry="* bison: (bison). The GNU parser generator." || :
+ fi
+fi
+
+# The distribution contains also source files. These are used by m4
+# when the target parser file is generated.
+%files -f %{name}.lang
+%defattr(-,root,root)
+%doc AUTHORS ChangeLog NEWS OChangeLog README THANKS TODO COPYING
+%{_mandir}/*/bison*
+%{_datadir}/bison
+%{_infodir}/bison.info*
+%{_bindir}/bison
+%{_datadir}/aclocal/bison*.m4
+
+%files -f %{name}-runtime.lang runtime
+%doc COPYING
+
+%files devel
+%doc COPYING
+%defattr(-,root,root)
+%{_libdir}/liby.a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Fri Mar 5 2010 Petr Machata <pmachata@redhat.com> - 2.4.1-5
+- Fix the license tag
+- Install COPYING
+- Resolves: #543948
+
+* Mon Aug 24 2009 Petr Machata <pmachata@redhat.com> - 2.4.1-4
+- Fix installation with --excludedocs
+- Resolves: #515939
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sun Dec 28 2008 Petr Machata <pmachata@redhat.com> - 2.4.1-1
+- Rebase to 2.4.1
+- Resolves: #478348
+
+* Wed Nov 12 2008 Petr Machata <pmachata@redhat.com> - 2.4-2
+- Rebase to 2.4
+- Resolves: #471183
+
+* Mon Sep 15 2008 Petr Machata <pmachata@redhat.com> - 2.3-6
+- Merge review:
+ - Drop terminating dot from Summary
+ - Escape macros inadvertently left in changelog
+ - Explain why are there source files in the main package
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.3-5
+- Autorebuild for GCC 4.3
+
+* Tue Aug 28 2007 Roland McGrath <roland@redhat.com> - 2.3-4
+- Canonicalize License tag.
+
+* Sun Jan 21 2007 Roland McGrath <roland@redhat.com> - 2.3-3
+- Canonicalize post/preun use of install-info.
+- Resolves: 223679
+
+* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.3-2.1
+- rebuild
+
+* Wed Jun 7 2006 Roland McGrath <roland@redhat.com> - 2.3-2
+- Add BuildRequires on m4.
+
+* Wed Jun 7 2006 Roland McGrath <roland@redhat.com> - 2.3-1
+- New upstream version 2.3
+
+* Mon May 22 2006 Roland McGrath <roland@redhat.com> - 2.2-1
+- New upstream version 2.2
+
+* Mon May 1 2006 Roland McGrath <roland@redhat.com> - 2.1-3
+- Fix K&R parser definition when it has no arguments (#190376).
+
+* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.1-1.2.1
+- bump again for double-long bug on ppc(64)
+
+* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.1-1.2
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
+- rebuilt
+
+* Fri Oct 14 2005 Roland McGrath <roland@redhat.com> - 2.1-1
+- New upstream version 2.1
+- New subpackage bison-runtime for i18n support files used by parsers.
+
+* Thu Apr 7 2005 Roland McGrath <roland@redhat.com> - 2.0-6
+- run test suite in %%check
+
+* Mon Mar 14 2005 Roland McGrath <roland@redhat.com> - 2.0-5
+- rebuilt
+
+* Thu Jan 6 2005 Roland McGrath <roland@redhat.com> - 2.0-4
+- update upstream URLs, add doc files (#144346)
+
+* Thu Jan 6 2005 Roland McGrath <roland@redhat.com> - 2.0-3
+- missing %%defattr for subpackage
+
+* Thu Jan 6 2005 Roland McGrath <roland@redhat.com> - 2.0-2
+- split liby.a into bison-devel package
+
+* Tue Jan 4 2005 Roland McGrath <roland@redhat.com> - 2.0-1
+- new upstream version
+
+* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Fri Jun 4 2004 Roland McGrath <roland@redhat.com> 1.875c-1
+- new upstream version (fixes bug #116823)
+
+* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Thu Oct 30 2003 Roland McGrath <roland@redhat.com> 1.875-6
+- add dependency on m4 (bug #108655)
+
+* Wed Sep 24 2003 Roland McGrath <roland@redhat.com> 1.875-5
+- remove problematic __attribute__ use for label (bug #105034)
+
+* Fri Aug 1 2003 Havoc Pennington <hp@redhat.com> 1.875-3
+- put #ifndef __cplusplus around attribute(unused) on goto label in yacc.c
+
+* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Sat Mar 22 2003 Roland McGrath <roland@redhat.com> 1.875-2
+- update specs for new files installed by new version
+
+* Wed Mar 19 2003 Roland McGrath <roland@redhat.com> 1.875-1
+- new upstream version 1.875 (bug #83184)
+
+* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
+- rebuilt
+
+* Wed Nov 27 2002 Than Ngo <than@redhat.com> 1.35-5
+- rebuild in new build enviroment
+- remove unneeded file
+
+* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Tue Jun 18 2002 Than Ngo <than@redhat.com> 1.35-3
+- don't forcibly strip binaries
+
+* Thu May 23 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Wed Mar 27 2002 Than Ngo <than@redhat.com> 1.35-1
+- 1.35 fix incompatible with C++ compilers (bug #62121)
+
+* Sun Mar 17 2002 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 1.34
+
+* Sat Feb 09 2002 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 1.33
+
+* Sat Jan 26 2002 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 1.32
+
+* Tue Jan 15 2002 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 1.31
+
+* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Mon Nov 27 2001 Than Ngo <than@redhat.com> 1.30-4
+- add missing Url
+
+* Sun Nov 25 2001 Than Ngo <than@redhat.com> 1.30-3
+- fixed coredumps on some input bug #56607i, thanks to Enrico for locating this bug
+
+* Tue Nov 06 2001 Than Ngo <than@redhat.com> 1.30-2
+- FHS packaging
+- use find_lang
+
+* Sun Nov 04 2001 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 1.30
+
+* Mon Oct 15 2001 Than Ngo <than@redhat.de> 1.29-1
+- update to 1.29
+- update Url (bug #54597)
+
+* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
+- Bump release + rebuild.
+
+* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
+- automatic rebuild
+
+* Sun Jun 18 2000 Than Ngo <than@redhat.de>
+- rebuilt in the new build environment
+- FHS packaging
+
+* Sat May 27 2000 Ngo Than <than@redhat.de>
+- rebuild for 7.0
+- put man pages and info files to correct place
+
+* Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
+- rebuild to gzip man page.
+
+* Fri Jul 16 1999 Jeff Johnson <jbj@redhat.com>
+- update to 1.28.
+
+* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
+- auto rebuild in the new build environment (release 3)
+
+* Mon Mar 8 1999 Jeff Johnson <jbj@redhat.com>
+- configure with datadir=/usr/lib (#1386).
+
+* Mon Feb 22 1999 Jeff Johnson <jbj@redhat.com>
+- updated text in spec file.
+- update to 1.27
+
+* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
+- build for glibc 2.1
+
+* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
+- translations modified for de, fr, tr
+
+* Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
+- built for Manhattan
+- added build root
+
+* Wed Oct 15 1997 Donnie Barnes <djb@redhat.com>
+- various spec file cleanups
+
+* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
+- built against glibc