Skip to content

Commit 337bb98

Browse files
Merge pull request #7 from CryptoDevelopmentServices/Packages_updates
Packages updates
2 parents b6347de + 434609e commit 337bb98

12 files changed

Lines changed: 202 additions & 167 deletions

File tree

.github/workflows/ci.yml

Lines changed: 44 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ jobs:
124124
dep-opts: ""
125125
config-opts: "--with-gui=qt5 --disable-tests"
126126
goal: deploy
127-
sdk: 10.8
128-
sdk-shasum: "709b84adde0fbd1c15de4c9dadb36b3b8c65f9bb7f8a7152f0cf33ab7c3f57af"
127+
sdk: 10.11
128+
sdk-shasum: "bec9d089ebf2e2dd59b1a811a38ec78ebd5da18cbbcd6ab39d1e59f64ac5033f"
129129

130130
runs-on: ubuntu-22.04
131131
container:
132132
image: ${{ matrix.container }}
133-
options: ${{ matrix.container-options == '' && '-e 1ARCH=1ARCH' || matrix.container-options }}
133+
options: ${{ matrix.container-options == '' && '-e 1ADVC=1ADVC' || matrix.container-options }}
134134

135135
steps:
136136
- name: Configure container
@@ -181,22 +181,24 @@ jobs:
181181

182182
- name: Install SDK
183183
if: ${{ matrix.sdk }}
184-
shell: bash
185184
env:
186-
SDK_URL: https://github.com/phracker/MacOSX-SDKs/releases/download/10.15
187-
sdk-filename: MacOSX${{ matrix.sdk }}.sdk.tar.xz
185+
sdk-filename: MacOSX${{ matrix.sdk }}.sdk.tar.gz
188186
run: |
189-
set -euo pipefail
190-
mkdir -p ./depends/sdk-sources ./depends/SDKs
191-
echo "📦 Downloading macOS SDK ${{ matrix.sdk }} from phracker…"
192-
curl -L --fail \
193-
"$SDK_URL/${{ env.sdk-filename }}" \
194-
-o "depends/sdk-sources/${{ env.sdk-filename }}"
195-
echo "🔐 Verifying checksum…"
196-
echo "${{ matrix.sdk-shasum }} depends/sdk-sources/${{ env.sdk-filename }}" | sha256sum -c
197-
echo "📂 Extracting SDK…"
198-
tar -C depends/SDKs -xf "depends/sdk-sources/${{ env.sdk-filename }}"
199-
echo "✅ SDK installed: depends/SDKs/${{ env.sdk-filename }}"
187+
mkdir -p depends/sdk-sources
188+
mkdir -p depends/SDKs
189+
190+
cd depends/sdk-sources
191+
192+
# First check: does NOT include path
193+
echo "${{ matrix.sdk-shasum }} ${{ env.sdk-filename }}" | sha256sum -c || \
194+
curl --location --fail "$SDK_URL/${{ env.sdk-filename }}" -o "${{ env.sdk-filename }}"
195+
196+
# Second check AFTER download
197+
echo "${{ matrix.sdk-shasum }} ${{ env.sdk-filename }}" | sha256sum -c
198+
199+
cd ../..
200+
201+
tar -C depends/SDKs -xf depends/sdk-sources/${{ env.sdk-filename }}
200202
201203
- name: Dependency cache
202204
uses: actions/cache@v4
@@ -206,105 +208,22 @@ jobs:
206208
path: ./depends/built
207209
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*', '.github/workflows/ci.yml') }}
208210

