autobuild 1.18.0 → 1.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/lib/autobuild/import/git-lfs.rb +1 -1
- data/lib/autobuild/import/git.rb +1 -1
- data/lib/autobuild/package.rb +4 -4
- data/lib/autobuild/packages/gnumake.rb +71 -34
- data/lib/autobuild/progress_display.rb +1 -1
- data/lib/autobuild/test.rb +1 -0
- data/lib/autobuild/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba0c35a9d6c2a15141684c9836ca9b5763b90dfdc46832a31d0f343a6837ef4d
|
4
|
+
data.tar.gz: 3d5b3c22bdd6b3c082e9ed209a656b637274bd2054c8e211260ff28f8d058cd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12cd8fb953e0ce63ba4679dce12ab0e8fb46678815c6baab0db97c44097fd74fe5c684f43a2e6f0de04630cf0ee6cb70a9a34fbe94b88e390a062de65cf335fc
|
7
|
+
data.tar.gz: aee8a423d0b011b6d17b70554a79527e67280a2004aa7b0709a4bce740d7ff3d6df4a5c2923f9f26e9d12971d8c2657cfda989952a7cfdfbda5e6516f0c82005
|
data/.travis.yml
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
sudo: true
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- '2.1'
|
5
|
-
- '2.2'
|
6
4
|
- '2.3'
|
7
5
|
- '2.4'
|
8
6
|
- '2.5'
|
@@ -12,6 +10,7 @@ matrix:
|
|
12
10
|
- rvm: 'jruby-9.1.15.0'
|
13
11
|
|
14
12
|
install:
|
13
|
+
- sudo apt-get install build-essential
|
15
14
|
- gem install bundler
|
16
15
|
- bundle install --path vendor/bundle
|
17
16
|
|
@@ -44,7 +44,7 @@ def self.lfs_setup(importer, package)
|
|
44
44
|
"files may be missing from checkout"
|
45
45
|
end
|
46
46
|
|
47
|
-
lfs_dir = File.join(package.
|
47
|
+
lfs_dir = File.join(package.importdir, '.git', 'lfs')
|
48
48
|
Autobuild.lfs_setup(importer, package) if File.directory?(lfs_dir)
|
49
49
|
end
|
50
50
|
end
|
data/lib/autobuild/import/git.rb
CHANGED
@@ -1160,7 +1160,7 @@ def uses_lfs?(package)
|
|
1160
1160
|
def self.lfs_installed?
|
1161
1161
|
return @lfs_installed unless @lfs_installed.nil?
|
1162
1162
|
|
1163
|
-
_, _, status = Open3.capture3('git lfs
|
1163
|
+
_, _, status = Open3.capture3('git lfs')
|
1164
1164
|
@lfs_installed = status.success?
|
1165
1165
|
end
|
1166
1166
|
|
data/lib/autobuild/package.rb
CHANGED
@@ -664,10 +664,10 @@ def post_install(*args, &block)
|
|
664
664
|
# fingerprint the result will be nil
|
665
665
|
# @return [String]
|
666
666
|
def fingerprint(recursive: true, memo: {})
|
667
|
+
return memo[name] if memo.key?(name)
|
668
|
+
|
667
669
|
self_fingerprint = importer.fingerprint(self)
|
668
670
|
return unless self_fingerprint
|
669
|
-
|
670
|
-
memo[name] = self_fingerprint
|
671
671
|
return self_fingerprint if !recursive || dependencies.empty?
|
672
672
|
|
673
673
|
dependency_fingerprints = dependencies.sort.map do |pkg_name|
|
@@ -675,12 +675,12 @@ def fingerprint(recursive: true, memo: {})
|
|
675
675
|
unless (fingerprint = memo[pkg.name])
|
676
676
|
fingerprint = pkg.fingerprint(recursive: true, memo: memo)
|
677
677
|
return unless fingerprint
|
678
|
-
memo[pkg.name] = fingerprint
|
679
678
|
end
|
680
679
|
fingerprint
|
681
680
|
end
|
682
681
|
|
683
|
-
Digest::SHA1.hexdigest(
|
682
|
+
memo[name] = Digest::SHA1.hexdigest(
|
683
|
+
self_fingerprint + dependency_fingerprints.join(""))
|
684
684
|
end
|
685
685
|
|
686
686
|
# Returns the name of all the packages +self+ depends on
|
@@ -1,19 +1,46 @@
|
|
1
1
|
require 'rubygems/version'
|
2
2
|
|
3
3
|
module Autobuild
|
4
|
-
def self.
|
4
|
+
def self.reset_gnumake_detection
|
5
|
+
@make_is_gnumake = Hash.new
|
6
|
+
@gnumake_version = Hash.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.ensure_gnumake_detected(pkg, path = Autobuild.tool(:make))
|
5
10
|
@make_is_gnumake ||= Hash.new
|
6
11
|
@gnumake_version ||= Hash.new
|
7
|
-
if @make_is_gnumake.key?(path)
|
8
|
-
|
12
|
+
return @make_is_gnumake[path] if @make_is_gnumake.key?(path)
|
13
|
+
|
14
|
+
begin
|
15
|
+
gnumake_version_string = pkg.run('prepare', path, '--version')
|
16
|
+
rescue Autobuild::SubcommandFailed
|
17
|
+
@make_is_gnumake[path] = false
|
18
|
+
return
|
19
|
+
end
|
20
|
+
|
21
|
+
gnumake_match = /^GNU Make[^\d]+(\d[\d.]+)/.match(gnumake_version_string.first)
|
22
|
+
unless gnumake_match
|
23
|
+
@make_is_gnumake[path] = false
|
24
|
+
return
|
25
|
+
end
|
26
|
+
|
27
|
+
@gnumake_version[path] = Gem::Version.new(gnumake_match[1])
|
28
|
+
@make_is_gnumake[path] = true
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.make_is_gnumake?(pkg, path = Autobuild.tool(:make))
|
32
|
+
ensure_gnumake_detected(pkg, path)
|
33
|
+
end
|
34
|
+
|
35
|
+
class NotGNUMake < RuntimeError
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.gnumake_version(pkg, path = Autobuild.tool(:make))
|
39
|
+
if ensure_gnumake_detected(pkg, path)
|
40
|
+
@gnumake_version.fetch(path)
|
9
41
|
else
|
10
|
-
|
11
|
-
|
12
|
-
@make_is_gnumake[path] = (result.first =~ /GNU Make/)
|
13
|
-
@gnumake_version[path] = Gem::Version.new(result.first.scan(/[\d.]+/)[0])
|
14
|
-
rescue Autobuild::SubcommandFailed
|
15
|
-
@make_is_gnumake[path] = false
|
16
|
-
end
|
42
|
+
raise NotGNUMake, "either #{path} is not a GNU Make or it does not have "\
|
43
|
+
"the expected version string"
|
17
44
|
end
|
18
45
|
end
|
19
46
|
|
@@ -25,34 +52,44 @@ def self.make_has_gnumake_jobserver?(pkg, path = Autobuild.tool(:make))
|
|
25
52
|
make_is_gnumake?(pkg, path)
|
26
53
|
end
|
27
54
|
|
55
|
+
GNUMAKE_JOBSERVER_AUTH_VERSION = Gem::Version.new("4.2.0")
|
56
|
+
|
57
|
+
def self.gnumake_jobserver_option(job_server, pkg, path = Autobuild.tool(:make))
|
58
|
+
jobserver_fds_arg = "#{job_server.rio.fileno},#{job_server.wio.fileno}"
|
59
|
+
|
60
|
+
version = gnumake_version(pkg, path)
|
61
|
+
if version >= GNUMAKE_JOBSERVER_AUTH_VERSION
|
62
|
+
["--jobserver-auth=#{jobserver_fds_arg}"]
|
63
|
+
else
|
64
|
+
["--jobserver-fds=#{jobserver_fds_arg}", "-j"]
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
28
68
|
def self.invoke_make_parallel(pkg, cmd_path = Autobuild.tool(:make))
|
29
69
|
reserved = nil
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
yield("--jobserver-fds=#{jobserver_fds_arg}", "-j")
|
49
|
-
end
|
70
|
+
return yield unless make_has_j_option?(pkg, cmd_path)
|
71
|
+
|
72
|
+
manager = Autobuild.parallel_task_manager
|
73
|
+
return yield("-j#{pkg.parallel_build_level}") unless manager
|
74
|
+
|
75
|
+
job_server = manager.job_server
|
76
|
+
|
77
|
+
specific_parallel_level = (
|
78
|
+
pkg.parallel_build_level != Autobuild.parallel_build_level
|
79
|
+
)
|
80
|
+
if !make_has_gnumake_jobserver?(pkg, cmd_path) || specific_parallel_level
|
81
|
+
reserved = pkg.parallel_build_level
|
82
|
+
# Account for the one token autobuild uses
|
83
|
+
begin
|
84
|
+
job_server.get(reserved - 1)
|
85
|
+
return yield("-j#{pkg.parallel_build_level}")
|
86
|
+
ensure
|
87
|
+
job_server.put(reserved - 1)
|
50
88
|
end
|
51
|
-
yield("-j#{pkg.parallel_build_level}")
|
52
|
-
else yield
|
53
89
|
end
|
54
|
-
|
55
|
-
job_server
|
90
|
+
|
91
|
+
options = gnumake_jobserver_option(job_server, pkg, cmd_path)
|
92
|
+
yield(*options)
|
56
93
|
end
|
57
94
|
|
58
95
|
def self.make_subcommand(pkg, phase, *options, &block)
|
data/lib/autobuild/test.rb
CHANGED
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pastel
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
requirements: []
|
263
263
|
rubyforge_project:
|
264
|
-
rubygems_version: 2.7.6
|
264
|
+
rubygems_version: 2.7.6.2
|
265
265
|
signing_key:
|
266
266
|
specification_version: 4
|
267
267
|
summary: Library to handle build systems and import mechanisms
|