From f0562c7f47a75abf4be73b9f4ce0009078fe3dbd Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Wed, 27 Mar 2024 13:54:52 +0900 Subject: [PATCH] deb: add Ubuntu 24.04 (Noble Numbat) Signed-off-by: Kentaro Hayashi --- .github/workflows/apt-arm.yml | 5 ++ .github/workflows/apt.yml | 8 +++ fluent-apt-source/Rakefile | 3 +- fluent-apt-source/apt/ubuntu-noble/Dockerfile | 17 ++++++ fluent-lts-apt-source/Rakefile | 3 +- .../apt/ubuntu-noble/Dockerfile | 17 ++++++ fluent-package/Rakefile | 1 + fluent-package/apt/commonvar.sh | 2 +- fluent-package/apt/install-test.sh | 10 ++-- fluent-package/apt/ubuntu-noble-arm64/from | 18 ++++++ fluent-package/apt/ubuntu-noble/Dockerfile | 60 +++++++++++++++++++ .../apt/ubuntu-noble/qemu-dummy-static | 33 ++++++++++ fluent-package/convert-artifacts-layout.sh | 2 +- fluent-package/manage-fluent-repositories.sh | 6 +- 14 files changed, 174 insertions(+), 11 deletions(-) create mode 100644 fluent-apt-source/apt/ubuntu-noble/Dockerfile create mode 100644 fluent-lts-apt-source/apt/ubuntu-noble/Dockerfile create mode 100644 fluent-package/apt/ubuntu-noble-arm64/from create mode 100644 fluent-package/apt/ubuntu-noble/Dockerfile create mode 100755 fluent-package/apt/ubuntu-noble/qemu-dummy-static diff --git a/.github/workflows/apt-arm.yml b/.github/workflows/apt-arm.yml index df425c23f..c3a7c89c4 100644 --- a/.github/workflows/apt-arm.yml +++ b/.github/workflows/apt-arm.yml @@ -12,6 +12,7 @@ jobs: - Debian GNU/Linux bookworm arm64 - Ubuntu Focal arm64 - Ubuntu Jammy arm64 + - Ubuntu Noble arm64 include: - label: Debian GNU/Linux bullseye arm64 rake-job: debian-bullseye @@ -27,6 +28,10 @@ jobs: rake-job: ubuntu-jammy rake-options: LINTIAN=no test-docker-image: arm64v8/ubuntu:jammy + - label: Ubuntu Noble arm64 + rake-job: ubuntu-noble + rake-options: LINTIAN=no + test-docker-image: arm64v8/ubuntu:noble runs-on: ubuntu-latest steps: - uses: actions/checkout@master diff --git a/.github/workflows/apt.yml b/.github/workflows/apt.yml index be57d9324..a0a65669c 100644 --- a/.github/workflows/apt.yml +++ b/.github/workflows/apt.yml @@ -16,6 +16,7 @@ jobs: - Debian GNU/Linux bookworm amd64 - Ubuntu Focal amd64 - Ubuntu Jammy amd64 + - Ubuntu Noble amd64 include: - label: Debian GNU/Linux bullseye amd64 rake-job: debian-bullseye @@ -29,6 +30,9 @@ jobs: - label: Ubuntu Jammy amd64 rake-job: ubuntu-jammy test-docker-image: ubuntu:jammy + - label: Ubuntu Noble amd64 + rake-job: ubuntu-noble + test-docker-image: ubuntu:noble runs-on: ubuntu-latest steps: - uses: actions/checkout@master @@ -109,6 +113,7 @@ jobs: - Debian GNU/Linux bookworm amd64 - Ubuntu Focal amd64 - Ubuntu Jammy amd64 + - Ubuntu Noble amd64 test-file: - "update-from-v4.sh" - "update-to-next-version-with-backward-compat-for-v4.sh" @@ -129,6 +134,9 @@ jobs: - label: Ubuntu Jammy amd64 rake-job: ubuntu-jammy test-lxc-image: ubuntu:22.04 + - label: Ubuntu Noble amd64 + rake-job: ubuntu-noble + test-lxc-image: ubuntu:24.04 exclude: - label: Debian GNU/Linux bookworm amd64 test-file: update-from-v4.sh diff --git a/fluent-apt-source/Rakefile b/fluent-apt-source/Rakefile index d47d3e2f5..44b5eebf1 100644 --- a/fluent-apt-source/Rakefile +++ b/fluent-apt-source/Rakefile @@ -92,7 +92,8 @@ class FluentdAptSourcePackageTask < PackageTask "ubuntu-xenial", "ubuntu-bionic", "ubuntu-focal", - "ubuntu-jammy" + "ubuntu-jammy", + "ubuntu-noble" ] end diff --git a/fluent-apt-source/apt/ubuntu-noble/Dockerfile b/fluent-apt-source/apt/ubuntu-noble/Dockerfile new file mode 100644 index 000000000..45e47b8e5 --- /dev/null +++ b/fluent-apt-source/apt/ubuntu-noble/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:noble + +RUN \ + echo "debconf debconf/frontend select Noninteractive" | \ + debconf-set-selections + +ARG DEBUG + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + debhelper \ + devscripts \ + gnupg && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/fluent-lts-apt-source/Rakefile b/fluent-lts-apt-source/Rakefile index 2c8b754d3..4a72099ee 100644 --- a/fluent-lts-apt-source/Rakefile +++ b/fluent-lts-apt-source/Rakefile @@ -92,7 +92,8 @@ class FluentdAptLtsSourcePackageTask < PackageTask "ubuntu-xenial", "ubuntu-bionic", "ubuntu-focal", - "ubuntu-jammy" + "ubuntu-jammy", + "ubuntu-noble" ] end diff --git a/fluent-lts-apt-source/apt/ubuntu-noble/Dockerfile b/fluent-lts-apt-source/apt/ubuntu-noble/Dockerfile new file mode 100644 index 000000000..45e47b8e5 --- /dev/null +++ b/fluent-lts-apt-source/apt/ubuntu-noble/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:noble + +RUN \ + echo "debconf debconf/frontend select Noninteractive" | \ + debconf-set-selections + +ARG DEBUG + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + debhelper \ + devscripts \ + gnupg && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/fluent-package/Rakefile b/fluent-package/Rakefile index c4a207bbd..35a536db6 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -1326,6 +1326,7 @@ EOS "debian-bookworm", "ubuntu-focal", "ubuntu-jammy", + "ubuntu-noble", ] end diff --git a/fluent-package/apt/commonvar.sh b/fluent-package/apt/commonvar.sh index add7879b0..11147319b 100644 --- a/fluent-package/apt/commonvar.sh +++ b/fluent-package/apt/commonvar.sh @@ -10,7 +10,7 @@ case ${code_name} in mirror=http://archive.ubuntu.com/ubuntu/ java_jdk=openjdk-8-jre ;; - bionic|focal|hirsute|jammy) + bionic|focal|hirsute|jammy|noble) distribution=ubuntu channel=universe mirror=http://archive.ubuntu.com/ubuntu/ diff --git a/fluent-package/apt/install-test.sh b/fluent-package/apt/install-test.sh index db8d82f80..7a5edc081 100755 --- a/fluent-package/apt/install-test.sh +++ b/fluent-package/apt/install-test.sh @@ -37,10 +37,12 @@ for conf_path in /etc/td-agent/td-agent.conf /etc/fluent/fluentd.conf; do fi done -if [ "${code_name}" == "bookworm" ]; then - echo "As bookworm is not published for v4, so package upgrade install check for ${code_name} is disabled" - exit 0 -fi +case $code_name in + bookworm|noble) + echo "As ${code_name} is not published for v4, so package upgrade install check for ${code_name} is disabled" + exit 0 + ;; +esac # TODO: Remove it when v5 repository was deployed apt install -y curl curl -O https://packages.treasuredata.com/4/${distribution}/${code_name}/pool/contrib/f/fluentd-apt-source/fluentd-apt-source_2020.8.25-1_all.deb diff --git a/fluent-package/apt/ubuntu-noble-arm64/from b/fluent-package/apt/ubuntu-noble-arm64/from new file mode 100644 index 000000000..4414c3538 --- /dev/null +++ b/fluent-package/apt/ubuntu-noble-arm64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/ubuntu:noble diff --git a/fluent-package/apt/ubuntu-noble/Dockerfile b/fluent-package/apt/ubuntu-noble/Dockerfile new file mode 100644 index 000000000..05bd462c6 --- /dev/null +++ b/fluent-package/apt/ubuntu-noble/Dockerfile @@ -0,0 +1,60 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +ARG FROM=ubuntu:noble +FROM ${FROM} + +COPY qemu-* /usr/bin/ + +RUN \ + echo "debconf debconf/frontend select Noninteractive" | \ + debconf-set-selections + +ARG DEBUG + +RUN sed -i'' -e 's/^Types: deb/Types: deb deb-src/g' /etc/apt/sources.list.d/ubuntu.sources + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + build-essential \ + debhelper \ + devscripts \ + ruby-dev \ + ruby-bundler \ + libedit2 \ + libncurses5-dev \ + libyaml-dev \ + libffi-dev \ + libreadline-dev \ + git \ + pkg-config \ + libssl-dev \ + libpq-dev \ + tar \ + lsb-release \ + zlib1g-dev \ + cmake && \ + apt build-dep -y ruby && \ + apt clean && \ + # raise IPv4 priority + sed -i'' -e 's,#precedence ::ffff:0:0/96 100,precedence ::ffff:0:0/96 100,' /etc/gai.conf && \ + # enable multiplatform feature + gem install --no-document --install-dir /usr/share/rubygems-integration/all bundler builder && \ + rm -rf /var/lib/apt/lists/* && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y diff --git a/fluent-package/apt/ubuntu-noble/qemu-dummy-static b/fluent-package/apt/ubuntu-noble/qemu-dummy-static new file mode 100755 index 000000000..c42e0962d --- /dev/null +++ b/fluent-package/apt/ubuntu-noble/qemu-dummy-static @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Do nothing. This exists only for not requiring qemu-aarch64-static copy. +# Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or +# arm64 host don't require qemu-aarch64-static in Docker image. But old Debian +# and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. +# +# We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", +# the "COPY" is failed. It means that we always require "qemu*" even if we +# use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, +# the "COPY" isn't failed. It means that we can copy "qemu*" only when we +# need. +# +# See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. +# Azure Pipelines uses old Ubuntu (18.04). +# So we need to put "qemu-aarch64-static" into this directory. diff --git a/fluent-package/convert-artifacts-layout.sh b/fluent-package/convert-artifacts-layout.sh index e11ad9077..ae75bd21e 100755 --- a/fluent-package/convert-artifacts-layout.sh +++ b/fluent-package/convert-artifacts-layout.sh @@ -49,7 +49,7 @@ case $1 in -exec cp {} $ARTIFACTS_DIR/5/debian/$d/pool/contrib/f/fluent-apt-source \; fi ;; - focal|jammy) + focal|jammy|noble) # e.g. mapping ubuntu/pool/.../main/t/td-agent/ => 5/ubuntu/.../pool/contrib/t/td-agent # mapping ubuntu/pool/.../main/f/fluent-package/ => 5/ubuntu/.../pool/contrib/f/fluent-package mkdir -p $ARTIFACTS_DIR/5/ubuntu/$d/pool/contrib/f/fluent-package diff --git a/fluent-package/manage-fluent-repositories.sh b/fluent-package/manage-fluent-repositories.sh index d7825d7a8..9dcb69628 100755 --- a/fluent-package/manage-fluent-repositories.sh +++ b/fluent-package/manage-fluent-repositories.sh @@ -73,7 +73,7 @@ case $COMMAND in $command ;; dry-upload|upload) - TARGETS="amazon redhat windows macosx debian/bullseye debian/bookworm ubuntu/jammy ubuntu/focal" + TARGETS="amazon redhat windows macosx debian/bullseye debian/bookworm ubuntu/jammy ubuntu/focal ubuntu/noble" DRYRUN_OPTION="--dryrun" if [ $COMMAND = "upload" ]; then DRYRUN_OPTION="" @@ -137,7 +137,7 @@ EOF echo "Ready to type signing passphrase? (process starts in 10 seconds, Ctrl+C to abort)" sleep 10 export GPG_TTY=$(tty) - for d in bullseye bookworm focal jammy; do + for d in bullseye bookworm focal jammy noble; do aptly -config="$aptly_conf" repo create -distribution=$d -component=contrib fluent-package5-$d case $d in bullseye|bookworm) @@ -150,7 +150,7 @@ EOF # Place generated files, package files themselves are already in there tar cf - --exclude="td-agent_*.deb" --exclude="fluent-package_*.deb" -C "$aptly_rootdir/public" $d | tar xvf - -C $FLUENT_RELEASE_DIR/5/debian/ ;; - focal|jammy) + focal|jammy|noble) aptly -config="$aptly_conf" repo add fluent-package5-$d $FLUENT_RELEASE_DIR/5/ubuntu/$d/ aptly -config="$aptly_conf" snapshot create fluent-package5-$d-${FLUENT_PACKAGE_VERSION}-1 from repo fluent-package5-$d # publish snapshot with prefix, InRelease looks like (e.g. focal):