Getting upstream sources for CVS packages
This is my "note to self" page about getting upstream source packages from Fedora CVS. It's something I need during my summer project .
CVS checkout
An example of an anonymous CVS checkout here. Basics taken from PackageMaintainers/UsingCvsFaq
export CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs cvs login <hit enter> cvs co libtar
Now we have something like this: http://cvs.fedora.redhat.com/anatomy.shtml
There's also a way of getting the "sources" file (needed below) with a single cvs command like this:
cvs -d :pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs co libtar/F-7/sources
or rather:
cvs -d :pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs export -r HEAD libtar/F-7/sources
which just downloads the file without any version control information
or even:
cvs -q -d :pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs co -p -r HEAD libtar/F-7/sources
which prints the "sources" file into standard output (-p) and nothing else (-q). Maybe just catch this output in Python and parse it, no need for temp files then?
Downloading the sources
We're still missing the actual sources, because they are not kept in the CVS. The location of the source files is [1] , but that can't be browsed, you need to know the actual filename/path to get anything from there. This is where the file "sources" comes in. That file has a list of the source files/gzips with md5sums. And with the help of that data, you can download the actual file.
The URL format is http://cvs.fedora.redhat.com/repo/pkgs/<package name>/<filename>/<md5sum of that file>/<filename again>
For example http://cvs.fedora.redhat.com/repo/pkgs/libtar/libtar-1.2.11.tar.gz/604238e8734ce6e25347a58c4f1a1d7e/libtar-1.2.11.tar.gz
What I need to do
1. CVS checkout a package. Or maybe just the "sources" file could be checked out? 1. Parse the "sources" file 1. Download the source package(s) and extract them into a temporary folder 1. Find the man file and make a wiki page of it (this already works)
Comments
If you have any comments or ideas on how I could do this efficiently, please leave them here :)
ThorstenLeemhuis: run "make tag" in the checkout directory (foo/F-7/ for example); run "make help" to learn more