Bug 183660 - www/awstats: perl shebang can be wrong
Summary: www/awstats: perl shebang can be wrong
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-04 13:50 UTC by Lukasz Wasikowski
Modified: 2013-11-05 17:10 UTC (History)
0 users

See Also:


Attachments
file.diff (406 bytes, patch)
2013-11-04 13:50 UTC, Lukasz Wasikowski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Wasikowski 2013-11-04 13:50:00 UTC
If one is not using USE_PERL in lang/perl5.1* then perl binary is in ${PREFIX}/bin/perl, which by default is /usr/local/bin/perl, and there is no /usr/bin/perl symlink.

Many awstats' files have hardcoded /usr/bin/perl shebangs.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-11-04 13:50:08 UTC
Maintainer of www/awstats,

Please note that PR ports/183660 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/183660

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2013-11-04 13:50:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Oleksii Samorukov freebsd_committer 2013-11-05 06:46:05 UTC
Thank you for the patch

Please commit.
Comment 4 Sunpoet Po-Chuan Hsieh freebsd_committer 2013-11-05 13:08:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sunpoet

I'll take it.
Comment 5 dfilter service freebsd_committer 2013-11-05 17:00:41 UTC
Author: sunpoet
Date: Tue Nov  5 17:00:32 2013
New Revision: 332874
URL: http://svnweb.freebsd.org/changeset/ports/332874

Log:
  - Fix perl shebang
  - Bump PORTREVISION for package change
  - While I'm here, support STAGEDIR
  
  PR:		ports/183660
  Submitted by:	Lukasz Wasikowski <lukasz@wasikowski.net>
  Approved by:	Alex Samorukov <samm@os2.kiev.ua> (maintainer)

Modified:
  head/www/awstats/Makefile

Modified: head/www/awstats/Makefile
==============================================================================
--- head/www/awstats/Makefile	Tue Nov  5 16:56:26 2013	(r332873)
+++ head/www/awstats/Makefile	Tue Nov  5 17:00:32 2013	(r332874)
@@ -3,6 +3,7 @@
 
 PORTNAME=	awstats
 PORTVERSION=	7.2
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	www
 MASTER_SITES=	SF/${PORTNAME}/AWStats/${PORTVERSION}
@@ -14,7 +15,10 @@ LICENSE=	GPLv2
 
 RUN_DEPENDS=	p5-Net-XWhois>=0:${PORTSDIR}/net/p5-Net-XWhois
 
