From owner-freebsd-ports@FreeBSD.ORG Wed Nov 18 19:54:27 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A74B106566C for ; Wed, 18 Nov 2009 19:54:27 +0000 (UTC) (envelope-from mel.flynn+fbsd.ports@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id E5BE48FC08 for ; Wed, 18 Nov 2009 19:54:26 +0000 (UTC) Received: from mx1.sbmail.office-on-the.net (mx1.sbmail.office-on-the.net [192.168.2.107]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 2653C7E853 for ; Wed, 18 Nov 2009 10:54:25 -0900 (AKST) Received: from dspam.sbmail.office-on-the.net (mx1.sbmail.office-on-the.net [192.168.2.107]) by mx1.sbmail.office-on-the.net (Postfix) with SMTP id 94C02C2CB05 for ; Wed, 18 Nov 2009 10:54:24 -0900 (AKST) Received: from webmail.testbox.ath.cx (mx1.sbmail.office-on-the.net [192.168.2.107]) by mx1.sbmail.office-on-the.net (Postfix) with ESMTP id 9C576C2CB04; Wed, 18 Nov 2009 10:54:23 -0900 (AKST) MIME-Version: 1.0 Date: Wed, 18 Nov 2009 10:54:23 -0900 From: Mel Flynn To: Thomas Sandford In-Reply-To: <4B03DDCB.7010408@paradisegreen.co.uk> References: <20091116121622.GA79691@hades.panopticon> <790a9fff0911171619q351717d2wd77ec37cad24d26b@mail.gmail.com> <4B03DDCB.7010408@paradisegreen.co.uk> Message-ID: X-Sender: mel.flynn+fbsd.ports@mailing.thruhere.net User-Agent: RoundCube Webmail/0.2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Nov 18 10:54:24 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 60,4b0450f042361354713763 X-DSPAM-Factors: 27, Content-Type*charset="UTF+8", 0.01000, Received*webmail.testbox.ath.cx, 0.01000, From*>>> should be a solved problem by now. If it isn't then I will have to >>>> make it my next project ;) >>>> >>> Instead of creating tar files, create zip files and then run them >>> through torrentzip >>> >>> http://www.freebsd.org/cgi/cvsweb.cgi/ports/archivers/torrentzip/ >>> >>> Torrentzip resets the date/time on the files and directories in the >>> zip archive so that the checksum of the file will match, no matter wh= o >>> builds the zip file using the same set of files. >>> >>> Scot >>> >>=20 >> Does such a tool exist for tar archives? >=20 > Couldn't you achieve the same thing by the use of touch(1) Probably, but my idea was at the time to provide a simple way to support non-releases (like mplayer) and devel snapshots for which a tarball is not or rarely rolled, with minimal change to bsd.port.mk. Hence the abuse of FETCH_*. I found it again, I'll clean it up when I hav= e more time - there's more stuff in my bsd.local.mk so not a clean diff, bu= t the crux is this: FETCH_BINARY=3D${SVN_CMD} FETCH_ARGS=3D${SVN_QUIET} export FETCH_BEFORE_ARGS=3D-r${SVN_REVISION} DISABLE_SIZE=3Dyes # screws with FETCH_BEFORE_ARGS # cwd at this point is ${_DISTDIR} FETCH_AFTER_ARGS=3D${_SVN_STAGE} && ${TAR} -C ${SVN_STAGE} -czf \ ${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-${PORTVERSION} \ WRKSRC?=3D${WRKDIR}/${SVN_ROOT} FETCH_NO_APPEND_FILE=3Dyes pre-fetch: @${MKDIR} ${SVN_STAGE} # Once bsdtar supports remove after archiving, we don't need this anymore= . post-fetch: @${RM} -rf ${_SVN_STAGE} (Yes, I realize I should inject my own targets and not abuse pre|post-fetch). bsd.port.mk diff snippet (long line): --- Mk/bsd.port.mk 21 Sep 2009 19:13:51 -0000 1.629 +++ Mk/bsd.port.mk 22 Sep 2009 01:21:26 -0000 @@ -3490,11 +3490,15 @@ for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \ ${ECHO_MSG} "=3D> Attempting to fetch from $${site}."; \ CKSIZE=3D`alg=3DSIZE; ${DISTINFO_DATA}`; \ - case $${file} in \ - */*) ${MKDIR} $${file%/*}; \ - args=3D"-o $${file} $${site}$${file}";; \ - *) args=3D$${site}$${file};; \ - esac; \ + if test x"${FETCH_NO_APPEND_FILE}" !=3D x"yes"; then \ + case $${file} in \ + */*) ${MKDIR} $${file%/*}; \ + args=3D"-o $${file} $${site}$${file}";; \ + *) args=3D$${site}$${file};; \ + esac; \ + else \ + args=3D$${site}; \ + fi; \ if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} ${FETCH_AFTER_ARGS}; then \ continue 2; \ fi; \ --=20 -- Mel