There are 2 points in the process where packages can be promoted for wider consumption. Testing content can be distributed to the buildlogs.centos.org content delivery network for developers and CI systems to consume. Release-ready content can be promoted to a SIG-specific directory on mirror.centos.org for consumption by end-users.

As a first step, decide on the final release location of the repo on mirror.centos.org. You can use the same path for buildlogs.centos.org.

Pushing Test Content to Buildlogs

Submit the data in this format:

<tag>|<destination path>|<dir to run createrepo in>|<destination on buildlogs>

Example:
sclo7-rh-nodejs4-rh-testing/|7/sclo/x86_64/rh/rh-nodejs4/|7/sclo/x86_64/rh/|7/sclo/x86_64/rh/
sclo7-rh-mongodb32-rh-testing/|7/sclo/x86_64/rh/rh-mongodb32/|7/sclo/x86_64/rh/|7/sclo/x86_64/rh/
sclo7-rh-mongodb30upg-rh-testing/|7/sclo/x86_64/rh/rh-mongodb30upg/|7/sclo/x86_64/rh/|7/sclo/x86_64/rh/
sclo7-rh-python35-rh-testing/|7/sclo/x86_64/rh/rh-python35/|7/sclo/x86_64/rh/|7/sclo/x86_64/rh/
sclo7-rh-ruby23-rh-testing/|7/sclo/x86_64/rh/rh-ruby23/|7/sclo/x86_64/rh/|7/sclo/x86_64/rh/
sclo7-rh-ror42-rh-testing/|7/sclo/x86_64/rh/rh-ror42/|7/sclo/x86_64/rh/|7/sclo/x86_64/rh/

  • Once setup, the CBS tag will be checked every 2 hours for new content, and when available, will be pushed to buildlogs.centos.org to the destination repository setup. This requires no manual intervention, beyond you tagging the right rpms to the -testing repositories.

Note the CentOS admins require at least one build to be tagged into -testing in order to fully configure buildlogs.centos.org, because the internal "sync" script does not publish empty repositories for sanity+safety reasons. If your -testing tag does not contain any builds, please tag at least one build into -testing before opening the buildlogs.centos.org configuration ticket.

Note that this configuration is completely independent of the mirror.centos.org configuration. This particular configuration tells the buildlogs.centos.org server to host content tagged as "-testing". You must request a second mapping configuration for mirror.centos.org for the content you tag as "-release".

Releasing content to mirror.centos.org

Steps to request space on the mirror network

  1. Open a bug on https://bugs.centos.org in the 'Community Build Service' component of the 'Buildsys' project

  2. Include the following information:
    • SIG Name
    • CBS Release Tag(s) to combine into the final repo
    • Final directory location on mirror.centos.org

Use the same format as for testing (buildlogs) so something like (example):

<tag>|<destination path>|<dir to run createrepo in>|<destination on mirror.centos.org>

Example:
cloud7-openstack-rocky-release/|7/cloud/x86_64/openstack-rocky/|7/cloud/x86_64/openstack-rocky/|7/cloud/x86_64/openstack-rocky/
cloud7-openstack-rocky-release/|7/cloud/ppc64le/openstack-rocky/|7/cloud/ppc64le/openstack-rocky/|7/cloud/ppc64le/openstack-rocky/ 

Worth noting that for CentOS 7, x86_64 will be pushed to mirror.centos.org/centos/$path while other arches like ppc64le/ppc64/aarch64 will be pushed to mirror.centos.org/altarch/$path. The $contentdir yum variable can be used in your .repo files to select the branch (centos or altarch).

Also worth noting that sign+push to mirror.centos.org happens only once a day, from Monday to Thursday, at 9AM UTC (altarch push being itself processed after that)

centos-release Packages

To deliver SIG packages to users, the yum repo files must be available in a package named centos-release-<component>. This centos-release-<component> package will be published in the CentOS Extras repository.

For example the cloud sig releases OpenStack Rocky using the repo definitions in centos-release-openstack-rocky.

Building a centos-release-* package
  1. Set up your content sources in the .repo file. For example, centos-release-openstack-rocky could have this definition for the main repository:
    [centos-openstack-rocky]
    name=CentOS-7 - OpenStack rocky
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=cloud-openstack-rocky
    #baseurl=http://mirror.centos.org/$contentdir/$releasever/cloud/$basearch/openstack-rocky/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
    
    There can also be other repositories defined in the .repo file, for example for testing, debuginfo and sources. See the other centos-release-* packages for examples. The above example uses mirrorlist.centos.org for selecting the closest external mirror. Using mirrors obtained via mirrorlist.centos.org is preferred, because it gives the user the fastest possible mirrors and decreases load from mirror.centos.org servers. The baseurl to CentOS-controlled mirror.centos.org is still available as a commented out backup. Note the use of $contentdir to select either centos or altarch.

    The repo parameter to mirrorlist.centos.org is constructed from the path by dropping the architecture and changing slashes to dashes. For example, files in cloud/x86_64/openstack-rocky can be found from a repository named cloud-openstack-rocky, and files in sclo/x86_64/rh/rh-python36 can be found from sclo-rh-rh-python36. Please make sure you get the path and repo names right in your .repo file. Content on mirror.centos.org is scanned every three hours, and any new repositories will be added automatically to the mirror crawler database.

  2. If this is the first build, add the new centos-release-mycomponent to the Extras tags
    [bstinson@localhost centos-release-mycomponent]$ cbs add-pkg --owner=bstinson core7-extras-common-candidate centos-release-mycomponent
    [bstinson@localhost centos-release-mycomponent]$ cbs add-pkg --owner=bstinson core7-extras-common-testing centos-release-mycomponent
    [bstinson@localhost centos-release-mycomponent]$ cbs add-pkg --owner=bstinson core7-extras-common-release centos-release-mycomponent
    
  3. Build the package in CBS against the Extras tag
    [bstinson@localhost centos-release-openstack-mycomponent]$ cbs build core7-extras-common-el7.centos centos-release-mycomponent-0.0.1-1.rpm
    
  4. File a bug to request content to be synced to mirror.centos.org (See SIGGuide#MirrorSpace)

  5. Tag the build to the testing tag
    [bstinson@localhost centos-release-openstack-mycomponent]$ cbs tag-build core7-extras-common-testing centos-release-mycomponent-0.0.1-1
    
  6. Do a test yum install of a package from the new repo

  7. When ready, tag the build to the release tag
    [bstinson@localhost centos-release-openstack-rocky]$ cbs tag-build core7-extras-common-release centos-release-mycomponent-0.0.1-1
    

Some Guidelines for centos-release-* packages
  • centos-release-* packages should be built as noarch RPMs

SIGGuide/Content/Release (last edited 2018-09-24 18:41:28 by AnssiJohansson)