From gerald@FreeBSD.org  Sun Feb 14 16:32:13 2010
Return-Path: <gerald@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7879F1065676
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 14 Feb 2010 16:32:13 +0000 (UTC)
	(envelope-from gerald@FreeBSD.org)
Received: from ref8-i386.freebsd.org (ref8-i386.freebsd.org [IPv6:2001:4f8:fff6::5e])
	by mx1.freebsd.org (Postfix) with ESMTP id 67FC18FC14;
	Sun, 14 Feb 2010 16:32:13 +0000 (UTC)
Received: from ref8-i386.freebsd.org (localhost [127.0.0.1])
	by ref8-i386.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EGWDpq043659;
	Sun, 14 Feb 2010 16:32:13 GMT
	(envelope-from gerald@ref8-i386.freebsd.org)
Received: (from gerald@localhost)
	by ref8-i386.freebsd.org (8.14.3/8.14.3/Submit) id o1EGWDTi043658;
	Sun, 14 Feb 2010 16:32:13 GMT
	(envelope-from gerald)
Message-Id: <201002141632.o1EGWDTi043658@ref8-i386.freebsd.org>
Date: Sun, 14 Feb 2010 16:32:13 GMT
From: Gerald Pfeifer <gerald@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: textproc/flex: INSTALL_AS_USER errors out
X-Send-Pr-Version: 3.113
X-GNATS-Notify: johans@stack.nl

>Number:         143933
>Category:       ports
>Synopsis:       textproc/flex: INSTALL_AS_USER errors out
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    johans
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 14 16:40:01 UTC 2010
>Closed-Date:    Fri Feb 26 08:15:46 UTC 2010
>Last-Modified:  Fri Feb 26 08:20:00 UTC 2010
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 8.0-BETA4 i386
>Organization:
>Environment:
System: FreeBSD ref8-i386.freebsd.org
>Description:
	For some tests I needed to build and install ports as a regular
	user, leveraging 'make INSTALL_AS_USER=1 install'.  Sadly,
	textproc/flex errors out as follows:

:
  install  -s  -m 555 'flex' '/home/gerald/8-i386/bin/flex'
test -z "/home/gerald/8-i386/lib" || /bin/sh ./mkinstalldirs "/home/gerald/8-i386/lib"
 install   -m 444 'libfl.a' '/home/gerald/8-i386/lib/libfl.a'
 install   -m 444 'libfl_pic.a' '/home/gerald/8-i386/lib/libfl_pic.a'
 ranlib '/home/gerald/8-i386/lib/libfl.a'
ranlib: fatal: Failed to open '/home/gerald/8-i386/lib/libfl.a'
 ranlib '/home/gerald/8-i386/lib/libfl_pic.a'
