From a8004b6c5b70fa5b947596cf8c1934a146a1a66d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 22:35:18 +0000 Subject: [PATCH 001/141] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index b63a6b5..842fa40 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -3,7 +3,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.9.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -745,6 +745,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 2:2.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Tue Jul 02 2019 Dan Horák - 2:2.9.0-3 - fix /tmp being deleted when kernel-core is installed in a container (#1726286) (javierm) From b42105540f894ed6865000b5d03c171d2d43ad1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 5 Aug 2019 10:22:13 -0400 Subject: [PATCH 002/141] - rebased to 2.10.0 --- .gitignore | 1 + s390utils.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 19ba320..c7bb562 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.7.1.tar.gz /s390-tools-2.8.0.tar.gz /s390-tools-2.9.0.tar.gz +/s390-tools-2.10.0.tar.gz diff --git a/s390utils.spec b/s390utils.spec index 842fa40..4230b9a 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -2,8 +2,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.9.0 -Release: 4%{?dist} +Version: 2.10.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -745,6 +745,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Aug 05 2019 Dan Horák - 2:2.10.0-1 +- rebased to 2.10.0 + * Fri Jul 26 2019 Fedora Release Engineering - 2:2.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 3eb6246..40a39a3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7 -SHA512 (s390-tools-2.9.0.tar.gz) = 23315e8914a5c797b0678298ff51fd95a3c9f065b0fa9f6cf954573fd5ad394890d7f8dbd9cf2501d845c76c3fe31952b25cb7c2b2d59744305b2f37cf3a65bb +SHA512 (s390-tools-2.10.0.tar.gz) = 51f84f4071f611568fadd225864838c05cb8edeab22b993d3112ec388bf42c9f2e2d6d70022d3e02d7bdc8a211d50f29dbc3ac59b08c13fa8c8323fe9c72ce66 From 18c25ca8a63187ed043c419c1d76c0456848ac5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 9 Sep 2019 08:05:11 -0400 Subject: [PATCH 003/141] - rebased to 2.11.0 --- .gitignore | 1 + s390utils.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c7bb562..92c51d3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.8.0.tar.gz /s390-tools-2.9.0.tar.gz /s390-tools-2.10.0.tar.gz +/s390-tools-2.11.0.tar.gz diff --git a/s390utils.spec b/s390utils.spec index 4230b9a..0fb64dd 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -2,7 +2,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.10.0 +Version: 2.11.0 Release: 1%{?dist} Epoch: 2 License: MIT @@ -745,6 +745,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Sep 09 2019 Dan Horák - 2:2.11.0-1 +- rebased to 2.11.0 + * Mon Aug 05 2019 Dan Horák - 2:2.10.0-1 - rebased to 2.10.0 diff --git a/sources b/sources index 40a39a3..2914c4c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7 -SHA512 (s390-tools-2.10.0.tar.gz) = 51f84f4071f611568fadd225864838c05cb8edeab22b993d3112ec388bf42c9f2e2d6d70022d3e02d7bdc8a211d50f29dbc3ac59b08c13fa8c8323fe9c72ce66 +SHA512 (s390-tools-2.11.0.tar.gz) = e13cb180a2ff9fc93e24f3ff6f792c7c2af665269c85d094a18bf313ef82531ebbed7b838e012750f123479d576d9f0c4a91016467fe5c5edf63262bac4946b3 From 0379a19cd44b905b06575ddca7dccb89edfdac7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 12 Sep 2019 14:02:50 +0200 Subject: [PATCH 004/141] merge stage3 signing support from RHEL --- s390utils.spec | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/s390utils.spec b/s390utils.spec index 0fb64dd..3b9d9f9 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -1,5 +1,10 @@ %define vipaver 2.1.0 +# secure boot support is for RHEL only +%if 0%{?rhel} >= 8 +%global signzipl 1 +%endif + Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.11.0 @@ -26,6 +31,10 @@ Source22: 20-zipl-kernel.install Source23: 52-zipl-rescue.install Source24: 91-zipl.install +%if 0%{?signzipl} +%define pesign_name redhatsecureboot302 +%endif + # change the defaults to match Fedora environment Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -80,6 +89,18 @@ make install \ DISTRELEASE=%{release} \ V=1 +# sign the stage3 bootloader +%if 0%{?signzipl} +if [ -x /usr/bin/rpm-sign ]; then + pushd %{buildroot}/lib/s390-tools/ + rpm-sign --key "%{pesign_name}" --lkmsign stage3.bin --output stage3.signed + mv stage3.signed stage3.bin + popd +else + echo "rpm-sign not available, stage3 won't be signed" +fi +%endif + mkdir -p %{buildroot}{/boot,%{_udevrulesdir},%{_sysconfdir}/{profile.d,sysconfig},%{_prefix}/lib/modules-load.d} install -p -m 644 zipl/boot/tape0.bin %{buildroot}/boot/tape0 install -p -m 755 %{SOURCE5} %{buildroot}%{_sbindir} From cb145202eab9f4d610c12e71e9c3c1445c66d6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 2 Dec 2019 13:36:43 +0100 Subject: [PATCH 005/141] apply kernel install/update script fixes from #1600480, #1665060 --- 00-zipl-prepare.install | 9 +++++++++ 20-zipl-kernel.install | 29 ++++++++++++++++++++++++++++- s390utils.spec | 16 ++++++++++++---- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100755 00-zipl-prepare.install diff --git a/00-zipl-prepare.install b/00-zipl-prepare.install new file mode 100755 index 0000000..315b2f9 --- /dev/null +++ b/00-zipl-prepare.install @@ -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%/*}" diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 33b7d11..7315095 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -16,6 +16,7 @@ KERNEL_DIR="${KERNEL_IMAGE%/*}" MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID BLS_DIR="/boot/loader/entries" +ZIPLCFG="/etc/zipl.conf" CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg" LINUX_DEBUG_VERSION_POSTFIX="_with_debugging" LINUX_DEBUG_TITLE_POSTFIX=" with debugging" @@ -106,6 +107,15 @@ case "$COMMAND" in "${BOOT_OPTIONS[*]}" >"${BLS_TARGET}" 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 BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")" cp -aT "${BLS_TARGET}" "${BLS_DEBUG}" @@ -116,8 +126,16 @@ case "$COMMAND" in 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#^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 + exit 0 fi @@ -131,7 +149,16 @@ case "$COMMAND" in if [[ ! -f /sbin/new-kernel-pkg ]]; then ARCH="$(uname -m)" 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}" for i in vmlinuz System.map config zImage.stub dtb; do diff --git a/s390utils.spec b/s390utils.spec index 3b9d9f9..540252d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -8,7 +8,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -27,9 +27,10 @@ Source15: device_cio_free.service Source16: ccw_init Source17: ccw.udev Source21: normalize_dasd_arg -Source22: 20-zipl-kernel.install -Source23: 52-zipl-rescue.install -Source24: 91-zipl.install +Source22: 00-zipl-prepare.install +Source23: 20-zipl-kernel.install +Source24: 52-zipl-rescue.install +Source25: 91-zipl.install %if 0%{?signzipl} %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 -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/ 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/ %{SOURCE24} +install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE25} install -d -m 0755 %{buildroot}%{_sysconfdir}/kernel/install.d/ 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}/90-cpi.rules %{_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/52-zipl-rescue.install %{_prefix}/lib/kernel/install.d/91-zipl.install @@ -766,6 +771,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Dec 02 2019 Dan Horák - 2:2.11.0-2 +- apply kernel install/update script fixes from #1600480, #1665060 + * Mon Sep 09 2019 Dan Horák - 2:2.11.0-1 - rebased to 2.11.0 From 87ca1f4032270f66980e5ca8acb522fa5bebeabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 2 Dec 2019 13:38:45 +0100 Subject: [PATCH 006/141] update changelog --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index 540252d..366e84a 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -773,6 +773,7 @@ User-space development files for the s390/s390x architecture. %changelog * Mon Dec 02 2019 Dan Horák - 2:2.11.0-2 - apply kernel install/update script fixes from #1600480, #1665060 +- merge stage3 signing support from RHEL * Mon Sep 09 2019 Dan Horák - 2:2.11.0-1 - rebased to 2.11.0 From 2cd85a32d29e8753ede5bbeec84d1f8b3190b99f Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Mon, 2 Dec 2019 14:31:08 +0100 Subject: [PATCH 007/141] - remove 00-zipl-prepare.install plugin that is not needed anymore The kernel-install plugin removed the "${BOOT_DIR_ABS%/*}" directory that was created unconditionally by the kernel-install script. Since the other plugins used the existence of this directory as the indication on whether systemd-boot was used or not. But now the kernel-install script doesn't unconditionally create this dir anymore and if $BOOT/$MACHINE_ID exists, so there's no need anymore to do any cleanup. --- 00-zipl-prepare.install | 9 --------- s390utils.spec | 3 --- 2 files changed, 12 deletions(-) delete mode 100755 00-zipl-prepare.install diff --git a/00-zipl-prepare.install b/00-zipl-prepare.install deleted file mode 100755 index 315b2f9..0000000 --- a/00-zipl-prepare.install +++ /dev/null @@ -1,9 +0,0 @@ -#!/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%/*}" diff --git a/s390utils.spec b/s390utils.spec index 366e84a..ddb00fa 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -27,7 +27,6 @@ Source15: device_cio_free.service Source16: ccw_init Source17: ccw.udev Source21: normalize_dasd_arg -Source22: 00-zipl-prepare.install Source23: 20-zipl-kernel.install Source24: 52-zipl-rescue.install Source25: 91-zipl.install @@ -120,7 +119,6 @@ install -Dp -m 644 etc/modules-load.d/*.conf %{buildroot}%{_prefix}/lib/modules- # Install kernel-install scripts 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/ 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/ %{SOURCE24} @@ -473,7 +471,6 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_udevrulesdir}/81-ccw.rules %{_udevrulesdir}/90-cpi.rules %{_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/52-zipl-rescue.install From b3e6ad36b47e4496fb5571df813c647619cef87a Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 26 Sep 2019 14:59:03 +0200 Subject: [PATCH 008/141] - force a BLS config if /boot/loader/entries directory exists (#1755899) The /usr/lib/kernel/install.d/20-zipl-kernel.install script checks if the /sbin/new-kernel-pkg script exists to determine whether a BLS config has to be used or not. This file should not exist in RHEL8 but it does in some corner cases for example when doing an in-place upgrade from RHEL7 to RHEL8 since it is required by the LEAPP tool for the RPM transaction to succeeded. To cover that, not only check if the /sbin/new-kernel-pkg is not present but also if the /boot/loader/entries directory exists and use either of these as a condition to use a BLS configuration. --- 20-zipl-kernel.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 7315095..91d7581 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -74,7 +74,7 @@ case "$COMMAND" in fi fi - if [[ ! -f /sbin/new-kernel-pkg ]]; then + if [[ ! -f /sbin/new-kernel-pkg || -d "$BLS_DIR" ]]; then declare -a BOOT_OPTIONS if [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline From e0e6dde32f97a6fdfcfe3dbbabfe348afb5cf38a Mon Sep 17 00:00:00 2001 From: Jan Hlavac Date: Fri, 29 Nov 2019 16:57:18 +0000 Subject: [PATCH 009/141] kernel-install: fix BLS-related decision logic In the commit 63205a4dc4c400f75571869d87682c0cdb475830, there was introduced a change in the decision logic of the 20-zipl-kernel.install script. Specifically, whether the Boot Loader Specification (BLS) is used. Instead of just checking the existence of the /sbin/new-kernel-pkg file, the existence of the /boot/loader/entries directory is also checked. More thorough testing revealed that the above commit covers only the case when a new kernel is added. However, the remaining cases should also be covered. That means the case when a rescue kernel is added and the case when some kernel is removed. Resolves: #1778243 Fixes: #1755899 Signed-off-by: Jan Hlavac --- 20-zipl-kernel.install | 4 ++-- 52-zipl-rescue.install | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 91d7581..41ff2e5 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -74,7 +74,7 @@ case "$COMMAND" in fi fi - if [[ ! -f /sbin/new-kernel-pkg || -d "$BLS_DIR" ]]; then + if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then declare -a BOOT_OPTIONS if [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline @@ -146,7 +146,7 @@ case "$COMMAND" in exit 77 ;; remove) - if [[ ! -f /sbin/new-kernel-pkg ]]; then + if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then ARCH="$(uname -m)" BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")" diff --git a/52-zipl-rescue.install b/52-zipl-rescue.install index a2945f7..dbf0c1b 100755 --- a/52-zipl-rescue.install +++ b/52-zipl-rescue.install @@ -15,7 +15,7 @@ BLS_DIR="/boot/loader/entries" [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}" case "$COMMAND" in add) - if [[ ! -f /sbin/new-kernel-pkg ]]; then + if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then declare -a BOOT_OPTIONS if [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline From 594bda140c586c96adad1e1e02e5c5705e8c9564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 2 Dec 2019 14:53:28 +0100 Subject: [PATCH 010/141] update changelog --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index ddb00fa..d4a1f92 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -8,7 +8,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.11.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -768,6 +768,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Dec 02 2019 Dan Horák - 2:2.11.0-3 +- apply kernel install/update script fixes from #1755899, #1778243 + * Mon Dec 02 2019 Dan Horák - 2:2.11.0-2 - apply kernel install/update script fixes from #1600480, #1665060 - merge stage3 signing support from RHEL From 3e57fc3074902571408e26fcbd0a484f5dab2e3f Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 12 Dec 2019 12:07:01 +0100 Subject: [PATCH 011/141] - skip BOOT_IMAGE param when copying the cmdline to BLS snippets The bootloaders add a BOOT_IMAGE parameter that is present in the kernel command line exposed via the /proc/cmdline virtual file. If this param is added to the kernel cmdline in the BLS snippet, it will be duplicated. Resolves: #1782321 --- 20-zipl-kernel.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 41ff2e5..99bfcb9 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -83,7 +83,7 @@ case "$COMMAND" in if ! [[ ${BOOT_OPTIONS[*]} ]]; then read -r -d '' -a line < /proc/cmdline for i in "${line[@]}"; do - [[ "${i#initrd=*}" != "$i" ]] && continue + [[ "${i#initrd=*}" != "$i" || "${i#BOOT_IMAGE=*}" != "$i" ]] && continue BOOT_OPTIONS+=("$i") done fi From 42952147060663939ef9e7f17035cb45c2895a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 13 Dec 2019 13:32:12 +0100 Subject: [PATCH 012/141] - drop src_vipa (#1781683) - kernel-install: skip BOOT_IMAGE param when copying the cmdline to BLS snippets --- s390utils.spec | 29 +++++++---------------------- sources | 1 - 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index d4a1f92..c8ac9e4 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -1,5 +1,3 @@ -%define vipaver 2.1.0 - # secure boot support is for RHEL only %if 0%{?rhel} >= 8 %global signzipl 1 @@ -8,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.11.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -16,8 +14,6 @@ ExclusiveArch: s390 s390x URL: https://github.com/ibm-s390-tools/s390-tools Source0: https://github.com/ibm-s390-tools/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz Source5: zfcpconf.sh -# http://www.ibm.com/developerworks/linux/linux390/src_vipa-%%{vipaver}.html -Source6: http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/src_vipa-%{vipaver}.tar.gz Source7: zfcp.udev # files for DASD initialization Source12: dasd.udev @@ -57,7 +53,7 @@ The s390utils packages contain a set of user space utilities that should to be used together with the zSeries (s390) Linux kernel and device drivers. %prep -%setup -q -n s390-tools-%{version} -a 6 +%setup -q -n s390-tools-%{version} # Fedora/RHEL changes %patch0 -p1 -b .zipl-invert-script-options @@ -75,10 +71,6 @@ make \ DISTRELEASE=%{release} \ V=1 -pushd src_vipa-%{vipaver} -make CC_FLAGS="%{build_cflags} -fPIC" LD_FLAGS="%{build_ldflags} -shared" LIBDIR=%{_libdir} -popd - %install make install \ @@ -126,11 +118,6 @@ install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE25} install -d -m 0755 %{buildroot}%{_sysconfdir}/kernel/install.d/ install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/20-grubby.install -# src_vipa -pushd src_vipa-%{vipaver} -make install LIBDIR=%{_libdir} SBINDIR=%{_bindir} INSTROOT=%{buildroot} LDCONFIG=/bin/true -popd - # install usefull headers for devel subpackage mkdir -p %{buildroot}%{_includedir}/%{name} install -p -m 644 include/lib/vtoc.h %{buildroot}%{_includedir}/%{name} @@ -159,8 +146,7 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf # ************************* s390-tools base package ************************* # %package base -# src_vipa is CPL -License: MIT and CPL +License: MIT Summary: S390 base tools Requires: gawk sed coreutils Requires: sysfsutils @@ -477,11 +463,6 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_prefix}/lib/kernel/install.d/91-zipl.install %{_prefix}/lib/modules-load.d/s390-pkey.conf -# src_vipa -%{_bindir}/src_vipa.sh -%{_libdir}/src_vipa.so -%{_mandir}/man8/src_vipa.8* - # # *********************** s390-tools osasnmpd package *********************** # @@ -768,6 +749,10 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Dec 13 2019 Dan Horák - 2:2.11.0-4 +- drop src_vipa (#1781683) +- kernel-install: skip BOOT_IMAGE param when copying the cmdline to BLS snippets + * Mon Dec 02 2019 Dan Horák - 2:2.11.0-3 - apply kernel install/update script fixes from #1755899, #1778243 diff --git a/sources b/sources index 2914c4c..581293b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7 SHA512 (s390-tools-2.11.0.tar.gz) = e13cb180a2ff9fc93e24f3ff6f792c7c2af665269c85d094a18bf313ef82531ebbed7b838e012750f123479d576d9f0c4a91016467fe5c5edf63262bac4946b3 From 920a9af39279c80e5eb0c74626f21411066017d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 6 Jan 2020 06:22:01 -0500 Subject: [PATCH 013/141] - rebased to 2.12.0 --- .gitignore | 1 + s390utils.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 92c51d3..02f9e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.9.0.tar.gz /s390-tools-2.10.0.tar.gz /s390-tools-2.11.0.tar.gz +/s390-tools-2.12.0.tar.gz diff --git a/s390utils.spec b/s390utils.spec index c8ac9e4..37e321d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.11.0 -Release: 4%{?dist} +Version: 2.12.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -749,6 +749,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jan 06 2020 Dan Horák - 2:2.12.0-1 +- rebased to 2.12.0 + * Fri Dec 13 2019 Dan Horák - 2:2.11.0-4 - drop src_vipa (#1781683) - kernel-install: skip BOOT_IMAGE param when copying the cmdline to BLS snippets diff --git a/sources b/sources index 581293b..3ec7804 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.11.0.tar.gz) = e13cb180a2ff9fc93e24f3ff6f792c7c2af665269c85d094a18bf313ef82531ebbed7b838e012750f123479d576d9f0c4a91016467fe5c5edf63262bac4946b3 +SHA512 (s390-tools-2.12.0.tar.gz) = 4903ded5368966513e1090faca04482316870cf5fc53206d17ab98b821541e2836a016bd18cd1ca49ed6b5df0dff92dd1ed257ff712920a7aa3fd74e4a6bc6a0 From 6e980e4fa12549e6321ff92c576068d2c7112183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 14 Jan 2020 13:20:20 +0100 Subject: [PATCH 014/141] - fix service order after switching to real root file system (#1790496, #1790790) --- device_cio_free.service | 2 +- s390utils.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/device_cio_free.service b/device_cio_free.service index 07a57f5..f9564e1 100644 --- a/device_cio_free.service +++ b/device_cio_free.service @@ -1,7 +1,7 @@ [Unit] Description=Free all devices on startup DefaultDependencies=no -Before=sysinit.target +Before=sysinit.target systemd-udev-trigger.service [Service] Type=oneshot diff --git a/s390utils.spec b/s390utils.spec index 37e321d..1c6fd5a 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.12.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -749,6 +749,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jan 14 2020 Dan Horák - 2:2.12.0-2 +- fix service order after switching to real root file system (#1790496, #1790790) + * Mon Jan 06 2020 Dan Horák - 2:2.12.0-1 - rebased to 2.12.0 From 78962171afd7a5d2adaca2b86cd0ac86bd27f720 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 22:43:22 +0000 Subject: [PATCH 015/141] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 1c6fd5a..5c56650 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.12.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -749,6 +749,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 2:2.12.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Jan 14 2020 Dan Horák - 2:2.12.0-2 - fix service order after switching to real root file system (#1790496, #1790790) From 58aa25016ff3b29d598233899e6db1cb41d2316c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 22 Apr 2020 18:56:19 +0200 Subject: [PATCH 016/141] - rebuilt for json-c soname bump --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 5c56650..a95be03 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.12.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -749,6 +749,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Apr 22 2020 Dan Horák - 2:2.12.0-4 +- rebuilt for json-c soname bump + * Thu Jan 30 2020 Fedora Release Engineering - 2:2.12.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 974303a2f31148b49c04c6433c428df3a9401caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 11 May 2020 06:46:04 -0400 Subject: [PATCH 017/141] - rebased to 2.13.0 --- .gitignore | 1 + s390utils.spec | 17 +++++++++++++++-- sources | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 02f9e0b..72bb749 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.10.0.tar.gz /s390-tools-2.11.0.tar.gz /s390-tools-2.12.0.tar.gz +/s390-tools-2.13.0.tar.gz diff --git a/s390utils.spec b/s390utils.spec index a95be03..7ed5074 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.12.0 -Release: 4%{?dist} +Version: 2.13.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -287,6 +287,13 @@ s390 base tools. This collection provides the following utilities: Allows to set the system and sysplex names from the Linux guest to the HMC/SE using the Control Program Identification feature. + * genprotimg: + Tool for the creation of PV images. The image consists of a concatenation of + a plain text boot loader, the encrypted components for kernel, initrd, and + cmdline, and the integrity-protected PV header, containing metadata necessary for + running the guest in PV mode. Protected VMs (PVM) are KVM VMs, where KVM can't + access the VM's state like guest memory and guest registers anymore. + For more information refer to the following publications: * "Device Drivers, Features, and Commands" chapter "Useful Linux commands" * "Using the dump tools" @@ -368,6 +375,7 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_sbindir}/zpcictl %{_bindir}/lscpumf %{_bindir}/dump2tar +%{_bindir}/genprotimg %{_bindir}/vmconvert %{_bindir}/zkey %{_bindir}/zkey-cryptsetup @@ -402,6 +410,7 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_mandir}/man8/dasdview.8* %{_mandir}/man8/dumpconf.8* %{_mandir}/man8/fdasd.8* +%{_mandir}/man8/genprotimg.8.* %{_mandir}/man8/hyptop.8* %{_mandir}/man8/lschp.8* %{_mandir}/man8/lscss.8* @@ -432,6 +441,7 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_mandir}/man8/zpcictl.8* %dir %{_datadir}/s390-tools/ %{_datadir}/s390-tools/cpumf/ +%{_datadir}/s390-tools/genprotimg/ %{_datadir}/s390-tools/netboot/ %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/repository @@ -749,6 +759,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon May 11 2020 Dan Horák - 2:2.13.0-1 +- rebased to 2.13.0 + * Wed Apr 22 2020 Dan Horák - 2:2.12.0-4 - rebuilt for json-c soname bump diff --git a/sources b/sources index 3ec7804..8cb31b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.12.0.tar.gz) = 4903ded5368966513e1090faca04482316870cf5fc53206d17ab98b821541e2836a016bd18cd1ca49ed6b5df0dff92dd1ed257ff712920a7aa3fd74e4a6bc6a0 +SHA512 (s390-tools-2.13.0.tar.gz) = 5c031f46fef91b120cda68a00fd3b867ea1b5bdfda537838e123e721a740597a64c28536879002f7dfd5b2291652066fbbb75f7848f3bb40765e9ef62c642aaa From 1ec03967cbc89eb7ef490c9d33b7df276d4fde99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 11 May 2020 07:22:29 -0400 Subject: [PATCH 018/141] add missing BR --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index 7ed5074..1798f36 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -162,6 +162,7 @@ BuildRequires: glibc-static BuildRequires: cryptsetup-devel >= 2.0.3 BuildRequires: json-c-devel BuildRequires: rpm-devel +BuildRequires: glib2-devel %description base From 5e82789fe78f4ed4de85e4466b9f79bdc9992961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 20 May 2020 13:31:29 +0000 Subject: [PATCH 019/141] - avoid dependency on network-scrips --- ccw_init | 13 +++++++++++-- s390utils.spec | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ccw_init b/ccw_init index a691ae0..23e8ed9 100644 --- a/ccw_init +++ b/ccw_init @@ -24,6 +24,17 @@ get_config_line_by_subchannel() return 1 } +# borrowed from network-scrips, initscripts along with the get_config_by_subchannel +[ -z "$__sed_discard_ignored_files" ] && __sed_discard_ignored_files='/\(~\|\.bak\|\.old\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d' + +get_config_by_subchannel () +{ + LANG=C grep -E -i -l \ + "^[[:space:]]*SUBCHANNELS=['\"]?([0-9]\.[0-9]\.[a-f0-9]+,){0,2}${1}(,[0-9]\.[0-9]\.[a-f0-9]+){0,2}['\"]?([[:space:]]+#|[[:space:]]*$)" \ + /etc/sysconfig/network-scripts/ifcfg-* \ + | LC_ALL=C sed -e "$__sed_discard_ignored_files" +} + CHANNEL=${DEVPATH##*/} if [ $MODE = "dracut" ]; then @@ -49,8 +60,6 @@ if [ $MODE = "dracut" ]; then elif [ $MODE = "normal" ]; then NOLOCALE="yes" - . /etc/sysconfig/network-scripts/network-functions - CONFIG_FILE=$(get_config_by_subchannel $CHANNEL) if [ -n "$CONFIG_FILE" ]; then diff --git a/s390utils.spec b/s390utils.spec index 1798f36..aede4b6 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -152,7 +152,6 @@ Requires: gawk sed coreutils Requires: sysfsutils Requires: sg3_utils Requires: ethtool -Requires: network-scripts Requires: tar %{?systemd_requires} BuildRequires: perl-generators From 6b21143baadab32d50647a37d2d6a56ba8826b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 1 Jun 2020 10:23:32 +0200 Subject: [PATCH 020/141] - avoid dependency on network-scripts (part of PR #4) --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index aede4b6..9879967 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.13.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -759,6 +759,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jun 01 2020 Dan Horák - 2:2.13.0-2 +- avoid dependency on network-scripts (part of PR #4) + * Mon May 11 2020 Dan Horák - 2:2.13.0-1 - rebased to 2.13.0 From e477a92045fc292d9464e597a598e9f0efb34dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 4 Jun 2020 09:44:27 +0000 Subject: [PATCH 021/141] fix build with rpm 4.16 --- s390-tools-zipl-blscfg-rpm-nvr-sort.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index bb8117d..0df804e 100644 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -6,7 +6,7 @@ diff -up s390-tools-2.9.0/zipl/src/Makefile.blscfg-rpm-nvr-sort s390-tools-2.9.0 ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) -libs = $(rootdir)/libutil/libutil.a -+libs = $(rootdir)/libutil/libutil.a -lrpm ++libs = $(rootdir)/libutil/libutil.a -lrpmio objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \ install.o zipl.o $(rootdir)/zipl/boot/data.o From 365ca29316f968e8c05ac0ecde3589288fffa582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 10 Jun 2020 13:59:16 +0000 Subject: [PATCH 022/141] - split off core package with basic functionalities and reduced deps from base sub-package --- s390utils.spec | 134 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 45 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 9879967..cdfc1e7 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.13.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -35,6 +35,7 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch +Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} Requires: s390utils-cpuplugd = %{epoch}:%{version}-%{release} @@ -143,8 +144,82 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %doc README.md # -# ************************* s390-tools base package ************************* +# ************************* s390-tools core package ************************* # +%package core +License: MIT +Summary: S390 base tools +Requires: coreutils +%{?systemd_requires} +# BRs are covered via the base package + + +%description core +This package provides minimal set of tools needed to system to boot. + +%post core +%if 0 +# enable in F-31 +%systemd_post device_cio_free.service +%else +# explicit enable for upgrade patch from s390utils-base < 2.6.0-4 +systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : +%endif +%systemd_post cpi.service + +%preun core +%systemd_preun device_cio_free.service +%systemd_preun cpi.service + +%postun core +%systemd_postun_with_restart cpi.service + +%files core +%doc README.md zdev/src/*.txt +%doc LICENSE +%{_sbindir}/chreipl +%{_sbindir}/chzdev +%{_sbindir}/dasdfmt +%{_sbindir}/device_cio_free +%{_sbindir}/zipl +%dir /lib/s390-tools/ +/lib/s390-tools/{zipl,chreipl}_helper.* +/lib/s390-tools/cpictl +/lib/s390-tools/stage3.bin +/lib/s390-tools/zdev-root-update +/lib/s390-tools/zipl.conf +%ghost %config(noreplace) %{_sysconfdir}/zipl.conf +%{_unitdir}/cpi.service +%config(noreplace) %{_sysconfdir}/sysconfig/cpi +/usr/lib/dracut/modules.d/95zdev/ +%{_mandir}/man5/zipl.conf.5* +%{_mandir}/man8/dasdfmt.8* +%{_mandir}/man8/zipl.8* + +# Additional Redhat specific stuff +%{_sbindir}/dasdconf.sh +%{_sbindir}/normalize_dasd_arg +%{_sbindir}/zfcpconf.sh +%{_unitdir}/device_cio_free.service +/usr/lib/udev/ccw_init +%{_udevrulesdir}/40-z90crypt.rules +%{_udevrulesdir}/56-dasd.rules +%{_udevrulesdir}/56-zfcp.rules +%{_udevrulesdir}/59-dasd.rules +%{_udevrulesdir}/60-readahead.rules +%{_udevrulesdir}/81-ccw.rules +%{_udevrulesdir}/90-cpi.rules +%{_sysconfdir}/kernel/install.d/20-grubby.install +%{_prefix}/lib/kernel/install.d/10-zfcpdump.install +%{_prefix}/lib/kernel/install.d/20-zipl-kernel.install +%{_prefix}/lib/kernel/install.d/52-zipl-rescue.install +%{_prefix}/lib/kernel/install.d/91-zipl.install +%{_prefix}/lib/modules-load.d/s390-pkey.conf + +# +# *********************** s390-tools base package *********************** +# + %package base License: MIT Summary: S390 base tools @@ -153,6 +228,7 @@ Requires: sysfsutils Requires: sg3_utils Requires: ethtool Requires: tar +Requires: s390utils-core = %{epoch}:%{version}-%{release} %{?systemd_requires} BuildRequires: perl-generators BuildRequires: ncurses-devel @@ -283,11 +359,11 @@ s390 base tools. This collection provides the following utilities: - chshut: Change actions which should be done in case of halt, poff, reboot or panic. - * cpi: + * cpi: Allows to set the system and sysplex names from the Linux guest to the HMC/SE using the Control Program Identification feature. - * genprotimg: + * genprotimg: Tool for the creation of PV images. The image consists of a concatenation of a plain text boot loader, the encrypted components for kernel, initrd, and cmdline, and the integrity-protected PV header, containing metadata necessary for @@ -303,23 +379,12 @@ For more information refer to the following publications: getent group zkeyadm > /dev/null || groupadd -r zkeyadm %post base -%systemd_post cpi.service -%if 0 -# enable in F-31 -%systemd_post device_cio_free.service -%else -# explicit enable for upgrade patch from s390utils-base < 2.6.0-4 -systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : -%endif %systemd_post dumpconf.service %preun base -%systemd_preun cpi.service -%systemd_preun device_cio_free.service %systemd_preun dumpconf.service %postun base -%systemd_postun_with_restart cpi.service %systemd_postun_with_restart dumpconf.service %files base @@ -328,12 +393,9 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_sbindir}/chccwdev %{_sbindir}/chchp %{_sbindir}/chcpumf -%{_sbindir}/chreipl %{_sbindir}/chshut %{_sbindir}/chzcrypt -%{_sbindir}/chzdev %{_sbindir}/cio_ignore -%{_sbindir}/dasdfmt %{_sbindir}/dasdinfo %{_sbindir}/dasdstat %{_sbindir}/dasdview @@ -369,7 +431,6 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_sbindir}/zcryptstats %{_sbindir}/zfcpdbf %{_sbindir}/zgetdump -%{_sbindir}/zipl %{_sbindir}/zipl-switch-to-blscfg %{_sbindir}/znetconf %{_sbindir}/zpcictl @@ -379,13 +440,15 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_bindir}/vmconvert %{_bindir}/zkey %{_bindir}/zkey-cryptsetup -%{_unitdir}/cpi.service %{_unitdir}/dumpconf.service %ghost %config(noreplace) %{_sysconfdir}/zipl.conf -%config(noreplace) %{_sysconfdir}/sysconfig/cpi %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf -/lib/s390-tools/ -/usr/lib/dracut/modules.d/95zdev/ +/lib/s390-tools/cpumf_helper +/lib/s390-tools/dumpconf +/lib/s390-tools/lsznet.raw +/lib/s390-tools/zfcpdump +/lib/s390-tools/zfcpdump/zfcpdump-initrd +/lib/s390-tools/znetcontrolunits %{_mandir}/man1/dbginfo.sh.1* %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/lscpumf.1* @@ -395,7 +458,6 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man4/prandom.4* -%{_mandir}/man5/zipl.conf.5* %{_mandir}/man8/chccwdev.8* %{_mandir}/man8/chchp.8* %{_mandir}/man8/chcpumf.8* @@ -404,7 +466,6 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_mandir}/man8/chzcrypt.8* %{_mandir}/man8/chzdev.8* %{_mandir}/man8/cio_ignore.8* -%{_mandir}/man8/dasdfmt.8* %{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/dasdstat.8* %{_mandir}/man8/dasdview.8* @@ -437,7 +498,6 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : %{_mandir}/man8/zcryptstats.8* %{_mandir}/man8/zgetdump.8* %{_mandir}/man8/znetconf.8* -%{_mandir}/man8/zipl.8* %{_mandir}/man8/zpcictl.8* %dir %{_datadir}/s390-tools/ %{_datadir}/s390-tools/cpumf/ @@ -450,28 +510,9 @@ systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : /boot/tape0 %ghost %config(noreplace) %{_sysconfdir}/dasd.conf %ghost %config(noreplace) %{_sysconfdir}/zfcp.conf -%{_sbindir}/dasdconf.sh -%{_sbindir}/zfcpconf.sh %{_sbindir}/dasd_cio_free -%{_sbindir}/device_cio_free %{_sbindir}/zfcp_cio_free %{_sbindir}/znet_cio_free -%{_sbindir}/normalize_dasd_arg -%{_unitdir}/device_cio_free.service -/usr/lib/udev/ccw_init -%{_udevrulesdir}/40-z90crypt.rules -%{_udevrulesdir}/56-zfcp.rules -%{_udevrulesdir}/56-dasd.rules -%{_udevrulesdir}/59-dasd.rules -%{_udevrulesdir}/60-readahead.rules -%{_udevrulesdir}/81-ccw.rules -%{_udevrulesdir}/90-cpi.rules -%{_sysconfdir}/kernel/install.d/20-grubby.install -%{_prefix}/lib/kernel/install.d/10-zfcpdump.install -%{_prefix}/lib/kernel/install.d/20-zipl-kernel.install -%{_prefix}/lib/kernel/install.d/52-zipl-rescue.install -%{_prefix}/lib/kernel/install.d/91-zipl.install -%{_prefix}/lib/modules-load.d/s390-pkey.conf # # *********************** s390-tools osasnmpd package *********************** @@ -759,6 +800,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jun 09 2020 Jakub Čajka - 2:2.13.0-3 +- split off core package with basic functionalities and reduced deps from base sub-package + * Mon Jun 01 2020 Dan Horák - 2:2.13.0-2 - avoid dependency on network-scripts (part of PR #4) From 0aa4b528e1ef322db698dd4a708311acf647ced7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 10 Jun 2020 14:01:12 +0000 Subject: [PATCH 023/141] Clean up systemd post script macros --- s390utils.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index cdfc1e7..f47077b 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -158,13 +158,7 @@ Requires: coreutils This package provides minimal set of tools needed to system to boot. %post core -%if 0 -# enable in F-31 %systemd_post device_cio_free.service -%else -# explicit enable for upgrade patch from s390utils-base < 2.6.0-4 -systemctl --no-reload preset device_cio_free.service >/dev/null 2>&1 || : -%endif %systemd_post cpi.service %preun core From 383f5e27aa3ad4e5f2e82de75c4317122b672bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 11 Jun 2020 11:15:55 +0200 Subject: [PATCH 024/141] update some texts --- s390utils.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index f47077b..ab3769d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -148,7 +148,7 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf # %package core License: MIT -Summary: S390 base tools +Summary: S390 core tools Requires: coreutils %{?systemd_requires} # BRs are covered via the base package @@ -190,7 +190,7 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man8/dasdfmt.8* %{_mandir}/man8/zipl.8* -# Additional Redhat specific stuff +# Additional Fedora/RHEL specific stuff %{_sbindir}/dasdconf.sh %{_sbindir}/normalize_dasd_arg %{_sbindir}/zfcpconf.sh @@ -500,7 +500,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/repository -# Additional Redhat specific stuff +# Additional Fedora/RHEL specific stuff /boot/tape0 %ghost %config(noreplace) %{_sysconfdir}/dasd.conf %ghost %config(noreplace) %{_sysconfdir}/zfcp.conf From f9a139cce4186afc19d6bcae170d4eb0362ed11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 11 Jun 2020 11:19:11 +0200 Subject: [PATCH 025/141] move man pages to core --- s390utils.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index ab3769d..513e663 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -187,6 +187,8 @@ This package provides minimal set of tools needed to system to boot. %config(noreplace) %{_sysconfdir}/sysconfig/cpi /usr/lib/dracut/modules.d/95zdev/ %{_mandir}/man5/zipl.conf.5* +%{_mandir}/man8/chreipl.8* +%{_mandir}/man8/chzdev.8* %{_mandir}/man8/dasdfmt.8* %{_mandir}/man8/zipl.8* @@ -455,10 +457,8 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/chccwdev.8* %{_mandir}/man8/chchp.8* %{_mandir}/man8/chcpumf.8* -%{_mandir}/man8/chreipl.8* %{_mandir}/man8/chshut.8* %{_mandir}/man8/chzcrypt.8* -%{_mandir}/man8/chzdev.8* %{_mandir}/man8/cio_ignore.8* %{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/dasdstat.8* From b8f75bde3c216b8b273bdceff71a3ad84106df92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 11 Jun 2020 11:35:31 +0200 Subject: [PATCH 026/141] move more stuff to core - move {dasd,zfcp}.conf, the installer writes them - move *_cio_free symlinks, used in initrd - move dasdinfo, used in initrd --- s390utils.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 513e663..d231473 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -174,7 +174,7 @@ This package provides minimal set of tools needed to system to boot. %{_sbindir}/chreipl %{_sbindir}/chzdev %{_sbindir}/dasdfmt -%{_sbindir}/device_cio_free +%{_sbindir}/dasdinfo %{_sbindir}/zipl %dir /lib/s390-tools/ /lib/s390-tools/{zipl,chreipl}_helper.* @@ -190,12 +190,19 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man8/chreipl.8* %{_mandir}/man8/chzdev.8* %{_mandir}/man8/dasdfmt.8* +%{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/zipl.8* # Additional Fedora/RHEL specific stuff +%ghost %config(noreplace) %{_sysconfdir}/dasd.conf +%ghost %config(noreplace) %{_sysconfdir}/zfcp.conf %{_sbindir}/dasdconf.sh %{_sbindir}/normalize_dasd_arg %{_sbindir}/zfcpconf.sh +%{_sbindir}/device_cio_free +%{_sbindir}/dasd_cio_free +%{_sbindir}/zfcp_cio_free +%{_sbindir}/znet_cio_free %{_unitdir}/device_cio_free.service /usr/lib/udev/ccw_init %{_udevrulesdir}/40-z90crypt.rules @@ -392,7 +399,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/chshut %{_sbindir}/chzcrypt %{_sbindir}/cio_ignore -%{_sbindir}/dasdinfo %{_sbindir}/dasdstat %{_sbindir}/dasdview %{_sbindir}/dbginfo.sh @@ -460,7 +466,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/chshut.8* %{_mandir}/man8/chzcrypt.8* %{_mandir}/man8/cio_ignore.8* -%{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/dasdstat.8* %{_mandir}/man8/dasdview.8* %{_mandir}/man8/dumpconf.8* @@ -502,11 +507,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm # Additional Fedora/RHEL specific stuff /boot/tape0 -%ghost %config(noreplace) %{_sysconfdir}/dasd.conf -%ghost %config(noreplace) %{_sysconfdir}/zfcp.conf -%{_sbindir}/dasd_cio_free -%{_sbindir}/zfcp_cio_free -%{_sbindir}/znet_cio_free # # *********************** s390-tools osasnmpd package *********************** From 6f6a4deeced5c20e5420e1217a4194976fcc9b49 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Fri, 3 Jul 2020 17:26:20 +0200 Subject: [PATCH 027/141] - add a default entry in zipl.conf if there isn't one present (#1698363) When a kernel-debug package is installed, it should only be set as default if DEFAULTDEBUG=yes is set in /etc/sysconfig/kernel. But currently there's no default field set in /etc/zipl.conf so the implicit order used to sort boot entries is used. The debug kernels contains a +debug suffix which makes them be sorted with more precedence than non-debug kernels by the RPM sorting algorithm: rpm --eval '%{lua: print(rpm.vercmp("4.18.0-193.el8.s390x+debug", "4.18.0-193.el8.s390x"))}' 1 So using the implicit order when a debug kernel is installed and a default is not set leads to a wrong behavior. The zipl kernel-install script attempts to set a default entry if has to, but only if one is present in the zipl.conf file. Take also into account the case when there isn't one to avoid using the implicit sorting and not cover these corner cases like the one with the debug kernel. Resolves: rhbz#1698363 --- 20-zipl-kernel.install | 14 ++++++++++---- s390utils.spec | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 99bfcb9..3487aa2 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -132,8 +132,12 @@ case "$COMMAND" in fi fi - if [ -n "$NEWDEFAULT" ]; then - sed -i -e "s,^default=.*,default=${NEWDEFAULT}," "${ZIPLCFG}" + if [ -n "$NEWDEFAULT" ] && [ -f "${ZIPLCFG}" ]; then + if grep -q "^default=" "${ZIPLCFG}"; then + sed -i -e "s,^default=.*,default=${NEWDEFAULT}," "${ZIPLCFG}" + else + echo "default=${NEWDEFAULT}" >> "${ZIPLCFG}" + fi fi exit 0 @@ -151,8 +155,10 @@ case "$COMMAND" in BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" 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_TARGET}" ] && [ -f "${ZIPLCFG}" ]; then + TITLE="$(grep '^title[ \t]' "${BLS_TARGET}" | sed -e 's/^title[ \t]*//')" + sed -i -e "/^default=${TITLE}/d" "${ZIPLCFG}" + fi if [[ -f "${BLS_DEBUG}" ]]; then TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')" diff --git a/s390utils.spec b/s390utils.spec index d231473..95e0777 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.13.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -794,6 +794,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Jul 03 2020 Javier Martinez Canillas - 2:2.13.0-4 +- add a default entry in zipl.conf if there isn't one present (#1698363) + * Tue Jun 09 2020 Jakub Čajka - 2:2.13.0-3 - split off core package with basic functionalities and reduced deps from base sub-package From 1f19dda30e3c53e3db0ddf7b05239cdc5ecea5f7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 10:09:21 +0000 Subject: [PATCH 028/141] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 95e0777..6bc49a3 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.13.0 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -794,6 +794,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 2:2.13.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jul 03 2020 Javier Martinez Canillas - 2:2.13.0-4 - add a default entry in zipl.conf if there isn't one present (#1698363) From a9bf2dafebfc8c001d5bef194edc7223ff395e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 25 Aug 2020 09:44:19 +0200 Subject: [PATCH 029/141] - rebased to 2.14.0 --- .gitignore | 1 + s390utils.spec | 13 +++++++------ sources | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 72bb749..71b03c5 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.11.0.tar.gz /s390-tools-2.12.0.tar.gz /s390-tools-2.13.0.tar.gz +/s390-tools-2.14.0.tar.gz diff --git a/s390utils.spec b/s390utils.spec index 6bc49a3..7f475cb 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.13.0 -Release: 5%{?dist} +Version: 2.14.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -235,7 +235,6 @@ Requires: s390utils-core = %{epoch}:%{version}-%{release} %{?systemd_requires} BuildRequires: perl-generators BuildRequires: ncurses-devel -BuildRequires: libpfm-devel BuildRequires: glibc-static BuildRequires: cryptsetup-devel >= 2.0.3 BuildRequires: json-c-devel @@ -406,6 +405,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/hyptop %{_sbindir}/ip_watcher.pl %{_sbindir}/lschp +%{_sbindir}/lscpumf %{_sbindir}/lscss %{_sbindir}/lsdasd %{_sbindir}/lsqeth @@ -436,7 +436,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/zipl-switch-to-blscfg %{_sbindir}/znetconf %{_sbindir}/zpcictl -%{_bindir}/lscpumf %{_bindir}/dump2tar %{_bindir}/genprotimg %{_bindir}/vmconvert @@ -445,7 +444,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_unitdir}/dumpconf.service %ghost %config(noreplace) %{_sysconfdir}/zipl.conf %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf -/lib/s390-tools/cpumf_helper /lib/s390-tools/dumpconf /lib/s390-tools/lsznet.raw /lib/s390-tools/zfcpdump @@ -499,7 +497,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/znetconf.8* %{_mandir}/man8/zpcictl.8* %dir %{_datadir}/s390-tools/ -%{_datadir}/s390-tools/cpumf/ %{_datadir}/s390-tools/genprotimg/ %{_datadir}/s390-tools/netboot/ %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey @@ -719,6 +716,7 @@ This package contains the CMS file system based on FUSE. %package zdsfs Summary: z/OS data set access based on FUSE BuildRequires: fuse-devel +BuildRequires: libcurl-devel Requires: fuse %description zdsfs @@ -794,6 +792,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Aug 25 2020 Dan Horák - 2:2.14.0-1 +- rebased to 2.14.0 + * Wed Jul 29 2020 Fedora Release Engineering - 2:2.13.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 8cb31b6..d34532c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.13.0.tar.gz) = 5c031f46fef91b120cda68a00fd3b867ea1b5bdfda537838e123e721a740597a64c28536879002f7dfd5b2291652066fbbb75f7848f3bb40765e9ef62c642aaa +SHA512 (s390-tools-2.14.0.tar.gz) = 0593db28762689cdd432cfeab0676e96882299c551d09a6b516cb1a6d34fcc0e6cff2d98d34f71cb32feb2cd44328ded7d722db8da43c8e4b0606650c20d9fe0 From a895d0c8be8a244bbd4211d86b888a3b70f0c12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 26 Aug 2020 10:49:18 +0200 Subject: [PATCH 030/141] - add support for auto LUN scan to zfcpconf.sh (#1552697) --- s390utils.spec | 5 ++++- zfcpconf.sh | 24 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 7f475cb..a9d7600 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.14.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -792,6 +792,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Aug 25 2020 Dan Horák - 2:2.14.0-2 +- add support for auto LUN scan to zfcpconf.sh (#1552697) + * Tue Aug 25 2020 Dan Horák - 2:2.14.0-1 - rebased to 2.14.0 diff --git a/zfcpconf.sh b/zfcpconf.sh index 45d10a1..8dc05ad 100644 --- a/zfcpconf.sh +++ b/zfcpconf.sh @@ -2,10 +2,12 @@ # config file syntax: # deviceno WWPN FCPLUN +# deviceno # allowed when auto LUN scan is enabled and port is in NPIV mode # # Example: # 0.0.4000 0x5005076300C213e9 0x5022000000000000 # 0.0.4001 0x5005076300c213e9 0x5023000000000000 +# 0.0.5000 # # # manual setup: @@ -21,6 +23,14 @@ CONFIG=/etc/zfcp.conf PATH=/bin:/sbin +set_online() +{ + DEVICE=$1 + + [ `cat /sys/bus/ccw/drivers/zfcp/${DEVICE}/online` = "0" ] \ + && echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online +} + if [ -f "$CONFIG" ]; then if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then modprobe zfcp @@ -34,6 +44,17 @@ if [ -f "$CONFIG" ]; then *) [ -z "$line" ] && continue set $line + if [ $# -eq 1 ]; then + DEVICE=${1##*0x} + if [ `cat /sys/module/zfcp/parameters/allow_lun_scan` = "Y" ]; then + set_online ${DEVICE} + grep -q NPIV /sys/bus/ccw/devices/${DEVICE}/host*/fc_host/host*/port_type || \ + echo "Error: Only device ID (${DEVICE}) given, but port not in NPIV mode" + else + echo "Error: Only device ID (${DEVICE}) given, but LUN scan is disabled for the zfcp module" + fi + continue + fi if [ $# -eq 5 ]; then DEVICE=$1 SCSIID=$2 @@ -46,8 +67,7 @@ if [ -f "$CONFIG" ]; then WWPN=$2 FCPLUN=$3 fi - [ `cat /sys/bus/ccw/drivers/zfcp/${DEVICE}/online` = "0" ] \ - && echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online + set_online ${DEVICE} [ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/${FCPLUN} ] \ && echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/unit_add ;; From cf1344b04d8a3fa2109f386a1c0ed80cb21431e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 26 Aug 2020 10:50:18 +0200 Subject: [PATCH 031/141] fix date in changelog --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index a9d7600..e99ee09 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -792,7 +792,7 @@ User-space development files for the s390/s390x architecture. %changelog -* Wed Aug 25 2020 Dan Horák - 2:2.14.0-2 +* Wed Aug 26 2020 Dan Horák - 2:2.14.0-2 - add support for auto LUN scan to zfcpconf.sh (#1552697) * Tue Aug 25 2020 Dan Horák - 2:2.14.0-1 From 83bfc0e7d77a32424b29ce3a1116250dc71b66a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 21 Sep 2020 17:38:11 +0200 Subject: [PATCH 032/141] - rebuilt for net-snmp 5.9 --- s390utils.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/s390utils.spec b/s390utils.spec index e99ee09..476e9b1 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -792,6 +792,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Sep 21 2020 Dan Horák - 2:2.14.0-3 +- rebuilt for net-snmp 5.9 + * Wed Aug 26 2020 Dan Horák - 2:2.14.0-2 - add support for auto LUN scan to zfcpconf.sh (#1552697) From 2f9ebbc0ab87b0dcafff7053abea69b36b7b6f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 21 Sep 2020 17:38:52 +0200 Subject: [PATCH 033/141] bump release --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 476e9b1..62c68c4 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.14.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x From 1b3563184907d74fc54a3ae6c0393d330c2a79fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 7 Oct 2020 15:09:59 +0200 Subject: [PATCH 034/141] - update scripts for https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh --- ccw_init | 17 ++++++++++++++++- device_cio_free | 8 ++++++++ s390utils.spec | 5 ++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ccw_init b/ccw_init index 23e8ed9..3703eaf 100644 --- a/ccw_init +++ b/ccw_init @@ -35,6 +35,14 @@ get_config_by_subchannel () | LC_ALL=C sed -e "$__sed_discard_ignored_files" } +get_config_by_subchannel_nm () +{ + LANG=C grep -E -i -l \ + "^s390-subchannels=([0-9]\.[0-9]\.[a-f0-9]+;){0,2}${1};([0-9]\.[0-9]\.[a-f0-9]+;){0,2}$" \ + /etc/NetworkManager/system-connections/*.nmconnection \ + | LC_ALL=C sed -e "$__sed_discard_ignored_files" +} + CHANNEL=${DEVPATH##*/} if [ $MODE = "dracut" ]; then @@ -65,7 +73,14 @@ elif [ $MODE = "normal" ]; then if [ -n "$CONFIG_FILE" ]; then . $CONFIG_FILE else - exit 1 + CONFIG_FILE=$(get_config_by_subchannel_nm $CHANNEL) + if [ -n "$CONFIG_FILE" ]; then + NETTYPE=$(sed -nr "/^\[ethernet\]/ { :l /^s390-nettype[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE) + SUBCHANNELS=$(sed -nr "/^\[ethernet\]/ { :l /^s390-subchannels[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE | sed -e "s/;/,/g" -e "s/,$//") + LAYER2=$(sed -nr "/^\[ethernet-s390-options\]/ { :l /^layer2[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE) + else + exit 1 + fi fi else echo "Unknown mode=$MODE" diff --git a/device_cio_free b/device_cio_free index cd2b21f..cfdced0 100644 --- a/device_cio_free +++ b/device_cio_free @@ -306,6 +306,14 @@ if [ $MODE_ZNET ]; then eval "$line" free_device $SUBCHANNELS done + for line in $(LANG=C grep -E -i -h \ + "^s390-subchannels=([0-9]\.[0-9]\.[a-f0-9]+;){2,3}$" \ + $( (ls /etc/NetworkManager/system-connections/*.nmconnection 2> /dev/null || echo "__no_config_file") | \ + LC_ALL=C sed -e "$__sed_discard_ignored_files") 2> /dev/null) + do + SUBCHANNELS="$(echo $line | sed -e "s/s390-subchannels=//" -e "s/;/,/g")" + free_device $SUBCHANNELS + done fi [ -z "$ALL_DEVICES" ] && exit 0 diff --git a/s390utils.spec b/s390utils.spec index 62c68c4..72fb070 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.14.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -792,6 +792,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Oct 07 2020 Dan Horák - 2:2.14.0-4 +- update scripts for https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh + * Mon Sep 21 2020 Dan Horák - 2:2.14.0-3 - rebuilt for net-snmp 5.9 From 2ff6f78332a90511d2646857bbdd5489bc204059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 26 Oct 2020 11:16:40 +0100 Subject: [PATCH 035/141] move cio_ignore to core Seems dracut needs cio_ignore when creating initrd during kernel installation. --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 72fb070..27f8ab6 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -173,6 +173,7 @@ This package provides minimal set of tools needed to system to boot. %doc LICENSE %{_sbindir}/chreipl %{_sbindir}/chzdev +%{_sbindir}/cio_ignore %{_sbindir}/dasdfmt %{_sbindir}/dasdinfo %{_sbindir}/zipl @@ -397,7 +398,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/chcpumf %{_sbindir}/chshut %{_sbindir}/chzcrypt -%{_sbindir}/cio_ignore %{_sbindir}/dasdstat %{_sbindir}/dasdview %{_sbindir}/dbginfo.sh From 1cc3998852bc9b9e7a4b1ce03ab48b2350515919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 27 Oct 2020 10:17:25 +0000 Subject: [PATCH 036/141] - rebased to 2.15.0 --- .gitignore | 1 + s390-tools-2.15.0-ekmfweb.patch | 260 ++++++++++++++++++++++++++++++++ s390utils.spec | 31 +++- sources | 2 +- 4 files changed, 286 insertions(+), 8 deletions(-) create mode 100644 s390-tools-2.15.0-ekmfweb.patch diff --git a/.gitignore b/.gitignore index 71b03c5..e9c1f45 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.12.0.tar.gz /s390-tools-2.13.0.tar.gz /s390-tools-2.14.0.tar.gz +/s390-tools-2.15.0.tar.gz diff --git a/s390-tools-2.15.0-ekmfweb.patch b/s390-tools-2.15.0-ekmfweb.patch new file mode 100644 index 0000000..5c6b711 --- /dev/null +++ b/s390-tools-2.15.0-ekmfweb.patch @@ -0,0 +1,260 @@ +From 4a1979de79d9de48a44538f856f1d50f398541a8 Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Thu, 22 Oct 2020 11:10:54 +0200 +Subject: [PATCH] zkey: Add library versioning for libekmfweb and zkey-ekmfweb +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Closes: https://github.com/ibm-s390-tools/s390-tools/issues/93 + +Signed-off-by: Ingo Franzki +Reviewed-by: Jan Höppner +--- + .gitignore | 3 +++ + common.mak | 6 +++--- + libekmfweb/Makefile | 29 ++++++++++++++++++----------- + zkey/ekmfweb/Makefile | 22 +++++++++++++++------- + zkey/kms.c | 33 +++++++++++++++++++++++---------- + 5 files changed, 62 insertions(+), 31 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 0a0cbe5a..40bb2a55 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -37,6 +37,8 @@ iucvterm/test/test_afiucv + libekmfweb/check-dep-libekmfweb + libekmfweb/detect-openssl-version.dep + libekmfweb/libekmfweb.so ++libekmfweb/libekmfweb.so.1 ++libekmfweb/libekmfweb.so.1.0 + libutil/util_base_example + libutil/util_file_example + libutil/util_libc_example +@@ -97,6 +99,7 @@ zipl/src/zipl_helper.device-mapper + zkey/check-dep-zkey + zkey/check-dep-zkey-cryptsetup + zkey/detect-libcryptsetup.dep ++zkey/ekmfweb/libekmfweb.dep + zkey/ekmfweb/zkey-ekmfweb.so + zkey/zkey + zkey/zkey-cryptsetup +diff --git a/common.mak b/common.mak +index fa99c514..b413b66f 100644 +--- a/common.mak ++++ b/common.mak +@@ -163,7 +163,7 @@ USRSBINDIR = $(INSTALLDIR)/usr/sbin + USRBINDIR = $(INSTALLDIR)/usr/bin + BINDIR = $(INSTALLDIR)/sbin + LIBDIR = $(INSTALLDIR)/lib +-LIB64DIR = $(INSTALLDIR)/lib64 ++USRLIB64DIR = $(INSTALLDIR)/usr/lib64 + SYSCONFDIR = $(INSTALLDIR)/etc + MANDIR = $(INSTALLDIR)/usr/share/man + VARDIR = $(INSTALLDIR)/var +@@ -179,10 +179,10 @@ INSTDIRS = $(USRSBINDIR) $(USRBINDIR) $(BINDIR) $(LIBDIR) $(MANDIR) \ + $(SYSCONFDIR) $(SYSCONFDIR)/sysconfig \ + $(TOOLS_LIBDIR) $(TOOLS_DATADIR) \ + $(ZFCPDUMP_DIR) $(SYSTEMDSYSTEMUNITDIR) \ +- $(LIB64DIR) $(USRINCLUDEDIR) ++ $(USRLIB64DIR) $(USRINCLUDEDIR) + OWNER = $(shell id -un) + GROUP = $(shell id -gn) +-export INSTALLDIR BINDIR LIBDIR LIB64DIR MANDIR OWNER GROUP ++export INSTALLDIR BINDIR LIBDIR USRLIB64DIR MANDIR OWNER GROUP + + # Special defines for zfcpdump + ZFCPDUMP_IMAGE = zfcpdump-image +diff --git a/libekmfweb/Makefile b/libekmfweb/Makefile +index 0212398c..50a22669 100644 +--- a/libekmfweb/Makefile ++++ b/libekmfweb/Makefile +@@ -1,10 +1,13 @@ + include ../common.mak + ++VERSION = 1.0 ++VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) ++ + ifneq (${HAVE_OPENSSL},0) + ifneq (${HAVE_JSONC},0) + ifneq (${HAVE_LIBCURL},0) +- BUILD_TARGETS += libekmfweb.so +- INSTALL_TARGETS += install-libekmfweb.so ++ BUILD_TARGETS += libekmfweb.so.$(VERSION) ++ INSTALL_TARGETS += install-libekmfweb.so.$(VERSION) + else + BUILD_TARGETS += skip-libekmfweb-curl + INSTALL_TARGETS += skip-libekmfweb-curl +@@ -64,22 +67,26 @@ ekmfweb.o: check-dep-libekmfweb ekmfweb.c utilities.h cca.h $(rootdir)include/ek + utilities.o: check-dep-libekmfweb utilities.c utilities.h $(rootdir)include/ekmfweb/ekmfweb.h + cca.o: check-dep-libekmfweb cca.c cca.h utilities.h $(rootdir)include/ekmfweb/ekmfweb.h + +-libekmfweb.so: ALL_CFLAGS += -fPIC +-libekmfweb.so: LDLIBS = -ljson-c -lcrypto -lssl -lcurl -ldl -shared +-libekmfweb.so: LDFLAGS = -shared -Wl,--version-script=libekmfweb.map \ +- -Wl,-z,defs,-Bsymbolic +-libekmfweb.so: ekmfweb.o utilities.o cca.o ++libekmfweb.so.$(VERSION): ALL_CFLAGS += -fPIC ++libekmfweb.so.$(VERSION): LDLIBS = -ljson-c -lcrypto -lssl -lcurl -ldl ++libekmfweb.so.$(VERSION): ALL_LDFLAGS += -shared -Wl,--version-script=libekmfweb.map \ ++ -Wl,-z,defs,-Bsymbolic -Wl,-soname,libekmfweb.so.$(VERM) ++libekmfweb.so.$(VERSION): ekmfweb.o utilities.o cca.o + $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@ ++ ln -srf libekmfweb.so.$(VERSION) libekmfweb.so.$(VERM) ++ ln -srf libekmfweb.so.$(VERSION) libekmfweb.so + +-install-libekmfweb.so: libekmfweb.so +- $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T libekmfweb.so $(DESTDIR)$(LIB64DIR)/libekmfweb.so ++install-libekmfweb.so.$(VERSION): libekmfweb.so.$(VERSION) ++ $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T libekmfweb.so.$(VERSION) $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERSION) ++ ln -srf $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERSION) $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERM) ++ ln -srf $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERSION) $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so + $(INSTALL) -d -m 770 $(DESTDIR)$(USRINCLUDEDIR)/ekmfweb + $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 $(rootdir)include/ekmfweb/ekmfweb.h $(DESTDIR)$(USRINCLUDEDIR)/ekmfweb + + install: all $(INSTALL_TARGETS) + + clean: +- rm -f *.o libekmfweb.so check-dep-libekmfweb detect-openssl-version.dep ++ rm -f *.o libekmfweb.so* check-dep-libekmfweb detect-openssl-version.dep + + .PHONY: all install clean skip-libekmfweb-openssl skip-libekmfweb-jsonc \ +- skip-libekmfweb-curl install-libekmfweb.so ++ skip-libekmfweb-curl install-libekmfweb.so.$(VERSION) +diff --git a/zkey/ekmfweb/Makefile b/zkey/ekmfweb/Makefile +index 42e3937f..79a16cb5 100644 +--- a/zkey/ekmfweb/Makefile ++++ b/zkey/ekmfweb/Makefile +@@ -1,5 +1,8 @@ + include ../../common.mak + ++VERSION = 1.0 ++VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) ++ + all: zkey-ekmfweb.so + + libs = $(rootdir)/libutil/libutil.a +@@ -8,7 +11,7 @@ export LIBRARY_PATH = $(rootdir)/libekmfweb:$LIBRARY_PATH + + zkey-ekmfweb.o: zkey-ekmfweb.c zkey-ekmfweb.h ../kms-plugin.h \ + ../cca.h ../utils.h ../pkey.h ../properties.h \ +- $(rootdir)include/ekmfweb/ekmfweb.h $(rootdir)/libekmfweb/libekmfweb.so ++ $(rootdir)include/ekmfweb/ekmfweb.h libekmfweb.dep + + properties.o: ../properties.c ../properties.h + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@ +@@ -26,9 +29,9 @@ utils.o: ../utils.c ../utils.h ../pkey.h ../cca.h ../ep11.h + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@ + + zkey-ekmfweb.so: ALL_CFLAGS += -fPIC +-zkey-ekmfweb.so: LDLIBS = -lekmfweb -ldl -lcrypto -shared +-zkey-ekmfweb.so: LDFLAGS = -shared -Wl,--version-script=zkey-ekmfweb.map \ +- -Wl,-z,defs,-Bsymbolic ++zkey-ekmfweb.so: LDLIBS = -lekmfweb -ldl -lcrypto ++zkey-ekmfweb.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-ekmfweb.map \ ++ -Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.$(VERM) + zkey-ekmfweb.so: zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o $(libs) + $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@ + +@@ -36,13 +39,18 @@ install-libekmfweb.dep: + $(MAKE) -C $(rootdir)/libekmfweb/ TOPDIR=$(TOPDIR) ARCH=$(ARCH) install + touch install-libekmfweb.dep + ++libekmfweb.dep: ++ $(MAKE) -C $(rootdir)/libekmfweb/ TOPDIR=$(TOPDIR) ARCH=$(ARCH) all ++ touch libekmfweb.dep ++ + install: all install-libekmfweb.dep zkey-ekmfweb.so + $(INSTALL) -d -m 755 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL) -m 644 -c zkey-ekmfweb.1 $(DESTDIR)$(MANDIR)/man1 +- $(INSTALL) -d -m 755 $(DESTDIR)$(LIB64DIR) +- $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T zkey-ekmfweb.so $(DESTDIR)$(LIB64DIR)/zkey-ekmfweb.so ++ $(INSTALL) -d -m 755 $(DESTDIR)$(USRLIB64DIR) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(USRLIB64DIR)/zkey ++ $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T zkey-ekmfweb.so $(DESTDIR)$(USRLIB64DIR)/zkey/zkey-ekmfweb.so + + clean: +- rm -f *.o zkey-ekmfweb.so install-libekmfweb.dep ++ rm -f *.o zkey-ekmfweb.so install-libekmfweb.dep libekmfweb.dep + + .PHONY: all install clean +\ No newline at end of file +diff --git a/zkey/kms.c b/zkey/kms.c +index 46427e6e..b2ce165a 100644 +--- a/zkey/kms.c ++++ b/zkey/kms.c +@@ -40,6 +40,7 @@ + + #define ENVVAR_ZKEY_KMS_PLUGINS "ZKEY_KMS_PLUGINS" + #define DEFAULT_KMS_PLUGINS "/etc/zkey/kms-plugins.conf" ++#define KMS_PLUGIN_LOCATION "/usr/lib64/zkey" + + #define KMS_CONFIG_FILE "kms.conf" + #define KMS_CONFIG_PROP_KMS "kms" +@@ -209,6 +210,7 @@ static int load_kms_plugin(const char *plugin, + void **plugin_lib, char **plugin_name, bool verbose) + { + kms_get_functions_t _kms_get_functions; ++ char load_so_name[PATH_MAX]; + char *so_name = NULL; + FILE *fp = NULL; + char line[4096]; +@@ -258,15 +260,26 @@ static int load_kms_plugin(const char *plugin, + goto out; + } + ++ /* Try to load via LD_LIBRARY_PATH first */ ++ snprintf(load_so_name, sizeof(load_so_name), "%s", so_name); + pr_verbose(verbose, "Loading KMS plugin '%s': '%s'", *plugin_name, +- so_name); +- *plugin_lib = dlopen(so_name, RTLD_GLOBAL | RTLD_NOW); ++ load_so_name); ++ *plugin_lib = dlopen(load_so_name, RTLD_GLOBAL | RTLD_NOW); + if (*plugin_lib == NULL) { +- pr_verbose(verbose, "%s", dlerror()); +- warnx("Failed to load KMS plugin '%s': '%s'", *plugin_name, +- so_name); +- rc = -ELIBACC; +- goto out; ++ /* Try to load from default plugin location */ ++ snprintf(load_so_name, sizeof(load_so_name), "%s/%s", ++ KMS_PLUGIN_LOCATION, so_name); ++ pr_verbose(verbose, "Loading KMS plugin '%s': '%s'", ++ *plugin_name, load_so_name); ++ ++ *plugin_lib = dlopen(load_so_name, RTLD_GLOBAL | RTLD_NOW); ++ if (*plugin_lib == NULL) { ++ pr_verbose(verbose, "%s", dlerror()); ++ warnx("Failed to load KMS plugin '%s': '%s'", ++ *plugin_name, load_so_name); ++ rc = -ELIBACC; ++ goto out; ++ } + } + + _kms_get_functions = (kms_get_functions_t)dlsym(*plugin_lib, +@@ -274,7 +287,7 @@ static int load_kms_plugin(const char *plugin, + if (_kms_get_functions == NULL) { + pr_verbose(verbose, "%s", dlerror()); + warnx("Failed to load KMS plugin '%s': '%s'", *plugin_name, +- so_name); ++ load_so_name); + rc = -ELIBACC; + goto out; + } +@@ -283,13 +296,13 @@ static int load_kms_plugin(const char *plugin, + if (*kms_functions == NULL) { + pr_verbose(verbose, "kms_get_functions() reutned NULL"); + warnx("Failed to load KMS plugin '%s': '%s'", *plugin_name, +- so_name); ++ load_so_name); + rc = -ELIBACC; + goto out; + } + + pr_verbose(verbose, "Successfully loaded KMS plugin '%s': '%s' (API " +- "version: %u)", *plugin_name, so_name, ++ "version: %u)", *plugin_name, load_so_name, + (*kms_functions)->api_version); + + out: diff --git a/s390utils.spec b/s390utils.spec index 27f8ab6..23a54c8 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.14.0 -Release: 4%{?dist} +Version: 2.15.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -35,6 +35,10 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch +# https://github.com/ibm-s390-tools/s390-tools/issues/93 +# https://github.com/ifranzki/s390-tools/commit/4a1979de79d9de48a44538f856f1d50f398541a8 +Patch100: s390-tools-2.15.0-ekmfweb.patch + Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} @@ -60,6 +64,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort +%patch100 -p1 -b .ekmfweb # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' @@ -169,7 +174,7 @@ This package provides minimal set of tools needed to system to boot. %systemd_postun_with_restart cpi.service %files core -%doc README.md zdev/src/*.txt +%doc README.md zdev/src/chzdev_usage.txt %doc LICENSE %{_sbindir}/chreipl %{_sbindir}/chzdev @@ -391,8 +396,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %systemd_postun_with_restart dumpconf.service %files base -%doc README.md zdev/src/*.txt -%doc LICENSE +%doc README.md zdev/src/lszdev_usage.txt %{_sbindir}/chccwdev %{_sbindir}/chchp %{_sbindir}/chcpumf @@ -413,6 +417,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/lsreipl %{_sbindir}/lsscm %{_sbindir}/lsshut +%{_sbindir}/lsstp %{_sbindir}/lstape %{_sbindir}/lszcrypt %{_sbindir}/lszdev @@ -446,9 +451,11 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf /lib/s390-tools/dumpconf /lib/s390-tools/lsznet.raw -/lib/s390-tools/zfcpdump +%dir /lib/s390-tools/zfcpdump /lib/s390-tools/zfcpdump/zfcpdump-initrd /lib/s390-tools/znetcontrolunits +%{_libdir}/libekmfweb.so.* +%{_libdir}/zkey/zkey-ekmfweb.so %{_mandir}/man1/dbginfo.sh.1* %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/lscpumf.1* @@ -457,6 +464,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man1/zipl-switch-to-blscfg.1* %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* +%{_mandir}/man1/zkey-ekmfweb.1* %{_mandir}/man4/prandom.4* %{_mandir}/man8/chccwdev.8* %{_mandir}/man8/chchp.8* @@ -478,6 +486,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/lsreipl.8* %{_mandir}/man8/lsscm.8* %{_mandir}/man8/lsshut.8* +%{_mandir}/man8/lsstp.8* %{_mandir}/man8/lstape.8* %{_mandir}/man8/lszcrypt.8* %{_mandir}/man8/lszdev.8* @@ -501,6 +510,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_datadir}/s390-tools/netboot/ %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/repository +%config(noreplace) %attr(0660,root,zkeyadm)%{_sysconfdir}/zkey/kms-plugins.conf # Additional Fedora/RHEL specific stuff /boot/tape0 @@ -784,14 +794,21 @@ getent group cpacfstats >/dev/null || groupadd -r cpacfstats %package devel Summary: Development files +Requires: %{name}-base%{?_isa} = %{version}-%{release} + %description devel User-space development files for the s390/s390x architecture. %files devel -%{_includedir}/%{name} +%{_includedir}/%{name}/ +%{_includedir}/ekmfweb/ +%{_libdir}/libekmfweb.so %changelog +* Tue Oct 27 2020 Dan Horák - 2:2.15.0-1 +- rebased to 2.15.0 + * Wed Oct 07 2020 Dan Horák - 2:2.14.0-4 - update scripts for https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh diff --git a/sources b/sources index d34532c..bcccc0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.14.0.tar.gz) = 0593db28762689cdd432cfeab0676e96882299c551d09a6b516cb1a6d34fcc0e6cff2d98d34f71cb32feb2cd44328ded7d722db8da43c8e4b0606650c20d9fe0 +SHA512 (s390-tools-2.15.0.tar.gz) = 33056a8ab22a7ea4cfde0a8b93f433e8aca2ff89679c8281a6639081a9eff173f7610b0d0025cb2adfc927cc9b8b830b4f4aba7b73f29dd53051def70478a003 From 4a5ecf837bebd3a1458058800ddee3331e5c907a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 28 Oct 2020 08:04:41 +0000 Subject: [PATCH 037/141] - move mk-s390image to /usr/bin --- s390utils.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 23a54c8..e4bd33b 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -99,6 +99,9 @@ else fi %endif +# move tools to searchable dir +mv %{buildroot}%{_datadir}/s390-tools/netboot/mk-s390image %{buildroot}%{_bindir} + mkdir -p %{buildroot}{/boot,%{_udevrulesdir},%{_sysconfdir}/{profile.d,sysconfig},%{_prefix}/lib/modules-load.d} install -p -m 644 zipl/boot/tape0.bin %{buildroot}/boot/tape0 install -p -m 755 %{SOURCE5} %{buildroot}%{_sbindir} @@ -443,6 +446,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/zpcictl %{_bindir}/dump2tar %{_bindir}/genprotimg +%{_bindir}/mk-s390image %{_bindir}/vmconvert %{_bindir}/zkey %{_bindir}/zkey-cryptsetup @@ -806,6 +810,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Oct 28 2020 Dan Horák - 2:2.15.0-2 +- move mk-s390image to /usr/bin + * Tue Oct 27 2020 Dan Horák - 2:2.15.0-1 - rebased to 2.15.0 From 0450181b8e943aa7eb632e7518e9407880ee2550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 29 Oct 2020 07:38:46 +0000 Subject: [PATCH 038/141] - rebased to 2.15.1 --- .gitignore | 1 + s390-tools-2.15.0-ekmfweb.patch | 260 -------------------------------- s390utils.spec | 13 +- sources | 2 +- 4 files changed, 7 insertions(+), 269 deletions(-) delete mode 100644 s390-tools-2.15.0-ekmfweb.patch diff --git a/.gitignore b/.gitignore index e9c1f45..52c737a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.13.0.tar.gz /s390-tools-2.14.0.tar.gz /s390-tools-2.15.0.tar.gz +/s390-tools-2.15.1.tar.gz diff --git a/s390-tools-2.15.0-ekmfweb.patch b/s390-tools-2.15.0-ekmfweb.patch deleted file mode 100644 index 5c6b711..0000000 --- a/s390-tools-2.15.0-ekmfweb.patch +++ /dev/null @@ -1,260 +0,0 @@ -From 4a1979de79d9de48a44538f856f1d50f398541a8 Mon Sep 17 00:00:00 2001 -From: Ingo Franzki -Date: Thu, 22 Oct 2020 11:10:54 +0200 -Subject: [PATCH] zkey: Add library versioning for libekmfweb and zkey-ekmfweb -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Closes: https://github.com/ibm-s390-tools/s390-tools/issues/93 - -Signed-off-by: Ingo Franzki -Reviewed-by: Jan Höppner ---- - .gitignore | 3 +++ - common.mak | 6 +++--- - libekmfweb/Makefile | 29 ++++++++++++++++++----------- - zkey/ekmfweb/Makefile | 22 +++++++++++++++------- - zkey/kms.c | 33 +++++++++++++++++++++++---------- - 5 files changed, 62 insertions(+), 31 deletions(-) - -diff --git a/.gitignore b/.gitignore -index 0a0cbe5a..40bb2a55 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -37,6 +37,8 @@ iucvterm/test/test_afiucv - libekmfweb/check-dep-libekmfweb - libekmfweb/detect-openssl-version.dep - libekmfweb/libekmfweb.so -+libekmfweb/libekmfweb.so.1 -+libekmfweb/libekmfweb.so.1.0 - libutil/util_base_example - libutil/util_file_example - libutil/util_libc_example -@@ -97,6 +99,7 @@ zipl/src/zipl_helper.device-mapper - zkey/check-dep-zkey - zkey/check-dep-zkey-cryptsetup - zkey/detect-libcryptsetup.dep -+zkey/ekmfweb/libekmfweb.dep - zkey/ekmfweb/zkey-ekmfweb.so - zkey/zkey - zkey/zkey-cryptsetup -diff --git a/common.mak b/common.mak -index fa99c514..b413b66f 100644 ---- a/common.mak -+++ b/common.mak -@@ -163,7 +163,7 @@ USRSBINDIR = $(INSTALLDIR)/usr/sbin - USRBINDIR = $(INSTALLDIR)/usr/bin - BINDIR = $(INSTALLDIR)/sbin - LIBDIR = $(INSTALLDIR)/lib --LIB64DIR = $(INSTALLDIR)/lib64 -+USRLIB64DIR = $(INSTALLDIR)/usr/lib64 - SYSCONFDIR = $(INSTALLDIR)/etc - MANDIR = $(INSTALLDIR)/usr/share/man - VARDIR = $(INSTALLDIR)/var -@@ -179,10 +179,10 @@ INSTDIRS = $(USRSBINDIR) $(USRBINDIR) $(BINDIR) $(LIBDIR) $(MANDIR) \ - $(SYSCONFDIR) $(SYSCONFDIR)/sysconfig \ - $(TOOLS_LIBDIR) $(TOOLS_DATADIR) \ - $(ZFCPDUMP_DIR) $(SYSTEMDSYSTEMUNITDIR) \ -- $(LIB64DIR) $(USRINCLUDEDIR) -+ $(USRLIB64DIR) $(USRINCLUDEDIR) - OWNER = $(shell id -un) - GROUP = $(shell id -gn) --export INSTALLDIR BINDIR LIBDIR LIB64DIR MANDIR OWNER GROUP -+export INSTALLDIR BINDIR LIBDIR USRLIB64DIR MANDIR OWNER GROUP - - # Special defines for zfcpdump - ZFCPDUMP_IMAGE = zfcpdump-image -diff --git a/libekmfweb/Makefile b/libekmfweb/Makefile -index 0212398c..50a22669 100644 ---- a/libekmfweb/Makefile -+++ b/libekmfweb/Makefile -@@ -1,10 +1,13 @@ - include ../common.mak - -+VERSION = 1.0 -+VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) -+ - ifneq (${HAVE_OPENSSL},0) - ifneq (${HAVE_JSONC},0) - ifneq (${HAVE_LIBCURL},0) -- BUILD_TARGETS += libekmfweb.so -- INSTALL_TARGETS += install-libekmfweb.so -+ BUILD_TARGETS += libekmfweb.so.$(VERSION) -+ INSTALL_TARGETS += install-libekmfweb.so.$(VERSION) - else - BUILD_TARGETS += skip-libekmfweb-curl - INSTALL_TARGETS += skip-libekmfweb-curl -@@ -64,22 +67,26 @@ ekmfweb.o: check-dep-libekmfweb ekmfweb.c utilities.h cca.h $(rootdir)include/ek - utilities.o: check-dep-libekmfweb utilities.c utilities.h $(rootdir)include/ekmfweb/ekmfweb.h - cca.o: check-dep-libekmfweb cca.c cca.h utilities.h $(rootdir)include/ekmfweb/ekmfweb.h - --libekmfweb.so: ALL_CFLAGS += -fPIC --libekmfweb.so: LDLIBS = -ljson-c -lcrypto -lssl -lcurl -ldl -shared --libekmfweb.so: LDFLAGS = -shared -Wl,--version-script=libekmfweb.map \ -- -Wl,-z,defs,-Bsymbolic --libekmfweb.so: ekmfweb.o utilities.o cca.o -+libekmfweb.so.$(VERSION): ALL_CFLAGS += -fPIC -+libekmfweb.so.$(VERSION): LDLIBS = -ljson-c -lcrypto -lssl -lcurl -ldl -+libekmfweb.so.$(VERSION): ALL_LDFLAGS += -shared -Wl,--version-script=libekmfweb.map \ -+ -Wl,-z,defs,-Bsymbolic -Wl,-soname,libekmfweb.so.$(VERM) -+libekmfweb.so.$(VERSION): ekmfweb.o utilities.o cca.o - $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@ -+ ln -srf libekmfweb.so.$(VERSION) libekmfweb.so.$(VERM) -+ ln -srf libekmfweb.so.$(VERSION) libekmfweb.so - --install-libekmfweb.so: libekmfweb.so -- $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T libekmfweb.so $(DESTDIR)$(LIB64DIR)/libekmfweb.so -+install-libekmfweb.so.$(VERSION): libekmfweb.so.$(VERSION) -+ $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T libekmfweb.so.$(VERSION) $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERSION) -+ ln -srf $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERSION) $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERM) -+ ln -srf $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so.$(VERSION) $(DESTDIR)$(USRLIB64DIR)/libekmfweb.so - $(INSTALL) -d -m 770 $(DESTDIR)$(USRINCLUDEDIR)/ekmfweb - $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 $(rootdir)include/ekmfweb/ekmfweb.h $(DESTDIR)$(USRINCLUDEDIR)/ekmfweb - - install: all $(INSTALL_TARGETS) - - clean: -- rm -f *.o libekmfweb.so check-dep-libekmfweb detect-openssl-version.dep -+ rm -f *.o libekmfweb.so* check-dep-libekmfweb detect-openssl-version.dep - - .PHONY: all install clean skip-libekmfweb-openssl skip-libekmfweb-jsonc \ -- skip-libekmfweb-curl install-libekmfweb.so -+ skip-libekmfweb-curl install-libekmfweb.so.$(VERSION) -diff --git a/zkey/ekmfweb/Makefile b/zkey/ekmfweb/Makefile -index 42e3937f..79a16cb5 100644 ---- a/zkey/ekmfweb/Makefile -+++ b/zkey/ekmfweb/Makefile -@@ -1,5 +1,8 @@ - include ../../common.mak - -+VERSION = 1.0 -+VERM = $(shell echo $(VERSION) | cut -d '.' -f 1) -+ - all: zkey-ekmfweb.so - - libs = $(rootdir)/libutil/libutil.a -@@ -8,7 +11,7 @@ export LIBRARY_PATH = $(rootdir)/libekmfweb:$LIBRARY_PATH - - zkey-ekmfweb.o: zkey-ekmfweb.c zkey-ekmfweb.h ../kms-plugin.h \ - ../cca.h ../utils.h ../pkey.h ../properties.h \ -- $(rootdir)include/ekmfweb/ekmfweb.h $(rootdir)/libekmfweb/libekmfweb.so -+ $(rootdir)include/ekmfweb/ekmfweb.h libekmfweb.dep - - properties.o: ../properties.c ../properties.h - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@ -@@ -26,9 +29,9 @@ utils.o: ../utils.c ../utils.h ../pkey.h ../cca.h ../ep11.h - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@ - - zkey-ekmfweb.so: ALL_CFLAGS += -fPIC --zkey-ekmfweb.so: LDLIBS = -lekmfweb -ldl -lcrypto -shared --zkey-ekmfweb.so: LDFLAGS = -shared -Wl,--version-script=zkey-ekmfweb.map \ -- -Wl,-z,defs,-Bsymbolic -+zkey-ekmfweb.so: LDLIBS = -lekmfweb -ldl -lcrypto -+zkey-ekmfweb.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-ekmfweb.map \ -+ -Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.$(VERM) - zkey-ekmfweb.so: zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o $(libs) - $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@ - -@@ -36,13 +39,18 @@ install-libekmfweb.dep: - $(MAKE) -C $(rootdir)/libekmfweb/ TOPDIR=$(TOPDIR) ARCH=$(ARCH) install - touch install-libekmfweb.dep - -+libekmfweb.dep: -+ $(MAKE) -C $(rootdir)/libekmfweb/ TOPDIR=$(TOPDIR) ARCH=$(ARCH) all -+ touch libekmfweb.dep -+ - install: all install-libekmfweb.dep zkey-ekmfweb.so - $(INSTALL) -d -m 755 $(DESTDIR)$(MANDIR)/man1 - $(INSTALL) -m 644 -c zkey-ekmfweb.1 $(DESTDIR)$(MANDIR)/man1 -- $(INSTALL) -d -m 755 $(DESTDIR)$(LIB64DIR) -- $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T zkey-ekmfweb.so $(DESTDIR)$(LIB64DIR)/zkey-ekmfweb.so -+ $(INSTALL) -d -m 755 $(DESTDIR)$(USRLIB64DIR) -+ $(INSTALL) -d -m 755 $(DESTDIR)$(USRLIB64DIR)/zkey -+ $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 -T zkey-ekmfweb.so $(DESTDIR)$(USRLIB64DIR)/zkey/zkey-ekmfweb.so - - clean: -- rm -f *.o zkey-ekmfweb.so install-libekmfweb.dep -+ rm -f *.o zkey-ekmfweb.so install-libekmfweb.dep libekmfweb.dep - - .PHONY: all install clean -\ No newline at end of file -diff --git a/zkey/kms.c b/zkey/kms.c -index 46427e6e..b2ce165a 100644 ---- a/zkey/kms.c -+++ b/zkey/kms.c -@@ -40,6 +40,7 @@ - - #define ENVVAR_ZKEY_KMS_PLUGINS "ZKEY_KMS_PLUGINS" - #define DEFAULT_KMS_PLUGINS "/etc/zkey/kms-plugins.conf" -+#define KMS_PLUGIN_LOCATION "/usr/lib64/zkey" - - #define KMS_CONFIG_FILE "kms.conf" - #define KMS_CONFIG_PROP_KMS "kms" -@@ -209,6 +210,7 @@ static int load_kms_plugin(const char *plugin, - void **plugin_lib, char **plugin_name, bool verbose) - { - kms_get_functions_t _kms_get_functions; -+ char load_so_name[PATH_MAX]; - char *so_name = NULL; - FILE *fp = NULL; - char line[4096]; -@@ -258,15 +260,26 @@ static int load_kms_plugin(const char *plugin, - goto out; - } - -+ /* Try to load via LD_LIBRARY_PATH first */ -+ snprintf(load_so_name, sizeof(load_so_name), "%s", so_name); - pr_verbose(verbose, "Loading KMS plugin '%s': '%s'", *plugin_name, -- so_name); -- *plugin_lib = dlopen(so_name, RTLD_GLOBAL | RTLD_NOW); -+ load_so_name); -+ *plugin_lib = dlopen(load_so_name, RTLD_GLOBAL | RTLD_NOW); - if (*plugin_lib == NULL) { -- pr_verbose(verbose, "%s", dlerror()); -- warnx("Failed to load KMS plugin '%s': '%s'", *plugin_name, -- so_name); -- rc = -ELIBACC; -- goto out; -+ /* Try to load from default plugin location */ -+ snprintf(load_so_name, sizeof(load_so_name), "%s/%s", -+ KMS_PLUGIN_LOCATION, so_name); -+ pr_verbose(verbose, "Loading KMS plugin '%s': '%s'", -+ *plugin_name, load_so_name); -+ -+ *plugin_lib = dlopen(load_so_name, RTLD_GLOBAL | RTLD_NOW); -+ if (*plugin_lib == NULL) { -+ pr_verbose(verbose, "%s", dlerror()); -+ warnx("Failed to load KMS plugin '%s': '%s'", -+ *plugin_name, load_so_name); -+ rc = -ELIBACC; -+ goto out; -+ } - } - - _kms_get_functions = (kms_get_functions_t)dlsym(*plugin_lib, -@@ -274,7 +287,7 @@ static int load_kms_plugin(const char *plugin, - if (_kms_get_functions == NULL) { - pr_verbose(verbose, "%s", dlerror()); - warnx("Failed to load KMS plugin '%s': '%s'", *plugin_name, -- so_name); -+ load_so_name); - rc = -ELIBACC; - goto out; - } -@@ -283,13 +296,13 @@ static int load_kms_plugin(const char *plugin, - if (*kms_functions == NULL) { - pr_verbose(verbose, "kms_get_functions() reutned NULL"); - warnx("Failed to load KMS plugin '%s': '%s'", *plugin_name, -- so_name); -+ load_so_name); - rc = -ELIBACC; - goto out; - } - - pr_verbose(verbose, "Successfully loaded KMS plugin '%s': '%s' (API " -- "version: %u)", *plugin_name, so_name, -+ "version: %u)", *plugin_name, load_so_name, - (*kms_functions)->api_version); - - out: diff --git a/s390utils.spec b/s390utils.spec index e4bd33b..c77769a 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.15.0 -Release: 2%{?dist} +Version: 2.15.1 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -35,10 +35,6 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch -# https://github.com/ibm-s390-tools/s390-tools/issues/93 -# https://github.com/ifranzki/s390-tools/commit/4a1979de79d9de48a44538f856f1d50f398541a8 -Patch100: s390-tools-2.15.0-ekmfweb.patch - Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} @@ -64,8 +60,6 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort -%patch100 -p1 -b .ekmfweb - # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' @@ -810,6 +804,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Oct 29 2020 Dan Horák - 2:2.15.1-1 +- rebased to 2.15.1 + * Wed Oct 28 2020 Dan Horák - 2:2.15.0-2 - move mk-s390image to /usr/bin diff --git a/sources b/sources index bcccc0f..1787355 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.15.0.tar.gz) = 33056a8ab22a7ea4cfde0a8b93f433e8aca2ff89679c8281a6639081a9eff173f7610b0d0025cb2adfc927cc9b8b830b4f4aba7b73f29dd53051def70478a003 +SHA512 (s390-tools-2.15.1.tar.gz) = a62ab491bac153b78161b7b1fb80ef1aa5ddb8657a9329f5ad9f8a16f106a9a9af1a37ceb328ed34eb44adb406207faec12ed0fb6648b5198498bf2fd411f0cf From ab939b3c3664f60d3140378422d574b4d16c602d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 29 Oct 2020 11:15:12 +0100 Subject: [PATCH 039/141] Fix the development package dependency by adding epoch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Šabata --- s390utils.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index c77769a..0237875 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.15.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -792,7 +792,7 @@ getent group cpacfstats >/dev/null || groupadd -r cpacfstats %package devel Summary: Development files -Requires: %{name}-base%{?_isa} = %{version}-%{release} +Requires: %{name}-base%{?_isa} = %{epoch}:%{version}-%{release} %description devel User-space development files for the s390/s390x architecture. @@ -804,6 +804,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Oct 29 2020 Petr Šabata - 2:2.15.1-2 +- Fix the development package dependency by adding epoch + * Thu Oct 29 2020 Dan Horák - 2:2.15.1-1 - rebased to 2.15.1 From a823de10da6322b77e696cc6a3eb21bef7d15b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 3 Nov 2020 16:33:34 +0100 Subject: [PATCH 040/141] move cio_ignore man page to core too --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 0237875..fa2dbb0 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -192,6 +192,7 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man5/zipl.conf.5* %{_mandir}/man8/chreipl.8* %{_mandir}/man8/chzdev.8* +%{_mandir}/man8/cio_ignore.8* %{_mandir}/man8/dasdfmt.8* %{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/zipl.8* @@ -469,7 +470,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/chcpumf.8* %{_mandir}/man8/chshut.8* %{_mandir}/man8/chzcrypt.8* -%{_mandir}/man8/cio_ignore.8* %{_mandir}/man8/dasdstat.8* %{_mandir}/man8/dasdview.8* %{_mandir}/man8/dumpconf.8* From 1409803b15a86aa3c92028cb343dc1c2a063d9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 4 Jan 2021 16:53:36 +0100 Subject: [PATCH 041/141] - move fdasd to core --- s390utils.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index fa2dbb0..0ce0b5d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.15.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -178,6 +178,7 @@ This package provides minimal set of tools needed to system to boot. %{_sbindir}/cio_ignore %{_sbindir}/dasdfmt %{_sbindir}/dasdinfo +%{_sbindir}/fdasd %{_sbindir}/zipl %dir /lib/s390-tools/ /lib/s390-tools/{zipl,chreipl}_helper.* @@ -195,6 +196,7 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man8/cio_ignore.8* %{_mandir}/man8/dasdfmt.8* %{_mandir}/man8/dasdinfo.8* +%{_mandir}/man8/fdasd.8* %{_mandir}/man8/zipl.8* # Additional Fedora/RHEL specific stuff @@ -403,7 +405,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/dasdstat %{_sbindir}/dasdview %{_sbindir}/dbginfo.sh -%{_sbindir}/fdasd %{_sbindir}/hyptop %{_sbindir}/ip_watcher.pl %{_sbindir}/lschp @@ -473,7 +474,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/dasdstat.8* %{_mandir}/man8/dasdview.8* %{_mandir}/man8/dumpconf.8* -%{_mandir}/man8/fdasd.8* %{_mandir}/man8/genprotimg.8.* %{_mandir}/man8/hyptop.8* %{_mandir}/man8/lschp.8* @@ -804,6 +804,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jan 04 2021 Dan Horák - 2:2.15.1-3 +- move fdasd to core + * Thu Oct 29 2020 Petr Šabata - 2:2.15.1-2 - Fix the development package dependency by adding epoch From 6ce1f4d14fea174f83cca69fcce97f057c1734a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 5 Jan 2021 16:28:32 +0000 Subject: [PATCH 042/141] - move lszdev to core --- s390-tools-zipl-blscfg-rpm-nvr-sort.patch | 2 +- s390utils.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index 0df804e..d69192f 100644 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -6,7 +6,7 @@ diff -up s390-tools-2.9.0/zipl/src/Makefile.blscfg-rpm-nvr-sort s390-tools-2.9.0 ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) -libs = $(rootdir)/libutil/libutil.a -+libs = $(rootdir)/libutil/libutil.a -lrpmio ++libs = $(rootdir)/libutil/libutil.a -lrpmio -lrpm objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \ install.o zipl.o $(rootdir)/zipl/boot/data.o diff --git a/s390utils.spec b/s390utils.spec index 0ce0b5d..3ac17b1 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.15.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -179,6 +179,7 @@ This package provides minimal set of tools needed to system to boot. %{_sbindir}/dasdfmt %{_sbindir}/dasdinfo %{_sbindir}/fdasd +%{_sbindir}/lszdev %{_sbindir}/zipl %dir /lib/s390-tools/ /lib/s390-tools/{zipl,chreipl}_helper.* @@ -197,6 +198,7 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man8/dasdfmt.8* %{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/fdasd.8* +%{_mandir}/man8/lszdev.8* %{_mandir}/man8/zipl.8* # Additional Fedora/RHEL specific stuff @@ -419,7 +421,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/lsstp %{_sbindir}/lstape %{_sbindir}/lszcrypt -%{_sbindir}/lszdev %{_sbindir}/lszfcp %{_sbindir}/qetharp %{_sbindir}/qethconf @@ -487,7 +488,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/lsstp.8* %{_mandir}/man8/lstape.8* %{_mandir}/man8/lszcrypt.8* -%{_mandir}/man8/lszdev.8* %{_mandir}/man8/lszfcp.8* %{_mandir}/man8/qetharp.8* %{_mandir}/man8/qethconf.8* @@ -804,6 +804,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jan 05 2021 Dan Horák - 2:2.15.1-4 +- move lszdev to core + * Mon Jan 04 2021 Dan Horák - 2:2.15.1-3 - move fdasd to core From 7a34f7d689ede151cd1de207783ac90e947853b5 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 21:02:58 +0000 Subject: [PATCH 043/141] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index 3ac17b1..2ccb8ff 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -43,6 +43,7 @@ Requires: s390utils-mon_statd = %{epoch}:%{version}-%{release} Requires: s390utils-iucvterm = %{epoch}:%{version}-%{release} Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} +BuildRequires: make BuildRequires: gcc-c++ %description From d792b32be15e5a094059cdaf23259e346422df60 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 19:51:30 +0000 Subject: [PATCH 044/141] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 2ccb8ff..be478c1 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.15.1 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -805,6 +805,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 2:2.15.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jan 05 2021 Dan Horák - 2:2.15.1-4 - move lszdev to core From 3d1d9492725d9572eb5860199a4e145e2bf45be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 24 Feb 2021 18:05:21 +0000 Subject: [PATCH 045/141] - rebased to 2.16.0 --- .gitignore | 1 + s390-tools-2.16.0-genprotimg.patch | 1021 ++++++++++++++++++++++++++++ s390-tools-2.16.0-zkey.patch | 50 ++ s390utils.spec | 19 +- sources | 2 +- 5 files changed, 1090 insertions(+), 3 deletions(-) create mode 100644 s390-tools-2.16.0-genprotimg.patch create mode 100644 s390-tools-2.16.0-zkey.patch diff --git a/.gitignore b/.gitignore index 52c737a..29be767 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ src_vipa-2.0.4.tar.gz /s390-tools-2.14.0.tar.gz /s390-tools-2.15.0.tar.gz /s390-tools-2.15.1.tar.gz +/s390-tools-2.16.0.tar.gz diff --git a/s390-tools-2.16.0-genprotimg.patch b/s390-tools-2.16.0-genprotimg.patch new file mode 100644 index 0000000..6f96a14 --- /dev/null +++ b/s390-tools-2.16.0-genprotimg.patch @@ -0,0 +1,1021 @@ +From b6bdd7744aba06d82f30b0c84012f0b06ccb01de Mon Sep 17 00:00:00 2001 +From: Marc Hartmayer +Date: Wed, 24 Feb 2021 15:04:11 +0000 +Subject: [PATCH] genprotimg: use `pv_` namespace for our Buffer implementation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use `pv_` namespace for our Buffer implementation so a symbol clash with other +libraries is less likely. + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/109 +Reviewed-by: Jan Hoeppner +Signed-off-by: Marc Hartmayer +Signed-off-by: Jan Höppner +--- + genprotimg/src/pv/pv_comp.c | 26 +++++------ + genprotimg/src/pv/pv_comp.h | 4 +- + genprotimg/src/pv/pv_comps.c | 10 ++--- + genprotimg/src/pv/pv_comps.h | 4 +- + genprotimg/src/pv/pv_hdr.c | 24 +++++------ + genprotimg/src/pv/pv_hdr.h | 4 +- + genprotimg/src/pv/pv_image.c | 70 +++++++++++++++--------------- + genprotimg/src/pv/pv_image.h | 14 +++--- + genprotimg/src/pv/pv_ipib.c | 4 +- + genprotimg/src/pv/pv_ipib.h | 2 +- + genprotimg/src/pv/pv_stage3.c | 26 +++++------ + genprotimg/src/pv/pv_stage3.h | 10 ++--- + genprotimg/src/utils/buffer.c | 18 ++++---- + genprotimg/src/utils/buffer.h | 16 +++---- + genprotimg/src/utils/crypto.c | 72 +++++++++++++++---------------- + genprotimg/src/utils/crypto.h | 28 ++++++------ + genprotimg/src/utils/file_utils.c | 4 +- + genprotimg/src/utils/file_utils.h | 2 +- + 18 files changed, 169 insertions(+), 169 deletions(-) + +diff --git a/genprotimg/src/pv/pv_comp.c b/genprotimg/src/pv/pv_comp.c +index 1f64eea8..21879ae7 100644 +--- a/genprotimg/src/pv/pv_comp.c ++++ b/genprotimg/src/pv/pv_comp.c +@@ -73,12 +73,12 @@ PvComponent *pv_component_new_file(PvComponentType type, const gchar *path, + return pv_component_new(type, size, DATA_FILE, (void **)&file, err); + } + +-PvComponent *pv_component_new_buf(PvComponentType type, const Buffer *buf, ++PvComponent *pv_component_new_buf(PvComponentType type, const PvBuffer *buf, + GError **err) + { + g_assert(buf); + +- g_autoptr(Buffer) dup_buf = buffer_dup(buf, FALSE); ++ g_autoptr(PvBuffer) dup_buf = pv_buffer_dup(buf, FALSE); + return pv_component_new(type, buf->size, DATA_BUFFER, (void **)&dup_buf, + err); + } +@@ -90,7 +90,7 @@ void pv_component_free(PvComponent *component) + + switch ((PvComponentDataType)component->d_type) { + case DATA_BUFFER: +- buffer_clear(&component->buf); ++ pv_buffer_clear(&component->buf); + break; + case DATA_FILE: + comp_file_free(component->file); +@@ -162,21 +162,21 @@ gint pv_component_align_and_encrypt(PvComponent *component, const gchar *tmp_pat + + switch ((PvComponentDataType)component->d_type) { + case DATA_BUFFER: { +- g_autoptr(Buffer) enc_buf = NULL; ++ g_autoptr(PvBuffer) enc_buf = NULL; + + if (!(IS_PAGE_ALIGNED(pv_component_size(component)))) { +- g_autoptr(Buffer) new = NULL; ++ g_autoptr(PvBuffer) new = NULL; + + /* create a page aligned copy */ +- new = buffer_dup(component->buf, TRUE); +- buffer_clear(&component->buf); ++ new = pv_buffer_dup(component->buf, TRUE); ++ pv_buffer_clear(&component->buf); + component->buf = g_steal_pointer(&new); + } + enc_buf = encrypt_buf(parms, component->buf, err); + if (!enc_buf) + return -1; + +- buffer_clear(&component->buf); ++ pv_buffer_clear(&component->buf); + component->buf = g_steal_pointer(&enc_buf); + return 0; + } +@@ -220,10 +220,10 @@ gint pv_component_align(PvComponent *component, const gchar *tmp_path, + + switch (component->d_type) { + case DATA_BUFFER: { +- g_autoptr(Buffer) buf = NULL; ++ g_autoptr(PvBuffer) buf = NULL; + +- buf = buffer_dup(component->buf, TRUE); +- buffer_clear(&component->buf); ++ buf = pv_buffer_dup(component->buf, TRUE); ++ pv_buffer_clear(&component->buf); + component->buf = g_steal_pointer(&buf); + return 0; + } break; +@@ -301,7 +301,7 @@ int64_t pv_component_update_pld(const PvComponent *comp, EVP_MD_CTX *ctx, + + switch (comp->d_type) { + case DATA_BUFFER: { +- const Buffer *buf = comp->buf; ++ const PvBuffer *buf = comp->buf; + + g_assert(buf->size <= INT64_MAX); + g_assert(buf->size == size); +@@ -425,7 +425,7 @@ gint pv_component_write(const PvComponent *component, FILE *f, GError **err) + + switch (component->d_type) { + case DATA_BUFFER: { +- const Buffer *buf = component->buf; ++ const PvBuffer *buf = component->buf; + + if (seek_and_write_buffer(f, buf, offset, err) < 0) + return -1; +diff --git a/genprotimg/src/pv/pv_comp.h b/genprotimg/src/pv/pv_comp.h +index aa1b5ae7..a4ffae81 100644 +--- a/genprotimg/src/pv/pv_comp.h ++++ b/genprotimg/src/pv/pv_comp.h +@@ -41,7 +41,7 @@ typedef struct { + gint d_type; /* PvComponentDataType */ + union { + struct comp_file *file; +- Buffer *buf; ++ PvBuffer *buf; + void *data; + }; + uint64_t src_addr; +@@ -51,7 +51,7 @@ typedef struct { + + PvComponent *pv_component_new_file(PvComponentType type, const gchar *path, + GError **err); +-PvComponent *pv_component_new_buf(PvComponentType type, const Buffer *buf, ++PvComponent *pv_component_new_buf(PvComponentType type, const PvBuffer *buf, + GError **err); + void pv_component_free(PvComponent *component); + gint pv_component_type(const PvComponent *component); +diff --git a/genprotimg/src/pv/pv_comps.c b/genprotimg/src/pv/pv_comps.c +index 15d32f09..2d364fd0 100644 +--- a/genprotimg/src/pv/pv_comps.c ++++ b/genprotimg/src/pv/pv_comps.c +@@ -210,13 +210,13 @@ GSList *pv_img_comps_get_comps(const PvImgComps *comps) + return comps->comps; + } + +-gint pv_img_comps_finalize(PvImgComps *comps, Buffer **pld_digest, +- Buffer **ald_digest, Buffer **tld_digest, ++gint pv_img_comps_finalize(PvImgComps *comps, PvBuffer **pld_digest, ++ PvBuffer **ald_digest, PvBuffer **tld_digest, + uint64_t *nep, GError **err) + { +- g_autoptr(Buffer) tmp_pld_digest = NULL; +- g_autoptr(Buffer) tmp_ald_digest = NULL; +- g_autoptr(Buffer) tmp_tld_digest = NULL; ++ g_autoptr(PvBuffer) tmp_pld_digest = NULL; ++ g_autoptr(PvBuffer) tmp_ald_digest = NULL; ++ g_autoptr(PvBuffer) tmp_tld_digest = NULL; + + comps->finalized = TRUE; + for (GSList *iterator = comps->comps; iterator; iterator = iterator->next) { +diff --git a/genprotimg/src/pv/pv_comps.h b/genprotimg/src/pv/pv_comps.h +index d555e36f..891ecdff 100644 +--- a/genprotimg/src/pv/pv_comps.h ++++ b/genprotimg/src/pv/pv_comps.h +@@ -32,8 +32,8 @@ gint pv_img_comps_add_component(PvImgComps *comps, PvComponent **comp, + GError **err); + PvComponent *pv_img_comps_get_nth_comp(PvImgComps *comps, guint n); + gint pv_img_comps_set_offset(PvImgComps *comps, gsize offset, GError **err); +-gint pv_img_comps_finalize(PvImgComps *comps, Buffer **pld_digest, +- Buffer **ald_digest, Buffer **tld_digest, ++gint pv_img_comps_finalize(PvImgComps *comps, PvBuffer **pld_digest, ++ PvBuffer **ald_digest, PvBuffer **tld_digest, + uint64_t *nep, GError **err); + void pv_img_comps_free(PvImgComps *comps); + +diff --git a/genprotimg/src/pv/pv_hdr.c b/genprotimg/src/pv/pv_hdr.c +index 45e721dd..e46e1761 100644 +--- a/genprotimg/src/pv/pv_hdr.c ++++ b/genprotimg/src/pv/pv_hdr.c +@@ -76,17 +76,17 @@ uint64_t pv_hdr_get_nks(const PvHdr *hdr) + } + + /* In-place modification of ``buf`` */ +-static gint pv_hdr_encrypt(const PvHdr *hdr, const PvImage *img, Buffer *buf, ++static gint pv_hdr_encrypt(const PvHdr *hdr, const PvImage *img, PvBuffer *buf, + GError **err) + { + uint32_t hdr_len = pv_hdr_size(hdr); + uint32_t aad_len = pv_hdr_aad_size(hdr); + guint tag_len = pv_hdr_tag_size(hdr); + uint32_t enc_len = pv_hdr_enc_size_casted(hdr); +- const Buffer aad_part = { .data = buf->data, .size = aad_len }; +- Buffer enc_part = { .data = (uint8_t *)buf->data + aad_len, ++ const PvBuffer aad_part = { .data = buf->data, .size = aad_len }; ++ PvBuffer enc_part = { .data = (uint8_t *)buf->data + aad_len, + .size = enc_len }; +- Buffer tag_part = { .data = (uint8_t *)buf->data + hdr_len - tag_len, ++ PvBuffer tag_part = { .data = (uint8_t *)buf->data + hdr_len - tag_len, + .size = tag_len }; + struct cipher_parms parms; + int64_t c_len; +@@ -119,9 +119,9 @@ static gint pv_hdr_aad_init(PvHdr *hdr, const PvImage *img, GError **err) + g_autofree union ecdh_pub_key *cust_pub_key = NULL; + struct pv_hdr_key_slot *hdr_slot = hdr->slots; + struct pv_hdr_head *head = &hdr->head; +- g_autoptr(Buffer) pld = NULL; +- g_autoptr(Buffer) ald = NULL; +- g_autoptr(Buffer) tld = NULL; ++ g_autoptr(PvBuffer) pld = NULL; ++ g_autoptr(PvBuffer) ald = NULL; ++ g_autoptr(PvBuffer) tld = NULL; + uint64_t nep = 0; + + g_assert(sizeof(head->iv) == img->gcm_iv->size); +@@ -250,7 +250,7 @@ PvHdr *pv_hdr_new(const PvImage *img, GError **err) + return g_steal_pointer(&ret); + } + +-static void pv_hdr_memcpy(const PvHdr *hdr, const Buffer *dst) ++static void pv_hdr_memcpy(const PvHdr *hdr, const PvBuffer *dst) + { + uint64_t nks = pv_hdr_get_nks(hdr); + uint8_t *data; +@@ -270,13 +270,13 @@ static void pv_hdr_memcpy(const PvHdr *hdr, const Buffer *dst) + } + } + +-Buffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, +- enum PvCryptoMode mode, GError **err) ++PvBuffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, ++ enum PvCryptoMode mode, GError **err) + { + uint32_t hdr_size = pv_hdr_size(hdr); +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + +- ret = buffer_alloc(hdr_size); ++ ret = pv_buffer_alloc(hdr_size); + pv_hdr_memcpy(hdr, ret); + + if (mode == PV_ENCRYPT) { +diff --git a/genprotimg/src/pv/pv_hdr.h b/genprotimg/src/pv/pv_hdr.h +index 8df7a6f1..fbcc9e9e 100644 +--- a/genprotimg/src/pv/pv_hdr.h ++++ b/genprotimg/src/pv/pv_hdr.h +@@ -23,8 +23,8 @@ + PvHdr *pv_hdr_new(const PvImage *img, GError **err); + void pv_hdr_free(PvHdr *hdr); + G_GNUC_UNUSED gboolean pv_hdr_uses_encryption(const PvHdr *hdr); +-Buffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, +- enum PvCryptoMode mode, GError **err); ++PvBuffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, ++ enum PvCryptoMode mode, GError **err); + uint32_t pv_hdr_size(const PvHdr *hdr); + uint32_t pv_hdr_aad_size(const PvHdr *hdr); + uint64_t pv_hdr_enc_size(const PvHdr *hdr); +diff --git a/genprotimg/src/pv/pv_image.c b/genprotimg/src/pv/pv_image.c +index 59eca5e3..375e40f6 100644 +--- a/genprotimg/src/pv/pv_image.c ++++ b/genprotimg/src/pv/pv_image.c +@@ -56,7 +56,7 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, + GError **err) + { + struct cipher_parms parms = { 0 }; +- g_autoptr(Buffer) tweak = NULL; ++ g_autoptr(PvBuffer) tweak = NULL; + prepare_func func = NULL; + void *opaque = NULL; + gint rc; +@@ -76,7 +76,7 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, + EVP_CIPHER_iv_length(cipher)); + g_assert(img->xts_key->size <= UINT_MAX); + +- tweak = buffer_alloc(sizeof(comp->tweak.data)); ++ tweak = pv_buffer_alloc(sizeof(comp->tweak.data)); + memcpy(tweak->data, comp->tweak.data, tweak->size); + func = pv_component_align_and_encrypt; + parms.cipher = cipher; +@@ -93,11 +93,11 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, + return 0; + } + +-static Buffer *pv_img_read_key(const gchar *path, guint key_size, +- GError **err) ++static PvBuffer *pv_img_read_key(const gchar *path, guint key_size, ++ GError **err) + { +- g_autoptr(Buffer) tmp_ret = NULL; +- Buffer *ret = NULL; ++ g_autoptr(PvBuffer) tmp_ret = NULL; ++ PvBuffer *ret = NULL; + gsize bytes_read; + FILE *f = NULL; + gsize size; +@@ -116,7 +116,7 @@ static Buffer *pv_img_read_key(const gchar *path, guint key_size, + if (!f) + return NULL; + +- tmp_ret = buffer_alloc(size); ++ tmp_ret = pv_buffer_alloc(size); + if (file_read(f, tmp_ret->data, 1, tmp_ret->size, &bytes_read, err) < 0) + goto err; + +@@ -160,8 +160,8 @@ static HostKeyList *pv_img_get_host_keys(GSList *host_keys_with_path, gint nid, + return g_steal_pointer(&ret); + } + +-static Buffer *pv_img_get_key(const EVP_CIPHER *cipher, const gchar *path, +- GError **err) ++static PvBuffer *pv_img_get_key(const EVP_CIPHER *cipher, const gchar *path, ++ GError **err) + { + gint key_len = EVP_CIPHER_key_length(cipher); + +@@ -173,8 +173,8 @@ static Buffer *pv_img_get_key(const EVP_CIPHER *cipher, const gchar *path, + return generate_aes_key((guint)key_len, err); + } + +-static Buffer *pv_img_get_iv(const EVP_CIPHER *cipher, const gchar *path, +- GError **err) ++static PvBuffer *pv_img_get_iv(const EVP_CIPHER *cipher, const gchar *path, ++ GError **err) + { + gint iv_len = EVP_CIPHER_iv_length(cipher); + +@@ -485,23 +485,23 @@ static void pv_hdr_key_slot_free(PvHdrKeySlot *slot) + WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(PvHdrKeySlot, pv_hdr_key_slot_free) + + static PvHdrKeySlot *pv_hdr_key_slot_new(const EVP_CIPHER *gcm_cipher, +- const Buffer *cust_root_key, ++ const PvBuffer *cust_root_key, + EVP_PKEY *cust_key, EVP_PKEY *host_key, + GError **err) + { + g_autoptr(PvHdrKeySlot) ret = g_new0(PvHdrKeySlot, 1); + g_autofree union ecdh_pub_key *pub = NULL; +- g_autoptr(Buffer) exchange_key = NULL; +- g_autoptr(Buffer) digest_key = NULL; +- g_autoptr(Buffer) iv = NULL; +- Buffer pub_buf; ++ g_autoptr(PvBuffer) exchange_key = NULL; ++ g_autoptr(PvBuffer) digest_key = NULL; ++ g_autoptr(PvBuffer) iv = NULL; ++ PvBuffer pub_buf; + /* No AAD data is used */ +- Buffer aad = { .data = NULL, .size = 0 }; ++ PvBuffer aad = { .data = NULL, .size = 0 }; + /* Set the output buffers for the encrypted data and the + * generated GCM tag + */ +- Buffer enc = { .data = ret->wrapped_key, .size = sizeof(ret->wrapped_key) }; +- Buffer tag = { .data = ret->tag, .size = sizeof(ret->tag) }; ++ PvBuffer enc = { .data = ret->wrapped_key, .size = sizeof(ret->wrapped_key) }; ++ PvBuffer tag = { .data = ret->tag, .size = sizeof(ret->tag) }; + struct cipher_parms parms; + int64_t c_len = 0; + +@@ -530,7 +530,7 @@ static PvHdrKeySlot *pv_hdr_key_slot_new(const EVP_CIPHER *gcm_cipher, + g_assert(exchange_key->size == (guint)EVP_CIPHER_key_length(gcm_cipher)); + + /* create zero IV */ +- iv = buffer_alloc((guint)EVP_CIPHER_iv_length(gcm_cipher)); ++ iv = pv_buffer_alloc((guint)EVP_CIPHER_iv_length(gcm_cipher)); + parms.iv_or_tweak = iv; + parms.key = exchange_key; + parms.cipher = gcm_cipher; +@@ -637,13 +637,13 @@ void pv_img_free(PvImage *img) + g_slist_free_full(img->key_slots, (GDestroyNotify)pv_hdr_key_slot_free); + g_slist_free_full(img->host_pub_keys, (GDestroyNotify)EVP_PKEY_free); + EVP_PKEY_free(img->cust_pub_priv_key); +- buffer_clear(&img->stage3a); ++ pv_buffer_clear(&img->stage3a); + pv_img_comps_free(img->comps); + g_free(img->tmp_dir); +- buffer_free(img->xts_key); +- buffer_free(img->cust_root_key); +- buffer_free(img->gcm_iv); +- buffer_free(img->cust_comm_key); ++ pv_buffer_free(img->xts_key); ++ pv_buffer_free(img->cust_root_key); ++ pv_buffer_free(img->gcm_iv); ++ pv_buffer_free(img->cust_comm_key); + g_free(img); + } + +@@ -684,13 +684,13 @@ gint pv_img_add_component(PvImage *img, const PvArg *arg, GError **err) + return 0; + } + +-gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, Buffer **pld, Buffer **ald, +- Buffer **tld, uint64_t *nep, GError **err) ++gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, PvBuffer **pld, PvBuffer **ald, ++ PvBuffer **tld, uint64_t *nep, GError **err) + { + return pv_img_comps_finalize(img->comps, pld, ald, tld, nep, err); + } + +-static gint pv_img_build_stage3b(PvImage *img, Buffer *stage3b, GError **err) ++static gint pv_img_build_stage3b(PvImage *img, PvBuffer *stage3b, GError **err) + { + g_autofree struct stage3b_args *args = NULL; + +@@ -708,7 +708,7 @@ static gint pv_img_build_stage3b(PvImage *img, Buffer *stage3b, GError **err) + gint pv_img_add_stage3b_comp(PvImage *img, const gchar *path, GError **err) + { + g_autoptr(PvComponent) comp = NULL; +- g_autoptr(Buffer) stage3b = NULL; ++ g_autoptr(PvBuffer) stage3b = NULL; + + stage3b = stage3b_getblob(path, err); + if (!stage3b) +@@ -825,7 +825,7 @@ static gint get_stage3a_data_size(const PvImage *img, gsize *data_size, + + gint pv_img_load_and_set_stage3a(PvImage *img, const gchar *path, GError **err) + { +- g_autoptr(Buffer) stage3a = NULL; ++ g_autoptr(PvBuffer) stage3a = NULL; + gsize bin_size, data_size = 0; + + if (get_stage3a_data_size(img, &data_size, err) < 0) +@@ -845,8 +845,8 @@ gint pv_img_load_and_set_stage3a(PvImage *img, const gchar *path, GError **err) + } + + /* Creates the PV IPIB and sets the stage3a arguments */ +-static gint pv_img_build_stage3a(Buffer *stage3a, gsize stage3a_bin_size, +- GSList *comps, const Buffer *hdr, GError **err) ++static gint pv_img_build_stage3a(PvBuffer *stage3a, gsize stage3a_bin_size, ++ GSList *comps, const PvBuffer *hdr, GError **err) + { + g_autofree struct ipl_parameter_block *ipib = NULL; + +@@ -866,9 +866,9 @@ static gint pv_img_build_stage3a(Buffer *stage3a, gsize stage3a_bin_size, + } + + /* Creates the actual PV header (serialized and AES-GCM encrypted) */ +-static Buffer *pv_img_create_pv_hdr(PvImage *img, GError **err) ++static PvBuffer *pv_img_create_pv_hdr(PvImage *img, GError **err) + { +- g_autoptr(Buffer) hdr_buf = NULL; ++ g_autoptr(PvBuffer) hdr_buf = NULL; + g_autoptr(PvHdr) hdr = NULL; + + hdr = pv_hdr_new(img, err); +@@ -887,7 +887,7 @@ static Buffer *pv_img_create_pv_hdr(PvImage *img, GError **err) + */ + gint pv_img_finalize(PvImage *pv, const gchar *stage3b_path, GError **err) + { +- g_autoptr(Buffer) hdr = NULL; ++ g_autoptr(PvBuffer) hdr = NULL; + + /* load stage3b template into memory and add it to the list of + * components. This must be done before calling +diff --git a/genprotimg/src/pv/pv_image.h b/genprotimg/src/pv/pv_image.h +index 7c624e24..116fb1a9 100644 +--- a/genprotimg/src/pv/pv_image.h ++++ b/genprotimg/src/pv/pv_image.h +@@ -25,7 +25,7 @@ + + typedef struct { + gchar *tmp_dir; /* directory used for temporary files */ +- Buffer *stage3a; /* stage3a containing IPIB and PV header */ ++ PvBuffer *stage3a; /* stage3a containing IPIB and PV header */ + gsize stage3a_bin_size; /* size of stage3a.bin */ + struct psw_t stage3a_psw; /* (short) PSW that is written to + * location 0 of the created image +@@ -35,15 +35,15 @@ typedef struct { + GSList *host_pub_keys; /* public host keys */ + gint nid; /* Elliptic Curve used for the key derivation */ + /* keys and cipher used for the AES-GCM encryption */ +- Buffer *cust_root_key; +- Buffer *gcm_iv; ++ PvBuffer *cust_root_key; ++ PvBuffer *gcm_iv; + const EVP_CIPHER *gcm_cipher; + /* Information for the IPIB and PV header */ + uint64_t pcf; + uint64_t scf; +- Buffer *cust_comm_key; ++ PvBuffer *cust_comm_key; + const EVP_CIPHER *cust_comm_cipher; +- Buffer *xts_key; ++ PvBuffer *xts_key; + const EVP_CIPHER *xts_cipher; + GSList *key_slots; + GSList *optional_items; +@@ -54,8 +54,8 @@ PvImage *pv_img_new(PvArgs *args, const gchar *stage3a_path, GError **err); + void pv_img_free(PvImage *img); + gint pv_img_add_component(PvImage *img, const PvArg *arg, GError **err); + gint pv_img_finalize(PvImage *img, const gchar *stage3b_path, GError **err); +-gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, Buffer **pld, Buffer **ald, +- Buffer **tld, uint64_t *nep, GError **err); ++gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, PvBuffer **pld, PvBuffer **ald, ++ PvBuffer **tld, uint64_t *nep, GError **err); + gint pv_img_load_and_set_stage3a(PvImage *img, const gchar *path, GError **err); + const PvComponent *pv_img_get_stage3b_comp(const PvImage *img, GError **err); + gint pv_img_add_stage3b_comp(PvImage *img, const gchar *path, GError **err); +diff --git a/genprotimg/src/pv/pv_ipib.c b/genprotimg/src/pv/pv_ipib.c +index 2517e548..59fe0086 100644 +--- a/genprotimg/src/pv/pv_ipib.c ++++ b/genprotimg/src/pv/pv_ipib.c +@@ -35,7 +35,7 @@ uint64_t pv_ipib_get_size(uint32_t num_comp) + } + + static gint pv_ipib_init(IplParameterBlock *ipib, GSList *comps, +- const Buffer *hdr) ++ const PvBuffer *hdr) + { + g_assert(sizeof(struct ipl_pl_hdr) <= UINT32_MAX); + g_assert(sizeof(struct ipl_pb0_pv_comp) <= UINT32_MAX); +@@ -100,7 +100,7 @@ static gint pv_ipib_init(IplParameterBlock *ipib, GSList *comps, + return 0; + } + +-IplParameterBlock *pv_ipib_new(GSList *comps, const Buffer *hdr, GError **err) ++IplParameterBlock *pv_ipib_new(GSList *comps, const PvBuffer *hdr, GError **err) + { + uint64_t ipib_size = pv_ipib_get_size(g_slist_length(comps)); + g_autoptr(IplParameterBlock) ret = NULL; +diff --git a/genprotimg/src/pv/pv_ipib.h b/genprotimg/src/pv/pv_ipib.h +index 93317901..4b66643d 100644 +--- a/genprotimg/src/pv/pv_ipib.h ++++ b/genprotimg/src/pv/pv_ipib.h +@@ -19,7 +19,7 @@ + typedef struct ipl_parameter_block IplParameterBlock; + + uint64_t pv_ipib_get_size(uint32_t num_comp); +-IplParameterBlock *pv_ipib_new(GSList *comps, const Buffer *hdr, GError **err); ++IplParameterBlock *pv_ipib_new(GSList *comps, const PvBuffer *hdr, GError **err); + void pv_ipib_free(IplParameterBlock *ipib); + + WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(IplParameterBlock, pv_ipib_free) +diff --git a/genprotimg/src/pv/pv_stage3.c b/genprotimg/src/pv/pv_stage3.c +index a1e5b164..bff9db7d 100644 +--- a/genprotimg/src/pv/pv_stage3.c ++++ b/genprotimg/src/pv/pv_stage3.c +@@ -24,12 +24,12 @@ + ((struct stage3a_args *)((uint64_t)data_ptr + loader_size - \ + sizeof(struct stage3a_args))) + +-static Buffer *loader_getblob(const gchar *filename, gsize *loader_size, +- gsize args_size, gsize data_size, +- gboolean data_aligned, GError **err) ++static PvBuffer *loader_getblob(const gchar *filename, gsize *loader_size, ++ gsize args_size, gsize data_size, ++ gboolean data_aligned, GError **err) + { + g_autoptr(GMappedFile) mapped_file = NULL; +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + gsize size, tmp_loader_size; + gchar *loader_data; + +@@ -60,7 +60,7 @@ static Buffer *loader_getblob(const gchar *filename, gsize *loader_size, + size = (data_aligned ? PAGE_ALIGN(tmp_loader_size) : tmp_loader_size) + + data_size; + +- ret = buffer_alloc(size); ++ ret = pv_buffer_alloc(size); + + /* copy the loader "template" */ + memcpy(ret->data, loader_data, tmp_loader_size); +@@ -71,8 +71,8 @@ static Buffer *loader_getblob(const gchar *filename, gsize *loader_size, + return g_steal_pointer(&ret); + } + +-Buffer *stage3a_getblob(const gchar *filename, gsize *loader_size, +- gsize data_size, GError **err) ++PvBuffer *stage3a_getblob(const gchar *filename, gsize *loader_size, ++ gsize data_size, GError **err) + { + return loader_getblob(filename, loader_size, + sizeof(struct stage3a_args), data_size, TRUE, +@@ -83,8 +83,8 @@ Buffer *stage3a_getblob(const gchar *filename, gsize *loader_size, + /* Set the right offsets and sizes in the stage3a template + add + * the IPIB block with the PV header + */ +-static gint stage3a_set_data(Buffer *loader, gsize loader_size, +- const Buffer *hdr, struct ipl_parameter_block *ipib, ++static gint stage3a_set_data(PvBuffer *loader, gsize loader_size, ++ const PvBuffer *hdr, struct ipl_parameter_block *ipib, + GError **err) + { + uint32_t ipib_size = GUINT32_FROM_BE(ipib->hdr.len); +@@ -126,15 +126,15 @@ static gint stage3a_set_data(Buffer *loader, gsize loader_size, + return 0; + } + +-gint build_stage3a(Buffer *loader, gsize loader_size, const Buffer *hdr, ++gint build_stage3a(PvBuffer *loader, gsize loader_size, const PvBuffer *hdr, + struct ipl_parameter_block *ipib, GError **err) + { + return stage3a_set_data(loader, loader_size, hdr, ipib, err); + } + +-Buffer *stage3b_getblob(const gchar *filename, GError **err) ++PvBuffer *stage3b_getblob(const gchar *filename, GError **err) + { +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + gsize rb_size; + + ret = loader_getblob(filename, &rb_size, sizeof(struct stage3b_args), 0, +@@ -146,7 +146,7 @@ Buffer *stage3b_getblob(const gchar *filename, GError **err) + return g_steal_pointer(&ret); + } + +-void build_stage3b(Buffer *stage3b, const struct stage3b_args *args) ++void build_stage3b(PvBuffer *stage3b, const struct stage3b_args *args) + { + g_assert(stage3b->size > sizeof(*args)); + +diff --git a/genprotimg/src/pv/pv_stage3.h b/genprotimg/src/pv/pv_stage3.h +index baaf921b..364408ee 100644 +--- a/genprotimg/src/pv/pv_stage3.h ++++ b/genprotimg/src/pv/pv_stage3.h +@@ -19,12 +19,12 @@ + #include "boot/stage3b.h" + #include "utils/buffer.h" + +-Buffer *stage3a_getblob(const gchar *filename, gsize *loader_size, +- gsize data_size, GError **err); +-gint build_stage3a(Buffer *dc, gsize dc_size, const Buffer *hdr, ++PvBuffer *stage3a_getblob(const gchar *filename, gsize *loader_size, ++ gsize data_size, GError **err); ++gint build_stage3a(PvBuffer *dc, gsize dc_size, const PvBuffer *hdr, + struct ipl_parameter_block *ipib, GError **err); +-Buffer *stage3b_getblob(const gchar *filename, GError **err); +-void build_stage3b(Buffer *stage3b, const struct stage3b_args *args); ++PvBuffer *stage3b_getblob(const gchar *filename, GError **err); ++void build_stage3b(PvBuffer *stage3b, const struct stage3b_args *args); + void memblob_init(struct memblob *arg, uint64_t src, uint64_t size); + + #endif +diff --git a/genprotimg/src/utils/buffer.c b/genprotimg/src/utils/buffer.c +index 35aed742..509dc0de 100644 +--- a/genprotimg/src/utils/buffer.c ++++ b/genprotimg/src/utils/buffer.c +@@ -17,18 +17,18 @@ + #include "common.h" + #include "file_utils.h" + +-Buffer *buffer_alloc(gsize size) ++PvBuffer *pv_buffer_alloc(gsize size) + { +- Buffer *ret = g_new0(Buffer, 1); ++ PvBuffer *ret = g_new0(PvBuffer, 1); + + ret->data = g_malloc0(size); + ret->size = size; + return ret; + } + +-Buffer *buffer_dup(const Buffer *buf, gboolean page_aligned) ++PvBuffer *pv_buffer_dup(const PvBuffer *buf, gboolean page_aligned) + { +- Buffer *ret; ++ PvBuffer *ret; + gsize size; + + if (!buf) +@@ -38,19 +38,19 @@ Buffer *buffer_dup(const Buffer *buf, gboolean page_aligned) + if (page_aligned) + size = PAGE_ALIGN(size); + +- ret = buffer_alloc(size); ++ ret = pv_buffer_alloc(size); + + /* content will be 0-right-padded */ + memcpy(ret->data, buf->data, buf->size); + return ret; + } + +-gint buffer_write(const Buffer *buf, FILE *file, GError **err) ++gint pv_buffer_write(const PvBuffer *buf, FILE *file, GError **err) + { + return file_write(file, buf->data, buf->size, 1, NULL, err); + } + +-void buffer_free(Buffer *buf) ++void pv_buffer_free(PvBuffer *buf) + { + if (!buf) + return; +@@ -59,11 +59,11 @@ void buffer_free(Buffer *buf) + g_free(buf); + } + +-void buffer_clear(Buffer **buf) ++void pv_buffer_clear(PvBuffer **buf) + { + if (!buf || !*buf) + return; + +- buffer_free(*buf); ++ pv_buffer_free(*buf); + *buf = NULL; + } +diff --git a/genprotimg/src/utils/buffer.h b/genprotimg/src/utils/buffer.h +index 7239d5c9..824b72cb 100644 +--- a/genprotimg/src/utils/buffer.h ++++ b/genprotimg/src/utils/buffer.h +@@ -15,17 +15,17 @@ + + #include "common.h" + +-typedef struct Buffer { ++typedef struct PvBuffer { + void *data; + gsize size; /* in bytes */ +-} Buffer; ++} PvBuffer; + +-Buffer *buffer_alloc(gsize size); +-void buffer_free(Buffer *buf); +-void buffer_clear(Buffer **buf); +-gint buffer_write(const Buffer *buf, FILE *file, GError **err); +-Buffer *buffer_dup(const Buffer *buf, gboolean page_aligned); ++PvBuffer *pv_buffer_alloc(gsize size); ++void pv_buffer_free(PvBuffer *buf); ++void pv_buffer_clear(PvBuffer **buf); ++gint pv_buffer_write(const PvBuffer *buf, FILE *file, GError **err); ++PvBuffer *pv_buffer_dup(const PvBuffer *buf, gboolean page_aligned); + +-WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(Buffer, buffer_free) ++WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(PvBuffer, pv_buffer_free) + + #endif +diff --git a/genprotimg/src/utils/crypto.c b/genprotimg/src/utils/crypto.c +index 44facc28..05c3e832 100644 +--- a/genprotimg/src/utils/crypto.c ++++ b/genprotimg/src/utils/crypto.c +@@ -89,15 +89,15 @@ EVP_MD_CTX *digest_ctx_new(const EVP_MD *md, GError **err) + return g_steal_pointer(&ctx); + } + +-Buffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err) ++PvBuffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err) + { + gint md_size = EVP_MD_size(EVP_MD_CTX_md(ctx)); +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + guint digest_size; + + g_assert(md_size > 0); + +- ret = buffer_alloc((guint)md_size); ++ ret = pv_buffer_alloc((guint)md_size); + if (EVP_DigestFinal_ex(ctx, ret->data, &digest_size) != 1) { + g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, + _("EVP_DigestFinal_ex failed")); +@@ -110,10 +110,10 @@ Buffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err) + } + + /* Returns the digest of @buf using the hash algorithm @md */ +-static Buffer *digest_buffer(const EVP_MD *md, const Buffer *buf, GError **err) ++static PvBuffer *digest_buffer(const EVP_MD *md, const PvBuffer *buf, GError **err) + { + g_autoptr(EVP_MD_CTX) md_ctx = NULL; +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + g_assert(buf); + + md_ctx = digest_ctx_new(md, err); +@@ -134,9 +134,9 @@ static Buffer *digest_buffer(const EVP_MD *md, const Buffer *buf, GError **err) + } + + /* Returns the SHA256 digest of @buf */ +-Buffer *sha256_buffer(const Buffer *buf, GError **err) ++PvBuffer *sha256_buffer(const PvBuffer *buf, GError **err) + { +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + + ret = digest_buffer(EVP_sha256(), buf, err); + if (!ret) +@@ -207,10 +207,10 @@ union ecdh_pub_key *evp_pkey_to_ecdh_pub_key(EVP_PKEY *key, GError **err) + return g_steal_pointer(&ret); + } + +-static Buffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) ++static PvBuffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) + { + g_autoptr(EVP_PKEY_CTX) ctx = NULL; +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + gsize key_size; + + ctx = EVP_PKEY_CTX_new(cust, NULL); +@@ -236,7 +236,7 @@ static Buffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) + return NULL; + } + +- ret = buffer_alloc(key_size); ++ ret = pv_buffer_alloc(key_size); + if (EVP_PKEY_derive(ctx, ret->data, &key_size) != 1) { + g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_DERIVE, + _("Key derivation failed")); +@@ -247,11 +247,11 @@ static Buffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) + return g_steal_pointer(&ret); + } + +-Buffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) ++PvBuffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) + { +- g_autoptr(Buffer) raw = buffer_alloc(70); +- g_autoptr(Buffer) ret = NULL; +- g_autoptr(Buffer) key = NULL; ++ g_autoptr(PvBuffer) raw = pv_buffer_alloc(70); ++ g_autoptr(PvBuffer) ret = NULL; ++ g_autoptr(PvBuffer) key = NULL; + guchar *data; + + key = derive_key(cust, host, err); +@@ -290,10 +290,10 @@ gint generate_tweak(union tweak *tweak, uint16_t i, GError **err) + return 0; + } + +-static Buffer *generate_rand_data(guint size, const gchar *err_msg, +- GError **err) ++static PvBuffer *generate_rand_data(guint size, const gchar *err_msg, ++ GError **err) + { +- g_autoptr(Buffer) buf = buffer_alloc(size); ++ g_autoptr(PvBuffer) buf = pv_buffer_alloc(size); + + g_assert(size <= INT_MAX); + +@@ -307,14 +307,14 @@ static Buffer *generate_rand_data(guint size, const gchar *err_msg, + return g_steal_pointer(&buf); + } + +-Buffer *generate_aes_iv(guint size, GError **err) ++PvBuffer *generate_aes_iv(guint size, GError **err) + { + return generate_rand_data(size, + _("Generating a IV failed because the required amount of random data is not available"), + err); + } + +-Buffer *generate_aes_key(guint size, GError **err) ++PvBuffer *generate_aes_key(guint size, GError **err) + { + return generate_rand_data(size, + _("Generating a key failed because the required amount of random data is not available"), +@@ -1756,8 +1756,8 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in, + gint cipher_block_size = EVP_CIPHER_block_size(cipher); + guchar in_buf[PAGE_SIZE], + out_buf[PAGE_SIZE + (guint)cipher_block_size]; +- const Buffer *key = parms->key; +- const Buffer *tweak = parms->iv_or_tweak; ++ const PvBuffer *key = parms->key; ++ const PvBuffer *tweak = parms->iv_or_tweak; + g_autofree guchar *tmp_tweak = NULL; + gint out_len, tweak_size; + gsize tmp_size_in = 0, tmp_size_out = 0; +@@ -1895,11 +1895,11 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in, + return 0; + } + +-static Buffer *__encrypt_decrypt_buffer(const struct cipher_parms *parms, +- const Buffer *in, gboolean encrypt, +- GError **err) ++static PvBuffer *__encrypt_decrypt_buffer(const struct cipher_parms *parms, ++ const PvBuffer *in, gboolean encrypt, ++ GError **err) + { +- g_autoptr(Buffer) ret = NULL; ++ g_autoptr(PvBuffer) ret = NULL; + g_autoptr(BIO) b_out = NULL; + g_autoptr(BIO) b_in = NULL; + gsize in_size, out_size; +@@ -1927,19 +1927,19 @@ static Buffer *__encrypt_decrypt_buffer(const struct cipher_parms *parms, + return NULL; + } + +- ret = buffer_alloc((unsigned long)data_size); ++ ret = pv_buffer_alloc((unsigned long)data_size); + memcpy(ret->data, data, ret->size); + return g_steal_pointer(&ret); + } + +-Buffer *encrypt_buf(const struct cipher_parms *parms, const Buffer *in, +- GError **err) ++PvBuffer *encrypt_buf(const struct cipher_parms *parms, const PvBuffer *in, ++ GError **err) + { + return __encrypt_decrypt_buffer(parms, in, TRUE, err); + } + +-Buffer *decrypt_buf(const struct cipher_parms *parms, const Buffer *in, +- GError **err) ++PvBuffer *decrypt_buf(const struct cipher_parms *parms, const PvBuffer *in, ++ GError **err) + { + return __encrypt_decrypt_buffer(parms, in, FALSE, err); + } +@@ -1993,16 +1993,16 @@ G_GNUC_UNUSED static gint decrypt_file(const struct cipher_parms *parms, + } + + /* GCM mode uses (zero-)padding */ +-static int64_t gcm_encrypt_decrypt(const Buffer *in, const Buffer *aad, ++static int64_t gcm_encrypt_decrypt(const PvBuffer *in, const PvBuffer *aad, + const struct cipher_parms *parms, +- Buffer *out, Buffer *tag, ++ PvBuffer *out, PvBuffer *tag, + enum PvCryptoMode mode, GError **err) + { + g_autoptr(EVP_CIPHER_CTX) ctx = NULL; + const EVP_CIPHER *cipher = parms->cipher; +- const Buffer *iv = parms->iv_or_tweak; ++ const PvBuffer *iv = parms->iv_or_tweak; + gboolean encrypt = mode == PV_ENCRYPT; +- const Buffer *key = parms->key; ++ const PvBuffer *key = parms->key; + int64_t ret = -1; + gint len = -1; + +@@ -2097,8 +2097,8 @@ static int64_t gcm_encrypt_decrypt(const Buffer *in, const Buffer *aad, + return ret; + } + +-int64_t gcm_encrypt(const Buffer *in, const Buffer *aad, +- const struct cipher_parms *parms, Buffer *out, Buffer *tag, ++int64_t gcm_encrypt(const PvBuffer *in, const PvBuffer *aad, ++ const struct cipher_parms *parms, PvBuffer *out, PvBuffer *tag, + GError **err) + { + return gcm_encrypt_decrypt(in, aad, parms, out, tag, PV_ENCRYPT, err); +diff --git a/genprotimg/src/utils/crypto.h b/genprotimg/src/utils/crypto.h +index 286cf457..3cda4507 100644 +--- a/genprotimg/src/utils/crypto.h ++++ b/genprotimg/src/utils/crypto.h +@@ -117,8 +117,8 @@ union tweak { + + struct cipher_parms { + const EVP_CIPHER *cipher; +- const Buffer *key; +- const Buffer *iv_or_tweak; ++ const PvBuffer *key; ++ const PvBuffer *iv_or_tweak; + }; + + int check_crl_valid_for_cert(X509_CRL *crl, X509 *cert, +@@ -152,24 +152,24 @@ X509_CRL *get_first_valid_crl(X509_STORE_CTX *ctx, X509 *cert, GError **err); + void store_setup_crl_download(X509_STORE *st); + EVP_PKEY *read_ec_pubkey_cert(X509 *cert, gint nid, GError **err); + +-Buffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err); +-Buffer *generate_aes_key(guint size, GError **err); +-Buffer *generate_aes_iv(guint size, GError **err); ++PvBuffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err); ++PvBuffer *generate_aes_key(guint size, GError **err); ++PvBuffer *generate_aes_iv(guint size, GError **err); + EVP_PKEY *generate_ec_key(gint nid, GError **err); + gint generate_tweak(union tweak *tweak, uint16_t i, GError **err); + union ecdh_pub_key *evp_pkey_to_ecdh_pub_key(EVP_PKEY *key, GError **err); + EVP_MD_CTX *digest_ctx_new(const EVP_MD *md, GError **err); +-Buffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err); +-Buffer *sha256_buffer(const Buffer *buf, GError **err); +-int64_t gcm_encrypt(const Buffer *in, const Buffer *aad, +- const struct cipher_parms *parms, Buffer *out, +- Buffer *tag, GError **err); ++PvBuffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err); ++PvBuffer *sha256_buffer(const PvBuffer *buf, GError **err); ++int64_t gcm_encrypt(const PvBuffer *in, const PvBuffer *aad, ++ const struct cipher_parms *parms, PvBuffer *out, ++ PvBuffer *tag, GError **err); + gint encrypt_file(const struct cipher_parms *parms, const gchar *in_path, + const gchar *path_out, gsize *in_size, gsize *out_size, + GError **err); +-Buffer *encrypt_buf(const struct cipher_parms *parms, const Buffer *in, +- GError **err); +-G_GNUC_UNUSED Buffer *decrypt_buf(const struct cipher_parms *parms, +- const Buffer *in, GError **err); ++PvBuffer *encrypt_buf(const struct cipher_parms *parms, const PvBuffer *in, ++ GError **err); ++G_GNUC_UNUSED PvBuffer *decrypt_buf(const struct cipher_parms *parms, ++ const PvBuffer *in, GError **err); + + #endif +diff --git a/genprotimg/src/utils/file_utils.c b/genprotimg/src/utils/file_utils.c +index 1d6fc370..ba33400f 100644 +--- a/genprotimg/src/utils/file_utils.c ++++ b/genprotimg/src/utils/file_utils.c +@@ -171,13 +171,13 @@ gint seek_and_write_file(FILE *o, const CompFile *ifile, uint64_t offset, + return ret; + } + +-gint seek_and_write_buffer(FILE *o, const Buffer *buf, uint64_t offset, ++gint seek_and_write_buffer(FILE *o, const PvBuffer *buf, uint64_t offset, + GError **err) + { + if (file_seek(o, offset, err) < 0) + return -1; + +- if (buffer_write(buf, o, err) < 0) ++ if (pv_buffer_write(buf, o, err) < 0) + return -1; + + return 0; +diff --git a/genprotimg/src/utils/file_utils.h b/genprotimg/src/utils/file_utils.h +index 47df1148..456e7aca 100644 +--- a/genprotimg/src/utils/file_utils.h ++++ b/genprotimg/src/utils/file_utils.h +@@ -26,7 +26,7 @@ gint file_write(FILE *out, const void *ptr, gsize size, gsize count, + gsize *count_written, GError **err); + gint pad_file_right(const gchar *path_out, const gchar *path_in, + gsize *size_out, guint padding, GError **err); +-gint seek_and_write_buffer(FILE *out, const Buffer *buf, uint64_t offset, ++gint seek_and_write_buffer(FILE *out, const PvBuffer *buf, uint64_t offset, + GError **err); + gint seek_and_write_file(FILE *o, const CompFile *ifile, uint64_t offset, + GError **err); diff --git a/s390-tools-2.16.0-zkey.patch b/s390-tools-2.16.0-zkey.patch new file mode 100644 index 0000000..42b2014 --- /dev/null +++ b/s390-tools-2.16.0-zkey.patch @@ -0,0 +1,50 @@ +From 3f3f063c98278f53ad3b34e68b70fca62eaea8fb Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Tue, 23 Feb 2021 08:52:26 +0100 +Subject: [PATCH] zkey: Fix build error when the compiler flags are overridden +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When the compiler flags are overridden, the build of zkey may fail with: + +kms.c:44:2: error: #error KMS_PLUGIN_LOCATION must be defined + 44 | #error KMS_PLUGIN_LOCATION must be defined + | ^~~~~ + +The Makefile uses CFLAGS variable for defining the KMS_PLUGIN_LOCATION, +but it should rather use ALL_CFLAGS. + +Also use ALL_CPPFLAGS for defining HAVE_LUKS2_SUPPORT. + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/108 + +Signed-off-by: Ingo Franzki +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner +--- + zkey/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/zkey/Makefile b/zkey/Makefile +index 41129bcf..f74e2091 100644 +--- a/zkey/Makefile ++++ b/zkey/Makefile +@@ -18,7 +18,7 @@ ifneq (${HAVE_CRYPTSETUP2},0) + ifneq (${HAVE_OPENSSL},0) + BUILD_TARGETS += zkey-cryptsetup + INSTALL_TARGETS += install-zkey-cryptsetup +- CPPFLAGS += -DHAVE_LUKS2_SUPPORT ++ ALL_CPPFLAGS += -DHAVE_LUKS2_SUPPORT + else + BUILD_TARGETS += zkey-cryptsetup-skip-openssl + INSTALL_TARGETS += zkey-cryptsetup-skip-openssl +@@ -34,7 +34,7 @@ endif + + libs = $(rootdir)/libutil/libutil.a + +-CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" ++ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" + + detect-libcryptsetup.dep: + echo "#include " > detect-libcryptsetup.dep diff --git a/s390utils.spec b/s390utils.spec index be478c1..0170826 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.15.1 -Release: 5%{?dist} +Version: 2.16.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -35,6 +35,12 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch +# upstream fixes +# https://github.com/ibm-s390-linux/s390-tools/commit/3f3f063c98278f53ad3b34e68b70fca62eaea8fb +Patch100: s390-tools-2.16.0-zkey.patch +# https://github.com/ibm-s390-linux/s390-tools/commit/b6bdd7744aba06d82f30b0c84012f0b06ccb01de +Patch101: s390-tools-2.16.0-genprotimg.patch + Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} @@ -61,6 +67,10 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort +# upstream fixes +%patch100 -p1 +%patch101 -p1 + # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' @@ -408,6 +418,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/dasdstat %{_sbindir}/dasdview %{_sbindir}/dbginfo.sh +%{_sbindir}/hsci %{_sbindir}/hyptop %{_sbindir}/ip_watcher.pl %{_sbindir}/lschp @@ -477,6 +488,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/dasdview.8* %{_mandir}/man8/dumpconf.8* %{_mandir}/man8/genprotimg.8.* +%{_mandir}/man8/hsci.8* %{_mandir}/man8/hyptop.8* %{_mandir}/man8/lschp.8* %{_mandir}/man8/lscss.8* @@ -805,6 +817,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Feb 24 2021 Dan Horák - 2:2.16.0-1 +- rebased to 2.16.0 + * Wed Jan 27 2021 Fedora Release Engineering - 2:2.15.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 1787355..404b75d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.15.1.tar.gz) = a62ab491bac153b78161b7b1fb80ef1aa5ddb8657a9329f5ad9f8a16f106a9a9af1a37ceb328ed34eb44adb406207faec12ed0fb6648b5198498bf2fd411f0cf +SHA512 (s390-tools-2.16.0.tar.gz) = d0866e2f372ba2938ccab264846d6cfe3db1b760cff6645fbefcd33a8ce8e7d971e442ccefda7e8e4d59818293147caa57fa593a3e66cd77e1e661928336793c From 02409651fa3e00305b229c9ad3af575ed5f517ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 1 Mar 2021 10:54:27 +0000 Subject: [PATCH 046/141] - drop superfluous Require from s390utils-base --- s390utils.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 0170826..0dfc069 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.16.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -246,7 +246,6 @@ This package provides minimal set of tools needed to system to boot. License: MIT Summary: S390 base tools Requires: gawk sed coreutils -Requires: sysfsutils Requires: sg3_utils Requires: ethtool Requires: tar @@ -817,6 +816,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Mar 01 2021 Dan Horák - 2:2.16.0-2 +- drop superfluous Require from s390utils-base + * Wed Feb 24 2021 Dan Horák - 2:2.16.0-1 - rebased to 2.16.0 From 2bf7d95c95761acd3d3e15a205db6984d487e878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 17 Jun 2021 10:00:57 +0200 Subject: [PATCH 047/141] - drop obsolete setting from device_cio_free.service --- device_cio_free.service | 1 - 1 file changed, 1 deletion(-) diff --git a/device_cio_free.service b/device_cio_free.service index f9564e1..b3c0f4d 100644 --- a/device_cio_free.service +++ b/device_cio_free.service @@ -7,7 +7,6 @@ Before=sysinit.target systemd-udev-trigger.service Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/device_cio_free -StandardOutput=syslog [Install] WantedBy=sysinit.target From b2e74b0a3e0a4b51cc54626a3e4d6fc43479a433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 22 Jun 2021 21:31:28 +0200 Subject: [PATCH 048/141] mk-s390image script requires file --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index 0dfc069..263e050 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -249,6 +249,7 @@ Requires: gawk sed coreutils Requires: sg3_utils Requires: ethtool Requires: tar +Requires: file Requires: s390utils-core = %{epoch}:%{version}-%{release} %{?systemd_requires} BuildRequires: perl-generators From e4da637a537ae2eca6772d698efb14b6f33619f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 30 Jun 2021 11:36:03 +0200 Subject: [PATCH 049/141] zfcpconf: set exit code explicitly (#1977434) --- zfcpconf.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zfcpconf.sh b/zfcpconf.sh index 8dc05ad..c3c6bf4 100644 --- a/zfcpconf.sh +++ b/zfcpconf.sh @@ -36,7 +36,7 @@ if [ -f "$CONFIG" ]; then modprobe zfcp fi if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then - return + exit 1 fi sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do case $line in @@ -74,3 +74,4 @@ if [ -f "$CONFIG" ]; then esac done fi +exit 0 From ce7722eab4d975e8256adcae089b4bc761ff9091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 7 Jul 2021 17:40:01 +0000 Subject: [PATCH 050/141] - rebased to 2.17.0 --- .gitignore | 20 +- s390-tools-2.16.0-genprotimg.patch | 1021 ---------------------------- s390-tools-2.16.0-zkey.patch | 50 -- s390utils.spec | 41 +- sources | 2 +- 5 files changed, 27 insertions(+), 1107 deletions(-) delete mode 100644 s390-tools-2.16.0-genprotimg.patch delete mode 100644 s390-tools-2.16.0-zkey.patch diff --git a/.gitignore b/.gitignore index 29be767..7a88321 100644 --- a/.gitignore +++ b/.gitignore @@ -5,22 +5,4 @@ src_vipa-2.0.4.tar.gz /lib-zfcp-hbaapi-2.1.tar.gz /src_vipa-2.1.0.tar.gz /s390-tools-*.tar.bz2 -/s390-tools-2.0.0.tar.gz -/s390-tools-2.1.0.tar.gz -/s390-tools-2.2.0.tar.gz -/s390-tools-2.3.0.tar.gz -/s390-tools-2.4.0.tar.gz -/s390-tools-2.5.0.tar.gz -/s390-tools-2.6.0.tar.gz -/s390-tools-2.7.0.tar.gz -/s390-tools-2.7.1.tar.gz -/s390-tools-2.8.0.tar.gz -/s390-tools-2.9.0.tar.gz -/s390-tools-2.10.0.tar.gz -/s390-tools-2.11.0.tar.gz -/s390-tools-2.12.0.tar.gz -/s390-tools-2.13.0.tar.gz -/s390-tools-2.14.0.tar.gz -/s390-tools-2.15.0.tar.gz -/s390-tools-2.15.1.tar.gz -/s390-tools-2.16.0.tar.gz +/s390-tools-*.tar.gz diff --git a/s390-tools-2.16.0-genprotimg.patch b/s390-tools-2.16.0-genprotimg.patch deleted file mode 100644 index 6f96a14..0000000 --- a/s390-tools-2.16.0-genprotimg.patch +++ /dev/null @@ -1,1021 +0,0 @@ -From b6bdd7744aba06d82f30b0c84012f0b06ccb01de Mon Sep 17 00:00:00 2001 -From: Marc Hartmayer -Date: Wed, 24 Feb 2021 15:04:11 +0000 -Subject: [PATCH] genprotimg: use `pv_` namespace for our Buffer implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use `pv_` namespace for our Buffer implementation so a symbol clash with other -libraries is less likely. - -Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/109 -Reviewed-by: Jan Hoeppner -Signed-off-by: Marc Hartmayer -Signed-off-by: Jan Höppner ---- - genprotimg/src/pv/pv_comp.c | 26 +++++------ - genprotimg/src/pv/pv_comp.h | 4 +- - genprotimg/src/pv/pv_comps.c | 10 ++--- - genprotimg/src/pv/pv_comps.h | 4 +- - genprotimg/src/pv/pv_hdr.c | 24 +++++------ - genprotimg/src/pv/pv_hdr.h | 4 +- - genprotimg/src/pv/pv_image.c | 70 +++++++++++++++--------------- - genprotimg/src/pv/pv_image.h | 14 +++--- - genprotimg/src/pv/pv_ipib.c | 4 +- - genprotimg/src/pv/pv_ipib.h | 2 +- - genprotimg/src/pv/pv_stage3.c | 26 +++++------ - genprotimg/src/pv/pv_stage3.h | 10 ++--- - genprotimg/src/utils/buffer.c | 18 ++++---- - genprotimg/src/utils/buffer.h | 16 +++---- - genprotimg/src/utils/crypto.c | 72 +++++++++++++++---------------- - genprotimg/src/utils/crypto.h | 28 ++++++------ - genprotimg/src/utils/file_utils.c | 4 +- - genprotimg/src/utils/file_utils.h | 2 +- - 18 files changed, 169 insertions(+), 169 deletions(-) - -diff --git a/genprotimg/src/pv/pv_comp.c b/genprotimg/src/pv/pv_comp.c -index 1f64eea8..21879ae7 100644 ---- a/genprotimg/src/pv/pv_comp.c -+++ b/genprotimg/src/pv/pv_comp.c -@@ -73,12 +73,12 @@ PvComponent *pv_component_new_file(PvComponentType type, const gchar *path, - return pv_component_new(type, size, DATA_FILE, (void **)&file, err); - } - --PvComponent *pv_component_new_buf(PvComponentType type, const Buffer *buf, -+PvComponent *pv_component_new_buf(PvComponentType type, const PvBuffer *buf, - GError **err) - { - g_assert(buf); - -- g_autoptr(Buffer) dup_buf = buffer_dup(buf, FALSE); -+ g_autoptr(PvBuffer) dup_buf = pv_buffer_dup(buf, FALSE); - return pv_component_new(type, buf->size, DATA_BUFFER, (void **)&dup_buf, - err); - } -@@ -90,7 +90,7 @@ void pv_component_free(PvComponent *component) - - switch ((PvComponentDataType)component->d_type) { - case DATA_BUFFER: -- buffer_clear(&component->buf); -+ pv_buffer_clear(&component->buf); - break; - case DATA_FILE: - comp_file_free(component->file); -@@ -162,21 +162,21 @@ gint pv_component_align_and_encrypt(PvComponent *component, const gchar *tmp_pat - - switch ((PvComponentDataType)component->d_type) { - case DATA_BUFFER: { -- g_autoptr(Buffer) enc_buf = NULL; -+ g_autoptr(PvBuffer) enc_buf = NULL; - - if (!(IS_PAGE_ALIGNED(pv_component_size(component)))) { -- g_autoptr(Buffer) new = NULL; -+ g_autoptr(PvBuffer) new = NULL; - - /* create a page aligned copy */ -- new = buffer_dup(component->buf, TRUE); -- buffer_clear(&component->buf); -+ new = pv_buffer_dup(component->buf, TRUE); -+ pv_buffer_clear(&component->buf); - component->buf = g_steal_pointer(&new); - } - enc_buf = encrypt_buf(parms, component->buf, err); - if (!enc_buf) - return -1; - -- buffer_clear(&component->buf); -+ pv_buffer_clear(&component->buf); - component->buf = g_steal_pointer(&enc_buf); - return 0; - } -@@ -220,10 +220,10 @@ gint pv_component_align(PvComponent *component, const gchar *tmp_path, - - switch (component->d_type) { - case DATA_BUFFER: { -- g_autoptr(Buffer) buf = NULL; -+ g_autoptr(PvBuffer) buf = NULL; - -- buf = buffer_dup(component->buf, TRUE); -- buffer_clear(&component->buf); -+ buf = pv_buffer_dup(component->buf, TRUE); -+ pv_buffer_clear(&component->buf); - component->buf = g_steal_pointer(&buf); - return 0; - } break; -@@ -301,7 +301,7 @@ int64_t pv_component_update_pld(const PvComponent *comp, EVP_MD_CTX *ctx, - - switch (comp->d_type) { - case DATA_BUFFER: { -- const Buffer *buf = comp->buf; -+ const PvBuffer *buf = comp->buf; - - g_assert(buf->size <= INT64_MAX); - g_assert(buf->size == size); -@@ -425,7 +425,7 @@ gint pv_component_write(const PvComponent *component, FILE *f, GError **err) - - switch (component->d_type) { - case DATA_BUFFER: { -- const Buffer *buf = component->buf; -+ const PvBuffer *buf = component->buf; - - if (seek_and_write_buffer(f, buf, offset, err) < 0) - return -1; -diff --git a/genprotimg/src/pv/pv_comp.h b/genprotimg/src/pv/pv_comp.h -index aa1b5ae7..a4ffae81 100644 ---- a/genprotimg/src/pv/pv_comp.h -+++ b/genprotimg/src/pv/pv_comp.h -@@ -41,7 +41,7 @@ typedef struct { - gint d_type; /* PvComponentDataType */ - union { - struct comp_file *file; -- Buffer *buf; -+ PvBuffer *buf; - void *data; - }; - uint64_t src_addr; -@@ -51,7 +51,7 @@ typedef struct { - - PvComponent *pv_component_new_file(PvComponentType type, const gchar *path, - GError **err); --PvComponent *pv_component_new_buf(PvComponentType type, const Buffer *buf, -+PvComponent *pv_component_new_buf(PvComponentType type, const PvBuffer *buf, - GError **err); - void pv_component_free(PvComponent *component); - gint pv_component_type(const PvComponent *component); -diff --git a/genprotimg/src/pv/pv_comps.c b/genprotimg/src/pv/pv_comps.c -index 15d32f09..2d364fd0 100644 ---- a/genprotimg/src/pv/pv_comps.c -+++ b/genprotimg/src/pv/pv_comps.c -@@ -210,13 +210,13 @@ GSList *pv_img_comps_get_comps(const PvImgComps *comps) - return comps->comps; - } - --gint pv_img_comps_finalize(PvImgComps *comps, Buffer **pld_digest, -- Buffer **ald_digest, Buffer **tld_digest, -+gint pv_img_comps_finalize(PvImgComps *comps, PvBuffer **pld_digest, -+ PvBuffer **ald_digest, PvBuffer **tld_digest, - uint64_t *nep, GError **err) - { -- g_autoptr(Buffer) tmp_pld_digest = NULL; -- g_autoptr(Buffer) tmp_ald_digest = NULL; -- g_autoptr(Buffer) tmp_tld_digest = NULL; -+ g_autoptr(PvBuffer) tmp_pld_digest = NULL; -+ g_autoptr(PvBuffer) tmp_ald_digest = NULL; -+ g_autoptr(PvBuffer) tmp_tld_digest = NULL; - - comps->finalized = TRUE; - for (GSList *iterator = comps->comps; iterator; iterator = iterator->next) { -diff --git a/genprotimg/src/pv/pv_comps.h b/genprotimg/src/pv/pv_comps.h -index d555e36f..891ecdff 100644 ---- a/genprotimg/src/pv/pv_comps.h -+++ b/genprotimg/src/pv/pv_comps.h -@@ -32,8 +32,8 @@ gint pv_img_comps_add_component(PvImgComps *comps, PvComponent **comp, - GError **err); - PvComponent *pv_img_comps_get_nth_comp(PvImgComps *comps, guint n); - gint pv_img_comps_set_offset(PvImgComps *comps, gsize offset, GError **err); --gint pv_img_comps_finalize(PvImgComps *comps, Buffer **pld_digest, -- Buffer **ald_digest, Buffer **tld_digest, -+gint pv_img_comps_finalize(PvImgComps *comps, PvBuffer **pld_digest, -+ PvBuffer **ald_digest, PvBuffer **tld_digest, - uint64_t *nep, GError **err); - void pv_img_comps_free(PvImgComps *comps); - -diff --git a/genprotimg/src/pv/pv_hdr.c b/genprotimg/src/pv/pv_hdr.c -index 45e721dd..e46e1761 100644 ---- a/genprotimg/src/pv/pv_hdr.c -+++ b/genprotimg/src/pv/pv_hdr.c -@@ -76,17 +76,17 @@ uint64_t pv_hdr_get_nks(const PvHdr *hdr) - } - - /* In-place modification of ``buf`` */ --static gint pv_hdr_encrypt(const PvHdr *hdr, const PvImage *img, Buffer *buf, -+static gint pv_hdr_encrypt(const PvHdr *hdr, const PvImage *img, PvBuffer *buf, - GError **err) - { - uint32_t hdr_len = pv_hdr_size(hdr); - uint32_t aad_len = pv_hdr_aad_size(hdr); - guint tag_len = pv_hdr_tag_size(hdr); - uint32_t enc_len = pv_hdr_enc_size_casted(hdr); -- const Buffer aad_part = { .data = buf->data, .size = aad_len }; -- Buffer enc_part = { .data = (uint8_t *)buf->data + aad_len, -+ const PvBuffer aad_part = { .data = buf->data, .size = aad_len }; -+ PvBuffer enc_part = { .data = (uint8_t *)buf->data + aad_len, - .size = enc_len }; -- Buffer tag_part = { .data = (uint8_t *)buf->data + hdr_len - tag_len, -+ PvBuffer tag_part = { .data = (uint8_t *)buf->data + hdr_len - tag_len, - .size = tag_len }; - struct cipher_parms parms; - int64_t c_len; -@@ -119,9 +119,9 @@ static gint pv_hdr_aad_init(PvHdr *hdr, const PvImage *img, GError **err) - g_autofree union ecdh_pub_key *cust_pub_key = NULL; - struct pv_hdr_key_slot *hdr_slot = hdr->slots; - struct pv_hdr_head *head = &hdr->head; -- g_autoptr(Buffer) pld = NULL; -- g_autoptr(Buffer) ald = NULL; -- g_autoptr(Buffer) tld = NULL; -+ g_autoptr(PvBuffer) pld = NULL; -+ g_autoptr(PvBuffer) ald = NULL; -+ g_autoptr(PvBuffer) tld = NULL; - uint64_t nep = 0; - - g_assert(sizeof(head->iv) == img->gcm_iv->size); -@@ -250,7 +250,7 @@ PvHdr *pv_hdr_new(const PvImage *img, GError **err) - return g_steal_pointer(&ret); - } - --static void pv_hdr_memcpy(const PvHdr *hdr, const Buffer *dst) -+static void pv_hdr_memcpy(const PvHdr *hdr, const PvBuffer *dst) - { - uint64_t nks = pv_hdr_get_nks(hdr); - uint8_t *data; -@@ -270,13 +270,13 @@ static void pv_hdr_memcpy(const PvHdr *hdr, const Buffer *dst) - } - } - --Buffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, -- enum PvCryptoMode mode, GError **err) -+PvBuffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, -+ enum PvCryptoMode mode, GError **err) - { - uint32_t hdr_size = pv_hdr_size(hdr); -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - -- ret = buffer_alloc(hdr_size); -+ ret = pv_buffer_alloc(hdr_size); - pv_hdr_memcpy(hdr, ret); - - if (mode == PV_ENCRYPT) { -diff --git a/genprotimg/src/pv/pv_hdr.h b/genprotimg/src/pv/pv_hdr.h -index 8df7a6f1..fbcc9e9e 100644 ---- a/genprotimg/src/pv/pv_hdr.h -+++ b/genprotimg/src/pv/pv_hdr.h -@@ -23,8 +23,8 @@ - PvHdr *pv_hdr_new(const PvImage *img, GError **err); - void pv_hdr_free(PvHdr *hdr); - G_GNUC_UNUSED gboolean pv_hdr_uses_encryption(const PvHdr *hdr); --Buffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, -- enum PvCryptoMode mode, GError **err); -+PvBuffer *pv_hdr_serialize(const PvHdr *hdr, const PvImage *img, -+ enum PvCryptoMode mode, GError **err); - uint32_t pv_hdr_size(const PvHdr *hdr); - uint32_t pv_hdr_aad_size(const PvHdr *hdr); - uint64_t pv_hdr_enc_size(const PvHdr *hdr); -diff --git a/genprotimg/src/pv/pv_image.c b/genprotimg/src/pv/pv_image.c -index 59eca5e3..375e40f6 100644 ---- a/genprotimg/src/pv/pv_image.c -+++ b/genprotimg/src/pv/pv_image.c -@@ -56,7 +56,7 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, - GError **err) - { - struct cipher_parms parms = { 0 }; -- g_autoptr(Buffer) tweak = NULL; -+ g_autoptr(PvBuffer) tweak = NULL; - prepare_func func = NULL; - void *opaque = NULL; - gint rc; -@@ -76,7 +76,7 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, - EVP_CIPHER_iv_length(cipher)); - g_assert(img->xts_key->size <= UINT_MAX); - -- tweak = buffer_alloc(sizeof(comp->tweak.data)); -+ tweak = pv_buffer_alloc(sizeof(comp->tweak.data)); - memcpy(tweak->data, comp->tweak.data, tweak->size); - func = pv_component_align_and_encrypt; - parms.cipher = cipher; -@@ -93,11 +93,11 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, - return 0; - } - --static Buffer *pv_img_read_key(const gchar *path, guint key_size, -- GError **err) -+static PvBuffer *pv_img_read_key(const gchar *path, guint key_size, -+ GError **err) - { -- g_autoptr(Buffer) tmp_ret = NULL; -- Buffer *ret = NULL; -+ g_autoptr(PvBuffer) tmp_ret = NULL; -+ PvBuffer *ret = NULL; - gsize bytes_read; - FILE *f = NULL; - gsize size; -@@ -116,7 +116,7 @@ static Buffer *pv_img_read_key(const gchar *path, guint key_size, - if (!f) - return NULL; - -- tmp_ret = buffer_alloc(size); -+ tmp_ret = pv_buffer_alloc(size); - if (file_read(f, tmp_ret->data, 1, tmp_ret->size, &bytes_read, err) < 0) - goto err; - -@@ -160,8 +160,8 @@ static HostKeyList *pv_img_get_host_keys(GSList *host_keys_with_path, gint nid, - return g_steal_pointer(&ret); - } - --static Buffer *pv_img_get_key(const EVP_CIPHER *cipher, const gchar *path, -- GError **err) -+static PvBuffer *pv_img_get_key(const EVP_CIPHER *cipher, const gchar *path, -+ GError **err) - { - gint key_len = EVP_CIPHER_key_length(cipher); - -@@ -173,8 +173,8 @@ static Buffer *pv_img_get_key(const EVP_CIPHER *cipher, const gchar *path, - return generate_aes_key((guint)key_len, err); - } - --static Buffer *pv_img_get_iv(const EVP_CIPHER *cipher, const gchar *path, -- GError **err) -+static PvBuffer *pv_img_get_iv(const EVP_CIPHER *cipher, const gchar *path, -+ GError **err) - { - gint iv_len = EVP_CIPHER_iv_length(cipher); - -@@ -485,23 +485,23 @@ static void pv_hdr_key_slot_free(PvHdrKeySlot *slot) - WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(PvHdrKeySlot, pv_hdr_key_slot_free) - - static PvHdrKeySlot *pv_hdr_key_slot_new(const EVP_CIPHER *gcm_cipher, -- const Buffer *cust_root_key, -+ const PvBuffer *cust_root_key, - EVP_PKEY *cust_key, EVP_PKEY *host_key, - GError **err) - { - g_autoptr(PvHdrKeySlot) ret = g_new0(PvHdrKeySlot, 1); - g_autofree union ecdh_pub_key *pub = NULL; -- g_autoptr(Buffer) exchange_key = NULL; -- g_autoptr(Buffer) digest_key = NULL; -- g_autoptr(Buffer) iv = NULL; -- Buffer pub_buf; -+ g_autoptr(PvBuffer) exchange_key = NULL; -+ g_autoptr(PvBuffer) digest_key = NULL; -+ g_autoptr(PvBuffer) iv = NULL; -+ PvBuffer pub_buf; - /* No AAD data is used */ -- Buffer aad = { .data = NULL, .size = 0 }; -+ PvBuffer aad = { .data = NULL, .size = 0 }; - /* Set the output buffers for the encrypted data and the - * generated GCM tag - */ -- Buffer enc = { .data = ret->wrapped_key, .size = sizeof(ret->wrapped_key) }; -- Buffer tag = { .data = ret->tag, .size = sizeof(ret->tag) }; -+ PvBuffer enc = { .data = ret->wrapped_key, .size = sizeof(ret->wrapped_key) }; -+ PvBuffer tag = { .data = ret->tag, .size = sizeof(ret->tag) }; - struct cipher_parms parms; - int64_t c_len = 0; - -@@ -530,7 +530,7 @@ static PvHdrKeySlot *pv_hdr_key_slot_new(const EVP_CIPHER *gcm_cipher, - g_assert(exchange_key->size == (guint)EVP_CIPHER_key_length(gcm_cipher)); - - /* create zero IV */ -- iv = buffer_alloc((guint)EVP_CIPHER_iv_length(gcm_cipher)); -+ iv = pv_buffer_alloc((guint)EVP_CIPHER_iv_length(gcm_cipher)); - parms.iv_or_tweak = iv; - parms.key = exchange_key; - parms.cipher = gcm_cipher; -@@ -637,13 +637,13 @@ void pv_img_free(PvImage *img) - g_slist_free_full(img->key_slots, (GDestroyNotify)pv_hdr_key_slot_free); - g_slist_free_full(img->host_pub_keys, (GDestroyNotify)EVP_PKEY_free); - EVP_PKEY_free(img->cust_pub_priv_key); -- buffer_clear(&img->stage3a); -+ pv_buffer_clear(&img->stage3a); - pv_img_comps_free(img->comps); - g_free(img->tmp_dir); -- buffer_free(img->xts_key); -- buffer_free(img->cust_root_key); -- buffer_free(img->gcm_iv); -- buffer_free(img->cust_comm_key); -+ pv_buffer_free(img->xts_key); -+ pv_buffer_free(img->cust_root_key); -+ pv_buffer_free(img->gcm_iv); -+ pv_buffer_free(img->cust_comm_key); - g_free(img); - } - -@@ -684,13 +684,13 @@ gint pv_img_add_component(PvImage *img, const PvArg *arg, GError **err) - return 0; - } - --gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, Buffer **pld, Buffer **ald, -- Buffer **tld, uint64_t *nep, GError **err) -+gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, PvBuffer **pld, PvBuffer **ald, -+ PvBuffer **tld, uint64_t *nep, GError **err) - { - return pv_img_comps_finalize(img->comps, pld, ald, tld, nep, err); - } - --static gint pv_img_build_stage3b(PvImage *img, Buffer *stage3b, GError **err) -+static gint pv_img_build_stage3b(PvImage *img, PvBuffer *stage3b, GError **err) - { - g_autofree struct stage3b_args *args = NULL; - -@@ -708,7 +708,7 @@ static gint pv_img_build_stage3b(PvImage *img, Buffer *stage3b, GError **err) - gint pv_img_add_stage3b_comp(PvImage *img, const gchar *path, GError **err) - { - g_autoptr(PvComponent) comp = NULL; -- g_autoptr(Buffer) stage3b = NULL; -+ g_autoptr(PvBuffer) stage3b = NULL; - - stage3b = stage3b_getblob(path, err); - if (!stage3b) -@@ -825,7 +825,7 @@ static gint get_stage3a_data_size(const PvImage *img, gsize *data_size, - - gint pv_img_load_and_set_stage3a(PvImage *img, const gchar *path, GError **err) - { -- g_autoptr(Buffer) stage3a = NULL; -+ g_autoptr(PvBuffer) stage3a = NULL; - gsize bin_size, data_size = 0; - - if (get_stage3a_data_size(img, &data_size, err) < 0) -@@ -845,8 +845,8 @@ gint pv_img_load_and_set_stage3a(PvImage *img, const gchar *path, GError **err) - } - - /* Creates the PV IPIB and sets the stage3a arguments */ --static gint pv_img_build_stage3a(Buffer *stage3a, gsize stage3a_bin_size, -- GSList *comps, const Buffer *hdr, GError **err) -+static gint pv_img_build_stage3a(PvBuffer *stage3a, gsize stage3a_bin_size, -+ GSList *comps, const PvBuffer *hdr, GError **err) - { - g_autofree struct ipl_parameter_block *ipib = NULL; - -@@ -866,9 +866,9 @@ static gint pv_img_build_stage3a(Buffer *stage3a, gsize stage3a_bin_size, - } - - /* Creates the actual PV header (serialized and AES-GCM encrypted) */ --static Buffer *pv_img_create_pv_hdr(PvImage *img, GError **err) -+static PvBuffer *pv_img_create_pv_hdr(PvImage *img, GError **err) - { -- g_autoptr(Buffer) hdr_buf = NULL; -+ g_autoptr(PvBuffer) hdr_buf = NULL; - g_autoptr(PvHdr) hdr = NULL; - - hdr = pv_hdr_new(img, err); -@@ -887,7 +887,7 @@ static Buffer *pv_img_create_pv_hdr(PvImage *img, GError **err) - */ - gint pv_img_finalize(PvImage *pv, const gchar *stage3b_path, GError **err) - { -- g_autoptr(Buffer) hdr = NULL; -+ g_autoptr(PvBuffer) hdr = NULL; - - /* load stage3b template into memory and add it to the list of - * components. This must be done before calling -diff --git a/genprotimg/src/pv/pv_image.h b/genprotimg/src/pv/pv_image.h -index 7c624e24..116fb1a9 100644 ---- a/genprotimg/src/pv/pv_image.h -+++ b/genprotimg/src/pv/pv_image.h -@@ -25,7 +25,7 @@ - - typedef struct { - gchar *tmp_dir; /* directory used for temporary files */ -- Buffer *stage3a; /* stage3a containing IPIB and PV header */ -+ PvBuffer *stage3a; /* stage3a containing IPIB and PV header */ - gsize stage3a_bin_size; /* size of stage3a.bin */ - struct psw_t stage3a_psw; /* (short) PSW that is written to - * location 0 of the created image -@@ -35,15 +35,15 @@ typedef struct { - GSList *host_pub_keys; /* public host keys */ - gint nid; /* Elliptic Curve used for the key derivation */ - /* keys and cipher used for the AES-GCM encryption */ -- Buffer *cust_root_key; -- Buffer *gcm_iv; -+ PvBuffer *cust_root_key; -+ PvBuffer *gcm_iv; - const EVP_CIPHER *gcm_cipher; - /* Information for the IPIB and PV header */ - uint64_t pcf; - uint64_t scf; -- Buffer *cust_comm_key; -+ PvBuffer *cust_comm_key; - const EVP_CIPHER *cust_comm_cipher; -- Buffer *xts_key; -+ PvBuffer *xts_key; - const EVP_CIPHER *xts_cipher; - GSList *key_slots; - GSList *optional_items; -@@ -54,8 +54,8 @@ PvImage *pv_img_new(PvArgs *args, const gchar *stage3a_path, GError **err); - void pv_img_free(PvImage *img); - gint pv_img_add_component(PvImage *img, const PvArg *arg, GError **err); - gint pv_img_finalize(PvImage *img, const gchar *stage3b_path, GError **err); --gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, Buffer **pld, Buffer **ald, -- Buffer **tld, uint64_t *nep, GError **err); -+gint pv_img_calc_pld_ald_tld_nep(const PvImage *img, PvBuffer **pld, PvBuffer **ald, -+ PvBuffer **tld, uint64_t *nep, GError **err); - gint pv_img_load_and_set_stage3a(PvImage *img, const gchar *path, GError **err); - const PvComponent *pv_img_get_stage3b_comp(const PvImage *img, GError **err); - gint pv_img_add_stage3b_comp(PvImage *img, const gchar *path, GError **err); -diff --git a/genprotimg/src/pv/pv_ipib.c b/genprotimg/src/pv/pv_ipib.c -index 2517e548..59fe0086 100644 ---- a/genprotimg/src/pv/pv_ipib.c -+++ b/genprotimg/src/pv/pv_ipib.c -@@ -35,7 +35,7 @@ uint64_t pv_ipib_get_size(uint32_t num_comp) - } - - static gint pv_ipib_init(IplParameterBlock *ipib, GSList *comps, -- const Buffer *hdr) -+ const PvBuffer *hdr) - { - g_assert(sizeof(struct ipl_pl_hdr) <= UINT32_MAX); - g_assert(sizeof(struct ipl_pb0_pv_comp) <= UINT32_MAX); -@@ -100,7 +100,7 @@ static gint pv_ipib_init(IplParameterBlock *ipib, GSList *comps, - return 0; - } - --IplParameterBlock *pv_ipib_new(GSList *comps, const Buffer *hdr, GError **err) -+IplParameterBlock *pv_ipib_new(GSList *comps, const PvBuffer *hdr, GError **err) - { - uint64_t ipib_size = pv_ipib_get_size(g_slist_length(comps)); - g_autoptr(IplParameterBlock) ret = NULL; -diff --git a/genprotimg/src/pv/pv_ipib.h b/genprotimg/src/pv/pv_ipib.h -index 93317901..4b66643d 100644 ---- a/genprotimg/src/pv/pv_ipib.h -+++ b/genprotimg/src/pv/pv_ipib.h -@@ -19,7 +19,7 @@ - typedef struct ipl_parameter_block IplParameterBlock; - - uint64_t pv_ipib_get_size(uint32_t num_comp); --IplParameterBlock *pv_ipib_new(GSList *comps, const Buffer *hdr, GError **err); -+IplParameterBlock *pv_ipib_new(GSList *comps, const PvBuffer *hdr, GError **err); - void pv_ipib_free(IplParameterBlock *ipib); - - WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(IplParameterBlock, pv_ipib_free) -diff --git a/genprotimg/src/pv/pv_stage3.c b/genprotimg/src/pv/pv_stage3.c -index a1e5b164..bff9db7d 100644 ---- a/genprotimg/src/pv/pv_stage3.c -+++ b/genprotimg/src/pv/pv_stage3.c -@@ -24,12 +24,12 @@ - ((struct stage3a_args *)((uint64_t)data_ptr + loader_size - \ - sizeof(struct stage3a_args))) - --static Buffer *loader_getblob(const gchar *filename, gsize *loader_size, -- gsize args_size, gsize data_size, -- gboolean data_aligned, GError **err) -+static PvBuffer *loader_getblob(const gchar *filename, gsize *loader_size, -+ gsize args_size, gsize data_size, -+ gboolean data_aligned, GError **err) - { - g_autoptr(GMappedFile) mapped_file = NULL; -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - gsize size, tmp_loader_size; - gchar *loader_data; - -@@ -60,7 +60,7 @@ static Buffer *loader_getblob(const gchar *filename, gsize *loader_size, - size = (data_aligned ? PAGE_ALIGN(tmp_loader_size) : tmp_loader_size) + - data_size; - -- ret = buffer_alloc(size); -+ ret = pv_buffer_alloc(size); - - /* copy the loader "template" */ - memcpy(ret->data, loader_data, tmp_loader_size); -@@ -71,8 +71,8 @@ static Buffer *loader_getblob(const gchar *filename, gsize *loader_size, - return g_steal_pointer(&ret); - } - --Buffer *stage3a_getblob(const gchar *filename, gsize *loader_size, -- gsize data_size, GError **err) -+PvBuffer *stage3a_getblob(const gchar *filename, gsize *loader_size, -+ gsize data_size, GError **err) - { - return loader_getblob(filename, loader_size, - sizeof(struct stage3a_args), data_size, TRUE, -@@ -83,8 +83,8 @@ Buffer *stage3a_getblob(const gchar *filename, gsize *loader_size, - /* Set the right offsets and sizes in the stage3a template + add - * the IPIB block with the PV header - */ --static gint stage3a_set_data(Buffer *loader, gsize loader_size, -- const Buffer *hdr, struct ipl_parameter_block *ipib, -+static gint stage3a_set_data(PvBuffer *loader, gsize loader_size, -+ const PvBuffer *hdr, struct ipl_parameter_block *ipib, - GError **err) - { - uint32_t ipib_size = GUINT32_FROM_BE(ipib->hdr.len); -@@ -126,15 +126,15 @@ static gint stage3a_set_data(Buffer *loader, gsize loader_size, - return 0; - } - --gint build_stage3a(Buffer *loader, gsize loader_size, const Buffer *hdr, -+gint build_stage3a(PvBuffer *loader, gsize loader_size, const PvBuffer *hdr, - struct ipl_parameter_block *ipib, GError **err) - { - return stage3a_set_data(loader, loader_size, hdr, ipib, err); - } - --Buffer *stage3b_getblob(const gchar *filename, GError **err) -+PvBuffer *stage3b_getblob(const gchar *filename, GError **err) - { -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - gsize rb_size; - - ret = loader_getblob(filename, &rb_size, sizeof(struct stage3b_args), 0, -@@ -146,7 +146,7 @@ Buffer *stage3b_getblob(const gchar *filename, GError **err) - return g_steal_pointer(&ret); - } - --void build_stage3b(Buffer *stage3b, const struct stage3b_args *args) -+void build_stage3b(PvBuffer *stage3b, const struct stage3b_args *args) - { - g_assert(stage3b->size > sizeof(*args)); - -diff --git a/genprotimg/src/pv/pv_stage3.h b/genprotimg/src/pv/pv_stage3.h -index baaf921b..364408ee 100644 ---- a/genprotimg/src/pv/pv_stage3.h -+++ b/genprotimg/src/pv/pv_stage3.h -@@ -19,12 +19,12 @@ - #include "boot/stage3b.h" - #include "utils/buffer.h" - --Buffer *stage3a_getblob(const gchar *filename, gsize *loader_size, -- gsize data_size, GError **err); --gint build_stage3a(Buffer *dc, gsize dc_size, const Buffer *hdr, -+PvBuffer *stage3a_getblob(const gchar *filename, gsize *loader_size, -+ gsize data_size, GError **err); -+gint build_stage3a(PvBuffer *dc, gsize dc_size, const PvBuffer *hdr, - struct ipl_parameter_block *ipib, GError **err); --Buffer *stage3b_getblob(const gchar *filename, GError **err); --void build_stage3b(Buffer *stage3b, const struct stage3b_args *args); -+PvBuffer *stage3b_getblob(const gchar *filename, GError **err); -+void build_stage3b(PvBuffer *stage3b, const struct stage3b_args *args); - void memblob_init(struct memblob *arg, uint64_t src, uint64_t size); - - #endif -diff --git a/genprotimg/src/utils/buffer.c b/genprotimg/src/utils/buffer.c -index 35aed742..509dc0de 100644 ---- a/genprotimg/src/utils/buffer.c -+++ b/genprotimg/src/utils/buffer.c -@@ -17,18 +17,18 @@ - #include "common.h" - #include "file_utils.h" - --Buffer *buffer_alloc(gsize size) -+PvBuffer *pv_buffer_alloc(gsize size) - { -- Buffer *ret = g_new0(Buffer, 1); -+ PvBuffer *ret = g_new0(PvBuffer, 1); - - ret->data = g_malloc0(size); - ret->size = size; - return ret; - } - --Buffer *buffer_dup(const Buffer *buf, gboolean page_aligned) -+PvBuffer *pv_buffer_dup(const PvBuffer *buf, gboolean page_aligned) - { -- Buffer *ret; -+ PvBuffer *ret; - gsize size; - - if (!buf) -@@ -38,19 +38,19 @@ Buffer *buffer_dup(const Buffer *buf, gboolean page_aligned) - if (page_aligned) - size = PAGE_ALIGN(size); - -- ret = buffer_alloc(size); -+ ret = pv_buffer_alloc(size); - - /* content will be 0-right-padded */ - memcpy(ret->data, buf->data, buf->size); - return ret; - } - --gint buffer_write(const Buffer *buf, FILE *file, GError **err) -+gint pv_buffer_write(const PvBuffer *buf, FILE *file, GError **err) - { - return file_write(file, buf->data, buf->size, 1, NULL, err); - } - --void buffer_free(Buffer *buf) -+void pv_buffer_free(PvBuffer *buf) - { - if (!buf) - return; -@@ -59,11 +59,11 @@ void buffer_free(Buffer *buf) - g_free(buf); - } - --void buffer_clear(Buffer **buf) -+void pv_buffer_clear(PvBuffer **buf) - { - if (!buf || !*buf) - return; - -- buffer_free(*buf); -+ pv_buffer_free(*buf); - *buf = NULL; - } -diff --git a/genprotimg/src/utils/buffer.h b/genprotimg/src/utils/buffer.h -index 7239d5c9..824b72cb 100644 ---- a/genprotimg/src/utils/buffer.h -+++ b/genprotimg/src/utils/buffer.h -@@ -15,17 +15,17 @@ - - #include "common.h" - --typedef struct Buffer { -+typedef struct PvBuffer { - void *data; - gsize size; /* in bytes */ --} Buffer; -+} PvBuffer; - --Buffer *buffer_alloc(gsize size); --void buffer_free(Buffer *buf); --void buffer_clear(Buffer **buf); --gint buffer_write(const Buffer *buf, FILE *file, GError **err); --Buffer *buffer_dup(const Buffer *buf, gboolean page_aligned); -+PvBuffer *pv_buffer_alloc(gsize size); -+void pv_buffer_free(PvBuffer *buf); -+void pv_buffer_clear(PvBuffer **buf); -+gint pv_buffer_write(const PvBuffer *buf, FILE *file, GError **err); -+PvBuffer *pv_buffer_dup(const PvBuffer *buf, gboolean page_aligned); - --WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(Buffer, buffer_free) -+WRAPPED_G_DEFINE_AUTOPTR_CLEANUP_FUNC(PvBuffer, pv_buffer_free) - - #endif -diff --git a/genprotimg/src/utils/crypto.c b/genprotimg/src/utils/crypto.c -index 44facc28..05c3e832 100644 ---- a/genprotimg/src/utils/crypto.c -+++ b/genprotimg/src/utils/crypto.c -@@ -89,15 +89,15 @@ EVP_MD_CTX *digest_ctx_new(const EVP_MD *md, GError **err) - return g_steal_pointer(&ctx); - } - --Buffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err) -+PvBuffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err) - { - gint md_size = EVP_MD_size(EVP_MD_CTX_md(ctx)); -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - guint digest_size; - - g_assert(md_size > 0); - -- ret = buffer_alloc((guint)md_size); -+ ret = pv_buffer_alloc((guint)md_size); - if (EVP_DigestFinal_ex(ctx, ret->data, &digest_size) != 1) { - g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, - _("EVP_DigestFinal_ex failed")); -@@ -110,10 +110,10 @@ Buffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err) - } - - /* Returns the digest of @buf using the hash algorithm @md */ --static Buffer *digest_buffer(const EVP_MD *md, const Buffer *buf, GError **err) -+static PvBuffer *digest_buffer(const EVP_MD *md, const PvBuffer *buf, GError **err) - { - g_autoptr(EVP_MD_CTX) md_ctx = NULL; -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - g_assert(buf); - - md_ctx = digest_ctx_new(md, err); -@@ -134,9 +134,9 @@ static Buffer *digest_buffer(const EVP_MD *md, const Buffer *buf, GError **err) - } - - /* Returns the SHA256 digest of @buf */ --Buffer *sha256_buffer(const Buffer *buf, GError **err) -+PvBuffer *sha256_buffer(const PvBuffer *buf, GError **err) - { -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - - ret = digest_buffer(EVP_sha256(), buf, err); - if (!ret) -@@ -207,10 +207,10 @@ union ecdh_pub_key *evp_pkey_to_ecdh_pub_key(EVP_PKEY *key, GError **err) - return g_steal_pointer(&ret); - } - --static Buffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) -+static PvBuffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) - { - g_autoptr(EVP_PKEY_CTX) ctx = NULL; -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - gsize key_size; - - ctx = EVP_PKEY_CTX_new(cust, NULL); -@@ -236,7 +236,7 @@ static Buffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) - return NULL; - } - -- ret = buffer_alloc(key_size); -+ ret = pv_buffer_alloc(key_size); - if (EVP_PKEY_derive(ctx, ret->data, &key_size) != 1) { - g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_DERIVE, - _("Key derivation failed")); -@@ -247,11 +247,11 @@ static Buffer *derive_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) - return g_steal_pointer(&ret); - } - --Buffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) -+PvBuffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err) - { -- g_autoptr(Buffer) raw = buffer_alloc(70); -- g_autoptr(Buffer) ret = NULL; -- g_autoptr(Buffer) key = NULL; -+ g_autoptr(PvBuffer) raw = pv_buffer_alloc(70); -+ g_autoptr(PvBuffer) ret = NULL; -+ g_autoptr(PvBuffer) key = NULL; - guchar *data; - - key = derive_key(cust, host, err); -@@ -290,10 +290,10 @@ gint generate_tweak(union tweak *tweak, uint16_t i, GError **err) - return 0; - } - --static Buffer *generate_rand_data(guint size, const gchar *err_msg, -- GError **err) -+static PvBuffer *generate_rand_data(guint size, const gchar *err_msg, -+ GError **err) - { -- g_autoptr(Buffer) buf = buffer_alloc(size); -+ g_autoptr(PvBuffer) buf = pv_buffer_alloc(size); - - g_assert(size <= INT_MAX); - -@@ -307,14 +307,14 @@ static Buffer *generate_rand_data(guint size, const gchar *err_msg, - return g_steal_pointer(&buf); - } - --Buffer *generate_aes_iv(guint size, GError **err) -+PvBuffer *generate_aes_iv(guint size, GError **err) - { - return generate_rand_data(size, - _("Generating a IV failed because the required amount of random data is not available"), - err); - } - --Buffer *generate_aes_key(guint size, GError **err) -+PvBuffer *generate_aes_key(guint size, GError **err) - { - return generate_rand_data(size, - _("Generating a key failed because the required amount of random data is not available"), -@@ -1756,8 +1756,8 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in, - gint cipher_block_size = EVP_CIPHER_block_size(cipher); - guchar in_buf[PAGE_SIZE], - out_buf[PAGE_SIZE + (guint)cipher_block_size]; -- const Buffer *key = parms->key; -- const Buffer *tweak = parms->iv_or_tweak; -+ const PvBuffer *key = parms->key; -+ const PvBuffer *tweak = parms->iv_or_tweak; - g_autofree guchar *tmp_tweak = NULL; - gint out_len, tweak_size; - gsize tmp_size_in = 0, tmp_size_out = 0; -@@ -1895,11 +1895,11 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in, - return 0; - } - --static Buffer *__encrypt_decrypt_buffer(const struct cipher_parms *parms, -- const Buffer *in, gboolean encrypt, -- GError **err) -+static PvBuffer *__encrypt_decrypt_buffer(const struct cipher_parms *parms, -+ const PvBuffer *in, gboolean encrypt, -+ GError **err) - { -- g_autoptr(Buffer) ret = NULL; -+ g_autoptr(PvBuffer) ret = NULL; - g_autoptr(BIO) b_out = NULL; - g_autoptr(BIO) b_in = NULL; - gsize in_size, out_size; -@@ -1927,19 +1927,19 @@ static Buffer *__encrypt_decrypt_buffer(const struct cipher_parms *parms, - return NULL; - } - -- ret = buffer_alloc((unsigned long)data_size); -+ ret = pv_buffer_alloc((unsigned long)data_size); - memcpy(ret->data, data, ret->size); - return g_steal_pointer(&ret); - } - --Buffer *encrypt_buf(const struct cipher_parms *parms, const Buffer *in, -- GError **err) -+PvBuffer *encrypt_buf(const struct cipher_parms *parms, const PvBuffer *in, -+ GError **err) - { - return __encrypt_decrypt_buffer(parms, in, TRUE, err); - } - --Buffer *decrypt_buf(const struct cipher_parms *parms, const Buffer *in, -- GError **err) -+PvBuffer *decrypt_buf(const struct cipher_parms *parms, const PvBuffer *in, -+ GError **err) - { - return __encrypt_decrypt_buffer(parms, in, FALSE, err); - } -@@ -1993,16 +1993,16 @@ G_GNUC_UNUSED static gint decrypt_file(const struct cipher_parms *parms, - } - - /* GCM mode uses (zero-)padding */ --static int64_t gcm_encrypt_decrypt(const Buffer *in, const Buffer *aad, -+static int64_t gcm_encrypt_decrypt(const PvBuffer *in, const PvBuffer *aad, - const struct cipher_parms *parms, -- Buffer *out, Buffer *tag, -+ PvBuffer *out, PvBuffer *tag, - enum PvCryptoMode mode, GError **err) - { - g_autoptr(EVP_CIPHER_CTX) ctx = NULL; - const EVP_CIPHER *cipher = parms->cipher; -- const Buffer *iv = parms->iv_or_tweak; -+ const PvBuffer *iv = parms->iv_or_tweak; - gboolean encrypt = mode == PV_ENCRYPT; -- const Buffer *key = parms->key; -+ const PvBuffer *key = parms->key; - int64_t ret = -1; - gint len = -1; - -@@ -2097,8 +2097,8 @@ static int64_t gcm_encrypt_decrypt(const Buffer *in, const Buffer *aad, - return ret; - } - --int64_t gcm_encrypt(const Buffer *in, const Buffer *aad, -- const struct cipher_parms *parms, Buffer *out, Buffer *tag, -+int64_t gcm_encrypt(const PvBuffer *in, const PvBuffer *aad, -+ const struct cipher_parms *parms, PvBuffer *out, PvBuffer *tag, - GError **err) - { - return gcm_encrypt_decrypt(in, aad, parms, out, tag, PV_ENCRYPT, err); -diff --git a/genprotimg/src/utils/crypto.h b/genprotimg/src/utils/crypto.h -index 286cf457..3cda4507 100644 ---- a/genprotimg/src/utils/crypto.h -+++ b/genprotimg/src/utils/crypto.h -@@ -117,8 +117,8 @@ union tweak { - - struct cipher_parms { - const EVP_CIPHER *cipher; -- const Buffer *key; -- const Buffer *iv_or_tweak; -+ const PvBuffer *key; -+ const PvBuffer *iv_or_tweak; - }; - - int check_crl_valid_for_cert(X509_CRL *crl, X509 *cert, -@@ -152,24 +152,24 @@ X509_CRL *get_first_valid_crl(X509_STORE_CTX *ctx, X509 *cert, GError **err); - void store_setup_crl_download(X509_STORE *st); - EVP_PKEY *read_ec_pubkey_cert(X509 *cert, gint nid, GError **err); - --Buffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err); --Buffer *generate_aes_key(guint size, GError **err); --Buffer *generate_aes_iv(guint size, GError **err); -+PvBuffer *compute_exchange_key(EVP_PKEY *cust, EVP_PKEY *host, GError **err); -+PvBuffer *generate_aes_key(guint size, GError **err); -+PvBuffer *generate_aes_iv(guint size, GError **err); - EVP_PKEY *generate_ec_key(gint nid, GError **err); - gint generate_tweak(union tweak *tweak, uint16_t i, GError **err); - union ecdh_pub_key *evp_pkey_to_ecdh_pub_key(EVP_PKEY *key, GError **err); - EVP_MD_CTX *digest_ctx_new(const EVP_MD *md, GError **err); --Buffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err); --Buffer *sha256_buffer(const Buffer *buf, GError **err); --int64_t gcm_encrypt(const Buffer *in, const Buffer *aad, -- const struct cipher_parms *parms, Buffer *out, -- Buffer *tag, GError **err); -+PvBuffer *digest_ctx_finalize(EVP_MD_CTX *ctx, GError **err); -+PvBuffer *sha256_buffer(const PvBuffer *buf, GError **err); -+int64_t gcm_encrypt(const PvBuffer *in, const PvBuffer *aad, -+ const struct cipher_parms *parms, PvBuffer *out, -+ PvBuffer *tag, GError **err); - gint encrypt_file(const struct cipher_parms *parms, const gchar *in_path, - const gchar *path_out, gsize *in_size, gsize *out_size, - GError **err); --Buffer *encrypt_buf(const struct cipher_parms *parms, const Buffer *in, -- GError **err); --G_GNUC_UNUSED Buffer *decrypt_buf(const struct cipher_parms *parms, -- const Buffer *in, GError **err); -+PvBuffer *encrypt_buf(const struct cipher_parms *parms, const PvBuffer *in, -+ GError **err); -+G_GNUC_UNUSED PvBuffer *decrypt_buf(const struct cipher_parms *parms, -+ const PvBuffer *in, GError **err); - - #endif -diff --git a/genprotimg/src/utils/file_utils.c b/genprotimg/src/utils/file_utils.c -index 1d6fc370..ba33400f 100644 ---- a/genprotimg/src/utils/file_utils.c -+++ b/genprotimg/src/utils/file_utils.c -@@ -171,13 +171,13 @@ gint seek_and_write_file(FILE *o, const CompFile *ifile, uint64_t offset, - return ret; - } - --gint seek_and_write_buffer(FILE *o, const Buffer *buf, uint64_t offset, -+gint seek_and_write_buffer(FILE *o, const PvBuffer *buf, uint64_t offset, - GError **err) - { - if (file_seek(o, offset, err) < 0) - return -1; - -- if (buffer_write(buf, o, err) < 0) -+ if (pv_buffer_write(buf, o, err) < 0) - return -1; - - return 0; -diff --git a/genprotimg/src/utils/file_utils.h b/genprotimg/src/utils/file_utils.h -index 47df1148..456e7aca 100644 ---- a/genprotimg/src/utils/file_utils.h -+++ b/genprotimg/src/utils/file_utils.h -@@ -26,7 +26,7 @@ gint file_write(FILE *out, const void *ptr, gsize size, gsize count, - gsize *count_written, GError **err); - gint pad_file_right(const gchar *path_out, const gchar *path_in, - gsize *size_out, guint padding, GError **err); --gint seek_and_write_buffer(FILE *out, const Buffer *buf, uint64_t offset, -+gint seek_and_write_buffer(FILE *out, const PvBuffer *buf, uint64_t offset, - GError **err); - gint seek_and_write_file(FILE *o, const CompFile *ifile, uint64_t offset, - GError **err); diff --git a/s390-tools-2.16.0-zkey.patch b/s390-tools-2.16.0-zkey.patch deleted file mode 100644 index 42b2014..0000000 --- a/s390-tools-2.16.0-zkey.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 3f3f063c98278f53ad3b34e68b70fca62eaea8fb Mon Sep 17 00:00:00 2001 -From: Ingo Franzki -Date: Tue, 23 Feb 2021 08:52:26 +0100 -Subject: [PATCH] zkey: Fix build error when the compiler flags are overridden -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When the compiler flags are overridden, the build of zkey may fail with: - -kms.c:44:2: error: #error KMS_PLUGIN_LOCATION must be defined - 44 | #error KMS_PLUGIN_LOCATION must be defined - | ^~~~~ - -The Makefile uses CFLAGS variable for defining the KMS_PLUGIN_LOCATION, -but it should rather use ALL_CFLAGS. - -Also use ALL_CPPFLAGS for defining HAVE_LUKS2_SUPPORT. - -Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/108 - -Signed-off-by: Ingo Franzki -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Höppner ---- - zkey/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/zkey/Makefile b/zkey/Makefile -index 41129bcf..f74e2091 100644 ---- a/zkey/Makefile -+++ b/zkey/Makefile -@@ -18,7 +18,7 @@ ifneq (${HAVE_CRYPTSETUP2},0) - ifneq (${HAVE_OPENSSL},0) - BUILD_TARGETS += zkey-cryptsetup - INSTALL_TARGETS += install-zkey-cryptsetup -- CPPFLAGS += -DHAVE_LUKS2_SUPPORT -+ ALL_CPPFLAGS += -DHAVE_LUKS2_SUPPORT - else - BUILD_TARGETS += zkey-cryptsetup-skip-openssl - INSTALL_TARGETS += zkey-cryptsetup-skip-openssl -@@ -34,7 +34,7 @@ endif - - libs = $(rootdir)/libutil/libutil.a - --CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" -+ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" - - detect-libcryptsetup.dep: - echo "#include " > detect-libcryptsetup.dep diff --git a/s390utils.spec b/s390utils.spec index 263e050..fc55960 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,14 +5,13 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.16.0 -Release: 2%{?dist} +Version: 2.17.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x -#URL: http://www.ibm.com/developerworks/linux/linux390/s390-tools.html -URL: https://github.com/ibm-s390-tools/s390-tools -Source0: https://github.com/ibm-s390-tools/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz +URL: https://github.com/ibm-s390-linux/s390-tools +Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz Source5: zfcpconf.sh Source7: zfcp.udev # files for DASD initialization @@ -35,12 +34,6 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch -# upstream fixes -# https://github.com/ibm-s390-linux/s390-tools/commit/3f3f063c98278f53ad3b34e68b70fca62eaea8fb -Patch100: s390-tools-2.16.0-zkey.patch -# https://github.com/ibm-s390-linux/s390-tools/commit/b6bdd7744aba06d82f30b0c84012f0b06ccb01de -Patch101: s390-tools-2.16.0-genprotimg.patch - Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} @@ -49,7 +42,7 @@ Requires: s390utils-mon_statd = %{epoch}:%{version}-%{release} Requires: s390utils-iucvterm = %{epoch}:%{version}-%{release} Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} -BuildRequires: make +BuildRequires: make BuildRequires: gcc-c++ %description @@ -67,10 +60,6 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort -# upstream fixes -%patch100 -p1 -%patch101 -p1 - # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' @@ -259,6 +248,7 @@ BuildRequires: cryptsetup-devel >= 2.0.3 BuildRequires: json-c-devel BuildRequires: rpm-devel BuildRequires: glib2-devel +BuildRequires: libxml2-devel %description base @@ -418,6 +408,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/dasdstat %{_sbindir}/dasdview %{_sbindir}/dbginfo.sh +%{_sbindir}/hsavmcore %{_sbindir}/hsci %{_sbindir}/hyptop %{_sbindir}/ip_watcher.pl @@ -425,6 +416,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/lscpumf %{_sbindir}/lscss %{_sbindir}/lsdasd +%{_sbindir}/lshwc %{_sbindir}/lsqeth %{_sbindir}/lsluns %{_sbindir}/lsreipl @@ -468,17 +460,22 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm /lib/s390-tools/zfcpdump/zfcpdump-initrd /lib/s390-tools/znetcontrolunits %{_libdir}/libekmfweb.so.* +%{_libdir}/libkmipclient.so.* %{_libdir}/zkey/zkey-ekmfweb.so +%{_libdir}/zkey/zkey-kmip.so %{_mandir}/man1/dbginfo.sh.1* %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/lscpumf.1* +%{_mandir}/man1/lshwc.1* %{_mandir}/man1/vmconvert.1* %{_mandir}/man1/zfcpdbf.1* %{_mandir}/man1/zipl-switch-to-blscfg.1* %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* +%{_mandir}/man1/zkey-kmip.1* %{_mandir}/man4/prandom.4* +%{_mandir}/man5/hsavmcore.conf.5* %{_mandir}/man8/chccwdev.8* %{_mandir}/man8/chchp.8* %{_mandir}/man8/chcpumf.8* @@ -488,6 +485,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/dasdview.8* %{_mandir}/man8/dumpconf.8* %{_mandir}/man8/genprotimg.8.* +%{_mandir}/man8/hsavmcore.8* %{_mandir}/man8/hsci.8* %{_mandir}/man8/hyptop.8* %{_mandir}/man8/lschp.8* @@ -520,6 +518,9 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_datadir}/s390-tools/genprotimg/ %{_datadir}/s390-tools/netboot/ %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey +%dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip +%dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip/profiles +%config(noreplace) %attr(0660,root,zkeyadm)%{_sysconfdir}/zkey/kmip/profiles/*.profile %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/repository %config(noreplace) %attr(0660,root,zkeyadm)%{_sysconfdir}/zkey/kms-plugins.conf @@ -813,10 +814,18 @@ User-space development files for the s390/s390x architecture. %files devel %{_includedir}/%{name}/ %{_includedir}/ekmfweb/ +%{_includedir}/kmipclient/ %{_libdir}/libekmfweb.so +%{_libdir}/libkmipclient.so %changelog +* Wed Jul 07 2021 Dan Horák - 2:2.17.0-1 +- rebased to 2.17.0 +- zfcpconf: set exit code explicitly (#1977434) +- mk-s390image script requires file (#1973239) +- drop obsolete setting from device_cio_free.service (#1972449) + * Mon Mar 01 2021 Dan Horák - 2:2.16.0-2 - drop superfluous Require from s390utils-base diff --git a/sources b/sources index 404b75d..f999e3d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.16.0.tar.gz) = d0866e2f372ba2938ccab264846d6cfe3db1b760cff6645fbefcd33a8ce8e7d971e442ccefda7e8e4d59818293147caa57fa593a3e66cd77e1e661928336793c +SHA512 (s390-tools-2.17.0.tar.gz) = 57d1c90e2a270c380fd7b4ac8efdd301299d9e8671a7ff10747557135b27a06e8124a49f50b8729b450550ced61599f392606bcbe5e499c5bd488b9e207945da From 2a913049eed7a043f960211a7cb404374fd7162e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 8 Jul 2021 11:38:29 +0200 Subject: [PATCH 051/141] modernize ccw udev rules --- ccw.udev | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ccw.udev b/ccw.udev index a12ad05..8ef72db 100644 --- a/ccw.udev +++ b/ccw.udev @@ -1,13 +1,4 @@ -ACTION!="add|change", GOTO="ccw_end" +ACTION!="bind", GOTO="ccw_end" SUBSYSTEM!="ccw", GOTO="ccw_end" -ATTRS{cutype}=="1731/01", RUN+="ccw_init" -ATTRS{cutype}=="1731/02", RUN+="ccw_init" -ATTRS{cutype}=="1731/05", RUN+="ccw_init" -ATTRS{cutype}=="1731/06", RUN+="ccw_init" -ATTRS{cutype}=="3088/01", RUN+="ccw_init" -ATTRS{cutype}=="3088/08", RUN+="ccw_init" -ATTRS{cutype}=="3088/60", RUN+="ccw_init" -ATTRS{cutype}=="3088/61", RUN+="ccw_init" -ATTRS{cutype}=="3088/1e", RUN+="ccw_init" -ATTRS{cutype}=="3088/1f", RUN+="ccw_init" +DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init" LABEL="ccw_end" From 9e8e130a7cb8645316002bb7641fed52fd7d212f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 8 Jul 2021 11:42:31 +0200 Subject: [PATCH 052/141] use URLs for RHEL/Fedora specific scripts and configs --- s390utils.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index fc55960..271a8ea 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -12,16 +12,16 @@ License: MIT ExclusiveArch: s390 s390x URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz -Source5: zfcpconf.sh -Source7: zfcp.udev +Source5: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcpconf.sh +Source7: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcp.udev # files for DASD initialization -Source12: dasd.udev -Source13: dasdconf.sh -Source14: device_cio_free -Source15: device_cio_free.service -Source16: ccw_init -Source17: ccw.udev -Source21: normalize_dasd_arg +Source12: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasd.udev +Source13: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasdconf.sh +Source14: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/device_cio_free +Source15: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/device_cio_free.service +Source16: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/ccw_init +Source17: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/ccw.udev +Source21: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/normalize_dasd_arg Source23: 20-zipl-kernel.install Source24: 52-zipl-rescue.install Source25: 91-zipl.install From 0419550a2ada802c0aefb85feee6239ffaf05fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 8 Jul 2021 11:44:55 +0200 Subject: [PATCH 053/141] remove a comment --- s390utils.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 271a8ea..b45ef43 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,6 @@ URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz Source5: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcpconf.sh Source7: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcp.udev -# files for DASD initialization Source12: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasd.udev Source13: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasdconf.sh Source14: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/device_cio_free From c1e8b3a3099916f6f4b78eac01bd39d677bdf3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 14 Jul 2021 12:21:50 +0000 Subject: [PATCH 054/141] workaround a build issue with new ld (binutils >= 2.36) The new ld doesn't ignore an unrecorgnized -no-pie option. Related: https://github.com/ibm-s390-linux/s390-tools/pull/106 --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index b45ef43..df328ed 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -66,6 +66,7 @@ find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' %build make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" \ + NO_PIE_LDFLAGS="" \ BINDIR=/usr/sbin \ DISTRELEASE=%{release} \ V=1 From 287377b41478ae174873a9ec1e81dd04f465449a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 15 Jul 2021 10:46:57 +0200 Subject: [PATCH 055/141] base should own the /usr/lib64/zkey directory --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index df328ed..f9cbb43 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -461,6 +461,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm /lib/s390-tools/znetcontrolunits %{_libdir}/libekmfweb.so.* %{_libdir}/libkmipclient.so.* +%dir %{_libdir}/zkey %{_libdir}/zkey/zkey-ekmfweb.so %{_libdir}/zkey/zkey-kmip.so %{_mandir}/man1/dbginfo.sh.1* From a8e761756e14c09bfd3a6f719ea91c39cc079c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 15 Jul 2021 10:48:13 +0200 Subject: [PATCH 056/141] drop trailing slash when listing dirs with %dir in %files --- s390utils.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index f9cbb43..9beb4bb 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -181,7 +181,7 @@ This package provides minimal set of tools needed to system to boot. %{_sbindir}/fdasd %{_sbindir}/lszdev %{_sbindir}/zipl -%dir /lib/s390-tools/ +%dir /lib/s390-tools /lib/s390-tools/{zipl,chreipl}_helper.* /lib/s390-tools/cpictl /lib/s390-tools/stage3.bin @@ -515,7 +515,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/zgetdump.8* %{_mandir}/man8/znetconf.8* %{_mandir}/man8/zpcictl.8* -%dir %{_datadir}/s390-tools/ +%dir %{_datadir}/s390-tools %{_datadir}/s390-tools/genprotimg/ %{_datadir}/s390-tools/netboot/ %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey From 083020797b5546b3e33d4b97b6d9ae2fa078f7ff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 16:57:00 +0000 Subject: [PATCH 057/141] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 9beb4bb..e9b0e0e 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.17.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -821,6 +821,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2:2.17.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jul 07 2021 Dan Horák - 2:2.17.0-1 - rebased to 2.17.0 - zfcpconf: set exit code explicitly (#1977434) From ea8f5ea85288e31c0718c6833face5d61189ec03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 5 Oct 2021 10:10:21 +0000 Subject: [PATCH 058/141] - rebased to 2.18.0 --- s390-tools-zipl-blscfg-rpm-nvr-sort.patch | 4 ++-- s390utils.spec | 12 ++++++++++-- sources | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index d69192f..2278c3f 100644 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -8,8 +8,8 @@ diff -up s390-tools-2.9.0/zipl/src/Makefile.blscfg-rpm-nvr-sort s390-tools-2.9.0 -libs = $(rootdir)/libutil/libutil.a +libs = $(rootdir)/libutil/libutil.a -lrpmio -lrpm - objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \ - install.o zipl.o $(rootdir)/zipl/boot/data.o + objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \ + bootmap_header.o envblk.o install.o zipl.o $(rootdir)/zipl/boot/data.o diff -up s390-tools-2.9.0/zipl/src/scan.c.blscfg-rpm-nvr-sort s390-tools-2.9.0/zipl/src/scan.c --- s390-tools-2.9.0/zipl/src/scan.c.blscfg-rpm-nvr-sort 2019-05-21 09:13:36.000000000 -0400 +++ s390-tools-2.9.0/zipl/src/scan.c 2019-05-22 08:16:17.317273801 -0400 diff --git a/s390utils.spec b/s390utils.spec index e9b0e0e..961083e 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.17.0 -Release: 2%{?dist} +Version: 2.18.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -181,10 +181,12 @@ This package provides minimal set of tools needed to system to boot. %{_sbindir}/fdasd %{_sbindir}/lszdev %{_sbindir}/zipl +%{_sbindir}/zipl-editenv %dir /lib/s390-tools /lib/s390-tools/{zipl,chreipl}_helper.* /lib/s390-tools/cpictl /lib/s390-tools/stage3.bin +/lib/s390-tools/zdev_id /lib/s390-tools/zdev-root-update /lib/s390-tools/zipl.conf %ghost %config(noreplace) %{_sysconfdir}/zipl.conf @@ -200,6 +202,7 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man8/fdasd.8* %{_mandir}/man8/lszdev.8* %{_mandir}/man8/zipl.8* +%{_mandir}/man8/zipl-editenv.8* # Additional Fedora/RHEL specific stuff %ghost %config(noreplace) %{_sysconfdir}/dasd.conf @@ -219,6 +222,7 @@ This package provides minimal set of tools needed to system to boot. %{_udevrulesdir}/59-dasd.rules %{_udevrulesdir}/60-readahead.rules %{_udevrulesdir}/81-ccw.rules +%{_udevrulesdir}/81-dpm.rules %{_udevrulesdir}/90-cpi.rules %{_sysconfdir}/kernel/install.d/20-grubby.install %{_prefix}/lib/kernel/install.d/10-zfcpdump.install @@ -430,6 +434,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/qethconf %{_sbindir}/qethqoat %{_sbindir}/scsi_logging_level +%{_sbindir}/sclpdbf %{_sbindir}/start_hsnc.sh %{_sbindir}/tape390_crypt %{_sbindir}/tape390_display @@ -821,6 +826,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Oct 05 2021 Dan Horák - 2:2.18.0-1 +- rebased to 2.18.0 + * Fri Jul 23 2021 Fedora Release Engineering - 2:2.17.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index f999e3d..94bec67 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.17.0.tar.gz) = 57d1c90e2a270c380fd7b4ac8efdd301299d9e8671a7ff10747557135b27a06e8124a49f50b8729b450550ced61599f392606bcbe5e499c5bd488b9e207945da +SHA512 (s390-tools-2.18.0.tar.gz) = 498cbc55d7d84f72e9ec0f625267a26377a80f7be3bd967ec380531b6430d5ea0a192d92024ccd1f70acfe4a1c5aeaa9004110a158830972ca0a0204e7b9d328 From c69c48c992c552b1b6d764aefcb871ea1e48c123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 21 Oct 2021 13:13:40 +0200 Subject: [PATCH 059/141] - move vmcp to core (#1931287) --- s390utils.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 961083e..1a2b42c 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.18.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -180,6 +180,7 @@ This package provides minimal set of tools needed to system to boot. %{_sbindir}/dasdinfo %{_sbindir}/fdasd %{_sbindir}/lszdev +%{_sbindir}/vmcp %{_sbindir}/zipl %{_sbindir}/zipl-editenv %dir /lib/s390-tools @@ -201,6 +202,7 @@ This package provides minimal set of tools needed to system to boot. %{_mandir}/man8/dasdinfo.8* %{_mandir}/man8/fdasd.8* %{_mandir}/man8/lszdev.8* +%{_mandir}/man8/vmcp.8* %{_mandir}/man8/zipl.8* %{_mandir}/man8/zipl-editenv.8* @@ -440,7 +442,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/tape390_display %{_sbindir}/ttyrun %{_sbindir}/tunedasd -%{_sbindir}/vmcp %{_sbindir}/vmur %{_sbindir}/xcec-bridge %{_sbindir}/zcryptctl @@ -513,7 +514,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/tape390_display.8* %{_mandir}/man8/ttyrun.8* %{_mandir}/man8/tunedasd.8* -%{_mandir}/man8/vmcp.8* %{_mandir}/man8/vmur.8* %{_mandir}/man8/zcryptctl.8* %{_mandir}/man8/zcryptstats.8* @@ -826,6 +826,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Oct 20 2021 Dan Horák - 2:2.18.0-2 +- move vmcp to core (#1931287) + * Tue Oct 05 2021 Dan Horák - 2:2.18.0-1 - rebased to 2.18.0 From b385215dedef42d754d741d0e56efcf6013c32b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 16 Nov 2021 15:38:15 +0000 Subject: [PATCH 060/141] - rebased to 2.19.0 - cmsfs-fuse Requires glibc-gconv-extra (#2022652) --- s390utils.spec | 55 +++++++++++++++++++++++++++++++++++++++++++++++--- sources | 2 +- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 1a2b42c..35637f2 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -5,8 +5,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.18.0 -Release: 2%{?dist} +Version: 2.19.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -65,9 +65,12 @@ find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' %build make \ - CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" \ + CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ + HAVE_DRACUT=1 \ + ENABLE_DOC=1 \ NO_PIE_LDFLAGS="" \ BINDIR=/usr/sbin \ + UDEVRUNDIR=/run/udev \ DISTRELEASE=%{release} \ V=1 @@ -75,9 +78,11 @@ make \ %install make install \ HAVE_DRACUT=1 \ + ENABLE_DOC=1 \ DESTDIR=%{buildroot} \ BINDIR=/usr/sbin \ SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ + UDEVRUNDIR=/run/udev \ DISTRELEASE=%{release} \ V=1 @@ -727,6 +732,7 @@ fi Summary: CMS file system based on FUSE BuildRequires: fuse-devel Requires: fuse +Requires: glibc-gconv-extra Obsoletes: %{name}-cmsfs < 2:2.7.0-3 %description cmsfs-fuse @@ -806,6 +812,45 @@ getent group cpacfstats >/dev/null || groupadd -r cpacfstats %{_mandir}/man8/cpacfstatsd.8* %{_unitdir}/cpacfstatsd.service +# +# *********************** chreipl-fcp-mpath package *********************** +# +%package chreipl-fcp-mpath +Summary: Use multipath information for re-IPL path failover +BuildRequires: make +BuildRequires: bash +BuildRequires: coreutils +BuildRequires: pandoc +BuildRequires: gawk +BuildRequires: gzip +BuildRequires: sed +Requires: bash +Requires: coreutils +Requires: util-linux +Requires: systemd-udev +Requires: device-mapper-multipath +Requires: dracut + +%description chreipl-fcp-mpath +The chreipl-fcp-mpath toolset monitors udev events about paths to the re-IPL +volume. If the currently configured FCP re-IPL path becomes unavailable, the +toolset checks for operational paths to the same volume. If available, it +reconfigures the FCP re-IPL settings to use an operational path. + +%files chreipl-fcp-mpath +%doc chreipl-fcp-mpath/README.md +%doc chreipl-fcp-mpath/README.html +%dir %{_prefix}/lib/chreipl-fcp-mpath/ +%{_prefix}/lib/chreipl-fcp-mpath/* +%{_prefix}/lib/dracut/dracut.conf.d/70-chreipl-fcp-mpath.conf +%{_prefix}/lib/udev/chreipl-fcp-mpath-is-ipl-tgt +%{_prefix}/lib/udev/chreipl-fcp-mpath-is-ipl-vol +%{_prefix}/lib/udev/chreipl-fcp-mpath-is-reipl-zfcp +%{_prefix}/lib/udev/chreipl-fcp-mpath-record-volume-identifier +%{_prefix}/lib/udev/chreipl-fcp-mpath-try-change-ipl-path +%{_udevrulesdir}/70-chreipl-fcp-mpath.rules +%{_mandir}/man7/chreipl-fcp-mpath.7* + # # *********************** devel package *********************** # @@ -826,6 +871,10 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Nov 12 2021 Dan Horák - 2:2.19.0-1 +- rebased to 2.19.0 +- cmsfs-fuse Requires glibc-gconv-extra (#2022652) + * Wed Oct 20 2021 Dan Horák - 2:2.18.0-2 - move vmcp to core (#1931287) diff --git a/sources b/sources index 94bec67..9d62e20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.18.0.tar.gz) = 498cbc55d7d84f72e9ec0f625267a26377a80f7be3bd967ec380531b6430d5ea0a192d92024ccd1f70acfe4a1c5aeaa9004110a158830972ca0a0204e7b9d328 +SHA512 (s390-tools-2.19.0.tar.gz) = 16c67d74e657e3c7653c7618bfcd80625991f6cc748d8c5863a891ce6148397439e2fb245d424c470d929be57baf99433f733df12db9c6eb080e746ef5ac8079 From 78ef6e86e555bc7f37021ffec698a513bd15c9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 18 Nov 2021 12:06:45 +0000 Subject: [PATCH 061/141] fix cpictl permissions (#2024102) --- s390utils.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/s390utils.spec b/s390utils.spec index 35637f2..d10bf39 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -146,6 +146,10 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules # zipl.conf to be ghosted touch %{buildroot}%{_sysconfdir}/zipl.conf +# fixups +# https://bugzilla.redhat.com/show_bug.cgi?id=2024102 +chmod 755 %{buildroot}/lib/s390-tools/cpictl + %files %doc README.md From a48389088443301343e177356016c94adc3ef437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 26 Nov 2021 16:49:21 +0100 Subject: [PATCH 062/141] - update ccw udev rules --- ccw.udev | 2 +- s390utils.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ccw.udev b/ccw.udev index 8ef72db..c5db932 100644 --- a/ccw.udev +++ b/ccw.udev @@ -1,4 +1,4 @@ -ACTION!="bind", GOTO="ccw_end" +ACTION!="add|bind|change", GOTO="ccw_end" SUBSYSTEM!="ccw", GOTO="ccw_end" DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init" LABEL="ccw_end" diff --git a/s390utils.spec b/s390utils.spec index d10bf39..20f3e8c 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.19.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -875,6 +875,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Nov 26 2021 Dan Horák - 2:2.19.0-2 +- update ccw udev rules + * Fri Nov 12 2021 Dan Horák - 2:2.19.0-1 - rebased to 2.19.0 - cmsfs-fuse Requires glibc-gconv-extra (#2022652) From ad7942bd0cf48a900c92d135efc4382e660acfb7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 00:14:49 +0000 Subject: [PATCH 063/141] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 20f3e8c..bde70d4 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,7 +6,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.19.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -875,6 +875,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 2:2.19.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Nov 26 2021 Dan Horák - 2:2.19.0-2 - update ccw udev rules From 6dc91fa6eac27af012544e4ce6e0256f990fdda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 7 Feb 2022 09:53:18 +0000 Subject: [PATCH 064/141] - rebased to 2.20.0 - switch to fuse3 --- s390utils.spec | 37 +++++++++++++++++++++++++++++-------- sources | 2 +- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index bde70d4..c5a82fe 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -3,10 +3,14 @@ %global signzipl 1 %endif +%if 0%{?fedora} +%global with_pandoc 1 +%endif + Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.19.0 -Release: 3%{?dist} +Version: 2.20.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -59,6 +63,9 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort +# drop -Werror from genprotimg to allow building with GCC 12 +sed -i.bak -e 's/-Werror//g' genprotimg/src/Makefile genprotimg/boot/Makefile + # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' @@ -67,7 +74,9 @@ find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ HAVE_DRACUT=1 \ +%if 0%{?with_pandoc} ENABLE_DOC=1 \ +%endif NO_PIE_LDFLAGS="" \ BINDIR=/usr/sbin \ UDEVRUNDIR=/run/udev \ @@ -78,7 +87,9 @@ make \ %install make install \ HAVE_DRACUT=1 \ +%if 0%{?with_pandoc} ENABLE_DOC=1 \ +%endif DESTDIR=%{buildroot} \ BINDIR=/usr/sbin \ SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ @@ -734,8 +745,8 @@ fi # %package cmsfs-fuse Summary: CMS file system based on FUSE -BuildRequires: fuse-devel -Requires: fuse +BuildRequires: fuse3-devel +Requires: fuse3 Requires: glibc-gconv-extra Obsoletes: %{name}-cmsfs < 2:2.7.0-3 @@ -753,9 +764,9 @@ This package contains the CMS file system based on FUSE. # %package zdsfs Summary: z/OS data set access based on FUSE -BuildRequires: fuse-devel +BuildRequires: fuse3-devel BuildRequires: libcurl-devel -Requires: fuse +Requires: fuse3 %description zdsfs This package contains the z/OS data set access based on FUSE. @@ -769,8 +780,8 @@ This package contains the z/OS data set access based on FUSE. # %package hmcdrvfs Summary: HMC drive file system based on FUSE -BuildRequires: fuse-devel -Requires: fuse +BuildRequires: fuse3-devel +Requires: fuse3 %description hmcdrvfs This package contains a HMC drive file system based on FUSE and a tool @@ -824,7 +835,9 @@ Summary: Use multipath information for re-IPL path failover BuildRequires: make BuildRequires: bash BuildRequires: coreutils +%if 0%{?with_pandoc} BuildRequires: pandoc +%endif BuildRequires: gawk BuildRequires: gzip BuildRequires: sed @@ -843,7 +856,9 @@ reconfigures the FCP re-IPL settings to use an operational path. %files chreipl-fcp-mpath %doc chreipl-fcp-mpath/README.md +%if 0%{?with_pandoc} %doc chreipl-fcp-mpath/README.html +%endif %dir %{_prefix}/lib/chreipl-fcp-mpath/ %{_prefix}/lib/chreipl-fcp-mpath/* %{_prefix}/lib/dracut/dracut.conf.d/70-chreipl-fcp-mpath.conf @@ -853,7 +868,9 @@ reconfigures the FCP re-IPL settings to use an operational path. %{_prefix}/lib/udev/chreipl-fcp-mpath-record-volume-identifier %{_prefix}/lib/udev/chreipl-fcp-mpath-try-change-ipl-path %{_udevrulesdir}/70-chreipl-fcp-mpath.rules +%if 0%{?with_pandoc} %{_mandir}/man7/chreipl-fcp-mpath.7* +%endif # # *********************** devel package *********************** @@ -875,6 +892,10 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Feb 07 2022 Dan Horák - 2:2.20.0-1 +- rebased to 2.20.0 +- switch to fuse3 + * Sat Jan 22 2022 Fedora Release Engineering - 2:2.19.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 9d62e20..9d4a776 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.19.0.tar.gz) = 16c67d74e657e3c7653c7618bfcd80625991f6cc748d8c5863a891ce6148397439e2fb245d424c470d929be57baf99433f733df12db9c6eb080e746ef5ac8079 +SHA512 (s390-tools-2.20.0.tar.gz) = 88eaeb52a4e75099434868d2a11d9fa559002f6291f8a2d373223a8c349ed3716a769256933b9ac57a09f2b5570c855462844385795c9ab9eebf9d184e7b175f From a2cb8e5beba0b26eabeac96f5ecb49f2411b0ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 22 Apr 2022 13:27:04 +0000 Subject: [PATCH 065/141] - rebased to 2.21.0 --- s390utils.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index c5a82fe..8d9f339 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,7 +9,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.20.0 +Version: 2.21.0 Release: 1%{?dist} Epoch: 2 License: MIT @@ -892,6 +892,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Apr 22 2022 Dan Horák - 2:2.21.0-1 +- rebased to 2.21.0 + * Mon Feb 07 2022 Dan Horák - 2:2.20.0-1 - rebased to 2.20.0 - switch to fuse3 diff --git a/sources b/sources index 9d4a776..f3ddb38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.20.0.tar.gz) = 88eaeb52a4e75099434868d2a11d9fa559002f6291f8a2d373223a8c349ed3716a769256933b9ac57a09f2b5570c855462844385795c9ab9eebf9d184e7b175f +SHA512 (s390-tools-2.21.0.tar.gz) = 3f37e2c58cc2b7cdb4c7e51b0344e190cd5c6551ee310c6602238e2eeba0a29c6b95a3b20a582e6b4c4654108f9426ebc6b56c8a2f923a2539830b3e5341b5ca From 1c936472933d50bb61b3d4e5ab46c064718f9afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 26 Apr 2022 11:15:46 +0200 Subject: [PATCH 066/141] Revert "fix cpictl permissions (#2024102)" This reverts commit 78ef6e86e555bc7f37021ffec698a513bd15c9e7. --- s390utils.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 8d9f339..122d470 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -157,10 +157,6 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules # zipl.conf to be ghosted touch %{buildroot}%{_sysconfdir}/zipl.conf -# fixups -# https://bugzilla.redhat.com/show_bug.cgi?id=2024102 -chmod 755 %{buildroot}/lib/s390-tools/cpictl - %files %doc README.md From f7710610d866a21da0bf6a07068494d5729e39b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 26 Apr 2022 11:47:55 +0200 Subject: [PATCH 067/141] chreipl-fcp-mpath man page is distributed pregenerated --- s390utils.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 122d470..79fbccc 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -864,9 +864,7 @@ reconfigures the FCP re-IPL settings to use an operational path. %{_prefix}/lib/udev/chreipl-fcp-mpath-record-volume-identifier %{_prefix}/lib/udev/chreipl-fcp-mpath-try-change-ipl-path %{_udevrulesdir}/70-chreipl-fcp-mpath.rules -%if 0%{?with_pandoc} %{_mandir}/man7/chreipl-fcp-mpath.7* -%endif # # *********************** devel package *********************** From cc536faf67c5c1a363a5eb9ceda6161e0e6cc6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 31 May 2022 11:53:12 +0000 Subject: [PATCH 068/141] - do not fail on emtpy /proc/cmdline when installing kernel (#1899759) --- 20-zipl-kernel.install | 6 ------ 52-zipl-rescue.install | 6 ------ s390utils.spec | 5 ++++- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 3487aa2..4fadd1d 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -88,12 +88,6 @@ case "$COMMAND" in done fi - if ! [[ ${BOOT_OPTIONS[*]} ]]; then - echo "Could not determine the kernel command line parameters." >&2 - echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2 - exit 1 - fi - [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR" BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" if [[ -f "${KERNEL_DIR}/bls.conf" ]]; then diff --git a/52-zipl-rescue.install b/52-zipl-rescue.install index dbf0c1b..8acfbe0 100755 --- a/52-zipl-rescue.install +++ b/52-zipl-rescue.install @@ -29,12 +29,6 @@ case "$COMMAND" in done fi - if ! [[ ${BOOT_OPTIONS[*]} ]]; then - echo "Could not determine the kernel command line parameters." >&2 - echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2 - exit 1 - fi - BLS_RESCUE="${BLS_DIR}/${MACHINE_ID}-0-rescue.conf" if [[ -f "${BLS_RESCUE}" ]] && grep -q '^options.*$kernelopts' "${BLS_RESCUE}"; then sed -i -e "s,^linux.*,linux /boot/vmlinuz-0-rescue-${MACHINE_ID},g" "${BLS_RESCUE}" diff --git a/s390utils.spec b/s390utils.spec index 79fbccc..d85d6b5 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.21.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -886,6 +886,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue May 31 2022 Dan Horák - 2:2.21.0-2 +- do not fail on emtpy /proc/cmdline when installing kernel (#1899759) + * Fri Apr 22 2022 Dan Horák - 2:2.21.0-1 - rebased to 2.21.0 From ca6b193ac3a17e32a89d7271f999e7a522fd29be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 27 Jun 2022 10:20:07 +0000 Subject: [PATCH 069/141] - rebased to 2.22.0 --- s390-tools-zipl-blscfg-rpm-nvr-sort.patch | 235 +++++++++++++++++++- s390-tools-zipl-invert-script-options.patch | 6 +- s390utils.spec | 30 ++- sources | 2 +- 4 files changed, 253 insertions(+), 20 deletions(-) diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index 2278c3f..90866f8 100644 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -1,6 +1,221 @@ -diff -up s390-tools-2.9.0/zipl/src/Makefile.blscfg-rpm-nvr-sort s390-tools-2.9.0/zipl/src/Makefile ---- s390-tools-2.9.0/zipl/src/Makefile.blscfg-rpm-nvr-sort 2019-05-22 08:16:17.317273801 -0400 -+++ s390-tools-2.9.0/zipl/src/Makefile 2019-05-22 08:18:02.947273801 -0400 +From 14119148dabb7f4f633623c00eece44c5771db10 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Mon, 20 Jun 2022 17:43:05 +0200 +Subject: [PATCH 1/2] Revert "zipl/src: Implement sorting bls entries by + versions" + +This reverts commit a0dba6bfdb50ff373fa710ffe2a307cc0748f18b. +--- + zipl/src/scan.c | 139 ++---------------------------------------------- + 1 file changed, 3 insertions(+), 136 deletions(-) + +diff --git a/zipl/src/scan.c b/zipl/src/scan.c +index 0cea1d4..9352f76 100644 +--- a/zipl/src/scan.c ++++ b/zipl/src/scan.c +@@ -10,7 +10,6 @@ + * + */ + +-static const char *VERSION_KEYWORD = "version"; + + /* Need ISOC99 function isblank() in ctype.h */ + #ifndef __USE_ISOC99 +@@ -646,7 +645,7 @@ scan_file(const char* filename, struct scan_token** token) + + + static int +-bls_filter_by_names(const struct dirent *ent) ++bls_filter(const struct dirent *ent) + { + int offset = strlen(ent->d_name) - strlen(".conf"); + +@@ -656,111 +655,13 @@ bls_filter_by_names(const struct dirent *ent) + return strncmp(ent->d_name + offset, ".conf", strlen(".conf")) == 0; + } + +-struct version { +- char *line; /* pointer to a line with version keyword */ +- int offset; /* offset of version value in the line */ +-}; +- +-/* +- * Locate version in bls file represented by ENT +- */ +-static void get_version(const struct dirent *ent, struct version *v) +-{ +- char *line = NULL; +- size_t len = 0; +- char *d_name; +- FILE *stream; +- ssize_t read; +- +- memset(v, 0, sizeof(*v)); +- d_name = misc_make_path((char *)blsdir, (char *)ent->d_name); +- if (!d_name) +- return; +- +- stream = fopen(d_name, "r"); +- free(d_name); +- if (!stream) +- return; +- +- while ((read = getline(&line, &len, stream)) != -1) { +- if (line[read - 1] == '\n') { +- line[read - 1] = '\0'; +- read--; +- } +- if ((size_t)read <= strlen(VERSION_KEYWORD) + 1) +- continue; +- if (strcmp(VERSION_KEYWORD, line) > 0) +- continue; +- if (!isblank(line[strlen(VERSION_KEYWORD)])) +- continue; +- /* skip blanks */ +- v->offset = strlen(VERSION_KEYWORD) + 1; +- while (v->offset < read - 1 && isblank(line[v->offset])) +- v->offset++; +- if (isblank(line[v->offset])) +- /* +- * all characters after the keyword +- * are blanks. Invalid version +- */ +- continue; +- v->line = line; +- fclose(stream); +- return; +- } +- free(line); +- fclose(stream); +-} +- +-static void put_version(struct version *v) +-{ +- free(v->line); +-} +- +-/** +- * Check version in bls file represented by ENT. +- * Return 1 if version is valid. Otherwise return 0 +- */ +-static int bls_filter_by_versions(const struct dirent *ent) +-{ +- struct version v; +- +- if (bls_filter_by_names(ent) == 0) +- return 0; +- +- get_version(ent, &v); +- if (v.line) { +- put_version(&v); +- return 1; +- } +- return 0; +-} +- + + static int +-bls_sort_by_names(const struct dirent **ent_a, const struct dirent **ent_b) ++bls_sort(const struct dirent **ent_a, const struct dirent **ent_b) + { + return strverscmp((*ent_a)->d_name, (*ent_b)->d_name); + } + +-static int +-bls_sort_by_versions(const struct dirent **ent_a, const struct dirent **ent_b) +-{ +- struct version v1, v2; +- int ret; +- +- get_version(*ent_a, &v1); +- get_version(*ent_b, &v2); +- /* +- * Both versions are valid. +- * It is guaranteed by bls_filter_by_versions() +- */ +- ret = strverscmp(v1.line + v1.offset, v2.line + v2.offset); +- +- put_version(&v1); +- put_version(&v2); +- +- return ret; +-} + + static int + scan_append_section_heading(struct scan_token* scan, int* index, char* name); +@@ -1110,40 +1011,6 @@ scan_count_target_keywords(char* keyword[]) + return num; + } + +-static int bls_scandir(struct dirent ***bls_entries) +-{ +- struct dirent **entries1; +- struct dirent **entries2; +- int n1, n2; +- +- /* arrange by names */ +- n1 = scandir(blsdir, &entries1, +- bls_filter_by_names, bls_sort_by_names); +- if (n1 <= 0) +- return n1; +- /* arrange by versions */ +- n2 = scandir(blsdir, &entries2, +- bls_filter_by_versions, bls_sort_by_versions); +- +- if (n2 <= 0 || n2 < n1) { +- /* +- * failed to sort by versions, +- * fall back to sorting by filenames +- */ +- *bls_entries = entries1; +- while (n2--) +- free(entries2[n2]); +- free(entries2); +- return n1; +- } +- /* use arrangement by versions */ +- *bls_entries = entries2; +- while (n1--) +- free(entries1[n1]); +- free(entries1); +- return n2; +-} +- + int + scan_check_target_data(char* keyword[], int* line) + { +@@ -1464,7 +1331,7 @@ int scan_bls(struct scan_token **token, int scan_size) + if (!(stat(blsdir, &sb) == 0 && S_ISDIR(sb.st_mode))) + return 0; + +- n = bls_scandir(&bls_entries); ++ n = scandir(blsdir, &bls_entries, bls_filter, bls_sort); + if (n <= 0) + return n; + +-- +2.36.1 + + +From 661f143bb0b429c732d0ad9756c745dcb8799bc7 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 20 Jun 2022 17:46:59 +0200 +Subject: [PATCH 2/2] blscfg: sort like rpm nvr, not like a single version +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Peter Jones +Signed-off-by: Dan Horák +--- + zipl/src/Makefile | 2 +- + zipl/src/scan.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 95 insertions(+), 3 deletions(-) + +diff --git a/zipl/src/Makefile b/zipl/src/Makefile +index 786bb7f..1adc486 100644 +--- a/zipl/src/Makefile ++++ b/zipl/src/Makefile @@ -7,7 +7,7 @@ ALL_CPPFLAGS += -I../include -I../boot \ -D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS) ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) @@ -10,10 +225,11 @@ diff -up s390-tools-2.9.0/zipl/src/Makefile.blscfg-rpm-nvr-sort s390-tools-2.9.0 objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \ bootmap_header.o envblk.o install.o zipl.o $(rootdir)/zipl/boot/data.o -diff -up s390-tools-2.9.0/zipl/src/scan.c.blscfg-rpm-nvr-sort s390-tools-2.9.0/zipl/src/scan.c ---- s390-tools-2.9.0/zipl/src/scan.c.blscfg-rpm-nvr-sort 2019-05-21 09:13:36.000000000 -0400 -+++ s390-tools-2.9.0/zipl/src/scan.c 2019-05-22 08:16:17.317273801 -0400 -@@ -33,6 +33,8 @@ +diff --git a/zipl/src/scan.c b/zipl/src/scan.c +index 9352f76..3327e2d 100644 +--- a/zipl/src/scan.c ++++ b/zipl/src/scan.c +@@ -35,6 +35,8 @@ #include "lib/util_base.h" @@ -22,7 +238,7 @@ diff -up s390-tools-2.9.0/zipl/src/scan.c.blscfg-rpm-nvr-sort s390-tools-2.9.0/z #include "boot.h" #include "error.h" #include "misc.h" -@@ -653,13 +655,103 @@ bls_filter(const struct dirent *ent) +@@ -655,13 +657,103 @@ bls_filter(const struct dirent *ent) return strncmp(ent->d_name + offset, ".conf", strlen(".conf")) == 0; } @@ -128,3 +344,6 @@ diff -up s390-tools-2.9.0/zipl/src/scan.c.blscfg-rpm-nvr-sort s390-tools-2.9.0/z static int scan_append_section_heading(struct scan_token* scan, int* index, char* name); +-- +2.36.1 + diff --git a/s390-tools-zipl-invert-script-options.patch b/s390-tools-zipl-invert-script-options.patch index 93d5cc7..d7d936f 100644 --- a/s390-tools-zipl-invert-script-options.patch +++ b/s390-tools-zipl-invert-script-options.patch @@ -61,10 +61,10 @@ index 871935c783f..d8d5eca5867 100755 ;; --) shift -diff --git a/scripts/zipl-switch-to-blscfg.1 b/scripts/zipl-switch-to-blscfg.1 +diff --git a/scripts/zipl-switch-to-blscfg.8 b/scripts/zipl-switch-to-blscfg.8 index 6bd14d00d14..71b904ffd1c 100644 ---- a/scripts/zipl-switch-to-blscfg.1 -+++ b/scripts/zipl-switch-to-blscfg.1 +--- a/scripts/zipl-switch-to-blscfg.8 ++++ b/scripts/zipl-switch-to-blscfg.8 @@ -37,9 +37,9 @@ The DIRECTORY where the BLS fragments will be generated. The directory is create The FILE used for zipl configuration file, defaults to /etc/zipl.conf. diff --git a/s390utils.spec b/s390utils.spec index d85d6b5..af6a52d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,8 +9,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.21.0 -Release: 2%{?dist} +Version: 2.22.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -207,6 +207,7 @@ This package provides minimal set of tools needed to system to boot. /lib/s390-tools/zdev-root-update /lib/s390-tools/zipl.conf %ghost %config(noreplace) %{_sysconfdir}/zipl.conf +%config(noreplace) %{_sysconfdir}/ziplenv %{_unitdir}/cpi.service %config(noreplace) %{_sysconfdir}/sysconfig/cpi /usr/lib/dracut/modules.d/95zdev/ @@ -448,6 +449,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/lstape %{_sbindir}/lszcrypt %{_sbindir}/lszfcp +%{_sbindir}/pai %{_sbindir}/qetharp %{_sbindir}/qethconf %{_sbindir}/qethqoat @@ -470,12 +472,16 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_bindir}/dump2tar %{_bindir}/genprotimg %{_bindir}/mk-s390image +%{_bindir}/pvattest +%{_bindir}/pvextract-hdr %{_bindir}/vmconvert %{_bindir}/zkey %{_bindir}/zkey-cryptsetup %{_unitdir}/dumpconf.service %ghost %config(noreplace) %{_sysconfdir}/zipl.conf %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf +%{_sysconfdir}/mdevctl.d/* +/usr/lib/dracut/modules.d/99ngdump/ /lib/s390-tools/dumpconf /lib/s390-tools/lsznet.raw %dir /lib/s390-tools/zfcpdump @@ -486,13 +492,13 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %dir %{_libdir}/zkey %{_libdir}/zkey/zkey-ekmfweb.so %{_libdir}/zkey/zkey-kmip.so -%{_mandir}/man1/dbginfo.sh.1* %{_mandir}/man1/dump2tar.1* -%{_mandir}/man1/lscpumf.1* -%{_mandir}/man1/lshwc.1* +%{_mandir}/man1/genprotimg.1* +%{_mandir}/man1/pvattest.1* +%{_mandir}/man1/pvattest-create.1* +%{_mandir}/man1/pvattest-perform.1* +%{_mandir}/man1/pvattest-verify.1* %{_mandir}/man1/vmconvert.1* -%{_mandir}/man1/zfcpdbf.1* -%{_mandir}/man1/zipl-switch-to-blscfg.1* %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* @@ -506,14 +512,16 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/chzcrypt.8* %{_mandir}/man8/dasdstat.8* %{_mandir}/man8/dasdview.8* +%{_mandir}/man8/dbginfo.sh.8* %{_mandir}/man8/dumpconf.8* -%{_mandir}/man8/genprotimg.8.* %{_mandir}/man8/hsavmcore.8* %{_mandir}/man8/hsci.8* %{_mandir}/man8/hyptop.8* %{_mandir}/man8/lschp.8* +%{_mandir}/man8/lscpumf.8* %{_mandir}/man8/lscss.8* %{_mandir}/man8/lsdasd.8* +%{_mandir}/man8/lshwc.8* %{_mandir}/man8/lsluns.8* %{_mandir}/man8/lsqeth.8* %{_mandir}/man8/lsreipl.8* @@ -523,6 +531,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/lstape.8* %{_mandir}/man8/lszcrypt.8* %{_mandir}/man8/lszfcp.8* +%{_mandir}/man8/pai.8* %{_mandir}/man8/qetharp.8* %{_mandir}/man8/qethconf.8* %{_mandir}/man8/qethqoat.8* @@ -533,7 +542,9 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/vmur.8* %{_mandir}/man8/zcryptctl.8* %{_mandir}/man8/zcryptstats.8* +%{_mandir}/man8/zfcpdbf.8* %{_mandir}/man8/zgetdump.8* +%{_mandir}/man8/zipl-switch-to-blscfg.8* %{_mandir}/man8/znetconf.8* %{_mandir}/man8/zpcictl.8* %dir %{_datadir}/s390-tools @@ -886,6 +897,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jun 20 2022 Dan Horák - 2:2.22.0-1 +- rebased to 2.22.0 + * Tue May 31 2022 Dan Horák - 2:2.21.0-2 - do not fail on emtpy /proc/cmdline when installing kernel (#1899759) diff --git a/sources b/sources index f3ddb38..0d0a345 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.21.0.tar.gz) = 3f37e2c58cc2b7cdb4c7e51b0344e190cd5c6551ee310c6602238e2eeba0a29c6b95a3b20a582e6b4c4654108f9426ebc6b56c8a2f923a2539830b3e5341b5ca +SHA512 (s390-tools-2.22.0.tar.gz) = ac613cddd6d85191f874d8d9eb014b9edc00868f7432a7ac057db0f7011d3ab3371b58a3881d78726e17c8e416d486e6fffb64264d5500abcaabcd56d9f181f6 From 6f524eab5a2960a72983d87c446ea857c933490d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 27 Jun 2022 11:49:35 +0000 Subject: [PATCH 070/141] add missing BR --- s390utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/s390utils.spec b/s390utils.spec index af6a52d..23ae596 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -272,6 +272,7 @@ BuildRequires: json-c-devel BuildRequires: rpm-devel BuildRequires: glib2-devel BuildRequires: libxml2-devel +BuildRequires: liblockfile-devel %description base From a7424a8ff05119b5d88a4b66c5912bba8e27e729 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 07:54:12 +0000 Subject: [PATCH 071/141] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 23ae596..eecbb2f 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.22.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -898,6 +898,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 2:2.22.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 20 2022 Dan Horák - 2:2.22.0-1 - rebased to 2.22.0 From 473c14c9ab2f948964f7be7d7214fd7688e15b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 19 Aug 2022 09:04:27 +0000 Subject: [PATCH 072/141] - rebased to 2.23.0 --- s390utils.spec | 10 ++++++---- sources | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index eecbb2f..2d30444 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,8 +9,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.22.0 -Release: 2%{?dist} +Version: 2.23.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -79,7 +79,6 @@ make \ %endif NO_PIE_LDFLAGS="" \ BINDIR=/usr/sbin \ - UDEVRUNDIR=/run/udev \ DISTRELEASE=%{release} \ V=1 @@ -93,7 +92,6 @@ make install \ DESTDIR=%{buildroot} \ BINDIR=/usr/sbin \ SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ - UDEVRUNDIR=/run/udev \ DISTRELEASE=%{release} \ V=1 @@ -811,6 +809,7 @@ Requires(preun): systemd Requires(postun): systemd Requires(pre): shadow-utils BuildRequires: systemd +BuildRequires: systemd-devel %description cpacfstatsd The cpacfstats tools provide a client/server application set to monitor @@ -898,6 +897,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Aug 19 2022 Dan Horák - 2:2.23.0-1 +- rebased to 2.23.0 + * Sat Jul 23 2022 Fedora Release Engineering - 2:2.22.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 0d0a345..3c71431 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.22.0.tar.gz) = ac613cddd6d85191f874d8d9eb014b9edc00868f7432a7ac057db0f7011d3ab3371b58a3881d78726e17c8e416d486e6fffb64264d5500abcaabcd56d9f181f6 +SHA512 (s390-tools-2.23.0.tar.gz) = 839ea737db0bbfb2c726c757867e5d38b771282aa3484b90c3cc6376efa6c564874fe62879dccc8c5547a768e29aa5389ecf20d244574c5479887504addaee3b From af41c81d1b7316b1faf7cec697d5c41b2809b483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 10 Nov 2022 16:45:34 +0000 Subject: [PATCH 073/141] - rebased to 2.24.0 --- s390utils.spec | 6 ++++-- sources | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 2d30444..9328bd5 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,7 +9,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.23.0 +Version: 2.24.0 Release: 1%{?dist} Epoch: 2 License: MIT @@ -270,7 +270,6 @@ BuildRequires: json-c-devel BuildRequires: rpm-devel BuildRequires: glib2-devel BuildRequires: libxml2-devel -BuildRequires: liblockfile-devel %description base @@ -897,6 +896,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Nov 10 2022 Dan Horák - 2:2.24.0-1 +- rebased to 2.24.0 + * Fri Aug 19 2022 Dan Horák - 2:2.23.0-1 - rebased to 2.23.0 diff --git a/sources b/sources index 3c71431..0c54d2e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.23.0.tar.gz) = 839ea737db0bbfb2c726c757867e5d38b771282aa3484b90c3cc6376efa6c564874fe62879dccc8c5547a768e29aa5389ecf20d244574c5479887504addaee3b +SHA512 (s390-tools-2.24.0.tar.gz) = 5c681a031c2bab0ab167623ad08da67bfd236e4892f8a5de813ebfbbc1c60a842f0954bcbca6d2f6ab125ee089b2b5dcbfbb24152bcdde3401810232e21460f4 From bef2b35dc932fb71175b783fa2e1309922e01674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 22 Nov 2022 17:35:10 +0000 Subject: [PATCH 074/141] - update for Transparent DASD PPRC (Peer-to-Peer Remote Copy) handling --- s390utils-2.24.0-fedora.patch | 1665 +++++++++++++++++++++++++++++++++ s390utils.spec | 11 +- 2 files changed, 1675 insertions(+), 1 deletion(-) create mode 100644 s390utils-2.24.0-fedora.patch diff --git a/s390utils-2.24.0-fedora.patch b/s390utils-2.24.0-fedora.patch new file mode 100644 index 0000000..c03075c --- /dev/null +++ b/s390utils-2.24.0-fedora.patch @@ -0,0 +1,1665 @@ +From 5107a7be16e4849fbda7beae0504fdbc0f2cb4b5 Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Tue, 9 Aug 2022 13:12:26 +0200 +Subject: [PATCH 1/7] zconf/lsdasd: fix Copy Pair related output +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix the default output for copy pair secondary devices to not show +a faulty blockdevice entry and major:minor combination. + +The new output looks like: + + # lsdasd + Bus-ID Status Name Device Type BlkSz Size Blocks + ================================================================================ + 0.0.9740 secondary ECKD + 0.0.9741 secondary ECKD + 0.0.9742 secondary ECKD + 0.0.e964 active dasda 94:0 ECKD 4096 21129MB 5409180 + 0.0.e967 active dasdb 94:4 ECKD 4096 21129MB 5409180 + 0.0.9330 active dasdc 94:8 ECKD 4096 782MB 200340 + 0.0.9700 active dasdd 94:12 ECKD 4096 782MB 200340 + 0.0.9701 active dasdf 94:20 ECKD 4096 782MB 200340 + 0.0.9702 active dasdh 94:28 ECKD 4096 782MB 200340 + +Also add copy_pairs to extended output: + + # lsdasd -l 9700 + 0.0.9700/dasdd/94:12 + status: active + type: ECKD + blksz: 4096 + size: 782MB + blocks: 200340 + extent_size: 1113 + logical_capacity: 1113 + space_allocated: 1113 + use_diag: 0 + readonly: 0 + eer_enabled: 0 + erplog: 0 + hpf: 1 + uid: IBM.750000000ABT31.9700.00 + fc_security: Unsupported + paths_installed: 38 39 3a 3b + paths_in_use: 38 39 3a 3b + paths_non_preferred: + paths_invalid_cabling: + paths_cuir_quiesced: + paths_invalid_hpf_characteristics: + paths_error_threshold_exceeded: + copy_pairs: 0.0.9700,0.0.9740 0.0.9700,0.0.9743 0.0.9700,0.0.9744 0.0.9700,0.0.9745 + +Signed-off-by: Stefan Haberland +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner +--- + zconf/lsdasd | 113 +++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 96 insertions(+), 17 deletions(-) + +diff --git a/zconf/lsdasd b/zconf/lsdasd +index 795b33b..8b2cc0f 100755 +--- a/zconf/lsdasd ++++ b/zconf/lsdasd +@@ -146,6 +146,62 @@ function findDASDDebugfsDirectorie() { + fi + } + ++#------------------------------------------------------------------------------ ++# The blockpath can usually be found over the DEVPATH ++# In case of a swapped Copy Pair device the blockdev is likely associated ++# with one of the secondary devices ++# this function checks if the blockdev is associated with the primary device ++# and if not search for it in the secondary device list ++#------------------------------------------------------------------------------ ++function setCorrectBlockPath() { ++ local DRIVERECKD="$SYSFSDIR/bus/ccw/drivers/dasd-eckd/" ++ local DRIVERFBA="$SYSFSDIR/bus/ccw/drivers/dasd-fba/" ++ local SEARCHDIRS= ++ local SEARCHLIST= ++ ++ if [[ "$COPYROLE" == "none" ]] || [[ -d "$DEVPATH/block" ]]; then ++ BLOCKPATH="$DEVPATH"/block/dasd* ++ return ++ fi ++ ++ if [[ -d "$DRIVERECKD" ]]; then ++ SEARCHDIRS="$DRIVERECKD" ++ fi ++ if [[ -d "$DRIVERFBA" ]]; then ++ SEARCHDIRS="$SEARCHDIRS $DRIVERFBA" ++ fi ++ ++ SEARCHLIST=$(echo $SECONDARY_LIST | sed 's/,/ /g') ++ for SEARCHDEV in $SEARCHLIST ++ do ++ if [[ -n "$SEARCHDIRS" ]]; then ++ PRIM_DEVPATH=$(find $SEARCHDIRS -type l -name $SEARCHDEV \ ++ -printf "%h/%l\n" 2> /dev/null) ++ if [[ -d "$PRIM_DEVPATH/block" ]]; then ++ break ++ fi ++ else ++ # The above paths may become invalid in the future, so we keep the ++ # following query as backup: ++ PRIM_DEVPATH=$(find "$SYSFSDIR/devices" -type l -name $SEARCHDEV \ ++ "driver" -lname "*/dasd*" -printf "%h\n" \ ++ 2> /dev/null) ++ fi ++ done ++ ++ BLOCKPATH="$PRIM_DEVPATH"/block/dasd* ++} ++ ++#------------------------------------------------------------------------------ ++# gather Copy Pair related data ++#------------------------------------------------------------------------------ ++function gatherCopyPairData() { ++ read COPYPAIR 2> /dev/null < $DEVPATH/copy_pair ++ PRIMARY_UID=`echo $COPYPAIR | cut -d " " -f1 | cut -d "," -f1` ++ COPYPAIR=`echo "$COPYPAIR" | sed 's/ /,/g' | sed 's/^,//' ` ++ SECONDARY_LIST=`echo ${COPYPAIR//$PRIMARY_UID","/} ` ++} ++ + #------------------------------------------------------------------------------ + # gather device data and call appropriate output function + #------------------------------------------------------------------------------ +@@ -165,16 +221,18 @@ function gatherDeviceData() { + read READONLY 2> /dev/null < $DEVPATH/readonly || continue + read DISCIPLINE 2> /dev/null < $DEVPATH/discipline || continue + read ESE 2> /dev/null < $DEVPATH/ese ++ read COPYROLE 2> /dev/null < $DEVPATH/copy_role + ++ if [[ "$COPYROLE" != "none" ]]; then ++ gatherCopyPairData ++ fi + # Block device specific information is only available for + # devices that are online and not a PAV alias +- if [[ ! "$ONLINE" == 0 ]] && [[ ! "$ALIAS" == 1 ]]; then +- #find device Path to the block device +- if [[ -d "$DEVPATH/block" ]]; then +- set - "$DEVPATH"/block/dasd* +- else +- set - "$DEVPATH"/block:dasd* +- fi ++ if [[ ! "$ONLINE" == 0 ]] && [[ ! "$ALIAS" == 1 ]] && ++ [[ ! "$COPYROLE" == "secondary" ]]; then ++ #find device Path to the block device ++ setCorrectBlockPath ++ set - $BLOCKPATH + MAJMIN= + MAJOR= + MINOR= +@@ -194,10 +252,12 @@ function gatherDeviceData() { + fi + fi + else +- # BLOCKNAME for offline and alias devices will not be +- # printed, it's just a key for sorting ++ # BLOCKNAME for offline, alias and secondary devices ++ # will not be printed, it's just a key for sorting + if [[ "$ONLINE" == 0 ]]; then + BLOCKNAME="" ++ elif [[ "$COPYROLE" == "secondary" ]]; then ++ BLOCKNAME="b" + else + BLOCKNAME="a" + fi +@@ -261,6 +321,15 @@ function newoutput() + return + fi + ++ if [[ "$COPYROLE" == "secondary" ]]; then ++ printf "%s:%s:%-8s secondary %-8s %13s\n" \ ++ "$SORTKEYLEN" "$SORTKEY" \ ++ "$BUSID" \ ++ "$PRIMARY_BLOCKNAME" \ ++ "$DISCIPLINE" ++ return ++ fi ++ + if [[ "$READONLY" == 0 ]]; then + ROSTRING="" + else +@@ -519,10 +588,14 @@ function extended() + "${HPF_PATHS[@]}" \ + "${IFCC_PATHS[@]}" ; + return +- elif [[ "$ALIAS" == 1 ]]; then +- if [[ "$BASEONLY" == "false" ]]; then +- ACTIVE="alias" +- printf "%s:%s:%s# status:\t\t\t\t%s# type: \t\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s # uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s#\n" \ ++ elif [[ "$ALIAS" == 1 ]] || [[ "$COPYROLE" == "secondary" ]]; then ++ if [[ "$BASEONLY" == "false" ]] || [[ "$COPYROLE" == "secondary" ]]; then ++ if [[ "$COPYROLE" == "secondary" ]]; then ++ ACTIVE="secondary" ++ else ++ ACTIVE="alias" ++ fi ++ printf "%s:%s:%s# status:\t\t\t\t%s# type: \t\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s # uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s# copy_pairs:\t\t\t\t%s#\n" \ + "$SORTKEYLEN" "$SORTKEY" \ + "$BUSID" \ + "$ACTIVE" \ +@@ -540,7 +613,8 @@ function extended() + "${CABLE_PATHS[@]}" \ + "${CUIR_PATHS[@]}" \ + "${HPF_PATHS[@]}" \ +- "${IFCC_PATHS[@]}" ; ++ "${IFCC_PATHS[@]}" \ ++ "${COPYPAIR}" ; + fi + return + elif [[ -z "$BLOCKNAME" ]] || [[ -z "$SIZE" ]]; then +@@ -565,7 +639,7 @@ function extended() + DISCIPLINE="${DISCIPLINE} (ESE)" + fi + +- printf "%s:%s:%s/%s/%s%s%s# status:\t\t\t\t%s# type: \t\t\t\t%s# blksz:\t\t\t\t%s# size: \t\t\t\t%s# blocks:\t\t\t\t%s# extent_size:\t\t\t\t%s# logical_capacity:\t\t\t%s# space_allocated:\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s# uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s#\n" \ ++ printf "%s:%s:%s/%s/%s%s%s# status:\t\t\t\t%s# type: \t\t\t\t%s# blksz:\t\t\t\t%s# size: \t\t\t\t%s# blocks:\t\t\t\t%s# extent_size:\t\t\t\t%s# logical_capacity:\t\t\t%s# space_allocated:\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s# uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s# copy_pairs:\t\t\t\t%s#\n" \ + "$SORTKEYLEN" "$SORTKEY" \ + "$BUSID" \ + "$BLOCKNAME" \ +@@ -593,7 +667,8 @@ function extended() + "${CABLE_PATHS[@]}" \ + "${CUIR_PATHS[@]}" \ + "${HPF_PATHS[@]}" \ +- "${IFCC_PATHS[@]}" ; ++ "${IFCC_PATHS[@]}" \ ++ "${COPYPAIR}" ; + } + + function host() +@@ -710,7 +785,11 @@ function uid() + fi + fi + +- printf "%s:%s:%-8s %-8s %s\n" \ ++ if [[ "$COPYROLE" == "secondary" ]]; then ++ BLOCKNAME="secondary" ++ fi ++ ++ printf "%s:%s:%-8s %-10s %s\n" \ + "$SORTKEYLEN" "$SORTKEY" \ + "$BUSID" \ + "$BLOCKNAME" \ +-- +2.38.1 + + +From 803b87e324d704036c5bef1d1daba6cf5b69b668 Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Wed, 12 Oct 2022 15:55:43 +0200 +Subject: [PATCH 2/7] zconf/lsdasd: add Copy Pair output option +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add an option -P|--copy-pairs to show all DASD devices with copy +relations set up in the system and their roles. + +The output looks like: + + # ./s390-tools/zconf/lsdasd -h + [...] + -P|--copy-pairs + Print information about copy pairs. + + # ./s390-tools/zconf/lsdasd -P + Bus-ID Role Name Paired devices + ================================================================================ + 0.0.9700 primary dasdd 0.0.9740,0.0.9743,0.0.9744,0.0.9745 + 0.0.9740 secondary 0.0.9700 + 0.0.9701 primary dasdf 0.0.9741 + 0.0.9741 secondary 0.0.9701 + 0.0.9702 primary dasdh 0.0.9742 + 0.0.9742 secondary 0.0.9702 + +Signed-off-by: Stefan Haberland +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner +--- + zconf/lsdasd | 45 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/zconf/lsdasd b/zconf/lsdasd +index 8b2cc0f..59720b6 100755 +--- a/zconf/lsdasd ++++ b/zconf/lsdasd +@@ -35,6 +35,8 @@ function PrintUsage() { + Print extended information about DASDs. + -H|--host-access-list + Print information about hosts accessing DASDs. ++ -P|--copy-pairs ++ Print information about copy pairs. + -v|--verbose + For compatibility/future use. Currently ignored. + --version +@@ -292,6 +294,8 @@ function gatherDeviceData() { + uid + elif [[ "$OUTPUT" == "host" ]]; then + host ++ elif [[ "$OUTPUT" == "copy" ]]; then ++ copy + else + newoutput + fi +@@ -769,6 +773,41 @@ printf "\n"; + rm -f $temp + } + ++# pad sortkey with given number zeroes ++function padSortKey() ++{ ++ local LEN=$1 ++ for (( i=0; i<$LEN; i++ )) ++ do ++ printf -v SORTKEY "%s0" $SORTKEY ++ done ++} ++ ++function copy() ++{ ++ if [[ "$COPYROLE" == "none" ]]; then ++ return ++ fi ++ ++ SORTKEYLEN=$((${#PRIMARY_UID}+${#DEV_UID})) ++ if [[ "$COPYROLE" == "secondary" ]]; then ++ SORTKEY=$PRIMARY_UID$DEV_UID ++ PAIREDDEVICES=$PRIMARY_UID ++ BLOCKNAME="" ++ else ++ SORTKEY=$PRIMARY_UID ++ padSortKey ${#DEV_UID} ++ PAIREDDEVICES=$SECONDARY_LIST ++ fi ++ ++ printf "%s:%s:%-8s %-10s %-8s %-8s %s \n" \ ++ "$SORTKEYLEN" "$SORTKEY" \ ++ "$BUSID" \ ++ "$COPYROLE" \ ++ "$BLOCKNAME" \ ++ "$PAIREDDEVICES"; ++} ++ + function uid() + { + #-------------------------------------------# +@@ -835,6 +874,9 @@ while [ $# -gt 0 ]; do + --host-access-list|-H) + OUTPUT="host" + ;; ++ --copy-pairs|-P) ++ OUTPUT="copy" ++ ;; + --version) + PrintVersion + exit 0 +@@ -889,6 +931,9 @@ if [[ "$PRINTUID" == "true" ]] && [[ "$OUTPUT" != "old" ]]; then + elif [[ "$OUTPUT" == "new" ]]; then + printf "Bus-ID Status Name Device Type BlkSz Size Blocks\n" + printf "================================================================================\n" ++elif [[ "$OUTPUT" == "copy" ]]; then ++ printf "Bus-ID Role Name Paired devices\n"; ++ printf "================================================================================\n"; + elif [[ "$OUTPUT" == "extended" ]]; then + PROCESSING=" $PROCESSING | sed 's/#/\n/g' " + fi +-- +2.38.1 + + +From e742d1c9ae5103c9f88d3fde085e0694efaeeb5a Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Thu, 11 Aug 2022 13:52:30 +0200 +Subject: [PATCH 3/7] zdev: correctly handle multiple values for CCW devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Correctly create multiple lines in the udev rule for CCW device attributes +with multi bit set that contain multiple values. + +Suggested-by: Peter Oberparleiter +Signed-off-by: Stefan Haberland +Reviewed-by: Jan Hoeppner +Reviewed-by: Peter Oberparleiter +Signed-off-by: Jan Höppner +--- + zdev/src/udev_ccw.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/zdev/src/udev_ccw.c b/zdev/src/udev_ccw.c +index 7c0a703..3375a5e 100644 +--- a/zdev/src/udev_ccw.c ++++ b/zdev/src/udev_ccw.c +@@ -221,6 +221,7 @@ static void write_attr_to_file(FILE *fd, struct device_state *state, const char + struct ptrlist_node *p; + struct setting *s; + struct util_list *list = NULL; ++ struct strlist_node *str; + + /* Apply attributes in correct order. */ + list = setting_list_get_sorted(state->settings); +@@ -229,8 +230,13 @@ static void write_attr_to_file(FILE *fd, struct device_state *state, const char + s = p->ptr; + if (s->removed) + continue; +- if ((s->attrib && s->attrib->internal) || +- internal_by_name(s->name)) { ++ if (s->values) { ++ util_list_iterate(s->values, str) { ++ fprintf(fd, "ATTR{[ccw/%s]%s}=\"%s\"\n", ++ id, s->name, str->str); ++ } ++ } else if ((s->attrib && s->attrib->internal) || ++ internal_by_name(s->name)) { + fprintf(fd, "ENV{zdev_%s}=\"%s\"\n", + internal_get_name(s->name), s->value); + } else { +-- +2.38.1 + + +From f654b971d0e78a139c7ed8c0df821af2f4356a8b Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Tue, 9 Aug 2022 16:17:23 +0200 +Subject: [PATCH 4/7] zdev: add copy_pair attribute for DASD devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The DASD device driver has a new attribute copy_pair to make storage +server copy pairs known to the driver. +Add this attribute to zdev. + +Usage example: + +Add two copy pairs 1000,2000 and 1000,3000 to a DASD device 1000 +$ chzdev dasd 1000 copy_pairs=1000,2000 copy_pairs=1000,3000 + +or + +$ chzdev dasd 1000 copy_pairs="1000,2000 1000,3000" + +To add a third copy pair later on: +$ chzdev dasd 1000 copy_pairs=1000,4000 + +To remove all copy pairs from the device 1000: +$ chzdev dasd 1000 -r copy_pairs + +Signed-off-by: Stefan Haberland +Reviewed-by: Peter Oberparleiter +Signed-off-by: Jan Höppner +--- + zdev/src/dasd.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 93 insertions(+) + +diff --git a/zdev/src/dasd.c b/zdev/src/dasd.c +index daec916..f9fd231 100644 +--- a/zdev/src/dasd.c ++++ b/zdev/src/dasd.c +@@ -137,6 +137,21 @@ static struct attrib dasd_attr_readonly = { + .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 1)), + }; + ++static struct attrib dasd_attr_copy_pair = { ++ .name = "copy_pair", ++ .title = "Modify copy-pair relations", ++ .desc = "Make a copy-pair relation for this device known to the DASD " ++ "driver.\n" ++ "A copy-pair is a comma-separated pair of device bus-IDs\n" ++ ",.\n" ++ "Example: 0.0.1000,0.0.2000\n" ++ "Up to 4 copy-pairs are accepted by the DASD driver for each " ++ "device.\n", ++ .unstable = 1, ++ .multi = 1, ++ .activerem = 1, ++}; ++ + static struct attrib dasd_attr_erplog = { + .name = "erplog", + .title = "Enable logging of Error Recovery Processing", +@@ -600,6 +615,81 @@ persistent: + return rc; + } + ++/* Remove all entries from the copy_pair attribute by writing 'clear' to it. */ ++static void dasd_clear_copy_pair(struct setting *s) ++{ ++ free(s->value); ++ s->value = misc_strdup("clear"); ++ strlist_free(s->values); ++ s->values = strlist_new(); ++ strlist_add(s->values, "clear"); ++ s->removed = 0; ++ s->modified = 1; ++} ++ ++/* ++ * Copy-pair values may contain multiple values in one line ++ * those need to be split up and put in multiple values entries ++ * delimiter is " " and "\n" depending on the source ++ * values read from sysfs have " " as delimiter and values from ++ * zdev have "\n" ++ */ ++static void dasd_split_copy_pair(struct setting *s) ++{ ++ struct util_list *new = NULL; ++ struct strlist_node *node; ++ ++ new = strlist_new(); ++ util_list_iterate(s->values, node) ++ strlist_add_multi(new, node->str, "\n ", 0); ++ ++ strlist_free(s->values); ++ s->values = new; ++} ++ ++/* ++ * For persistent configurations one value per values[] entry is required ++ * to achieve a correct multi-line copy-pair statement in the resulting ++ * udev-rule. ++ */ ++static exit_code_t dasd_st_configure_persistent(struct subtype *st, ++ struct device *dev) ++{ ++ struct setting *s; ++ ++ util_list_iterate(&dev->persistent.settings->list, s) { ++ if (strcmp(s->name, "copy_pair") == 0) ++ dasd_split_copy_pair(s); ++ } ++ ++ return st->super->configure_persistent(st, dev); ++} ++ ++/* ++ * For active configurations one value per values[] entry is required to ++ * correctly operate the sysfs attribute. ++ * ++ * In case of removal the string "clear" has to be written to the ++ * value and values[] entry. ++ */ ++static exit_code_t dasd_st_configure_active(struct subtype *st, ++ struct device *dev) ++{ ++ struct setting *s; ++ ++ util_list_iterate(&dev->active.settings->list, s) { ++ if (strcmp(s->name, "copy_pair") != 0) ++ continue; ++ ++ if (s->removed) ++ dasd_clear_copy_pair(s); ++ else ++ dasd_split_copy_pair(s); ++ } ++ ++ return st->super->configure_active(st, dev); ++} ++ + /* + * DASD device sub-types. + */ +@@ -634,10 +724,13 @@ struct subtype dasd_subtype_eckd = { + &dasd_attr_last_known_reservation_state, + &dasd_attr_safe_offline, + &dasd_attr_fc_security, ++ &dasd_attr_copy_pair, + &internal_attr_early, + ), + .unknown_dev_attribs = 1, + ++ .configure_active = &dasd_st_configure_active, ++ .configure_persistent = &dasd_st_configure_persistent, + .check_pre_configure = &dasd_st_check_pre_configure, + .add_modules = &dasd_st_add_modules, + }; +-- +2.38.1 + + +From 4e28047eb4cacc7b7208018a8c095102517517e8 Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Thu, 10 Nov 2022 16:11:09 +0100 +Subject: [PATCH 5/7] tunedasd: move tunedasd ioctls to libdasd +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Move all DASD IOCTLs to libdasd and adapt all affected +users accordingly. + +Signed-off-by: Stefan Haberland +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner +--- + include/lib/dasd_base.h | 73 +++++++++++ + libdasd/dasd_ioctl.c | 129 +++++++++++++++++++ + tunedasd/src/disk.c | 268 ++++++++-------------------------------- + 3 files changed, 252 insertions(+), 218 deletions(-) + +diff --git a/include/lib/dasd_base.h b/include/lib/dasd_base.h +index b12e1f9..11ec94b 100644 +--- a/include/lib/dasd_base.h ++++ b/include/lib/dasd_base.h +@@ -187,6 +187,61 @@ typedef struct format_check_t { + #define DASD_FMT_ERR_RECORD_ID 4 + #define DASD_FMT_ERR_KEY_LENGTH 5 + ++/* ++ * struct profile_info_t ++ * holds the profiling information ++ */ ++typedef struct dasd_profile_info_t { ++ unsigned int dasd_io_reqs; /* # of requests processed at all */ ++ unsigned int dasd_io_sects; /* # of sectors processed at all */ ++ unsigned int dasd_io_secs[32]; /* request's sizes */ ++ unsigned int dasd_io_times[32]; /* requests's times */ ++ unsigned int dasd_io_timps[32]; /* requests's times per sector */ ++ unsigned int dasd_io_time1[32]; /* time from build to start */ ++ unsigned int dasd_io_time2[32]; /* time from start to irq */ ++ unsigned int dasd_io_time2ps[32]; /* time from start to irq */ ++ unsigned int dasd_io_time3[32]; /* time from irq to end */ ++ unsigned int dasd_io_nr_req[32]; /* # of requests in chanq */ ++} dasd_profile_info_t; ++ ++/* ++ * struct attrib_data_t ++ * represents the operation (cache) bits for the device. ++ * Used in DE to influence caching of the DASD. ++ */ ++typedef struct attrib_data_t { ++ unsigned char operation : 3; /* cache operation mode */ ++ unsigned char reserved : 5; ++ unsigned short nr_cyl; /* no of cyliners for read ahaed */ ++ unsigned char reserved2[29]; /* for future use */ ++} __attribute__((packed)) attrib_data_t; ++ ++/* definition of operation (cache) bits within attributes of DE */ ++#define DASD_NORMAL_CACHE 0x0 ++#define DASD_BYPASS_CACHE 0x1 ++#define DASD_INHIBIT_LOAD 0x2 ++#define DASD_SEQ_ACCESS 0x3 ++#define DASD_SEQ_PRESTAGE 0x4 ++#define DASD_REC_ACCESS 0x5 ++ ++/* ++ * Data returned by Sense Path Group ID (SNID) ++ */ ++struct dasd_snid_data { ++ struct { ++ __u8 group : 2; ++ __u8 reserve : 2; ++ __u8 mode : 1; ++ __u8 res : 3; ++ } __attribute__((packed)) path_state; ++ __u8 pgid[11]; ++} __attribute__((packed)); ++ ++struct dasd_snid_ioctl_data { ++ struct dasd_snid_data data; ++ __u8 path_mask; ++} __attribute__((packed)); ++ + #ifndef __linux__ + /* definition from hdreg.h */ + struct hd_geometry { +@@ -207,12 +262,24 @@ struct hd_geometry { + #define BIODASDRSRV _IO(DASD_IOCTL_LETTER, 2) + /* Release the device for the current LPAR */ + #define BIODASDRLSE _IO(DASD_IOCTL_LETTER, 3) ++/* Unconditional reserve the device for the current LPAR */ ++#define BIODASDSLCK _IO(DASD_IOCTL_LETTER, 4) ++/* reset profiling information of a device */ ++#define BIODASDPRRST _IO(DASD_IOCTL_LETTER, 5) ++/* retrieve profiling information of a device */ ++#define BIODASDPRRD _IOR(DASD_IOCTL_LETTER, 2, dasd_profile_info_t) + /* Get information on a dasd device (enhanced) */ + #define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER, 3, dasd_information2_t) ++/* Get Attributes (cache operations) */ ++#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER, 5, attrib_data_t) + /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */ + #define BIODASDFMT _IOW(DASD_IOCTL_LETTER, 1, format_data_t) ++/* Set Attributes (cache operations) */ ++#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER, 2, attrib_data_t) + /* Release Allocated Space */ + #define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t) ++/* Get Sense Path Group ID (SNID) data */ ++#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data) + /* Check device format according to format_data_t */ + #define BIODASDCHECKFMT _IOWR(DASD_IOCTL_LETTER, 2, format_check_t) + +@@ -245,5 +312,11 @@ int dasd_is_ro(const char *device, bool *ro); + int dasd_reread_partition_table(const char *device, int ntries); + int dasd_disk_reserve(const char *device); + int dasd_disk_release(const char *device); ++int dasd_slock(const char *device); ++int dasd_get_cache(const char *device, attrib_data_t *attrib_data); ++int dasd_set_cache(const char *device, attrib_data_t *attrib_data); ++int dasd_query_reserve(const char *device); ++int dasd_profile(const char *device, dasd_profile_info_t *dasd_profile_info); ++int dasd_reset_profile(const char *device); + + #endif /* LIB_DASD_BASE_H */ +diff --git a/libdasd/dasd_ioctl.c b/libdasd/dasd_ioctl.c +index f954961..40e726c 100644 +--- a/libdasd/dasd_ioctl.c ++++ b/libdasd/dasd_ioctl.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include "lib/dasd_base.h" + +@@ -321,3 +322,131 @@ int dasd_disk_release(const char *device) + + return 0; + } ++ ++/* ++ * Unconditionally reserve DASD disk ++ * ++ * An existing reserve lock is lifted (steal lock) and the device ++ * is reserved. ++ * ++ * @param[in] device node device node's name ++ * ++ * @retval 0 in case of success ++ * @retval errno in case of failure ++ */ ++int dasd_slock(const char *device) ++{ ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDSLCK, NULL); ++ dasd_close_device(fd); ++ ++ return 0; ++} ++ ++/* ++ * Get the caching algorithm used for the channel programs of this device. ++ * ++ * @param[in] device node device node's name ++ * @param[out] attrib_data pointer to dasd attrib data with: ++ * 'cache' is the caching mode ++ * 'no_cyl' the number of cylinders to be cached. ++ * ++ * @retval 0 in case of success ++ * @retval errno in case of failure ++ */ ++int dasd_get_cache(const char *device, attrib_data_t *attrib_data) ++{ ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDGATTR, attrib_data); ++ dasd_close_device(fd); ++ ++ return 0; ++} ++ ++/* ++ * Set the caching algorithm used for the channel programs of this device. ++ * ++ * @param[in] device node device node's name ++ * @param[in] attrib_data pointer to dasd attrib data with: ++ * 'cache' is the caching mode ++ * 'no_cyl' the number of cylinders to be cached. ++ * ++ * @retval 0 in case of success ++ * @retval errno in case of failure ++ */ ++int dasd_set_cache(const char *device, attrib_data_t *attrib_data) ++{ ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDSATTR, attrib_data); ++ dasd_close_device(fd); ++ ++ return 0; ++} ++ ++/* ++ * Get reserve status of device. ++ * ++ * @param[in] device node device node's name ++ * ++ * @retval errno in case of failure ++ * @retval 0 unreserved ++ * @retval 1 implicit reserved ++ * @retval 2 other reservation ++ * @retval 3 reserved ++ */ ++int dasd_query_reserve(const char *device) ++{ ++ struct dasd_snid_ioctl_data snid = { 0 }; ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDSNID, &snid); ++ dasd_close_device(fd); ++ ++ return snid.data.path_state.reserve; ++} ++ ++/* ++ * Get and print the profiling info of the device. ++ * ++ * @param[in] device node device node's name ++ * @param[in] dasd_profile_info pointer to dasd profile info ++ * ++ * @retval 0 in case of success ++ * @retval errno in case of failure ++ */ ++int dasd_profile(const char *device, dasd_profile_info_t *dasd_profile_info) ++{ ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDPRRD, dasd_profile_info); ++ dasd_close_device(fd); ++ ++ return 0; ++} ++ ++/* ++ * Reset the profiling counters of the device. ++ * ++ * @param[in] device node device node's name ++ * ++ * @retval 0 in case of success ++ * @retval errno in case of failure ++ */ ++int dasd_reset_profile(const char *device) ++{ ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDPRRST, NULL); ++ dasd_close_device(fd); ++ ++ return 0; ++} +diff --git a/tunedasd/src/disk.c b/tunedasd/src/disk.c +index f240651..1e8de16 100644 +--- a/tunedasd/src/disk.c ++++ b/tunedasd/src/disk.c +@@ -19,6 +19,7 @@ + #include + #include + ++#include "lib/dasd_base.h" + #include "lib/dasd_sys.h" + + #include "disk.h" +@@ -26,91 +27,6 @@ + + #define BUS_ID_SIZE 30 + +-/* +- * DASD DEFINITIONS (copied from dasd.h) +- */ +- +-#define DASD_IOCTL_LETTER 'D' +- +-/* +- * struct profile_info_t +- * holds the profiling information +- */ +-typedef struct dasd_profile_info_t { +- unsigned int dasd_io_reqs; /* # of requests processed at all */ +- unsigned int dasd_io_sects; /* # of sectors processed at all */ +- unsigned int dasd_io_secs[32]; /* request's sizes */ +- unsigned int dasd_io_times[32]; /* requests's times */ +- unsigned int dasd_io_timps[32]; /* requests's times per sector */ +- unsigned int dasd_io_time1[32]; /* time from build to start */ +- unsigned int dasd_io_time2[32]; /* time from start to irq */ +- unsigned int dasd_io_time2ps[32]; /*time from start to irq */ +- unsigned int dasd_io_time3[32]; /* time from irq to end */ +- unsigned int dasd_io_nr_req[32]; /* # of requests in chanq */ +-} dasd_profile_info_t; +- +- +-/* +- * struct attrib_data_t +- * represents the operation (cache) bits for the device. +- * Used in DE to influence caching of the DASD. +- */ +-typedef struct attrib_data_t { +- unsigned char operation:3; /* cache operation mode */ +- unsigned char reserved:5; +- unsigned short nr_cyl; /* no of cyliners for read ahaed */ +- unsigned char reserved2[29]; /* for future use */ +-} __attribute__ ((packed)) attrib_data_t; +- +-/* definition of operation (cache) bits within attributes of DE */ +-#define DASD_NORMAL_CACHE 0x0 +-#define DASD_BYPASS_CACHE 0x1 +-#define DASD_INHIBIT_LOAD 0x2 +-#define DASD_SEQ_ACCESS 0x3 +-#define DASD_SEQ_PRESTAGE 0x4 +-#define DASD_REC_ACCESS 0x5 +- +-/* +- * Data returned by Sense Path Group ID (SNID) +- */ +-struct dasd_snid_data { +- struct { +- __u8 group:2; +- __u8 reserve:2; +- __u8 mode:1; +- __u8 res:3; +- } __attribute__ ((packed)) path_state; +- __u8 pgid[11]; +-} __attribute__ ((packed)); +- +-struct dasd_snid_ioctl_data { +- struct dasd_snid_data data; +- __u8 path_mask; +-} __attribute__ ((packed)); +- +- +-/* +- * DASD-IOCTLs (copied from dasd.h) +- */ +-/* Issue a reserve/release command, rsp. */ +-#define BIODASDRSRV _IO (DASD_IOCTL_LETTER,2) /* reserve */ +-#define BIODASDRLSE _IO (DASD_IOCTL_LETTER,3) /* release */ +-#define BIODASDSLCK _IO (DASD_IOCTL_LETTER,4) /* steal lock */ +-/* reset profiling information of a device */ +-#define BIODASDPRRST _IO (DASD_IOCTL_LETTER,5) +- +-/* retrieve profiling information of a device */ +-#define BIODASDPRRD _IOR (DASD_IOCTL_LETTER,2,dasd_profile_info_t) +-/* Get Attributes (cache operations) */ +-#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) +- +-/* Set Attributes (cache operations) */ +-#define BIODASDSATTR _IOW (DASD_IOCTL_LETTER,2,attrib_data_t) +- +-/* Get Sense Path Group ID (SNID) data */ +-#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data) +- +- + /* id definition for profile items */ + enum prof_id { + prof_reqs = 0, +@@ -241,48 +157,33 @@ check_prof_item (char* prof_item) + * 'cache' is the caching mode (see ESS docu for more info) and 'no_cyl' + * the number of cylinders to be cached. + */ +-int +-disk_get_cache (char* device) ++int disk_get_cache(char *device) + { +- int fd; + attrib_data_t attrib_data; +- +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } ++ int rc; + +- /* Get the given caching attributes */ +- if (ioctl (fd, BIODASDGATTR, &attrib_data)) { +- error_print ("Could not get cache attributes for device <%s>", +- device); +- close (fd); +- return -1; +- } ++ rc = dasd_get_cache(device, &attrib_data); ++ if (rc) ++ return rc; + + printf ("%s (%i cyl)\n", + get_cache_name(attrib_data.operation), + attrib_data.nr_cyl); + +- close (fd); + return 0; + } + +- + /* + * Set the caching algorithm used for the channel programs of this device. + * 'cache' is the caching mode (see ESS docu for more info) and 'no_cyl' + * the number of cylinders to be cached. + */ +-int +-disk_set_cache (char* device, char* cache, char* no_cyl) ++int disk_set_cache(char *device, char *cache, char *no_cyl) + { +- int fd; + attrib_data_t attrib_data; +- +- /* get caching mode and # cylinders */ ++ int rc; ++ ++ /* get caching mode and # cylinders */ + attrib_data.operation = check_cache (cache); + attrib_data.nr_cyl = check_no_cyl (no_cyl); + +@@ -292,52 +193,34 @@ disk_set_cache (char* device, char* cache, char* no_cyl) + attrib_data.nr_cyl); + } + +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } +- + /* Set the given caching attributes */ + printf ("Setting cache mode for device <%s>...\n", device); +- if (ioctl (fd, BIODASDSATTR, &attrib_data)) { +- error_print ("Could not set caching for device <%s>", device); +- close (fd); ++ rc = dasd_set_cache(device, &attrib_data); ++ if (rc) { ++ error_print("Could not set caching for device <%s>", device); + return -1; + } +- + printf ("Done.\n"); +- close (fd); ++ + return 0; + } + +- + /* + * Reserve the device. + */ +-int +-disk_reserve (char* device) ++int disk_reserve(char *device) + { +- int fd; +- +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } ++ int rc; + + /* Reserve device */ + printf ("Reserving device <%s>...\n", device); +- if (ioctl (fd, BIODASDRSRV)) { +- error_print ("Could not reserve device <%s>", device); +- close (fd); ++ rc = dasd_disk_reserve(device); ++ if (rc) { ++ error_print("Could not reserve device <%s>", device); + return -1; + } + +- printf ("Done.\n"); +- close (fd); ++ printf("Done.\n"); + return 0; + } + +@@ -345,28 +228,18 @@ disk_reserve (char* device) + /* + * Release the device. + */ +-int +-disk_release (char* device) ++int disk_release(char *device) + { +- int fd; +- +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } ++ int rc; + +- /* Release device */ + printf ("Releasing device <%s>...\n", device); +- if (ioctl (fd, BIODASDRLSE)) { +- error_print ("Could not release device <%s>", device); +- close (fd); ++ rc = dasd_disk_release(device); ++ if (rc) { ++ error_print("Could not release device <%s>", device); + return -1; + } + +- printf ("Done.\n"); +- close (fd); ++ printf("Done.\n"); + return 0; + } + +@@ -376,29 +249,19 @@ disk_release (char* device) + * This means to reserve the device even if it was already reserved. + * The current reserve is broken (steal lock). + */ +-int +-disk_slock (char* device) ++int disk_slock(char *device) + { +- int fd; +- +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } ++ int rc; + + /* Unconditional reserve device */ + printf ("Unconditional reserving device <%s>...\n", device); +- if (ioctl (fd, BIODASDSLCK)) { +- error_print ("Could not unconditional reserve device <%s>", +- device); +- close (fd); ++ rc = dasd_slock(device); ++ if (rc) { ++ error_print("Could not unconditional reserve device <%s>", device); + return -1; + } +- + printf ("Done.\n"); +- close (fd); ++ + return 0; + } + +@@ -407,27 +270,16 @@ disk_slock (char* device) + * Uses the Sense Path Group ID (SNID) ioctl to find out if + * a device is reserved to it's path group. + */ +-int +-disk_query_reserve_status(char* device) ++int disk_query_reserve_status(char *device) + { +- int fd; +- struct dasd_snid_ioctl_data snid; ++ int rc; + +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); ++ rc = dasd_query_reserve(device); ++ if (rc < 0) { ++ error_print("Could not read reserve status for device <%s>", device); + return -1; + } +- snid.path_mask = 0; +- /* Release device */ +- if (ioctl(fd, BIODASDSNID, &snid)) { +- error_print("Could not read reserve status" +- " for device <%s>", device); +- close (fd); +- return -1; +- } +- switch (snid.data.path_state.reserve) { ++ switch (rc) { + case 0: + printf("none\n"); + break; +@@ -441,7 +293,7 @@ disk_query_reserve_status(char* device) + printf("reserved\n"); + break; + } +- close (fd); ++ + return 0; + } + +@@ -615,21 +467,14 @@ static int disk_profile_item(dasd_profile_info_t dasd_profile_info, + /* + * Get and print the profiling info of the device. + */ +-int +-disk_profile (char* device, char* prof_item) ++int disk_profile(char *device, char *prof_item) + { +- int fd, rc; + dasd_profile_info_t dasd_profile_info; +- +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } ++ int rc; + + /* Get the profile info */ +- if (ioctl (fd, BIODASDPRRD, &dasd_profile_info)) { ++ rc = dasd_profile(device, &dasd_profile_info); ++ if (rc) { + switch (errno) { + case EIO: /* profiling is not active */ + error_print ("Profiling (on device <%s>) is not " +@@ -639,7 +484,6 @@ disk_profile (char* device, char* prof_item) + error_print ("Could not get profile info for device " + "<%s>.", device); + } +- close (fd); + return -1; + } + /* Check for profile item or summary */ +@@ -648,38 +492,26 @@ disk_profile (char* device, char* prof_item) + } else { + rc = disk_profile_item (dasd_profile_info, prof_item); + } +- +- close (fd); ++ + return rc; + } + +- + /* + * Reset the profiling counters of the device. + */ +-int +-disk_reset_prof (char* device) ++int disk_reset_prof(char *device) + { +- int fd; +- +- /* Open device file */ +- fd = open (device, O_RDONLY); +- if (fd == -1) { +- error_print ("<%s> - %s", device, strerror (errno)); +- return -1; +- } ++ int rc; + + /* reset profile info */ + printf ("Resetting profile info for device <%s>...\n", device); +- if (ioctl (fd, BIODASDPRRST)) { +- error_print ("Could not reset profile info for device <%s>", +- device); +- close (fd); ++ rc = dasd_reset_profile(device); ++ if (rc) { ++ error_print("Could not reset profile info for device <%s>", device); + return -1; + } +- + printf ("Done.\n"); +- close (fd); ++ + return 0; + } + +-- +2.38.1 + + +From 3aa7f6e29871c06537ab95bf2a14b5eb3ca6e847 Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Thu, 27 Oct 2022 15:51:00 +0200 +Subject: [PATCH 6/7] libdasd: fix ioctl macro to return also positive return + codes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In case of an error the ioctl macro only returns errno to the calling +function. +This misses positive returncodes from ioctls. +Change the macro to also return positive return codes. + +Signed-off-by: Stefan Haberland +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner +--- + libdasd/dasd_ioctl.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/libdasd/dasd_ioctl.c b/libdasd/dasd_ioctl.c +index 40e726c..3a36375 100644 +--- a/libdasd/dasd_ioctl.c ++++ b/libdasd/dasd_ioctl.c +@@ -28,11 +28,13 @@ + + #define RUN_IOCTL(fd, req, argp) \ + do { \ +- if (ioctl(fd, req, argp) != 0) { \ +- int err = errno; \ +- if (err != EBADF) \ ++ int rc = ioctl(fd, req, argp); \ ++ if (rc != 0) { \ ++ if (rc == -1) \ ++ rc = errno; \ ++ if (rc != EBADF) \ + dasd_close_device(fd); \ +- return err; \ ++ return rc; \ + } \ + } while (0) + +-- +2.38.1 + + +From 3f12bdf4c728caeaeaa64158efb26f917d905b08 Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Fri, 11 Nov 2022 13:17:32 +0100 +Subject: [PATCH 7/7] tunedasd: add copy_pair swap capability +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add an option to tunedasd to trigger a copy pair swap using the appropriate +ioctl for DASD devices. + + -s, --copy-pair-swap COPY_PAIR + +This command requires a comma separated pair of primary,secondary to be +specified. In case of success the old secondary will become the new primary +device and the old primary will become a secondary device. + +Example: + +tunedasd /dev/dasda -s 0.0.9700,0.0.9740 + +This will set the old secondary device 0.0.9740 as the new primary. +The old primary device 0.0.9700 will automatically become a secondary +device. + +Signed-off-by: Stefan Haberland +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner +--- + include/lib/dasd_base.h | 14 ++++++++-- + libdasd/dasd_ioctl.c | 28 ++++++++++++++++++++ + tunedasd/include/disk.h | 1 + + tunedasd/man/tunedasd.8 | 14 ++++++++++ + tunedasd/src/disk.c | 50 ++++++++++++++++++++++++++++++++++-- + tunedasd/src/tunedasd.c | 57 +++++++++++++++++++++++++---------------- + 6 files changed, 138 insertions(+), 26 deletions(-) + +diff --git a/include/lib/dasd_base.h b/include/lib/dasd_base.h +index 11ec94b..400e374 100644 +--- a/include/lib/dasd_base.h ++++ b/include/lib/dasd_base.h +@@ -20,8 +20,8 @@ + #include + #include + +-/* A bus id of a DASD is 8 characters long. E.g. 0.0.4711 */ +-#define DASD_BUS_ID_SIZE 9 ++/* the definition of a BUSID in the DASD driver is 20 */ ++#define DASD_BUS_ID_SIZE 20 + + typedef struct dasd_information2_t { + unsigned int devno; /* S/390 devno */ +@@ -242,6 +242,13 @@ struct dasd_snid_ioctl_data { + __u8 path_mask; + } __attribute__((packed)); + ++struct dasd_copypair_swap_data { ++ char primary[DASD_BUS_ID_SIZE]; /* BUSID of primary */ ++ char secondary[DASD_BUS_ID_SIZE]; /* BUSID of secondary */ ++ /* Reserved for future updates. */ ++ char reserved[64]; ++}; ++ + #ifndef __linux__ + /* definition from hdreg.h */ + struct hd_geometry { +@@ -278,6 +285,8 @@ struct hd_geometry { + #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER, 2, attrib_data_t) + /* Release Allocated Space */ + #define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t) ++/* Swap copy pair */ ++#define BIODASDPPRCSWAP _IOW(DASD_IOCTL_LETTER, 4, struct dasd_copypair_swap_data) + /* Get Sense Path Group ID (SNID) data */ + #define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data) + /* Check device format according to format_data_t */ +@@ -318,5 +327,6 @@ int dasd_set_cache(const char *device, attrib_data_t *attrib_data); + int dasd_query_reserve(const char *device); + int dasd_profile(const char *device, dasd_profile_info_t *dasd_profile_info); + int dasd_reset_profile(const char *device); ++int dasd_copy_swap(const char *device, struct dasd_copypair_swap_data *data); + + #endif /* LIB_DASD_BASE_H */ +diff --git a/libdasd/dasd_ioctl.c b/libdasd/dasd_ioctl.c +index 3a36375..f684761 100644 +--- a/libdasd/dasd_ioctl.c ++++ b/libdasd/dasd_ioctl.c +@@ -452,3 +452,31 @@ int dasd_reset_profile(const char *device) + + return 0; + } ++ ++/* ++ * Initiate the swap of a copy pairs primary,secondary relation. ++ * The old secondary will become the new primary and vice versa. ++ * ++ * @param[in] device node device node's name ++ * @param[in] copy_pair data pointer to dasd copypair data with: ++ * 'primary' old primary, becoming secondary ++ * 'secondary' old secondary, becoming primary. ++ * ++ * @retval errno in case of failure ++ * @retval 0 in case of success ++ * @retval 1 swap data invalid ++ * @retval 2 no active device found ++ * @retval 3 wrong primary specified ++ * @retval 4 secondary device not found ++ * @retval 5 swap already running ++ */ ++int dasd_copy_swap(const char *device, struct dasd_copypair_swap_data *data) ++{ ++ int fd; ++ ++ fd = dasd_open_device(device, O_RDONLY); ++ RUN_IOCTL(fd, BIODASDPPRCSWAP, data); ++ dasd_close_device(fd); ++ ++ return 0; ++} +diff --git a/tunedasd/include/disk.h b/tunedasd/include/disk.h +index ea35f6f..55a32d0 100644 +--- a/tunedasd/include/disk.h ++++ b/tunedasd/include/disk.h +@@ -31,6 +31,7 @@ int disk_query_reserve_status(char* device); + int disk_profile (char* device, char* prof_item); + int disk_reset_prof(char *device); + int disk_reset_chpid(char *device, char *chpid); ++int disk_copy_swap(char *device, char *copy_pair); + + #endif /* not DISK_H */ + +diff --git a/tunedasd/man/tunedasd.8 b/tunedasd/man/tunedasd.8 +index 94c3608..ae41b97 100644 +--- a/tunedasd/man/tunedasd.8 ++++ b/tunedasd/man/tunedasd.8 +@@ -174,6 +174,14 @@ Reset all channel paths of the selected device. The channel paths + might be suspended due to high IFCC error rates or a High Performance + FICON failure. Use this option to resume considering all defined + channel paths for I/O. ++.TP ++.BR "\-s" " or " "\-\-copy\-pair\-swap " ++Swap the copy roles of the specified copy pair. The has to ++be a comma separated pair of \fBPRIMARY,SECONDARY\fR where ++\fBPRIMARY\fR is the old primary device that will become a secondary ++automatically. The old \fBSECONDARY\fR device will become the new ++primary device. Both devices have to be online for this operation to ++succeed. + .\" + .\".TP + .\".BR "\-o" " or " "\-\-online" +@@ -197,6 +205,12 @@ channel paths for I/O. + .br + + tunedasd -p 45 /dev/dasdc ++ ++.br ++4. Scenario: Swap copy pair 0.0.9700 and 0.0.9740 ++.br ++ ++ tunedasd -s 0.0.9700,0.0.9740 /dev/dasdc + .br + .SH "SEE ALSO" + .BR dasdview (8), +diff --git a/tunedasd/src/disk.c b/tunedasd/src/disk.c +index 1e8de16..490c1c5 100644 +--- a/tunedasd/src/disk.c ++++ b/tunedasd/src/disk.c +@@ -21,12 +21,11 @@ + + #include "lib/dasd_base.h" + #include "lib/dasd_sys.h" ++#include "lib/util_libc.h" + + #include "disk.h" + #include "tunedasd.h" + +-#define BUS_ID_SIZE 30 +- + /* id definition for profile items */ + enum prof_id { + prof_reqs = 0, +@@ -549,3 +548,50 @@ int disk_reset_chpid(char *device, char *chpid) + + return -1; + } ++ ++int disk_copy_swap(char *device, char *copy_pair) ++{ ++ struct dasd_copypair_swap_data data = { 0 }; ++ char *primary, *secondary; ++ int rc = 0; ++ ++ primary = strtok(copy_pair, ","); ++ secondary = strtok(NULL, ","); ++ ++ if (!primary || !secondary) { ++ error_print("%s: Error parsing Copy Pair %s", device, copy_pair); ++ return -1; ++ } ++ ++ util_strlcpy(data.primary, primary, DASD_BUS_ID_SIZE); ++ util_strlcpy(data.secondary, secondary, DASD_BUS_ID_SIZE); ++ ++ printf("Swapping copy pair %s %s on device <%s>...\n", primary, secondary, device); ++ rc = dasd_copy_swap(device, &data); ++ ++ switch (rc) { ++ case 0: ++ printf("Done.\n"); ++ return 0; ++ case 1: ++ error_print("Swap data invalid"); ++ break; ++ case 2: ++ error_print("No active device found"); ++ break; ++ case 3: ++ error_print("Wrong primary device specified"); ++ break; ++ case 4: ++ error_print("Secondary device not found"); ++ break; ++ case 5: ++ error_print("Swap already running"); ++ break; ++ default: ++ error_print("Swap not successful rc %d", rc); ++ break; ++ } ++ ++ return -1; ++} +diff --git a/tunedasd/src/tunedasd.c b/tunedasd/src/tunedasd.c +index 3c14eb8..691841c 100644 +--- a/tunedasd/src/tunedasd.c ++++ b/tunedasd/src/tunedasd.c +@@ -119,12 +119,17 @@ static struct util_opt opt_vec[] = { + .desc = "Reset all channel paths of a device", + .flags = UTIL_OPT_FLAG_NOSHORT, + }, ++ { ++ .option = { "copy-pair-swap", required_argument, NULL, 's' }, ++ .argument = "COPY_PAIR", ++ .desc = "Swap a specified, comma separated copy pair.", ++ }, + UTIL_OPT_HELP, + UTIL_OPT_VERSION, + UTIL_OPT_END + }; + +-#define CMD_KEYWORD_NUM 16 ++#define CMD_KEYWORD_NUM 17 + #define DEVICES_NUM 256 + + enum cmd_keyword_id { +@@ -144,6 +149,7 @@ enum cmd_keyword_id { + cmd_keyword_path_all, + cmd_keyword_enable_stats, + cmd_keyword_disable_stats, ++ cmd_keyword_copy_swap, + }; + + +@@ -167,7 +173,8 @@ static const struct { + { "path_reset", cmd_keyword_path }, + { "path_reset_all", cmd_keyword_path_all }, + { "enable-stats", cmd_keyword_enable_stats }, +- { "disable-stats", cmd_keyword_disable_stats } ++ { "disable-stats", cmd_keyword_disable_stats }, ++ { "copy-swap", cmd_keyword_copy_swap }, + }; + + +@@ -180,26 +187,27 @@ enum cmd_key_state { + + /* Determines which combination of keywords are valid */ + static enum cmd_key_state cmd_key_table[CMD_KEYWORD_NUM][CMD_KEYWORD_NUM] = { +- /* help vers get_ cach no_c rese rele sloc prof prof rese quer path path +- * ion cach e yl rve ase k ile _ite t_pr y_re _all +- * e m of serv ++ /* help vers get_ cach no_c rese rele sloc prof prof rese quer path path enab disa copy ++ * ion cach e yl rve ase k ile _ite t_pr y_re _all le-s ble- -swa ++ * e m of serv tats stat p + */ +- /* help */ { req, opt, opt, opt, opt, opt, opt, opt, opt, opt, opt, inv, inv, inv, inv, inv }, +- /* version */ { inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* get_cache */ { opt, opt, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* cache */ { opt, opt, inv, req, opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* no_cyl */ { opt, opt, inv, req, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* reserve */ { opt, opt, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* release */ { opt, opt, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* slock */ { opt, opt, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv }, +- /* profile */ { opt, opt, inv, inv, inv, inv, inv, inv, req, opt, inv, inv, inv, inv, inv, inv }, +- /* prof_item */ { opt, opt, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv, inv, inv }, +- /* reset_prof */ { opt, opt, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv }, +- /* query_reserve */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv }, +- /* path */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv }, +- /* path_all */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv }, +- /* enable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv }, +- /* disable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req }, ++ /* help */ { req, opt, opt, opt, opt, opt, opt, opt, opt, opt, opt, inv, inv, inv, inv, inv, inv }, ++ /* version */ { inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* get_cache */ { opt, opt, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* cache */ { opt, opt, inv, req, opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* no_cyl */ { opt, opt, inv, req, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* reserve */ { opt, opt, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* release */ { opt, opt, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* slock */ { opt, opt, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv }, ++ /* profile */ { opt, opt, inv, inv, inv, inv, inv, inv, req, opt, inv, inv, inv, inv, inv, inv, inv }, ++ /* prof_item */ { opt, opt, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv, inv, inv, inv }, ++ /* reset_prof */ { opt, opt, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv }, ++ /* query_reserve */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv }, ++ /* path */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv }, ++ /* path_all */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv }, ++ /* enable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv }, ++ /* disable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv }, ++ /* copy-swap */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req }, + }; + + struct parameter { +@@ -439,7 +447,9 @@ static int get_command_line(int argc, char *argv[], struct command_line *line) + rc = store_option (&cmdline, cmd_keyword_query_reserve, + optarg); + break; +- ++ case 's': ++ rc = store_option(&cmdline, cmd_keyword_copy_swap, optarg); ++ break; + case -1: + /* End of options string - start of devices list */ + cmdline.device_id = optind; +@@ -508,6 +518,9 @@ static int do_command(char *device, struct command_line cmdline) + case cmd_keyword_path_all: + rc = disk_reset_chpid(device, NULL); + break; ++ case cmd_keyword_copy_swap: ++ rc = disk_copy_swap(device, cmdline.parm[cmd_keyword_copy_swap].data); ++ break; + default: + error_print ("Unknown command '%s' specified", + get_keyword_name (i)); +-- +2.38.1 + diff --git a/s390utils.spec b/s390utils.spec index 9328bd5..9ea9a6d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.24.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -37,6 +37,9 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch +# upstream fixes/updates +Patch100: s390utils-%{version}-fedora.patch + Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} @@ -63,6 +66,9 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch0 -p1 -b .zipl-invert-script-options %patch1 -p1 -b .blscfg-rpm-nvr-sort +# upstream fixes/updates +%patch100 -p1 + # drop -Werror from genprotimg to allow building with GCC 12 sed -i.bak -e 's/-Werror//g' genprotimg/src/Makefile genprotimg/boot/Makefile @@ -896,6 +902,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Nov 22 2022 Dan Horák - 2:2.24.0-2 +- update for Transparent DASD PPRC (Peer-to-Peer Remote Copy) handling + * Thu Nov 10 2022 Dan Horák - 2:2.24.0-1 - rebased to 2.24.0 From c33643ba1021a9c0e30fde5c41ac193a957a80dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 9 Dec 2022 13:54:52 +0000 Subject: [PATCH 075/141] - rebased to 2.25.0 --- s390-tools-zipl-blscfg-rpm-nvr-sort.patch | 23 +- s390utils-2.24.0-fedora.patch | 1665 --------------------- s390utils-2.25.0-fedora.patch | 0 s390utils.spec | 16 +- sources | 2 +- 5 files changed, 24 insertions(+), 1682 deletions(-) delete mode 100644 s390utils-2.24.0-fedora.patch create mode 100644 s390utils-2.25.0-fedora.patch diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index 90866f8..3960de1 100644 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -1,4 +1,4 @@ -From 14119148dabb7f4f633623c00eece44c5771db10 Mon Sep 17 00:00:00 2001 +From a17c57bf2b7b6d64a509cb5fb02fe46849bc550c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 Jun 2022 17:43:05 +0200 Subject: [PATCH 1/2] Revert "zipl/src: Implement sorting bls entries by @@ -194,10 +194,10 @@ index 0cea1d4..9352f76 100644 return n; -- -2.36.1 +2.37.3 -From 661f143bb0b429c732d0ad9756c745dcb8799bc7 Mon Sep 17 00:00:00 2001 +From 7a51cfc15b870d90bffe1e24a1da922663ffe1d7 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 20 Jun 2022 17:46:59 +0200 Subject: [PATCH 2/2] blscfg: sort like rpm nvr, not like a single version @@ -208,20 +208,19 @@ Content-Transfer-Encoding: 8bit Signed-off-by: Peter Jones Signed-off-by: Dan Horák --- - zipl/src/Makefile | 2 +- + zipl/src/Makefile | 1 + zipl/src/scan.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 95 insertions(+), 3 deletions(-) + 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/zipl/src/Makefile b/zipl/src/Makefile -index 786bb7f..1adc486 100644 +index 64eabe4..7043005 100644 --- a/zipl/src/Makefile +++ b/zipl/src/Makefile -@@ -7,7 +7,7 @@ ALL_CPPFLAGS += -I../include -I../boot \ - -D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS) - ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) +@@ -9,6 +9,7 @@ ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) --libs = $(rootdir)/libutil/libutil.a -+libs = $(rootdir)/libutil/libutil.a -lrpmio -lrpm + libs = $(rootdir)/libutil/libutil.a \ + $(rootdir)/libvtoc/libvtoc.a \ ++ -lrpmio -lrpm objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \ bootmap_header.o envblk.o install.o zipl.o $(rootdir)/zipl/boot/data.o @@ -345,5 +344,5 @@ index 9352f76..3327e2d 100644 static int scan_append_section_heading(struct scan_token* scan, int* index, char* name); -- -2.36.1 +2.37.3 diff --git a/s390utils-2.24.0-fedora.patch b/s390utils-2.24.0-fedora.patch deleted file mode 100644 index c03075c..0000000 --- a/s390utils-2.24.0-fedora.patch +++ /dev/null @@ -1,1665 +0,0 @@ -From 5107a7be16e4849fbda7beae0504fdbc0f2cb4b5 Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Tue, 9 Aug 2022 13:12:26 +0200 -Subject: [PATCH 1/7] zconf/lsdasd: fix Copy Pair related output -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix the default output for copy pair secondary devices to not show -a faulty blockdevice entry and major:minor combination. - -The new output looks like: - - # lsdasd - Bus-ID Status Name Device Type BlkSz Size Blocks - ================================================================================ - 0.0.9740 secondary ECKD - 0.0.9741 secondary ECKD - 0.0.9742 secondary ECKD - 0.0.e964 active dasda 94:0 ECKD 4096 21129MB 5409180 - 0.0.e967 active dasdb 94:4 ECKD 4096 21129MB 5409180 - 0.0.9330 active dasdc 94:8 ECKD 4096 782MB 200340 - 0.0.9700 active dasdd 94:12 ECKD 4096 782MB 200340 - 0.0.9701 active dasdf 94:20 ECKD 4096 782MB 200340 - 0.0.9702 active dasdh 94:28 ECKD 4096 782MB 200340 - -Also add copy_pairs to extended output: - - # lsdasd -l 9700 - 0.0.9700/dasdd/94:12 - status: active - type: ECKD - blksz: 4096 - size: 782MB - blocks: 200340 - extent_size: 1113 - logical_capacity: 1113 - space_allocated: 1113 - use_diag: 0 - readonly: 0 - eer_enabled: 0 - erplog: 0 - hpf: 1 - uid: IBM.750000000ABT31.9700.00 - fc_security: Unsupported - paths_installed: 38 39 3a 3b - paths_in_use: 38 39 3a 3b - paths_non_preferred: - paths_invalid_cabling: - paths_cuir_quiesced: - paths_invalid_hpf_characteristics: - paths_error_threshold_exceeded: - copy_pairs: 0.0.9700,0.0.9740 0.0.9700,0.0.9743 0.0.9700,0.0.9744 0.0.9700,0.0.9745 - -Signed-off-by: Stefan Haberland -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Höppner ---- - zconf/lsdasd | 113 +++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 96 insertions(+), 17 deletions(-) - -diff --git a/zconf/lsdasd b/zconf/lsdasd -index 795b33b..8b2cc0f 100755 ---- a/zconf/lsdasd -+++ b/zconf/lsdasd -@@ -146,6 +146,62 @@ function findDASDDebugfsDirectorie() { - fi - } - -+#------------------------------------------------------------------------------ -+# The blockpath can usually be found over the DEVPATH -+# In case of a swapped Copy Pair device the blockdev is likely associated -+# with one of the secondary devices -+# this function checks if the blockdev is associated with the primary device -+# and if not search for it in the secondary device list -+#------------------------------------------------------------------------------ -+function setCorrectBlockPath() { -+ local DRIVERECKD="$SYSFSDIR/bus/ccw/drivers/dasd-eckd/" -+ local DRIVERFBA="$SYSFSDIR/bus/ccw/drivers/dasd-fba/" -+ local SEARCHDIRS= -+ local SEARCHLIST= -+ -+ if [[ "$COPYROLE" == "none" ]] || [[ -d "$DEVPATH/block" ]]; then -+ BLOCKPATH="$DEVPATH"/block/dasd* -+ return -+ fi -+ -+ if [[ -d "$DRIVERECKD" ]]; then -+ SEARCHDIRS="$DRIVERECKD" -+ fi -+ if [[ -d "$DRIVERFBA" ]]; then -+ SEARCHDIRS="$SEARCHDIRS $DRIVERFBA" -+ fi -+ -+ SEARCHLIST=$(echo $SECONDARY_LIST | sed 's/,/ /g') -+ for SEARCHDEV in $SEARCHLIST -+ do -+ if [[ -n "$SEARCHDIRS" ]]; then -+ PRIM_DEVPATH=$(find $SEARCHDIRS -type l -name $SEARCHDEV \ -+ -printf "%h/%l\n" 2> /dev/null) -+ if [[ -d "$PRIM_DEVPATH/block" ]]; then -+ break -+ fi -+ else -+ # The above paths may become invalid in the future, so we keep the -+ # following query as backup: -+ PRIM_DEVPATH=$(find "$SYSFSDIR/devices" -type l -name $SEARCHDEV \ -+ "driver" -lname "*/dasd*" -printf "%h\n" \ -+ 2> /dev/null) -+ fi -+ done -+ -+ BLOCKPATH="$PRIM_DEVPATH"/block/dasd* -+} -+ -+#------------------------------------------------------------------------------ -+# gather Copy Pair related data -+#------------------------------------------------------------------------------ -+function gatherCopyPairData() { -+ read COPYPAIR 2> /dev/null < $DEVPATH/copy_pair -+ PRIMARY_UID=`echo $COPYPAIR | cut -d " " -f1 | cut -d "," -f1` -+ COPYPAIR=`echo "$COPYPAIR" | sed 's/ /,/g' | sed 's/^,//' ` -+ SECONDARY_LIST=`echo ${COPYPAIR//$PRIMARY_UID","/} ` -+} -+ - #------------------------------------------------------------------------------ - # gather device data and call appropriate output function - #------------------------------------------------------------------------------ -@@ -165,16 +221,18 @@ function gatherDeviceData() { - read READONLY 2> /dev/null < $DEVPATH/readonly || continue - read DISCIPLINE 2> /dev/null < $DEVPATH/discipline || continue - read ESE 2> /dev/null < $DEVPATH/ese -+ read COPYROLE 2> /dev/null < $DEVPATH/copy_role - -+ if [[ "$COPYROLE" != "none" ]]; then -+ gatherCopyPairData -+ fi - # Block device specific information is only available for - # devices that are online and not a PAV alias -- if [[ ! "$ONLINE" == 0 ]] && [[ ! "$ALIAS" == 1 ]]; then -- #find device Path to the block device -- if [[ -d "$DEVPATH/block" ]]; then -- set - "$DEVPATH"/block/dasd* -- else -- set - "$DEVPATH"/block:dasd* -- fi -+ if [[ ! "$ONLINE" == 0 ]] && [[ ! "$ALIAS" == 1 ]] && -+ [[ ! "$COPYROLE" == "secondary" ]]; then -+ #find device Path to the block device -+ setCorrectBlockPath -+ set - $BLOCKPATH - MAJMIN= - MAJOR= - MINOR= -@@ -194,10 +252,12 @@ function gatherDeviceData() { - fi - fi - else -- # BLOCKNAME for offline and alias devices will not be -- # printed, it's just a key for sorting -+ # BLOCKNAME for offline, alias and secondary devices -+ # will not be printed, it's just a key for sorting - if [[ "$ONLINE" == 0 ]]; then - BLOCKNAME="" -+ elif [[ "$COPYROLE" == "secondary" ]]; then -+ BLOCKNAME="b" - else - BLOCKNAME="a" - fi -@@ -261,6 +321,15 @@ function newoutput() - return - fi - -+ if [[ "$COPYROLE" == "secondary" ]]; then -+ printf "%s:%s:%-8s secondary %-8s %13s\n" \ -+ "$SORTKEYLEN" "$SORTKEY" \ -+ "$BUSID" \ -+ "$PRIMARY_BLOCKNAME" \ -+ "$DISCIPLINE" -+ return -+ fi -+ - if [[ "$READONLY" == 0 ]]; then - ROSTRING="" - else -@@ -519,10 +588,14 @@ function extended() - "${HPF_PATHS[@]}" \ - "${IFCC_PATHS[@]}" ; - return -- elif [[ "$ALIAS" == 1 ]]; then -- if [[ "$BASEONLY" == "false" ]]; then -- ACTIVE="alias" -- printf "%s:%s:%s# status:\t\t\t\t%s# type: \t\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s # uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s#\n" \ -+ elif [[ "$ALIAS" == 1 ]] || [[ "$COPYROLE" == "secondary" ]]; then -+ if [[ "$BASEONLY" == "false" ]] || [[ "$COPYROLE" == "secondary" ]]; then -+ if [[ "$COPYROLE" == "secondary" ]]; then -+ ACTIVE="secondary" -+ else -+ ACTIVE="alias" -+ fi -+ printf "%s:%s:%s# status:\t\t\t\t%s# type: \t\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s # uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s# copy_pairs:\t\t\t\t%s#\n" \ - "$SORTKEYLEN" "$SORTKEY" \ - "$BUSID" \ - "$ACTIVE" \ -@@ -540,7 +613,8 @@ function extended() - "${CABLE_PATHS[@]}" \ - "${CUIR_PATHS[@]}" \ - "${HPF_PATHS[@]}" \ -- "${IFCC_PATHS[@]}" ; -+ "${IFCC_PATHS[@]}" \ -+ "${COPYPAIR}" ; - fi - return - elif [[ -z "$BLOCKNAME" ]] || [[ -z "$SIZE" ]]; then -@@ -565,7 +639,7 @@ function extended() - DISCIPLINE="${DISCIPLINE} (ESE)" - fi - -- printf "%s:%s:%s/%s/%s%s%s# status:\t\t\t\t%s# type: \t\t\t\t%s# blksz:\t\t\t\t%s# size: \t\t\t\t%s# blocks:\t\t\t\t%s# extent_size:\t\t\t\t%s# logical_capacity:\t\t\t%s# space_allocated:\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s# uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s#\n" \ -+ printf "%s:%s:%s/%s/%s%s%s# status:\t\t\t\t%s# type: \t\t\t\t%s# blksz:\t\t\t\t%s# size: \t\t\t\t%s# blocks:\t\t\t\t%s# extent_size:\t\t\t\t%s# logical_capacity:\t\t\t%s# space_allocated:\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s# uid: \t\t\t\t%s# fc_security: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s# copy_pairs:\t\t\t\t%s#\n" \ - "$SORTKEYLEN" "$SORTKEY" \ - "$BUSID" \ - "$BLOCKNAME" \ -@@ -593,7 +667,8 @@ function extended() - "${CABLE_PATHS[@]}" \ - "${CUIR_PATHS[@]}" \ - "${HPF_PATHS[@]}" \ -- "${IFCC_PATHS[@]}" ; -+ "${IFCC_PATHS[@]}" \ -+ "${COPYPAIR}" ; - } - - function host() -@@ -710,7 +785,11 @@ function uid() - fi - fi - -- printf "%s:%s:%-8s %-8s %s\n" \ -+ if [[ "$COPYROLE" == "secondary" ]]; then -+ BLOCKNAME="secondary" -+ fi -+ -+ printf "%s:%s:%-8s %-10s %s\n" \ - "$SORTKEYLEN" "$SORTKEY" \ - "$BUSID" \ - "$BLOCKNAME" \ --- -2.38.1 - - -From 803b87e324d704036c5bef1d1daba6cf5b69b668 Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Wed, 12 Oct 2022 15:55:43 +0200 -Subject: [PATCH 2/7] zconf/lsdasd: add Copy Pair output option -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add an option -P|--copy-pairs to show all DASD devices with copy -relations set up in the system and their roles. - -The output looks like: - - # ./s390-tools/zconf/lsdasd -h - [...] - -P|--copy-pairs - Print information about copy pairs. - - # ./s390-tools/zconf/lsdasd -P - Bus-ID Role Name Paired devices - ================================================================================ - 0.0.9700 primary dasdd 0.0.9740,0.0.9743,0.0.9744,0.0.9745 - 0.0.9740 secondary 0.0.9700 - 0.0.9701 primary dasdf 0.0.9741 - 0.0.9741 secondary 0.0.9701 - 0.0.9702 primary dasdh 0.0.9742 - 0.0.9742 secondary 0.0.9702 - -Signed-off-by: Stefan Haberland -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Höppner ---- - zconf/lsdasd | 45 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 45 insertions(+) - -diff --git a/zconf/lsdasd b/zconf/lsdasd -index 8b2cc0f..59720b6 100755 ---- a/zconf/lsdasd -+++ b/zconf/lsdasd -@@ -35,6 +35,8 @@ function PrintUsage() { - Print extended information about DASDs. - -H|--host-access-list - Print information about hosts accessing DASDs. -+ -P|--copy-pairs -+ Print information about copy pairs. - -v|--verbose - For compatibility/future use. Currently ignored. - --version -@@ -292,6 +294,8 @@ function gatherDeviceData() { - uid - elif [[ "$OUTPUT" == "host" ]]; then - host -+ elif [[ "$OUTPUT" == "copy" ]]; then -+ copy - else - newoutput - fi -@@ -769,6 +773,41 @@ printf "\n"; - rm -f $temp - } - -+# pad sortkey with given number zeroes -+function padSortKey() -+{ -+ local LEN=$1 -+ for (( i=0; i<$LEN; i++ )) -+ do -+ printf -v SORTKEY "%s0" $SORTKEY -+ done -+} -+ -+function copy() -+{ -+ if [[ "$COPYROLE" == "none" ]]; then -+ return -+ fi -+ -+ SORTKEYLEN=$((${#PRIMARY_UID}+${#DEV_UID})) -+ if [[ "$COPYROLE" == "secondary" ]]; then -+ SORTKEY=$PRIMARY_UID$DEV_UID -+ PAIREDDEVICES=$PRIMARY_UID -+ BLOCKNAME="" -+ else -+ SORTKEY=$PRIMARY_UID -+ padSortKey ${#DEV_UID} -+ PAIREDDEVICES=$SECONDARY_LIST -+ fi -+ -+ printf "%s:%s:%-8s %-10s %-8s %-8s %s \n" \ -+ "$SORTKEYLEN" "$SORTKEY" \ -+ "$BUSID" \ -+ "$COPYROLE" \ -+ "$BLOCKNAME" \ -+ "$PAIREDDEVICES"; -+} -+ - function uid() - { - #-------------------------------------------# -@@ -835,6 +874,9 @@ while [ $# -gt 0 ]; do - --host-access-list|-H) - OUTPUT="host" - ;; -+ --copy-pairs|-P) -+ OUTPUT="copy" -+ ;; - --version) - PrintVersion - exit 0 -@@ -889,6 +931,9 @@ if [[ "$PRINTUID" == "true" ]] && [[ "$OUTPUT" != "old" ]]; then - elif [[ "$OUTPUT" == "new" ]]; then - printf "Bus-ID Status Name Device Type BlkSz Size Blocks\n" - printf "================================================================================\n" -+elif [[ "$OUTPUT" == "copy" ]]; then -+ printf "Bus-ID Role Name Paired devices\n"; -+ printf "================================================================================\n"; - elif [[ "$OUTPUT" == "extended" ]]; then - PROCESSING=" $PROCESSING | sed 's/#/\n/g' " - fi --- -2.38.1 - - -From e742d1c9ae5103c9f88d3fde085e0694efaeeb5a Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Thu, 11 Aug 2022 13:52:30 +0200 -Subject: [PATCH 3/7] zdev: correctly handle multiple values for CCW devices -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Correctly create multiple lines in the udev rule for CCW device attributes -with multi bit set that contain multiple values. - -Suggested-by: Peter Oberparleiter -Signed-off-by: Stefan Haberland -Reviewed-by: Jan Hoeppner -Reviewed-by: Peter Oberparleiter -Signed-off-by: Jan Höppner ---- - zdev/src/udev_ccw.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/zdev/src/udev_ccw.c b/zdev/src/udev_ccw.c -index 7c0a703..3375a5e 100644 ---- a/zdev/src/udev_ccw.c -+++ b/zdev/src/udev_ccw.c -@@ -221,6 +221,7 @@ static void write_attr_to_file(FILE *fd, struct device_state *state, const char - struct ptrlist_node *p; - struct setting *s; - struct util_list *list = NULL; -+ struct strlist_node *str; - - /* Apply attributes in correct order. */ - list = setting_list_get_sorted(state->settings); -@@ -229,8 +230,13 @@ static void write_attr_to_file(FILE *fd, struct device_state *state, const char - s = p->ptr; - if (s->removed) - continue; -- if ((s->attrib && s->attrib->internal) || -- internal_by_name(s->name)) { -+ if (s->values) { -+ util_list_iterate(s->values, str) { -+ fprintf(fd, "ATTR{[ccw/%s]%s}=\"%s\"\n", -+ id, s->name, str->str); -+ } -+ } else if ((s->attrib && s->attrib->internal) || -+ internal_by_name(s->name)) { - fprintf(fd, "ENV{zdev_%s}=\"%s\"\n", - internal_get_name(s->name), s->value); - } else { --- -2.38.1 - - -From f654b971d0e78a139c7ed8c0df821af2f4356a8b Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Tue, 9 Aug 2022 16:17:23 +0200 -Subject: [PATCH 4/7] zdev: add copy_pair attribute for DASD devices -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The DASD device driver has a new attribute copy_pair to make storage -server copy pairs known to the driver. -Add this attribute to zdev. - -Usage example: - -Add two copy pairs 1000,2000 and 1000,3000 to a DASD device 1000 -$ chzdev dasd 1000 copy_pairs=1000,2000 copy_pairs=1000,3000 - -or - -$ chzdev dasd 1000 copy_pairs="1000,2000 1000,3000" - -To add a third copy pair later on: -$ chzdev dasd 1000 copy_pairs=1000,4000 - -To remove all copy pairs from the device 1000: -$ chzdev dasd 1000 -r copy_pairs - -Signed-off-by: Stefan Haberland -Reviewed-by: Peter Oberparleiter -Signed-off-by: Jan Höppner ---- - zdev/src/dasd.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 93 insertions(+) - -diff --git a/zdev/src/dasd.c b/zdev/src/dasd.c -index daec916..f9fd231 100644 ---- a/zdev/src/dasd.c -+++ b/zdev/src/dasd.c -@@ -137,6 +137,21 @@ static struct attrib dasd_attr_readonly = { - .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 1)), - }; - -+static struct attrib dasd_attr_copy_pair = { -+ .name = "copy_pair", -+ .title = "Modify copy-pair relations", -+ .desc = "Make a copy-pair relation for this device known to the DASD " -+ "driver.\n" -+ "A copy-pair is a comma-separated pair of device bus-IDs\n" -+ ",.\n" -+ "Example: 0.0.1000,0.0.2000\n" -+ "Up to 4 copy-pairs are accepted by the DASD driver for each " -+ "device.\n", -+ .unstable = 1, -+ .multi = 1, -+ .activerem = 1, -+}; -+ - static struct attrib dasd_attr_erplog = { - .name = "erplog", - .title = "Enable logging of Error Recovery Processing", -@@ -600,6 +615,81 @@ persistent: - return rc; - } - -+/* Remove all entries from the copy_pair attribute by writing 'clear' to it. */ -+static void dasd_clear_copy_pair(struct setting *s) -+{ -+ free(s->value); -+ s->value = misc_strdup("clear"); -+ strlist_free(s->values); -+ s->values = strlist_new(); -+ strlist_add(s->values, "clear"); -+ s->removed = 0; -+ s->modified = 1; -+} -+ -+/* -+ * Copy-pair values may contain multiple values in one line -+ * those need to be split up and put in multiple values entries -+ * delimiter is " " and "\n" depending on the source -+ * values read from sysfs have " " as delimiter and values from -+ * zdev have "\n" -+ */ -+static void dasd_split_copy_pair(struct setting *s) -+{ -+ struct util_list *new = NULL; -+ struct strlist_node *node; -+ -+ new = strlist_new(); -+ util_list_iterate(s->values, node) -+ strlist_add_multi(new, node->str, "\n ", 0); -+ -+ strlist_free(s->values); -+ s->values = new; -+} -+ -+/* -+ * For persistent configurations one value per values[] entry is required -+ * to achieve a correct multi-line copy-pair statement in the resulting -+ * udev-rule. -+ */ -+static exit_code_t dasd_st_configure_persistent(struct subtype *st, -+ struct device *dev) -+{ -+ struct setting *s; -+ -+ util_list_iterate(&dev->persistent.settings->list, s) { -+ if (strcmp(s->name, "copy_pair") == 0) -+ dasd_split_copy_pair(s); -+ } -+ -+ return st->super->configure_persistent(st, dev); -+} -+ -+/* -+ * For active configurations one value per values[] entry is required to -+ * correctly operate the sysfs attribute. -+ * -+ * In case of removal the string "clear" has to be written to the -+ * value and values[] entry. -+ */ -+static exit_code_t dasd_st_configure_active(struct subtype *st, -+ struct device *dev) -+{ -+ struct setting *s; -+ -+ util_list_iterate(&dev->active.settings->list, s) { -+ if (strcmp(s->name, "copy_pair") != 0) -+ continue; -+ -+ if (s->removed) -+ dasd_clear_copy_pair(s); -+ else -+ dasd_split_copy_pair(s); -+ } -+ -+ return st->super->configure_active(st, dev); -+} -+ - /* - * DASD device sub-types. - */ -@@ -634,10 +724,13 @@ struct subtype dasd_subtype_eckd = { - &dasd_attr_last_known_reservation_state, - &dasd_attr_safe_offline, - &dasd_attr_fc_security, -+ &dasd_attr_copy_pair, - &internal_attr_early, - ), - .unknown_dev_attribs = 1, - -+ .configure_active = &dasd_st_configure_active, -+ .configure_persistent = &dasd_st_configure_persistent, - .check_pre_configure = &dasd_st_check_pre_configure, - .add_modules = &dasd_st_add_modules, - }; --- -2.38.1 - - -From 4e28047eb4cacc7b7208018a8c095102517517e8 Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Thu, 10 Nov 2022 16:11:09 +0100 -Subject: [PATCH 5/7] tunedasd: move tunedasd ioctls to libdasd -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Move all DASD IOCTLs to libdasd and adapt all affected -users accordingly. - -Signed-off-by: Stefan Haberland -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Höppner ---- - include/lib/dasd_base.h | 73 +++++++++++ - libdasd/dasd_ioctl.c | 129 +++++++++++++++++++ - tunedasd/src/disk.c | 268 ++++++++-------------------------------- - 3 files changed, 252 insertions(+), 218 deletions(-) - -diff --git a/include/lib/dasd_base.h b/include/lib/dasd_base.h -index b12e1f9..11ec94b 100644 ---- a/include/lib/dasd_base.h -+++ b/include/lib/dasd_base.h -@@ -187,6 +187,61 @@ typedef struct format_check_t { - #define DASD_FMT_ERR_RECORD_ID 4 - #define DASD_FMT_ERR_KEY_LENGTH 5 - -+/* -+ * struct profile_info_t -+ * holds the profiling information -+ */ -+typedef struct dasd_profile_info_t { -+ unsigned int dasd_io_reqs; /* # of requests processed at all */ -+ unsigned int dasd_io_sects; /* # of sectors processed at all */ -+ unsigned int dasd_io_secs[32]; /* request's sizes */ -+ unsigned int dasd_io_times[32]; /* requests's times */ -+ unsigned int dasd_io_timps[32]; /* requests's times per sector */ -+ unsigned int dasd_io_time1[32]; /* time from build to start */ -+ unsigned int dasd_io_time2[32]; /* time from start to irq */ -+ unsigned int dasd_io_time2ps[32]; /* time from start to irq */ -+ unsigned int dasd_io_time3[32]; /* time from irq to end */ -+ unsigned int dasd_io_nr_req[32]; /* # of requests in chanq */ -+} dasd_profile_info_t; -+ -+/* -+ * struct attrib_data_t -+ * represents the operation (cache) bits for the device. -+ * Used in DE to influence caching of the DASD. -+ */ -+typedef struct attrib_data_t { -+ unsigned char operation : 3; /* cache operation mode */ -+ unsigned char reserved : 5; -+ unsigned short nr_cyl; /* no of cyliners for read ahaed */ -+ unsigned char reserved2[29]; /* for future use */ -+} __attribute__((packed)) attrib_data_t; -+ -+/* definition of operation (cache) bits within attributes of DE */ -+#define DASD_NORMAL_CACHE 0x0 -+#define DASD_BYPASS_CACHE 0x1 -+#define DASD_INHIBIT_LOAD 0x2 -+#define DASD_SEQ_ACCESS 0x3 -+#define DASD_SEQ_PRESTAGE 0x4 -+#define DASD_REC_ACCESS 0x5 -+ -+/* -+ * Data returned by Sense Path Group ID (SNID) -+ */ -+struct dasd_snid_data { -+ struct { -+ __u8 group : 2; -+ __u8 reserve : 2; -+ __u8 mode : 1; -+ __u8 res : 3; -+ } __attribute__((packed)) path_state; -+ __u8 pgid[11]; -+} __attribute__((packed)); -+ -+struct dasd_snid_ioctl_data { -+ struct dasd_snid_data data; -+ __u8 path_mask; -+} __attribute__((packed)); -+ - #ifndef __linux__ - /* definition from hdreg.h */ - struct hd_geometry { -@@ -207,12 +262,24 @@ struct hd_geometry { - #define BIODASDRSRV _IO(DASD_IOCTL_LETTER, 2) - /* Release the device for the current LPAR */ - #define BIODASDRLSE _IO(DASD_IOCTL_LETTER, 3) -+/* Unconditional reserve the device for the current LPAR */ -+#define BIODASDSLCK _IO(DASD_IOCTL_LETTER, 4) -+/* reset profiling information of a device */ -+#define BIODASDPRRST _IO(DASD_IOCTL_LETTER, 5) -+/* retrieve profiling information of a device */ -+#define BIODASDPRRD _IOR(DASD_IOCTL_LETTER, 2, dasd_profile_info_t) - /* Get information on a dasd device (enhanced) */ - #define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER, 3, dasd_information2_t) -+/* Get Attributes (cache operations) */ -+#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER, 5, attrib_data_t) - /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */ - #define BIODASDFMT _IOW(DASD_IOCTL_LETTER, 1, format_data_t) -+/* Set Attributes (cache operations) */ -+#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER, 2, attrib_data_t) - /* Release Allocated Space */ - #define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t) -+/* Get Sense Path Group ID (SNID) data */ -+#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data) - /* Check device format according to format_data_t */ - #define BIODASDCHECKFMT _IOWR(DASD_IOCTL_LETTER, 2, format_check_t) - -@@ -245,5 +312,11 @@ int dasd_is_ro(const char *device, bool *ro); - int dasd_reread_partition_table(const char *device, int ntries); - int dasd_disk_reserve(const char *device); - int dasd_disk_release(const char *device); -+int dasd_slock(const char *device); -+int dasd_get_cache(const char *device, attrib_data_t *attrib_data); -+int dasd_set_cache(const char *device, attrib_data_t *attrib_data); -+int dasd_query_reserve(const char *device); -+int dasd_profile(const char *device, dasd_profile_info_t *dasd_profile_info); -+int dasd_reset_profile(const char *device); - - #endif /* LIB_DASD_BASE_H */ -diff --git a/libdasd/dasd_ioctl.c b/libdasd/dasd_ioctl.c -index f954961..40e726c 100644 ---- a/libdasd/dasd_ioctl.c -+++ b/libdasd/dasd_ioctl.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include "lib/dasd_base.h" - -@@ -321,3 +322,131 @@ int dasd_disk_release(const char *device) - - return 0; - } -+ -+/* -+ * Unconditionally reserve DASD disk -+ * -+ * An existing reserve lock is lifted (steal lock) and the device -+ * is reserved. -+ * -+ * @param[in] device node device node's name -+ * -+ * @retval 0 in case of success -+ * @retval errno in case of failure -+ */ -+int dasd_slock(const char *device) -+{ -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDSLCK, NULL); -+ dasd_close_device(fd); -+ -+ return 0; -+} -+ -+/* -+ * Get the caching algorithm used for the channel programs of this device. -+ * -+ * @param[in] device node device node's name -+ * @param[out] attrib_data pointer to dasd attrib data with: -+ * 'cache' is the caching mode -+ * 'no_cyl' the number of cylinders to be cached. -+ * -+ * @retval 0 in case of success -+ * @retval errno in case of failure -+ */ -+int dasd_get_cache(const char *device, attrib_data_t *attrib_data) -+{ -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDGATTR, attrib_data); -+ dasd_close_device(fd); -+ -+ return 0; -+} -+ -+/* -+ * Set the caching algorithm used for the channel programs of this device. -+ * -+ * @param[in] device node device node's name -+ * @param[in] attrib_data pointer to dasd attrib data with: -+ * 'cache' is the caching mode -+ * 'no_cyl' the number of cylinders to be cached. -+ * -+ * @retval 0 in case of success -+ * @retval errno in case of failure -+ */ -+int dasd_set_cache(const char *device, attrib_data_t *attrib_data) -+{ -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDSATTR, attrib_data); -+ dasd_close_device(fd); -+ -+ return 0; -+} -+ -+/* -+ * Get reserve status of device. -+ * -+ * @param[in] device node device node's name -+ * -+ * @retval errno in case of failure -+ * @retval 0 unreserved -+ * @retval 1 implicit reserved -+ * @retval 2 other reservation -+ * @retval 3 reserved -+ */ -+int dasd_query_reserve(const char *device) -+{ -+ struct dasd_snid_ioctl_data snid = { 0 }; -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDSNID, &snid); -+ dasd_close_device(fd); -+ -+ return snid.data.path_state.reserve; -+} -+ -+/* -+ * Get and print the profiling info of the device. -+ * -+ * @param[in] device node device node's name -+ * @param[in] dasd_profile_info pointer to dasd profile info -+ * -+ * @retval 0 in case of success -+ * @retval errno in case of failure -+ */ -+int dasd_profile(const char *device, dasd_profile_info_t *dasd_profile_info) -+{ -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDPRRD, dasd_profile_info); -+ dasd_close_device(fd); -+ -+ return 0; -+} -+ -+/* -+ * Reset the profiling counters of the device. -+ * -+ * @param[in] device node device node's name -+ * -+ * @retval 0 in case of success -+ * @retval errno in case of failure -+ */ -+int dasd_reset_profile(const char *device) -+{ -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDPRRST, NULL); -+ dasd_close_device(fd); -+ -+ return 0; -+} -diff --git a/tunedasd/src/disk.c b/tunedasd/src/disk.c -index f240651..1e8de16 100644 ---- a/tunedasd/src/disk.c -+++ b/tunedasd/src/disk.c -@@ -19,6 +19,7 @@ - #include - #include - -+#include "lib/dasd_base.h" - #include "lib/dasd_sys.h" - - #include "disk.h" -@@ -26,91 +27,6 @@ - - #define BUS_ID_SIZE 30 - --/* -- * DASD DEFINITIONS (copied from dasd.h) -- */ -- --#define DASD_IOCTL_LETTER 'D' -- --/* -- * struct profile_info_t -- * holds the profiling information -- */ --typedef struct dasd_profile_info_t { -- unsigned int dasd_io_reqs; /* # of requests processed at all */ -- unsigned int dasd_io_sects; /* # of sectors processed at all */ -- unsigned int dasd_io_secs[32]; /* request's sizes */ -- unsigned int dasd_io_times[32]; /* requests's times */ -- unsigned int dasd_io_timps[32]; /* requests's times per sector */ -- unsigned int dasd_io_time1[32]; /* time from build to start */ -- unsigned int dasd_io_time2[32]; /* time from start to irq */ -- unsigned int dasd_io_time2ps[32]; /*time from start to irq */ -- unsigned int dasd_io_time3[32]; /* time from irq to end */ -- unsigned int dasd_io_nr_req[32]; /* # of requests in chanq */ --} dasd_profile_info_t; -- -- --/* -- * struct attrib_data_t -- * represents the operation (cache) bits for the device. -- * Used in DE to influence caching of the DASD. -- */ --typedef struct attrib_data_t { -- unsigned char operation:3; /* cache operation mode */ -- unsigned char reserved:5; -- unsigned short nr_cyl; /* no of cyliners for read ahaed */ -- unsigned char reserved2[29]; /* for future use */ --} __attribute__ ((packed)) attrib_data_t; -- --/* definition of operation (cache) bits within attributes of DE */ --#define DASD_NORMAL_CACHE 0x0 --#define DASD_BYPASS_CACHE 0x1 --#define DASD_INHIBIT_LOAD 0x2 --#define DASD_SEQ_ACCESS 0x3 --#define DASD_SEQ_PRESTAGE 0x4 --#define DASD_REC_ACCESS 0x5 -- --/* -- * Data returned by Sense Path Group ID (SNID) -- */ --struct dasd_snid_data { -- struct { -- __u8 group:2; -- __u8 reserve:2; -- __u8 mode:1; -- __u8 res:3; -- } __attribute__ ((packed)) path_state; -- __u8 pgid[11]; --} __attribute__ ((packed)); -- --struct dasd_snid_ioctl_data { -- struct dasd_snid_data data; -- __u8 path_mask; --} __attribute__ ((packed)); -- -- --/* -- * DASD-IOCTLs (copied from dasd.h) -- */ --/* Issue a reserve/release command, rsp. */ --#define BIODASDRSRV _IO (DASD_IOCTL_LETTER,2) /* reserve */ --#define BIODASDRLSE _IO (DASD_IOCTL_LETTER,3) /* release */ --#define BIODASDSLCK _IO (DASD_IOCTL_LETTER,4) /* steal lock */ --/* reset profiling information of a device */ --#define BIODASDPRRST _IO (DASD_IOCTL_LETTER,5) -- --/* retrieve profiling information of a device */ --#define BIODASDPRRD _IOR (DASD_IOCTL_LETTER,2,dasd_profile_info_t) --/* Get Attributes (cache operations) */ --#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) -- --/* Set Attributes (cache operations) */ --#define BIODASDSATTR _IOW (DASD_IOCTL_LETTER,2,attrib_data_t) -- --/* Get Sense Path Group ID (SNID) data */ --#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data) -- -- - /* id definition for profile items */ - enum prof_id { - prof_reqs = 0, -@@ -241,48 +157,33 @@ check_prof_item (char* prof_item) - * 'cache' is the caching mode (see ESS docu for more info) and 'no_cyl' - * the number of cylinders to be cached. - */ --int --disk_get_cache (char* device) -+int disk_get_cache(char *device) - { -- int fd; - attrib_data_t attrib_data; -- -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -+ int rc; - -- /* Get the given caching attributes */ -- if (ioctl (fd, BIODASDGATTR, &attrib_data)) { -- error_print ("Could not get cache attributes for device <%s>", -- device); -- close (fd); -- return -1; -- } -+ rc = dasd_get_cache(device, &attrib_data); -+ if (rc) -+ return rc; - - printf ("%s (%i cyl)\n", - get_cache_name(attrib_data.operation), - attrib_data.nr_cyl); - -- close (fd); - return 0; - } - -- - /* - * Set the caching algorithm used for the channel programs of this device. - * 'cache' is the caching mode (see ESS docu for more info) and 'no_cyl' - * the number of cylinders to be cached. - */ --int --disk_set_cache (char* device, char* cache, char* no_cyl) -+int disk_set_cache(char *device, char *cache, char *no_cyl) - { -- int fd; - attrib_data_t attrib_data; -- -- /* get caching mode and # cylinders */ -+ int rc; -+ -+ /* get caching mode and # cylinders */ - attrib_data.operation = check_cache (cache); - attrib_data.nr_cyl = check_no_cyl (no_cyl); - -@@ -292,52 +193,34 @@ disk_set_cache (char* device, char* cache, char* no_cyl) - attrib_data.nr_cyl); - } - -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -- - /* Set the given caching attributes */ - printf ("Setting cache mode for device <%s>...\n", device); -- if (ioctl (fd, BIODASDSATTR, &attrib_data)) { -- error_print ("Could not set caching for device <%s>", device); -- close (fd); -+ rc = dasd_set_cache(device, &attrib_data); -+ if (rc) { -+ error_print("Could not set caching for device <%s>", device); - return -1; - } -- - printf ("Done.\n"); -- close (fd); -+ - return 0; - } - -- - /* - * Reserve the device. - */ --int --disk_reserve (char* device) -+int disk_reserve(char *device) - { -- int fd; -- -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -+ int rc; - - /* Reserve device */ - printf ("Reserving device <%s>...\n", device); -- if (ioctl (fd, BIODASDRSRV)) { -- error_print ("Could not reserve device <%s>", device); -- close (fd); -+ rc = dasd_disk_reserve(device); -+ if (rc) { -+ error_print("Could not reserve device <%s>", device); - return -1; - } - -- printf ("Done.\n"); -- close (fd); -+ printf("Done.\n"); - return 0; - } - -@@ -345,28 +228,18 @@ disk_reserve (char* device) - /* - * Release the device. - */ --int --disk_release (char* device) -+int disk_release(char *device) - { -- int fd; -- -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -+ int rc; - -- /* Release device */ - printf ("Releasing device <%s>...\n", device); -- if (ioctl (fd, BIODASDRLSE)) { -- error_print ("Could not release device <%s>", device); -- close (fd); -+ rc = dasd_disk_release(device); -+ if (rc) { -+ error_print("Could not release device <%s>", device); - return -1; - } - -- printf ("Done.\n"); -- close (fd); -+ printf("Done.\n"); - return 0; - } - -@@ -376,29 +249,19 @@ disk_release (char* device) - * This means to reserve the device even if it was already reserved. - * The current reserve is broken (steal lock). - */ --int --disk_slock (char* device) -+int disk_slock(char *device) - { -- int fd; -- -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -+ int rc; - - /* Unconditional reserve device */ - printf ("Unconditional reserving device <%s>...\n", device); -- if (ioctl (fd, BIODASDSLCK)) { -- error_print ("Could not unconditional reserve device <%s>", -- device); -- close (fd); -+ rc = dasd_slock(device); -+ if (rc) { -+ error_print("Could not unconditional reserve device <%s>", device); - return -1; - } -- - printf ("Done.\n"); -- close (fd); -+ - return 0; - } - -@@ -407,27 +270,16 @@ disk_slock (char* device) - * Uses the Sense Path Group ID (SNID) ioctl to find out if - * a device is reserved to it's path group. - */ --int --disk_query_reserve_status(char* device) -+int disk_query_reserve_status(char *device) - { -- int fd; -- struct dasd_snid_ioctl_data snid; -+ int rc; - -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -+ rc = dasd_query_reserve(device); -+ if (rc < 0) { -+ error_print("Could not read reserve status for device <%s>", device); - return -1; - } -- snid.path_mask = 0; -- /* Release device */ -- if (ioctl(fd, BIODASDSNID, &snid)) { -- error_print("Could not read reserve status" -- " for device <%s>", device); -- close (fd); -- return -1; -- } -- switch (snid.data.path_state.reserve) { -+ switch (rc) { - case 0: - printf("none\n"); - break; -@@ -441,7 +293,7 @@ disk_query_reserve_status(char* device) - printf("reserved\n"); - break; - } -- close (fd); -+ - return 0; - } - -@@ -615,21 +467,14 @@ static int disk_profile_item(dasd_profile_info_t dasd_profile_info, - /* - * Get and print the profiling info of the device. - */ --int --disk_profile (char* device, char* prof_item) -+int disk_profile(char *device, char *prof_item) - { -- int fd, rc; - dasd_profile_info_t dasd_profile_info; -- -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -+ int rc; - - /* Get the profile info */ -- if (ioctl (fd, BIODASDPRRD, &dasd_profile_info)) { -+ rc = dasd_profile(device, &dasd_profile_info); -+ if (rc) { - switch (errno) { - case EIO: /* profiling is not active */ - error_print ("Profiling (on device <%s>) is not " -@@ -639,7 +484,6 @@ disk_profile (char* device, char* prof_item) - error_print ("Could not get profile info for device " - "<%s>.", device); - } -- close (fd); - return -1; - } - /* Check for profile item or summary */ -@@ -648,38 +492,26 @@ disk_profile (char* device, char* prof_item) - } else { - rc = disk_profile_item (dasd_profile_info, prof_item); - } -- -- close (fd); -+ - return rc; - } - -- - /* - * Reset the profiling counters of the device. - */ --int --disk_reset_prof (char* device) -+int disk_reset_prof(char *device) - { -- int fd; -- -- /* Open device file */ -- fd = open (device, O_RDONLY); -- if (fd == -1) { -- error_print ("<%s> - %s", device, strerror (errno)); -- return -1; -- } -+ int rc; - - /* reset profile info */ - printf ("Resetting profile info for device <%s>...\n", device); -- if (ioctl (fd, BIODASDPRRST)) { -- error_print ("Could not reset profile info for device <%s>", -- device); -- close (fd); -+ rc = dasd_reset_profile(device); -+ if (rc) { -+ error_print("Could not reset profile info for device <%s>", device); - return -1; - } -- - printf ("Done.\n"); -- close (fd); -+ - return 0; - } - --- -2.38.1 - - -From 3aa7f6e29871c06537ab95bf2a14b5eb3ca6e847 Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Thu, 27 Oct 2022 15:51:00 +0200 -Subject: [PATCH 6/7] libdasd: fix ioctl macro to return also positive return - codes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In case of an error the ioctl macro only returns errno to the calling -function. -This misses positive returncodes from ioctls. -Change the macro to also return positive return codes. - -Signed-off-by: Stefan Haberland -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Höppner ---- - libdasd/dasd_ioctl.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/libdasd/dasd_ioctl.c b/libdasd/dasd_ioctl.c -index 40e726c..3a36375 100644 ---- a/libdasd/dasd_ioctl.c -+++ b/libdasd/dasd_ioctl.c -@@ -28,11 +28,13 @@ - - #define RUN_IOCTL(fd, req, argp) \ - do { \ -- if (ioctl(fd, req, argp) != 0) { \ -- int err = errno; \ -- if (err != EBADF) \ -+ int rc = ioctl(fd, req, argp); \ -+ if (rc != 0) { \ -+ if (rc == -1) \ -+ rc = errno; \ -+ if (rc != EBADF) \ - dasd_close_device(fd); \ -- return err; \ -+ return rc; \ - } \ - } while (0) - --- -2.38.1 - - -From 3f12bdf4c728caeaeaa64158efb26f917d905b08 Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Fri, 11 Nov 2022 13:17:32 +0100 -Subject: [PATCH 7/7] tunedasd: add copy_pair swap capability -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add an option to tunedasd to trigger a copy pair swap using the appropriate -ioctl for DASD devices. - - -s, --copy-pair-swap COPY_PAIR - -This command requires a comma separated pair of primary,secondary to be -specified. In case of success the old secondary will become the new primary -device and the old primary will become a secondary device. - -Example: - -tunedasd /dev/dasda -s 0.0.9700,0.0.9740 - -This will set the old secondary device 0.0.9740 as the new primary. -The old primary device 0.0.9700 will automatically become a secondary -device. - -Signed-off-by: Stefan Haberland -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Höppner ---- - include/lib/dasd_base.h | 14 ++++++++-- - libdasd/dasd_ioctl.c | 28 ++++++++++++++++++++ - tunedasd/include/disk.h | 1 + - tunedasd/man/tunedasd.8 | 14 ++++++++++ - tunedasd/src/disk.c | 50 ++++++++++++++++++++++++++++++++++-- - tunedasd/src/tunedasd.c | 57 +++++++++++++++++++++++++---------------- - 6 files changed, 138 insertions(+), 26 deletions(-) - -diff --git a/include/lib/dasd_base.h b/include/lib/dasd_base.h -index 11ec94b..400e374 100644 ---- a/include/lib/dasd_base.h -+++ b/include/lib/dasd_base.h -@@ -20,8 +20,8 @@ - #include - #include - --/* A bus id of a DASD is 8 characters long. E.g. 0.0.4711 */ --#define DASD_BUS_ID_SIZE 9 -+/* the definition of a BUSID in the DASD driver is 20 */ -+#define DASD_BUS_ID_SIZE 20 - - typedef struct dasd_information2_t { - unsigned int devno; /* S/390 devno */ -@@ -242,6 +242,13 @@ struct dasd_snid_ioctl_data { - __u8 path_mask; - } __attribute__((packed)); - -+struct dasd_copypair_swap_data { -+ char primary[DASD_BUS_ID_SIZE]; /* BUSID of primary */ -+ char secondary[DASD_BUS_ID_SIZE]; /* BUSID of secondary */ -+ /* Reserved for future updates. */ -+ char reserved[64]; -+}; -+ - #ifndef __linux__ - /* definition from hdreg.h */ - struct hd_geometry { -@@ -278,6 +285,8 @@ struct hd_geometry { - #define BIODASDSATTR _IOW(DASD_IOCTL_LETTER, 2, attrib_data_t) - /* Release Allocated Space */ - #define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t) -+/* Swap copy pair */ -+#define BIODASDPPRCSWAP _IOW(DASD_IOCTL_LETTER, 4, struct dasd_copypair_swap_data) - /* Get Sense Path Group ID (SNID) data */ - #define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data) - /* Check device format according to format_data_t */ -@@ -318,5 +327,6 @@ int dasd_set_cache(const char *device, attrib_data_t *attrib_data); - int dasd_query_reserve(const char *device); - int dasd_profile(const char *device, dasd_profile_info_t *dasd_profile_info); - int dasd_reset_profile(const char *device); -+int dasd_copy_swap(const char *device, struct dasd_copypair_swap_data *data); - - #endif /* LIB_DASD_BASE_H */ -diff --git a/libdasd/dasd_ioctl.c b/libdasd/dasd_ioctl.c -index 3a36375..f684761 100644 ---- a/libdasd/dasd_ioctl.c -+++ b/libdasd/dasd_ioctl.c -@@ -452,3 +452,31 @@ int dasd_reset_profile(const char *device) - - return 0; - } -+ -+/* -+ * Initiate the swap of a copy pairs primary,secondary relation. -+ * The old secondary will become the new primary and vice versa. -+ * -+ * @param[in] device node device node's name -+ * @param[in] copy_pair data pointer to dasd copypair data with: -+ * 'primary' old primary, becoming secondary -+ * 'secondary' old secondary, becoming primary. -+ * -+ * @retval errno in case of failure -+ * @retval 0 in case of success -+ * @retval 1 swap data invalid -+ * @retval 2 no active device found -+ * @retval 3 wrong primary specified -+ * @retval 4 secondary device not found -+ * @retval 5 swap already running -+ */ -+int dasd_copy_swap(const char *device, struct dasd_copypair_swap_data *data) -+{ -+ int fd; -+ -+ fd = dasd_open_device(device, O_RDONLY); -+ RUN_IOCTL(fd, BIODASDPPRCSWAP, data); -+ dasd_close_device(fd); -+ -+ return 0; -+} -diff --git a/tunedasd/include/disk.h b/tunedasd/include/disk.h -index ea35f6f..55a32d0 100644 ---- a/tunedasd/include/disk.h -+++ b/tunedasd/include/disk.h -@@ -31,6 +31,7 @@ int disk_query_reserve_status(char* device); - int disk_profile (char* device, char* prof_item); - int disk_reset_prof(char *device); - int disk_reset_chpid(char *device, char *chpid); -+int disk_copy_swap(char *device, char *copy_pair); - - #endif /* not DISK_H */ - -diff --git a/tunedasd/man/tunedasd.8 b/tunedasd/man/tunedasd.8 -index 94c3608..ae41b97 100644 ---- a/tunedasd/man/tunedasd.8 -+++ b/tunedasd/man/tunedasd.8 -@@ -174,6 +174,14 @@ Reset all channel paths of the selected device. The channel paths - might be suspended due to high IFCC error rates or a High Performance - FICON failure. Use this option to resume considering all defined - channel paths for I/O. -+.TP -+.BR "\-s" " or " "\-\-copy\-pair\-swap " -+Swap the copy roles of the specified copy pair. The has to -+be a comma separated pair of \fBPRIMARY,SECONDARY\fR where -+\fBPRIMARY\fR is the old primary device that will become a secondary -+automatically. The old \fBSECONDARY\fR device will become the new -+primary device. Both devices have to be online for this operation to -+succeed. - .\" - .\".TP - .\".BR "\-o" " or " "\-\-online" -@@ -197,6 +205,12 @@ channel paths for I/O. - .br - - tunedasd -p 45 /dev/dasdc -+ -+.br -+4. Scenario: Swap copy pair 0.0.9700 and 0.0.9740 -+.br -+ -+ tunedasd -s 0.0.9700,0.0.9740 /dev/dasdc - .br - .SH "SEE ALSO" - .BR dasdview (8), -diff --git a/tunedasd/src/disk.c b/tunedasd/src/disk.c -index 1e8de16..490c1c5 100644 ---- a/tunedasd/src/disk.c -+++ b/tunedasd/src/disk.c -@@ -21,12 +21,11 @@ - - #include "lib/dasd_base.h" - #include "lib/dasd_sys.h" -+#include "lib/util_libc.h" - - #include "disk.h" - #include "tunedasd.h" - --#define BUS_ID_SIZE 30 -- - /* id definition for profile items */ - enum prof_id { - prof_reqs = 0, -@@ -549,3 +548,50 @@ int disk_reset_chpid(char *device, char *chpid) - - return -1; - } -+ -+int disk_copy_swap(char *device, char *copy_pair) -+{ -+ struct dasd_copypair_swap_data data = { 0 }; -+ char *primary, *secondary; -+ int rc = 0; -+ -+ primary = strtok(copy_pair, ","); -+ secondary = strtok(NULL, ","); -+ -+ if (!primary || !secondary) { -+ error_print("%s: Error parsing Copy Pair %s", device, copy_pair); -+ return -1; -+ } -+ -+ util_strlcpy(data.primary, primary, DASD_BUS_ID_SIZE); -+ util_strlcpy(data.secondary, secondary, DASD_BUS_ID_SIZE); -+ -+ printf("Swapping copy pair %s %s on device <%s>...\n", primary, secondary, device); -+ rc = dasd_copy_swap(device, &data); -+ -+ switch (rc) { -+ case 0: -+ printf("Done.\n"); -+ return 0; -+ case 1: -+ error_print("Swap data invalid"); -+ break; -+ case 2: -+ error_print("No active device found"); -+ break; -+ case 3: -+ error_print("Wrong primary device specified"); -+ break; -+ case 4: -+ error_print("Secondary device not found"); -+ break; -+ case 5: -+ error_print("Swap already running"); -+ break; -+ default: -+ error_print("Swap not successful rc %d", rc); -+ break; -+ } -+ -+ return -1; -+} -diff --git a/tunedasd/src/tunedasd.c b/tunedasd/src/tunedasd.c -index 3c14eb8..691841c 100644 ---- a/tunedasd/src/tunedasd.c -+++ b/tunedasd/src/tunedasd.c -@@ -119,12 +119,17 @@ static struct util_opt opt_vec[] = { - .desc = "Reset all channel paths of a device", - .flags = UTIL_OPT_FLAG_NOSHORT, - }, -+ { -+ .option = { "copy-pair-swap", required_argument, NULL, 's' }, -+ .argument = "COPY_PAIR", -+ .desc = "Swap a specified, comma separated copy pair.", -+ }, - UTIL_OPT_HELP, - UTIL_OPT_VERSION, - UTIL_OPT_END - }; - --#define CMD_KEYWORD_NUM 16 -+#define CMD_KEYWORD_NUM 17 - #define DEVICES_NUM 256 - - enum cmd_keyword_id { -@@ -144,6 +149,7 @@ enum cmd_keyword_id { - cmd_keyword_path_all, - cmd_keyword_enable_stats, - cmd_keyword_disable_stats, -+ cmd_keyword_copy_swap, - }; - - -@@ -167,7 +173,8 @@ static const struct { - { "path_reset", cmd_keyword_path }, - { "path_reset_all", cmd_keyword_path_all }, - { "enable-stats", cmd_keyword_enable_stats }, -- { "disable-stats", cmd_keyword_disable_stats } -+ { "disable-stats", cmd_keyword_disable_stats }, -+ { "copy-swap", cmd_keyword_copy_swap }, - }; - - -@@ -180,26 +187,27 @@ enum cmd_key_state { - - /* Determines which combination of keywords are valid */ - static enum cmd_key_state cmd_key_table[CMD_KEYWORD_NUM][CMD_KEYWORD_NUM] = { -- /* help vers get_ cach no_c rese rele sloc prof prof rese quer path path -- * ion cach e yl rve ase k ile _ite t_pr y_re _all -- * e m of serv -+ /* help vers get_ cach no_c rese rele sloc prof prof rese quer path path enab disa copy -+ * ion cach e yl rve ase k ile _ite t_pr y_re _all le-s ble- -swa -+ * e m of serv tats stat p - */ -- /* help */ { req, opt, opt, opt, opt, opt, opt, opt, opt, opt, opt, inv, inv, inv, inv, inv }, -- /* version */ { inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* get_cache */ { opt, opt, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* cache */ { opt, opt, inv, req, opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* no_cyl */ { opt, opt, inv, req, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* reserve */ { opt, opt, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* release */ { opt, opt, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* slock */ { opt, opt, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv }, -- /* profile */ { opt, opt, inv, inv, inv, inv, inv, inv, req, opt, inv, inv, inv, inv, inv, inv }, -- /* prof_item */ { opt, opt, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv, inv, inv }, -- /* reset_prof */ { opt, opt, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv }, -- /* query_reserve */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv }, -- /* path */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv }, -- /* path_all */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv }, -- /* enable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv }, -- /* disable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req }, -+ /* help */ { req, opt, opt, opt, opt, opt, opt, opt, opt, opt, opt, inv, inv, inv, inv, inv, inv }, -+ /* version */ { inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* get_cache */ { opt, opt, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* cache */ { opt, opt, inv, req, opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* no_cyl */ { opt, opt, inv, req, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* reserve */ { opt, opt, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* release */ { opt, opt, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* slock */ { opt, opt, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv }, -+ /* profile */ { opt, opt, inv, inv, inv, inv, inv, inv, req, opt, inv, inv, inv, inv, inv, inv, inv }, -+ /* prof_item */ { opt, opt, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv, inv, inv, inv }, -+ /* reset_prof */ { opt, opt, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv, inv }, -+ /* query_reserve */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv, inv }, -+ /* path */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv, inv }, -+ /* path_all */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, inv }, -+ /* enable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv, inv }, -+ /* disable-stats */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req, inv }, -+ /* copy-swap */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req }, - }; - - struct parameter { -@@ -439,7 +447,9 @@ static int get_command_line(int argc, char *argv[], struct command_line *line) - rc = store_option (&cmdline, cmd_keyword_query_reserve, - optarg); - break; -- -+ case 's': -+ rc = store_option(&cmdline, cmd_keyword_copy_swap, optarg); -+ break; - case -1: - /* End of options string - start of devices list */ - cmdline.device_id = optind; -@@ -508,6 +518,9 @@ static int do_command(char *device, struct command_line cmdline) - case cmd_keyword_path_all: - rc = disk_reset_chpid(device, NULL); - break; -+ case cmd_keyword_copy_swap: -+ rc = disk_copy_swap(device, cmdline.parm[cmd_keyword_copy_swap].data); -+ break; - default: - error_print ("Unknown command '%s' specified", - get_keyword_name (i)); --- -2.38.1 - diff --git a/s390utils-2.25.0-fedora.patch b/s390utils-2.25.0-fedora.patch new file mode 100644 index 0000000..e69de29 diff --git a/s390utils.spec b/s390utils.spec index 9ea9a6d..49a054f 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,8 +9,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.24.0 -Release: 2%{?dist} +Version: 2.25.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -38,7 +38,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%{version}-fedora.patch +#Patch100: s390utils-%%{version}-fedora.patch Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} @@ -67,7 +67,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch1 -p1 -b .blscfg-rpm-nvr-sort # upstream fixes/updates -%patch100 -p1 +#%%patch100 -p1 # drop -Werror from genprotimg to allow building with GCC 12 sed -i.bak -e 's/-Werror//g' genprotimg/src/Makefile genprotimg/boot/Makefile @@ -486,6 +486,11 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf %{_sysconfdir}/mdevctl.d/* /usr/lib/dracut/modules.d/99ngdump/ +# own the mdevctl dirs until new release is available +%dir /usr/lib/mdevctl +%dir /usr/lib/mdevctl/scripts.d +%dir /usr/lib/mdevctl/scripts.d/callouts +/usr/lib/mdevctl/scripts.d/callouts/ap-check /lib/s390-tools/dumpconf /lib/s390-tools/lsznet.raw %dir /lib/s390-tools/zfcpdump @@ -902,6 +907,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Dec 09 2022 Dan Horák - 2:2.25.0-1 +- rebased to 2.25.0 + * Tue Nov 22 2022 Dan Horák - 2:2.24.0-2 - update for Transparent DASD PPRC (Peer-to-Peer Remote Copy) handling diff --git a/sources b/sources index 0c54d2e..4fb12d4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.24.0.tar.gz) = 5c681a031c2bab0ab167623ad08da67bfd236e4892f8a5de813ebfbbc1c60a842f0954bcbca6d2f6ab125ee089b2b5dcbfbb24152bcdde3401810232e21460f4 +SHA512 (s390-tools-2.25.0.tar.gz) = 1c766a4bd19c957596c741a80141712acf150591c0ff1a47caf1aa8a17f7153c1441560f05aef78bb3f05bd35c1fef431569cabd7e7d6b003bd74beedb7213d9 From 77693cd7eb3309e9ab592f886b7bafdaa0622664 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Tue, 17 Jan 2023 11:33:21 -0500 Subject: [PATCH 076/141] Generate /etc/kernel/cmdline if it does not exist Don't fall back to reading /proc/cmdline: that will likely reflect the installer environment which will result in a non-booting kernel entry. See-also: rhbz#1940288 Signed-off-by: Robbie Harwood --- 20-zipl-kernel.install | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 4fadd1d..a592380 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -76,16 +76,24 @@ case "$COMMAND" in if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then declare -a BOOT_OPTIONS + if [[ ! -f /etc/kernel/cmdline ]]; then + last='' + for entry in "${BLS_DIR}"/*.conf; do + last="$entry" + done + if [[ ! -z "$last" ]]; then + args="$(awk '/options/{$1="";$0=$0;$1=$1;print}' $last)" + echo "$args" > /etc/kernel/cmdline + fi + fi if [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline fi if ! [[ ${BOOT_OPTIONS[*]} ]]; then - read -r -d '' -a line < /proc/cmdline - for i in "${line[@]}"; do - [[ "${i#initrd=*}" != "$i" || "${i#BOOT_IMAGE=*}" != "$i" ]] && continue - BOOT_OPTIONS+=("$i") - done + echo "Could not determine the kernel command line parameters." >&2 + echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2 + exit 1 fi [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR" From 685ce32c07b60e1b931e1b9d9bbd46fcd7baa99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 19 Jan 2023 10:00:30 +0100 Subject: [PATCH 077/141] - update kernel install script to write /etc/kernel/cmdline --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 49a054f..2d3296a 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.25.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -907,6 +907,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Jan 19 2023 Dan Horák - 2:2.25.0-2 +- update kernel install script to write /etc/kernel/cmdline + * Fri Dec 09 2022 Dan Horák - 2:2.25.0-1 - rebased to 2.25.0 From 607a6825f4526de310cc84c9b77f0cb10122ffef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 23 Jan 2023 12:16:40 +0000 Subject: [PATCH 078/141] Revert "Generate /etc/kernel/cmdline if it does not exist" This reverts commit 77693cd7eb3309e9ab592f886b7bafdaa0622664. Although it fixes the situation when a new kernel is being installed in a %post script, it breaks the initial kernel installation, because the BLS snippet doesn't exists yet. --- 20-zipl-kernel.install | 18 +++++------------- s390utils.spec | 5 ++++- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index a592380..4fadd1d 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -76,24 +76,16 @@ case "$COMMAND" in if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then declare -a BOOT_OPTIONS - if [[ ! -f /etc/kernel/cmdline ]]; then - last='' - for entry in "${BLS_DIR}"/*.conf; do - last="$entry" - done - if [[ ! -z "$last" ]]; then - args="$(awk '/options/{$1="";$0=$0;$1=$1;print}' $last)" - echo "$args" > /etc/kernel/cmdline - fi - fi if [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline fi if ! [[ ${BOOT_OPTIONS[*]} ]]; then - echo "Could not determine the kernel command line parameters." >&2 - echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2 - exit 1 + read -r -d '' -a line < /proc/cmdline + for i in "${line[@]}"; do + [[ "${i#initrd=*}" != "$i" || "${i#BOOT_IMAGE=*}" != "$i" ]] && continue + BOOT_OPTIONS+=("$i") + done fi [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR" diff --git a/s390utils.spec b/s390utils.spec index 2d3296a..0523b15 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.25.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -907,6 +907,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jan 23 2023 Dan Horák - 2:2.25.0-3 +- revert the kernel install script change + * Thu Jan 19 2023 Dan Horák - 2:2.25.0-2 - update kernel install script to write /etc/kernel/cmdline From 9e98b44d8b9b53c040a8219df970a5a359d0260a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 31 Jan 2023 15:24:52 +0100 Subject: [PATCH 079/141] - add post GA fixes --- s390utils-2.25.0-fedora.patch | 77 +++++++++++++++++++++++++++++++++++ s390utils.spec | 9 ++-- 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/s390utils-2.25.0-fedora.patch b/s390utils-2.25.0-fedora.patch index e69de29..ee35822 100644 --- a/s390utils-2.25.0-fedora.patch +++ b/s390utils-2.25.0-fedora.patch @@ -0,0 +1,77 @@ +From d721eb018973842a432869f6f9efd5752b2e7f19 Mon Sep 17 00:00:00 2001 +From: Marc Hartmayer +Date: Mon, 19 Dec 2022 09:51:51 +0000 +Subject: [PATCH 1/2] zgetdump/Makefile: don't use `.check_dep_zgetdump` as + linker input + +The `.check_dep_zgetdump` file is used to cache the result of the +dependency checks and should not be used as input for linking or +anything else. Let's add it as dependency for the objects file. This +shouldn't cause any problems since the Makefile rule for object files is +defined in `common.mak` as follows: + +%.o: %.c + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/147 +Fixes: 8d8d5e9746a4 ("zdump: Fix Makefile dependencies") +Signed-off-by: Marc Hartmayer +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Hoeppner +--- + zdump/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/zdump/Makefile b/zdump/Makefile +index ca8aadc..934dc47 100644 +--- a/zdump/Makefile ++++ b/zdump/Makefile +@@ -119,7 +119,9 @@ libs = $(rootdir)/libutil/libutil.a $(LIBPV) + + all: $(BUILD_TARGETS) + +-zgetdump: .check_dep_zgetdump $(OBJECTS) $(libs) ++$(OBJECTS): .check_dep_zgetdump ++ ++zgetdump: $(OBJECTS) $(libs) + + skip-zgetdump: + echo " SKIP zgetdump due to unresolved dependencies" +-- +2.39.1 + + +From d9f54f76e2e6f17e0b5bafdc0d09ff0e72edd474 Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Fri, 20 Jan 2023 11:04:18 +0100 +Subject: [PATCH 2/2] zkey: Support EP11 host library version 4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Try to load libep11.so.4 if available, but fallback to older +library versions if not. + +Reviewed-by: Jörg Schmidbauer +Signed-off-by: Ingo Franzki +Signed-off-by: Steffen Eiden +--- + zkey/ep11.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zkey/ep11.c b/zkey/ep11.c +index 58dc3c5..8359929 100644 +--- a/zkey/ep11.c ++++ b/zkey/ep11.c +@@ -35,7 +35,7 @@ + * Definitions for the EP11 library + */ + #define EP11_LIBRARY_NAME "libep11.so" +-#define EP11_LIBRARY_VERSION 3 ++#define EP11_LIBRARY_VERSION 4 + #define EP11_WEB_PAGE "http://www.ibm.com/security/cryptocards" + + /** +-- +2.39.1 + diff --git a/s390utils.spec b/s390utils.spec index 0523b15..065b0da 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.25.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -38,7 +38,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -#Patch100: s390utils-%%{version}-fedora.patch +Patch100: s390utils-%%{version}-fedora.patch Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} @@ -67,7 +67,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch1 -p1 -b .blscfg-rpm-nvr-sort # upstream fixes/updates -#%%patch100 -p1 +%patch100 -p1 # drop -Werror from genprotimg to allow building with GCC 12 sed -i.bak -e 's/-Werror//g' genprotimg/src/Makefile genprotimg/boot/Makefile @@ -907,6 +907,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jan 31 2023 Dan Horák - 2:2.25.0-4 +- add post GA fixes + * Mon Jan 23 2023 Dan Horák - 2:2.25.0-3 - revert the kernel install script change From d6f3723e10b9dd2a1e0047ab32c6874440d1f2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 3 Mar 2023 10:01:46 +0000 Subject: [PATCH 080/141] - rebased to 2.26.0 --- s390-tools-zipl-blscfg-rpm-nvr-sort.patch | 12 +-- s390utils-2.25.0-fedora.patch | 77 --------------- s390utils-2.26.0-fedora.patch | 115 ++++++++++++++++++++++ s390utils.spec | 17 +--- sources | 2 +- 5 files changed, 127 insertions(+), 96 deletions(-) delete mode 100644 s390utils-2.25.0-fedora.patch create mode 100644 s390utils-2.26.0-fedora.patch diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch index 3960de1..366efba 100644 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch @@ -1,4 +1,4 @@ -From a17c57bf2b7b6d64a509cb5fb02fe46849bc550c Mon Sep 17 00:00:00 2001 +From b2daaa34776ba6afec879e362378f6f7563590a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 Jun 2022 17:43:05 +0200 Subject: [PATCH 1/2] Revert "zipl/src: Implement sorting bls entries by @@ -194,10 +194,10 @@ index 0cea1d4..9352f76 100644 return n; -- -2.37.3 +2.39.2 -From 7a51cfc15b870d90bffe1e24a1da922663ffe1d7 Mon Sep 17 00:00:00 2001 +From 692e70bcfc32a05e30146bd7077c41e0eaceff03 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 20 Jun 2022 17:46:59 +0200 Subject: [PATCH 2/2] blscfg: sort like rpm nvr, not like a single version @@ -213,7 +213,7 @@ Signed-off-by: Dan Horák 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/zipl/src/Makefile b/zipl/src/Makefile -index 64eabe4..7043005 100644 +index cab5655..7ec215d 100644 --- a/zipl/src/Makefile +++ b/zipl/src/Makefile @@ -9,6 +9,7 @@ ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) @@ -223,7 +223,7 @@ index 64eabe4..7043005 100644 + -lrpmio -lrpm objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \ - bootmap_header.o envblk.o install.o zipl.o $(rootdir)/zipl/boot/data.o + bootmap_header.o envblk.o install.o zipl.o diff --git a/zipl/src/scan.c b/zipl/src/scan.c index 9352f76..3327e2d 100644 --- a/zipl/src/scan.c @@ -344,5 +344,5 @@ index 9352f76..3327e2d 100644 static int scan_append_section_heading(struct scan_token* scan, int* index, char* name); -- -2.37.3 +2.39.2 diff --git a/s390utils-2.25.0-fedora.patch b/s390utils-2.25.0-fedora.patch deleted file mode 100644 index ee35822..0000000 --- a/s390utils-2.25.0-fedora.patch +++ /dev/null @@ -1,77 +0,0 @@ -From d721eb018973842a432869f6f9efd5752b2e7f19 Mon Sep 17 00:00:00 2001 -From: Marc Hartmayer -Date: Mon, 19 Dec 2022 09:51:51 +0000 -Subject: [PATCH 1/2] zgetdump/Makefile: don't use `.check_dep_zgetdump` as - linker input - -The `.check_dep_zgetdump` file is used to cache the result of the -dependency checks and should not be used as input for linking or -anything else. Let's add it as dependency for the objects file. This -shouldn't cause any problems since the Makefile rule for object files is -defined in `common.mak` as follows: - -%.o: %.c - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ - -Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/147 -Fixes: 8d8d5e9746a4 ("zdump: Fix Makefile dependencies") -Signed-off-by: Marc Hartmayer -Reviewed-by: Jan Hoeppner -Signed-off-by: Jan Hoeppner ---- - zdump/Makefile | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/zdump/Makefile b/zdump/Makefile -index ca8aadc..934dc47 100644 ---- a/zdump/Makefile -+++ b/zdump/Makefile -@@ -119,7 +119,9 @@ libs = $(rootdir)/libutil/libutil.a $(LIBPV) - - all: $(BUILD_TARGETS) - --zgetdump: .check_dep_zgetdump $(OBJECTS) $(libs) -+$(OBJECTS): .check_dep_zgetdump -+ -+zgetdump: $(OBJECTS) $(libs) - - skip-zgetdump: - echo " SKIP zgetdump due to unresolved dependencies" --- -2.39.1 - - -From d9f54f76e2e6f17e0b5bafdc0d09ff0e72edd474 Mon Sep 17 00:00:00 2001 -From: Ingo Franzki -Date: Fri, 20 Jan 2023 11:04:18 +0100 -Subject: [PATCH 2/2] zkey: Support EP11 host library version 4 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Try to load libep11.so.4 if available, but fallback to older -library versions if not. - -Reviewed-by: Jörg Schmidbauer -Signed-off-by: Ingo Franzki -Signed-off-by: Steffen Eiden ---- - zkey/ep11.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/zkey/ep11.c b/zkey/ep11.c -index 58dc3c5..8359929 100644 ---- a/zkey/ep11.c -+++ b/zkey/ep11.c -@@ -35,7 +35,7 @@ - * Definitions for the EP11 library - */ - #define EP11_LIBRARY_NAME "libep11.so" --#define EP11_LIBRARY_VERSION 3 -+#define EP11_LIBRARY_VERSION 4 - #define EP11_WEB_PAGE "http://www.ibm.com/security/cryptocards" - - /** --- -2.39.1 - diff --git a/s390utils-2.26.0-fedora.patch b/s390utils-2.26.0-fedora.patch new file mode 100644 index 0000000..9a8b060 --- /dev/null +++ b/s390utils-2.26.0-fedora.patch @@ -0,0 +1,115 @@ +From a12dfc9ee92722c3fdf9f9fbd358023bef7a6ed9 Mon Sep 17 00:00:00 2001 +From: Steffen Eiden +Date: Fri, 17 Feb 2023 15:12:46 +0100 +Subject: [PATCH] Make -Werror optional +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Enforcing `-Werror` can cause problems when compiling with newer +compilers that have additional warnings on by default. + +By default `-Werror` is turned off and can be turned on via +`ENABLE_WERROR=1`. + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/148 +Signed-off-by: Steffen Eiden +Reviewed-by: Jan Höppner +Signed-off-by: Jan Höppner +(cherry picked from commit d3a3b26d16efdc4e9f896e616b5c8b7cac1b1a63) +--- + common.mak | 17 +++++++++++------ + genprotimg/boot/Makefile | 2 +- + genprotimg/src/Makefile | 2 +- + libpv/Makefile | 1 - + pvattest/src/Makefile | 1 - + 5 files changed, 13 insertions(+), 10 deletions(-) + +diff --git a/common.mak b/common.mak +index dbd1ebb..1d5e1a2 100644 +--- a/common.mak ++++ b/common.mak +@@ -101,6 +101,10 @@ else + DEFAULT_CFLAGS += -O3 + endif + ++ifeq ("${ENABLE_WERROR}", "1") ++ DEFAULT_CFLAGS += -Werror ++endif ++ + DEFAULT_CPPFLAGS = -D_GNU_SOURCE + DEFAULT_LDFLAGS = -rdynamic + +@@ -302,12 +306,13 @@ help: + @echo ' clean Delete all generated files' + @echo '' + @echo 'OPTIONS' +- @echo ' D=1 Build with debugging option "-Og"' +- @echo ' C=1 Build with check tool defined with "CHECK=" (default=sparse)' +- @echo ' G=1 Build with gcov to collect code coverage data' +- @echo ' V=1 Generate verbose build output' +- @echo ' W=1 Build with higher warning level' +- @echo ' ASAN=1 Build with address sanitizer' ++ @echo ' D=1 Build with debugging option "-Og"' ++ @echo ' C=1 Build with check tool defined with "CHECK=" (default=sparse)' ++ @echo ' G=1 Build with gcov to collect code coverage data' ++ @echo ' V=1 Generate verbose build output' ++ @echo ' W=1 Build with higher warning level' ++ @echo ' ASAN=1 Build with address sanitizer' ++ @echo ' ENABLE_WERROR=1 Build with -Werror' + @echo '' + @echo 'EXAMPLES' + @echo ' # make clean all D=1 W=1 -j' +diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile +index b1b1421..6f3ae5c 100644 +--- a/genprotimg/boot/Makefile ++++ b/genprotimg/boot/Makefile +@@ -15,7 +15,7 @@ ALL_CFLAGS := $(NO_PIE_CFLAGS) -Os -g \ + -fno-delete-null-pointer-checks -fno-stack-protector \ + -fexec-charset=IBM1047 -m64 -mpacked-stack \ + -mstack-size=4096 -mstack-guard=128 -msoft-float \ +- -Wall -Wformat-security -Wextra -Werror \ ++ -Wall -Wformat-security -Wextra \ + -Wno-array-bounds + + FILES := stage3a.bin stage3b.bin stage3b_reloc.bin +diff --git a/genprotimg/src/Makefile b/genprotimg/src/Makefile +index 0e811d6..6c80ed2 100644 +--- a/genprotimg/src/Makefile ++++ b/genprotimg/src/Makefile +@@ -17,7 +17,7 @@ WARNINGS := -Wall -Wextra -Wshadow \ + -Wcast-align -Wwrite-strings -Wmissing-prototypes \ + -Wmissing-declarations -Wredundant-decls -Wnested-externs \ + -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ +- -Wpointer-arith -Werror -Wno-error=inline \ ++ -Wpointer-arith -Wno-error=inline \ + $(NULL) + + $(bin_PROGRAM)_SRCS := $(bin_PROGRAM).c pv/pv_stage3.c pv/pv_image.c \ +diff --git a/libpv/Makefile b/libpv/Makefile +index d9a1cff..5b518c7 100644 +--- a/libpv/Makefile ++++ b/libpv/Makefile +@@ -28,7 +28,6 @@ WARNINGS := -Wall -Wextra -Wshadow \ + -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ + -Wpointer-arith -Wno-error=inline \ + -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable \ +- -Werror \ + $(NULL) + + ALL_CFLAGS += -std=gnu11 \ +diff --git a/pvattest/src/Makefile b/pvattest/src/Makefile +index a1f0e1a..cd56af0 100644 +--- a/pvattest/src/Makefile ++++ b/pvattest/src/Makefile +@@ -17,7 +17,6 @@ WARNINGS := -Wall -Wextra -Wshadow \ + -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ + -Wpointer-arith -Wno-error=inline \ + -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable \ +- -Werror \ + $(NULL) + + PVATTEST_SRCS := $(wildcard *.c) \ +-- +2.39.2 + diff --git a/s390utils.spec b/s390utils.spec index 065b0da..914cb7d 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,8 +9,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.25.0 -Release: 4%{?dist} +Version: 2.26.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -69,9 +69,6 @@ be used together with the zSeries (s390) Linux kernel and device drivers. # upstream fixes/updates %patch100 -p1 -# drop -Werror from genprotimg to allow building with GCC 12 -sed -i.bak -e 's/-Werror//g' genprotimg/src/Makefile genprotimg/boot/Makefile - # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' @@ -340,11 +337,6 @@ s390 base tools. This collection provides the following utilities: * tunedasd: Adjust tunable parameters on DASD devices. - * vmconvert: - Convert system dumps created by the z/VM VMDUMP command into dumps with - LKCD format. These LKCD dumps can then be analyzed with the dump analysis - tool lcrash. - * vmcp: Allows Linux users to send commands to the z/VM control program (CP). The normal usage is to invoke vmcp with the command you want to @@ -478,7 +470,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_bindir}/mk-s390image %{_bindir}/pvattest %{_bindir}/pvextract-hdr -%{_bindir}/vmconvert %{_bindir}/zkey %{_bindir}/zkey-cryptsetup %{_unitdir}/dumpconf.service @@ -507,7 +498,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* %{_mandir}/man1/pvattest-verify.1* -%{_mandir}/man1/vmconvert.1* %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* @@ -907,6 +897,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Mar 03 2023 Dan Horák - 2:2.26.0-1 +- rebased to 2.26.0 + * Tue Jan 31 2023 Dan Horák - 2:2.25.0-4 - add post GA fixes diff --git a/sources b/sources index 4fb12d4..7bbbf61 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.25.0.tar.gz) = 1c766a4bd19c957596c741a80141712acf150591c0ff1a47caf1aa8a17f7153c1441560f05aef78bb3f05bd35c1fef431569cabd7e7d6b003bd74beedb7213d9 +SHA512 (s390-tools-2.26.0.tar.gz) = 83cd717553f5bb7b9faac8beadfe9d88b211b2e86942c763778825ef840ed398201e1fe4e085f8eafdc3dc6ab0e231b22cb51277aae23106a964e5a14f2997fc From 57b37fee1fc8524ed612708743dc30e3f7c334c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 19 May 2023 16:25:40 +0200 Subject: [PATCH 081/141] Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19) --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 914cb7d..41029fc 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.26.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -897,6 +897,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri May 19 2023 Petr Pisar - 2:2.26.0-2 +- Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19) + * Fri Mar 03 2023 Dan Horák - 2:2.26.0-1 - rebased to 2.26.0 From a6e30a308a910c5fc82590a0f44f18ea86c77998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 19 May 2023 16:38:39 +0200 Subject: [PATCH 082/141] Unescape Patch100 definition Broken with commit 9e98b44d8b9b53c040a8219df970a5a359d0260a. --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 41029fc..ffdc483 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -38,7 +38,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%%{version}-fedora.patch +Patch100: s390utils-%{version}-fedora.patch Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} From b43bfd7eed3ce7ca6779f6fbb5c5929318f6787f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 31 May 2023 12:44:16 +0000 Subject: [PATCH 083/141] - rebased to 2.27.0 --- s390utils-2.26.0-fedora.patch | 115 ---------------------------------- s390utils-2.27.0-fedora.patch | 108 +++++++++++++++++++++++++++++++ s390utils.spec | 8 ++- sources | 2 +- 4 files changed, 115 insertions(+), 118 deletions(-) delete mode 100644 s390utils-2.26.0-fedora.patch create mode 100644 s390utils-2.27.0-fedora.patch diff --git a/s390utils-2.26.0-fedora.patch b/s390utils-2.26.0-fedora.patch deleted file mode 100644 index 9a8b060..0000000 --- a/s390utils-2.26.0-fedora.patch +++ /dev/null @@ -1,115 +0,0 @@ -From a12dfc9ee92722c3fdf9f9fbd358023bef7a6ed9 Mon Sep 17 00:00:00 2001 -From: Steffen Eiden -Date: Fri, 17 Feb 2023 15:12:46 +0100 -Subject: [PATCH] Make -Werror optional -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Enforcing `-Werror` can cause problems when compiling with newer -compilers that have additional warnings on by default. - -By default `-Werror` is turned off and can be turned on via -`ENABLE_WERROR=1`. - -Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/148 -Signed-off-by: Steffen Eiden -Reviewed-by: Jan Höppner -Signed-off-by: Jan Höppner -(cherry picked from commit d3a3b26d16efdc4e9f896e616b5c8b7cac1b1a63) ---- - common.mak | 17 +++++++++++------ - genprotimg/boot/Makefile | 2 +- - genprotimg/src/Makefile | 2 +- - libpv/Makefile | 1 - - pvattest/src/Makefile | 1 - - 5 files changed, 13 insertions(+), 10 deletions(-) - -diff --git a/common.mak b/common.mak -index dbd1ebb..1d5e1a2 100644 ---- a/common.mak -+++ b/common.mak -@@ -101,6 +101,10 @@ else - DEFAULT_CFLAGS += -O3 - endif - -+ifeq ("${ENABLE_WERROR}", "1") -+ DEFAULT_CFLAGS += -Werror -+endif -+ - DEFAULT_CPPFLAGS = -D_GNU_SOURCE - DEFAULT_LDFLAGS = -rdynamic - -@@ -302,12 +306,13 @@ help: - @echo ' clean Delete all generated files' - @echo '' - @echo 'OPTIONS' -- @echo ' D=1 Build with debugging option "-Og"' -- @echo ' C=1 Build with check tool defined with "CHECK=" (default=sparse)' -- @echo ' G=1 Build with gcov to collect code coverage data' -- @echo ' V=1 Generate verbose build output' -- @echo ' W=1 Build with higher warning level' -- @echo ' ASAN=1 Build with address sanitizer' -+ @echo ' D=1 Build with debugging option "-Og"' -+ @echo ' C=1 Build with check tool defined with "CHECK=" (default=sparse)' -+ @echo ' G=1 Build with gcov to collect code coverage data' -+ @echo ' V=1 Generate verbose build output' -+ @echo ' W=1 Build with higher warning level' -+ @echo ' ASAN=1 Build with address sanitizer' -+ @echo ' ENABLE_WERROR=1 Build with -Werror' - @echo '' - @echo 'EXAMPLES' - @echo ' # make clean all D=1 W=1 -j' -diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile -index b1b1421..6f3ae5c 100644 ---- a/genprotimg/boot/Makefile -+++ b/genprotimg/boot/Makefile -@@ -15,7 +15,7 @@ ALL_CFLAGS := $(NO_PIE_CFLAGS) -Os -g \ - -fno-delete-null-pointer-checks -fno-stack-protector \ - -fexec-charset=IBM1047 -m64 -mpacked-stack \ - -mstack-size=4096 -mstack-guard=128 -msoft-float \ -- -Wall -Wformat-security -Wextra -Werror \ -+ -Wall -Wformat-security -Wextra \ - -Wno-array-bounds - - FILES := stage3a.bin stage3b.bin stage3b_reloc.bin -diff --git a/genprotimg/src/Makefile b/genprotimg/src/Makefile -index 0e811d6..6c80ed2 100644 ---- a/genprotimg/src/Makefile -+++ b/genprotimg/src/Makefile -@@ -17,7 +17,7 @@ WARNINGS := -Wall -Wextra -Wshadow \ - -Wcast-align -Wwrite-strings -Wmissing-prototypes \ - -Wmissing-declarations -Wredundant-decls -Wnested-externs \ - -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ -- -Wpointer-arith -Werror -Wno-error=inline \ -+ -Wpointer-arith -Wno-error=inline \ - $(NULL) - - $(bin_PROGRAM)_SRCS := $(bin_PROGRAM).c pv/pv_stage3.c pv/pv_image.c \ -diff --git a/libpv/Makefile b/libpv/Makefile -index d9a1cff..5b518c7 100644 ---- a/libpv/Makefile -+++ b/libpv/Makefile -@@ -28,7 +28,6 @@ WARNINGS := -Wall -Wextra -Wshadow \ - -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ - -Wpointer-arith -Wno-error=inline \ - -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable \ -- -Werror \ - $(NULL) - - ALL_CFLAGS += -std=gnu11 \ -diff --git a/pvattest/src/Makefile b/pvattest/src/Makefile -index a1f0e1a..cd56af0 100644 ---- a/pvattest/src/Makefile -+++ b/pvattest/src/Makefile -@@ -17,7 +17,6 @@ WARNINGS := -Wall -Wextra -Wshadow \ - -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ - -Wpointer-arith -Wno-error=inline \ - -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable \ -- -Werror \ - $(NULL) - - PVATTEST_SRCS := $(wildcard *.c) \ --- -2.39.2 - diff --git a/s390utils-2.27.0-fedora.patch b/s390utils-2.27.0-fedora.patch new file mode 100644 index 0000000..d73d4ec --- /dev/null +++ b/s390utils-2.27.0-fedora.patch @@ -0,0 +1,108 @@ +From 493af760ed47454f5719f05a6e6316f43a3be98a Mon Sep 17 00:00:00 2001 +From: Stefan Haberland +Date: Mon, 8 May 2023 14:52:54 +0200 +Subject: [PATCH] zdev: add support for autoquiesce related sysfs attributes + +Autoquiesce is a mechanism that tells Linux to stop issuing I/Os to a +specific DASD after certain events. + +Add support for configuring related DASD device attributes +that govern the following aspects of autoquiesce: + +aq_mask - Configure which events lead to autoquiesce. +aq_requeue - Configure if autoquiesce will requeue all I/O to blocklayer. +aq_timeouts - Configure the number of timeouts before autoquiesce. + +Signed-off-by: Stefan Haberland +Reviewed-by: Peter Oberparleiter +Signed-off-by: Steffen Eiden +--- + zdev/src/dasd.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + +diff --git a/zdev/src/dasd.c b/zdev/src/dasd.c +index f9fd231..4330229 100644 +--- a/zdev/src/dasd.c ++++ b/zdev/src/dasd.c +@@ -344,6 +344,68 @@ static struct attrib dasd_attr_fc_security = { + .readonly = 1, + }; + ++static struct attrib dasd_attr_aq_mask = { ++ .name = "aq_mask", ++ .title = "Specify autoquiesce triggers", ++ .desc = ++ "Use the aq_mask attribute to automatically quiesce a device and block\n" ++ "new I/O after certain events.\n" ++ "\n" ++ "The value is a bitmask in decimal or hexadecimal format where each set bit\n" ++ "indicates that the associated event shown in the table below triggers an\n" ++ "autoquiesce.\n" ++ " Bit 0 is not used.\n" ++ " 1 - 0x02 - A terminal I/O error occurred\n" ++ " 2 - 0x04 - No active channel paths remain for the device\n" ++ " 3 - 0x08 - A state change interrupt occurred\n" ++ " 4 - 0x10 - The device is PPRC suspended\n" ++ " 5 - 0x20 - No space is left on an ESE device\n" ++ " 6 - 0x40 – The number of timeouts specified in aq_timeouts is reached\n" ++ " 7 - 0x80 - I/O was not started because of an error in the start function\n" ++ "\n" ++ "For example bits 1,3 and 5 set (0010 1010) lead to an integer value of 42\n" ++ "or 0x2A.\n" ++ "An integer value of 0 turns off the autoquiesce function.\n", ++ .order_cmp = ccw_online_only_order_cmp, ++ .check = ccw_online_only_check, ++ .defval = "0", ++ /* ++ * Currently only 8 bits are defined and the max value is 255. ++ * This needs to be adjusted if more bits are defined. ++ */ ++ .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 255)), ++}; ++ ++static struct attrib dasd_attr_aq_requeue = { ++ .name = "aq_requeue", ++ .title = "Control I/O requeing during autoquiesce", ++ .desc = ++ "Use the aq_requeue attribute to control whether outstanding I/O\n" ++ "operations to the blocklayer should be automatically requeued after\n" ++ "an autoquiesce event.\n" ++ "Valid values are 1 for requeuing, or 0 for no requeueing.\n" ++ "Requeing the I/O requests to the blocklayer might benefit I/O\n" ++ "in case of a copy_pair swap operation.\n", ++ .order_cmp = ccw_online_only_order_cmp, ++ .check = ccw_online_only_check, ++ .defval = "0", ++ .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 1)), ++}; ++ ++static struct attrib dasd_attr_aq_timeouts = { ++ .name = "aq_timeouts", ++ .title = "Specify timeout retry threshold", ++ .desc = ++ "Specify the number of sequential timeout events for an I/O operation\n" ++ "before an autoquiesce is triggered on a device.\n" ++ "This requires that the corresponding trigger bit 6 is set\n" ++ "in the aq_mask attribute.\n", ++ .order_cmp = ccw_online_only_order_cmp, ++ .check = ccw_online_only_check, ++ .defval = "32768", ++ .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 32768)), ++}; ++ + /* + * DASD subtype methods. + */ +@@ -725,6 +787,9 @@ struct subtype dasd_subtype_eckd = { + &dasd_attr_safe_offline, + &dasd_attr_fc_security, + &dasd_attr_copy_pair, ++ &dasd_attr_aq_mask, ++ &dasd_attr_aq_requeue, ++ &dasd_attr_aq_timeouts, + &internal_attr_early, + ), + .unknown_dev_attribs = 1, +-- +2.39.2 + diff --git a/s390utils.spec b/s390utils.spec index ffdc483..9d73508 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,8 +9,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.26.0 -Release: 2%{?dist} +Version: 2.27.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -212,6 +212,7 @@ This package provides minimal set of tools needed to system to boot. %{_unitdir}/cpi.service %config(noreplace) %{_sysconfdir}/sysconfig/cpi /usr/lib/dracut/modules.d/95zdev/ +/usr/lib/dracut/modules.d/95zdev-kdump/ %{_mandir}/man5/zipl.conf.5* %{_mandir}/man8/chreipl.8* %{_mandir}/man8/chzdev.8* @@ -897,6 +898,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed May 31 2023 Dan Horák - 2:2.27.0-1 +- rebased to 2.27.0 + * Fri May 19 2023 Petr Pisar - 2:2.26.0-2 - Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19) diff --git a/sources b/sources index 7bbbf61..95bf181 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.26.0.tar.gz) = 83cd717553f5bb7b9faac8beadfe9d88b211b2e86942c763778825ef840ed398201e1fe4e085f8eafdc3dc6ab0e231b22cb51277aae23106a964e5a14f2997fc +SHA512 (s390-tools-2.27.0.tar.gz) = 8ec83718639d17fe7b1990f4e492f1e1bdd11e814b7838c921733eeccb212f417141042118eadf1e8db498e3ff2ce0c8d404189e436cefe17d9a3dacea22429f From da9838c8001714d9af6d7309792ea0994378f32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 31 May 2023 13:10:36 +0000 Subject: [PATCH 084/141] modernize %patch usage --- s390utils.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 9d73508..6c3db96 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -63,11 +63,11 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %setup -q -n s390-tools-%{version} # Fedora/RHEL changes -%patch0 -p1 -b .zipl-invert-script-options -%patch1 -p1 -b .blscfg-rpm-nvr-sort +%patch 0 -p1 -b .zipl-invert-script-options +%patch 1 -p1 -b .blscfg-rpm-nvr-sort # upstream fixes/updates -%patch100 -p1 +%patch 100 -p1 # remove --strip from install find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' From d81d4fd38338529058508c1ba7523184980b2f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 13 Jul 2023 15:10:59 +0000 Subject: [PATCH 085/141] - rebased to 2.28.0 --- s390utils-2.27.0-fedora.patch | 108 ---------------------------------- s390utils-2.28.0-fedora.patch | 0 s390utils.spec | 12 ++-- sources | 2 +- 4 files changed, 7 insertions(+), 115 deletions(-) delete mode 100644 s390utils-2.27.0-fedora.patch create mode 100644 s390utils-2.28.0-fedora.patch diff --git a/s390utils-2.27.0-fedora.patch b/s390utils-2.27.0-fedora.patch deleted file mode 100644 index d73d4ec..0000000 --- a/s390utils-2.27.0-fedora.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 493af760ed47454f5719f05a6e6316f43a3be98a Mon Sep 17 00:00:00 2001 -From: Stefan Haberland -Date: Mon, 8 May 2023 14:52:54 +0200 -Subject: [PATCH] zdev: add support for autoquiesce related sysfs attributes - -Autoquiesce is a mechanism that tells Linux to stop issuing I/Os to a -specific DASD after certain events. - -Add support for configuring related DASD device attributes -that govern the following aspects of autoquiesce: - -aq_mask - Configure which events lead to autoquiesce. -aq_requeue - Configure if autoquiesce will requeue all I/O to blocklayer. -aq_timeouts - Configure the number of timeouts before autoquiesce. - -Signed-off-by: Stefan Haberland -Reviewed-by: Peter Oberparleiter -Signed-off-by: Steffen Eiden ---- - zdev/src/dasd.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 65 insertions(+) - -diff --git a/zdev/src/dasd.c b/zdev/src/dasd.c -index f9fd231..4330229 100644 ---- a/zdev/src/dasd.c -+++ b/zdev/src/dasd.c -@@ -344,6 +344,68 @@ static struct attrib dasd_attr_fc_security = { - .readonly = 1, - }; - -+static struct attrib dasd_attr_aq_mask = { -+ .name = "aq_mask", -+ .title = "Specify autoquiesce triggers", -+ .desc = -+ "Use the aq_mask attribute to automatically quiesce a device and block\n" -+ "new I/O after certain events.\n" -+ "\n" -+ "The value is a bitmask in decimal or hexadecimal format where each set bit\n" -+ "indicates that the associated event shown in the table below triggers an\n" -+ "autoquiesce.\n" -+ " Bit 0 is not used.\n" -+ " 1 - 0x02 - A terminal I/O error occurred\n" -+ " 2 - 0x04 - No active channel paths remain for the device\n" -+ " 3 - 0x08 - A state change interrupt occurred\n" -+ " 4 - 0x10 - The device is PPRC suspended\n" -+ " 5 - 0x20 - No space is left on an ESE device\n" -+ " 6 - 0x40 – The number of timeouts specified in aq_timeouts is reached\n" -+ " 7 - 0x80 - I/O was not started because of an error in the start function\n" -+ "\n" -+ "For example bits 1,3 and 5 set (0010 1010) lead to an integer value of 42\n" -+ "or 0x2A.\n" -+ "An integer value of 0 turns off the autoquiesce function.\n", -+ .order_cmp = ccw_online_only_order_cmp, -+ .check = ccw_online_only_check, -+ .defval = "0", -+ /* -+ * Currently only 8 bits are defined and the max value is 255. -+ * This needs to be adjusted if more bits are defined. -+ */ -+ .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 255)), -+}; -+ -+static struct attrib dasd_attr_aq_requeue = { -+ .name = "aq_requeue", -+ .title = "Control I/O requeing during autoquiesce", -+ .desc = -+ "Use the aq_requeue attribute to control whether outstanding I/O\n" -+ "operations to the blocklayer should be automatically requeued after\n" -+ "an autoquiesce event.\n" -+ "Valid values are 1 for requeuing, or 0 for no requeueing.\n" -+ "Requeing the I/O requests to the blocklayer might benefit I/O\n" -+ "in case of a copy_pair swap operation.\n", -+ .order_cmp = ccw_online_only_order_cmp, -+ .check = ccw_online_only_check, -+ .defval = "0", -+ .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 1)), -+}; -+ -+static struct attrib dasd_attr_aq_timeouts = { -+ .name = "aq_timeouts", -+ .title = "Specify timeout retry threshold", -+ .desc = -+ "Specify the number of sequential timeout events for an I/O operation\n" -+ "before an autoquiesce is triggered on a device.\n" -+ "This requires that the corresponding trigger bit 6 is set\n" -+ "in the aq_mask attribute.\n", -+ .order_cmp = ccw_online_only_order_cmp, -+ .check = ccw_online_only_check, -+ .defval = "32768", -+ .accept = ACCEPT_ARRAY(ACCEPT_RANGE(0, 32768)), -+}; -+ - /* - * DASD subtype methods. - */ -@@ -725,6 +787,9 @@ struct subtype dasd_subtype_eckd = { - &dasd_attr_safe_offline, - &dasd_attr_fc_security, - &dasd_attr_copy_pair, -+ &dasd_attr_aq_mask, -+ &dasd_attr_aq_requeue, -+ &dasd_attr_aq_timeouts, - &internal_attr_early, - ), - .unknown_dev_attribs = 1, --- -2.39.2 - diff --git a/s390utils-2.28.0-fedora.patch b/s390utils-2.28.0-fedora.patch new file mode 100644 index 0000000..e69de29 diff --git a/s390utils.spec b/s390utils.spec index 6c3db96..dd7c95a 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,7 +9,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.27.0 +Version: 2.28.0 Release: 1%{?dist} Epoch: 2 License: MIT @@ -38,7 +38,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%{version}-fedora.patch +#Patch100: s390utils-%%{version}-fedora.patch Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} @@ -67,10 +67,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %patch 1 -p1 -b .blscfg-rpm-nvr-sort # upstream fixes/updates -%patch 100 -p1 - -# remove --strip from install -find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' +#%%patch 100 -p1 %build @@ -898,6 +895,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jul 11 2023 Dan Horák - 2:2.28.0-1 +- rebased to 2.28.0 + * Wed May 31 2023 Dan Horák - 2:2.27.0-1 - rebased to 2.27.0 diff --git a/sources b/sources index 95bf181..a766dea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.27.0.tar.gz) = 8ec83718639d17fe7b1990f4e492f1e1bdd11e814b7838c921733eeccb212f417141042118eadf1e8db498e3ff2ce0c8d404189e436cefe17d9a3dacea22429f +SHA512 (s390-tools-2.28.0.tar.gz) = ece3a1463e2c8b8e5626a5a8956c5d1a1227661dce2e75cbda0cb30b0a3fecb3f17a0cffc631c500eb7fda4094691f9cdbc342b7b9d1b7539f1a754cae9d6a84 From 4b655c64f1698180e7a7de44a2a92030d341f8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 14 Jul 2023 10:04:29 +0200 Subject: [PATCH 086/141] add rpminspect.yaml --- rpminspect.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 rpminspect.yaml diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..8ca8a53 --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,8 @@ +--- +pathmigration: + excluded_paths: + - /lib/s390-tools + +badfuncs: + ignore: + - /usr/sbin/qethqoat From 262d603726783e4a1271d338133123102b65ed89 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 00:55:06 +0000 Subject: [PATCH 087/141] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index dd7c95a..bb28334 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -10,7 +10,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.28.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -895,6 +895,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 2:2.28.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 Dan Horák - 2:2.28.0-1 - rebased to 2.28.0 From 087a10568c7743d0d734873d02882bc56e741225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 7 Aug 2023 08:50:46 +0000 Subject: [PATCH 088/141] - rebased to 2.29.0 --- s390utils.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index bb28334..ee9542c 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -9,8 +9,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.28.0 -Release: 2%{?dist} +Version: 2.29.0 +Release: 1%{?dist} Epoch: 2 License: MIT ExclusiveArch: s390 s390x @@ -73,6 +73,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %build make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ + HAVE_CARGO=0 \ HAVE_DRACUT=1 \ %if 0%{?with_pandoc} ENABLE_DOC=1 \ @@ -85,6 +86,7 @@ make \ %install make install \ + HAVE_CARGO=0 \ HAVE_DRACUT=1 \ %if 0%{?with_pandoc} ENABLE_DOC=1 \ @@ -895,6 +897,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Aug 07 2023 Dan Horák - 2:2.29.0-1 +- rebased to 2.29.0 + * Sat Jul 22 2023 Fedora Release Engineering - 2:2.28.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index a766dea..6100d46 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (s390-tools-2.28.0.tar.gz) = ece3a1463e2c8b8e5626a5a8956c5d1a1227661dce2e75cbda0cb30b0a3fecb3f17a0cffc631c500eb7fda4094691f9cdbc342b7b9d1b7539f1a754cae9d6a84 +SHA512 (s390-tools-2.29.0.tar.gz) = 3eeaab0e0c6559b9fb0b4c7cca49358a7cc7fe0cb11684d2d761fe105cc2bfd791d33ecc2070e3dfd877039b68e868699cd3cea318e64aee1cc0f348c7b41617 From 9e549c2e6c6fae409a34c38d3f5c0a38c3c44ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Tue, 1 Aug 2023 15:26:25 +0200 Subject: [PATCH 089/141] Convert to the SPDX --- s390utils.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index ee9542c..ad15f12 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -12,7 +12,8 @@ Summary: Utilities and daemons for IBM z Systems Version: 2.29.0 Release: 1%{?dist} Epoch: 2 -License: MIT +# MIT covers nearly all the files, except init files +License: MIT AND LGPL-2.1-or-later ExclusiveArch: s390 s390x URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz @@ -256,7 +257,7 @@ This package provides minimal set of tools needed to system to boot. # %package base -License: MIT +License: MIT AND LGPL-2.1-or-later Summary: S390 base tools Requires: gawk sed coreutils Requires: sg3_utils From 3fa397e687ca21fd0664e11afc6cdf6bd276d4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 31 Aug 2023 13:08:54 +0200 Subject: [PATCH 090/141] Fix missing semicolon Resolves: BZ#2235734 --- s390utils.spec | 2 ++ snmp-semicolon.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 snmp-semicolon.patch diff --git a/s390utils.spec b/s390utils.spec index ad15f12..44fac82 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -37,6 +37,7 @@ Source25: 91-zipl.install # change the defaults to match Fedora environment Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch +Patch2: snmp-semicolon.patch # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch @@ -66,6 +67,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. # Fedora/RHEL changes %patch 0 -p1 -b .zipl-invert-script-options %patch 1 -p1 -b .blscfg-rpm-nvr-sort +%patch 2 -p1 -b .snmp # upstream fixes/updates #%%patch 100 -p1 diff --git a/snmp-semicolon.patch b/snmp-semicolon.patch new file mode 100644 index 0000000..131d2a0 --- /dev/null +++ b/snmp-semicolon.patch @@ -0,0 +1,12 @@ +diff -ruNp a/osasnmpd/ibmOSAMib.h b/osasnmpd/ibmOSAMib.h +--- a/osasnmpd/ibmOSAMib.h 2023-08-30 20:13:41.231150334 +0200 ++++ b/osasnmpd/ibmOSAMib.h 2023-08-30 20:13:27.414030798 +0200 +@@ -16,7 +16,7 @@ + + /* we may use header_generic and header_simple_table from the util_funcs module */ + +-config_require(util_funcs) ++config_require(util_funcs); + + + /* function prototypes */ From 702b044c209f5f16b46a0b3cd9405ea3ee2e5d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 31 Aug 2023 17:50:12 +0200 Subject: [PATCH 091/141] Enable rust based tools --- s390utils.spec | 60 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 44fac82..28fa1c0 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -6,11 +6,12 @@ %if 0%{?fedora} %global with_pandoc 1 %endif +%bcond_without rust Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.29.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -37,7 +38,8 @@ Source25: 91-zipl.install # change the defaults to match Fedora environment Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch -Patch2: snmp-semicolon.patch +# https://github.com/ibm-s390-linux/s390-tools/pull/155 +Patch2: snmp-semicolon.patch # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch @@ -52,6 +54,31 @@ Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} BuildRequires: make BuildRequires: gcc-c++ +%if %{with rust} +BuildRequires: crate(anstream) +BuildRequires: crate(anstyle-query) +BuildRequires: crate(anyhow) +BuildRequires: crate(byteorder) +BuildRequires: crate(cfg-if) +BuildRequires: crate(clap) +BuildRequires: crate(clap_complete) +BuildRequires: crate(clap_derive) +BuildRequires: crate(colorchoice) +BuildRequires: crate(curl) +BuildRequires: crate(is-terminal) +BuildRequires: crate(libc) +BuildRequires: crate(log) +BuildRequires: crate(openssl) +BuildRequires: crate(openssl-probe) +BuildRequires: crate(serde) +BuildRequires: crate(serde_derive) +BuildRequires: crate(serde_yaml) +BuildRequires: crate(strsim) +BuildRequires: crate(terminal_size) +BuildRequires: crate(thiserror) +BuildRequires: crate(zerocopy) +BuildRequires: rust-packaging +%endif %description This is a meta package for installing the default s390-tools sub packages. @@ -71,13 +98,18 @@ be used together with the zSeries (s390) Linux kernel and device drivers. # upstream fixes/updates #%%patch 100 -p1 - +%if %{with rust} +%cargo_prep +rm -rf ./rust/pvsecret/Cargo.lock +%endif %build make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ - HAVE_CARGO=0 \ HAVE_DRACUT=1 \ +%if %{without rust} + HAVE_CARGO=0 \ +%endif %if 0%{?with_pandoc} ENABLE_DOC=1 \ %endif @@ -89,8 +121,10 @@ make \ %install make install \ - HAVE_CARGO=0 \ HAVE_DRACUT=1 \ +%if %{without rust} + HAVE_CARGO=0 \ +%endif %if 0%{?with_pandoc} ENABLE_DOC=1 \ %endif @@ -473,6 +507,9 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_bindir}/mk-s390image %{_bindir}/pvattest %{_bindir}/pvextract-hdr +%if %{with rust} +%{_bindir}/pvsecret +%endif %{_bindir}/zkey %{_bindir}/zkey-cryptsetup %{_unitdir}/dumpconf.service @@ -501,6 +538,16 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* %{_mandir}/man1/pvattest-verify.1* +%if %{with rust} +%{_mandir}/man1/pvsecret-add.1* +%{_mandir}/man1/pvsecret-create-association.1* +%{_mandir}/man1/pvsecret-create-meta.1* +%{_mandir}/man1/pvsecret-create.1* +%{_mandir}/man1/pvsecret-list.1* +%{_mandir}/man1/pvsecret-lock.1* +%{_mandir}/man1/pvsecret-version.1* +%{_mandir}/man1/pvsecret.1* +%endif %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* @@ -900,6 +947,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Aug 31 2023 Jakub Čajka - 2:2.29.0-2 +- enable rust based tools + * Mon Aug 07 2023 Dan Horák - 2:2.29.0-1 - rebased to 2.29.0 From 3b4ba770c1bba446aab251ce6d8f7608b64c490a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Wed, 6 Sep 2023 11:00:23 +0200 Subject: [PATCH 092/141] Move all package options to bconds --- s390utils.spec | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 28fa1c0..97f5d60 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -1,11 +1,16 @@ # secure boot support is for RHEL only %if 0%{?rhel} >= 8 -%global signzipl 1 +%bcond_without signzipl +%else +%bcond_with signzipl %endif %if 0%{?fedora} -%global with_pandoc 1 +%bcond_without pandoc +%else +%bcond_with pandoc %endif + %bcond_without rust Name: s390utils @@ -31,7 +36,7 @@ Source23: 20-zipl-kernel.install Source24: 52-zipl-rescue.install Source25: 91-zipl.install -%if 0%{?signzipl} +%if %{with signzipl} %define pesign_name redhatsecureboot302 %endif @@ -110,7 +115,7 @@ make \ %if %{without rust} HAVE_CARGO=0 \ %endif -%if 0%{?with_pandoc} +%if %{with pandoc} ENABLE_DOC=1 \ %endif NO_PIE_LDFLAGS="" \ @@ -125,7 +130,7 @@ make install \ %if %{without rust} HAVE_CARGO=0 \ %endif -%if 0%{?with_pandoc} +%if %{with pandoc} ENABLE_DOC=1 \ %endif DESTDIR=%{buildroot} \ @@ -135,7 +140,7 @@ make install \ V=1 # sign the stage3 bootloader -%if 0%{?signzipl} +%if %{with signzipl} if [ -x /usr/bin/rpm-sign ]; then pushd %{buildroot}/lib/s390-tools/ rpm-sign --key "%{pesign_name}" --lkmsign stage3.bin --output stage3.signed @@ -892,7 +897,7 @@ Summary: Use multipath information for re-IPL path failover BuildRequires: make BuildRequires: bash BuildRequires: coreutils -%if 0%{?with_pandoc} +%if %{with pandoc} BuildRequires: pandoc %endif BuildRequires: gawk @@ -913,7 +918,7 @@ reconfigures the FCP re-IPL settings to use an operational path. %files chreipl-fcp-mpath %doc chreipl-fcp-mpath/README.md -%if 0%{?with_pandoc} +%if %{with pandoc} %doc chreipl-fcp-mpath/README.html %endif %dir %{_prefix}/lib/chreipl-fcp-mpath/ From 535cc10766cc93d4ac53c41ba04e7f91d14943b4 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 23 Oct 2023 20:45:57 -0400 Subject: [PATCH 093/141] Use vendored dependencies in RHEL builds RHEL does not package individual rust crate dependencies. Instead, rust-based packages must vendor these, and use the RHEL macros to build them. --- .gitignore | 1 + s390utils.spec | 22 +++++++++++++++++++++- sources | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7a88321..4b33380 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ src_vipa-2.0.4.tar.gz /src_vipa-2.1.0.tar.gz /s390-tools-*.tar.bz2 /s390-tools-*.tar.gz +/s390-tools-*-rust-vendor.tar.xz diff --git a/s390utils.spec b/s390utils.spec index 97f5d60..3efc9dc 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,13 +16,18 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.29.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later ExclusiveArch: s390 s390x URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz +# To create the vendor tarball: +# tar xf s390-tools-%%{version}.tar.gz ; pushd s390-tools-%%{version}/rust/pvsecret ; \ +# rm -f Cargo.lock && cargo vendor && \ +# tar Jvcf ../../../s390-tools-%%{version}-rust-vendor.tar.xz vendor/ ; popd +Source1: s390-tools-%{version}-rust-vendor.tar.xz Source5: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcpconf.sh Source7: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcp.udev Source12: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasd.udev @@ -60,6 +65,11 @@ Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} BuildRequires: make BuildRequires: gcc-c++ %if %{with rust} +%if 0%{?rhel} +BuildRequires: libcurl-devel +BuildRequires: openssl-devel +BuildRequires: rust-toolset +%else BuildRequires: crate(anstream) BuildRequires: crate(anstyle-query) BuildRequires: crate(anyhow) @@ -84,6 +94,7 @@ BuildRequires: crate(thiserror) BuildRequires: crate(zerocopy) BuildRequires: rust-packaging %endif +%endif %description This is a meta package for installing the default s390-tools sub packages. @@ -104,7 +115,13 @@ be used together with the zSeries (s390) Linux kernel and device drivers. # upstream fixes/updates #%%patch 100 -p1 %if %{with rust} +%if 0%{?rhel} +pushd rust +%cargo_prep -V 1 +popd +%else %cargo_prep +%endif rm -rf ./rust/pvsecret/Cargo.lock %endif @@ -952,6 +969,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Oct 23 2023 Yaakov Selkowitz - 2:2.29.0-3 +- Use vendored dependencies in RHEL builds + * Thu Aug 31 2023 Jakub Čajka - 2:2.29.0-2 - enable rust based tools diff --git a/sources b/sources index 6100d46..cb9b8cc 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (s390-tools-2.29.0.tar.gz) = 3eeaab0e0c6559b9fb0b4c7cca49358a7cc7fe0cb11684d2d761fe105cc2bfd791d33ecc2070e3dfd877039b68e868699cd3cea318e64aee1cc0f348c7b41617 +SHA512 (s390-tools-2.29.0-rust-vendor.tar.xz) = 7ee717c5848e7b59c3e11ef6b461122e5f1195e67d11e378352b297926b498180222bfc23719d952fb11677a3fd440d299e0035ca6ab0c6d784573e9a5698594 From 5184801f0e597aad6316632316ba7423da826785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 24 Oct 2023 12:35:34 +0000 Subject: [PATCH 094/141] switch to %autosetup --- s390utils.spec | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 3efc9dc..e9ffe0b 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -105,15 +105,8 @@ The s390utils packages contain a set of user space utilities that should to be used together with the zSeries (s390) Linux kernel and device drivers. %prep -%setup -q -n s390-tools-%{version} +%autosetup -n s390-tools-%{version} -p1 -# Fedora/RHEL changes -%patch 0 -p1 -b .zipl-invert-script-options -%patch 1 -p1 -b .blscfg-rpm-nvr-sort -%patch 2 -p1 -b .snmp - -# upstream fixes/updates -#%%patch 100 -p1 %if %{with rust} %if 0%{?rhel} pushd rust From 51cd104ddd8dc6a4fc7189e0b82f0a76eb8fff7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 9 Nov 2023 09:46:07 +0100 Subject: [PATCH 095/141] use %license for LICENSE --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index e9ffe0b..5119aa4 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -240,7 +240,7 @@ This package provides minimal set of tools needed to system to boot. %files core %doc README.md zdev/src/chzdev_usage.txt -%doc LICENSE +%license LICENSE %{_sbindir}/chreipl %{_sbindir}/chzdev %{_sbindir}/cio_ignore From 70bd1af9bd39133fcee61f9ec70b2150ad4adc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 9 Nov 2023 11:20:35 +0100 Subject: [PATCH 096/141] request a specific version of zerocopy as we have a newer one too --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 5119aa4..928a515 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -91,7 +91,7 @@ BuildRequires: crate(serde_yaml) BuildRequires: crate(strsim) BuildRequires: crate(terminal_size) BuildRequires: crate(thiserror) -BuildRequires: crate(zerocopy) +BuildRequires: crate(zerocopy) = 0.6.5 BuildRequires: rust-packaging %endif %endif From 40db3a57aee8449123eb4e77aa235169a52c767a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 11:41:36 +0100 Subject: [PATCH 097/141] rename installed kernel to match name used in boot entry clone of https://src.fedoraproject.org/rpms/grub2/c/af4f1536b6e498b88c1b07d00fc047184453839a?branch=rawhide --- 20-zipl-kernel.install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 4fadd1d..5ec4576 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -54,8 +54,13 @@ EOF case "$COMMAND" in add) if [[ "${KERNEL_DIR}" != "/boot" ]]; then + # rename to match the name used in the pseudo-BLS snippet above + rm -f "/boot/vmlinuz-${KERNEL_VERSION}" + cp -aT "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}" + command -v restorecon &>/dev/null && \ + restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}" + for i in \ - "$KERNEL_IMAGE" \ "$KERNEL_DIR"/System.map \ "$KERNEL_DIR"/config \ "$KERNEL_DIR"/zImage.stub From 7a5c89e84a4eb00cc3c75908aa30dde11fee1d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 11:48:10 +0100 Subject: [PATCH 098/141] do not preserve ownership or xattrs on copied files clone of https://src.fedoraproject.org/rpms/grub2/c/8800efcb0bea5750f77f88a05ac9211a19cbc7a0?branch=rawhide --- 20-zipl-kernel.install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 5ec4576..6847a20 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -56,7 +56,7 @@ case "$COMMAND" in if [[ "${KERNEL_DIR}" != "/boot" ]]; then # rename to match the name used in the pseudo-BLS snippet above rm -f "/boot/vmlinuz-${KERNEL_VERSION}" - cp -aT "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}" + cp --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}" command -v restorecon &>/dev/null && \ restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}" @@ -66,14 +66,14 @@ case "$COMMAND" in "$KERNEL_DIR"/zImage.stub do [[ -e "$i" ]] || continue - cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}" + cp --preserve=timestamps -T "$i" "/boot/${i##*/}-${KERNEL_VERSION}" command -v restorecon &>/dev/null && \ restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}" done # hmac is .vmlinuz-.hmac so needs a special treatment i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" if [[ -e "$i" ]]; then - cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" + cp --preserve=timestamps "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" command -v restorecon &>/dev/null && \ restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" fi @@ -96,7 +96,7 @@ case "$COMMAND" in [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR" BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" if [[ -f "${KERNEL_DIR}/bls.conf" ]]; then - cp -aT "${KERNEL_DIR}/bls.conf" "${BLS_TARGET}" || exit $? + cp --preserve=timestamps -T "${KERNEL_DIR}/bls.conf" "${BLS_TARGET}" || exit $? sed -i -e "s,^linux.*,linux /boot/vmlinuz-${KERNEL_VERSION},g" "${BLS_TARGET}" sed -i -e "s,^initrd.*,initrd /boot/initramfs-${KERNEL_VERSION}.img,g" "${BLS_TARGET}" sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}#g" "${BLS_TARGET}" @@ -117,7 +117,7 @@ case "$COMMAND" in if [ "x${MAKEDEBUG}" = "xyes" ]; then BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")" - cp -aT "${BLS_TARGET}" "${BLS_DEBUG}" + cp --preserve=timestamps -T "${BLS_TARGET}" "${BLS_DEBUG}" TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')" VERSION="$(grep '^version[ \t]' "${BLS_DEBUG}" | sed -e 's/^version[ \t]*//')" BLSID="$(grep '^id[ \t]' "${BLS_DEBUG}" | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")" From ca71fe340e090fe641f2e03aea254135e64abcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 11:59:34 +0100 Subject: [PATCH 099/141] let cp remove the destination files clone of https://src.fedoraproject.org/rpms/grub2/c/e1206cf45b3bdde97e166d5c0d55842c864a1c9e?branch=rawhide --- 20-zipl-kernel.install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 6847a20..8cb8d86 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -55,8 +55,7 @@ case "$COMMAND" in add) if [[ "${KERNEL_DIR}" != "/boot" ]]; then # rename to match the name used in the pseudo-BLS snippet above - rm -f "/boot/vmlinuz-${KERNEL_VERSION}" - cp --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}" + cp --remove-destination --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}" command -v restorecon &>/dev/null && \ restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}" From 8a3c26800a02938c00ebf75819f1906dbea64e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 12:11:20 +0100 Subject: [PATCH 100/141] - fix upstream kernel installations Apply changes from the grub2 kernel install helper script to the zipl helper. Related: rhbz#2239008 --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 928a515..c23ffb3 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,7 +16,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.29.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -962,6 +962,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Nov 10 2023 Dan Horák - 2:2.29.0-4 +- fix upstream kernel installations + * Mon Oct 23 2023 Yaakov Selkowitz - 2:2.29.0-3 - Use vendored dependencies in RHEL builds From 2c0b6d2ea2d7cac483d2b2c73d03154f3bfc31e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 12:09:35 +0100 Subject: [PATCH 101/141] enable multi-arch builds Select tools are expected to be used on non-s390x platforms, so drop ExclusiveArch and add a special %files section for this case. The tools will be available in the s390utils binary rpm. --- s390utils.spec | 72 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index c23ffb3..c090677 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,11 +16,10 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.29.0 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later -ExclusiveArch: s390 s390x URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz # To create the vendor tarball: @@ -54,6 +53,13 @@ Patch2: snmp-semicolon.patch # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +%ifarch s390x +# +# s390x/native package structure +# Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} @@ -61,9 +67,11 @@ Requires: s390utils-cpuplugd = %{epoch}:%{version}-%{release} Requires: s390utils-mon_statd = %{epoch}:%{version}-%{release} Requires: s390utils-iucvterm = %{epoch}:%{version}-%{release} Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} +%endif BuildRequires: make BuildRequires: gcc-c++ +BuildRequires: glib2-devel %if %{with rust} %if 0%{?rhel} BuildRequires: libcurl-devel @@ -149,6 +157,10 @@ make install \ DISTRELEASE=%{release} \ V=1 +%ifarch s390x +# +# s390x/native specific %%install section +# # sign the stage3 bootloader %if %{with signzipl} if [ -x /usr/bin/rpm-sign ]; then @@ -208,11 +220,56 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules # zipl.conf to be ghosted touch %{buildroot}%{_sysconfdir}/zipl.conf +%endif - +%ifarch s390x +# +# s390x/native main %%files section +# %files %doc README.md +%else +# +# multiarch %%files section +# + +%files +%doc README.md +%license LICENSE +%{_bindir}/genprotimg +%{_bindir}/pvattest +%{_bindir}/pvextract-hdr +%if %{with rust} +%{_bindir}/pvsecret +%endif +%{_mandir}/man1/genprotimg.1* +%{_mandir}/man1/pvattest.1* +%{_mandir}/man1/pvattest-create.1* +%{_mandir}/man1/pvattest-perform.1* +%{_mandir}/man1/pvattest-verify.1* +%if %{with rust} +%{_mandir}/man1/pvsecret-add.1* +%{_mandir}/man1/pvsecret-create-association.1* +%{_mandir}/man1/pvsecret-create-meta.1* +%{_mandir}/man1/pvsecret-create.1* +%{_mandir}/man1/pvsecret-list.1* +%{_mandir}/man1/pvsecret-lock.1* +%{_mandir}/man1/pvsecret-version.1* +%{_mandir}/man1/pvsecret.1* +%endif +%dir %{_datadir}/s390-tools +%{_datadir}/s390-tools/genprotimg/ + +# +# enf of multi-arch section +# +%endif + +%ifarch s390x +# +# s390x specific sub-packages +# # # ************************* s390-tools core package ************************* # @@ -323,7 +380,6 @@ BuildRequires: glibc-static BuildRequires: cryptsetup-devel >= 2.0.3 BuildRequires: json-c-devel BuildRequires: rpm-devel -BuildRequires: glib2-devel BuildRequires: libxml2-devel @@ -960,8 +1016,16 @@ User-space development files for the s390/s390x architecture. %{_libdir}/libekmfweb.so %{_libdir}/libkmipclient.so +# +# end of s390x specific sub-packages +# +%endif + %changelog +* Fri Nov 10 2023 Dan Horák - 2:2.29.0-5 +- enable multi-arch build + * Fri Nov 10 2023 Dan Horák - 2:2.29.0-4 - fix upstream kernel installations From f00ff2ac5578b9bcd7ececd4c0172230a8f18ee5 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 1 Dec 2023 16:17:48 +0100 Subject: [PATCH 102/141] Rebuild for openssl crate >= v0.10.60 (RUSTSEC-2023-0044, RUSTSEC-2023-0072) --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index c090677..15bdcb1 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,7 +16,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.29.0 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -1023,6 +1023,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Dec 01 2023 Fabio Valentini - 2:2.29.0-6 +- Rebuild for openssl crate >= v0.10.60 (RUSTSEC-2023-0044, RUSTSEC-2023-0072) + * Fri Nov 10 2023 Dan Horák - 2:2.29.0-5 - enable multi-arch build From 0f03699129760490a28f63770bf1a4d59862cdcf Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 12 Dec 2023 19:50:01 -0500 Subject: [PATCH 103/141] Fix build with libxml2-2.12.0 https://github.com/ibm-s390-linux/s390-tools/pull/160 --- libxml2-parser.patch | 12 ++++++++++++ s390utils.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 libxml2-parser.patch diff --git a/libxml2-parser.patch b/libxml2-parser.patch new file mode 100644 index 0000000..920d86d --- /dev/null +++ b/libxml2-parser.patch @@ -0,0 +1,12 @@ +diff --git a/libkmipclient/kmip.h b/libkmipclient/kmip.h +index e918577..3344cb0 100644 +--- a/libkmipclient/kmip.h ++++ b/libkmipclient/kmip.h +@@ -16,6 +16,7 @@ + #include + + #include ++#include + #include + #include + diff --git a/s390utils.spec b/s390utils.spec index 15bdcb1..9111266 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -49,6 +49,9 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # https://github.com/ibm-s390-linux/s390-tools/pull/155 Patch2: snmp-semicolon.patch +# fix build with libxml2-2.12.0 +# https://github.com/ibm-s390-linux/s390-tools/pull/160 +Patch3: libxml2-parser.patch # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch From ad9e1ad7a00beb32c07d1188ad2fd77bf1d88334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 2 Jan 2024 14:26:47 +0000 Subject: [PATCH 104/141] - rebased to 2.30.0 (rhbz#2252519) --- libxml2-parser.patch | 12 ------------ s390utils-2.28.0-fedora.patch | 0 s390utils-2.30.0-fedora.patch | 33 +++++++++++++++++++++++++++++++++ s390utils.spec | 29 ++++++++++++++++------------- snmp-semicolon.patch | 12 ------------ sources | 4 ++-- 6 files changed, 51 insertions(+), 39 deletions(-) delete mode 100644 libxml2-parser.patch delete mode 100644 s390utils-2.28.0-fedora.patch create mode 100644 s390utils-2.30.0-fedora.patch delete mode 100644 snmp-semicolon.patch diff --git a/libxml2-parser.patch b/libxml2-parser.patch deleted file mode 100644 index 920d86d..0000000 --- a/libxml2-parser.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/libkmipclient/kmip.h b/libkmipclient/kmip.h -index e918577..3344cb0 100644 ---- a/libkmipclient/kmip.h -+++ b/libkmipclient/kmip.h -@@ -16,6 +16,7 @@ - #include - - #include -+#include - #include - #include - diff --git a/s390utils-2.28.0-fedora.patch b/s390utils-2.28.0-fedora.patch deleted file mode 100644 index e69de29..0000000 diff --git a/s390utils-2.30.0-fedora.patch b/s390utils-2.30.0-fedora.patch new file mode 100644 index 0000000..a4bb576 --- /dev/null +++ b/s390utils-2.30.0-fedora.patch @@ -0,0 +1,33 @@ +From 6274294bc5cca34d626125072eb5befdd80d381f Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz +Date: Tue, 12 Dec 2023 19:44:05 -0500 +Subject: [PATCH] libkmipclient: Fix build with libxml2-2.12.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0 + +"Several cyclic dependencies in public header files were fixed. As a +result, certain headers won't include other headers as before." + +Closes: https://github.com/ibm-s390-linux/s390-tools/pull/160 +Signed-off-by: Yaakov Selkowitz +Reviewed-by: Ingo Franzki +Signed-off-by: Jan Höppner +--- + libkmipclient/kmip.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libkmipclient/kmip.h b/libkmipclient/kmip.h +index e91857761..3344cb016 100644 +--- a/libkmipclient/kmip.h ++++ b/libkmipclient/kmip.h +@@ -16,6 +16,7 @@ + #include + + #include ++#include + #include + #include + diff --git a/s390utils.spec b/s390utils.spec index 9111266..66d1b54 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -15,17 +15,17 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.29.0 -Release: 6%{?dist} +Version: 2.30.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz # To create the vendor tarball: -# tar xf s390-tools-%%{version}.tar.gz ; pushd s390-tools-%%{version}/rust/pvsecret ; \ +# tar xf s390-tools-%%{version}.tar.gz ; pushd s390-tools-%%{version}/rust ; \ # rm -f Cargo.lock && cargo vendor && \ -# tar Jvcf ../../../s390-tools-%%{version}-rust-vendor.tar.xz vendor/ ; popd +# tar Jvcf ../../s390-tools-%%{version}-rust-vendor.tar.xz vendor/ ; popd Source1: s390-tools-%{version}-rust-vendor.tar.xz Source5: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcpconf.sh Source7: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcp.udev @@ -47,14 +47,9 @@ Source25: 91-zipl.install # change the defaults to match Fedora environment Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch -# https://github.com/ibm-s390-linux/s390-tools/pull/155 -Patch2: snmp-semicolon.patch -# fix build with libxml2-2.12.0 -# https://github.com/ibm-s390-linux/s390-tools/pull/160 -Patch3: libxml2-parser.patch # upstream fixes/updates -#Patch100: s390utils-%%{version}-fedora.patch +Patch100: s390utils-%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -92,17 +87,20 @@ BuildRequires: crate(clap_derive) BuildRequires: crate(colorchoice) BuildRequires: crate(curl) BuildRequires: crate(is-terminal) +BuildRequires: crate(lazy_static) BuildRequires: crate(libc) BuildRequires: crate(log) +BuildRequires: crate(mockito) BuildRequires: crate(openssl) BuildRequires: crate(openssl-probe) BuildRequires: crate(serde) BuildRequires: crate(serde_derive) +BuildRequires: crate(serde_test) BuildRequires: crate(serde_yaml) BuildRequires: crate(strsim) BuildRequires: crate(terminal_size) BuildRequires: crate(thiserror) -BuildRequires: crate(zerocopy) = 0.6.5 +BuildRequires: crate(zerocopy) = 0.6.6 BuildRequires: rust-packaging %endif %endif @@ -126,7 +124,7 @@ popd %else %cargo_prep %endif -rm -rf ./rust/pvsecret/Cargo.lock +rm ./rust/Cargo.lock %endif %build @@ -547,8 +545,9 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/lscss %{_sbindir}/lsdasd %{_sbindir}/lshwc -%{_sbindir}/lsqeth %{_sbindir}/lsluns +%{_sbindir}/lsqeth +%{_sbindir}/lspai %{_sbindir}/lsreipl %{_sbindir}/lsscm %{_sbindir}/lsshut @@ -646,6 +645,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/lsdasd.8* %{_mandir}/man8/lshwc.8* %{_mandir}/man8/lsluns.8* +%{_mandir}/man8/lspai.8* %{_mandir}/man8/lsqeth.8* %{_mandir}/man8/lsreipl.8* %{_mandir}/man8/lsscm.8* @@ -1026,6 +1026,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jan 02 2024 Dan Horák - 2:2.30.0-1 +- rebased to 2.30.0 (rhbz#2252519) + * Fri Dec 01 2023 Fabio Valentini - 2:2.29.0-6 - Rebuild for openssl crate >= v0.10.60 (RUSTSEC-2023-0044, RUSTSEC-2023-0072) diff --git a/snmp-semicolon.patch b/snmp-semicolon.patch deleted file mode 100644 index 131d2a0..0000000 --- a/snmp-semicolon.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruNp a/osasnmpd/ibmOSAMib.h b/osasnmpd/ibmOSAMib.h ---- a/osasnmpd/ibmOSAMib.h 2023-08-30 20:13:41.231150334 +0200 -+++ b/osasnmpd/ibmOSAMib.h 2023-08-30 20:13:27.414030798 +0200 -@@ -16,7 +16,7 @@ - - /* we may use header_generic and header_simple_table from the util_funcs module */ - --config_require(util_funcs) -+config_require(util_funcs); - - - /* function prototypes */ diff --git a/sources b/sources index cb9b8cc..8c0f1fb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.29.0.tar.gz) = 3eeaab0e0c6559b9fb0b4c7cca49358a7cc7fe0cb11684d2d761fe105cc2bfd791d33ecc2070e3dfd877039b68e868699cd3cea318e64aee1cc0f348c7b41617 -SHA512 (s390-tools-2.29.0-rust-vendor.tar.xz) = 7ee717c5848e7b59c3e11ef6b461122e5f1195e67d11e378352b297926b498180222bfc23719d952fb11677a3fd440d299e0035ca6ab0c6d784573e9a5698594 +SHA512 (s390-tools-2.30.0.tar.gz) = 414ce95a0952b7b48aea94661e7a95a26d426ce27136800a91bd1cced46998741229c5d058a9c55484491c771a112e4c1401b569c67a5d52d7ba8d33b1a0cba1 +SHA512 (s390-tools-2.30.0-rust-vendor.tar.xz) = a20a8da5e134883309a88ee1e796dcdd60a191917307fc3d129e1d3a6363117fc6f95c2319cd4b451ea7d3fbd599227a3ae53a8871076613877e15e0a4eda5dd From 3eddb1a0360da6219746ba6963e3138c5546d5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 26 Jan 2024 08:26:23 +0000 Subject: [PATCH 105/141] - add s390utils-se-data as a noarch subpackage with Secure Execution data files --- s390utils.spec | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 66d1b54..bb107af 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,7 +16,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.30.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -65,6 +65,11 @@ Requires: s390utils-cpuplugd = %{epoch}:%{version}-%{release} Requires: s390utils-mon_statd = %{epoch}:%{version}-%{release} Requires: s390utils-iucvterm = %{epoch}:%{version}-%{release} Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} +%else +# +# multiarch package structure +# +Requires: s390utils-se-data = %{epoch}:%{version}-%{release} %endif BuildRequires: make @@ -374,6 +379,7 @@ Requires: ethtool Requires: tar Requires: file Requires: s390utils-core = %{epoch}:%{version}-%{release} +Requires: s390utils-se-data = %{epoch}:%{version}-%{release} %{?systemd_requires} BuildRequires: perl-generators BuildRequires: ncurses-devel @@ -671,7 +677,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/znetconf.8* %{_mandir}/man8/zpcictl.8* %dir %{_datadir}/s390-tools -%{_datadir}/s390-tools/genprotimg/ %{_datadir}/s390-tools/netboot/ %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip @@ -683,6 +688,18 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm # Additional Fedora/RHEL specific stuff /boot/tape0 +%package se-data +License: MIT +Summary: Data for Secure Execution +BuildArch: noarch + +%description se-data +%{summary}. + +%files se-data +%dir %{_datadir}/s390-tools +%{_datadir}/s390-tools/genprotimg/ + # # *********************** s390-tools osasnmpd package *********************** # @@ -1026,6 +1043,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Jan 25 2024 Dan Horák - 2:2.30.0-2 +- add s390utils-se-data as a noarch subpackage with Secure Execution data files + * Tue Jan 02 2024 Dan Horák - 2:2.30.0-1 - rebased to 2.30.0 (rhbz#2252519) From 0226a1b211c6f94017623548bd9f544dd9168299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 5 Feb 2024 11:05:29 +0000 Subject: [PATCH 106/141] - rebased to 2.31.0 (rhbz#2262499) --- s390utils-2.30.0-fedora.patch | 33 --------------------------------- s390utils-2.31.0-fedora.patch | 0 s390utils.spec | 30 ++++++++++++++++++++++++------ sources | 4 ++-- 4 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 s390utils-2.30.0-fedora.patch create mode 100644 s390utils-2.31.0-fedora.patch diff --git a/s390utils-2.30.0-fedora.patch b/s390utils-2.30.0-fedora.patch deleted file mode 100644 index a4bb576..0000000 --- a/s390utils-2.30.0-fedora.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6274294bc5cca34d626125072eb5befdd80d381f Mon Sep 17 00:00:00 2001 -From: Yaakov Selkowitz -Date: Tue, 12 Dec 2023 19:44:05 -0500 -Subject: [PATCH] libkmipclient: Fix build with libxml2-2.12.0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0 - -"Several cyclic dependencies in public header files were fixed. As a -result, certain headers won't include other headers as before." - -Closes: https://github.com/ibm-s390-linux/s390-tools/pull/160 -Signed-off-by: Yaakov Selkowitz -Reviewed-by: Ingo Franzki -Signed-off-by: Jan Höppner ---- - libkmipclient/kmip.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libkmipclient/kmip.h b/libkmipclient/kmip.h -index e91857761..3344cb016 100644 ---- a/libkmipclient/kmip.h -+++ b/libkmipclient/kmip.h -@@ -16,6 +16,7 @@ - #include - - #include -+#include - #include - #include - diff --git a/s390utils-2.31.0-fedora.patch b/s390utils-2.31.0-fedora.patch new file mode 100644 index 0000000..e69de29 diff --git a/s390utils.spec b/s390utils.spec index bb107af..3a3eeca 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -15,8 +15,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.30.0 -Release: 2%{?dist} +Version: 2.31.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -49,7 +49,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%{version}-fedora.patch +#Patch100: s390utils-%%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -105,7 +105,7 @@ BuildRequires: crate(serde_yaml) BuildRequires: crate(strsim) BuildRequires: crate(terminal_size) BuildRequires: crate(thiserror) -BuildRequires: crate(zerocopy) = 0.6.6 +BuildRequires: crate(zerocopy) BuildRequires: rust-packaging %endif %endif @@ -244,12 +244,18 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %doc README.md %license LICENSE %{_bindir}/genprotimg +%if %{with rust} +%{_bindir}/pvapconfig +%endif %{_bindir}/pvattest %{_bindir}/pvextract-hdr %if %{with rust} %{_bindir}/pvsecret %endif %{_mandir}/man1/genprotimg.1* +%if %{with rust} +%{_mandir}/man1/pvapconfig.1* +%endif %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* @@ -261,7 +267,7 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %{_mandir}/man1/pvsecret-create.1* %{_mandir}/man1/pvsecret-list.1* %{_mandir}/man1/pvsecret-lock.1* -%{_mandir}/man1/pvsecret-version.1* +%{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* %endif %dir %{_datadir}/s390-tools @@ -319,7 +325,10 @@ This package provides minimal set of tools needed to system to boot. /lib/s390-tools/cpictl /lib/s390-tools/stage3.bin /lib/s390-tools/zdev_id +/lib/s390-tools/zdev-from-dasd_mod.dasd /lib/s390-tools/zdev-root-update +/lib/s390-tools/zdev-to-dasd_mod.dasd +/lib/s390-tools/zdev-to-rd.znet /lib/s390-tools/zipl.conf %ghost %config(noreplace) %{_sysconfdir}/zipl.conf %config(noreplace) %{_sysconfdir}/ziplenv @@ -583,6 +592,9 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/zpcictl %{_bindir}/dump2tar %{_bindir}/genprotimg +%if %{with rust} +%{_bindir}/pvapconfig +%endif %{_bindir}/mk-s390image %{_bindir}/pvattest %{_bindir}/pvextract-hdr @@ -613,6 +625,9 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_libdir}/zkey/zkey-kmip.so %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/genprotimg.1* +%if %{with rust} +%{_mandir}/man1/pvapconfig.1* +%endif %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* @@ -624,7 +639,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man1/pvsecret-create.1* %{_mandir}/man1/pvsecret-list.1* %{_mandir}/man1/pvsecret-lock.1* -%{_mandir}/man1/pvsecret-version.1* +%{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* %endif %{_mandir}/man1/zkey.1* @@ -1043,6 +1058,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Feb 05 2024 Dan Horák - 2:2.31.0-1 +- rebased to 2.31.0 (rhbz#2262499) + * Thu Jan 25 2024 Dan Horák - 2:2.30.0-2 - add s390utils-se-data as a noarch subpackage with Secure Execution data files diff --git a/sources b/sources index 8c0f1fb..7e4bf25 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.30.0.tar.gz) = 414ce95a0952b7b48aea94661e7a95a26d426ce27136800a91bd1cced46998741229c5d058a9c55484491c771a112e4c1401b569c67a5d52d7ba8d33b1a0cba1 -SHA512 (s390-tools-2.30.0-rust-vendor.tar.xz) = a20a8da5e134883309a88ee1e796dcdd60a191917307fc3d129e1d3a6363117fc6f95c2319cd4b451ea7d3fbd599227a3ae53a8871076613877e15e0a4eda5dd +SHA512 (s390-tools-2.31.0.tar.gz) = d05722dff760605baad92b25a7a9264b3c936ff851b87a02ab39604a74d02ae4e14632d9b3d83eb9cb82a14bfcbb0d40bb4797896051ed3dd36d7690abfb1c64 +SHA512 (s390-tools-2.31.0-rust-vendor.tar.xz) = f9dc2887bb2502ba6f71ef7ea807380c322a46df8c65f0fc7993f3fb4eec4da120369d3e380dbcca9b6250307da0f6236a649504d542f44730e8009ace8ed450 From 882b26e4687aac8b62c050b51ab50dc44a37a1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 5 Feb 2024 11:25:21 +0000 Subject: [PATCH 107/141] unconditionally build with rust --- s390utils.spec | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 3a3eeca..3ab9bab 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -11,8 +11,6 @@ %bcond_with pandoc %endif -%bcond_without rust - Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.31.0 @@ -75,7 +73,6 @@ Requires: s390utils-se-data = %{epoch}:%{version}-%{release} BuildRequires: make BuildRequires: gcc-c++ BuildRequires: glib2-devel -%if %{with rust} %if 0%{?rhel} BuildRequires: libcurl-devel BuildRequires: openssl-devel @@ -108,7 +105,6 @@ BuildRequires: crate(thiserror) BuildRequires: crate(zerocopy) BuildRequires: rust-packaging %endif -%endif %description This is a meta package for installing the default s390-tools sub packages. @@ -121,7 +117,6 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %prep %autosetup -n s390-tools-%{version} -p1 -%if %{with rust} %if 0%{?rhel} pushd rust %cargo_prep -V 1 @@ -130,15 +125,11 @@ popd %cargo_prep %endif rm ./rust/Cargo.lock -%endif %build make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ HAVE_DRACUT=1 \ -%if %{without rust} - HAVE_CARGO=0 \ -%endif %if %{with pandoc} ENABLE_DOC=1 \ %endif @@ -151,9 +142,6 @@ make \ %install make install \ HAVE_DRACUT=1 \ -%if %{without rust} - HAVE_CARGO=0 \ -%endif %if %{with pandoc} ENABLE_DOC=1 \ %endif @@ -244,23 +232,16 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %doc README.md %license LICENSE %{_bindir}/genprotimg -%if %{with rust} %{_bindir}/pvapconfig -%endif %{_bindir}/pvattest %{_bindir}/pvextract-hdr -%if %{with rust} %{_bindir}/pvsecret -%endif %{_mandir}/man1/genprotimg.1* -%if %{with rust} %{_mandir}/man1/pvapconfig.1* -%endif %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* %{_mandir}/man1/pvattest-verify.1* -%if %{with rust} %{_mandir}/man1/pvsecret-add.1* %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* @@ -269,7 +250,6 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %{_mandir}/man1/pvsecret-lock.1* %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* -%endif %dir %{_datadir}/s390-tools %{_datadir}/s390-tools/genprotimg/ @@ -592,15 +572,11 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/zpcictl %{_bindir}/dump2tar %{_bindir}/genprotimg -%if %{with rust} %{_bindir}/pvapconfig -%endif %{_bindir}/mk-s390image %{_bindir}/pvattest %{_bindir}/pvextract-hdr -%if %{with rust} %{_bindir}/pvsecret -%endif %{_bindir}/zkey %{_bindir}/zkey-cryptsetup %{_unitdir}/dumpconf.service @@ -625,14 +601,11 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_libdir}/zkey/zkey-kmip.so %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/genprotimg.1* -%if %{with rust} %{_mandir}/man1/pvapconfig.1* -%endif %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* %{_mandir}/man1/pvattest-verify.1* -%if %{with rust} %{_mandir}/man1/pvsecret-add.1* %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* @@ -641,7 +614,6 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man1/pvsecret-lock.1* %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* -%endif %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* From 93479b677f4fdaba567a3ddda5fb5de876c8e7eb Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 8 Mar 2024 10:45:47 -0500 Subject: [PATCH 108/141] Add 's390-tools' Provides to all packages The upstream name of this is 's390-tools', and nearly all other Linux distributions ship it as such. Make life easier for people by also providing this name. --- s390utils.spec | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 3ab9bab..e89237e 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.31.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -52,6 +52,9 @@ Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} +# Add Provides for upstream name +Provides: s390-tools = %{epoch}:%{version}-%{release} + %ifarch s390x # # s390x/native package structure @@ -268,6 +271,7 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %package core License: MIT Summary: S390 core tools +Provides: s390-tools-core = %{epoch}:%{version}-%{release} Requires: coreutils %{?systemd_requires} # BRs are covered via the base package @@ -362,6 +366,7 @@ This package provides minimal set of tools needed to system to boot. %package base License: MIT AND LGPL-2.1-or-later Summary: S390 base tools +Provides: s390-tools-base = %{epoch}:%{version}-%{release} Requires: gawk sed coreutils Requires: sg3_utils Requires: ethtool @@ -678,6 +683,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %package se-data License: MIT Summary: Data for Secure Execution +Provides: s390-tools-se-data = %{epoch}:%{version}-%{release} BuildArch: noarch %description se-data @@ -692,6 +698,7 @@ BuildArch: noarch # %package osasnmpd Summary: SNMP sub-agent for OSA-Express cards +Provides: s390-tools-osasnmpd = %{epoch}:%{version}-%{release} Requires: net-snmp Requires: psmisc BuildRequires: net-snmp-devel @@ -711,6 +718,7 @@ ATM Ethernet LAN Emulation in QDIO mode. # %package mon_statd Summary: Monitoring daemons for Linux in z/VM +Provides: s390-tools-mon_statd = %{epoch}:%{version}-%{release} Requires: coreutils %{?systemd_requires} @@ -750,6 +758,7 @@ Monitoring daemons for Linux in z/VM: # %package cpuplugd Summary: Daemon that manages CPU and memory resources +Provides: s390-tools-cpuplugd = %{epoch}:%{version}-%{release} %{?systemd_requires} BuildRequires: systemd @@ -779,6 +788,7 @@ memory can be increased or decreased exploiting the CMM1 feature. # %package ziomon Summary: S390 ziomon tools +Provides: s390-tools-ziomon = %{epoch}:%{version}-%{release} Requires: blktrace Requires: coreutils Requires: device-mapper-multipath @@ -817,6 +827,7 @@ Tool set to collect data for zfcp performance analysis and report. # %package iucvterm Summary: z/VM IUCV terminal applications +Provides: s390-tools-iucvterm = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils Requires(post): grep Requires(postun): grep @@ -881,6 +892,7 @@ fi Summary: CMS file system based on FUSE BuildRequires: fuse3-devel Requires: fuse3 +Provides: s390-tools-cmsfs-fuse = %{epoch}:%{version}-%{release} Requires: glibc-gconv-extra Obsoletes: %{name}-cmsfs < 2:2.7.0-3 @@ -901,6 +913,7 @@ Summary: z/OS data set access based on FUSE BuildRequires: fuse3-devel BuildRequires: libcurl-devel Requires: fuse3 +Provides: s390-tools-zdsfs = %{epoch}:%{version}-%{release} %description zdsfs This package contains the z/OS data set access based on FUSE. @@ -916,6 +929,7 @@ This package contains the z/OS data set access based on FUSE. Summary: HMC drive file system based on FUSE BuildRequires: fuse3-devel Requires: fuse3 +Provides: s390-tools-hmcdrvfs = %{epoch}:%{version}-%{release} %description hmcdrvfs This package contains a HMC drive file system based on FUSE and a tool @@ -932,6 +946,7 @@ to list files and directories. # %package cpacfstatsd Summary: Monitor and maintain CPACF activity counters +Provides: s390-tools-cpacfstatsd = %{epoch}:%{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -976,6 +991,7 @@ BuildRequires: pandoc BuildRequires: gawk BuildRequires: gzip BuildRequires: sed +Provides: s390-tools-chreipl-fcp-mpath = %{epoch}:%{version}-%{release} Requires: bash Requires: coreutils Requires: util-linux @@ -1010,7 +1026,7 @@ reconfigures the FCP re-IPL settings to use an operational path. # %package devel Summary: Development files - +Provides: s390-tools-devel = %{epoch}:%{version}-%{release} Requires: %{name}-base%{?_isa} = %{epoch}:%{version}-%{release} %description devel @@ -1030,6 +1046,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Mar 08 2024 Neal Gompa - 2:2.31.0-2 +- Add 's390-tools' Provides to all packages + * Mon Feb 05 2024 Dan Horák - 2:2.31.0-1 - rebased to 2.31.0 (rhbz#2262499) From 38dd409cb6e7dee446533d56efd1e9333b263a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 4 Apr 2024 09:57:42 +0000 Subject: [PATCH 109/141] - rebased to 2.32.0 (rhbz#2273003) --- ...ls-2.31.0-fedora.patch => s390utils-2.32.0-fedora.patch | 0 s390utils.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) rename s390utils-2.31.0-fedora.patch => s390utils-2.32.0-fedora.patch (100%) diff --git a/s390utils-2.31.0-fedora.patch b/s390utils-2.32.0-fedora.patch similarity index 100% rename from s390utils-2.31.0-fedora.patch rename to s390utils-2.32.0-fedora.patch diff --git a/s390utils.spec b/s390utils.spec index e89237e..cd86156 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -13,8 +13,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.31.0 -Release: 2%{?dist} +Version: 2.32.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -1046,6 +1046,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Apr 04 2024 Dan Horák - 2:2.32.0-1 +- rebased to 2.32.0 (rhbz#2273003) + * Fri Mar 08 2024 Neal Gompa - 2:2.31.0-2 - Add 's390-tools' Provides to all packages diff --git a/sources b/sources index 7e4bf25..c85491e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.31.0.tar.gz) = d05722dff760605baad92b25a7a9264b3c936ff851b87a02ab39604a74d02ae4e14632d9b3d83eb9cb82a14bfcbb0d40bb4797896051ed3dd36d7690abfb1c64 -SHA512 (s390-tools-2.31.0-rust-vendor.tar.xz) = f9dc2887bb2502ba6f71ef7ea807380c322a46df8c65f0fc7993f3fb4eec4da120369d3e380dbcca9b6250307da0f6236a649504d542f44730e8009ace8ed450 +SHA512 (s390-tools-2.32.0.tar.gz) = 88678b577a036e726b03c8725c548ead814563235b06cece789c66b33c943b6757597abc3f0ea8f5c933fed57a7fa7df668a0eb7a7aa7efda550aebba4707fb4 +SHA512 (s390-tools-2.32.0-rust-vendor.tar.xz) = c0dff24f4f8e08b81e8752c868697a278fd7056e17acbbc244ef403eaacb1b3ba5cf379718760e8ec7999791e45add21db1a45724a19fbc2c4499ff7fb26f388 From 4a01dbe43e5b592c6b5a5e9e0d55c0fcf2bb66f4 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 21 May 2024 18:51:12 -0400 Subject: [PATCH 110/141] Update Rust macro usage The rust-toolset macros in RHEL 10 are now compatible with Fedora's in terms of handling vendoring and automatic generation of license information and bundled provides. --- s390utils.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index cd86156..3d15e98 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -122,7 +122,8 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %if 0%{?rhel} pushd rust -%cargo_prep -V 1 +tar xf %{SOURCE1} +%cargo_prep -v vendor popd %else %cargo_prep @@ -141,6 +142,14 @@ make \ DISTRELEASE=%{release} \ V=1 +pushd rust +%cargo_license_summary +%{cargo_license} > LICENSE.dependencies +%if 0%{?rhel} +%cargo_vendor_manifest +%endif +popd + %install make install \ @@ -234,6 +243,10 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %files %doc README.md %license LICENSE +%license rust/LICENSE.dependencies +%if 0%{?rhel} +%license rust/cargo-vendor.txt +%endif %{_bindir}/genprotimg %{_bindir}/pvapconfig %{_bindir}/pvattest @@ -528,6 +541,10 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %files base %doc README.md zdev/src/lszdev_usage.txt +%license rust/LICENSE.dependencies +%if 0%{?rhel} +%license rust/cargo-vendor.txt +%endif %{_sbindir}/chccwdev %{_sbindir}/chchp %{_sbindir}/chcpumf From 7471fc863b7e75518e630e86a49768cf90b85b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 28 May 2024 09:37:35 +0000 Subject: [PATCH 111/141] - rebased to 2.33.1 (rhbz#2283542) --- s390utils.spec | 7 ++++++- sources | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 3d15e98..a64d441 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -13,7 +13,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.32.0 +Version: 2.33.1 Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files @@ -548,6 +548,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/chccwdev %{_sbindir}/chchp %{_sbindir}/chcpumf +%{_sbindir}/chpstat %{_sbindir}/chshut %{_sbindir}/chzcrypt %{_sbindir}/dasdstat @@ -645,6 +646,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_mandir}/man8/chccwdev.8* %{_mandir}/man8/chchp.8* %{_mandir}/man8/chcpumf.8* +%{_mandir}/man8/chpstat.8* %{_mandir}/man8/chshut.8* %{_mandir}/man8/chzcrypt.8* %{_mandir}/man8/dasdstat.8* @@ -1063,6 +1065,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue May 28 2024 Dan Horák - 2:2.33.1-1 +- rebased to 2.33.1 (rhbz#2283542) + * Thu Apr 04 2024 Dan Horák - 2:2.32.0-1 - rebased to 2.32.0 (rhbz#2273003) diff --git a/sources b/sources index c85491e..e20d197 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.32.0.tar.gz) = 88678b577a036e726b03c8725c548ead814563235b06cece789c66b33c943b6757597abc3f0ea8f5c933fed57a7fa7df668a0eb7a7aa7efda550aebba4707fb4 -SHA512 (s390-tools-2.32.0-rust-vendor.tar.xz) = c0dff24f4f8e08b81e8752c868697a278fd7056e17acbbc244ef403eaacb1b3ba5cf379718760e8ec7999791e45add21db1a45724a19fbc2c4499ff7fb26f388 +SHA512 (s390-tools-2.33.1.tar.gz) = 8e5cba1e5264787a2f89b340d4d9372df7cd28ae9fa263dcbc6cbbf460e48c1db167110ff901f35f82e36d0d8c97105acd7167b40d889a829c71b182e175b96c +SHA512 (s390-tools-2.33.1-rust-vendor.tar.xz) = 12b0d3af1eba223b63028b5fec85ff4cc79ec646671e56d4c3606b0b4a9d3f79469dc860141ff86e9a0fd2bc1d54f32f2588615997a9865adbe20a110237b98d From b2e91e120ae4b10bcfd82915458612f69d9a6a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 20 Jun 2024 10:18:37 +0200 Subject: [PATCH 112/141] Add which as a dependency for base and ziomon subpackages Some tools in the base and ziomon subpackages require which, so add the depedency explictly. --- s390utils.spec | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index a64d441..d671602 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.33.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -380,11 +380,14 @@ This package provides minimal set of tools needed to system to boot. License: MIT AND LGPL-2.1-or-later Summary: S390 base tools Provides: s390-tools-base = %{epoch}:%{version}-%{release} -Requires: gawk sed coreutils -Requires: sg3_utils +Requires: coreutils Requires: ethtool -Requires: tar Requires: file +Requires: gawk +Requires: sed +Requires: sg3_utils +Requires: tar +Requires: which Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-se-data = %{epoch}:%{version}-%{release} %{?systemd_requires} @@ -819,6 +822,7 @@ Requires: rsync Requires: sed Requires: tar Requires: util-linux +Requires: which %description ziomon Tool set to collect data for zfcp performance analysis and report. @@ -1065,6 +1069,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Jun 20 2024 Dan Horák - 2:2.33.1-2 +- add which as a dependency for base and ziomon subpackages (RHEL-38488) + * Tue May 28 2024 Dan Horák - 2:2.33.1-1 - rebased to 2.33.1 (rhbz#2283542) From 32cf987a5468f76c13fe0a5b733b82490e5e7d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 26 Jun 2024 15:26:25 +0000 Subject: [PATCH 113/141] update fedora patch filename for 2.33.1 --- s390utils-2.32.0-fedora.patch => s390utils-2.33.1-fedora.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename s390utils-2.32.0-fedora.patch => s390utils-2.33.1-fedora.patch (100%) diff --git a/s390utils-2.32.0-fedora.patch b/s390utils-2.33.1-fedora.patch similarity index 100% rename from s390utils-2.32.0-fedora.patch rename to s390utils-2.33.1-fedora.patch From fdae42f94f2a5843a78f9e60c0774917ded9bfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 15 Jul 2024 13:27:44 +0200 Subject: [PATCH 114/141] - "which" is not required any more - Revert "zipl/src: Fix problems when target parameters are specified by user" --- s390utils-2.33.1-fedora.patch | 311 ++++++++++++++++++++++++++++++++++ s390utils.spec | 10 +- 2 files changed, 317 insertions(+), 4 deletions(-) diff --git a/s390utils-2.33.1-fedora.patch b/s390utils-2.33.1-fedora.patch index e69de29..c97b193 100644 --- a/s390utils-2.33.1-fedora.patch +++ b/s390utils-2.33.1-fedora.patch @@ -0,0 +1,311 @@ +From ab26b43985f44b71abf40f8d0e50bfbd0808f8b9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20H=C3=B6ppner?= +Date: Fri, 14 Jun 2024 14:25:40 +0200 +Subject: [PATCH 1/2] s390-tools: Replace 'which' with built-in 'command -v' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There are still a few scripts using the 'which' command to determine +either the full path or the mere existence of an executable. +Some of these scripts might run in minimal environments where 'which' is +not available due to dependency restriction. 'which' is also considered +unreliable for historical implementation details. + +Use the POSIX defined [1] built-in 'command -v' instead to reduce +package dependencies and improve reliability. + +[1] https://pubs.opengroup.org/onlinepubs/9699919799/ +Reviewed-by: Benjamin Block +Signed-off-by: Jan Höppner +Signed-off-by: Steffen Eiden +(cherry picked from commit 0b0960254e8c2b556cefa97f83651a92f54a5e42) +--- + iucvterm/doc/ts-shell/iucvconn_on_login | 2 +- + netboot/mk-pxelinux-ramfs | 2 +- + ziomon/ziomon | 3 +-- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/iucvterm/doc/ts-shell/iucvconn_on_login b/iucvterm/doc/ts-shell/iucvconn_on_login +index 860c4cc..92010df 100755 +--- a/iucvterm/doc/ts-shell/iucvconn_on_login ++++ b/iucvterm/doc/ts-shell/iucvconn_on_login +@@ -15,7 +15,7 @@ + prog_name=`basename $0` + guest_name=${USER:-`whoami 2>/dev/null`} + terminal=lnxhvc0 +-iucvconn=`which iucvconn 2>/dev/null` ++iucvconn=`command -v iucvconn 2>/dev/null` + + __error() { + printf "$prog_name: $@\n" >&2 +diff --git a/netboot/mk-pxelinux-ramfs b/netboot/mk-pxelinux-ramfs +index 64ebde1..07f8b07 100755 +--- a/netboot/mk-pxelinux-ramfs ++++ b/netboot/mk-pxelinux-ramfs +@@ -127,7 +127,7 @@ echo "$cmd: Copying kexec" + # Install both binary and required shared libraries + OLDPATH=$PATH + PATH=$OLDPATH:/sbin:/usr/sbin +-kexec_bin=$(which kexec) ++kexec_bin=$(command -v kexec) + kexec_sos=$(sharedobjs $kexec_bin) + PATH=$OLDPATH + +diff --git a/ziomon/ziomon b/ziomon/ziomon +index fd6248a..d1545cc 100755 +--- a/ziomon/ziomon ++++ b/ziomon/ziomon +@@ -667,8 +667,7 @@ function check_free_space_mileage() { + + + function check_blktrace() { +- which blktrace >/dev/null 2>&1; +- if [ $? -ne 0 ]; then ++ if ! command -v blktrace >/dev/null 2>&1; then + echo "$WRP_TOOLNAME: Could not find blktrace. Please make sure that the blktrace package is installed and matches the level in the documentation."; + exit 1; + fi +-- +2.45.2 + + +From 9770d8bff4b2ef6f01af1c273d1eac121b672a85 Mon Sep 17 00:00:00 2001 +From: Marc Hartmayer +Date: Thu, 6 Jun 2024 15:07:45 +0000 +Subject: [PATCH 2/2] Revert "zipl/src: Fix problems when target parameters are + specified by user" + +The commit fb0b6263d1a9 ("zipl/src: Fix problems when target parameters +are specified by user") breaks the case where the user has to provide +all target attributes via the zipl command line, because the target +device cannot be used to retrieve those attributes. + +$ zipl -V --blsdir /tmp/tmp.xHmFUdgBCi/boot//loader/entries/ --config /tmp/tmp.dSv9MJ3svs +Looking for components in '/lib/s390-tools' +Using config file '/tmp/tmp.dSv9MJ3svs' (from command line) +Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//50_normal.conf' +Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//45_normal_swiotlb.conf' +Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//40_pv.conf' +Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//30_pv_reboot.conf' +Secure boot support: yes +Target device information + Device..........................: 2b:00 + Device name.....................: nbd0 *) + Device driver name..............: nbd + Type............................: disk device + Disk layout.....................: SCSI disk layout *) + Geometry - start................: 2048 *) + File system block size..........: 4096 + Physical block size.............: 512 *) + Device size in physical blocks..: 2095071 + *) Data provided by user. +Building bootmap in '/tmp/tmp.xHmFUdgBCi/boot/' +Building menu 'zipl-automatic-menu' +Adding #1: IPL section 'Normal Guest' (default) + initial ramdisk...: /tmp/tmp.xHmFUdgBCi/boot//ramdisk-s390x + kernel image......: /tmp/tmp.xHmFUdgBCi/boot//vmlinux-s390x +zIPL environment block content: +Error: Could not add image file '/tmp/tmp.xHmFUdgBCi/boot//vmlinux-s390x': Could not get disk geometry + +This reverts commit fb0b6263d1a9a497760a21ccb178748ec5ccf955. + +Acked-by: Eduard Shishkin +Signed-off-by: Marc Hartmayer +Signed-off-by: Steffen Eiden +(cherry picked from commit 63ff07ba38dda99e2661a097d05266555c727a2e) +--- + zipl/include/job.h | 1 - + zipl/src/bootmap.c | 40 +++++++++++++++++++--------------------- + zipl/src/disk.c | 3 --- + zipl/src/job.c | 3 ++- + 4 files changed, 21 insertions(+), 26 deletions(-) + +diff --git a/zipl/include/job.h b/zipl/include/job.h +index e46788b..597d400 100644 +--- a/zipl/include/job.h ++++ b/zipl/include/job.h +@@ -152,7 +152,6 @@ static inline int target_parameters_are_set(struct job_target_data *td) + + int job_get(int argc, char* argv[], struct job_data** data); + void job_free(struct job_data* job); +-void free_target_data(struct job_target_data *td); + int type_from_target(char *target, disk_type_t *type); + int check_job_dump_images(struct job_dump_data* dump, char* name); + int check_job_images_ngdump(struct job_dump_data* dump, char* name); +diff --git a/zipl/src/bootmap.c b/zipl/src/bootmap.c +index 82b77d0..f6f5bac 100644 +--- a/zipl/src/bootmap.c ++++ b/zipl/src/bootmap.c +@@ -304,6 +304,7 @@ static int add_component_file_range(struct install_set *bis, + address_t load_address, + size_t trailer, void *component, + int add_files, ++ struct job_target_data *target, + int comp_id, int menu_idx, + int program_table_id) + { +@@ -338,15 +339,8 @@ static int add_component_file_range(struct install_set *bis, + return -1; + } + } else { +- /* +- * Make sure that file is on target device. +- * For this, retrieve info of the underlying disk without +- * any user hints +- */ +- struct job_target_data tmp = {.source = source_unknown}; +- +- rc = disk_get_info_from_file(filename, &tmp, &file_info); +- free_target_data(&tmp); ++ /* Make sure file is on correct device */ ++ rc = disk_get_info_from_file(filename, target, &file_info); + if (rc) + return -1; + if (file_info->device != bis->info->device) { +@@ -383,11 +377,12 @@ write_segment_table: + static int add_component_file(struct install_set *bis, const char *filename, + address_t load_address, size_t trailer, + void *component, int add_files, +- int comp_id, int menu_idx, int program_table_id) ++ struct job_target_data *target, int comp_id, ++ int menu_idx, int program_table_id) + { + return add_component_file_range(bis, filename, NULL, load_address, + trailer, component, add_files, +- comp_id, menu_idx, ++ target, comp_id, menu_idx, + program_table_id); + } + +@@ -549,7 +544,8 @@ static int add_ipl_program(struct install_set *bis, char *filename, + bool add_envblk, struct job_envblk_data *envblk, + struct job_ipl_data *ipl, disk_blockptr_t *program, + int verbose, int add_files, component_header_type type, +- int is_secure, int menu_idx, int program_table_id) ++ struct job_target_data *target, int is_secure, ++ int menu_idx, int program_table_id) + { + struct signature_header sig_head; + size_t ramdisk_size, image_size; +@@ -671,7 +667,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, + /* Add stage 3 loader to bootmap */ + rc = add_component_file(bis, ZIPL_STAGE3_PATH, STAGE3_LOAD_ADDRESS, + signature_size, VOID_ADD(table, offset), 1, +- COMPONENT_ID_LOADER, menu_idx, ++ target, COMPONENT_ID_LOADER, menu_idx, + program_table_id); + if (rc) { + error_text("Could not add internal loader file '%s'", +@@ -749,7 +745,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, + + rc = add_component_file(bis, ipl->common.image, ipl->common.image_addr, + signature_size, VOID_ADD(table, offset), +- add_files, COMPONENT_ID_KERNEL_IMAGE, ++ add_files, target, COMPONENT_ID_KERNEL_IMAGE, + menu_idx, program_table_id); + if (rc) { + error_text("Could not add image file '%s'", ipl->common.image); +@@ -809,7 +805,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, + ipl->common.ramdisk_addr, + signature_size, + VOID_ADD(table, offset), +- add_files, COMPONENT_ID_RAMDISK, ++ add_files, target, COMPONENT_ID_RAMDISK, + menu_idx, program_table_id); + if (rc) { + error_text("Could not add ramdisk '%s'", +@@ -865,7 +861,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, + rc = add_component_file_range(bis, filename, ®, + ipl->envblk_addr, 0, + VOID_ADD(table, offset), +- 0, ++ 0, target, + COMPONENT_ID_ENVBLK, + menu_idx, + program_table_id); +@@ -897,6 +893,7 @@ static int add_segment_program(struct install_set *bis, + struct job_segment_data *segment, + disk_blockptr_t *program, int verbose, + int add_files, component_header_type type, ++ struct job_target_data *target, + int program_table_id) + { + void *table; +@@ -916,7 +913,7 @@ static int add_segment_program(struct install_set *bis, + printf(" segment file......: %s\n", segment->segment); + + rc = add_component_file(bis, segment->segment, segment->segment_addr, 0, +- VOID_ADD(table, offset), add_files, ++ VOID_ADD(table, offset), add_files, target, + COMPONENT_ID_SEGMENT_FILE, 0 /* menu_idx */, + program_table_id); + if (rc) { +@@ -999,7 +996,7 @@ static int add_dump_program(struct install_set *bis, struct job_data *job, + ipl.common.parmline = dump->common.parmline; + ipl.common.parm_addr = dump->common.parm_addr; + return add_ipl_program(bis, NULL, false, NULL, &ipl, program, +- verbose, 1, type, SECURE_BOOT_DISABLED, ++ verbose, 1, type, target, SECURE_BOOT_DISABLED, + 0 /* menu_idx */, program_table_id); + } + +@@ -1044,7 +1041,8 @@ static int build_program_table(struct job_data *job, + true, &job->envblk, &job->data.ipl, + &table[0], verbose || job->command_line, + job->add_files, component_header, +- job->is_secure, 0, program_table_id); ++ &job->target, job->is_secure, 0, ++ program_table_id); + break; + case job_segment: + if (bis->print_details) { +@@ -1057,7 +1055,7 @@ static int build_program_table(struct job_data *job, + rc = add_segment_program(bis, &job->data.segment, &table[0], + verbose || job->command_line, + job->add_files, COMPONENT_HEADER_IPL, +- program_table_id); ++ &job->target, program_table_id); + break; + case job_dump_partition: + /* Only useful for a partition dump that uses a dump kernel*/ +@@ -1116,7 +1114,7 @@ static int build_program_table(struct job_data *job, + &table[job->data.menu.entry[i].pos], + verbose || job->command_line, + job->add_files, component_header, +- is_secure, i, ++ &job->target, is_secure, i, + program_table_id); + break; + case job_print_usage: +diff --git a/zipl/src/disk.c b/zipl/src/disk.c +index b4bd49a..38a637c 100644 +--- a/zipl/src/disk.c ++++ b/zipl/src/disk.c +@@ -528,9 +528,6 @@ static int disk_set_info_complete(struct job_target_data *td, + * config file, or special "target options" of zipl tool. + * If target parameters were specified by user, then the step 1 above + * is skipped. +- +- * To exclude any user assumptions about the DEVICE, this function +- * should be called with TD pointing to a zeroed structure. + * + * DEVICE: logical, or physical device, optionally formated with a + * file system. +diff --git a/zipl/src/job.c b/zipl/src/job.c +index 2066402..27f0181 100644 +--- a/zipl/src/job.c ++++ b/zipl/src/job.c +@@ -370,7 +370,8 @@ get_command_line(int argc, char* argv[], struct command_line* line) + } + + +-void free_target_data(struct job_target_data *data) ++static void ++free_target_data(struct job_target_data* data) + { + free(data->bootmap_dir); + free(data->targetbase); +-- +2.45.2 + diff --git a/s390utils.spec b/s390utils.spec index d671602..3fc3870 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.33.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -47,7 +47,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -#Patch100: s390utils-%%{version}-fedora.patch +Patch100: s390utils-%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -387,7 +387,6 @@ Requires: gawk Requires: sed Requires: sg3_utils Requires: tar -Requires: which Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-se-data = %{epoch}:%{version}-%{release} %{?systemd_requires} @@ -822,7 +821,6 @@ Requires: rsync Requires: sed Requires: tar Requires: util-linux -Requires: which %description ziomon Tool set to collect data for zfcp performance analysis and report. @@ -1069,6 +1067,10 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jul 15 2024 Dan Horák - 2:2.33.1-3 +- "which" is not required any more +- Revert "zipl/src: Fix problems when target parameters are specified by user" + * Thu Jun 20 2024 Dan Horák - 2:2.33.1-2 - add which as a dependency for base and ziomon subpackages (RHEL-38488) From 9aeeea236fc9054171ce34c425a90ec0a858d304 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 04:41:16 +0000 Subject: [PATCH 115/141] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 3fc3870..d3ad760 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.33.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -1067,6 +1067,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 2:2.33.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jul 15 2024 Dan Horák - 2:2.33.1-3 - "which" is not required any more - Revert "zipl/src: Fix problems when target parameters are specified by user" From 4ac12c1bd1b4687eb489583cc88ec404c0364b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 12 Aug 2024 11:52:33 +0000 Subject: [PATCH 116/141] - rebased to 2.34.0 (rhbz#2302462) --- s390utils-2.33.1-fedora.patch | 311 ---------------------------------- s390utils-2.34.0-fedora.patch | 0 s390utils.spec | 9 +- sources | 4 +- 4 files changed, 8 insertions(+), 316 deletions(-) delete mode 100644 s390utils-2.33.1-fedora.patch create mode 100644 s390utils-2.34.0-fedora.patch diff --git a/s390utils-2.33.1-fedora.patch b/s390utils-2.33.1-fedora.patch deleted file mode 100644 index c97b193..0000000 --- a/s390utils-2.33.1-fedora.patch +++ /dev/null @@ -1,311 +0,0 @@ -From ab26b43985f44b71abf40f8d0e50bfbd0808f8b9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20H=C3=B6ppner?= -Date: Fri, 14 Jun 2024 14:25:40 +0200 -Subject: [PATCH 1/2] s390-tools: Replace 'which' with built-in 'command -v' -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -There are still a few scripts using the 'which' command to determine -either the full path or the mere existence of an executable. -Some of these scripts might run in minimal environments where 'which' is -not available due to dependency restriction. 'which' is also considered -unreliable for historical implementation details. - -Use the POSIX defined [1] built-in 'command -v' instead to reduce -package dependencies and improve reliability. - -[1] https://pubs.opengroup.org/onlinepubs/9699919799/ -Reviewed-by: Benjamin Block -Signed-off-by: Jan Höppner -Signed-off-by: Steffen Eiden -(cherry picked from commit 0b0960254e8c2b556cefa97f83651a92f54a5e42) ---- - iucvterm/doc/ts-shell/iucvconn_on_login | 2 +- - netboot/mk-pxelinux-ramfs | 2 +- - ziomon/ziomon | 3 +-- - 3 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/iucvterm/doc/ts-shell/iucvconn_on_login b/iucvterm/doc/ts-shell/iucvconn_on_login -index 860c4cc..92010df 100755 ---- a/iucvterm/doc/ts-shell/iucvconn_on_login -+++ b/iucvterm/doc/ts-shell/iucvconn_on_login -@@ -15,7 +15,7 @@ - prog_name=`basename $0` - guest_name=${USER:-`whoami 2>/dev/null`} - terminal=lnxhvc0 --iucvconn=`which iucvconn 2>/dev/null` -+iucvconn=`command -v iucvconn 2>/dev/null` - - __error() { - printf "$prog_name: $@\n" >&2 -diff --git a/netboot/mk-pxelinux-ramfs b/netboot/mk-pxelinux-ramfs -index 64ebde1..07f8b07 100755 ---- a/netboot/mk-pxelinux-ramfs -+++ b/netboot/mk-pxelinux-ramfs -@@ -127,7 +127,7 @@ echo "$cmd: Copying kexec" - # Install both binary and required shared libraries - OLDPATH=$PATH - PATH=$OLDPATH:/sbin:/usr/sbin --kexec_bin=$(which kexec) -+kexec_bin=$(command -v kexec) - kexec_sos=$(sharedobjs $kexec_bin) - PATH=$OLDPATH - -diff --git a/ziomon/ziomon b/ziomon/ziomon -index fd6248a..d1545cc 100755 ---- a/ziomon/ziomon -+++ b/ziomon/ziomon -@@ -667,8 +667,7 @@ function check_free_space_mileage() { - - - function check_blktrace() { -- which blktrace >/dev/null 2>&1; -- if [ $? -ne 0 ]; then -+ if ! command -v blktrace >/dev/null 2>&1; then - echo "$WRP_TOOLNAME: Could not find blktrace. Please make sure that the blktrace package is installed and matches the level in the documentation."; - exit 1; - fi --- -2.45.2 - - -From 9770d8bff4b2ef6f01af1c273d1eac121b672a85 Mon Sep 17 00:00:00 2001 -From: Marc Hartmayer -Date: Thu, 6 Jun 2024 15:07:45 +0000 -Subject: [PATCH 2/2] Revert "zipl/src: Fix problems when target parameters are - specified by user" - -The commit fb0b6263d1a9 ("zipl/src: Fix problems when target parameters -are specified by user") breaks the case where the user has to provide -all target attributes via the zipl command line, because the target -device cannot be used to retrieve those attributes. - -$ zipl -V --blsdir /tmp/tmp.xHmFUdgBCi/boot//loader/entries/ --config /tmp/tmp.dSv9MJ3svs -Looking for components in '/lib/s390-tools' -Using config file '/tmp/tmp.dSv9MJ3svs' (from command line) -Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//50_normal.conf' -Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//45_normal_swiotlb.conf' -Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//40_pv.conf' -Using BLS config file '/tmp/tmp.xHmFUdgBCi/boot//loader/entries//30_pv_reboot.conf' -Secure boot support: yes -Target device information - Device..........................: 2b:00 - Device name.....................: nbd0 *) - Device driver name..............: nbd - Type............................: disk device - Disk layout.....................: SCSI disk layout *) - Geometry - start................: 2048 *) - File system block size..........: 4096 - Physical block size.............: 512 *) - Device size in physical blocks..: 2095071 - *) Data provided by user. -Building bootmap in '/tmp/tmp.xHmFUdgBCi/boot/' -Building menu 'zipl-automatic-menu' -Adding #1: IPL section 'Normal Guest' (default) - initial ramdisk...: /tmp/tmp.xHmFUdgBCi/boot//ramdisk-s390x - kernel image......: /tmp/tmp.xHmFUdgBCi/boot//vmlinux-s390x -zIPL environment block content: -Error: Could not add image file '/tmp/tmp.xHmFUdgBCi/boot//vmlinux-s390x': Could not get disk geometry - -This reverts commit fb0b6263d1a9a497760a21ccb178748ec5ccf955. - -Acked-by: Eduard Shishkin -Signed-off-by: Marc Hartmayer -Signed-off-by: Steffen Eiden -(cherry picked from commit 63ff07ba38dda99e2661a097d05266555c727a2e) ---- - zipl/include/job.h | 1 - - zipl/src/bootmap.c | 40 +++++++++++++++++++--------------------- - zipl/src/disk.c | 3 --- - zipl/src/job.c | 3 ++- - 4 files changed, 21 insertions(+), 26 deletions(-) - -diff --git a/zipl/include/job.h b/zipl/include/job.h -index e46788b..597d400 100644 ---- a/zipl/include/job.h -+++ b/zipl/include/job.h -@@ -152,7 +152,6 @@ static inline int target_parameters_are_set(struct job_target_data *td) - - int job_get(int argc, char* argv[], struct job_data** data); - void job_free(struct job_data* job); --void free_target_data(struct job_target_data *td); - int type_from_target(char *target, disk_type_t *type); - int check_job_dump_images(struct job_dump_data* dump, char* name); - int check_job_images_ngdump(struct job_dump_data* dump, char* name); -diff --git a/zipl/src/bootmap.c b/zipl/src/bootmap.c -index 82b77d0..f6f5bac 100644 ---- a/zipl/src/bootmap.c -+++ b/zipl/src/bootmap.c -@@ -304,6 +304,7 @@ static int add_component_file_range(struct install_set *bis, - address_t load_address, - size_t trailer, void *component, - int add_files, -+ struct job_target_data *target, - int comp_id, int menu_idx, - int program_table_id) - { -@@ -338,15 +339,8 @@ static int add_component_file_range(struct install_set *bis, - return -1; - } - } else { -- /* -- * Make sure that file is on target device. -- * For this, retrieve info of the underlying disk without -- * any user hints -- */ -- struct job_target_data tmp = {.source = source_unknown}; -- -- rc = disk_get_info_from_file(filename, &tmp, &file_info); -- free_target_data(&tmp); -+ /* Make sure file is on correct device */ -+ rc = disk_get_info_from_file(filename, target, &file_info); - if (rc) - return -1; - if (file_info->device != bis->info->device) { -@@ -383,11 +377,12 @@ write_segment_table: - static int add_component_file(struct install_set *bis, const char *filename, - address_t load_address, size_t trailer, - void *component, int add_files, -- int comp_id, int menu_idx, int program_table_id) -+ struct job_target_data *target, int comp_id, -+ int menu_idx, int program_table_id) - { - return add_component_file_range(bis, filename, NULL, load_address, - trailer, component, add_files, -- comp_id, menu_idx, -+ target, comp_id, menu_idx, - program_table_id); - } - -@@ -549,7 +544,8 @@ static int add_ipl_program(struct install_set *bis, char *filename, - bool add_envblk, struct job_envblk_data *envblk, - struct job_ipl_data *ipl, disk_blockptr_t *program, - int verbose, int add_files, component_header_type type, -- int is_secure, int menu_idx, int program_table_id) -+ struct job_target_data *target, int is_secure, -+ int menu_idx, int program_table_id) - { - struct signature_header sig_head; - size_t ramdisk_size, image_size; -@@ -671,7 +667,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, - /* Add stage 3 loader to bootmap */ - rc = add_component_file(bis, ZIPL_STAGE3_PATH, STAGE3_LOAD_ADDRESS, - signature_size, VOID_ADD(table, offset), 1, -- COMPONENT_ID_LOADER, menu_idx, -+ target, COMPONENT_ID_LOADER, menu_idx, - program_table_id); - if (rc) { - error_text("Could not add internal loader file '%s'", -@@ -749,7 +745,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, - - rc = add_component_file(bis, ipl->common.image, ipl->common.image_addr, - signature_size, VOID_ADD(table, offset), -- add_files, COMPONENT_ID_KERNEL_IMAGE, -+ add_files, target, COMPONENT_ID_KERNEL_IMAGE, - menu_idx, program_table_id); - if (rc) { - error_text("Could not add image file '%s'", ipl->common.image); -@@ -809,7 +805,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, - ipl->common.ramdisk_addr, - signature_size, - VOID_ADD(table, offset), -- add_files, COMPONENT_ID_RAMDISK, -+ add_files, target, COMPONENT_ID_RAMDISK, - menu_idx, program_table_id); - if (rc) { - error_text("Could not add ramdisk '%s'", -@@ -865,7 +861,7 @@ static int add_ipl_program(struct install_set *bis, char *filename, - rc = add_component_file_range(bis, filename, ®, - ipl->envblk_addr, 0, - VOID_ADD(table, offset), -- 0, -+ 0, target, - COMPONENT_ID_ENVBLK, - menu_idx, - program_table_id); -@@ -897,6 +893,7 @@ static int add_segment_program(struct install_set *bis, - struct job_segment_data *segment, - disk_blockptr_t *program, int verbose, - int add_files, component_header_type type, -+ struct job_target_data *target, - int program_table_id) - { - void *table; -@@ -916,7 +913,7 @@ static int add_segment_program(struct install_set *bis, - printf(" segment file......: %s\n", segment->segment); - - rc = add_component_file(bis, segment->segment, segment->segment_addr, 0, -- VOID_ADD(table, offset), add_files, -+ VOID_ADD(table, offset), add_files, target, - COMPONENT_ID_SEGMENT_FILE, 0 /* menu_idx */, - program_table_id); - if (rc) { -@@ -999,7 +996,7 @@ static int add_dump_program(struct install_set *bis, struct job_data *job, - ipl.common.parmline = dump->common.parmline; - ipl.common.parm_addr = dump->common.parm_addr; - return add_ipl_program(bis, NULL, false, NULL, &ipl, program, -- verbose, 1, type, SECURE_BOOT_DISABLED, -+ verbose, 1, type, target, SECURE_BOOT_DISABLED, - 0 /* menu_idx */, program_table_id); - } - -@@ -1044,7 +1041,8 @@ static int build_program_table(struct job_data *job, - true, &job->envblk, &job->data.ipl, - &table[0], verbose || job->command_line, - job->add_files, component_header, -- job->is_secure, 0, program_table_id); -+ &job->target, job->is_secure, 0, -+ program_table_id); - break; - case job_segment: - if (bis->print_details) { -@@ -1057,7 +1055,7 @@ static int build_program_table(struct job_data *job, - rc = add_segment_program(bis, &job->data.segment, &table[0], - verbose || job->command_line, - job->add_files, COMPONENT_HEADER_IPL, -- program_table_id); -+ &job->target, program_table_id); - break; - case job_dump_partition: - /* Only useful for a partition dump that uses a dump kernel*/ -@@ -1116,7 +1114,7 @@ static int build_program_table(struct job_data *job, - &table[job->data.menu.entry[i].pos], - verbose || job->command_line, - job->add_files, component_header, -- is_secure, i, -+ &job->target, is_secure, i, - program_table_id); - break; - case job_print_usage: -diff --git a/zipl/src/disk.c b/zipl/src/disk.c -index b4bd49a..38a637c 100644 ---- a/zipl/src/disk.c -+++ b/zipl/src/disk.c -@@ -528,9 +528,6 @@ static int disk_set_info_complete(struct job_target_data *td, - * config file, or special "target options" of zipl tool. - * If target parameters were specified by user, then the step 1 above - * is skipped. -- -- * To exclude any user assumptions about the DEVICE, this function -- * should be called with TD pointing to a zeroed structure. - * - * DEVICE: logical, or physical device, optionally formated with a - * file system. -diff --git a/zipl/src/job.c b/zipl/src/job.c -index 2066402..27f0181 100644 ---- a/zipl/src/job.c -+++ b/zipl/src/job.c -@@ -370,7 +370,8 @@ get_command_line(int argc, char* argv[], struct command_line* line) - } - - --void free_target_data(struct job_target_data *data) -+static void -+free_target_data(struct job_target_data* data) - { - free(data->bootmap_dir); - free(data->targetbase); --- -2.45.2 - diff --git a/s390utils-2.34.0-fedora.patch b/s390utils-2.34.0-fedora.patch new file mode 100644 index 0000000..e69de29 diff --git a/s390utils.spec b/s390utils.spec index d3ad760..6bf2935 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -13,8 +13,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.33.1 -Release: 4%{?dist} +Version: 2.34.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -47,7 +47,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%{version}-fedora.patch +#Patch100: s390utils-%%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -1067,6 +1067,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Aug 12 2024 Dan Horák - 2:2.34.0-1 +- rebased to 2.34.0 (rhbz#2302462) + * Sat Jul 20 2024 Fedora Release Engineering - 2:2.33.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index e20d197..414897d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.33.1.tar.gz) = 8e5cba1e5264787a2f89b340d4d9372df7cd28ae9fa263dcbc6cbbf460e48c1db167110ff901f35f82e36d0d8c97105acd7167b40d889a829c71b182e175b96c -SHA512 (s390-tools-2.33.1-rust-vendor.tar.xz) = 12b0d3af1eba223b63028b5fec85ff4cc79ec646671e56d4c3606b0b4a9d3f79469dc860141ff86e9a0fd2bc1d54f32f2588615997a9865adbe20a110237b98d +SHA512 (s390-tools-2.34.0.tar.gz) = 1ae9bc5e14efe818570227b326f6572fedb99afd9ffd68af649a1d736d9b963a068dd878bcea21b23b9368414c32a5d98aa2ea0aa7a260a9267d6331983dfcf8 +SHA512 (s390-tools-2.34.0-rust-vendor.tar.xz) = 77543e418cdac7628c0ddf562473b5fdd104679be572ed62b461dc2dd896a2f60c9f4aa366e9dd5c59ece09c6387ca52782c0f23f3e6b76adfc85c233b36351a From 33c843d37489e5de86f67414b510dd604d644bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 14 Aug 2024 09:09:23 +0000 Subject: [PATCH 117/141] be more specific for the rpminspect badfuncs check --- rpminspect.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpminspect.yaml b/rpminspect.yaml index 8ca8a53..9d4a1bf 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -4,5 +4,6 @@ pathmigration: - /lib/s390-tools badfuncs: - ignore: - - /usr/sbin/qethqoat + allowed: + /usr/sbin/qethqoat: + - inet_ntoa From 35192dda78a42ed8395f79ec6b06056085fae114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 26 Aug 2024 13:11:02 +0200 Subject: [PATCH 118/141] - don't make Rust warnings fatal --- s390utils-2.34.0-fedora.patch | 55 +++++++++++++++++++++++++++++++++++ s390utils.spec | 7 +++-- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/s390utils-2.34.0-fedora.patch b/s390utils-2.34.0-fedora.patch index e69de29..5785622 100644 --- a/s390utils-2.34.0-fedora.patch +++ b/s390utils-2.34.0-fedora.patch @@ -0,0 +1,55 @@ +From 54e9e22cc0fb54a954e8b6b700402af934135fc7 Mon Sep 17 00:00:00 2001 +From: Steffen Eiden +Date: Fri, 23 Aug 2024 09:16:26 +0200 +Subject: [PATCH] rust/pv: Lower most lints to warn +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Lower the lint level to warn for the styling lints. +This avoids compile issues during packaging for newer tooling with +potential more lint findings. +Still deny compiling if a public symbol has no documentation. + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/173 +Reviewed-by: Jan Höppner +Signed-off-by: Steffen Eiden +(cherry picked from commit 6a55d0c2e57952600164822dd100e8247b4b010f) +--- + rust/pv/src/lib.rs | 4 ++-- + rust/pv_core/src/lib.rs | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/rust/pv/src/lib.rs b/rust/pv/src/lib.rs +index 9a64761..1084f8e 100644 +--- a/rust/pv/src/lib.rs ++++ b/rust/pv/src/lib.rs +@@ -2,8 +2,8 @@ + // + // Copyright IBM Corp. 2023, 2024 + +-#![deny( +- missing_docs, ++#![deny(missing_docs)] ++#![warn( + missing_debug_implementations, + trivial_numeric_casts, + unstable_features, +diff --git a/rust/pv_core/src/lib.rs b/rust/pv_core/src/lib.rs +index 1356c1b..b617b8f 100644 +--- a/rust/pv_core/src/lib.rs ++++ b/rust/pv_core/src/lib.rs +@@ -1,8 +1,8 @@ + // SPDX-License-Identifier: MIT + // + // Copyright IBM Corp. 2023, 2024 +-#![deny( +- missing_docs, ++#![deny(missing_docs)] ++#![warn( + missing_debug_implementations, + trivial_numeric_casts, + unstable_features, +-- +2.46.0 + diff --git a/s390utils.spec b/s390utils.spec index 6bf2935..e6cb28e 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.34.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -47,7 +47,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -#Patch100: s390utils-%%{version}-fedora.patch +Patch100: s390utils-%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -1067,6 +1067,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Aug 26 2024 Dan Horák - 2:2.34.0-2 +- don't make Rust warnings fatal + * Mon Aug 12 2024 Dan Horák - 2:2.34.0-1 - rebased to 2.34.0 (rhbz#2302462) From d55343afd6d9aaffbffad6d6a61755cf067c8ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 3 Oct 2024 09:12:25 +0000 Subject: [PATCH 119/141] - rebased to 2.35.0 (rhbz#2316232) --- s390utils-2.34.0-fedora.patch | 55 ----------------------------------- s390utils-2.35.0-fedora.patch | 0 s390utils.spec | 11 +++---- sources | 4 +-- 4 files changed, 8 insertions(+), 62 deletions(-) delete mode 100644 s390utils-2.34.0-fedora.patch create mode 100644 s390utils-2.35.0-fedora.patch diff --git a/s390utils-2.34.0-fedora.patch b/s390utils-2.34.0-fedora.patch deleted file mode 100644 index 5785622..0000000 --- a/s390utils-2.34.0-fedora.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 54e9e22cc0fb54a954e8b6b700402af934135fc7 Mon Sep 17 00:00:00 2001 -From: Steffen Eiden -Date: Fri, 23 Aug 2024 09:16:26 +0200 -Subject: [PATCH] rust/pv: Lower most lints to warn -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Lower the lint level to warn for the styling lints. -This avoids compile issues during packaging for newer tooling with -potential more lint findings. -Still deny compiling if a public symbol has no documentation. - -Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/173 -Reviewed-by: Jan Höppner -Signed-off-by: Steffen Eiden -(cherry picked from commit 6a55d0c2e57952600164822dd100e8247b4b010f) ---- - rust/pv/src/lib.rs | 4 ++-- - rust/pv_core/src/lib.rs | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/rust/pv/src/lib.rs b/rust/pv/src/lib.rs -index 9a64761..1084f8e 100644 ---- a/rust/pv/src/lib.rs -+++ b/rust/pv/src/lib.rs -@@ -2,8 +2,8 @@ - // - // Copyright IBM Corp. 2023, 2024 - --#![deny( -- missing_docs, -+#![deny(missing_docs)] -+#![warn( - missing_debug_implementations, - trivial_numeric_casts, - unstable_features, -diff --git a/rust/pv_core/src/lib.rs b/rust/pv_core/src/lib.rs -index 1356c1b..b617b8f 100644 ---- a/rust/pv_core/src/lib.rs -+++ b/rust/pv_core/src/lib.rs -@@ -1,8 +1,8 @@ - // SPDX-License-Identifier: MIT - // - // Copyright IBM Corp. 2023, 2024 --#![deny( -- missing_docs, -+#![deny(missing_docs)] -+#![warn( - missing_debug_implementations, - trivial_numeric_casts, - unstable_features, --- -2.46.0 - diff --git a/s390utils-2.35.0-fedora.patch b/s390utils-2.35.0-fedora.patch new file mode 100644 index 0000000..e69de29 diff --git a/s390utils.spec b/s390utils.spec index e6cb28e..8878c75 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -13,8 +13,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.34.0 -Release: 2%{?dist} +Version: 2.35.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -47,7 +47,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%{version}-fedora.patch +#Patch100: s390utils-%%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -248,12 +248,10 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf %license rust/cargo-vendor.txt %endif %{_bindir}/genprotimg -%{_bindir}/pvapconfig %{_bindir}/pvattest %{_bindir}/pvextract-hdr %{_bindir}/pvsecret %{_mandir}/man1/genprotimg.1* -%{_mandir}/man1/pvapconfig.1* %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* @@ -1067,6 +1065,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Oct 03 2024 Dan Horák - 2:2.35.0-1 +- rebased to 2.35.0 (rhbz#2316232) + * Mon Aug 26 2024 Dan Horák - 2:2.34.0-2 - don't make Rust warnings fatal diff --git a/sources b/sources index 414897d..aa65d49 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.34.0.tar.gz) = 1ae9bc5e14efe818570227b326f6572fedb99afd9ffd68af649a1d736d9b963a068dd878bcea21b23b9368414c32a5d98aa2ea0aa7a260a9267d6331983dfcf8 -SHA512 (s390-tools-2.34.0-rust-vendor.tar.xz) = 77543e418cdac7628c0ddf562473b5fdd104679be572ed62b461dc2dd896a2f60c9f4aa366e9dd5c59ece09c6387ca52782c0f23f3e6b76adfc85c233b36351a +SHA512 (s390-tools-2.35.0.tar.gz) = 1ee6e7dc5a0c504bb23bde00e5e6a2ed333e7712677056075caf68a02eb222cd9c00d16fcf17e0a7c9f89609901d343b55953b0036c0d2cab35830ea8eb53fea +SHA512 (s390-tools-2.35.0-rust-vendor.tar.xz) = 116adeac121c56d7d5bc37b3a7972a78e1ce86fd53f919d293d4bfe92999449ce6f30a592fdb3f4d48fda64817c9b19587a038bf832c7b745a715b9b469e1ee4 From 865e5c3bac85937a17386e130262d987d4560c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 13 Jan 2025 20:42:27 +0000 Subject: [PATCH 120/141] Build against rust-thiserror1-devel --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 8878c75..80609a9 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -104,7 +104,7 @@ BuildRequires: crate(serde_test) BuildRequires: crate(serde_yaml) BuildRequires: crate(strsim) BuildRequires: crate(terminal_size) -BuildRequires: crate(thiserror) +BuildRequires: crate(thiserror) < 2 BuildRequires: crate(zerocopy) BuildRequires: rust-packaging %endif From a0ae4f8f73b7a72563a6db43702902bc93c5582d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 14 Jan 2025 14:08:22 +0000 Subject: [PATCH 121/141] switch to %make_install --- s390utils.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 80609a9..83e481c 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -152,12 +152,11 @@ popd %install -make install \ +%make_install \ HAVE_DRACUT=1 \ %if %{with pandoc} ENABLE_DOC=1 \ %endif - DESTDIR=%{buildroot} \ BINDIR=/usr/sbin \ SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ DISTRELEASE=%{release} \ From c0f10fd579e42197575d5773d98da89a0ff22f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 14 Jan 2025 14:43:02 +0000 Subject: [PATCH 122/141] don't package scsi_logging_level as it is provided by sg3_utils --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 83e481c..753d3ac 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -576,7 +576,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %{_sbindir}/qetharp %{_sbindir}/qethconf %{_sbindir}/qethqoat -%{_sbindir}/scsi_logging_level +%exclude %{_sbindir}/scsi_logging_level %{_sbindir}/sclpdbf %{_sbindir}/start_hsnc.sh %{_sbindir}/tape390_crypt From 2add3e66cd5d988f3a492f86f29c000869b83236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 14 Jan 2025 14:45:36 +0000 Subject: [PATCH 123/141] support merged bin and sbin https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin) --- s390utils.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 753d3ac..dd6e2a7 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.35.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -138,7 +138,12 @@ make \ ENABLE_DOC=1 \ %endif NO_PIE_LDFLAGS="" \ +%if "%{_sbindir}" == "%{_bindir}" + BINDIR=/usr/bin \ + USRSBINDIR=/usr/bin \ +%else BINDIR=/usr/sbin \ +%endif DISTRELEASE=%{release} \ V=1 @@ -157,7 +162,12 @@ popd %if %{with pandoc} ENABLE_DOC=1 \ %endif +%if "%{_sbindir}" == "%{_bindir}" + BINDIR=/usr/bin \ + USRSBINDIR=/usr/bin \ +%else BINDIR=/usr/sbin \ +%endif SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ DISTRELEASE=%{release} \ V=1 @@ -1064,6 +1074,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jan 14 2025 Dan Horák - 2:2.35.0-2 +- updated for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin + * Thu Oct 03 2024 Dan Horák - 2:2.35.0-1 - rebased to 2.35.0 (rhbz#2316232) From a3da2ffb3c0140673045aecd9c49c5c19f372dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 15 Jan 2025 11:30:13 +0100 Subject: [PATCH 124/141] add sysusers.d config For https://pagure.io/releng/failed-composes/issue/7714#comment-951273. --- s390utils.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index dd6e2a7..242cda8 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.35.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -130,6 +130,11 @@ popd %endif rm ./rust/Cargo.lock +# Create sysusers config files +echo 'g zkeyadm' >s390utils-base.conf +echo 'g ts-shell' >s390utils-iucvterm.conf +echo 'g cpacfstats' >s390utils-cpacfstatsd.conf + %build make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ @@ -235,6 +240,9 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules # zipl.conf to be ghosted touch %{buildroot}%{_sysconfdir}/zipl.conf + +install -Dt %{buildroot}%{_sysusersdir}/ s390utils-{base,iucvterm,cpacfstatsd}.conf + %endif %ifarch s390x @@ -615,6 +623,7 @@ getent group zkeyadm > /dev/null || groupadd -r zkeyadm %ghost %config(noreplace) %{_sysconfdir}/zipl.conf %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf %{_sysconfdir}/mdevctl.d/* +%{_sysusersdir}/s390utils-base.conf /usr/lib/dracut/modules.d/99ngdump/ # own the mdevctl dirs until new release is available %dir /usr/lib/mdevctl @@ -901,6 +910,7 @@ fi %{_bindir}/ts-shell %{_sbindir}/chiucvallow %{_sbindir}/lsiucvallow +%{_sysusersdir}/s390utils-iucvterm.conf %dir %attr(2770,root,ts-shell) /var/log/ts-shell %doc iucvterm/doc/ts-shell %{_mandir}/man1/iucvconn.1* @@ -1004,6 +1014,7 @@ getent group cpacfstats >/dev/null || groupadd -r cpacfstats %{_mandir}/man1/cpacfstats.1* %{_mandir}/man8/cpacfstatsd.8* %{_unitdir}/cpacfstatsd.service +%{_sysusersdir}/s390utils-cpacfstatsd.conf # # *********************** chreipl-fcp-mpath package *********************** @@ -1074,6 +1085,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Jan 15 2025 Zbigniew Jedrzejewski-Szmek - 2:2.35.0-3 +- Add sysusers.d config + * Tue Jan 14 2025 Dan Horák - 2:2.35.0-2 - updated for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin From 9886d22bc2f4af942f60627b6345779d6194d4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 Jan 2025 19:08:37 +0100 Subject: [PATCH 125/141] - fix build with gcc15 - Resolves: rhbz#2338176 --- s390utils-2.35.0-gcc15-zipl.patch | 33 +++++++++++++++++++++++++++++++ s390utils.spec | 10 +++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 s390utils-2.35.0-gcc15-zipl.patch diff --git a/s390utils-2.35.0-gcc15-zipl.patch b/s390utils-2.35.0-gcc15-zipl.patch new file mode 100644 index 0000000..ba4e9cc --- /dev/null +++ b/s390utils-2.35.0-gcc15-zipl.patch @@ -0,0 +1,33 @@ +From 2afcc33c90f142bfa2fd348fdf27778e23e32c6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Thu, 16 Jan 2025 14:32:52 +0000 +Subject: [PATCH] zipl: Update inline assembly for GCC 15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Properly escape % (as %%) for extended assembly in stage3.c in start_kernel(). + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/179 +Signed-off-by: Dan Horák +--- + zipl/boot/stage3.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/zipl/boot/stage3.c b/zipl/boot/stage3.c +index 82b7b2ad..76275f65 100644 +--- a/zipl/boot/stage3.c ++++ b/zipl/boot/stage3.c +@@ -48,9 +48,9 @@ static inline void __noreturn start_kernel(void) + " diag %[code],%[code],0x308\n" + ".no_diag308:\n" + " sam31\n" +- " sr %r1,%r1\n" +- " sr %r2,%r2\n" +- " sigp %r1,%r2,%[order]\n" ++ " sr %%r1,%%r1\n" ++ " sr %%r2,%%r2\n" ++ " sigp %%r1,%%r2,%[order]\n" + " lpsw 0\n" + : [addr] "=&d" (addr), + [code] "+&d" (code) diff --git a/s390utils.spec b/s390utils.spec index 242cda8..b8d3753 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.35.0 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -46,6 +46,10 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch +# build fix +# https://github.com/ibm-s390-linux/s390-tools/pull/180 +Patch99: s390utils-%{version}-gcc15-zipl.patch + # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch @@ -1085,6 +1089,10 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Jan 20 2025 Dan Horák - 2:2.35.0-4 +- fix build with gcc15 +- Resolves: rhbz#2338176 + * Wed Jan 15 2025 Zbigniew Jedrzejewski-Szmek - 2:2.35.0-3 - Add sysusers.d config From 7b6090d409d07e4851b38e28ec2f946cdde0b52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 Jan 2025 22:10:31 +0100 Subject: [PATCH 126/141] update for merged bin and sbin --- rpminspect.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpminspect.yaml b/rpminspect.yaml index 9d4a1bf..7e19000 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -5,5 +5,5 @@ pathmigration: badfuncs: allowed: - /usr/sbin/qethqoat: + /usr/bin/qethqoat: - inet_ntoa From 008037d366ddd2558eb493f1eb1c7d2aadd7bc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 4 Feb 2025 18:59:34 +0100 Subject: [PATCH 127/141] finish migration to sysusers.d by removing the now redundant %pre scriptlets --- s390utils.spec | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index b8d3753..f78d7a0 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -547,10 +547,6 @@ For more information refer to the following publications: * "Device Drivers, Features, and Commands" chapter "Useful Linux commands" * "Using the dump tools" -%pre base -# check for zkeyadm group and create it -getent group zkeyadm > /dev/null || groupadd -r zkeyadm - %post base %systemd_post dumpconf.service @@ -885,10 +881,6 @@ active TCP/IP connection between two Linux guest operating systems. - ts-shell: Terminal server shell to authorize and control IUCV terminal connections for individual Linux users. -%pre iucvterm -# check for ts-shell group and create it -getent group ts-shell > /dev/null || groupadd -r ts-shell - %post iucvterm # /etc/shells is provided by "setup" grep -q '^/usr/bin/ts-shell$' /etc/shells \ @@ -1009,9 +1001,6 @@ and maintain CPACF activity counters. %postun cpacfstatsd %systemd_postun_with_restart cpacfstatsd.service -%pre cpacfstatsd -getent group cpacfstats >/dev/null || groupadd -r cpacfstats - %files cpacfstatsd %{_bindir}/cpacfstats %{_sbindir}/cpacfstatsd From ffe5dc6c52ded79afd050720ee368c5388ba647c Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 6 Feb 2025 13:47:34 +0100 Subject: [PATCH 128/141] Rebuild for openssl crate >= v0.10.70 (RUSTSEC-2025-0004) --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index f78d7a0..81903f1 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -14,7 +14,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.35.0 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -1078,6 +1078,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Feb 06 2025 Fabio Valentini - 2:2.35.0-5 +- Rebuild for openssl crate >= v0.10.70 (RUSTSEC-2025-0004) + * Mon Jan 20 2025 Dan Horák - 2:2.35.0-4 - fix build with gcc15 - Resolves: rhbz#2338176 From 3484222eb4bd12cf930486c17931808ea885dcdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 6 Feb 2025 14:53:09 +0000 Subject: [PATCH 129/141] use systemd-tmpfiles for /var/log/ts-shell Also generalize the systemd-sysusers and systemd-tmpfiles support. --- s390utils.spec | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 81903f1..ea6072f 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -135,9 +135,12 @@ popd rm ./rust/Cargo.lock # Create sysusers config files -echo 'g zkeyadm' >s390utils-base.conf -echo 'g ts-shell' >s390utils-iucvterm.conf -echo 'g cpacfstats' >s390utils-cpacfstatsd.conf +echo 'g zkeyadm' > s390utils-base.conf.usr +echo 'g ts-shell' > s390utils-iucvterm.conf.usr +echo 'g cpacfstats' > s390utils-cpacfstatsd.conf.usr + +# Create tmpfiles config files +echo 'd /var/log/ts-shell 2770 root ts-shell' > s390utils-iucvterm.conf.tmp %build make \ @@ -245,7 +248,14 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules # zipl.conf to be ghosted touch %{buildroot}%{_sysconfdir}/zipl.conf -install -Dt %{buildroot}%{_sysusersdir}/ s390utils-{base,iucvterm,cpacfstatsd}.conf +# install systemd sysusers and tmpfiles +mkdir -p %{buildroot}{%{_sysusersdir},%{_tmpfilesdir}}/ +for f in s390utils-*.conf.usr; do + install -p $f %{buildroot}%{_sysusersdir}/$(basename -s .usr $f) +done +for f in s390utils-*.conf.tmp; do + install -p $f %{buildroot}%{_tmpfilesdir}/$(basename -s .tmp $f) +done %endif @@ -907,7 +917,8 @@ fi %{_sbindir}/chiucvallow %{_sbindir}/lsiucvallow %{_sysusersdir}/s390utils-iucvterm.conf -%dir %attr(2770,root,ts-shell) /var/log/ts-shell +%{_tmpfilesdir}/s390utils-iucvterm.conf +%ghost %dir %attr(2770,root,ts-shell) /var/log/ts-shell %doc iucvterm/doc/ts-shell %{_mandir}/man1/iucvconn.1* %{_mandir}/man1/iucvtty.1* From 8cf2e7926d3fd4fc09be0a3d8e06dcba04334d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 14 Jan 2025 12:53:46 +0000 Subject: [PATCH 130/141] - rebased to 2.36.0 (rhbz#2330787) --- s390utils-2.35.0-fedora.patch | 0 s390utils-2.36.0-fedora.patch | 16 ++++++++++++++++ s390utils.spec | 33 +++++++++++++++++++++++++++------ sources | 4 ++-- 4 files changed, 45 insertions(+), 8 deletions(-) delete mode 100644 s390utils-2.35.0-fedora.patch create mode 100644 s390utils-2.36.0-fedora.patch diff --git a/s390utils-2.35.0-fedora.patch b/s390utils-2.35.0-fedora.patch deleted file mode 100644 index e69de29..0000000 diff --git a/s390utils-2.36.0-fedora.patch b/s390utils-2.36.0-fedora.patch new file mode 100644 index 0000000..4a20bb7 --- /dev/null +++ b/s390utils-2.36.0-fedora.patch @@ -0,0 +1,16 @@ +diff --git a/zipl/src/Makefile b/zipl/src/Makefile +index 7927974..e9f68b4 100644 +--- a/zipl/src/Makefile ++++ b/zipl/src/Makefile +@@ -38,9 +38,8 @@ install: all + $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) + $(INSTALL) -c zipl $(DESTDIR)$(BINDIR) + $(INSTALL) -c zipl-editenv $(DESTDIR)$(BINDIR) +- $(INSTALL) -m 755 $(zipl_helpers) $(chreipl_helpers) \ +- $(DESTDIR)$(TOOLS_LIBDIR) +- $(CP) --no-dereference $(chreipl_helpers) $(DESTDIR)$(TOOLS_LIBDIR) ++ $(CP) --no-dereference $(zipl_helpers) $(chreipl_helpers) \ ++ $(DESTDIR)$(TOOLS_LIBDIR) + + clean: + rm -f *.o $(zipl_helpers) $(chreipl_helpers) zipl zipl-editenv diff --git a/s390utils.spec b/s390utils.spec index ea6072f..7384627 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -13,8 +13,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.35.0 -Release: 5%{?dist} +Version: 2.36.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -48,7 +48,7 @@ Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # build fix # https://github.com/ibm-s390-linux/s390-tools/pull/180 -Patch99: s390utils-%{version}-gcc15-zipl.patch +Patch99: s390utils-2.35.0-gcc15-zipl.patch # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch @@ -124,7 +124,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %prep %autosetup -n s390-tools-%{version} -p1 -%if 0%{?rhel} +%if 1%{?rhel} pushd rust tar xf %{SOURCE1} %cargo_prep -v vendor @@ -281,12 +281,18 @@ done %{_bindir}/genprotimg %{_bindir}/pvattest %{_bindir}/pvextract-hdr +%{_bindir}/pvimg %{_bindir}/pvsecret %{_mandir}/man1/genprotimg.1* %{_mandir}/man1/pvattest.1* +%{_mandir}/man1/pvattest-check.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* %{_mandir}/man1/pvattest-verify.1* +%{_mandir}/man1/pvimg.1* +%{_mandir}/man1/pvimg-create.1* +%{_mandir}/man1/pvimg-info.1* +%{_mandir}/man1/pvimg-test.1* %{_mandir}/man1/pvsecret-add.1* %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* @@ -296,7 +302,7 @@ done %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* %dir %{_datadir}/s390-tools -%{_datadir}/s390-tools/genprotimg/ +%{_datadir}/s390-tools/pvimg/ # # enf of multi-arch section @@ -426,6 +432,7 @@ BuildRequires: cryptsetup-devel >= 2.0.3 BuildRequires: json-c-devel BuildRequires: rpm-devel BuildRequires: libxml2-devel +BuildRequires: libnl3-devel %description base @@ -600,6 +607,7 @@ For more information refer to the following publications: %{_sbindir}/lstape %{_sbindir}/lszcrypt %{_sbindir}/lszfcp +%{_sbindir}/opticsmon %{_sbindir}/pai %{_sbindir}/qetharp %{_sbindir}/qethconf @@ -620,9 +628,11 @@ For more information refer to the following publications: %{_sbindir}/zipl-switch-to-blscfg %{_sbindir}/znetconf %{_sbindir}/zpcictl +%{_bindir}/cpacfinfo %{_bindir}/dump2tar %{_bindir}/genprotimg %{_bindir}/pvapconfig +%{_bindir}/pvimg %{_bindir}/mk-s390image %{_bindir}/pvattest %{_bindir}/pvextract-hdr @@ -630,6 +640,7 @@ For more information refer to the following publications: %{_bindir}/zkey %{_bindir}/zkey-cryptsetup %{_unitdir}/dumpconf.service +%{_unitdir}/opticsmon.service %ghost %config(noreplace) %{_sysconfdir}/zipl.conf %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf %{_sysconfdir}/mdevctl.d/* @@ -650,13 +661,19 @@ For more information refer to the following publications: %dir %{_libdir}/zkey %{_libdir}/zkey/zkey-ekmfweb.so %{_libdir}/zkey/zkey-kmip.so +%{_mandir}/man1/cpacfinfo.1* %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/genprotimg.1* %{_mandir}/man1/pvapconfig.1* %{_mandir}/man1/pvattest.1* +%{_mandir}/man1/pvattest-check.1* %{_mandir}/man1/pvattest-create.1* %{_mandir}/man1/pvattest-perform.1* %{_mandir}/man1/pvattest-verify.1* +%{_mandir}/man1/pvimg.1* +%{_mandir}/man1/pvimg-create.1* +%{_mandir}/man1/pvimg-info.1* +%{_mandir}/man1/pvimg-test.1* %{_mandir}/man1/pvsecret-add.1* %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* @@ -699,6 +716,7 @@ For more information refer to the following publications: %{_mandir}/man8/lstape.8* %{_mandir}/man8/lszcrypt.8* %{_mandir}/man8/lszfcp.8* +%{_mandir}/man8/opticsmon.8* %{_mandir}/man8/pai.8* %{_mandir}/man8/qetharp.8* %{_mandir}/man8/qethconf.8* @@ -738,7 +756,7 @@ BuildArch: noarch %files se-data %dir %{_datadir}/s390-tools -%{_datadir}/s390-tools/genprotimg/ +%{_datadir}/s390-tools/pvimg/ # # *********************** s390-tools osasnmpd package *********************** @@ -1089,6 +1107,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Feb 24 2025 Dan Horák - 2:2.36.0-1 +- rebased to 2.36.0 (rhbz#2330787) + * Thu Feb 06 2025 Fabio Valentini - 2:2.35.0-5 - Rebuild for openssl crate >= v0.10.70 (RUSTSEC-2025-0004) diff --git a/sources b/sources index aa65d49..444acfa 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.35.0.tar.gz) = 1ee6e7dc5a0c504bb23bde00e5e6a2ed333e7712677056075caf68a02eb222cd9c00d16fcf17e0a7c9f89609901d343b55953b0036c0d2cab35830ea8eb53fea -SHA512 (s390-tools-2.35.0-rust-vendor.tar.xz) = 116adeac121c56d7d5bc37b3a7972a78e1ce86fd53f919d293d4bfe92999449ce6f30a592fdb3f4d48fda64817c9b19587a038bf832c7b745a715b9b469e1ee4 +SHA512 (s390-tools-2.36.0.tar.gz) = 5704dcbfc88972ff74b5d81acf549e719b90f2ce60b66ca6935c16c0b266ca6728adca72133aa51e1a5acfbabfd6f121b7f9b5023be498c5a203217adc4f5c46 +SHA512 (s390-tools-2.36.0-rust-vendor.tar.xz) = 2e4f53b64e71307e79a3a433c7bd2a6304b0c4e6e34cb84c57e459e86ec25c14b64eab870f0081f2f31d5b8003b071e8f45cf639111a1e759f0dfa070a96d765 From 488af3d803cd13c564c3541b3a1fb12db0403281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 27 Feb 2025 10:01:38 +0100 Subject: [PATCH 131/141] rebased to 2.37.0 (rhbz#2330787) --- s390utils-2.35.0-gcc15-zipl.patch | 33 ------------------------------- s390utils.spec | 13 +++++++----- sources | 4 ++-- 3 files changed, 10 insertions(+), 40 deletions(-) delete mode 100644 s390utils-2.35.0-gcc15-zipl.patch diff --git a/s390utils-2.35.0-gcc15-zipl.patch b/s390utils-2.35.0-gcc15-zipl.patch deleted file mode 100644 index ba4e9cc..0000000 --- a/s390utils-2.35.0-gcc15-zipl.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2afcc33c90f142bfa2fd348fdf27778e23e32c6e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dan=20Hor=C3=A1k?= -Date: Thu, 16 Jan 2025 14:32:52 +0000 -Subject: [PATCH] zipl: Update inline assembly for GCC 15 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Properly escape % (as %%) for extended assembly in stage3.c in start_kernel(). - -Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/179 -Signed-off-by: Dan Horák ---- - zipl/boot/stage3.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/zipl/boot/stage3.c b/zipl/boot/stage3.c -index 82b7b2ad..76275f65 100644 ---- a/zipl/boot/stage3.c -+++ b/zipl/boot/stage3.c -@@ -48,9 +48,9 @@ static inline void __noreturn start_kernel(void) - " diag %[code],%[code],0x308\n" - ".no_diag308:\n" - " sam31\n" -- " sr %r1,%r1\n" -- " sr %r2,%r2\n" -- " sigp %r1,%r2,%[order]\n" -+ " sr %%r1,%%r1\n" -+ " sr %%r2,%%r2\n" -+ " sigp %%r1,%%r2,%[order]\n" - " lpsw 0\n" - : [addr] "=&d" (addr), - [code] "+&d" (code) diff --git a/s390utils.spec b/s390utils.spec index 7384627..f3e56be 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -13,7 +13,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.36.0 +Version: 2.37.0 Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files @@ -46,10 +46,6 @@ Source25: 91-zipl.install Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch -# build fix -# https://github.com/ibm-s390-linux/s390-tools/pull/180 -Patch99: s390utils-2.35.0-gcc15-zipl.patch - # upstream fixes/updates #Patch100: s390utils-%%{version}-fedora.patch @@ -296,9 +292,11 @@ done %{_mandir}/man1/pvsecret-add.1* %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* +%{_mandir}/man1/pvsecret-create-retrievable.1* %{_mandir}/man1/pvsecret-create.1* %{_mandir}/man1/pvsecret-list.1* %{_mandir}/man1/pvsecret-lock.1* +%{_mandir}/man1/pvsecret-retrieve.1* %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* %dir %{_datadir}/s390-tools @@ -677,9 +675,11 @@ For more information refer to the following publications: %{_mandir}/man1/pvsecret-add.1* %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* +%{_mandir}/man1/pvsecret-create-retrievable.1* %{_mandir}/man1/pvsecret-create.1* %{_mandir}/man1/pvsecret-list.1* %{_mandir}/man1/pvsecret-lock.1* +%{_mandir}/man1/pvsecret-retrieve.1* %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* %{_mandir}/man1/zkey.1* @@ -1107,6 +1107,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Feb 27 2025 Jakub Čajka - 2:2.37.0-1 +- rebased to 2.37.0 (rhbz#2330787) + * Mon Feb 24 2025 Dan Horák - 2:2.36.0-1 - rebased to 2.36.0 (rhbz#2330787) diff --git a/sources b/sources index 444acfa..44ec9c0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.36.0.tar.gz) = 5704dcbfc88972ff74b5d81acf549e719b90f2ce60b66ca6935c16c0b266ca6728adca72133aa51e1a5acfbabfd6f121b7f9b5023be498c5a203217adc4f5c46 -SHA512 (s390-tools-2.36.0-rust-vendor.tar.xz) = 2e4f53b64e71307e79a3a433c7bd2a6304b0c4e6e34cb84c57e459e86ec25c14b64eab870f0081f2f31d5b8003b071e8f45cf639111a1e759f0dfa070a96d765 +SHA512 (s390-tools-2.37.0.tar.gz) = 3577d25bc0a0f2c86912327b4fc844c9ce16ce978c39aa8dbde0e082a0657066bb4cafcb75b5b022a75138afb6e0efe904f62ed3a53bc8f61a9093119b3b95f7 +SHA512 (s390-tools-2.37.0-rust-vendor.tar.xz) = 86ae3311fc5ef5e2274c8fe1553c3caea671875e77ef0d197512fe346f644f46a56c8de5589e040b83480b37765319ef9bd4ad6fda3dc5ecebac8c3e7aa578b0 From ee43d0c73bd34a448b7c740600c0a516df54d273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cajka?= Date: Thu, 27 Feb 2025 10:05:11 +0100 Subject: [PATCH 132/141] Debundle rust dependencies --- s390utils.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index f3e56be..f9e8572 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -24,7 +24,9 @@ Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version} # tar xf s390-tools-%%{version}.tar.gz ; pushd s390-tools-%%{version}/rust ; \ # rm -f Cargo.lock && cargo vendor && \ # tar Jvcf ../../s390-tools-%%{version}-rust-vendor.tar.xz vendor/ ; popd +%if 0%{?rhel} Source1: s390-tools-%{version}-rust-vendor.tar.xz +%endif Source5: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcpconf.sh Source7: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/zfcp.udev Source12: https://fedorapeople.org/cgit/sharkcz/public_git/utils.git/tree/dasd.udev @@ -84,6 +86,9 @@ BuildRequires: rust-toolset BuildRequires: crate(anstream) BuildRequires: crate(anstyle-query) BuildRequires: crate(anyhow) +BuildRequires: crate(base64) +BuildRequires: crate(bit-set) +BuildRequires: crate(bitvec) BuildRequires: crate(byteorder) BuildRequires: crate(cfg-if) BuildRequires: crate(clap) @@ -91,6 +96,8 @@ BuildRequires: crate(clap_complete) BuildRequires: crate(clap_derive) BuildRequires: crate(colorchoice) BuildRequires: crate(curl) +BuildRequires: crate(deku) +BuildRequires: crate(enum_dispatch) BuildRequires: crate(is-terminal) BuildRequires: crate(lazy_static) BuildRequires: crate(libc) @@ -98,13 +105,17 @@ BuildRequires: crate(log) BuildRequires: crate(mockito) BuildRequires: crate(openssl) BuildRequires: crate(openssl-probe) +BuildRequires: crate(proc-macro-crate) +BuildRequires: crate(proptest) +BuildRequires: crate(rusty-fork) BuildRequires: crate(serde) BuildRequires: crate(serde_derive) BuildRequires: crate(serde_test) BuildRequires: crate(serde_yaml) BuildRequires: crate(strsim) BuildRequires: crate(terminal_size) -BuildRequires: crate(thiserror) < 2 +BuildRequires: crate(thiserror) +BuildRequires: crate(wait-timeout) BuildRequires: crate(zerocopy) BuildRequires: rust-packaging %endif @@ -120,7 +131,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. %prep %autosetup -n s390-tools-%{version} -p1 -%if 1%{?rhel} +%if 0%{?rhel} pushd rust tar xf %{SOURCE1} %cargo_prep -v vendor From 745b0f7706a898bbf67e2c396289b11a7b6621aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 28 Feb 2025 18:33:21 +0100 Subject: [PATCH 133/141] update fedora patch filename --- s390utils-2.36.0-fedora.patch => s390utils-2.37.0-fedora.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename s390utils-2.36.0-fedora.patch => s390utils-2.37.0-fedora.patch (100%) diff --git a/s390utils-2.36.0-fedora.patch b/s390utils-2.37.0-fedora.patch similarity index 100% rename from s390utils-2.36.0-fedora.patch rename to s390utils-2.37.0-fedora.patch From 7efda8631f0328d746e605006ad4f8a336df5b72 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 13 Mar 2025 11:17:20 -0400 Subject: [PATCH 134/141] Properly generate Rust BuildRequires on Fedora --- s390utils.spec | 51 +++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index f9e8572..36f03f1 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -11,10 +11,13 @@ %bcond_with pandoc %endif +# Also controls whether %%cargo_generate_buildrequires generates dev-dependencies +%bcond_without check + Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.37.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files License: MIT AND LGPL-2.1-or-later @@ -83,41 +86,7 @@ BuildRequires: libcurl-devel BuildRequires: openssl-devel BuildRequires: rust-toolset %else -BuildRequires: crate(anstream) -BuildRequires: crate(anstyle-query) -BuildRequires: crate(anyhow) -BuildRequires: crate(base64) -BuildRequires: crate(bit-set) -BuildRequires: crate(bitvec) -BuildRequires: crate(byteorder) -BuildRequires: crate(cfg-if) -BuildRequires: crate(clap) -BuildRequires: crate(clap_complete) -BuildRequires: crate(clap_derive) -BuildRequires: crate(colorchoice) -BuildRequires: crate(curl) -BuildRequires: crate(deku) -BuildRequires: crate(enum_dispatch) -BuildRequires: crate(is-terminal) -BuildRequires: crate(lazy_static) -BuildRequires: crate(libc) -BuildRequires: crate(log) -BuildRequires: crate(mockito) -BuildRequires: crate(openssl) -BuildRequires: crate(openssl-probe) -BuildRequires: crate(proc-macro-crate) -BuildRequires: crate(proptest) -BuildRequires: crate(rusty-fork) -BuildRequires: crate(serde) -BuildRequires: crate(serde_derive) -BuildRequires: crate(serde_test) -BuildRequires: crate(serde_yaml) -BuildRequires: crate(strsim) -BuildRequires: crate(terminal_size) -BuildRequires: crate(thiserror) -BuildRequires: crate(wait-timeout) -BuildRequires: crate(zerocopy) -BuildRequires: rust-packaging +BuildRequires: cargo-rpm-macros >= 24 %endif %description @@ -149,6 +118,13 @@ echo 'g cpacfstats' > s390utils-cpacfstatsd.conf.usr # Create tmpfiles config files echo 'd /var/log/ts-shell 2770 root ts-shell' > s390utils-iucvterm.conf.tmp +%if !0%{?rhel} +%generate_buildrequires +pushd rust >/dev/null +%cargo_generate_buildrequires +popd >/dev/null +%endif + %build make \ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ @@ -1118,6 +1094,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Mar 13 2025 Benjamin A. Beasley - 2:2.37.0-2 +- Properly generate Rust BuildRequires on Fedora + * Thu Feb 27 2025 Jakub Čajka - 2:2.37.0-1 - rebased to 2.37.0 (rhbz#2330787) From 43b62453bdbb43b7ea0d76a4db5ddbe19feb249d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 13 Mar 2025 13:08:31 -0400 Subject: [PATCH 135/141] Update License (for s390utils/s390utils-base) to reflect Rust deps. --- s390utils.spec | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 36f03f1..4494d69 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -19,8 +19,30 @@ Summary: Utilities and daemons for IBM z Systems Version: 2.37.0 Release: 2%{?dist} Epoch: 2 -# MIT covers nearly all the files, except init files -License: MIT AND LGPL-2.1-or-later +# MIT covers nearly all the files, except init files (LGPL-2.1-or-later) +# +# Statically-linked Rust dependencies contribute additional license terms, +# listed in the output of %%{cargo_license_summary}: +# +# (MIT OR Apache-2.0) AND Unicode-DFS-2016 +# Apache-2.0 +# Apache-2.0 OR BSL-1.0 +# Apache-2.0 OR MIT +# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# BSD-2-Clause OR Apache-2.0 OR MIT +# MIT +# MIT OR Apache-2.0 +# Unlicense OR MIT +%global extra_licenses_from_rust_deps %{shrink: +Apache-2.0 AND +(Apache-2.0 OR BSL-1.0) AND +(Apache-2.0 OR MIT) AND +(Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND +(BSD-2-Clause OR Apache-2.0 OR MIT) AND +Unicode-DFS-2016 AND +(Unlicense OR MIT) +} +License: MIT AND LGPL-2.1-or-later AND %{extra_licenses_from_rust_deps} URL: https://github.com/ibm-s390-linux/s390-tools Source0: https://github.com/ibm-s390-linux/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz # To create the vendor tarball: @@ -397,7 +419,7 @@ This package provides minimal set of tools needed to system to boot. # %package base -License: MIT AND LGPL-2.1-or-later +License: MIT AND LGPL-2.1-or-later AND %{extra_licenses_from_rust_deps} Summary: S390 base tools Provides: s390-tools-base = %{epoch}:%{version}-%{release} Requires: coreutils @@ -1096,6 +1118,7 @@ User-space development files for the s390/s390x architecture. %changelog * Thu Mar 13 2025 Benjamin A. Beasley - 2:2.37.0-2 - Properly generate Rust BuildRequires on Fedora +- Update License (for s390utils/s390utils-base) to reflect Rust deps. * Thu Feb 27 2025 Jakub Čajka - 2:2.37.0-1 - rebased to 2.37.0 (rhbz#2330787) From f7557efaba2054d61a919c4317009a01e6775d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 27 Jun 2025 11:57:38 +0000 Subject: [PATCH 136/141] - rebased to 2.38.0 (rhbz#2374765) --- s390utils-2.37.0-fedora.patch | 16 ---------------- s390utils-2.38.0-fedora.patch | 0 s390utils.spec | 23 +++++++++++++++++------ sources | 4 ++-- 4 files changed, 19 insertions(+), 24 deletions(-) delete mode 100644 s390utils-2.37.0-fedora.patch create mode 100644 s390utils-2.38.0-fedora.patch diff --git a/s390utils-2.37.0-fedora.patch b/s390utils-2.37.0-fedora.patch deleted file mode 100644 index 4a20bb7..0000000 --- a/s390utils-2.37.0-fedora.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/zipl/src/Makefile b/zipl/src/Makefile -index 7927974..e9f68b4 100644 ---- a/zipl/src/Makefile -+++ b/zipl/src/Makefile -@@ -38,9 +38,8 @@ install: all - $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) - $(INSTALL) -c zipl $(DESTDIR)$(BINDIR) - $(INSTALL) -c zipl-editenv $(DESTDIR)$(BINDIR) -- $(INSTALL) -m 755 $(zipl_helpers) $(chreipl_helpers) \ -- $(DESTDIR)$(TOOLS_LIBDIR) -- $(CP) --no-dereference $(chreipl_helpers) $(DESTDIR)$(TOOLS_LIBDIR) -+ $(CP) --no-dereference $(zipl_helpers) $(chreipl_helpers) \ -+ $(DESTDIR)$(TOOLS_LIBDIR) - - clean: - rm -f *.o $(zipl_helpers) $(chreipl_helpers) zipl zipl-editenv diff --git a/s390utils-2.38.0-fedora.patch b/s390utils-2.38.0-fedora.patch new file mode 100644 index 0000000..e69de29 diff --git a/s390utils.spec b/s390utils.spec index 4494d69..2d5c72c 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,8 +16,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.37.0 -Release: 2%{?dist} +Version: 2.38.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files (LGPL-2.1-or-later) # @@ -302,6 +302,7 @@ done %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* %{_mandir}/man1/pvsecret-create-retrievable.1* +%{_mandir}/man1/pvsecret-create-update-cck.1* %{_mandir}/man1/pvsecret-create.1* %{_mandir}/man1/pvsecret-list.1* %{_mandir}/man1/pvsecret-lock.1* @@ -310,6 +311,8 @@ done %{_mandir}/man1/pvsecret.1* %dir %{_datadir}/s390-tools %{_datadir}/s390-tools/pvimg/ +%{bash_completions_dir}/*.bash +%{zsh_completions_dir}/_* # # enf of multi-arch section @@ -407,6 +410,7 @@ This package provides minimal set of tools needed to system to boot. %{_udevrulesdir}/81-ccw.rules %{_udevrulesdir}/81-dpm.rules %{_udevrulesdir}/90-cpi.rules +%{_udevrulesdir}/80-hotplug-cpu.rules %{_sysconfdir}/kernel/install.d/20-grubby.install %{_prefix}/lib/kernel/install.d/10-zfcpdump.install %{_prefix}/lib/kernel/install.d/20-zipl-kernel.install @@ -517,9 +521,6 @@ s390 base tools. This collection provides the following utilities: feature. Those traces are filtered with the zfcpdbf script, i.e. merge several traces, make it more readable etc. - * scsi_logging_level: - Create, get or set the logging level for the SCSI logging facility. - * zconf: Set of scripts to configure and list status information of Linux for zSeries IO devices. @@ -619,7 +620,6 @@ For more information refer to the following publications: %{_sbindir}/qetharp %{_sbindir}/qethconf %{_sbindir}/qethqoat -%exclude %{_sbindir}/scsi_logging_level %{_sbindir}/sclpdbf %{_sbindir}/start_hsnc.sh %{_sbindir}/tape390_crypt @@ -633,6 +633,7 @@ For more information refer to the following publications: %{_sbindir}/zfcpdbf %{_sbindir}/zgetdump %{_sbindir}/zipl-switch-to-blscfg +%{_sbindir}/zmemtopo %{_sbindir}/znetconf %{_sbindir}/zpcictl %{_bindir}/cpacfinfo @@ -646,6 +647,7 @@ For more information refer to the following publications: %{_bindir}/pvsecret %{_bindir}/zkey %{_bindir}/zkey-cryptsetup +%{_bindir}/zpwr %{_unitdir}/dumpconf.service %{_unitdir}/opticsmon.service %ghost %config(noreplace) %{_sysconfdir}/zipl.conf @@ -653,6 +655,7 @@ For more information refer to the following publications: %{_sysconfdir}/mdevctl.d/* %{_sysusersdir}/s390utils-base.conf /usr/lib/dracut/modules.d/99ngdump/ +/usr/lib/dracut/dracut.conf.d/99-pkey.conf # own the mdevctl dirs until new release is available %dir /usr/lib/mdevctl %dir /usr/lib/mdevctl/scripts.d @@ -685,6 +688,7 @@ For more information refer to the following publications: %{_mandir}/man1/pvsecret-create-association.1* %{_mandir}/man1/pvsecret-create-meta.1* %{_mandir}/man1/pvsecret-create-retrievable.1* +%{_mandir}/man1/pvsecret-create-update-cck.1* %{_mandir}/man1/pvsecret-create.1* %{_mandir}/man1/pvsecret-list.1* %{_mandir}/man1/pvsecret-lock.1* @@ -695,6 +699,7 @@ For more information refer to the following publications: %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* %{_mandir}/man1/zkey-kmip.1* +%{_mandir}/man1/zpwr.1* %{_mandir}/man4/prandom.4* %{_mandir}/man5/hsavmcore.conf.5* %{_mandir}/man8/chccwdev.8* @@ -740,10 +745,13 @@ For more information refer to the following publications: %{_mandir}/man8/zfcpdbf.8* %{_mandir}/man8/zgetdump.8* %{_mandir}/man8/zipl-switch-to-blscfg.8* +%{_mandir}/man8/zmemtopo.8* %{_mandir}/man8/znetconf.8* %{_mandir}/man8/zpcictl.8* %dir %{_datadir}/s390-tools %{_datadir}/s390-tools/netboot/ +%{bash_completions_dir}/*.bash +%{zsh_completions_dir}/_* %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip/profiles @@ -1116,6 +1124,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Jun 27 2025 Dan Horák - 2:2.38.0-1 +- rebased to 2.38.0 (rhbz#2374765) + * Thu Mar 13 2025 Benjamin A. Beasley - 2:2.37.0-2 - Properly generate Rust BuildRequires on Fedora - Update License (for s390utils/s390utils-base) to reflect Rust deps. diff --git a/sources b/sources index 44ec9c0..16b71cb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.37.0.tar.gz) = 3577d25bc0a0f2c86912327b4fc844c9ce16ce978c39aa8dbde0e082a0657066bb4cafcb75b5b022a75138afb6e0efe904f62ed3a53bc8f61a9093119b3b95f7 -SHA512 (s390-tools-2.37.0-rust-vendor.tar.xz) = 86ae3311fc5ef5e2274c8fe1553c3caea671875e77ef0d197512fe346f644f46a56c8de5589e040b83480b37765319ef9bd4ad6fda3dc5ecebac8c3e7aa578b0 +SHA512 (s390-tools-2.38.0.tar.gz) = 9ca9393e9deeab5c1df5e9eaa3c12e340917ffd5fe07d9a09087d6488d8e2ec0a136805650830d128595854b818a1da94151003e15954e556ba373b226a7369e +SHA512 (s390-tools-2.38.0-rust-vendor.tar.xz) = c55d2870ad9f90333de2536e7921951185746f0972d5d488bf317b56e754525e4dbd0f63d547229197199b51d41b7032172b6ba7ffacd9a96a01dbd13b9c4d9e From 41042d250b92ce83b1bf43bd2d091f19d4d7225b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 17:51:29 +0000 Subject: [PATCH 137/141] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- s390utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 2d5c72c..d6235bc 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -17,7 +17,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems Version: 2.38.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files (LGPL-2.1-or-later) # @@ -1124,6 +1124,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2:2.38.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jun 27 2025 Dan Horák - 2:2.38.0-1 - rebased to 2.38.0 (rhbz#2374765) From 09f8677bca73d4c361df866a365542a039e37b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 14 Nov 2025 09:14:49 +0000 Subject: [PATCH 138/141] - rebased to 2.39.0 (rhbz#2403755) --- s390utils-2.38.0-fedora.patch | 0 s390utils-2.39.0-fedora.patch | 63 +++++++++++++++++++++++++++++++++++ s390utils.spec | 20 +++++++---- sources | 4 +-- 4 files changed, 79 insertions(+), 8 deletions(-) delete mode 100644 s390utils-2.38.0-fedora.patch create mode 100644 s390utils-2.39.0-fedora.patch diff --git a/s390utils-2.38.0-fedora.patch b/s390utils-2.38.0-fedora.patch deleted file mode 100644 index e69de29..0000000 diff --git a/s390utils-2.39.0-fedora.patch b/s390utils-2.39.0-fedora.patch new file mode 100644 index 0000000..f6f0d44 --- /dev/null +++ b/s390utils-2.39.0-fedora.patch @@ -0,0 +1,63 @@ +From 6bf9a8579cc184e64ab54e08073280ad005d50f6 Mon Sep 17 00:00:00 2001 +From: Peter Jin +Date: Wed, 1 Oct 2025 15:02:10 -0400 +Subject: [PATCH 1/2] udev/rules.d: make virtio-blk devices non-rotational +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Performance measurements turned out that in certain situations the +paging/swap logic turns on the rotational feature for block devices. In the +past, this feature has been disabled for DASD devices. FCP and NVMe devices +are considered non-rotational by default (or exposed by the storage server). +Because those are the backing devices on Linux on Z/LinuxONE instances, +ensure that virtio-blk devices are always non-rotational. + +Signed-off-by: Peter Jin +Signed-off-by: Jan Höppner +(cherry picked from commit 82f8c137e1881577d89309223f6d459361c671dd) +--- + etc/udev/rules.d/59-virtio-blk.rules | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 etc/udev/rules.d/59-virtio-blk.rules + +diff --git a/etc/udev/rules.d/59-virtio-blk.rules b/etc/udev/rules.d/59-virtio-blk.rules +new file mode 100644 +index 00000000..2e3c13f7 +--- /dev/null ++++ b/etc/udev/rules.d/59-virtio-blk.rules +@@ -0,0 +1 @@ ++SUBSYSTEM=="block", ACTION=="add", KERNEL=="vd*[!0-9]", TEST=="queue/rotational", ATTR{queue/rotational}="0" +-- +2.51.1 + + +From 6e854376073b2907301310b1110f1fc6e02f0dc5 Mon Sep 17 00:00:00 2001 +From: Peter Jin +Date: Wed, 1 Oct 2025 15:09:49 -0400 +Subject: [PATCH 2/2] udev/rules.d: Set default io scheduler to 'none' for + virtio-blk +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use 'none' as default io scheduler for virtio-blk devices. Performance +improvements for multi-queue setups and to reduce CPU consumption. + +Signed-off-by: Peter Jin +Signed-off-by: Jan Höppner +(cherry picked from commit 6ee5ffef91cb4157079fecb89bf42aa41e81e801) +--- + etc/udev/rules.d/59-virtio-blk.rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/etc/udev/rules.d/59-virtio-blk.rules b/etc/udev/rules.d/59-virtio-blk.rules +index 2e3c13f7..ca6e1c4d 100644 +--- a/etc/udev/rules.d/59-virtio-blk.rules ++++ b/etc/udev/rules.d/59-virtio-blk.rules +@@ -1 +1,2 @@ + SUBSYSTEM=="block", ACTION=="add", KERNEL=="vd*[!0-9]", TEST=="queue/rotational", ATTR{queue/rotational}="0" ++SUBSYSTEM=="block", ACTION=="add", KERNEL=="vd*[!0-9]", TEST=="queue/scheduler", ATTR{queue/scheduler}="none" +-- +2.51.1 + diff --git a/s390utils.spec b/s390utils.spec index d6235bc..026c593 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,8 +16,8 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.38.0 -Release: 2%{?dist} +Version: 2.39.0 +Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files (LGPL-2.1-or-later) # @@ -74,7 +74,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -#Patch100: s390utils-%%{version}-fedora.patch +Patch100: s390utils-%%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -207,6 +207,7 @@ fi # move tools to searchable dir mv %{buildroot}%{_datadir}/s390-tools/netboot/mk-s390image %{buildroot}%{_bindir} +mv %{buildroot}%{_datadir}/s390-tools/netboot/mk-s390image.1 %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}{/boot,%{_udevrulesdir},%{_sysconfdir}/{profile.d,sysconfig},%{_prefix}/lib/modules-load.d} install -p -m 644 zipl/boot/tape0.bin %{buildroot}/boot/tape0 @@ -256,10 +257,10 @@ touch %{buildroot}%{_sysconfdir}/zipl.conf # install systemd sysusers and tmpfiles mkdir -p %{buildroot}{%{_sysusersdir},%{_tmpfilesdir}}/ for f in s390utils-*.conf.usr; do - install -p $f %{buildroot}%{_sysusersdir}/$(basename -s .usr $f) + install -p -m 644 $f %{buildroot}%{_sysusersdir}/$(basename -s .usr $f) done for f in s390utils-*.conf.tmp; do - install -p $f %{buildroot}%{_tmpfilesdir}/$(basename -s .tmp $f) + install -p -m 644 $f %{buildroot}%{_tmpfilesdir}/$(basename -s .tmp $f) done %endif @@ -331,6 +332,7 @@ License: MIT Summary: S390 core tools Provides: s390-tools-core = %{epoch}:%{version}-%{release} Requires: coreutils +Requires: makedumpfile %{?systemd_requires} # BRs are covered via the base package @@ -406,6 +408,7 @@ This package provides minimal set of tools needed to system to boot. %{_udevrulesdir}/56-dasd.rules %{_udevrulesdir}/56-zfcp.rules %{_udevrulesdir}/59-dasd.rules +%{_udevrulesdir}/59-virtio-blk.rules %{_udevrulesdir}/60-readahead.rules %{_udevrulesdir}/81-ccw.rules %{_udevrulesdir}/81-dpm.rules @@ -639,9 +642,9 @@ For more information refer to the following publications: %{_bindir}/cpacfinfo %{_bindir}/dump2tar %{_bindir}/genprotimg +%{_bindir}/mk-s390image %{_bindir}/pvapconfig %{_bindir}/pvimg -%{_bindir}/mk-s390image %{_bindir}/pvattest %{_bindir}/pvextract-hdr %{_bindir}/pvsecret @@ -674,6 +677,7 @@ For more information refer to the following publications: %{_mandir}/man1/cpacfinfo.1* %{_mandir}/man1/dump2tar.1* %{_mandir}/man1/genprotimg.1* +%{_mandir}/man1/mk-s390image.1* %{_mandir}/man1/pvapconfig.1* %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-check.1* @@ -960,6 +964,7 @@ fi %{_mandir}/man1/ts-shell.1* %{_mandir}/man7/af_iucv.7* %{_mandir}/man8/chiucvallow.8* +%{_mandir}/man8/lsiucvallow.8* %{_mandir}/man9/hvc_iucv.9* %{_unitdir}/iucvtty-login@.service %{_unitdir}/ttyrun-getty@.service @@ -1124,6 +1129,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Thu Nov 13 2025 Dan Horák - 2:2.39.0-1 +- rebased to 2.39.0 (rhbz#2403755) + * Fri Jul 25 2025 Fedora Release Engineering - 2:2.38.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 16b71cb..17deb64 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.38.0.tar.gz) = 9ca9393e9deeab5c1df5e9eaa3c12e340917ffd5fe07d9a09087d6488d8e2ec0a136805650830d128595854b818a1da94151003e15954e556ba373b226a7369e -SHA512 (s390-tools-2.38.0-rust-vendor.tar.xz) = c55d2870ad9f90333de2536e7921951185746f0972d5d488bf317b56e754525e4dbd0f63d547229197199b51d41b7032172b6ba7ffacd9a96a01dbd13b9c4d9e +SHA512 (s390-tools-2.39.0.tar.gz) = ee9447f28f0cc43b4eba8110879174372a4ed85e2e53c3500e02723275c0aee01fd4913558ef3eaa62be40a0f5e634c3eb59587150e809fe14e8b4794e340ac7 +SHA512 (s390-tools-2.39.0-rust-vendor.tar.xz) = eb0cd352e8d3721ba52f79968494e72fc99b5655bbd34c359dfb98d81748a367d87854c799e5d7e88d9fef5209ce0cc5e91286a8259e3fef90e0e53a7b195a20 From 020fb911109c1775c45bf2f59034168197599f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 6 Jan 2026 18:13:01 +0000 Subject: [PATCH 139/141] - rebased to 2.40.0 (rhbz#2421447) --- s390utils.spec | 13 +++++++++++-- sources | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/s390utils.spec b/s390utils.spec index 026c593..6a85b8c 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -16,7 +16,7 @@ Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.39.0 +Version: 2.40.0 Release: 1%{?dist} Epoch: 2 # MIT covers nearly all the files, except init files (LGPL-2.1-or-later) @@ -74,7 +74,7 @@ Patch0: s390-tools-zipl-invert-script-options.patch Patch1: s390-tools-zipl-blscfg-rpm-nvr-sort.patch # upstream fixes/updates -Patch100: s390utils-%%{version}-fedora.patch +#Patch100: s390utils-%%{version}-fedora.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -288,7 +288,9 @@ done %{_bindir}/pvattest %{_bindir}/pvextract-hdr %{_bindir}/pvimg +%{_bindir}/pvinfo %{_bindir}/pvsecret +%{_bindir}/pvverify %{_mandir}/man1/genprotimg.1* %{_mandir}/man1/pvattest.1* %{_mandir}/man1/pvattest-check.1* @@ -310,6 +312,7 @@ done %{_mandir}/man1/pvsecret-retrieve.1* %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* +%{_mandir}/man1/pvverify.1* %dir %{_datadir}/s390-tools %{_datadir}/s390-tools/pvimg/ %{bash_completions_dir}/*.bash @@ -645,9 +648,11 @@ For more information refer to the following publications: %{_bindir}/mk-s390image %{_bindir}/pvapconfig %{_bindir}/pvimg +%{_bindir}/pvinfo %{_bindir}/pvattest %{_bindir}/pvextract-hdr %{_bindir}/pvsecret +%{_bindir}/pvverify %{_bindir}/zkey %{_bindir}/zkey-cryptsetup %{_bindir}/zpwr @@ -699,6 +704,7 @@ For more information refer to the following publications: %{_mandir}/man1/pvsecret-retrieve.1* %{_mandir}/man1/pvsecret-verify.1* %{_mandir}/man1/pvsecret.1* +%{_mandir}/man1/pvverify.1* %{_mandir}/man1/zkey.1* %{_mandir}/man1/zkey-cryptsetup.1* %{_mandir}/man1/zkey-ekmfweb.1* @@ -1129,6 +1135,9 @@ User-space development files for the s390/s390x architecture. %changelog +* Tue Jan 06 2026 Dan Horák - 2:2.40.0-1 +- rebased to 2.40.0 (rhbz#2421447) + * Thu Nov 13 2025 Dan Horák - 2:2.39.0-1 - rebased to 2.39.0 (rhbz#2403755) diff --git a/sources b/sources index 17deb64..8572938 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (s390-tools-2.39.0.tar.gz) = ee9447f28f0cc43b4eba8110879174372a4ed85e2e53c3500e02723275c0aee01fd4913558ef3eaa62be40a0f5e634c3eb59587150e809fe14e8b4794e340ac7 -SHA512 (s390-tools-2.39.0-rust-vendor.tar.xz) = eb0cd352e8d3721ba52f79968494e72fc99b5655bbd34c359dfb98d81748a367d87854c799e5d7e88d9fef5209ce0cc5e91286a8259e3fef90e0e53a7b195a20 +SHA512 (s390-tools-2.40.0.tar.gz) = 1943429581b280bf9ea370da3700a234d509837cb45b2354cdf79b38db87d2183010d18d9132defd77b9d8e11b7e002c447ffd7c912e20a50da4cb6877758c0e +SHA512 (s390-tools-2.40.0-rust-vendor.tar.xz) = fd1894c4e950a3c51054432731a3aeef4318e794aa4af2dc5fed31da16dce2020f014a64241e44766fb40b0fd6c1ac5943366e38dcfebf264875220ecf1285b5 From 1e19416b2bce1f3042d9ca4f98025fd909007f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 6 Jan 2026 19:31:58 +0100 Subject: [PATCH 140/141] drop outdated patch and add new placeholder one --- s390utils-2.39.0-fedora.patch | 63 ----------------------------------- s390utils-2.40.0-fedora.patch | 0 2 files changed, 63 deletions(-) delete mode 100644 s390utils-2.39.0-fedora.patch create mode 100644 s390utils-2.40.0-fedora.patch diff --git a/s390utils-2.39.0-fedora.patch b/s390utils-2.39.0-fedora.patch deleted file mode 100644 index f6f0d44..0000000 --- a/s390utils-2.39.0-fedora.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 6bf9a8579cc184e64ab54e08073280ad005d50f6 Mon Sep 17 00:00:00 2001 -From: Peter Jin -Date: Wed, 1 Oct 2025 15:02:10 -0400 -Subject: [PATCH 1/2] udev/rules.d: make virtio-blk devices non-rotational -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Performance measurements turned out that in certain situations the -paging/swap logic turns on the rotational feature for block devices. In the -past, this feature has been disabled for DASD devices. FCP and NVMe devices -are considered non-rotational by default (or exposed by the storage server). -Because those are the backing devices on Linux on Z/LinuxONE instances, -ensure that virtio-blk devices are always non-rotational. - -Signed-off-by: Peter Jin -Signed-off-by: Jan Höppner -(cherry picked from commit 82f8c137e1881577d89309223f6d459361c671dd) ---- - etc/udev/rules.d/59-virtio-blk.rules | 1 + - 1 file changed, 1 insertion(+) - create mode 100644 etc/udev/rules.d/59-virtio-blk.rules - -diff --git a/etc/udev/rules.d/59-virtio-blk.rules b/etc/udev/rules.d/59-virtio-blk.rules -new file mode 100644 -index 00000000..2e3c13f7 ---- /dev/null -+++ b/etc/udev/rules.d/59-virtio-blk.rules -@@ -0,0 +1 @@ -+SUBSYSTEM=="block", ACTION=="add", KERNEL=="vd*[!0-9]", TEST=="queue/rotational", ATTR{queue/rotational}="0" --- -2.51.1 - - -From 6e854376073b2907301310b1110f1fc6e02f0dc5 Mon Sep 17 00:00:00 2001 -From: Peter Jin -Date: Wed, 1 Oct 2025 15:09:49 -0400 -Subject: [PATCH 2/2] udev/rules.d: Set default io scheduler to 'none' for - virtio-blk -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use 'none' as default io scheduler for virtio-blk devices. Performance -improvements for multi-queue setups and to reduce CPU consumption. - -Signed-off-by: Peter Jin -Signed-off-by: Jan Höppner -(cherry picked from commit 6ee5ffef91cb4157079fecb89bf42aa41e81e801) ---- - etc/udev/rules.d/59-virtio-blk.rules | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/etc/udev/rules.d/59-virtio-blk.rules b/etc/udev/rules.d/59-virtio-blk.rules -index 2e3c13f7..ca6e1c4d 100644 ---- a/etc/udev/rules.d/59-virtio-blk.rules -+++ b/etc/udev/rules.d/59-virtio-blk.rules -@@ -1 +1,2 @@ - SUBSYSTEM=="block", ACTION=="add", KERNEL=="vd*[!0-9]", TEST=="queue/rotational", ATTR{queue/rotational}="0" -+SUBSYSTEM=="block", ACTION=="add", KERNEL=="vd*[!0-9]", TEST=="queue/scheduler", ATTR{queue/scheduler}="none" --- -2.51.1 - diff --git a/s390utils-2.40.0-fedora.patch b/s390utils-2.40.0-fedora.patch new file mode 100644 index 0000000..e69de29 From 44975e04d93d0818ecac033a2e833404de693091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 6 Jan 2026 19:41:55 +0100 Subject: [PATCH 141/141] update filelist for multi-arch builds --- s390utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390utils.spec b/s390utils.spec index 6a85b8c..7da6a02 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -288,7 +288,6 @@ done %{_bindir}/pvattest %{_bindir}/pvextract-hdr %{_bindir}/pvimg -%{_bindir}/pvinfo %{_bindir}/pvsecret %{_bindir}/pvverify %{_mandir}/man1/genprotimg.1* @@ -314,6 +313,7 @@ done %{_mandir}/man1/pvsecret.1* %{_mandir}/man1/pvverify.1* %dir %{_datadir}/s390-tools +%{_datadir}/s390-tools/netboot/ %{_datadir}/s390-tools/pvimg/ %{bash_completions_dir}/*.bash %{zsh_completions_dir}/_*