summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md111
1 files changed, 84 insertions, 27 deletions
diff --git a/README.md b/README.md
index 67dad5f..91330b0 100644
--- a/README.md
+++ b/README.md
@@ -1,38 +1,95 @@
-Puppet Boostrap Module
-======================
+Debian packaging effort!
+========================
-This is a multi-purpose but very specific puppet module which can be used:
+In the past, we used to be [heavy slackware users](https://simplepkg.sarava.org) when we just
+had a few boxes to manage. Then we had to change our whole packaging paradigm when we switched
+to Debian.
-* As the base repository for a puppet infrastructure.
-* As a standalone provisioner for boxes, with Vagrant support.
-* It can be optionally used together with the Hydra Suite from https://git.sarava.org/?p=hydra.git
+These notes are mainly references to the detailed Debian/Ubuntu documentations we're using in
+the course of learning the intricacies of Debian packaging.
-Setting up a new puppetmaster repository
-----------------------------------------
+Configuration files
+-------------------
-You'll basically use the `bootstrap` repository as your `puppet` repository:
+All the commands in this guide assumes that you're using [these configuration
+files](https://git.sarava.org/?p=rhatto/dotfiles/debian.git;a=summary).
- git clone git://git.sarava.org/puppet-bootstrap.git puppet
- cd puppet && git tag -v # check integrity
- make deps # install dependencies
- make submodules # add all needed puppet module as as git submodules
- make config # basic configuration
+Starting a new package
+----------------------
-Using as a standalone provisioner
----------------------------------
+We use the `packages/` folder from this repo to store sources:
-This will be a `Vagrant` example:
+ mkdir package/$package
+ cd package/$package
- cd your-project
- git clone git://git.sarava.org/puppet-bootstrap.git puppet # use submodule or subtree as you please
- ln -s puppet/Vagrantfile # or copy if you want to customize
- ( cd puppet && make modules ) # need the mr binary to download the submodules
- vagrant up web # with no arguments, all defined VMs are started
+Build environment creation
+--------------------------
-Using subtrees or symlinks for modules
---------------------------------------
+The following steps needs to be run just once for each arch and distro version.
-You might use `make subtrees` instead of `make submodules`. Also, if you already have
-all the modules in a different subtree, use
+### Setup pbuilder chroots
- make symlinks MODULES=/path/to/puppet/modules
+ git-pbuilder create
+ DIST=wheezy git-pbuilder
+
+### Setup cowbuilder chroots
+
+ sudo mkdir /var/cache/pbuilder/sid-amd64
+ sudo -E cowbuilder --create
+
+ sudo mkdir /var/cache/pbuilder/wheezy-amd64
+ sudo -E DIST=wheezy cowbuilder --create
+
+Environment maintenance
+-----------------------
+
+These steps should be run once in a while to ensure we have an up to date packaging environment.
+
+### Pbuilder
+
+ DIST=sid git-pbuilder update
+ DIST=wheezy git-pbuilder update --override-config
+
+### Cowbuilder
+
+ DIST=sid sudo -E cowbuilder --update
+ DIST=wheezy sudo -E cowbuilder --update --override-config
+
+### Compatibility with git-buildpackage
+
+This is a workaround while we don't find a cleaner way to fix
+[this issue](http://ramblingfoo.blogspot.com.br/2012/10/howto-sudo-cowbuilder-git-buildpackage.html)
+with `git-buildpackage` not getting `~/.pbuilderrc` from the local user:
+
+ ( cd /var/cache/pbuilder/ && sudo ln -s sid-amd64/base.cow )
+
+Building
+--------
+
+ DIST=wheezy sudo -E cowbuilder --build $package*.dsc
+
+Uploading
+---------
+
+Simply run
+
+ dupload *changes
+
+This assumes a `~/.dupload.conf` like the following:
+
+ package config;
+ $default_host = "myremote";
+
+ $cfg{'myremote'} = {
+ fqdn => "myremote.example.org",
+ login => "user",
+ method => "scpb",
+ incoming => "/var/reprepro/incoming/",
+ # The dinstall on ftp-master sends emails itself
+ #dinstall_runs => 1,
+ };
+
+It's also important that:
+
+ 1. The host remote port is correctly defined at your `~/.ssh/config`.
+ 2. The user is in the `reprepro` group in the server.