[xml/sgml] cvs-buildpackage quickstart
Ardo van Rangelrooij
Ardo van Rangelrooij <ardo@debian.org>
Thu, 6 Nov 2003 21:24:24 -0600
Mark Johnson (mrj@debian.org) wrote:
> > > P.S. If anyone needs help using cvs-buildpackage tools
> > > to put the stuff under CVS, I can give a quick summary.
> >
> > I would really appreciate that Mark, as working with cvs-buildpackage is
> > not something I have done before.
>
> Me neither, till yesterday.
>
> I still haven't learned how to upgrade to a new upstream version, I'll
> have to add that later.
cvs-upgrade <package_name> <new_version> <old_version>
Actually, I'm using a home-grown script that also updates the local checked
out version and updated the changelog:
#!/bin/bash
## ----------------------------------------------------------------------
## src-upgrade :
## ----------------------------------------------------------------------
## ----------------------------------------------------------------------
set -e
## ----------------------------------------------------------------------
package=${1}
upstream=${2}
debian=${3}
## ----------------------------------------------------------------------
cvs-upgrade ${package} ${upstream} ${debian}
cvs upd -jupstream_version_${debian//\./_} -jupstream_version_${upstream//\./_}
debchange --preserve --newversion ${upstream}-1 'New upstream release'
## ----------------------------------------------------------------------
and it's called the same as cvs-upgrade:
src-upgrade package_name new_version old_version
> BTW, this is from the HOWTO included with cvs-buildpackage:
>
> 1. Setting your environment
> --------------------------
> export CVS_RSH=ssh
> export CVSROOT=:ext:USERNAME@cvs.alioth.debian.org:/cvsroot/debian-xml-sgml
>
>
> 2. Defining modules
> -------------------
> Checkout CVSROOT and add module entries for your packages. Note
> that this isn't necessary, just convenient. It allows you to
> checkout your package by typing 'cvs co libxslt'
>
> In the CVSROOT/modules file, add a line for each package:
>
> libxslt packages/libxslt
>
> Then check it back in: cvs ci -m 'Added module for libxslt.
>
>
> 3. Putting sources into CVS
> ---------------------------
>
> Assuming you have created a set of files for upload, including the
> orig.tar.gz, the .dsc. and the diff.gz file, just type:
>
> cvs-inject <path to .dsc file>
For initial packages just copy the upstream tarball to the .orig.tar.gz
in /usr/local/src/Packages/<package_name> and use:
cvs-upgrade <package_name> <upstream_version>
> Expect to type your password a zillion times. I dunno how to get
> around this - maybe Ardo does. (Also, I'm not sure whether it
Did you put your public SSH key in ~/.ssh/authorized_keys on Alioth ???
Just do 'ssh alioth.debian.org' and setup your home directory.
> matters that /etc/cvsdeb.conf has 'conf_prefix=packages', but I'd
> check, just to be sure.)
My /etc/cvsdeb.conf doesn't have the prefix and I also don't like it. It
requires updating the CVSROOT/modules file. I prefer the packages to be
directly under the $ROOT. Less hassle.
> 4. Check out your sources, make changes, check them in
> ------------------------------------------------------
>
> cvs co libxslt
>
> [...make changes...]
>
> cvs ci -m 'Checkin message'
>
>
> 5. Build your packages from CVS
> -------------------------------
> From the top level directory of your checked out package tree, type:
>
> cvs-buildpackage -d -F -rfakeroot -kUSERNAME
You can put the following in your ~/.cvsdeb.conf so you don't have to type
the '-rfakeroot' all the time:
conf_rootcommand=fakeroot
Why do you use '-d'? That tells me if I missed something needed for the
build.
> - type password a few times, when prompted
>
> Your package should be built in /usr/local/src/Packages/libxslt
>
> Note: you might need to make the above directory first.
>
>
> That's it. Now you can upload the package as usual.
Don't forget to run it through 'pbuilder' which nicely checks whether you've
missed a build dependency.
Thanks,
Ardo
--
Ardo van Rangelrooij
home email: ardo@debian.org
home page: http://people.debian.org/~ardo
GnuPG fp: 3B 1F 21 72 00 5C 3A 73 7F 72 DF D9 90 78 47 F9