From 2f40efd9de2bd350844dd7fbbc4d873f1670f51e Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Tue, 23 Sep 2025 01:26:53 -0400 Subject: [PATCH 01/10] Bug 1963965: Update test runner to Ubuntu 24.04 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e38b9864b..696662985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: run: docker compose -f docker-compose.test-mariadb.yml run -e CI=1 bugzilla6.test test_bmo -q -f t/bmo/*.t test_bugzilla6_pg: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install docker-compose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20159bc04..9887c0837 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,8 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: ubuntu: - name: Release Tests on Ubuntu 20.04 - runs-on: ubuntu-20.04 + name: Release Tests on Ubuntu 24.04 + runs-on: ubuntu-24.04 steps: - name: Checkout the repository uses: actions/checkout@v4 @@ -36,8 +36,8 @@ jobs: sudo apt-get -y dist-upgrade sudo apt-get install --ignore-hold --allow-downgrades -y \ apache2 \ - mariadb-client-10.3 \ - netcat \ + mariadb-client \ + netcat-traditional \ build-essential \ libapache2-mod-perl2 \ libapache2-mod-perl2-dev \ @@ -45,7 +45,7 @@ jobs: graphviz \ curl libssl-dev zlib1g-dev openssl \ libexpat-dev cmake git libcairo-dev \ - unzip wget + unzip wget - name: cpm install run: | perl Makefile.PL From 95393312041b9dce214ac7d1030f0bc8044c8665 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 00:22:55 -0400 Subject: [PATCH 02/10] fix more 20.04 references --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9887c0837..ba5908a46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,9 +27,9 @@ jobs: ~/.perl-cpm/cache ~/.perl-cpm/builds **/local/ - key: ${{ runner.os }}-ubuntu-20.04 + key: ${{ runner.os }}-ubuntu-24.04 restore-keys: | - ${{ runner.os }}-ubuntu-20.04 + ${{ runner.os }}-ubuntu-24.04 - name: apt install run: | sudo apt-get update @@ -59,7 +59,7 @@ jobs: - name: Save dependencies uses: actions/upload-artifact@v4 with: - name: ubuntu-20.04-local-lib.tar.gz + name: ubuntu-24.04-local-lib.tar.gz path: local-lib.tar.gz - name: Run Makefile.PL run: 'perl Makefile.PL' From 80c9fcf1c03c0a347c9373e3fdc35b438d447326 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 19:32:12 -0400 Subject: [PATCH 03/10] try regenerating the cpanfile --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba5908a46..e74a740fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: - name: cpm install run: | perl Makefile.PL - #make cpanfile GEN_CPANFILE_ARGS='-A' + make cpanfile GEN_CPANFILE_ARGS='-A' perl -I$GITHUB_WORKSPACE/.github/cpm/lib/perl5 $GITHUB_WORKSPACE/.github/cpm/bin/cpm install \ && tar -C $GITHUB_WORKSPACE \ --exclude 'local/cache/*' \ From b55c7f9dd028e7335ac9d67681426653d364109c Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 19:40:32 -0400 Subject: [PATCH 04/10] add missing make prereqs --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e74a740fa..687dacbde 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,7 @@ jobs: sudo apt-get -y dist-upgrade sudo apt-get install --ignore-hold --allow-downgrades -y \ apache2 \ + cpanminus \ mariadb-client \ netcat-traditional \ build-essential \ @@ -49,6 +50,7 @@ jobs: - name: cpm install run: | perl Makefile.PL + cpanm --notest --quiet Module::CPANfile make cpanfile GEN_CPANFILE_ARGS='-A' perl -I$GITHUB_WORKSPACE/.github/cpm/lib/perl5 $GITHUB_WORKSPACE/.github/cpm/bin/cpm install \ && tar -C $GITHUB_WORKSPACE \ From a09865c3f5b0f67d431f6dd8ea47392567289fd6 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 19:50:12 -0400 Subject: [PATCH 05/10] do not build oracle, add GD deps --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 687dacbde..7cb6908aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,8 @@ jobs: build-essential \ libapache2-mod-perl2 \ libapache2-mod-perl2-dev \ + libgd3 \ + libgd-dev \ perlmagick \ graphviz \ curl libssl-dev zlib1g-dev openssl \ @@ -50,10 +52,10 @@ jobs: - name: cpm install run: | perl Makefile.PL - cpanm --notest --quiet Module::CPANfile - make cpanfile GEN_CPANFILE_ARGS='-A' - perl -I$GITHUB_WORKSPACE/.github/cpm/lib/perl5 $GITHUB_WORKSPACE/.github/cpm/bin/cpm install \ - && tar -C $GITHUB_WORKSPACE \ + cpanm --notest --quiet --local-lib="$GITHUB_WORKSPACE/.github/cpm/lib/perl5" Module::CPANfile + make cpanfile GEN_CPANFILE_ARGS='-A -X oracle' + perl -I"$GITHUB_WORKSPACE/.github/cpm/lib/perl5" "$GITHUB_WORKSPACE/.github/cpm/bin/cpm" install \ + && tar -C "$GITHUB_WORKSPACE" \ --exclude 'local/cache/*' \ --exclude 'local/man/*' \ --exclude '*.pod' \ From 4888cd74eb03b6dbec6760c11036e47758958f9f Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 19:59:42 -0400 Subject: [PATCH 06/10] the correct way to not build oracle --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cb6908aa..31aa43d10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: run: | perl Makefile.PL cpanm --notest --quiet --local-lib="$GITHUB_WORKSPACE/.github/cpm/lib/perl5" Module::CPANfile - make cpanfile GEN_CPANFILE_ARGS='-A -X oracle' + make cpanfile GEN_CPANFILE_ARGS='-A -U oracle' perl -I"$GITHUB_WORKSPACE/.github/cpm/lib/perl5" "$GITHUB_WORKSPACE/.github/cpm/bin/cpm" install \ && tar -C "$GITHUB_WORKSPACE" \ --exclude 'local/cache/*' \ From e5bb2c9b2fc9e5b6f0ba0451a21a8f830fe4fcc8 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 20:16:42 -0400 Subject: [PATCH 07/10] put jobs in sane order, remove redundancies --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31aa43d10..97a8af1d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,11 +49,13 @@ jobs: curl libssl-dev zlib1g-dev openssl \ libexpat-dev cmake git libcairo-dev \ unzip wget - - name: cpm install + - name: Run Makefile.PL run: | perl Makefile.PL cpanm --notest --quiet --local-lib="$GITHUB_WORKSPACE/.github/cpm/lib/perl5" Module::CPANfile make cpanfile GEN_CPANFILE_ARGS='-A -U oracle' + - name: cpm install + run: | perl -I"$GITHUB_WORKSPACE/.github/cpm/lib/perl5" "$GITHUB_WORKSPACE/.github/cpm/bin/cpm" install \ && tar -C "$GITHUB_WORKSPACE" \ --exclude 'local/cache/*' \ @@ -65,8 +67,6 @@ jobs: with: name: ubuntu-24.04-local-lib.tar.gz path: local-lib.tar.gz - - name: Run Makefile.PL - run: 'perl Makefile.PL' - name: Run checksetup run: 'perl checksetup.pl --no-database --default-localconfig --no-templates' - name: Run tests From ea66bc922b9538562fda8ae46d9a5a54fbdd1008 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 20:41:54 -0400 Subject: [PATCH 08/10] fix pg test build? --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 696662985..b3fa4fe03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install docker-compose - run: sudo apt update && sudo apt install -y docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Build the Docker images run: docker compose -f docker-compose.test.yml build - name: Run sanity tests @@ -29,7 +29,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # - name: Install docker-compose -# run: sudo apt update && sudo apt install -y docker-compose +# run: sudo apt-get update && sudo apt-get install -y docker-compose # - name: Build the Docker images # run: docker compose -f docker-compose.test.yml build # - name: Run webservice tests @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install docker-compose - run: sudo apt update && sudo apt install -y docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Build the Docker images run: docker compose -f docker-compose.test.yml build - name: Run bmo specific tests @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install docker-compose - run: sudo apt update && sudo apt install -y docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Build the Docker images run: docker compose -f docker-compose.test-mariadb.yml build - name: Run bmo specific tests @@ -62,18 +62,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install docker-compose - run: sudo apt update && sudo apt install -y docker-compose docker.io + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Build the Docker images - run: docker-compose -f docker-compose.test-pg.yml build + run: docker compose -f docker-compose.test-pg.yml build - name: Run bmo specific tests - run: docker-compose -f docker-compose.test-pg.yml run -e CI=1 bugzilla6.test test_bmo -q -f t/bmo/*.t + run: docker compose -f docker-compose.test-pg.yml run -e CI=1 bugzilla6.test test_bmo -q -f t/bmo/*.t test_bugzilla6_sqlite: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install docker-compose - run: sudo apt update && sudo apt install -y docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Build the Docker images run: docker compose -f docker-compose.test-sqlite.yml build - name: Run bmo specific tests From 85d71c513d8d6cab23ad413a356942dc9be7034d Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Thu, 25 Sep 2025 23:48:54 -0400 Subject: [PATCH 09/10] Bug 1990986: Use newer Postgres images, clean up dockerhub build --- Dockerfile | 4 +- Makefile.PL | 3 +- cpanfile | 1 + docker-compose.test-mariadb.yml | 2 +- docker-compose.test-pg.yml | 10 +- docker-compose.test.yml | 6 +- docker-compose.yml | 6 +- docker/gen-bugzilla-perl-slim.sh | 115 ----------------- docker/gen-bugzilla-slim-mariadb106.sh | 113 ---------------- docker/gen-bugzilla-slim-mysql8.sh | 113 ---------------- docker/gen-bugzilla-slim-pg9.sh | 113 ---------------- docker/gen-docker-image.sh | 121 ++++++++++++++++++ ...lla-slim => Dockerfile.bugzilla-perl-slim} | 5 +- ... => Dockerfile.bugzilla-perl-slim-mariadb} | 4 +- ...l8 => Dockerfile.bugzilla-perl-slim-mysql} | 5 +- ...a-pg9 => Dockerfile.bugzilla-perl-slim-pg} | 4 +- docker/images/Dockerfile.cpanfile | 4 +- docker/images/Dockerfile.mysql8 | 3 - 18 files changed, 150 insertions(+), 482 deletions(-) delete mode 100644 docker/gen-bugzilla-perl-slim.sh delete mode 100644 docker/gen-bugzilla-slim-mariadb106.sh delete mode 100644 docker/gen-bugzilla-slim-mysql8.sh delete mode 100644 docker/gen-bugzilla-slim-pg9.sh create mode 100755 docker/gen-docker-image.sh rename docker/images/{Dockerfile.bugzilla-slim => Dockerfile.bugzilla-perl-slim} (95%) rename docker/images/{Dockerfile.bugzilla-mariadb106 => Dockerfile.bugzilla-perl-slim-mariadb} (91%) rename docker/images/{Dockerfile.bugzilla-mysql8 => Dockerfile.bugzilla-perl-slim-mysql} (96%) rename docker/images/{Dockerfile.bugzilla-pg9 => Dockerfile.bugzilla-perl-slim-pg} (94%) delete mode 100644 docker/images/Dockerfile.mysql8 diff --git a/Dockerfile b/Dockerfile index 7ffc09b47..85a88cd97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -ARG BZDB="-mysql8" -FROM bugzilla/bugzilla-perl-slim${BZDB}:20240419.1 +ARG BZDB="-mysql" +FROM bugzilla/bugzilla-perl-slim${BZDB}:20250925.1 ENV DEBIAN_FRONTEND noninteractive diff --git a/Makefile.PL b/Makefile.PL index e5607385a..e1629ee85 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -90,6 +90,7 @@ my %requires = ( 'Role::Tiny' => '2.000003', 'Scope::Guard' => '0.21', 'Sereal' => '4.004', + 'Sub::Identify' => 0, 'Sub::Quote' => '2.005000', 'Template' => '3.008', 'Text::CSV_XS' => '1.26', @@ -199,7 +200,7 @@ my %optional_features = ( jsonrpc => { description => 'JSON-RPC Interface', prereqs => { - runtime => {requires => {'JSON::RPC' => '== 1.01', 'Test::Taint' => '1.06'}} + runtime => {requires => {'JSON::RPC' => '1.01', 'Test::Taint' => '1.06'}} } }, linux_pdeath => { diff --git a/cpanfile b/cpanfile index b4c3a0f10..2aec85055 100644 --- a/cpanfile +++ b/cpanfile @@ -68,6 +68,7 @@ requires 'Role::Tiny', '2.000003'; requires 'SOAP::Lite', '0.712'; requires 'Scope::Guard', '0.21'; requires 'Sereal', '4.004'; +requires 'Sub::Identify'; requires 'Sub::Quote', '2.005000'; requires 'Sys::Syslog'; requires 'Template', '3.008'; diff --git a/docker-compose.test-mariadb.yml b/docker-compose.test-mariadb.yml index 832a4594f..b1c190169 100644 --- a/docker-compose.test-mariadb.yml +++ b/docker-compose.test-mariadb.yml @@ -8,7 +8,7 @@ services: bugzilla6.test: build: args: - - BZDB=-mariadb106 + - BZDB=-mariadb context: . dockerfile: Dockerfile command: dev_httpd diff --git a/docker-compose.test-pg.yml b/docker-compose.test-pg.yml index 06479194d..bb7dafe38 100644 --- a/docker-compose.test-pg.yml +++ b/docker-compose.test-pg.yml @@ -8,7 +8,7 @@ services: bugzilla6.test: build: args: - - BZDB=-pg9 + - BZDB=-pg context: . dockerfile: Dockerfile command: dev_httpd @@ -18,7 +18,7 @@ services: environment: - 'BMO_inbound_proxies=*' - BMO_db_driver=pg - - BMO_db_host=bugzilla6.pgsql9 + - BMO_db_host=bugzilla6.pgsql13 - BMO_db_name=bugs - BMO_db_pass=bugs - BMO_db_user=bugs @@ -40,12 +40,12 @@ services: - TWD_HOST=selenium - TWD_PORT=4444 depends_on: - - bugzilla6.pgsql9 + - bugzilla6.pgsql13 - memcached - selenium - bugzilla6.pgsql9: - image: postgres:9.0 + bugzilla6.pgsql13: + image: postgres:13.22 tmpfs: - /tmp logging: diff --git a/docker-compose.test.yml b/docker-compose.test.yml index f4f574066..b2f5d4efc 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -43,9 +43,9 @@ services: - selenium bugzilla6.mysql8: - build: - context: . - dockerfile: docker/images/Dockerfile.mysql8 + image: mysql:8 + command: + - '--max_allowed_packet=64M' tmpfs: - /tmp logging: diff --git a/docker-compose.yml b/docker-compose.yml index 299f951bd..33cf6f391 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,9 +95,9 @@ services: # - memcached bugzilla6.mysql8: - build: - context: . - dockerfile: docker/images/Dockerfile.mysql8 + image: mysql:8 + command: + - '--max_allowed_packet=64M' volumes: - bugzilla6-mysql-db:/var/lib/mysql tmpfs: diff --git a/docker/gen-bugzilla-perl-slim.sh b/docker/gen-bugzilla-perl-slim.sh deleted file mode 100644 index 95a4ca165..000000000 --- a/docker/gen-bugzilla-perl-slim.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. - -if [ ! -e 'Makefile.PL' ]; then - echo - echo "Please run this from the root of the Bugzilla source tree." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - DOCKER=`which docker` -fi -if [ ! -x "$DOCKER" ]; then - echo - echo "You specified a custom Docker executable via the DOCKER" - echo "environment variable at $DOCKER" - echo "which either does not exist or is not executable." - echo "Please fix it to point at a working Docker or remove the" - echo "DOCKER environment variable to use the one in your PATH" - echo "if it exists." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - echo - echo "You do not appear to have docker installed or I can't find it." - echo "Windows and Mac versions can be downloaded from" - echo "https://www.docker.com/products/docker-desktop" - echo "Linux users can install using your package manager." - echo - echo "Please install docker or specify the location of the docker" - echo "executable in the DOCKER environment variable and try again." - echo - exit -1 -fi -$DOCKER info 1>/dev/null 2>/dev/null -if [ $? != 0 ]; then - echo - echo "The docker daemon is not running or I can't connect to it." - echo "Please make sure it's running and try again." - echo - exit -1 -fi -if [ ! -f "docker/images/Dockerfile.bugzilla-slim" ]; then - echo - echo "Can't locate the Dockerfile, try running from the root of" - echo "your Bugzilla checkout." - echo - exit -1 -fi - -export DOCKER_CLI_HINTS=false -export CI="" -export CIRCLE_SHA1="" -export CIRCLE_BUILD_URL="" -#$DOCKER build -t bugzilla-cpanfile -f Dockerfile.cpanfile . -#$DOCKER run -it -v "$(pwd):/app/result" bugzilla-cpanfile cp cpanfile cpanfile.snapshot /app/result - -# Figure out the tag name to use for the image. We'll do this by generating -# a code based on today's date, then attempt to pull it from DockerHub. If -# we successfully pull, then it already exists, and we bump the interation -# number on the end. -DATE=`date +"%Y%m%d"` -ITER=1 -$DOCKER pull bugzilla/bugzilla-perl-slim:${DATE}.${ITER} >/dev/null 2>/dev/null -while [ $? == 0 ]; do - # as long as we succesfully pull, keep bumping the number on the end - ((ITER++)) - $DOCKER pull bugzilla/bugzilla-perl-slim:${DATE}.${ITER} >/dev/null 2>/dev/null -done -$DOCKER build -t bugzilla/bugzilla-perl-slim:${DATE}.${ITER} -f docker/images/Dockerfile.bugzilla-slim . -if [ $? == 0 ]; then - echo - echo "The build appears to have succeeded. Don't forget to change the FROM line" - echo "at the top of Dockerfile to use:" - echo " bugzilla/bugzilla-perl-slim:${DATE}.${ITER}" - echo "to make use of this image." - echo - # check if the user is logged in - if [ -z "$PYTHON" ]; then - PYTHON=`which python` - fi - if [ -z "$PYTHON" ]; then - PYTHON=`which python3` - fi - if [ ! -x "$PYTHON" ]; then - echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it." - exit -1 - fi - AUTHINFO=`$PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))"` - if [ $AUTHINFO -gt 0 ]; then - # user is logged in - read -p "Do you wish to push to DockerHub? [y/N]: " yesno - case $yesno in - [Yy]*) - echo "Pushing..." - $DOCKER push bugzilla/bugzilla-perl-slim:${DATE}.${ITER} - ;; - *) - echo "Not pushing. You can just run this script again when you're ready" - echo "to push. The prior build result is cached." - ;; - esac - fi -else - echo - echo "Docker build failed. See output above." - echo - exit -1 -fi diff --git a/docker/gen-bugzilla-slim-mariadb106.sh b/docker/gen-bugzilla-slim-mariadb106.sh deleted file mode 100644 index 9cb56c277..000000000 --- a/docker/gen-bugzilla-slim-mariadb106.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. - -if [ ! -e 'Makefile.PL' ]; then - echo - echo "Please run this from the root of the Bugzilla source tree." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - DOCKER=`which docker` -fi -if [ ! -x "$DOCKER" ]; then - echo - echo "You specified a custom Docker executable via the DOCKER" - echo "environment variable at $DOCKER" - echo "which either does not exist or is not executable." - echo "Please fix it to point at a working Docker or remove the" - echo "DOCKER environment variable to use the one in your PATH" - echo "if it exists." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - echo - echo "You do not appear to have docker installed or I can't find it." - echo "Windows and Mac versions can be downloaded from" - echo "https://www.docker.com/products/docker-desktop" - echo "Linux users can install using your package manager." - echo - echo "Please install docker or specify the location of the docker" - echo "executable in the DOCKER environment variable and try again." - echo - exit -1 -fi -$DOCKER info 1>/dev/null 2>/dev/null -if [ $? != 0 ]; then - echo - echo "The docker daemon is not running or I can't connect to it." - echo "Please make sure it's running and try again." - echo - exit -1 -fi -if [ ! -f "docker/images/Dockerfile.bugzilla-mariadb106" ]; then - echo - echo "Can't locate the Dockerfile, try running from the root of" - echo "your Bugzilla checkout." - echo - exit -1 -fi - -export DOCKER_CLI_HINTS=false -export CI="" -export CIRCLE_SHA1="" -export CIRCLE_BUILD_URL="" - -# Figure out the tag name to use for the image. We'll do this by generating -# a code based on today's date, then attempt to pull it from DockerHub. If -# we successfully pull, then it already exists, and we bump the interation -# number on the end. -DATE=`date +"%Y%m%d"` -ITER=1 -$DOCKER pull bugzilla/bugzilla-perl-slim-mariadb106:${DATE}.${ITER} >/dev/null 2>/dev/null -while [ $? == 0 ]; do - # as long as we succesfully pull, keep bumping the number on the end - ((ITER++)) - $DOCKER pull bugzilla/bugzilla-perl-slim-mariadb106:${DATE}.${ITER} >/dev/null 2>/dev/null -done -$DOCKER build -t bugzilla/bugzilla-perl-slim-mariadb106:${DATE}.${ITER} -f docker/images/Dockerfile.bugzilla-mariadb106 . -if [ $? == 0 ]; then - echo - echo "The build appears to have succeeded. Don't forget to change the FROM line" - echo "at the top of Dockerfile to use:" - echo " bugzilla/bugzilla-perl-slim-mariadb106:${DATE}.${ITER}" - echo "to make use of this image." - echo - # check if the user is logged in - if [ -z "$PYTHON" ]; then - PYTHON=`which python` - fi - if [ -z "$PYTHON" ]; then - PYTHON=`which python3` - fi - if [ ! -x "$PYTHON" ]; then - echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it." - exit -1 - fi - AUTHINFO=`$PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))"` - if [ $AUTHINFO -gt 0 ]; then - # user is logged in - read -p "Do you wish to push to DockerHub? [y/N]: " yesno - case $yesno in - [Yy]*) - echo "Pushing..." - $DOCKER push bugzilla/bugzilla-perl-slim-mariadb106:${DATE}.${ITER} - ;; - *) - echo "Not pushing. You can just run this script again when you're ready" - echo "to push. The prior build result is cached." - ;; - esac - fi -else - echo - echo "Docker build failed. See output above." - echo - exit -1 -fi diff --git a/docker/gen-bugzilla-slim-mysql8.sh b/docker/gen-bugzilla-slim-mysql8.sh deleted file mode 100644 index 2341f3360..000000000 --- a/docker/gen-bugzilla-slim-mysql8.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. - -if [ ! -e 'Makefile.PL' ]; then - echo - echo "Please run this from the root of the Bugzilla source tree." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - DOCKER=`which docker` -fi -if [ ! -x "$DOCKER" ]; then - echo - echo "You specified a custom Docker executable via the DOCKER" - echo "environment variable at $DOCKER" - echo "which either does not exist or is not executable." - echo "Please fix it to point at a working Docker or remove the" - echo "DOCKER environment variable to use the one in your PATH" - echo "if it exists." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - echo - echo "You do not appear to have docker installed or I can't find it." - echo "Windows and Mac versions can be downloaded from" - echo "https://www.docker.com/products/docker-desktop" - echo "Linux users can install using your package manager." - echo - echo "Please install docker or specify the location of the docker" - echo "executable in the DOCKER environment variable and try again." - echo - exit -1 -fi -$DOCKER info 1>/dev/null 2>/dev/null -if [ $? != 0 ]; then - echo - echo "The docker daemon is not running or I can't connect to it." - echo "Please make sure it's running and try again." - echo - exit -1 -fi -if [ ! -f "docker/images/Dockerfile.bugzilla-mysql8" ]; then - echo - echo "Can't locate the Dockerfile, try running from the root of" - echo "your Bugzilla checkout." - echo - exit -1 -fi - -export DOCKER_CLI_HINTS=false -export CI="" -export CIRCLE_SHA1="" -export CIRCLE_BUILD_URL="" - -# Figure out the tag name to use for the image. We'll do this by generating -# a code based on today's date, then attempt to pull it from DockerHub. If -# we successfully pull, then it already exists, and we bump the interation -# number on the end. -DATE=`date +"%Y%m%d"` -ITER=1 -$DOCKER pull bugzilla/bugzilla-perl-slim-mysql8:${DATE}.${ITER} >/dev/null 2>/dev/null -while [ $? == 0 ]; do - # as long as we succesfully pull, keep bumping the number on the end - ((ITER++)) - $DOCKER pull bugzilla/bugzilla-perl-slim-mysql8:${DATE}.${ITER} >/dev/null 2>/dev/null -done -$DOCKER build -t bugzilla/bugzilla-perl-slim-mysql8:${DATE}.${ITER} -f docker/images/Dockerfile.bugzilla-mysql8 . -if [ $? == 0 ]; then - echo - echo "The build appears to have succeeded. Don't forget to change the FROM line" - echo "at the top of Dockerfile to use:" - echo " bugzilla/bugzilla-perl-slim-mysql8:${DATE}.${ITER}" - echo "to make use of this image." - echo - # check if the user is logged in - if [ -z "$PYTHON" ]; then - PYTHON=`which python` - fi - if [ -z "$PYTHON" ]; then - PYTHON=`which python3` - fi - if [ ! -x "$PYTHON" ]; then - echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it." - exit -1 - fi - AUTHINFO=`$PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))"` - if [ $AUTHINFO -gt 0 ]; then - # user is logged in - read -p "Do you wish to push to DockerHub? [y/N]: " yesno - case $yesno in - [Yy]*) - echo "Pushing..." - $DOCKER push bugzilla/bugzilla-perl-slim-mysql8:${DATE}.${ITER} - ;; - *) - echo "Not pushing. You can just run this script again when you're ready" - echo "to push. The prior build result is cached." - ;; - esac - fi -else - echo - echo "Docker build failed. See output above." - echo - exit -1 -fi diff --git a/docker/gen-bugzilla-slim-pg9.sh b/docker/gen-bugzilla-slim-pg9.sh deleted file mode 100644 index 92710d55c..000000000 --- a/docker/gen-bugzilla-slim-pg9.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. - -if [ ! -e 'Makefile.PL' ]; then - echo - echo "Please run this from the root of the Bugzilla source tree." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - DOCKER=`which docker` -fi -if [ ! -x "$DOCKER" ]; then - echo - echo "You specified a custom Docker executable via the DOCKER" - echo "environment variable at $DOCKER" - echo "which either does not exist or is not executable." - echo "Please fix it to point at a working Docker or remove the" - echo "DOCKER environment variable to use the one in your PATH" - echo "if it exists." - echo - exit -1 -fi -if [ -z "$DOCKER" ]; then - echo - echo "You do not appear to have docker installed or I can't find it." - echo "Windows and Mac versions can be downloaded from" - echo "https://www.docker.com/products/docker-desktop" - echo "Linux users can install using your package manager." - echo - echo "Please install docker or specify the location of the docker" - echo "executable in the DOCKER environment variable and try again." - echo - exit -1 -fi -$DOCKER info 1>/dev/null 2>/dev/null -if [ $? != 0 ]; then - echo - echo "The docker daemon is not running or I can't connect to it." - echo "Please make sure it's running and try again." - echo - exit -1 -fi -if [ ! -f "docker/images/Dockerfile.bugzilla-pg9" ]; then - echo - echo "Can't locate the Dockerfile, try running from the root of" - echo "your Bugzilla checkout." - echo - exit -1 -fi - -export DOCKER_CLI_HINTS=false -export CI="" -export CIRCLE_SHA1="" -export CIRCLE_BUILD_URL="" - -# Figure out the tag name to use for the image. We'll do this by generating -# a code based on today's date, then attempt to pull it from DockerHub. If -# we successfully pull, then it already exists, and we bump the interation -# number on the end. -DATE=`date +"%Y%m%d"` -ITER=1 -$DOCKER pull bugzilla/bugzilla-perl-slim-pg9:${DATE}.${ITER} >/dev/null 2>/dev/null -while [ $? == 0 ]; do - # as long as we succesfully pull, keep bumping the number on the end - ((ITER++)) - $DOCKER pull bugzilla/bugzilla-perl-slim-pg9:${DATE}.${ITER} >/dev/null 2>/dev/null -done -$DOCKER build -t bugzilla/bugzilla-perl-slim-pg9:${DATE}.${ITER} -f docker/images/Dockerfile.bugzilla-pg9 . -if [ $? == 0 ]; then - echo - echo "The build appears to have succeeded. Don't forget to change the FROM line" - echo "at the top of Dockerfile to use:" - echo " bugzilla/bugzilla-perl-slim-pg9:${DATE}.${ITER}" - echo "to make use of this image." - echo - # check if the user is logged in - if [ -z "$PYTHON" ]; then - PYTHON=`which python` - fi - if [ -z "$PYTHON" ]; then - PYTHON=`which python3` - fi - if [ ! -x "$PYTHON" ]; then - echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it." - exit -1 - fi - AUTHINFO=`$PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))"` - if [ $AUTHINFO -gt 0 ]; then - # user is logged in - read -p "Do you wish to push to DockerHub? [y/N]: " yesno - case $yesno in - [Yy]*) - echo "Pushing..." - $DOCKER push bugzilla/bugzilla-perl-slim-pg9:${DATE}.${ITER} - ;; - *) - echo "Not pushing. You can just run this script again when you're ready" - echo "to push. The prior build result is cached." - ;; - esac - fi -else - echo - echo "Docker build failed. See output above." - echo - exit -1 -fi diff --git a/docker/gen-docker-image.sh b/docker/gen-docker-image.sh new file mode 100755 index 000000000..1268d23d2 --- /dev/null +++ b/docker/gen-docker-image.sh @@ -0,0 +1,121 @@ +#!/bin/bash +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is "Incompatible With Secondary Licenses", as +# defined by the Mozilla Public License, v. 2.0. + +if [ ! -e 'Makefile.PL' ]; then + echo + echo "Please run this from the root of the Bugzilla source tree." + echo + exit -1 +fi +if [ -z "$DOCKER" ]; then + DOCKER=`which docker` +fi +if [ ! -x "$DOCKER" ]; then + echo + echo "You specified a custom Docker executable via the DOCKER" + echo "environment variable at $DOCKER" + echo "which either does not exist or is not executable." + echo "Please fix it to point at a working Docker or remove the" + echo "DOCKER environment variable to use the one in your PATH" + echo "if it exists." + echo + exit -1 +fi +if [ -z "$DOCKER" ]; then + echo + echo "You do not appear to have docker installed or I can't find it." + echo "Windows and Mac versions can be downloaded from" + echo "https://www.docker.com/products/docker-desktop" + echo "Linux users can install using your package manager." + echo + echo "Please install docker or specify the location of the docker" + echo "executable in the DOCKER environment variable and try again." + echo + exit -1 +fi +$DOCKER info 1>/dev/null 2>/dev/null +if [ $? != 0 ]; then + echo + echo "The docker daemon is not running or I can't connect to it." + echo "Please make sure it's running and try again." + echo + exit -1 +fi +FILES=`ls -1 docker/images/Dockerfile.b* | sed -e 's@^docker/images/Dockerfile\.@@'` +PS3="Choose an image to build or CTRL-C to abort: " +select IMAGE in $FILES; do + CACHE="" + if [ "$1" == "--no-cache" ]; then + CACHE="--no-cache" + fi + + export DOCKER_CLI_HINTS=false + export CI="" + export CIRCLE_SHA1="" + export CIRCLE_BUILD_URL="" + + # Figure out the tag name to use for the image. We'll do this by generating + # a code based on today's date, then attempt to pull it from DockerHub. If + # we successfully pull, then it already exists, and we bump the interation + # number on the end. + DATE=`date +"%Y%m%d"` + ITER=1 + $DOCKER pull bugzilla/${IMAGE}:${DATE}.${ITER} >/dev/null 2>/dev/null + while [ $? == 0 ]; do + # as long as we succesfully pull, keep bumping the number on the end + ((ITER++)) + $DOCKER pull bugzilla/${IMAGE}:${DATE}.${ITER} >/dev/null 2>/dev/null + done + LINE="Building bugzilla/${IMAGE}:${DATE}.${ITER}" + echo "##${LINE//?/#}##" + echo "# ${LINE} #" + echo "##${LINE//?/#}##" + $DOCKER build $CACHE -t bugzilla/${IMAGE}:${DATE}.${ITER} -f docker/images/Dockerfile.${IMAGE} . + if [ $? == 0 ]; then + echo + echo "The build appears to have succeeded. Don't forget to change the FROM line" + echo "at the top of Dockerfile to use:" + echo " bugzilla/${IMAGE}:${DATE}.${ITER}" + echo "to make use of this image." + echo + # check if the user is logged in + if [ -z "$PYTHON" ]; then + PYTHON=`which python` + fi + if [ -z "$PYTHON" ]; then + PYTHON=`which python3` + fi + if [ ! -x "$PYTHON" ]; then + echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it." + exit -1 + fi + AUTHINFO=`$PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))"` + if [ $AUTHINFO -gt 0 ]; then + # user is logged in + read -p "Do you wish to push to DockerHub? [y/N]: " yesno + case $yesno in + [Yy]*) + echo "Pushing..." + $DOCKER push bugzilla/${IMAGE}:${DATE}.${ITER} + $DOCKER tag bugzilla/${IMAGE}:${DATE}.${ITER} bugzilla/${IMAGE}:latest + $DOCKER push bugzilla/${IMAGE}:latest + ;; + *) + echo "Not pushing. You can just run this script again when you're ready" + echo "to push. The prior build result is cached." + ;; + esac + fi + else + echo + echo "Docker build failed. See output above." + echo + exit -1 + fi + break +done diff --git a/docker/images/Dockerfile.bugzilla-slim b/docker/images/Dockerfile.bugzilla-perl-slim similarity index 95% rename from docker/images/Dockerfile.bugzilla-slim rename to docker/images/Dockerfile.bugzilla-perl-slim index 8553134c1..bd4258ed0 100644 --- a/docker/images/Dockerfile.bugzilla-slim +++ b/docker/images/Dockerfile.bugzilla-perl-slim @@ -1,4 +1,4 @@ -FROM perl:5.38.0-slim AS builder +FROM perl:5.38.2-slim AS builder RUN apt-get update \ && apt-get dist-upgrade -y \ @@ -6,6 +6,7 @@ RUN apt-get update \ apt-file \ build-essential \ cmake \ + cpanminus \ curl \ git \ libcairo-dev \ @@ -40,7 +41,7 @@ RUN find local -name '*.so' -exec ldd {} \; \ | xargs -IFILE apt-file search -l FILE \ | sort -u > PACKAGES -FROM perl:5.38.0-slim +FROM perl:5.38.2-slim ENV DEBIAN_FRONTEND noninteractive diff --git a/docker/images/Dockerfile.bugzilla-mariadb106 b/docker/images/Dockerfile.bugzilla-perl-slim-mariadb similarity index 91% rename from docker/images/Dockerfile.bugzilla-mariadb106 rename to docker/images/Dockerfile.bugzilla-perl-slim-mariadb index 74b5dd5aa..d5acd77fe 100644 --- a/docker/images/Dockerfile.bugzilla-mariadb106 +++ b/docker/images/Dockerfile.bugzilla-perl-slim-mariadb @@ -1,4 +1,4 @@ -FROM bugzilla/bugzilla-perl-slim:20240410.1 AS builder +FROM bugzilla/bugzilla-perl-slim:20250925.1 AS builder RUN apt-get update \ && apt-get dist-upgrade -y \ @@ -38,7 +38,7 @@ RUN find local -name '*.so' -exec ldd {} \; \ | xargs -IFILE apt-file search -l FILE \ | sort -u > PACKAGES -FROM bugzilla/bugzilla-perl-slim:20240410.1 +FROM bugzilla/bugzilla-perl-slim:20250925.1 ENV DEBIAN_FRONTEND noninteractive diff --git a/docker/images/Dockerfile.bugzilla-mysql8 b/docker/images/Dockerfile.bugzilla-perl-slim-mysql similarity index 96% rename from docker/images/Dockerfile.bugzilla-mysql8 rename to docker/images/Dockerfile.bugzilla-perl-slim-mysql index 5d1dff9f6..a807fca41 100644 --- a/docker/images/Dockerfile.bugzilla-mysql8 +++ b/docker/images/Dockerfile.bugzilla-perl-slim-mysql @@ -1,4 +1,4 @@ -FROM bugzilla/bugzilla-perl-slim:20240410.1 AS builder +FROM bugzilla/bugzilla-perl-slim:20250925.1 AS builder RUN apt-get update \ && apt-get dist-upgrade -y \ @@ -6,6 +6,7 @@ RUN apt-get update \ apt-file \ build-essential \ cmake \ + cpanminus \ curl \ git \ libcairo-dev \ @@ -47,7 +48,7 @@ RUN find local -name '*.so' -exec ldd {} \; \ | xargs -IFILE apt-file search -l FILE \ | sort -u > PACKAGES -FROM bugzilla/bugzilla-perl-slim:20240410.1 +FROM bugzilla/bugzilla-perl-slim:20250925.1 ENV DEBIAN_FRONTEND noninteractive diff --git a/docker/images/Dockerfile.bugzilla-pg9 b/docker/images/Dockerfile.bugzilla-perl-slim-pg similarity index 94% rename from docker/images/Dockerfile.bugzilla-pg9 rename to docker/images/Dockerfile.bugzilla-perl-slim-pg index 7698e8514..d2fe4b575 100644 --- a/docker/images/Dockerfile.bugzilla-pg9 +++ b/docker/images/Dockerfile.bugzilla-perl-slim-pg @@ -1,4 +1,4 @@ -FROM bugzilla/bugzilla-perl-slim:20240410.1 AS builder +FROM bugzilla/bugzilla-perl-slim:20250925.1 AS builder # reinstall the build prereqs on the temporary image RUN apt-get update \ @@ -49,7 +49,7 @@ RUN find local -name '*.so' -exec ldd {} \; \ # now we start over with a new image so the final image doesn't contain # developer tools -FROM bugzilla/bugzilla-perl-slim:20240410.1 +FROM bugzilla/bugzilla-perl-slim:20250925.1 ENV DEBIAN_FRONTEND noninteractive diff --git a/docker/images/Dockerfile.cpanfile b/docker/images/Dockerfile.cpanfile index 71d4ca1ce..e11ba000d 100644 --- a/docker/images/Dockerfile.cpanfile +++ b/docker/images/Dockerfile.cpanfile @@ -1,10 +1,10 @@ -FROM perl:5.38.0-slim +FROM perl:5.38.2-slim RUN apt-get update \ && apt-get dist-upgrade -y \ && apt-get install -y \ build-essential curl libssl-dev zlib1g-dev openssl \ - libexpat-dev cmake git libcairo-dev libgd-dev \ + libexpat-dev cmake cpanminus git libcairo-dev libgd-dev \ unzip wget # The Perl image is based on Debian, which doesn't have MySQL 8, and the diff --git a/docker/images/Dockerfile.mysql8 b/docker/images/Dockerfile.mysql8 deleted file mode 100644 index 522278de1..000000000 --- a/docker/images/Dockerfile.mysql8 +++ /dev/null @@ -1,3 +0,0 @@ -FROM mysql:8 -# We do this because we don't want everything in the docker/mysql folder, just the one -COPY docker/mysql/bugzilla-mysql8.cnf /etc/mysql/conf.d/ From 40e85dcf1c186698b46539246c60da737f674c91 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Fri, 26 Sep 2025 02:10:36 -0400 Subject: [PATCH 10/10] missed a spot fixing JSON::RPC dep --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index e1629ee85..0a89d7fe2 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -284,7 +284,7 @@ my %optional_features = ( rest => { description => 'REST Interface', prereqs => { - runtime => {requires => {'Test::Taint' => '1.06', 'JSON::RPC' => '==1.01',}} + runtime => {requires => {'Test::Taint' => '1.06', 'JSON::RPC' => '1.01',}} } }, s3 => {