BewareMyPower commented on code in PR #428:
URL: https://github.com/apache/pulsar-client-cpp/pull/428#discussion_r1650569254


##########
pkg/rpm/Dockerfile:
##########
@@ -30,87 +30,19 @@ RUN yum update -y && \
         rpm-build \
         which \
         createrepo \
-        libstdc++-static \
-        python3
+        git \
+        python3 \
+        python3-pip
+RUN dnf --enablerepo=powertools install -y libstdc++-static
 
 RUN pip3 install pyyaml
 
 ADD .build/dependencies.yaml /
 ADD .build/dep-version.py /usr/local/bin
 
-# Download and compile boost
-# GCC 4.8.2 implementation of std::regex is buggy, so we install boost::regex 
here
-RUN BOOST_VERSION=$(dep-version.py boost) && \
-    echo "BOOST VERSION: '${BOOST_VERSION}'" && \
-    curl -O -L 
https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}.tar.gz
 && \
-    tar zxf boost-${BOOST_VERSION}.tar.gz && \
-    cd boost-${BOOST_VERSION} && \
-    ./bootstrap.sh --with-libraries=regex && \
-    ./b2 address-model=64 cxxflags="-fPIC -std=c++11" link=static 
threading=multi variant=release install && \
-    rm -rf /boost-${BOOST_VERSION}.tar.gz /boost-${BOOST_VERSION}
-
-RUN CMAKE_VERSION=$(dep-version.py cmake) && \
-    curl -O -L 
https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${PLATFORM}.tar.gz
 && \
-    tar xfz cmake-${CMAKE_VERSION}-linux-${PLATFORM}.tar.gz && \
-    cp cmake-${CMAKE_VERSION}-linux-${PLATFORM}/bin/* /usr/bin/ && \
-    cp -r cmake-${CMAKE_VERSION}-linux-${PLATFORM}/share/cmake-* /usr/share/ 
&& \
-    rm -rf cmake-${CMAKE_VERSION}-linux-${PLATFORM} 
cmake-${CMAKE_VERSION}-linux-${PLATFORM}.tar.gz
-
-# Download and compile protobuf
-RUN PROTOBUF_VERSION=$(dep-version.py protobuf) && \
-    curl -O -L  
https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz
 && \
-    tar xfz protobuf-cpp-${PROTOBUF_VERSION}.tar.gz && \
-    cd protobuf-${PROTOBUF_VERSION}/ && \
-    CXXFLAGS=-fPIC ./configure && \
-    make -j8 && make install && ldconfig && \
-    rm -rf /protobuf-cpp-${PROTOBUF_VERSION}.tar.gz 
/protobuf-${PROTOBUF_VERSION}
-
-# ZLib
-RUN ZLIB_VERSION=$(dep-version.py zlib) && \
-    curl -O -L https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz 
&& \
-    tar xfz v${ZLIB_VERSION}.tar.gz && \
-    cd zlib-${ZLIB_VERSION} && \
-    CFLAGS="-fPIC -O3" ./configure && \
-    make -j8 && make install && \
-    rm -rf /v${ZLIB_VERSION}.tar.gz /zlib-${ZLIB_VERSION}
-
-# Zstandard
-RUN ZSTD_VERSION=$(dep-version.py zstd) && \
-    curl -O -L 
https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz
 && \
-    tar xfz zstd-${ZSTD_VERSION}.tar.gz && \
-    cd zstd-${ZSTD_VERSION} && \
-    CFLAGS="-fPIC -O3" make -j8 && \
-    make install && \
-    rm -rf /zstd-${ZSTD_VERSION} /zstd-${ZSTD_VERSION}.tar.gz
-
-# Snappy
-RUN SNAPPY_VERSION=$(dep-version.py snappy) && \
-    curl -O -L 
https://github.com/google/snappy/archive/refs/tags/${SNAPPY_VERSION}.tar.gz && \
-    tar xfz ${SNAPPY_VERSION}.tar.gz && \
-    cd snappy-${SNAPPY_VERSION} && \
-    CXXFLAGS="-fPIC -O3" cmake . -DSNAPPY_BUILD_TESTS=OFF 
-DSNAPPY_BUILD_BENCHMARKS=OFF && \
-    make -j8 && make install && \
-    rm -rf /snappy-${SNAPPY_VERSION} /${SNAPPY_VERSION}.tar.gz
-
-RUN OPENSSL_VERSION=$(dep-version.py openssl) && \
-    OPENSSL_VERSION_UNDERSCORE=$(echo $OPENSSL_VERSION | sed 's/\./_/g') && \
-    curl -O -L 
https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz
 && \
-    tar xfz OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz && \
-    cd openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}/ && \
-    ./Configure -fPIC --prefix=/usr/local/ssl/ linux-${PLATFORM} && \
-    make -j8 && make install && \
-    rm -rf /OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz 
/openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
-
-ENV LD_LIBRARY_PATH /usr/local/ssl/lib/:
-ENV OPENSSL_ROOT_DIR /usr/local/ssl/
-
-# LibCurl
-RUN CURL_VERSION=$(dep-version.py curl) && \
-    CURL_VERSION_UNDERSCORE=$(echo $CURL_VERSION | sed 's/\./_/g') && \
-    curl -O -L  
https://github.com/curl/curl/releases/download/curl-${CURL_VERSION_UNDERSCORE}/curl-${CURL_VERSION}.tar.gz
 && \
-    tar xfz curl-${CURL_VERSION}.tar.gz && \
-    cd curl-${CURL_VERSION} && \
-    CFLAGS=-fPIC ./configure --with-ssl=/usr/local/ssl/ --without-zstd 
--without-libpsl && \
-    make -j8 && make install && \
-    rm -rf /curl-${CURL_VERSION}.tar.gz /curl-${CURL_VERSION}
+# Vcpkg does not provide pre-built binaries for Arm architectures so we need 
to build vcpkg from source
+RUN yum install -y cmake
+RUn dnf --enablerepo=devel install -y ninja-build

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to