ood_packaging 0.9.0 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d66aca5d9123c4952b9a2842fdc3c63aed8e566bf7f5e9569ce197bccbd3eaf
4
- data.tar.gz: bb3382c9d597c60585aa35eb6305005e447e02c558b5a30ccc78bee625291c4a
3
+ metadata.gz: bfd4871399685168cb1e47dfdd31c283e203cd1c2c48b573d385379e536c4297
4
+ data.tar.gz: 392e1e6137c8564004b05d6ad142b37132e927302f94f9ef53245a6fe2695160
5
5
  SHA512:
6
- metadata.gz: 897f586443e3a39a868d2565dc12320bcd416f45d3fe8f26580024179c7b11ef357a8078e681e738ecfcd19b505cbecdea3dee1bb4c8d593b749bc6e03f578d1
7
- data.tar.gz: 3531b9092f90394d950baeeeaa4cf4980eaf6163575953846f75688876c0a00109e4095bf2cc737e4236f3590fd1de2204cd59593e8ac82976512abbb527fb67
6
+ metadata.gz: da5b298b43c9e18150d7bbcae2ca4f540ac7583db5475336536a4f123375ce1f030570b9ce655063d573047f4a259ddb925e92c9d491fb5da2d95098cf934972
7
+ data.tar.gz: 3368909d19738083dabef1f28d39bbbdd16013a0d653bd3580b535253e475357aebf520af82e726fd8c782ebf1cac31a2259723d73220af5518575c0cc219792
@@ -39,7 +39,10 @@ class OodPackaging::Build
39
39
  end
40
40
 
41
41
  def version
42
- ENV['VERSION']
42
+ ver = ENV['VERSION']
43
+ return nil if ver == ''
44
+
45
+ ver
43
46
  end
44
47
 
45
48
  def rpm_version
@@ -47,6 +50,8 @@ class OodPackaging::Build
47
50
  end
48
51
 
49
52
  def rpm_release
53
+ return nil if version.nil?
54
+
50
55
  v = version.split('-', 2)
51
56
  return '1' if v.size < 2
52
57
 
@@ -64,9 +69,10 @@ class OodPackaging::Build
64
69
  end
65
70
 
66
71
  def rpm_defines
67
- defines = ["--define 'git_tag #{version}'"]
68
- defines.concat ["--define 'package_version #{rpm_version}'"]
69
- defines.concat ["--define 'package_release #{rpm_release}'"]
72
+ defines = []
73
+ defines.concat ["--define 'git_tag #{version}'"] unless version.nil?
74
+ defines.concat ["--define 'package_version #{rpm_version}'"] unless rpm_version.nil?
75
+ defines.concat ["--define 'package_release #{rpm_release}'"] unless rpm_release.nil?
70
76
  defines.concat ["--define 'scl #{config[:scl]}'"] if config[:scl]
71
77
  defines
72
78
  end
@@ -17,7 +17,7 @@ RUN head -n 13 /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo >> /etc/yum.repos.d/Cent
17
17
  RUN rm -f /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo /etc/yum.repos.d/CentOS-SCLo-scl.repo
18
18
  <% elsif dnf? -%>
19
19
  RUN dnf update -y && dnf clean all && rm -rf /var/cache/dnf/*
20
- RUN dnf install -y dnf-utils <%= dist =~ /^el/ ? 'epel-release' : '' %> langpacks-en glibc-all-langpacks && dnf clean all && rm -rf /var/cache/dnf/*
20
+ RUN dnf install -y dnf-utils <%= dist =~ /^el/ ? 'epel-release' : '' %> langpacks-en glibc-langpack-en && dnf clean all && rm -rf /var/cache/dnf/*
21
21
  <% if dist == 'el8' -%>
22
22
  RUN dnf config-manager --set-enabled powertools && dnf clean all && rm -rf /var/cache/dnf/*
23
23
  RUN dnf module enable -y ruby:<%= ruby_version %> nodejs:<%= nodejs_version %> && dnf clean all && rm -rf /var/cache/dnf/*
@@ -37,8 +37,10 @@ RUN apt update -y && apt install -y apt-transport-https ca-certificates \
37
37
  init debhelper devscripts dh-make build-essential apt-cudf lintian equivs \
38
38
  sudo rake wget curl ruby bundler && \
39
39
  apt clean all -y
40
+ <% if arch != 'ppc64le' %>
40
41
  RUN echo "deb https://deb.nodesource.com/node_<%= nodejs_version %>.x <%= codename %> main" > /etc/apt/sources.list.d/nodesource.list
41
42
  RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nodesource.gpg
43
+ <% end %>
42
44
  <% end -%>
43
45
  COPY . /build
44
46
  RUN /bin/bash /build/install.sh
@@ -11,7 +11,7 @@ class OodPackaging::BuildBox
11
11
 
12
12
  BASE_IMAGES = {
13
13
  'el7' => 'centos:7',
14
- 'el8' => 'rockylinux/rockylinux:8',
14
+ 'el8' => 'almalinux:8',
15
15
  'el9' => 'almalinux:9',
16
16
  'ubuntu-20.04' => 'ubuntu:20.04',
17
17
  'ubuntu-22.04' => 'ubuntu:22.04',
@@ -25,7 +25,8 @@ class OodPackaging::BuildBox
25
25
 
26
26
  ARCH_PLATFORMS = {
27
27
  'x86_64' => 'linux/amd64',
28
- 'aarch64' => 'linux/arm64'
28
+ 'aarch64' => 'linux/arm64',
29
+ 'ppc64le' => 'linux/ppc64le'
29
30
  }.freeze
30
31
 
31
32
  def initialize(config = {})
@@ -248,7 +248,20 @@ class OodPackaging::Package
248
248
  end
249
249
  end
250
250
 
251
+ # Unused but left in case useful in future
252
+ # def handle_signals
253
+ # ['QUIT', 'TERM', 'INT'].each do |signal|
254
+ # Signal.trap(signal) do
255
+ # puts "Caught signal #{signal}, proceeding to kill container".red
256
+ # container_kill!
257
+ # exit 1
258
+ # end
259
+ # end
260
+ # end
261
+
262
+ # rubocop:disable Metrics/AbcSize
251
263
  def run!
264
+ # handle_signals
252
265
  if tar_only?
253
266
  tar!
254
267
  return
@@ -259,6 +272,10 @@ class OodPackaging::Package
259
272
  container_start!
260
273
  container_exec!(exec_rake)
261
274
  puts "Build SUCCESS: package=#{package} dist=#{build_box.dist}".green
275
+ rescue SignalException => e
276
+ puts "Caught signal #{e}, proceeding to kill container".red
277
+ container_kill!
278
+ exit 1
262
279
  rescue RuntimeError
263
280
  puts "Build FAILED package=#{package} dist=#{build_box.dist}".red
264
281
  raise
@@ -266,6 +283,7 @@ class OodPackaging::Package
266
283
  container_attach! if attach?
267
284
  container_kill! if container_running? && !attach?
268
285
  end
286
+ # rubocop:enable Metrics/AbcSize
269
287
 
270
288
  def container_running?
271
289
  cmd = "#{container_runtime} inspect #{container_name} 2>/dev/null 1>/dev/null"
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Version code for OodPackaging
4
4
  module OodPackaging
5
- VERSION = '0.9.0'
5
+ VERSION = '0.10.0'
6
6
  PACKAGE_VERSION = {
7
7
  'ondemand-release' => {
8
8
  '(ubuntu|debian)' => '3.1.0',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_packaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Dockendorf
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-06-09 00:00:00.000000000 Z
12
+ date: 2023-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake