Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-apps/kexec-tools/, sys-apps/kexec-tools/files/
Date: Thu, 23 Apr 2020 14:56:29
Message-Id: 1587653767.7b97cc398dc68ec6a8d07adf349f89a5b64a86a5.blueness@gentoo
1 commit: 7b97cc398dc68ec6a8d07adf349f89a5b64a86a5
2 Author: Michael Everitt <gentoo <AT> veremit <DOT> xyz>
3 AuthorDate: Thu Apr 23 04:42:58 2020 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 23 14:56:07 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7b97cc39
7
8 kexec-tools: Upstream added patch in 2f6f6d6, subsequently reworked in f4ce070
9
10 In-tree version builds fine:
11 >>> Completed installing sys-apps/kexec-tools-2.0.19-r1 into /var/tmp/portage/sys-apps/kexec-tools-2.0.19-r1/image/
12 >>> sys-apps/kexec-tools-2.0.19-r1 merged.
13
14 Signed-off-by: Michael Everitt <gentoo <AT> veremit.xyz>
15 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
16
17 sys-apps/kexec-tools/Manifest | 1 -
18 sys-apps/kexec-tools/files/90_kexec | 9 -
19 sys-apps/kexec-tools/files/README.Gentoo | 33 ----
20 .../kexec-tools-2.0.4-disable-kexec-test.patch | 17 --
21 .../files/kexec-tools-2.0.4-out-of-source.patch | 24 ---
22 .../files/kexec-tools-2.0.9-gnu-source.patch | 10 --
23 sys-apps/kexec-tools/files/kexec.conf | 16 --
24 sys-apps/kexec-tools/files/kexec.conf-2.0.4 | 34 ----
25 sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 | 186 ---------------------
26 sys-apps/kexec-tools/files/kexec.service | 16 --
27 sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild | 77 ---------
28 sys-apps/kexec-tools/metadata.xml | 13 --
29 12 files changed, 436 deletions(-)
30
31 diff --git a/sys-apps/kexec-tools/Manifest b/sys-apps/kexec-tools/Manifest
32 deleted file mode 100644
33 index 8d4973f..0000000
34 --- a/sys-apps/kexec-tools/Manifest
35 +++ /dev/null
36 @@ -1 +0,0 @@
37 -DIST kexec-tools-2.0.14.tar.xz 283640 SHA256 ffb2e7e99d9d08754c6bc1922aed3c000094f318665d82a72ecc76c4ff1c0dc6 SHA512 8c1f9d1f4bb69a621961d45091f9c8349535ae69b80168423663685b44d89e1b9324d5cd11c83e86d805a3371f4f1600b0def551c52efb3c6cf020e9c11c273f WHIRLPOOL 1f9cc414724bf2d710876b2fbf721543cbd973b272a66b86bf134774b946ec540579b698fa3bcb56a2041d226da2c4298f750180c671ece17633067370a9df8e
38
39 diff --git a/sys-apps/kexec-tools/files/90_kexec b/sys-apps/kexec-tools/files/90_kexec
40 deleted file mode 100644
41 index 40bad42..0000000
42 --- a/sys-apps/kexec-tools/files/90_kexec
43 +++ /dev/null
44 @@ -1,9 +0,0 @@
45 -#!/bin/sh
46 -
47 -version="$1" ; shift
48 -image="$1" ; shift
49 -
50 -exec sed \
51 - -e "s:\"vmlinuz-.*\":\"vmlinuz-${version}\":" \
52 - -e "s:/boot/initramfs-.*\.img:/boot/initramfs-${version}\.img:" \
53 - -i /etc/kexec.conf
54
55 diff --git a/sys-apps/kexec-tools/files/README.Gentoo b/sys-apps/kexec-tools/files/README.Gentoo
56 deleted file mode 100644
57 index 7735e32..0000000
58 --- a/sys-apps/kexec-tools/files/README.Gentoo
59 +++ /dev/null
60 @@ -1,33 +0,0 @@
61 -Usage
62 -=====
63 -
64 -Do
65 - $ man 8 kexec
66 -for full understanding of the underlying kexec command.
67 -Gentoo offers a wrapper to the bare kexec command through
68 -/etc/init.d/kexec.
69 -
70 -Configuration
71 --------------
72 -
73 -Configuration is done in /etc/conf.d/kexec, which is self-documented.
74 -
75 -Usage
76 ------
77 -
78 -In Gentoo, kexec is invoked, i.e., the new kernel will be booted when
79 -rebooting, by reboot (8) command or by pressing Ctrl+Alt+Del.
80 -
81 -If you want to use kexec once, just run
82 - $ /etc/init.d/kexec start
83 -
84 -It'll reserve kexec call at reboot. Later on, you can reboot anytime,
85 -letting kexec starts another (or the same) kernel. When all is done in
86 -the runlevel 6 - killing processes, unmounting volumes, etc - kexec
87 -starts the new kernel instead of doing the normal hardware reboot.
88 -
89 -If you want kexec to be run every time you reboot, add it to a runlevel:
90 - $ rc-update add kexec <runlevel>
91 -
92 -If you want to reboot in the normal way this time, do:
93 - $ touch /nokexec
94
95 diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch
96 deleted file mode 100644
97 index 6fc73f2..0000000
98 --- a/sys-apps/kexec-tools/files/kexec-tools-2.0.4-disable-kexec-test.patch
99 +++ /dev/null
100 @@ -1,17 +0,0 @@
101 -diff --git kexec-tools-2.0.3/kexec_test/Makefile kexec-tools-2.0.3/kexec_test/Makefile
102 -index fec6210..2ed4d51 100644
103 ---- kexec-tools-2.0.3/kexec_test/Makefile
104 -+++ kexec-tools-2.0.3/kexec_test/Makefile
105 -@@ -8,12 +8,6 @@ dist += kexec_test/Makefile $(KEXEC_TEST_SRCS) \
106 - kexec_test/x86-setup-legacy-pic.S
107 -
108 - BUILD_KEXEC_TEST = no
109 --ifeq ($(ARCH),i386)
110 --BUILD_KEXEC_TEST = yes
111 --endif
112 --ifeq ($(ARCH),x86_64)
113 --BUILD_KEXEC_TEST = yes
114 --endif
115 -
116 - ifeq ($(BUILD_KEXEC_TEST),yes)
117 -
118
119 diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch
120 deleted file mode 100644
121 index 64c6cd8..0000000
122 --- a/sys-apps/kexec-tools/files/kexec-tools-2.0.4-out-of-source.patch
123 +++ /dev/null
124 @@ -1,24 +0,0 @@
125 - Makefile.in | 3 ++-
126 - 1 file changed, 2 insertions(+), 1 deletion(-)
127 -
128 -diff --git a/Makefile.in b/Makefile.in
129 -index c1859d1..1aa8559 100644
130 ---- a/Makefile.in
131 -+++ b/Makefile.in
132 -@@ -44,7 +44,7 @@ TARGET_CFLAGS = @TARGET_CFLAGS@
133 -
134 - # Base compiler flags. These are extended by the subcomponent-Makefiles
135 - # where necessary.
136 --CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -I$(srcdir)/util_lib/include \
137 -+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/include -I$(srcdir)/include -I$(srcdir)/util_lib/include \
138 - -Iinclude/ $($(ARCH)_CPPFLAGS)
139 - CFLAGS = @CFLAGS@ -fno-strict-aliasing -Wall -Wstrict-prototypes
140 - PURGATORY_EXTRA_CFLAGS = @PURGATORY_EXTRA_CFLAGS@
141 -@@ -77,6 +77,7 @@ pkgincludedir = $(includedir)/$(PACKAGE_NAME)
142 - DESTDIR =
143 -
144 - srcdir = @srcdir@
145 -+top_builddir = @top_builddir@
146 - VPATH = .:$(srcdir)
147 -
148 - # install paths
149
150 diff --git a/sys-apps/kexec-tools/files/kexec-tools-2.0.9-gnu-source.patch b/sys-apps/kexec-tools/files/kexec-tools-2.0.9-gnu-source.patch
151 deleted file mode 100644
152 index cfe89c1..0000000
153 --- a/sys-apps/kexec-tools/files/kexec-tools-2.0.9-gnu-source.patch
154 +++ /dev/null
155 @@ -1,10 +0,0 @@
156 -diff -Naurw kexec-tools-2.0.9.orig/vmcore-dmesg/vmcore-dmesg.c kexec-tools-2.0.9/vmcore-dmesg/vmcore-dmesg.c
157 ---- kexec-tools-2.0.9.orig/vmcore-dmesg/vmcore-dmesg.c 2014-10-13 21:58:06.000000000 -0700
158 -+++ kexec-tools-2.0.9/vmcore-dmesg/vmcore-dmesg.c 2015-12-30 11:51:20.594760356 -0800
159 -@@ -1,5 +1,6 @@
160 - #define _XOPEN_SOURCE 600
161 - #define _LARGEFILE_SOURCE 1
162 -+#define _GNU_SOURCE 1
163 - #define _FILE_OFFSET_BITS 64
164 - #include <endian.h>
165 - #include <byteswap.h>
166
167 diff --git a/sys-apps/kexec-tools/files/kexec.conf b/sys-apps/kexec-tools/files/kexec.conf
168 deleted file mode 100644
169 index aa829b9..0000000
170 --- a/sys-apps/kexec-tools/files/kexec.conf
171 +++ /dev/null
172 @@ -1,16 +0,0 @@
173 -# Kernel image pathname, relative from /boot.
174 -KNAME="bzimage"
175 -
176 -# Additional arguments passed to kexec (8)
177 -# Following arguments are support:
178 -#
179 -# --reuse-cmdline
180 -# Use the current boot command line
181 -#
182 -# --command-line=string
183 -# Use a different command line
184 -#
185 -# --initrd=file
186 -# Specify an initrd to use
187 -#
188 -KEXEC_OPT_ARGS="--reuse-cmdline"
189
190 diff --git a/sys-apps/kexec-tools/files/kexec.conf-2.0.4 b/sys-apps/kexec-tools/files/kexec.conf-2.0.4
191 deleted file mode 100644
192 index b71ea2b..0000000
193 --- a/sys-apps/kexec-tools/files/kexec.conf-2.0.4
194 +++ /dev/null
195 @@ -1,34 +0,0 @@
196 -# Load kexec kernel image into memory during shutdown instead of bootup
197 -# (default: yes)
198 -#LOAD_DURING_SHUTDOWN="yes"
199 -
200 -# Additional arguments passed to kexec (8)
201 -#KEXEC_OPT_ARGS=""
202 -
203 -# Kernel image partition. Mounted automatically if not.
204 -# (default: /boot)
205 -#BOOTPART="/boot"
206 -
207 -# Root partition (should be autodetected)
208 -#ROOTPART="/dev/hda3"
209 -
210 -# Kernel image pathname, relative from BOOTPART.
211 -# If it's one of
212 -# {kernel-genkernel,bzImage,vmlinuz,kernel}-<currently running kernel version>,
213 -# or bzImage, vmlinuz (without suffix),
214 -# then it's automaticaly detected.
215 -# Setting it to "-" will disable kexec.
216 -#KNAME="vmlinuz-3.9.0"
217 -
218 -# Initrd
219 -# Same automatic detection restriction as for KNAME apply.
220 -# initramfs-genkernel-<currently running kernel version>,
221 -# initrd{,.img}-<currently running kernel version>{,.img}
222 -# will be detected.
223 -#INITRD="/boot/fbsplash-emergence-1024x768"
224 -
225 -# Kernel parameters (should be autodetected)
226 -#KPARAM="splash=silent,theme:emergence"
227 -
228 -# Do not try to mount /boot
229 -# DONT_MOUNT_BOOT="yes"
230
231 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
232 deleted file mode 100755
233 index 5415b3b..0000000
234 --- a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1
235 +++ /dev/null
236 @@ -1,186 +0,0 @@
237 -#!/sbin/openrc-run
238 -# Copyright 1999-2017 Gentoo Foundation
239 -# Distributed under the terms of the GNU General Public License v2
240 -
241 -# Set up some defaults.
242 -: "${LOAD_DURING_SHUTDOWN:=yes}"
243 -: "${BOOTPART:=/boot}"
244 -: "${DONT_MOUNT_BOOT:=no}"
245 -
246 -depend() {
247 - need localmount
248 -}
249 -
250 -auto_prefix_bootpath() {
251 - # Only auto-add prefix to relative paths.
252 - case $1 in
253 - */*) echo "$1";;
254 - *) echo "${BOOTPART}/$1" ;;
255 - esac
256 -}
257 -
258 -get_genkernel_arch() {
259 - case $1 in
260 - x86_64) echo "amd64" ;;
261 - i[3456]86) echo "x86" ;;
262 - *) echo "$1" ;;
263 - esac
264 -}
265 -
266 -image_path() {
267 - # Do no sanity checking if the user has set a value.
268 - if [ -n "${KNAME}" ]; then
269 - auto_prefix_bootpath "${KNAME}"
270 - return
271 - fi
272 -
273 - local x kver="$(uname -r)" karch="$(uname -m)"
274 - local gkarch="$(get_genkernel_arch $karch)"
275 - for x in \
276 - "bzImage" \
277 - "vmlinuz" \
278 - "bzImage-${kver}" \
279 - "vmlinuz-${kver}" \
280 - "kernel-genkernel-${karch}-${kver}" \
281 - "kernel-genkernel-${gkarch}-${kver}" \
282 - "kernel-${kver}" \
283 - "kernel-${karch}"; do
284 - if [ -e "${BOOTPART}/${x}" ]; then
285 - echo "${BOOTPART}/${x}"
286 - return
287 - fi
288 - done
289 -
290 - return 1
291 -}
292 -
293 -initrd_path() {
294 - # Do no sanity checking if the user has set a value.
295 - if [ -n "${INITRD}" ]; then
296 - auto_prefix_bootpath "${INITRD}"
297 - return 0
298 - fi
299 -
300 - local x kver="$(uname -r)" karch="$(uname -m)"
301 - local gkarch="$(get_genkernel_arch $karch)"
302 - for x in \
303 - "initrd" \
304 - "initrd.img-${kver}" \
305 - "initrd-${kver}.img" \
306 - "initrd-${kver}" \
307 - "initramfs-${kver}.img" \
308 - "initramfs-genkernel-${karch}-${kver}" \
309 - "initramfs-genkernel-${gkarch}-${kver}"; do
310 - if [ -e "${BOOTPART}/${x}" ]; then
311 - echo "${BOOTPART}/${x}"
312 - return 0
313 - fi
314 - done
315 -
316 - return 1
317 -}
318 -
319 -mount_boot() {
320 - [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1
321 - mountinfo -q "${BOOTPART}" && return 1
322 -
323 - ebegin "Mounting ${BOOTPART}"
324 - mount "${BOOTPART}"
325 - eend $?
326 -}
327 -
328 -load_image() {
329 - if [ "${KNAME}" = "-" ]; then
330 - ebegin "Disabling kexec"
331 - kexec -u
332 - eend $?
333 - return # eend preserved $? for us.
334 - fi
335 -
336 - local img initrd="$(initrd_path)" mounted=false kparamopt initrdopt
337 -
338 - if ! img="$(image_path)"; then
339 - if mount_boot; then
340 - if img="$(image_path)"; then
341 - mounted=true
342 - initrd="$(initrd_path)"
343 - else
344 - eerror "No kernel image found in ${BOOTPART}!"
345 - umount "${BOOTPART}"
346 - return 1
347 - fi
348 - else
349 - eerror "No kernel image found in ${BOOTPART}!"
350 - return 1
351 - fi
352 - fi
353 -
354 - if [ -z "${ROOTPART}" ]; then
355 - ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
356 - fi
357 -
358 - if [ -z "${KPARAM}" ]; then
359 - kparamopt="--reuse-cmdline"
360 - fi
361 -
362 - if [ -n "${initrd}" ]; then
363 - initrdopt="--initrd=${initrd}"
364 - fi
365 -
366 - local msg
367 - [ -n "${initrd}" ] && \
368 - msg=" (with ${initrd})"
369 - ebegin "Using kernel image ${img}${msg} for kexec"
370 -
371 - kexec ${KEXEC_OPT_ARGS} ${kparamopt} \
372 - -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
373 - local ret=$?
374 -
375 - ${mounted} && umount "${BOOTPART}"
376 - eend ${ret}
377 - return ${ret}
378 -}
379 -
380 -start() {
381 - if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
382 - local mounted
383 - if mount_boot; then
384 - mounted=true
385 - fi
386 - if ! image_path >/dev/null; then
387 - ewarn "Cannot find kernel image!"
388 - ewarn "Please make sure a valid kernel image is present before reboot."
389 - return 0
390 - fi
391 - if [ -n "${mounted}" ]; then
392 - ebegin "Unmounting ${BOOTPART}"
393 - umount "${BOOTPART}"
394 - eend $?
395 - fi
396 - # $? is already set to the previous calls.
397 - return
398 - else
399 - load_image
400 - fi
401 -}
402 -
403 -stop() {
404 - if ! yesno ${RC_REBOOT}; then
405 - ebegin "Not rebooting; disabling kexec"
406 - kexec -u
407 - eend $?
408 - return
409 - fi
410 -
411 - if [ -f /nokexec ]; then
412 - ebegin "Rebooting; disabling kexec due to /nokexec"
413 - rm -f /nokexec
414 - kexec -u
415 - eend $?
416 - return
417 - fi
418 -
419 - if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
420 - load_image
421 - fi
422 -}
423
424 diff --git a/sys-apps/kexec-tools/files/kexec.service b/sys-apps/kexec-tools/files/kexec.service
425 deleted file mode 100644
426 index 289aae0..0000000
427 --- a/sys-apps/kexec-tools/files/kexec.service
428 +++ /dev/null
429 @@ -1,16 +0,0 @@
430 -[Unit]
431 -Description=Gracefully restart the box
432 -Documentation=man:kexec(8)
433 -After=boot.mount
434 -Before=shutdown.target umount.target final.target
435 -ConditionPathExists=!/nokexec
436 -
437 -[Service]
438 -Type=oneshot
439 -RemainAfterExit=yes
440 -EnvironmentFile=/etc/kexec.conf
441 -ExecStart=/usr/sbin/kexec -l /boot/${KNAME} ${KEXEC_OPT_ARGS}
442 -ExecStop=/usr/sbin/kexec -l /boot/${KNAME} ${KEXEC_OPT_ARGS}
443 -
444 -[Install]
445 -WantedBy=multi-user.target
446
447 diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild
448 deleted file mode 100644
449 index 1780452..0000000
450 --- a/sys-apps/kexec-tools/kexec-tools-2.0.14.ebuild
451 +++ /dev/null
452 @@ -1,77 +0,0 @@
453 -# Copyright 1999-2017 Gentoo Foundation
454 -# Distributed under the terms of the GNU General Public License v2
455 -
456 -EAPI="5"
457 -
458 -if [[ ${PV} == "9999" ]] ; then
459 - inherit git-r3
460 - EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
461 - AUTOTOOLS_AUTORECONF=true
462 -else
463 - SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
464 - KEYWORDS="~amd64 ~x86"
465 -fi
466 -
467 -inherit autotools-utils linux-info systemd
468 -
469 -DESCRIPTION="Load another kernel from the currently executing Linux kernel"
470 -HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
471 -
472 -LICENSE="GPL-2"
473 -SLOT="0"
474 -IUSE="booke lzma xen zlib"
475 -
476 -REQUIRED_USE="lzma? ( zlib )"
477 -
478 -DEPEND="
479 - lzma? ( app-arch/xz-utils )
480 - zlib? ( sys-libs/zlib )"
481 -RDEPEND="${DEPEND}"
482 -
483 -CONFIG_CHECK="~KEXEC"
484 -
485 -PATCHES=(
486 - "${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
487 - "${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
488 - "${FILESDIR}"/${PN}-2.0.9-gnu-source.patch
489 -)
490 -
491 -pkg_setup() {
492 - # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
493 - export ASFLAGS="${CCASFLAGS}"
494 -}
495 -
496 -src_configure() {
497 - local myeconfargs=(
498 - $(use_with booke)
499 - $(use_with lzma)
500 - $(use_with xen)
501 - $(use_with zlib)
502 - )
503 - autotools-utils_src_configure
504 -}
505 -
506 -src_install() {
507 - autotools-utils_src_install
508 -
509 - dodoc "${FILESDIR}"/README.Gentoo
510 -
511 - newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
512 - newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
513 -
514 - insinto /etc
515 - doins "${FILESDIR}"/kexec.conf
516 -
517 - insinto /etc/kernel/postinst.d
518 - doins "${FILESDIR}"/90_kexec
519 -
520 - systemd_dounit "${FILESDIR}"/kexec.service
521 -}
522 -
523 -pkg_postinst() {
524 - if systemd_is_booted || has_version sys-apps/systemd; then
525 - elog "For systemd support the new config file is"
526 - elog " /etc/kexec.conf"
527 - elog "Please adopt it to your needs as there is no autoconfig anymore"
528 - fi
529 -}
530
531 diff --git a/sys-apps/kexec-tools/metadata.xml b/sys-apps/kexec-tools/metadata.xml
532 deleted file mode 100644
533 index 2ea57db..0000000
534 --- a/sys-apps/kexec-tools/metadata.xml
535 +++ /dev/null
536 @@ -1,13 +0,0 @@
537 -<?xml version="1.0" encoding="UTF-8"?>
538 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
539 -<pkgmetadata>
540 - <maintainer type="project">
541 - <email>base-system@g.o</email>
542 - <name>Gentoo Base System</name>
543 - </maintainer>
544 - <use>
545 - <flag name="lzma">Enables support for LZMA compressed kernel images</flag>
546 - <flag name="booke">Include support for Book-E memory management</flag>
547 - <flag name="xen">Enable extended xen support</flag>
548 - </use>
549 -</pkgmetadata>