]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '823281066' into thread-next
authorMaria Matejka <mq@ucw.cz>
Thu, 8 May 2025 19:57:33 +0000 (21:57 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 8 May 2025 19:57:33 +0000 (21:57 +0200)
1  2 
.gitlab-ci.yml
Makefile.in
VERSION
doc/Makefile
doc/bird.sgml
misc/gitlab/template.yml.j2
proto/bgp/bgp.c
proto/bgp/packets.c

diff --cc .gitlab-ci.yml
index ecaa8dfaf9151b35ea9ebbb14d1469ac1756242b,6e38e468b228ae22d5eef97ea15d378b4e51dd62..5b62b1e41d685474088a395d1327d82206539df2
@@@ -735,8 -1120,9 +1120,9 @@@ build-netlab
      - ln -s $STAYRTR_BINARY netlab/common/stayrtr
      - cd netlab
      - sudo ./stop
 -    - sudo ./runtest -s v2 -m check $TEST_NAME
 +    - sudo ./runtest -s v3 -m check $TEST_NAME
  
  test-babel-base:
    <<: *test-base
    variables:
diff --cc Makefile.in
Simple merge
diff --cc VERSION
index 0000000000000000000000000000000000000000,5c6fb54899bbc336b2c0c9bacb3e3645fb71e458..fd2a01863fdd3035fac5918c59666363544bfe23
mode 000000,100644..100644
--- /dev/null
+++ b/VERSION
@@@ -1,0 -1,1 +1,1 @@@
 -2.17
++3.1.0
diff --cc doc/Makefile
index 8545472b9f823d3e4181f81d9ed48b813468a9b9,5a0679b9cf62dde7ac42c513bbcad3931ddd6dd5..12471f84463830a72bdb0e73ff418f114d0fa056
@@@ -31,12 -31,11 +31,12 @@@ $(o)%.md: $(o)%.sgm
        @false
  else
  LINUXDOC_PANDOC_PARSER := $(srcdir)/tools/linuxdoc.lua
- $(o)%.md: $(s)%.sgml $(LINUXDOC_PANDOC_PARSER) $(objdir)/.dir-stamp
 +SINGLEPAGE_HTML_TEMPLATE := $(srcdir)/tools/doc-template.html
+ $(o)%.md: $(o)%.sgml $(LINUXDOC_PANDOC_PARSER) $(objdir)/.dir-stamp
        $(PANDOC) -f $(LINUXDOC_PANDOC_PARSER) -s -t markdown -o $@ $<
  
 -$(o)%-singlepage.html: $(o)%.md
 -      $(PANDOC) -f markdown -t html5 -s -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="$(VERSION)" --template=$(SINGLEPAGE_HTML_TEMPLATE) -o $@ $<
  
  endif
  
diff --cc doc/bird.sgml
Simple merge
index 0000000000000000000000000000000000000000,207a33798dae63ffad6f0553f92c0550b2d1369a..c9a55080660b291a18fdad10a4d5d9466f89f9c8
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,400 +1,400 @@@
 -    - sudo ./runtest -s v2 -m check $TEST_NAME
+ ###########################################################
+ #####                                                 #####
+ #####       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
+   GIT_STRATEGY: fetch
+   DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
+   IMG_BASE: registry.nic.cz/labs/bird
+   TOOLS_DIR: /home/gitlab-runner/bird-tools
+   STAYRTR_BINARY: /usr/bin/stayrtr
+ stages:
+   - consistency
+   - image
+   - build
+   - pkg
+   - test
+ ## 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
+   script:
+   - $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
+   # image only if it changed ‒ therefore, the cache is used unless there's a
+   # change.
+   - $DOCKER_CMD pull `sed -ne 's/^FROM //p' "misc/docker/$IMG_NAME/Dockerfile"`
+   - $DOCKER_CMD build -t "bird:$IMG_NAME" "misc/docker/$IMG_NAME"
+   - $DOCKER_CMD tag "bird:$IMG_NAME" "$IMG_BASE:$IMG_NAME"
+   - $DOCKER_CMD push "$IMG_BASE:$IMG_NAME"
+   after_script:
+   - rm -f "$HOME/.docker/$CI_JOB_ID/" # cleanup the credentials
+   tags:
+   # That's Docker in Docker
+   - dind
+   rules:
+     # Never rebuild for WIP commits
+   - *never-wip
+     # Never rebuild for tags
+   - if: '$CI_COMMIT_TAG'
+     when: never
+     # Never rebuild for new branches
+   - if: $CI_COMMIT_BEFORE_SHA == "0000000000000000000000000000000000000000"
+     when: never
+     # 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
+   - when: never
+ {% for docker in [ { "name": "docbuilder" } ] + distros %}
+ docker-{{ docker["name"] }}:
+   variables:
+     IMG_NAME: "{{ docker["name"] }}"
+   <<: *docker-build
+ {% endfor %}
+ #####################################################
+ ## 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
+ {% for dist in distros %}
+ build-{{dist["name"]}}:
+   <<: *build-docker-linux-amd64
+   needs:
+     - job: docker-{{ dist["name"] }}
+       optional: true
+   image: registry.nic.cz/labs/bird:{{ dist["name"] }}
+ {%- if 'variables' in dist %}
+   variables:
+ {{ dist["variables"] | to_yaml | indent(4, true) }}
+ {%- endif %}
+ {% endfor %}
+ #######################################################
+ ## 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 -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
+     # 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
+     - 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 -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 -a bird-$(cat VERSION)*.tar.gz
+     #- apkg install -y pkg/pkgs/*/*/*.rpm
+   artifacts:
+     paths:
+       - pkg/pkgs/*
+       - pkg/srcpkgs/*
+ {% for dist in distros %}
+ pkg-{{ dist["name"] }}:
+   <<: *{{ dist["type"] }}
+   needs:
+     - job: build-{{ dist["name"] }}
+       artifacts: false
+     - job: build-release
+   image: registry.nic.cz/labs/bird:{{ dist["name"] }}
+ {%- if 'variables' in dist %}
+   variables:
+ {{ dist["variables"] | to_yaml | indent(4, true) }}
+ {%- endif %}
+ {% endfor %}
+ ###################################
+ ## 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
+ {% for test in birdlab %}
+ build-birdlab-{{ test['name'] }}:
+   <<: *build-birdlab-base
+ {%- if 'variables' in test %}
+   variables:
+ {{ test['variables'] | to_yaml | indent(4, true) }}{%- endif %}
+   tags:
+     - birdlab-{{ test['dist'] if 'dist' in test else test['name'] }}
+     - amd64
+ {% endfor %}
+ #########################
+ ## Partial build tests ##
+ #########################
+ .build-only: &build-only
+   <<: *build-docker-linux-amd64
+   image: registry.nic.cz/labs/bird:{{ partial_build_image["name"] }}
+   needs:
+     - job: docker-{{ partial_build_image["name"] }}
+       optional: true
+ {% for test in partial_build %}
+ partial-build-linux-{{ test["protocols"] }}:
+   <<: *build-only
+   variables:
+     CONFIGURE_OPTIONS: --with-protocols={{ test["protocols"] }}
+ {% endfor %}
+ ################################
+ ## Netlab functionality tests ##
+ ################################
+ build-netlab:
+   <<: *test-job
+   stage: build
+   variables:
+     BDIR: build-netlab
+   tags:
+     - netlab
+     - amd64
+   script:
+     - autoreconf
+     - mkdir $BDIR
+     - cd $BDIR
+     - ../configure
+     - BRANCH=$CI_COMMIT_BRANCH make
+   artifacts:
+     paths:
+       - $BDIR/bird
+       - $BDIR/birdc
+     expire_in: 2 hours
+ .netlab-test: &test-base
+   <<: *test-job
+   stage: test
+   needs: [build-netlab]
+   tags:
+     - netlab
+     - amd64
+   script:
+     - DIR=$(pwd)
+     - cd $TOOLS_DIR
+     - sudo git clean -fx
+     - git pull --ff-only
+     - "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
+ {% for test in netlab %}
+ test-{{ test["name"] }}:
+   <<: *test-base
+   variables:
+     TEST_NAME: cf-{{ test["name"] }}
+ {% endfor %}
diff --cc proto/bgp/bgp.c
Simple merge
Simple merge