Debian Developers - How to use svn(-buildpackage) with pbuilder?

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > August 2005 > How to use svn(-buildpackage) with pbuilder?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to use svn(-buildpackage) with pbuilder?
W. Borgert

2005-07-31, 7:48 am

Hi,

what is the right/best way to build packages from SVN using
pbuilder? I am new to both, please be patient.

Suppose, I have a package with complete upstream sources (no
tarballs) under svn://svn.debian.org/svn/pkg-greetings/hello/
with the subdirectories branches/, tags/, and trunk/.

- How do I have to arrange the repository, so that
svn-buildpackage differentiates correctly upstream and debian
stuff? Is it correct to have the upstream source only under
pkg-greetings/hello/tags/1.0/ and the complete debianised tree
under pkg-greetings/hello/tags/1.0-1/? Or do I have to put
the upstream under pkg-greetings/hello/branches/upstream/1.0/?

- How do I call svn-buildpackage, so that pbuilder is used? Is
--svn-builder=pdebuild enough?

- Has somebody a good build script that does all steps
automatically? 1. checkout from svn, 2. build in pbuilder,
3. run linda, 4. run lintian, 5. run piuparts.

Many thanks in advance!

Cheers, WB


--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Yaroslav Halchenko

2005-07-31, 7:48 am

On Sun, Jul 31, 2005 at 09:59:04AM +0000, W. Borgert wrote:
> - How do I have to arrange the repository, so that

better use arrangement which svn-buildpackage creates
branches trunk tags upstream build-area and tarballs
> under pkg-greetings/hello/tags/1.0-1/? Or do I have to put
> the upstream under pkg-greetings/hello/branches/upstream/1.0/?

svn-inject and consequently svn-upgrade does it for you

> - How do I call svn-buildpackage, so that pbuilder is used? Is
> --svn-builder=pdebuild enough?

I'm using
svn-buildpackage --svn-lintian --svn-builder="pdebuild --buildresult
`pwd`/../build-area --auto-debsign "
borrowed from a nice minimalistic HOWTO
http://workaround.org/moin/SvnBuildpackage

> - Has somebody a good build script that does all steps
> automatically? 1. checkout from svn, 2. build in pbuilder,
> 3. run linda, 4. run lintian, 5. run piuparts.

I did without 3 and 5 with a given above commands. But it is easy to add
3 and 5 just add them to --svn-postbuild as IT IS SAID IN THE MAN PAGE:


--svn-prebuild, --svn-postbuild, --svn-pretag, --svn-posttag
Commands (hooks) to be executed before/after the build/tag com-
mand invocations. Examples to fetch the orig tarball from a
local pool (trying pool/libX/... to):

svn-buildpackage --svn-prebuild='a="wget -c http://mymir-
ror/debian/main/pool/";b="/$package/${package}_${upstream_ver-
sion}.orig.tar.gz"; $a$(echo $package|cut -c0-1)$b || $a$(echo
$package | cut -c0-4)$b'
Multiple retries with a bashism:
svn-buildpackage --svn-prebuild='wget -c http://mymir-
ror/debian/main/pool/{`echo $package | cut -c0-1`,`echo $package
| cut -c0-4`}/$package/${package}_${upstream_ver-
sion}.orig.tar.gz'
Or using a bounty, see below...
svn-b --svn-prebuild="wget http://mymir-
ror/debian/main/pool/$guess_loc"

> Many thanks in advance!

You are welcome :-)
--
.-.
=------------------------------ /v\ ----------------------------=
Keep in touch // \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko /( )\ ICQ#: 60653192
Linux User ^^-^^ [175555]



Florian Ragwitz

2005-08-01, 8:32 am

On Sun, Jul 31, 2005 at 07:03:14AM -0400, Yaroslav Halchenko wrote:
> On Sun, Jul 31, 2005 at 09:59:04AM +0000, W. Borgert wrote:
>
> better use arrangement which svn-buildpackage creates
> branches trunk tags upstream build-area and tarballs
>
>
> svn-inject and consequently svn-upgrade does it for you
>
> [...]
>
> borrowed from a nice minimalistic HOWTO
> http://workaround.org/moin/SvnBuildpackage


