commit c8349e6a70af5d6e53f29424a85ef9d82ef5dfb9 Author: CentOS Sources Date: Tue May 7 06:28:42 2019 -0400 import bison-3.0.4-10.el8 diff --git a/.bison.metadata b/.bison.metadata new file mode 100644 index 0000000..39bb6b9 --- /dev/null +++ b/.bison.metadata @@ -0,0 +1 @@ +8270497aad88c7dd4f2c317298c50513fb0c3c8e SOURCES/bison-3.0.4.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b239582 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/bison-3.0.4.tar.xz diff --git a/SOURCES/bison-3.0.4-c++-test-failure.patch b/SOURCES/bison-3.0.4-c++-test-failure.patch new file mode 100644 index 0000000..89fc5f6 --- /dev/null +++ b/SOURCES/bison-3.0.4-c++-test-failure.patch @@ -0,0 +1,151 @@ +commit 952416114729b95209dccfc4edacfc1ff13b4e82 +Author: Akim Demaille +Date: Mon Jan 26 18:23:12 2015 +0100 + + tests: c++: fix symbol lookup issue + + Sun C 5.13 SunOS_sparc 2014/10/20 reports errors on tests 430-432. + + Reported by Dennis Clarke. + + + * tests/c++.at (Variants): Be sure to emit operator<< before using it: + use "%code top" rather than "%code". + Prefer std::vector to std::list. + Do not define anything in std::, to avoid undefined behavior. + +diff --git a/tests/c++.at b/tests/c++.at +index 55d7d40..60292f4 100644 +--- a/tests/c++.at ++++ b/tests/c++.at +@@ -96,7 +96,7 @@ AT_SETUP([C++ Variant-based Symbols]) + AT_KEYWORDS([variant]) + + AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc" %debug $1]) +-# Store strings and integers in a list of strings. ++# Store strings and integers in a vector of strings. + AT_DATA_GRAMMAR([list.y], + [[%skeleton "lalr1.cc" + %define api.value.type variant +@@ -114,20 +114,20 @@ AT_DATA_GRAMMAR([list.y], + } + + %token INT "int" +-%type < std::list > exp ++%type < std::vector > exp + + %printer { yyo << $$; } + %printer + { +- for (std::list::const_iterator i = $$.begin (); i != $$.end (); ++i) ++ for (std::vector::const_iterator i = $$.begin (); i != $$.end (); ++i) + { + if (i != $$.begin ()) + yyo << ", "; + yyo << *i; + } +- } < std::list > ++ } < std::vector > + +-%code requires { #include } ++%code requires { #include } + %code { int yylex (yy::parser::semantic_type* yylval); } + + %% +@@ -185,7 +185,7 @@ m4_pushdef([AT_TEST], + [AT_SETUP([Variants $1]) + + AT_BISON_OPTION_PUSHDEFS([%debug $1]) +-# Store strings and integers in a list of strings. ++# Store strings and integers in a vector of strings. + AT_DATA_GRAMMAR([list.y], + [[%debug + %define api.value.type variant +@@ -194,29 +194,25 @@ AT_DATA_GRAMMAR([list.y], + + %code requires // code for the .hh file + { +-#include ++#include + #include +-typedef std::list strings_type; ++typedef std::vector strings_type; + } + +-%code // code for the .cc file ++%code top // code for the .cc file. + { + #include // abort, getenv + #include ++#include + #include ++#include + +- namespace yy +- { +- static]AT_TOKEN_CTOR_IF([[ +- parser::symbol_type yylex ()]], [[ +- parser::token_type yylex (parser::semantic_type* yylval]AT_LOCATION_IF([, +- parser::location_type* yylloc])[)]])[; +- } + +- // Printing a list of strings (for %printer). +- // Koening look up will look into std, since that's an std::list. +- namespace std ++ typedef std::vector strings_type; ++ ++ namespace yy + { ++ // Must be available early, as is used in %destructor. + std::ostream& + operator<<(std::ostream& o, const strings_type& s) + { +@@ -230,16 +226,27 @@ typedef std::list strings_type; + return o << ')'; + } + } ++} + +- // Conversion to string. +- template +- inline +- std::string +- to_string (const T& t) ++%code // code for the .cc file. ++{ ++ namespace yy + { +- std::ostringstream o; +- o << t; +- return o.str (); ++ static]AT_TOKEN_CTOR_IF([[ ++ parser::symbol_type yylex ()]], [[ ++ parser::token_type yylex (parser::semantic_type* yylval]AT_LOCATION_IF([, ++ parser::location_type* yylloc])[)]])[; ++ ++ // Conversion to string. ++ template ++ inline ++ std::string ++ to_string (const T& t) ++ { ++ std::ostringstream o; ++ o << t; ++ return o.str (); ++ } + } + } + +@@ -252,10 +259,10 @@ typedef std::list strings_type; + // Using the template type to exercize its parsing. + // Starting with :: to ensure we don't output "<::" which starts by the + // digraph for the left square bracket. +-%type <::std::list> list; ++%type <::std::vector> list; + + %printer { yyo << $$; } +- <::std::string> <::std::list>; ++ <::std::string> <::std::vector>; + %destructor { std::cerr << "Destroy: " << $$ << '\n'; } <*>; + %destructor { std::cerr << "Destroy: \"" << $$ << "\"\n"; } <::std::string>; + %% diff --git a/SOURCES/bison-3.0.4-gnulib-fseterr.patch b/SOURCES/bison-3.0.4-gnulib-fseterr.patch new file mode 100644 index 0000000..a0070f0 --- /dev/null +++ b/SOURCES/bison-3.0.4-gnulib-fseterr.patch @@ -0,0 +1,19 @@ +commit 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e +Author: Paul Eggert +Date: Mon Mar 5 10:56:29 2018 -0800 + + fflush: adjust to glibc 2.28 libio.h removal + (Only part of this commit was backported as needed.) + +diff -Nrup a/lib/fseterr.c b/lib/fseterr.c +--- a/lib/fseterr.c 2015-01-04 11:43:50.000000000 -0500 ++++ b/lib/fseterr.c 2018-08-06 01:27:29.869844228 -0400 +@@ -29,7 +29,7 @@ fseterr (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags |= _IO_ERR_SEEN; + #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + fp_->_flags |= __SERR; diff --git a/SPECS/bison.spec b/SPECS/bison.spec new file mode 100644 index 0000000..87b1c82 --- /dev/null +++ b/SPECS/bison.spec @@ -0,0 +1,453 @@ +Summary: A GNU general-purpose parser generator +Name: bison +Version: 3.0.4 +Release: 10%{?dist} +License: GPLv3+ +Group: Development/Tools +Source: ftp://ftp.gnu.org/pub/gnu/bison/bison-%{version}.tar.xz + +# https://bugzilla.redhat.com/show_bug.cgi?id=948856 +# Submitted for upstream inclusion on 2013-05-17. +Patch0: bison-3.0.4-c++-test-failure.patch +Patch1: bison-3.0.4-gnulib-fseterr.patch + +# testsuite dependency +BuildRequires: autoconf +BuildRequires: flex +BuildRequires: gcc-c++ + +URL: http://www.gnu.org/software/bison/ +BuildRoot: %{_tmppath}/%{name}-root +BuildRequires: m4 >= 1.4 +#java-1.7.0-openjdk-devel +Requires: m4 >= 1.4 +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info + +# bison contains a copy of gnulib. As a copylib, gnulib was granted +# an exception that allows bundling it with other software. For +# details, see: +# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Exceptions +Provides: bundled(gnulib) + +%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 +Provides: bison-static = %{version}-%{release} + +%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 +%patch0 -p1 +%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* +rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/calc++/* +rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/mfcalc/* +rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/rpcalc/* + +%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 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 +* Sun Aug 05 2018 Patsy Griffin Franklin - 3.0.4-10 +- Add changes needed to gnulib fseterr.c since libio.h has been removed. + +* Wed Feb 07 2018 Fedora Release Engineering - 3.0.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 3.0.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.0.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Feb 13 2017 Patsy Franklin - 3.0.4-6 +- Proposed upstream patch to fix testsuite failures for tests 430-432. + BZ #1422261 + +* Fri Feb 10 2017 Fedora Release Engineering - 3.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 3.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Oct 22 2015 Patsy Franklin - 3.0.4-3 +- Remove unpackaged files. + +* Wed Jun 17 2015 Fedora Release Engineering - 3.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Mar 02 2015 Patsy Franklin - 2.0.4-1 +- Rebase to 3.0.4. + +* Fri Aug 15 2014 Fedora Release Engineering - 3.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Dec 09 2013 Patsy Franklin - 3.0.2-1 +- Rebase to 3.0.2. Add BuildRequires: flex for testsuite. + +* Sat Aug 03 2013 Fedora Release Engineering - 2.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri May 17 2013 Petr Machata - 2.7-2 +- Drop unused options --raw, -n, -e, --include and -I + +* Thu Mar 21 2013 Petr Machata - 2.7-1 +- Rebase to 2.7 + +* Wed Feb 13 2013 Fedora Release Engineering - 2.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Nov 2 2012 Orion Poplawski - 2.6.4-1 +- Update to 2.6.4 + +* Tue Jul 31 2012 Petr Machata - 2.6.1-1 +- Rebase to 2.6.1 + - Drop bison-2.4.2-drop-test-67.patch +- Resolves: #829028 + +* Wed Jul 18 2012 Fedora Release Engineering - 2.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue May 15 2012 Petr Machata - 2.5-4 +- Add a virtual provides for bundled(gnulib). +- Resolves: #821746 + +* Tue Apr 17 2012 Bill Nottingham - 2.5-2 +- swap java-openjdk-1.6.0 for 1.7.0 in buildrequirements + +* Thu Jan 12 2012 Fedora Release Engineering - 2.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Jun 22 2011 Petr Machata - 2.5-1 +- Upstream 2.5 + +* Mon Feb 07 2011 Fedora Release Engineering - 2.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Aug 11 2010 Petr Machata - 2.4.3-1 +- Rebase to 2.4.3 +- Resolves: #621854 + +* Thu Jul 1 2010 Petr Machata - 2.4.2-3 +- Devel subpackage now provides boost-static, as per Fedora + guidelines. +- Resolves: #609599 + +* Thu Apr 8 2010 Petr Machata - 2.4.2-2 +- Disable the mysteriously failing test no. 67. Details in associated + bugreport. (bison-2.4.2-drop-test-67.patch) +- Resolves: #576513 + +* 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 + +* 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 + +* Thu Jan 6 2005 Roland McGrath - 2.0-2 +- split liby.a into bison-devel package + +* Tue Jan 4 2005 Roland McGrath - 2.0-1 +- new upstream version + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Jun 4 2004 Roland McGrath 1.875c-1 +- new upstream version (fixes bug #116823) + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Oct 30 2003 Roland McGrath 1.875-6 +- add dependency on m4 (bug #108655) + +* Wed Sep 24 2003 Roland McGrath 1.875-5 +- remove problematic __attribute__ use for label (bug #105034) + +* Fri Aug 1 2003 Havoc Pennington 1.875-3 +- put #ifndef __cplusplus around attribute(unused) on goto label in yacc.c + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Sat Mar 22 2003 Roland McGrath 1.875-2 +- update specs for new files installed by new version + +* Wed Mar 19 2003 Roland McGrath 1.875-1 +- new upstream version 1.875 (bug #83184) + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Nov 27 2002 Than Ngo 1.35-5 +- rebuild in new build enviroment +- remove unneeded file + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Tue Jun 18 2002 Than Ngo 1.35-3 +- don't forcibly strip binaries + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Wed Mar 27 2002 Than Ngo 1.35-1 +- 1.35 fix incompatible with C++ compilers (bug #62121) + +* Sun Mar 17 2002 Florian La Roche +- update to 1.34 + +* Sat Feb 09 2002 Florian La Roche +- update to 1.33 + +* Sat Jan 26 2002 Florian La Roche +- update to 1.32 + +* Tue Jan 15 2002 Florian La Roche +- update to 1.31 + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Tue Nov 27 2001 Than Ngo 1.30-4 +- add missing Url + +* Sun Nov 25 2001 Than Ngo 1.30-3 +- fixed coredumps on some input bug #56607i, thanks to Enrico for locating this bug + +* Tue Nov 06 2001 Than Ngo 1.30-2 +- FHS packaging +- use find_lang + +* Sun Nov 04 2001 Florian La Roche +- update to 1.30 + +* Mon Oct 15 2001 Than Ngo 1.29-1 +- update to 1.29 +- update Url (bug #54597) + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Sun Jun 18 2000 Than Ngo +- rebuilt in the new build environment +- FHS packaging + +* Sat May 27 2000 Ngo Than +- rebuild for 7.0 +- put man pages and info files to correct place + +* Thu Feb 03 2000 Preston Brown +- rebuild to gzip man page. + +* Fri Jul 16 1999 Jeff Johnson +- update to 1.28. + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 3) + +* Mon Mar 8 1999 Jeff Johnson +- configure with datadir=/usr/lib (#1386). + +* Mon Feb 22 1999 Jeff Johnson +- updated text in spec file. +- update to 1.27 + +* Thu Dec 17 1998 Cristian Gafton +- build for glibc 2.1 + +* Fri Apr 24 1998 Prospector System +- translations modified for de, fr, tr + +* Wed Apr 08 1998 Cristian Gafton +- built for Manhattan +- added build root + +* Wed Oct 15 1997 Donnie Barnes +- various spec file cleanups + +* Mon Jun 02 1997 Erik Troan +- built against glibc