Merge lp:~kees/charms/precise/sbuild/trunk into lp:charms/sbuild

Proposed by Kees Cook
Status: Merged
Merged at revision: 4
Proposed branch: lp:~kees/charms/precise/sbuild/trunk
Merge into: lp:charms/sbuild
Diff against target: 235 lines (+71/-42)
12 files modified
README (+6/-6)
config.yaml (+8/-8)
hooks/config-changed (+18/-8)
hooks/install (+16/-16)
hooks/report (+2/-0)
hooks/start (+1/-1)
hooks/stop (+2/-1)
hooks/upgrade-charm (+9/-0)
hooks/wipe (+1/-0)
metadata.yaml (+4/-0)
revision (+1/-1)
slips (+3/-1)
To merge this branch: bzr merge lp:~kees/charms/precise/sbuild/trunk
Reviewer Review Type Date Requested Status
Mark Mims (community) Approve
Review via email: mp+111080@code.launchpad.net

Description of the change

Config updates, maintainer addition.

To post a comment you must log in.
Revision history for this message
Mark Mims (mark-mims) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2011-12-07 17:31:20 +0000
+++ README 2012-06-19 18:32:20 +0000
@@ -10,18 +10,18 @@
1010
11For example, to throw a bug-squashing party:11For example, to throw a bug-squashing party:
1212
13...configure juju and local.yaml for the password salt, distros, etc...13...configure juju and sbuild.yaml for the password salt, distros, etc...
1414
15juju boostrap15juju boostrap
16...time passes...16...time passes...
1717
18juju deploy --config local.yaml --repository /scratch/ubuntu/vcs/juju/examples local:sbuild builder-debian18juju deploy --config sbuild.yaml --repository /scratch/ubuntu/vcs/juju/examples local:sbuild builder-bsp
19juju add-unit builder-debian19juju add-unit builder-bsp
20juju add-unit builder-debian20juju add-unit builder-bsp
21juju add-unit builder-debian21juju add-unit builder-bsp
22...22...
2323
24...time passes...24...time passes...
2525
26# Dump reports printable on little slips of paper to hand out at the party:26# Dump reports printable on little slips of paper to hand out at the party:
27./slips | mpage -1 | lp27./slips builder-bsp | mpage -1 | lp
2828
=== modified file 'config.yaml'
--- config.yaml 2011-11-19 22:12:33 +0000
+++ config.yaml 2012-06-19 18:32:20 +0000
@@ -8,11 +8,11 @@
8 default: unset8 default: unset
9 description: Salt for generating builder accounts.9 description: Salt for generating builder accounts.
10 validator: '.{8,}'10 validator: '.{8,}'
11 distro:11 chroots:
12 type: string12 type: string
13 default: ubuntu13 default: ubuntu:quantal
14 description: Which distribution to create a build environment for.14 description: Space-separated list of distro:release,release to create chroots for.
15 releases:15 packages:
16 type: string16 type: string
17 default: precise17 default: ""
18 description: Comma-separated list of releases to create chroots for.18 description: Comma-separated list of extra packages to install in chroots.
1919
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2011-11-19 22:12:33 +0000
+++ hooks/config-changed 2012-06-19 18:32:20 +0000
@@ -1,4 +1,5 @@
1#!/bin/bash1#!/bin/bash
2set -ex
23
3USERNAME=$(config-get username)4USERNAME=$(config-get username)
4SALT=$(config-get salt)5SALT=$(config-get salt)
@@ -7,8 +8,11 @@
7juju-log "On $JUJU_UNIT_NAME $USERNAME password is '$password'"8juju-log "On $JUJU_UNIT_NAME $USERNAME password is '$password'"
8echo "$USERNAME:$password" | chpasswd9echo "$USERNAME:$password" | chpasswd
910
10DISTRO=$(config-get distro)11CHROOTS=$(config-get chroots)
11RELEASES=$(config-get releases)12PACKAGES=$(config-get packages)
13if [ -n "$PACKAGES" ]; then
14 PACKAGES="--debootstrap-include=$PACKAGES"
15fi
1216
13ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)17ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
14arches=$ARCH18arches=$ARCH
@@ -16,12 +20,18 @@
16 arches="$arches i386"20 arches="$arches i386"
17fi21fi
18for arch in $arches; do22for arch in $arches; do
19 for rel in $(echo $RELEASES | sed -e 's/,/ /g'); do23 for item in $CHROOTS; do
20 source=$rel-$arch24 distro=$(echo "$item" | cut -d: -f1)
21 if ! schroot -l | egrep -q "^source:$source$"; then25 releases=$(echo "$item" | cut -d: -f2)
22 juju-log "Building $DISTRO $rel $arch environment."26 for rel in $(echo $releases | sed -e 's/,/ /g'); do
23 EDITOR=cat su -c "/usr/bin/mk-sbuild --distro $DISTRO --arch $arch $rel" $USERNAME27 source=$rel-$arch
24 fi28 if ! schroot -l | egrep -q "^source:$source$"; then
29 juju-log "Building $distro $rel $arch environment."
30 EDITOR=cat su -c "/usr/bin/mk-sbuild --distro $distro --arch $arch $PACKAGES $rel" $USERNAME
31 fi
32 done
25 done33 done
26done34done
27perl -pi -e 's/^#source-root-groups=/source-root-groups=/g' /etc/schroot/chroot.d/*35perl -pi -e 's/^#source-root-groups=/source-root-groups=/g' /etc/schroot/chroot.d/*
36
37exit 0
2838
=== modified file 'hooks/install'
--- hooks/install 2012-04-16 21:15:04 +0000
+++ hooks/install 2012-06-19 18:32:20 +0000
@@ -1,5 +1,5 @@
1#!/bin/bash1#!/bin/bash
2set -e2set -ex
33
4USERNAME=$(config-get username)4USERNAME=$(config-get username)
5DISTRO=$(config-get distro)5DISTRO=$(config-get distro)
@@ -46,18 +46,18 @@
46 su -c "sbuild-update --keygen" $USERNAME46 su -c "sbuild-update --keygen" $USERNAME
47fi47fi
4848
49ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)49rm -f /etc/update-motd.d/98-cloudguest
50arches=$ARCH50cat >/etc/update-motd.d/98-sbuild <<EOM
51if [ "$arches" = "amd64" ]; then51#!/bin/bash
52 arches="$arches i386"52echo ""
53fi53echo "###################################################################"
54for arch in $arches; do54echo "# Welcome to your own personal 'sbuild' machine. For details see: #"
55 for rel in $(echo $RELEASES | sed -e 's/,/ /g'); do55echo "# #"
56 source=$rel-$arch56echo "# http://wiki.debian.org/BSP/2011/12/us/Portland/Builders #"
57 if ! schroot -l | egrep -q "^source:$source$"; then57echo "# http://wiki.debian.org/mk-sbuild #"
58 juju-log "Building $DISTRO $rel $arch environment."58echo "# #"
59 EDITOR=cat su -c "/usr/bin/mk-sbuild --distro $DISTRO --arch $arch $rel" $USERNAME59echo "###################################################################"
60 fi60EOM
61 done61chmod a+rx /etc/update-motd.d/98-sbuild
62done62
63perl -pi -e 's/^#source-root-groups=/source-root-groups=/g' /etc/schroot/chroot.d/*63exit 0
6464
=== modified file 'hooks/report'
--- hooks/report 2011-11-19 22:12:33 +0000
+++ hooks/report 2012-06-19 18:32:20 +0000
@@ -1,4 +1,6 @@
1#!/bin/bash1#!/bin/bash
2set -ex
3
2EXTERNAL="$1"4EXTERNAL="$1"
35
4if [ -n "$JUJU_UNIT_NAME" ]; then6if [ -n "$JUJU_UNIT_NAME" ]; then
57
=== modified file 'hooks/start'
--- hooks/start 2011-11-19 22:12:33 +0000
+++ hooks/start 2012-06-19 18:32:20 +0000
@@ -1,3 +1,3 @@
1#!/bin/bash1#!/bin/bash
2set -e2set -ex
3exit 03exit 0
44
=== modified file 'hooks/stop'
--- hooks/stop 2011-11-19 22:12:33 +0000
+++ hooks/stop 2012-06-19 18:32:20 +0000
@@ -1,3 +1,4 @@
1#!/bin/bash1#!/bin/bash
2set -e2set -ex
3schroot -e --all-sessions3schroot -e --all-sessions
4exit 0
45
=== modified symlink 'hooks/upgrade-charm' (properties changed: -x to +x)
=== target was u'install'
--- hooks/upgrade-charm 1970-01-01 00:00:00 +0000
+++ hooks/upgrade-charm 2012-06-19 18:32:20 +0000
@@ -0,0 +1,9 @@
1#!/bin/bash
2set -ex
3
4hooks/stop
5hooks/install
6hooks/config-changed
7hooks/start
8
9exit 0
010
=== modified file 'hooks/wipe'
--- hooks/wipe 2011-11-19 22:12:33 +0000
+++ hooks/wipe 2012-06-19 18:32:20 +0000
@@ -1,3 +1,4 @@
1#!/bin/bash1#!/bin/bash
2set -ex
2schroot -e --all-sessions3schroot -e --all-sessions
3rm -rf /var/lib/schroot/chroots/* /etc/schroot/chroot.d/*4rm -rf /var/lib/schroot/chroots/* /etc/schroot/chroot.d/*
45
=== modified file 'metadata.yaml'
--- metadata.yaml 2011-11-19 22:12:33 +0000
+++ metadata.yaml 2012-06-19 18:32:20 +0000
@@ -2,3 +2,7 @@
2summary: "sbuild environment"2summary: "sbuild environment"
3description: |3description: |
4 Installs an sbuild and schroot environment for package building.4 Installs an sbuild and schroot environment for package building.
5maintainer: Kees Cook <kees@ubuntu.com>
6provides:
7 package-builder:
8 interface: sbuild
59
=== modified file 'revision'
--- revision 2011-11-19 22:12:33 +0000
+++ revision 2012-06-19 18:32:20 +0000
@@ -1,1 +1,1 @@
117122
22
=== modified file 'slips' (properties changed: -x to +x)
--- slips 2011-12-07 17:31:20 +0000
+++ slips 2012-06-19 18:32:20 +0000
@@ -2,8 +2,10 @@
2# Produce per-machine reports to be handed out on slips of paper.2# Produce per-machine reports to be handed out on slips of paper.
3set -e3set -e
44
5SERVICE="$1"
6
5juju status 2>/dev/null | \7juju status 2>/dev/null | \
6 egrep 'builder-debian/|public-address' | \8 egrep "$SERVICE/|public-address" | \
7 sed '$!N;s/\n/ /;s/://;s/\//-/' | \9 sed '$!N;s/\n/ /;s/://;s/\//-/' | \
8 awk '{print $1 " " $3}' | \10 awk '{print $1 " " $3}' | \
9while read unit host; do11while read unit host; do

Subscribers

People subscribed via source and target branches

to all changes: