noarching source packages

Jon Turney
Mon Apr 24 13:04:00 GMT 2017

Picking up the discussion from [1], I've been looking a bit at noarching 
the source packages.

So, the first problem is that we don't really have source packages.

Instead there is a special package (conventionally, the main one) which 
has a source archive as well as a binary archive, and all the 
subpackages point to that package with an external-source: hint, which 
becomes a source: line pointing to that source archive in setup.ini.
(i.e. in that case, the setup.ini contains multiple, identical source: 
lines for each subpackage)

* setup

Surprisingly, there is support in setup for source packages (See Source: 
vs. source: in [2]), and this seems to work.

Note that the name of the source package must be distinct from the 
binary package, so this probably implies some naming convention for 
source packages (e.g. the source package for foo is foo-src)

(These foo-src packages currently will be shown in the list of packages. 
  This differs from current packages which are source-only, as these 
aren't listed in setup.ini at all, and thus never shown in the list of 
packages [this is was what skip: used to indicate, but these cases are 
automatically detected, these days])

So, perhaps a minor improvement to setup to remove all packages which 
are source-only from the displayed package list is needed, or to add a 
separate filter view which only shows source packages?

(Note that source archives are already treated specially in other ways, 
e.g. the files are just dumped in /usr/src/ and the package is not 
recorded as being installed)

* calm

calm would need updating to look for packages in src/ as well as noarch/ 
and <arch>/, and to emit 'Source:' rather than 'source:' lines in 
setup.ini when the source is an actual source package.

* cygport

It's not quite clear how to deal with making source packages.  If we do 
it when we make the binary package (as now), then there is the near 
certainly that the source package made for a different arch will differ, 

(This will always be the case if gpg signing is turned on, as the .sig 
inside the source archive is timestamped.  It will also be the case if 
timestamps or filesystem file order are leaked into the archive)

This will lead to a rejected upload (as uploading the same package with 
different contents is not allowed by calm)

It's possible to make a separate step to make just the source package, 
but perhaps this makes more work, as the maintainer will need to 
explicitly do that (once), otherwise the upload will be rejected due to 
not having a source.

This also potentially loses information, as the maintainer might adjust 
the .cygport to build on the 2nd architecture they try, but those 
changes wouldn't be uploaded, (whereas currently the source actually 
used for the build is uploaded)

The source package will now always require a separate .hint, so we need 
a means to manually provide a .hint file for that.

Uploading needs to place the source package in the appropriate place.

* benefit

Applied retroactively, it looks like this would save about 13G (out of a 
total mirror size of approximately 97G), but it seems that there are 
many source packages which (usually spuriously) differ between arches, 
so that saving wouldn't be immediately realized.

> sware[...ftp/pub/cygwin]$ find x86 -name \*-src\* -print0 | du --files0-from=- -hc | tail -n1
> 13G     total
> sware[...ftp/pub/cygwin]$ find x86_64 -name \*-src\* -print0 | du --files0-from=- -hc | tail -n1
> 13G     total


More information about the Cygwin-apps mailing list