[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automated backports based on Janitor work?



Hi Lucas,

On Thu, Aug 26, 2021 at 11:39:06AM +0200, Lucas Nussbaum wrote:
> Watching the talk[0] on automatically providing packages for new
> upstream releases and new upstream git snapshots, I wondered if the same
> tooling could be used to automatically provide stable backports
> for packages in unstable/testing.
> 
> There's probably a large number of packages that just require a
> rebuild (+ test with autopkgtest) to be backported.
> 
> Additionally, one could imagine a DSL to:
> - make minor changes to the source package before building (adjust
>   dependencies, apply an additional patch, etc.)
> - tell sbuild that some build-dependencies must be pulled from backported
>   packages
> 
> Jelmer, did you already think about that? Is there a way one could help
> you?

I've been thinking about this a little bit, and there are the
beginnings of a deb-auto-backport script in the janitor.

If all build-dependencies had appropriate versioning (i.e.
properly declared when they only worked with the dependencies in
unstable and didn't have overly tight dependencies on unstable), then
backporting would be a lot easier. Then, to build backports, one could
(as you suggest above):

 1. take the git repository for the package in unstable
 2. update Vcs-Git/Vcs-Browse headers
 3. add relevant changelog entry

 4. attempt to build against stable, if there are build-dependencies
    that are unsatisfied in unstable, pull them in from backports

I think one of the main challenges here is to make sure that the
dependencies for packages in unstable/testing are correct. This could
be addressed by something like:

 * go through all the packages in unstable
 * go through each build dependency line
   + where a build dependency can be satisfied by stable, build with
     specifically that dependency from stable
    - if build still succeeds, don't do anything
    - if build fails, tighten the build-dependency
   + where a build dependency can't be satisfied by stable, attempt
     to e.g. drop the version requirements and see whether it still
     builds without that

That's fairly CPU-intensive though.

A DSL would require humans to make changes on a package-by-package
basis. It may be that that's unavoidable (especially when it comes to
patches), but I'd be keen to see how far we can get without resorting
to manual adjustments.

Perhaps these two problems could be addressed separately - you
could still backport packages with inappropriate build-depends,
but may run into build issues or an unnecessary number of packages
being pulled in from backpors - but that's okay.

Cheers,

Jelmer

Attachment: signature.asc
Description: PGP signature


Reply to: