Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1177001 - gawk is being built with byacc instead of bison
Summary: gawk is being built with byacc instead of bison
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jan Chaloupka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-23 17:56 UTC by Andrew J. Schorr
Modified: 2015-01-17 05:49 UTC (History)
2 users (show)

Fixed In Version: gawk-4.1.0-4.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 00:03:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew J. Schorr 2014-12-23 17:56:54 UTC
Description of problem: Fedora 21 and Fedora 20 gawk appear to have been built with byacc.  The tarball ships with pre-built awkgram.c and command.c, but the binary behaves as if the files were regenerated using byacc instead of bison.  The binaries fail "make check".


Version-Release number of selected component (if applicable):
gawk-4.1.1-5.fc21.x86_64.rpm

How reproducible:
Build the source rpm, then copy the distributed binary into the build directory and run "make check"

Steps to Reproduce:
1. unpack source rpm
2. ./configure && make && make check && echo GOOD
3. rm awkgram.c; make "YACC=byacc" && make check; make diffout; cp /bin/gawk .; make check

Actual results:
make check fails with the distributed binary.  Note that it fails the same tests that gawk built with byacc fails.

Expected results:
make check should pass

Additional info:
Refer to bugzilla #1176993 for a spec file bug that allowed an improperly built binary to be distributed.

Comment 1 Andrew J. Schorr 2014-12-24 19:14:41 UTC
Perhaps the fix is as simple as replacing "BuildRequires: byacc" with "BuildRequires: bison" in the spec file.

Regards,
Andy

Comment 2 Jan Chaloupka 2015-01-02 13:20:00 UTC
Hi Andrew,

I don't see this as an issue. Parsing tests fails, just with a different parsing message. For noparams.ok, context-free rules are likely used in a different order.
Correcting test files will fix this issue but as this has no impact on functionality of gawk, no need to fix it.
However, if you find a case which should not be parsed, then it could be reported to upstream and fixed globally.
Thanks anyway.

Jan


*** noparms.ok	2012-05-03 20:13:57.000000000 +0200
--- _noparms	2015-01-02 14:03:59.870972857 +0100
***************
*** 1,5 ****
  gawk: noparms.awk:1: function x(a, b, c , ,) {}
  gawk: noparms.awk:1:                      ^ syntax error
- gawk: noparms.awk:1: function x(a, b, c , ,) {}
- gawk: noparms.awk:1:                       ^ syntax error
  EXIT CODE: 1
--- 1,3 ----
============== _parseme =============
*** parseme.ok	2014-01-20 20:53:01.000000000 +0100
--- _parseme	2015-01-02 14:03:59.977973344 +0100
***************
*** 1,5 ****
  gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
  gawk: parseme.awk:1:                       ^ syntax error
  gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
! gawk: parseme.awk:1:                                 ^ 3 is invalid as number of arguments for toupper
  EXIT CODE: 1
--- 1,5 ----
  gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
  gawk: parseme.awk:1:                       ^ syntax error
  gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
! gawk: parseme.awk:1:                                 ^ 2 is invalid as number of arguments for toupper
  EXIT CODE: 1

Comment 3 Andrew J. Schorr 2015-01-02 13:59:49 UTC
Hi Jan,

Thanks.  I am reporting this on behalf of upstream.  We (the upstream developers) develop gawk using bison, and we do all Q/A using bison.  Our intent is for bison to be used.  It is not wise or safe for Fedora to decide arbitrarily to use byacc instead.  What is the advantage to Fedora of using byacc?  Upstream respectfully requests that you fix the spec file and use bison instead of byacc.  We also don't really understand why the grammar is being parsed at all, since the tarball we distribute contains awkgram.c (derived from awkgram.y) and command.c (derived from command.y), so there should be no reason to rebuild these files in the absence of patches to the grammar.

Regards,
Andy

Comment 4 Jan Chaloupka 2015-01-02 14:08:08 UTC
As you wrote, there is no need to use byacc/bison during building.
Actually awkgram.c is never regenerated, it is still bison's output.

Updating the spec via and resolving this problem via #1176993.

Comment 5 Fedora Update System 2015-01-02 15:46:47 UTC
gawk-4.1.0-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/gawk-4.1.0-4.fc20

Comment 6 Fedora Update System 2015-01-02 15:47:08 UTC
gawk-4.1.1-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/gawk-4.1.1-6.fc21

Comment 7 Fedora Update System 2015-01-03 19:04:18 UTC
Package gawk-4.1.0-4.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gawk-4.1.0-4.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0069/gawk-4.1.0-4.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-01-13 00:03:11 UTC
gawk-4.1.1-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-01-17 05:49:21 UTC
gawk-4.1.0-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.