Bug 198051

Summary: [MAINTAINER] net-mgmt/pandorafms_*: Update to 5.1SP2
Product: Ports & Packages Reporter: KIKUCHI Koichiro <oi4io5me.cesium3>
Component: Individual Port(s)Assignee: John Marino <marino>
Status: Closed FIXED    
Severity: Affects Only Me CC: marino
Priority: --- Keywords: patch-ready
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
Patch for net-mgmt/pandorafms_*
poudriere testport log (net-mgmt/pandorafms_agent)
poudriere testport log (net-mgmt/pandorafms_console)
poudriere testport log (net-mgmt/pandorafms_server) none

Description KIKUCHI Koichiro 2015-02-26 10:44:29 UTC
Created attachment 153539 [details]
Patch for net-mgmt/pandorafms_*

Update to Pandora FMS 5.1SP2

Deleted Files:
- net-mgmt/pandorafms_console/files/patch-WLB-2014110100
Comment 1 KIKUCHI Koichiro 2015-02-26 10:45:31 UTC
Created attachment 153540 [details]
poudriere testport log (net-mgmt/pandorafms_agent)
Comment 2 KIKUCHI Koichiro 2015-02-26 10:46:02 UTC
Created attachment 153541 [details]
poudriere testport log (net-mgmt/pandorafms_console)
Comment 3 KIKUCHI Koichiro 2015-02-26 10:46:47 UTC
Created attachment 153542 [details]
poudriere testport log (net-mgmt/pandorafms_server)
Comment 4 John Marino freebsd_committer 2015-03-05 13:58:09 UTC
everything looks okay (and thanks for the logs), but I have a question about this line:

@exec [ -e %B/include/config.php ] || cp -p %D/%F %B/install.php

why did you keep @exec rather than use @sample ?
Comment 5 KIKUCHI Koichiro 2015-03-05 16:55:30 UTC
Because the line you mentioned does activate installer if configuration file does not exist, not install sample configuration file.
Comment 6 John Marino freebsd_committer 2015-03-05 17:00:23 UTC
mv install.php to ${STAGEDIR}${PREFIX}/include/config.php.sample in post-stage target.

then @sample include/config.php

should work right?

if not, why not?
Comment 7 KIKUCHI Koichiro 2015-03-05 17:11:05 UTC
%F is "install.done" file listed at previous line, not include/config.php.

I believe that I can't use @sample in this case.
Comment 8 John Marino freebsd_committer 2015-03-05 17:25:37 UTC
okay, I sort of see what this port is doing -- a series of hacks to work around the fact that install.php and config.php can't be installed at the same time, but yet the port doesn't work without config.php which needs install.php to create it.


Okay, I'll take your word for it this mess is the best way to handle the installation of this port.
Comment 9 KIKUCHI Koichiro 2015-03-05 18:11:51 UTC
you're right.

After install Pandora FMS Console, we need run install.php for initial setup.

include/config.php is generated by install.php and once initial configuration process is finished, we have to remove (or rename) install.php.

See Pandora FMS install documentation for detail: 

Since listing "install.php" to pkg-plist cause plist error, pandorafms_console port installs "install.php" as "install.done" and create "install.php" from install.done as required.
Comment 10 John Marino freebsd_committer 2015-05-17 14:14:24 UTC
It's embarrassing that nobody has picked this up yet.  I'll take this out of pity. :)
Comment 11 commit-hook freebsd_committer 2015-05-17 14:45:10 UTC
A commit references this bug:

Author: marino
Date: Sun May 17 14:44:28 UTC 2015
New revision: 386617
URL: https://svnweb.freebsd.org/changeset/ports/386617

  net-mgmt/pandorafms_(agent|console|server): Upgrade version 5.1SP1 => 5.1SP2

  PR:		198051
  Submitted by:	KIKUCHI Koichiro (maintainer)

Comment 12 John Marino freebsd_committer 2015-05-17 14:45:59 UTC
Thanks, They all passed poudriere on FreeBSD 9.1/amd64 fine too.