autobuild 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.txt +10 -0
- data/Manifest.txt +7 -7
- data/README.txt +14 -9
- data/Rakefile +7 -6
- data/lib/autobuild.rb +5 -4
- data/lib/autobuild/import/cvs.rb +1 -1
- data/lib/autobuild/import/darcs.rb +4 -0
- data/lib/autobuild/import/svn.rb +11 -2
- data/test/test_import_cvs.rb +16 -2
- data/test/test_import_svn.rb +14 -2
- metadata +20 -11
data/Changes.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
== Version 0.6.4
|
2
|
+
|
3
|
+
This is a bugfix release
|
4
|
+
|
5
|
+
* More checks for working copy sanity: check that the target working copy
|
6
|
+
has been created by the right tools before doing anything. Update test
|
7
|
+
suite so that these parts of the importers is tested
|
8
|
+
* Since we grep 'svn info' output, make sure that its output will be in
|
9
|
+
english by setting LC_ALL to C
|
10
|
+
|
1
11
|
== Version 0.6.3
|
2
12
|
|
3
13
|
* CVS and SVN importing plugins check that the current working copy comes from
|
data/Manifest.txt
CHANGED
@@ -1,13 +1,18 @@
|
|
1
|
-
bin/autobuild
|
2
1
|
Changes.txt
|
2
|
+
Manifest.txt
|
3
|
+
README.txt
|
4
|
+
Rakefile
|
5
|
+
TODO
|
6
|
+
bin/autobuild
|
7
|
+
lib/autobuild.rb
|
3
8
|
lib/autobuild/config.rb
|
4
9
|
lib/autobuild/environment.rb
|
5
10
|
lib/autobuild/exceptions.rb
|
6
11
|
lib/autobuild/import/cvs.rb
|
7
12
|
lib/autobuild/import/darcs.rb
|
8
13
|
lib/autobuild/import/svn.rb
|
9
|
-
lib/autobuild/importer.rb
|
10
14
|
lib/autobuild/import/tar.rb
|
15
|
+
lib/autobuild/importer.rb
|
11
16
|
lib/autobuild/package.rb
|
12
17
|
lib/autobuild/packages/autotools.rb
|
13
18
|
lib/autobuild/packages/genom.rb
|
@@ -15,13 +20,9 @@ lib/autobuild/packages/import.rb
|
|
15
20
|
lib/autobuild/packages/pkgconfig.rb
|
16
21
|
lib/autobuild/packages/ruby.rb
|
17
22
|
lib/autobuild/pkgconfig.rb
|
18
|
-
lib/autobuild.rb
|
19
23
|
lib/autobuild/reporting.rb
|
20
24
|
lib/autobuild/subcommand.rb
|
21
25
|
lib/autobuild/timestamps.rb
|
22
|
-
Manifest.txt
|
23
|
-
Rakefile
|
24
|
-
README.txt
|
25
26
|
samples/demo.rb
|
26
27
|
test/data/cvsroot.tar
|
27
28
|
test/data/svnroot.tar
|
@@ -31,4 +32,3 @@ test/test_import_svn.rb
|
|
31
32
|
test/test_import_tar.rb
|
32
33
|
test/test_subcommand.rb
|
33
34
|
test/tools.rb
|
34
|
-
TODO
|
data/README.txt
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
Autobuild
|
2
2
|
http://autobuild.rubyforge.org
|
3
3
|
|
4
|
-
|
4
|
+
Copyright (c) 2006-2007
|
5
|
+
Sylvain Joyeux <sylvain.joyeux@m4x.org>
|
5
6
|
|
6
|
-
|
7
|
-
Old configuration files used with autobuild 0.5 aren't accepted by Autobuild 0.6. Since 0.6, Autobuild
|
8
|
-
uses Ruby for configuration (just like rake does)
|
7
|
+
This work is licensed under the GPLv2 license. See License.txt for details
|
9
8
|
|
10
9
|
== What's autobuild ?
|
11
10
|
Autobuild imports, configures, builds and installs various kinds of software packages.
|
@@ -13,14 +12,20 @@ It can be used in software development to make sure that nothing is broken in th
|
|
13
12
|
build process of a set of packages, or can be used as an automated installation tool.
|
14
13
|
|
15
14
|
Autobuild config files are Ruby scripts which configure rake to
|
16
|
-
*
|
17
|
-
* configures it. This phase can handle code generation, configuration (for
|
18
|
-
packages), ...
|
15
|
+
* imports the package from a SCM or (optionnaly) updates it
|
16
|
+
* configures it. This phase can handle code generation, configuration (for
|
17
|
+
instance for autotools-based packages), ...
|
19
18
|
* build
|
20
19
|
* install
|
21
20
|
|
22
|
-
It takes the dependencies between packages into account in its build process,
|
23
|
-
variables (+PKG_CONFIG_PATH+, +PATH+,
|
21
|
+
It takes the dependencies between packages into account in its build process,
|
22
|
+
updates the needed environment variables (+PKG_CONFIG_PATH+, +PATH+,
|
23
|
+
+LD_LIBRARY_PATH+, ...)
|
24
|
+
|
25
|
+
|
26
|
+
== WARNING for 0.5 users
|
27
|
+
Old configuration files used with autobuild 0.5 aren't accepted by Autobuild
|
28
|
+
0.6. Since 0.6, Autobuild uses Ruby for configuration (just like rake does)
|
24
29
|
|
25
30
|
== Available packages
|
26
31
|
=== Common usage
|
data/Rakefile
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
require 'hoe'
|
2
|
-
require '
|
2
|
+
require 'lib/autobuild'
|
3
3
|
|
4
4
|
Hoe.new('autobuild', Autobuild::VERSION) do |p|
|
5
5
|
p.author = "Sylvain Joyeux"
|
6
6
|
p.email = "sylvain.joyeux@m4x.org"
|
7
7
|
|
8
8
|
p.summary = 'Rake-based utility to build and install multiple packages with dependencies'
|
9
|
-
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
|
10
9
|
p.description = p.paragraphs_of('README.txt', 3..5).join("\n\n")
|
11
|
-
p.
|
12
|
-
p.
|
13
|
-
|
14
|
-
p.extra_deps << ['
|
10
|
+
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
|
11
|
+
p.changes = p.paragraphs_of('Changes.txt', 0..2).join("\n\n")
|
12
|
+
|
13
|
+
p.extra_deps << ['rake', '>= 0.7.0']
|
14
|
+
p.extra_deps << 'rmail'
|
15
|
+
p.extra_deps << 'daemons'
|
15
16
|
end
|
16
17
|
|
data/lib/autobuild.rb
CHANGED
data/lib/autobuild/import/cvs.rb
CHANGED
@@ -25,7 +25,7 @@ module Autobuild
|
|
25
25
|
def update(package)
|
26
26
|
Dir.chdir(package.srcdir) do
|
27
27
|
if !File.exists?("#{package.srcdir}/CVS/Root")
|
28
|
-
raise ConfigException, "#{package.srcdir}
|
28
|
+
raise ConfigException, "#{package.srcdir} is not a CVS working copy"
|
29
29
|
end
|
30
30
|
|
31
31
|
root = File.open("#{package.srcdir}/CVS/Root") { |io| io.read }.chomp
|
@@ -15,6 +15,10 @@ module Autobuild
|
|
15
15
|
private
|
16
16
|
|
17
17
|
def update(package)
|
18
|
+
if !File.directory?( File.join(package.srcdir, '_darcs') )
|
19
|
+
raise ConfigException, "#{package.srcdir} is not a Darcs repository"
|
20
|
+
end
|
21
|
+
|
18
22
|
Subprocess.run(package.name, :import, @program,
|
19
23
|
'pull', '--all', "--repodir=#{package.srcdir}", '--set-scripts-executable', @source, *@pull)
|
20
24
|
end
|
data/lib/autobuild/import/svn.rb
CHANGED
@@ -15,8 +15,17 @@ module Autobuild
|
|
15
15
|
|
16
16
|
def update(package)
|
17
17
|
Dir.chdir(package.srcdir) {
|
18
|
-
|
19
|
-
|
18
|
+
old_lang, ENV['LC_ALL'] = ENV['LC_ALL'], 'C'
|
19
|
+
svninfo = IO.popen("svn info") { |io| io.readlines }
|
20
|
+
ENV['LC_ALL'] = old_lang
|
21
|
+
unless url = svninfo.grep(/^URL: /).first
|
22
|
+
if svninfo.grep(/is not a working copy/).empty?
|
23
|
+
raise ConfigException, "#{package.srcdir} is not a Subversion working copy"
|
24
|
+
else
|
25
|
+
raise ConfigException, "Bug: cannot get SVN information for #{package.srcdir}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
url.chomp =~ /URL: (.+)/
|
20
29
|
source = $1
|
21
30
|
if source != @source
|
22
31
|
raise ConfigException, "current checkout found at #{package.srcdir} is from #{source}, was expecting #{@source}"
|
data/test/test_import_cvs.rb
CHANGED
@@ -32,13 +32,27 @@ class TC_CVSImport < Test::Unit::TestCase
|
|
32
32
|
# Make an update
|
33
33
|
importer.import(pkg_cvs)
|
34
34
|
|
35
|
-
# Make an update fail
|
35
|
+
# Make an update fail because the repository does not exist anymore
|
36
36
|
FileUtils.rm_rf cvsroot
|
37
37
|
assert_raise(Autobuild::SubcommandFailed) { importer.import pkg_cvs }
|
38
38
|
|
39
|
-
# Make a checkout fail
|
39
|
+
# Make a checkout fail because the repository does not exist anymore
|
40
40
|
FileUtils.rm_rf pkg_cvs.srcdir
|
41
41
|
assert_raise(Autobuild::SubcommandFailed) { importer.import pkg_cvs }
|
42
|
+
|
43
|
+
# Recreate the repository, and make a checkout fail because the
|
44
|
+
# WC is not a CVS WC
|
45
|
+
TestTools.untar('cvsroot.tar')
|
46
|
+
FileUtils.mkdir pkg_cvs.srcdir
|
47
|
+
assert_raise(Autobuild::ConfigException) { importer.import pkg_cvs }
|
48
|
+
|
49
|
+
# Create two repositories, and make the update fail because the
|
50
|
+
# WC is of the wrong source
|
51
|
+
FileUtils.rm_rf pkg_cvs.srcdir
|
52
|
+
importer.import(pkg_cvs)
|
53
|
+
FileUtils.mv cvsroot, "#{cvsroot}.2"
|
54
|
+
importer = Autobuild.cvs("#{cvsroot}.2", 'cvs')
|
55
|
+
assert_raise(Autobuild::ConfigException) { importer.import pkg_cvs }
|
42
56
|
end
|
43
57
|
end
|
44
58
|
|
data/test/test_import_svn.rb
CHANGED
@@ -31,13 +31,25 @@ class TC_SVNImport < Test::Unit::TestCase
|
|
31
31
|
# Make an update
|
32
32
|
importer.import(pkg_svn)
|
33
33
|
|
34
|
-
# Make an update fail
|
34
|
+
# Make an update fail because the repository does not exist
|
35
35
|
FileUtils.rm_rf svnrepo
|
36
36
|
assert_raise(SubcommandFailed) { importer.import(pkg_svn) }
|
37
37
|
|
38
|
-
# Make a checkout fail
|
38
|
+
# Make a checkout fail because the repository does not exist
|
39
39
|
FileUtils.rm_rf pkg_svn.srcdir
|
40
40
|
assert_raise(SubcommandFailed) { importer.import(pkg_svn) }
|
41
|
+
|
42
|
+
# Recreate the repository and try to update a non-svn directory
|
43
|
+
TestTools.untar('svnroot.tar')
|
44
|
+
FileUtils.mkdir pkg_svn.srcdir
|
45
|
+
assert_raise(ConfigException) { importer.import(pkg_svn) }
|
46
|
+
|
47
|
+
# Try to update a WC which is of a different repository
|
48
|
+
FileUtils.rmdir pkg_svn.srcdir
|
49
|
+
importer.import(pkg_svn)
|
50
|
+
FileUtils.mv svnrepo, "#{svnrepo}.2"
|
51
|
+
importer = Autobuild.svn("file://#{svnrepo}.2/svn")
|
52
|
+
assert_raise(ConfigException) { importer.import(pkg_svn) }
|
41
53
|
end
|
42
54
|
|
43
55
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: autobuild
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.6.
|
7
|
-
date:
|
6
|
+
version: 0.6.4
|
7
|
+
date: 2007-02-12 00:00:00 +01:00
|
8
8
|
summary: Rake-based utility to build and install multiple packages with dependencies
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: sylvain.joyeux@m4x.org
|
12
12
|
homepage: " http://autobuild.rubyforge.org"
|
13
13
|
rubyforge_project: autobuild
|
14
|
-
description: == What's autobuild ? Autobuild imports, configures, builds and installs various kinds of software packages. It can be used in software development to make sure that nothing is broken in the build process of a set of packages, or can be used as an automated installation tool. Autobuild config files are Ruby scripts which configure rake to *
|
14
|
+
description: == What's autobuild ? Autobuild imports, configures, builds and installs various kinds of software packages. It can be used in software development to make sure that nothing is broken in the build process of a set of packages, or can be used as an automated installation tool. Autobuild config files are Ruby scripts which configure rake to * imports the package from a SCM or (optionnaly) updates it * configures it. This phase can handle code generation, configuration (for instance for autotools-based packages), ... * build * install It takes the dependencies between packages into account in its build process, updates the needed environment variables (+PKG_CONFIG_PATH+, +PATH+, +LD_LIBRARY_PATH+, ...)
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
@@ -29,16 +29,21 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Sylvain Joyeux
|
31
31
|
files:
|
32
|
-
- bin/autobuild
|
33
32
|
- Changes.txt
|
33
|
+
- Manifest.txt
|
34
|
+
- README.txt
|
35
|
+
- Rakefile
|
36
|
+
- TODO
|
37
|
+
- bin/autobuild
|
38
|
+
- lib/autobuild.rb
|
34
39
|
- lib/autobuild/config.rb
|
35
40
|
- lib/autobuild/environment.rb
|
36
41
|
- lib/autobuild/exceptions.rb
|
37
42
|
- lib/autobuild/import/cvs.rb
|
38
43
|
- lib/autobuild/import/darcs.rb
|
39
44
|
- lib/autobuild/import/svn.rb
|
40
|
-
- lib/autobuild/importer.rb
|
41
45
|
- lib/autobuild/import/tar.rb
|
46
|
+
- lib/autobuild/importer.rb
|
42
47
|
- lib/autobuild/package.rb
|
43
48
|
- lib/autobuild/packages/autotools.rb
|
44
49
|
- lib/autobuild/packages/genom.rb
|
@@ -46,13 +51,9 @@ files:
|
|
46
51
|
- lib/autobuild/packages/pkgconfig.rb
|
47
52
|
- lib/autobuild/packages/ruby.rb
|
48
53
|
- lib/autobuild/pkgconfig.rb
|
49
|
-
- lib/autobuild.rb
|
50
54
|
- lib/autobuild/reporting.rb
|
51
55
|
- lib/autobuild/subcommand.rb
|
52
56
|
- lib/autobuild/timestamps.rb
|
53
|
-
- Manifest.txt
|
54
|
-
- Rakefile
|
55
|
-
- README.txt
|
56
57
|
- samples/demo.rb
|
57
58
|
- test/data/cvsroot.tar
|
58
59
|
- test/data/svnroot.tar
|
@@ -62,7 +63,6 @@ files:
|
|
62
63
|
- test/test_import_tar.rb
|
63
64
|
- test/test_subcommand.rb
|
64
65
|
- test/tools.rb
|
65
|
-
- TODO
|
66
66
|
test_files:
|
67
67
|
- test/test_import_tar.rb
|
68
68
|
- test/test_subcommand.rb
|
@@ -106,3 +106,12 @@ dependencies:
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: 0.0.0
|
108
108
|
version:
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: hoe
|
111
|
+
version_requirement:
|
112
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 1.1.7
|
117
|
+
version:
|