[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

Community Build System

CBS is a community build system for SpecialInterestGroup members. It allows to build packages with Koji against CentOS5, CentOS6 and CentOS7.

Quickstart

1. Signing up for an account

  1. Visit the Accounts System

  2. Select 'New Account'
  3. Fill out the form with your information
  4. Apply for membership in the SIG Group you wish to contribute to
    • The administrators will work with the SIG members to finalize sponsorship requests every Monday shortly before the CBS Meeting

  5. When approved, you will need to install the client tools and generate your SSL Certificate, see HowTos/CentosPackager for details.

  6. Execute cbs moshimoshi and you should see your username in the answer.

  7. BONUS: (unsupported) auto completion for zsh and bash users available from Github (Please note bash completion has been updated recently while zsh is older. wink wink)

2. Getting Help

There are a number of ways to get help if you're having trouble with CBS:

RPM 101

{{{SRPM=ksh-20120801-10.el6.4.src.rpm NAME=ksh VERSION=20120801 RELEASE=10.el6.4 DISTTAG=el6 }}}

Koji 101

Koji has a few easy concepts that need to be well understood:

Building with CBS

Let's consider in the following documentation that our sig is call "bananas". Please replace it with your sig name but the "bananas" tags have been created as a playground, so you can experiment.

1. Scratch builds

Koji gives you the option to use any target and build a scratch package.

    cbs build --scratch bananas6-el6 ksh-20120801-10.el6.4.src.rpm

2. Standard builds

   cbs add-pkg --owner "username" bananas6-testing ksh
   cbs add-pkg --owner "username" bananas6-release ksh

This action is done once per package, per sig.

   cbs build bananas6-el6 ksh-20120801-10.el6.4.src.rpm

3. Adding existing builds to a tag

Sometimes you want to build a package but you get an error message like this:

GenericError: Build already exists (id=1231, state=COMPLETE): {'name': '$pkgname'..... lot of details ....}

This means that you have added the package to a destination tag (through the "cbs add-pkg" command, see above) but when you tried to build the package, it was already built with the same NVR through koji but probably in a different tag. So, instead of building it again, koji simply refuses to rebuild a package already built with the same NVR. The simple solution is just to "tag" that build so that it appears in your tag repo automatically. Let's suppose that package name is yaml-cpp and that yaml-cpp-0.5.1-6.el7 was already built (you can use the search operation in koji to see who built it and in which tag).

cbs tag-build bananas7-testing yaml-cpp-0.5.1-6.el7

Kojira will then regenerate the repodata, this time including that already built package.

4. Git builds

A quick example:

 cbs add-pkg --owner "username" bananas7-testing tzdata
 cbs add-pkg --owner "username" bananas7-release tzdata
 cbs build bananas7-el7 "git+https://git.centos.org/git/rpms/tzdata.git?#e24d98"

Common error messages

1. pkg already built case

GenericError: Build already exists

See the "Adding existing builds to a tag" paragraph above

2. Expired certificate

If you see this error message :

"Error: [('SSL routines','SSL_shutdown', 'shutdown while in init')]

It can be that your ~/.centos.cert x509 certificate has expired. You can confirm this with the following command :

openssl x509 -in ~/.centos.cert -noout -text|grep "Not After"

If it has expired, you can just regenerate a new certificate with centos-cert (as described in Step 2 on https://wiki.centos.org/HowTos/CentosPackager)

3. Using old SSLv3

If you see this error message:

Error: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3 alert handshake failure'), ('SSL routines', 'SSL3_WRITE_BYTES', 'ssl handshake failure')]

Then you need to manually patch your koji instance to use TLSv1 rather than SSLv3 (which has been proven to be insecure).

Advanced configuration

1. Using multiple koji instances

   koji -p cbs list-tags

Known issues

External Links

Official doc: https://fedoraproject.org/wiki/Koji


2023-09-11 07:22