Bug 2230575

Summary: Don't enable services/timers statically
Product: [Fedora] Fedora Reporter: Christian Glombek <cglombek>
Component: grub2Assignee: Nicolas Frayer <nfrayer>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: fmartine, hdegoede, lkundrak, miabbott, mlewando, nfrayer, pjones, rharwood, saypaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: grub2-2.06-100.fc38 grub2-2.06-100.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-18 18:07:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Glombek 2023-08-09 16:32:44 UTC
Currently in Fedora, the following systemd units are enabled statically by shipping symlinks in the RPM.

- grub-boot-indeterminate.service
- grub-boot-success.timer
- grub-systemd-integration.service

The only way to disable these units is to delete the symlinks manually.

This is problematic in Fedora IoT, where grub-boot-success.timer is
not supposed to be enabled, see https://github.com/fedora-iot/greenboot/issues/108


I propose the following (I'll open the PRs):
- Add an `[Install]` section to these systemd units so that they can be enabled dynamically via presets or manually via systemctl.
- Add presets to enable these services
- Change the grub specfile to not ship the symlinks but instead use the usual systemd macros



Reproducible: Always

Comment 1 Micah Abbott 2023-08-09 20:20:24 UTC
*** Bug 2229703 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Release Engineering 2023-08-16 08:14:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 3 Christian Glombek 2023-08-31 06:21:29 UTC
Please review https://github.com/rhboot/grub2/pull/131

Comment 4 Nicolas Frayer 2023-08-31 19:08:00 UTC
Reviewed and merged, thanks.

Comment 5 Christian Glombek 2023-09-01 08:21:06 UTC
Thanks! The specfile has to be updated accordingly, I've put the changes up at https://src.fedoraproject.org/rpms/grub2/pull-request/26

Comment 6 Nicolas Frayer 2023-09-12 21:47:32 UTC
Hi Christian, should https://github.com/rhboot/grub2/pull/131 and https://src.fedoraproject.org/rpms/grub2/pull-request/26 both be in a single commit in the dist-git ?

Comment 7 Christian Glombek 2023-09-13 18:57:28 UTC
Yea, right now https://github.com/rhboot/grub2/pull/131 would have to be carried as a patchfile in the rpm when merging https://src.fedoraproject.org/rpms/grub2/pull-request/26

Ideally a new grub2 release would be cut, and https://src.fedoraproject.org/rpms/grub2/pull-request/26 would then be included for the new version.

Comment 8 Fedora Update System 2023-09-15 15:04:23 UTC
FEDORA-2023-75934fce38 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-75934fce38

Comment 9 Fedora Update System 2023-09-15 15:04:27 UTC
FEDORA-2023-8b959d8040 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8b959d8040

Comment 10 Fedora Update System 2023-09-16 01:48:27 UTC
FEDORA-2023-75934fce38 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-75934fce38`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-75934fce38

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-09-16 03:17:52 UTC
FEDORA-2023-8b959d8040 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8b959d8040`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8b959d8040

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-09-18 18:07:28 UTC
FEDORA-2023-8b959d8040 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2023-09-25 01:42:29 UTC
FEDORA-2023-75934fce38 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Hans de Goede 2023-11-05 19:37:10 UTC
Note the fixes for this are causing several issues for Fedora Workstation and except for the timer the static packaged symlinks are actually the proper / recommended solution and should have never been removed. See bug 2247635 for details.