Update GnuPG to 2.5.24 and related libraries
What does this MR do?
Replaces GnuPG 2.2.41, which reached end of life on 2024-12-31, with a supported release. The related libraries are bumped to versions that release requires.
The GnuPG download page lists 2.4 as end of life since 2026-06-30. The only supported branch is 2.5/2.6 LTS, so this MR moves to its latest release, 2.5.24. libgcrypt 1.9 is also end of life, so it moves to 1.12 (LTS).
| Component | Old | New | Why |
|---|---|---|---|
| gnupg | 2.2.41 | 2.5.24 | Latest release of the only supported branch (2.5/2.6 LTS) |
| libgcrypt | 1.9.4 | 1.12.4 | gnupg 2.5.24 needs ≥ 1.12.0 |
| libgpg-error | 1.56 | 1.61 | gnupg and libgcrypt need ≥ 1.56; still meets the ≥ 1.49 floor for AlmaLinux 10 FIPS (!8792 (merged)) |
| libassuan | 2.5.5 | 3.0.2 | gnupg needs ≥ 3.0.0 (library file name changes to libassuan.so.9) |
| libksba | 1.6.3 | 1.8.1 | gnupg needs ≥ 1.6.3; latest |
| npth | 1.6 | 1.8 | gnupg needs ≥ 1.2; latest |
| gpgme | 1.18.0 | 2.2.0 | Current release (1.24.x is labelled legacy). Needs libgpg-error ≥ 1.47 and libassuan ≥ 2.4.2 |
The minimums come from configure.ac in each release tarball.
Changes
- Source build (all seven files): only
default_versionandsha256changed. Configure flags, dependencies,license_fileandproject.excludelines are unchanged, because the build didn't need any changes. - UBT path: the
gitlab-toolchainregistry only has the old versions published. The UBT calls for gnupg, libgcrypt, libassuan, libksba, npth and gpgme are pinned to their old versions and hashes with aFIXME: UBT package for <version> not yet publishedcomment, the same waylibgpg-error.rbis already pinned. UBT builds still ship the old stack until new UBT packages are published.
gpgme 2.x and ruby-gpgme
gpgme 2.0 removed the trustlist and *_attr functions. GitLab Rails pins gpgme (2.0.26). Its C extension only uses those functions when built against gpgme older than 2.0, and the gem itself bundles gpgme 2.0.0 and libassuan 3.0.2. Built locally against this stack with --use-system-libraries, it signs, verifies and imports keys correctly.
⚠️ FIPS builds are blocked
FIPS builds use the system libgcrypt (Build::Check.use_system_libgcrypt?, !8048 (merged)). gnupg 2.5.24 needs libgcrypt ≥ 1.12.0, and every FIPS distro ships an older version:
| Distro | System libgcrypt |
|---|---|
| Ubuntu 22.04 | 1.9.4 |
| AlmaLinux 8 | 1.8.5 |
| AlmaLinux 9 | 1.10.0 |
| AlmaLinux 10 | 1.11.0 |
| Amazon Linux 2023 | 1.10.2 |
Amazon Linux 2 FIPS uses the bundled libgcrypt and isn't affected. Building gnupg 2.5.24 against the system libgcrypt fails at configure (LIBGCRYPT - version >= 1.12.0... no), reproduced on AlmaLinux 9 and 10. Options:
- Use the bundled libgcrypt 1.12.4 on FIPS builds too. This needs compliance sign-off, because it replaces the system's FIPS-validated crypto module.
- Keep FIPS builds on an older gnupg/libgcrypt. Every older gnupg branch is end of life.
- Hold this bump until a FIPS approach is agreed.
This MR stays in draft until this is decided.
Local verification
| Check | Result |
|---|---|
Tarball signatures (gpg --verify against the release keys) |
Pass: every tarball signed by two release keys |
| sha256 | Hashed from the downloaded, signature-checked tarballs |
License files named in each .rb file still exist |
Pass |
Every configure flag is still recognised (configure --help) |
Pass. --disable-doc was already ignored by npth 1.6 and gpgme 1.18.0 |
| Full stack build in builder images: AlmaLinux 8 and 9 (5.74.0), AlmaLinux 10 (5.73.0), arm64 | Pass |
gpg smoke test: version, libraries load from the embedded directory, key generation, sign/verify (including --pinentry-mode loopback), the DSA-1024 key from the test plan, signed git commit |
Pass |
gpgme: C program linked against libgpgme, gpgme-json, ruby-gpgme 2.0.26 |
Pass |
Omnibus::Software.load with UBT_TEST_BUILD off and on |
Pass |
rubocop config/software/ |
No offenses |
rspec spec/lib |
637 examples, 0 failures |
Still to do
- Decide the FIPS approach (see above).
- Publish UBT packages for the new versions, then remove the
FIXMEpins. - Decide on backports and whether this needs the security-release process (pattern: #7467). The libgcrypt minimum affects backports too.
Related issues
Closes #10203
Related to #10120
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
- MR title and description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- Latest Merge Result pipeline is green.
- When ready for review, MR is marked as ready (not a draft) and a reviewer is requested. Pick the reviewer suggested by the reviewer roulette, or one of the project maintainers.
For GitLab team members
If you don't have access to this, the reviewer should trigger these jobs for you during the review process.
- The manual
Trigger:ee-packagejobs have a green pipeline running against latest commit.- To debug QA failures, refer to the Investigate QA failures section.
- If
config/softwareorconfig/patchesdirectories are changed, make sure thebuild-package-on-all-osjob within theTrigger:ee-packagedownstream pipeline succeeded. - If you are changing anything SSL related, then the
Trigger:package:fipsmanual job within theTrigger:ee-packagedownstream pipeline must succeed. - If CI configuration is changed, the branch must be pushed to
dev.gitlab.orgto confirm regular branch builds aren't broken.
Expected (please provide an explanation if not completing)
- Test plan indicating conditions for success has been posted and passes. (Test plan:
doc/development/test-plans/upgrade-gpg-testplan.md.) - Documentation created/updated.
- Tests added.
- Integration tests added to GitLab QA.
- Equivalent MR/issue for the GitLab Chart opened.
- Validate potential values for new configuration settings. Formats such as integer
10, duration10s, URIscheme://user:passwd@host:portmay require quotation or other special handling when rendered in a template and written to a configuration file.
Reviewer checklist
- As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.