209-
# # 🧩 Fix macOS LLVM 10.0.0 mirror (Ubuntu 18.04 build from GitHub)
210-
# - name: Patch native_cctools.mk to LLVM 10.0.0 (GitHub, Ubuntu 18.04)
211-
# if: matrix.name == 'x86_64-macos'
212-
# shell: bash
213-
# run: |
214-
# set -euo pipefail
215-
# CCTOOLS="depends/packages/native_cctools.mk"
216-
217-
# # ✅ LLVM 10.0.0 toolchain info
218-
# LLVM_VER="10.0.0"
219-
# LLVM_FILE="clang+llvm-${LLVM_VER}-x86_64-linux-gnu-ubuntu-18.04.tar.xz"
220-
# LLVM_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VER}"
221-
# LLVM_SHA="b25f592a0c00686f03e3b7db68ca6dc87418f681f4ead4df4745a01d9be63843"
222-
223-
# # ✅ Corrected cctools-port source (GitHub changed archive path!)
224-
# CCTOOLS_VER="master"
225-
# CCTOOLS_URL="https://github.com/tpoechtrager/cctools-port/archive/refs/heads"
226-
# CCTOOLS_FILE="${CCTOOLS_VER}.tar.gz"
227-
# CCTOOLS_SHA="579c46ce16a269f202de4f4118db00bfdef95e3aa251cc79d4726faef9f4dab2"
228-
229-
# echo "🧹 Cleaning old LLVM/cctools artifacts..."
230-
# rm -rf depends/work/download/native_cctools* depends/sources/clang*llvm-* || true
231-
232-
# echo "⚙️ Patching native_cctools.mk..."
233-
# # --- cctools source ---
234-
# sed -i "s|^\$(package)_version=.*|\$(package)_version=${CCTOOLS_VER}|" "${CCTOOLS}"
235-
# sed -i "s|^\$(package)_download_path=.*|\$(package)_download_path=${CCTOOLS_URL}|" "${CCTOOLS}"
236-
# sed -i "s|^\$(package)_file_name=.*|\$(package)_file_name=${CCTOOLS_FILE}|" "${CCTOOLS}"
237-
# sed -i "s|^\$(package)_sha256_hash=.*|\$(package)_sha256_hash=${CCTOOLS_SHA}|" "${CCTOOLS}"
238-
239-
# # --- LLVM toolchain (hard-coded URL + filename to avoid 404) ---
240-
# sed -i "s|^\$(package)_clang_version=.*|\$(package)_clang_version=${LLVM_VER}|" "${CCTOOLS}"
241-
# sed -i "s|^\$(package)_clang_download_path=.*|\$(package)_clang_download_path=${LLVM_URL}|" "${CCTOOLS}"
242-
# sed -i "s|^\$(package)_clang_download_file=.*|\$(package)_clang_download_file=${LLVM_FILE}|" "${CCTOOLS}"
243-
# sed -i "s|^\$(package)_clang_file_name=.*|\$(package)_clang_file_name=${LLVM_FILE}|" "${CCTOOLS}"
244-
# sed -i "s|^\$(package)_clang_sha256_hash=.*|\$(package)_clang_sha256_hash=${LLVM_SHA}|" "${CCTOOLS}"
245-
246-
# echo "🔍 Confirming patched fields..."
247-
# grep -E '^\$\(package\)_(version|download_path|file_name|sha256_hash|clang_download_path|clang_file_name|clang_sha256_hash)=' "${CCTOOLS}" || true
248-
249-
# echo "📦 Installing LLVM ${LLVM_VER} toolchain..."
250-
# apt-get update -y
251-
# DEBIAN_FRONTEND=noninteractive apt-get install -y \
252-
# clang-10 llvm-10-dev libxml2-dev libedit-dev libncurses5 libtinfo5 \
253-
# libbz2-dev zlib1g-dev lld make patch autoconf automake libtool cmake gawk
254-
255-
# update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100
256-
# update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-10 100
257-
258-
# echo "✅ native_cctools.mk patched with correct GitHub refs/heads/master URL and verified LLVM 10.0.0."
259-
260-
# - name: Patch dsymutil missing issue
261-
# if: matrix.name == 'x86_64-macos'
262-
# shell: bash
263-
# run: |
264-
# set -euo pipefail
265-
# CCTOOLS_DIR="depends/packages/native_cctools.mk"
266-
267-
# echo "⚙️ Disabling dsymutil check (not included in LLVM 10.0.0 Linux build)..."
268-
# sed -i '/llvm-dsymutil/d' "$CCTOOLS_DIR"
269-
270-
# # Patch staging rule to tolerate missing dsymutil
271-
# find depends/work/build/x86_64-apple-darwin11/ -type f -name "Makefile" -print0 | \
272-
# xargs -0 sed -i '/llvm-dsymutil/d' || true
273-
274-
# echo "✅ dsymutil references removed — build will continue without it."
211+
- name: Build depends
212+
run: make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }}
275213

