Merge lp:~patrick-hetu/charms/precise/ppabuilder/trunk into lp:~gandelman-a/charms/precise/ppabuilder/trunk

Proposed by Patrick Hetu
Status: Merged
Merged at revision: 2
Proposed branch: lp:~patrick-hetu/charms/precise/ppabuilder/trunk
Merge into: lp:~gandelman-a/charms/precise/ppabuilder/trunk
Diff against target: 83 lines (+24/-5)
3 files modified
hooks/install (+19/-4)
hooks/scripts/inoticoming.sh (+4/-0)
revision (+1/-1)
To merge this branch: bzr merge lp:~patrick-hetu/charms/precise/ppabuilder/trunk
Reviewer Review Type Date Requested Status
Adam Gandelman Pending
Review via email: mp+111333@code.launchpad.net

Description of the change

I added inoticoming to detect incoming source package and build them with rebuildd plus other minor fixes. Don't be afraid to ask me if you want more details.

Note that the charm will not work until this bug is fixed:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=671635

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/install'
2--- hooks/install 2012-01-02 08:44:09 +0000
3+++ hooks/install 2012-06-21 04:49:20 +0000
4@@ -1,7 +1,7 @@
5 #!/bin/bash
6 set -e
7
8-PACKAGES="dpkg-dev devscripts rebuildd reprepro apache2"
9+PACKAGES="dpkg-dev devscripts rebuildd reprepro apache2 inoticoming pbuilder"
10 # added for testing
11 PACKAGES="$PACKAGES cdbs quilt dpatch"
12 BASE_DIR=$(config-get repo-directory)
13@@ -48,7 +48,7 @@
14 DebIndices: Packages Release . .gz .bz2
15 DscIndices: Sources Release .gz .bz2
16 Tracking: all includechanges keepsources
17-Log: logfile
18+Log: logs/reprepro.log
19 --changes $BASE_DIR/bin/build_sources
20
21 END
22@@ -89,6 +89,7 @@
23 mkdir -p $BASE_DIR/incoming
24 mkdir -p $BASE_DIR/incomingtmp
25 mkdir -p $BASE_DIR/bin
26+mkdir -p $BASE_DIR/logs
27 chmod -R 755 $BASE_DIR
28
29 create_distros
30@@ -102,7 +103,7 @@
31 IncomingDir: incoming
32 Allow: $(config-get supported-releases)
33 Cleanup: on_deny on_error
34-Tempdir: incomingt
35+Tempdir: incomingtmp
36 END
37
38 [[ -e /etc/apache2/sites-enabled/000-default ]] &&
39@@ -144,7 +145,7 @@
40 # not sure why this fails.
41 rebuildd init || true
42
43-/etc/init.d/rebuildd start
44+service rebuildd start
45
46 # we need to setup access to the local sources. rebuildd will fetch
47 # from there to build.
48@@ -175,5 +176,19 @@
49 # install scripts needed by both reprepro + rebuildd
50 cp hooks/scripts/* $BASE_DIR/bin/
51
52+cat >/etc/init/inoticoming.conf <<END
53+description "inoticoming Daemon"
54+
55+start on filesystem
56+stop on runlevel [016]
57+
58+script
59+ cd $BASE_DIR
60+ inoticoming --foreground --logfile logs/inoticoming.log --pid-file inoticoming.pid incoming --suffix .changes --stderr-to-log $BASE_DIR/bin/inoticoming.sh {} \;
61+end script
62+END
63+
64+service inoticoming start
65+
66 open-port 80
67 open-port 9998
68
69=== added file 'hooks/scripts/inoticoming.sh'
70--- hooks/scripts/inoticoming.sh 1970-01-01 00:00:00 +0000
71+++ hooks/scripts/inoticoming.sh 2012-06-21 04:49:20 +0000
72@@ -0,0 +1,4 @@
73+#!/bin/bash
74+
75+sleep 30 # 30 seconds to be sure that all files arrived
76+reprepro --silent --basedir /srv/reprepro/ --waitforlock 1000 processincoming incoming $1
77
78=== modified file 'revision'
79--- revision 2012-01-02 08:44:09 +0000
80+++ revision 2012-06-21 04:49:20 +0000
81@@ -1,1 +1,1 @@
82-6
83+7

Subscribers

People subscribed via source and target branches

to all changes: