Bug 173559 - "portmaster math/lp_solve" fails when run from normal user login after duing su
Summary: "portmaster math/lp_solve" fails when run from normal user login after duing su
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-11 15:30 UTC by Tilman Blumhagen
Modified: 2013-04-13 22:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tilman Blumhagen 2012-11-11 15:30:00 UTC
When running "portmaster math/lp_solve" from a normal user account after doing su it wants to execute ~/.shrc wich is not executable for the user that is created by the FreeBSD 9.0 installation. Making ~/.shrc executable makes the build succeed.

Executing ~/.shrc is probably not necessary. In fact I think building a port should not rely on anything in a users home directory.

How-To-Repeat: $ su
sternmull# portmaster math/lp_solve

===>>> Port directory: /usr/ports/math/lp_solve

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for math/lp_solve in background
===> No options to configure
===>>> Gathering dependency list for math/lp_solve from ports
===>>> No dependencies for math/lp_solve


===>>> Starting build for math/lp_solve <<<===

===>>> All dependencies are up to date

===>  Cleaning for lp_solve-5.5.2.0
===>>> Waiting on fetch & checksum for math/lp_solve <<<===


===>  Extracting for lp_solve-5.5.2.0
=> SHA256 Checksum OK for lp_solve_5.5.2.0_source.tar.gz.
===>  Patching for lp_solve-5.5.2.0
===>  Applying FreeBSD patches for lp_solve-5.5.2.0
===>  Configuring for lp_solve-5.5.2.0
===>  Building for lp_solve-5.5.2.0
cd /usr/ports/math/lp_solve/work/lp_solve_5.5/lp_solve  ; /home/kringel/.shrc TMPDIR="/tmp" /bin/sh -x ccc
/home/kringel/.shrc: Permission denied
*** [do-build] Error code 126

Stop in /usr/ports/math/lp_solve.

===>>> make failed for math/lp_solve
===>>> Aborting update

Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> math/lp_solve 

sternmull#
Comment 1 Alex Kozlov freebsd_committer freebsd_triage 2013-02-11 14:14:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bdrewery

Over to maintainer.
Comment 2 Colin Percival freebsd_committer freebsd_triage 2013-04-02 20:43:08 UTC
This port uses ${ENV} to refer to /usr/bin/env; the correct name is ${SETENV}:

--- Makefile
+++ Makefile
@@ -21,3 +21,3 @@
 .if defined(TMPDIR)
-BUILDENV=	${ENV} TMPDIR="${TMPDIR}"
+BUILDENV=	${SETENV} TMPDIR="${TMPDIR}"
 .endif

This fixes the build under portmaster.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

./devel/libtai/Makefile:        @${ENV} LD_LIBRARY_PATH=${WRKSRC} \
./math/lp_solve/Makefile:BUILDENV=      ${ENV} TMPDIR="${TMPDIR}"
./math/libjbigi/Makefile:               ${ENV} ${JBIGI_BUILD_ENV} \
./math/libjbigi/Makefile:               ${ENV} ${JBIGI_BUILD_ENV} \
./net-mgmt/zenoss/Makefile:     @cd ${WRKSRC} && ${ENV} ${BUILD_ENV}
SVNVERSION=${FALSE} bash ./build.sh 2>/dev/null
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2013-04-13 19:03:40 UTC
State Changed
From-To: open->closed

Fixed
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-04-13 19:03:42 UTC
Author: bdrewery
Date: Sat Apr 13 18:03:34 2013
New Revision: 315797
URL: http://svnweb.freebsd.org/changeset/ports/315797

Log:
  - Fix build as non-root by using proper SETENV to reference /usr/bin/env
  - Trim header
  
  PR:		ports/173559
  Submitted by:	cperciva
  Reported by:	Tilman Blumhagen <tilman.blumhagen@googlemail.com>
  Approved by:	portmgr (implicit)

Modified:
  head/math/lp_solve/Makefile

Modified: head/math/lp_solve/Makefile
==============================================================================
--- head/math/lp_solve/Makefile	Sat Apr 13 15:44:08 2013	(r315796)
+++ head/math/lp_solve/Makefile	Sat Apr 13 18:03:34 2013	(r315797)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	lp_solve
-# Date created:         31 June 2003
-# Whom:			Pedro F. Giffuni <giffunip@asme.org>
-#
+# Created by: Pedro F. Giffuni <giffunip@asme.org>
 # $FreeBSD$
