[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
commit: 4c27efd95d9164b3e6ff433c06cd767885d27b13 Author: Andrew Ammerlaan gentoo org> AuthorDate: Tue Aug 6 07:58:28 2024 + Commit: Andrew Ammerlaan gentoo org> CommitDate: Tue Aug 6 07:58:28 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c27efd9 sys-apps/kexec-tools: drop +x on files/kexec-auto-load Signed-off-by: Andrew Ammerlaan gentoo.org> sys-apps/kexec-tools/files/kexec-auto-load | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys-apps/kexec-tools/files/kexec-auto-load b/sys-apps/kexec-tools/files/kexec-auto-load old mode 100755 new mode 100644
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/, sys-apps/kexec-tools/
commit: 8688bdf7c23696ebe3306470885d9ac187d12254 Author: David Seifert gentoo org> AuthorDate: Thu May 13 20:24:12 2021 + Commit: David Seifert gentoo org> CommitDate: Thu May 13 20:24:12 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8688bdf7 sys-apps/kexec-tools: Remove old 2.0.20-r3 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert gentoo.org> sys-apps/kexec-tools/Manifest | 1 - ...ec-tools-2.0.20-build-multiboot2-for-i386.patch | 68 --- ...0-remove-duplicated-variable-declarations.patch | 99 sys-apps/kexec-tools/kexec-tools-2.0.20-r3.ebuild | 126 - 4 files changed, 294 deletions(-) diff --git a/sys-apps/kexec-tools/Manifest b/sys-apps/kexec-tools/Manifest index 5f43db3899a..cb80e9aa09d 100644 --- a/sys-apps/kexec-tools/Manifest +++ b/sys-apps/kexec-tools/Manifest @@ -1,3 +1,2 @@ -DIST kexec-tools-2.0.20.tar.xz 297476 BLAKE2B 7e29e7f7d85296dd3e614c45f14c27eca74ce4426d5de2d20387d89f2f63afed318d6157cc4001849a04bb83505bbae87c43d34683ebaf9a70f5f29e3979ade3 SHA512 3112b6202c1030705c53e3f65a2b58aec14d65333a35aad681d48b9f2bd1c51a2e05c985a1e5e867ab02f8a9c97708483d9d225619db7c6993676f1a242e2d99 DIST kexec-tools-2.0.21.tar.xz 303300 BLAKE2B d5b7bddeafdcbfd2b07dab6e4f167fcb61ccf2ec487f1835ac552a4596d22a94a7297d0eb769913f84eddc564ba4d9ae0c9d4c76994d0e3670fe168f377ebc77 SHA512 f487d2e243c2c4f29fbc9da7d06806f65210f717904655fc84d8d162b9c4614c3dd62e1bb47104a79f0dc2af04e462baf764fb309b5d7e6d287264cb48fd2a3e DIST kexec-tools-2.0.22.tar.xz 303564 BLAKE2B 977c741eabf9b6b882550713ba59b18289b4f997fb382e96338efce6d04a9390fea952fc46ca72fd0a0b782261841ab2002da84b1819f955e63996eac900b0f7 SHA512 7580860f272eee5af52139809f12961e5a5d3a65f4e191183ca9c845410425d25818945ac14ed04a60e6ce474dc2656fc6a14041177b0bf703f450820c7d6aba diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.20-build-multiboot2-for-i386.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.20-build-multiboot2-for-i386.patch deleted file mode 100644 index 8f63ddbe3ba..000 --- a/sys-apps/kexec-tools/files/kexec-tools-2.0.20-build-multiboot2-for-i386.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 2c9f26ed20a791a7df0182ba82e93abb52f5a615 Mon Sep 17 00:00:00 2001 -From: Chris Packham -Date: Mon, 18 Nov 2019 12:52:15 +1300 -Subject: kexec: build multiboot2 for i386 - -This addresses the following compilation issues when building for i386. - - kexec/arch/i386/kexec-x86.c:39:22: error: 'multiboot2_x86_probe' undeclared here (not in a function); did you mean 'multiboot_x86_probe'? - { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load, - ^~~~ - multiboot_x86_probe - kexec/arch/i386/kexec-x86.c:39:44: error: 'multiboot2_x86_load' undeclared here (not in a function); did you mean 'multiboot_x86_load'? - { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load, - ^~~ - multiboot_x86_load - kexec/arch/i386/kexec-x86.c:40:4: error: 'multiboot2_x86_usage' undeclared here (not in a function); did you mean 'multiboot_x86_usage'? - multiboot2_x86_usage }, - ^~~~ - multiboot_x86_usage - make: *** [Makefile:114: kexec/arch/i386/kexec-x86.o] Error 1 - make: *** Waiting for unfinished jobs - -Signed-off-by: Chris Packham -Signed-off-by: Simon Horman - kexec/arch/i386/Makefile| 2 +- - kexec/arch/i386/kexec-x86.h | 5 + - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile -index 105cefd..f486103 100644 a/kexec/arch/i386/Makefile -+++ b/kexec/arch/i386/Makefile -@@ -7,6 +7,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-elf-x86.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-elf-rel-x86.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-bzImage.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-multiboot-x86.c -+i386_KEXEC_SRCS += kexec/arch/i386/kexec-mb2-x86.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c - i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c -@@ -14,7 +15,6 @@ i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c - - dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \ - kexec/arch/i386/crashdump-x86.h \ -- kexec/arch/i386/kexec-mb2-x86.c \ - kexec/arch/i386/kexec-x86.h \ - kexec/arch/i386/x86-linux-setup.h \ - kexec/arch/i386/include/arch/options.h -diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h -index 1b58c3b..0f941df 100644 a/kexec/arch/i386/kexec-x86.h -+++ b/kexec/arch/i386/kexec-x86.h -@@ -60,6 +60,11 @@ int multiboot_x86_load(int argc, char **argv, co
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/, sys-apps/kexec-tools/
commit: 580d5de483ea67cd31407d8ae7cf64e95538b5a6 Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Aug 10 09:12:52 2020 + Commit: Thomas Deutschmann gentoo org> CommitDate: Mon Aug 10 09:13:19 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=580d5de4 sys-apps/kexec-tools: drop old Package-Manager: Portage-3.0.2, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann gentoo.org> sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 | 188 -- sys-apps/kexec-tools/kexec-tools-2.0.20-r1.ebuild | 110 - 2 files changed, 298 deletions(-) diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 deleted file mode 100644 index 167b792de85..000 --- a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 +++ /dev/null @@ -1,188 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# Set up some defaults. -: "${LOAD_DURING_SHUTDOWN:=yes}" -: "${BOOTPART:=/boot}" -: "${DONT_MOUNT_BOOT:=no}" - -depend() { - need localmount -} - -auto_prefix_bootpath() { - # Only auto-add prefix to relative paths. - case $1 in - */*) echo "$1";; - *) echo "${BOOTPART}/$1" ;; - esac -} - -get_genkernel_arch() { - case $1 in - x86_64) echo "amd64" ;; - i[3456]86) echo "x86" ;; - *) echo "$1" ;; - esac -} - -image_path() { - # Do no sanity checking if the user has set a value. - if [ -n "${KNAME}" ]; then - auto_prefix_bootpath "${KNAME}" - return - fi - - local x kver="$(uname -r)" karch="$(uname -m)" - local gkarch="$(get_genkernel_arch $karch)" - for x in \ - "bzImage" \ - "vmlinux" \ - "vmlinuz" \ - "bzImage-${kver}" \ - "vmlinux-${kver}" \ - "vmlinuz-${kver}" \ - "kernel-genkernel-${karch}-${kver}" \ - "kernel-genkernel-${gkarch}-${kver}" \ - "kernel-${kver}" \ - "kernel-${karch}"; do - if [ -e "${BOOTPART}/${x}" ]; then - echo "${BOOTPART}/${x}" - return - fi - done - - return 1 -} - -initrd_path() { - # Do no sanity checking if the user has set a value. - if [ -n "${INITRD}" ]; then - auto_prefix_bootpath "${INITRD}" - return 0 - fi - - local x kver="$(uname -r)" karch="$(uname -m)" - local gkarch="$(get_genkernel_arch $karch)" - for x in \ - "initrd" \ - "initrd.img-${kver}" \ - "initrd-${kver}.img" \ - "initrd-${kver}" \ - "initramfs-${kver}.img" \ - "initramfs-genkernel-${karch}-${kver}" \ - "initramfs-genkernel-${gkarch}-${kver}"; do - if [ -e "${BOOTPART}/${x}" ]; then - echo "${BOOTPART}/${x}" - return 0 - fi - done - - return 1 -} - -mount_boot() { - [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1 - mountinfo -q "${BOOTPART}" && return 1 - - ebegin "Mounting ${BOOTPART}" - mount "${BOOTPART}" - eend $? -} - -load_image() { - if [ "${KNAME}" = "-" ]; then - ebegin "Disabling kexec" - kexec -u - eend $? - return # eend preserved $? for us. - fi - - local img initrd="$(initrd_path)" mounted=false kparamopt initrdopt - - if ! img="$(image_path)"; then - if mount_boot; then - if img="$(image_path)"; then - mounted=true - initrd="$(initrd_path)" - else - eerror "No kernel image found in ${BOOTPART}!" - umount "${BOOTPART}" - return 1 - fi - else - eerror "No kernel image found in ${BOOTPART}!" - return 1 - fi - fi - - if [ -z "${ROOTPART}" ]; then - ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")" - fi - - if [ -z "${KPARAM}" ]; then - kparamopt="--reuse-cmdline" - fi - - if [ -n "${initrd}" ]; then - initrdopt="--initrd=${initrd}" - fi - - local msg - [ -n "${initrd}" ] && \ - msg=" (with ${initrd})" - ebegin "Using kernel image ${img}${msg} for kexec" - - kexec ${KEXEC_OPT_ARGS} ${kparamopt} \ - -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt} - local ret=$? - - ${mounted} && umount "${BOOTPART}" - eend ${ret} -
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
commit: 1f1b89399e462f1798a5fa990c73fbaec5a4050e Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Aug 4 22:03:31 2020 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Aug 4 23:02:39 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f1b8939 sys-apps/kexec-tools: runscript: add support for genkernel's default kernel/initramfs symlink Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann gentoo.org> sys-apps/kexec-tools/files/kexec-r2.init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys-apps/kexec-tools/files/kexec-r2.init b/sys-apps/kexec-tools/files/kexec-r2.init index ea6b790d324..2a3b63ad526 100644 --- a/sys-apps/kexec-tools/files/kexec-r2.init +++ b/sys-apps/kexec-tools/files/kexec-r2.init @@ -40,6 +40,7 @@ image_path() { "bzImage" \ "vmlinux" \ "vmlinuz" \ + "kernel" \ "bzImage-${kver}" \ "vmlinux-${kver}" \ "vmlinuz-${kver}" \ @@ -67,6 +68,7 @@ initrd_path() { local gkarch="$(get_genkernel_arch $karch)" for x in \ "initrd" \ + "initramfs" \ "initrd.img-${kver}" \ "initrd-${kver}.img" \ "initrd-${kver}" \
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
commit: 4860fce5434f46d90e913ff10515a9a256fc6c6a Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Aug 4 22:25:12 2020 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Aug 4 23:02:40 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4860fce5 sys-apps/kexec-tools: runscript: do not append root= if --reuse-cmdline is used Always appending root= can cause problems when auto-detection is used when real system and initramfs don't agree on naming (i.e. when current system detects root as /dev/dm-4 but on next boot, initramfs will detect root as /dev/dm-5). Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann gentoo.org> sys-apps/kexec-tools/files/kexec-r2.init | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys-apps/kexec-tools/files/kexec-r2.init b/sys-apps/kexec-tools/files/kexec-r2.init index 2a3b63ad526..0578f51aea1 100644 --- a/sys-apps/kexec-tools/files/kexec-r2.init +++ b/sys-apps/kexec-tools/files/kexec-r2.init @@ -119,12 +119,22 @@ load_image() { fi fi + local is_rootpart_autodetected=no if [ -z "${ROOTPART}" ]; then ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")" + is_rootpart_autodetected=yes fi + local is_reusing_cmdline=no if [ -z "${KPARAM}" ]; then kparamopt="--reuse-cmdline" + is_reusing_cmdline=yes + fi + + if ! yesno "${is_rootpart_autodetected}" || ! yesno "${is_reusing_cmdline}"; then + # Only append root when explicit set in config or + # if we aren't re-using kernel cmdline + KPARAM="${KPARAM:+"${KPARAM} "}root=${ROOTPART}" fi if [ -n "${initrd}" ]; then @@ -137,7 +147,7 @@ load_image() { ebegin "Using kernel image ${img}${msg} for kexec" kexec ${KEXEC_OPT_ARGS} ${kparamopt} \ - -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt} + -l "${img}" ${KPARAM:+--append="${KPARAM}"} ${initrdopt} local ret=$? ${mounted} && umount "${BOOTPART}"
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/, sys-apps/kexec-tools/
commit: 855e618441c0238164256e55e35814bbfa3691dc Author: Lars Wendler gentoo org> AuthorDate: Mon Jul 29 07:53:13 2019 + Commit: Lars Wendler gentoo org> CommitDate: Mon Jul 29 07:53:13 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=855e6184 sys-apps/kexec-tools: Removed old. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Lars Wendler gentoo.org> sys-apps/kexec-tools/Manifest | 1 - ...dled-rela-relocation-R_X86_64_PLT32-error.patch | 38 -- sys-apps/kexec-tools/kexec-tools-2.0.17-r1.ebuild | 86 -- 3 files changed, 125 deletions(-) diff --git a/sys-apps/kexec-tools/Manifest b/sys-apps/kexec-tools/Manifest index 744431e4b9d..a318c88ab48 100644 --- a/sys-apps/kexec-tools/Manifest +++ b/sys-apps/kexec-tools/Manifest @@ -1,3 +1,2 @@ -DIST kexec-tools-2.0.17.tar.xz 290612 BLAKE2B 57ec5b5ed33a5c5bbe433099d6e80663717c8a086bdb8b95f4a1d81fd7e546619c0064698454dc79f489313f98696ee6dee4cafbc8b1b93db5c7909cdf7a6234 SHA512 e0f254ca2b26fa02cb61ba9a0735423b26bac2693fbd920eaf7cc2822c298de958bd65f7c37947ca1f6811a3752a58f7cf8aa903494f0109ea76b7159a037fa6 DIST kexec-tools-2.0.19.tar.xz 292348 BLAKE2B c9827d77c82f11351086f4cdf4bacd076a03c744969952706ffd6f17395f28fba2437dac976e12e8e5648ca09fac6ff241daf9b8d3fee215519ded9f18441ff0 SHA512 68b15fe46f9633d55c5ae51a6e7114b0c66bd8f4fe81197f581121939a7b21990a2eea89a0961ac6eb7af364ba0d3981ea504df81c7b4cc0b288ca6ac896730f DIST kexec-tools-2.0.20.tar.xz 297476 BLAKE2B 7e29e7f7d85296dd3e614c45f14c27eca74ce4426d5de2d20387d89f2f63afed318d6157cc4001849a04bb83505bbae87c43d34683ebaf9a70f5f29e3979ade3 SHA512 3112b6202c1030705c53e3f65a2b58aec14d65333a35aad681d48b9f2bd1c51a2e05c985a1e5e867ab02f8a9c97708483d9d225619db7c6993676f1a242e2d99 diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.17-fix-unhandled-rela-relocation-R_X86_64_PLT32-error.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.17-fix-unhandled-rela-relocation-R_X86_64_PLT32-error.patch deleted file mode 100644 index 5d691b34bec..000 --- a/sys-apps/kexec-tools/files/kexec-tools-2.0.17-fix-unhandled-rela-relocation-R_X86_64_PLT32-error.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b9de21ef51a7ceab7122a707c188602eae22c4ee Mon Sep 17 00:00:00 2001 -From: Chris Clayton -Date: Mon, 20 Aug 2018 12:00:31 +0100 -Subject: kexec: fix for "Unhandled rela relocation: R_X86_64_PLT32" error - -In response to a change in binutils, commit b21ebf2fb4c -(x86: Treat R_X86_64_PLT32 as R_X86_64_PC32) was applied to -the linux kernel during the 4.16 development cycle and has -since been backported to earlier stable kernel series. The -change results in the failure message in $SUBJECT when -rebooting via kexec. - -Fix this by replicating the change in kexec. - -Signed-off-by: Chris Clayton -Acked-by: Baoquan He -Tested-by: Bhupesh Sharma -Acked-by: Bhupesh Sharma -Signed-off-by: Simon Horman - kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -index 7fdde73..db85b44 100644 a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c -@@ -79,6 +79,7 @@ void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), - goto overflow; - break; - case R_X86_64_PC32: -+ case R_X86_64_PLT32: - *(uint32_t *)location = value - address; - break; - default: --- -cgit 1.2-0.3.lf.el7 - diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.17-r1.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.17-r1.ebuild deleted file mode 100644 index b11b9c2a383..000 --- a/sys-apps/kexec-tools/kexec-tools-2.0.17-r1.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -if [[ ${PV} == "" ]] ; then - inherit git-r3 autotools - EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"; -else - SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz" - KEYWORDS="amd64 ~arm64 x86" -fi - -inherit flag-o-matic libtool linux-info systemd - -DESCRIPTION="Load another kernel from the currently executing Linux kernel" -HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"; - -LICENSE="GPL-2" -SLOT="0" -IUSE="booke lzma xen zlib" - -REQUIRED_USE="lzma? ( zlib )" - -DEPEND=" - lzma? ( app-arch/xz-utils ) - zlib? ( sys-libs/zlib )" -RDEPEND="${DEPEND}" - -CONFIG_CHECK="~KEXEC" - -PATCHES=( - "${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch - "${FILESDIR}"/${PN}-2.0.4-out-of-source.patch - "${FILESDIR}"/${P}-fix-unhandled-rela-relocation-R_X86_64_PLT32-error.patch -) - -pkg_setup() { - # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC) - export ASFLAGS="${CCASFLAGS}" -} - -src_pr
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
commit: 06bfeebcd9e444ee5383fbb69cf48af8c90031f0 Author: Michael Mair-Keimberger gmail com> AuthorDate: Tue Oct 10 13:40:19 2017 + Commit: Patrice Clement gentoo org> CommitDate: Fri Oct 20 07:45:13 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06bfeebc sys-apps/kexec-tools: remove unused files. sys-apps/kexec-tools/files/kexec.init-2.0.12 | 174 - sys-apps/kexec-tools/files/kexec.init-2.0.4-r3 | 164 --- 2 files changed, 338 deletions(-) diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.12 b/sys-apps/kexec-tools/files/kexec.init-2.0.12 deleted file mode 100644 index a7bd859f082..000 --- a/sys-apps/kexec-tools/files/kexec.init-2.0.12 +++ /dev/null @@ -1,174 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Set up some defaults. -: "${LOAD_DURING_SHUTDOWN:=yes}" -: "${BOOTPART:=/boot}" -: "${DONT_MOUNT_BOOT:=no}" - -depend() { - need localmount -} - -auto_prefix_bootpath() { - # Only auto-add prefix to relative paths. - case $1 in - */*) echo "$1";; - *) echo "${BOOTPART}/$1" ;; - esac -} - -image_path() { - # Do no sanity checking if the user has set a value. - if [ -n "${KNAME}" ]; then - auto_prefix_bootpath "${KNAME}" - return - fi - - local x kver="$(uname -r)" karch="$(uname -m)" - for x in \ - "bzImage" \ - "vmlinuz" \ - "bzImage-${kver}" \ - "vmlinuz-${kver}" \ - "kernel-genkernel-${karch}-${kver}" \ - "kernel-${kver}" \ - "kernel-${karch}"; do - if [ -e "${BOOTPART}/${x}" ]; then - echo "${BOOTPART}/${x}" - return - fi - done - - return 1 -} - -initrd_path() { - # Do no sanity checking if the user has set a value. - if [ -n "${INITRD}" ]; then - auto_prefix_bootpath "${INITRD}" - return 0 - fi - - local x kver="$(uname -r)" karch="$(uname -m)" - for x in \ - "initrd" \ - "initrd.img-${kver}" \ - "initrd-${kver}.img" \ - "initrd-${kver}" \ - "initramfs-${kver}.img" \ - "initramfs-genkernel-${karch}-${kver}"; do - if [ -e "${BOOTPART}/${x}" ]; then - echo "${BOOTPART}/${x}" - return 0 - fi - done - - return 1 -} - -mount_boot() { - [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1 - mountinfo -q "${BOOTPART}" && return 1 - - ebegin "Mounting ${BOOTPART}" - mount "${BOOTPART}" - eend $? -} - -load_image() { - if [ "${KNAME}" = "-" ]; then - ebegin "Disabling kexec" - kexec -u - eend $? - return # eend preserved $? for us. - fi - - local img initrd="$(initrd_path)" mounted=false kparamopt initrdopt - - if ! img="$(image_path)"; then - if mount_boot; then - if img="$(image_path)"; then - mounted=true - initrd="$(initrd_path)" - else - eerror "No kernel image found in ${BOOTPART}!" - umount "${BOOTPART}" - return 1 - fi - else - eerror "No kernel image found in ${BOOTPART}!" - return 1 - fi - fi - - if [ -z "${ROOTPART}" ]; then - ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")" - fi - - if [ -z "${KPARAM}" ]; then - kparamopt="--reuse-cmdline" - fi - - if [ -n "${initrd}" ]; then - initrdopt="--initrd=${initrd}" - fi - - local msg - [ -n "${initrd}" ] && \ - msg=" (with ${initrd})" - ebegin "Using kernel image ${img}${msg} for kexec" - - kexec ${KEXEC_OPT_ARGS} ${kparamopt} \ - -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt} - local ret=$? - - ${mounted} && umount "${BOOTPART}" - eend ${ret} - return ${ret} -} - -start() { - if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then - local mounted - if mount_boot; then - mounted=true - fi - if ! image_path >/dev/null; then - ewarn "Cannot find kernel image!" - ewarn "Please make sure a valid kernel image is present before reboot." - return 0 - fi - if [ -n "${mounted}" ]; then -
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
commit: 43983893090e88e6829a52e37a232456613683fd Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Jan 8 02:59:18 2017 + Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jan 8 02:59:18 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43983893 sys-apps/kexec-tools: Fix syntax error in runscript sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 index 1f18f67..1d2494b 100644 --- a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 +++ b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 @@ -70,7 +70,7 @@ initrd_path() { "initrd-${kver}.img" \ "initrd-${kver}" \ "initramfs-${kver}.img" \ - "initramfs-genkernel-${karch}-${kver}"; do + "initramfs-genkernel-${karch}-${kver}" \ "initramfs-genkernel-${gkarch}-${kver}"; do if [ -e "${BOOTPART}/${x}" ]; then echo "${BOOTPART}/${x}"
[gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/, sys-apps/kexec-tools/
commit: 292b70740c3eb4516bf99a2cc2d12657a031ab00 Author: Mike Frysinger gentoo org> AuthorDate: Thu Mar 24 21:24:44 2016 + Commit: Mike Frysinger gentoo org> CommitDate: Thu Mar 24 21:39:33 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=292b7074 sys-apps/kexec-tools: version bump to 2.0.12 #578164 Rework the init script heavily in the process to make it a bit less "smart" and respect user settings. #577496 sys-apps/kexec-tools/Manifest | 1 + sys-apps/kexec-tools/files/kexec.init-2.0.12 | 175 + ...tools-.ebuild => kexec-tools-2.0.12.ebuild} | 2 +- sys-apps/kexec-tools/kexec-tools-.ebuild | 2 +- 4 files changed, 178 insertions(+), 2 deletions(-) diff --git a/sys-apps/kexec-tools/Manifest b/sys-apps/kexec-tools/Manifest index 6a70245..99653fe 100644 --- a/sys-apps/kexec-tools/Manifest +++ b/sys-apps/kexec-tools/Manifest @@ -1,2 +1,3 @@ +DIST kexec-tools-2.0.12.tar.xz 274776 SHA256 14ce67b6242426a7ded10f58b7d29d3cfef5c1379850e8ba3816bb42053f920d SHA512 d192f841180daf534f7214b6c7c5dcd9de0e5616e8cb0da164c24e8b5903a2f65bb1fbe6ca29a3b9077fa6f6435cc33fda19a96584e1f393ee7a2fe56f374dab WHIRLPOOL 9895716544987682f4ba9cc0622afa14c7dc844482fedce29ec9780b8ff74f87cf2bd79ef58febe651fa3bc5934b6d54aaae31d2593fb32ea9fffdca1e5f8c91 DIST kexec-tools-2.0.4.tar.xz 271604 SHA256 e5f5ab00d746eb15b4714eca6a8ec5a1a86a62ce2bbdad1b3000161138a978c6 SHA512 2514f407d9150d2615dffc91a525fb28f159bef92b9543f9802e2618746b7d4c04137668ad8a8d8f0b75f68ed9057d09629ce736b6a061b5cf817b9d904f549e WHIRLPOOL 70ad298512e700cd1cdee7698e4fa68a769d91d3080d5d8387b8362ad49126ad68b0b6dbd1f13305958bdc988f805fa610e487682fd0eb5e4e9bcda0a9022627 DIST kexec-tools-2.0.9.tar.xz 272728 SHA256 8ae34a9ceb76350954e1e1e3ca9ab51da15862bd5f2fd14392208e60fb454f71 SHA512 b58f8f0872f1a6a3a93bc67068d7035c4b39e985dafadc573585d92259ff289bf98d5a567293a5286668315ac2158b232919e0c6847fdefc68b7ecbcfab5109e WHIRLPOOL 840d9d17ce9facc131736ef52acabb03bcc6d21f671896ff5603bd8d6bd629519e169ca878a127b863235b236dafd3b29f598424b272f599503bb3f1a5f70050 diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.12 b/sys-apps/kexec-tools/files/kexec.init-2.0.12 new file mode 100755 index 000..7a202cc --- /dev/null +++ b/sys-apps/kexec-tools/files/kexec.init-2.0.12 @@ -0,0 +1,175 @@ +#!/sbin/runscript +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Set up some defaults. +: "${LOAD_DURING_SHUTDOWN:=yes}" +: "${BOOTPART:=/boot}" +: "${DONT_MOUNT_BOOT:=no}" + +depend() { + need localmount +} + +auto_prefix_bootpath() { + # Only auto-add prefix to relative paths. + case $1 in + */*) echo "$1";; + *) echo "${BOOTPART}/$1" ;; + esac +} + +image_path() { + # Do no sanity checking if the user has set a value. + if [ -n "${KNAME}" ]; then + auto_prefix_bootpath "${KNAME}" + return + fi + + local x kver="$(uname -r)" karch="$(uname -m)" + for x in \ + "bzImage" \ + "vmlinuz" \ + "bzImage-${kver}" \ + "vmlinuz-${kver}" \ + "kernel-genkernel-${karch}-${kver}" \ + "kernel-${kver}" \ + "kernel-${karch}"; do + if [ -e "${BOOTPART}/${x}" ]; then + echo "${BOOTPART}/${x}" + return + fi + done + + return 1 +} + +initrd_path() { + # Do no sanity checking if the user has set a value. + if [ -n "${INITRD}" ]; then + auto_prefix_bootpath "${INITRD}" + return 0 + fi + + local x kver="$(uname -r)" karch="$(uname -m)" + for x in \ + "initrd" \ + "initrd.img-${kver}" \ + "initrd-${kver}.img" \ + "initrd-${kver}" \ + "initramfs-${kver}.img" \ + "initramfs-genkernel-${karch}-${kver}"; do + if [ -e "${BOOTPART}/${x}" ]; then + echo "${BOOTPART}/${x}" + return 0 + fi + done + + return 1 +} + +mount_boot() { + [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1 + mountinfo -q "${BOOTPART}" && return 1 + + ebegin "Mounting ${BOOTPART}" + mount "${BOOTPART}" + eend $? +} + +load_image() { + if [ "${KNAME}" = "-" ]; then + ebegin "Disabling kexec" + kexec -u + eend $? + return # eend preserved $? for us. + fi + + local img initrd="$(initrd_path)" mounted=false kparamopt initrdopt + + if ! img="$(image_path)"; then + if mount_boot; then + if img="$(image_path)"; then + mounted=true + initrd="$(initrd_path)" +