From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 24 20:50:04 2008 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 299831065676 for ; Sat, 24 May 2008 20:50:04 +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 1D7098FC18 for ; Sat, 24 May 2008 20:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4OKo3UE032179 for ; Sat, 24 May 2008 20:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4OKo3Z7032178; Sat, 24 May 2008 20:50:03 GMT (envelope-from gnats) Resent-Date: Sat, 24 May 2008 20:50:03 GMT Resent-Message-Id: <200805242050.m4OKo3Z7032178@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, Ganael Laplanche Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 880BB1065672 for ; Sat, 24 May 2008 20:45:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 8DD228FC1A for ; Sat, 24 May 2008 20:45:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4OKhfpA069454 for ; Sat, 24 May 2008 20:43:41 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m4OKhfwo069453; Sat, 24 May 2008 20:43:41 GMT (envelope-from nobody) Message-Id: <200805242043.m4OKhfwo069453@www.freebsd.org> Date: Sat, 24 May 2008 20:43:41 GMT From: Ganael Laplanche To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/123964: Mk fix: bsd.linux-rpm.mk - Handling of NOPORTDOCS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2008 20:50:04 -0000 >Number: 123964 >Category: ports >Synopsis: Mk fix: bsd.linux-rpm.mk - Handling of NOPORTDOCS >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat May 24 20:50:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Ganael Laplanche >Release: 8.0-CURRENT >Organization: http://contribs.martymac.com >Environment: FreeBSD home.martymac.com 8.0-CURRENT FreeBSD 8.0-CURRENT #17: Sun May 18 23:44:45 CEST 2008 root@:/usr/obj/usr/src/sys/MYKERNEL amd64 >Description: As discussed in this thread : http://lists.freebsd.org/pipermail/freebsd-ports/2008-May/048724.html bsd.linux-rpm.mk ignores PORTDOCS and NOPORTDOCS variables. A port using USE_LINUX_RPM will have *every* files in WRKDIR (including documentation) installed. This leads to incorrect plist generation when both NOPORTDOCS and PORTDOCS are defined : the do-install target of bsd.linux-rpm.mk will unconditionally install documentation files, while the plist file will not include them if NOPORTDOCS is defined. When deinstalling the port, if NOPORTDOCS has been defined, documentation files are left installed. The attached patch removes PORTDOCS from WRKDIR at pre-patch stage if NOPORTDOCS is defined, so that documentation files will not be installed. Note : As far as I can see, 3 ports are involved in such a situation : - archivers/linux-par2cmdline - graphics/linux-png - graphics/linux-png10 >How-To-Repeat: cd /usr/ports/archivers/linux-par2cmdline make -DNOPORTDOCS install make -DNOPORTDOCS deinstall ls /compat/linux/usr/share/doc/par2cmdline-0.4 The last command shows documentation has been installed and left behind after deinstallation. >Fix: Patch attached with submission follows: --- bsd.linux-rpm.mk.orig 2008-05-24 20:46:04.931665759 +0200 +++ bsd.linux-rpm.mk 2008-05-24 21:32:51.721449935 +0200 @@ -105,6 +105,20 @@ BRANDELF_DIRS?= BRANDELF_FILES?= +# For ports that define PORTDOCS, be sure not to install +# documentation if NOPORTDOCS is defined +.if defined(PORTDOCS) && defined(NOPORTDOCS) +pre-patch: linux-rpm-clean-portdocs + +. if !target(linux-rpm-clean-portdocs) +linux-rpm-clean-portdocs: +.for x in ${PORTDOCS} + @${RM} -f ${WRKDIR}/${DOCSDIR_REL}/${x} +.endfor + @${RMDIR} ${WRKDIR}/${DOCSDIR_REL} +. endif +.endif + . if defined(AUTOMATIC_PLIST) . if ${USE_LINUX} == "fc4" || ${USE_LINUX:L} == "yes" >Release-Note: >Audit-Trail: >Unformatted: