You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2022/11/03 13:28:46 UTC

[cassandra-builds] branch trunk updated (c07e472 -> f59c8bf)

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

brandonwilliams pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


    from c07e472  When cutting a release, and having built rpm noboolean packages, copy files separately
     new 32d110a  ninja-fix building cassandra-2.2 artefacts
     new f59c8bf  Add j17 to images; upgrade buster to bullseye

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                          | 10 ++--
 build-scripts/cassandra-deb-packaging.sh           |  8 ++--
 docker/almalinux-image.docker                      |  1 +
 docker/build-debs.sh                               |  5 +-
 docker/build-rpms.sh                               |  3 +-
 .../{buster-image.docker => bullseye-image.docker} | 13 ++++--
 docker/centos7-image.docker                        |  6 +++
 docker/centos8-image.docker                        | 54 ----------------------
 docker/jessie-image.docker                         | 49 --------------------
 9 files changed, 29 insertions(+), 120 deletions(-)
 rename docker/{buster-image.docker => bullseye-image.docker} (79%)
 delete mode 100644 docker/centos8-image.docker
 delete mode 100644 docker/jessie-image.docker


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra-builds] 01/02: ninja-fix building cassandra-2.2 artefacts

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git

commit 32d110a0896f8748670775202d6050da9d451981
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Mon Oct 31 21:34:34 2022 +0100

    ninja-fix building cassandra-2.2 artefacts
---
 docker/build-debs.sh | 3 ++-
 docker/build-rpms.sh | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docker/build-debs.sh b/docker/build-debs.sh
index 4484d98..52e323a 100755
--- a/docker/build-debs.sh
+++ b/docker/build-debs.sh
@@ -118,7 +118,8 @@ javac -version
 # Pre-download dependencies, loop to prevent failures
 set +e
 for x in $(seq 1 3); do
-    ant clean resolver-dist-lib
+    # maven-ant-tasks-retrieve-build is for cassandra-2.2 support
+    ant realclean clean resolver-dist-lib || ant realclean maven-ant-tasks-retrieve-build
     RETURN="$?"
     if [ "${RETURN}" -eq "0" ]; then break ; fi
     sleep 3
diff --git a/docker/build-rpms.sh b/docker/build-rpms.sh
index 7382228..651a7e4 100755
--- a/docker/build-rpms.sh
+++ b/docker/build-rpms.sh
@@ -107,7 +107,8 @@ javac -version
 # Pre-download dependencies, loop to prevent failures
 set +e
 for x in $(seq 1 3); do
-    ant clean resolver-dist-lib
+    # maven-ant-tasks-retrieve-build is for cassandra-2.2 support
+    ant realclean clean resolver-dist-lib || ant realclean maven-ant-tasks-retrieve-build
     RETURN="$?"
     if [ "${RETURN}" -eq "0" ]; then break ; fi
     sleep 3


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra-builds] 02/02: Add j17 to images; upgrade buster to bullseye

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git

commit f59c8bf8c2c504475d85b261a60b5d48c9c14983
Author: Brandon Williams <dr...@gmail.com>
AuthorDate: Tue Aug 30 11:40:11 2022 -0500

    Add j17 to images; upgrade buster to bullseye
    
    Patch by brandonwilliams; reviewed by edimitrova for CASSANDRA-17854
---
 README.md                                          | 10 ++--
 build-scripts/cassandra-deb-packaging.sh           |  8 ++--
 docker/almalinux-image.docker                      |  1 +
 docker/build-debs.sh                               |  2 +-
 .../{buster-image.docker => bullseye-image.docker} | 13 ++++--
 docker/centos7-image.docker                        |  6 +++
 docker/centos8-image.docker                        | 54 ----------------------
 docker/jessie-image.docker                         | 49 --------------------
 8 files changed, 25 insertions(+), 118 deletions(-)

diff --git a/README.md b/README.md
index 2d79a87..c2f6758 100644
--- a/README.md
+++ b/README.md
@@ -28,16 +28,14 @@ Prior to release, make sure to edit:
    ```docker build -t cass-build-rpms -f docker/almalinux-image.docker docker/```
    The image will contain a clone of the Apache git repository by default. Using a different repository is possible by adding the `--build-arg CASSANDRA_GIT_URL=https://github.com/myuser/cassandra.git` parameter. All successive builds will be executed based on the repository cloned during docker image creation.
 2. Run build script through docker (specify branch, e.g. cassandra-3.0 and version, e.g. 3.0.11):
-   * Debian Jessie:
-    ```docker run --rm -v `pwd`/dist:/dist `docker images -f label=org.cassandra.buildenv=jessie -q` /home/build/build-debs.sh <branch/tag>```
-   * Debian Buster
-    ```docker run --rm -v `pwd`/dist:/dist `docker images -f label=org.cassandra.buildenv=buster -q` /home/build/build-debs.sh <branch/tag>```
+   * Debian Bullseye
+    ```docker run --rm -v `pwd`/dist:/dist `docker images -f label=org.cassandra.buildenv=bullseye -q` /home/build/build-debs.sh <branch/tag>```
    * RPM:
     ```docker run --rm -v `pwd`/dist:/dist `docker images -f label=org.cassandra.buildenv=almalinux -q` /home/build/build-rpms.sh <branch/tag>```
 
-For the build by Debian Buster, you have the possibility to build Cassandra either by Java 8 (default) or by Java 11. You control the Java version like following. If you want to build with Java 8, just omit that last option.
+For the build by Debian Bullseye, you have the possibility to build Cassandra either by Java 8 (default) or by Java 11. You control the Java version like following. If you want to build with Java 8, just omit that last option.
 
-```docker run --rm -v `pwd`/dist:/dist `docker images -f label=org.cassandra.buildenv=buster -q` /home/build/build-debs.sh <branch/tag> 11```
+```docker run --rm -v `pwd`/dist:/dist `docker images -f label=org.cassandra.buildenv=bullseye -q` /home/build/build-debs.sh <branch/tag> 11```
 
 You should find newly created Debian and RPM packages in the `dist` directory.
 
diff --git a/build-scripts/cassandra-deb-packaging.sh b/build-scripts/cassandra-deb-packaging.sh
index a1483f0..980e9a5 100755
--- a/build-scripts/cassandra-deb-packaging.sh
+++ b/build-scripts/cassandra-deb-packaging.sh
@@ -26,18 +26,18 @@ java_version=$2
 command -v docker >/dev/null 2>&1 || { echo >&2 "docker needs to be installed"; exit 1; }
 (docker info >/dev/null 2>&1) || { echo >&2 "docker needs to running"; exit 1; }
 [ -d "${cassandra_builds_dir}" ] || { echo >&2 "cassandra-builds directory must exist"; exit 1; }
-[ -f "${cassandra_builds_dir}/docker/buster-image.docker" ] || { echo >&2 "docker/buster-image.docker must exist"; exit 1; }
+[ -f "${cassandra_builds_dir}/docker/bullseye-image.docker" ] || { echo >&2 "docker/bullseye-image.docker must exist"; exit 1; }
 [ -f "${cassandra_builds_dir}/docker/build-debs.sh" ] || { echo >&2 "docker/build-debs.sh must exist"; exit 1; }
 
 # remove any previous older built images
-docker image prune --all --force --filter label=org.cassandra.buildenv=buster --filter "until=4h" || true
+docker image prune --all --force --filter label=org.cassandra.buildenv=bullseye --filter "until=4h" || true
 
 pushd $cassandra_builds_dir
 
 # Create build images containing the build tool-chain, Java and an Apache Cassandra git working directory
-docker build --build-arg CASSANDRA_GIT_URL=$CASSANDRA_GIT_URL --build-arg UID_ARG=`id -u` --build-arg GID_ARG=`id -g` -t cassandra-artifacts-buster:${sha} -f docker/buster-image.docker docker/
+docker build --build-arg CASSANDRA_GIT_URL=$CASSANDRA_GIT_URL --build-arg UID_ARG=`id -u` --build-arg GID_ARG=`id -g` -t cassandra-artifacts-bullseye:${sha} -f docker/bullseye-image.docker docker/
 
 # Run build script through docker (specify branch, tag, or sha)
-docker run --rm -v "${deb_dir}":/dist -v ~/.m2/repository/:/home/build/.m2/repository/ cassandra-artifacts-buster:${sha} /home/build/build-debs.sh ${sha} ${java_version}
+docker run --rm -v "${deb_dir}":/dist -v ~/.m2/repository/:/home/build/.m2/repository/ cassandra-artifacts-bullseye:${sha} /home/build/build-debs.sh ${sha} ${java_version}
 
 popd
