Date: Wed, 18 Nov 2009 10:54:23 -0900 From: Mel Flynn <mel.flynn+fbsd.ports@mailing.thruhere.net> To: Thomas Sandford <freebsduser@paradisegreen.co.uk> Cc: ports@freebsd.org Subject: Re: RFC: svn for make fetch Message-ID: <b24aa430998471e1c7e15bc3935b9908@sbmail.office-on-the.net> In-Reply-To: <4B03DDCB.7010408@paradisegreen.co.uk> References: <a0777e080911080731w461e6733peb0a5473acf07aa8@mail.gmail.com> <20091116121622.GA79691@hades.panopticon> <ceb3742532e6ac07cc450aafafa6022e@sbmail.office-on-the.net> <a0777e080911171359o728a78feye321912557cdcea4@mail.gmail.com> <790a9fff0911171619q351717d2wd77ec37cad24d26b@mail.gmail.com> <a0777e080911180159n59a20c8fla87353e100db2c48@mail.gmail.com> <4B03DDCB.7010408@paradisegreen.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Nov 2009 11:43:07 +0000, Thomas Sandford <freebsduser@paradisegreen.co.uk> wrote: > (Sorry, Ive lost track of the higher level attributions, but) > Eitan Adler wrote: >>>> Creating deterministic tars (ignoring "metadeta") sounds like it >>>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b24aa430998471e1c7e15bc3935b9908>