[coreboot] Patchwork update script

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Sep 22 02:46:52 CEST 2009


here's the script I'm using to set the status of flashrom patches in
patchwork to "Accepted".
The web interface only allows you to set the status, but it does not
allow you to set a commit ID. With pwclient (part of patchwork) you can
do that.

My script simply retrieves a patch (-p0) for a given numeric commit ID
(without leading r), hashes it with the special patchwork hash (which is
somewhat tolerant of context and order changes), then uses pwclient to
set the patch status for that hash to "Accepted" and the commit ID to "r$1".
If the patch (-p0) can't be found, it retrieves a patch (-p1) for the
commit ID.

update-patchwork 1234

You might want to adjust a few paths for coreboot usage and for your
local installation.

Requirements for this script:
- A local patchwork source (or installation)
- ~/.pwclientrc (downloaded from the patchwork web interface)

Where can you get .pwclientrc?
Go to http://patchwork.coreboot.org/project/ and log in. Then click on
your preferred project, then click on "project info". There you find:
"Sample patchwork client configuration for this project: .pwclientrc."
Download .pwclientrc and fill in your patchwork password, then store it
in your $HOME.

I hope this helps others reduce patchwork maintenance efforts.


# Install this script as update-patchwork in your $PATH
# and call it with the revision number as parameter.
test -z "$1" && { echo "No revision provided."; exit 1; }
hashcand=$(svn diff -c $revision svn://coreboot.org/flashrom/trunk/|python /sources/tmptrees/patchwork/apps/patchwork/parser.py --hash)
/sources/tmptrees/patchwork/apps/patchwork/bin/pwclient update -s Accepted -c r$revision -h $hashcand && { echo "done"; exit 0; }
hashcand=$(svn diff -c $revision svn://coreboot.org/flashrom/|python /sources/tmptrees/patchwork/apps/patchwork/parser.py --hash)
/sources/tmptrees/patchwork/apps/patchwork/bin/pwclient update -s Accepted -c r$revision -h $hashcand && { echo "done"; exit 0; }
echo "No matching patch in patchwork found."
exit 1


More information about the coreboot mailing list