Summary: | net-mgmt/smokeping patch fails when upgrading from 2.7.3_2 to 2.8.2 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Shaun Cummiskey <freebsd> |
Component: | Individual Port(s) | Assignee: | Rodrigo Osorio <rodrigo> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | Flags: | bugzilla:
maintainer-feedback?
(rodrigo) |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Shaun Cummiskey
2021-11-17 04:31:44 UTC
Hi Shaun, That's strange, I didn't find such difficulty using poudriere[1] for FreebSD 12.2 arm64. Are you using any specific or custom environment which requires to build in the target ? Cheers, -- rodrigo [1] https://docs.freebsd.org/en/books/handbook/ports/#ports-poudriere Hi Rodrigo, I don't think I have anything too unusual in my build environment (although it's possible!). After looking around a bit, I noticed that several of the patch files contain hardcoded paths with a /wrkdirs mount point, e.g. from files/patch-bin_smokeping: --- /wrkdirs/usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/bin/smokeping.orig 2021-11-14 17:05:16.825182000 +0000 +++ /wrkdirs/usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/bin/smokeping 2021-11-14 17:06:25.201316000 +0000 If I strip "/wrkdirs/usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/" out of the patch files, leaving only the local relative paths, the patches all apply successfully, and the build completes successfully: [root@host /usr/ports/net-mgmt/smokeping]# find files/ -name *patch* | xargs sed -i '' 's_/wrkdirs/usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/__g' [root@host /usr/ports/net-mgmt/smokeping]# make ===> License GPLv2 accepted by the user ===> smokeping-2.8.2 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by smokeping-2.8.2 for building ===> Extracting for smokeping-2.8.2 => SHA256 Checksum OK for oetiker-SmokePing-2.8.2_GH0.tar.gz. cd /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/lib ; /bin/rm -f BER.pm SNMP_util.pm SNMP_Session.pm ===> Patching for smokeping-2.8.2 ===> Applying FreeBSD patches for smokeping-2.8.2 from /usr/ports/net-mgmt/smokeping/files /usr/bin/sed -i.bak -e s!%%USERS%%!smokeping!g -e s!%%GROUPS%%!smokeping!g -e s!%%PREFIX%%!/usr/local!g -e s!%%LOCALBASE%%!/usr/local!g -e s!%%DATADIR%%!/usr/local/share/smokeping!g -e s!%%DOCSDIR%%!/usr/local/share/doc/smokeping!g -e s!%%EXAMPLESDIR%%!/usr/local/share/examples/smokeping!g -e s!%%WWWDIR%%!/usr/local/www/smokeping!g -e s!%%ETCDIR%%!/usr/local/etc/smokeping!g /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/doc/Makefile.am /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/bin/smokeping /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/bin/smokeping_cgi /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/bin/tSmoke /bin/mv /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/etc/config.dist.in /usr/ports/net-mgmt/smokeping/work/SmokePing-2.8.2/etc/config.sample.in ===> smokeping-2.8.2 depends on package: p5-CGI-Fast>=0 - found [...snip successful build output...] Additionally, the patch at files/patch-bin_smokeping__cgi applies this change: @@ -17,7 +16,7 @@ use CGI::Fast; -my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config"; +My $cfg = (shift @ARGV) || "/usr/local/etc/smokeping/config"; The installed version of perl5-5.32.1_1 on this system doesn't like "My $cfg" with a capital M, and choked with this error: [Wed Nov 17 23:39:53 2021] smokeping_cgi: Global symbol "$cfg" requires explicit package name (did you forget to declare "my $cfg"?) at /usr/local/bin/smokeping_cgi line 19. I changed the 'm' back to lowercase and the FCGI runs properly. Hope this is useful! Shaun You're absolutely right. I will it immediately. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d97161a97818bef47e66ab362f444cd1201c87fd commit d97161a97818bef47e66ab362f444cd1201c87fd Author: Rodrigo Osorio <rodrigo@FreeBSD.org> AuthorDate: 2021-11-19 14:34:04 +0000 Commit: Rodrigo Osorio <rodrigo@FreeBSD.org> CommitDate: 2021-11-19 14:51:11 +0000 net-mgmt/smokeping: Fix patches filepath PR: 259891 Reported by: shaun <freebsd@shaunc.com> net-mgmt/smokeping/Makefile | 1 + net-mgmt/smokeping/files/patch-bin_smokeping | 4 ++-- net-mgmt/smokeping/files/patch-bin_smokeping__cgi | 4 ++-- net-mgmt/smokeping/files/patch-bin_tSmoke | 4 ++-- net-mgmt/smokeping/files/patch-lib_Smokeping.pm | 4 ++-- security/clamav/Makefile | 1 + 6 files changed, 10 insertions(+), 8 deletions(-) Committed, thanks |