void-packages/srcpkgs/dracut/template
Đoàn Trần Công Danh 0a0b0a1f30 dracut: patch for better dash compatibility
Upstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1663651

Steps to reproduce:
- Full disk encryption,
- Luks key is encrypted with gpg
- luks key is embedded in initramfs
- cmdline is: rd.luks.key=/etc/luks/key.gpg:/
- add_dracutmodules+=" dash "
- omit_dracutmodues+=" bash "
- build dracut

Expectation:
- the system should boot with new initramfs

Actual:
- The system failed to pick the key in initramfs
- replace dash by bash and system can pick up the correct key

Root Cause:
There's some bashism inside runtime script,
which uses == instead of = to compare.

While we're at it, also fix template xlint
2019-01-06 17:56:52 -02:00

59 lines
1.7 KiB
Bash

# Template file for 'dracut'
pkgname=dracut
version=048
revision=3
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
conf_files="/etc/dracut.conf"
hostmakedepends="asciidoc pkg-config"
makedepends="libkmod-devel"
depends="bash coreutils cpio psmisc"
short_desc="Low-level tool for generating an initramfs/initrd image"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html"
distfiles="${KERNEL_SITE}/utils/boot/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=0750d6b71b7f95d8dfa338404372bfeb0e5c30e7fe2a21ba55c6dbf3dbcf6a79
make_dirs="
/etc/dracut.conf.d 0755 root root
/usr/lib/dracut/dracut.conf.d 0755 root root"
case "$XBPS_TARGET_MACHINE" in
*-musl) # Add musl-fts implementation
makedepends+=" musl-fts-devel"
;;
esac
do_build() {
case "$XBPS_TARGET_MACHINE" in
*-musl) make ${makejobs} LDLIBS="${XBPS_CROSS_BASE}/usr/lib/libfts.a";;
esac
}
do_check() {
# Requires the distfile to be a git repository
:
}
post_install() {
# kernel hooks.
vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-dracut
vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-dracut
# We don't need the systemd stuff.
rm -rf ${DESTDIR}/usr/lib/dracut/modules.d/*systemd*
rm -f ${DESTDIR}/usr/share/man/man8/*.service.*
rm -rf ${DESTDIR}/usr/lib/kernel
}
dracut-network_package() {
depends="dhclient dracut-${version}_${revision}"
short_desc+=" - network modules"
noarch=yes
pkg_install() {
for f in 40network 90livenet 95fcoe 95iscsi \
95nbd 95nfs 95zfcp 95znet; do
vmove usr/lib/dracut/modules.d/${f}
done
}
}