pkg-wizard 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ ### Package Wizard
2
+
3
+ Ruby library and tools to deal with RPM packager tasks.
4
+
5
+ ### Installation
6
+
7
+ Have a look at:
8
+
9
+ [http://pkg-wizard.frameos.org](http://pkg-wizard.frameos.org)
10
+
11
+ In a nutshell:
12
+
13
+ * RHEL/Fedora
14
+
15
+ `yum install rubygems &% gem install pkg-wizard`
16
+
17
+ * Debian/Ubuntu
18
+
19
+ `apt-get install build-essential ruby1.8-dev mock rpm yum git-core createrepo && gem install pkg-wizard`
20
+
21
+ ### Requirements
22
+
23
+ Git >= 1.7
24
+
25
+ ### Copyright
26
+
27
+ Copyright (c) 2011 Sergio Rubio <rubiojr@frameos.org>. See LICENSE.txt for
28
+ further details.
29
+
data/docs/build-bot.md ADDED
@@ -0,0 +1,49 @@
1
+ pkgwiz build-bot -- Fedora's Mock Web Service
2
+ ==============================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ **pkg-wizard build-bot** is a simple web-service on top of [Mock](http://fedoraproject.org/wiki/Projects/Mock). Think of it as something in between Fedora's Mock and the complex [Koji](http://fedoraproject.org/wiki/Koji).
7
+
8
+ The main goals of pkg-wizard build-bot are:
9
+
10
+ * Be easy to install.
11
+
12
+ * Be well documented.
13
+
14
+ * Be simple to use.
15
+
16
+ If you have tried to install and use Koji before, you know the drill. Having said that, Koji is much more powerful and featureful than pkg-wizard's build-bot.
17
+
18
+ ## FEATURES
19
+
20
+ Used in combination with pkg-wizard [remote-build](remote-build.html), you can:
21
+
22
+ * Send source RPMS to build-bot (RPM spec file and sources can be local or remote)
23
+ * Monitor the build process
24
+ * Tag builds
25
+ * Create yum repos
26
+ * Rebuild failed builds
27
+ * Review build logs
28
+
29
+
30
+ ## USAGE
31
+
32
+ `$ pkgwiz build-bot`
33
+
34
+ Invalid mock profile.
35
+
36
+ Usage: pkgwiz build-bot (options)
37
+
38
+ --daemonize
39
+ --log-format FMT Log format to use (web, cli)
40
+ --log-server-port PORT log server port (60001 default)
41
+ -m, --mock-profile PROF
42
+ -p, --port PORT
43
+ --working-dir DIR
44
+ -h, --help Show this message
45
+
46
+
47
+ ## SEE ALSO
48
+
49
+ [PKGWIZ](pkgwiz.html), [REMOTE-BUILD](remote-build.html), [INSTALLING PKG-WIZARD](install.html)
@@ -0,0 +1,16 @@
1
+ create-srpm -- create a SRPM package
2
+ =====================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ **create-srpm** build a SRPM that you can send to [build-bot](build-bot.html), build with mock, rpmbuild, etc.
7
+
8
+ ## EXAMPLES
9
+
10
+ `$ ls .`
11
+
12
+ ruby-enterprise-1.8.7-2011.03.tar.gz ruby.spec
13
+
14
+ ## SEE ALSO
15
+ [REMOTE-BUILD](remote-build.html), [BUILD-BOT](build-bot.html), [INIT-ENV](init-env.html), [PKGWIZ](pkgwiz.html), [INSTALLING PKG-WIZARD](install.html)
16
+
data/docs/gen.sh ADDED
@@ -0,0 +1,6 @@
1
+ ronn --organization="The FrameOS PROJECT" --manual=INSTALLATION install.md
2
+ ronn --organization="The FrameOS PROJECT" --manual="remote-build" remote-build.md
3
+ ronn --organization="The FrameOS PROJECT" --manual="build-bot" build-bot.md
4
+ ronn --organization="The FrameOS PROJECT" --manual="pkgwiz" pkgwiz.md
5
+ ronn --organization="The FrameOS PROJECT" --manual="create-srpm" create-srpm.md
6
+ ronn --organization="The FrameOS PROJECT" --manual="init-env" init-env.md
data/docs/init-env.md ADDED
@@ -0,0 +1,15 @@
1
+ init-env -- prepare the enviroment for the pkg-wizard tools
2
+ ===========================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ **init-env** sets up your environment installing pkg-wizard's required packages and dependeicies.
7
+
8
+ ## USAGE
9
+
10
+ Run as root:
11
+
12
+ `$ pkgwiz init-env`
13
+
14
+ ## SEE ALSO
15
+ [REMOTE-BUILD](remote-build.html), [BUILD-BOT](build-bot.html), [CREATE-SRPM](create-srpm.html), [PKGWIZ](pkgwiz.html), [INSTALLING PKG-WIZARD](install.html)
data/docs/install.md ADDED
@@ -0,0 +1,31 @@
1
+ pkg-wizard -- simple framework and tools to build and manage RPM packages
2
+ ==========================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ **pkg-wizard** is both a ruby library to deal with common RPM tasks and set of commands to build and create RPM packages.
7
+
8
+ pkg-wizard installs [pkgwiz](pkgwiz.html), the command line tool used to manage and build RPMS/SRPMS.
9
+ ## INSTALLATION
10
+
11
+ 1. Install rubygems
12
+
13
+ `yum install rubygems`
14
+
15
+ 2. Install pkg-wizard
16
+
17
+ `gem install pkg-wizard`
18
+
19
+ 3. Setup the environment
20
+
21
+ `pkgwiz init-env`
22
+
23
+ This will install all the required dependencies to use pkg-wizard tools.
24
+
25
+ ## USAGE
26
+
27
+ If you are a packager interested in using pkg-wizard build tools, have a look at [pkgwiz](pkgwiz.html).
28
+
29
+ ## SEE ALSO
30
+
31
+ [PKGWIZ](pkgwiz.html)
data/docs/pkgwiz.md ADDED
@@ -0,0 +1,35 @@
1
+ pkgwiz -- pkg-wizard's workhorse
2
+ ================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ **pkgwiz** is the front-end to many of the services/tools that pkg-wizard provides. The target user is the RPM packager.
7
+
8
+ ## EXAMPLES
9
+
10
+ 1. Printing pkg-wizard's version
11
+
12
+ `$ pkgwiz --version`
13
+
14
+ PKG Wizard Version 0.1.22
15
+
16
+ 2. Print help
17
+
18
+ `$ pkgwiz --help`
19
+
20
+ USAGE: pkgwiz command [options]
21
+
22
+ Available Commands:
23
+
24
+ remote-build
25
+
26
+ build-bot
27
+
28
+ init-env
29
+
30
+ create-srpm
31
+
32
+
33
+ ## SEE ALSO
34
+
35
+ [REMOTE-BUILD](remote-build.html), [BUILD-BOT](build-bot.html), [INIT-ENV](init-env.html), [CREATE-SRPM](create-srpm.html), [INSTALLING PKG-WIZARD](install.html)
@@ -0,0 +1,38 @@
1
+ pkgwiz remote-build -- Build RPMS using a pkg-wizard build-bot
2
+ ===============================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ **pkg-wizard remote-build** builds/fetches source RPMS and sends them to a pkg-wizard build-bot.
7
+
8
+ You need to have a [build-bot][build-bot.html] running before using remote-build.
9
+
10
+ ## USAGE
11
+
12
+ `$ pkgwiz remote-build`
13
+
14
+ --buildbot is required.
15
+
16
+ Usage: rpmwiz remote-build (options)
17
+
18
+ -b, --buildbot URL rpmwiz build-bot URL
19
+ -p, --buildbot-port PORT rpmwiz build-bot PORT (default 80)
20
+ -s, --source SRC
21
+ -t, --tmpdir TEMP Directory for downloaded files to be put
22
+ -h, --help Show this message
23
+
24
+
25
+ ## EXAMPLES
26
+
27
+ 1. Fetch _my-package-1.0.src.rpm_ from _http://myserver.com_ and send it to _my-build-bot-address_ build-bot for building.
28
+
29
+ `pkgwiz remote-build -b my-build-bot-address http://myserver.com/my-package-1.0.src.rpm`
30
+
31
+ 2. Fetch package spec and sources from git://github.com/user/my-package-repo, build the SRPM and send it to the build-bot
32
+
33
+ `pkgwiz remote-build -b my-build-bot-address git://github.com/frameos/ruby-rpm`
34
+
35
+
36
+ ## SEE ALSO
37
+
38
+ [INIT-ENV](init-env.html), [BUILD-BOT](build-bot.html), [CREATE-SRPM](create-srpm.html), [PKGWIZ](pkgwiz.html), [INSTALLING PKG-WIZARD](install.html)
@@ -29,24 +29,38 @@ module PKGWizard
29
29
  exit 1
30
30
  end
31
31
  if File.exist?('/etc/redhat-release')
32
- print '* Installing RHEL/Fedora requirements... '
33
- output = `yum install -y git rpm-build rpmdevtools mock createrepo yum-utils screen`
34
- if $? != 0
35
- $stderr.puts "Failed installing requirementes: \n#{output}"
32
+ puts '* Installing RHEL/Fedora requirements... '
33
+ rhel_ver = File.readlines('/etc/redhat-release').first.match(/release\s+(\d)\./)[1] rescue nil
34
+ if not rhel_ver
35
+ $stderr.puts "Unsupported RHEL/Fedora distribution"
36
36
  exit 1
37
37
  end
38
- puts "done."
38
+ if rhel_ver == "6"
39
+ puts "* Installing EPEL 6 repo.."
40
+ abort_if_err "rpm -Uvh #{File.dirname(__FILE__)}/../../../packages/epel-release-6-5.noarch.rpm --force"
41
+ elsif rhel_ver == "5"
42
+ puts "* Installing EPEL 5 repo.."
43
+ abort_if_err "rpm -Uvh #{File.dirname(__FILE__)}/../../../packages/epel-release-5-4.noarch.rpm --force"
44
+ else
45
+ end
46
+
47
+ abort_if_err "yum install -y git rpm-build rpmdevtools mock createrepo yum-utils screen"
39
48
  elsif File.exist?('/etc/lsb-release') and \
40
49
  File.read('/etc/lsb-release') =~ /DISTRIB_ID=Ubuntu/
41
- print '* Installing Ubuntu requirements... '
42
- output = `apt-get install -y git-core mock createrepo rpm yum screen`
43
- if $? != 0
44
- $stderr.puts "Failed installing requirementes: \n#{output}"
45
- exit 1
46
- end
47
- puts "done."
50
+ puts '* Installing Ubuntu requirements... '
51
+ abort_if_err "apt-get install -y nodejs git-core mock createrepo rpm yum screen"
48
52
  else
49
- $stderr.puts 'unsupported distribuition'
53
+ $stderr.puts 'ERROR: Unsupported distribuition'
54
+ end
55
+ puts "* Done"
56
+ end
57
+ def self.abort_if_err(cmd, msg = nil)
58
+ msg = "Failed running command: #{cmd}" if msg.nil?
59
+ output = `#{cmd} 2>&1`
60
+ if $? != 0
61
+ $stderr.puts msg
62
+ $stderr.puts output
63
+ exit 1
50
64
  end
51
65
  end
52
66
 
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.23'
7
+ VERSION = '0.1.24'
8
8
 
9
9
  class Distribution
10
10
  def self.detect
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: 53
4
+ hash: 43
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 23
10
- version: 0.1.23
9
+ - 24
10
+ version: 0.1.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio
@@ -185,15 +185,22 @@ extensions: []
185
185
  extra_rdoc_files:
186
186
  - LICENSE.txt
187
187
  - README.buildbot
188
- - README.rdoc
188
+ - README.md
189
189
  files:
190
190
  - .document
191
191
  - Gemfile
192
192
  - LICENSE.txt
193
193
  - README.buildbot
194
- - README.rdoc
194
+ - README.md
195
195
  - Rakefile
196
196
  - bin/pkgwiz
197
+ - docs/build-bot.md
198
+ - docs/create-srpm.md
199
+ - docs/gen.sh
200
+ - docs/init-env.md
201
+ - docs/install.md
202
+ - docs/pkgwiz.md
203
+ - docs/remote-build.md
197
204
  - lib/pkg-wizard.rb
198
205
  - lib/pkg-wizard/command.rb
199
206
  - lib/pkg-wizard/commands/build_bot.rb
data/README.rdoc DELETED
@@ -1,23 +0,0 @@
1
- = pkg-wizard
2
-
3
- == Installation
4
-
5
- gem install pkg-wizard
6
-
7
- === Requirements
8
-
9
- Git >= 1.7
10
-
11
- * Debian/Ubuntu
12
-
13
- apt-get install build-essential ruby1.8-dev mock rpm yum git-core createrepo
14
-
15
- * RHEL/Fedora
16
-
17
- yum install rpmdevtools git createrepo mock yum-utils
18
-
19
- == Copyright
20
-
21
- Copyright (c) 2011 Sergio Rubio <rubiojr@frameos.org>. See LICENSE.txt for
22
- further details.
23
-