Skip to content

Commit f1efa3d

Browse files
committed
fixup! release: build unsigned Ubuntu .deb package
Currently, we target whatever GitHub Actions use as `ubuntu-latest`; This, however, led to the unintentional requirement in v2.47.2.vfs.0.0 to run Ubuntu 24.04 (up from 22.04 in v2.47.1.vfs.0.1). It is important to target a wider audience, though, especially in light of CVE-2024-52005 which is only addressed in Git for Windows and `microsoft/git`, but not Git. We could now go back to 22.04; This would only be a temporary band-aid, https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/ already announced that 20.04 is phased out very soon, and 22.04 will be next. Let's just use a Docker container instead that targets the oldest Ubuntu LTS that is still maintained in _some_ shape or form. This requires a few modifications (`sudo` is not available, GitHub Actions' node.js needs to be overridden, and we need to install a couple of packages explicitly). In particular, we now need two jobs because it turned out to be too convoluted to get `debsign` to work in a headless workflow with Ubuntu 16.04; We still resort to `ubuntu-latest` for that instead. By still verifying the resulting binary in `validate-installers`, we ensure that it installs and works on the latest Ubuntu version by virtue of using `runs-on: ubuntu-latest` in _that_ matrix job. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2651f3f commit f1efa3d

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,16 +490,30 @@ jobs:
490490
# End build and sign Mac OSX installers
491491

492492
# Build and sign Debian package
493-
create-linux-artifacts:
493+
create-linux-unsigned-artifacts:
494494
runs-on: ubuntu-latest
495+
container:
496+
image: ubuntu:16.04 # expanded security maintenance until 04/02/2026, according to https://endoflife.date/ubuntu
497+
volumes:
498+
# override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc, see "Install dependencies" below
499+
- /tmp:/__e/node20
495500
needs: prereqs
496-
environment: release
497501
steps:
498-
- name: Install git dependencies
502+
- name: Install dependencies
499503
run: |
500504
set -ex
501-
sudo apt-get update -q
502-
sudo apt-get install -y -q --no-install-recommends gettext libcurl4-gnutls-dev libpcre3-dev asciidoc xmlto
505+
apt-get update -q
506+
apt-get install -y -q --no-install-recommends \
507+
build-essential \
508+
tcl tk gettext asciidoc xmlto \
509+
libcurl4-gnutls-dev libpcre2-dev zlib1g-dev libexpat-dev \
510+
curl ca-certificates
511+
512+
# Install a Node.js version that works in older Ubuntu containers (read: does not require very recent glibc)
513+
NODE_VERSION=v20.18.1 &&
514+
NODE_URL=https://unofficial-builds.nodejs.org/download/release/$NODE_VERSION/node-$NODE_VERSION-linux-x64-glibc-217.tar.gz &&
515+
curl -Lo /tmp/node.tar.gz $NODE_URL &&
516+
tar -C /__e/node20 -x --strip-components=1 -f /tmp/node.tar.gz
503517
504518
- name: Clone git
505519
uses: actions/checkout@v4
@@ -562,6 +576,18 @@ jobs:
562576
# Move Debian package for later artifact upload
563577
mv "$PKGNAME.deb" "$GITHUB_WORKSPACE"
564578
579+
- name: Upload artifacts
580+
uses: actions/upload-artifact@v4
581+
with:
582+
name: linux-unsigned-artifacts
583+
path: |
584+
*.deb
585+
586+
create-linux-artifacts:
587+
runs-on: ubuntu-latest
588+
needs: [prereqs, create-linux-unsigned-artifacts]
589+
environment: release
590+
steps:
565591
- name: Log into Azure
566592
uses: azure/login@v2
567593
with:
@@ -597,6 +623,11 @@ jobs:
597623
gpg-connect-agent RELOADAGENT /bye
598624
/usr/lib/gnupg2/gpg-preset-passphrase --preset "$keygrip" <<<"$passphrase"
599625
626+
- name: Download artifacts
627+
uses: actions/download-artifact@v4
628+
with:
629+
name: linux-unsigned-artifacts
630+
600631
- name: Sign Debian package
601632
run: |
602633
# Sign Debian package

0 commit comments

Comments
 (0)