Bug 217108 - [PATCH] net/rtg: Fix configuration paths in CGIs and reports, improve rtgtargmkr.pl
Summary: [PATCH] net/rtg: Fix configuration paths in CGIs and reports, improve rtgtarg...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthew Seaman
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-02-14 21:07 UTC by Andrew
Modified: 2017-04-11 07:18 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd-ports)


Attachments
Patch based off of revision 434135 (4.59 KB, patch)
2017-02-14 21:07 UTC, Andrew
no flags Details | Diff
Patch that fixes PREFIX (4.98 KB, patch)
2017-03-27 15:29 UTC, Andrew
no flags Details | Diff
Fix typo in previous patch (6.17 KB, patch)
2017-03-27 15:55 UTC, Matthew Seaman
no flags Details | Diff
Now with USES=ssl too (5.21 KB, patch)
2017-03-27 16:09 UTC, Matthew Seaman
matthew: maintainer-approval?
Details | Diff

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