Bug 192646

Summary: [maintainer] security/bro: Add su flags so pkg initialization works
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: John Marino <marino>
Status: Closed FIXED    
Severity: Affects Some People CC: marino
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
patch for security/bro
leres: maintainer-approval+
patch for security/bro leres: maintainer-approval+

Description Craig Leres freebsd_committer 2014-08-14 03:00:07 UTC
Created attachment 145764 [details]
patch for security/bro

The default bro user does not have a valid shell so this pkg-plist line doesn't work:

    %%BROCTL%%@exec su %%BROUSER%% -c '%D/bin/broctl install'

It fails with this error:

    ===> Creating users and/or groups.
    Using existing group 'bro'.
    Using existing user 'bro'.
    [2/2] Reinstalling bro-2.3_1: 100%
    This account is currently not available.

The patch adds -fm to su. It also removes some duplicate pkg-plist lines.
Comment 1 Craig Leres freebsd_committer 2014-08-14 03:01:08 UTC
Comment on attachment 145764 [details]
patch for security/bro

Here's a redports build log for this patch:

Comment 2 John Marino freebsd_committer 2014-08-14 14:20:41 UTC

=======================<phase: check-sanity   >============================
/!\ bro-2.3_2: Makefile warnings, please consider fixing /!\

USE_PYTHON is deprecated, please use USES=python
Comment 3 John Marino freebsd_committer 2014-08-14 14:38:02 UTC
please submit a new patch fixing these errors (verify with make check-plist)

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%ETCDIR%%ctl.cfg
Error: Orphaned: etc/networks.cfg
Error: Orphaned: etc/node.cfg
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

make: stopped in /usr/ports/security/bro

While you are there, you can fix sanity-check warning too I guess.
Comment 4 Craig Leres freebsd_committer 2014-08-14 23:25:03 UTC
Created attachment 145793 [details]
patch for security/bro

Revised patch that fixes:

    - make check-plist
Comment 5 Craig Leres freebsd_committer 2014-08-14 23:26:06 UTC
Comment on attachment 145793 [details]
patch for security/bro

Also, redports log:

Comment 6 commit-hook freebsd_committer 2014-08-15 00:06:18 UTC
A commit references this bug:

Author: marino
Date: Fri Aug 15 00:05:18 UTC 2014
New revision: 364876
URL: http://svnweb.freebsd.org/changeset/ports/364876

  security/bro: Add su flags so pkg initialization works

  PR:		192646
  Submitted by:	maintainer (Craig Leres)

Comment 7 John Marino freebsd_committer 2014-08-15 00:06:35 UTC