From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] initramfs-generator virtual package
Date: Sun, 31 Mar 2024 19:42:05 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49631@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
There is a new pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages virtual-initrd
https://github.com/void-linux/void-packages/pull/49631
initramfs-generator virtual package
This PR removes the need for using `ignorepkg` to switch away from dracut.
some implementation notes:
- booster was intentionally left out, as it would override dracut as the default initramfs-generator. this needs to be fixed in xbps by allowing for some kind of priority setting
- setting `virtualpkg=initramfs-generator:dracut` in an xbps config does work, but only if the config exists before installation (so it does not work when e.g. bootstrapping an empty root with `xbps-install -r ... base-system`)
- dracut and mkinitcpio were set to provide version `1_1` while tinyramfs provides `0_1` because zfsbootmenu is only compatible with the former two. this allows for a dependency on `initramfs-generator>=1` to prevent tinyramfs from providing it
#### Testing the changes
- I tested the changes in this PR: **YES**
A patch file from https://github.com/void-linux/void-packages/pull/49631.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-virtual-initrd-49631.patch --]
[-- Type: text/x-diff, Size: 9085 bytes --]
From 883b4113fbac52abcd556f890609630cbc869ccc Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 13:31:07 -0400
Subject: [PATCH 1/9] common/xbps-src/shutils/build_dependencies: allow pkgdep
for vpkgs
this allows virtualpkg dependencies to use >/< version specifiers
---
common/xbps-src/shutils/build_dependencies.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh
index 57ef45a7d5dd42..aa0479f1e7ba00 100644
--- a/common/xbps-src/shutils/build_dependencies.sh
+++ b/common/xbps-src/shutils/build_dependencies.sh
@@ -22,8 +22,11 @@ setup_pkg_depends() {
_rpkgname="${j%\?*}"
_depname="${j#*\?}"
if [[ ${_rpkgname} == virtual ]]; then
- _pkgname=$(xbps-uhelper getpkgname $_depname 2>/dev/null)
- [ -z "$_pkgname" ] && _pkgname="$_depname"
+ _pkgname="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)"
+ if [ -z "$_pkgname" ]; then
+ _pkgname="$($XBPS_UHELPER_CMD getpkgname ${_depname} 2>/dev/null)"
+ [ -z "$_pkgname" ] && _pkgname="${_depname}"
+ fi
if [ -s ${XBPS_DISTDIR}/etc/virtual ]; then
foo=$(grep -E "^${_pkgname}[[:blank:]]" ${XBPS_DISTDIR}/etc/virtual|cut -d ' ' -f2)
elif [ -s ${XBPS_DISTDIR}/etc/defaults.virtual ]; then
From 9b415c198a196dcde7f249c0cf5c96b4355c75ef Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:53:23 -0400
Subject: [PATCH 2/9] dracut: provide initramfs-generator
---
srcpkgs/dracut/template | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template
index 313e2d98719358..d8a72861539d29 100644
--- a/srcpkgs/dracut/template
+++ b/srcpkgs/dracut/template
@@ -1,7 +1,7 @@
# Template file for 'dracut'
pkgname=dracut
version=059
-revision=7
+revision=8
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
conf_files="/etc/dracut.conf"
@@ -19,6 +19,7 @@ alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/dracut/kernel-hook-postinst
initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/dracut/kernel-hook-postrm
"
+provides="initramfs-generator-1_1"
subpackages="dracut-network"
# Checks require distfiles come from a git repository
make_check=no
From 9f2e780f59d7557bb6271ad30c5c7b401e7f5b69 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:53:23 -0400
Subject: [PATCH 3/9] mkinitcpio: provide initramfs-generator
---
srcpkgs/mkinitcpio/template | 1 +
1 file changed, 1 insertion(+)
diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template
index edb7f7a035a1d1..b3d0c2bc9e7235 100644
--- a/srcpkgs/mkinitcpio/template
+++ b/srcpkgs/mkinitcpio/template
@@ -18,6 +18,7 @@ alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postinst
initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postrm
"
+provides="initramfs-generator-1_1"
replaces="mkinitcpio-udev>=0"
make_dirs="/etc/mkinitcpio.conf.d 0755 root root"
From 9db63465bca1b8baad84229fcac6ee737bac4022 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:53:24 -0400
Subject: [PATCH 4/9] tinyramfs: provide initramfs-generator
---
srcpkgs/tinyramfs/template | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/tinyramfs/template b/srcpkgs/tinyramfs/template
index 2e82a71f47704b..451f82045c109b 100644
--- a/srcpkgs/tinyramfs/template
+++ b/srcpkgs/tinyramfs/template
@@ -1,7 +1,7 @@
# Template file for 'tinyramfs'
pkgname=tinyramfs
version=0.1.0
-revision=1
+revision=2
build_style=gnu-makefile
depends="util-linux cpio binutils kmod"
short_desc="Tiny initramfs written in POSIX shell"
@@ -14,6 +14,7 @@ alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postinst
initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postrm
"
+provides="initramfs-generator-0_1"
make_check=no # checking requires qemu, locally this still fails
conf_files="/etc/tinyramfs/config"
From fd63e33f4f77b603c7ccc1637e76f67b2fb0a384 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:54:17 -0400
Subject: [PATCH 5/9] etc/defaults.virtual: default initramfs-generator is
dracut
---
etc/defaults.virtual | 1 +
1 file changed, 1 insertion(+)
diff --git a/etc/defaults.virtual b/etc/defaults.virtual
index dcd1d35ee51fed..138abf6a8c7d8d 100644
--- a/etc/defaults.virtual
+++ b/etc/defaults.virtual
@@ -40,3 +40,4 @@ libGL libglvnd
libEGL libglvnd
libGLES libglvnd
hunspell-en_GB hunspell-en_GB-all
+initramfs-generator dracut
From b670f91cd28cb577a4aba66406b2d82ffa03e678 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:54:08 -0400
Subject: [PATCH 6/9] linux-base: depend on initramfs-generator
---
srcpkgs/linux-base/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/linux-base/template b/srcpkgs/linux-base/template
index d04e7ad12bb69c..7acc4982424bfe 100644
--- a/srcpkgs/linux-base/template
+++ b/srcpkgs/linux-base/template
@@ -1,7 +1,7 @@
# Template file for 'linux-base'
pkgname=linux-base
version=2023.05.29
-revision=1
+revision=2
short_desc="Linux kernel base dependencies"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="Public Domain"
@@ -9,10 +9,10 @@ homepage="https://voidlinux.org/"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*)
- depends="linux-firmware-amd linux-firmware-intel linux-firmware-nvidia linux-firmware-network dracut"
+ depends="linux-firmware-amd linux-firmware-intel linux-firmware-nvidia linux-firmware-network virtual?initramfs-generator"
;;
ppc*|armv7l*|aarch64*)
- depends="linux-firmware-amd linux-firmware-nvidia linux-firmware-network dracut"
+ depends="linux-firmware-amd linux-firmware-nvidia linux-firmware-network virtual?initramfs-generator"
;;
esac
From 856a294a56d0364717b359d55053653b5323774b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:54:08 -0400
Subject: [PATCH 7/9] pinebookpro-base: depend on initramfs-generator
---
srcpkgs/pinebookpro-base/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/pinebookpro-base/template b/srcpkgs/pinebookpro-base/template
index 3bbfd7b3e8d257..ae179f19f60307 100644
--- a/srcpkgs/pinebookpro-base/template
+++ b/srcpkgs/pinebookpro-base/template
@@ -1,10 +1,10 @@
# Template file for 'pinebookpro-base'
pkgname=pinebookpro-base
version=0.5
-revision=1
+revision=2
archs="aarch64*"
build_style=meta
-depends="pinebookpro-kernel dracut pinebookpro-firmware pinebookpro-uboot
+depends="pinebookpro-kernel virtual?initramfs-generator pinebookpro-firmware pinebookpro-uboot
alsa-ucm-conf"
short_desc="Void Linux Pinebook Pro platform package"
maintainer="Cameron Nemo <cam@nohom.org>"
From 36070273ac5205f5ecdd24d5198f6cd6cfbfffed Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:54:09 -0400
Subject: [PATCH 8/9] rock64-base: depend on initramfs-generator
---
srcpkgs/rock64-base/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/rock64-base/template b/srcpkgs/rock64-base/template
index 6f885e79783f3e..6243798f244473 100644
--- a/srcpkgs/rock64-base/template
+++ b/srcpkgs/rock64-base/template
@@ -1,11 +1,11 @@
# Template file for 'rock64-base'
pkgname=rock64-base
version=0.1
-revision=1
+revision=2
archs="aarch64*"
build_style=meta
# Linux 5.10 used for USB3 support and stability
-depends="rock64-uboot u-boot-menu linux5.10 dracut"
+depends="rock64-uboot u-boot-menu linux5.10 virtual?initramfs-generator"
short_desc="Void Linux Rock64 platform package"
maintainer="Cameron Nemo <cnemo@tutanota.org>"
license="Public Domain"
From ba4b50df18f0f916aeb8a6201b56a5097761eabc Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 31 Mar 2024 11:54:09 -0400
Subject: [PATCH 9/9] zfsbootmenu: depend on initramfs-generator
---
srcpkgs/zfsbootmenu/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/zfsbootmenu/template b/srcpkgs/zfsbootmenu/template
index 85483ff201c07a..8de801766198df 100644
--- a/srcpkgs/zfsbootmenu/template
+++ b/srcpkgs/zfsbootmenu/template
@@ -4,7 +4,7 @@ version=2.3.0
revision=2
build_style=gnu-makefile
make_build_target="zbm-release"
-depends="dracut zfs kexec-tools fzf bash pigz mbuffer ncurses
+depends="virtual?initramfs-generator>=1 zfs kexec-tools fzf bash pigz mbuffer ncurses
perl-Sort-Versions perl-boolean perl-YAML-PP"
short_desc="ZFS bootloader for root-on-ZFS systems"
maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"
next reply other threads:[~2024-03-31 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-31 17:42 classabbyamp [this message]
2024-03-31 17:46 ` [PR PATCH] [Updated] " classabbyamp
2024-03-31 18:51 ` dkwo
2024-03-31 19:12 ` classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49631@inbox.vuxu.org \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).