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

Package:
reprepro
Source:
reprepro
Description:
Debian package repository producer
Submitter:
Stephan Sürken
Date:
2026-06-25 22:19:02 UTC
Severity:
minor
Tags:
#768046#5
Date:
2014-11-04 13:35:16 UTC
From:
To:
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

#768046#10
Date:
2014-12-14 20:19:17 UTC
From:
To:
* Stephan Sürken <absurd@debian.org> [141104 14:39]:

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