Table of Contents:
Each Apertis release is based on the current Debian stable release. This means that approximately bi-yearly Apertis makes the jump to be based on a new version of Debian. This process is known as “rebasing”.
Please see Release flow and product lines for more information about this policy.
The following terms will be used here:
OLD_DEV_RELEASE
: The existing Apertis release on which the new release will be based.NEW_DEV_RELEASE
: The new Apertis development release that we are creating during the rebasing process.OLD_DEBIAN_RELEASE
: The Debian release on whichOLD_DEV_RELEASE
is based.NEW_DEBIAN_RELEASE
: The Debian release on whichNEW_DEV_RELEASE
will be based.
Early Tests
These tests should be carried out in Q4 ready for the rebase in the follwoing Q1.
A. Test Rebase Workflow
- Follow the rebase plan, but with a limited set of packages from target using
NEW_DEV_RELEASE
set torebase-test
. - Check that pipelines run as expected
- Check that the scripts used to check status work as expected
It is not required to merge all the changes, focus on ensuring that the workflow is working as expected.
B. Test Debian Sources
If sufficient time is available early in Q1, it is advantageous to ensure that we have a relatively accurate seed list and have already imported new dependencies where possible. It is unlikely that the seed list will be perfect even after this, however any remaining missing dependencies, etc. will be flagged by OBS. The aim here is to reduce the time required when rebasing.
- Use germinate to
generate seeds for
NEW_DEBIAN_RELEASE
. - Compare “existing-packages” lists generated for
NEW_DEBIAN_RELEASE
with the list of packages in the current Apertis release. Review differences and update the new seed list as required. - Review packages listed in “new-packages” lists for addition to Apertis
Preparing for Rebase
C. Prepare Development Workflow
During the rebase NEW_DEV_RELEASE
will be unstable as many packages will be
updated and images will not be generated. To allow development work during this
time, OLD_DEV_RELEASE
will be used as development branch. For that reason,
after OLD_DEV_RELEASE
freeze ends, it will be used for development.
For repositories that diverge during the rebase cycle, after the rebase is
completed, changes will need forward porting to NEW_DEV_RELEASE
.
D. Prepare Infrastructure
- Create
NEW_DEV_RELEASE
branch forapertis-docker-images
- Tweak the
package-source-builder
dockerfile in theNEW_DEV_RELEASE
release to enable DebianNEW_DEBIAN_RELEASE
- Enable apertis
OLD_DEV_RELEASE
repositories in dockerfile, to allow the installation of Apertis specific packages, such asapertis-dev-tools
- Temporarily disable other docker images as they won’t be needed
- Create new OBS projects for
NEW_DEV_RELEASE
- Disable publish of
NEW_DEV_RELEASE
on OBS projects - Add
NEW_DEBIAN_RELEASE
DoD onNEW_DEV_RELEASE
OBS repositories - Create Apertis
NEW_DEV_RELEASE
branches for the repositories in the following groups based on theOLD_DEV_RELEASE
branches in Gitlab. (This should create new branches but not trigger any pipelines): - Continue to use
OLD_DEV_RELEASE
for development work.
Perform Rebase
E. Upgrade packages from NEW_DEBIAN_RELEASE
Extract per repository component package list generated from germinate. Work
through the package lists for target
, non-free
, development
and sdk
repositories in this order:
These commands act on a single package rather than on lists of them and thus will need to be run for each package.
It is better to process the list of packages in batches, starting with a small number of packages from target, to make sure that no unexpected issues happen, before continuing with subsequent batches, working through target and then onto the other repositories in order.
-
Create
debian/NEW_DEBIAN_RELEASE
branches in Gitlab for these packages in their git repositories. This can be done using thecreate-branches
script:$ ./create-branches --filter pkg/${pkg} --branch-prefix debian --new-release ${NEW_DEBIAN_RELEASE} --base-release ${OLD_DEBIAN_RELEASE}
-
Create
upstream/NEW_DEBIAN_RELEASE
branches in Gitlab for these packages in their git repositories. This can also be done using thecreate-branches
script:$ ./create-branches --filter pkg/${pkg} --branch-prefix upstream --new-release ${NEW_DEBIAN_RELEASE} --base-release ${OLD_DEBIAN_RELEASE}
-
Trigger the pipeline on the
debian/NEW_DEBIAN_RELEASE
branches using thetrigger-pipeline
script:$ ./trigger-pipeline ${pkg} debian/${NEW_DEBIAN_RELEASE}
This will trigger a chain of pipelines that will sync with the branch with the required Debian release and attempt to merge with the
NEW_DEV_RELEASE
branch. This results in open MRs with failed pipelines where this merge can’t happen automatically.Since Debian DoD will be available no additional configuration should be required to resolve dependencies
F. Check status of each package
As there will be a large number of merge requests open, it is important to carefully prioritise the order in which packages are targeted. The packages should be checked in the following order:
- Packages required for bootstrapping (get a list based on
NEW_DEBIAN_RELEASE
) - Packages in the
target
andnon-free
repositories - Other packages, such as those in
development
andsdk
.
The analise-rebases.py script can be used to aid with this process.
There will be different scenarios depending on the package:
- Most of the packages will have an update available in
NEW_DEBIAN_RELEASE
and an MR should be available for it in one of the following states:- MR pipeline failure due to unable to merge: Manually merge the branch.
- MR pipeline failure due to license scan failure: Manually fix license scan
- MR pipeline failure due to OBS build error: Manually check and/or retry
- MR pipeline success with not relevant changes from
NEW_DEBIAN_RELEASE
(only changelog or debian/apertis): Should be automerged - MR pipeline success with relevant changes (delta) to
NEW_DEBIAN_RELEASE
(changes other than in changelog or debian/apertis): Review and determine if delta is still valid
- Some packages will not have an update available in
NEW_DEBIAN_RELEASE
, run the pipeline forNEW_DEV_RELEASE
in these repositories - Some new packages will need to be imported
All successful pipelines will result in a package being uploaded to OBS
proposed-updates/debian/NEW_DEBIAN_RELEASE
branches. Merging all the changes
is a time consuming task, apply common sense to avoid waiting time in things
that can be addressed later.
Keep track of delta introduced as this will need to be documented, rectified or forwarded upstream.
Image generation and testing
G. Target image generation
- Run local bootstrap tests by downloading packages required for bootsrapping directly from OBS and fix any issue found.
- Once packages in
target
andnon-free
have been built it is possible to enable publishing of these repositories. It is important to do this to decouple the rebase work from the image generation/testing. - During this stage we focus in target images (fixed function and hmi)
- Run local tests to building target images using
NEW_DEV_RELEASE
and fix any issue found. - Run image pipeline only for fixed function and HMI (disable the rest):
- Fix any issue found by either proposing proper fixes or workarounds (disabling functionality)
- The goal of this stage is to have a minimal image that can be tested on the different reference boards
- In case of temporary workarounds create tasks to address them later
- Test image on LAVA by using
UPLOAD_ARTIFACTS
andSUBMIT_LAVA_JOBS
H. Check status of OBS projects
- Check that all the packages in germinate are in OBS using analyse-missing.py
- Check if all build statuses are green on OBS
- Check that OBS is NOT using Debian DoD to build packages using the
check-for-dod
script. - Drop Bookworm DoD repositories from OBS
- Fix any leftover cracks:
- New package imports
- Build dependency trimming
- Feature/plugin [dis|en]ablement
- Enable publishing on
NEW_DEV_RELEASE
OBSdevelopment
andsdk
repositories - Validate the public apt repositories for
NEW_DEV_RELEASE
I. Image generation
- Run image pipeline for all the images (reenable previously disabled images)
- Fix any issue found by either proposing proper fixes of workarounds (disabling functionality)
- The goal of this stage is to have a minimal image that can be tested on the different reference boards
- In case of temporary workarounds, create tasks to address them later
- Test image on LAVA by using
UPLOAD_ARTIFACTS
andSUBMIT_LAVA_JOBS
J. Cleanup infrastructure
- Tweak docker images for package-source-builder in
NEW_DEV_RELEASE
to only useNEW_DEV_RELEASE
- Re-enable the other docker images
- Build new docker images
- Rebuild whole archive
- Generate a list of packages with a
NEW_DEV_RELEASE
branch in GitLab but which are not present in OBS. Dashboard will report the following error for such packages and the list can be generated from this.Missing on OBS apertis:NEW_DEV_RELEASE, found on Git apertis/NEW_DEV_RELEASE
- Drop these packages from the new release:
- Remove the
apertis/NEW_DEV_RELEASE
branch from the package in Gitlab - Set the default branch as
apertis/OLD_DEV_RELEASE
using set-delete-branches. - Update
gitlab-rulez
to contain a list for
OLD_DEV_RELEASE
containing the packages for which it is the last release. This causes gitlab-rulez to leave the default branch at this release for these packages.
- Remove the
K. Forward port any changes to OLD_DEV_RELEASE
- Check which repositories have diverged between
OLD_DEV_RELEASE
andNEW_DEV_RELEASE
. This means for repositories whereOLD_DEV_RELEASE
is not a descendant ofNEW_DEV_RELEASE
and thus further changes have been merged toOLD_DEV_RELEASE
. - Evaluate and prepare forward ports for changes where required.
- Fix any temporary workarounds that were added during rebasing.