diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 8edd080..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bison-2.0.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c5ae6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bison-2.4.tar.bz2 +bison-2.4.1.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index 94c9972..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile for source rpm: bison -# $Id$ -NAME := bison -SPECFILE = $(firstword $(wildcard *.spec)) - -include ../common/Makefile.common 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-2.4.1.tar.bz2.sig b/bison-2.4.1.tar.bz2.sig new file mode 100644 index 0000000..189ff8f Binary files /dev/null and b/bison-2.4.1.tar.bz2.sig differ diff --git a/bison.spec b/bison.spec index 51ce448..13afe7a 100644 --- a/bison.spec +++ b/bison.spec @@ -1,15 +1,17 @@ -Summary: A GNU general-purpose parser generator. +Summary: A GNU general-purpose parser generator Name: bison -Version: 2.0 -Release: 4 -License: GPL +Version: 2.4.1 +Release: 4%{?dist} +License: GPLv2+ Group: Development/Tools -#Source: ftp://ftp.gnu.org/pub/gnu/bison/bison-%{version}.tar.bz2 -Source: http://ftp.gnu.org/gnu/bison/bison-%{version}.tar.gz -Url: http://www.gnu.org/software/bison/ -Prereq: /sbin/install-info +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 @@ -34,16 +36,42 @@ Group: Development/Libraries 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 required by all Bison-generated parsers, but may be employed by +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 @@ -51,26 +79,37 @@ rm -rf $RPM_BUILD_ROOT # 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 -/sbin/install-info %{_infodir}/bison.info.gz %{_infodir}/dir --entry="* bison: (bison). The GNU parser generator." +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 - /sbin/install-info --delete %{_infodir}/bison.info.gz %{_infodir}/dir --entry="* bison: (bison). The GNU parser generator." + 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 REFERENCES THANKS TODO doc/FAQ +%doc AUTHORS ChangeLog NEWS OChangeLog README THANKS TODO %{_mandir}/*/bison* %{_datadir}/bison %{_infodir}/bison.info* %{_bindir}/bison +%{_datadir}/aclocal/bison*.m4 + +%files -f %{name}-runtime.lang runtime %files devel %defattr(-,root,root) @@ -80,11 +119,79 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Mon Aug 24 2009 Petr Machata - 2.4.1-4 +- Fix installation with --excludedocs +- Resolves: #515939 + +* Fri Jul 24 2009 Fedora Release Engineering - 2.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Fedora Release Engineering - 2.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sun Dec 28 2008 Petr Machata - 2.4.1-1 +- Rebase to 2.4.1 +- Resolves: #478348 + +* Wed Nov 12 2008 Petr Machata - 2.4-2 +- Rebase to 2.4 +- Resolves: #471183 + +* Mon Sep 15 2008 Petr Machata - 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 - 2.3-5 +- Autorebuild for GCC 4.3 + +* Tue Aug 28 2007 Roland McGrath - 2.3-4 +- Canonicalize License tag. + +* Sun Jan 21 2007 Roland McGrath - 2.3-3 +- Canonicalize post/preun use of install-info. +- Resolves: 223679 + +* Wed Jul 12 2006 Jesse Keating - 2.3-2.1 +- rebuild + +* Wed Jun 7 2006 Roland McGrath - 2.3-2 +- Add BuildRequires on m4. + +* Wed Jun 7 2006 Roland McGrath - 2.3-1 +- New upstream version 2.3 + +* Mon May 22 2006 Roland McGrath - 2.2-1 +- New upstream version 2.2 + +* Mon May 1 2006 Roland McGrath - 2.1-3 +- Fix K&R parser definition when it has no arguments (#190376). + +* Fri Feb 10 2006 Jesse Keating - 2.1-1.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 2.1-1.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Fri Oct 14 2005 Roland McGrath - 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 - 2.0-6 +- run test suite in %%check + +* Mon Mar 14 2005 Roland McGrath - 2.0-5 +- rebuilt + * Thu Jan 6 2005 Roland McGrath - 2.0-4 - update upstream URLs, add doc files (#144346) * Thu Jan 6 2005 Roland McGrath - 2.0-3 -- missing %defattr for subpackage +- missing %%defattr for subpackage * Thu Jan 6 2005 Roland McGrath - 2.0-2 - split liby.a into bison-devel package diff --git a/mirrors b/mirrors new file mode 100644 index 0000000..7aaad0b --- /dev/null +++ b/mirrors @@ -0,0 +1 @@ +http://ftp.gnu.org/gnu/bison diff --git a/sources b/sources index 2aadfe5..5112b04 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c17f964fd5504b88b07a183420de25e3 bison-2.0.tar.gz +84e80a2a192c1a4c02d43fbf2bcc4ca4 bison-2.4.1.tar.bz2 diff --git a/upstream b/upstream new file mode 100644 index 0000000..4980d5b --- /dev/null +++ b/upstream @@ -0,0 +1 @@ +bison-2.3.tar.bz2 diff --git a/upstream-key.gpg b/upstream-key.gpg new file mode 100644 index 0000000..7e88f82 --- /dev/null +++ b/upstream-key.gpg @@ -0,0 +1,48 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.1 (GNU/Linux) + +mQGiBD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