Hello mentors,
I'm packaging a svn snapshot of a Mono assembly, for which no released tarball
is present.
As per Policy 3.8.0, I wrote in debian/README.Debian-source how to get a
tarball to start the build, i.e. "./debian/rules get-orig-source".

This is my get-orig-source target (please tell me if and how it can be
improved), with some variables defined in the very beginning of the makefile:

---8<---
VERSION=$(shell parsechangelog | grep ^Version | awk -F": " '{print $$2}' | cut 
-d"-" -f1)
REV=$(shell echo $(VERSION) | awk -F"~svn" '{print $$2}')
GOS_TMP=$(CURDIR)/get-orig-source-tmp

[..]

get-orig-source:
        rm -rf $(GOS_TMP) && mkdir $(GOS_TMP)
        svn co -r $(REV) svn://anonsvn.mono-project.com/source/trunk/Mono.Nat 
$(GOS_TMP)/mono-nat-sharp-$(VERSION)
        find $(GOS_TMP)/mono-nat-sharp-$(VERSION) -name ".svn" -type d | xargs 
rm -rf
        cd $(GOS_TMP) && tar zcf mono-nat-sharp_$(VERSION).orig.tar.gz 
mono-nat-sharp-$(VERSION)/
        mv $(GOS_TMP)/mono-nat-sharp_$(VERSION).orig.tar.gz $(CURDIR)/../
        rm -rf $(GOS_TMP)
        echo "The original source tarball is located at $(CURDIR)/../ ."
--->8---

Now, the fact is that the resulting tarball has very different md5sums at
each run -- and I found no way to have the same exact md5sum of the .orig.tar.gz
that would be uploaded to Debian:

$ date -R
Thu, 19 Jun 2008 23:12:36 +0200
$ debian/rules get-orig-source &>/dev/null
$ md5sum ../mono-nat-sharp_0.1~svn106158.orig.tar.gz
2826da659bb5a5ab5867c8ca11b6f7fe  ../mono-nat-sharp_0.1~svn106158.orig.tar.gz
$ debian/rules get-orig-source &>/dev/null
$ md5sum ../mono-nat-sharp_0.1~svn106158.orig.tar.gz
54db2bdb1131f7b3e5a1a73d495bd737  ../mono-nat-sharp_0.1~svn106158.orig.tar.gz
$ date -R
Thu, 19 Jun 2008 23:13:06 +0200
$

I thought that this could be related to timestamps -- but I found no option in
`man tar` to remove timestamps from archived files (I thought that, removing
timestamps, the files would have been all the same).
I can also confirm that the files in the archives are always the same (checked
with `tar -tf` and diffing the lists).

What can I do here?

Thanks for any help,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature

Reply via email to