packaging 0.109.0 → 0.109.2
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.
- checksums.yaml +4 -4
- data/lib/packaging/util/file.rb +8 -1
- data/tasks/ship.rake +28 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21fbe7adf35d302cad689b2f4ca536f499c6d805e33da1ec091c7b7dcd672ffc
|
4
|
+
data.tar.gz: dccc381590b0cec0ad69b413b2c9680c1d95fe6bbcd041073e179faae9693134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81e93d2e4375be0ead7790a7cef9bb17e395b0e4ada9ee67926e5f422e24cfdc079cb5a51f3fc5bac87bccc1b6520cf09355eb99796be2df118ae352c8204daa
|
7
|
+
data.tar.gz: 5083b56f76a63f2c2e825a45ee87fdeac1ed2d19cd4adfa7046f8133339cd1212d0377878ca3dede7d984a3506c64b421b7aafb0c4ea71e16a890d79e2bab2a7
|
data/lib/packaging/util/file.rb
CHANGED
@@ -58,7 +58,14 @@ module Pkg::Util::File
|
|
58
58
|
|
59
59
|
def erb_string(erbfile, b = binding)
|
60
60
|
template = File.read(erbfile)
|
61
|
-
|
61
|
+
|
62
|
+
# We should be using this but some images are pegged at Ruby <= 2.5; this interface
|
63
|
+
# changed at Ruby 2.6
|
64
|
+
# message = ERB.new(template, safe_level: nil, trim_mode: '-')
|
65
|
+
|
66
|
+
# rubocop:disable Lint/ErbNewArguments
|
67
|
+
message = ERB.new(template, nil, '-')
|
68
|
+
# rubocop:enable Lint/ErbNewArguments
|
62
69
|
message.result(b)
|
63
70
|
end
|
64
71
|
|
data/tasks/ship.rake
CHANGED
@@ -124,32 +124,41 @@ namespace :pl do
|
|
124
124
|
|
125
125
|
desc "Update remote ips repository on #{Pkg::Config.ips_host}"
|
126
126
|
task :update_ips_repo => 'pl:fetch' do
|
127
|
-
|
128
|
-
|
127
|
+
# This could be pkg/ips/pkgs/{i386,sparc} or pkg/solaris/11/{i386,sparc}
|
128
|
+
p5p_files = Dir.glob('pkg/**/*.p5p')
|
129
|
+
if p5p_files.empty?
|
130
|
+
puts "Error: there aren't any p5p packages in pkg/ips/pkgs or pkg/solaris/11."
|
129
131
|
next
|
130
132
|
end
|
131
133
|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
134
|
+
# This makes the historical assumption that all p5p files we want to ship exist in
|
135
|
+
# just one directory.
|
136
|
+
source_directory = File.dirname(p5p_files.first)
|
137
|
+
remote_working_directory = Pkg::Util::Net.remote_execute(
|
136
138
|
Pkg::Config.ips_host,
|
137
|
-
|
138
|
-
|
139
|
-
)
|
140
|
-
tmpdir.chomp!
|
139
|
+
'mktemp -d -p /var/tmp',
|
140
|
+
{ capture_output: true }
|
141
|
+
)[0].chomp
|
141
142
|
|
142
|
-
Pkg::Util::Net.rsync_to(
|
143
|
+
Pkg::Util::Net.rsync_to(
|
144
|
+
"#{source_directory}/",
|
145
|
+
Pkg::Config.ips_host, remote_working_directory
|
146
|
+
)
|
143
147
|
|
144
|
-
|
145
|
-
sudo pkgrecv -s $
|
148
|
+
pkgrecv_scriptlet = %(for p5p_file in #{remote_working_directory}/*.p5p; do
|
149
|
+
sudo pkgrecv -s $p5p_file -d #{Pkg::Config.ips_path} '*';
|
146
150
|
done)
|
147
151
|
|
148
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.ips_host,
|
149
|
-
Pkg::Util::Net.remote_execute(
|
150
|
-
|
151
|
-
|
152
|
-
|
152
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.ips_host, pkgrecv_scriptlet)
|
153
|
+
Pkg::Util::Net.remote_execute(
|
154
|
+
Pkg::Config.ips_host,
|
155
|
+
"sudo pkgrepo refresh -s #{Pkg::Config.ips_path}"
|
156
|
+
)
|
157
|
+
ips_repository = Pkg::Config.ips_repo || 'default'
|
158
|
+
Pkg::Util::Net.remote_execute(
|
159
|
+
Pkg::Config.ips_host,
|
160
|
+
"sudo /usr/sbin/svcadm restart svc:/application/pkg/server:#{ips_repository}"
|
161
|
+
)
|
153
162
|
end
|
154
163
|
|
155
164
|
desc "Move dmg repos from #{Pkg::Config.dmg_staging_server} to #{Pkg::Config.dmg_host}"
|
@@ -683,7 +692,7 @@ namespace :pl do
|
|
683
692
|
existing_artifacts = artifactory.artifact_paths(artifact)
|
684
693
|
unless existing_artifacts.empty?
|
685
694
|
warn "Uploading '#{artifact}' to Artifactory refused. Artifact already exists here: ",
|
686
|
-
existing_artifacts.join(', ')
|
695
|
+
existing_artifacts.map(&:uri).join(', ')
|
687
696
|
next
|
688
697
|
end
|
689
698
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.109.
|
4
|
+
version: 0.109.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet By Perforce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|