mkinitcpio: remove dependency on -lvm2 from -encrypt subpackage

encrypt hook does not depend on lvm2 nor lvm2 hook. It just needs
11-dm-initramfs.rules, so I moved to the base package.
This commit is contained in:
Jakub Jirutka 2021-07-09 18:38:43 +02:00 committed by Érico Nogueira Rolim
parent 014b41deed
commit c5672bee4d
1 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'mkinitcpio' # Template file for 'mkinitcpio'
pkgname=mkinitcpio pkgname=mkinitcpio
version=30 version=30
revision=1 revision=2
build_style=gnu-makefile build_style=gnu-makefile
hostmakedepends="asciidoc" hostmakedepends="asciidoc"
depends="busybox-static bsdtar bash" depends="busybox-static bsdtar bash"
@ -24,6 +24,9 @@ post_install() {
vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev
vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev
# Install udev rule used by both lvm2 and encrypt hook
vinstall ${FILESDIR}/11-dm-initramfs.rules 644 usr/lib/initcpio/udev
# Remove unneeded systemd bits # Remove unneeded systemd bits
rm -rf ${DESTDIR}/usr/lib/kernel rm -rf ${DESTDIR}/usr/lib/kernel
rm -rf ${DESTDIR}/usr/lib/systemd rm -rf ${DESTDIR}/usr/lib/systemd
@ -45,15 +48,12 @@ mkinitcpio-lvm2_package() {
pkg_install() { pkg_install() {
vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2 vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2
vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2 vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2
for RULES in ${FILESDIR}/*.rules; do vinstall ${FILESDIR}/69-dm-lvm-metad.rules 644 usr/lib/initcpio/udev
vinstall $RULES 644 usr/lib/initcpio/udev $(basename $RULES)
done
} }
} }
mkinitcpio-encrypt_package() { mkinitcpio-encrypt_package() {
depends="${sourcepkg}>=${version}_${revision} depends="${sourcepkg}>=${version}_${revision} cryptsetup"
${sourcepkg}-lvm2>=${version}_${revision} cryptsetup"
short_desc+=" - encrypt support" short_desc+=" - encrypt support"
pkg_install() { pkg_install() {
vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt