tebako 0.12.1 → 0.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e602aace5a0b42b9e7599d3bb39c32a2bc6ec01f48ec885d5147c626d79fb3f
4
- data.tar.gz: 845e5e0a63277d53d64a6ff867d88016f6a002234eb01c0538d97d4ff06ceedf
3
+ metadata.gz: 3acd4d518e560abf4901a25e53452f910db850469375deb7e13b5ebc7c8173c4
4
+ data.tar.gz: 260a96de335ba92231b01543f4a19ef41a59156ae8ea8546ac7b277bb8b3d7de
5
5
  SHA512:
6
- metadata.gz: eb6458e260860b68983529d397de867ead824edd5ccd9dc97a37ebd849fec2d8539e25ecfcc7fe1652b9afaef29a1dc189470d0840ec2b986da1a980e9f30f19
7
- data.tar.gz: b16af1a8fa72fc86e04f64faf7a55be31b325defcbb801ee5bf02ee3551ed6a7bbea1df1920e93d0556963ac17487ed7787551d03d8147e959b9e6bfa00a4e15
6
+ metadata.gz: 3899ed838eb003e918e9adc91efeeb1eae7d6248bff9e664ace699c1042503b19dce0179cffacaf9c7e7d7418691f0142d9a30388059e82fdb5a07b9a6a395cc
7
+ data.tar.gz: 499099ca4dfc86e43f8de369b590e052a46156f2bcbce28081562687dbc42fa3de044e944163df36955f639ab82655921beba41e5e8d29e884e1e2fcb69e874f
@@ -91,8 +91,12 @@ module Tebako
91
91
  FileUtils.mkdir(dirname)
92
92
  end
93
93
 
94
- def restore_and_save(fname)
95
- raise Tebako::Error, "Could not save #{fname} because it does not exist." unless File.exist?(fname)
94
+ def restore_and_save(fname, strict: true)
95
+ unless File.exist?(fname)
96
+ return unless strict
97
+
98
+ raise Tebako::Error, "Could not save #{fname} because it does not exist."
99
+ end
96
100
 
97
101
  old_fname = "#{fname}.old"
98
102
  if File.exist?(old_fname)
@@ -102,9 +106,9 @@ module Tebako
102
106
  FileUtils.cp(fname, old_fname)
103
107
  end
104
108
 
105
- def restore_and_save_files(files, ruby_source_dir)
109
+ def restore_and_save_files(files, ruby_source_dir, strict: true)
106
110
  files.each do |fname|
107
- restore_and_save "#{ruby_source_dir}/#{fname}"
111
+ restore_and_save("#{ruby_source_dir}/#{fname}", strict: strict)
108
112
  end
109
113
  end
110
114
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
3
+ # Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
4
4
  # All rights reserved.
5
5
  # This file is a part of tebako
6
6
  #
@@ -43,25 +43,29 @@ module Tebako
43
43
  # Tebako packaging support (internal)
44
44
  module Packager
45
45
  FILES_TO_RESTORE = %w[
46
- main.c
46
+ common.mk
47
+ configure
48
+ config.status
47
49
  dir.c
48
50
  dln.c
49
51
  file.c
50
- io.c
51
- tool/mkconfig.rb
52
52
  gem_prelude.rb
53
- ].freeze
54
-
55
- FILES_TO_RESTORE_MSYS = %w[
53
+ io.c
54
+ main.c
55
+ Makefile
56
56
  ruby.c
57
- win32/file.c
58
- ].freeze
59
- # Do not need to restore cygwin/GNUmakefile.in
60
- # because it is patched (differently) both on pass 1 and pass2
61
- # cygwin/GNUmakefile.in
62
-
63
- FILES_TO_RESTORE_MUSL = %w[
64
57
  thread_pthread.c
58
+ util.c
59
+ ext/bigdecimal/bigdecimal.h
60
+ ext/Setup
61
+ cygwin/GNUmakefile.in
62
+ include/ruby/onigmo.h
63
+ lib/rubygems/openssl.rb
64
+ lib/rubygems/path_support.rb
65
+ template/Makefile.in
66
+ tool/mkconfig.rb
67
+ win32/winmain.c
68
+ win32/file.c
65
69
  ].freeze
66
70
 
67
71
  class << self
@@ -118,16 +122,14 @@ module Tebako
118
122
  # Executed before Ruby build, patching ensures that Ruby itself is linked statically
119
123
  def pass1(ostype, ruby_source_dir, mount_point, src_dir, ruby_ver)
120
124
  puts "-- Running pass1 script"
121
-
122
125
  PatchHelpers.recreate(src_dir)
123
- patch = crt_pass1_patch(ostype, mount_point, ruby_ver)
124
- do_patch(patch.patch_map, ruby_source_dir)
125
126
 
126
- # Roll back pass1a, pass2 patches
127
+ # Roll all known patches
127
128
  # Just in case we are recovering after some error
128
- PatchHelpers.restore_and_save_files(FILES_TO_RESTORE, ruby_source_dir)
129
- PatchHelpers.restore_and_save_files(FILES_TO_RESTORE_MUSL, ruby_source_dir) if ostype =~ /linux-musl/
130
- PatchHelpers.restore_and_save_files(FILES_TO_RESTORE_MSYS, ruby_source_dir) if ostype =~ /msys/
129
+ PatchHelpers.restore_and_save_files(FILES_TO_RESTORE, ruby_source_dir, strict: false)
130
+
131
+ patch = crt_pass1_patch(ostype, mount_point, ruby_ver)
132
+ do_patch(patch.patch_map, ruby_source_dir)
131
133
  end
132
134
 
133
135
  # Pass1A
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module Tebako
29
- VERSION = "0.12.1"
29
+ VERSION = "0.12.2"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tebako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-12 00:00:00.000000000 Z
11
+ date: 2025-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor