SCM Admin SOP

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Update Koji: drop fc comment)
(redirect page to new infra-docs)
 
(26 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== Creating New Packages ==
+
{{header|infra}}
 +
{{shortcut|ISOP:SCMADMIN}}
 +
This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/scmadmin.txt
  
{{Admon/note | Note | The scripts used here are currently available from a cvs checkout.}}
+
For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.  
<pre>
+
CVSROOT=/cvs/pkgs cvs co CVSROOT
+
cd CVSROOT/admin
+
</pre>
+
  
=== Steps ===
 
See below for detail of invoking the scripts.
 
  
# Check Bugzilla Ticket to make sure it looks ok
+
[[Category:Infrastructure SOPs]]
# Add the package information to the packagedb with pkgdb-client
+
# Use pkgdb2branch to create the branches on the cvs server
+
 
+
{{Admon/warning | 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:
+
 
+
<pre>
+
pkgdb-client -u toshio -o terjeros -d 'Python module to extract EXIF information' -b FC-6 -b F-7 -b devel python-exif
+
</pre>
+
 
+
To update that package later and add someone to the initialcclist do:
+
<pre>
+
pkgdb-client -u toshio -c kevin python-exif
+
</pre>
+
 
+
To add a new branch for a package:
+
<pre>
+
pkgdb-client -u toshio -b F-8 -b EL-5 python-exif
+
</pre>
+
 
+
To allow uberpackager to edit a branch:
+
<pre>
+
pkgdb-client -u toshio -b devel -a uberpackager python-exif
+
</pre>
+
 
+
To remove uberpackager commit rights on a branch:
+
<pre>
+
pkgdb-client -u toshio -b EL-5 -b EL-4 -r uberpackager python-exif
+
</pre>
+
 
+
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:
+
<pre>
+
export PACKAGEDBURL=https://admin.fedoraproject.org/pkgdb
+
</pre>
+
 
+
{{Admon/note | 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:
+
 
+
<pre>
+
./pkgdb2branch.py python-exif qa-assistant
+
</pre>
+
Will create cvs branches specified in the packagedb for python-exif and qa-assistant.
+
 
+
pkgdb2branch can only be run from cvs-int.
+
 
+
==== Update Koji ====
+
 
+
Currently we have to synchronize pkgdb and koji.  There is a script for this in the admin/ directory of the CVSROOT module.
+
 
+
Since dist-f8+ inherits from dist-fc7, and currently dist-fc7 is the basis of our stack, it's easiest to just call:
+
 
+
<pre>
+
./owner-sync-pkgdb dist-fc7
+
</pre>
+
 
+
Just run <code>./owners-sync-pkgdb</code> for a 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 cvs-int.  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):
+
 
+
<pre>
+
./addpackage spot
+
</pre>
+
 
+
=== 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:
+
 
+
<pre>
+
mkbranchwrapper foo bar EL-4 EL-5 FC-6 F-7
+
</pre>
+
 
+
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
+
 
+
<pre>
+
setup_package foo
+
</pre>
+
 
+
setup_package needs to be called once for each package.  it could be wrapped in a shell script similar to
+
<pre>
+
#!/bin/bash
+
 
+
PACKAGES=""
+
 
+
for arg in $@; do
+
PACKAGES="$PACKAGES $arg"
+
done
+
 
+
echo "packages=$PACKAGES"
+
 
+
for package in $PACKAGES; do
+
~/bin/setup_package $package
+
done
+
 
+
</pre>
+
 
+
then call the script with all branches after it.
+
 
+
setup_package is currently called from pkgdb2branch.
+
 
+
=== Pseudo Users for SIGs ===
+
The following pseudo users can be used with the packagedb so bugzilla and commits will CC the correct mailing lists or groups can triage their bugs effectively:
+
<pre>
+
orphan          | extras-orphan-fedoraproject.org
+
anaconda-maint  | anaconda-maint-list-redhat.com
+
xen-maint        | xen-maint-redhat.com
+
kernel-maint    | kernel-maint-redhat.com
+
xgl-maint        | xgl-maint-redhat.com
+
lvm-team        | lvm-team-redhat.com
+
perl-sig        | fedora-perl-devel-list-redhat.com
+
retired          | retired-packages-fedoraproject.org
+
ctrl-center-team | control-center-maint-fedoraproject.org
+
fonts-sig        | fedora-fonts-bugs-list-redhat.com
+
gecko-maint      | gecko-maint-redhat.com
+
astronomy-sig    | fedora-astronomy-list-redhat.com
+
</pre>
+

Latest revision as of 19:02, 19 December 2011

Infrastructure InfrastructureTeamN1.png
Shortcut:
ISOP:SCMADMIN

This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/scmadmin.txt

For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.