Skip to content

Enable systemd boot secure-boot signing - #20014

Draft
George Mileka (gmileka) wants to merge 13 commits into
4.0from
user/gmileka/enable-systemd-boot-signing
Draft

George Mileka (gmileka) wants to merge 13 commits into
4.0from
user/gmileka/enable-systemd-boot-signing

Conversation

@gmileka

Copy link
Copy Markdown

No description provided.

Adding a call to pesign-client with the default upstream Fedora signing parameter values.
Those values match what is currently being used by other packages (kernel, grub2, etc.).
They do not define what certificate will be used. Instead, the environment and package
name decide what certificate will be used as follows:
- If this package is being built in the production environment, it will be signed with
  ESRP production secure boot certificate.
- If it is being built in the PME staging environment, it will be signed with the ESRP
  test secure boot certificate.
- Otherwise, it will be signed with a self-issued certificate.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gmileka <4400491+gmileka@users.noreply.github.com>
… dedicated cert

Co-authored-by: gmileka <4400491+gmileka@users.noreply.github.com>
…tput

Co-authored-by: gmileka <4400491+gmileka@users.noreply.github.com>
Co-authored-by: gmileka <4400491+gmileka@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 20:05
@gmileka George Mileka (gmileka) changed the title User/gmileka/enable systemd boot signing Enable systemd boot secure-boot signing Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The signed EFI payload is still packaged with metadata claiming it cannot support Secure Boot and lacks signed-bootloader Provides, requiring packaging updates that preserve existing dependency compatibility.

1 open issue
What changed in this PR

Enables Secure Boot signing for systemd-boot in non-OBS builds through Azure Linux’s overlay system.

Changes:

  • Adds pesign as a build dependency when the bootloader is enabled.
  • Signs the EFI binary using the dedicated systemd-boot-signer certificate.
  • Refreshes the component lock and rendered spec, including release and changelog updates.
File Description
specs/​s/​systemd/​systemd.spec Renders the signing dependency and steps; updates release metadata.
locks/​systemd.lock Refreshes the component input fingerprint.
base/​comps/​systemd/​overlays/​0008-non-obs-secure-boot-signing.overlay.toml Defines bootloader-gated signing for non-OBS builds.

Review effort: Balanced

SYSTEMD_BOOT_EFI="%{buildroot}/usr/lib/systemd/boot/efi/systemd-boot%{efi_arch}.efi"
%define __pesign_client_cert systemd-boot-signer
%pesign -s -i $SYSTEMD_BOOT_EFI -o $SYSTEMD_BOOT_EFI.signed
mv $SYSTEMD_BOOT_EFI.signed $SYSTEMD_BOOT_EFI'''
Copilot AI balanced review requested due to automatic review settings November 11, 2026 00:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The signing package is absent from the component build configuration, requires an outdated systemd version, and attaches its upgrade scriptlet to the wrong package.

4 open issues

Review effort: Balanced

# This way we don't need to duplicate the build dependencies and logic
# that is provided by the main systemd package.

BuildRequires: version(%{source_rpm_name})%{_isa} = %{version}

install -m0644 -Dt %{buildroot}%{_licensedir}/%{name}/ %{_datadir}/licenses/systemd/LICENSE.LGPL2.1

%postun
Comment on lines +1 to +3
Name: systemd-boot
Version: 253~rc1
Release: %autorelease
Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The signing package requires unsigned-package version 258 while the tree provides 258.4, making the dependency unresolvable; it also lacks component registration and attaches its bootloader-update scriptlet to a package that is not shipped.

4 open issues
1 previously missed issue

In code that hasn't changed since last review

High severity Signing package version mismatches the unsigned RPM capability

specs/​s/​systemd-boot/​systemd-boot.spec:21

With the top-level Version: 258, this requires version(systemd-boot-unsigned)%{_isa} = 258, but specs/s/systemd/systemd.spec:598-599 provides that capability at version 258.4. These versions are not equal, so the signing package cannot resolve this dependency against the unsigned RPM produced by this tree. Set the signing spec's top-level Version to 258.4 in its authoritative source or overlay, then regenerate the rendered spec.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The signing package lacks azldev registration and a lock, and its upgrade hook targets a package that is never emitted, so signed bootloader upgrades will not update the ESP.

4 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The spec lacks component registration and a lock, preventing distro builds, and its update scriptlet targets the wrong package, leaving the ESP bootloader unchanged on upgrades.

4 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 11, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description = "Align the systemd-boot package version with the Azure Linux systemd build"
type = "spec-search-replace"
regex = '^Version:\s+.*$'
replacement = 'Version: 258.11'
Comment on lines +39 to +42
replacement = '''SYSTEMD_BOOT_EFI="%{buildroot}%{_prefix}/lib/systemd/boot/efi/systemd-boot%{efi_arch}.efi"
%define __pesign_client_cert systemd-boot-signer
%pesign -s -i $SYSTEMD_BOOT_EFI -o $SYSTEMD_BOOT_EFI.signed
mv $SYSTEMD_BOOT_EFI.signed $SYSTEMD_BOOT_EFI'''
Comment on lines +1 to +2
[components.systemd-boot]
spec = { type = "local", path = "systemd-boot.spec" }

install -m0644 -Dt %{buildroot}%{_licensedir}/%{name}/ %{_datadir}/licenses/systemd/LICENSE.LGPL2.1

%postun

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants