Update to use RockyLinux 8 as RHEL 8 compatible base
Also applies changes to build C++20 (Starting on V25.0)
This commit is contained in:
parent
8c62ca4abe
commit
6fe60dea3c
5 changed files with 24 additions and 57 deletions
4
.github/workflows/live_artifacts.yml
vendored
4
.github/workflows/live_artifacts.yml
vendored
|
@ -65,7 +65,7 @@ jobs:
|
|||
AWS_DEFAULT_REGION: us-east-2
|
||||
|
||||
linux_rpm_job:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Sets the tag and repo variables (to build)
|
||||
|
@ -77,7 +77,7 @@ jobs:
|
|||
submodules: "recursive"
|
||||
ref: ${{ github.ref }}
|
||||
repository: ${{ github.repository }}
|
||||
- name: CentOS Base
|
||||
- name: RockyLinux 8 Base
|
||||
run: ci/build-docker-image.sh docker/ci/Dockerfile-rhel nanocurrency/nano-env:rhel
|
||||
- name: Build Artifact
|
||||
run: |
|
||||
|
|
|
@ -12,9 +12,12 @@ run_build() {
|
|||
mkdir -p ~/rpmbuild/SOURCES/
|
||||
mv -f ~/nano-${VERSION}.tar.gz ~/rpmbuild/SOURCES/.
|
||||
if [ "${LIVE:-}" == "1" ]; then
|
||||
scl enable devtoolset-7 'rpmbuild -ba nanocurrency.spec'
|
||||
else
|
||||
scl enable devtoolset-7 'rpmbuild -ba nanocurrency-beta.spec'
|
||||
scl enable gcc-toolset-12 'rpmbuild --nodebuginfo -ba nanocurrency.spec'
|
||||
elif [ "${BETA:-}" == "1" ]; then
|
||||
scl enable gcc-toolset-12 'rpmbuild -ba nanocurrency-beta.spec'
|
||||
else
|
||||
echo "Error: the node network was not defined."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
FROM centos:7
|
||||
FROM rockylinux:8
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
ADD util /build
|
||||
RUN bash /build/build_prep/update-common
|
||||
RUN bash /build/build_prep/rhel/prep.sh
|
||||
RUN rm -rf /build
|
||||
RUN yum update -y
|
||||
RUN yum install -y git wget openssl bzip2
|
||||
RUN yum install -y rpm-build
|
||||
RUN yum install -y glibc-devel glibc-headers make which
|
||||
RUN yum install -y cmake gcc-toolset-12
|
||||
RUN yum install -y python38
|
||||
|
|
|
@ -6,7 +6,7 @@ License: BSD-2-Clause
|
|||
URL: https://nano.org/
|
||||
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
|
||||
Requires(postun): /usr/sbin/userdel
|
||||
BuildRequires: make, libstdc++-static, glibc-devel, glibc-headers
|
||||
BuildRequires: make, glibc-devel, glibc-headers
|
||||
Source: nano-%{version}.tar.gz
|
||||
|
||||
%description
|
||||
|
@ -17,22 +17,18 @@ the nano daemon, and a service.
|
|||
%prep
|
||||
if [ ! -x "$(which cmake)" ]; then
|
||||
echo "cmake must exist, try:" >&2
|
||||
echo " scl enable devtoolset-7 'rpmbuild ...'" >&2
|
||||
echo " scl enable gcc-toolset-12 'rpmbuild ...'" >&2
|
||||
exit 1
|
||||
fi
|
||||
if cc --std=c++14 --version 2>&1 >/dev/null | grep '^' >/dev/null; then
|
||||
if cc --std=c++20 --version 2>&1 >/dev/null | grep '^' >/dev/null; then
|
||||
echo "Unsupported C++ compiler, try:" >&2
|
||||
echo " scl enable devtoolset-7 'rpmbuild ...'" >&2
|
||||
exit 1
|
||||
fi
|
||||
if test ! -d /usr/local/boost; then
|
||||
echo "Boost should be in /usr/local/boost" >&2
|
||||
echo " scl enable gcc-toolset-12 'rpmbuild ...'" >&2
|
||||
exit 1
|
||||
fi
|
||||
%autosetup -n nano-%{version}
|
||||
|
||||
%build
|
||||
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_ROOT=/usr/local/boost .
|
||||
cmake -DCMAKE_VERBOSE_MAKEFILE=ON .
|
||||
make nano_node %{?_smp_mflags}
|
||||
make nano_rpc %{?_smp_mflags}
|
||||
|
||||
|
|
|
@ -4,44 +4,10 @@
|
|||
# -----END COMMON.SH-----
|
||||
|
||||
yes | yum update -y
|
||||
|
||||
yes | yum install -y git wget openssl bzip2 # <boost>
|
||||
|
||||
yes | yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # epel 7
|
||||
yes | yum install -y jq || exit 1
|
||||
|
||||
yes | yum install -y git wget openssl bzip2
|
||||
yes | yum install -y rpm-build || exit 1
|
||||
yes | yum install -y glibc-devel glibc-headers make which libstdc++-static || exit 1
|
||||
yes | yum install -y centos-release-scl || exit 1
|
||||
yes | yum install -y devtoolset-7-gcc-c++ || exit 1
|
||||
yes | yum install -y rh-python38 || exit 1
|
||||
|
||||
|
||||
wget -O cmake_install.sh https://github.com/Kitware/CMake/releases/download/v3.15.4/cmake-3.15.4-Linux-x86_64.sh
|
||||
chmod +x cmake_install.sh
|
||||
./cmake_install.sh --prefix=/usr --exclude-subdir --skip-license
|
||||
|
||||
rm -f ./cmake_install.sh
|
||||
|
||||
# Ensure we have a new enough Boost
|
||||
(
|
||||
eval "$(scl enable devtoolset-7 "bash -c 'set | grep ^PATH='")"
|
||||
if ! have boost; then
|
||||
bootstrap_boost -m -s -j`nproc`
|
||||
fi
|
||||
|
||||
if ! have boost; then
|
||||
echo "Unable to install boost" >&2
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! version_min 'boost --version' 1.69.999; then
|
||||
echo "boost version too low (1.70.0+ required)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
) || exit 1
|
||||
yes | yum install -y glibc-devel glibc-headers make which || exit 1
|
||||
yes | yum install -y cmake gcc-toolset-12 || exit 1
|
||||
yes | yum install -y python38 || exit 1
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue