Scripts for package maintainers

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
m (fedoradev-pkgowners -- Get package owners from pgkdb)
(remove Makefile.common Addons since fedpkg is now used)
Line 97: Line 97:
[ fedora-qa]  - ''Contributed by AurelienBompard''
[ fedora-qa]  - ''Contributed by AurelienBompard''
=== Makefile.common Addons ===
Not really a script but a Makefile that can be easily included and provides additional targets to Makefile.common. Please send [[TillMaas|  me]]  feedback and ideas for other targets. I hope this will break nothing, but I cannot guarantee this. It works for me, though.
The current version 0.0.68 (versioning scheme will probably change some time in the future)) provides the following targets:
bodhi-login                    Login to bodhi / get a session cookie
bodhi-create-update            Create a new update in Bodhi
bodhi-prepare-update          Prepare a new update notification
commit                        Commit changes to cvs with entries from spec changelog
cvsurl-head                    Show head cvsurl
help-addons                    Shows the normal and the addon help text
koji-logs                      Download koji buildlogs
koji-logs-url                  Show URL to koji buildlogs
koji-unreleased-builds        Shows which builds of yours need to be released
scratch-build                  Creates a scratch build for all archs
scratch-build_<archs>¹        Creates a scratch build for selected arches (comma separated)
scratch-head-build            Creates a scratch build for all archs from cvs HEAD
scratch-head-build_<archs>    Creates a scratch build for selected arches (comma separated) from cvs HEAD
scratch-srpm-build            Creates a scratch build for all archs from srpm SRPMFILE (cryptsetup-luks-1.0.6-0.1.pre2.fc9.src.rpm)
scratch-srpm-build_<archs>    Creates a scratch build for selected arches (comma separated) from srpm SRPMFILE (cryptsetup-luks-1.0.6-0.1.pre2.fc9.src.rpm
[ Makefile.common-addons.gmk]  - ''Contributed by TillMaas''
=== fedoradev-pkgowners -- Get package owners from pkgdb ===
=== fedoradev-pkgowners -- Get package owners from pkgdb ===

Revision as of 21:13, 4 July 2012


Fedora Package Collection Scripts

These scripts are contributions by Fedora package maintainers . You may find them useful for your own purposes. Some scripts may require changes to work in your environment or situation. If you feel your changes are a substantial improvement, feel free to file them here alongside the original for review by others. Thank you to all the contributors of these scripts!


This script lists all the packages owned by your email address (override with -e) extracted from ~/.plague-client.cfg (override with -f), and looks in owners/owners.list (override with -o).

File:PackageMaintainers UsefulScripts - Contributed by Ignacio Vazquez-Abrams, modified to work with pkgdb by ToshioKuratomi


This script checks the status of all Perl packages owned by a specific person (email address) against CPAN. It outputs a message if there is a mismatch, which often signals that the maintainer can upgrade the version in Fedora Package Collection.

File:PackageMaintainers UsefulScripts - Contributed by Steven Pritchard, modified to work with pkgdb by VilleSkyttä


Checks if the given files are UTF-8. Supports compressed files.

File:PackageMaintainers UsefulScripts - Contributed by VilleSkyttä


Lists files and their modes in a package in readable format. Better than "rpm -qvl" when reviewing file permissions.

File:PackageMaintainers UsefulScripts - Originally by Michael Schwendt, tweaked by VilleSkyttä

Note: a further improved version is included in rpmdevtools >= 5.4.


Increase the Release value in a spec file and add a customisable changelog entry. Can be used for mass-rebuilds. - improved for Fedora Extras and further enhanced since

Note: a further improved version is included in rpmdevtools >= 6.5 as rpmdev-bumpspec.


Parse a CSV formatted Bug List and extract info on various aspects of package review tickets and general FE bug reports. Also performs various QA checks on owners.list file and FE CVS repository.

Usage information can be found in the header comment within the script.

File:PackageMaintainers UsefulScripts - Contributed by Christian Iseli

File:PackageMaintainers UsefulScripts bzId pkg.txt - Contributed by Christian Iseli


This script can be used to perform basic functions (add/remove/edit) on owners.list.

owners-maint [options] 

--help          This message

--add           Add an entry
--remove        Remove an entry
--edit          Edit an entry

--product       Product name ("Fedora Package Collection")
--component     Component name
--description   Component description
--owner         Component owner
--qa            Initial QA contact ("")
--cc            Initial CC list

File:PackageMaintainers UsefulScripts - Contributed by Steven Pritchard


A simple script that uses owners-maint (above) and information fetched with rpm to add entries to owners.list.

File:PackageMaintainers UsefulScripts - Contributed by Steven Pritchard


The aim of this script is to test all the MUST items in PackageReviewGuidelines which are not covered by rpmlint.

This script requires python, mock, rpmlint and yum-utils. To use it, follow these steps:

  • Create the rpm build directory structure, for example with rpmdev-setuptree from the rpmdevtools package.
  • cd to a temp dir (ex: ~/tmp) in a terminal.
  • run fedora-qa <bugid> or fedora-qa <srpm>
  • answer the questions, and a report will be printed. The report and additional files (like binaries, build log, etc...) can be found in the "~/reports/<rpm_name>" directory. The "~/reports" base dir can be configured in ~/.fedora-qa

The script is very likely to give false positives, so don't take everything it says for granted. The idea is more to show you where to dig. More info on this script on my wiki page.

fedora-qa - Contributed by AurelienBompard

fedoradev-pkgowners -- Get package owners from pkgdb


Usage: fedoradev-pkgowners  [options]  [list of pkgnames] 
echo pkgname | fedoradev-pkgowners [options] 

Outputs list of Fedora packages owners for packages from [list]  or stdin

Available options:
--comaintainers    -- print comaintainers as well
--email            -- print email (needs --fasfile<file>)
--epel             -- look epel owner(s) up
--fasfile <file>   -- get email or real name from fas-file ; download uri:
--pkgdbfile <file> -- get pkgowners from local file instead of downloading it from:
--realname         -- print realname (needs --fasfile <file>)

--help             -- this text
--version          -- output version

Hint: use 'fedoradev-pkgowners | sort | column -t' for properly formated output.


$ ./fedoradev-pkgowners ntfs-3g enigma gnome-desktop kdebase | sort | column -t
rstrode  gnome-desktop
spot     ntfs-3g
than     kdebase
thl      enigma
$ #
$ echo "ntfs-3g enigma gnome-desktop kdebase" | ./fedoradev-pkgowners --fasfile fasdata --email --pkgdbfile tmp/bugzilla   | sort | column -t
rstrode  gnome-desktop  rstrode_[AT]
spot     ntfs-3g        tcallawa_[AT]
than     kdebase        than_[AT]
thl      enigma         fedora_[AT]

fedoradev-pkgowners - Contributed by ThorstenLeemhuis aka knurd