Version 1 (modified by Bruno Cornec, 12 years ago) (diff)


Example of pb usage with the buffer project

Buffer is a tool used by the MondoRescue? project and I needed to create packages for it, in order to ease the installation of mondo on distributions as they require it.

The first step is to create the project structure with the newproj command. For that to work you first need to edit your $HOME/.pbrc configuration file and add in it the following:

pbconfurl buffer = svn+ssh://

Of course replace that reference by a reference to which you really have access in your case. Once done, ask pb to generate its structure, jst giving the name of the project (-p) and the release you're packaging (-r):

pb -p buffer -r 1.19 newproj
Adding /users/bruno/pb/projects/buffer to SVN... A         /users/bruno/pb/projects/buffer
Updating /users/bruno/pb/projects/buffer... À la révision 456.
Adding /users/bruno/pb/projects/buffer/pbconf to SVN... A         /users/bruno/pb/projects/buffer/pbconf
A         /users/bruno/pb/projects/buffer/pbconf/1.19
A         /users/bruno/pb/projects/buffer/pbconf/1.19/buffer.pb
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/rpm
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/rpm/pkg1.spec
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/changelog
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/control
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/pkg1.dirs
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/compat
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/rules
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/copyright
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/pbfilter
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/novell.pbf
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/rpm.pbf
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/all.pbf
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/deb.pbf
A         /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/md.pbf
Updating /users/bruno/pb/projects/buffer/pbconf... À la révision 456.
Checking in /users/bruno/pb/projects/buffer... Ajout          buffer
Ajout          buffer/pbconf
Ajout          buffer/pbconf/1.19
Ajout          buffer/pbconf/1.19/buffer.pb
Ajout          buffer/pbconf/1.19/pbfilter
Ajout          buffer/pbconf/1.19/pbfilter/all.pbf
Ajout          buffer/pbconf/1.19/pbfilter/deb.pbf
Ajout          buffer/pbconf/1.19/pbfilter/md.pbf
Ajout          buffer/pbconf/1.19/pbfilter/novell.pbf
Ajout          buffer/pbconf/1.19/pbfilter/rpm.pbf
Ajout          buffer/pbconf/1.19/pkg1
Ajout          buffer/pbconf/1.19/pkg1/deb
Ajout          buffer/pbconf/1.19/pkg1/deb/changelog
Ajout          buffer/pbconf/1.19/pkg1/deb/compat
Ajout          buffer/pbconf/1.19/pkg1/deb/control
Ajout          buffer/pbconf/1.19/pkg1/deb/copyright
Ajout          buffer/pbconf/1.19/pkg1/deb/pkg1.dirs
Ajout          buffer/pbconf/1.19/pkg1/deb/
Ajout          buffer/pbconf/1.19/pkg1/deb/rules
Ajout          buffer/pbconf/1.19/pkg1/pbfilter
Ajout          buffer/pbconf/1.19/pkg1/rpm
Ajout          buffer/pbconf/1.19/pkg1/rpm/pkg1.spec
Transmission des données ..............
Révision 457 propagée.
Updating /users/bruno/pb/projects/buffer... À la révision 457.
Project: buffer
Action: newproj

Now you "just" need to edit those configuration files to review them and prepare your build of packages.

grep -Ev '^#|^$' buffer/pbconf/1.19/buffer.pb
pburl buffer =
pbrepo buffer =
pbwf buffer = 1
pbpackager buffer = Bruno Cornec <>
sshhost buffer =
sshlogin buffer = buffer
sshdir buffer = /mondo/ftp
sshport buffer = 22
projver buffer = 1.19
projtag buffer = 1
testver buffer = true
defpkgdir buffer = dir-buffer

pbrepo indicates where the resulting packages will be available for download. pbwf indicates whether the tar file is well-formed (it should contain a directory with name-verion). The ssh* variables indicates where will packages be uploaded at the end of the build. And the name of the directory for defpkgdir is not important as we do not dal with a local CMS.