Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package s390-tools for openSUSE:Factory 
checked in at 2026-03-03 15:32:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/s390-tools (Old)
 and      /work/SRC/openSUSE:Factory/.s390-tools.new.29461 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "s390-tools"

Tue Mar  3 15:32:23 2026 rev:110 rq:1336027 version:2.41.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/s390-tools/s390-tools.changes    2026-02-21 
21:05:18.237122119 +0100
+++ /work/SRC/openSUSE:Factory/.s390-tools.new.29461/s390-tools.changes 
2026-03-03 15:33:22.707112457 +0100
@@ -1,0 +2,59 @@
+Mon Mar  2 11:48:50 UTC 2026 - Nikolay Gueorguiev <[email protected]>
+
+- Refactored the spec file for transactional and immutable OS
+  * Modernized the .spec file for transactional and immutable OS environments.
+  * Removed legacy suse_version and sle_version conditionals, standardizing on 
UsrMerge paths.
+  * Replaced manual %pre group creations with systemd-sysusers configuration 
for ts-shell, zkeyadm, and cpacfstats.
+  * Replaced hardcoded /var/log directory management with systemd-tmpfiles 
configuration.
+  * Removed obsolete systemctl daemon-reload calls and consolidate standard 
%service_* systemd macros.
+  * Dropped brittle dynamic file list generation (find/grep) in favor of 
explicit and deterministic %files declarations.
+  * Resolved "File listed twice" conflicts between the main package and 
chreipl-fcp-mpath subpackage.
+  * Added missing BuildRequires for systemd-rpm-macros and sysuser-tools.
+  * Fixed unpackaged files errors for mdevctl callouts, shell completions, and 
root /lib helpers.
+  * Changed BuildArch to noarch for the chreipl-fcp-mpath subpackage.
+- Updated the pkey.conf file (bsc#1258866, jsc#PED-15538), it contain the 
following drivers:
+  * uvdevice
+  * pkey
+  * pkey_cca
+  * pkey_ep11
+  * pkey_pckmo
+  * pkey_uv
+  * paes_s390
+  * phmac_s390
+  * zcrypt
+  * zcrypt_cex4 
+- Added files (renamed from *.opensuse)
+  * 59-graf.rules
+  * dasd_configure
+  * dasd_reload
+  * detach_disks.sh
+  * iucv_configure
+  * killcdl
+  * mkdump.pl
+  * README.SUSE
+  * virtsetup.sh
+  * vmlogrdr.service
+- Removed obolete files
+  * 59-graf.rules.opensuse
+  * 59-graf.rules.suse
+  * dasd_configure.opensuse
+  * dasd_configure.suse
+  * dasd_reload.opensuse
+  * dasd_reload.suse
+  * detach_disks.sh.opensuse
+  * detach_disks.sh.suse
+  * iucv_configure.opensuse
+  * iucv_configure.suse
+  * killcdl.opensuse
+  * killcdl.suse
+  * mkdump.pl.opensuse
+  * mkdump.pl.suse
+  * README.SUSE.opensuse
+  * README.SUSE.suse
+  * virtsetup.sh.opensuse
+  * virtsetup.sh.suse
+  * vmlogrdr.service.opensuse
+  * vmlogrdr.service.suse
+- Re-vendor-ed vendor.tar.zst
+
+-------------------------------------------------------------------

Old:
----
  59-graf.rules.opensuse
  59-graf.rules.suse
  README.SUSE.opensuse
  README.SUSE.suse
  dasd_configure.opensuse
  dasd_configure.suse
  dasd_reload.opensuse
  dasd_reload.suse
  detach_disks.sh.opensuse
  detach_disks.sh.suse
  iucv_configure.opensuse
  iucv_configure.suse
  killcdl.opensuse
  killcdl.suse
  mkdump.pl.opensuse
  mkdump.pl.suse
  virtsetup.sh.opensuse
  virtsetup.sh.suse
  vmlogrdr.service.opensuse
  vmlogrdr.service.suse

New:
----
  59-graf.rules
  README.SUSE
  dasd_configure
  dasd_reload
  detach_disks.sh
  iucv_configure
  killcdl
  mkdump.pl
  virtsetup.sh
  vmlogrdr.service

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ s390-tools.spec ++++++
--- /var/tmp/diff_new_pack.GHUIVz/_old  2026-03-03 15:33:24.383181885 +0100
+++ /var/tmp/diff_new_pack.GHUIVz/_new  2026-03-03 15:33:24.387182051 +0100
@@ -22,16 +22,6 @@
 %if ! %{defined _fillupdir}
   %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
-%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150300
-# systemd-rpm-macros is wrong in 15.3 and below
-%define _modprobedir /lib/modprobe.d
-%endif
-%global modprobe_d_files 90-s390-tools.conf
-%if 0%{?suse_version} >= 1550
-%define _mysbindir %{_sbindir}
-%else
-%define _mysbindir /sbin
-%endif
 
 Name:           s390-tools
 Version:        2.41.0
@@ -49,31 +39,19 @@
 Source6:        sysconfig.xpram
 Source7:        appldata
 Source8:        sysconfig.appldata
+#
 Source10:       dasdro
-%if 0%{?suse_version} >= 1550
-Source11:       dasd_reload.opensuse
-Source12:       mkdump.pl.opensuse
-%else
-Source11:       dasd_reload.suse
-Source12:       mkdump.pl.suse
-%endif
+Source11:       dasd_reload
+Source12:       mkdump.pl
 Source13:       sysconfig.osasnmpd
 Source14:       zfcp_san_disc
 Source15:       mkdump.8
 Source18:       zpxe.rexx
 Source19:       rules.xpram
 Source20:       rules.hw_random
-%if 0%{?suse_version} >= 1550
-Source21:       59-graf.rules.opensuse
-%else
-Source21:       59-graf.rules.suse
-%endif
+Source21:       59-graf.rules
 Source22:       s390-tools-zdsfs.caution.txt
-%if 0%{?suse_version} >= 1550
-Source23:       README.SUSE.opensuse
-%else
-Source23:       README.SUSE.suse
-%endif
+Source23:       README.SUSE
 Source24:       cputype
 Source25:       cputype.8
 Source26:       cio_ignore.service
@@ -81,43 +59,24 @@
 Source28:       59-prng.rules
 Source29:       59-zfcp-compat.rules
 Source30:       90-s390-tools.conf
-%if 0%{?suse_version} >= 1550
-Source31:       detach_disks.sh.opensuse
-Source32:       killcdl.opensuse
-%else
-Source31:       detach_disks.sh.suse
-Source32:       killcdl.suse
-%endif
+Source31:       detach_disks.sh
+Source32:       killcdl
 Source33:       lgr_check
 Source34:       sysconfig.virtsetup
 Source35:       virtsetup.service
-%if 0%{?suse_version} >= 1550
-Source36:       virtsetup.sh.opensuse
-%else
-Source36:       virtsetup.sh.suse
-%endif
+Source36:       virtsetup.sh
 Source37:       appldata.service
 Source38:       hsnc.service
-%if 0%{?suse_version} >= 1550
-Source39:       vmlogrdr.service.opensuse
-%else
-Source39:       vmlogrdr.service.suse
-%endif
+Source39:       vmlogrdr.service
 Source40:       xpram.service
 Source41:       pkey.conf
 
-### Obsolete scripts and man pages to be removed once changes in other tools 
are made
-### That's been delayed to at least SLES12 SP1, but I'm leaving the comments 
here.
+### SUSE programs, scripts and man pages to be removed once changes in other 
tools are made
 Source86:       read_values.c
 Source87:       read_values.8
 Source88:       ctc_configure
-%if 0%{?suse_version} >= 1550
-Source89:       dasd_configure.opensuse
-Source90:       iucv_configure.opensuse
-%else
-Source89:       dasd_configure.suse
-Source90:       iucv_configure.suse
-%endif
+Source89:       dasd_configure
+Source90:       iucv_configure
 Source91:       qeth_configure
 Source92:       zfcp_disk_configure
 Source93:       zfcp_host_configure
@@ -150,7 +109,7 @@
 BuildRequires:  gettext-tools
 BuildRequires:  glib2-devel
 BuildRequires:  glibc-devel-static
-BuildRequires:  libcryptsetup-devel > 2.0.3
+BuildRequires:  libcryptsetup-devel >= 2.8.2
 BuildRequires:  libjson-c-devel
 BuildRequires:  libnl3-devel
 BuildRequires:  libxml2-devel
@@ -160,8 +119,11 @@
 BuildRequires:  openssl-devel >= 1.1.1l
 BuildRequires:  pesign-obs-integration
 BuildRequires:  systemd-devel
+BuildRequires:  systemd-rpm-macros
+BuildRequires:  sysuser-tools
 BuildRequires:  tcpd-devel
 BuildRequires:  zlib-devel-static
+%{?sysusers_requires}
 ### s390x
 %ifarch s390x
 BuildRequires:  kernel-zfcpdump
@@ -182,21 +144,21 @@
 Requires:       procps
 Requires:       util-linux
 %ifarch s390x
-Requires:       gawk
 BuildRequires:  libica-devel-static
+Requires:       gawk
 Requires:       perl-base
 Requires:       rsync
 Requires:       s390-tools-genprotimg-data
 Requires:       tar
+Provides:       group(cpacfstats)
+Provides:       group(ts-shell)
+Provides:       group(zkeyadm)
 %endif
 Requires(post): %fillup_prereq
 Requires(post): permissions
 Requires(pre):  shadow
 Recommends:     blktrace
 Provides:       s390utils:/sbin/dasdfmt
-Provides:       group(cpacfstats)
-Provides:       group(ts-shell)
-Provides:       group(zkeyadm)
 %ifarch x86_64
 Recommends:     s390-tools-genprotimg-data
 %endif
@@ -218,9 +180,7 @@
 pvattest   - create, perform, and verify protected virtualization attestation 
measurements
 pvsecret   - manage secrets for IBM Secure Execution guests.
 
-Warning: There is an auxiliary data package - s390-tools-genprotimg-data.
-         To install s390-tools properly, please use:
-         'sudo zypper install s390-tools s390-tools-genprotimg-data'
+Note: There is an auxiliary data package - s390-tools-genprotimg-data.
 
 %package -n osasnmpd
 Summary:        OSA-Express SNMP subagent
@@ -310,6 +270,7 @@
 Summary:        Use multipath information for re-IPL path failover
 License:        MIT
 Group:          System/Boot
+BuildArch:      noarch
 BuildRequires:  bash
 BuildRequires:  coreutils
 ## Required for build+install with ENABLE_DOC=1
@@ -373,9 +334,21 @@
 ###     all
 gcc -static -o read_values ${OPT_FLAGS} %{SOURCE86} -lqc
 
+# Generate sysusers configuration and pre-install scriptlet
+cat > s390-tools-sysusers.conf <<EOF
+# Type Name ID GID Home Shell
+g ts-shell - - -
+g zkeyadm - - -
+g cpacfstats - - -
+EOF
+
+# This macro generates the %%pre scriptlet automatically
+%sysusers_generate_pre s390-tools-sysusers.conf s390-tools s390-tools.conf
+
 %install
 mkdir -p %{buildroot}/boot/zipl
 mkdir -p %{buildroot}%{_sysconfdir}/zkey/repository
+
 %make_install \
      ARCH=s390x \
      ZFCPDUMP_DIR=%{_prefix}/lib/s390-tools/zfcpdump \
@@ -385,130 +358,99 @@
      HAVE_CARGO=1 \
      HAVE_DRACUT=1 \
      HAVE_LIBNL3=1
-###     all
 
-# The make install command puts things in /etc/sysconfig and not the
-# fillup-templates directory. Let's try moving them where they belong
+# Move sysconfig files to the fillup-templates directory
 mkdir -p %{buildroot}%{_fillupdir}
 pushd %{buildroot}%{_sysconfdir}/sysconfig/
-for sysconffile in *
-  do mv -vi $sysconffile %{buildroot}%{_fillupdir}/sysconfig.$sysconffile
-  done
+for sysconffile in *; do
+    mv -vi $sysconffile %{buildroot}%{_fillupdir}/sysconfig.$sysconffile
+done
 popd
 
+install -D -m 0644 s390-tools-sysusers.conf 
%{buildroot}%{_sysusersdir}/s390-tools.conf
+
+# Install utilities and man pages
 install -m 755 read_values %{buildroot}/%{_bindir}/
-install -m644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE87}
+install -m 644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE87}
 
