Created attachment 146283 [details] bsdadminscripts.diff Fix the following scripts which failed to run: pkg_libchk, pkg_upgrade and uma. Build logs via redports: https://redports.org/buildarchive/20140826005336-26170/
Hardcoded replacements for variables is not the correct fix. Use FILE_SUB mechanism. You don't know that PREFIX is /usr/local. That's only a default and it could be anything. You need to replace %%PREFIX%% with the required value.
Created attachment 146299 [details] bsdadminscripts.diff - Use SUB_FILES and SUB_LIST variables. - Remove ${FILESDIR}/patch-pkg_libchk. Build logs via redports: https://redports.org/buildarchive/20140826110101-58968/
should it be TMP?=/tmp etc?
Created attachment 146301 [details] bsdadminscripts.diff Yes, you're right. I changed it to TMP=/tmp VAR=/tmp Now portlint doesn't complain: % portlint -ac WARN: Makefile: possible direct use of "scripts" "COMMENT= Collection of administration scripts" found. if so, use ${SCRIPTDIR} instead. WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 2 warnings found.
Sorry, changed to TMP=/tmp and VAR=/var
actually i literally meant "TMP?= /tmp" which means it defaults to /tmp but somebody could pre-define tmp "e.g. make TMP=/puthereinstead install" and change the scripts. Otherwise it's locked into /tmp and /var and the user can't pick anything else.
Created attachment 146302 [details] bsdadminscripts.diff Ok, changed to TMP?=/tmp and VAR?=/var
Also I checked and compared it with previous scripts. No differences at all :)
the only issue is cosmetic (needs tab after ?=) I'll let the commit worry about that.
(In reply to John Marino from comment #9) > the only issue is cosmetic (needs tab after ?=) > > I'll let the commit worry about that. Well, in this case portlint complains as follows: portlint -ac WARN: Makefile: possible use of absolute pathname "/tmp". WARN: Makefile: possible use of absolute pathname "/var". WARN: Makefile: possible direct use of "scripts" "COMMENT= Collection of administration scripts" found. if so, use ${SCRIPTDIR} instead. WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 4 warnings found.
you can ignore the first 3 warnings. You should fix the 4th though. :)
Created attachment 146306 [details] bsdadminscripts.diff Add cosmetic touch to the patch :)
A commit references this bug: Author: rene Date: Tue Aug 26 18:57:58 UTC 2014 New revision: 366248 URL: http://svnweb.freebsd.org/changeset/ports/366248 Log: sysutils/bsdadminscripts: fix scripts at runtime. Previously, pkg_libchk, pkg_upgrade, and uma failed to run. Bump PORTREVISION PR: 193003 Submitted by: Carlos Jacobo Puga Medina <cpm@fbsd.es> Reviewed by: marino Changes: head/sysutils/bsdadminscripts/Makefile head/sysutils/bsdadminscripts/files/patch-pkg_libchk head/sysutils/bsdadminscripts/files/pkg_libchk.in head/sysutils/bsdadminscripts/files/pkg_upgrade.in head/sysutils/bsdadminscripts/files/uma.in