| 1 | = Example of pb usage with the buffer project = |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | 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: |
| 6 | {{{ |
| 7 | pbconfurl buffer = svn+ssh://svn.mondorescue.org/mondo/svn/pb/projects/buffer/pbconf |
| 8 | }}} |
| 9 | |
| 10 | Of course replace that reference by a reference to which you really have access in your case. |
| 11 | Once done, ask pb to generate its structure, jst giving the name of the project (-p) and the release you're packaging (-r): |
| 12 | {{{ |
| 13 | pb -p buffer -r 1.19 newproj |
| 14 | Adding /users/bruno/pb/projects/buffer to SVN... A /users/bruno/pb/projects/buffer |
| 15 | OK |
| 16 | Updating /users/bruno/pb/projects/buffer... À la révision 456. |
| 17 | OK |
| 18 | Adding /users/bruno/pb/projects/buffer/pbconf to SVN... A /users/bruno/pb/projects/buffer/pbconf |
| 19 | A /users/bruno/pb/projects/buffer/pbconf/1.19 |
| 20 | A /users/bruno/pb/projects/buffer/pbconf/1.19/buffer.pb |
| 21 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1 |
| 22 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/rpm |
| 23 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/rpm/pkg1.spec |
| 24 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb |
| 25 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/changelog |
| 26 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/control |
| 27 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/pkg1.dirs |
| 28 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/pkg1.docs |
| 29 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/compat |
| 30 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/rules |
| 31 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/deb/copyright |
| 32 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pkg1/pbfilter |
| 33 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter |
| 34 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/novell.pbf |
| 35 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/rpm.pbf |
| 36 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/all.pbf |
| 37 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/deb.pbf |
| 38 | A /users/bruno/pb/projects/buffer/pbconf/1.19/pbfilter/md.pbf |
| 39 | OK |
| 40 | Updating /users/bruno/pb/projects/buffer/pbconf... À la révision 456. |
| 41 | OK |
| 42 | Checking in /users/bruno/pb/projects/buffer... Ajout buffer |
| 43 | Ajout buffer/pbconf |
| 44 | Ajout buffer/pbconf/1.19 |
| 45 | Ajout buffer/pbconf/1.19/buffer.pb |
| 46 | Ajout buffer/pbconf/1.19/pbfilter |
| 47 | Ajout buffer/pbconf/1.19/pbfilter/all.pbf |
| 48 | Ajout buffer/pbconf/1.19/pbfilter/deb.pbf |
| 49 | Ajout buffer/pbconf/1.19/pbfilter/md.pbf |
| 50 | Ajout buffer/pbconf/1.19/pbfilter/novell.pbf |
| 51 | Ajout buffer/pbconf/1.19/pbfilter/rpm.pbf |
| 52 | Ajout buffer/pbconf/1.19/pkg1 |
| 53 | Ajout buffer/pbconf/1.19/pkg1/deb |
| 54 | Ajout buffer/pbconf/1.19/pkg1/deb/changelog |
| 55 | Ajout buffer/pbconf/1.19/pkg1/deb/compat |
| 56 | Ajout buffer/pbconf/1.19/pkg1/deb/control |
| 57 | Ajout buffer/pbconf/1.19/pkg1/deb/copyright |
| 58 | Ajout buffer/pbconf/1.19/pkg1/deb/pkg1.dirs |
| 59 | Ajout buffer/pbconf/1.19/pkg1/deb/pkg1.docs |
| 60 | Ajout buffer/pbconf/1.19/pkg1/deb/rules |
| 61 | Ajout buffer/pbconf/1.19/pkg1/pbfilter |
| 62 | Ajout buffer/pbconf/1.19/pkg1/rpm |
| 63 | Ajout buffer/pbconf/1.19/pkg1/rpm/pkg1.spec |
| 64 | Transmission des données .............. |
| 65 | Révision 457 propagée. |
| 66 | OK |
| 67 | Updating /users/bruno/pb/projects/buffer... À la révision 457. |
| 68 | OK |
| 69 | Project: buffer |
| 70 | Action: newproj |
| 71 | }}} |
| 72 | |
| 73 | Now you "just" need to edit those configuration files to review them and prepare your build of packages. |
| 74 | {{{ |
| 75 | grep -Ev '^#|^$' buffer/pbconf/1.19/buffer.pb |
| 76 | pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz |
| 77 | pbrepo buffer = ftp://ftp.mondorescue.org |
| 78 | pbwf buffer = 1 |
| 79 | pbpackager buffer = Bruno Cornec <bruno@project-builder.org> |
| 80 | sshhost buffer = www.mondorescue.org |
| 81 | sshlogin buffer = buffer |
| 82 | sshdir buffer = /mondo/ftp |
| 83 | sshport buffer = 22 |
| 84 | projver buffer = 1.19 |
| 85 | projtag buffer = 1 |
| 86 | testver buffer = true |
| 87 | defpkgdir buffer = dir-buffer |
| 88 | }}} |
| 89 | |
| 90 | 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. |
| 91 | |