Your message dated Wed, 23 Dec 2009 12:29:01 +0100
with message-id <4b31fefd.7000...@greffrath.com>
and subject line Re: Bug#562155: dpkg-dev: Format 3.0 (quilt): Strange 
behaviour when debian/patches/series points to a file in one of the orig-$foo 
tarballs
has caused the Debian Bug report #562155,
regarding dpkg-dev: Format 3.0 (quilt): Strange behaviour when 
debian/patches/series points to a file in one of the orig-$foo tarballs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
562155: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562155
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dpkg-dev
Version: 1.15.5.5
Severity: normal

Hi,

consider I am trying to package some software "test" using the new "3.0 
(quilt)" package format. Beside the original 'test_1.orig.tar.gz' tarball I 
want to add another tarball 'test_1.orig-foo.tar.gz' that among others holds a 
patch against the original source. Since I want to apply this patch I add it to 
debian/patches/series as "../../foo/01-foo.patch", because I know the content 
of 'test_1.orig-foo.tar.gz' will be extracted into 'test-1/foo' which is two 
directory levels up relative to 'debian/patches'. I do this and everything 
compiles fine.

No comes the strange part:
When I extract the resulting source package 'test_1-1.dsc' via "dpkg-source -x 
test_1-1.dsc" it creates two(!) directories, namely 'test-1' and 'foo'. The 
'foo' directory contains another directory with the name of the patch 
'01-foo.patch' and this directory finally includes the files that the patch 
modifies. I don't think this is a severy issue, but I believe this is not 
intended, though.

I hope I could get my idea across. If you want to try out yourself, I have made 
a test package available at <http://debian.greffrath.com/unstable/test_1-1.dsc>.

Thanks for your work,
Fabian

PS: This isn't just a theoretical issue, it has a real use case. For the 
long-abandoned 'XV' picture viewer there is a package available called "XV 
Jumbo Patches"  that contains both a set of additional files and a patch in a 
tarball. The files are supposed to be copied into the source directory before 
building so I do this in debian/rules (and remove them out in the clean rule); 
then the patch must be applied. Since I don't want to carry an additional copy 
of the (rather huge) patch in 'debian/patches' I directly point to it from 
'debian/patches/series' and thus found this issue.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (550, 'unstable'), (400, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-1-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg-dev depends on:
ii  base-files        5.0.0                  Debian base system miscellaneous f
ii  binutils          2.20-4                 The GNU assembler, linker and bina
ii  bzip2             1.0.5-3                high-quality block-sorting file co
ii  dpkg              1.15.5.5               Debian package management system
ii  libtimedate-perl  1.1900-1               Time and date functions for Perl
ii  lzma              4.43-14                Compression method of 7z format in
ii  make              3.81-7                 An utility for Directing compilati
ii  patch             2.6-2                  Apply a diff file to an original
ii  perl [perl5]      5.10.1-8               Larry Wall's Practical Extraction 
ii  perl-modules      5.10.1-8               Core Perl modules
ii  xz-utils          4.999.9beta+20091116-1 XZ-format compression utilities

Versions of packages dpkg-dev recommends:
ii  build-essential               11.4       Informational list of build-essent
ii  fakeroot                      1.14.4-1   Gives a fake root environment
ii  gcc [c-compiler]              4:4.4.2-2  The GNU C compiler
ii  gcc-4.3 [c-compiler]          4.3.4-6    The GNU C compiler
ii  gcc-4.4 [c-compiler]          4.4.2-6    The GNU C compiler
ii  gnupg                         1.4.10-2   GNU privacy guard - a free PGP rep
ii  gpgv                          1.4.10-2   GNU privacy guard - signature veri

Versions of packages dpkg-dev suggests:
ii  debian-keyring [debian-mainta 2009.11.04 GnuPG (and obsolete PGP) keys of D

-- no debconf information



--- End Message ---
--- Begin Message ---
Am 23.12.2009 12:13, schrieb Raphael Hertzog:
Well, if you use quilt to apply the patch, it will do the same, it will
create the directory and the files. Actually it's patch that is creating
those files due to the "-B .pc/../../foo/01-boys-girls.patch/" argument
that it gets. This resolves to ../foo/01-boys-girls.patch/ from the root
directory of the source package.

Ah, that's the culprit.

It looks like quilt has not been designed to allow patches outside of
its patches directory. Any fix for this bug needs to be coordinated with
quilt upstream.

I would suggest to strip the leading "../" first or to convert them to
some other names ("../../foo" could become "_UP_/_UP_/foo" or similar).

I really don't think this needs to be escalated to the quilt maintainers if it's only a matter of design decision (but please feel free to reassign there if you think). I just didn't know that quilt doesn't like patches outside its patch directory and found out by coincidence. Whereas, it even works, it just looks odd. ;)

I suggest you use a symlink instead of a copy. The debian tarball can
contain a symlink and it should nicely resolve your problem.

Yes, that's indeed the most elegant solution. Thank you!

Happy holidays,
Fabian


--- End Message ---

Reply via email to