Using the package database

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
m (1 revision(s))
m (How can I add a new package or add a package to a new branch?)
(8 intermediate revisions by 3 users not shown)
Line 35: Line 35:
  
 
* watchcommits and watchbugzilla are for receiving email notifications for package changes.
 
* watchcommits and watchbugzilla are for receiving email notifications for package changes.
* commit is for access to commit to the cvs repository.
+
* commit is for access to commit to the SCM.
 
* approveacls is to be allowed to approveacls just like the package owner.
 
* approveacls is to be allowed to approveacls just like the package owner.
  
Line 65: Line 65:
 
==== How can I only list packages I'm comaintainer of? ====
 
==== How can I only list packages I'm comaintainer of? ====
  
The packagedb allows filtering the list of packages.  Until [https://fedorahosted.org/packagedb/ticket/104 this ticket]  is resolved, however, there is no UI element to expose this.  Enterprising users can change the URL to utilize this feature now.  To use it, add <code>?acls=ACL1,ACL2,...ACLN</code> to the end of the user url.  ACL1 through ACLN can be any combination of the following:
+
The packagedb allows filtering the list of packages.  Using the filter box on https://admin.fedoraproject.org/pkgdb/users/packages is the recommended method.  Enterprising users can change the URL directly.  To use it, add <code>?acls=ACL1&acls=ACL2[...&acls=ACLN]</code> to the end of the user url.  ACL1 through ACLN can be any combination of the following:
  
 
* owner: you are the package owner
 
* owner: you are the package owner
Line 75: Line 75:
 
Here's an example that lists what people usually think of as packages they're a comaintainer of:
 
Here's an example that lists what people usually think of as packages they're a comaintainer of:
 
<pre>
 
<pre>
https://admin.fedoraproject.org/pkgdb/users/packages/?acls=owner,commit,approveacls
+
https://admin.fedoraproject.org/pkgdb/users/packages/?acls=owner&acls=commit&acls=approveacls
 
</pre>
 
</pre>
  
Line 88: Line 88:
  
 
=== How can I add a new package or add a package to a new branch? ===
 
=== How can I add a new package or add a package to a new branch? ===
These actions require manual work to be done by a cvsadmin so follow the steps in [PackageMaintainers/CVSAdminProcedure CVSAdminProcedure] .
+
These actions require manual work to be done by an administrator so follow the steps in [[package SCM admin requests]] .
  
Eventually we hope to make these steps more automated with a form to request a new branch and another form to request a new package.  If you'd like to work on this, please see [https://fedorahosted.org/packagedb/ticket/18 this ticket]  
+
Eventually we hope to make these steps more automated with a form to request a new branch and another form to request a new package.  If you'd like to work on this, please see [https://fedorahosted.org/packagedb/ticket/18 this ticket]
  
 
== PackageDB API ==
 
== PackageDB API ==
 
Some of the PackageDB data can be accessed by scripts as JSON or plain text data.  This data is made available to make scripting easier.  If a page supports plain text, it can be retrieved that way by appending <code>?tg_format=plain</code> to the Base URL.  If it can be retrieved as JSON data, appending <code>?tg_format=json</code> will retrieve the information in that way.
 
Some of the PackageDB data can be accessed by scripts as JSON or plain text data.  This data is made available to make scripting easier.  If a page supports plain text, it can be retrieved that way by appending <code>?tg_format=plain</code> to the Base URL.  If it can be retrieved as JSON data, appending <code>?tg_format=json</code> will retrieve the information in that way.
  
For instance, Bugzilla Acls can be retrieved in the following ways:
+
The best way to retrieve this data is by using the client library present in python-fedora.  <code>yum install python-fedora</code> then setup a pkgdb client object and call methods on it like this:
 +
 
 +
<pre>
 +
from fedora.client import PackageDB
 +
# username and password are optional -- in general, only methods that
 +
# modify data will need them to have been specified
 +
pkgdb = PackageDB(username='me', password='XXXX')
 +
pkgdb.get_bugzilla_acls()
 +
</pre>
 +
 
 +
Documentation for the pkgdb module of python-fedora is here: https://fedorahosted.org/releases/p/y/python-fedora/doc/existing.html#pkgdb
 +
 
 +
If, for some reason, you must retrieve the information without the help of the client library, you can use the urls directly like this.  For instance, Bugzilla Acls can be retrieved in the following ways:
 +
 
 
<pre>
 
<pre>
 
HTML:
 
HTML:
https://admin.fedoraproject.org/pkgdb/acls/bugzilla
+
https://admin.fedoraproject.org/pkgdb/lists/bugzilla
  
 
Plain Text:
 
Plain Text:
https://admin.fedoraproject.org/pkgdb/acls/bugzilla?tg_format=plain
+
https://admin.fedoraproject.org/pkgdb/lists/bugzilla?tg_format=plain
  
 
JSON:
 
JSON:
https://admin.fedoraproject.org/pkgdb/acls/bugzilla?tg_format=json
+
https://admin.fedoraproject.org/pkgdb/lists/bugzilla?tg_format=json
 
</pre>
 
</pre>
  
Line 112: Line 125:
 
* In Flux: The data being exposed by this method will continue but the URL location, format, or query parameters to retrieve it may change.
 
* In Flux: The data being exposed by this method will continue but the URL location, format, or query parameters to retrieve it may change.
 
* Unstable: Anything about this method could change including disappearing entirely.
 
* Unstable: Anything about this method could change including disappearing entirely.
 +
 +
{{admon/warning||Note that using python-fedora remains the best method of accessing this data.  We can add compatibility shims to that even when the server code changes.  The server code is undergoing some redesigns that may make things change -- in particular, we are moving away from returning representations of the database tables directly and making changes to the database schema.  These may cause changes to even the Proven API.}}
  
 
=== Bugzilla Acls ===
 
=== Bugzilla Acls ===
Line 117: Line 132:
 
{| border="1"
 
{| border="1"
 
|-
 
|-
|Base URL||https://admin.fedoraproject.org/pkgdb/acls/bugzilla
+
|Base URL||https://admin.fedoraproject.org/pkgdb/lists/bugzilla
 
|-
 
|-
 
|Plain Format||Stable
 
|Plain Format||Stable
Line 129: Line 144:
 
{| border="1"
 
{| border="1"
 
|-
 
|-
|Base Url||https://admin.fedoraproject.org/pkgdb/acls/vcs
+
|Base Url||https://admin.fedoraproject.org/pkgdb/lists/vcs
 
|-
 
|-
 
|Plain Format||Stable
 
|Plain Format||Stable
Line 140: Line 155:
 
{| border="1"
 
{| border="1"
 
|-
 
|-
|Base Url||https://admin.fedoraproject.org/pkgdb/packages/name/PKGNAME
+
|Base Url||https://admin.fedoraproject.org/pkgdb/acls/name/PKGNAME
 
|-
 
|-
 
|JSON Format||Proven
 
|JSON Format||Proven
Line 148: Line 163:
 
{| border="1"
 
{| border="1"
 
|-
 
|-
|Base Url||https://admin.fedoraproject.org/pkgdb/packages/bugs/PKGNAME
+
|Base Url||https://admin.fedoraproject.org/pkgdb/acls/bugs/PKGNAME
 
|-
 
|-
 
|JSON Format||In flux
 
|JSON Format||In flux
Line 165: Line 180:
 
{| border="1"
 
{| border="1"
 
|-
 
|-
|Base Url||https://admin.fedoraproject.org/pkgdb/packages/dispatcher/*
+
|Base Url||https://admin.fedoraproject.org/pkgdb/acls/dispatcher/*
 
|-
 
|-
 
|JSON Format||Unstable
 
|JSON Format||Unstable
 
|}
 
|}
 
This is the only method to change information in the database but the API is going to be changing radically.
 
This is the only method to change information in the database but the API is going to be changing radically.
 +
 +
[[Category:Package Maintainers]]

Revision as of 03:14, 24 August 2010

Contents

Using the Fedora Package Database

The Package Database is the place where we track ownership of packages and permissions on who is allowed to commit to a package.


Accessing the Interface

Where is the Package Database?

The packagedb is located at https://admin.fedoraproject.org/pkgdb/

Where should I go from there?

The links on the left side of the main page give you access to the major views of the information in the Package Database.

What's the fastest way to find a package?

Currently, there's no UI to search for a package or go directly to it. However, if you want to avoid having to go through the complete list of packages you can access a specific package by modifying the URL. Simply replace PACKAGENAME in the following URL with the name of the package you're interested in:

https://admin.fedoraproject.org/pkgdb/packages/name/PACKAGENAME

If you'd like to help implement package search, have a look at this ticket .

Logging in

The upper right hand corner of the Package Database has a brief message that says You are not logged in yet Login. When you click on Login, you are asked to enter your Fedora username and password. Once these are entered, you will be able to make changes in the Package Database.

Signing up for packages

How do I sign up for a package?

Navigate to the package's page in the Package Database. If you have not logged in, go ahead and do that now. At this point you should be back at the package's page and have a button labeled Add myself to Packages that you can press to request access to a certain package on a certain branch. Once you've selected that button, you can check off the checkboxes for each acl you're interested in.

  • watchcommits and watchbugzilla are for receiving email notifications for package changes.
  • commit is for access to commit to the SCM.
  • approveacls is to be allowed to approveacls just like the package owner.

I'm the package maintainer, how do I give someone commit access to my package?

Currently you have to ask the person you want to have access request acls on the package. When that happens, you will be sent an email to approve their request. You can then go to the package in the Package Database and approve their request.

There are two tickets relevant to this in the PackageDB. If you'd like to help make this feature better, feel free to work on them:

How do I find orphaned packages that I can take over?

This information is currently scattered in several places. We are working on consolidating it in the packagedb: https://admin.fedoraproject.org/pkgdb/users/packages/orphan

But information is currently also present in the wiki: http://fedoraproject.org/wiki/PackageMaintainers/OrphanedPackages http://fedoraproject.org/wiki/PackageMaintainers/RetiredPackages

If you'd like to work on migrating this information into the PackageDB, please see this ticket .

Working with your packages

How can I find my packages?

The easiest way to find the packages you work with is to view the overview of your packages. This is accessed from https://admin.fedoraproject.org/pkgdb/users/packages/

This view shows you every package for which you have an acl in a non-EOL branch. (So a package for which you only have watchbugzilla in EPEL4 will show up. A package for which you are the owner in Fedora Core 3 will not.)

How can I only list packages I'm comaintainer of?

The packagedb allows filtering the list of packages. Using the filter box on https://admin.fedoraproject.org/pkgdb/users/packages is the recommended method. Enterprising users can change the URL directly. To use it, add ?acls=ACL1&acls=ACL2[...&acls=ACLN] to the end of the user url. ACL1 through ACLN can be any combination of the following:

  • owner: you are the package owner
  • commit: you are allowed to commit to the package
  • approveacls: you can approve and change acls on the package
  • watchbugzilla: you are watching bugzilla entries for this package
  • watchcommits: you are watching commits for this package

Here's an example that lists what people usually think of as packages they're a comaintainer of:

https://admin.fedoraproject.org/pkgdb/users/packages/?acls=owner&acls=commit&acls=approveacls

How can I list packages which I was interested in on an EOL branch?

Add EOL=True to the end of the url.

Here's an example that lists packages that you were the package owner including EOL branches:

https://admin.fedoraproject.org/pkgdb/users/packages/?acls=owner&EOL=True

How can I add a new package or add a package to a new branch?

These actions require manual work to be done by an administrator so follow the steps in package SCM admin requests .

Eventually we hope to make these steps more automated with a form to request a new branch and another form to request a new package. If you'd like to work on this, please see this ticket

PackageDB API

Some of the PackageDB data can be accessed by scripts as JSON or plain text data. This data is made available to make scripting easier. If a page supports plain text, it can be retrieved that way by appending ?tg_format=plain to the Base URL. If it can be retrieved as JSON data, appending ?tg_format=json will retrieve the information in that way.

The best way to retrieve this data is by using the client library present in python-fedora. yum install python-fedora then setup a pkgdb client object and call methods on it like this:

from fedora.client import PackageDB
# username and password are optional -- in general, only methods that
# modify data will need them to have been specified
pkgdb = PackageDB(username='me', password='XXXX')
pkgdb.get_bugzilla_acls()

Documentation for the pkgdb module of python-fedora is here: https://fedorahosted.org/releases/p/y/python-fedora/doc/existing.html#pkgdb

If, for some reason, you must retrieve the information without the help of the client library, you can use the urls directly like this. For instance, Bugzilla Acls can be retrieved in the following ways:

HTML:
https://admin.fedoraproject.org/pkgdb/lists/bugzilla

Plain Text:
https://admin.fedoraproject.org/pkgdb/lists/bugzilla?tg_format=plain

JSON:
https://admin.fedoraproject.org/pkgdb/lists/bugzilla?tg_format=json

Each method exposed to the user has a different rating for stability depending on several criteria:

  • Stable: The format of data, URL location, and query parameters are not expected to change. If changes occur, they will be announced and deprecated ahead of time.
  • Proven: The data format is stable. URL location and query parameters may change but a method of retrieving the data in its current form will remain available. API with this status will have notes to explain just how much it can be depended on.
  • In Flux: The data being exposed by this method will continue but the URL location, format, or query parameters to retrieve it may change.
  • Unstable: Anything about this method could change including disappearing entirely.
Warning (medium size).png
Note that using python-fedora remains the best method of accessing this data. We can add compatibility shims to that even when the server code changes. The server code is undergoing some redesigns that may make things change -- in particular, we are moving away from returning representations of the database tables directly and making changes to the database schema. These may cause changes to even the Proven API.

Bugzilla Acls

Base URL https://admin.fedoraproject.org/pkgdb/lists/bugzilla
Plain Format Stable
JSON Format Stable

The bugzilla acl page returns information about package ownership, summary information, and initialcclist that bugzilla needs to know. At present (and unless a change occurs in bugzilla that would obviate this), the information is based on the information for the latest release of the product. At the moment Nov, 19, 2007, those are Fedora Devel, Fedora EPEL 5, and Fedora OLPC 2.

VCS Acls

Base Url https://admin.fedoraproject.org/pkgdb/lists/vcs
Plain Format Stable
JSON Format Stable

The VCS Acls page returns information about who can commit to a package.

Package Information

Base Url https://admin.fedoraproject.org/pkgdb/acls/name/PKGNAME
JSON Format Proven

Package Buglist

Base Url https://admin.fedoraproject.org/pkgdb/acls/bugs/PKGNAME
JSON Format In flux

User Package List

Base Url https://admin.fedoraproject.org/pkgdb/users/packages/USERNAME
JSON Format In flux

Returns a list of packages belonging to the user with the ability to filter on certain acls via query params. The query params may be added to in the future and the URL location may change as well.

Change Package Info

Base Url https://admin.fedoraproject.org/pkgdb/acls/dispatcher/*
JSON Format Unstable

This is the only method to change information in the database but the API is going to be changing radically.