Skip to content

Systemd

About systemd in Hyperscale

We try to follow the systemd build from Fedora rawhide as closely as possible.

CI/CD

Links can be found on the CI/CD page.

Contributing to the Staging Repo

All of the patches we backport for the Hyperscale build of systemd are first merged to centos-sig-hyperscale/systemd, a Git repo where we stage patches. This allows people to use meson to build systemd with all of the Hyperscale patches, and run them against the systemd upstream unit tests without having to build a RPM.

We try to maintain as few patches as possible for each release, but we are open to including new features or bug fixes that are not yet available. Generally we prefer there to either be an open or merged pull request (PR) in systemd upstream before we will consider merging into the staging repo.

Steps:

  • Get a Fedora account if you don't have one already.
    • Make sure to follow this part and set up your ~/.fedora.upn to tell our tooling your FAS username if it differs from your Unix name.
  • Login on pagure.io and src.fedoraproject.org to initialize your account.
  • Fork centos-sig-hyperscale/systemd.
  • Check out the latest branch there. It should be the last one alphabetically in the form of "fb-v<systemd-stable version number>". If you want to backport a patch to a stable systemd version that does not yet have a branch available in the staging repo, open an issue here to ask the maintainers to create a new branch for that version.
  • If you think your PR from upstream will apply cleanly, you can download it and git am <patch file> it directly. Otherwise you can use git cherry-pick and manual edits to ensure your change will build.
    • At minimum, do a meson test to ensure unit tests pass.
  • Open a PR against centos-sig-hyperscale/systemd with your change.
    • In the PR, include a link to your PR from systemd upstream.
    • Tag anitazha for reviews.
  • Once merged, one of the systemd Hyperscale maintainers will update the RPM spec and publish a new version of systemd for Hyperscale with the patches.

Contributing to the RPM spec

Not yet available

systemd Hyperscale RPM sources

Build Commands

For CBS you will need to be onboarded to the SIG.

From inside the fork of the systemd Hyperscale RPM sources repo:

# Local build with mock; You can skip these steps and use cbs directly
mock -r centos-stream-8-x86_64 -D "%facebook 1" -D '%dist .hs+fb.el8' --sources SOURCES --spec SPECS/*.spec
mock -r centos-stream-8-x86_64 -D '%dist .hs.el8' --sources SOURCES --spec SPECS/*.spec

# Create src.rpm for CBS
rpmbuild --define "%_topdir $PWD" --define "%facebook 1" --define "%dist .hs+fb.el8" -bs SPECS/systemd.spec
rpmbuild --define "%_topdir $PWD" --define "%dist .hs.el8" -bs SPECS/systemd.spec

# CBS scratch builds
cbs build --scratch hyperscale8s-packages-main-el8 <path to src.rpm>
cbs build --scratch hyperscale8s-packages-facebook-el8 <path to src.rpm>

Once the specfile changes are pushed you can do a real build:

# CBS builds for CentOS Stream 8
git checkout c8s-sig-hyperscale
cbs build hyperscale8s-packages-main-el8 "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)"
cbs build hyperscale8s-packages-facebook-el8 "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)"

# CBS builds for CentOS Stream 9
git checkout c9s-sig-hyperscale
cbs build hyperscale9s-packages-main-el9s "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)"
cbs build hyperscale9s-packages-facebook-el9s "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)"

# Tag it for testing
cbs tag-build hyperscale8s-packages-main-testing systemd-<version num>.hs.el8
cbs tag-build hyperscale8s-packages-facebook-testing systemd-<version num>.hs+fb.el8
cbs tag-build hyperscale9s-packages-main-testing systemd-<version num>.hs.el9
cbs tag-build hyperscale9s-packages-facebook-testing systemd-<version num>.hs+fb.el9

# Tag for release; This will let it go to the mirrors
cbs tag-build hyperscale8s-packages-main-release systemd-<version num>.hs.el8
cbs tag-build hyperscale8s-packages-facebook-release systemd-<version num>.hs+fb.el8
cbs tag-build hyperscale9s-packages-main-release systemd-<version num>.hs.el9
cbs tag-build hyperscale9s-packages-facebook-release systemd-<version num>.hs+fb.el9
Back to top