-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpuppet-runtime.patch
More file actions
259 lines (247 loc) · 12.8 KB
/
Copy pathpuppet-runtime.patch
File metadata and controls
259 lines (247 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
diff --git a/.gitignore b/.gitignore
index 669417c..90df2ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ ext/packaging
ext/build_metadata.json
pkg
*.swp
+ext/build_meta*.json
diff --git a/configs/components/libicu.rb b/configs/components/libicu.rb
index 203d803..9bb6cf8 100644
--- a/configs/components/libicu.rb
+++ b/configs/components/libicu.rb
@@ -11,7 +11,7 @@ component 'libicu' do |pkg, settings, platform|
# Instead of using the pre-built data library included in the icu source, we
# build our own custom library with certain unnecessary bits of data removed
# to reduce filesize.
- pkg.add_source("#{settings[:buildsources_url]}/icu4c-#{underscore_version}-data.zip", sum: "07e03444244883ef9789a56fc25010c0")
+ pkg.add_source("https://github.com/unicode-org/icu/releases/download/release-#{dash_version}/icu4c-#{underscore_version}-data.zip", sum: "07e03444244883ef9789a56fc25010c0")
# These rules restrict the set of locales we build, which significantly
# reduces the size of the resulting package.
@@ -86,7 +86,7 @@ component 'libicu' do |pkg, settings, platform|
"#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) VERBOSE=1"
]
else
- ["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
+ ["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) || #{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end
end
@@ -94,7 +94,7 @@ component 'libicu' do |pkg, settings, platform|
if platform.is_macos? && platform.is_cross_compiled?
install_cmds = ["cd build.arm64 && #{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install"]
else
- install_cmds = ["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install"]
+ install_cmds = ["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install || #{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install"]
end
# ICU incorrectly installs its .dlls to lib instead of bin on windows, so
diff --git a/configs/components/libxml2.rb b/configs/components/libxml2.rb
index 9e34131..8b07114 100644
--- a/configs/components/libxml2.rb
+++ b/configs/components/libxml2.rb
@@ -1,12 +1,7 @@
component "libxml2" do |pkg, settings, platform|
pkg.version '2.10.3'
- pkg.sha256sum '26d2415e1c23e0aad8ca52358523fc9116a2eb6e4d4ef47577b1635c7cee3d5f'
- pkg.url "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}.tar.gz"
-
- # Newer versions of libxml2 either ship as tar.xz or do not ship with a configure file
- # and require a newer version of GNU Autotools to generate. This causes problems with
- # the older and esoteric (AIX, Solaris) platforms that we support.
- # So we generate a configure file manually, compress as tar.gz, and host internally.
+ pkg.sha256sum '497f12e34790d407ec9e2a190d576c0881a1cd78ff3c8991d1f9e40281a5ff57'
+ pkg.url "https://gitlab.gnome.org/GNOME/libxml2/-/archive/v#{pkg.get_version}/libxml2-v#{pkg.get_version}.tar.gz"
if platform.is_aix?
if platform.name == 'aix-7.1-ppc'
@@ -23,6 +18,7 @@ component "libxml2" do |pkg, settings, platform|
pkg.environment "CFLAGS", "#{settings[:cflags]} -std=c99"
pkg.environment "LDFLAGS", settings[:ldflags]
elsif platform.is_macos?
+ pkg.environment 'PATH', '$(PATH):/opt/homebrew/bin:/usr/local/bin'
pkg.environment "LDFLAGS", settings[:ldflags]
pkg.environment "CFLAGS", settings[:cflags]
if platform.is_cross_compiled?
@@ -34,7 +30,32 @@ component "libxml2" do |pkg, settings, platform|
pkg.environment "CFLAGS", settings[:cflags]
end
- pkg.build_requires "runtime-#{settings[:runtime_project]}"
+ build_deps = [ "runtime-#{settings[:runtime_project]}" ]
+
+ if platform.is_sles?
+ build_deps << "autoconf"
+ elsif platform.is_deb? || platform.is_rpm?
+ build_deps << "dh-autoreconf"
+ end
+
+ if platform.name == 'el-8-x86_64' || platform.name == 'el-9-x86_64'
+ build_deps.reject! { |r| r == 'dh-autoreconf' }
+ end
+
+ build_deps.each do |dep|
+ pkg.build_requires dep
+ end
+
+ # Newer versions of libxml2 either ship as tar.xz or do not ship with a configure file
+ # and require a newer version of GNU Autotools to generate. This causes problems with
+ # the older and esoteric (AIX, Solaris) platforms that we support.
+ # So we generate a configure file manually, compress as tar.gz, and host internally.
+ if (platform.is_aix? && platform.name == 'aix-7.1-ppc') || platform.is_solaris?
+ pkg.url "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}.tar.gz"
+ pkg.sha256sum '26d2415e1c23e0aad8ca52358523fc9116a2eb6e4d4ef47577b1635c7cee3d5f'
+ else
+ pkg.configure { ["autoreconf --force --install"] }
+ end
pkg.configure do
["./configure --prefix=#{settings[:prefix]} --without-python #{settings[:host]}"]
diff --git a/configs/components/libxslt.rb b/configs/components/libxslt.rb
index cfc1098..18e2746 100644
--- a/configs/components/libxslt.rb
+++ b/configs/components/libxslt.rb
@@ -1,14 +1,7 @@
component "libxslt" do |pkg, settings, platform|
pkg.version '1.1.37'
- pkg.sha256sum 'a4ecab265f44e888ed3b39e11c7e925103ef6e26e09d62e9381f26977df96343'
- pkg.url "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}.tar.gz"
-
- # Newer versions of libxslt either ship as tar.xz or do not ship with a configure file
- # and require a newer version of GNU Autotools to generate. This causes problems with
- # the older and esoteric (AIX, Solaris) platforms that we support.
- # So we generate a configure file manually, compress as tar.gz, and host internally.
-
- pkg.build_requires "libxml2"
+ pkg.sha256sum 'b6f96869b8c42e8257b19d633d31e38cf12ff770829352a9dd109795ffc78bf2'
+ pkg.url "https://gitlab.gnome.org/GNOME/libxslt/-/archive/v#{pkg.get_version}/libxslt-v#{pkg.get_version}.tar.gz"
if platform.is_aix?
if platform.name == 'aix-7.1-ppc'
@@ -34,6 +27,7 @@ component "libxslt" do |pkg, settings, platform|
pkg.environment 'CC', 'clang -target arm64-apple-macos11' if platform.name =~ /osx-11/
pkg.environment 'CC', 'clang -target arm64-apple-macos12' if platform.name =~ /osx-12/
end
+ pkg.environment 'PATH', '$(PATH):/opt/homebrew/bin:/usr/local/bin'
pkg.environment "LDFLAGS", settings[:ldflags]
pkg.environment "CFLAGS", settings[:cflags]
else
@@ -41,6 +35,33 @@ component "libxslt" do |pkg, settings, platform|
pkg.environment "CFLAGS", settings[:cflags]
end
+ build_deps = [ "libxml2" ]
+
+ if platform.is_sles?
+ build_deps << "autoconf"
+ elsif platform.is_deb? || platform.is_rpm?
+ build_deps << "dh-autoreconf"
+ end
+
+ if platform.name == 'el-8-x86_64' || platform.name == 'el-9-x86_64'
+ build_deps.reject! { |r| r == 'dh-autoreconf' }
+ end
+
+ build_deps.each do |dep|
+ pkg.build_requires dep
+ end
+
+ # Newer versions of libxslt either ship as tar.xz or do not ship with a configure file
+ # and require a newer version of GNU Autotools to generate. This causes problems with
+ # the older and esoteric (AIX, Solaris) platforms that we support.
+ # So we generate a configure file manually, compress as tar.gz, and host internally.
+ if (platform.is_aix? && platform.name == 'aix-7.1-ppc') || platform.is_solaris?
+ pkg.url "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}.tar.gz"
+ pkg.sha256sum 'a4ecab265f44e888ed3b39e11c7e925103ef6e26e09d62e9381f26977df96343'
+ else
+ pkg.configure { ["autoreconf --force --install"] }
+ end
+
pkg.configure do
["./configure --without-python --prefix=#{settings[:prefix]} --docdir=/tmp --with-libxml-prefix=#{settings[:prefix]} #{settings[:host]} #{disable_crypto} #{build}"]
end
diff --git a/configs/components/runtime-pe-bolt-server.rb b/configs/components/runtime-pe-bolt-server.rb
index 4dddc40..19c9ed0 100644
--- a/configs/components/runtime-pe-bolt-server.rb
+++ b/configs/components/runtime-pe-bolt-server.rb
@@ -5,7 +5,7 @@ component "runtime-pe-bolt-server" do |pkg, settings, platform|
# PE Bolt Server depends on puppet-agent - it uses the agent's ruby installation to build gems.
# Add the enterprise repo for this project's PE version so that puppet-agent can be installed as a build dependency:
- if platform.name =~ /ubuntu-18\.04/
+ if platform.name =~ /ubuntu-(22|18)\.04/
# The PE development repos are unsigned. Ubuntu 18.04's version of apt requires some configuration
# to allow installing from them. This must happen before adding the repo configs below.
platform.provision_with "echo 'Acquire::AllowInsecureRepositories \"true\";' > /etc/apt/apt.conf.d/90insecure"
@@ -17,9 +17,9 @@ component "runtime-pe-bolt-server" do |pkg, settings, platform|
platform.add_build_repository "#{artifactory_url}/rpm_enterprise__local/#{settings[:pe_version]}/repos/#{platform.name}/#{platform.name}.repo"
end
- if platform.is_deb?
- platform.add_build_repository "#{artifactory_url}/debian_enterprise__local/#{settings[:pe_version]}/repos/#{platform.name}/#{platform.name}.list"
- end
+ #if platform.is_deb?
+ # platform.add_build_repository "#{artifactory_url}/debian_enterprise__local/#{settings[:pe_version]}/repos/#{platform.name}/#{platform.name}.list"
+ #end
pkg.build_requires('puppet-agent')
if builtin_ruby
@@ -32,7 +32,7 @@ component "runtime-pe-bolt-server" do |pkg, settings, platform|
# or 'bolt'.
pkg.environment "PROJECT_SHORTNAME", "server/apps/bolt-server"
pkg.add_source "file://resources/files/runtime/runtime.sh"
- if platform.name =~ /el-[567]|redhatfips-7|sles-(11|12)|ubuntu-18.04-amd64/
+ if platform.name =~ /el-[567]|redhatfips-7|sles-(11|12)|ubuntu-(22|18).04-/
libbase = platform.architecture =~ /64/ ? 'lib64' : 'lib'
libdir = "/opt/pl-build-tools/#{libbase}"
pkg.install do
diff --git a/configs/platforms/amazon-2023-aarch64.rb b/configs/platforms/amazon-2023-aarch64.rb
index c0aebad..c0ce5fd 100644
--- a/configs/platforms/amazon-2023-aarch64.rb
+++ b/configs/platforms/amazon-2023-aarch64.rb
@@ -4,6 +4,7 @@ platform 'amazon-2023-aarch64' do |plat|
packages = %w[
perl-FindBin
perl-lib
+ expat-devel
readline-devel
systemtap-sdt-devel
zlib-devel
diff --git a/configs/platforms/amazon-2023-x86_64.rb b/configs/platforms/amazon-2023-x86_64.rb
index c1540ff..fb38cd4 100644
--- a/configs/platforms/amazon-2023-x86_64.rb
+++ b/configs/platforms/amazon-2023-x86_64.rb
@@ -4,6 +4,7 @@ platform 'amazon-2023-x86_64' do |plat|
packages = %w[
perl-FindBin
perl-lib
+ expat-devel
readline-devel
systemtap-sdt-devel
zlib-devel
diff --git a/configs/projects/_shared-agent-settings.rb b/configs/projects/_shared-agent-settings.rb
index 1baff55..8245e97 100644
--- a/configs/projects/_shared-agent-settings.rb
+++ b/configs/projects/_shared-agent-settings.rb
@@ -152,7 +152,7 @@ proj.setting(:ldflags, "-L#{proj.libdir} -L/opt/pl-build-tools/lib -Wl,-rpath=#{
# stack canary and full RELRO.
# We only do this on platforms that use their default OS toolchain since pl-gcc versions
# are too old to support these flags.
-if platform.name =~ /sles-15|el-8|debian-10/ || platform.is_fedora?
+if platform.name =~ /sles-15|el-8/ || platform.is_debian? || platform.is_ubuntu? || platform.is_fedora?
proj.setting(:cppflags, "-I#{proj.includedir} -D_FORTIFY_SOURCE=2")
proj.setting(:cflags, '-fstack-protector-strong -fno-plt -O2')
proj.setting(:ldflags, "-L#{proj.libdir} -Wl,-rpath=#{proj.libdir},-z,relro,-z,now")
diff --git a/configs/projects/_shared-pe-bolt-server_with_ruby.rb b/configs/projects/_shared-pe-bolt-server_with_ruby.rb
index a471eec..ff692de 100644
--- a/configs/projects/_shared-pe-bolt-server_with_ruby.rb
+++ b/configs/projects/_shared-pe-bolt-server_with_ruby.rb
@@ -87,7 +87,7 @@ proj.setting(:ldflags, "-L#{proj.libdir} -L/opt/pl-build-tools/lib -Wl,-rpath=#{
# stack canary and full RELRO.
# We only do this on platforms that use their default OS toolchain since pl-gcc versions
# are too old to support these flags.
-if platform.name =~ /sles-15|el-8|debian-10/ || platform.is_fedora?
+if platform.name =~ /sles-15|el-8/ || platform.is_debian? || platform.is_ubuntu? || platform.is_fedora?
proj.setting(:cppflags, "-I#{proj.includedir} -D_FORTIFY_SOURCE=2")
proj.setting(:cflags, '-fstack-protector-strong -fno-plt -O2')
proj.setting(:ldflags, "-L#{proj.libdir} -Wl,-rpath=#{proj.libdir},-z,relro,-z,now")
diff --git a/configs/projects/pe-bolt-server-runtime-2021.7.x.rb b/configs/projects/pe-bolt-server-runtime-2021.7.x.rb
index 79b7a83..f2acc26 100644
--- a/configs/projects/pe-bolt-server-runtime-2021.7.x.rb
+++ b/configs/projects/pe-bolt-server-runtime-2021.7.x.rb
@@ -10,4 +10,5 @@ project 'pe-bolt-server-runtime-2021.7.x' do |proj|
instance_eval File.read(File.join(File.dirname(__FILE__), '_shared-pe-bolt-server.rb'))
proj.component 'rubygem-prime'
+ proj.component 'rubygem-rexml'
end