This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git


The following commit(s) were added to refs/heads/main by this push:
     new b5632d1  Add yaml-cpp and libswoc installs to rockylinux:[8,9] (#329)
b5632d1 is described below

commit b5632d1dc2fc27bced379fc89e404efdc5976b6e
Author: Brian Neradt <[email protected]>
AuthorDate: Mon Mar 25 12:03:21 2024 -0500

    Add yaml-cpp and libswoc installs to rockylinux:[8,9] (#329)
---
 docker/rockylinux8/Dockerfile | 44 +++++++++++++++++++++++++++++++++++++++++++
 docker/rockylinux9/Dockerfile | 44 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git a/docker/rockylinux8/Dockerfile b/docker/rockylinux8/Dockerfile
index 041d300..b19ff78 100644
--- a/docker/rockylinux8/Dockerfile
+++ b/docker/rockylinux8/Dockerfile
@@ -193,5 +193,49 @@ RUN <<EOF
   python3 -m pip install virtualenv
 EOF
 
+# Install some tools to test out of source builds.
+RUN <<EOF
+  set -e
+  set -x
+
+  # Retrieve the libswoc version we use in ATS.
+  cd /root/
+  mkdir libswoc
+  cd libswoc
+  wget -O CMakeLists.txt 
https://raw.githubusercontent.com/apache/trafficserver/master/lib/swoc/CMakeLists.txt
+  swoc_version=$(awk '/LIBSWOC_VERSION/ {print $NF; exit}' CMakeLists.txt | tr 
-d '")')
+
+  # Now, checkout that version and install libswoc in /opt/libswoc
+  git clone https://github.com/apache/trafficserver-libswoc.git
+  cd trafficserver-libswoc
+  git checkout ${swoc_version}
+  pipenv install
+  pipenv run scons -j`nproc` all
+  arch=$(uname -m)
+  
old_path=/root/libswoc/trafficserver-libswoc/_install/debug_posix-${arch}_default
+  cp -rf ${old_path} /opt/libswoc
+  chmod 755 /opt/libswoc
+  sed -i "s:${old_path}:/opt/libswoc:g" /opt/libswoc/lib/pkgconfig/*.pc
+  cd /root/
+  rm -rf /root/libswoc
+
+  # Retrieve the yaml-cpp version we use in ATS.
+  cd /root/
+  mkdir yaml-cpp
+  cd yaml-cpp
+  wget -O CMakeLists.txt 
https://raw.githubusercontent.com/apache/trafficserver/master/lib/yamlcpp/CMakeLists.txt
+  yaml_version=$(awk '/project/ {print $3}' CMakeLists.txt)
+
+  cd /root/yaml-cpp
+  git clone https://github.com/jbeder/yaml-cpp.git
+  cd yaml-cpp
+  git checkout ${yaml_version}
+  cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/yaml-cpp
+  cmake --build build
+  cmake --install build
+  cd /root
+  rm -rf yaml-cpp
+EOF
+
 # Keep this at the end to clean up the dnf cache.
 RUN dnf clean all
diff --git a/docker/rockylinux9/Dockerfile b/docker/rockylinux9/Dockerfile
index 5744389..1b8c4f4 100644
--- a/docker/rockylinux9/Dockerfile
+++ b/docker/rockylinux9/Dockerfile
@@ -170,6 +170,50 @@ RUN dnf install -y ctags elfutils-libelf-devel wdiff
 COPY /install_abi_tools.sh /root/install_abi_tools.sh
 RUN bash /root/install_abi_tools.sh
 
+# Install some tools to test out of source builds.
+RUN <<EOF
+  set -e
+  set -x
+
+  # Retrieve the libswoc version we use in ATS.
+  cd /root/
+  mkdir libswoc
+  cd libswoc
+  wget -O CMakeLists.txt 
https://raw.githubusercontent.com/apache/trafficserver/master/lib/swoc/CMakeLists.txt
+  swoc_version=$(awk '/LIBSWOC_VERSION/ {print $NF; exit}' CMakeLists.txt | tr 
-d '")')
+
+  # Now, checkout that version and install libswoc in /opt/libswoc
+  git clone https://github.com/apache/trafficserver-libswoc.git
+  cd trafficserver-libswoc
+  git checkout ${swoc_version}
+  pipenv install
+  pipenv run scons -j`nproc` all
+  arch=$(uname -m)
+  
old_path=/root/libswoc/trafficserver-libswoc/_install/debug_posix-${arch}_default
+  cp -rf ${old_path} /opt/libswoc
+  chmod 755 /opt/libswoc
+  sed -i "s:${old_path}:/opt/libswoc:g" /opt/libswoc/lib/pkgconfig/*.pc
+  cd /root/
+  rm -rf /root/libswoc
+
+  # Retrieve the yaml-cpp version we use in ATS.
+  cd /root/
+  mkdir yaml-cpp
+  cd yaml-cpp
+  wget -O CMakeLists.txt 
https://raw.githubusercontent.com/apache/trafficserver/master/lib/yamlcpp/CMakeLists.txt
+  yaml_version=$(awk '/project/ {print $3}' CMakeLists.txt)
+
+  cd /root/yaml-cpp
+  git clone https://github.com/jbeder/yaml-cpp.git
+  cd yaml-cpp
+  git checkout ${yaml_version}
+  cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/yaml-cpp
+  cmake --build build
+  cmake --install build
+  cd /root
+  rm -rf yaml-cpp
+EOF
+
 RUN <<EOF
   set -e
   # reinstall openssl-devel

Reply via email to