Consolidating our mkinitcpio hooks
Hi, Currently we have a lot of our mkinitcpio hooks in several packages which has never been consolidated. This makes it confusing where stuff belong and what is provided where, and I really want to consolidate everything. It would help keeping up the development of the hooks, patch everything and ultimately write a test suite for mkinitcpio. I also have long term plans on moving the default hooks from busybox to systemd, but this will happen at a later point. Initially I really want to move the hooks from `cryptsetup` and `systemd`: * encrypt and sd-encrypt from core/cryptsetup * systemd and udev from core/systemd We could maybe consider a few other hooks from [core] depending on peoples opinion? We are missing a good networking hook for systemd, and that should preferably be solved at some point. A list of possibly other relevant mkinitcpio stuff: Hook Package * btrfs btrfs-progs * dmraid dmraid * mdadm mdadm * mdadm_udev mdadm * lvm2 lvm2 * sd-lvm2 lvm2 * net mkinitcpio-nfs-utils * netconf mkinitcpio-netconf # Migration It's unclear to me how we should best move these hooks. We would need to merge them upstream into `mkinitcpio` first, then remove them from the packages. Is a news item is enough for this? Or do we want to include a couple of package constraints to ensure people are accidentally removing their hooks? What are peoples opinions? -- Morten Linderud PGP: 9C02FF419FECBE16
On 2023-04-25 16:31:29 (+0200), Morten Linderud wrote:
Initially I really want to move the hooks from `cryptsetup` and `systemd`:
* encrypt and sd-encrypt from core/cryptsetup * systemd and udev from core/systemd
We could maybe consider a few other hooks from [core] depending on peoples opinion? We are missing a good networking hook for systemd, and that should preferably be solved at some point.
A list of possibly other relevant mkinitcpio stuff:
Hook Package * btrfs btrfs-progs * dmraid dmraid * mdadm mdadm * mdadm_udev mdadm * lvm2 lvm2 * sd-lvm2 lvm2 * net mkinitcpio-nfs-utils * netconf mkinitcpio-netconf
There is also mkinitcpio-systemd-tool [1]. Although fairly unmaintained these days, it has a lot of features. Another user has created mkinitcpio-systemd-extras [2] which does similar things and looks less complicated (have not used it yet). It also features networking hooks (for systemd). Either might be something to consider to adapt from after moving the current systemd hooks.
# Migration
It's unclear to me how we should best move these hooks. We would need to merge them upstream into `mkinitcpio` first, then remove them from the packages.
Is a news item is enough for this? Or do we want to include a couple of package constraints to ensure people are accidentally removing their hooks?
I guess adding install notices might be enough. Or will the hooks be renamed?
What are peoples opinions?
This is very awesome and I am happy you are looking into this! <3 Best, David [1] https://github.com/random-archer/mkinitcpio-systemd-tool [2] https://github.com/wolegis/mkinitcpio-systemd-extras -- https://sleepmap.de
I've opened changes that moves the relevant hooks from cryptsetup and systemd to `mkinitcpio` proper. This also retains all the history of the files. # systemd hooks https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request... # cryptsetup hooks https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request... It's a bit unclear to me on what timeline we want these changes, but soon would be great :) -- Morten Linderud PGP: 9C02FF419FECBE16
Morten Linderud <foxboron@archlinux.org> on Sun, 2023/10/01 17:10:
I've opened changes that moves the relevant hooks from cryptsetup and systemd to `mkinitcpio` proper. This also retains all the history of the files.
# systemd hooks https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request...
# cryptsetup hooks https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request...
It's a bit unclear to me on what timeline we want these changes, but soon would be great :)
Soon sounds good. :) I still have to take a look, but if it is just moving around there should not be a problem. Only thing to care is to push all three packages in one go. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
Yo, We have merged a couple of hooks from packages with the intent to release mkinitcpio v38 this month. This is going to move several hooks from packages to mkinitcpio proper. The relevant hooks: * lvm2 * mdmadm * sd-encrypt and encrypt * systemd For the update itself I'm pondering if we should try to not break peoples systems by accident. So I have two proposals on how we should deal with this upgrade: # First proposal To ensure we are not breaking systems I'm wondering if adding a `mkinitcpio>=38` dependency to all the affected packages would work. This would be a temporary measure and removed after a month (or something). * systemd * mdadm * lvm2 * cryptsetup # Second proposal Alternatively we do not such thing, and release everything into the stable repositories at the same time. Then write a news entry warning about partial updates with the mentioned packages and `mkinitcpio`. Any preferences here? I'm wondering if adding a hard dependency in `systemd` on `mkinitcpio` might seem innocent would be a bit problematic? Relevant pull-requests: # lvm2 https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request... # mdadm https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request... # cryptsetup https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request... # systemd https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_request... -- Morten Linderud PGP: 9C02FF419FECBE16
On Sat, Feb 10, 2024 at 4:10 PM Morten Linderud <foxboron@archlinux.org> wrote:
# First proposal
To ensure we are not breaking systems I'm wondering if adding a `mkinitcpio>=38` dependency to all the affected packages would work. This would be a temporary measure and removed after a month (or something).
* systemd * mdadm * lvm2 * cryptsetup
I think conflicts would be more appropriate here. If you make the new systemd etc. conflict with the old mkinitcpio<38 and make the new mkinitcpio conflict with the old systemd etc., then this would ensure you can't get stuck without the hooks, but it won't force installation of mkinitcpio.
On Sat, Feb 10, 2024 at 04:19:13PM +0100, Jan Alexander Steffens (heftig) wrote:
On Sat, Feb 10, 2024 at 4:10 PM Morten Linderud <foxboron@archlinux.org> wrote:
# First proposal
To ensure we are not breaking systems I'm wondering if adding a `mkinitcpio>=38` dependency to all the affected packages would work. This would be a temporary measure and removed after a month (or something).
* systemd * mdadm * lvm2 * cryptsetup
I think conflicts would be more appropriate here. If you make the new systemd etc. conflict with the old mkinitcpio<38 and make the new mkinitcpio conflict with the old systemd etc., then this would ensure you can't get stuck without the hooks, but it won't force installation of mkinitcpio.
Love it, this is a much better idea then what I had in mind :) -- Morten Linderud PGP: 9C02FF419FECBE16
Yo, I have started preparing for the mkinitcpio v38 release. As Jan noted, adding a temporary conflict on the old `mkinitcpio` package to ensure less breakage is a good idea, so I've submitted draft MRs for all the packages that has their hooks moved. systemd: https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/merge_re... cryptsetup: https://gitlab.archlinux.org/archlinux/packaging/packages/cryptsetup/-/merge... lvm2: https://gitlab.archlinux.org/archlinux/packaging/packages/lvm2/-/merge_reque... mdadm: https:://gitlab.archlinux.org/archlinux/packaging/packages/mdadm/-/merge_requests/1 It's a bit unclear to me when we will do the release. But unless there is anything against it I'll deal with the packaging coordination upon to release. I'll also draft a news item before that happens :) -- Morten Linderud PGP: 9C02FF419FECBE16
Yo, mkinitcpio v38 has been released and I made a personal test setup with the changes and everything seems to work fine on my end. To make sure we are limiting breakage I propose the following news item to go along with the update. Please note I'll insert the relevant versions when the packages hit the testing repositories sometime tomorrow if there are no objections to the current plan. Draft here: https://md.archlinux.org/ixPJWhJXTj6Arlyq3wb9jA # News Item Subject: mkinitcpio hook migration and early microcode With the release of mkinitcpio v38 several hooks provided from Arch packages has moved to the mkinitcpio upstream. The moved hooks are systemd, udev, encrypt, sd-encrypt, lvm2 and mdadm_udev. To ensure we are not breaking the boot of users we have introduced temporary conflicts into the respective packages to prevent you from installing packages that are no longer compatible. The following packages needs to be installed together: * mkinitcpio 38-1 * systemd xxxx * lvm2 xxxx * mdadm xxxx * cryptsetup xxxx Please note the `mkinitcpio` flag `--microcode` has been deprecated in favour of a new `microcode` hook. This also allows you to drop the mircocode `initrd` lines from your boot configuration as they are now included in your initramfs. -- Morten Linderud PGP: 9C02FF419FECBE16
On Sat Mar 2, 2024 at 5:07 AM PST, Morten Linderud wrote:
Draft here: https://md.archlinux.org/ixPJWhJXTj6Arlyq3wb9jA
I added a few simple spelling/grammar fixes but otherwise it's nice and clear. Thank you!
On Sat, Mar 02, 2024 at 02:07:20PM +0100, Morten Linderud wrote:
Please note I'll insert the relevant versions when the packages hit the testing repositories sometime tomorrow if there are no objections to the current plan.
I've packaged up the changes to the testing repositories now :) -- Morten Linderud PGP: 9C02FF419FECBE16
participants (5)
-
Brett Cornwall
-
Christian Hesse
-
David Runge
-
Jan Alexander Steffens (heftig)
-
Morten Linderud