[arvados] created: 2.7.0-6525-g14c22e7c21
git repository hosting
git at public.arvados.org
Thu May 2 15:48:20 UTC 2024
at 14c22e7c214a24db8dc3b66c809b86de1ac38416 (commit)
commit 14c22e7c214a24db8dc3b66c809b86de1ac38416
Author: Brett Smith <brett.smith at curii.com>
Date: Wed May 1 12:23:25 2024 -0400
21363: Start ubuntu2404 package build WIP
Work to be done:
* Make it possible to install a-c-r on Python 3.12.
* Our Rails postinst might need an update to be able to find the
"bundle3.2" command post-install.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/build/package-build-dockerfiles/Makefile b/build/package-build-dockerfiles/Makefile
index 920d626483..58ba04f386 100644
--- a/build/package-build-dockerfiles/Makefile
+++ b/build/package-build-dockerfiles/Makefile
@@ -29,6 +29,11 @@ ubuntu2204/generated: common-generated-all
test -d ubuntu2204/generated || mkdir ubuntu2204/generated
cp -f -rlt ubuntu2204/generated common-generated/*
+all: ubuntu2404/generated
+ubuntu2404/generated: common-generated-all
+ test -d ubuntu2404/generated || mkdir ubuntu2404/generated
+ cp -f -rlt ubuntu2404/generated common-generated/*
+
GOTARBALL_=DOES_NOT_EXIST
NODETARBALL_=DOES_NOT_EXIST
GOVERSION=$(shell grep 'const goversion =' ../../lib/install/deps.go |awk -F'"' '{print $$2}')
diff --git a/build/package-build-dockerfiles/ubuntu2404/Dockerfile b/build/package-build-dockerfiles/ubuntu2404/Dockerfile
new file mode 100644
index 0000000000..9d5adea4b7
--- /dev/null
+++ b/build/package-build-dockerfiles/ubuntu2404/Dockerfile
@@ -0,0 +1,84 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+ARG HOSTTYPE
+ARG BRANCH
+ARG GOVERSION
+
+FROM ubuntu:noble as build_x86_64
+ONBUILD ARG BRANCH
+# Install go
+ONBUILD ARG GOVERSION
+ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/
+ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
+# Install nodejs and npm
+ONBUILD ADD generated/node-v12.22.12-linux-x64.tar.xz /usr/local/
+ONBUILD RUN env -C /usr/local/node-v12.22.12-linux-x64/bin ./node npm install -g yarn
+ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-x64/bin/* /usr/local/bin/
+# On x86, we want some cross-compilation support for arm64
+# Add gcc-aarch64-linux-gnu to compile go binaries for arm64
+ONBUILD COPY ports.list /etc/apt/sources.list.d/
+# We also need libpam compiled for arm64, and that requires some sources.list mangling
+ONBUILD RUN sed -i '/^Signed-By: / i Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources \
+ && dpkg --add-architecture arm64 \
+ && apt-get update \
+ && apt-get install -o APT::Immediate-Configure=0 -q -y gcc-aarch64-linux-gnu libpam0g-dev:arm64 libfuse-dev:arm64
+
+FROM ubuntu:noble as build_aarch64
+ONBUILD ARG BRANCH
+# Install go
+ONBUILD ARG GOVERSION
+ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/
+ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
+# Install nodejs and npm
+ONBUILD ADD generated/node-v12.22.12-linux-arm64.tar.xz /usr/local/
+ONBUILD RUN env -C /usr/local/node-v12.22.12-linux-arm64/bin ./node npm install -g yarn
+ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-arm64/bin/* /usr/local/bin/
+
+FROM build_${HOSTTYPE}
+
+LABEL org.opencontainers.image.authors="Arvados Package Maintainers <packaging at arvados.org>"
+
+ENV DEBIAN_FRONTEND noninteractive
+
+SHELL ["/bin/bash", "-c"]
+# Install dependencies.
+RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y \
+ build-essential \
+ curl \
+ equivs \
+ git \
+ libattr1-dev \
+ libcurl4-gnutls-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libpam-dev \
+ libpq-dev \
+ pkgconf \
+ python3 \
+ python3-dev \
+ python3-venv \
+ ruby \
+ ruby-dev \
+ shared-mime-info \
+ tzdata \
+ unzip
+
+RUN echo "gem: --no-document" >> ~/.gemrc && \
+ gem install --conservative --version '>= 2.4.0' bundler && \
+ gem install fpm --version 1.15.1 && \
+ ln -s /usr/bin/bundler3.2 /usr/local/bin/bundle && \
+ bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
+
+# Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
+ENV MAKE "make --jobs 8"
+
+# Preseed the go module cache.
+RUN git clone git://git.arvados.org/arvados.git /tmp/arvados && \
+ cd /tmp/arvados && \
+ if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
+ go mod download
+
+ENV WORKSPACE /arvados
+CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "ubuntu2404"]
diff --git a/build/package-build-dockerfiles/ubuntu2404/ports.list b/build/package-build-dockerfiles/ubuntu2404/ports.list
new file mode 100644
index 0000000000..b2d42ce288
--- /dev/null
+++ b/build/package-build-dockerfiles/ubuntu2404/ports.list
@@ -0,0 +1,8 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe multiverse
+deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe multiverse
+deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted universe multiverse
+deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
diff --git a/build/package-test-dockerfiles/ubuntu2404/Dockerfile b/build/package-test-dockerfiles/ubuntu2404/Dockerfile
new file mode 100644
index 0000000000..deccdf6be1
--- /dev/null
+++ b/build/package-test-dockerfiles/ubuntu2404/Dockerfile
@@ -0,0 +1,16 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+FROM ubuntu:noble
+LABEL org.opencontainers.image.authors="Arvados Package Maintainers <packaging at arvados.org>"
+
+ENV DEBIAN_FRONTEND noninteractive
+
+# Install dependencies
+RUN apt-get update && \
+ apt-get -y install --no-install-recommends curl ca-certificates gnupg2 ruby ruby-dev && \
+ gem install --conservative --version '>= 2.4.0' bundler && \
+ ln -s /usr/bin/bundler3.2 /usr/local/bin/bundle && \
+ mkdir -p /etc/udev/disabled && \
+ echo "deb [trusted=yes] file:///arvados/packages/ubuntu2404/ /" >>/etc/apt/sources.list
diff --git a/build/run-library.sh b/build/run-library.sh
index eb9d02462a..31d17bd483 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -457,6 +457,7 @@ test_package_presence() {
debian12) codename=bookworm ;;
ubuntu2004) codename=focal ;;
ubuntu2204) codename=jammy ;;
+ ubuntu2404) codename=noble ;;
*)
echo "FIXME: Don't know deb URL path for $TARGET, building"
return 0
commit 9579882d2fd9cce4ab63794632996d0118cc094f
Author: Brett Smith <brett.smith at curii.com>
Date: Wed May 1 11:03:47 2024 -0400
21363: DRY up package re-download code
This gives the deb branch some of the same reliability improvements that
the rpm branch got previously.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/build/run-library.sh b/build/run-library.sh
index 6fdc4aafcd..eb9d02462a 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -446,34 +446,29 @@ test_package_presence() {
# sure it gets picked up by the test and/or upload steps.
# Get the list of packages from the repos
+ local pkg_url
if [[ "$FORCE_BUILD" == "1" ]]; then
echo "Package $full_pkgname build forced with --force-build, building"
+ return 0
elif [[ "$FORMAT" == "deb" ]]; then
- declare -A dd
- dd[debian11]=bullseye
- dd[debian12]=bookworm
- dd[ubuntu2004]=focal
- dd[ubuntu2204]=jammy
- D=${dd[$TARGET]}
+ local codename
+ case "$TARGET" in
+ debian11) codename=bullseye ;;
+ debian12) codename=bookworm ;;
+ ubuntu2004) codename=focal ;;
+ ubuntu2204) codename=jammy ;;
+ *)
+ echo "FIXME: Don't know deb URL path for $TARGET, building"
+ return 0
+ ;;
+ esac
+ local repo_subdir
if [ ${pkgname:0:3} = "lib" ]; then
repo_subdir=${pkgname:0:4}
else
repo_subdir=${pkgname:0:1}
fi
-
- repo_pkg_list=$(curl -s -o - http://apt.arvados.org/${D}/pool/main/${repo_subdir}/${pkgname}/)
- echo "${repo_pkg_list}" |grep -q ${full_pkgname}
- if [ $? -eq 0 ] ; then
- echo "Package $full_pkgname exists upstream, not rebuilding, downloading instead!"
- curl -s -o "$WORKSPACE/packages/$TARGET/${full_pkgname}" http://apt.arvados.org/${D}/pool/main/${repo_subdir}/${pkgname}/${full_pkgname}
- return 1
- elif test -f "$WORKSPACE/packages/$TARGET/processed/${full_pkgname}" ; then
- echo "Package $full_pkgname exists, not rebuilding!"
- return 1
- else
- echo "Package $full_pkgname not found, building"
- return 0
- fi
+ pkg_url="http://apt.arvados.org/$codename/pool/main/$repo_subdir/$pkgname/$full_pkgname"
else
local rpm_root
case "$TARGET" in
@@ -483,18 +478,18 @@ test_package_presence() {
return 0
;;
esac
- local rpm_url="http://rpm.arvados.org/$rpm_root/$arch/$full_pkgname"
+ pkg_url="http://rpm.arvados.org/$rpm_root/$arch/$full_pkgname"
+ fi
- if curl -fs -o "$WORKSPACE/packages/$TARGET/$full_pkgname" "$rpm_url"; then
- echo "Package $full_pkgname exists upstream, not rebuilding, downloading instead!"
- return 1
- elif [[ -f "$WORKSPACE/packages/$TARGET/processed/$full_pkgname" ]]; then
- echo "Package $full_pkgname exists, not rebuilding!"
- return 1
- else
- echo "Package $full_pkgname not found, building"
- return 0
- fi
+ if curl -fs -o "$WORKSPACE/packages/$TARGET/$full_pkgname" "$pkg_url"; then
+ echo "Package $full_pkgname exists upstream, not rebuilding, downloading instead!"
+ return 1
+ elif [[ -f "$WORKSPACE/packages/$TARGET/processed/$full_pkgname" ]]; then
+ echo "Package $full_pkgname exists, not rebuilding!"
+ return 1
+ else
+ echo "Package $full_pkgname not found, building"
+ return 0
fi
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list