-# The "usrmerge" has happened in openSUSE:Factory, but not yet in SLES.
-# Make sure we look for the zfcpdump kernel image in the right place.
-%if 0%{?suse_version} >= 1550
+# Standardized zfcpdump kernel image path (UsrMerge baseline)
 install -D -m600 %{_prefix}/lib/modules/*-zfcpdump/image 
%{buildroot}%{_prefix}/lib/s390-tools/zfcpdump/zfcpdump-image
-%else
-install -D -m600 /boot/image-*-zfcpdump 
%{buildroot}%{_prefix}/lib/s390-tools/zfcpdump/zfcpdump-image
-%endif
 
-install -D -m644 etc/cpuplugd.conf %{buildroot}%{_sysconfdir}/cpuplugd.conf
-install -d -m755 %{buildroot}/usr/lib/udev/rules.d
-install -m644 etc/udev/rules.d/*.rules %{buildroot}/usr/lib/udev/rules.d/
+# System configs and udev rules
+install -D -m 644 etc/cpuplugd.conf %{buildroot}%{_sysconfdir}/cpuplugd.conf
+install -d -m 755 %{buildroot}%{_prefix}/lib/udev/rules.d
+install -m 644 etc/udev/rules.d/*.rules 
%{buildroot}%{_prefix}/lib/udev/rules.d/
 mv iucvterm/doc/ts-shell/iucvconn_on_login 
%{buildroot}%{_bindir}/iucvconn_on_login
-install -D -m644 %{SOURCE26} %{buildroot}/%{_unitdir}/cio_ignore.service
-install -D -m755 %{SOURCE27} 
%{buildroot}%{_prefix}/lib/systemd/scripts/setup_cio_ignore.sh
-install -D -m755 %{SOURCE31} 
%{buildroot}%{_prefix}/lib/systemd/scripts/detach_disks.sh
-install -D -m644 %{SOURCE35} %{buildroot}/%{_unitdir}/virtsetup.service
-install -D -m755 %{SOURCE36} 
%{buildroot}%{_prefix}/lib/systemd/scripts/virtsetup.sh
-install -D -m644 %{SOURCE37} %{buildroot}/%{_unitdir}/appldata.service
-install -D -m644 %{SOURCE38} %{buildroot}/%{_unitdir}/hsnc.service
-install -D -m644 %{SOURCE39} %{buildroot}/%{_unitdir}/vmlogrdr.service
-install -D -m644 %{SOURCE40} %{buildroot}/%{_unitdir}/xpram.service
-install -D -m644 %{SOURCE41} 
%{buildroot}%{_prefix}/lib/modules-load.d/pkey.conf
 
+# Install systemd services and scripts
+install -D -m 644 %{SOURCE26} %{buildroot}/%{_unitdir}/cio_ignore.service
+install -D -m 755 %{SOURCE27} 
%{buildroot}%{_prefix}/lib/systemd/scripts/setup_cio_ignore.sh
+install -D -m 755 %{SOURCE31} 
%{buildroot}%{_prefix}/lib/systemd/scripts/detach_disks.sh
+install -D -m 644 %{SOURCE35} %{buildroot}/%{_unitdir}/virtsetup.service
+install -D -m 755 %{SOURCE36} 
%{buildroot}%{_prefix}/lib/systemd/scripts/virtsetup.sh
+install -D -m 644 %{SOURCE37} %{buildroot}/%{_unitdir}/appldata.service
+install -D -m 644 %{SOURCE38} %{buildroot}/%{_unitdir}/hsnc.service
+install -D -m 644 %{SOURCE39} %{buildroot}/%{_unitdir}/vmlogrdr.service
+install -D -m 644 %{SOURCE40} %{buildroot}/%{_unitdir}/xpram.service
+install -D -m 644 %{SOURCE41} 
%{buildroot}%{_prefix}/lib/modules-load.d/pkey.conf
+
+# Legacy source definitions mapped to modern unified files
 cp %{SOURCE18} zpxe.rexx
 cp %{SOURCE2} zipl.conf.sample
 cp  %{SOURCE23} README.SUSE
 
 cd %{buildroot}
-install -D -m755 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/scripts/hsnc
-install -D -m644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.hsnc
-install -D -m755 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/scripts/xpram
-install -D -m644 %{SOURCE6} %{buildroot}%{_fillupdir}/sysconfig.xpram
-install -D -m755 %{SOURCE7} %{buildroot}%{_prefix}/lib/systemd/scripts/appldata
-install -D -m644 %{SOURCE8} %{buildroot}%{_fillupdir}/sysconfig.appldata
-install -D -m755 %{SOURCE10} %{buildroot}%{_mysbindir}/dasdro
-install -D -m755 %{SOURCE11} %{buildroot}%{_mysbindir}/dasd_reload
-install -D -m755 %{SOURCE12} %{buildroot}%{_mysbindir}/mkdump
-install -D -m644 %{SOURCE13} %{buildroot}%{_fillupdir}/sysconfig.osasnmpd
-install -D -m755 %{SOURCE14} %{buildroot}%{_mysbindir}/zfcp_san_disc
-install -D -m644 %{SOURCE15} %{buildroot}/%{_mandir}/man8
-install -D -m644 %{SOURCE19} 
%{buildroot}%{_prefix}/lib/udev/rules.d/52-xpram.rules
-install -D -m644 %{SOURCE20} 
%{buildroot}%{_prefix}/lib/udev/rules.d/52-hw_random.rules
-install -D -m644 %{SOURCE21} 
%{buildroot}%{_prefix}/lib/udev/rules.d/59-graf.rules
-install -D -m644 %{SOURCE28} 
%{buildroot}%{_prefix}/lib/udev/rules.d/59-prng.rules
-install -D -m644 %{SOURCE29} 
%{buildroot}%{_prefix}/lib/udev/rules.d/59-zfcp-compat.rules
-install -D -m644 %{SOURCE30} %{buildroot}%{_modprobedir}/90-s390-tools.conf
-install -D -m755 %{SOURCE32} %{buildroot}%{_mysbindir}/killcdl
-install -D -m755 %{SOURCE33} %{buildroot}%{_mysbindir}/lgr_check
-install -D -m644 %{SOURCE34} %{buildroot}%{_fillupdir}/sysconfig.virtsetup
-
-if [ ! -d %{_mysbindir} ]; then
-    rm -f %{_mysbindir}
-    mkdir -p %{_mysbindir}
-fi
-(cd %{buildroot}%{_sbindir}; ln -s service rcappldata)
-(cd %{buildroot}%{_sbindir}; ln -s service rchsnc)
-(cd %{buildroot}%{_sbindir}; ln -s service rcvmlogrdr)
-(cd %{buildroot}%{_sbindir}; ln -s service rcxpram)
-(cd %{buildroot}%{_sbindir}; ln -s service rccio_ignore)
-(cd %{buildroot}%{_sbindir}; ln -s service rccpacfstatsd)
-(cd %{buildroot}%{_sbindir}; ln -s service rccpi)
-(cd %{buildroot}%{_sbindir}; ln -s service rccpuplugd)
-(cd %{buildroot}%{_sbindir}; ln -s service rcdumpconf)
-(cd %{buildroot}%{_sbindir}; ln -s service rcmon_fsstatd)
-(cd %{buildroot}%{_sbindir}; ln -s service rcmon_procd)
-(cd %{buildroot}%{_sbindir}; ln -s service rcvirtsetup)
-(cd %{buildroot}%{_sbindir}; ln -s service rcopticsmon)
-
-if [ ! -d %{_bindir} ]; then
-    rm -f %{_bindir}
-    mkdir -p %{_bindir}
-fi
-install -D -m755 %{SOURCE24} %{buildroot}%{_bindir}/cputype
+install -D -m 755 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/scripts/hsnc
+install -D -m 644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.hsnc
+install -D -m 755 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/scripts/xpram
+install -D -m 644 %{SOURCE6} %{buildroot}%{_fillupdir}/sysconfig.xpram
+install -D -m 755 %{SOURCE7} 
%{buildroot}%{_prefix}/lib/systemd/scripts/appldata
+install -D -m 644 %{SOURCE8} %{buildroot}%{_fillupdir}/sysconfig.appldata
+install -D -m 755 %{SOURCE10} %{buildroot}%{_sbindir}/dasdro
+install -D -m 755 %{SOURCE11} %{buildroot}%{_sbindir}/dasd_reload
+install -D -m 755 %{SOURCE12} %{buildroot}%{_sbindir}/mkdump
+install -D -m 644 %{SOURCE13} %{buildroot}%{_fillupdir}/sysconfig.osasnmpd
+install -D -m 755 %{SOURCE14} %{buildroot}%{_sbindir}/zfcp_san_disc
+install -D -m 644 %{SOURCE15} %{buildroot}/%{_mandir}/man8
+install -D -m 644 %{SOURCE19} 
%{buildroot}%{_prefix}/lib/udev/rules.d/52-xpram.rules
+install -D -m 644 %{SOURCE20} 
%{buildroot}%{_prefix}/lib/udev/rules.d/52-hw_random.rules
+install -D -m 644 %{SOURCE21} 
%{buildroot}%{_prefix}/lib/udev/rules.d/59-graf.rules
+install -D -m 644 %{SOURCE28} 
%{buildroot}%{_prefix}/lib/udev/rules.d/59-prng.rules
+install -D -m 644 %{SOURCE29} 
%{buildroot}%{_prefix}/lib/udev/rules.d/59-zfcp-compat.rules
+install -D -m 644 %{SOURCE30} %{buildroot}%{_modprobedir}/90-s390-tools.conf
+install -D -m 755 %{SOURCE32} %{buildroot}%{_sbindir}/killcdl
+install -D -m 755 %{SOURCE33} %{buildroot}%{_sbindir}/lgr_check
+install -D -m 644 %{SOURCE34} %{buildroot}%{_fillupdir}/sysconfig.virtsetup
+
+# Create rc symlinks in _sbindir
+for svc in appldata hsnc vmlogrdr xpram cio_ignore cpacfstatsd cpi cpuplugd 
dumpconf mon_fsstatd mon_procd virtsetup opticsmon; do
+    ln -s service %{buildroot}%{_sbindir}/rc${svc}
+done
 
-install -m644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE25}
+install -D -m 755 %{SOURCE24} %{buildroot}%{_bindir}/cputype
+install -m 644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE25}
 
-# If building for openSUSE, move all the binaries installed via
-# the IBM-provided Makefile from /sbin to /usr/sbin/ to
-# align with the openSUSE "usrmerge" project
-%if 0%{?suse_version} >= 1550
-mv -vi %{buildroot}/sbin/* %{buildroot}%{_mysbindir}/
-%else
-cp -r %{buildroot}/sbin/opticsmon %{buildroot}/usr/sbin/
-%endif
+mkdir -p %{buildroot}%{_tmpfilesdir}
+cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf <<EOF
+d /var/log/ts-shell 2770 root ts-shell - -
+EOF
 
 ### Obsolete scripts and man pages to be removed once changes in other tools 
are made
-install -m755 -t %{buildroot}%{_mysbindir}/ %{SOURCE88} %{SOURCE91} 
%{SOURCE92} %{SOURCE93}
-install %{SOURCE89} %{buildroot}%{_mysbindir}/dasd_configure
-install %{SOURCE90} %{buildroot}%{_mysbindir}/iucv_configure
-install -m644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE94} %{SOURCE95} 
%{SOURCE96} %{SOURCE97} %{SOURCE98} %{SOURCE99}
-###
+install -m 755 -t %{buildroot}%{_sbindir}/ %{SOURCE88} %{SOURCE91} %{SOURCE92} 
%{SOURCE93}
+install %{SOURCE89} %{buildroot}%{_sbindir}/dasd_configure
+install %{SOURCE90} %{buildroot}%{_sbindir}/iucv_configure
+install -m 644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE94} %{SOURCE95} 
%{SOURCE96} %{SOURCE97} %{SOURCE98} %{SOURCE99}
 
 ### lsmem/chmem have been added to util-linux
-rm -fv %{buildroot}%{_mandir}/man8/lsmem.8*
-rm -fv %{buildroot}%{_mandir}/man8/chmem.8*
-rm -fv %{buildroot}%{_mysbindir}/lsmem
-rm -fv %{buildroot}%{_mysbindir}/chmem
-
-###
-find . ! -type d |
-    sed 's/^.//;\-/man/-s/^.*$/%doc &.gz/' > %{_builddir}/%{name}-filelist
-grep -v -E 
'osasnmp|etc/ziplenv|\.conf$|ekmfweb.so|ekmfweb.h|kmipclient|kmip/profiles/.*profile$|chreipl-fcp-mpath'
 %{_builddir}/%{name}-filelist >%{_builddir}/%{name}.list
-grep    osasnmp[^-] %{_builddir}/%{name}-filelist >%{_builddir}/%{name}.osasnmp
+rm -fv %{buildroot}%{_mandir}/man8/lsmem.8* 
%{buildroot}%{_mandir}/man8/chmem.8*
+rm -fv %{buildroot}%{_sbindir}/lsmem %{buildroot}%{_sbindir}/chmem
 
 touch boot/zipl/active_devices.txt
-mkdir -p ./%{_libexecdir}/net-snmp/agents
-cd      ./%{_libexecdir}/net-snmp/agents
-cat <<EOT >osasnmpd
+
+mkdir -p %{buildroot}%{_libexecdir}/net-snmp/agents
+cat <<EOT > %{buildroot}%{_libexecdir}/net-snmp/agents/osasnmpd
 #!/bin/sh
-PIDFILE=%{_localstatedir}/run/osasnmpd.pid
+PIDFILE=/run/osasnmpd.pid
 function cleanup
 {
         rm -f \$PIDFILE
@@ -517,66 +459,23 @@
 . %{_sysconfdir}/sysconfig/osasnmpd
 trap cleanup 0
 echo \$\$ >\$PIDFILE
-%{_mysbindir}/osasnmpd -f -P %{_localstatedir}/run/osasnmpd.real.pid 
\$OSASNMPD_PARAMETERS "\$@"
+%{_sbindir}/osasnmpd -f -P %{_localstatedir}/run/osasnmpd.real.pid 
\$OSASNMPD_PARAMETERS "\$@"
 EOT
-chmod 755 osasnmpd
+chmod 755 %{buildroot}%{_libexecdir}/net-snmp/agents/osasnmpd
 
 export BRP_PESIGN_FILES='/lib/s390-tools/stage3.bin'
 
-%verifyscript
-%verify_permissions -e %{_localstatedir}/log/ts-shell/
-
-%pre
-# check for ts-shell group or create it
-getent group ts-shell >/dev/null 2>&1 || groupadd -r ts-shell
-# check for zkeyadm group or create it
-getent group zkeyadm >/dev/null 2>&1 || groupadd -r zkeyadm
-# check for cpacfstats group or create it
-getent group cpacfstats >/dev/null 2>&1 || groupadd -r cpacfstats
-%service_add_pre appldata.service
-%service_add_pre cio_ignore.service
-%service_add_pre cpacfstatsd.service
-%service_add_pre cpi.service
-%service_add_pre cpuplugd.service
-%service_add_pre dumpconf.service
-%service_add_pre hsnc.service
-%service_add_pre mon_fsstatd.service
-%service_add_pre mon_procd.service
-%service_add_pre opticsmon.service
-%service_add_pre virtsetup.service
-%service_add_pre vmlogrdr.service
-%service_add_pre xpram.service
-# Avoid restoring outdated stuff in posttrans
-for _f in %{?modprobe_d_files}; do
-    [ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
-        mv -f "/etc/modprobe.d/${_f}.rpmsave" 
"/etc/modprobe.d/${_f}.rpmsave.old" || :
-done
+%pre -f s390-tools.pre
+# Consolidated service addition
+%service_add_pre appldata.service cio_ignore.service cpacfstatsd.service 
cpi.service cpuplugd.service dumpconf.service hsnc.service mon_fsstatd.service 
mon_procd.service opticsmon.service virtsetup.service vmlogrdr.service 
xpram.service
 
 %post
-read INITPGM < /proc/1/comm
-if [ "${INITPGM}" = "systemd" ]; then
-  echo "Running systemctl daemon-reload."
-  systemctl daemon-reload
-fi
-
-%set_permissions %{_localstatedir}/log/ts-shell/
+# Consolidated service addition
+%service_add_post appldata.service cio_ignore.service cpacfstatsd.service 
cpi.service cpuplugd.service dumpconf.service hsnc.service mon_fsstatd.service 
mon_procd.service opticsmon.service virtsetup.service vmlogrdr.service 
xpram.service
 
-# Create symbolic links to the scripts from setup and boot directories
-%service_add_post appldata.service
-%service_add_post cio_ignore.service
-%service_add_post cpacfstatsd.service
-%service_add_post cpi.service
-%service_add_post cpuplugd.service
-%service_add_post dumpconf.service
-%service_add_post hsnc.service
-%service_add_post mon_fsstatd.service
-%service_add_post mon_procd.service
-%service_add_post opticsmon.service
-%service_add_post virtsetup.service
-%service_add_post vmlogrdr.service
-%service_add_post xpram.service
+# Apply tmpfiles setup for /var/log permissions
+%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
 
-# Create the initial versions of the sysconfig files:
 %{fillup_only -n appldata}
 %{fillup_only -n cpi}
 %{fillup_only -n dumpconf}
@@ -588,159 +487,143 @@
 %{fillup_only -n virtsetup}
 %{fillup_only -n xpram}
 
-%triggerin -- kernel-default
-grep -q '^%{_bindir}/ts-shell$' %{_sysconfdir}/shells \
-       || echo "%{_bindir}/ts-shell" >> %{_sysconfdir}/shells
-
 %{?regenerate_initrd_post}
 
 %post -n osasnmpd
 %{fillup_only -n osasnmpd}
 
-%post -n libekmfweb1
-ldconfig
-
-%post -n libkmipclient1
-ldconfig
+%post -n libekmfweb1 -p /sbin/ldconfig
+%post -n libkmipclient1 -p /sbin/ldconfig
 
 %post chreipl-fcp-mpath
 %udev_rules_update
 
 %preun
-%service_del_preun appldata.service
-%service_del_preun cio_ignore.service
-%service_del_preun cpacfstatsd.service
-%service_del_preun cpi.service
-%service_del_preun cpuplugd.service
-%service_del_preun dumpconf.service
-%service_del_preun hsnc.service
-%service_del_preun mon_fsstatd.service
-%service_del_preun mon_procd.service
-%service_del_preun opticsmon.service
-%service_del_preun virtsetup.service
-%service_del_preun vmlogrdr.service
-%service_del_preun xpram.service
+%service_del_preun appldata.service cio_ignore.service cpacfstatsd.service 
cpi.service cpuplugd.service dumpconf.service hsnc.service mon_fsstatd.service 
mon_procd.service opticsmon.service virtsetup.service vmlogrdr.service 
xpram.service
+
+%preun -n osasnmpd
+%{stop_on_removal osasnmpd}
 
 %postun
-%service_del_postun appldata.service
-%service_del_postun cio_ignore.service
-%service_del_postun cpacfstatsd.service
-%service_del_postun cpi.service
-%service_del_postun cpuplugd.service
-%service_del_postun dumpconf.service
-%service_del_postun hsnc.service
-%service_del_postun mon_fsstatd.service
-%service_del_postun mon_procd.service
-%service_del_postun opticsmon.service
-%service_del_postun virtsetup.service
-%service_del_postun vmlogrdr.service
-%service_del_postun xpram.service
-
-%postun -n libekmfweb1
-ldconfig
-
-%postun -n libkmipclient1
-ldconfig
-
-# Even though SLES15+ is systemd based, the build service doesn't
-# run it, so we have to make sure we can safely issue the
-# systemctl command.
-read INITPGM < /proc/1/comm
-if [ "${INITPGM}" = "systemd" ]; then
-  echo "Running systemctl daemon-reload."
-  systemctl daemon-reload
-fi
+%service_del_postun appldata.service cio_ignore.service cpacfstatsd.service 
cpi.service cpuplugd.service dumpconf.service hsnc.service mon_fsstatd.service 
mon_procd.service opticsmon.service virtsetup.service vmlogrdr.service 
xpram.service
 
 if [ ! -x /boot/zipl ]; then
-       echo "Attention, after uninstalling this package,"
-       echo "you will NOT be able to IPL from DASD anymore!!!"
-fi
-
-if test x$1 = x0; then
-       # remove ts-shell from /etc/shells
-       grep -v '^%{_bindir}/ts-shell$' %{_sysconfdir}/shells > 
%{_sysconfdir}/shells.ts-new
-       mv %{_sysconfdir}/shells.ts-new %{_sysconfdir}/shells
-       chmod 0644 %{_sysconfdir}/shells
+       echo "Attention: After uninstalling this package, you will NOT be able 
to IPL from DASD anymore!"
 fi
 
 %{?regenerate_initrd_post}
 
+%postun -n libekmfweb1 -p /sbin/ldconfig
+%postun -n libkmipclient1 -p /sbin/ldconfig
+
 %posttrans
-# Migration of modprobe.conf files to _modprobedir
-for _f in %{?modprobe_d_files}; do
-    [ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
-        mv -fv "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}" || :
-done
 %{?regenerate_initrd_posttrans}
 
-%preun -n osasnmpd
-%{stop_on_removal osasnmpd}
-
-%files -f %{_builddir}/%{name}.list
-
-%doc README.md
-%doc README.SUSE
+%files
+# --- Documentation & Licenses ---
+%doc README.md README.SUSE iucvterm/doc/ts-shell zpxe.rexx zipl.conf.sample
 
-%doc iucvterm/doc/ts-shell
-%doc zpxe.rexx
-%doc zipl.conf.sample
+# --- System Configuration (/etc) ---
+%{_sysusersdir}/%{name}.conf
+%{_tmpfilesdir}/%{name}.conf
+%config(noreplace) %{_sysconfdir}/cpuplugd.conf
+%config(noreplace) %{_sysconfdir}/ziplenv
+%config(noreplace) /boot/zipl/active_devices.txt
+%dir %{_sysconfdir}/cmsfs-fuse
+%config(noreplace) %attr(0640,root,root) 
%{_sysconfdir}/cmsfs-fuse/filetypes.conf
 %dir %{_sysconfdir}/iucvterm
-%config %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/ts-audit-systems.conf
-%config %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/ts-authorization.conf
-%config %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/ts-shell.conf
-%config %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/unrestricted.conf
+%config(noreplace) %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/*.conf
 %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey
 %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip
 %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/kmip/profiles
 %dir %attr(0770,root,zkeyadm) %{_sysconfdir}/zkey/repository
-%config %{_sysconfdir}/zkey/kmip/profiles/*
-%config(noreplace) %{_sysconfdir}/ziplenv
-%dir %{_modprobedir}
-%{_modprobedir}/90-s390-tools.conf
-%config %{_sysconfdir}/cpuplugd.conf
-%config %{_sysconfdir}/zkey/kms-plugins.conf
-%config(noreplace) /boot/zipl/active_devices.txt
-%dir %attr(2770,root,ts-shell) %{_localstatedir}/log/ts-shell
-%dir %{_sysconfdir}/cmsfs-fuse
-%config %attr(0640,root,root) %{_sysconfdir}/cmsfs-fuse/filetypes.conf
+%config(noreplace) %{_sysconfdir}/zkey/kmip/profiles/*
+%config(noreplace) %{_sysconfdir}/zkey/kms-plugins.conf
+%dir %{_sysconfdir}/mdevctl.d
+%dir %{_sysconfdir}/mdevctl.d/scripts.d
+%dir %{_sysconfdir}/mdevctl.d/scripts.d/callouts
+%{_sysconfdir}/mdevctl.d/scripts.d/callouts/*
+%config(noreplace) %attr(0755,root,root) 
%{_sysconfdir}/mdevctl.d/scripts.d/callouts/ap-check.sh
+
+# --- Sysconfig / Fillup Templates ---
+%{_fillupdir}/sysconfig.*
+%exclude %{_fillupdir}/sysconfig.osasnmpd
+
+# --- Binaries & Scripts ---
+%{_bindir}/*
+%{_sbindir}/*
+/sbin/*
+
+# --- System Libraries, Units, & Shared Data ---
+%{_unitdir}/*
 %dir %{_prefix}/lib/mdevctl
 %dir %{_prefix}/lib/mdevctl/scripts.d
 %dir %{_prefix}/lib/mdevctl/scripts.d/callouts
+%{_prefix}/lib/mdevctl/scripts.d/callouts/*
 %dir %{_prefix}/lib/s390-tools
-%dir %{_prefix}/lib/s390-tools/zfcpdump
-%dir %{_prefix}/lib/udev/rules.d
+%{_prefix}/lib/s390-tools/*
 %dir %{_prefix}/lib/systemd/scripts
+%{_prefix}/lib/systemd/scripts/*
 %dir %{_datadir}/s390-tools
-%dir %{_datadir}/s390-tools/netboot
+%{_datadir}/s390-tools/*
+%dir %{_libdir}/zkey
+%{_libdir}/zkey/*.so
+/lib/s390-tools/*
+
+# --- Boot & Dracut ---
+%dir /boot/zipl
 %dir %{_prefix}/lib/dracut/modules.d/95zdev
+%{_prefix}/lib/dracut/modules.d/95zdev/*
 %dir %{_prefix}/lib/dracut/modules.d/95zdev-kdump
+%{_prefix}/lib/dracut/modules.d/95zdev-kdump/*
 %dir %{_prefix}/lib/dracut/modules.d/96zdev-live
+%{_prefix}/lib/dracut/modules.d/96zdev-live/*
 %dir %{_prefix}/lib/dracut/modules.d/99ngdump
+%{_prefix}/lib/dracut/modules.d/99ngdump/*
 %{_prefix}/lib/dracut/dracut.conf.d/99-pkey.conf
-%dir /boot/zipl
-%dir %{_libdir}/zkey
-%{_libdir}/zkey/zkey-ekmfweb.so
-%dir /lib/s390-tools/
-/lib/s390-tools/zipl.conf
+
+# --- Kernel Modules & Udev ---
+%dir %{_modprobedir}
+%{_modprobedir}/90-s390-tools.conf
 %{_prefix}/lib/modules-load.d/pkey.conf
-%exclude %{_prefix}/lib/udev/rules.d/57-osasnmpd.rules
+%dir %{_prefix}/lib/udev/rules.d
+%{_prefix}/lib/udev/rules.d/*
+
+# --- Shell Completions ---
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%{_datadir}/bash-completion/completions/*
+%dir %{_datadir}/zsh
+%dir %{_datadir}/zsh/site-functions
+%{_datadir}/zsh/site-functions/*
+
+# --- Man Pages ---
+%{_mandir}/man*/*
+
+# --- Exclusions (Files packaged in subpackages) ---
 %exclude %{_bindir}/zdsfs
 %exclude %{_bindir}/hmcdrvfs
 %exclude %{_sbindir}/lshmc
-%exclude %{_mandir}/man1/zdsfs.1.gz
-%exclude %{_mandir}/man1/hmcdrvfs.1.gz
-%exclude %{_mandir}/man8/lshmc.8.gz
-###
-%dir /etc/mdevctl.d/scripts.d/
-%dir /etc/mdevctl.d/scripts.d/callouts/
-###
+%exclude %{_sbindir}/osasnmpd
+%exclude %{_mandir}/man1/zdsfs.1*
+%exclude %{_mandir}/man1/hmcdrvfs.1*
+%exclude %{_mandir}/man7/chreipl-fcp-mpath.7*
+%exclude %{_mandir}/man8/lshmc.8*
+%exclude %{_mandir}/man8/osasnmpd.8*
+%exclude %{_prefix}/lib/udev/rules.d/57-osasnmpd.rules
 %exclude /lib/s390-tools/stage3.bin
 %exclude %{_datadir}/s390-tools/pvimg/stage3a.bin
 %exclude %{_datadir}/s390-tools/pvimg/stage3b_reloc.bin
-###
+%exclude %{_prefix}/lib/udev/rules.d/70-chreipl-fcp-mpath.rules
+%exclude /lib/s390-tools/chreipl_helper.device-mapper
+%exclude /lib/s390-tools/chreipl_helper.md
 
-%files -n osasnmpd -f %{_builddir}/%{name}.osasnmp
+%files -n osasnmpd
+%{_sbindir}/osasnmpd
 %{_libexecdir}/net-snmp/agents/osasnmpd
+%{_mandir}/man8/osasnmpd.8%{?ext_man}
+%{_prefix}/lib/udev/rules.d/57-osasnmpd.rules
+%{_fillupdir}/sysconfig.osasnmpd
 
 %files zdsfs
 %doc CAUTION
@@ -776,6 +659,8 @@
 %dir %{_prefix}/lib/chreipl-fcp-mpath/
 %{_prefix}/lib/chreipl-fcp-mpath/*
 %{_prefix}/lib/dracut/dracut.conf.d/70-chreipl-fcp-mpath.conf
+/lib/s390-tools/chreipl_helper.device-mapper
+/lib/s390-tools/chreipl_helper.md
 %{_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
@@ -793,8 +678,8 @@
 %{_datadir}/s390-tools/pvimg/stage3b_reloc.bin
 
 ### _endif
-### *** !s390x 
************************************************************************* ###
-### _ifarch x86_64
+
+### *** !s390x (x86_64) 
*************************************************************** ###
 %else
 
 %prep
@@ -802,7 +687,7 @@
 
 %build
 export OPT_FLAGS="%{optflags}"
-export KERNELIMAGE_MAKEFLAGS="%%{?_smp_mflags}"
+export KERNELIMAGE_MAKEFLAGS="%{?_smp_mflags}"
 
 %make_build \
      DISTRELEASE=%{rbrelease} \
@@ -811,7 +696,6 @@
      HAVE_DRACUT=1
 
 %install
-
 %make_install \
      DISTRELEASE=%{rbrelease} \
      SYSTEMDSYSTEMUNITDIR=%{_unitdir} \
@@ -820,20 +704,20 @@
      HAVE_DRACUT=1
 
 %files
-%{_prefix}/bin/*
+# --- Binaries ---
+%{_bindir}/*
+
+# --- Shared Data ---
 %dir %{_datadir}/s390-tools
 %{_datadir}/s390-tools/pvimg/
 %{_datadir}/s390-tools/netboot/
-%{_datadir}/bash-completion/completions/genprotimg.bash
-%{_datadir}/bash-completion/completions/pvattest.bash
-%{_datadir}/bash-completion/completions/pvimg.bash
-%{_datadir}/bash-completion/completions/pvsecret.bash
-%{_datadir}/bash-completion/completions/pvverify.bash
-%{_datadir}/zsh/site-functions/_genprotimg
-%{_datadir}/zsh/site-functions/_pvattest
-%{_datadir}/zsh/site-functions/_pvimg
-%{_datadir}/zsh/site-functions/_pvsecret
-%{_datadir}/zsh/site-functions/_pvverify
+
+# --- Shell Completions ---
+# Using wildcards prevents the need to manually list every new completion file
+%{_datadir}/bash-completion/completions/*
+%{_datadir}/zsh/site-functions/*
+
+# --- Man Pages ---
 %{_mandir}/man1/*
 
 %endif

++++++ 59-graf.rules ++++++
#
# Rules for unique 3270 device nodes created in /dev/3270/
# This file should be installed in /usr/lib/udev/rules.d
#

SUBSYSTEM!="ccw", GOTO="graf_end"
DRIVER!="3270", GOTO="graf_end"

# Configure 3270 device
ACTION=="add",    SUBSYSTEM=="ccw", PROGRAM="/usr/sbin/chccwdev -e $kernel"
ACTION=="remove", SUBSYSTEM=="ccw", PROGRAM="/usr/sbin/chccwdev -d $kernel"

LABEL="graf_end"

++++++ README.SUSE ++++++

ls - Addons by SUSE

        The following utility and its man page have been added to make it
        easier to determine the machine type on which Linux is running.

        * cputype
        Usage: cputype

        The following utilities and their man pages have been added by SUSE to
        ease the activation and deactivation of devices. These scripts are also
        used by YaST. Functionality not provided by these scripts cannot be
        provided by YaST.
        These scripts also create/delete the needed udev rules.
        Detailed information on some parameters are in the
        "Device Drivers, Features and Commands" for this release.

        General parameters
          channel numbers are with lower letters
          parameters switching things on or off are
            1 for on and 0 for off

        * ctc_configure
          Usage: /usr/sbin/ctc_configure <read channel> <write channel> 
<online> [<protocol>]
          To configure CTC connections 
          Valid Parameters for the protocal are 0, 1 and 3
          For a detailed explanation please look in the Device Driver book

        * dasd_configure
          Usage: dasd_configure  <ccwid> <online> <use_diag>
          To set DASDs online/offline
          The use_diag makes only sense under z/VM. In an
          LPAR just set it to 0

        * iucv_configure
          Usage: /usr/sbin/iucv_configure  <router> <online>
          To set an IUCV IP-network online/offline

        * qeth_configure
          Usage: /usr/sbin/qeth_configure [options] <read chan> <write chan> 
<control chan> <online>
          Set qeth, hipersocket adapter online/offline.
          options could be one of the following:

          -i      Configure IP takeover
          -l      Configure Layer2 support
          -p NAME QETH Portname to use
          -n 1/0  QETH port number to use
          

        * zfcp_disk_configure
          Usage: /usr/sbin/zfcp_disk_configure  <ccwid> <wwpn> <lun> <online>
          set a disk online/offline. This require that the repective
          Adapter is online. See command below.

        * zfcp_host_configure
          Usage: /usr/sbin/zfcp_host_configure  <ccwid> <online>
          Set a zfcp Adapter online/offline

++++++ dasd_configure ++++++
#! /bin/sh
#
# dasd_configure
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# Configures a DASD device by calling the IBM-provided chzdev command.
# Whereas this script used to validate the parameters provided to it,
# we now rely on chzdev to do that instead. The script is intended only
# as a "translation layer" to provide backward compatability for older
# scripts and tools that invoke it.
#
# Usage:
#   dasd_configure [-f -t <dasd_type> ] <ccwid> <online> [use_diag]
#
#       -f Override safety checks
#       -t DASD type. Must be provided if -f is used. Only dasd-eckd and
#                     dasd-fba are supported - Deprecated
#       ccwid = x.y.ssss where
#               x is always 0 until IBM creates something that uses that number
#               y is the subchannel set ID (SSID). Most often
#                 this is 0, but it could be non-zero
#               ssss is the four digit device address of the subchannel, in
#                    hexidecimal, with leading zeros.
#       online = 0 to take the device offline
#                1 to bring the device online
#       use_diag = 0 to _not_ use z/VM DIAG250 I/O, which is the default
#                  1 to use z/VM DIAG250 I/O
#
# Return values:
#   Return codes are determined by the chzdev command, with one exception: If a
#   DASD volume is not formatted, we will issue a return code of 8.
#

mesg () {
    echo "$@"
}

debug_mesg () {
    case "${DEBUG}" in
        yes) mesg "$@" ;;
        *) ;;
    esac
}

add_cio_channel() {
        echo "$* # ${DATE}" >> /boot/zipl/active_devices.txt
}

remove_cio_channel() {
        [ -w /boot/zipl/active_devices.txt ] && sed -i -e "/^${1}/d" 
/boot/zipl/active_devices.txt
}

usage(){
  echo "Usage: ${0} [-f -t <dasd_type> ] <ccwid> <online> [use_diag]"
  echo
  echo "        -f Override safety checks"
  echo "        -t DASD type. Must be provided if -f is used. Only dasd-eckd 
and"
  echo "                      dasd-fba are supported - Deprecated"
  echo "        ccwid = x.y.ssss where"
  echo "                x is always 0 until IBM creates something that uses 
that number"
  echo "                y is the subchannel set ID (SSID). Most often"
  echo "                  this is 0, but it could be non-zero"
  echo "                ssss is the four digit device address of the 
subchannel, in"
  echo "                     hexidecimal, with leading zeros."
  echo "        online = 0 to take the device offline"
  echo "                 1 to bring the device online"
  echo "        use_diag = 0 to _not_ use z/VM DIAG250 I/O, which is the 
default"
  echo "                   1 to use z/VM DIAG250 I/O"
}

if [ "${DEBUG}" != "yes" ]; then
  DEBUG="no"
fi

DATE=$(date)

DASD_FORCE=0

############################################################
# Parse the parameters from the command line
#
ARGS=$(getopt --options ft: -n "dasd_configure" -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi

eval set -- "${ARGS}"
debug_mesg "All the parms passed were ${ARGS}"

while true; do
        case "${1}" in
                -f) debug_mesg "This used to mean udev rules will always be 
generated."
                    debug_mesg "For chzdev, it means safety checks will be 
overridden."
                    debug_mesg "Kinda sorta the same thing, really."
                    PARM_LIST="${PARM_LIST} -f"
                    DASD_FORCE=1
                    shift 1
                    ;;
                -t) debug_mesg "This used to set the card type to ${2}"
                    debug_mesg "Now it gets ignored."
                    shift 2
                    ;;
                --) debug_mesg "Found the end of parms indicator: --"
                    shift 1
                    break
                    ;;
                *)  debug_mesg "At the catch-all select entry"
                    debug_mesg "What was selected was ${1}"
                    shift 1
                    ;;
        esac
done

CCW_CHAN_ID=${1}
ON_OFF=${2}
USE_DIAG=${3}

if [ -z "${CCW_CHAN_ID}" ] || [ -z "${ON_OFF}" ]; then
  mesg "You didn't specify all the needed parameters."
  usage
  exit 1
fi

if [ -n "${USE_DIAG}" ]; then
  PARM_LIST="${PARM_LIST} use_diag=${USE_DIAG}"
else PARM_LIST="${PARM_LIST} use_diag=0"
fi

if [ "${ON_OFF}" == 0 ]; then
  debug_mesg "chzdev -d dasd --no-root-update ${CCW_CHAN_ID}"
  chzdev -d dasd --no-root-update ${CCW_CHAN_ID}
elif [ "${ON_OFF}" == 1 ]; then
  debug_mesg "chzdev -e dasd --no-root-update ${CCW_CHAN_ID} ${PARM_LIST}"
  chzdev -e dasd --no-root-update ${CCW_CHAN_ID} ${PARM_LIST}
else mesg "You must specify a 0 or a 1 for the online/offline attribute."
     usage
     exit 1
fi

RC=${?}
if [ ${RC} -ne 0 ]; then
  exit ${RC}
elif [ ${ON_OFF} == 1 ]; then
    exitcode=0
    # Extract the full busid so that we can reference the proper entries in /sys
    BUSID=$(/usr/sbin/lszdev dasd ${CCW_CHAN_ID} | /usr/bin/sed -e 1d | 
/usr/bin/tr -s " " | /usr/bin/cut -f2 -d" " )
    # Make sure the DASD volume came online
    for ((counter=0; counter<30; counter++)); do
      sleep 0.1
      read online < /sys/bus/ccw/devices/${BUSID}/online
      if [ ${online} -eq 1 ] ; then
        break
      fi
    done

    if [ ${online} -ne 1 ]; then
      debug_mesg "DASD ${CCW_CHAN_ID} did not come online."
      exit 17
    fi

    # Check to see if the DASD volume is unformatted. If so, let YaST know.
    read status < /sys/bus/ccw/devices/${BUSID}/status
    if [ "${status}" == "unformatted" ]; then
      mesg "DASD ${CCW_CHAN_ID} is unformatted."
      exitcode=8
    fi
fi

if [ ${ON_OFF} == 1 ]; then
  add_cio_channel "${CCW_CHAN_ID}"
else remove_cio_channel "${CCW_CHAN_ID}"
fi

exit ${exitcode}

++++++ dasd_reload ++++++
#!/bin/sh
#
# dasd_reload
# $Id: dasd_reload,v 1.2 2004/05/26 15:17:09 hare Exp $
#
# Deconfigures all active DASDs, unloads the modules
# and activates the configured DASDs again.
# Needed to establish an identical device mapping
# in the installation system and in the running system.
# All DASD access need to be cancelled prior to running
# this script.
#
# Usage:
#    dasd_reload
#
# Return values:
#   1  Cannot read /proc/modules
#   2  Missing module programs
#   3  /sys not mounted
#   4  Failure on deactivate DASDs
#

if [ ! -r /proc/modules ]; then
    echo "Cannot read /proc/modules"
    exit 1
fi

if [ ! -x /usr/sbin/rmmod -o ! -x /usr/sbin/modprobe ]; then
    echo "Missing module programs"
    exit 2
fi

if [ ! -d /sys/bus ]; then
    echo "sysfs not mounted"
    exit 3
fi

let anymd=0
if [ -f /proc/mdstat ]; then
    for mddevice in $(grep active /proc/mdstat  | cut -f1 -d:); do
        mdadm -S /dev/${mddevice}
        let anymd=1
    done
    udevadm settle
fi

#
#       Setting HyperPAV alias devices offline
#
dasd_alias=
let EXITRC=0
for dev in /sys/bus/ccw/devices/*; do
    if [ -f ${dev}/use_diag ]; then
        read _online < ${dev}/online
        read _alias  < ${dev}/alias
        if [ "$_online" -eq 1  -a "$_alias" -eq 1 ]; then
            echo "setting DASD HyperPAV alias $(basename ${dev}) offline"
            echo "0" > ${dev}/online
            read _online < ${dev}/online
            dasd_alias="${dasd_alias} $(basename ${dev})"
            if [ "$_online" -eq 1 ]; then
                echo "failure on setting DASD HyperPAV alias $(basename ${dev}) 
offline !"
                let EXITRC=4
            fi
        fi
    fi
done

#
#       Setting "normal" DASD and HyperPAV base devices offline
#
dasd_base=
for dev in /sys/bus/ccw/devices/*; do
    if [ -f ${dev}/use_diag ]; then
        read _online < ${dev}/online
        read _alias  < ${dev}/alias
        if [ "$_online" -eq 1  -a "$_alias" -eq 0 ]; then
            echo "setting DASD $(basename ${dev}) offline"
            echo "0" > ${dev}/online
            read _online < ${dev}/online
            dasd_base="${dasd_base} $(basename ${dev})"
            if [ "$_online" -eq 1 ]; then
                echo "failure on setting DASD $(basename ${dev}) offline !"
                let EXITRC=4
            fi
        fi
    fi
done

udevadm settle

module_list=
module_test_list="dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod"
for module in ${module_test_list}; do
    if grep -q "${module}" /proc/modules; then
        module_list="${module} ${module_list}"
        : Unloading ${module}
        /usr/sbin/rmmod ${module}
    fi
done

udevadm settle
sleep 2

if [ -d /etc/udev/rules.d ]; then
    cd /etc/udev/rules.d
#
#       Re-activating "normal" DASD and HyperPAV base devices
#
#       We need to move all the DASD udev rules out from /etc/udev/rules.d
#       because if we don't, then when the first DASD volume gets brought
#       back online, they are all brought back online, in a non-deterministic
#       order, not the numeric order we expect.
#
    mv -i 41-dasd-*.rules 51-dasd-*.rules /tmp
    cd /tmp
    for dasd in ${dasd_base}; do
        for file in 41-dasd-*-${dasd}.rules 51-dasd-${dasd}.rules; do
            [ -f "${file}" ] || continue
#
#       Special handling is needed for old udev rules that start with 51-
#       since the chzdev command won't look for that name
#
            prefix="$(echo ${file} | cut -f1 -d-)"
            if [ "${prefix}" == "51" ]; then
                if [ -h /sys/bus/ccw/drivers/dasd-eckd/${dasd} ]; then
                    mv -i ${file} 41-dasd-eckd-${dasd}.rules
                elif [ -h /sys/bus/ccw/drivers/dasd-fba/${dasd} ]; then
                    mv -i ${file} 41-dasd-fba-${dasd}.rules
                else echo "DASD volume ${dasd} is neither an ECKD or FBA 
device."
                     let EXITRC=4
                fi
            fi
            echo Activating ${dasd}
            mv -i "${file}" /etc/udev/rules.d/
            /usr/sbin/chzdev dasd --apply --configured -q --no-root-update 
${dasd}
            lsdasd
            break
        done
    done

#
#       Re-activating HyperPAV alias devices
#
    for dasd in ${dasd_alias}; do
        for file in 41-dasd-*-${dasd}.rules 51-dasd-${dasd}.rules; do
            [ -f "${file}" ] || continue
            echo Activating ${dasd}
            mv -i "${file}" /etc/udev/rules.d/
            /usr/sbin/chzdev dasd --apply --configured -q --no-root-update 
${dasd}
            break
        done
    done
fi

exit ${EXITRC} 

++++++ detach_disks.sh ++++++
#!/bin/sh

DASDFILE=/tmp/dasd.list.$(mcookie)
DETFILE=/tmp/detach.disks.$(mcookie)
KEEPFILE=/tmp/keep.disks.$(mcookie)
NICFILE=/tmp/nic.list.$(mcookie)
FAILFILE=/tmp/error.$(mcookie)

function expand_RANGE(){
local RANGE=${1}
local RANGE_SAVE=${RANGE}
local DEVNO
local BEGIN=0
local END=0

RANGE=$(IFS=":-"; echo ${RANGE} | cut -f1-2 -d" " )
set -- ${RANGE}
let BEGIN=0x$1 2>/dev/null
let END=0x$2 2>/dev/null

if [ ${BEGIN} -eq 0 ] || [ ${END} -eq 0 ]; then
  ${msg} "An invalid device number range was specified: ${RANGE_SAVE}" >&2
  touch ${FAILFILE}
  return
fi

for DEVNO in $(eval echo {${BEGIN}..${END}})
  do printf "%d\n"  ${DEVNO}
  done
}

function usage(){
  echo "Usage: ${0} [ -F ] [ -q ] [ -h ]"
  echo "        -F      Exit with failure if any invalid parms are detected."
  echo "        -q      Don't generate any output."
  echo "        -h      Display this help message."
}

msg="echo"
let FORCE_FAIL=0

############################################################
# Parse the parameters from the command line
#
ARGS=$(getopt -a --options Fhq -n "detach_devices" -- "$@")
if [ $? -ne 0 ]; then
  usage
  exit 3
fi

eval set -- "${ARGS}"
for ARG; do
        case "${ARG}" in
                -F) let FORCE_FAIL=1
                    shift 1
                    ;;
                -h) usage;
                    exit 0
                    ;;
                -q) msg="/bin/true"
                    shift 1
                    ;;
                --) shift 1
                    ;;
                *) ${msg} "Extraneous input detected: ${1}"
                   shift 1
                   ;;
        esac
done

if [ -r /etc/sysconfig/virtsetup ]; then
  . /etc/sysconfig/virtsetup
else ${msg} "No /etc/sysconfig/virtsetup file was found."
     exit 1
fi

# First, get a list of all the DASD devices we have for this guest, in decimal.
# (Trying to handle things in hex gets complicated.)
/usr/sbin/vmcp -b1048576 q v dasd | cut -f2 -d" "  |\
  while read HEXNO
    do let DECNO=0x${HEXNO}
       echo ${DECNO}
    done > ${DASDFILE} 2>/dev/null

# If the system administrator specified certain devices to be detached
# let's put those device numbers in a file, one per line.
touch ${DETFILE}
for ADDR in $(IFS=", " ; echo ${ZVM_DISKS_TO_DETACH})
  do if $(echo ${ADDR} | grep -iqE ":|-" 2>/dev/null)
       then expand_RANGE ${ADDR} >> ${DETFILE}
       else let DEVNO=0
            let DEVNO=0x${ADDR} 2>/dev/null
            if [ ${DEVNO} -eq 0 ]; then
              ${msg} "An invalid device number was specified: ${ADDR}" >&2
              touch ${FAILFILE}
            else printf "%d\n" ${DEVNO}
            fi
     fi
  done > ${DETFILE}

# If the system administrator specified certain devices that should _not_
# be detached, let's put those in another file, one per line.
touch ${KEEPFILE}
for ADDR in $(IFS=", " ; echo ${ZVM_DISKS_TO_NOT_DETACH})
  do if $(echo ${ADDR} | grep -iqE ":|-" 2>/dev/null)
       then expand_RANGE ${ADDR} >> ${KEEPFILE}
       else let DEVNO=0
            let DEVNO=0x${ADDR} 2>/dev/null
            if [ ${DEVNO} -eq 0 ]; then
              ${msg} "An invalid device number was specified: ${ADDR}" >&2
              touch ${FAILFILE}
            else printf "%d\n" ${DEVNO}
            fi
     fi
  done > ${KEEPFILE}

if [ ${FORCE_FAIL} -eq 1 ] && [ -e ${FAILFILE} ]; then
  let RETURN_CODE=1
  ${msg} "Terminating detach_disk because of input errors."
else 
# If the system administrator specified that all "unused" disks should be
# detached, compare the disks lsdasd show as activated to the complete
# list of disks we have currently, and add the inactive ones to the
# file containing devices to be detached
     if [ "${ZVM_DETACH_ALL_UNUSED}" == "yes" ]; then
       lsdasd -s | sed -e 1,2d | cut -f1 -d" " | \
         while read ADDR
           do let DEVNO=0x${ADDR}
              sed -i -e "/^${DEVNO}$/d" ${DASDFILE}
          done
       cat ${DASDFILE} >> ${DETFILE}
     fi

# Now remove any "to be kept" disks from the detach file
     while read DEVNO
       do sed -i -e "/^${DEVNO}/d" ${DETFILE}
       done < ${KEEPFILE}

# Get a list of all the virtual NICs since they require an
# extra keyword to detach. Contrary to what we've done before
# these will be hex values
     /usr/sbin/vmcp -b1048576 q nic | grep Adapter | cut -f2 -d" "  | cut -f1 
-d. > ${NICFILE}

# Now we sort the device numbers and detach them.
     sort -un ${DETFILE} | \
       while read DEVNO
         do HEXNO=$(printf %04X ${DEVNO})
            if grep -q ^${HEXNO}$ ${NICFILE} 2>/dev/null ; then
              vmcp detach nic ${HEXNO} 2>/dev/null
            else vmcp detach ${HEXNO} 2>/dev/null
            fi
         done
     let RETURN_CODE=0 
fi

rm -f ${DASDFILE} ${DETFILE} ${KEEPFILE} ${NICFILE} ${FAILFILE}
exit ${RETURN_CODE}

++++++ iucv_configure ++++++
#! /bin/sh
#
# iucv_configure
#
# Configures a z/VM IUCV network adapter
#
# Usage:
#   iucv_configure <peer_userid> <online>
#
#       peer_userid = z/VM userid of the IUCV peer
#       online = 0 to take the device offline
#                1 to bring the device online
#
# Return values:
#   1  sysfs not mounted
#   2  Invalid status for <online>
#   3  Could not create iucv device
#   4  Could not remove iucv device
#

if [ "${DEBUG}" != "yes" ]; then
  DEBUG="no"
fi

mesg () {
    echo "$@"
}

debug_mesg () {
    case "$DEBUG" in
        yes) mesg "$@" ;;
        *) ;;
    esac
}

if [ $# -ne 2 ] ; then
    echo "Usage: $0  <peer_userid> <online>"
    echo "      peer_userid = z/VM userid of the IUCV peer"
    echo "      online = 0 to take the device offline"
    echo "               1 to bring the device online"
    exit 1
fi

# Get the mount point for sysfs
while read MNTPT MNTDIR MNTSYS MNTTYPE; do
    if test "$MNTSYS" = "sysfs"; then
        SYSFS="$MNTDIR"
        break;
    fi 
done </proc/mounts

if [ -z "$SYSFS" ]; then
    mesg "/sysfs not present"
    exit 1
fi

PEER_USERID_LOWER=$1
PEER_USERID=$(echo $1 | tr "a-z" "A-Z")
ONLINE=$2

if [ -z "$PEER_USERID" ] ; then
    mesg "No IUCV user name given"
    exit 2
fi

if [ -z "$ONLINE" ] ; then
    ONLINE=1
fi

_iucv_dir=${SYSFS}/bus/iucv/devices

_iucv_drv=${SYSFS}/bus/iucv/drivers/netiucv
if [ ! -d "$_iucv_drv" ] ; then
    modprobe -q netiucv
fi

debug_mesg "Configuring IUCV device ${PEER_USERID}"

for _iucv_dev in $_iucv_dir/netiucv?* ; do
    [ -d $_iucv_dev ] || continue
    read user < $_iucv_dev/user
    if [ "$user" = "$PEER_USERID" ] ; then
        # Already configured, ok
        iucvdev=${_iucv_dev##*/}
        break;
    fi
done

if [ -z "$iucvdev" -a $ONLINE -eq 1  ] ; then
    echo $PEER_USERID > $_iucv_drv/connection
    if [ $? -ne 0 ] ; then
        mesg "Unable to connect to $PEER_USERID"
        exit 3
    fi
    for _iucv_dev in $_iucv_dir/netiucv?* ; do
        [ -d $_iucv_dev ] || continue
        read user < $_iucv_dev/user
        if [ "$user" = "$PEER_USERID" ] ; then
            iucvdev=${_iucv_dev##*/}
            break;
        fi
    done
    if [ "$iucvdev" ] ; then
        debug_mesg "Configured device $iucvdev"
    fi
elif [ "$iucvdev" -a $ONLINE -eq 0 ] ; then
    for _net_dev in $_iucv_dir/$iucvdev/net/* ; do
        [ -d $_net_dev ] || continue
        netdev=${_net_dev##*/}
        break;
    done
    if [ "$netdev" ] ; then
        echo $netdev > $_iucv_drv/remove
        if [ $? -ne 0 ] ; then
            mesg "Unable to remove device $netdev"
            exit 4
        else
            debug_mesg "Removed device $iucvdev"
            rm -f /etc/udev/rules.d/51-iucv-$PEER_USERID.rules 
/etc/udev/rules.d/51-iucv-$PEER_USERID_LOWER.rules
            iucvdev=
        fi
    fi
    
fi

if [ "$iucvdev" ] ; then
    cat > /etc/udev/rules.d/51-iucv-$PEER_USERID.rules <<EOF
ACTION=="add", SUBSYSTEM=="subsystem", KERNEL=="iucv", RUN+="/usr/sbin/modprobe 
netiucv"
ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="netiucv", 
ATTR{connection}="$PEER_USERID"
EOF
fi

exit

++++++ killcdl ++++++
#!/bin/sh

#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Released under the GNU General Public License version 2.
#

let FORCE=0
DEVPARM=""

usage(){
  echo "Usage: ${0} [ -f ] devno|busid"
  echo "        -f      Force unformatting for DASD volumes in the CMS device 
range of 19x."
  echo "        devno   The \"plain\" device number of the volume, e.g. 3184."
  echo "        busid   The full specification of the volume, e.g., 0.0.3184."
}

ARCH="$(/usr/bin/uname -m)"
if [ "${ARCH}" != "s390x" ] && [ "${ARCH}" != "s390" ]; then
  echo "This script is only useful on IBM mainframes."
  exit 1
fi

############################################################
# Parse the parameters from the command line
#
ARGS=$(getopt -a --options f -n "killcdl" -- "$@")
if [ $? -ne 0 ]; then
  usage
  exit 3
fi

