From owner-freebsd-ports@FreeBSD.ORG Sat Oct 12 22:06:40 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 31E28FD0 for ; Sat, 12 Oct 2013 22:06:40 +0000 (UTC) (envelope-from dewayne.geraghty@heuristicsystems.com.au) Received: from nschwmtas01p.mx.bigpond.com (nschwmtas01p.mx.bigpond.com [61.9.189.137]) by mx1.freebsd.org (Postfix) with ESMTP id BD2692364 for ; Sat, 12 Oct 2013 22:06:39 +0000 (UTC) Received: from nschwcmgw07p ([61.9.190.167]) by nschwmtas01p.mx.bigpond.com with ESMTP id <20131012220637.TCQW26692.nschwmtas01p.mx.bigpond.com@nschwcmgw07p> for ; Sat, 12 Oct 2013 22:06:37 +0000 Received: from hermes.heuristicsystems.com.au ([58.172.113.247]) by nschwcmgw07p with BigPond Outbound id cN6d1m00J5LKYmq01N6dlD; Sat, 12 Oct 2013 22:06:37 +0000 X-Authority-Analysis: v=2.0 cv=BKIxXSsG c=1 sm=1 a=YibVxx38Z+cwdCKSMcELyg==:17 a=Tz8S7zN-hKgA:10 a=w0qdnYwdXH8A:10 a=8nJEP1OIZ-IA:10 a=GHIR_BbyAAAA:8 a=aAYyEePG3BEA:10 a=tff_f_YsAAAA:8 a=7qPthyjvCjAw16HPzmUA:9 a=wPNLvfGTeEIA:10 a=YibVxx38Z+cwdCKSMcELyg==:117 Received: from [10.0.5.3] (ewsw01.hs [10.0.5.3]) (authenticated bits=0) by hermes.heuristicsystems.com.au (8.14.5/8.13.6) with ESMTP id r9CM5RNA083776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 13 Oct 2013 09:05:28 +1100 (EST) (envelope-from dewayne.geraghty@heuristicsystems.com.au) Message-ID: <5259C71E.1030808@heuristicsystems.com.au> Date: Sun, 13 Oct 2013 09:03:10 +1100 From: Dewayne User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Scot Hetzel Subject: Re: cyrus-sasl2-saslauthd package failure. References: <52590C07.9080805@heuristicsystems.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Oct 2013 22:06:40 -0000 On 13/10/2013 3:51 AM, Scot Hetzel wrote: > On Sat, Oct 12, 2013 at 3:44 AM, Dewayne-remote > wrote: >> While attempting to rebuild all my 500+ ports for servers only, I came >> across this issue with saslauthd. >> >> The installation is successful, but the package assembly fails with: >> tar: etc/rc.d/saslauthd: Cannot stat: No such file or directory >> >> But the file is correctly installed in staging >> # ls -l /staging/usr/local/etc/rc.d/saslauthd /usr/local/etc/rc.d/saslauthd >> ls: /usr/local/etc/rc.d/saslauthd: No such file or directory >> -r-xr-xr-x 1 root wheel 940 Oct 12 19:28 >> /staging/usr/local/etc/rc.d/saslauthd >> >> The command to build is: >> make __MAKE_CONF=/dev/null DISTDIR=/distfiles WRKDIRPREFIX=/var/ports >> PACKAGES= /packages STAGEDIR=/staging FAVORITE_COMPILER=gcc >> DISABLE_LICENSES=yes -DBATCH DEFAULT_VERSIONS=perl5=5.16 python=2.7 >> python2=2.7 apache=22 clean deinstall package >> >> The process succeeds with the build and installation into $STAGEDIR >> >> The tail of the log follows: >> cd >> /var/ports/usr/ports/security/cyrus-sasl2-saslauthd/work/cyrus-sasl-2.1.26/saslauthd >> && make saslcache >> cc -DHAVE_CONFIG_H >> -DSASLAUTHD_CONF_FILE_DEFAULT=\"/usr/local/etc/saslauthd.conf\" -I. -I. >> -I.. -I. -I./include -I./include -I./../include -I/usr/include >> -DKRB5_HEIMDAL -O2 -pipe -nostdinc -I/usr/include -fno-strict-aliasing >> -MT saslcache.o -MD -MP -MF .deps/saslcache.Tpo -c -o saslcache.o >> saslcache.c >> In file included from cache.h:44, >> from saslcache.c:52: >> saslauthd.h:190:1: warning: "KRB5_HEIMDAL" redefined >> : warning: this is the location of the previous definition >> mv -f .deps/saslcache.Tpo .deps/saslcache.Po >> cc -O2 -pipe -nostdinc -I/usr/include -fno-strict-aliasing >> -Wl,-rpath=/usr/lib:/usr/local/lib -L/usr/lib -o saslcache saslcache.o >> cd >> /var/ports/usr/ports/security/cyrus-sasl2-saslauthd/work/cyrus-sasl-2.1.26/saslauthd >> && make testsaslauthd >> `testsaslauthd' is up to date. >> ===> 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) >> /bin/mkdir -p -m 770 /var/run/saslauthd >> /usr/sbin/chown cyrus:mail /var/run/saslauthd >> **************************************************************************** >> >> To run saslauthd from startup, add saslauthd_enable="YES" in your >> /etc/rc.conf. >> >> **************************************************************************** >> ===> Compressing manual pages for cyrus-sasl-saslauthd-2.1.26 >> ===> Registering installation for cyrus-sasl-saslauthd-2.1.26 >> ===> SECURITY REPORT: >> This port has installed the following files which may act as network >> servers and may therefore pose a remote security risk to the system. >> /usr/local/sbin/saslauthd >> >> This port has installed the following startup scripts which may cause >> these network services to be started at boot time. >> /usr/local/etc/rc.d/saslauthd >> >> If there are vulnerabilities in these programs there may be a security >> risk to the system. FreeBSD makes no guarantee about the security of >> ports included in the Ports Collection. Please type 'make deinstall' >> to deinstall the port if this is a concern. >> >> For more information, and contact details about the security >> status of this software, see the following webpage: >> http://cyrusimap.web.cmu.edu/ >> ===> Building package for cyrus-sasl-saslauthd-2.1.26 >> tar: etc/rc.d/saslauthd: Cannot stat: No such file or directory >> tar: Error exit delayed from previous errors. >> pkg_create: make_dist: tar command failed with code 256 >> *** [do-package] Error code 1 >> >> ------------------------------End of saslauthd >> log--------------------------------- >> A similar result is achieved for samba36, samba4, isc-dhcp42-server; viz >> ===> Building package for isc-dhcp42-server-4.2.5 >> tar: etc/rc.d/isc-dhcpd: Cannot stat: No such file or directory >> tar: Error exit delayed from previous errors. >> pkg_create: make_dist: tar command failed with code 256 >> *** [do-package] Error code 1 >> >> # ls -l /staging/usr/local/etc/rc.d/isc-dhcpd /usr/local/etc/rc.d/isc-dhcpd >> ls: /usr/local/etc/rc.d/isc-dhcpd: No such file or directory >> -r-xr-xr-x 1 root wheel 11816 Oct 12 19:39 >> /staging/usr/local/etc/rc.d/isc-dhcpd >> >> I can't see what I need to workaround to avoid this issue? > The problem is that you defined STAGEDIR, but these ports are marked NO_STAGE > > I tried to add a .undef STAGEDIR to bsd.port.mk: > > --- /usr/ports/Mk.bsd.port.mk > +++ /usr/ports/Mk.bsd.port.mk > @@ -1932,6 +1932,8 @@ > .if !defined(NO_STAGE) > .include "${PORTSDIR}/Mk/bsd.stage.mk" > +.else > +.undef STAGEDIR > .endif > > The above works, if you put STAGEDIR into /etc/make.conf. > > # echo 'STAGEDIR=/stagetest' >> /etc/make.conf > # make -V STAGEDIR > > But it doesn't work if you define STAGEDIR with the make command: > > # make STAGEDIR=/stage -V STAGEDIR > /stage > > Does anyone know how to make this work? > Scott, Thank-you for your advise. I actually do have STAGEDIR defined in my make.conf, however for the purposes of sending this email I placed everything on the command line; so it could be easily captured. Either method (command line nor make.conf) doesn't work in an environment that uses pkg_*, and plain portmaster commands on a 9.2Stable system. I must admit to increasing confusion as to what can ONLY be defined on the command-line, in make.conf, and the port's Makefile itself. Building ports is getting harder. Regards, Dewayne.