-#
 
 PORTNAME=	lp_solve
 PORTVERSION=	5.5.2.0
@@ -19,7 +15,7 @@ WRKSRC=		${WRKDIR}/${PORTNAME}_${PORTVER
 USE_LDCONFIG=	yes
 
 .if defined(TMPDIR)
-BUILDENV=	${ENV} TMPDIR="${TMPDIR}"
+BUILDENV=	${SETENV} TMPDIR="${TMPDIR}"
 .endif
 
 .include <bsd.port.pre.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-04-13 22:12:35 UTC
Author: bdrewery
Date: Sat Apr 13 21:12:26 2013
New Revision: 315798
URL: http://svnweb.freebsd.org/changeset/ports/315798

Log:
  - Fix builds when ENV is set and not executable by using proper SETENV for /usr/bin/env
    This fixes all cases of incorrect ENV/SETENV usage.
  
  Approved by:	portmgr (implicit)
  With hat:	portmgr
  PR:		ports/173559

Modified:
  head/devel/libtai/Makefile
  head/math/libjbigi/Makefile
  head/net-mgmt/zenoss/Makefile

Modified: head/devel/libtai/Makefile
==============================================================================
--- head/devel/libtai/Makefile	Sat Apr 13 18:03:34 2013	(r315797)
+++ head/devel/libtai/Makefile	Sat Apr 13 21:12:26 2013	(r315798)
@@ -46,7 +46,7 @@ pre-install:
 .endfor
 
 post-build:
-	@${ENV} LD_LIBRARY_PATH=${WRKSRC} \
+	@${SETENV} LD_LIBRARY_PATH=${WRKSRC} \
 		${WRKSRC}/leapsecs < ${WRKSRC}/leapsecs.txt > \
 		${WRKSRC}/leapsecs.dat
 

Modified: head/math/libjbigi/Makefile
==============================================================================
--- head/math/libjbigi/Makefile	Sat Apr 13 18:03:34 2013	(r315797)
+++ head/math/libjbigi/Makefile	Sat Apr 13 21:12:26 2013	(r315798)
@@ -52,12 +52,12 @@ do-build:
 .ifdef(JBIGI_BUILD_JCPUID)
 # jcpuid
 	cd ${BUILD_WRKSRC}/jcpuid && \
-		${ENV} ${JBIGI_BUILD_ENV} \
+		${SETENV} ${JBIGI_BUILD_ENV} \
 			${SH} ./build.sh
 .endif
 # jbigi
 	cd ${BUILD_WRKSRC}/jbigi && \
-		${ENV} ${JBIGI_BUILD_ENV} \
+		${SETENV} ${JBIGI_BUILD_ENV} \
 			${SH} ./build_jbigi.sh dynamic
 ## prepare jar
 .ifdef(JBIGI_BUILD_JCPUID)

Modified: head/net-mgmt/zenoss/Makefile
==============================================================================
--- head/net-mgmt/zenoss/Makefile	Sat Apr 13 18:03:34 2013	(r315797)
+++ head/net-mgmt/zenoss/Makefile	Sat Apr 13 21:12:26 2013	(r315798)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	zenoss
-# Date created:		19 April 2011
-# Whom:			Phil Phillips
-#
+# Created by: Phil Phillips
 # $FreeBSD$
-#
 
 PORTNAME=	zenoss
 PORTVERSION=	3.1.0
@@ -97,7 +93,7 @@ do-install:
 		&& ${LN} -sF ${ZENHOME}/libdata/pkgconfig \
 		${ZENHOME}/lib/pkgconfig
 
-	@cd ${WRKSRC} && ${ENV} ${BUILD_ENV} SVNVERSION=${FALSE} bash ./build.sh 2>/dev/null
+	@cd ${WRKSRC} && ${SETENV} ${BUILD_ENV} SVNVERSION=${FALSE} bash ./build.sh 2>/dev/null
 
 	@${RM} ${ZENHOME}/lib/pkgconfig
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"