diff --git a/docker/almalinux-image.docker b/docker/almalinux-image.docker
index 3b7b17a..db38d87 100644
--- a/docker/almalinux-image.docker
+++ b/docker/almalinux-image.docker
@@ -24,6 +24,7 @@ RUN yum -y install \
    git \
    java-1.8.0-openjdk-devel \
    java-11-openjdk-devel \
+   java-17-openjdk-devel \
    make \
    rpm-build \
    sudo \
diff --git a/docker/build-debs.sh b/docker/build-debs.sh
index 52e323a..f9e5366 100755
--- a/docker/build-debs.sh
+++ b/docker/build-debs.sh
@@ -1,5 +1,5 @@
 #!/bin/bash -x
-# Expected to be run from inside cassandra-builds/docker/buster-image.docker
+# Expected to be run from inside cassandra-builds/docker/bullseye-image.docker
 set -e
 
 if [ "$#" -lt 1 ]; then
diff --git a/docker/buster-image.docker b/docker/bullseye-image.docker
similarity index 79%
rename from docker/buster-image.docker
rename to docker/bullseye-image.docker
index c24167c..976e433 100644
--- a/docker/buster-image.docker
+++ b/docker/bullseye-image.docker
@@ -1,4 +1,4 @@
-FROM debian:buster
+FROM debian:bullseye
 
 ENV DEB_DIST_DIR=/dist
 ENV BUILD_HOME=/home/build
@@ -6,7 +6,7 @@ ENV CASSANDRA_DIR=$BUILD_HOME/cassandra
 ARG UID_ARG=1000
 ARG GID_ARG=1000
 
-LABEL org.cassandra.buildenv=buster
+LABEL org.cassandra.buildenv=bullseye
 
 VOLUME ${DEB_DIST_DIR}
 
@@ -27,15 +27,20 @@ RUN apt-get update && apt-get -y install \
    curl \
    devscripts \
    git \
+   python2 \
    sudo
 
-RUN echo 'deb http://ftp.debian.org/debian stretch main' >> /etc/apt/sources.list \
+RUN echo 'deb http://ftp.debian.org/debian bullseye main' >> /etc/apt/sources.list \
+    && echo 'deb http://ftp.debian.org/debian stretch main' >> /etc/apt/sources.list \
     && apt-get update \
-    && apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-11-jdk \
+    && apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk \
     && sed -i '$d' /etc/apt/sources.list \
     && apt-get update \
     && update-java-alternatives --set java-1.8.0-openjdk-$(dpkg --print-architecture)
 
+# dh-python is incompatible with python-is-python2, so we'll link it ourselves
+RUN ln -s /usr/bin/python2 /usr/bin/python
+
 # create and change to build user
 RUN groupadd --gid ${GID_ARG} --non-unique build \
     && adduser --uid ${UID_ARG} --gid ${GID_ARG} --disabled-login --gecos build build \
diff --git a/docker/centos7-image.docker b/docker/centos7-image.docker
index 0044bdb..f20ce44 100644
--- a/docker/centos7-image.docker
+++ b/docker/centos7-image.docker
@@ -41,6 +41,12 @@ RUN ln -sfn /opt/apache-ant-${ANT_VERSION} /opt/ant
 RUN sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment'
 RUN ln -sfn /opt/ant/bin/ant /usr/bin/ant
 
+RUN until curl -S -s --retry 9 --retry-delay 1 https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz -o openjdk-17.0.2_linux-x64_bin.tar.gz ; do echo "curl failed… trying again… " ; done
+RUN tar xvf openjdk-17.0.2_linux-x64_bin.tar.gz
+RUN mv jdk-17.0.2 /opt/jdk-17
+
+
+
 RUN pip3 install --upgrade pip
 
 # create and change to build user
