Description

Each new release we branch all active packages for the new release.

Action

PackageDB

Mass branching in the pkgdb is the first step. It should be done near the time that the cvs branches are created so as not to confuse packagers. However, it does not cause an outage so it should be done ahead of time.

Whichever method you choose, the command will start the mass branch process on the server and then return with a message that the branching is in progress.

When the branching is finished, you will receive an email that tells you of any unbranched packages as well as all the packages that were branched.

If something fails spectacularly, it is safe to try mass branching again at a later time. If only a few cleanups a re needed it might be better to do that with the regular branch commands.

Target pkgdb-client against bapp1At present there is a bug in the mass branching code so that the branching seems to work but the changes aren't saved in the database. I think this occurs when the server handles other requests while the packagedb is processing a mass branch. Performing the mass branch on bapp1 which is not handling other requests while the mass branch is occurring is one way to work around this. It's likely a bug in how forking in the mass branch code is interacting with the database connections.

Retarget pkgdb-client to use bapp1 by changing the value of pkgdb.url in either /etc/pkgdb-client.cfg or ~/.fedora/pkgdb-client.cfg.

[global]
pkgdb.url = "https://bapp1/pkgdb/"

CVS

The following work is performed on cvs1

Disable logins to cvs

sudo crontab -u toshio -e

Comment out the gen-acl.sh cron job

CVSROOT=/cvs/pkgs cvs co CVSROOT

cp CVSROOT/admin/avail CVSROOT/admin/avail.bak

edit CVSROOT/admin/avail and comment out everything below the cvsadmins acl:

Disable logging

CVSROOT=/cvs/pkgs cvs co CVSROOT

edit CVSROOT/loginfo and comment out all of the lines

<cvs commit the change to the repository

Create the branch directory

Similarly to /cvs/pkgs/devel, the branch directory /cvs/pkgs/F-10 will automatically be populated with symlinks to /cvs/pkgs/rpms/*/F-10. This should be automatically handled by the mkbranch script in CVSROOT/admin/mkbranch.

mkdir /cvs/pkgs/F-10
chmod g+w /cvs/pkgs/F-10

Make cvs branches

Run pkgdb2branch.py to put the files and directories on the cvs server. The --branch-for option was designed with this use case in mind::

./pkgdb2branch.py --branch-for=F-10

If for some reason that doesn't work, you can try this alternative:

cat pkglist.txt|./pkgdb2branch.py -c -

where pkglist.txt is a list of all the packages to branch.

Now turn everything back on.

Update branches file in common

The branches file in cvs/pkgs/common/branches dictates where builds go from cvs branches. This needs to be updated once the branching is done.

Regen ACLs

As a final step, refresh the acls file with all the new F-10 branches:

sudo -u toshio /usr/local/bin/genacls.sh

Getting a List of Unbranched Packages

Note: All further information on this page should be obsolete. After F10 successfully branches, remove it.

There are three things that list packages in releases. Each plays a part in this.

Koji keeps track of which packages should be branched and which are blocked. To get a list for say the F9 packages which are valid to branch:

To get the final list of what needs branches, compare the koji output and if an entry from the koji output exists in the pkgdb output, it needs a branch.

Notes on Optimization

If we can give a new flag to pkgdb's API to turn off mail on a per request basis we don't have to turn off pkgdb in order to branch.

Try doing parallel pkgdb-client calls.

If we could enhance the mail notification script for cvs to detect mass branching then we wouldn't need to close cvs during mass branching requests. (Currently, the rate for this is 3 pkgs/minute purely for the cvs portion (pkgdb information is cached at this point.))