freight-team / freight

A modern take on the Debian archive.
Other
107 stars 37 forks source link

Debianized sources. #82

Closed mmoll closed 4 years ago

mmoll commented 6 years ago

@dozzie @pulina I took the liberty of just cherry-picking this, I hope this is OK... @mattock Could you have a look at this?

dozzie commented 6 years ago

Sure, no problem on my side.

mmoll commented 6 years ago

@dozzie dzięki! :tada:

mattock commented 6 years ago

Is the purpose of this PR to add support for creating Debian source packages for Freight?

I applied this PR and tested build on Debian 9. There was one warning:

$ dpkg-buildpackage -uc -us -b
--- snip ---
dpkg-gencontrol: warning: Depends field of package freight: unknown substitution variable ${shlibs:Depends}
--- snip ---

That seems harmless as the "binary" package gets generated regardless. But if we can fix this we should. The other similar macro, ${misc:Depends}, seem to get added to freight.substvars:

$ cat debian/freight.substvars
misc:Depends=
misc:Pre-Depends=

Any ideas what is going on here?

Also, building a source package does not seem to work:

$ dpkg-buildpackage -uc -us -S
--- snip ---
 dpkg-source -b freight
dpkg-source: error: can't build with source format '3.0 (native)': native package version may not have a revision
dpkg-buildpackage: error: dpkg-source -b freight gave error exit status 255

If I change the source format to "3.0 (quilt)" (see here) it seems to work better:

$ dpkg-buildpackage -uc -us -S
--- snip ---
 dpkg-source -b freight
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../freight_0.3.11.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b freight gave error exit status 255

Here it is at least looking for an "upstream" tarball.

dozzie commented 6 years ago

Warning about empty ${misc:Depends} is indeed harmless. From what I remember, it was common among Debian's own packages. ${misc:Depends} may be filled by different parts of debhelper, whenever they deem the resulting package dependent on something. Between seeing the warning and possibly missing a dependency somewhere in the future, I'd take the former one.

About the source package, version format for the native packages (single tarball with the source and debianization) changed in Debian 8 or 9. Previously it could be any valid format, but now the debian revision part (see deb-version(5)) is not allowed.

If you change debian/source/format to quilt, you need to provide a tarball from the upstream, but I don't think Freight publishes those as such. The way to go would probably be to remove debian revision part from version in debian/changelog and leave the package as native.

mmoll commented 6 years ago

@mattock which dpkg version are you using? It seems to work fine with 1.19.0.5+b1 (coming with current Debian/testing)...

mattock commented 6 years ago

Mine is from Debian 9 (stable):

$ dpkg --version
Debian 'dpkg' package management program version 1.18.24 (amd64).
mmoll commented 6 years ago

@mattock allright, I'll have a look at this in some weeks... Let's not block the next release on this.