diff --git a/docker/centos8-image.docker b/docker/centos8-image.docker
deleted file mode 100644
index 226dcec..0000000
--- a/docker/centos8-image.docker
+++ /dev/null
@@ -1,54 +0,0 @@
-FROM centos:8.3.2011
-
-ENV BUILD_HOME=/home/build
-ENV RPM_BUILD_DIR=$BUILD_HOME/rpmbuild
-ENV RPM_DIST_DIR=/dist
-ENV CASSANDRA_DIR=$BUILD_HOME/cassandra
-ARG UID_ARG=1000
-ARG GID_ARG=1000
-
-LABEL org.cassandra.buildenv=centos
-
-VOLUME ${RPM_DIST_DIR}
-
-RUN echo "Building with arguments:" \
-    && echo " - DEB_DIST_DIR=${DEB_DIST_DIR}" \
-    && echo " - BUILD_HOME=${BUILD_HOME}" \
-    && echo " - CASSANDRA_DIR=${CASSANDRA_DIR}" \
-    && echo " - UID_ARG=${UID_ARG}" \
-    && echo " - GID_ARG=${GID_ARG}"
-
-# install deps
-RUN yum -y install \
-   ant \
-   git \
-   java-1.8.0-openjdk-devel \
-   java-11-openjdk-devel \
-   make \
-   rpm-build \
-   sudo \
-   python3-pip
-
-RUN until curl -S -s --retry 9 --retry-connrefused --retry-delay 1 http://mirror.centos.org/centos/7/os/x86_64/Packages/ant-junit-1.9.4-2.el7.noarch.rpm -o ant-junit-1.9.4-2.el7.noarch.rpm ; do echo "curl failed… trying again… " ; done
-
-RUN rpm -i --nodeps ant-junit-1.9.4-2.el7.noarch.rpm
-
-RUN pip3 install --upgrade pip
-
-# create and change to build user
-RUN groupadd --gid ${GID_ARG} --non-unique build \
-    && adduser --uid ${UID_ARG} --gid ${GID_ARG} build
-RUN echo "build ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/build && \
-    chmod 0440 /etc/sudoers.d/build
-
-USER build
-
-RUN mkdir -p $RPM_BUILD_DIR/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
-
-# Clone Cassandra and cache maven artifacts
-ARG CASSANDRA_GIT_URL=https://github.com/apache/cassandra.git
-RUN git config --global http.postBuffer 524288000
-RUN git clone ${CASSANDRA_GIT_URL} ${CASSANDRA_DIR}
-WORKDIR $CASSANDRA_DIR
-
-COPY build-rpms.sh $BUILD_HOME/
diff --git a/docker/jessie-image.docker b/docker/jessie-image.docker
deleted file mode 100644
index b564a15..0000000
--- a/docker/jessie-image.docker
+++ /dev/null
@@ -1,49 +0,0 @@
-FROM debian:jessie-backports
-
-ENV DEB_DIST_DIR=/dist
-ENV BUILD_HOME=/home/build
-ENV CASSANDRA_DIR=$BUILD_HOME/cassandra
-
-LABEL org.cassandra.buildenv=jessie
-
-VOLUME ${DEB_DIST_DIR}
-
-# configure apt to retry downloads
-RUN echo 'APT::Acquire::Retries "9";' > /etc/apt/apt.conf.d/80-retries
-
-RUN rm /etc/apt/sources.list.d/backports.list
-RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list
-
-# install deps
-RUN apt-get update -o Acquire::Check-Valid-Until=false && apt-get -y install \
-   ant \
-   build-essential \
-   curl \
-   devscripts \
-   git \
-   sudo
-
-RUN apt-get -y -t jessie-backports --no-install-recommends install \
-   openjdk-7-jdk \
-   openjdk-8-jdk
-
-RUN apt-get -y -t jessie-backports install \
-   python-sphinx \
-   python-sphinx-rtd-theme
-
-RUN update-java-alternatives --set java-1.8.0-openjdk-$(dpkg --print-architecture)
-
-# create and change to build user
-RUN adduser --disabled-login --gecos build build && gpasswd -a build sudo
-RUN echo "build ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/build && \
-   chmod 0440 /etc/sudoers.d/build
-
-USER build
-
-# clone Cassandra and cache maven artifacts
-ARG CASSANDRA_GIT_URL=https://github.com/apache/cassandra.git
-RUN git config --global http.postBuffer 524288000
-RUN git clone ${CASSANDRA_GIT_URL} ${CASSANDRA_DIR}
-WORKDIR ${CASSANDRA_DIR}
-
-COPY build-debs.sh $BUILD_HOME/


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org