Skip to content

Building packages

This page is for people who want to become Hyperscale SIG members. If you want to do occasional contributions, see public Packaging guide.

Becoming SIG member

See Governance doc for how to request your membership. Then see Onboarding doc for the required one-time setup.

Working with git

SIG members can create repositories under GitLab org. The branches should be named cXs-hs, where cXs refers to the CentOS Stream version (e.g. c10s for CentOS Stream 10). Currently we're also using:

  • cXs-sig-hyperscale: stuff meant to go in the main repository
  • cXs-sig-hyperscale-experimental: stuff meant to go in the experimental repository
  • cXs-sig-hyperscale-spin: stuff meant to go in the spin repository
Cloning, editing and building a package

See Packaging guide.

Prefer using URLs to point to sources, but if you need to upload new source tarballs to lookaside, use:

$ centos-lookaside-upload-sig -f systemd-249.4.tar.gz -n systemd

to push them to lookaside, then update gitignore and metadata (example).

Note that centos-lookaside-upload-sig requires a valid CentOS certificate. See the CentOS SIG Guide for more information.

Build tags

All our build tags set the %centos_hs macro 1, so that we can gate Hyperscale-specific behavior in package specs if needed.

Note

As explained in CentOS-Infra #75, when adding new tags, make sure to request that epel and epel-next repos are added to the tags.

CentOS Stream 10

We have two main build tags:

  • hyperscale10s-packages-main-el10s -- our default build tag, if you're not sure, this is probably what you want to use; packages built here will have %dist set to .hs.el10
  • hyperscale10s-packages-experimental-el10s -- use this when building for experimental; this tag does not inherit from main, and packages build here will have %dist set to .hsx.el10

There are three additional special purpose tags:

  • hyperscale10s-packages-facebook-el10s -- same as main, but also with %facebook set to 1 and %dist set to .hs+fb.el10; meant for Facebook-flavored builds, currently only used for systemd and btrfs-progs
  • hyperscale10-packages-facebook -- built against RHEL instead of CentOS Stream, %facebook set to 1 and %dist set to .hs+fb.el10_z; meant for Facebook-flavored builds for RHEL
  • hyperscale10s-packages-hotfixes-el10s -- do not use, use main instead
  • hyperscale10s-packages-spin-el9s -- use this when building for packages for spin that should not be in the main buildroot; prefer using main whenever possible
CentOS Stream 9

We have two main build tags:

  • hyperscale9s-packages-main-el9s -- our default build tag, if you're not sure, this is probably what you want to use; packages built here will have %dist set to .hs.el9
  • hyperscale9s-packages-experimental-el9s -- use this when building for experimental; this tag does not inherit from main, and packages build here will have %dist set to .hsx.el9

There are three additional special purpose tags:

  • hyperscale9s-packages-facebook-el9s -- same as main, but also with %facebook set to 1 and %dist set to .hs+fb.el9; meant for Facebook-flavored builds, currently only used for systemd and btrfs-progs
  • hyperscale9-packages-facebook -- built against RHEL instead of CentOS Stream, %facebook set to 1 and %dist set to .hs+fb.el9_z; meant for Facebook-flavored builds for RHEL
  • hyperscale9s-packages-hotfixes-el9s -- do not use, use main instead
  • hyperscale9s-packages-spin-el9s -- use this when building for packages for spin that should not be in the main buildroot; prefer using main whenever possible
CentOS Stream 8

We have two main build tags:

  • hyperscale8s-packages-main-el8 -- our default build tag, if you're not sure, this is probably what you want to use; packages built here will have %dist set to .hs.el8
  • hyperscale8s-packages-experimental-el8 -- use this when building for experimental; this tag does not inherit from main, and packages build here will have %dist set to .hsx.el8

There are three additional special purpose tags:

  • hyperscale8s-packages-facebook-el8 -- same as main, but also with %facebook set to 1 and %dist set to .hs+fb.el8; meant for Facebook-flavored builds, currently only used for systemd and btrfs-progs
  • hyperscale8s-packages-hotfixes-el8 -- do not use, use main instead
  • hyperscale8s-packages-spin-el8s -- use this when building for packages for spin that should not be in the main buildroot; prefer using main whenever possible

Destination tags

For each build tag, we have three destination tags:

  • ${tag}-candidate - regular builds end up here by default and will be included in the buildroot for subsequent builds
  • ${tag}-testing - builds tagged here end up on buildlogs.centos.org
  • ${tag}-release - builds tagged here end up on mirrors.centos.org

where ${tag} would be something like hyperscale8s-packages-main, leading to a destination tags like hyperscale8s-packages-main-release, which will end up in /centos/8-stream/hyperscale/${arch}/packages-main.

Destination tags are orthogonal to build tags: you can tag any build into any destination tag (though, obviously, some combinations won't make much sense). Common workflows:

  • when building for main, tag into main; likewise, when building for experimental tag into experimental
  • when building non-modular packages that replace modular packages (e.g. libvirt), tag them into hotfixes instead of main (but still do the builds in main)
  • when building spin-specific packages that should only be used on spin installs, tag them into spin destination tags.

Note that you won't be able to tag into a destination tag unless it's been registered to the tag first with cbs add-pkg; likewise, packages can be unregistered from tags with cbs remove-pkg.

Working with cbs

To run a scratch build from git:

$ cbs build --scratch hyperscale9s-packages-main-el9s "git+https://gitlab.com/CentOS/Hyperscale/rpms/systemd.git#$(git rev-parse HEAD)"
$ cbs download-task $TASK_ID

To run a real build, the package needs to be registered to a destination tags first:

$ cbs add-pkg --owner=dcavalca hyperscale9s-packages-main-candidate systemd
$ cbs add-pkg --owner=dcavalca hyperscale9s-packages-main-testing systemd
$ cbs add-pkg --owner=dcavalca hyperscale9s-packages-main-release systemd

This only needs to be done once per package.

To kickoff a build:

$ cbs build hyperscale9s-packages-main-el9s "git+https://gitlab.com/CentOS/Hyperscale/rpms/systemd.git#$(git rev-parse HEAD)"

To publish to buildlogs.centos.org:

$ cbs tag-build hyperscale9s-packages-main-testing systemd-249.4-2.9.hs.el9