rbe-tebako 0.16.1 → 0.16.3

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: 651bc58e91b4358b83ab6ac0768297290a6f7a48f40c73a1092d6cfe91d75480
4
- data.tar.gz: f1a9c894e958c266c60738cef612dc6fb9e202969a50f258ee31210dbf8fd469
3
+ metadata.gz: 91a00856fa000e838737ec686563147f9c02df3af6aa167dbb611b711bda3782
4
+ data.tar.gz: b5948f0e4c9a65251252936937a577c767d962937ff48ca5eb3c1f84429dd618
5
5
  SHA512:
6
- metadata.gz: 3c7fb8a9c9e17594fa5bfb17535ad53ca84b2150b6083b1c8ce13e5ff454ed74a8c977622c8f6653e2ceb18b18b2057af12c86c9e903d72d198d956af5549038
7
- data.tar.gz: 2e876b7f9a5149a22cbda22f24f46527d4db09afdd1b2794342a215677da86800cf37d55bb09cc9be3e8481530b2e48a23ba60569a4f93c03a2a1e502f1445ff
6
+ metadata.gz: 2623677a0b4432aa5266ea3af65f12e6542ba3d77469643b287d27ac58df800a6d577b332bf1d47419397e5f4b9c658f67bcc611326761a56845c341a7259b60
7
+ data.tar.gz: ef68f1160e4892b3e20857865b0e285d2f76504729bacb024e2d3658e53673278f902b4d1092e06787d71e93ff3fa3bac6e53fefbc34f43e2a40a5a48f61c409
@@ -107,12 +107,31 @@ module Tebako
107
107
  "-f",
108
108
  "exts.mk",
109
109
  "tebako-bundle",
110
+ "EXTENCS=#{enc_link_objects.join(" ")}",
110
111
  "TEBAKO_BUNDLE_OUTPUT=#{build_name}",
111
112
  "TEBAKO_APPLICATION_LDFLAGS=#{application_link_flags(application)}"
112
113
  )
113
114
  end
114
115
  end
115
116
 
117
+ # exts.mk's SUBMAKEOPTS folds $(EXTENCS) into the EXTOBJS it hands the
118
+ # sub-make. Ruby's own build supplies it (common.mk build-ext passes
119
+ # EXTENCS="$(ENCOBJS)"); invoked standalone the variable expands empty,
120
+ # the static encoding objects drop out of the link, and libruby-static.a's
121
+ # dmyenc.o (a no-op Init_enc) satisfies the symbol instead. The resulting
122
+ # binary boots with only builtin encodings and NO Encoding constants, and
123
+ # the first extension that looks up Encoding::UTF_8 (json) dies with
124
+ # NameError.
125
+ def enc_link_objects
126
+ objects = ["enc/encinit.o", "enc/libenc.a", "enc/libtrans.a"]
127
+ missing = objects.reject { |path| File.file?(File.join(@src_dir, path)) }
128
+ unless missing.empty?
129
+ raise Tebako::Error.new("static encoding objects missing from Ruby build: #{missing.join(", ")}", 120)
130
+ end
131
+
132
+ objects
133
+ end
134
+
116
135
  def publish_application_link(output, target, build_target)
117
136
  raise Tebako::Error.new("macOS application link did not create #{output}", 120) unless File.file?(build_target)
118
137
 
@@ -6,6 +6,7 @@
6
6
 
7
7
  require "digest"
8
8
  require "fileutils"
9
+ require "find"
9
10
  require "json"
10
11
  require "pathname"
11
12
  require "rubygems/package"
@@ -47,6 +48,7 @@ module Tebako
47
48
  relocate_install(temporary, manifest, destination)
48
49
  activate_runtime(temporary, manifest) if manifest["runtime_path"]
49
50
  register_environment(temporary)
51
+ normalize_mtimes(temporary)
50
52
  publish_install(temporary, destination)
51
53
  manifest
52
54
  ensure
@@ -310,6 +312,23 @@ module Tebako
310
312
  File.symlink(link, target)
311
313
  end
312
314
 
315
+ # The archive stores no mtimes: extraction stamps each file as it is
316
+ # written, in archive (alphabetical) order — which inverts autotools
317
+ # dependencies. "configure" sorts before "configure.ac", so make inside
318
+ # the installed Ruby build tree would try to regenerate configure with
319
+ # autoconf (absent on build runners). One shared timestamp across the
320
+ # whole tree makes it quiescent: make rebuilds only when a prerequisite
321
+ # is strictly NEWER than its target. Runs last, after relocation and
322
+ # activation have finished mutating files.
323
+ def normalize_mtimes(root)
324
+ stamp = Time.now
325
+ Find.find(root) do |path|
326
+ File.utime(stamp, stamp, path) unless File.symlink?(path)
327
+ end
328
+ rescue SystemCallError => e
329
+ raise Tebako::Error.new("Unable to normalize runtime SDK timestamps: #{e.message}", 121)
330
+ end
331
+
313
332
  def publish_install(temporary, destination)
314
333
  destination = File.expand_path(destination)
315
334
  backup = "#{destination}.previous"
@@ -68,6 +68,10 @@ module Tebako
68
68
  return if File.file?(marker) && File.binread(marker) == @runtime_identity
69
69
 
70
70
  base = File.join(@opts.output_folder, "bundle-work", output_identity, "macho-link-runtime")
71
+ # The runtime build's final strip writes here with `strip -o`, which
72
+ # cannot create missing directories — without this, a fresh identity dir
73
+ # produces a "could not strip" warning and no byproduct file.
74
+ FileUtils.mkdir_p(File.dirname(base))
71
75
  Tebako::RuntimeBuilder.new(runtime_options(base), @scm).build
72
76
  end
73
77
 
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module Tebako
29
- VERSION = "0.16.1"
29
+ VERSION = "0.16.3"
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbe-tebako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Fomera
@@ -310,7 +310,7 @@ licenses:
310
310
  - BSD-2-Clause
311
311
  metadata:
312
312
  homepage_uri: https://github.com/RubyEverywhere/tebako
313
- source_code_uri: https://github.com/RubyEverywhere/tebako/tree/v0.16.1
313
+ source_code_uri: https://github.com/RubyEverywhere/tebako/tree/v0.16.3
314
314
  allowed_push_host: https://rubygems.org
315
315
  rdoc_options: []
316
316
  require_paths:
@@ -335,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
335
  - !ruby/object:Gem::Version
336
336
  version: '0'
337
337
  requirements: []
338
- rubygems_version: 4.0.13
338
+ rubygems_version: 4.0.16
339
339
  specification_version: 4
340
340
  summary: Packager for Ruby executables (RubyEverywhere fork of tebako)
341
341
  test_files: []