Re: Bug#35781: samba has no pristine source.
reopen 35781
end
--
[CCed also to debian-mentors, as I suppose its the right place]
On Tue, Apr 13, 1999 at 09:34:18AM -0400, Eloy A. Paris wrote:
>
> On Tue, Apr 13, 1999 at 12:21:38PM +0300, Fabrizio Polacco wrote:
>
> > Hi, the source for samba 2.0.3, as archived in potato, is not *exactly*
> > the pristine one:
> > -rw-rw-r-- 1 polacco system 2081264 Apr 9 09:27 samba-2.0.3.tar.gz
> > -rw-rw-r-- 1 polacco system 2060644 Apr 9 09:34 samba_2.0.3.orig.tar.gz
> >
> > I suppose the difference in dimension (and in md5sums) is due to the
> > renaming of the directory in the sources: the original unpacks in
> > samba-2.0.3/ while the debian one unpacks in samba-2.0.3.orig
> >
> > I suggest that you symply _rename_ the original source package with
> > mv samba-2.0.3.tar.gz samba_2.0.3.orig.tar.gz
> > (which preserves the md5sum intact) without renaming the internal dir.
> >
> > One of dpkg strengths is that it uses (whenever possible) the pristine
> > source package. In this case it is possible, then we should do it.
>
> Fab, I disagree with you here. I don't think this is a bug and we can
> ask the other developers in debian-devel just to be sure.
Ok, but let me try to convince you with my arguments :-)
No flames.
>
> The samba_2.0.3.orig.tar.gz was created by dh_make, not by myself. I
> can't just rename the original samba-2.0.3.tar.gz
> samba_2.0.3.orig.tar.gz because then the packaging tools would not
> work:
I knew that debmake made this, but I thought that dh_* tools were
smarter.
debmake made this because at these time this was the only way to create
source. But later dpkg-source was modifyed to get pristine sources as well
as modifyed sources (as before).
The packaging tools work perfectly.
> When you untar samba_2.0.3.orig.tar.gz, it must untar in
> samba-2.0.3.orig, _not_ in samba-2.0.3/ as would be the case if you
> just rename the original tarball to samba_2.0.3.orig.tar.gz.
I disagree
> What I could do is untar the original tarball, then rename the
> samba-2.0.3/ directory to samba-2.0.3.orig/ and then create a new
> tarball as samba_2.0.3.orig.tar.gz, but this is basically the same
> thing that dh_make does.
And I continue to say that there is a better way.
> Just to be sure, I did the following: I downloaded from ftp.samba.org
> the original tarball (samba-2.0.3.tar.gz). I untar this file and the
> samba_2.0.3.orig.tar.gz file. So, I got two directories:
>
> samba-2.0.3/ (from the original tarball)
> samba-2.0.3.orig/ (from samba_2.0.3.orig.tar.gz)
>
> Then I ran the command
>
> diff -u --recursive --new-file samba-2.0.3 samba-2.0.3.orig/
>
> Guess what? The _only_ difference between the directories was a hidden
> file that was present in the original tarball but that I deleted
> before dh_make created samba_2.0.3.orig.tar.gz: .#WHATSNEW.txt.1.32.2.13
I also have to delete binary files from the upstreame tarball, but this
does not affect the tarball itself, just only the diff
(dpkg-source ignores deleted files)
I don't delete these "wrong" files directly, but I add a command in the
clean: target of the debian/rules, so the files are deleted before the
diff is taken, and I will propagate the deletion to newer tarballs
without problem, as it is in the rules.
> This file is just a bug in the upstream tarball, they left it there
> some how, and I deleted it because it is the same as the WHATSNEW.txt
> file. That explains the difference between samba_2.0.3.orig.tar.gz and
> samba-2.0.3.tar.gz in size. These two files will _always_ have
> different md5sums because their contents are different because one
> untars in samba-2.0.3/ and the other one in samba-2.0.3.orig/.
Exactly what I suggest to avoid.
> So, no my friend, I don't think this is a bug and I am closing this
> bug. If you are not satisfied with my explanation, talk to me before
> re-opening the bug.
well, my friend, I would have suggested that *you* wait for my reply
before closing the bug :-)
I have reopened it, as you see :-) (hope you don't go upset because of
this, it's only for the record!)
> The problem with this hidden .#WHATSNEW.txt.1.32.2.13 file will be
> solved, hopefully, in samba-2.0.4, and then, the
> samba_2.0.4.orig.tar.gz and the original samba-2.0.4.tar.gz will have
> no differences.
So here is my suggestion; please give it a try and you'll discover a new
world :-)
download the original tarball (you already did this) and put it in a
different place (even /tmp/smthng ).
$ md5sum samba-2.0.3.tar.gz
1c316bb482a95e6c3faaf04cde6d1503 samba-2.0.3.tar.gz
rename it:
mv samba-2.0.3.tar.gz samba_2.0.3.orig.tar.gz
untar it:
tar -xzvf samba_2.0.3.orig.tar.gz
it will untar in samba-2.0.3/ (don't rename it!)
cd samba-2.0.3
apply the diff
zcat somewhereelse/samba_2.0.3-1*diff.gz | patch -p1
chmod a+x debian/rules
edit debian/rules and, in the clean: target, add a dashed line to remove
your binary files:
-rm -f .#WHATSNEW.txt.1.32.2.13
then build the package
dpkg-buildpackage -rfakeroot 2>&1 | tee ../log
the log says:
dpkg-source: warning: ignoring deletion of file .#WHATSNEW.txt.1.32.2.13
dpkg-source: building samba using existing samba_2.0.3.orig.tar.gz
dpkg-source: building samba in samba_2.0.3-1.diff.gz
dpkg-source: building samba in samba_2.0.3-1.dsc
See the difference, dpkg-source is *using*the*existing tarball, while
before it was saying *building* the source tarball.
Now see what's in your parent directory.
-rw-r--r-- 1 fab fab 21707 Apr 13 17:50 samba_2.0.3-1.diff.gz
-rw-r--r-- 1 fab fab 333 Apr 13 17:50 samba_2.0.3-1.dsc
-rw-r--r-- 1 fab fab 2081264 Feb 28 00:20 samba_2.0.3.orig.tar.gz
$ md5sum ../samba_2.0.3*
dd02cd9a8cc8ddde6f3bbc2b4f40e835 ../samba_2.0.3-1.diff.gz
a8ad9e669ce1953a9be4bd949e8a1df9 ../samba_2.0.3-1.dsc
1c316bb482a95e6c3faaf04cde6d1503 ../samba_2.0.3.orig.tar.gz
$ cat ../samba_2.0.3-1.dsc
Source: samba
Version: 2.0.3-1
Binary: samba, samba-common, smbclient, swat, samba-doc, smbfsx, smbwrapper
Maintainer: Eloy A. Paris <peloy@debian.org>
Architecture: any
Standards-Version: 2.4.0.0
Files:
1c316bb482a95e6c3faaf04cde6d1503 2081264 samba_2.0.3.orig.tar.gz
dd02cd9a8cc8ddde6f3bbc2b4f40e835 21707 samba_2.0.3-1.diff.gz
As you can see, this is a *PRISTINE* source :-) and has the same md5sum
as the upstream tarball even with the deletion of your binary file.
(and Yes, I have just tryed all these commands ... it works)
with love,
fab
--
| fpolacco@icenet.fi fpolacco@debian.org fpolacco@prosa.it
| 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E
| fabrizio.polacco@nokia.com gsm: +358 40 707 2468
Reply to: