Skip to content

Commit c572004

Browse files
committed
update to rocky 8 as centos 7 is EOL
- fix curl - bump versions - merge identical dockerfiles
1 parent 3bbda99 commit c572004

File tree

5 files changed

+46
-48
lines changed

5 files changed

+46
-48
lines changed

Dockerfile-amd64 Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM centos:7
1+
FROM rockylinux:8
22
ADD image /hbb_build
33
ARG DISABLE_OPTIMIZATIONS=0
44
RUN bash /hbb_build/build.sh

Dockerfile-arm64

-4
This file was deleted.

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 3.0.6
1+
VERSION = 3.0.7
22
ifneq ($VERSION, edge)
33
MAJOR_VERSION := $(shell awk -v OFS=. -F. '{print $$1,$$2}' <<< $(VERSION))
44
endif
@@ -9,12 +9,12 @@ IMAGE = $(OWNER)/holy-build-box
99
.PHONY: build test tags push release
1010

1111
build:
12-
docker buildx build --platform "linux/amd64" --rm -t $(IMAGE)-amd64:$(VERSION) -f Dockerfile-amd64 --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
13-
docker buildx build --platform "linux/arm64" --rm -t $(IMAGE)-arm64:$(VERSION) -f Dockerfile-arm64 --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
12+
docker buildx build --platform "linux/amd64" --rm -t $(IMAGE)-amd64:$(VERSION) -f Dockerfile --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
13+
docker buildx build --platform "linux/arm64" --rm -t $(IMAGE)-arm64:$(VERSION) -f Dockerfile --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
1414

1515
test:
16-
docker run -it --platform "linux/amd64" --rm -e SKIP_FINALIZE=1 -e DISABLE_OPTIMIZATIONS=1 -v $$(pwd)/image:/hbb_build:ro centos:7 bash /hbb_build/build.sh
17-
docker run -it --platform "linux/arm64" --rm -e SKIP_FINALIZE=1 -e DISABLE_OPTIMIZATIONS=1 -v $$(pwd)/image:/hbb_build:ro centos:7 bash /hbb_build/build.sh
16+
docker run -it --platform "linux/amd64" --rm -e SKIP_FINALIZE=1 -e DISABLE_OPTIMIZATIONS=1 -v $$(pwd)/image:/hbb_build:ro rockylinux:8 bash /hbb_build/build.sh
17+
docker run -it --platform "linux/arm64" --rm -e SKIP_FINALIZE=1 -e DISABLE_OPTIMIZATIONS=1 -v $$(pwd)/image:/hbb_build:ro rockylinux:8 bash /hbb_build/build.sh
1818

1919
tags:
2020
ifdef MAJOR_VERSION

image/activate_func.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DEVTOOLSET_VERSION=9
44

55
function activate_holy_build_box_deps_installation_environment() {
66
# shellcheck disable=SC1090
7-
source /opt/rh/devtoolset-${DEVTOOLSET_VERSION}/enable
7+
source /opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/enable
88
export PATH=/hbb/bin:$PATH
99
export C_INCLUDE_PATH=/hbb/include
1010
export CPLUS_INCLUDE_PATH=/hbb/include
@@ -27,7 +27,7 @@ function activate_holy_build_box() {
2727
local EXTRA_SHLIB_LDFLAGS="$6"
2828

2929
# shellcheck disable=SC1090
30-
source /opt/rh/devtoolset-${DEVTOOLSET_VERSION}/enable
30+
source /opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/enable
3131

3232
export PATH=$PREFIX/bin:/hbb/bin:$PATH
3333
export C_INCLUDE_PATH=$PREFIX/include

image/build.sh

+38-36
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/bash
22
set -e
33

4-
CCACHE_VERSION=3.7.12
5-
CMAKE_VERSION=3.22.2
6-
CMAKE_MAJOR_VERSION=3.22
4+
CCACHE_VERSION=4.9.1
5+
CMAKE_VERSION=3.29.3
6+
CMAKE_MAJOR_VERSION=3.29
77
GCC_LIBSTDCXX_VERSION=9.3.0
8-
ZLIB_VERSION=1.2.12
9-
OPENSSL_VERSION=1.1.1m
10-
CURL_VERSION=7.81.0
11-
GIT_VERSION=2.35.1
12-
SQLITE_VERSION=3370200
13-
SQLITE_YEAR=2022
8+
ZLIB_VERSION=1.3.1
9+
OPENSSL_VERSION=3.3.0
10+
CURL_VERSION=8.7.1
11+
GIT_VERSION=2.45.0
12+
SQLITE_VERSION=3450300
13+
SQLITE_YEAR=2024
1414

1515
# shellcheck source=image/functions.sh
1616
source /hbb_build/functions.sh
@@ -64,61 +64,62 @@ if ! eval_bool "$SKIP_INITIALIZE"; then
6464
run touch /var/lib/rpm/*
6565
run yum update -y
6666
run yum install -y tar curl curl-devel m4 autoconf automake libtool pkgconfig openssl-devel \
67-
file patch bzip2 zlib-devel gettext python-setuptools python-devel \
68-
epel-release centos-release-scl
69-
run yum install -y python2-pip "devtoolset-$DEVTOOLSET_VERSION"
67+
file patch bzip2 zlib-devel gettext python2-setuptools python2-devel \
68+
epel-release perl-IPC-Cmd
69+
run yum install -y python2-pip "gcc-toolset-$DEVTOOLSET_VERSION" "gcc-toolset-$DEVTOOLSET_VERSION-runtime"
7070

71-
echo "*link_gomp: %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } %{static: -ldl }" > /opt/rh/devtoolset-9/root/usr/lib/gcc/*-redhat-linux/9/libgomp.spec
71+
echo "*link_gomp: %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } %{static: -ldl }" > /opt/rh/gcc-toolset-${DEVTOOLSET_VERSION}/root/usr/lib/gcc/*-redhat-linux/9/libgomp.spec
7272

7373
fi
7474

7575

76-
### ccache
76+
### CMake
7777

78-
if ! eval_bool "$SKIP_CCACHE"; then
79-
header "Installing ccache $CCACHE_VERSION"
80-
download_and_extract ccache-$CCACHE_VERSION.tar.gz \
81-
ccache-$CCACHE_VERSION \
82-
https://github.com/ccache/ccache/releases/download/v$CCACHE_VERSION/ccache-$CCACHE_VERSION.tar.gz
78+
if ! eval_bool "$SKIP_CMAKE"; then
79+
header "Installing CMake $CMAKE_VERSION"
80+
download_and_extract cmake-$CMAKE_VERSION.tar.gz \
81+
cmake-$CMAKE_VERSION \
82+
https://cmake.org/files/v$CMAKE_MAJOR_VERSION/cmake-$CMAKE_VERSION.tar.gz
8383

8484
(
8585
activate_holy_build_box_deps_installation_environment
8686
set_default_cflags
87-
run ./configure --prefix=/hbb
88-
run make -j$MAKE_CONCURRENCY install
89-
run strip --strip-all /hbb/bin/ccache
87+
run ./configure --prefix=/hbb --no-qt-gui --parallel=$MAKE_CONCURRENCY
88+
run make -j$MAKE_CONCURRENCY
89+
run make install
90+
run strip --strip-all /hbb/bin/cmake /hbb/bin/cpack /hbb/bin/ctest
9091
)
9192
# shellcheck disable=SC2181
9293
if [[ "$?" != 0 ]]; then false; fi
9394

9495
echo "Leaving source directory"
9596
popd >/dev/null
96-
run rm -rf ccache-$CCACHE_VERSION
97+
run rm -rf cmake-$CMAKE_VERSION
9798
fi
9899

99100

100-
### CMake
101+
### ccache
101102

102-
if ! eval_bool "$SKIP_CMAKE"; then
103-
header "Installing CMake $CMAKE_VERSION"
104-
download_and_extract cmake-$CMAKE_VERSION.tar.gz \
105-
cmake-$CMAKE_VERSION \
106-
https://cmake.org/files/v$CMAKE_MAJOR_VERSION/cmake-$CMAKE_VERSION.tar.gz
103+
if ! eval_bool "$SKIP_CCACHE"; then
104+
header "Installing ccache $CCACHE_VERSION"
105+
download_and_extract ccache-$CCACHE_VERSION.tar.gz \
106+
ccache-$CCACHE_VERSION \
107+
https://github.com/ccache/ccache/releases/download/v$CCACHE_VERSION/ccache-$CCACHE_VERSION.tar.gz
107108

108109
(
109110
activate_holy_build_box_deps_installation_environment
110111
set_default_cflags
111-
run ./configure --prefix=/hbb --no-qt-gui --parallel=$MAKE_CONCURRENCY
112-
run make -j$MAKE_CONCURRENCY
113-
run make install
114-
run strip --strip-all /hbb/bin/cmake /hbb/bin/cpack /hbb/bin/ctest
112+
run cmake -DREDIS_STORAGE_BACKEND=OFF -DCMAKE_INSTALL_PREFIX="/hbb" -S . -B build
113+
run cmake --build build
114+
run cmake --install build
115+
run strip --strip-all /hbb/bin/ccache
115116
)
116117
# shellcheck disable=SC2181
117118
if [[ "$?" != 0 ]]; then false; fi
118119

119120
echo "Leaving source directory"
120121
popd >/dev/null
121-
run rm -rf cmake-$CMAKE_VERSION
122+
run rm -rf ccache-$CCACHE_VERSION
122123
fi
123124

124125

@@ -277,8 +278,9 @@ function install_openssl()
277278
export CFLAGS
278279

279280
# shellcheck disable=SC2086
280-
run ./config --prefix="$PREFIX" --openssldir="$PREFIX/openssl" \
281-
threads zlib no-shared no-sse2 $CFLAGS $LDFLAGS
281+
run ./Configure "linux-$(uname -m)" \
282+
--prefix="$PREFIX" --openssldir="$PREFIX/openssl" \
283+
threads zlib no-shared no-sse2 -fvisibility=hidden $CFLAGS $LDFLAGS
282284
run make
283285
run make install_sw
284286
run strip --strip-all "$PREFIX/bin/openssl"

0 commit comments

Comments
 (0)