tebako 0.7.2.rc2 → 0.7.2.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12c6393e228f7a9b35f5e4e134145d61d050e043b3f71fd6b7470bc6ae9fe84c
4
- data.tar.gz: 950729b6f6eeed71c400f114fc45a0820919cbd8ddf22c8682e4d5cc77ed38b5
3
+ metadata.gz: 99a2a477845a6154633205dd8d0420156f97c057cfb820158d0f88e432e09a85
4
+ data.tar.gz: e8fb206e64c629a058620c9563bd34b274af06f8d14fdaacd7b3ad3788406536
5
5
  SHA512:
6
- metadata.gz: 547a0f3dca568dc52dd40cd0fbca7e09d96ab51de383edfb70e7e1bb16fde23c81135250ba7cdd4bf9c7fe7658e1241e753ef62dea0c96181496fbcf7da06ea3
7
- data.tar.gz: 9653a599391afb40aed074d456b3d04e779091501223f1d6e41aa4c85ad1071838e6a90a7f4b1c2eb834061e5b9f8d875346c8438c904ac221a05d3a22d0571a
6
+ metadata.gz: 78846d4443cdd33781108b1be109b191b8f1398a882083d4c6e4840b5dcaf5a122c60ec887fd3ef3c2a2562355457e1cf7bd4bd1eff96d33b056ff78042a9414
7
+ data.tar.gz: 5803abbe66b044013d221c3ca3e18f1f7fded575deca85b9b9210b4920488a3d87c5b3314f2fcb3d4c0302b634f48a18cb01c6515e6ee6985f7ece0d023ea336
data/CMakeLists.txt CHANGED
@@ -216,7 +216,7 @@ if(DWARFS_PRELOAD)
216
216
  list(GET LIBDWARFS_WR_VER_COMPONENTS 2 LIBDWARFS_WR_VER_PATCH)
217
217
  set (LIBDWARFS_WR_VER_M ${LIBDWARFS_WR_VER_MAJOR}.${LIBDWARFS_WR_VER_MINOR}.${LIBDWARFS_WR_VER_PATCH})
218
218
  else(DWARFS_PRELOAD)
219
- def_ext_prj_g(DWARFS_WR "v0.5.2")
219
+ def_ext_prj_g(DWARFS_WR "v0.5.3")
220
220
  endif(DWARFS_PRELOAD)
221
221
 
222
222
  set(LIBYAML_RUBY_OPTION "")
data/README.adoc CHANGED
@@ -150,55 +150,9 @@ There is no workaround for this issue as it lloks like is a limitation of the ma
150
150
 
151
151
  === General
152
152
 
153
- Tebako is distributed as a Ruby gem
154
-
155
- [source,sh]
156
- ----
157
- gem install tebako
158
- ----
159
-
160
- === Quick setup on Ubuntu 20.04 on Docker
161
-
162
- Launch a container on the target platform:
163
-
164
- [source,sh]
165
- ----
166
- # For x86_64
167
- docker run -it --platform linux/x86_64 ubuntu bash
168
-
169
- # For Apple M1
170
- docker run -it --platform linux/aarch64 ubuntu bash
171
- ----
172
-
173
- In the container:
174
-
175
- [source,sh]
176
- ----
177
- export DEBIAN_FRONTEND=noninteractive
178
- export TZ=Etc/UTC
179
-
180
- apt-get update
181
- apt-get install -y software-properties-common
182
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
183
- apt-get install -y gcc-10 g++-10
184
-
185
- apt-get install -y curl git ruby ruby-dev pkg-config bison flex make autoconf
186
- curl https://apt.kitware.com/kitware-archive.sh | bash
187
- apt-get install -y cmake
188
-
189
- apt-get -y install sudo git curl build-essential pkg-config bison flex autoconf \
190
- binutils-dev libevent-dev acl-dev libfmt-dev libjemalloc-dev libiberty-dev \
191
- libdouble-conversion-dev liblz4-dev liblzma-dev libssl-dev libunwind-dev \
192
- libboost-filesystem-dev libboost-program-options-dev libboost-system-dev \
193
- libboost-iostreams-dev libboost-date-time-dev libboost-context-dev \
194
- libboost-regex-dev libboost-thread-dev libbrotli-dev libdwarf-dev libelf-dev \
195
- libgoogle-glog-dev libffi-dev libgdbm-dev libyaml-dev libncurses-dev \
196
- libreadline-dev libutfcpp-dev libncurses-dev libreadline-dev gcc-10 g++-10 \
197
- ruby-dev ruby-bundler
198
-
199
- gem install tebako
200
-
201
- ----
153
+ Tebako is distributed as a Ruby gem.
154
+ Additionally, Docker containers for Ubuntu and Alpine Linux with a preinstalled Tebako packaging environment
155
+ are available at https://github.com/orgs/tamatebako/packages.
202
156
 
203
157
  == Usage
204
158
 
@@ -248,7 +202,8 @@ tebako press \
248
202
  -r|--root=<project-root-folder> \
249
203
  -e|--entry-point=<entry-point> \
250
204
  [-o|--output=<packaged file name>] \
251
- [-l|--log-level=<error|warn|debug|trace>]
205
+ [-l|--log-level=<error|warn|debug|trace>] \
206
+ [-D|--devmode]
252
207
  ----
253
208
 
254
209
  Where:
@@ -268,6 +223,9 @@ point base name`)
268
223
 
269
224
  * `log-level`, the logging level for tebako built-in memory filesystem driver (optional, defaults to `error`)
270
225
 
226
+ * `devmode` flag activates development mode, in which Tebako's cache and packaging consistency checks are relaxed.
227
+ Please note that this mode is not intended for production use and should only be used during development.
228
+
271
229
  [example]
272
230
  ====
273
231
  [source,sh]
@@ -295,7 +253,8 @@ based on ```tebako setup``` output. Building cache based on ```tebako press``` m
295
253
  ----
296
254
  tebako setup \
297
255
  [-p |--prefix=<tebako-root-folder>] \
298
- [-R |--Ruby=<2.7.8|3.0.7|3.1.4|3.1.5|3.1.6|3.2.3|3.2.4>]
256
+ [-R |--Ruby=<2.7.8|3.0.7|3.1.4|3.1.5|3.1.6|3.2.3|3.2.4>] \
257
+ [-D | --devmode]
299
258
  ----
300
259
 
301
260
  Where:
@@ -304,6 +263,9 @@ Where:
304
263
 
305
264
  * `Ruby` parameter defines Ruby version that will be packaged (optional, defaults to 3.1.6)
306
265
 
266
+ * `devmode` flag activates development mode, in which Tebako's cache and packaging consistency checks are relaxed.
267
+ Please note that this mode is not intended for production use and should only be used during development.
268
+
307
269
  ==== Clean
308
270
 
309
271
  This command deletes tebako artifacts created by setup and press commands.
data/common.env CHANGED
@@ -1,5 +1,5 @@
1
1
  BUILD_TYPE=Release
2
2
  DEPS=deps
3
3
  INCBIN_TAG=348e36b
4
- DWARFS_WR_TAG=v0.5.2
4
+ DWARFS_WR_TAG=v0.5.3
5
5
  RUBY_VER=3.1.6
data/lib/tebako/cli.rb CHANGED
@@ -69,7 +69,7 @@ module Tebako
69
69
 
70
70
  desc "hash", "Print build script hash (ci cache key)"
71
71
  def hash
72
- print Digest::SHA256.hexdigest File.read File.join(source, "CMakeLists.txt")
72
+ print Digest::SHA256.hexdigest [File.read(File.join(source, "CMakeLists.txt")), Tebako::VERSION].join
73
73
  end
74
74
 
75
75
  desc "press", "Press tebako image"
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module Tebako
29
- VERSION = "0.7.2.rc2"
29
+ VERSION = "0.7.2.rc3"
30
30
  end
@@ -42,7 +42,7 @@ jobs:
42
42
  strategy:
43
43
  fail-fast: false
44
44
  matrix:
45
- os: [ ubuntu-20.04, macos-11.0 ]
45
+ os: [ ubuntu-20.04, macos-12 ]
46
46
  steps:
47
47
  - name: Checkout
48
48
  uses: actions/checkout@v4
@@ -67,7 +67,7 @@ jobs:
67
67
  strategy:
68
68
  fail-fast: false
69
69
  matrix:
70
- os: [ ubuntu-20.04, macos-11.0 ]
70
+ os: [ ubuntu-20.04, macos-12 ]
71
71
  steps:
72
72
  - name: Checkout
73
73
  uses: actions/checkout@v4
@@ -89,7 +89,7 @@ jobs:
89
89
  strategy:
90
90
  fail-fast: false
91
91
  matrix:
92
- os: [ ubuntu-20.04, macos-11.0 ]
92
+ os: [ ubuntu-20.04, macos-12 ]
93
93
  steps:
94
94
  - name: Checkout
95
95
  uses: actions/checkout@v4
@@ -106,7 +106,7 @@ jobs:
106
106
 
107
107
  test-cross-brew-install:
108
108
  name: test arm-brew-setup/install
109
- runs-on: macos-11.0
109
+ runs-on: macos-12
110
110
  steps:
111
111
  - name: Checkout
112
112
  uses: actions/checkout@v4
@@ -122,3 +122,24 @@ jobs:
122
122
  set -o errexit -o pipefail -o noclobber -o nounset
123
123
  test -f $PWD/arm-homebrew/lib/libgflags.dylib
124
124
  test -f $PWD/arm-homebrew/lib/libglog.dylib
125
+
126
+ test-macos-environment-script:
127
+ name: test macos-environment.cmake on ${{ matrix.os }}
128
+ runs-on: ${{ matrix.os }}
129
+ strategy:
130
+ fail-fast: false
131
+ matrix:
132
+ os: [ macos-12, macos-13, macos-14 ]
133
+
134
+ steps:
135
+ - name: Checkout
136
+ uses: actions/checkout@v4
137
+
138
+ - name: Checkout
139
+ uses: actions/checkout@v4
140
+
141
+ - name: Install packages
142
+ run: brew install flex bison bash
143
+
144
+ - name: Run CMake test
145
+ run: cmake -B test.build -S tests/cmake
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021-2023, [Ribose Inc](https://www.ribose.com).
1
+ # Copyright (c) 2021-2024, [Ribose Inc](https://www.ribose.com).
2
2
  # All rights reserved.
3
3
  # This file is a part of tamatebako
4
4
  #
@@ -25,14 +25,32 @@
25
25
  #
26
26
 
27
27
  if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
28
+
29
+ function(find_and_set_homebrew_prefix package_name pkg_name executable_name)
30
+ execute_process(
31
+ COMMAND brew --prefix ${package_name}
32
+ RESULT_VARIABLE BREW_${pkg_name}_RESULT
33
+ OUTPUT_VARIABLE BREW_${pkg_name}_PREFIX_TMP
34
+ OUTPUT_STRIP_TRAILING_WHITESPACE
35
+ )
36
+ if (BREW_${pkg_name}_RESULT EQUAL 0 AND EXISTS "${BREW_${pkg_name}_PREFIX_TMP}")
37
+ set(BREW_${pkg_name}_PREFIX "${BREW_${pkg_name}_PREFIX_TMP}" CACHE PATH "${package_name} prefix")
38
+ message(STATUS "Found ${package_name} keg installed by Homebrew at ${BREW_${pkg_name}_PREFIX}")
39
+ set(${executable_name} "${BREW_${pkg_name}_PREFIX}/bin/${package_name}" CACHE FILEPATH "${executable_name} executable")
40
+ endif()
41
+ endfunction()
42
+
43
+
28
44
  execute_process(
29
45
  COMMAND brew --prefix
30
46
  RESULT_VARIABLE BREW_PREFIX_RES
31
- OUTPUT_VARIABLE BREW_PREFIX
47
+ OUTPUT_VARIABLE BREW_PREFIX_TMP
32
48
  OUTPUT_STRIP_TRAILING_WHITESPACE
33
49
  )
34
- if(NOT (BREW_PREFIX_RES EQUAL 0 AND EXISTS ${BREW_PREFIX}))
50
+ if(NOT (BREW_PREFIX_RES EQUAL 0 AND EXISTS ${BREW_PREFIX_TMP}))
35
51
  message(FATAL "Could not find build brew setup")
52
+ else()
53
+ set(BREW_PREFIX "${BREW_PREFIX_TMP}" CACHE PATH "Brew installation prefix")
36
54
  endif()
37
55
 
38
56
  message(STATUS "Using brew environment at ${BREW_PREFIX}")
@@ -40,41 +58,12 @@ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
40
58
  set(OPENSSL_ROOT_DIR "${BREW_PREFIX}/opt/openssl@3")
41
59
  set(CMAKE_PREFIX_PATH "${BREW_PREFIX}")
42
60
  include_directories("${OPENSSL_ROOT_DIR}/include")
43
- include_directories("${TARGET_BREW_PREFIX}/include")
61
+ include_directories("${BREW_PREFIX}/include")
44
62
 
45
63
  # https://stackoverflow.com/questions/53877344/cannot-configure-cmake-to-look-for-homebrew-installed-version-of-bison
46
- execute_process(
47
- COMMAND brew --prefix bison
48
- RESULT_VARIABLE BREW_BISON
49
- OUTPUT_VARIABLE BREW_BISON_PREFIX
50
- OUTPUT_STRIP_TRAILING_WHITESPACE
51
- )
52
- if (BREW_BISON EQUAL 0 AND EXISTS "${BREW_BISON_PREFIX}")
53
- message(STATUS "Found Bison keg installed by Homebrew at ${BREW_BISON_PREFIX}")
54
- set(BISON_EXECUTABLE "${BREW_BISON_PREFIX}/bin/bison")
55
- endif()
56
-
57
- execute_process(
58
- COMMAND brew --prefix flex
59
- RESULT_VARIABLE BREW_FLEX
60
- OUTPUT_VARIABLE BREW_FLEX_PREFIX
61
- OUTPUT_STRIP_TRAILING_WHITESPACE
62
- )
63
- if (BREW_FLEX EQUAL 0 AND EXISTS "${BREW_FLEX_PREFIX}")
64
- message(STATUS "Found Flex keg installed by Homebrew at ${BREW_FLEX_PREFIX}")
65
- set(FLEX_EXECUTABLE "${BREW_FLEX_PREFIX}/bin/flex")
66
- endif()
67
-
68
- execute_process(
69
- COMMAND brew --prefix bash
70
- RESULT_VARIABLE BREW_BASH
71
- OUTPUT_VARIABLE BREW_BASH_PREFIX
72
- OUTPUT_STRIP_TRAILING_WHITESPACE
73
- )
74
- if (BREW_BASH EQUAL 0 AND EXISTS "${BREW_BASH_PREFIX}")
75
- message(STATUS "Found GNU bash keg installed by Homebrew at ${BREW_BASH_PREFIX}")
76
- set(GNU_BASH "${BREW_BASH_PREFIX}/bin/bash")
77
- endif()
64
+ find_and_set_homebrew_prefix("bison" "BISON" "BISON_EXECUTABLE")
65
+ find_and_set_homebrew_prefix("flex" "FLEX" "FLEX_EXECUTABLE")
66
+ find_and_set_homebrew_prefix("bash" "BASH" "GNU_BASH")
78
67
 
79
68
  # Suppress superfluous randlib warnings about "*.a" having no symbols on MacOSX.
80
69
  set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
@@ -0,0 +1,81 @@
1
+ # Copyright (c) 2024, [Ribose Inc](https://www.ribose.com).
2
+ # All rights reserved.
3
+ # This file is a part of tebako
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions
7
+ # are met:
8
+ # 1. Redistributions of source code must retain the above copyright
9
+ # notice, this list of conditions and the following disclaimer.
10
+ # 2. Redistributions in binary form must reproduce the above copyright
11
+ # notice, this list of conditions and the following disclaimer in the
12
+ # documentation and/or other materials provided with the distribution.
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
+ # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16
+ # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
18
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
+ # POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ cmake_minimum_required(VERSION 3.15)
27
+ project(cmake-tests)
28
+
29
+
30
+ # Adjust the path to where your macos-environment.cmake is located
31
+ include("${CMAKE_CURRENT_LIST_DIR}/../../cmake-scripts/macos-environment.cmake")
32
+
33
+ # Function to check if a variable is set (not empty)
34
+ function(check_variable_set VAR_NAME)
35
+ if(NOT ${VAR_NAME})
36
+ message(FATAL_ERROR "${VAR_NAME} is not set.")
37
+ endif()
38
+ endfunction()
39
+
40
+ # Function to check if a file/directory exists at the path specified by a variable
41
+ function(check_exists VAR_NAME TYPE)
42
+ if(NOT EXISTS "${${VAR_NAME}}")
43
+ if(TYPE STREQUAL "FILE")
44
+ message(FATAL_ERROR "The file specified in ${VAR_NAME} does not exist: ${${VAR_NAME}}")
45
+ elseif(TYPE STREQUAL "DIRECTORY")
46
+ message(FATAL_ERROR "The directory specified in ${VAR_NAME} does not exist: ${${VAR_NAME}}")
47
+ endif()
48
+ endif()
49
+ endfunction()
50
+
51
+ message(STATUS "BREW_PREFIX: ${BREW_PREFIX}")
52
+ check_variable_set(BREW_PREFIX)
53
+ check_exists(BREW_PREFIX DIRECTORY)
54
+
55
+ message(STATUS "OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}")
56
+ check_variable_set(OPENSSL_ROOT_DIR)
57
+ check_exists(OPENSSL_ROOT_DIR DIRECTORY)
58
+
59
+ message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
60
+ check_variable_set(CMAKE_PREFIX_PATH)
61
+ check_exists(CMAKE_PREFIX_PATH DIRECTORY)
62
+
63
+ message(STATUS "BREW_BISON_PREFIX: ${BREW_BISON_PREFIX}")
64
+ check_variable_set(BREW_BISON_PREFIX)
65
+ check_exists(BREW_BISON_PREFIX DIRECTORY)
66
+
67
+ message(STATUS "BREW_FLEX_PREFIX: ${BREW_FLEX_PREFIX}")
68
+ check_variable_set(BREW_FLEX_PREFIX)
69
+ check_exists(BREW_FLEX_PREFIX DIRECTORY)
70
+
71
+ message(STATUS "FLEX_EXECUTABLE: ${FLEX_EXECUTABLE}")
72
+ check_variable_set(FLEX_EXECUTABLE)
73
+ check_exists(FLEX_EXECUTABLE FILE)
74
+
75
+ message(STATUS "BREW_BASH_PREFIX: ${BREW_BASH_PREFIX}")
76
+ check_variable_set(BREW_BASH_PREFIX)
77
+ check_exists(BREW_BASH_PREFIX DIRECTORY)
78
+
79
+ message(STATUS "GNU_BASH: ${GNU_BASH}")
80
+ check_variable_set(GNU_BASH)
81
+ check_exists(GNU_BASH FILE)
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.7.2.rc2
4
+ version: 0.7.2.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-02 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -103,6 +103,7 @@ files:
103
103
  - tools/cmake-scripts/setup-openssl.cmake
104
104
  - tools/cmake-scripts/version.cmake
105
105
  - tools/include/pro-statvfs.h
106
+ - tools/tests/cmake/CMakeLists.txt
106
107
  - tools/tests/setup-libhowardhinnerdate/CMakeLists.txt
107
108
  - tools/tests/setup-librachive/CMakeLists.txt
108
109
  - tools/tests/setup-libutfcpp/CMakeLists.txt