Page MenuHomePhabricator

Develop on separate branches for each target of Debian packages
Closed, ResolvedPublic

Description

Currently debian/changelog for Toolforge packages often has unstable or trusty as target.

This has two problems:

  1. The CI tests only run against that target, i. e. often Debian Jessie where the package will be deployed on Precise and Trusty and never on Jessie.
  2. It is impossible to differentiate in-source-package for example like I tried to in https://gerrit.wikimedia.org/r/#/c/268563/6/debian/control because the resulting binary packages for Precise and Trusty have the same filenames, but different contents. This makes it impossible to deploy them for example with aptly and other tools that expect files with identical names to be identical.

I had asked last year in debian-mentors and the recommended solution there was to have separate Git branches per target, develop on the most recent one and treat other targets as backports. I. e., for example tools-webservice's master (or ubuntu/trusty) would be intended for Trusty and the Precise backport at ubuntu/precise (cf. http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.html#GBP.BRANCH.NAMING, http://dep.debian.net/deps/dep14/). Work would happen on master (and submitted to Gerrit), then git checkout ubuntu/precise && git merge master && dch --bpo and submitted to Gerrit for the Precise branch.

Precise will be gone in two months, but the recommendations make sense universally as the problem occurs in any scenario (update from Trusty to Jessie, Jessie to …, etc.) and they bring us closer to what Debian does.

This requires checking that:

  1. Gerrit treats those branches the same way as master (inter alia permissions),
  2. Jenkins tests are run for all branches, and
  3. built binary packages can be deployed with aptly.

I propose to start with this on labs/toollabs as this is where I hit the problem first.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 339913 had a related patch set uploaded (by Tim Landscheidt):
Set primary target distribution to Ubuntu Trusty

https://gerrit.wikimedia.org/r/339913

Change 339913 merged by jenkins-bot:
Set primary target distribution to Ubuntu Trusty

https://gerrit.wikimedia.org/r/339913

I created the branch ubuntu/precise for labs/toollabs with ssh -p 29418 scfc@gerrit.wikimedia.org gerrit create-branch labs/toollabs ubuntu/precise master. The access configuration is the same for all refs/*, so this should apply to ubuntu/precise as well.

Change 339917 had a related patch set uploaded (by Tim Landscheidt):
Set target distribution for branch ubuntu/precise to Ubuntu Precise

https://gerrit.wikimedia.org/r/339917

Change 339917 merged by jenkins-bot:
Set target distribution for branch ubuntu/precise to Ubuntu Precise

https://gerrit.wikimedia.org/r/339917

… and Jenkins works on that branch without fail. Wonderful.

I have "documented" the two branches master and ubuntu/precise at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Admin#Deploy_new_jobutils_package and will now test if aptly accepts the new packages (otherwise this would have been … :-)).

Stashbot subscribed.

Mentioned in SAL (#wikimedia-labs) [2017-02-27T02:41:59Z] <scfc_de> Deployed jobtools and misctools 1.19/1.19~precise+1 (T155787, T156886).

scfc claimed this task.

Building the packages, adding them to aptly and deploying them went without problems.