276-
# - name: Fix macOS cross build dependencies
277-
# if: matrix.name == 'x86_64-macos'
214+
# - name: Build depends
278215
# run: |
279-
# apt-get update
280-
# DEBIAN_FRONTEND=noninteractive apt-get install -y \
281-
# clang llvm-dev libxml2-dev libssl-dev libbz2-dev libtinfo5 \
282-
# libncurses5 zlib1g-dev xz-utils cmake patch make bison flex
283-
284-
# - name: Patch Boost toolset to prevent version clashes
285-
# if: matrix.name == 'x86_64-macos'
286-
# shell: bash
287-
# run: |
288-
# BOOST_MK="depends/packages/boost.mk"
289-
# USERCFG="depends/sources/boost_1_64_0/tools/build/src/user-config.jam"
290-
# mkdir -p "$(dirname $USERCFG)"
291-
292-
# echo "🛠 Removing auto-detected darwin toolsets..."
293-
# sed -i 's/toolset=darwin//g' "$BOOST_MK" || true
294-
295-
# echo "🛠 Forcing Boost to use ONLY darwin-10.0.0..."
296-
# sed -i 's#./b2 #./b2 toolset=darwin-10.0.0 #g' "$BOOST_MK"
216+
# set +e
217+
# make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }}
218+
# STATUS=$?
297219

298-
# echo "using darwin : 10.0.0 : x86_64-apple-darwin11-clang++ ;" >> "$USERCFG"
220+
# echo "==== Attempting to dump util/domd files found so far ===="
221+
# find depends/work -path "*/openssl*/util/domd" -exec sh -c '
222+
# echo "---- {} ----"
223+
# sed -n "1,200p" "{}"
224+
# ' \;
299225

300-
# echo "🔍 Verifying Boost config override:"
301-
# grep -n "darwin-10.0.0" "$BOOST_MK" || true
302-
# grep -n "darwin" "$USERCFG" || true
303-
304-
# echo "✅ Boost toolset pinned to darwin-10.0.0 (no conflicts)."
305-
306-
- name: Build depends
307-
run: make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }}
226+
# exit $STATUS
308227

309228
- name: CCache
310229
uses: actions/cache@v4
@@ -321,14 +240,23 @@ jobs:
321240
chmod +x autogen.sh
322241
chmod -R +x depends || true
323242
chmod +x share/genbuild.sh
243+
324244
SHORT_COMMIT=$(echo "$GIT_COMMIT_ID" | cut -c1-7)
325245
depends/${{ matrix.host }}/native/bin/ccache --max-size=$CCACHE_SIZE
246+
326247
./autogen.sh
327248
chmod +x configure || true
328-
./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} --enable-reduce-exports \
329-
CFLAGS="-std=c++17 -DGIT_COMMIT_ID=\\\"$SHORT_COMMIT\\\"" \
330-
CXXFLAGS="-std=c++17 -DGIT_COMMIT_ID=\\\"$SHORT_COMMIT\\\"" || ( cat config.log && false)
331-
make $MAKEJOBS ${{ matrix.goal }} CXXFLAGS="-std=c++17" || (echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} CXXFLAGS="-std=c++17" V=1 ; false)
249+
250+
./configure --prefix=`pwd`/depends/${{ matrix.host }} \
251+
${{ matrix.config-opts }} \
252+
--enable-reduce-exports \
253+
CFLAGS="-pipe -O2 -DGIT_COMMIT_ID=\\\"$SHORT_COMMIT\\\"" \
254+
CXXFLAGS="-std=c++17 -pipe -O2 -DGIT_COMMIT_ID=\\\"$SHORT_COMMIT\\\"" \
255+
|| (cat config.log && false)
256+
257+
make $MAKEJOBS ${{ matrix.goal }} \
258+
CXXFLAGS="-std=c++17" \
259+
|| (echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} CXXFLAGS="-std=c++17" V=1 ; false)
332260
333261
- name: Run benchmark
334262
if: ${{ matrix.run-bench }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ src/qt/bitcoin-qt.includes
6161
*.pyc
6262
*.o
6363
*.o-*
64-
*.patch
6564
*.a
6665
*.pb.cc
6766
*.pb.h

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 5)
44
define(_CLIENT_VERSION_MINOR, 0)
55
define(_CLIENT_VERSION_REVISION, 0)
6-
define(_CLIENT_VERSION_BUILD, 2)
6+
define(_CLIENT_VERSION_BUILD, 3)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2025)
99
define(_COPYRIGHT_HOLDERS,[The %s developers])

contrib/devtools/security-check.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,29 @@ def check_PE_NX(executable):
177177
]
178178
}
179179

