Bug 238220 - security/snort: compilation produces a faulty binary when 'yacc' is used
Summary: security/snort: compilation produces a faulty binary when 'yacc' is used
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-29 16:36 UTC by Bill Meeks
Modified: 2019-05-29 21:04 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Meeks 2019-05-29 16:36:33 UTC
There can be an issue created by ambiguous use of 'yacc' instead of 'bison' when compiling the target-based modules in the Snort binary.  If 'yacc' is used, then the resulting binary will fail to read Host Attributes table XML files. The code will report a fatal syntax error and exit even when the XML file is actually properly formatted.  When 'bison' is used instead in the same builder environment, the resulting Snort binary will properly read the XML file for the Host Attributes table.

I was able to prevent this issue from happening by adding 'bison' to the USES= line in the Snort Makefile.  This forces the compiler to use 'bison' during the build.

Suggest adding 'bison' to the USES= line in the Makefile as it appears the compilation process produces a faulty Snort binary when 'yacc' is used on FreeBSD.  It seems 'yacc' can be the default in some FreeBSD build environments and will be used when no preference is specified in the Makefile.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-05-29 21:04:29 UTC
A commit references this bug:

Author: zi
Date: Wed May 29 21:03:30 UTC 2019
New revision: 503015
URL: https://svnweb.freebsd.org/changeset/ports/503015

Log:
  - Explicitly depend on bison
  - Bump PORTREVISION

  PR:		238220
  Submitted by:	Bill Meeks <bmeeks8@bellsouth.net>

Changes:
  head/security/snort/Makefile