Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2013 12:53:22 GMT
From:      Dewayne <dewayne.geraghty@heuristicsystems.com.au>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/182997: Package creation failure - stagedir startup script missing
Message-ID:  <201310151253.r9FCrM7W051664@oldred.freebsd.org>
Resent-Message-ID: <201310151300.r9FD03mj024606@freefall.freebsd.org>

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

>Number:         182997
>Category:       ports
>Synopsis:       Package creation failure - stagedir startup script missing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 15 13:00:03 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Dewayne
>Release:        FreeBSD 9.2S
>Organization:
>Environment:
FreeBSD b1.hs 9.2-STABLE FreeBSD 9.2-STABLE #0: Mon Oct 14 05:52:52 EST 2013     root@:/usr/obj/usr/src/sys/hqdev-amd64-padlock-smp-vga i386
>Description:
The following ports can not find their respective startup script for inclusion in the package tar file:
net/samba36 net/samba4 net/dante net/isc-dhcp42-server (& client)  
mail/mailscanner net-mgmt/arpwatch mail/p5-Mail-SpamAssassin 

The common failing is reported as
# make -DBATCH package
===>  Building package for dante-1.3.2
tar: etc/rc.d/sockd: 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

Stop in /usr/ports/net/dante.

The working environment uses pkg_* and portmaster.

The above is by no means exhaustive, only representative of those ports needed.

>How-To-Repeat:
cd /usr/ports/net/dante && make -DBATCH package
>Fix:
The ugly and grossly inadequate workaround is to edit each Makefile and include something like:
@${CP} -p ${STAGEDIR}${PREFIX}/etc/rc.d/${USE_RC_SUBR} ${PREFIX}/etc/rc.d/
as part of the "post-install:" actions.  

Specific examples to demonstrate that there is clearly a pattern.  When the copy line is added the package(s) is successfully built, even if it did leave crap lying around in $STAGEDIR:

For net/samba36 insert at the end of the "post-install:" block
	@${CP} -p ${STAGEDIR}${RC_DIR}/samba ${RC_DIR}/

For net/samba4,
	@${CP} -p ${STAGEDIR}${PREFIX}/etc/rc.d/samba4 ${PREFIX}/etc/rc.d/

Similarly for net/isc-dhcp42-server (for net/isc-dhcp42-relay & net/isc-dhcp42-client), arpwatch
post-install:
	# The client instance has no rc.d/SCRIPT
        if [ -f ${STAGEDIR}${PREFIX}/etc/rc.d/${USE_RC_SUBR} ]; then \
                @${CP} -p ${STAGEDIR}${PREFIX}/etc/rc.d/${USE_RC_SUBR} ${PREFIX}/etc/rc.d/
        fi

mailscanner
	@${CP} -p ${STAGEDIR}${PREFIX}/etc/rc.d/mailscanner ${PREFIX}/etc/rc.d/
	@${CP} -p ${STAGEDIR}${PREFIX}/etc/rc.d/mta ${PREFIX}/etc/rc.d/
	
mail/p5-Mail-SpamAssassin
        @${CP} -p ${STAGEDIR}${PREFIX}/etc/rc.d/sa-spamd ${PREFIX}/etc/rc.d/
AND remove the extra colon at the end of post-install:

It seems that quite a few ports use a double-colon, but this is for another day.

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



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