ports/182997: Package creation failure - stagedir startup script missing
Dewayne
dewayne.geraghty at heuristicsystems.com.au
Tue Oct 15 13:00:04 UTC 2013
>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:
More information about the freebsd-ports-bugs
mailing list