Skip to content

Commit f731afd

Browse files
authored
build-git-installers: sign .deb files with a stronger algorithm (#815)
It has been reported in #706 that the `.deb` files of Microsoft Git's releases cannot be validated with `debsig-verify`. A deeper investigation brought to light that the reason is a weak digest algorithm: `debsigs` calls `gpg --opengpg` which uses SHA-1, but `debsig-verify` rejects such weak signatures. This was actually already fixed in `debsigs`, but current Ubuntu versions will not get those fixes, being stuck with older `debsigs` versions. It's easy enough to work around, though, by manually retracing the `debsigs` patch, so let's do that.
2 parents 847a19b + 78bfd50 commit f731afd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,15 @@ jobs:
690690
# Install debsigs
691691
sudo apt-get install -y debsigs
692692
693+
# Stop using SHA-1 for the signature. For details, see
694+
# https://gitlab.com/debsigs/debsigs/-/commit/75c6c8f96e6cdc33bca9c5f32195b68ff35bc32f
695+
# which seems to have made it to have made it into debsigs v0.2.1, but Ubuntu 24.04 is
696+
# stuck with v1.19.
697+
mkdir -p patched-debsigs &&
698+
sed 's/, "--openpgp"//' </usr/bin/debsigs >patched-debsigs/debsigs &&
699+
chmod a+x patched-debsigs/debsigs &&
700+
echo "$PWD/patched-debsigs" >>$GITHUB_PATH
701+
693702
# Import GPG key
694703
echo -n '${{ steps.gpg-secrets.outputs.private-key }}' | gpg --import --no-tty --batch --yes
695704

0 commit comments

Comments
 (0)