From: Maria Matejka Date: Thu, 8 May 2025 20:26:17 +0000 (+0200) Subject: Backported release tooling updates from 3.1 and 2.17 X-Git-Tag: v3.0.3~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f09b4b351dbc5b2e2b00755bd63c77c21661e2d6;p=thirdparty%2Fbird.git Backported release tooling updates from 3.1 and 2.17 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e71b881e..7df1b6557 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,14 @@ +########################################################### +##### ##### +##### DO NOT EDIT THIS FILE BY HAND ##### +##### ##### +########################################################### +##### ##### +##### This file is autogenerated from misc/gitlab/. ##### +##### Edit those files and run `make gitlab` instead. ##### +##### ##### +########################################################### + variables: DEBIAN_FRONTEND: noninteractive LC_ALL: C.UTF-8 @@ -8,16 +19,80 @@ variables: STAYRTR_BINARY: /usr/bin/stayrtr stages: -# - image + - consistency + - image - build - pkg - test -.docker: &docker_build +## Common rules +# Ignore WIP commits +.never-wip: &never-wip + if: $CI_COMMIT_MESSAGE =~ /^(fixup! )*WIP/ + when: never +# Run for stable branches +.if-stable: &if-stable + if: $CI_COMMIT_BRANCH =~ /^(stable-.*|thread-next|master)$/ + when: always +# Do run for tags +.if-tag: &if-tag + if: $CI_COMMIT_TAG + when: always +# Never run for tags +.never-tag: &never-tag + if: $CI_COMMIT_TAG + when: never + +## Consistency checks for stable branches +commit-messages: + stage: consistency + image: registry.nic.cz/labs/bird:docbuilder + script: + - tools/git-check-commits + rules: + - *if-stable + - when: never + +## Tag check +tag-collect: + stage: consistency + image: registry.nic.cz/labs/bird:docbuilder + script: + - python3 -m venv venv + - . venv/bin/activate + - pip3 install requests + - tools/git-check-tag-local $CI_COMMIT_TAG + - tools/git-check-tag-ci $CI_COMMIT_SHA + artifacts: + paths: + - obj/doc/bird-singlepage.html + - bird-*.tar.gz + - pkg/pkgs/* + - pkg/srcpkgs/* + rules: + - *if-tag + - when: never + +## Default test job rules +.test-job: &test-job + rules: + - *never-wip + - *never-tag + - when: always + +############################ +## Docker builder rebuild ## +############################ +# We are running all the build / packaging tests in Dockers (unless otherwise) +# and these are rules to build these docker images. These are expensive to run +# and should run only if needed. +# +# Modify the appropriate dockerfile to rebuild these images + +.docker: &docker-build stage: image - allow_failure: true script: - - $DOCKER_CMD login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.nic.cz + - $DOCKER_CMD login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.nic.cz # Make sure we refresh the base image if it updates (eg. security updates, etc) # If we do just the build, cache is always reused and the freshness of the # base image is never checked. However, pull always asks and updates the @@ -32,300 +107,985 @@ stages: tags: # That's Docker in Docker - dind + rules: + # Never rebuild for WIP commits + - *never-wip -# Docker build example -#docker_debian-11-amd64: -# variables: -# IMG_NAME: "debian-11-amd64" -# <<: *docker_build + # Never rebuild for tags + - if: '$CI_COMMIT_TAG' + when: never + # Never rebuild for new branches + - if: $CI_COMMIT_BEFORE_SHA == "0000000000000000000000000000000000000000" + when: never -.build: &build-base - stage: build - script: - - autoreconf - - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" - # Detect which make is available - - MAKE=make - - which gmake 2>/dev/null >/dev/null && MAKE=gmake - - $MAKE - - $MAKE check - # Build docs when tools are available - - if which linuxdoc pdflatex >/dev/null ; then $MAKE docs ; fi - -.build-linux: &build-linux - <<: *build-base - tags: - - docker - - linux - - amd64 + # Do any change in Dockerfile (e.g. change a comment) to rebuild the image + # FIXME: This probably belongs to bird-tools instead, we may end up with + # screwed up docker repository in case of colliding image updates + - changes: + - misc/docker/$IMG_NAME/Dockerfile + when: always -build-debian-9-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-9-amd64 + - when: never -build-debian-9-i386: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-9-i386 -build-debian-10-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-10-amd64 +docker-docbuilder: + variables: + IMG_NAME: "docbuilder" + <<: *docker-build -build-debian-10-i386: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-10-i386 +docker-centos-7-amd64: + variables: + IMG_NAME: "centos-7-amd64" + <<: *docker-build -build-debian-11-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-11-amd64 +docker-centos-8-amd64: + variables: + IMG_NAME: "centos-8-amd64" + <<: *docker-build -build-debian-12-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-12-amd64 +docker-fedora-32-amd64: + variables: + IMG_NAME: "fedora-32-amd64" + <<: *docker-build -#build-debian-11-i386: -# <<: *build-linux -# image: registry.nic.cz/labs/bird:debian-11-i386 +docker-fedora-33-amd64: + variables: + IMG_NAME: "fedora-33-amd64" + <<: *docker-build -build-debian-testing-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:debian-testing-amd64 +docker-opensuse-15.0-amd64: + variables: + IMG_NAME: "opensuse-15.0-amd64" + <<: *docker-build -#build-debian-testing-i386: -# <<: *build-linux -# image: registry.nic.cz/labs/bird:debian-testing-i386 +docker-opensuse-15.1-amd64: + variables: + IMG_NAME: "opensuse-15.1-amd64" + <<: *docker-build -build-fedora-25-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-25-amd64 +docker-opensuse-15.2-amd64: + variables: + IMG_NAME: "opensuse-15.2-amd64" + <<: *docker-build -build-fedora-26-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-26-amd64 +docker-opensuse-15.3-amd64: + variables: + IMG_NAME: "opensuse-15.3-amd64" + <<: *docker-build -build-fedora-27-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-27-amd64 +docker-opensuse-15.4-amd64: + variables: + IMG_NAME: "opensuse-15.4-amd64" + <<: *docker-build -build-fedora-28-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-28-amd64 +docker-opensuse-15.5-amd64: + variables: + IMG_NAME: "opensuse-15.5-amd64" + <<: *docker-build -build-fedora-29-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-29-amd64 +docker-fedora-34-amd64: + variables: + IMG_NAME: "fedora-34-amd64" + <<: *docker-build -build-fedora-30-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-30-amd64 +docker-fedora-35-amd64: + variables: + IMG_NAME: "fedora-35-amd64" + <<: *docker-build -build-fedora-31-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-31-amd64 +docker-fedora-36-amd64: + variables: + IMG_NAME: "fedora-36-amd64" + <<: *docker-build -build-fedora-32-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-32-amd64 +docker-fedora-37-amd64: + variables: + IMG_NAME: "fedora-37-amd64" + <<: *docker-build -build-fedora-33-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-33-amd64 +docker-fedora-38-amd64: + variables: + IMG_NAME: "fedora-38-amd64" + <<: *docker-build -build-fedora-34-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:fedora-33-amd64 +docker-fedora-39-amd64: + variables: + IMG_NAME: "fedora-39-amd64" + <<: *docker-build -build-centos-8-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:centos-8-amd64 +docker-fedora-40-amd64: + variables: + IMG_NAME: "fedora-40-amd64" + <<: *docker-build -build-ubuntu-16_04-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:ubuntu-16.04-amd64 +docker-fedora-41-amd64: + variables: + IMG_NAME: "fedora-41-amd64" + <<: *docker-build -build-ubuntu-18_04-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64 +docker-fedora-42-amd64: + variables: + IMG_NAME: "fedora-42-amd64" + <<: *docker-build -build-ubuntu-20_04-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64 +docker-ubuntu-18.04-amd64: + variables: + IMG_NAME: "ubuntu-18.04-amd64" + <<: *docker-build + +docker-debian-10-amd64: + variables: + IMG_NAME: "debian-10-amd64" + <<: *docker-build + +docker-debian-10-i386: + variables: + IMG_NAME: "debian-10-i386" + <<: *docker-build + +docker-debian-11-amd64: + variables: + IMG_NAME: "debian-11-amd64" + <<: *docker-build + +docker-debian-11-i386: + variables: + IMG_NAME: "debian-11-i386" + <<: *docker-build + +docker-debian-12-amd64: + variables: + IMG_NAME: "debian-12-amd64" + <<: *docker-build + +docker-debian-12-i386: + variables: + IMG_NAME: "debian-12-i386" + <<: *docker-build + +docker-debian-testing-amd64: + variables: + IMG_NAME: "debian-testing-amd64" + <<: *docker-build + +docker-debian-testing-i386: + variables: + IMG_NAME: "debian-testing-i386" + <<: *docker-build + +docker-ubuntu-20.04-amd64: + variables: + IMG_NAME: "ubuntu-20.04-amd64" + <<: *docker-build + +docker-ubuntu-22.04-amd64: + variables: + IMG_NAME: "ubuntu-22.04-amd64" + <<: *docker-build + +docker-ubuntu-24.04-amd64: + variables: + IMG_NAME: "ubuntu-24.04-amd64" + <<: *docker-build + +docker-ubuntu-24.10-amd64: + variables: + IMG_NAME: "ubuntu-24.10-amd64" + <<: *docker-build + + +##################################################### +## Linux distro build tests inside Docker builders ## +##################################################### + +## Build stage +# +# Now we compile and run unit tests ... in every single distribution. +# Every task needs its docker, see above. + +.build: &build-base + <<: *test-job + stage: build + script: + - export BRANCH=$CI_COMMIT_BRANCH + - tools/version && ( echo -n "BIRD version "; tools/version ) > version-expected + - | + STABLE_VERSION="`cat VERSION`" + if [ "$CI_COMMIT_MESSAGE" == "NEWS and version update + " ]; then + if [ "${STABLE_VERSION}" == "`tools/version`" ]; then + echo "Stable version precheck OK" + else + echo "Stable version discrepancy: $STABLE_VERSION vs. $(tools/version)" + exit 1 + fi + else + if grep -qF "BIRD version ${STABLE_VERSION}+branch" version-expected; then + true + else + echo -n "Commit $CI_COMMIT_SHA message $CI_COMMIT_MESSAGE expects version " + cat version-expected + exit 1 + fi + fi + - autoreconf + - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" $CONFIGURE_OPTIONS + # Detect which make is available + - MAKE=make + - which gmake 2>/dev/null >/dev/null && MAKE=gmake + - $MAKE + - $MAKE check + # Build docs when tools are available + - if which linuxdoc pdflatex sgmlsasp >/dev/null ; then $MAKE docs ; fi + # Check that the reported version is the right one + - ./bird --version |& tee obj/version-built + - diff obj/version-built version-expected + +.build-docker-linux-amd64: &build-docker-linux-amd64 + <<: *build-base + tags: + - docker + - linux + - amd64 + + +build-centos-7-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-centos-7-amd64 + optional: true + image: registry.nic.cz/labs/bird:centos-7-amd64 + variables: + CC: /opt/rh/devtoolset-8/root/usr/bin/gcc + LC_ALL: en_US.UTF-8 -build-ubuntu-21_10-amd64: - <<: *build-linux - image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64 +build-centos-8-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-centos-8-amd64 + optional: true + image: registry.nic.cz/labs/bird:centos-8-amd64 -#build-ubuntu-21_04-amd64: -# <<: *build-linux -# image: registry.nic.cz/labs/bird:ubuntu-21.04-amd64 +build-fedora-32-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-32-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-32-amd64 + +build-fedora-33-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-33-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-33-amd64 build-opensuse-15.0-amd64: - <<: *build-linux + <<: *build-docker-linux-amd64 + needs: + - job: docker-opensuse-15.0-amd64 + optional: true image: registry.nic.cz/labs/bird:opensuse-15.0-amd64 build-opensuse-15.1-amd64: - <<: *build-linux + <<: *build-docker-linux-amd64 + needs: + - job: docker-opensuse-15.1-amd64 + optional: true image: registry.nic.cz/labs/bird:opensuse-15.1-amd64 build-opensuse-15.2-amd64: - <<: *build-linux + <<: *build-docker-linux-amd64 + needs: + - job: docker-opensuse-15.2-amd64 + optional: true image: registry.nic.cz/labs/bird:opensuse-15.2-amd64 build-opensuse-15.3-amd64: - <<: *build-linux + <<: *build-docker-linux-amd64 + needs: + - job: docker-opensuse-15.3-amd64 + optional: true image: registry.nic.cz/labs/bird:opensuse-15.3-amd64 -#build-freebsd-11-amd64: -# <<: *build-base -# tags: -# - freebsd -# - amd64 +build-opensuse-15.4-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-opensuse-15.4-amd64 + optional: true + image: registry.nic.cz/labs/bird:opensuse-15.4-amd64 + +build-opensuse-15.5-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-opensuse-15.5-amd64 + optional: true + image: registry.nic.cz/labs/bird:opensuse-15.5-amd64 + +build-fedora-34-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-34-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-34-amd64 + +build-fedora-35-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-35-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-35-amd64 + +build-fedora-36-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-36-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-36-amd64 + +build-fedora-37-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-37-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-37-amd64 + +build-fedora-38-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-38-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-38-amd64 + +build-fedora-39-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-39-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-39-amd64 + +build-fedora-40-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-40-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-40-amd64 + +build-fedora-41-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-41-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-41-amd64 + +build-fedora-42-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-fedora-42-amd64 + optional: true + image: registry.nic.cz/labs/bird:fedora-42-amd64 + +build-ubuntu-18.04-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-ubuntu-18.04-amd64 + optional: true + image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64 + +build-debian-10-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-10-amd64 + optional: true + image: registry.nic.cz/labs/bird:debian-10-amd64 + +build-debian-10-i386: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-10-i386 + optional: true + image: registry.nic.cz/labs/bird:debian-10-i386 + +build-debian-11-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-11-amd64 + optional: true + image: registry.nic.cz/labs/bird:debian-11-amd64 + +build-debian-11-i386: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-11-i386 + optional: true + image: registry.nic.cz/labs/bird:debian-11-i386 -#build-freebsd-11-i386: -# <<: *build-base -# tags: -# - freebsd -# - i386 +build-debian-12-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-12-amd64 + optional: true + image: registry.nic.cz/labs/bird:debian-12-amd64 + +build-debian-12-i386: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-12-i386 + optional: true + image: registry.nic.cz/labs/bird:debian-12-i386 + +build-debian-testing-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-testing-amd64 + optional: true + image: registry.nic.cz/labs/bird:debian-testing-amd64 +build-debian-testing-i386: + <<: *build-docker-linux-amd64 + needs: + - job: docker-debian-testing-i386 + optional: true + image: registry.nic.cz/labs/bird:debian-testing-i386 + +build-ubuntu-20.04-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-ubuntu-20.04-amd64 + optional: true + image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64 + +build-ubuntu-22.04-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-ubuntu-22.04-amd64 + optional: true + image: registry.nic.cz/labs/bird:ubuntu-22.04-amd64 + +build-ubuntu-24.04-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-ubuntu-24.04-amd64 + optional: true + image: registry.nic.cz/labs/bird:ubuntu-24.04-amd64 + +build-ubuntu-24.10-amd64: + <<: *build-docker-linux-amd64 + needs: + - job: docker-ubuntu-24.10-amd64 + optional: true + image: registry.nic.cz/labs/bird:ubuntu-24.10-amd64 + + +####################################################### +## A special task for preparing the release archives ## +####################################################### +build-release: + <<: *test-job + image: registry.nic.cz/labs/bird:docbuilder + needs: + - job: docker-docbuilder + optional: true + stage: build + tags: + - docker + - linux + script: + - export BRANCH=$CI_COMMIT_BRANCH + - autoreconf + - ./configure --with-protocols= --disable-client + - make obj/doc/bird-singlepage.html + - tools/make-archive + artifacts: + paths: + - obj/doc/bird-singlepage.html + - bird-*.tar.gz + expire_in: 1 day + +# Packaging rules +# As we support some ancient versions of different distributions, +# we need to keep several different machineries. It's not so bad +# but it's bad nevertheless. +# +# We do NOT build separate documentation packages in these rules. .pkg-deb: &pkg-deb + <<: *test-job stage: pkg script: # create venv only if it's installed - if python3 -m venv venv; then . venv/bin/activate; fi - pip3 install apkg - - apkg build + - apkg build -a bird-$(cat VERSION)*.tar.gz #- apkg install -y pkg/pkgs/*/*/*.deb artifacts: paths: - pkg/pkgs/* + - pkg/srcpkgs/* .pkg-deb-legacy: &pkg-deb-legacy + <<: *test-job stage: pkg script: # create venv only if it's installed - if python3 -m venv venv; then . venv/bin/activate; fi # install older version of bs4 that does not use python version >= 3.6 - - pip3 install beautifulsoup4==4.11.2 + # apkg depends on bs4, and unless we want to backport python 3.6 + # to ancient distros, we need to do this workaround + - pip3 install beautifulsoup4==4.11.2 - pip3 install apkg - - BRANCH=$CI_COMMIT_BRANCH ARCHIVE_DOCS=false apkg build + - apkg build -a bird-$(cat VERSION)*.tar.gz #- apkg install -y pkg/pkgs/*/*/*.deb artifacts: paths: - pkg/pkgs/* + - pkg/srcpkgs/* .pkg-rpm: &pkg-rpm + <<: *test-job stage: pkg script: - pip3 install apkg - - apkg build + - apkg build -a bird-$(cat VERSION)*.tar.gz #- apkg install -y pkg/pkgs/*/*/*.rpm artifacts: paths: - pkg/pkgs/* + - pkg/srcpkgs/* .pkg-rpm-wa: &pkg-rpm-wa + <<: *test-job stage: pkg script: - sed -i "s/runstatedir/with-runtimedir/" distro/pkg/rpm/bird.spec # install older version of bs4 that does not use python version >= 3.6 - pip3 install beautifulsoup4==4.11.2 - pip3 install apkg - - apkg build + - apkg build -a bird-$(cat VERSION)*.tar.gz #- apkg install -y pkg/pkgs/*/*/*.rpm artifacts: paths: - pkg/pkgs/* + - pkg/srcpkgs/* -pkg-debian-10-amd64: - <<: *pkg-deb - needs: [build-debian-10-amd64] - image: registry.nic.cz/labs/bird:debian-10-amd64 - -pkg-debian-10-i386: - <<: *pkg-deb - needs: [build-debian-10-i386] - image: registry.nic.cz/labs/bird:debian-10-i386 -pkg-debian-11-amd64: - <<: *pkg-deb - needs: [build-debian-11-amd64] - image: registry.nic.cz/labs/bird:debian-11-amd64 -pkg-debian-12-amd64: - <<: *pkg-deb - needs: [build-debian-12-amd64] - image: registry.nic.cz/labs/bird:debian-12-amd64 - -pkg-fedora-30-amd64: +pkg-centos-7-amd64: <<: *pkg-rpm-wa - needs: [build-fedora-30-amd64] - image: registry.nic.cz/labs/bird:fedora-30-amd64 + needs: + - job: build-centos-7-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:centos-7-amd64 + variables: + CC: /opt/rh/devtoolset-8/root/usr/bin/gcc + LC_ALL: en_US.UTF-8 -pkg-fedora-31-amd64: +pkg-centos-8-amd64: <<: *pkg-rpm-wa - needs: [build-fedora-31-amd64] - image: registry.nic.cz/labs/bird:fedora-31-amd64 + needs: + - job: build-centos-8-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:centos-8-amd64 pkg-fedora-32-amd64: <<: *pkg-rpm-wa - needs: [build-fedora-32-amd64] + needs: + - job: build-fedora-32-amd64 + artifacts: false + - job: build-release image: registry.nic.cz/labs/bird:fedora-32-amd64 pkg-fedora-33-amd64: <<: *pkg-rpm-wa - needs: [build-fedora-33-amd64] + needs: + - job: build-fedora-33-amd64 + artifacts: false + - job: build-release image: registry.nic.cz/labs/bird:fedora-33-amd64 +pkg-opensuse-15.0-amd64: + <<: *pkg-rpm-wa + needs: + - job: build-opensuse-15.0-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:opensuse-15.0-amd64 + +pkg-opensuse-15.1-amd64: + <<: *pkg-rpm-wa + needs: + - job: build-opensuse-15.1-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:opensuse-15.1-amd64 + +pkg-opensuse-15.2-amd64: + <<: *pkg-rpm-wa + needs: + - job: build-opensuse-15.2-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:opensuse-15.2-amd64 + +pkg-opensuse-15.3-amd64: + <<: *pkg-rpm-wa + needs: + - job: build-opensuse-15.3-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:opensuse-15.3-amd64 + +pkg-opensuse-15.4-amd64: + <<: *pkg-rpm-wa + needs: + - job: build-opensuse-15.4-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:opensuse-15.4-amd64 + +pkg-opensuse-15.5-amd64: + <<: *pkg-rpm-wa + needs: + - job: build-opensuse-15.5-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:opensuse-15.5-amd64 + pkg-fedora-34-amd64: <<: *pkg-rpm - needs: [build-fedora-34-amd64] + needs: + - job: build-fedora-34-amd64 + artifacts: false + - job: build-release image: registry.nic.cz/labs/bird:fedora-34-amd64 -pkg-centos-8-amd64: - <<: *pkg-rpm-wa - needs: [build-centos-8-amd64] - image: registry.nic.cz/labs/bird:centos-8-amd64 +pkg-fedora-35-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-35-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-35-amd64 + +pkg-fedora-36-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-36-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-36-amd64 + +pkg-fedora-37-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-37-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-37-amd64 + +pkg-fedora-38-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-38-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-38-amd64 + +pkg-fedora-39-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-39-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-39-amd64 + +pkg-fedora-40-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-40-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-40-amd64 + +pkg-fedora-41-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-41-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-41-amd64 + +pkg-fedora-42-amd64: + <<: *pkg-rpm + needs: + - job: build-fedora-42-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:fedora-42-amd64 pkg-ubuntu-18.04-amd64: <<: *pkg-deb-legacy - needs: [build-ubuntu-18_04-amd64] + needs: + - job: build-ubuntu-18.04-amd64 + artifacts: false + - job: build-release image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64 +pkg-debian-10-amd64: + <<: *pkg-deb + needs: + - job: build-debian-10-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-10-amd64 + +pkg-debian-10-i386: + <<: *pkg-deb + needs: + - job: build-debian-10-i386 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-10-i386 + +pkg-debian-11-amd64: + <<: *pkg-deb + needs: + - job: build-debian-11-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-11-amd64 + +pkg-debian-11-i386: + <<: *pkg-deb + needs: + - job: build-debian-11-i386 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-11-i386 + +pkg-debian-12-amd64: + <<: *pkg-deb + needs: + - job: build-debian-12-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-12-amd64 + +pkg-debian-12-i386: + <<: *pkg-deb + needs: + - job: build-debian-12-i386 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-12-i386 + +pkg-debian-testing-amd64: + <<: *pkg-deb + needs: + - job: build-debian-testing-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-testing-amd64 + +pkg-debian-testing-i386: + <<: *pkg-deb + needs: + - job: build-debian-testing-i386 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:debian-testing-i386 + pkg-ubuntu-20.04-amd64: <<: *pkg-deb - needs: [build-ubuntu-20_04-amd64] + needs: + - job: build-ubuntu-20.04-amd64 + artifacts: false + - job: build-release image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64 +pkg-ubuntu-22.04-amd64: + <<: *pkg-deb + needs: + - job: build-ubuntu-22.04-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:ubuntu-22.04-amd64 -pkg-ubuntu-21.10-amd64: +pkg-ubuntu-24.04-amd64: <<: *pkg-deb - needs: [build-ubuntu-21_10-amd64] - image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64 + needs: + - job: build-ubuntu-24.04-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:ubuntu-24.04-amd64 -#pkg-ubuntu-21.04-amd64: -# <<: *pkg-deb -# needs: [build-ubuntu-21_04-amd64] -# image: registry.nic.cz/labs/bird:ubuntu-21.04-amd64 +pkg-ubuntu-24.10-amd64: + <<: *pkg-deb + needs: + - job: build-ubuntu-24.10-amd64 + artifacts: false + - job: build-release + image: registry.nic.cz/labs/bird:ubuntu-24.10-amd64 -pkg-opensuse-15.1-amd64: - <<: *pkg-rpm-wa - needs: [build-opensuse-15.1-amd64] - image: registry.nic.cz/labs/bird:opensuse-15.1-amd64 -pkg-opensuse-15.2-amd64: - <<: *pkg-rpm-wa - needs: [build-opensuse-15.2-amd64] - image: registry.nic.cz/labs/bird:opensuse-15.2-amd64 +################################### +## Non-linux build tests in QEMU ## +################################### +.build-birdlab-base: &build-birdlab-base + <<: *build-base + stage: build +# script: +# - export BRANCH=$CI_COMMIT_BRANCH +# - autoreconf +# - ./configure $CONFIGURE_OPTIONS +# - gmake +# - gmake check -pkg-opensuse-15.3-amd64: - <<: *pkg-rpm-wa - needs: [build-opensuse-15.3-amd64] - image: registry.nic.cz/labs/bird:opensuse-15.3-amd64 +build-birdlab-openbsd-75: + <<: *build-birdlab-base + variables: + AUTOCONF_VERSION: '2.71' + tags: + - birdlab-openbsd-75 + - amd64 + +build-birdlab-openbsd-76: + <<: *build-birdlab-base + variables: + AUTOCONF_VERSION: '2.72' + tags: + - birdlab-openbsd-76 + - amd64 + +build-birdlab-netbsd-09: + <<: *build-birdlab-base + tags: + - birdlab-netbsd-09 + - amd64 + +build-birdlab-netbsd-10: + <<: *build-birdlab-base + tags: + - birdlab-netbsd-10 + - amd64 + +build-birdlab-freebsd-13: + <<: *build-birdlab-base + tags: + - birdlab-freebsd-13 + - amd64 + +build-birdlab-freebsd-13-netlink: + <<: *build-birdlab-base + variables: + CONFIGURE_OPTIONS: --with-sysconfig=bsd-netlink --disable-client + tags: + - birdlab-freebsd-13 + - amd64 + +build-birdlab-freebsd-14: + <<: *build-birdlab-base + tags: + - birdlab-freebsd-14 + - amd64 + +build-birdlab-freebsd-14-netlink: + <<: *build-birdlab-base + variables: + CONFIGURE_OPTIONS: --with-sysconfig=bsd-netlink --disable-client + tags: + - birdlab-freebsd-14 + - amd64 + + +######################### +## Partial build tests ## +######################### + +.build-only: &build-only + <<: *build-docker-linux-amd64 + image: registry.nic.cz/labs/bird:debian-12-amd64 + needs: + - job: docker-debian-12-amd64 + optional: true + + +partial-build-linux-aggregator: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=aggregator + +partial-build-linux-babel: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=babel + +partial-build-linux-bfd: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=bfd + +partial-build-linux-bgp: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=bgp + +partial-build-linux-bgp,bmp: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=bgp,bmp + +partial-build-linux-l3vpn: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=l3vpn + +partial-build-linux-mrt: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=mrt + +partial-build-linux-ospf: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=ospf + +partial-build-linux-pipe: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=pipe + +partial-build-linux-radv: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=radv + +partial-build-linux-rip: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=rip + +partial-build-linux-rpki: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=rpki + +partial-build-linux-static: + <<: *build-only + variables: + CONFIGURE_OPTIONS: --with-protocols=static + + +################################ +## Netlab functionality tests ## +################################ build-netlab: + <<: *test-job stage: build variables: BDIR: build-netlab @@ -337,14 +1097,15 @@ build-netlab: - mkdir $BDIR - cd $BDIR - ../configure - - make + - BRANCH=$CI_COMMIT_BRANCH make artifacts: paths: - $BDIR/bird - $BDIR/birdc expire_in: 2 hours -.test: &test-base +.netlab-test: &test-base + <<: *test-job stage: test needs: [build-netlab] tags: @@ -355,12 +1116,23 @@ build-netlab: - cd $TOOLS_DIR - sudo git clean -fx - git pull --ff-only - - mv $DIR/build-netlab/* netlab/common/ + - "mv $DIR/build-netlab/* netlab/common/" - ln -s $STAYRTR_BINARY netlab/common/stayrtr - cd netlab - sudo ./stop - sudo ./runtest -s v3 -m check $TEST_NAME + +test-babel-base: + <<: *test-base + variables: + TEST_NAME: cf-babel-base + +test-babel-auth: + <<: *test-base + variables: + TEST_NAME: cf-babel-auth + test-ospf-base: <<: *test-base variables: @@ -441,6 +1213,16 @@ test-bgp-rs-multitab: variables: TEST_NAME: cf-bgp-rs-multitab +test-bgp-rs-singletab: + <<: *test-base + variables: + TEST_NAME: cf-bgp-rs-singletab + +test-ebgp-graceful: + <<: *test-base + variables: + TEST_NAME: cf-ebgp-graceful + test-ebgp-loop: <<: *test-base variables: @@ -456,11 +1238,6 @@ test-ebgp-role: variables: TEST_NAME: cf-ebgp-role -test-ebgp-graceful: - <<: *test-base - variables: - TEST_NAME: cf-ebgp-graceful - test-ebgp-import-limit: <<: *test-base variables: @@ -471,25 +1248,15 @@ test-ibgp-loop: variables: TEST_NAME: cf-ibgp-loop -#test-ibgp-loop-big: -# <<: *test-base -# variables: -# TEST_NAME: cf-ibgp-loop-big -# -test-ibgp-flat: +test-ibgp-loop-big: <<: *test-base variables: - TEST_NAME: cf-ibgp-flat + TEST_NAME: cf-ibgp-loop-big -test-babel-base: - <<: *test-base - variables: - TEST_NAME: cf-babel-base - -test-babel-auth: +test-ibgp-flat: <<: *test-base variables: - TEST_NAME: cf-babel-auth + TEST_NAME: cf-ibgp-flat test-rip-base: <<: *test-base @@ -511,43 +1278,3 @@ test-mpls-bgp-l3vpn: variables: TEST_NAME: cf-mpls-bgp-l3vpn - -.build-birdlab-base: &build-birdlab-base - stage: build - script: - - autoreconf - - ./configure - - gmake - - gmake check - -build-birdlab-debian-11: - <<: *build-birdlab-base - tags: - - birdlab-debian-11 - - amd64 - -build-birdlab-centos-08: - <<: *build-birdlab-base - tags: - - birdlab-centos-08 - - amd64 - -build-birdlab-fedora-37: - <<: *build-birdlab-base - tags: - - birdlab-fedora-37 - - amd64 - -build-birdlab-freebsd-13: - <<: *build-birdlab-base - tags: - - birdlab-freebsd-13 - - amd64 - -build-birdlab-openbsd-71: - <<: *build-birdlab-base - variables: - AUTOCONF_VERSION: "2.71" - tags: - - birdlab-openbsd-71 - - amd64 diff --git a/Makefile.in b/Makefile.in index 29e627e1f..616f80608 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ # Makefile for the BIRD Internet Routing Daemon # (c) 1999--2000 Martin Mares -# (c) 2016 Jan Moskyto Matejka +# (c) 2016--2025 Maria Matejka # Disable build-in rules MAKEFLAGS += -r @@ -42,10 +42,11 @@ srcdir := @srcdir@ objdir := @objdir@ exedir := @exedir@ -git-label:=$(strip $(shell cd $(srcdir) && [ "$$(git rev-parse --show-toplevel)" = "$$(readlink -f .)" ] && git describe --always --dirty=-x 2>/dev/null)) -ifneq ($(git-label),) - CFLAGS += -DGIT_LABEL="$(git-label)" -endif +# Find out which version we are actually building +# This is rewritten by the release tools by hardcoded version +VERSION := $(strip $(shell $(srcdir)/tools/version)) + +CFLAGS += -DBIRD_VERSION='"$(VERSION)"' ifeq ($(objdir),.) objdir := $(realpath .) @@ -67,7 +68,7 @@ endif docgoals := docs userdocs progdocs testgoals := check test tests tests_run cleangoals := clean distclean testsclean -.PHONY: all daemon cli $(docgoals) $(testgoals) $(cleangoals) tags cscope prepare +.PHONY: all daemon cli $(docgoals) $(testgoals) $(cleangoals) tags cscope prepare gitlab all: daemon cli @@ -159,7 +160,7 @@ $(objdir)/.dir-stamp: Makefile $(client) $(daemon): $(E)echo LD $(LDFLAGS) -o $@ $^ $(LIBS) - $(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + +$(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(objdir)/sysdep/paths.h: Makefile $(E)echo GEN $@ @@ -174,7 +175,7 @@ tests_targets_ok = $(addsuffix .ok,$(tests_targets)) $(tests_targets): %: %.o $(tests_objs) | prepare $(E)echo LD $(LDFLAGS) -o $@ $< "..." $(LIBS) - $(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + +$(Q)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) # Hack to avoid problems with tests linking everything $(tests_targets): LIBS += $(DAEMON_LIBS) @@ -202,6 +203,18 @@ tags: cscope: cd $(srcdir) ; find $(dirs) -name '*.[chY]' > cscope.files ; cscope -b +# Gitlab CI tests +gitlab: .gitlab-ci.yml +.gitlab-ci.yml: $(addprefix misc/gitlab/,pipeline.py data.yml.j2 template.yml.j2) + ( \ + VENV=$$(mktemp -d); \ + python3 -m venv $$VENV; \ + . $$VENV/bin/activate; \ + pip3 install jinja2 pyaml; \ + python3 misc/gitlab/pipeline.py > $@ \ + rm -rf $$VENV \ + ) + # Install install: all diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..b50214693 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +3.0.2 diff --git a/distro/README.md b/distro/README.md index ac1a75b0a..52d22b16d 100644 --- a/distro/README.md +++ b/distro/README.md @@ -25,7 +25,7 @@ or in case of disposable VM/container you can use faster direct host build apkg build -Hi -tools/make-dev-archive script is in charge of creating archive from source. +tools/make-archive script is in charge of creating archive from source. ## Create (source) package from upstream release diff --git a/distro/config/apkg.toml b/distro/config/apkg.toml index 73a79a3be..8766f3641 100644 --- a/distro/config/apkg.toml +++ b/distro/config/apkg.toml @@ -1,7 +1,7 @@ [project] name = "bird" # needed for make-archive -make_archive_script = "tools/make-dev-archive" +make_archive_script = "tools/make-archive" [upstream] # needed for get-archive diff --git a/doc/Makefile b/doc/Makefile index 588b8634f..12471f844 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -20,7 +20,7 @@ $(o)prog.sgml: $(srcdir)/tools/progdoc $(objdir)/.dir-stamp $(srcdir)/tools/progdoc $(srcdir) $@ $(o)%.sgml: $(s)%.sgml $(objdir)/.dir-stamp - cp $< $@ + sed 's#{{ VERSION }}#$(VERSION)#' <$< >$@ $(o)%.html: $(o)%.sgml cd $(dir $@) && $(toolsdir)/linuxdoc -B html $(notdir $<) @@ -36,7 +36,7 @@ $(o)%.md: $(o)%.sgml $(LINUXDOC_PANDOC_PARSER) $(objdir)/.dir-stamp $(PANDOC) -f $(LINUXDOC_PANDOC_PARSER) -s -t markdown -o $@ $< $(o)%-singlepage.html: $(o)%.sgml $(SINGLEPAGE_HTML_TEMPLATE) $(LINUXDOC_PANDOC_PARSER) $(objdir)/.dir-stamp - $(PANDOC) -f $(LINUXDOC_PANDOC_PARSER) -t html5 --shift-heading-level-by=1 --section-divs --table-of-contents --toc-depth=3 -M bird_version="3.0.2" --template=$(SINGLEPAGE_HTML_TEMPLATE) -o $@ $< + $(PANDOC) -f $(LINUXDOC_PANDOC_PARSER) -t html5 --shift-heading-level-by=1 --section-divs --table-of-contents --toc-depth=3 -M bird_version="$(VERSION)" --template=$(SINGLEPAGE_HTML_TEMPLATE) -o $@ $< endif diff --git a/doc/bird.sgml b/doc/bird.sgml index 180ec2852..c86c62919 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1,7 +1,7 @@