From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 7 17:10:11 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCD7F16A46C for ; Tue, 7 Aug 2007 17:10:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A43B513C442 for ; Tue, 7 Aug 2007 17:10:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l77HABqg030704 for ; Tue, 7 Aug 2007 17:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l77HAB5V030703; Tue, 7 Aug 2007 17:10:11 GMT (envelope-from gnats) Resent-Date: Tue, 7 Aug 2007 17:10:11 GMT Resent-Message-Id: <200708071710.l77HAB5V030703@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thomas Hurst Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36D7616A41A for ; Tue, 7 Aug 2007 17:08:44 +0000 (UTC) (envelope-from freaky@voi.aagh.net) Received: from spork.qfe3.net (spork.qfe3.net [212.13.207.101]) by mx1.freebsd.org (Postfix) with ESMTP id 0874813C45B for ; Tue, 7 Aug 2007 17:08:43 +0000 (UTC) (envelope-from freaky@voi.aagh.net) Received: from [81.104.144.87] (helo=voi.aagh.net) by spork.qfe3.net with esmtp (Exim 4.66 (FreeBSD)) (envelope-from ) id 1IISXy-000Pkm-Bb for FreeBSD-gnats-submit@freebsd.org; Tue, 07 Aug 2007 18:08:42 +0100 Received: from freaky by voi.aagh.net with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IISXy-0000dU-7x for FreeBSD-gnats-submit@freebsd.org; Tue, 07 Aug 2007 18:08:42 +0100 Message-Id: Date: Tue, 07 Aug 2007 18:08:42 +0100 From: Thomas Hurst Sender: Thomas Hurst To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/115274: news/sabnzbd port rename breaks installation and plist X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Thomas Hurst List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2007 17:10:11 -0000 >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@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: