From a83d3a599acf1f4fc017f8999873f117d9c8c803bc2d703b12e604f95e2a340a Mon Sep 17 00:00:00 2001 From: Nikolay Gueorguiev Date: Wed, 26 Apr 2023 10:36:10 +0000 Subject: [PATCH] Accepting request 1082965 from home:ngueorguiev:branches:Base:System - Tailored the .spec, added a patch * s390-tools-ALP-zdev-live.patch OBS-URL: https://build.opensuse.org/request/show/1082965 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=167 --- .gitattributes | 2 - dracut-zdev-live-20230321.tar | 3 - s390-tools-ALP-zdev-live.patch | 133 +++++++++++++++++++++++++++++++++ s390-tools.changes | 6 ++ s390-tools.spec | 10 ++- 5 files changed, 145 insertions(+), 9 deletions(-) delete mode 100644 dracut-zdev-live-20230321.tar create mode 100644 s390-tools-ALP-zdev-live.patch diff --git a/.gitattributes b/.gitattributes index 254d368..9b03811 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,5 +21,3 @@ *.xz filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text -## Specific LFS patterns -dracut-zdev-live-20230321.tar filter=lfs diff=lfs merge=lfs -text diff --git a/dracut-zdev-live-20230321.tar b/dracut-zdev-live-20230321.tar deleted file mode 100644 index b525ba8..0000000 --- a/dracut-zdev-live-20230321.tar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1862ca7d850d76c393d594681b2aaef8c7101c6c38ea697d32ffab6d45db620e -size 10240 diff --git a/s390-tools-ALP-zdev-live.patch b/s390-tools-ALP-zdev-live.patch new file mode 100644 index 0000000..8d6f946 --- /dev/null +++ b/s390-tools-ALP-zdev-live.patch @@ -0,0 +1,133 @@ +--- + zdev/dracut/96zdev-live/module-setup.sh | 32 +++++++++++++++++++++++++ + zdev/dracut/96zdev-live/parse-zdev-live.sh | 36 +++++++++++++++++++++++++++++ + zdev/dracut/96zdev-live/write-udev-live.sh | 11 ++++++++ + zdev/dracut/Makefile | 15 ++++++++++-- + 4 files changed, 92 insertions(+), 2 deletions(-) + +--- /dev/null ++++ b/zdev/dracut/96zdev-live/module-setup.sh +@@ -0,0 +1,32 @@ ++#!/bin/bash ++ ++# called by dracut ++check() { ++ arch=${DRACUT_ARCH:-$(uname -m)} ++ [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 ++ ++ require_binaries chzdev || return 1 ++ ++ [[ $hostonly ]] || return 0 ++ ++ # or on request ++ return 255 ++} ++ ++# called by dracut ++depends() { ++ echo bash ++ return 0 ++} ++ ++# called by dracut ++installkernel() { ++ instmods ctcm lcs qeth qeth_l2 qeth_l3 dasd_diag_mod dasd_eckd_mod dasd_fba_mod ++} ++ ++# called by dracut ++install() { ++ inst_hook cmdline 41 "$moddir/parse-zdev-live.sh" ++ inst_hook cleanup 41 "$moddir/write-udev-live.sh" ++ inst_multiple chzdev ++} +--- /dev/null ++++ b/zdev/dracut/96zdev-live/parse-zdev-live.sh +@@ -0,0 +1,36 @@ ++#!/bin/bash ++# ++# 96zdev-live/parse-zdev-live.sh ++# Parse the kernel command line for rd.zdev kernel parameters. These ++# parameters are evaluated and used to configure z Systems specific devices ++# with chzdev(8), especially for use on live/installation type media. ++# Note: this is only active on no-hostonly initrds (by default). ++# ++# Format: ++# rd.zdev=TYPE,DEVICE[,SETTINGS] ++# ++# where ++# ++# TYPE: all device types supported by chzdev(8), like qeth and dasd ++# DEVICE: device specification as supported by chzdev(8) '--enable', ++# with the exception of specifying multiple devices, which ++# need to be separated by commas. Channel group members ++# (or zFCP parameters) in turn are separated by colons. ++# SETTINGS: Settings are positional arguments of chzdev in the form ++# KEY=VALUE separated by commas. ++ ++zdev_enable="--persistent --enable" ++zdev_base_args="--force --yes --no-root-update --no-settle" ++ ++for zdev in $(getargs rd.zdev -d 'rd_ZDEV=') ; do ++ IFS=, read -r z_drv z_chan z_opts <<< "$zdev" ++ if [ -n "$z_drv" ] && [ "$z_drv" = "no-auto" -o "$z_drv" = "auto" ] ; then ++ : # ignore, as it's handled by 95zdev ++ elif [ -z "$z_drv" ] || [ -z "$z_chan" ] ; then ++ warn "Unsupported arguments for rd.zdev=" ++ else ++ info "+ chzdev $zdev_enable [...] $z_drv $z_chan $z_opts" ++ chzdev $zdev_enable $zdev_base_args $z_drv $z_chan $z_opts ++ fi ++done ++ +--- /dev/null ++++ b/zdev/dracut/96zdev-live/write-udev-live.sh +@@ -0,0 +1,11 @@ ++#!/bin/sh ++# ++# 96zdev-live/write-udev-live.sh ++# Copy udeve rules generated by chzdev for device activation starting with 41 ++# to a *writable* /sysroot -- this is primarily useful for live/installation- ++# type media (and by default only active on no-hostonly initrds) ++# ++ ++if [ -w /sysroot/etc/udev/rules.d ]; then ++ cp -p /etc/udev/rules.d/41-* /sysroot/etc/udev/rules.d ++fi +--- a/zdev/dracut/Makefile ++++ b/zdev/dracut/Makefile +@@ -2,17 +2,23 @@ + include ../../common.mak + + ZDEVDIR := 95zdev ++ZDEVLIVEDIR := 96zdev-live + + # HAVE_DRACUT + # +-# This install time parameter determines whether the zdev dracut module is +-# installed (HAVE_DRACUT=1) or not (default). When installed, the module ++# This install time parameter determines whether the zdev dracut modules are ++# installed (HAVE_DRACUT=1) or not (default). When installed, the 95zdev module + # performs the following functions when dracut is run: + # + # - copy the persistent root device configuration to the initial ram disk + # - install a boot-time hook to apply firmware-provided configuration data + # to the system + # ++# The 96zdev-live module performs the following functions when dracut is run: ++# ++# - install a boot-time hook to apply command-line-provided configuration data ++# to a no-hostonly built initial ram disk for use in live/installation media ++# + ifeq ($(HAVE_DRACUT),1) + install: + $(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/ +@@ -20,4 +26,9 @@ install: + $(INSTALL) -m 755 $(ZDEVDIR)/module-setup.sh \ + $(ZDEVDIR)/parse-zdev.sh \ + $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVDIR)/ ++ $(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVLIVEDIR) ++ $(INSTALL) -m 755 $(ZDEVLIVEDIR)/module-setup.sh \ ++ $(ZDEVLIVEDIR)/parse-zdev-live.sh \ ++ $(ZDEVLIVEDIR)/write-udev-live.sh \ ++ $(DESTDIR)$(DRACUTMODDIR)/$(ZDEVLIVEDIR)/ + endif diff --git a/s390-tools.changes b/s390-tools.changes index fbaf6e6..bed27c1 100644 --- a/s390-tools.changes +++ b/s390-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 19 11:59:50 UTC 2023 - Nikolay Gueorguiev + +- Tailored the .spec, added a patch + * s390-tools-ALP-zdev-live.patch + ------------------------------------------------------------------- Thu Mar 23 12:45:57 UTC 2023 - Nikolay Gueorguiev diff --git a/s390-tools.spec b/s390-tools.spec index 68289d7..d2e1b89 100644 --- a/s390-tools.spec +++ b/s390-tools.spec @@ -105,7 +105,7 @@ Source39: vmlogrdr.service.suse Source40: xpram.service Source41: pkey.conf ### -Source42: dracut-zdev-live-20230321.tar +### Source42: dracut-zdev-live-20230321.tar ### ### Obsolete scripts and man pages to be removed once changes in other tools are made @@ -170,6 +170,8 @@ Patch926: s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boo # Bug 1209196 Patch927: s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch # +Patch928: s390-tools-ALP-zdev-live.patch +# Patch999: s390-tools-sles15sp5-fix-chown-commands-syntax.patch BuildRequires: curl-devel @@ -327,7 +329,7 @@ volume. If available, it reconfigures the FCP re-IPL settings to use an operational path. %prep -%autosetup -p1 -a 42 +%autosetup -p1 cp -vi %{SOURCE22} CAUTION @@ -398,8 +400,8 @@ cp %{SOURCE2} zipl.conf.sample cp %{SOURCE23} README.SUSE ### Adding SUSE scripts -install -d -m 755 %{buildroot}%{_prefix}/lib/dracut/modules.d -cp -a 96zdev-live %{buildroot}%{_prefix}/lib/dracut/modules.d +### install -d -m 755 %{buildroot}%{_prefix}/lib/dracut/modules.d +### cp -a 96zdev-live %{buildroot}%{_prefix}/lib/dracut/modules.d ### cd %{buildroot}