pkg-wizard 0.1.25 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
data/docs/build-bot.md CHANGED
@@ -42,13 +42,23 @@ Starting a new build-bot for the first time:
42
42
 
43
43
  3. Change user ID to buildbot and change to the /home/buildbot directory
44
44
 
45
- `$ su buildbot && cd`
45
+ `$ su buildbot`
46
+
47
+ `$ cd /home/buildbot`
46
48
 
47
49
  4. Start the build-bot
48
50
 
49
- `$ pkgwiz build-bot --mock-profile frameos-6`
51
+ `$ pkgwiz build-bot -m epel-5-x86_64 --daemonize --log-format web`
52
+
53
+ This will start a build-bot listening in port 4567/tcp, using the mock profile from /etc/mock/epel-5-x86_64.cfg. From now on, the build-bot is ready to accept packages. Make sure the build-bot server firewall permits incoming traffic to port 4567/tcp.
54
+ The build-bot server logs to build-bot.log file in the current working directory.
55
+
56
+ 5. OPTIONAL (RHEL/Fedora only): enable pkgwiz-buildbot system service
57
+
58
+ If you want to start the build-bot automatically every time the system boots, run the following command:
59
+
60
+ `$ chkconfig pkgwiz-buildbot on`
50
61
 
51
- This will start a build-bot listening in port 4567/tcp, using the mock profile from /etc/mock/frameos-6.cfg. From now on, the build-bot is ready to accept packages.
52
62
 
53
63
  Have a look at [pkgwiz](pkgwiz.html) [remote-build](remote-build.html) to learn how to send packages to the build-bot.
54
64
 
data/lib/pkg-wizard.rb CHANGED
@@ -4,7 +4,7 @@ require 'mixlib/cli'
4
4
 
5
5
  module PKGWizard
6
6
 
7
- VERSION = '0.1.25'
7
+ VERSION = '0.1.26'
8
8
 
9
9
  class Distribution
10
10
  def self.detect
@@ -47,7 +47,12 @@ module PKGWizard
47
47
  abort_if_err "rpm -Uvh #{File.dirname(__FILE__)}/../../../packages/rbel5-release-1.0-1.el5.noarch.rpm --force"
48
48
  else
49
49
  end
50
+
51
+ puts "* Installing init script..."
52
+ FileUtils.cp File.dirname(__FILE__) + '/../../../resources/init-scripts/pkgwiz-buildbot', '/etc/init.d/'
53
+ abort_if_err "chkconfig --add pkgwiz-buildbot"
50
54
 
55
+ puts "* Installing dependencies..."
51
56
  abort_if_err "yum clean metadata"
52
57
  abort_if_err "yum install -y nodejs git rpm-build rpmdevtools mock createrepo yum-utils screen"
53
58
  elsif File.exist?('/etc/lsb-release') and \
@@ -0,0 +1,72 @@
1
+ #!/bin/sh
2
+ #
3
+ # pkgwiz build-bot - this script starts and stops the pkg-wizard build-bot
4
+ #
5
+ # chkconfig: - 85 15
6
+ # description: PKG Wizard Build Bot
7
+ # processname: build-bot
8
+ # config: /etc/sysconfig/pkgwiz-buildbot
9
+ # pidfile: /home/buildbot/build-bot.pid
10
+
11
+ # Source function library.
12
+ . /etc/rc.d/init.d/functions
13
+
14
+ # Source networking configuration.
15
+ . /etc/sysconfig/network
16
+
17
+ if [ -f /etc/sysconfig/pkgwiz-buildbot ];then
18
+ . /etc/sysconfig/pkgwiz-buildbot
19
+ else
20
+ echo "Config file not found in /etc/sysconfig/pkgwiz-buildbot. Aborting."
21
+ exit 1
22
+ fi
23
+
24
+ # Check that networking is up.
25
+ [ "$NETWORKING" = "no" ] && exit 0
26
+
27
+ if [ -z "$MOCK_PROFILE" ]; then
28
+ echo "Mock profile not defined in /etc/sysconfig/pkgwiz-buildbot. Aborting."
29
+ exit 1
30
+ fi
31
+
32
+ pkgwiz="/usr/bin/pkgwiz"
33
+ workingdir=/home/buildbot
34
+ user="buildbot"
35
+ prog=$(basename $pkgwiz)
36
+
37
+ start() {
38
+ echo -n $"Starting $prog: "
39
+ cd $workingdir && su $user -c "$pkgwiz build-bot --working-dir $workingdir --daemonize --log-format web -m $MOCK_PROFILE"
40
+ retval=$?
41
+ echo
42
+ return $retval
43
+ }
44
+
45
+ stop() {
46
+ echo -n $"Stopping $prog: "
47
+ kill `cat ${workingdir}/build-bot.pid`
48
+ retval=$?
49
+ echo
50
+ return $retval
51
+ }
52
+
53
+ restart() {
54
+ configtest_q || configtest || return 6
55
+ stop
56
+ start
57
+ }
58
+
59
+ case "$1" in
60
+ start)
61
+ $1
62
+ ;;
63
+ stop)
64
+ $1
65
+ ;;
66
+ restart)
67
+ restart
68
+ ;;
69
+ *)
70
+ echo $"Usage: $0 {start|stop|restart}"
71
+ exit 2
72
+ esac
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkg-wizard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 47
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 25
10
- version: 0.1.25
9
+ - 26
10
+ version: 0.1.26
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-08 00:00:00 +02:00
18
+ date: 2011-04-12 00:00:00 +02:00
19
19
  default_executable: pkgwiz
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -218,6 +218,7 @@ files:
218
218
  - packages/epel-release-6-5.noarch.rpm
219
219
  - packages/rbel5-release-1.0-1.el5.noarch.rpm
220
220
  - packages/rbel6-release-1.0-1.el6.noarch.rpm
221
+ - resources/init-scripts/pkgwiz-buildbot
221
222
  - resources/wslogview/index.html.tmpl
222
223
  - resources/wslogview/jquery.js
223
224
  - resources/wslogview/screen.css