From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 21 13:00:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02FA87EC for ; Wed, 21 May 2014 13:00:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D23182518 for ; Wed, 21 May 2014 13:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LD001R035846 for ; Wed, 21 May 2014 13:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4LD00ZR035836; Wed, 21 May 2014 13:00:00 GMT (envelope-from gnats) Resent-Date: Wed, 21 May 2014 13:00:00 GMT Resent-Message-Id: <201405211300.s4LD00ZR035836@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, Alex Stangl Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C57F56E9 for ; Wed, 21 May 2014 12:55:32 +0000 (UTC) Received: from stangl.us (stangl.us [66.93.193.95]) by mx1.freebsd.org (Postfix) with ESMTP id 87B7824D5 for ; Wed, 21 May 2014 12:55:32 +0000 (UTC) Received: from scout.stangl.us (localhost [127.0.0.1]) by scout.stangl.us (Postfix) with ESMTP id CE6581704A for ; Wed, 21 May 2014 07:55:30 -0500 (CDT) Received: from stangl.us ([127.0.0.1]) by scout.stangl.us (scout.stangl.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G67iu4lOqg6P for ; Wed, 21 May 2014 07:55:26 -0500 (CDT) Received: by scout.stangl.us (Postfix, from userid 1001) id A5E1017048; Wed, 21 May 2014 07:55:26 -0500 (CDT) Message-Id: <20140521125526.A5E1017048@scout.stangl.us> Date: Wed, 21 May 2014 07:55:26 -0500 (CDT) From: Alex Stangl Reply-To: Alex Stangl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/190066: [patch] lang/ruby19 (and lang/ruby20, lang/ruby21) fix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 13:00:01 -0000 >Number: 190066 >Category: ports >Synopsis: [patch] lang/ruby19 (and lang/ruby20, lang/ruby21) fix >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 21 13:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Alex Stangl >Release: FreeBSD 9.1-RELEASE i386 >Organization: >Environment: System: FreeBSD scout.stangl.us 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: Makefile was missing ${STAGEDIR} for source of find commands for ${RUBY_RIDIR}. This would manifest as a problem in one of two ways: 1. If actual ${RUBY_RIDIR} contained leftover directories and files, a bunch of error messages like this would be emitted: pkg-static: Plist error, directory listed as a file: /usr/local/share/ri/1.9/system/ACL/ACLList pkg-static: Plist error, directory listed as a file: /usr/local/share/ri/1.9/system/ACL/ACL 2. If actual ${RUBY_RIDIR} non-existent or empty, then find command would not actually do anything, i.e., not add anything to the ${TMPPLIST}, since it's operating out of the real ${RUBY_RIDIR} rather than the staging directory version. This in turn makes scenario #1 likely to happen since a deinstall won't clean up these files. I also cleaned up a few of the many warnings emitted. The created.rid files were reported as orphaned. I believe these should either be deleted from the stage directory before packaging, or else included as part of the plist. I opted for the latter, as it seems like these files are harmless and probably actually desired, especially in ${RUBY_SITERIDIR}, if I understand the purpose of these files correctly. Although these fixes are shown for lang/ruby19 Makefile, it appears lang/ruby20 and lang/ruby21 need the same fixes. >How-To-Repeat: Problem can be demonstrated by trying to package the port when the ${RUBY_RIDIR} has contents leftover from a previous install. >Fix: Index: Makefile =================================================================== --- Makefile (revision 354748) +++ Makefile (working copy) @@ -40,7 +40,7 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${RUBY_DISTVERSION} RUBY_VER= 1.9 -USE_BZIP2= yes +USES= tar:bzip2 USE_RUBY= yes RUBY_NO_BUILD_DEPENDS= yes RUBY_NO_RUN_DEPENDS= yes @@ -207,12 +207,13 @@ # # Add generated RI files to pkg-plist # - @${FIND} -ds ${RUBY_RIDIR}/ ! -type d ! -name created.rid | \ + @${FIND} -ds ${STAGEDIR}${RUBY_RIDIR}/ ! -type d | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} - @${FIND} -ds ${RUBY_RIDIR}/ -type d -mindepth 1 | \ + @${FIND} -ds ${STAGEDIR}${RUBY_RIDIR}/ -type d -mindepth 1 | \ ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST} + @${FIND} -ds ${STAGEDIR}${RUBY_SITERIDIR}/ ! -type d | \ + ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} - # # Add generated doxygen files to pkg-plist # >Release-Note: >Audit-Trail: >Unformatted: