From freaky@voi.aagh.net  Tue Aug  7 17:08:44 2007
Return-Path: <freaky@voi.aagh.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36D7616A41A
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <freaky@voi.aagh.net>)
	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 <freaky@voi.aagh.net>)
	id 1IISXy-0000dU-7x
	for FreeBSD-gnats-submit@freebsd.org; Tue, 07 Aug 2007 18:08:42 +0100
Message-Id: <E1IISXy-0000dU-7x@voi.aagh.net>
Date: Tue, 07 Aug 2007 18:08:42 +0100
From: Thomas Hurst <tom@hur.st>
Sender: Thomas Hurst <freaky@voi.aagh.net>
Reply-To: Thomas Hurst <tom@hur.st>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: news/sabnzbd port rename breaks installation and plist
X-Send-Pr-Version: 3.113
X-GNATS-Notify: daniel@netwalk.org

>Number:         115274
>Category:       ports
>Synopsis:       news/sabnzbd port rename breaks installation and plist
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    rafan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 07 17:10:09 GMT 2007
>Closed-Date:    Fri Aug 17 17:35:10 GMT 2007
>Last-Modified:  Fri Aug 17 17:40:01 GMT 2007
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Aug 7 17:10:19 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115274 

From: Daniel <daniel@netwalk.org>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: Re: ports/115274: news/sabnzbd port rename breaks installation
	and plist
Date: Thu, 16 Aug 2007 23:03:14 -0700

 go ahead with the patch. I'll get a longterm solution later.
 
 -d
 
 On Tue, Aug 07, 2007 at 05:10:15PM +0000, Edwin Groothuis wrote:
 > Maintainer of news/sabnzbd,
 > 
 > Please note that PR ports/115274 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/115274
 > 
 > -- 
 > Edwin Groothuis
 > edwin@FreeBSD.org
 
 -- 
 "We are going to take things away from you on behalf of the common good."
 -- Hillary Clinton
 
 Ron Paul Freedom 2008
Responsible-Changed-From-To: freebsd-ports-bugs->rafan 
Responsible-Changed-By: rafan 
Responsible-Changed-When: Fri Aug 17 09:48:09 UTC 2007 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115274 
State-Changed-From-To: feedback->closed 
State-Changed-By: rafan 
State-Changed-When: Fri Aug 17 17:35:06 UTC 2007 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115274 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/115274: commit references a PR
Date: Fri, 17 Aug 2007 17:35:03 +0000 (UTC)

 rafan       2007-08-17 17:34:55 UTC
 
   FreeBSD ports repository
 
   Modified files:
     news/sabnzbd         Makefile 
     news/sabnzbd/files   patch-setup.py pkg-message.in 
   Log:
   - Fix plist after PORTNAME is changed
   
   PR:             ports/115274
   Submitted by:   Thomas Hurst <tom at hur.st>
   Approved by:    Daniel <daniel at netwalk.org> (maintainer)
   
   Revision  Changes    Path
   1.10      +5 -0      ports/news/sabnzbd/Makefile
   1.4       +4 -4      ports/news/sabnzbd/files/patch-setup.py
   1.2       +2 -2      ports/news/sabnzbd/files/pkg-message.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
