From Fedora Project Wiki

(Section on running mass comaint adds without email)
(Add fesco policy on mass changes.)
Line 157: Line 157:
As a cvsadmin you can also log into the pkgdb webui and click on the unretire package button.  Once clicked, the package will be orphaned rather than retired.
As a cvsadmin you can also log into the pkgdb webui and click on the unretire package button.  Once clicked, the package will be orphaned rather than retired.


== Performing mass comaint requests ==
== Performing mass comaintainer requests ==
Download a copy of this script:


http://git.fedorahosted.org/git/?p=fedora-infrastructure.git;a=blob;f=scripts/pkgdb_bulk_comaint/comaint.py;hb=HEAD
* Confirm that the requestor has 'approveacls' on all packages they wish to operate on. If they do not, they MUST request the change via FESCo.  


Edit the script to have the proper package owners and package name pattern.
* Mail maintainers/co-maintainers affected by the change to inform them of who requested the change and why.  


Edit the script to have the proper new comaintainers.
* Download a copy of this script:


Ask someone in sysadmin-web to disable email sending on bapp01 for the pkgdb (following the instructions in comments in the script)
* http://git.fedorahosted.org/git/?p=fedora-infrastructure.git;a=blob;f=scripts/pkgdb_bulk_comaint/comaint.py;hb=HEAD


Copy the script to an infrastructure host (like cvs01) that can contact bapp01 and run it.
* Edit the script to have the proper package owners and package name pattern.
 
* Edit the script to have the proper new comaintainers.
 
* Ask someone in sysadmin-web to disable email sending on bapp01 for the pkgdb (following the instructions in comments in the script)
 
* Copy the script to an infrastructure host (like cvs01) that can contact bapp01 and run it.


[[Category:Infrastructure SOPs]]
[[Category:Infrastructure SOPs]]

Revision as of 16:39, 30 June 2010

Shortcut:
ISOP:CVSADMIN

Creating New Packages

Note
The scripts used here are currently available from a cvs checkout.
CVSROOT=/cvs/pkgs cvs co CVSROOT
cd CVSROOT/admin

Steps

See below for detail of invoking the scripts.

  1. Check Bugzilla Ticket to make sure it looks ok
  2. Add the package information to the packagedb with pkgdb-client
  3. Use pkgdb2branch to create the branches on the cvs server
WARNING: Do not run multiple instances of pkgdb2branch in parallel!
This will cause them to fail due to mismatching 'modules' files. It's not a good idea to run addpackage, mkbranchwrapper, or setup_package by themselves as it could lead to packages that don't match their packagedb entry.

4. Update koji.

Using pkgdb-client

Use pkgdb-client to update the pkgdb with new information. For instance, to add a new package:

pkgdb-client edit -u toshio -o terjeros -d 'Python module to extract EXIF information' -b F-10 -b F-11 -b devel python-exif

To update that package later and add someone to the initialcclist do:

pkgdb-client edit -u toshio -c kevin python-exif

To add a new branch for a package:

pkgdb-client edit -u toshio -b F-10 -b EL-5 python-exif

To allow provenpackager to edit a branch:

pkgdb-client edit -u toshio -b devel -a provenpackager python-exif

To remove provenpackager commit rights on a branch:

pkgdb-client edit -u toshio -b EL-5 -b EL-4 -r provenpackager python-exif

More options can be found by running pkgdb-client --help

You must be in the cvsadmin group to use pkgdb-client. It can be run on a non-Fedora Infrastructure box if you set the PACKAGEDBURL environment variable to the public URL:

export PACKAGEDBURL=https://admin.fedoraproject.org/pkgdb
Note
You may be asked to CC fedora-perl-devel-list on a perl package. This can be done with the username "perl-sig". This is presently a user, not a group so it cannot be used as an owner or comaintainer, only for CC.

Using pkgdb2branch

Use pkgdb2branch.py to create cvs branches for a package. pkgdb2branch.py takes a list of package names on the command line and creates the branches in cvs that are specified in the packagedb. For instance:

./pkgdb2branch.py python-exif qa-assistant

Will create cvs branches specified in the packagedb for python-exif and qa-assistant.

pkgdb2branch can only be run from cvs-int.

Update Koji

Optionally you can synchronize pkgdb and koji by hand: it is done automatically hourly by a cronjob. There is a script for this in the admin/ directory of the CVSROOT module.

Since dist-f11 and later inherit from dist-f10, and currently dist-f10 is the basis of our stack, it's easiest to just call:

./owner-sync-pkgdb dist-f12

Just run ./owners-sync-pkgdb for usage output.

This script requires that you have a properly configured koji client installed.

owner-sync-pkgdb requires the koji client libraries which are not available on the cvs server. So you need to run this from one of your machines.

addpackage

In the CVSROOT/admin checkout, there is a shell script called addpackage. It reads in and parses a New Package Request on stdin, and after checking, generates the new pkgdb entry and makes the branches. There are confirmation prompts along the way to check that each step is right.

You need to invoke the script with your cvsadmin FAS account name (NOT the new package owner's name):

./addpackage spot

Helper Scripts

These scripts are invoked by the scripts above, doing some of the heavy lifting. They should not ordinarily be called on their own.

mkbranchwrapper

/usr/local/bin/mkbranchwrapper is a shell script which takes a list of packages and branches. For instance:

mkbranchwrapper foo bar EL-5 F-11

will create modules foo and bar for devel if they don't exist and branch them for the other 4 branches passed to the script. If the devel branch exists then it just branches. If there is no branches passed the module is created in devel only.

mkbranchwrapper has to be run from cvs-int.

mkbranchwrapper is not used by any current programs. Use pkgdb2branch instead.

setup_package

setup_package creates a new blank module in devel only. It can be run from any host. To create a new package run

setup_package foo

setup_package needs to be called once for each package. it could be wrapped in a shell script similar to

#!/bin/bash

PACKAGES=""

for arg in $@; do
PACKAGES="$PACKAGES $arg"
done

echo "packages=$PACKAGES"

for package in $PACKAGES; do
~/bin/setup_package $package
done

then call the script with all branches after it.

setup_package is currently called from pkgdb2branch.

Pseudo Users for SIGs

See CVS_admin_requests#Pseudo-users_for_SIGs for the current list.

Retire Packages

Any packager can retire a package. click on the retire package button for the package in the webui. There's currently no pkgdb-client command to retire a package.

Unretire Packages

Any cvsadmin can unretire a package. Simply use pkgdb-client to assign an owner and the package will be unretired.

$ pkgdb-client -o toshio -b devel qa-assistant

As a cvsadmin you can also log into the pkgdb webui and click on the unretire package button. Once clicked, the package will be orphaned rather than retired.

Performing mass comaintainer requests

  • Confirm that the requestor has 'approveacls' on all packages they wish to operate on. If they do not, they MUST request the change via FESCo.
  • Mail maintainers/co-maintainers affected by the change to inform them of who requested the change and why.
  • Download a copy of this script:
  • Edit the script to have the proper package owners and package name pattern.
  • Edit the script to have the proper new comaintainers.
  • Ask someone in sysadmin-web to disable email sending on bapp01 for the pkgdb (following the instructions in comments in the script)
  • Copy the script to an infrastructure host (like cvs01) that can contact bapp01 and run it.