From owner-freebsd-python@FreeBSD.ORG Mon Nov 15 18:21:30 2010 Return-Path: Delivered-To: python@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6789B1065675; Mon, 15 Nov 2010 18:21:30 +0000 (UTC) (envelope-from jhein@gossamer.timing.com) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2EB5B8FC23; Mon, 15 Nov 2010 18:21:29 +0000 (UTC) Received: from gossamer.timing.com ([206.168.13.144]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0LiRym-1OmIIR2F9o-00czl4; Mon, 15 Nov 2010 13:21:13 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9oaHwTfnCu" Content-Transfer-Encoding: 7bit Message-ID: <19681.31250.541714.180410@gossamer.timing.com> Date: Mon, 15 Nov 2010 11:21:06 -0700 From: John Hein To: Oliver Fromme In-Reply-To: <201011151735.oAFHZeY6014846@lurza.secnetix.de> References: <201011140410.oAE4ABUJ070464@freefall.freebsd.org> <201011151735.oAFHZeY6014846@lurza.secnetix.de> X-Provags-ID: V02:K0:GSoKATzSLyTqTjqImj2hIdAyAMTXoLzgWSuP1Uivfaj ZTSfOldXa8inoIdYivnKVJREPixba1xyaG0A9UbrnSiPHO+DjG RFj0sOUWXi9rFYFiKNZ/Jvm58YAYRAZf5KvavBrq3+su0v6rHf kHBvk/O72KI9TcDJ/u1ysGO5x7KMqol4IhVtZ9Xw5SertH3S5X DlqvDPmMtXlfOoOIuhI3A== Cc: Anonymous , python@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: ports/152224: [patch] fix installed permissions for ?lang/python27 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 18:21:30 -0000 --9oaHwTfnCu Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Oliver Fromme wrote at 18:35 +0100 on Nov 15, 2010: > Anonymous wrote: > > John Hein writes: > > > +post-extract: > > > +# The distribution tarball for python 2.7 has permission bits for 'others' > > > +# set to 0. Later during install, we copy Tools and Demo to the installed > > > +# prefix, so set them right here. > > > + ${FIND} ${WRKSRC}/Tools ${WRKSRC}/Demo -type d | ${XARGS} ${CHMOD} a+rx > > > + ${FIND} ${WRKSRC}/Tools ${WRKSRC}/Demo -type f | ${XARGS} ${CHMOD} a+r > > > + > > > > This can be reduced to one command > > > > ${FIND} ${WRKSRC}/Tools ${WRKSRC}/Demo \ > > -type d -exec ${CHMOD} a+rx {} + \ > > -or -type f -exec ${CHMOD} a+r {} + > > It's unclear to me why you have to use find(1) at all. > The following simple command should work equally well: > > ${CHMOD} -R og=u-w ${WRKSRC}/Tools ${WRKSRC}/Demo Yes, that's better still and will work fine since the user bits are good in the tarball. Updated patch (with a fix for the path, too)... --9oaHwTfnCu Content-Type: text/plain; name="p" Content-Description: just use chmod; fix path with PYTHON_WRKSRC Content-Disposition: inline; filename="p" Content-Transfer-Encoding: 7bit Index: Makefile =================================================================== RCS file: /base/FreeBSD-CVS/ports/lang/python27/Makefile,v retrieving revision 1.169 diff -u -p -r1.169 Makefile --- Makefile 6 Sep 2010 00:25:04 -0000 1.169 +++ Makefile 15 Nov 2010 18:16:55 -0000 @@ -146,6 +146,12 @@ CONFIGURE_ARGS+= --disable-ipv6 CONFIGURE_ARGS+= --with-fpectl .endif +post-extract: +# The distribution tarball for python 2.7 has permission bits for 'others' +# set to 0. Later during install, we copy Tools and Demo to the installed +# prefix, so set them right here. + ${CHMOD} og=u-w ${PYTHON_WRKSRC}/Tools ${PYTHON_WRKSRC}/Demo + pre-patch: ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \ ${PATCH_WRKSRC}/Lib/plat-freebsd9 @@ -260,12 +266,12 @@ post-install: .if !defined(NOPORTDATA) @${MKDIR} ${DATADIR} @cd ${PYTHON_WRKSRC}; ${TAR} -cf - Tools | \ - (cd ${DATADIR}; ${TAR} -xf -) + (cd ${DATADIR}; ${TAR} --no-same-owner -xf -) .endif .if !defined(NOPORTEXAMPLES) @${MKDIR} ${EXAMPLESDIR} @cd ${PYTHON_WRKSRC}/Demo; ${TAR} -cf - * | \ - (cd ${EXAMPLESDIR}; ${TAR} -xf -) + (cd ${EXAMPLESDIR}; ${TAR} --no-same-owner -xf -) .endif @${CAT} ${PKGMESSAGE} --9oaHwTfnCu--