180-
def identify_executable(executable):
180+
def identify_executable(filename):
181181
with open(filename, 'rb') as f:
182182
magic = f.read(4)
183+
184+
# Windows PE
183185
if magic.startswith(b'MZ'):
184186
return 'PE'
185-
elif magic.startswith(b'\x7fELF'):
187+
188+
# Linux ELF
189+
if magic.startswith(b'\x7fELF'):
186190
return 'ELF'
191+
192+
# macOS Mach-O (32/64-bit, swapped and unswapped)
193+
MACHO_MAGICS = [
194+
b'\xfe\xed\xfa\xce', # 32-bit Mach-O
195+
b'\xce\xfa\xed\xfe', # 32-bit reverse byte order
196+
b'\xfe\xed\xfa\xcf', # 64-bit Mach-O
197+
b'\xcf\xfa\xed\xfe', # 64-bit reverse byte order
198+
]
199+
200+
if magic in MACHO_MAGICS:
201+
return 'MACHO' # <- added type
202+
187203
return None
188204

189205
if __name__ == '__main__':
@@ -196,6 +212,11 @@ def identify_executable(executable):
196212
retval = 1
197213
continue
198214

215+
# Skip Mach-O (macOS)
216+
if etype == 'MACHO':
217+
print('%s: skipping macOS Mach-O binary (no checks available)' % filename)
218+
continue
219+
199220
failed = []
200221
warning = []
201222
for (name, func) in CHECKS[etype]:

depends/packages/boost.mk

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,65 @@ $(package)_sha256_hash=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff02
77
define $(package)_set_vars
88
$(package)_config_opts_release=variant=release
99
$(package)_config_opts_debug=variant=debug
10+
11+
# Common Boost build configuration
1012
$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
1113
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
1214

15+
# Linux native build
1316
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
1417

15-
# IMPORTANT: macOS now forced to GCC toolset
18+
# IMPORTANT: macOS must NOT use darwin toolset!
19+
# Boost darwin toolset is incompatible with Linux cross-compile.
1620
$(package)_config_opts_darwin=--toolset=gcc runtime-link=shared
1721

22+
# Windows builds
1823
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
19-
2024
$(package)_config_opts_x86_64_mingw32=address-model=64
2125
$(package)_config_opts_i686_mingw32=address-model=32
26+
27+
# 32-bit Linux
2228
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
2329

30+
# Boost toolset assignments
2431
$(package)_toolset_$(host_os)=gcc
2532
$(package)_archiver_$(host_os)=$($(package)_ar)
2633

27-
# These stay defined but DO NOT get used anymore
34+
# Mac fallback variables (not used but required to exist)
2835
$(package)_toolset_darwin=gcc
2936
$(package)_archiver_darwin=$($(package)_ar)
3037

3138
boost_toolset_darwin=$($(package)_toolset_darwin)
3239
boost_archiver_darwin=$($(package)_archiver_darwin)
3340

34-
$(package)_config_libraries=chrono,filesystem,program_options,system,thread
41+
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
3542

3643
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
3744
$(package)_cxxflags_linux=-fPIC
3845
endef
3946

40-
# ==================================================================
41-
# PREPROCESS: FORCE GCC TOOLSET FOR MACOS + EVERY OTHER HOST
42-
# macOS cross compile will use gcc toolset with g++ invocation
43-
# This avoids Boost's broken "darwin" toolset and missing libtool.
44-
# ==================================================================
47+
# ==========================================================
48+
# PREPROCESS: Create Boost user-config.jam
49+
# IMPORTANT: Always use 'gcc' toolset but inject Clang compiler
50+
# ==========================================================
4551
define $(package)_preprocess_cmds
4652
echo "using gcc : : $($(package)_cxx) \
47-
: <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" \
48-
<linkflags>\"$($(package)_ldflags)\" \
49-
<archiver>\"$($(package)_ar)\" \
50-
<ranlib>\"$(host_RANLIB)\" \
51-
<striper>\"$(host_STRIP)\" \
52-
;" > user-config.jam
53+
: <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" \
54+
<linkflags>\"$($(package)_ldflags)\" \
55+
<archiver>\"$($(package)_ar)\" \
56+
<ranlib>\"$(host_RANLIB)\" \
57+
<striper>\"$(host_STRIP)\" \
58+
;" > user-config.jam
5359
endef
5460

5561
define $(package)_config_cmds
5662
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
5763
endef
5864

5965
define $(package)_build_cmds
60-
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
66+
./b2 -d2 -j2 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
6167
endef
6268

6369
define $(package)_stage_cmds
64-
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
70+
./b2 -d0 -j2 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
6571
endef

0 commit comments

Comments
 (0)