svn commit: r341341 - head/devel/xwpe

Baptiste Daroussin bapt at FreeBSD.org
Mon Jan 27 10:22:37 UTC 2014


On Mon, Jan 27, 2014 at 09:28:55AM +0000, Alexey Dokuchaev wrote:
> On Mon, Jan 27, 2014 at 08:41:45AM +0000, Baptiste Daroussin wrote:
> > New Revision: 341341
> > URL: http://svnweb.freebsd.org/changeset/ports/341341
> > QAT: https://qat.redports.org/buildarchive/r341341/
> > 
> > +CONFIGURE_ARGS=	--libdir=\$${STAGEDIR}${PREFIX}/share
> 
> Just a heads-up, not implying that you did not check it; but in many cases
> it can be wrong: passing ${STAGEDIR} directly to configure script arguments
> like this, there is a risk of ${STAGEDIR} getting embedded in the resulting
> binaries, which is not what we want.
> 
> To verify if it's OK, one should grep the source code to see if there are
> any references to STAGEDIR (DESTDIR) passed via -D... (preprocessor or in
> the config.h), and finally, running something like "strings bin/* lib/* |
> grep stage" to verify that ${STAGEDIR} does not remain in what would get
> installed on users' systems.
> 
> In general, every time you see the need to pass --libdir=\$${STAGEDIR} or
> even PREFIX=${STAGEDIR}${PREFIX} is an indication that ported software is
> not quite DESTDIR-ready, and should be checked more thoroughly.
> 
stage-qa is checking for that. if you not how this is constructed this is way
different from PREFIX=${STAGEDIR}${PREFIX} basically the Makefile will endup
with
prefix= ${STAGEDIR}/usr/local
STAGEDIR is not expanded at all here (like in deskhack.mk) so we are just
injecting in the port what it should have nothing more.

This particular port is a bit special as the DESTDIR variable is already define
it but for something totally different, thus I decided to inject a variable
named STAGEDIR instead that is why I defined DESTDIRNAME to STAGEDIR in the
makefile.

Your remark is valid is still valid for ports doing
--prefix=${STAGEDIR}${PREFIX} which is often wrong but not for those doing
--prefix=\$${STAGEDIR}${PREFIX} :)

regards,
Bapt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20140127/ae7534ba/attachment.sig>


More information about the svn-ports-all mailing list