parent
0379a19cd4
commit
cb145202ea
9
00-zipl-prepare.install
Executable file
9
00-zipl-prepare.install
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COMMAND="$1"
|
||||||
|
KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="$3"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
# Remove it, since for zipl the images are always installed in /boot
|
||||||
|
rm -rf "${BOOT_DIR_ABS%/*}"
|
@ -16,6 +16,7 @@ KERNEL_DIR="${KERNEL_IMAGE%/*}"
|
|||||||
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
||||||
|
|
||||||
BLS_DIR="/boot/loader/entries"
|
BLS_DIR="/boot/loader/entries"
|
||||||
|
ZIPLCFG="/etc/zipl.conf"
|
||||||
CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg"
|
CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg"
|
||||||
LINUX_DEBUG_VERSION_POSTFIX="_with_debugging"
|
LINUX_DEBUG_VERSION_POSTFIX="_with_debugging"
|
||||||
LINUX_DEBUG_TITLE_POSTFIX=" with debugging"
|
LINUX_DEBUG_TITLE_POSTFIX=" with debugging"
|
||||||
@ -106,6 +107,15 @@ case "$COMMAND" in
|
|||||||
"${BOOT_OPTIONS[*]}" >"${BLS_TARGET}"
|
"${BOOT_OPTIONS[*]}" >"${BLS_TARGET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$KERNEL_VERSION" == *\+* ]] && [ "x$DEFAULTDEBUG" != "xyes" ]; then
|
||||||
|
UPDATEDEFAULT="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "x$UPDATEDEFAULT" = "xyes" ]]; then
|
||||||
|
TITLE="$(grep '^title[ \t]' "${BLS_TARGET}" | sed -e 's/^title[ \t]*//')"
|
||||||
|
NEWDEFAULT="${TITLE}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "x${MAKEDEBUG}" = "xyes" ]; then
|
if [ "x${MAKEDEBUG}" = "xyes" ]; then
|
||||||
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
|
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
|
||||||
cp -aT "${BLS_TARGET}" "${BLS_DEBUG}"
|
cp -aT "${BLS_TARGET}" "${BLS_DEBUG}"
|
||||||
@ -116,6 +126,14 @@ case "$COMMAND" in
|
|||||||
sed -i -e "s/^version.*/version ${VERSION}${LINUX_DEBUG_VERSION_POSTFIX}/" "${BLS_DEBUG}"
|
sed -i -e "s/^version.*/version ${VERSION}${LINUX_DEBUG_VERSION_POSTFIX}/" "${BLS_DEBUG}"
|
||||||
sed -i -e "s/^id.*/${BLSID}/" "${BLS_DEBUG}"
|
sed -i -e "s/^id.*/${BLSID}/" "${BLS_DEBUG}"
|
||||||
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}${CMDLINE_LINUX_DEBUG}#" "${BLS_DEBUG}"
|
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}${CMDLINE_LINUX_DEBUG}#" "${BLS_DEBUG}"
|
||||||
|
if [ -n "$NEWDEFAULT" -a "x$DEFAULTDEBUG" = "xyes" ]; then
|
||||||
|
TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')"
|
||||||
|
NEWDEFAULT="${TITLE}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$NEWDEFAULT" ]; then
|
||||||
|
sed -i -e "s,^default=.*,default=${NEWDEFAULT}," "${ZIPLCFG}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
@ -131,7 +149,16 @@ case "$COMMAND" in
|
|||||||
if [[ ! -f /sbin/new-kernel-pkg ]]; then
|
if [[ ! -f /sbin/new-kernel-pkg ]]; then
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
|
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
|
||||||
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/\.${ARCH}/-debug.${ARCH}/")"
|
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
|
||||||
|
|
||||||
|
TITLE="$(grep '^title[ \t]' "${BLS_TARGET}" | sed -e 's/^title[ \t]*//')"
|
||||||
|
sed -i -e "/^default=${TITLE}/d" "${ZIPLCFG}"
|
||||||
|
|
||||||
|
if [[ -f "${BLS_DEBUG}" ]]; then
|
||||||
|
TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')"
|
||||||
|
sed -i -e "/^default=${TITLE}/d" "${ZIPLCFG}"
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f "${BLS_TARGET}" "${BLS_DEBUG}"
|
rm -f "${BLS_TARGET}" "${BLS_DEBUG}"
|
||||||
|
|
||||||
for i in vmlinuz System.map config zImage.stub dtb; do
|
for i in vmlinuz System.map config zImage.stub dtb; do
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Name: s390utils
|
Name: s390utils
|
||||||
Summary: Utilities and daemons for IBM z Systems
|
Summary: Utilities and daemons for IBM z Systems
|
||||||
Version: 2.11.0
|
Version: 2.11.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
License: MIT
|
License: MIT
|
||||||
ExclusiveArch: s390 s390x
|
ExclusiveArch: s390 s390x
|
||||||
@ -27,9 +27,10 @@ Source15: device_cio_free.service
|
|||||||
Source16: ccw_init
|
Source16: ccw_init
|
||||||
Source17: ccw.udev
|
Source17: ccw.udev
|
||||||
Source21: normalize_dasd_arg
|
Source21: normalize_dasd_arg
|
||||||
Source22: 20-zipl-kernel.install
|
Source22: 00-zipl-prepare.install
|
||||||
Source23: 52-zipl-rescue.install
|
Source23: 20-zipl-kernel.install
|
||||||
Source24: 91-zipl.install
|
Source24: 52-zipl-rescue.install
|
||||||
|
Source25: 91-zipl.install
|
||||||
|
|
||||||
%if 0%{?signzipl}
|
%if 0%{?signzipl}
|
||||||
%define pesign_name redhatsecureboot302
|
%define pesign_name redhatsecureboot302
|
||||||
@ -120,8 +121,10 @@ install -Dp -m 644 etc/modules-load.d/*.conf %{buildroot}%{_prefix}/lib/modules-
|
|||||||
# Install kernel-install scripts
|
# Install kernel-install scripts
|
||||||
install -d -m 0755 %{buildroot}%{_prefix}/lib/kernel/install.d/
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/kernel/install.d/
|
||||||
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE22}
|
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE22}
|
||||||
|
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ zfcpdump/10-zfcpdump.install
|
||||||
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE23}
|
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE23}
|
||||||
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE24}
|
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE24}
|
||||||
|
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE25}
|
||||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/kernel/install.d/
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/kernel/install.d/
|
||||||
install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/20-grubby.install
|
install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/20-grubby.install
|
||||||
|
|
||||||
@ -470,6 +473,8 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || :
|
|||||||
%{_udevrulesdir}/81-ccw.rules
|
%{_udevrulesdir}/81-ccw.rules
|
||||||
%{_udevrulesdir}/90-cpi.rules
|
%{_udevrulesdir}/90-cpi.rules
|
||||||
%{_sysconfdir}/kernel/install.d/20-grubby.install
|
%{_sysconfdir}/kernel/install.d/20-grubby.install
|
||||||
|
%{_prefix}/lib/kernel/install.d/00-zipl-prepare.install
|
||||||
|
%{_prefix}/lib/kernel/install.d/10-zfcpdump.install
|
||||||
%{_prefix}/lib/kernel/install.d/20-zipl-kernel.install
|
%{_prefix}/lib/kernel/install.d/20-zipl-kernel.install
|
||||||
%{_prefix}/lib/kernel/install.d/52-zipl-rescue.install
|
%{_prefix}/lib/kernel/install.d/52-zipl-rescue.install
|
||||||
%{_prefix}/lib/kernel/install.d/91-zipl.install
|
%{_prefix}/lib/kernel/install.d/91-zipl.install
|
||||||
@ -766,6 +771,9 @@ User-space development files for the s390/s390x architecture.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 02 2019 Dan Horák <dan[at]danny.cz> - 2:2.11.0-2
|
||||||
|
- apply kernel install/update script fixes from #1600480, #1665060
|
||||||
|
|
||||||
* Mon Sep 09 2019 Dan Horák <dan[at]danny.cz> - 2:2.11.0-1
|
* Mon Sep 09 2019 Dan Horák <dan[at]danny.cz> - 2:2.11.0-1
|
||||||
- rebased to 2.11.0
|
- rebased to 2.11.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user