vanagon 0.21.0 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/lib/vanagon/cli/list.rb +3 -3
- data/lib/vanagon/component.rb +1 -1
- data/lib/vanagon/component/source.rb +1 -0
- data/lib/vanagon/component/source/git.rb +2 -1
- data/lib/vanagon/platform/defaults/el-8-aarch64.rb +1 -1
- data/lib/vanagon/platform/defaults/el-8-x86_64.rb +1 -1
- data/lib/vanagon/platform/defaults/fedora-34-x86_64.rb +17 -0
- data/lib/vanagon/platform/defaults/osx-10.14-x86_64.rb +0 -1
- data/lib/vanagon/platform/defaults/osx-11-x86_64.rb +20 -0
- data/lib/vanagon/platform/dsl.rb +5 -0
- data/lib/vanagon/platform/osx.rb +8 -0
- data/lib/vanagon/platform/windows.rb +3 -21
- data/lib/vanagon/utilities.rb +1 -0
- data/lib/vanagon/utilities/extra_files_signer.rb +39 -0
- data/spec/lib/vanagon/cli_spec.rb +3 -3
- data/spec/lib/vanagon/component/source/git_spec.rb +13 -0
- data/spec/lib/vanagon/utilities/extra_files_signer_spec.rb +90 -0
- metadata +36 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5594ace45005baef8cc8dda25c0fa7c59f8bee3bd8224709d2dfbc0d8dfbbf5b
|
4
|
+
data.tar.gz: 6f5ccee0dd9713e2177dea361ffe93f65ac15d9ed69e30262a8b962efef67907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1fe1c250db472eaab9bd44c537a770c71a17313d5579a9dd198f9c585ffd281a921eadac4023debef2e96b0b66a280ef339ce9d0d58921cc4a18545a36c863f
|
7
|
+
data.tar.gz: b38c3ab64b33243ffbed532e48d0566a8f596f2c9bb8704789f4fe3398fd79fcc4a6c405dcaad0ec3edde0d6bdb9101eee68cf1a35f6a985b91543febe33f94e
|
data/README.md
CHANGED
@@ -85,6 +85,24 @@ wheezy and build my project against it.
|
|
85
85
|
For more detailed examples of the DSLs available, please see the
|
86
86
|
[examples](examples) directory and the YARD documentation for Vanagon.
|
87
87
|
|
88
|
+
### CLI commands
|
89
|
+
|
90
|
+
The vanagon command line tool contains these commands:
|
91
|
+
|
92
|
+
* `build` build a package given a project and platform
|
93
|
+
* `build_host_info` print information about build hosts
|
94
|
+
* `build_requirements` print external packages required to build project
|
95
|
+
* `completion` outputs path to tab completion script
|
96
|
+
* `inspect` a build dry-run, printing lots of information about the build
|
97
|
+
* `list` shows a list of available projects and platforms
|
98
|
+
* `render` create local versions of packaging artifacts for project
|
99
|
+
* `sign` sign a package
|
100
|
+
* `ship` upload a package to a distribution server
|
101
|
+
* `help` print this help
|
102
|
+
|
103
|
+
Commands are called with a git-like pattern of `vanagon <subcommand>`.
|
104
|
+
For example: `vanagon list`
|
105
|
+
|
88
106
|
### CLI changes and deprecations (from version 0.16.0)
|
89
107
|
|
90
108
|
Prior to 0.16.0, the vanagon command line contained these commands
|
data/lib/vanagon/cli/list.rb
CHANGED
@@ -39,15 +39,15 @@ class Vanagon
|
|
39
39
|
|
40
40
|
default_list = Dir.children(File.join(File.dirname(__FILE__), '..', 'platform', 'defaults')).map do |platform|
|
41
41
|
File.basename(platform, File.extname(platform))
|
42
|
-
end
|
42
|
+
end.sort
|
43
43
|
|
44
44
|
platform_list = Dir.children(File.join(options[:configdir], 'platforms')).map do |platform|
|
45
45
|
File.basename(platform, File.extname(platform))
|
46
|
-
end
|
46
|
+
end.sort
|
47
47
|
|
48
48
|
project_list = Dir.children(File.join(options[:configdir], 'projects')).map do |project|
|
49
49
|
File.basename(project, File.extname(project))
|
50
|
-
end
|
50
|
+
end.sort
|
51
51
|
|
52
52
|
if options[:defaults]
|
53
53
|
puts "- Defaults", output(default_list, options[:use_spaces])
|
data/lib/vanagon/component.rb
CHANGED
@@ -304,7 +304,7 @@ class Vanagon
|
|
304
304
|
#
|
305
305
|
# @param workdir [String] working directory to put the source into
|
306
306
|
def get_source(workdir) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
|
307
|
-
opts = options.merge({ workdir: workdir })
|
307
|
+
opts = options.merge({ workdir: workdir, dirname: dirname })
|
308
308
|
if url || !mirrors.empty?
|
309
309
|
if ENV['VANAGON_USE_MIRRORS'] == 'n' or ENV['VANAGON_USE_MIRRORS'] == 'false'
|
310
310
|
fetch_url(opts)
|
@@ -79,6 +79,7 @@ class Vanagon
|
|
79
79
|
# Ensure that #url returns a URI object
|
80
80
|
@url = URI.parse(url.to_s)
|
81
81
|
@ref = opts[:ref]
|
82
|
+
@dirname = opts[:dirname]
|
82
83
|
@workdir = File.realpath(workdir)
|
83
84
|
@clone_options = opts[:clone_options] ||= {}
|
84
85
|
|
@@ -113,7 +114,7 @@ class Vanagon
|
|
113
114
|
#
|
114
115
|
# @return [String] the directory where the repo was cloned
|
115
116
|
def dirname
|
116
|
-
File.basename(url.path, ".git")
|
117
|
+
@dirname || File.basename(url.path, ".git")
|
117
118
|
end
|
118
119
|
|
119
120
|
# Use `git describe` to lazy-load a version for this component
|
@@ -3,7 +3,7 @@ platform "el-8-aarch64" do |plat|
|
|
3
3
|
plat.defaultdir "/etc/sysconfig"
|
4
4
|
plat.servicetype "systemd"
|
5
5
|
|
6
|
-
packages = %w(autoconf automake createrepo gcc gcc-c++ rsync cmake make rpm-libs rpm-build)
|
6
|
+
packages = %w(autoconf automake createrepo gcc gcc-c++ rsync cmake make rpm-libs rpm-build libarchive)
|
7
7
|
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
|
8
8
|
plat.install_build_dependencies_with "dnf install -y --allowerasing "
|
9
9
|
plat.vmpooler_template "redhat-8-arm64"
|
@@ -3,7 +3,7 @@ platform "el-8-x86_64" do |plat|
|
|
3
3
|
plat.defaultdir "/etc/sysconfig"
|
4
4
|
plat.servicetype "systemd"
|
5
5
|
|
6
|
-
packages = %w(gcc gcc-c++ autoconf automake createrepo rsync cmake make rpm-libs rpm-build rpm-sign libtool)
|
6
|
+
packages = %w(gcc gcc-c++ autoconf automake createrepo rsync cmake make rpm-libs rpm-build rpm-sign libtool libarchive)
|
7
7
|
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
|
8
8
|
plat.install_build_dependencies_with "dnf install -y --allowerasing "
|
9
9
|
plat.vmpooler_template "redhat-8-x86_64"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
platform 'fedora-34-x86_64' do |plat|
|
2
|
+
plat.servicedir '/usr/lib/systemd/system'
|
3
|
+
plat.defaultdir '/etc/sysconfig'
|
4
|
+
plat.servicetype 'systemd'
|
5
|
+
plat.dist 'fc34'
|
6
|
+
|
7
|
+
packages = %w[
|
8
|
+
autoconf automake bzip2-devel gcc gcc-c++ libselinux-devel
|
9
|
+
libsepol libsepol-devel make cmake pkgconfig readline-devel
|
10
|
+
rpmdevtools rsync swig zlib-devel systemtap-sdt-devel
|
11
|
+
perl-lib perl-FindBin
|
12
|
+
]
|
13
|
+
plat.provision_with("/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}")
|
14
|
+
|
15
|
+
plat.install_build_dependencies_with '/usr/bin/dnf install -y --best --allowerasing'
|
16
|
+
plat.vmpooler_template 'fedora-34-x86_64'
|
17
|
+
end
|
@@ -18,5 +18,4 @@ platform "osx-10.14-x86_64" do |plat|
|
|
18
18
|
plat.provision_with %Q(su test -c 'echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"')
|
19
19
|
plat.provision_with "sudo chown -R test:admin /Users/test/"
|
20
20
|
plat.vmpooler_template "osx-1014-x86_64"
|
21
|
-
plat.output_dir File.join("apple", "10.14", "puppet6", "x86_64")
|
22
21
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
platform "osx-11-x86_64" do |plat|
|
2
|
+
plat.servicetype "launchd"
|
3
|
+
plat.servicedir "/Library/LaunchDaemons"
|
4
|
+
plat.codename "bigsur"
|
5
|
+
plat.provision_with "export HOMEBREW_NO_EMOJI=true"
|
6
|
+
plat.provision_with "export HOMEBREW_VERBOSE=true"
|
7
|
+
plat.provision_with "sudo dscl . -create /Users/test"
|
8
|
+
plat.provision_with "sudo dscl . -create /Users/test UserShell /bin/bash"
|
9
|
+
plat.provision_with "sudo dscl . -create /Users/test UniqueID 1001"
|
10
|
+
plat.provision_with "sudo dscl . -create /Users/test PrimaryGroupID 1000"
|
11
|
+
plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
|
12
|
+
plat.provision_with "sudo dscl . -passwd /Users/test password"
|
13
|
+
plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
|
14
|
+
plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
|
15
|
+
plat.provision_with "mkdir -p /etc/homebrew"
|
16
|
+
plat.provision_with "cd /etc/homebrew"
|
17
|
+
plat.provision_with %Q(su test -c 'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
|
18
|
+
plat.provision_with "sudo chown -R test:admin /Users/test/"
|
19
|
+
plat.vmpooler_template "macos-112-x86_64"
|
20
|
+
end
|
data/lib/vanagon/platform/dsl.rb
CHANGED
@@ -214,6 +214,11 @@ class Vanagon
|
|
214
214
|
@platform.provision_with(command)
|
215
215
|
end
|
216
216
|
|
217
|
+
# Clears the provisioning commands array
|
218
|
+
def clear_provisioning
|
219
|
+
@platform.provisioning.clear
|
220
|
+
end
|
221
|
+
|
217
222
|
# Set the command to install any needed build dependencies for the target machine
|
218
223
|
#
|
219
224
|
# @param command [String] Command to install build dependencies for the target machine
|
data/lib/vanagon/platform/osx.rb
CHANGED
@@ -35,6 +35,11 @@ class Vanagon
|
|
35
35
|
bom_install = []
|
36
36
|
end
|
37
37
|
|
38
|
+
if project.extra_files_to_sign.any?
|
39
|
+
sign_commands = Vanagon::Utilities::ExtraFilesSigner.commands(project, @mktemp, "/osx/build/root/#{project.name}-#{project.version}")
|
40
|
+
else
|
41
|
+
sign_commands = []
|
42
|
+
end
|
38
43
|
|
39
44
|
# Setup build directories
|
40
45
|
["bash -c 'mkdir -p $(tempdir)/osx/build/{dmg,pkg,scripts,resources,root,payload,plugins}'",
|
@@ -51,6 +56,9 @@ class Vanagon
|
|
51
56
|
|
52
57
|
bom_install,
|
53
58
|
|
59
|
+
# Sign extra files
|
60
|
+
sign_commands,
|
61
|
+
|
54
62
|
# Package the project
|
55
63
|
"(cd $(tempdir)/osx/build/; #{@pkgbuild} --root root/#{project.name}-#{project.version} \
|
56
64
|
--scripts $(tempdir)/osx/build/scripts \
|
@@ -214,28 +214,10 @@ class Vanagon
|
|
214
214
|
"gunzip -c #{project.name}-#{project.version}.tar.gz | '#{@tar}' -C '$(tempdir)/SourceDir' --strip-components 1 -xf -"
|
215
215
|
]
|
216
216
|
|
217
|
-
|
218
|
-
|
219
|
-
tempdir = nil
|
220
|
-
# Skip signing extra files if logging into the signing_host fails
|
221
|
-
# This enables things like CI being able to sign the additional files,
|
222
|
-
# but locally triggered builds by developers who don't have access to
|
223
|
-
# the signing host just print a message and skip the signing.
|
224
|
-
Vanagon::Utilities.retry_with_timeout(3, 5) do
|
225
|
-
tempdir = Vanagon::Utilities::remote_ssh_command("#{project.signing_username}@#{project.signing_hostname}", "#{@mktemp} 2>/dev/null", return_command_output: true)
|
226
|
-
end
|
227
|
-
project.extra_files_to_sign.each do |file|
|
228
|
-
file_location = File.join(tempdir, File.basename(file))
|
229
|
-
make_commands << [
|
230
|
-
"rsync -e '#{Vanagon::Utilities.ssh_command}' -rHlv --no-perms --no-owner --no-group #{File.join('$(tempdir)', 'SourceDir', file)} #{project.signing_username}@#{project.signing_hostname}:#{tempdir}",
|
231
|
-
"#{Vanagon::Utilities.ssh_command} #{project.signing_username}@#{project.signing_hostname} #{project.signing_command} #{file_location}",
|
232
|
-
"rsync -e '#{Vanagon::Utilities.ssh_command}' -rHlv -O --no-perms --no-owner --no-group #{project.signing_username}@#{project.signing_hostname}:#{file_location} #{File.join('$(tempdir)', 'SourceDir', file)}"
|
233
|
-
]
|
234
|
-
end
|
235
|
-
rescue RuntimeError
|
236
|
-
VanagonLogger.error "Unable to connect to #{project.signing_username}@#{project.signing_hostname}, skipping signing extra files: #{project.extra_files_to_sign.join(',')}"
|
237
|
-
end
|
217
|
+
if project.extra_files_to_sign.any?
|
218
|
+
make_commands << Vanagon::Utilities::ExtraFilesSigner.commands(project, @mktemp, 'SourceDir')
|
238
219
|
end
|
220
|
+
|
239
221
|
make_commands << [
|
240
222
|
"mkdir -p $(tempdir)/#{misc_dir}",
|
241
223
|
# Need to use awk here to convert to DOS format so that notepad can display file correctly.
|
data/lib/vanagon/utilities.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
class Vanagon
|
2
|
+
module Utilities
|
3
|
+
module ExtraFilesSigner
|
4
|
+
class << self
|
5
|
+
def commands(project, mktemp, source_dir) # rubocop:disable Metrics/AbcSize
|
6
|
+
tempdir = nil
|
7
|
+
commands = []
|
8
|
+
# Skip signing extra files if logging into the signing_host fails
|
9
|
+
# This enables things like CI being able to sign the additional files,
|
10
|
+
# but locally triggered builds by developers who don't have access to
|
11
|
+
# the signing host just print a message and skip the signing.
|
12
|
+
Vanagon::Utilities.retry_with_timeout(3, 5) do
|
13
|
+
tempdir = Vanagon::Utilities::remote_ssh_command("#{project.signing_username}@#{project.signing_hostname}", "#{mktemp} 2>/dev/null", return_command_output: true)
|
14
|
+
end
|
15
|
+
|
16
|
+
project.extra_files_to_sign.each do |file|
|
17
|
+
file_location = File.join(tempdir, File.basename(file))
|
18
|
+
local_source_path = File.join('$(tempdir)', source_dir, file)
|
19
|
+
remote_host = "#{project.signing_username}@#{project.signing_hostname}"
|
20
|
+
remote_destination_path = "#{remote_host}:#{tempdir}"
|
21
|
+
remote_file_location = "#{remote_host}:#{file_location}"
|
22
|
+
|
23
|
+
commands += [
|
24
|
+
"rsync -e '#{Vanagon::Utilities.ssh_command}' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group #{local_source_path} #{remote_destination_path}",
|
25
|
+
"#{Vanagon::Utilities.ssh_command} #{remote_host} #{project.signing_command} #{file_location}",
|
26
|
+
"rsync -e '#{Vanagon::Utilities.ssh_command}' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group #{remote_file_location} #{local_source_path}"
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
commands
|
31
|
+
rescue RuntimeError
|
32
|
+
require 'vanagon/logger'
|
33
|
+
VanagonLogger.error "Unable to connect to #{project.signing_username}@#{project.signing_hostname}, skipping signing extra files: #{project.extra_files_to_sign.join(',')}"
|
34
|
+
[]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -98,9 +98,9 @@ describe Vanagon::CLI::List do
|
|
98
98
|
let(:platforms){ ['1', '2', '3'] }
|
99
99
|
let(:output_both){
|
100
100
|
"- Projects
|
101
|
-
foo
|
102
101
|
bar
|
103
102
|
baz
|
103
|
+
foo
|
104
104
|
|
105
105
|
- Platforms
|
106
106
|
1
|
@@ -167,7 +167,7 @@ baz
|
|
167
167
|
|
168
168
|
let(:output_both_space){
|
169
169
|
"- Projects
|
170
|
-
|
170
|
+
bar baz foo
|
171
171
|
|
172
172
|
- Platforms
|
173
173
|
1 2 3
|
@@ -194,9 +194,9 @@ foo bar baz
|
|
194
194
|
|
195
195
|
let(:output_projects){
|
196
196
|
"- Projects
|
197
|
-
foo
|
198
197
|
bar
|
199
198
|
baz
|
199
|
+
foo
|
200
200
|
"
|
201
201
|
}
|
202
202
|
it "outputs only projects when projects is passed" do
|
@@ -60,6 +60,7 @@ describe "Vanagon::Component::Source::Git" do
|
|
60
60
|
allow(::Git).to receive(:clone).and_return(clone)
|
61
61
|
expect(File).to receive(:realpath).and_return(@file_path)
|
62
62
|
end
|
63
|
+
|
63
64
|
it "repository" do
|
64
65
|
git_source = @klass.new(@url, ref: @ref_tag, workdir: "/tmp/foo")
|
65
66
|
expect(::Git).to receive(:clone).with(git_source.url, git_source.dirname, path: @file_path)
|
@@ -72,6 +73,12 @@ describe "Vanagon::Component::Source::Git" do
|
|
72
73
|
expect(::Git).to receive(:clone).with(git_source.url, git_source.dirname, path: @file_path, **expected_clone_options)
|
73
74
|
git_source.clone
|
74
75
|
end
|
76
|
+
|
77
|
+
it 'uses a custom dirname' do
|
78
|
+
git_source = @klass.new(@url, ref: @ref_tag, workdir: "/tmp/foo", dirname: 'facter-ng')
|
79
|
+
expect(::Git).to receive(:clone).with(git_source.url, 'facter-ng', path: @file_path)
|
80
|
+
git_source.clone
|
81
|
+
end
|
75
82
|
end
|
76
83
|
|
77
84
|
describe "#dirname" do
|
@@ -86,6 +93,12 @@ describe "Vanagon::Component::Source::Git" do
|
|
86
93
|
expect(git_source.dirname)
|
87
94
|
.to eq('facter')
|
88
95
|
end
|
96
|
+
|
97
|
+
it "returns @dirname if is set" do
|
98
|
+
git_source = @klass.new(@url, ref: @ref_tag, workdir: @workdir, dirname: 'facter-ng')
|
99
|
+
expect(git_source.dirname)
|
100
|
+
.to eq('facter-ng')
|
101
|
+
end
|
89
102
|
end
|
90
103
|
|
91
104
|
describe "#ref" do
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'vanagon/platform'
|
2
|
+
require 'vanagon/project'
|
3
|
+
require 'vanagon/utilities/extra_files_signer'
|
4
|
+
|
5
|
+
describe Vanagon::Utilities::ExtraFilesSigner do
|
6
|
+
let(:platform_block) do
|
7
|
+
%( platform "osx-11-x86_64" do |plat|
|
8
|
+
end
|
9
|
+
)
|
10
|
+
end
|
11
|
+
let (:project_block) do
|
12
|
+
<<-HERE.undent
|
13
|
+
project 'test-fixture' do |proj|
|
14
|
+
proj.version '0.0.0'
|
15
|
+
end
|
16
|
+
HERE
|
17
|
+
end
|
18
|
+
let(:configdir) { '/a/b/c' }
|
19
|
+
let(:platform) { Vanagon::Platform::DSL.new('osx-11-x86_64') }
|
20
|
+
let(:project) do
|
21
|
+
Vanagon::Project::DSL.new('test-fixture', configdir, platform._platform, [])
|
22
|
+
end
|
23
|
+
let(:mktemp) { '/tmp/xyz' }
|
24
|
+
let(:source_dir) { '/dir/source_dir' }
|
25
|
+
|
26
|
+
before do
|
27
|
+
allow(VanagonLogger).to receive(:error)
|
28
|
+
platform.instance_eval(platform_block)
|
29
|
+
project.instance_eval(project_block)
|
30
|
+
allow(Vanagon::Utilities).to receive(:remote_ssh_command).and_return(mktemp)
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '.commands' do
|
34
|
+
context 'without extra files to sign' do
|
35
|
+
it 'returns empty array' do
|
36
|
+
commands = Vanagon::Utilities::ExtraFilesSigner.commands(project._project, mktemp, source_dir)
|
37
|
+
expect(commands).to eql([])
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'with extra files to sign' do
|
42
|
+
let (:project_block) do
|
43
|
+
<<-HERE.undent
|
44
|
+
project 'test-fixture' do |proj|
|
45
|
+
proj.version '0.0.0'
|
46
|
+
proj.extra_file_to_sign '/test1/a.rb'
|
47
|
+
proj.extra_file_to_sign '/test2/b.rb'
|
48
|
+
proj.signing_hostname('abc')
|
49
|
+
proj.signing_username('test')
|
50
|
+
proj.signing_command('codesign')
|
51
|
+
end
|
52
|
+
HERE
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'when it cannot connect to signing hostname' do
|
56
|
+
before do
|
57
|
+
allow(Vanagon::Utilities).to receive(:remote_ssh_command)
|
58
|
+
.with('test@abc', '/tmp/xyz 2>/dev/null', return_command_output: true)
|
59
|
+
.and_raise RuntimeError
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'returns empty array' do
|
63
|
+
commands = Vanagon::Utilities::ExtraFilesSigner.commands(project._project, mktemp, source_dir)
|
64
|
+
expect(commands).to eql([])
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'logs error' do
|
68
|
+
Vanagon::Utilities::ExtraFilesSigner.commands(project._project, mktemp, source_dir)
|
69
|
+
expect(VanagonLogger).to have_received(:error).with(/Unable to connect to test@abc/)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'when success' do
|
74
|
+
it 'generates signing commands for each file' do
|
75
|
+
commands = Vanagon::Utilities::ExtraFilesSigner.commands(project._project, mktemp, source_dir)
|
76
|
+
expect(commands).to match(
|
77
|
+
[
|
78
|
+
"rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group $(tempdir)/dir/source_dir/test1/a.rb test@abc:/tmp/xyz",
|
79
|
+
"/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc codesign /tmp/xyz/a.rb",
|
80
|
+
"rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group test@abc:/tmp/xyz/a.rb $(tempdir)/dir/source_dir/test1/a.rb",
|
81
|
+
"rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group $(tempdir)/dir/source_dir/test2/b.rb test@abc:/tmp/xyz",
|
82
|
+
"/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no test@abc codesign /tmp/xyz/b.rb",
|
83
|
+
"rsync -e '/usr/bin/ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' --verbose --recursive --hard-links --links --no-perms --no-owner --no-group test@abc:/tmp/xyz/b.rb $(tempdir)/dir/source_dir/test2/b.rb"
|
84
|
+
]
|
85
|
+
)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanagon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -166,8 +166,10 @@ files:
|
|
166
166
|
- lib/vanagon/platform/defaults/fedora-30-x86_64.rb
|
167
167
|
- lib/vanagon/platform/defaults/fedora-31-x86_64.rb
|
168
168
|
- lib/vanagon/platform/defaults/fedora-32-x86_64.rb
|
169
|
+
- lib/vanagon/platform/defaults/fedora-34-x86_64.rb
|
169
170
|
- lib/vanagon/platform/defaults/osx-10.14-x86_64.rb
|
170
171
|
- lib/vanagon/platform/defaults/osx-10.15-x86_64.rb
|
172
|
+
- lib/vanagon/platform/defaults/osx-11-x86_64.rb
|
171
173
|
- lib/vanagon/platform/defaults/redhatfips-7-x86_64.rb
|
172
174
|
- lib/vanagon/platform/defaults/sles-12-x86_64.rb
|
173
175
|
- lib/vanagon/platform/defaults/sles-15-x86_64.rb
|
@@ -191,6 +193,7 @@ files:
|
|
191
193
|
- lib/vanagon/project.rb
|
192
194
|
- lib/vanagon/project/dsl.rb
|
193
195
|
- lib/vanagon/utilities.rb
|
196
|
+
- lib/vanagon/utilities/extra_files_signer.rb
|
194
197
|
- lib/vanagon/utilities/shell_utilities.rb
|
195
198
|
- resources/Makefile.erb
|
196
199
|
- resources/deb/changelog.erb
|
@@ -292,6 +295,7 @@ files:
|
|
292
295
|
- spec/lib/vanagon/platform_spec.rb
|
293
296
|
- spec/lib/vanagon/project/dsl_spec.rb
|
294
297
|
- spec/lib/vanagon/project_spec.rb
|
298
|
+
- spec/lib/vanagon/utilities/extra_files_signer_spec.rb
|
295
299
|
- spec/lib/vanagon/utilities/shell_utilities_spec.rb
|
296
300
|
- spec/lib/vanagon/utilities_spec.rb
|
297
301
|
- spec/spec_helper.rb
|
@@ -320,40 +324,41 @@ specification_version: 3
|
|
320
324
|
summary: All of your packages will fit into this van with this one simple trick.
|
321
325
|
test_files:
|
322
326
|
- spec/lib/git/rev_list_spec.rb
|
323
|
-
- spec/lib/
|
324
|
-
- spec/lib/vanagon/
|
325
|
-
- spec/lib/vanagon/
|
326
|
-
- spec/lib/vanagon/
|
327
|
-
- spec/lib/vanagon/
|
328
|
-
- spec/lib/vanagon/
|
329
|
-
- spec/lib/vanagon/
|
327
|
+
- spec/lib/vanagon/engine/always_be_scheduling_spec.rb
|
328
|
+
- spec/lib/vanagon/engine/base_spec.rb
|
329
|
+
- spec/lib/vanagon/engine/docker_spec.rb
|
330
|
+
- spec/lib/vanagon/engine/pooler_spec.rb
|
331
|
+
- spec/lib/vanagon/engine/local_spec.rb
|
332
|
+
- spec/lib/vanagon/engine/hardware_spec.rb
|
333
|
+
- spec/lib/vanagon/engine/ec2_spec.rb
|
334
|
+
- spec/lib/vanagon/cli_spec.rb
|
335
|
+
- spec/lib/vanagon/project/dsl_spec.rb
|
330
336
|
- spec/lib/vanagon/utilities/shell_utilities_spec.rb
|
337
|
+
- spec/lib/vanagon/utilities/extra_files_signer_spec.rb
|
338
|
+
- spec/lib/vanagon/component_spec.rb
|
331
339
|
- spec/lib/vanagon/platform_spec.rb
|
332
|
-
- spec/lib/vanagon/
|
333
|
-
- spec/lib/vanagon/project/dsl_spec.rb
|
334
|
-
- spec/lib/vanagon/platform/osx_spec.rb
|
335
|
-
- spec/lib/vanagon/platform/dsl_spec.rb
|
336
|
-
- spec/lib/vanagon/platform/solaris_11_spec.rb
|
337
|
-
- spec/lib/vanagon/platform/rpm/aix_spec.rb
|
338
|
-
- spec/lib/vanagon/platform/windows_spec.rb
|
339
|
-
- spec/lib/vanagon/platform/deb_spec.rb
|
340
|
-
- spec/lib/vanagon/platform/rpm_spec.rb
|
341
|
-
- spec/lib/vanagon/platform/solaris_10_spec.rb
|
340
|
+
- spec/lib/vanagon/driver_spec.rb
|
342
341
|
- spec/lib/vanagon/component/rules_spec.rb
|
343
|
-
- spec/lib/vanagon/component/dsl_spec.rb
|
344
|
-
- spec/lib/vanagon/component/source/rewrite_spec.rb
|
345
|
-
- spec/lib/vanagon/component/source/git_spec.rb
|
346
342
|
- spec/lib/vanagon/component/source/local_spec.rb
|
343
|
+
- spec/lib/vanagon/component/source/rewrite_spec.rb
|
347
344
|
- spec/lib/vanagon/component/source/http_spec.rb
|
345
|
+
- spec/lib/vanagon/component/source/git_spec.rb
|
348
346
|
- spec/lib/vanagon/component/source_spec.rb
|
349
|
-
- spec/lib/vanagon/
|
347
|
+
- spec/lib/vanagon/component/dsl_spec.rb
|
350
348
|
- spec/lib/vanagon/project_spec.rb
|
349
|
+
- spec/lib/vanagon/common/pathname_spec.rb
|
350
|
+
- spec/lib/vanagon/common/user_spec.rb
|
351
|
+
- spec/lib/vanagon/environment_spec.rb
|
352
|
+
- spec/lib/vanagon/extensions/set/json_spec.rb
|
353
|
+
- spec/lib/vanagon/extensions/string_spec.rb
|
354
|
+
- spec/lib/vanagon/extensions/ostruct/json_spec.rb
|
355
|
+
- spec/lib/vanagon/platform/rpm_spec.rb
|
356
|
+
- spec/lib/vanagon/platform/windows_spec.rb
|
357
|
+
- spec/lib/vanagon/platform/deb_spec.rb
|
358
|
+
- spec/lib/vanagon/platform/dsl_spec.rb
|
359
|
+
- spec/lib/vanagon/platform/rpm/aix_spec.rb
|
360
|
+
- spec/lib/vanagon/platform/solaris_11_spec.rb
|
361
|
+
- spec/lib/vanagon/platform/osx_spec.rb
|
362
|
+
- spec/lib/vanagon/platform/solaris_10_spec.rb
|
351
363
|
- spec/lib/vanagon/utilities_spec.rb
|
352
|
-
- spec/lib/
|
353
|
-
- spec/lib/vanagon/engine/ec2_spec.rb
|
354
|
-
- spec/lib/vanagon/engine/always_be_scheduling_spec.rb
|
355
|
-
- spec/lib/vanagon/engine/base_spec.rb
|
356
|
-
- spec/lib/vanagon/engine/docker_spec.rb
|
357
|
-
- spec/lib/vanagon/engine/local_spec.rb
|
358
|
-
- spec/lib/vanagon/engine/hardware_spec.rb
|
359
|
-
- spec/lib/vanagon/engine/pooler_spec.rb
|
364
|
+
- spec/lib/makefile_spec.rb
|