ranlib: fatal: Failed to open '/home/gerald/8-i386/lib/libfl_pic.a'
gmake[3]: *** [install-libLIBRARIES] Error 70
gmake[3]: Leaving directory `/scratch/tmp/gerald/dumpster/home/gerald/ports/flex/work/flex-2.5.35'
gmake[2]: *** [install-am] Error 2
gmake[2]: Leaving directory `/scratch/tmp/gerald/dumpster/home/gerald/ports/flex/work/flex-2.5.35'
gmake[1]: *** [install-recursive] Error 1
gmake[1]: Leaving directory `/scratch/tmp/gerald/dumpster/home/gerald/ports/flex/work/flex-2.5.35'
gmake: *** [install] Error 2
*** Error code 2

>How-To-Repeat:
	env PREFIX=$HOME/...; make INSTALL_AS_USER=1 install
>Fix:
	I believe the problem may be running ranlib on the two .a files
	which have permissions r--r--r--.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->johans 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Feb 14 16:40:12 UTC 2010 
Responsible-Changed-Why:  
johans@stack.nl => johans@ (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143933 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Feb 14 16:40:17 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143933 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: johans@stack.nl
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/143933: textproc/flex: INSTALL_AS_USER errors out
Date: Sun, 14 Feb 2010 16:40:14 UT

 Maintainer of textproc/flex,
 
 Please note that PR ports/143933 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/143933
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Johan van Selst <johans@stack.nl>
To: bug-followup@FreeBSD.org
Cc: gerald@freebsd.org
Subject: Re: ports/143933: textproc/flex: INSTALL_AS_USER errors out
Date: Sun, 14 Feb 2010 18:40:31 +0100

 --jRHKVT23PllUwdXP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Gerald Pfeifer wrote:
 > I believe the problem may be running ranlib on the two .a files
 > which have permissions r--r--r--
 
 This is indeed the problem, if you run make with an additional 
 	INSTALL_DATA="install -m 644"
 it should install flex just fine. However I'm not sure how to fix this
 for the flex port. Adding said option to the general case seems
 inappropriate. Besides, there are quite a number of other ports that
 use $(INSTALL_DATA) to install libraries as well, and thus will suffer
 the same problem. I'll probably add a hack to chown the two library
 files before running ranlib.
 
 Suggestions for a better fix are welcome.
 
 
 Johan
 
 --jRHKVT23PllUwdXP
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 
 iF4EAREIAAYFAkt4NY4ACgkQAEpMHW8nCPR2jgD+JUkjd0ZCQtN1NjJBuHCBKhUs
 0dF8Ts2CZE4HGxGTnq4A/38Qkh0jFO9Yo5SgFxJEGjVS7KciCIIJQkM9olbR/GFg
 =WRiX
 -----END PGP SIGNATURE-----
 
 --jRHKVT23PllUwdXP--

From: Gerald Pfeifer <gerald@pfeifer.com>
To: Johan van Selst <johans@stack.nl>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/143933: textproc/flex: INSTALL_AS_USER errors out
Date: Mon, 15 Feb 2010 23:50:47 +0100 (CET)

 On Sun, 14 Feb 2010, Johan van Selst wrote:
 > Suggestions for a better fix are welcome.
 
 I cannot think of any, but if you have a patch you are happy about I
 will be glad to commit it for you.
 
 Gerald

From: Johan van Selst <johans@stack.nl>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/143933: textproc/flex: INSTALL_AS_USER errors out
Date: Tue, 16 Feb 2010 10:01:54 +0100

 --BXVAT5kNtrzKuDFl
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Hi Gerald,
 
 Please try replacing the post-patch section with this and let me know
 if this does the trick.
 
 post-patch:	.SILENT
 	${REINPLACE_CMD} -Ee 's/tests//' \
 		-e 's/^([[:space:]]*)\$$\(RANLIB\) ([^ ]*)/\1chmod u+w \2;&/' \
 		${WRKSRC}/Makefile.in
 	${REINPLACE_CMD} -e 's/@MAKEINFO@/& --no-split/g' \
 		${WRKSRC}/doc/Makefile.in
 	${RM} -f ${WRKSRC}/doc/*.info*
 
 
 The same as a diff for patch(1):
 
 --- flex/Makefile	2009-12-28 08:31:06.000000000 +0100
 +++ flex/Makefile	2010-02-16 09:50:28.000000000 +0100
 @@ -36,7 +36,9 @@
  .endif
  
  post-patch:	.SILENT
 -	${REINPLACE_CMD} -e 's/tests//' ${WRKSRC}/Makefile.in
 +	${REINPLACE_CMD} -Ee 's/tests//' \
 +		-e 's/^([[:space:]]*)\$$\(RANLIB\) ([^ ]*)/\1chmod u+w \2;&/' \
 +		${WRKSRC}/Makefile.in
  	${REINPLACE_CMD} -e 's/@MAKEINFO@/& --no-split/g' \
  		${WRKSRC}/doc/Makefile.in
  	${RM} -f ${WRKSRC}/doc/*.info*
 
 
 --BXVAT5kNtrzKuDFl
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 
 iF4EAREIAAYFAkt6XwEACgkQAEpMHW8nCPQwlQD/Z8ixo6S4yRZHc0gh4JIXUMSq
 ZojxNAZfKhIOLpH8UvgBAMCL8X28goTTYBp/ZeR2epAZXvsyyFB/GBPFLYRj4BR6
 =9eD7
 -----END PGP SIGNATURE-----
 
 --BXVAT5kNtrzKuDFl--
State-Changed-From-To: feedback->closed 
State-Changed-By: johans 
State-Changed-When: Fri Feb 26 08:13:18 UTC 2010 
State-Changed-Why:  
Committed the patch that has been tested by gerald. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143933 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/143933: commit references a PR
Date: Fri, 26 Feb 2010 08:12:52 +0000 (UTC)

 johans      2010-02-26 08:12:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     textproc/flex        Makefile 
   Log:
   Fix port installation for the INSTALL_AS_USER case.
   This doesn't affect regular (root) installs.
   
   PR:             ports/143933
   Submitted by:   gerald
   Feature safe:   yes
   
   Revision  Changes    Path
   1.11      +3 -1      ports/textproc/flex/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
