Ubuntu Maintenance Notes
========================


Development Series
------------------

For the current development series, we don't cherry-pick upstream commits but
rather rebase onto latest upstream. Whenever a rebase is performed, a new
orig tarball needs to be generated and uploaded to the archive as part of the
source package upload.

The following are the steps to rebase onto latest upstream and create a new
source package.

1) $ debian/scripts/rebase-upstream

Rebases onto latest upstream/main, updates the content of debian/upstream and
creates a rebase commit.

2) $ debian/scripts/create-orig-tarball

Creates a new orig tarball, using the upstream commit and version from
debian/upstream.

3) $ debian/scripts/close-release

Creates a new changelog entry with all changes since the last release. Commits
the changelog and tags the commit. The new package version is generated
automatically from the upstream version.

4) $ debian/scripts/build-package -S -us -uc

Creates a new (unsigned) source package.


Stable Series
-------------

Stable series are not rebased to latest upstream but instead only receive
cherry-picked and backported commits. The development series becomes a stable
series at the time of its official release. At this time, a new development
branch should be created and an initial SRU release commit should be added to
the branch of the just released series:

1) $ debian/scripts/open-sru

This creates a dummy initial release commit with a package version ending in
.0 which prevents future rebases and serves as a starting point for future
SRU release.


Release Process
---------------

Note that linux-firmware follows the regular Ubuntu SRU process [1] and *not*
the Ubuntu kernel team's special SRU process.

To release a new package, go through the following steps:

1) Create a new changelog entry with all the changes since the last release.
   Commit the updated changelog and tag it. Run the following script which
   does all of that:
   $ debian/scripts/close-release

2) Clean your tree and build a signed source package:
   $ git reset --hard
   $ git clean -dxf
   $ debian/scripts/build-package -S

3) Review the source package and make sure it looks sane. Use debdiff to
   compare it to the previous released package.

4) Upload the source package to the Ubuntu unapproved queue [2]. You obvisouly
   need upload rights for linux-firmware to be able to do that:
   $ dput ubuntu linux-firmware-<version>_source.changes

5) Check your email to verify the package upload was accepted.

6) Push the updated branch and new tag to the git server.

7) If urgent, ping the Ubuntu SRU team to review your upload.


References
----------

[1] https://documentation.ubuntu.com/sru/en/latest/
[2] https://launchpad.net/ubuntu/<series>/+queue