This howto says that I should use -c 2 to get tarballs/ created. Why is
that necessary? The tarball also could be created from
../branches/upstream/current (relative to trunk (either in the local fs
or in the svn repository).

I don't want to have all revisions of the package that ever existed on
my filesystem. Is it possible to make svn-buildpackage create the
tarballs on build-time?


Regards,
Flo

--
BOFH excuse #315:
The recent proliferation of Nuclear Testing

Matthijs Mohlmann

2005-08-01, 8:32 am

Hi,

Florian Ragwitz wrote:
> On Sun, Jul 31, 2005 at 07:03:14AM -0400, Yaroslav Halchenko wrote:
>
>
>
> This howto says that I should use -c 2 to get tarballs/ created. Why is
> that necessary? The tarball also could be created from
> ../branches/upstream/current (relative to trunk (either in the local fs
> or in the svn repository).
>

-c 2 makes the layout in svn. But you can have only the debian directory
under version control, have a tarballs directory and have set the
property mergeWithUpstream in svn.

> I don't want to have all revisions of the package that ever existed on
> my filesystem. Is it possible to make svn-buildpackage create the
> tarballs on build-time?
>

AFAIK it isn't possible.

>
> Regards,
> Flo
>


Regards,

Matthijs Mohlmann

Tyler Trafford

2005-08-01, 8:49 pm

Florian Ragwitz wrote:
> On Sun, Jul 31, 2005 at 07:03:14AM -0400, Yaroslav Halchenko wrote:
>
>
>
> This howto says that I should use -c 2 to get tarballs/ created. Why is
> that necessary? The tarball also could be created from
> ../branches/upstream/current (relative to trunk (either in the local fs
> or in the svn repository).
>
> I don't want to have all revisions of the package that ever existed on
> my filesystem. Is it possible to make svn-buildpackage create the
> tarballs on build-time?


Sure, I followed the exact howto, except left out the -c2, and
everything works perfectly.


--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
W. Borgert

2005-08-02, 6:06 pm

On Sun, Jul 31, 2005 at 07:03:14AM -0400, Yaroslav Halchenko wrote:
> borrowed from a nice minimalistic HOWTO
> http://workaround.org/moin/SvnBuildpackage


That is indeed a very helpful HOWTO. Thanks!

> 3 and 5 just add them to --svn-postbuild as IT IS SAID IN THE MAN PAGE:


:-) OK, thanks.

One more question, I could not answer myself from reading the
man page:

If I have the complete upstream source in SVN, but not the
..tar.gz, how do I create the .orig.tar.gz, when I have a new
upstream version?

Cheers,
--
W. Borgert <debacle@debian.org>, http://people.debian.org/~debacle/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Clément Stenac

2005-08-02, 6:06 pm

Hello,

> If I have the complete upstream source in SVN, but not the
> .tar.gz, how do I create the .orig.tar.gz, when I have a new
> upstream version?


Use "svn export" to create a dist of the svn tree, without the control
folders.

Regards,

--
Clément


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
W. Borgert

2005-08-03, 7:50 am

On Tue, Aug 02, 2005 at 03:49:54PM -0400, Yaroslav Halchenko wrote:
> Look down the thread -- your question was answered:
>
> Date: Mon, 01 Aug 2005 16:03:03 +0200
> From: Arjan Oosting <arjanoosting@home.nl>
>
> It is, the orig.tar.gz is created if you do a
> FORCEEXPORT=yes svn-buildpackage


Works OK, thanks. There should be an automatised way: If it's a
'xxx-1' version (first package of an upstream release), the
..orig.tar.gz should be created, otherwise not.

Cheers, WB


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Russ Allbery

2005-08-03, 7:51 am

W Borgert <debacle@debian.org> writes:
> On Tue, Aug 02, 2005 at 03:49:54PM -0400, Yaroslav Halchenko wrote:
[vbcol=seagreen]
> Works OK, thanks. There should be an automatised way: If it's a
> 'xxx-1' version (first package of an upstream release), the
> .orig.tar.gz should be created, otherwise not.


I'm not sure why someone would want to do this rather than using the
svn-buildpackage support for a separate tarballs directory. Maybe because
the tarballs directory itself isn't in Subversion and therefore isn't
easily accessible to any system with access to the repository? That could
be easily fixed....

I think it's very important to use the upstream tarball exactly as it was
downloaded from upstream whenever possible, since that way (as previously
mentioned) signatures are still valid, MD5 checksums are still valid, etc.
The exception would be when you have to repackage upstream because of
non-free files or similar problems.

--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com