Contents

Description

Each new release we create a build target for the next release. This SOP will describe the steps necessary to prepare the new build target.

Action

Adding a build target is a complicated task. It involves updating koji, CVS, fedora-release package, puppet, and a few wiki pages.

Koji

In koji a couple collection tags need to be made, and a target created to tie them together. We create a base collection tag named after the release, and a build tag to hold a few things we use in the buildroots that are not part of the distribution (glibc32/glibc64). Inheritance to the previous release is used for ownership and package data, as well as buildroot content data.

The add-tag, add-tag-inheritance, and add-target commands are used.

$ koji add-tag --help
Usage: koji add-tag [options] name
(Specify the --help global option for a list of other help options)
Options:
-h, --help show this help message and exit
--parent=PARENT Specify parent
--arches=ARCHES Specify arches
$ koji add-tag-inheritance --help
Usage: koji add-tag-inheritance [options] tag parent-tag
(Specify the --help global option for a list of other help options)
Options:
-h, --help show this help message and exit
--priority=PRIORITY Specify priority
--maxdepth=MAXDEPTH Specify max depth
--intransitive Set intransitive
--noconfig Set to packages only
--pkg-filter=PKG_FILTER
Specify the package filter
--force=FORCE Force adding a parent to a tag that already has that
parent tag
$ koji add-target --help
Usage: koji add-target name build-tag <dest-tag>
(Specify the --help global option for a list of other help options)
Options:
-h, --help show this help message and exit

For example if we wanted to create the Fedora 9 build target, we would do the following:

CVS

Multiple parts of the CVS system need to be made aware of new build targets (and thus new branches).

common/

The branches and Makefile.common file need to be updated.

branches simply needs a new line defining the next release:

F-9:dist-f9:.fc9:fedora:9

The first field is the branch name as it would be seen on the file system. The second field is the build target for that branch, the third is what dist would define to, and the last to define the family and release (which are used by other macros). Depending on when the new target is introduced, you may need to also update the definition of the devel/ branch so that it targets the correct build target.

Makefile.common has potentially three changes. The first depends on if a new build target is being added for pre-branch purposes. If it is, the pre-branch logic check near the top of Makefile.common needs to be updated with this information.

# check to see if this is an early branched package; we should make this more
# generic in the future
ifeq ($(BRANCH),devel)
BRANCH:=$(shell cvs rlog rpms/$(NAME)/F-10/$(SPECFILE) >/dev/null 2>&1 && echo "F-11" || echo "devel")
endif

This chunk of code only operates on builds from the devel/ branch, and it checks the cvs server to see if there is an F-10 branch for the package in question. If found, the system assumes the package was pre-branched, and that the build from devel/ should go to the F-11 target, instead of the F-10 target of a non-branched package.

The second Makefile.common change involves some logic inside of it to determine which branches use koji to build and which use plague. When new targets/branches are introduced, this logic needs to be updated (this should go away soon).

The third Makefile.common change is also related to pre-branch. When pre-branching, the branches that will be created need to use bodhi for the 'make update' target. To update the list of branches that use bodhi for updates change the following:

ifneq (, $(filter F-10 F-9 F-8 F-7, $(BRANCH)))
update: bodhi
endif

Ensure the branches that will be pre-created are listed.

CVSROOT/admin/

Within CVSROOT/admin/ there are several files that deal with making CVS branches. They are mkbranchwrapper, pkgdb2branch.py, and tag-check.

mkbranchwrapper simply needs the VALID_BRANCHES alias updated with the new branch:

VALID_BRANCHES="OLPC-2 FC-3 FC-4 FC-6 F-7 F-8 EL-4 EL-5"

pkgdb2branch.py needs something similar. Update BRANCHES with the new branch information. The branch name maps to the branch that is its parent.

tag-check lists a set of tags that are valid and as such it needs to be updated with the tags that are created when a package is branched. These are branch starting tags and branch splitting tags. Each set needs to get updated with the new branch:

100351 is Jesse Keating's id. Change this if someone else is the release manager for this release.

branchname is the name of branch directories in cvs.

disttag is the value for disttag in rpm.

fedora-release

Currently the fedora-release package provides the %{?dist} definitions used during building of packages. When a new target is created, fedora-release must be built for the collection with new dist definitions.

puppet

Puppet manages configs for our "static-repo" creation. When creating a new build target, it needs to be added to the list of static-repos so that users can access up to the hour repodata for this build target.

configs/build/update-static-repos.py

within puppet is the file that manages these repos. Add the new target to the TAGS alias and commit.

Wiki

Various wiki pages need to be updated with the new target information. Below you'll find a (hopefully current) list of pages to change:

Comps

In the comps module in CVS (CVSROOT: /cvs/pkgs), create and add a new comps file based on the previous release. (Just copying it should be fine.) Add the new file to po/POTFILES.in.

When rawhide is retargeted in koji to point to the new release, update the Makefile to target comps-rawhide.xml at the new version

Verification

Given the complexity of all the changes necessary to create a new build target, the best way to verify is to attempt a build. Given that fedora-release has to be built before anything else so that dist tags translate correctly it is a good test case. For example, this was used to test the new Fedora 9 target:

Use pkgdb to request an F-8 branch of fedora-release

Use pkgdb2branch to actually make the branch

Update fedora-release checkout (and common/ directory)

Adjust .spec file in devel/ for new dist defines

commit/build

Track build in koji to ensure proper tagging is used

What this won't test is translations of dist at tag time given that fedora-release doesn't use dist in it's Release. Verifying with a second package that uses dist is a good idea.