ports/115274: news/sabnzbd port rename breaks installation and plist
Thomas Hurst
tom at hur.st
Tue Aug 7 17:10:11 UTC 2007
>Number: 115274
>Category: ports
>Synopsis: news/sabnzbd port rename breaks installation and plist
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Aug 07 17:10:09 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Thomas Hurst
>Release: FreeBSD 6.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD voi.nightsdawn.sf 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed Jul 4 13:46:52 BST 2007 root at voi.nightsdawn.sf:/usr/obj/usr/src/sys/VOI amd64
>Description:
news/sabnzbd was renamed from newz/SABnzbd nearly 7 weeks ago.
This causes the post-install target to fail, since it uses $PORTNAME
as part of a post-install chmod of installation files which do not
respect $PORTNAME (they install as SABnzbd).
This also breaks the plist, which uses %%PORTNAME%%, though installation
will fail before it gets far enough to install it into the pkg db.
>How-To-Repeat:
make -C /usr/ports/news/sabnzbd install
>Fix:
Modify files/patch-setup.py to respect $PORTNAME, or at the very least
match the current one. pkg-message.in should also be modified to track
this.
The following patch appears to resolve these issues (tested locally).
/usr/local/share/SABnzbd and /usr/local/share/doc/SABnzbd will be left
as cruft if someone's tried to install this port while it was broken,
then later updates to this fixed one. If it's traditional to do so,
a note about this in pkg-message may be in order.
This move may require some/most users to modify their .ini file, since
web templates will often be located in share/SABnzbd. This is avoidable
with a simple modification of pkg-plist and Makefile to hardcode the
installation directory instead of my patch.
--- Makefile.orig Tue Aug 7 16:58:42 2007
+++ Makefile Tue Aug 7 17:42:31 2007
@@ -26,6 +26,7 @@
USE_PYDISTUTILS=yes
PLIST_SUB= PORTNAME=${PORTNAME}
+SUB_LIST+= PORTNAME=${PORTNAME}
SUB_FILES= pkg-message
OPTIONS= PAR2CMDLINE "Required for postprocessing of par files." on \
@@ -45,6 +46,9 @@
.if !defined(WITHOUT_UNRAR)
RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar
.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PORTNAME%%|${PORTNAME}|' ${WRKSRC}/setup.py
post-install:
${CHMOD} -R go+r ${PREFIX}/share/${PORTNAME}/
--- files/patch-setup.py.orig Tue Aug 7 17:14:02 2007
+++ files/patch-setup.py Tue Aug 7 17:27:22 2007
@@ -8,11 +8,11 @@
- ['SABnzbd.ini.sample', 'README.txt', 'LICENSE.txt',
- 'TODO.txt', 'CHANGELOG.txt', 'UPGRADE.txt']),
- ('share/SABnzbd-' + sabnzbd.__version__ + '/templates',
-+ data_files = [('share/doc/SABnzbd',
++ data_files = [('share/doc/%%PORTNAME%%',
+ ['README.txt', 'LICENSE.txt',
+ 'TODO.txt', 'CHANGELOG.txt', 'UPGRADE.txt']),
-+ ('share/SABnzbd',['SABnzbd.ini.sample']),
-+ ('share/SABnzbd' + '/templates',
++ ('share/%%PORTNAME%%',['sabnzbd.ini.sample']),
++ ('share/%%PORTNAME%%' + '/templates',
['templates/default.css', 'templates/history.tmpl',
'templates/main.tmpl',
'templates/connection_info.tmpl',
@@ -21,5 +21,5 @@
'templates/config_rss.tmpl',
'templates/static/placeholder.txt']),
- ('share/SABnzbd-' + sabnzbd.__version__ + '/templates/static',
-+ ('share/SABnzbd/templates/static',
++ ('share/%%PORTNAME%%/templates/static',
['templates/static/placeholder.txt'])])
--- files/pkg-message.in.orig Tue Aug 7 17:14:07 2007
+++ files/pkg-message.in Tue Aug 7 17:17:41 2007
@@ -1,6 +1,6 @@
****************************************************************************
-Check %%PREFIX%%/share/SABnzbd for SABnzbd.ini.sample and templates
-See %%PREFIX%%/share/doc/SABnzbd for README.txt etc
+Check %%PREFIX%%/share/%%PORTNAME%% for SABnzbd.ini.sample and templates
+See %%PREFIX%%/share/doc/%%PORTNAME%% for README.txt etc
****************************************************************************
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list