Bug 182972 - Mk/bsd.port.mk: NO_STAGE ports fail to install when STAGEDIR is set in /etc/make.conf
Summary: Mk/bsd.port.mk: NO_STAGE ports fail to install when STAGEDIR is set in /etc/m...
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: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 16:20 UTC by Scot Hetzel
Modified: 2014-01-20 07:50 UTC (History)
0 users

See Also:


Attachments
bsd.port.mk.diff (440 bytes, patch)
2013-10-14 16:20 UTC, Scot Hetzel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scot Hetzel 2013-10-14 16:20:00 UTC
When installing a port that has NO_STAGE set in it's Makefile, the port will fail to install when STAGEDIR is set in /etc/make.conf

Fix: The below patch to Mk/bsd.port.mk fixes the issue when STAGEDIR is defined in /etc/make.conf.

I was unable to undefine STAGEDIR when it is provided on the command line:

make STAGEDIR=/usr/obj/stage2 install

So I opted to display an IGNORE message when this situation occurs.
How-To-Repeat: echo STAGEDIR=/usr/obj/stage >> /etc/make.conf
cd /usr/ports/security/cyrus-sasl2-saslauthd
make install
:
===>  Installing for cyrus-sasl-saslauthd-2.1.26
===>   Generating temporary packing list
===>  Checking if security/cyrus-sasl2-saslauthd already installed
test -z "/usr/local/sbin" || /bin/mkdir -p "/usr/local/sbin"
  install  -s -o root -g wheel -m 555 saslauthd testsaslauthd '/usr/local/sbin'
/bin/sh ./config/mkinstalldirs /usr/local/man/man8
install  -o root -g wheel -m 444 ./saslauthd.mdoc /usr/local/man/man8/saslauthd.8
===> Staging rc.d startup script(s)
install: /usr/obj/stage/usr/local/etc/rc.d/saslauthd: No such file or directory
*** Error code 71

Stop.
make[1]: stopped in /usr/ports/security/cyrus-sasl2-saslauthd
*** Error code 1

Stop.
make: stopped in /usr/ports/security/cyrus-sasl2-saslauthd

The cyrus-sasl2-saslauthd port is trying to install the rc.d script from the STAGEDIR, but the port hasn't been converted to support STAGE.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-10-14 16:20:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-01-20 07:42:07 UTC
Author: bapt
Date: Mon Jan 20 07:42:00 2014
New Revision: 340369
URL: http://svnweb.freebsd.org/changeset/ports/340369
QAT: https://qat.redports.org/buildarchive/r340369/

Log:
  NO_STAGEd ports will fail if STAGEDIR is defined.
  
  Undefined STAGEDIR if already set from make.conf
  Raise an error if set from command line (which cannot be undefined)
  
  PR:		ports/182972
  Submitted by:	"Scot W. Hetzel" <swhetzel@gmail.com>

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Jan 20 07:32:06 2014	(r340368)
+++ head/Mk/bsd.port.mk	Mon Jan 20 07:42:00 2014	(r340369)
@@ -1821,6 +1821,11 @@ RUN_DEPENDS+=	${_GL_${_component}_RUN_DE
 
 .if !defined(NO_STAGE)
 .include "${PORTSDIR}/Mk/bsd.stage.mk"
+.else
+# Ignore STAGEDIR if set from make.conf
+.undef STAGEDIR
+# From command line it is impossible to undefined so we must raise an error
+IGNORE=	Do not define STAGEDIR in command line
 .endif
 
 .if defined(WITH_PKGNG)
_______________________________________________
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 3 Baptiste Daroussin freebsd_committer freebsd_triage 2014-01-20 07:43:30 UTC
State Changed
From-To: open->closed

Committed. Thanks!