Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 2013 09:03:10 +1100
From:      Dewayne <dewayne.geraghty@heuristicsystems.com.au>
To:        Scot Hetzel <swhetzel@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: cyrus-sasl2-saslauthd package failure.
Message-ID:  <5259C71E.1030808@heuristicsystems.com.au>
In-Reply-To: <CACdU%2Bf_-HXkgjjmvDP4pZ1Onn2LtkpG2Zxe1jpOOLW0NtTxQ8Q@mail.gmail.com>
References:  <52590C07.9080805@heuristicsystems.com.au> <CACdU%2Bf_-HXkgjjmvDP4pZ1Onn2LtkpG2Zxe1jpOOLW0NtTxQ8Q@mail.gmail.com>

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

On 13/10/2013 3:51 AM, Scot Hetzel wrote:
> On Sat, Oct 12, 2013 at 3:44 AM, Dewayne-remote
> <dewayne.geraghty@heuristicsystems.com.au> 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
>> <command-line>: 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.





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