Summary: | net/rtg: fix runtime php errors / add new feature | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Daniel Austin <freebsd-ports> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Rodrigo Osorio <rodrigo> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Some People | CC: | 0mp, andrew.fengler, freebsd-ports, mfechner, pi, rodrigo | ||||||||||||
Priority: | --- | Keywords: | needs-qa | ||||||||||||
Version: | Latest | Flags: | koobs:
maintainer-feedback?
(freebsd-ports) freebsd-ports: merge-quarterly? |
||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
Attachments: |
|
Description
Daniel Austin
2018-04-08 15:57:08 UTC
Created attachment 192348 [details] fix various issues, add flavor support in addition to previous patch's comments, this also adds flavor support. Updated logs at: https://poudriere.dan.tm/poudriere/data/latest-per-pkg/rtg/0.7.4_15/ Testbuild running. I get the following build error: https://pkg.fechner.net/data/112amd64-gitlab/2018-10-20_13h19m33s/logs/errors/rtg-0.7.4_15.log (In reply to Matthias Fechner from comment #3) hmm i've never tried it linking against mariadb before - only vanilla mysql. I'll look into it though. Created attachment 198406 [details]
fix build with mariadb
(In reply to Matthias Fechner from comment #3) ok - it should build now (it would've built before with stock bsd port defaults, but it's good to get it to build with mariadb too!) (In reply to Daniel Austin from comment #5) sry, but see the same error message: https://pkg.fechner.net/data/112amd64-gitlab/2018-10-20_20h48m11s/logs/errors/rtg-0.7.4_15.log (In reply to Matthias Fechner from comment #7) hmm, you should only get that if your mariadb install is not thread safe. I'll have to look at it in more detail to get it to work with mariadb :( It will compile fine against the default freebsd settings (mysql not mariadb) my poudriere install is busy doing a compile run at the moment, but i'll look into it when it finishes. Created attachment 198418 [details]
fix build with mariadb
fix building with non-mysql (e.g. mariadb) by checking for mysql_thread_init() not the ancient my_thread_init() from mysql 4.x (which mysql still aliases!)
Thanks LGTM. I created a review for it: https://reviews.freebsd.org/D17637 A commit references this bug: Author: mfechner Date: Wed Nov 7 19:41:02 UTC 2018 New revision: 484406 URL: https://svnweb.freebsd.org/changeset/ports/484406 Log: * Fix runtime PHP errors that stop the code working if short_opentag is disabled (default!) * Remove most PHP warnings/notices that go to error_log * Convert patches to new format where needed * Fix HTML output to be valid * Fix quoting of SQL objects * Fix escaping of user-provided SQL data (potential sql injection) * Widen fields in 95.php and 95.pl for interface and router names * Fix warnings in perl modules in newer perl versions * Fix createdb script to use CREATE USER/GRANT not manipulate user db directly * Add "Update_desc" config entry to auto-update port descriptions from snmp * Update default SNMP version to 2 * Although this doesn't reference any CVE's, it does contain fixes for potential security issues PR: 227376 Submitted by: freebsd-ports@dan.me.uk (maintainer) Reported by: freebsd-ports@dan.me.uk (maintainer) Reviewed by: mfechner Approved by: mentors (timeout), portmgr (timeout) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D17637 Changes: head/net/rtg/Makefile head/net/rtg/files/patch-cgilib-0.4_cgi.c head/net/rtg/files/patch-cgilib-cgi.c head/net/rtg/files/patch-config-config.h.in head/net/rtg/files/patch-config_config.h.in head/net/rtg/files/patch-etc-95.php head/net/rtg/files/patch-etc-Makefile.in head/net/rtg/files/patch-etc-rtg.php head/net/rtg/files/patch-etc-rtgtargmkr.pl.in head/net/rtg/files/patch-etc-view.php head/net/rtg/files/patch-etc_95.php head/net/rtg/files/patch-etc_95.pl head/net/rtg/files/patch-etc_Makefile.in head/net/rtg/files/patch-etc_SNMP__util.pm head/net/rtg/files/patch-etc_common.php.in head/net/rtg/files/patch-etc_createdb.in head/net/rtg/files/patch-etc_report.pl head/net/rtg/files/patch-etc_rtg.conf head/net/rtg/files/patch-etc_rtg.php head/net/rtg/files/patch-etc_rtgtargmkr.pl.in head/net/rtg/files/patch-etc_view.php head/net/rtg/files/patch-man-rtgplot.1 head/net/rtg/files/patch-man-rtgpoll.1 head/net/rtg/files/patch-man_rtgplot.1 head/net/rtg/files/patch-man_rtgpoll.1 head/net/rtg/files/patch-src-rtg.h head/net/rtg/files/patch-src-rtgplot.c head/net/rtg/files/patch-src-rtgplot.h head/net/rtg/files/patch-src-rtgpoll.c head/net/rtg/files/patch-src_rtg.h head/net/rtg/files/patch-src_rtgplot.c head/net/rtg/files/patch-src_rtgplot.h head/net/rtg/files/patch-src_rtgpoll.c head/net/rtg/files/patch-src_rtgutil.c Committed, thanks for the update. Dear Daniel, the commit was reverted by @mat, please see the comment in the linked review and update your patch accordingly. Thanks. hmm... i'll look into it. I'd need subpackages AND flavors, as the web subpackage needs to be packaged for each PHP version (flavors). I don't even know if that's possible or not so will take some work. I might just drop the non-web version instead. take PR Created attachment 204165 [details]
Patch updated without flavours
I tried commenting on phabricator, but I'm not sure that's the correct place since I can't upload my new patch without creating a new issue. RTG has stopped working with modern perl without these patches. I've attempted to contact the maintainer for a few weeks but have had no luck. Can we just get the flavour bits of the patch removed and the rest committed? That way we at least get it back to a working state. I've uploaded my patch here. @Andrew Can you confirm attachment 204165 [details] passes QA (portlint, poudriere) ?
Also, I'd abandon the review, and stick with patches in bugzilla, as external reviews can confuse people when there's also patches in bugs.
Triage: Assignee timeout: 2 months.
@Rodrigo If you'd still like to take this, please re-assign
Comment on attachment 198418 [details]
fix build with mariadb
Obsolete reverted patch
@koobs : I'm in, I just close the review created by mfechner@ to discuss changes. I was performing a final portscheck before the commit. Committed with minor changes, thanks A commit references this bug: Author: rodrigo Date: Fri May 31 12:58:31 UTC 2019 New revision: 503172 URL: https://svnweb.freebsd.org/changeset/ports/503172 Log: Fix net/rtg with modern perl and php * Fix runtime PHP errors if short_opentag is disabled (default) * Remove most PHP warnings/notices that go to error_log * Fix HTML output to be valid * Fix quoting of SQL objects * Fix escaping of user-provided SQL data (potential sql injection) * Widen fields in 95.php and 95.pl for interface and router names * Fix warnings in perl modules in newer perl versions * Fix createdb script to use CREATE USER/GRANT not manipulate user db directly * Add "Update_desc" config entry to auto-update port descriptions from snmp * Update default SNMP version to 2 PR: 227376 Submitted by: <freebsd-ports@dan.me.uk> (maintainer) Changes: head/net/rtg/Makefile head/net/rtg/files/patch-cgilib-0.4_cgi.c head/net/rtg/files/patch-cgilib-cgi.c head/net/rtg/files/patch-config-config.h.in head/net/rtg/files/patch-config_config.h.in head/net/rtg/files/patch-etc-95.php head/net/rtg/files/patch-etc-Makefile.in head/net/rtg/files/patch-etc-rtg.php head/net/rtg/files/patch-etc-rtgtargmkr.pl.in head/net/rtg/files/patch-etc-view.php head/net/rtg/files/patch-etc_95.php head/net/rtg/files/patch-etc_95.pl head/net/rtg/files/patch-etc_Makefile.in head/net/rtg/files/patch-etc_SNMP__util.pm head/net/rtg/files/patch-etc_common.php.in head/net/rtg/files/patch-etc_createdb.in head/net/rtg/files/patch-etc_report.pl head/net/rtg/files/patch-etc_rtg.conf head/net/rtg/files/patch-etc_rtg.php head/net/rtg/files/patch-etc_rtgtargmkr.pl.in head/net/rtg/files/patch-etc_view.php head/net/rtg/files/patch-man-rtgplot.1 head/net/rtg/files/patch-man-rtgpoll.1 head/net/rtg/files/patch-man_rtgplot.1 head/net/rtg/files/patch-man_rtgpoll.1 head/net/rtg/files/patch-src-rtg.h head/net/rtg/files/patch-src-rtgplot.c head/net/rtg/files/patch-src-rtgplot.h head/net/rtg/files/patch-src-rtgpoll.c head/net/rtg/files/patch-src_rtg.h head/net/rtg/files/patch-src_rtgplot.c head/net/rtg/files/patch-src_rtgplot.h head/net/rtg/files/patch-src_rtgpoll.c head/net/rtg/files/patch-src_rtgutil.c |