[Debian-med-packaging] uscan/get-orig-source; identical tarballs

Dmitry Smirnov onlyjob at member.fsf.org
Sun Feb 3 04:16:30 UTC 2013


On Thu, 31 Jan 2013 23:20:41 Andreas Tille wrote:
> > In packages where my get-orig-source generate orig.tar from upstream
> > repository checkout I pass something like "--mtime=2012-01-31" to tar
> > (when possible) in order to get binary-identical archives. It helps.
> 
> This might help to get binary-identical archives but destroys the
> original time stamps - something that I personally do not like (also in
> VCS checkouts which I personally consider a misfeature.)

I'm with you -- it would be much easier to checkout with something like
"--restore-time" or "--touch" if it were implemented.

The problem is that after `git clone` there are no original timestamps.

I gave it a thought and came out with the following code to correct times in 
git checkout before packing to orig.tar:

    for F in $(git ls-tree -r --name-only HEAD); do
        touch -d "$(git log -1 --format="%ai" -- $F)" "$F"
    done

What do you think?

-- 
Regards,
 Dmitry Smirnov
 GPG key : 4096R/53968D1B

---

Truth — Something somehow discreditable to someone.
        -- H. L. Mencken, 1949




More information about the Debian-med-packaging mailing list