tebako 0.12.15 → 0.13.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 +4 -4
- data/CMakeLists.txt +3 -3
- data/CODE_OF_CONDUCT.adoc +128 -0
- data/CONTRIBUTING.adoc +294 -0
- data/Gemfile +1 -1
- data/INSTALLATION.adoc +231 -0
- data/LICENSE.md +33 -0
- data/README.adoc +463 -533
- data/Rakefile +1 -1
- data/cmake/copy_dir.cmake +1 -1
- data/common.env +1 -1
- data/exe/tebako +1 -1
- data/exe/tebako-packager +1 -16
- data/include/tebako/tebako-fs.h +1 -1
- data/include/tebako/tebako-main.h +1 -1
- data/lib/tebako/build_helpers.rb +1 -1
- data/lib/tebako/cache_manager.rb +1 -1
- data/lib/tebako/cli.rb +1 -1
- data/lib/tebako/cli_helpers.rb +34 -8
- data/lib/tebako/codegen.rb +1 -1
- data/lib/tebako/deploy_helper.rb +8 -7
- data/lib/tebako/error.rb +1 -1
- data/lib/tebako/options_manager.rb +29 -9
- data/lib/tebako/package_descriptor.rb +1 -1
- data/lib/tebako/packager/pass1_patch.rb +1 -1
- data/lib/tebako/packager/pass1a_patch.rb +1 -1
- data/lib/tebako/packager/pass2_patch.rb +1 -1
- data/lib/tebako/packager/pass2_patch_crt.rb +1 -1
- data/lib/tebako/packager/pass2msys_patch.rb +1 -1
- data/lib/tebako/packager/patch.rb +1 -1
- data/lib/tebako/packager/patch_buildsystem.rb +1 -1
- data/lib/tebako/packager/patch_helpers.rb +1 -1
- data/lib/tebako/packager/patch_libraries.rb +1 -1
- data/lib/tebako/packager/patch_literals.rb +1 -1
- data/lib/tebako/packager/patch_main.rb +1 -1
- data/lib/tebako/packager/rubygems_patch.rb +1 -1
- data/lib/tebako/packager.rb +4 -4
- data/lib/tebako/packager_lite.rb +3 -3
- data/lib/tebako/ruby_builder.rb +4 -4
- data/lib/tebako/ruby_version.rb +3 -2
- data/lib/tebako/scenario_manager.rb +9 -1
- data/lib/tebako/stripper.rb +1 -1
- data/lib/tebako/version.rb +2 -2
- data/lib/tebako.rb +1 -1
- data/src/tebako-main.cpp +1 -1
- data/tebako.gemspec +1 -1
- data/tools/.github/workflows/build-containers.yml +190 -0
- data/tools/.github/workflows/lint.yml +3 -3
- data/tools/.github/workflows/test.yml +150 -11
- data/tools/ci-scripts/arm-brew-install.sh +1 -1
- data/tools/ci-scripts/arm-brew-setup.sh +1 -1
- data/tools/ci-scripts/level-up.sh +1 -1
- data/tools/ci-scripts/patch-fbthrift.sh +1 -1
- data/tools/ci-scripts/patch-folly.sh +2 -2
- data/tools/ci-scripts/tools.sh +1 -1
- data/tools/ci-scripts/x86-brew-install.sh +1 -1
- data/tools/ci-scripts/x86-brew-setup.sh +1 -1
- data/tools/cmake-scripts/def-external-project.cmake +1 -1
- data/tools/cmake-scripts/macos-environment.cmake +2 -2
- data/tools/cmake-scripts/msys-environment.cmake +1 -1
- data/tools/cmake-scripts/setup-libarchive.cmake +1 -1
- data/tools/cmake-scripts/setup-libfmt.cmake +1 -1
- data/tools/cmake-scripts/setup-libhowardhinnerdate.cmake +1 -1
- data/tools/cmake-scripts/setup-libutfcpp.cmake +2 -2
- data/tools/cmake-scripts/setup-openssl-1.1.1.cmake +1 -1
- data/tools/docker/alpine-3.17-dev.Dockerfile +49 -0
- data/tools/docker/tools/tools.sh +66 -0
- data/tools/docker/ubuntu-20.04-dev.Dockerfile +51 -0
- data/tools/dwarfs-test-helper/CMakeLists.txt +1 -1
- data/tools/include/pro-statvfs.h +1 -1
- data/tools/tests/cmake/CMakeLists.txt +1 -1
- data/tools/tests/setup-libfmt/CMakeLists.txt +1 -1
- data/tools/tests/setup-libhowardhinnerdate/CMakeLists.txt +1 -1
- data/tools/tests/setup-librachive/CMakeLists.txt +1 -1
- data/tools/tests/setup-libutfcpp/CMakeLists.txt +1 -1
- data/tools/tests/setup-openssl/CMakeLists.txt +1 -1
- metadata +10 -2
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/cmake/copy_dir.cmake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Copyright (c) 2021, [Ribose Inc](https://www.ribose.com).
|
2
2
|
# All rights reserved.
|
3
|
-
# This file is a part of
|
3
|
+
# This file is a part of the Tebako project.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without
|
6
6
|
# modification, are permitted provided that the following conditions
|
data/common.env
CHANGED
data/exe/tebako
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
# Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
|
5
5
|
# All rights reserved.
|
6
|
-
# This file is a part of
|
6
|
+
# This file is a part of the Tebako project.
|
7
7
|
#
|
8
8
|
# Redistribution and use in source and binary forms, with or without
|
9
9
|
# modification, are permitted provided that the following conditions
|
data/exe/tebako-packager
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
5
5
|
# All rights reserved.
|
6
|
-
# This file is a part of
|
6
|
+
# This file is a part of the Tebako project.
|
7
7
|
#
|
8
8
|
# Redistribution and use in source and binary forms, with or without
|
9
9
|
# modification, are permitted provided that the following conditions
|
@@ -67,21 +67,6 @@ begin
|
|
67
67
|
Tebako::Packager.pass1a(ARGV[2])
|
68
68
|
Tebako::Packager.stash(ARGV[4], ARGV[5], ARGV[2], ruby_ver)
|
69
69
|
Tebako::Packager.pass2(ARGV[1], ARGV[2], ARGV[3], ruby_ver)
|
70
|
-
|
71
|
-
when "finalize"
|
72
|
-
# ARGV[0] -- command
|
73
|
-
# ARGV[1] -- RUBY_SOURCE_DIR
|
74
|
-
# ARGV[2] -- APP_NAME
|
75
|
-
# ARGV[3] -- RUBY_VER
|
76
|
-
# ARGV[4] -- patchelf executable
|
77
|
-
# ARGV[5] -- WITH_PATHELF
|
78
|
-
unless ARGV.length == 6
|
79
|
-
raise Tebako::Error,
|
80
|
-
"tebako-packager finalize command expects 6 arguments, #{ARGV.length} has been provided."
|
81
|
-
end
|
82
|
-
ruby_ver = Tebako::RubyVersion.new(ARGV[3])
|
83
|
-
with_patchelf = ARGV[5].casecmp("ON").zero? || ARGV[5].casecmp("YES").zero?
|
84
|
-
Tebako::Packager.finalize(ARGV[1], ARGV[2], ruby_ver, with_patchelf ? ARGV[4] : nil)
|
85
70
|
else
|
86
71
|
raise Tebako::Error, "tebako-packager cannot process #{ARGV[0]} command"
|
87
72
|
end
|
data/include/tebako/tebako-fs.h
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
*
|
3
3
|
* Copyright (c) 2021-2024, [Ribose Inc](https://www.ribose.com).
|
4
4
|
* All rights reserved.
|
5
|
-
* This file is a part of
|
5
|
+
* This file is a part of the Tebako project.
|
6
6
|
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without
|
8
8
|
* modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
*
|
3
3
|
* Copyright (c) 2021-2024, [Ribose Inc](https://www.ribose.com).
|
4
4
|
* All rights reserved.
|
5
|
-
* This file is a part of
|
5
|
+
* This file is a part of the Tebako project.
|
6
6
|
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without
|
8
8
|
* modification, are permitted provided that the following conditions
|
data/lib/tebako/build_helpers.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/lib/tebako/cache_manager.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/lib/tebako/cli.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
# Copyright (c) 2021-2023 [Ribose Inc](https://www.ribose.com).
|
5
5
|
# All rights reserved.
|
6
|
-
# This file is a part of
|
6
|
+
# This file is a part of the Tebako project.
|
7
7
|
#
|
8
8
|
# Redistribution and use in source and binary forms, with or without
|
9
9
|
# modification, are permitted provided that the following conditions
|
data/lib/tebako/cli_helpers.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2023-
|
3
|
+
# Copyright (c) 2023-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -55,18 +55,36 @@ module Tebako
|
|
55
55
|
|
56
56
|
WARN
|
57
57
|
|
58
|
+
WARN2 = <<~WARN
|
59
|
+
|
60
|
+
******************************************************************************************************************
|
61
|
+
* *
|
62
|
+
* WARNING: You are creating packaging environment inside application root. *
|
63
|
+
* It is not an error but it means that all build-time artifacts will ne included in tebako package. *
|
64
|
+
* You do not need it unless under very special circumstances like tebako packaging tebako itself. *
|
65
|
+
* *
|
66
|
+
* Please consider removing your exisitng `--prefix` folder abd use another one that points outside of `--root` *
|
67
|
+
* like tebako press --r ~/projects/myproject -e start.rb -o /temp/myproject.tebako -p ~/.tebako *
|
68
|
+
* *
|
69
|
+
******************************************************************************************************************
|
70
|
+
|
71
|
+
WARN
|
72
|
+
|
73
|
+
def check_warnings(options_manager)
|
74
|
+
return unless options_manager.mode != "runtime"
|
75
|
+
|
76
|
+
puts WARN if options_manager.package_within_root?
|
77
|
+
puts WARN2 if options_manager.prefix_within_root?
|
78
|
+
sleep 5
|
79
|
+
end
|
80
|
+
|
58
81
|
def do_press(options_manager)
|
59
82
|
scenario_manager = Tebako::ScenarioManager.new(options_manager.root, options_manager.fs_entrance)
|
60
83
|
scenario_manager.configure_scenario
|
61
84
|
options_manager.process_gemfile(scenario_manager.gemfile_path) if scenario_manager.with_gemfile
|
62
|
-
|
85
|
+
check_warnings(options_manager)
|
63
86
|
puts options_manager.press_announce(scenario_manager.msys?)
|
64
87
|
|
65
|
-
if options_manager.package_within_root?
|
66
|
-
puts WARN
|
67
|
-
sleep 5
|
68
|
-
end
|
69
|
-
|
70
88
|
do_press_runtime(options_manager, scenario_manager)
|
71
89
|
do_press_application(options_manager, scenario_manager)
|
72
90
|
end
|
@@ -85,6 +103,7 @@ module Tebako
|
|
85
103
|
merged_env = ENV.to_h.merge(scenario_manager.b_env)
|
86
104
|
Tebako.packaging_error(103) unless system(merged_env, press_cfg_cmd(options_manager))
|
87
105
|
Tebako.packaging_error(104) unless system(merged_env, press_build_cmd(options_manager))
|
106
|
+
finalize(options_manager, scenario_manager)
|
88
107
|
end
|
89
108
|
|
90
109
|
def do_setup(options_manager)
|
@@ -108,6 +127,13 @@ module Tebako
|
|
108
127
|
Tebako::Codegen.generate_stub_rb(options_manager)
|
109
128
|
end
|
110
129
|
|
130
|
+
def finalize(options_manager, scenario_manager)
|
131
|
+
use_patchelf = options_manager.patchelf? && scenario_manager.linux_gnu?
|
132
|
+
patchelf = use_patchelf ? "#{options_manager.deps_bin_dir}/patchelf" : nil
|
133
|
+
Tebako::Packager.finalize(options_manager.ruby_src_dir, options_manager.package,
|
134
|
+
options_manager.rv, patchelf, options_manager.output_type_first)
|
135
|
+
end
|
136
|
+
|
111
137
|
def options_from_tebafile(tebafile)
|
112
138
|
::YAML.load_file(tebafile)["options"] || {}
|
113
139
|
rescue Psych::SyntaxError => e
|
data/lib/tebako/codegen.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/lib/tebako/deploy_helper.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -110,12 +110,13 @@ module Tebako
|
|
110
110
|
private
|
111
111
|
|
112
112
|
def bundle_config
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
113
|
+
bundle_config_option(["build.ffi", "--disable-system-libffi"])
|
114
|
+
bundle_config_option(["build.nokogiri", @nokogiri_option])
|
115
|
+
bundle_config_option(["force_ruby_platform", @force_ruby_platform])
|
116
|
+
end
|
117
|
+
|
118
|
+
def bundle_config_option(opt)
|
119
|
+
BuildHelpers.run_with_capture_v([@bundler_command, bundler_reference, "config", "set", "--local"] + opt)
|
119
120
|
end
|
120
121
|
|
121
122
|
def check_entry_point(entry_point_root)
|
data/lib/tebako/error.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2023-
|
3
|
+
# Copyright (c) 2023-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -117,6 +117,15 @@ module Tebako
|
|
117
117
|
@deps_lib_dir ||= File.join(deps, "lib")
|
118
118
|
end
|
119
119
|
|
120
|
+
def folder_within_root?(folder)
|
121
|
+
folder_path = Pathname.new(folder.chomp("/"))
|
122
|
+
root_path = Pathname.new(root.chomp("/"))
|
123
|
+
folder_path.ascend do |path|
|
124
|
+
return true if path == root_path
|
125
|
+
end
|
126
|
+
false
|
127
|
+
end
|
128
|
+
|
120
129
|
def fs_current
|
121
130
|
fs_current = Dir.pwd
|
122
131
|
if @scmb.msys?
|
@@ -154,9 +163,17 @@ module Tebako
|
|
154
163
|
@output_folder ||= File.join(prefix, "o")
|
155
164
|
end
|
156
165
|
|
166
|
+
def output_type_first
|
167
|
+
@output_type_first ||= %w[both runtime].include?(mode) ? "runtime package" : "package"
|
168
|
+
end
|
169
|
+
|
170
|
+
def output_type_second
|
171
|
+
"application package"
|
172
|
+
end
|
173
|
+
|
157
174
|
def package
|
158
175
|
package = if @options["output"].nil?
|
159
|
-
File.join(Dir.pwd, File.basename(fs_entrance, ".*"))
|
176
|
+
File.join(Dir.pwd, mode == "runtime" ? "tebako-runtime" : File.basename(fs_entrance, ".*"))
|
160
177
|
else
|
161
178
|
@options["output"]&.gsub("\\", "/")
|
162
179
|
end
|
@@ -168,12 +185,11 @@ module Tebako
|
|
168
185
|
end
|
169
186
|
|
170
187
|
def package_within_root?
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
false
|
188
|
+
folder_within_root?(package)
|
189
|
+
end
|
190
|
+
|
191
|
+
def patchelf?
|
192
|
+
@options["patchelf"]
|
177
193
|
end
|
178
194
|
|
179
195
|
def prefix
|
@@ -186,6 +202,10 @@ module Tebako
|
|
186
202
|
end
|
187
203
|
end
|
188
204
|
|
205
|
+
def prefix_within_root?
|
206
|
+
folder_within_root?(prefix)
|
207
|
+
end
|
208
|
+
|
189
209
|
def press_announce(is_msys)
|
190
210
|
case mode
|
191
211
|
when "application"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/lib/tebako/packager.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -93,17 +93,17 @@ module Tebako
|
|
93
93
|
patch_map.each { |fname, mapping| PatchHelpers.patch_file("#{root}/#{fname}", mapping) }
|
94
94
|
end
|
95
95
|
|
96
|
-
def finalize(src_dir, app_name, ruby_ver, patchelf)
|
96
|
+
def finalize(src_dir, app_name, ruby_ver, patchelf, output_type)
|
97
97
|
puts "-- Running finalize script"
|
98
98
|
|
99
|
-
RubyBuilder.new(ruby_ver, src_dir).target_build
|
99
|
+
RubyBuilder.new(ruby_ver, src_dir).target_build(output_type)
|
100
100
|
exe_suffix = ScenarioManagerBase.new.exe_suffix
|
101
101
|
src_name = File.join(src_dir, "ruby#{exe_suffix}")
|
102
102
|
patchelf(src_name, patchelf)
|
103
103
|
package_name = "#{app_name}#{exe_suffix}"
|
104
104
|
# strip_or_copy(os_type, src_name, package_name)
|
105
105
|
Tebako::Stripper.strip_file(src_name, package_name)
|
106
|
-
puts "Created tebako
|
106
|
+
puts "Created tebako #{output_type} at \"#{package_name}\""
|
107
107
|
end
|
108
108
|
|
109
109
|
# Init
|
data/lib/tebako/packager_lite.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2023-
|
3
|
+
# Copyright (c) 2023-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -61,7 +61,7 @@ module Tebako
|
|
61
61
|
deploy
|
62
62
|
FileUtils.rm_f(name)
|
63
63
|
Tebako::Packager.mkdwarfs(@opts.deps_bin_dir, name, @opts.data_src_dir, codegen)
|
64
|
-
puts "Created tebako
|
64
|
+
puts "Created tebako #{@opts.output_type_second} at \"#{name}\""
|
65
65
|
end
|
66
66
|
|
67
67
|
def deploy
|
data/lib/tebako/ruby_builder.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2024 [Ribose Inc](https://www.ribose.com).
|
3
|
+
# Copyright (c) 2024-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -50,8 +50,8 @@ module Tebako
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# Final build of tebako package
|
53
|
-
def target_build
|
54
|
-
puts " ... building tebako
|
53
|
+
def target_build(output_type)
|
54
|
+
puts " ... building tebako #{output_type}"
|
55
55
|
Dir.chdir(@src_dir) do
|
56
56
|
BuildHelpers.run_with_capture(["make", "ruby", "-j#{@ncores}"]) if @ruby_ver.ruby3x?
|
57
57
|
BuildHelpers.run_with_capture(["make", "-j#{@ncores}"])
|
data/lib/tebako/ruby_version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -45,7 +45,8 @@ module Tebako
|
|
45
45
|
"3.3.5" => "3781a3504222c2f26cb4b9eb9c1a12dbf4944d366ce24a9ff8cf99ecbce75196",
|
46
46
|
"3.3.6" => "8dc48fffaf270f86f1019053f28e51e4da4cce32a36760a0603a9aee67d7fd8d",
|
47
47
|
"3.3.7" => "9c37c3b12288c7aec20ca121ce76845be5bb5d77662a24919651aaf1d12c8628",
|
48
|
-
"3.4.1" => "3d385e5d22d368b064c817a13ed8e3cc3f71a7705d7ed1bae78013c33aa7c87f"
|
48
|
+
"3.4.1" => "3d385e5d22d368b064c817a13ed8e3cc3f71a7705d7ed1bae78013c33aa7c87f",
|
49
|
+
"3.4.2" => "41328ac21f2bfdd7de6b3565ef4f0dd7543354d37e96f157a1552a6bd0eb364b"
|
49
50
|
}.freeze
|
50
51
|
|
51
52
|
MIN_RUBY_VERSION_WINDOWS = "3.1.6"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -66,6 +66,14 @@ module Tebako
|
|
66
66
|
@linux
|
67
67
|
end
|
68
68
|
|
69
|
+
def linux_gnu?
|
70
|
+
@linux && !@musl
|
71
|
+
end
|
72
|
+
|
73
|
+
def linux_musl?
|
74
|
+
@linux && @musl
|
75
|
+
end
|
76
|
+
|
69
77
|
def m_files
|
70
78
|
# [TODO]
|
71
79
|
# Ninja generates incorrect script for tebako press target -- gets lost in a chain custom targets
|
data/lib/tebako/stripper.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2024-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/lib/tebako/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023-2025 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
@@ -26,5 +26,5 @@
|
|
26
26
|
# POSSIBILITY OF SUCH DAMAGE.
|
27
27
|
|
28
28
|
module Tebako
|
29
|
-
VERSION = "0.
|
29
|
+
VERSION = "0.13.0"
|
30
30
|
end
|
data/lib/tebako.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|
data/src/tebako-main.cpp
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
*
|
3
3
|
* Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
|
4
4
|
* All rights reserved.
|
5
|
-
* This file is a part of
|
5
|
+
* This file is a part of the Tebako project.
|
6
6
|
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without
|
8
8
|
* modification, are permitted provided that the following conditions
|
data/tebako.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
|
4
4
|
# All rights reserved.
|
5
|
-
# This file is a part of
|
5
|
+
# This file is a part of the Tebako project.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without
|
8
8
|
# modification, are permitted provided that the following conditions
|