Scripts for package maintainers

= 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!

getpackages
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).

- Contributed by Ignacio Vazquez-Abrams, modified to work with pkgdb by ToshioKuratomi

cpancheck
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.

- Contributed by Steven Pritchard, modified to work with pkgdb by VilleSkyttä

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

- Contributed by VilleSkyttä

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

- Originally by Michael Schwendt, tweaked by VilleSkyttä

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

bumpspecfile
Increase the Release value in a spec file and add a customisable changelog entry. Can be used for mass-rebuilds.

bumpspecfile.py - improved for Fedora Extras and further enhanced since

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

parseBZbugList
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.

- Contributed by Christian Iseli

- Contributed by Christian Iseli

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

Usage: owners-maint [options]

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 ("extras-qa@fedoraproject.org") --cc           Initial CC list

- Contributed by Steven Pritchard

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

- Contributed by Steven Pritchard

fedora-qa
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 or fedora-qa
 * 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/" 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

Makefile.common Addons
Not really a script but a Makefile that can be easily included and provides additional targets to Makefile.common. Please send  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_ ¹        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_    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_    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
Usage: 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 ) --epel            -- look epel owner(s) up --fasfile   -- get email or real name from fas-file ; download uri: https://admin.fedora.redhat.com/accounts/dump-group.cgi?group=cvsextras&format=csv --pkgdbfile -- get pkgowners from local file instead of downloading it from: https://admin.fedoraproject.org/pkgdb/acls/bugzilla?tg_format=plain --realname        -- print realname (needs --fasfile )

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

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

Examples: $ ./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] _redhat.com spot    ntfs-3g        tcallawa_[AT] _redhat.com than    kdebase        than_[AT] _redhat.com thl     enigma         fedora_[AT] _leemhuis.info

fedoradev-pkgowners - Contributed by ThorstenLeemhuis aka knurd