-USES=		perl5
+USES=		perl5 shebangfix
+
+SHEBANG_FILES=	tools/*.pl wwwroot/cgi-bin/*.pl wwwroot/cgi-bin/plugins/*.pm
+
 NO_BUILD=	yes
 USE_PERL5=	run
 USE_DOS2UNIX=	tools/*.pl \
@@ -34,7 +38,6 @@ SUB_FILES=	pkg-message
 
 OPTIONS_DEFINE=	DOCS IPV6
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 .if ${PORT_OPTIONS:MIPV6}
@@ -49,60 +52,60 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/wwwroot/cgi-bin/awstats.pl
 
 do-install:
-	@${MKDIR} ${PREFIX}/www/awstats
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/lang
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/lang/tooltips_f
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/lang/tooltips_m
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/lang/tooltips_w
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/lib
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/plugins
-	@${MKDIR} ${PREFIX}/www/awstats/cgi-bin/plugins/example
-	@${MKDIR} ${PREFIX}/www/awstats/classes
-	@${MKDIR} ${PREFIX}/www/awstats/css
-	@${MKDIR} ${PREFIX}/www/awstats/icons/browser
-	@${MKDIR} ${PREFIX}/www/awstats/icons/clock
-	@${MKDIR} ${PREFIX}/www/awstats/icons/cpu
-	@${MKDIR} ${PREFIX}/www/awstats/icons/flags
-	@${MKDIR} ${PREFIX}/www/awstats/icons/mime
-	@${MKDIR} ${PREFIX}/www/awstats/icons/os
-	@${MKDIR} ${PREFIX}/www/awstats/icons/other
-	@${MKDIR} ${PREFIX}/www/awstats/js
-	@${MKDIR} ${PREFIX}/www/awstats/tools
-	@${MKDIR} ${PREFIX}/www/awstats/tools/webmin
-	@${MKDIR} ${PREFIX}/www/awstats/tools/xslt
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_buildstaticpages.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_configure.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_exportlib.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_updateall.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/logresolvemerge.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/maillogconvert.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_SCRIPT} ${WRKSRC}/tools/urlaliasbuilder.pl ${PREFIX}/www/awstats/tools
-	${INSTALL_DATA} ${WRKSRC}/tools/xslt/* ${PREFIX}/www/awstats/tools/xslt
-	${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/awredir.pl ${PREFIX}/www/awstats/cgi-bin
-	${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/awstats.model.conf ${PREFIX}/www/awstats/cgi-bin
-	${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/awstats.pl ${PREFIX}/www/awstats/cgi-bin
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/tooltips_f/*.txt ${PREFIX}/www/awstats/cgi-bin/lang/tooltips_f
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/tooltips_m/*.txt ${PREFIX}/www/awstats/cgi-bin/lang/tooltips_m
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/tooltips_w/*.txt ${PREFIX}/www/awstats/cgi-bin/lang/tooltips_w
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/*.txt ${PREFIX}/www/awstats/cgi-bin/lang
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lib/* ${PREFIX}/www/awstats/cgi-bin/lib
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/plugins/*.pm ${PREFIX}/www/awstats/cgi-bin/plugins
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/plugins/example/* ${PREFIX}/www/awstats/cgi-bin/plugins/example
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/classes/awgraphapplet.jar ${PREFIX}/www/awstats/classes/awgraphapplet.jar
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/css/* ${PREFIX}/www/awstats/css
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/browser/* ${PREFIX}/www/awstats/icons/browser
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/clock/* ${PREFIX}/www/awstats/icons/clock
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/cpu/* ${PREFIX}/www/awstats/icons/cpu
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/flags/* ${PREFIX}/www/awstats/icons/flags
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/mime/* ${PREFIX}/www/awstats/icons/mime
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/os/* ${PREFIX}/www/awstats/icons/os
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/other/* ${PREFIX}/www/awstats/icons/other
-	${INSTALL_DATA} ${WRKSRC}/wwwroot/js/* ${PREFIX}/www/awstats/js
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang/tooltips_f
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang/tooltips_m
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang/tooltips_w
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lib
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/plugins
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/plugins/example
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/classes
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/css
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/browser
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/clock
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/cpu
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/flags
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/mime
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/os
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/icons/other
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/js
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/tools
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/tools/webmin
+	@${MKDIR} ${STAGEDIR}${PREFIX}/www/awstats/tools/xslt
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_buildstaticpages.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_configure.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_exportlib.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/awstats_updateall.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/logresolvemerge.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/maillogconvert.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/urlaliasbuilder.pl ${STAGEDIR}${PREFIX}/www/awstats/tools
+	${INSTALL_DATA} ${WRKSRC}/tools/xslt/* ${STAGEDIR}${PREFIX}/www/awstats/tools/xslt
+	${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/awredir.pl ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin
+	${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/awstats.model.conf ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin
+	${INSTALL_SCRIPT} ${WRKSRC}/wwwroot/cgi-bin/awstats.pl ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/tooltips_f/*.txt ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang/tooltips_f
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/tooltips_m/*.txt ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang/tooltips_m
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/tooltips_w/*.txt ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang/tooltips_w
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lang/*.txt ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lang
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/lib/* ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/lib
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/plugins/*.pm ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/plugins
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/cgi-bin/plugins/example/* ${STAGEDIR}${PREFIX}/www/awstats/cgi-bin/plugins/example
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/classes/awgraphapplet.jar ${STAGEDIR}${PREFIX}/www/awstats/classes/awgraphapplet.jar
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/css/* ${STAGEDIR}${PREFIX}/www/awstats/css
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/browser/* ${STAGEDIR}${PREFIX}/www/awstats/icons/browser
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/clock/* ${STAGEDIR}${PREFIX}/www/awstats/icons/clock
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/cpu/* ${STAGEDIR}${PREFIX}/www/awstats/icons/cpu
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/flags/* ${STAGEDIR}${PREFIX}/www/awstats/icons/flags
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/mime/* ${STAGEDIR}${PREFIX}/www/awstats/icons/mime
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/os/* ${STAGEDIR}${PREFIX}/www/awstats/icons/os
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/icon/other/* ${STAGEDIR}${PREFIX}/www/awstats/icons/other
+	${INSTALL_DATA} ${WRKSRC}/wwwroot/js/* ${STAGEDIR}${PREFIX}/www/awstats/js
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}/images
-	${INSTALL_DATA} ${WRKSRC}/docs/images/* ${DOCSDIR}/images
-	${INSTALL_DATA} ${WRKSRC}/docs/*.* ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}/images
+	${INSTALL_DATA} ${WRKSRC}/docs/images/* ${STAGEDIR}${DOCSDIR}/images
+	${INSTALL_DATA} ${WRKSRC}/docs/*.* ${STAGEDIR}${DOCSDIR}
 .endif
 	@${ECHO_CMD} ""
 	@${ECHO_CMD} "* Use ${PREFIX}/www/awstats/tools/awstats_configure.pl to setup your hosts."
@@ -111,9 +114,4 @@ do-install:
 .endif
 	@${ECHO_CMD} ""
 
-.if !defined(BATCH)
-post-install:
-	@${CAT} ${PKGMESSAGE}
-.endif
-
 .include <bsd.port.post.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Sunpoet Po-Chuan Hsieh freebsd_committer 2013-11-05 17:00:44 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!