Bug 192646 - [maintainer] security/bro: Add su flags so pkg initialization works
Summary: [maintainer] security/bro: Add su flags so pkg initialization works
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: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-14 03:00 UTC by Craig Leres
Modified: 2014-08-15 00:06 UTC (History)
1 user (show)

See Also:


Attachments
patch for security/bro (1.51 KB, patch)
2014-08-14 03:00 UTC, Craig Leres
leres: maintainer-approval+
Details | Diff
patch for security/bro (2.24 KB, patch)
2014-08-14 23:25 UTC, Craig Leres
leres: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer freebsd_triage 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 freebsd_triage 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:

    https://redports.org/~leres/20140814025522-50812-233864/bro-2.3_2.log
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-14 14:20:41 UTC
FYI:

=======================<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 freebsd_triage 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

Stop.
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 freebsd_triage 2014-08-14 23:25:03 UTC
Created attachment 145793 [details]
patch for security/bro

Revised patch that fixes:

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

Also, redports log:

    https://redports.org/~leres/20140814230414-81772-234103/bro-2.3_2.log
Comment 6 commit-hook freebsd_committer freebsd_triage 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

Log:
  security/bro: Add su flags so pkg initialization works

  PR:		192646
  Submitted by:	maintainer (Craig Leres)

Changes:
  head/security/bro/Makefile
  head/security/bro/pkg-plist
Comment 7 John Marino freebsd_committer freebsd_triage 2014-08-15 00:06:35 UTC
Thanks!