mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 08:56:58 +02:00
Merge pull request #114 from marineam/update-bootengine
Update bootengine
This commit is contained in:
commit
e1484f3ad0
@ -2,7 +2,7 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI="4"
|
EAPI="4"
|
||||||
CROS_WORKON_COMMIT="54c9130e08fcae8918d88b56a01b3e3d49d08531"
|
CROS_WORKON_COMMIT="0223391810a5553c9d2e394e5e838551d23b61a9"
|
||||||
CROS_WORKON_PROJECT="coreos/bootengine"
|
CROS_WORKON_PROJECT="coreos/bootengine"
|
||||||
CROS_WORKON_LOCALNAME="bootengine"
|
CROS_WORKON_LOCALNAME="bootengine"
|
||||||
CROS_WORKON_OUTOFTREE_BUILD=1
|
CROS_WORKON_OUTOFTREE_BUILD=1
|
||||||
@ -18,38 +18,36 @@ SLOT="0"
|
|||||||
KEYWORDS="amd64 x86"
|
KEYWORDS="amd64 x86"
|
||||||
|
|
||||||
DEPEND="
|
DEPEND="
|
||||||
|
app-arch/gzip
|
||||||
|
app-shells/bash
|
||||||
|
sys-apps/coreutils
|
||||||
|
sys-apps/findutils
|
||||||
|
sys-apps/grep
|
||||||
|
sys-apps/kbd
|
||||||
sys-apps/kexec-tools
|
sys-apps/kexec-tools
|
||||||
sys-kernel/dracut"
|
sys-apps/less
|
||||||
|
sys-apps/sed
|
||||||
|
sys-apps/systemd
|
||||||
|
sys-apps/systemd-sysv-utils
|
||||||
|
sys-apps/util-linux
|
||||||
|
sys-kernel/dracut
|
||||||
|
virtual/udev
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
insinto /usr/lib/dracut/modules.d/
|
insinto /usr/lib/dracut/modules.d/
|
||||||
doins -r ${S}/dracut/80gptprio $modules_dir
|
doins -r dracut/80gptprio
|
||||||
|
dosbin update-bootengine
|
||||||
}
|
}
|
||||||
|
|
||||||
# We are bad, we want to get around the sandbox. So do the creation of the
|
# We are bad, we want to get around the sandbox. So do the creation of the
|
||||||
# cpio image in pkg_postinst() where we are free to mount filesystems, chroot,
|
# cpio image in pkg_postinst() where we are free to mount filesystems, chroot,
|
||||||
# and other fun stuff.
|
# and other fun stuff.
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
mount -t proc proc ${ROOT}/proc || die
|
if [[ -n "${ROOT}" ]]; then
|
||||||
mount --bind /dev ${ROOT}/dev || die
|
${ROOT}/usr/sbin/update-bootengine -m -c ${ROOT} || die
|
||||||
mount --bind /sys ${ROOT}/sys || die
|
else
|
||||||
mount --bind /run ${ROOT}/run || die
|
update-bootengine || die
|
||||||
|
fi
|
||||||
# The keyboard tables are all still being included, which we need to
|
|
||||||
# figure out how to remove someday.
|
|
||||||
chroot ${ROOT} dracut --force --no-kernel --nofscks \
|
|
||||||
--fstab --no-compress /tmp/bootengine.cpio || die
|
|
||||||
|
|
||||||
umount ${ROOT}/proc || die
|
|
||||||
umount ${ROOT}/dev || die
|
|
||||||
umount ${ROOT}/sys || die
|
|
||||||
umount ${ROOT}/run || die
|
|
||||||
|
|
||||||
# as we are not in src_install() insinto and doins do not work here, so
|
|
||||||
# manually copy the file around
|
|
||||||
cpio=${ROOT}/tmp/bootengine.cpio
|
|
||||||
chmod 644 ${cpio} || die
|
|
||||||
mkdir -p ${ROOT}/usr/share/bootengine/ || die
|
|
||||||
cp ${cpio} ${ROOT}/usr/share/bootengine/ || die
|
|
||||||
rm ${cpio} || die
|
|
||||||
}
|
}
|
||||||
|
@ -17,38 +17,36 @@ SLOT="0"
|
|||||||
KEYWORDS="~amd64 ~x86"
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
DEPEND="
|
DEPEND="
|
||||||
|
app-arch/gzip
|
||||||
|
app-shells/bash
|
||||||
|
sys-apps/coreutils
|
||||||
|
sys-apps/findutils
|
||||||
|
sys-apps/grep
|
||||||
|
sys-apps/kbd
|
||||||
sys-apps/kexec-tools
|
sys-apps/kexec-tools
|
||||||
sys-kernel/dracut"
|
sys-apps/less
|
||||||
|
sys-apps/sed
|
||||||
|
sys-apps/systemd
|
||||||
|
sys-apps/systemd-sysv-utils
|
||||||
|
sys-apps/util-linux
|
||||||
|
sys-kernel/dracut
|
||||||
|
virtual/udev
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
insinto /usr/lib/dracut/modules.d/
|
insinto /usr/lib/dracut/modules.d/
|
||||||
doins -r ${S}/dracut/80gptprio $modules_dir
|
doins -r dracut/80gptprio
|
||||||
|
dosbin update-bootengine
|
||||||
}
|
}
|
||||||
|
|
||||||
# We are bad, we want to get around the sandbox. So do the creation of the
|
# We are bad, we want to get around the sandbox. So do the creation of the
|
||||||
# cpio image in pkg_postinst() where we are free to mount filesystems, chroot,
|
# cpio image in pkg_postinst() where we are free to mount filesystems, chroot,
|
||||||
# and other fun stuff.
|
# and other fun stuff.
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
mount -t proc proc ${ROOT}/proc || die
|
if [[ -n "${ROOT}" ]]; then
|
||||||
mount --rbind /dev ${ROOT}/dev || die
|
${ROOT}/usr/sbin/update-bootengine -m -c ${ROOT} || die
|
||||||
mount --rbind /sys ${ROOT}/sys || die
|
else
|
||||||
mount --rbind /run ${ROOT}/run || die
|
update-bootengine || die
|
||||||
|
fi
|
||||||
# The keyboard tables are all still being included, which we need to
|
|
||||||
# figure out how to remove someday.
|
|
||||||
chroot ${ROOT} dracut --force --no-kernel --nofscks \
|
|
||||||
--fstab --no-compress /tmp/bootengine.cpio || die
|
|
||||||
|
|
||||||
umount --recursive ${ROOT}/proc || die
|
|
||||||
umount --recursive ${ROOT}/dev || die
|
|
||||||
umount --recursive ${ROOT}/sys || die
|
|
||||||
umount --recursive ${ROOT}/run || die
|
|
||||||
|
|
||||||
# as we are not in src_install() insinto and doins do not work here, so
|
|
||||||
# manually copy the file around
|
|
||||||
cpio=${ROOT}/tmp/bootengine.cpio
|
|
||||||
chmod 644 ${cpio} || die
|
|
||||||
mkdir -p ${ROOT}/usr/share/bootengine/ || die
|
|
||||||
cp ${cpio} ${ROOT}/usr/share/bootengine/ || die
|
|
||||||
rm ${cpio} || die
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user