Bug 2189633 - Review Request: mkosi-initrd - Generator for initrd images using distro packages
Summary: Review Request: mkosi-initrd - Generator for initrd images using distro packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/systemd/mkosi-initrd
Whiteboard:
Depends On:
Blocks: 2203221
TreeView+ depends on / blocked
 
Reported: 2023-04-25 18:24 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2023-05-17 01:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-17 01:31:15 UTC
Type: ---
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 5849328 to 5897235 (3.33 KB, patch)
2023-05-08 19:28 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 5897235 to 5897335 (872 bytes, patch)
2023-05-08 20:13 UTC, Fedora Review Service
no flags Details | Diff

Description Zbigniew Jędrzejewski-Szmek 2023-04-25 18:24:25 UTC
Spec URL: https://in.waw.pl/~zbyszek/fedora/mkosi-initrd.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/mkosi-initrd-0.20230126gc43f441-3.fc38.src.rpm
Description:
This is a generator for initrd images (cpio archives compressed with zstd).                                                      
The initrd is created by downloading rpms and installing them into a temporary                                                   
location. This is different than the usual approach, where files from the host                                                   
are used. In the initrd, only systemd is used, and no special runtime is used.                                                   
This means that only things which are supported by normal packages will work.                                                    
                                                                                                                                 
The package provides a kernel-install plugin that will automatically create an                                                   
initrd during kernel package installation. This initrd will then be picked up by                                                 
kernel-install and used in the Boot Loader Specification entry.                                                                  

Fedora Account System Username: zbyszek

Comment 1 Neal Gompa 2023-04-25 18:39:49 UTC
Taking this for review.

Comment 2 Neal Gompa 2023-05-04 23:45:21 UTC
Initial spec review:

> %global forgeurl https://github.com/systemd/mkosi-initrd/
> %global distprefix %nil
> %forgemeta

Please don't use the forge macros, as they are unmaintained and only exist because Go and Font macros require them: https://pagure.io/packaging-committee/pull-request/1270

> %global pkgroot /usr/lib/mkosi-initrd

Three things:

1. Why is this in the middle of the spec?
2. Why isn't this "%{_prefix}/lib"?
3. Why is this in /usr/lib and not /usr/libexec?

> /usr/lib/kernel/install.d/50-mkosi-initrd.install

Please use "%{_prefix}/lib"

> %files
> %doc README.md
> %doc docs/fedora.md

License file is missing.

Comment 3 Zbigniew Jędrzejewski-Szmek 2023-05-06 16:23:11 UTC
(In reply to Neal Gompa from comment #2)
> Please don't use the forge macros
Done.

> > %global pkgroot /usr/lib/mkosi-initrd
> 1. Why is this in the middle of the spec?
It's defined right above the first use. It's just a helper variable to avoid
repeating the same thing a few times.

> 2. Why isn't this "%{_prefix}/lib"?
> 
> > /usr/lib/kernel/install.d/50-mkosi-initrd.install
> 
> Please use "%{_prefix}/lib"
I changed it to use %{_prefix}. (Though I'm not convinced that this
change makes sense. kernel-install doesn't support relocation. Various
paths for plugins cannot be changed easily, they are documented and fixed
in the code. So if in fact anyone tried to use a different %_prefix, this
package wouldn't work at all. I know that using %_prefix is the received
wisdom, but really, for many cases it doesn't do anything except obfuscate.)

> 3. Why is this in /usr/lib and not /usr/libexec?
The package is mostly some config files, so /usr/lib/<package> seems
appropriate. This also follows the general systemd style.

> License file is missing.
Oops. I added it now upstream.

Spec URL: https://in.waw.pl/~zbyszek/fedora/mkosi-initrd.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/mkosi-initrd-0.20230506g6ba68f1-1.fc39.src.rpm

Comment 4 Neal Gompa 2023-05-06 21:11:57 UTC
You still have the forge macros:

> %global forgeurl https://github.com/systemd/mkosi-initrd/
> %global distprefix %nil
> %forgemeta

Comment 5 Zbigniew Jędrzejewski-Szmek 2023-05-07 16:04:48 UTC
Updated again.

Comment 6 Neal Gompa 2023-05-07 21:40:56 UTC
> Requires:       systemd

Do we actually require systemd on the host itself to produce the images?

> Initrds created in this way support some common machine types, but no more:
> - plain partitions
> - LVM2
> - LUKS

What about Btrfs?

Comment 7 Zbigniew Jędrzejewski-Szmek 2023-05-08 10:03:17 UTC
(In reply to Neal Gompa from comment #6)
> > Requires:       systemd
> 
> Do we actually require systemd on the host itself to produce the images?

We don't. Though this is a bit theoretical atm, because kernel-modules-core
requires kernel-core which pulls in dracut and systemd. Those dependencies don't
make sense and hopefully we can drop them one day.

I dropped Required: systemd, kmod now.

> > Initrds created in this way support some common machine types, but no more:
> > - plain partitions
> What about Btrfs?

Btrfs and generally any other fs type supported by the kernel should work,
as long as the underlying block storage is supported.

Comment 8 Fedora Review Service 2023-05-08 19:28:13 UTC
Created attachment 1963345 [details]
The .spec file difference from Copr build 5849328 to 5897235

Comment 9 Fedora Review Service 2023-05-08 19:28:16 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5897235
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2189633-mkosi-initrd/fedora-rawhide-x86_64/05897235-mkosi-initrd/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 10 Neal Gompa 2023-05-08 19:39:32 UTC
> Version:        0.20230506g%{shortcommit}

This is not valid for snapshot version: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

Suggestion: "0~%{commitdate}g%{shortcommit}"

Comment 12 Fedora Review Service 2023-05-08 20:13:13 UTC
Created attachment 1963400 [details]
The .spec file difference from Copr build 5897235 to 5897335

Comment 13 Fedora Review Service 2023-05-08 20:13:15 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5897335
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2189633-mkosi-initrd/fedora-rawhide-x86_64/05897335-mkosi-initrd/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 14 Neal Gompa 2023-05-08 21:03:06 UTC
Package review notes:

* Package is named appropriately
* Package builds and installs
* Package licensing is correctly identified and license files are installed
* No serious issues from rpmlint

Nit: You may want to consider "Supplements: mkosi" since it no longer drags in a bunch of stuff.

PACKAGE APPROVED.

Comment 15 Fedora Admin user for bugzilla script actions 2023-05-08 21:51:18 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/mkosi-initrd

Comment 16 Zbigniew Jędrzejewski-Szmek 2023-05-08 22:00:29 UTC
Thanks!

> You may want to consider "Supplements: mkosi" since it no longer drags in a bunch of stuff.

I'm not sure if I want to do this yet. The package has kernel-install plugin, which
shouldn't do anything without configuration, but bugs do happen. This is going to
remain very niche at least for a while, so I think it's fine if users have to install
explicitly.

Comment 17 Fedora Update System 2023-05-08 22:10:13 UTC
FEDORA-2023-244b6a473e has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-244b6a473e

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

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

Comment 19 Fedora Update System 2023-05-17 01:31:15 UTC
FEDORA-2023-244b6a473e has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.