Skip to content

Commit

Permalink
Revert "HPCC-33262 Ensure rpm-build is available in CentOS 7 builds"
Browse files Browse the repository at this point in the history
This reverts commit 623f2ce.
  • Loading branch information
GordonSmith committed Jan 24, 2025
1 parent 53758bf commit a80949d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 34 deletions.
4 changes: 0 additions & 4 deletions dockerfiles/vcpkg/amazonlinux.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-amazonlinux:$VCPKG_REF

RUN yum install -y \
rpm-build && \
yum -y clean all && rm -rf /var/cache

ENTRYPOINT ["/bin/bash", "--login", "-c"]

CMD ["/bin/bash"]
39 changes: 23 additions & 16 deletions dockerfiles/vcpkg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ echo "DOCKER_PASSWORD: $DOCKER_PASSWORD"

docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

CMAKE_ALL_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DINCLUDE_PLUGINS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DUSE_CPPUNIT=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
CMAKE_OPENBLAS_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=OFF -DECLBLAS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
CMAKE_PLATFORM_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DPLATFORM=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
CMAKE_ALL_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DINCLUDE_PLUGINS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DUSE_CPPUNIT=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON"
CMAKE_OPENBLAS_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=OFF -DECLBLAS=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF"
CMAKE_PLATFORM_OPTIONS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON -DPLATFORM=ON -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF"

function doBuild() {
docker pull "hpccsystems/platform-build-base-$1:$VCPKG_REF" || true
docker pull "hpccsystems/platform-build-$1:$VCPKG_REF" || true
docker pull "hpccsystems/platform-build-$1:$GITHUB_BRANCH" || true
# docker pull "hpccsystems/platform-build-base-$1:$VCPKG_REF" || true
# docker pull "hpccsystems/platform-build-$1:$VCPKG_REF" || true
# docker pull "hpccsystems/platform-build-$1:$GITHUB_BRANCH" || true

docker build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \
docker buildx build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \
--build-arg DOCKER_NAMESPACE=$DOCKER_USERNAME \
--build-arg VCPKG_REF=$VCPKG_REF \
--cache-from hpccsystems/platform-build-$1:$VCPKG_REF \
Expand All @@ -48,11 +48,12 @@ function doBuild() {
# docker push hpccsystems/platform-build-$1:$VCPKG_REF
# docker push hpccsystems/platform-build-$1:$GITHUB_BRANCH

CMAKE_OPTIONS_EXTRA=""
rm -f ./vcpkg/vcpkg
mkdir -p ./build-$1
if [ "$1" == "centos-7*" ]; then
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
elif [ "$1" == "amazonlinux" ]; then
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic"
CMAKE_OPTIONS_EXTRA="-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
mkdir -p $HOME/.ccache
docker run --rm \
Expand All @@ -61,30 +62,36 @@ function doBuild() {
--mount source="$HOME/.ccache",target=/root/.ccache,type=bind,consistency=cached \
hpccsystems/platform-build-$1:$VCPKG_REF \
"rm -rf /hpcc-dev/HPCC-Platform/build-$1/CMakeCache.txt /hpcc-dev/HPCC-Platform/build-$1/CMakeFiles && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/HPCC-Platform/build-$1 ${CMAKE_ALL_OPTIONS} ${CMAKE_OPTIONS_EXTRA} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/HPCC-Platform/build-$1 ${CMAKE_ALL_OPTIONS} ${CMAKE_OPTIONS_EXTRA} && \
cmake --build /hpcc-dev/HPCC-Platform/build-$1 --parallel && \
echo 'Done'"

rm -f ./vcpkg/vcpkg

# sudo chown -R $(id -u):$(id -g) ./build-$1
# docker run -it --mount source="$(pwd)",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached build-ubuntu-22.04:latest bash
}

trap 'kill $(jobs -p)' EXIT
function cleanup() {
kill $(jobs -p)
rm -f ./vcpkg/vcpkg || true
}

trap 'cleanup; exit' EXIT

# ./vcpkg/bootstrap-vcpkg.sh
mkdir -p ./vcpkg-logs

if [ "$1" != "" ]; then
doBuild $1 &
doBuild $1
else
# doBuild ubuntu-24.04 &> vcpkg-logs/ubuntu-24.04.log &
doBuild ubuntu-24.04 &> vcpkg-logs/ubuntu-24.04.log &
doBuild ubuntu-22.04 &> vcpkg-logs/ubuntu-22.04.log &
doBuild ubuntu-20.04 &> vcpkg-logs/ubuntu-20.04.log &
# doBuild rockylinux-8 &> vcpkg-logs/rockylinux-8.log &
doBuild centos-7 &> vcpkg-logs/centos-7.log &
doBuild centos-8 &> vcpkg-logs/centos-8.log &
doBuild amazonlinux &> vcpkg-logs/amazonlinux.log &
doBuild centos-7-rh-python38 &> vcpkg-logs/centos-7-rh-python38.log &
doBuild centos-7 &> vcpkg-logs/centos-7.log &
fi

wait
Expand Down
7 changes: 2 additions & 5 deletions dockerfiles/vcpkg/centos-7-rh-python38.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF

RUN yum remove -y python3 python3-devel && \
yum install -y \
rh-python38 \
rh-python38-python-devel \
rpm-build && \
yum -y clean all && rm -rf /var/cache
yum install -y rh-python38 rh-python38-python-devel && \
yum clean all

RUN echo "source /opt/rh/rh-python38/enable" >> /etc/bashrc
SHELL ["/bin/bash", "--login", "-c"]
Expand Down
4 changes: 0 additions & 4 deletions dockerfiles/vcpkg/centos-7.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF

RUN yum install -y \
rpm-build && \
yum -y clean all && rm -rf /var/cache

ENTRYPOINT ["/bin/bash", "--login", "-c"]

CMD ["/bin/bash"]
4 changes: 0 additions & 4 deletions dockerfiles/vcpkg/centos-8.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
ARG VCPKG_REF=latest
FROM hpccsystems/platform-build-base-centos-8:$VCPKG_REF

RUN yum install -y \
rpm-build && \
yum -y clean all && rm -rf /var/cache

ENTRYPOINT ["/bin/bash", "--login", "-c"]

CMD ["/bin/bash"]

0 comments on commit a80949d

Please sign in to comment.