Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eliroca/2d2cc5bf9f725212b2d17e95ce596312 to your computer and use it in GitHub Desktop.
Save eliroca/2d2cc5bf9f725212b2d17e95ce596312 to your computer and use it in GitHub Desktop.
Updating systemd's QA testsuite package for Tumbleweed, Leap or SLE

Updating systemd's QA testsuite package for Tumbleweed, Leap or SLE

1. Branch a systemd package, but make sure it's the right one that you need

# For Tumbleweed, add --nodevelproject, otherwise osc branches Base:System/systemd
 osc branch --nodevelproject openSUSE:Factory systemd home:eroca:branches:openSUSE:Factory systemd-v245-testsuite

2. Checkout the newly created package

 cd SUSE/OBS
 osc co home:eroca:branches:openSUSE:Factory systemd-v245-testsuite
 cd home:eroca:branches:openSUSE:Factory/systemd-v245-testsuite

3. Detach the branch, which removes the link to the original package

To quote osc detachbranch --help, "If a package is a link it is replaced with its expanded sources. The link does not exist anymore". We need exactly that.

 osc detachbranch

4. Add link to the QA testsuite package and update

Quoting osc linkpac --help, "A linked package is a clone of another package, but plus local modifications". Those "local modifications" are in this case the modifications taken from the original systemd package that was previously branched, plus any modifications made afterwards by you.

 osc linkpac devel:openSUSE:QA:Tumbleweed systemd-v245-testsuite home:eroca:branches:openSUSE:Factory systemd-v245-testsuite
 osc update

5. Add changes from systemd.spec to systemd-v245-testsuite.spec

# run diff to get a view of what's changed
 diff systemd.spec systemd-v245-testsuite.spec

# then add those changes to the spec file using your favorite editor
 vim systemd-v245-testsuite.spec

 osc addremove
M    systemd-v245-testsuite.spec

6. Add, remove or update patches, scripts etc.

# remove patches which got merged into systemd
 rm 0001-test-functions-fix-configfile-path.patch
 rm 0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch

# remove old source archive
 rm systemd-v245.6+suse.48.gb12cd8b89b.tar.xz

 osc addremove
M    0001-test-functions-adapt-for-systemd-v245-testsuite-pack.patch
D    0001-test-functions-fix-configfile-path.patch
D    0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch
D    systemd-v245.6+suse.48.gb12cd8b89b.tar.xz

7. Commit and submit!

 osc commit
 osc submitrequest devel:openSUSE:QA:Tumbleweed systemd-v245-testsuite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment