Bug 217108

Summary: [PATCH] net/rtg: Fix configuration paths in CGIs and reports, improve rtgtargmkr.pl
Product: Ports & Packages Reporter: Andrew <andrew.fengler>
Component: Individual Port(s)Assignee: Matthew Seaman <matthew>
Status: Closed FIXED    
Severity: Affects Only Me CC: andrew.fengler, freebsd-ports, matthew
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (freebsd-ports)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch based off of revision 434135
none
Patch that fixes PREFIX
none
Fix typo in previous patch
none
Now with USES=ssl too matthew: maintainer-approval?

Description Andrew 2017-02-14 21:07:15 UTC
Created attachment 179999 [details]
Patch based off of revision 434135

Fix configuration paths in CGIs and reports to include /usr/local/etc/rtg.
Affects common.php, reports.pl, and 95.pl.  This will fix the CGIs to almost work out of the box.

Improve rtgtargmkr.pl to skip unresponsive routers rather than dying.
Comment 1 Matthew Seaman freebsd_committer 2017-03-27 14:58:46 UTC
Hi, Andrew,

Your patches are forcing PREFIX == /usr/local and that's a no-no.

The normal approach is to use patching insert a %%PREFIX%% token into the 
various files and then use sed to convert that to the current value of
${PREFIX} as part of the post-patch: target.

Does that make sense to you?
Comment 2 Andrew 2017-03-27 15:29:05 UTC
Created attachment 181232 [details]
Patch that fixes PREFIX
Comment 3 Andrew 2017-03-27 15:29:38 UTC
I think I get it.  Does the new patch fix that?
Comment 4 Matthew Seaman freebsd_committer 2017-03-27 15:55:40 UTC
Created attachment 181234 [details]
Fix typo in previous patch
Comment 5 Matthew Seaman freebsd_committer 2017-03-27 16:04:58 UTC
Oh, and you need USES=ssl as well.
Comment 6 Matthew Seaman freebsd_committer 2017-03-27 16:09:46 UTC
Created attachment 181235 [details]
Now with USES=ssl too
Comment 7 Andrew 2017-03-27 16:13:06 UTC
Why does it need SSL?
Comment 8 Matthew Seaman freebsd_committer 2017-03-27 16:20:27 UTC
One of the binaries links against libcrypto.so

Adding 'USES=ssl' means it automatically links against the ports version of openssl or libressl if the user has specified one of those as a default.
Comment 9 Matthew Seaman freebsd_committer 2017-03-27 16:21:07 UTC
Use 'poudriere testport' to find these sort of things.
Comment 10 Andrew 2017-03-27 16:26:42 UTC
Ok.  Since it was just patches to some scripts I didn't bother testing much of the build.  I presumed that the existing port was acceptable.
Comment 11 Andrew 2017-04-07 14:56:54 UTC
Are we able to continue on this, or are you waiting on something?
Comment 12 Matthew Seaman freebsd_committer 2017-04-07 15:57:41 UTC
I'm waiting either for approval from the maintainer, or for the maintainer-timeout period to pass.  After that, I'll go ahead and commit.
Comment 13 commit-hook freebsd_committer 2017-04-11 07:18:22 UTC
A commit references this bug:

Author: matthew
Date: Tue Apr 11 07:17:49 UTC 2017
New revision: 438250
URL: https://svnweb.freebsd.org/changeset/ports/438250

Log:
  Patch based off of revision 434135

  Fix configuration paths in CGIs and reports to include /usr/local/etc/rtg.
  Affects common.php, reports.pl, and 95.pl.  This will fix the CGIs to almost work out of the box.

  Improve rtgtargmkr.pl to skip unresponsive routers rather than dying.

  Add USES=ssl

  PR:		217108
  Submitted by:	andrew.fengler@scaleengine.com
  Approved by:	maintainer timeout (15 days)

Changes:
  head/net/rtg/Makefile
  head/net/rtg/files/patch-etc-rtgtargmkr.pl.in
  head/net/rtg/files/patch-etc_95.pl
  head/net/rtg/files/patch-etc_common.php.in
  head/net/rtg/files/patch-etc_report.pl