The following reply was made to PR ports/152224; it has been noted by GNATS.

From: John Hein <jh...@symmetricom.com>
To: Anonymous <swel...@gmail.com>,
    bug-follo...@freebsd.org
Cc:  
Subject: Re: ports/152224: [patch] fix installed permissions for lang/python27
Date: Sun, 14 Nov 2010 15:19:33 -0700

 --CJa2am+ero
 Content-Type: text/plain; charset=us-ascii
 Content-Description: message body text
 Content-Transfer-Encoding: 7bit
 
 John Hein wrote at 10:49 MST on Nov 14, 2010:
  > Anonymous wrote at 07:04 +0300 on Nov 14, 2010:
  >  > John Hein <jh...@symmetricom.com> writes:
  >  > 
  >  > [...]
  >  > > Fix permissions of extracted tarball for pieces that are copied
  >  > > during post-inastll.
  >  > >
  >  > > Use tar --no-same-owner during post-install to ensure copied files
  >  > > are owned by install user.
  >  > 
  >  > I'm not sure `--no-same-owner' is available on 6.x, better use `-o'.
 
 Yes, I checked tar compatibility.
 --no-same-owner is available... in gnu tar available in
 6.x's base or a port and if someone has installed bsdtar from ports.
 bsd.port.mk uses it, too.
 
 
  >  > > +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  {} +
 
 Indeed, good idea... updated patch:
 
 
 --CJa2am+ero
 Content-Type: text/plain; name="p"
 Content-Description: fix installed permissions for lang/python27
 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   14 Nov 2010 22:16:27 -0000
 @@ -146,6 +146,14 @@ 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.
 +      ${FIND} ${WRKSRC}/Tools ${WRKSRC}/Demo \
 +              -type d -exec ${CHMOD} a+rx {} + \
 +              -or -type f -exec ${CHMOD} a+r  {} +
 +
  pre-patch:
        ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
                ${PATCH_WRKSRC}/Lib/plat-freebsd9
 @@ -260,12 +268,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}
 
 --CJa2am+ero--
_______________________________________________
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"

Reply via email to