eval set -- "${ARGS}"
for ARG; do
        case "${ARG}" in
                -f) FORCE=1
                    shift 1
                    ;;
                --) shift 1
                    ;;
                [0-9a-fA-F]*) if [ ! -z "${DEVPARM}" ]; then
                                echo "More than one parameter specified."
                                usage
                                exit 4
                              fi
                              DEVPARM=${1}
                              shift 1
                              ;;
                *) echo "That looks invalid"
                   usage
                   exit 5
                   ;;
        esac
done

if [ -z "${DEVPARM}" ]; then
  echo "You must specify the device number of the DASD volume to be 
unformatted."
  usage
  exit 6
fi

DEVNO=$(echo "${DEVPARM}" | tr A-Z a-z)

# Validate the device number or busid provided
set -- $(IFS='.'; echo ${DEVNO})
let NUMPARMS=${#}
if [ ${NUMPARMS} -ne 1 ] && [ ${NUMPARMS} -ne 3 ]; then
  echo "You have not specified the device number in a recognizable format."
  echo "It must either be the plain device number, e.g., 0123, or in"
  echo "so-called busid format, e.g., 0.0.0123"
  exit 7
fi

# Just a device number, SIMPLE=1. A busid, SIMPLE=0
SIMPLE=0
if [ ${NUMPARMS} -eq 1 ]; then
  let SIMPLE=1
  let FIRST=0
  let FIRSTLEN=1
  let SECOND=0
  let SECONDLEN=1
  DEVNO="${1}"
  let DEVNOLEN=${#1}
else FIRST="${1}"
     let FIRSTLEN=${#FIRST}
     SECOND="${2}"
     let SECONDLEN=${#SECOND}
     DEVNO="${3}"
     let DEVNOLEN=${#3}
fi

if [ ${FIRSTLEN} -ne 1 ] || [ ${SECONDLEN} -ne 1 ]; then
  echo "The first and second fields of the busid may only be one digit long."
  exit 8
fi

if [ ${DEVNOLEN} -gt 4 ]; then
  echo "The device number may only be 4 digits long."
  exit 9
fi

if [ ${DEVNOLEN} -lt 4 ]; then
  DEVNO=$(echo "0000${DEVNO}" | rev | cut -c1-4 | rev)
fi

BUSID="${FIRST}.${SECOND}.${DEVNO}"

if [ ! -h /sys/bus/ccw/devices/${BUSID} ]; then
  echo "Busid ${BUSID} was not found."
  /usr/sbin/cio_ignore -i ${BUSID} > /dev/null
  if [ $? -eq 0 ]; then
    echo "That device is in the cio_ignore list."
    echo "Please remove it with \"cio_ignore -r ${BUSID}\" before trying again."
  fi
  exit 10
fi

case ${DEVNO:0:3} in
        019)    if grep -q "version = FF" /proc/cpuinfo 2>/dev/null; then
                  echo "That looks like a CMS disk."
                  if [ ${FORCE} -eq 0 ]; then
                    echo "Specify the -f option to force the operation."
                    exit 11
                  fi
                  echo "But you specified -f so we'll kill it anyway."
                fi
                ;;
esac

read ORIG_ONLINE_STATUS < /sys/bus/ccw/devices/${BUSID}/online

DISCIPLINE="none"
if [ -r /sys/bus/ccw/devices/${BUSID}/discipline ]; then
  # We have to bring the device online before the kernel will fill in
  # the value for discipline.
  if [ ${ORIG_ONLINE_STATUS} -eq 0 ]; then
    /usr/sbin/chccwdev -e ${BUSID}
    /usr/sbin/udevadm settle
  fi

  read STATUS < /sys/bus/ccw/devices/${BUSID}/status
  if [ "${STATUS}" == "unformatted" ]; then
    echo "DASD device ${BUSID} is already in an unformatted state."
    if [ ${ORIG_ONLINE_STATUS} -eq 0 ]; then
      /usr/sbin/chccwdev -d -s ${BUSID}
      /usr/sbin/udevadm settle
    fi
    exit 0
  fi

  read DISCIPLINE < /sys/bus/ccw/devices/${BUSID}/discipline 
else read CU_TYPE < /sys/bus/ccw/devices/${BUSID}/cutype
     read DEV_TYPE < /sys/bus/ccw/devices/${BUSID}/devtype
     case "${CU_TYPE}" in
        3990/*|2105/*|2107/*|1750/*|9343/*)
                DISCIPLINE=ECKD
                ;;
        3880/*)
                case "${DEV_TYPE}" in
                        3390/*)
                                DISCIPLINE=ECKD
                                ;;
                esac
                ;;
     esac
fi

if [ "${DISCIPLINE}" != "ECKD" ]; then
  echo "This script only works on ECKD DASD."
  if [ ${ORIG_ONLINE_STATUS} -eq 0 ]; then
    /usr/sbin/chccwdev -d -s ${BUSID}
  fi
  exit 12
fi

read STATUS < /sys/bus/ccw/devices/${BUSID}/online
if [ ${STATUS} -eq 1 ]; then
  if [ ! -h /dev/disk/by-path/ccw-${BUSID} ]; then
    echo "The udev-generated symbolic link in /dev/disk/by-path was not found."
    exit 13
  fi

  /usr/sbin/chccwdev -d -s ${BUSID}
  /usr/sbin/udevadm settle

  read STATUS < /sys/bus/ccw/devices/${BUSID}/online
  if [ ${STATUS} -ne 0 ]; then
    echo "Device number ${DEVNO} didn't go offline. Unable to continue."
    exit 14
  fi
fi

/usr/sbin/chccwdev -a raw_track_access=1 -e ${BUSID}
/usr/sbin/udevadm settle

read STATUS < /sys/bus/ccw/devices/${BUSID}/online
if [ ${STATUS} -ne 1 ]; then
  echo "Unable to bring ${DEVNO} online. Unable to continue."
  exit 15
fi

# After this point, we will kill the formatting on the device
perl -e 'for ($h=0;$h<2;$h++){printf 
"\0\0\0%c\0\0\0\x8%s",$h,(("\0"x8).("\xff"x8).("\0"x65512))}' | dd bs=65536 
count=2 oflag=direct of=/dev/disk/by-path/ccw-${BUSID} >/dev/null 2>&1

if [ "$?" -ne 0 ]; then
  echo "The writing of the null record 0 failed."
  exit 16
fi

echo "Setting ${BUSID} back offline with raw track access disabled."
/usr/sbin/chccwdev -d -s -a raw_track_access=0 ${BUSID}
/usr/sbin/udevadm settle

if [ ${ORIG_ONLINE_STATUS} -eq 1 ]; then
  /usr/sbin/chccwdev -e ${BUSID}
  /usr/sbin/udevadm settle
fi

++++++ mkdump.pl ++++++
++++ 667 lines (skipped)

++++++ pkey.conf ++++++
--- /var/tmp/diff_new_pack.GHUIVz/_old  2026-03-03 15:33:24.907203592 +0100
+++ /var/tmp/diff_new_pack.GHUIVz/_new  2026-03-03 15:33:24.911203757 +0100
@@ -1,11 +1,17 @@
 #
-# Copyright (c) 2018-2024 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018-2026 SUSE LINUX GmbH, Nuernberg, Germany.
 # All rights reserved.
 #
 
-# load pkey module at boot time
+# load pkey modules at boot time
+uvdevice
 pkey
 pkey_cca
 pkey_ep11
 pkey_pckmo
+pkey_uv
+paes_s390
+phmac_s390
+zcrypt
+zcrypt_cex4
 

++++++ s390-tools-rpmlintrc ++++++
--- /var/tmp/diff_new_pack.GHUIVz/_old  2026-03-03 15:33:25.027208562 +0100
+++ /var/tmp/diff_new_pack.GHUIVz/_new  2026-03-03 15:33:25.031208728 +0100
@@ -1,7 +1,7 @@
-addFilter("statically-linked-binary /usr/lib/s390-tools/.*")
 addFilter("statically-linked-binary /usr/bin/read_values")
-addFilter("systemd-service-without-service_.* *@.service")
 addFilter("position-independent-executable-suggested ")
 addFilter("non-etc-or-var-file-marked-as-conffile 
/boot/zipl/active_devices.txt")
 addFilter("zero-length /boot/zipl/active_devices.txt")
+addFilter("tmpfile-not-in-filelist /var/log/ts-shell")
+addFilter("call-to-mktemp")
 

++++++ vendor.tar.zst ++++++
/work/SRC/openSUSE:Factory/s390-tools/vendor.tar.zst 
/work/SRC/openSUSE:Factory/.s390-tools.new.29461/vendor.tar.zst differ: char 7, 
line 1

++++++ virtsetup.sh ++++++
#!/bin/sh
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# Perform setup tasks based on what hypervisor is in charge.
#

# Source the sysconfig file
if [ -r /etc/sysconfig/virtsetup ]; then
  . /etc/sysconfig/virtsetup
else echo "No /etc/sysconfig/virtsetup file was found."
     exit 1
fi

#
# Get our hostname
#
my_hostname="$(hostname)"

#
# Find out the hypervisor we're running on/under.
#
hypervisor="$(/usr/bin/systemd-detect-virt)"

case "${hypervisor}" in
        zvm)
                if [ ! -c /dev/vmcp ]; then
                  modprobe vmcp
                  sleep 1
                  if [ ! -c /dev/vmcp ]; then
                    echo "Unable to load the vmcp kernel module."
                    exit 1
                  fi
                fi
                echo "The vmcp device driver is ready."
                if [ "${ZVM_DETACH_DISKS}" == "yes" ]; then
                  echo "Detaching devices to prepare for Live Guest Relocation."
                  /usr/lib/systemd/scripts/detach_disks.sh
                fi
                if [ "${ZVM_WARN_ABOUT_POSSIBLE_LGR_PROBLEMS}" == yes ]; then
                  /usr/sbin/lgr_check
                fi
        ;;
        none)
                hypervisor="lpar"
                if [ "${LPAR_SCLP_HOSTNAME}" == "yes" ]; then
                  # If the sclp_cpi module is already loaded, we have to unload 
it
                  # so we can be sure it has the correct system name specified
                  # when we reload it again.
                  if grep -qw sclp_cpi /proc/modules 2>/dev/null; then
                        rmmod sclp_cpi
                        sleep 1
                  fi
                  if grep -qw sclp_cpi /proc/modules 2>/dev/null; then
                        echo "Unable to unload the sclp_cpi kernel module."
                        exit 1
                  fi
                  echo "Setting the LPAR name via the sclp_cpi module."
                  modprobe sclp_cpi system_name="$my_hostname"
                  if ! grep -qw sclp_cpi /proc/modules 2>/dev/null; then
                   echo "We were unable to load the sclp_cpi module to set the 
LPAR name."
                   exit 2
                  fi 
                fi
        ;;
        kvm)
        ;;
        *)
                echo "An unknown hypervisor, \"${hypervisor}\" was detected."
                echo "Please report this to your support provider."
                exit 3
        ;;
esac

#
# Now let's check for any scripts that other packages may have provided
# to do specific things they need. The scripts must be marked executable
# and have a suffix indicating which hypervisor for which they are to be run.
# Currently that is one of: kvm, lpar, or zvm.
# E.g., 01-test.script.zvm would only be run if the system is a z/VM guest.
#

for script in $(ls /lib/s390-tools/virtsetup/*.${hypervisor} 2>/dev/null)
  do if [ -x "${script}" ]; then
        echo "Executing ${script}..."
        "${script}"
        echo "Done."
        echo
     fi
  done

exit 0

++++++ vmlogrdr.service ++++++
[Unit]
Description=System startup script for the Linux - z/VM Log reader
After=network-online.target remote-fs.target 
Wants=network-online.target remote-fs.target
ConditionPathExists=!/dev/vmlogrdr_LOGREC

[Service]
Type=oneshot
RemainAfterExit=yes

ExecStart=/usr/sbin/modprobe vmlogrdr
ExecStop=/usr/sbin/modprobe -r vmlogrdr

[Install]
WantedBy=default.target

Reply via email to