Bug#768046: reprepro: 'includedsc' fails for native packages with 'debian/' being a symlink

2014-12-14 Thread Bernhard R. Link
* Stephan Sürken abs...@debian.org [141104 14:39]:
 with a Debian native package having a setup like (for example) so

 debian - debian-wheezy
 debian-squeeze/
 debian-wheezy/

 , i.e., 'debian/' being a symlink, reprepro fails to find
 'debian/control', and finally fails with

 ---
 No section and no priority for 'PACKAGE', skipping.
 There have been errors!
 ---

 This is due to 'sourceextraction.c: parse_tarfile()', which
 iterates through all archive entries, and will never find
 debian/control as archive member string. I.e., iterating of
 libarchive entries, you only get

 debian
 debian-wheezy/control

 in this case. Maybe some extra code when debian/ is a symlink
 may help here, in that loop.

 Of course this (i.e., using a symlink here) is not a standard or
 desireable setup; however, other Debian tools just work find
 with such a setup, and I don't know of any documented
 restrictions -- so I think this should be fixed in reprepro.

To quote the manpage:

Note that .dsc files do not contain section or priority, but the
Sources.gz file needs them. reprepro tries to parse .diff and .tar
files for it, but is only able to resolve easy cases. If reprepro
fails to extract those automatically, you have to either specify a
DscOverride or give them via -S and -P

i.e. extracting the section and priority from the source package is a
let's try efford, and there are other cases where I decided reprepro
will just give up (like some cases where debian/control is both in
.orig.tar.gz and .diff.gz).

I'll have a look. I guess the case where the symlink is before the
directory might be easy to add, while the reverse case will likely
fall in the not easily done with sequential parsing, thus not
supported category. Sorry.

There are three workarounds:

- As the manpage says, name section or priority with -S and/or -P or
  via a override file.

- Use include with the .changes file. A .changes file usually contains
  section and priority for the source, so reprepro

- for private repositories or packages, there is a non-standard (and
  I guess also undocumented) extension reprepro has: If a .dsc contains
  Section: or Priority: it will use those values instead of looking
  further. (Not sure what the best way is to get them there, in specific
  workflows adding a XS-Section: in addition to the Section: in the
  debian/control might get this. Only suiteable for private packages
  of course).

Bernhard R. Link
-- 
F8AC 04D5 0B9B 064B 3383  C3DA AFFC 96D1 151D FFDC


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#768046: reprepro: 'includedsc' fails for native packages with 'debian/' being a symlink

2014-11-04 Thread Stephan Sürken
Package: reprepro
Version: 4.16.0-1
Severity: normal

Hi Bernhard,

with a Debian native package having a setup like (for example) so

debian - debian-wheezy
debian-squeeze/
debian-wheezy/

, i.e., 'debian/' being a symlink, reprepro fails to find
'debian/control', and finally fails with

---
No section and no priority for 'PACKAGE', skipping.
There have been errors!
---

This is due to 'sourceextraction.c: parse_tarfile()', which
iterates through all archive entries, and will never find
debian/control as archive member string. I.e., iterating of
libarchive entries, you only get

debian
debian-wheezy/control

in this case. Maybe some extra code when debian/ is a symlink
may help here, in that loop.

Of course this (i.e., using a symlink here) is not a standard or
desireable setup; however, other Debian tools just work find
with such a setup, and I don't know of any documented
restrictions -- so I think this should be fixed in reprepro.

Thanks!

Stephan

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages reprepro depends on:
ii  libarchive13 3.1.2-9
ii  libbz2-1.0   1.0.6-7
ii  libc62.19-12
ii  libdb5.3 5.3.28-6
ii  libgpg-error01.17-2
ii  libgpgme11   1.5.1-6
ii  liblzma5 5.1.1alpha+20120614-2
ii  pinentry-curses  0.8.3-2
ii  zlib1g   1:1.2.8.dfsg-2

Versions of packages reprepro recommends:
ii  apt  1.0.9.3

Versions of packages reprepro suggests:
ii  gnupg-agent  2.0.26-3
pn  inoticoming  none
pn  lzip none

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org