Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2013 10:17:41 -0500 (CDT)
From:      "Scot W. Hetzel" <swhetzel@gmail.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/182972: Mk/bsd.port.mk: NO_STAGE ports fail to install when STAGEDIR is set in /etc/make.conf
Message-ID:  <201310141517.r9EFHf61010712@fbsd10>
Resent-Message-ID: <201310141520.r9EFK0cB094918@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182972
>Category:       ports
>Synopsis:       Mk/bsd.port.mk: NO_STAGE ports fail to install when STAGEDIR is set in /etc/make.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 14 15:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 10.0-ALPHA2 i386
>Organization:
>Environment:
System: FreeBSD fbsd10 10.0-ALPHA2 FreeBSD 10.0-ALPHA2 #0 r255731: Sat Sep 21 08:56:02 CDT 2013 root@fbsd10:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
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

>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.

>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.

--- bsd.port.mk.diff begins here ---
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk	(revision 330122)
+++ Mk/bsd.port.mk	(working copy)
@@ -1932,7 +1932,12 @@
 
 .if !defined(NO_STAGE)
 .include "${PORTSDIR}/Mk/bsd.stage.mk"
+.else
+.undef STAGEDIR
+.if defined(STAGEDIR)
+IGNORE= STAGEDIR defined on the command line, don't do that
 .endif
+.endif
 
 .if defined(WITH_PKGNG)
 .include "${PORTSDIR}/Mk/bsd.pkgng.mk"
--- bsd.port.mk.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310141517.r9EFHf61010712>