Bug 224239 - security/base-audit: update to 0.2
Summary: security/base-audit: update to 0.2
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: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-11 09:44 UTC by Yasuhiro KIMURA
Modified: 2018-01-12 15:29 UTC (History)
2 users (show)

See Also:
000.fbsd: maintainer-feedback+
000.fbsd: maintainer-feedback+


Attachments
patch file (453 bytes, patch)
2017-12-11 09:44 UTC, Yasuhiro KIMURA
no flags Details | Diff
updated patch file (4.62 KB, patch)
2017-12-16 05:09 UTC, Yasuhiro KIMURA
no flags Details | Diff
updated port version 0.2 (5.57 KB, patch)
2018-01-03 21:53 UTC, Miroslav Lachman
no flags Details | Diff
poudriere testport build log (12.36 KB, text/plain)
2018-01-03 21:55 UTC, Miroslav Lachman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro KIMURA 2017-12-11 09:44:37 UTC
Created attachment 188706 [details]
patch file

* Add pkg-message to SUB_FILES.
* Bump PORTREVISION.
Comment 1 Miroslav Lachman 2017-12-11 12:47:51 UTC
Thank you for this bugfix!

Maintainer approved. Please commit this fix.
Comment 2 Yasuhiro KIMURA 2017-12-16 05:09:00 UTC
Created attachment 188871 [details]
updated patch file

* Simply move files/pkg-message.in to pkg-message because content of this file  need not to be processed.
* Rename daily_status_security_baseaudit_* variables to security_status_baseaudit_* in files/405.pkg-base-audit.in because this file is not daily periodic script but security periodic script. Old daily_status_security_baseaudit_* variables are still available for backward compatibility. But warning messages are displayed if they are set explicitly in /etc/periodic.conf.
* Introduce security_status_baseaudit_period variable to files/405.pkg-base-audit.in in order to make it possible to specify when this script is executed (i.e. daily, weekly or monthly).
* Update pkg-message to reflect above 2 changes.

So please commit attached patch instead of original one.

And when committing updated patch, please take following steps.

1. cd /usr/ports/security/base-audit
2. svn move files/pkg-message.in pkg-message
3. svn patch /path/to/updated/patch
4. svn commit
Comment 3 Yasuhiro KIMURA 2017-12-16 05:13:51 UTC
(In reply to Miroslav Lachman from comment #1)

Thank you for approval. But I updated patch to introduce some improvements. So please check updated patch and approve it again if it is OK.
Comment 4 Miroslav Lachman 2017-12-16 09:15:57 UTC
I am not strongly against these changes but... the script it-self imitates 410.pkg-audit (because it does the same thing for base, instead of packages)
If you look in to 410.pkg-audit (installed by pkg), you will see the same variable names with just s/pkgaudit/baseaudit/:

daily_status_security_pkgaudit_expiry
daily_status_security_pkgaudit_chroots
daily_status_security_pkgaudit_jails
daily_status_security_pkgaudit_enable
daily_status_security_pkgaudit_quiet

So I don't think it is good to change it in base-audit script.
 Both are doing the same thing. It is not good for users to have these mixed in periodic.conf

daily_status_security_pkgaudit_expiry
daily_status_security_pkgaudit_chroots
daily_status_security_pkgaudit_jails
daily_status_security_pkgaudit_enable
daily_status_security_pkgaudit_quiet

security_status_baseaudit_enable
security_status_baseaudit_period
security_status_baseaudit_quiet
security_status_baseaudit_chroots
security_status_baseaudit_jails
security_status_baseaudit_expiry
Comment 5 Yasuhiro KIMURA 2017-12-16 17:18:23 UTC
(In reply to Miroslav Lachman from comment #4)

Thank you for feedback. I submitted following pull request to pkg repository on GitHub.

https://github.com/freebsd/pkg/pull/1648
Comment 6 Miroslav Lachman 2017-12-16 21:26:48 UTC
(In reply to Yasuhiro KIMURA from comment #5)

Thank you for your work!
If pkg devs will accept your proposal then it will make sense to change variable names in base-audit too.
We will see. ;)
Comment 7 Yasuhiro KIMURA 2018-01-03 15:09:59 UTC
(In reply to Miroslav Lachman from comment #6)

My pull request was merged by upstream. Just FYI.
Comment 8 Miroslav Lachman 2018-01-03 21:51:17 UTC
(In reply to Yasuhiro KIMURA from comment #7)
Thank you for reminder.

I merged all your changes in to base-audit-0.2. 
https://github.com/MirLach/freebsd-ports/commit/2d622da9f1032ca4fb85c824166929ba564e535d

Patch attached.
Tested with poudrier testport.

Please commit new port version.
Comment 9 Miroslav Lachman 2018-01-03 21:53:26 UTC
Created attachment 189378 [details]
updated port version 0.2
Comment 10 Miroslav Lachman 2018-01-03 21:55:14 UTC
Created attachment 189379 [details]
poudriere testport build log
Comment 11 Kurt Jaeger freebsd_committer 2018-01-12 15:29:03 UTC
Committed, thanks!
Comment 12 commit-hook freebsd_committer 2018-01-12 15:29:56 UTC
A commit references this bug:

Author: pi
Date: Fri Jan 12 15:29:00 UTC 2018
New revision: 458854
URL: https://svnweb.freebsd.org/changeset/ports/458854

Log:
  security/base-audit: update 0.1 -> 0.2

  - Introduce security_status_baseaudit_period variable to
    files/405.pkg-base-audit.in in order to make it possible to specify
    when this script is executed (i.e. daily, weekly or monthly).

  PR:		224239
  Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>, Miroslav Lachman <000.fbsd@quip.cz> (maintainer)

Changes:
  head/security/base-audit/Makefile
  head/security/base-audit/files/405.pkg-base-audit.in
  head/security/base-audit/files/pkg-message.in
  head/security/base-audit/pkg-message