diff --git a/.gitignore b/.gitignore index 4b33380..bcfd193 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ 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-*.tar.gz -/s390-tools-*-rust-vendor.tar.xz +/s390-tools-2.0.0.tar.gz +/s390-tools-2.1.0.tar.gz diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install deleted file mode 100755 index 8cb8d86..0000000 --- a/20-zipl-kernel.install +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/bash - -if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then - exit 0 -fi - -[[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel - -COMMAND="$1" -KERNEL_VERSION="$2" -BOOT_DIR_ABS="$3" -KERNEL_IMAGE="$4" - -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" - -mkbls() { - local kernelver=$1 && shift - local datetime=$1 && shift - local kernelopts=$1 && shift - - local debugname="" - local flavor="" - - if [[ "$kernelver" == *\+* ]] ; then - local flavor=-"${kernelver##*+}" - if [[ "${flavor}" == "-debug" ]]; then - local debugname=" with debugging" - local debugid="-debug" - fi - fi - - cat </dev/null && \ - restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}" - - for i in \ - "$KERNEL_DIR"/System.map \ - "$KERNEL_DIR"/config \ - "$KERNEL_DIR"/zImage.stub - do - [[ -e "$i" ]] || continue - 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 --preserve=timestamps "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" - command -v restorecon &>/dev/null && \ - restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" - fi - fi - - 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 - 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 - 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 - 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}" - else - mkbls "${KERNEL_VERSION}" \ - "$(date -u +%Y%m%d%H%M%S -d "$(stat -c '%y' "${KERNEL_DIR}")")" \ - "${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 --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/")" - sed -i -e "s/^title.*/title ${TITLE}${LINUX_DEBUG_TITLE_POSTFIX}/" "${BLS_DEBUG}" - sed -i -e "s/^version.*/version ${VERSION}${LINUX_DEBUG_VERSION_POSTFIX}/" "${BLS_DEBUG}" - sed -i -e "s/^id.*/${BLSID}/" "${BLS_DEBUG}" - sed -i -e "s#^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" ] && [ -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 - fi - - /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? - /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? - /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? - # If grubby is used there's no need to run other installation plugins - exit 77 - ;; - remove) - 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/")" - - 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]*//')" - 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 - rm -rf "/boot/${i}-${KERNEL_VERSION}" - done - # hmac is .vmlinuz-.hmac so needs a special treatment - rm -f "/boot/.vmlinuz-${KERNEL_VERSION}.hmac" - - exit 0 - fi - - /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $? - # If grubby is used there's no need to run other installation plugins - exit 77 - ;; - *) - ;; -esac diff --git a/52-zipl-rescue.install b/52-zipl-rescue.install deleted file mode 100755 index 8acfbe0..0000000 --- a/52-zipl-rescue.install +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -[[ -f /etc/os-release ]] && . /etc/os-release -[[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel - -COMMAND="$1" -KERNEL_VERSION="$2" -BOOT_DIR_ABS="$3" -KERNEL_IMAGE="$4" - -MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID - -BLS_DIR="/boot/loader/entries" - -[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}" -case "$COMMAND" in - add) - 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 - fi - - if ! [[ ${BOOT_OPTIONS[*]} ]]; then - read -r -d '' -a line < /proc/cmdline - for i in "${line[@]}"; do - [[ "${i#initrd=*}" != "$i" ]] && continue - BOOT_OPTIONS+=("$i") - done - 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}" - sed -i -e "s,^initrd.*,initrd /boot/initramfs-0-rescue-${MACHINE_ID}.img,g" "${BLS_RESCUE}" - sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}#g" "${BLS_RESCUE}" - fi - fi - ;; - *) - ;; -esac diff --git a/91-zipl.install b/91-zipl.install deleted file mode 100755 index 6205638..0000000 --- a/91-zipl.install +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [[ ! -f /etc/zipl.conf ]]; then - exit 0 -fi - -COMMAND="$1" - -case "$COMMAND" in - add|remove) - zipl > /dev/null - ;; - *) - ;; -esac diff --git a/ccw.udev b/ccw.udev index c5db932..a12ad05 100644 --- a/ccw.udev +++ b/ccw.udev @@ -1,4 +1,13 @@ -ACTION!="add|bind|change", GOTO="ccw_end" +ACTION!="add|change", GOTO="ccw_end" SUBSYSTEM!="ccw", GOTO="ccw_end" -DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init" +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" LABEL="ccw_end" diff --git a/ccw_init b/ccw_init index 3703eaf..a691ae0 100644 --- a/ccw_init +++ b/ccw_init @@ -24,25 +24,6 @@ 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" -} - -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 @@ -68,19 +49,14 @@ 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 . $CONFIG_FILE else - 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 + exit 1 fi else echo "Unknown mode=$MODE" diff --git a/cmsfs-1.1.8-kernel26.patch b/cmsfs-1.1.8-kernel26.patch new file mode 100644 index 0000000..c045827 --- /dev/null +++ b/cmsfs-1.1.8-kernel26.patch @@ -0,0 +1,12 @@ +diff -urN cmsfs-1.1.8/cmsfssed.sh cmsfs-1.1.8_/cmsfssed.sh +--- cmsfs-1.1.8/cmsfssed.sh 2003-02-28 17:52:59.000000000 -0500 ++++ cmsfs-1.1.8_/cmsfssed.sh 2004-05-28 16:36:22.000000000 -0400 +@@ -85,7 +85,7 @@ + DRIVER_SOURCE="cmsfs22x.c" + MODULES_DIRECTORY="/lib/modules/`uname -r`/fs" + ;; +- 2.4*|2.5*) ++ 2.4*|2.5*|2.6*|3.*|4.*) + LINUX_RELEASE="2.4" + # ln -s cmsfs24x.c cmsfsvfs.c + INCLUDES="-I/lib/modules/`uname -r`/build/include" diff --git a/cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch b/cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch new file mode 100644 index 0000000..275d371 --- /dev/null +++ b/cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch @@ -0,0 +1,31 @@ +From 25442f958a12b428b7d063b927ac48965dcd8164 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 28 Jan 2011 16:11:19 +0100 +Subject: [PATCH] use detected filesystem block size on FBA devices + +If a FBA device is not properly formated, then the CMS file system can +have a different block size. The cmsfs tools were able to detect the file +system block size, but in fact they still used default 512 instead. And +using the default was causing crashes. Now the detected value is used. + +https://bugzilla.redhat.com/show_bug.cgi?id=651012 +--- + cmsfsany.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/cmsfsany.c b/cmsfsany.c +index 55bcfdc..18efffb 100644 +--- a/cmsfsany.c ++++ b/cmsfsany.c +@@ -102,7 +102,7 @@ int cmsfs_find_label(struct CMSSUPER *vol,struct CMSFSADT *adt) + cmsfs_error(cmsfs_ermsg); + } + vol->flags = CMSFSFBA; +- vol->blksz = 512; ++ vol->blksz = blksz; + return vol->blksz; + } } + +-- +1.7.3.5 + diff --git a/cmsfs-1.1.8-warnings.patch b/cmsfs-1.1.8-warnings.patch new file mode 100644 index 0000000..cb1501d --- /dev/null +++ b/cmsfs-1.1.8-warnings.patch @@ -0,0 +1,11 @@ +--- cmsfs-1.1.8/cmsfsvol.c.warnings 2003-07-18 01:38:57.000000000 +0200 ++++ cmsfs-1.1.8/cmsfsvol.c 2005-09-06 16:57:15.000000000 +0200 +@@ -52,7 +52,7 @@ + + /* print a header; looks like CMS */ + (void) printf("LABEL VDEV M STAT CYL TYPE \ +-BLKSZ FILES BLKS USED-(%) BLKS LEFT BLK TOTAL\n"); ++BLKSZ FILES BLKS USED-(%%) BLKS LEFT BLK TOTAL\n"); + + for ( ; i < argc ; i++) + { diff --git a/device_cio_free b/device_cio_free index cfdced0..cd2b21f 100644 --- a/device_cio_free +++ b/device_cio_free @@ -306,14 +306,6 @@ 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/device_cio_free.service b/device_cio_free.service index b3c0f4d..db9c020 100644 --- a/device_cio_free.service +++ b/device_cio_free.service @@ -1,12 +1,10 @@ [Unit] Description=Free all devices on startup DefaultDependencies=no -Before=sysinit.target systemd-udev-trigger.service +Before=sysinit.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/device_cio_free - -[Install] -WantedBy=sysinit.target +StandardOutput=syslog diff --git a/rpminspect.yaml b/rpminspect.yaml deleted file mode 100644 index 7e19000..0000000 --- a/rpminspect.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -pathmigration: - excluded_paths: - - /lib/s390-tools - -badfuncs: - allowed: - /usr/bin/qethqoat: - - inet_ntoa diff --git a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch b/s390-tools-zipl-blscfg-rpm-nvr-sort.patch deleted file mode 100644 index 366efba..0000000 --- a/s390-tools-zipl-blscfg-rpm-nvr-sort.patch +++ /dev/null @@ -1,348 +0,0 @@ -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 - 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.39.2 - - -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 -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 | 1 + - zipl/src/scan.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 95 insertions(+), 2 deletions(-) - -diff --git a/zipl/src/Makefile b/zipl/src/Makefile -index cab5655..7ec215d 100644 ---- a/zipl/src/Makefile -+++ b/zipl/src/Makefile -@@ -9,6 +9,7 @@ ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS) - - 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 -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" - -+#include -+ - #include "boot.h" - #include "error.h" - #include "misc.h" -@@ -655,13 +657,103 @@ bls_filter(const struct dirent *ent) - return strncmp(ent->d_name + offset, ".conf", strlen(".conf")) == 0; - } - -+/* returns name/version/release */ -+/* NULL string pointer returned if nothing found */ -+static void -+split_package_string (char *package_string, char **name, -+ char **version, char **release) -+{ -+ char *package_version, *package_release; -+ -+ /* Release */ -+ package_release = strrchr (package_string, '-'); -+ -+ if (package_release != NULL) -+ *package_release++ = '\0'; -+ -+ *release = package_release; -+ -+ /* Version */ -+ package_version = strrchr(package_string, '-'); -+ -+ if (package_version != NULL) -+ *package_version++ = '\0'; -+ -+ *version = package_version; -+ /* Name */ -+ *name = package_string; -+ -+ /* Bubble up non-null values from release to name */ -+ if (name != NULL && *name == NULL) { -+ *name = (*version == NULL ? *release : *version); -+ *version = *release; -+ *release = NULL; -+ } -+ if (*version == NULL) { -+ *version = *release; -+ *release = NULL; -+ } -+} - - static int --bls_sort(const struct dirent **ent_a, const struct dirent **ent_b) -+split_cmp(char *nvr0, char *nvr1, int has_name) -+{ -+ int ret = 0; -+ char *name0, *version0, *release0; -+ char *name1, *version1, *release1; -+ -+ split_package_string(nvr0, has_name ? &name0 : NULL, &version0, &release0); -+ split_package_string(nvr1, has_name ? &name1 : NULL, &version1, &release1); -+ -+ if (has_name) { -+ ret = rpmvercmp(name0 == NULL ? "" : name0, -+ name1 == NULL ? "" : name1); -+ if (ret != 0) -+ return ret; -+ } -+ -+ ret = rpmvercmp(version0 == NULL ? "" : version0, -+ version1 == NULL ? "" : version1); -+ if (ret != 0) -+ return ret; -+ -+ ret = rpmvercmp(release0 == NULL ? "" : release0, -+ release1 == NULL ? "" : release1); -+ return ret; -+} -+ -+/* return 1: filename0 is newer than filename1 */ -+/* 0: filename0 and filename1 are the same version */ -+/* -1: filename1 is newer than filename0 */ -+static int bls_cmp(const char *filename0, const char *filename1) - { -- return strverscmp((*ent_a)->d_name, (*ent_b)->d_name); -+ char *id0, *id1; -+ int l, r; -+ -+ id0 = strdup(filename0); -+ id1 = strdup(filename1); -+ -+ l = strlen(id0); -+ if (l > 5 && strcmp(id0 + l - 5, ".conf")) -+ id0[l-5] = '\0'; -+ -+ l = strlen(id1); -+ if (l > 5 && strcmp(id1 + l - 5, ".conf")) -+ id1[l-5] = '\0'; -+ -+ r = split_cmp(id0, id1, 1); -+ -+ free(id0); -+ free(id1); -+ -+ return r; - } - -+static int -+bls_sort(const struct dirent **ent_a, const struct dirent **ent_b) -+{ -+ return bls_cmp((*ent_a)->d_name, (*ent_b)->d_name); -+} - - static int - scan_append_section_heading(struct scan_token* scan, int* index, char* name); --- -2.39.2 - diff --git a/s390-tools-zipl-invert-script-options.patch b/s390-tools-zipl-invert-script-options.patch deleted file mode 100644 index d7d936f..0000000 --- a/s390-tools-zipl-invert-script-options.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 2faae5cf51c49e3f166b8526eee276dab2fe7308 Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Wed, 30 May 2018 14:33:25 +0200 -Subject: [PATCH] zipl-switch-to-blscfg: invert ignore-default and - use-version-name options - -These options were added because the zipl maintainers wanted a different -default behaviour for the migration script than the one we use. Instead -of requiring to always use these options, just invert the logic for us. - -Signed-off-by: Javier Martinez Canillas ---- - scripts/zipl-switch-to-blscfg | 16 +++++++++------- - scripts/zipl-switch-to-blscfg.1 | 8 ++++---- - 2 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/scripts/zipl-switch-to-blscfg b/scripts/zipl-switch-to-blscfg -index 871935c783f..d8d5eca5867 100755 ---- a/scripts/zipl-switch-to-blscfg -+++ b/scripts/zipl-switch-to-blscfg -@@ -57,14 +57,14 @@ Options: - --backup-suffix=SUFFIX suffix used for backup files, defaults to .bak - --bls-directory=DIR path to generate BLS files, defaults to /boot/loader/entries - --config-file=FILE path to zipl configuration file, defaults to /etc/zipl.conf -- --ignore-default ignore the default option from the zipl configuration file -- --use-version-name use the section kernel version as the BLS file name -+ --leave-default leave the default option from the zipl configuration file -+ --use-section-name use the section name as the BLS file name - - EOF - } - - OPTS="$(getopt -o hv --long help,version,backup-suffix:,bls-directory:,config-file:,\ --ignore-default,use-version-name -n \'$SCRIPTNAME\' -- "$@")" -+leave-default,use-section-name -n \'$SCRIPTNAME\' -- "$@")" - eval set -- "$OPTS" - - BACKUP_SUFFIX=.bak -@@ -73,6 +73,8 @@ CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg" - LINUX_DEBUG_VERSION_POSTFIX="_with_debugging" - LINUX_DEBUG_TITLE_POSTFIX=" with debugging" - CONFIG="/etc/zipl.conf" -+ignore_default=true -+version_name=true - - while [ ${#} -gt 0 ]; do - case "$1" in -@@ -96,11 +98,11 @@ while [ ${#} -gt 0 ]; do - CONFIG=${2} - shift - ;; -- --ignore-default) -- ignore_default=true -+ --leave-default) -+ ignore_default=false - ;; -- --use-version-name) -- version_name=true -+ --use-section-name) -+ version_name=false - ;; - --) - shift -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.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. - - .TP --\fB\-\-ignore-default\fP --Ignore the default option from the zipl configuration file -+\fB\-\-leave-default\fP -+Leave the default option from the zipl configuration file - - .TP --\fB\-\-use-version-name\fP --Use the section kernel version as the BLS file name -+\fB\-\-use-section-name\fP -+Use the section name as the BLS file name --- -2.17.0 - diff --git a/s390.csh b/s390.csh new file mode 100644 index 0000000..b98b7a5 --- /dev/null +++ b/s390.csh @@ -0,0 +1,5 @@ +# /etc/profile.d/s390.csh - set TERM variable + +if ( `/sbin/consoletype stdout` == "serial" ) then + setenv TERM dumb +endif diff --git a/s390.sh b/s390.sh new file mode 100644 index 0000000..20a20a3 --- /dev/null +++ b/s390.sh @@ -0,0 +1,6 @@ +# /etc/profile.d/s390.sh - set TERM variable + +contype=`/sbin/consoletype stdout` +if [ "$contype" = "serial" ]; then + export TERM=dumb +fi diff --git a/s390utils-2.40.0-fedora.patch b/s390utils-2.40.0-fedora.patch deleted file mode 100644 index e69de29..0000000 diff --git a/s390utils.spec b/s390utils.spec index 7da6a02..3185837 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -1,115 +1,45 @@ -# secure boot support is for RHEL only -%if 0%{?rhel} >= 8 -%bcond_without signzipl -%else -%bcond_with signzipl -%endif - -%if 0%{?fedora} -%bcond_without pandoc -%else -%bcond_with pandoc -%endif - -# Also controls whether %%cargo_generate_buildrequires generates dev-dependencies -%bcond_without check +%define cmsfsver 1.1.8c +%define vipaver 2.1.0 Name: s390utils Summary: Utilities and daemons for IBM z Systems -Version: 2.40.0 +Group: System Environment/Base +Version: 2.1.0 Release: 1%{?dist} Epoch: 2 -# 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: -# 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 -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 +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 +Source2: s390.sh +Source3: s390.csh +Source4: http://www.linuxvm.org/Patches/S390/cmsfs-%{cmsfsver}.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 +Source13: dasdconf.sh +Source14: device_cio_free +Source15: device_cio_free.service +Source16: ccw_init +Source17: ccw.udev +Source21: normalize_dasd_arg -%if %{with signzipl} -%define pesign_name redhatsecureboot302 -%endif +Patch1000: cmsfs-1.1.8-warnings.patch +Patch1001: cmsfs-1.1.8-kernel26.patch +Patch1002: cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch -# change the defaults to match Fedora environment -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 - -# 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 -# -Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} 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 +Requires: s390utils-cmsfs = %{epoch}:%{version}-%{release} -BuildRequires: make -BuildRequires: gcc-c++ -BuildRequires: glib2-devel -%if 0%{?rhel} -BuildRequires: libcurl-devel -BuildRequires: openssl-devel -BuildRequires: rust-toolset -%else -BuildRequires: cargo-rpm-macros >= 24 -%endif %description This is a meta package for installing the default s390-tools sub packages. @@ -120,336 +50,148 @@ 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 -%autosetup -n s390-tools-%{version} -p1 +%setup -q -n s390-tools-%{version} -a 4 -a 6 -%if 0%{?rhel} -pushd rust -tar xf %{SOURCE1} -%cargo_prep -v vendor +# Fedora/RHEL changes +# none + +# +# cmsfs +# +pushd cmsfs-%{cmsfsver} +# Patch to fix a couple of code bugs +%patch1000 -p1 -b .warnings + +# build on kernel-2.6, too +%patch1001 -p1 -b .cmsfs26 + +# use detected filesystem block size (#651012) +%patch1002 -p1 -b .use-detected-block-size popd -%else -%cargo_prep -%endif -rm ./rust/Cargo.lock -# Create sysusers config files -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 +# remove --strip from install +find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g' + +pushd cmsfs-%{cmsfsver} +# cmdfs: fix encoding +iconv -f ISO8859-1 -t UTF-8 -o README.new README +touch -r README README.new +mv README.new README +# prepare docs +mv README README.cmsfs +mv CREDITS CREDITS.cmsfs +popd -%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}" \ - HAVE_DRACUT=1 \ -%if %{with pandoc} - ENABLE_DOC=1 \ -%endif - NO_PIE_LDFLAGS="" \ -%if "%{_sbindir}" == "%{_bindir}" - BINDIR=/usr/bin \ - USRSBINDIR=/usr/bin \ -%else + OPT_FLAGS="$RPM_OPT_FLAGS" \ BINDIR=/usr/sbin \ -%endif DISTRELEASE=%{release} \ V=1 -pushd rust -%cargo_license_summary -%{cargo_license} > LICENSE.dependencies -%if 0%{?rhel} -%cargo_vendor_manifest -%endif +pushd cmsfs-%{cmsfsver} +./configure +make CC="gcc $RPM_OPT_FLAGS -fno-strict-aliasing" +popd + +pushd src_vipa-%{vipaver} +make CC_FLAGS="$RPM_OPT_FLAGS -fPIC" LIBDIR=%{_libdir} popd %install -%make_install \ - HAVE_DRACUT=1 \ -%if %{with pandoc} - ENABLE_DOC=1 \ -%endif -%if "%{_sbindir}" == "%{_bindir}" - BINDIR=/usr/bin \ - USRSBINDIR=/usr/bin \ -%else +make install \ + DESTDIR=$RPM_BUILD_ROOT \ BINDIR=/usr/sbin \ -%endif SYSTEMDSYSTEMUNITDIR=%{_unitdir} \ 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 - 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 $RPM_BUILD_ROOT{/boot,%{_udevrulesdir},%{_sysconfdir}/{profile.d,sysconfig}} +install -p -m 644 zipl/boot/tape0.bin $RPM_BUILD_ROOT/boot/tape0 +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d +install -p -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir} +install -p -m 755 %{SOURCE13} $RPM_BUILD_ROOT%{_sbindir} +install -p -m 755 %{SOURCE21} $RPM_BUILD_ROOT%{_sbindir} +install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_udevrulesdir}/56-zfcp.rules +install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_udevrulesdir}/56-dasd.rules -# 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 +touch $RPM_BUILD_ROOT%{_sysconfdir}/{zfcp.conf,dasd.conf} -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} -install -p -m 755 %{SOURCE13} %{buildroot}%{_sbindir} -install -p -m 755 %{SOURCE21} %{buildroot}%{_sbindir} -install -p -m 644 %{SOURCE7} %{buildroot}%{_udevrulesdir}/56-zfcp.rules -install -p -m 644 %{SOURCE12} %{buildroot}%{_udevrulesdir}/56-dasd.rules +install -p -m 644 etc/sysconfig/dumpconf $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ +install -p -m 644 systemd/dumpconf.service $RPM_BUILD_ROOT%{_unitdir}/ -touch %{buildroot}%{_sysconfdir}/{zfcp.conf,dasd.conf} +install -p -m 644 etc/sysconfig/mon_fsstatd $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ +install -p -m 644 etc/sysconfig/mon_procd $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ +install -p -m 644 systemd/mon_fsstatd.service $RPM_BUILD_ROOT%{_unitdir}/ +install -p -m 644 systemd/mon_procd.service $RPM_BUILD_ROOT%{_unitdir}/ -# upstream udev rules -install -Dp -m 644 etc/udev/rules.d/*.rules %{buildroot}%{_udevrulesdir} +install -p -m 644 etc/cpuplugd.conf $RPM_BUILD_ROOT%{_sysconfdir}/ +install -p -m 644 systemd/cpuplugd.service $RPM_BUILD_ROOT%{_unitdir}/ -# upstream modules config -install -Dp -m 644 etc/modules-load.d/*.conf %{buildroot}%{_prefix}/lib/modules-load.d +install -p -m 644 etc/sysconfig/cpi $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ +install -p -m 644 systemd/cpi.service $RPM_BUILD_ROOT%{_unitdir}/ -# 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/ 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 +install -Dp -m 644 etc/udev/rules.d/*.rules $RPM_BUILD_ROOT%{_udevrulesdir} + +# cmsfs tools must be available in /sbin +for f in cat lst vol cp ck; do + install -p -m 755 cmsfs-%{cmsfsver}/cmsfs${f} $RPM_BUILD_ROOT%{_sbindir} + install -p -m 644 cmsfs-%{cmsfsver}/cmsfs${f}.8 $RPM_BUILD_ROOT%{_mandir}/man8 +done + +# src_vipa +pushd src_vipa-%{vipaver} +make install LIBDIR=%{_libdir} SBINDIR=%{_bindir} INSTROOT=$RPM_BUILD_ROOT 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} +mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name} +install -p -m 644 include/lib/vtoc.h $RPM_BUILD_ROOT%{_includedir}/%{name} # device_cio_free -install -p -m 755 %{SOURCE14} %{buildroot}%{_sbindir} -pushd %{buildroot}%{_sbindir} +install -p -m 755 %{SOURCE14} $RPM_BUILD_ROOT%{_sbindir} +pushd $RPM_BUILD_ROOT%{_sbindir} for lnk in dasd zfcp znet; do ln -sf device_cio_free ${lnk}_cio_free done popd -install -p -m 644 %{SOURCE15} %{buildroot}%{_unitdir} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/sysinit.target.wants +install -p -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_unitdir} +pushd $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/sysinit.target.wants +ln -sf %{_unitdir}/device_cio_free.service device_cio_free.service +popd # ccw -install -p -m 755 %{SOURCE16} %{buildroot}/usr/lib/udev/ccw_init -install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules +install -p -m 755 %{SOURCE16} $RPM_BUILD_ROOT/usr/lib/udev/ccw_init +install -p -m 644 %{SOURCE17} $RPM_BUILD_ROOT%{_udevrulesdir}/81-ccw.rules # zipl.conf to be ghosted -touch %{buildroot}%{_sysconfdir}/zipl.conf +touch $RPM_BUILD_ROOT%{_sysconfdir}/zipl.conf -# install systemd sysusers and tmpfiles -mkdir -p %{buildroot}{%{_sysusersdir},%{_tmpfilesdir}}/ -for f in s390utils-*.conf.usr; do - install -p -m 644 $f %{buildroot}%{_sysusersdir}/$(basename -s .usr $f) -done -for f in s390utils-*.conf.tmp; do - install -p -m 644 $f %{buildroot}%{_tmpfilesdir}/$(basename -s .tmp $f) -done -%endif - -%ifarch s390x -# -# s390x/native main %%files section -# %files %doc README.md -%else # -# multiarch %%files section +# ************************* s390-tools base package ************************* # - -%files -%doc README.md -%license LICENSE -%license rust/LICENSE.dependencies -%if 0%{?rhel} -%license rust/cargo-vendor.txt -%endif -%{_bindir}/genprotimg -%{_bindir}/pvattest -%{_bindir}/pvextract-hdr -%{_bindir}/pvimg -%{_bindir}/pvsecret -%{_bindir}/pvverify -%{_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* -%{_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* -%{_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/netboot/ -%{_datadir}/s390-tools/pvimg/ -%{bash_completions_dir}/*.bash -%{zsh_completions_dir}/_* - -# -# enf of multi-arch section -# -%endif - -%ifarch s390x -# -# s390x specific sub-packages -# -# -# ************************* s390-tools core package ************************* -# -%package core -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 - - -%description core -This package provides minimal set of tools needed to system to boot. - -%post core -%systemd_post device_cio_free.service -%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/chzdev_usage.txt -%license LICENSE -%{_sbindir}/chreipl -%{_sbindir}/chzdev -%{_sbindir}/cio_ignore -%{_sbindir}/dasdfmt -%{_sbindir}/dasdinfo -%{_sbindir}/fdasd -%{_sbindir}/lszdev -%{_sbindir}/vmcp -%{_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-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 -%{_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* -%{_mandir}/man8/cio_ignore.8* -%{_mandir}/man8/dasdfmt.8* -%{_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* - -# 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 -%{_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 -%{_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 -%{_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 AND LGPL-2.1-or-later AND %{extra_licenses_from_rust_deps} +# src_vipa is CPL +License: MIT and CPL Summary: S390 base tools -Provides: s390-tools-base = %{epoch}:%{version}-%{release} -Requires: coreutils -Requires: ethtool -Requires: file -Requires: gawk -Requires: sed +Group: System Environment/Base +Requires: perl gawk sed coreutils +Requires: sysfsutils Requires: sg3_utils -Requires: tar -Requires: s390utils-core = %{epoch}:%{version}-%{release} -Requires: s390utils-se-data = %{epoch}:%{version}-%{release} +Requires: ethtool %{?systemd_requires} -BuildRequires: perl-generators BuildRequires: ncurses-devel +BuildRequires: libpfm-devel BuildRequires: glibc-static -BuildRequires: cryptsetup-devel >= 2.0.3 -BuildRequires: json-c-devel -BuildRequires: rpm-devel -BuildRequires: libxml2-devel -BuildRequires: libnl3-devel %description base @@ -514,6 +256,11 @@ 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 @@ -527,6 +274,9 @@ 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. @@ -563,185 +313,121 @@ 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: - 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" %post base +%systemd_post cpi.service %systemd_post dumpconf.service %preun base +%systemd_preun cpi.service %systemd_preun dumpconf.service %postun base +%systemd_postun_with_restart cpi.service %systemd_postun_with_restart dumpconf.service %files base -%doc README.md zdev/src/lszdev_usage.txt -%license rust/LICENSE.dependencies -%if 0%{?rhel} -%license rust/cargo-vendor.txt -%endif +%doc README.md zdev/src/*.txt +%doc LICENSE %{_sbindir}/chccwdev %{_sbindir}/chchp %{_sbindir}/chcpumf -%{_sbindir}/chpstat +%{_sbindir}/chreipl %{_sbindir}/chshut %{_sbindir}/chzcrypt +%{_sbindir}/chzdev +%{_sbindir}/cio_ignore +%{_sbindir}/dasdfmt +%{_sbindir}/dasdinfo %{_sbindir}/dasdstat %{_sbindir}/dasdview %{_sbindir}/dbginfo.sh -%{_sbindir}/hsavmcore -%{_sbindir}/hsci +%{_sbindir}/fdasd %{_sbindir}/hyptop %{_sbindir}/ip_watcher.pl %{_sbindir}/lschp -%{_sbindir}/lscpumf %{_sbindir}/lscss %{_sbindir}/lsdasd -%{_sbindir}/lshwc -%{_sbindir}/lsluns %{_sbindir}/lsqeth -%{_sbindir}/lspai +%{_sbindir}/lsluns %{_sbindir}/lsreipl %{_sbindir}/lsscm %{_sbindir}/lsshut -%{_sbindir}/lsstp %{_sbindir}/lstape %{_sbindir}/lszcrypt +%{_sbindir}/lszdev %{_sbindir}/lszfcp -%{_sbindir}/opticsmon -%{_sbindir}/pai %{_sbindir}/qetharp %{_sbindir}/qethconf %{_sbindir}/qethqoat -%{_sbindir}/sclpdbf +%{_sbindir}/scsi_logging_level %{_sbindir}/start_hsnc.sh %{_sbindir}/tape390_crypt %{_sbindir}/tape390_display %{_sbindir}/ttyrun %{_sbindir}/tunedasd +%{_sbindir}/vmcp %{_sbindir}/vmur %{_sbindir}/xcec-bridge -%{_sbindir}/zcryptctl -%{_sbindir}/zcryptstats %{_sbindir}/zfcpdbf %{_sbindir}/zgetdump -%{_sbindir}/zipl-switch-to-blscfg -%{_sbindir}/zmemtopo +%{_sbindir}/zipl %{_sbindir}/znetconf -%{_sbindir}/zpcictl -%{_bindir}/cpacfinfo +%{_bindir}/lscpumf +# provided by util-linux +%exclude %{_sbindir}/lsmem +%exclude %{_sbindir}/chmem %{_bindir}/dump2tar -%{_bindir}/genprotimg -%{_bindir}/mk-s390image -%{_bindir}/pvapconfig -%{_bindir}/pvimg -%{_bindir}/pvinfo -%{_bindir}/pvattest -%{_bindir}/pvextract-hdr -%{_bindir}/pvsecret -%{_bindir}/pvverify +%{_bindir}/vmconvert %{_bindir}/zkey -%{_bindir}/zkey-cryptsetup -%{_bindir}/zpwr +%{_unitdir}/cpi.service %{_unitdir}/dumpconf.service -%{_unitdir}/opticsmon.service %ghost %config(noreplace) %{_sysconfdir}/zipl.conf +%config(noreplace) %{_sysconfdir}/sysconfig/cpi %config(noreplace) %{_sysconfdir}/sysconfig/dumpconf -%{_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 -%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 -/lib/s390-tools/zfcpdump/zfcpdump-initrd -/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/cpacfinfo.1* +/lib/s390-tools +%{_mandir}/man1/dbginfo.sh.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* -%{_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* -%{_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* -%{_mandir}/man1/pvsecret-retrieve.1* -%{_mandir}/man1/pvsecret-verify.1* -%{_mandir}/man1/pvsecret.1* -%{_mandir}/man1/pvverify.1* +%{_mandir}/man1/lscpumf.1* +%{_mandir}/man1/vmconvert.1* +%{_mandir}/man1/zfcpdbf.1* %{_mandir}/man1/zkey.1* -%{_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}/man5/zipl.conf.5* %{_mandir}/man8/chccwdev.8* %{_mandir}/man8/chchp.8* %{_mandir}/man8/chcpumf.8* -%{_mandir}/man8/chpstat.8* +%{_mandir}/man8/chreipl.8* %{_mandir}/man8/chshut.8* %{_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* -%{_mandir}/man8/dbginfo.sh.8* %{_mandir}/man8/dumpconf.8* -%{_mandir}/man8/hsavmcore.8* -%{_mandir}/man8/hsci.8* +%{_mandir}/man8/fdasd.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/lspai.8* %{_mandir}/man8/lsqeth.8* %{_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* %{_mandir}/man8/lszfcp.8* -%{_mandir}/man8/opticsmon.8* -%{_mandir}/man8/pai.8* %{_mandir}/man8/qetharp.8* %{_mandir}/man8/qethconf.8* %{_mandir}/man8/qethqoat.8* @@ -749,48 +435,53 @@ For more information refer to the following publications: %{_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* -%{_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 +%{_mandir}/man8/zipl.8* +# provided by util-linux +%exclude %{_mandir}/man8/chmem.8* +%exclude %{_mandir}/man8/lsmem.8* +%dir %{_datadir}/s390-tools/ +%{_datadir}/s390-tools/cpumf/ %{_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 -%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 -# Additional Fedora/RHEL specific stuff +# Additional Redhat specific stuff /boot/tape0 +%{_sysconfdir}/profile.d/s390.csh +%{_sysconfdir}/profile.d/s390.sh +%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 +%{_sysconfdir}/systemd/system/sysinit.target.wants/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 -%package se-data -License: MIT -Summary: Data for Secure Execution -Provides: s390-tools-se-data = %{epoch}:%{version}-%{release} -BuildArch: noarch - -%description se-data -%{summary}. - -%files se-data -%dir %{_datadir}/s390-tools -%{_datadir}/s390-tools/pvimg/ +# src_vipa +%{_bindir}/src_vipa.sh +%{_libdir}/src_vipa.so +%{_mandir}/man8/src_vipa.8* # # *********************** s390-tools osasnmpd package *********************** # %package osasnmpd Summary: SNMP sub-agent for OSA-Express cards -Provides: s390-tools-osasnmpd = %{epoch}:%{version}-%{release} +Group: System Environment/Daemons Requires: net-snmp Requires: psmisc BuildRequires: net-snmp-devel @@ -810,7 +501,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} +Group: System Environment/Daemons Requires: coreutils %{?systemd_requires} @@ -850,7 +541,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} +Group: System Environment/Daemons %{?systemd_requires} BuildRequires: systemd @@ -880,7 +571,7 @@ memory can be increased or decreased exploiting the CMM1 feature. # %package ziomon Summary: S390 ziomon tools -Provides: s390-tools-ziomon = %{epoch}:%{version}-%{release} +Group: Applications/System Requires: blktrace Requires: coreutils Requires: device-mapper-multipath @@ -919,7 +610,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} +Group: Applications/System Requires(pre): shadow-utils Requires(post): grep Requires(postun): grep @@ -936,6 +627,10 @@ 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 \ @@ -961,31 +656,50 @@ fi %{_bindir}/ts-shell %{_sbindir}/chiucvallow %{_sbindir}/lsiucvallow -%{_sysusersdir}/s390utils-iucvterm.conf -%{_tmpfilesdir}/s390utils-iucvterm.conf -%ghost %dir %attr(2770,root,ts-shell) /var/log/ts-shell +%dir %attr(2770,root,ts-shell) /var/log/ts-shell %doc iucvterm/doc/ts-shell %{_mandir}/man1/iucvconn.1* %{_mandir}/man1/iucvtty.1* %{_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 +# +# *********************** cmsfs package *********************** +# +%package cmsfs +License: GPLv2 +Summary: CMS file system tools +Group: System Environment/Base +URL: http://www.casita.net/pub/cmsfs/cmsfs.html +# Requires: + +%description cmsfs +This package contains the CMS file system tools. + +%files cmsfs +%{_sbindir}/cmsfscat +%{_sbindir}/cmsfsck +%{_sbindir}/cmsfscp +%{_sbindir}/cmsfslst +%{_sbindir}/cmsfsvol +%{_mandir}/man8/cmsfscat.8* +%{_mandir}/man8/cmsfsck.8* +%{_mandir}/man8/cmsfscp.8* +%{_mandir}/man8/cmsfslst.8* +%{_mandir}/man8/cmsfsvol.8* # # *********************** cmsfs-fuse package *********************** # %package cmsfs-fuse 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 +Group: System Environment/Base +BuildRequires: fuse-devel +Requires: fuse %description cmsfs-fuse This package contains the CMS file system based on FUSE. @@ -1001,10 +715,9 @@ This package contains the CMS file system based on FUSE. # %package zdsfs Summary: z/OS data set access based on FUSE -BuildRequires: fuse3-devel -BuildRequires: libcurl-devel -Requires: fuse3 -Provides: s390-tools-zdsfs = %{epoch}:%{version}-%{release} +Group: System Environment/Base +BuildRequires: fuse-devel +Requires: fuse %description zdsfs This package contains the z/OS data set access based on FUSE. @@ -1018,9 +731,9 @@ This package contains the z/OS data set access based on FUSE. # %package hmcdrvfs Summary: HMC drive file system based on FUSE -BuildRequires: fuse3-devel -Requires: fuse3 -Provides: s390-tools-hmcdrvfs = %{epoch}:%{version}-%{release} +Group: System Environment/Base +BuildRequires: fuse-devel +Requires: fuse %description hmcdrvfs This package contains a HMC drive file system based on FUSE and a tool @@ -1037,13 +750,11 @@ to list files and directories. # %package cpacfstatsd Summary: Monitor and maintain CPACF activity counters -Provides: s390-tools-cpacfstatsd = %{epoch}:%{version}-%{release} +Group: System Environment/Base Requires(post): systemd 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 @@ -1064,438 +775,22 @@ and maintain CPACF activity counters. %{_mandir}/man1/cpacfstats.1* %{_mandir}/man8/cpacfstatsd.8* %{_unitdir}/cpacfstatsd.service -%{_sysusersdir}/s390utils-cpacfstatsd.conf - -# -# *********************** chreipl-fcp-mpath package *********************** -# -%package chreipl-fcp-mpath -Summary: Use multipath information for re-IPL path failover -BuildRequires: make -BuildRequires: bash -BuildRequires: coreutils -%if %{with pandoc} -BuildRequires: pandoc -%endif -BuildRequires: gawk -BuildRequires: gzip -BuildRequires: sed -Provides: s390-tools-chreipl-fcp-mpath = %{epoch}:%{version}-%{release} -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 -%if %{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 -%{_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 *********************** # %package devel Summary: Development files -Provides: s390-tools-devel = %{epoch}:%{version}-%{release} -Requires: %{name}-base%{?_isa} = %{epoch}:%{version}-%{release} +Group: Development/Libraries %description devel User-space development files for the s390/s390x architecture. %files devel -%{_includedir}/%{name}/ -%{_includedir}/ekmfweb/ -%{_includedir}/kmipclient/ -%{_libdir}/libekmfweb.so -%{_libdir}/libkmipclient.so - -# -# end of s390x specific sub-packages -# -%endif +%{_includedir}/%{name} %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) - -* 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) - -* 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) - -* 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) - -* 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 - -* 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) - -* 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) - -* 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" - -* 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) - -* 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 - -* 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 - -* 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) - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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) - -* 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 - -* 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 - -* 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) - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 -- 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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) - -* Tue Jun 11 17:21:59 CEST 2019 Igor Gnatenko - 2:2.9.0-2 -- Rebuild for RPM 4.15 - -* Wed May 22 2019 Dan Horák - 2:2.9.0-1 -- rebased to 2.9.0 - -* Thu May 02 2019 Dan Horák - 2:2.8.0-3 -- dbginfo.sh needs tar (#1705628) - -* Sat Mar 09 2019 Dan Horák - 2:2.8.0-2 -- fix building zipl with gcc9 (#1687085) - -* Mon Feb 18 2019 Dan Horák - 2:2.8.0-1 -- rebased to 2.8.0 - -* Sat Feb 02 2019 Fedora Release Engineering - 2:2.7.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 28 2019 Dan Horák - 2:2.7.1-3 -- create cpacfstats group needed by cpacfstatsd - -* Thu Jan 10 2019 Dan Horák - 2:2.7.1-2 -- load protected key support kernel module early on boot - -* Wed Jan 02 2019 Dan Horák - 2:2.7.1-1 -- rebased to 2.7.1 - -* Wed Dec 05 2018 Dan Horák - 2:2.7.0-4 -- fix deps for dropped cmsfs subpackage - -* Mon Nov 19 2018 Dan Horák - 2:2.7.0-3 -- drop the original cmsfs subpackage - -* Tue Nov 06 2018 Javier Martinez Canillas - 2:2.7.0-2 -- Make zipl to use the BLS title field as the IPL section name - -* Wed Oct 31 2018 Dan Horák - 2:2.7.0-1 -- rebased to 2.7.0 - -* Mon Oct 22 2018 Dan Horák - 2:2.6.0-8 -- don't relink the zkey tools - -* Mon Oct 15 2018 Peter Jones - 2.6.0-7 -- Make the blscfg sort order match what grub2 and grubby do. (pjones) -- Add a ~debug suffix instead of -debug to sort it correctly. (javierm) - -* Mon Oct 01 2018 Dan Horák - 2:2.6.0-6 -- Fix kernel-install scripts issues - -* Fri Sep 21 2018 Dan Horák - 2:2.6.0-5 -- Makefile cleanups - -* Mon Sep 17 2018 Dan Horák - 2:2.6.0-4 -- drop redundant systemd services installation - -* Fri Sep 14 2018 Dan Horák - 2:2.6.0-3 -- add FIEMAP support into zipl - -* Tue Aug 14 2018 Dan Horák - 2:2.6.0-2 -- fix R:/BR: perl - -* Fri Aug 10 2018 Dan Horák - 2:2.6.0-1 -- rebased to 2.6.0 -- include zdev dracut module - -* Tue Jul 31 2018 Dan Horák - 2:2.5.0-5 -- add missing zkey infrastructure (#1610242) - -* Fri Jul 27 2018 Dan Horák - 2:2.5.0-4 -- don't override TERM for console - -* Thu Jul 26 2018 Dan Horák - 2:2.5.0-3 -- network-scripts are required for network device initialization - -* Sat Jul 14 2018 Fedora Release Engineering - 2:2.5.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 11 2018 Dan Horák - 2:2.5.0-1 -- rebased to 2.5.0 - -* Thu May 24 2018 Javier Martinez Canillas - 2:2.4.0-2 -- zipl: Add BootLoaderSpec support -- Add kernel-install scripts to create BLS fragment files - -* Wed May 09 2018 Dan Horák - 2:2.4.0-1 -- rebased to 2.4.0 - -* Fri Apr 13 2018 Dan Horák - 2:2.3.0-3 -- fix building zipl with PIE (#1566140) - -* Mon Mar 12 2018 Dan Horák - 2:2.3.0-2 -- fix LDFLAGS injection (#1552661) - -* Wed Feb 21 2018 Rafael Santos - 2:2.3.0-1 -- rebased to 2.3.0 - -* Fri Feb 09 2018 Fedora Release Engineering - 2:2.2.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Jan 22 2018 Dan Horák - 2:2.2.0-2 -- fix build with non-standard %%dist - -* Thu Dec 07 2017 Dan Horák - 2:2.2.0-1 -- rebased to 2.2.0 - * Mon Sep 25 2017 Dan Horák - 2:2.1.0-1 - rebased to 2.1.0 diff --git a/sources b/sources index 8572938..1ad65b4 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ -SHA512 (s390-tools-2.40.0.tar.gz) = 1943429581b280bf9ea370da3700a234d509837cb45b2354cdf79b38db87d2183010d18d9132defd77b9d8e11b7e002c447ffd7c912e20a50da4cb6877758c0e -SHA512 (s390-tools-2.40.0-rust-vendor.tar.xz) = fd1894c4e950a3c51054432731a3aeef4318e794aa4af2dc5fed31da16dce2020f014a64241e44766fb40b0fd6c1ac5943366e38dcfebf264875220ecf1285b5 +SHA512 (cmsfs-1.1.8c.tar.gz) = 2ba5687d378fdd9871283728e81f1399047e74f9bba3936726eda11a978fe6ced1a300f15acb871d5daa26e61069d89767c753cf584f2731f5e99985db96aef0 +SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7 +SHA512 (s390-tools-2.1.0.tar.gz) = a1e2f7cda8a16f9ea3c5e7bfe118dd8044542b4fee7086a3656fc985f64170e29884177004265e9f0802c45fa04057edf665feccebeb38dc0f5515093ccf31aa diff --git a/zfcpconf.sh b/zfcpconf.sh index c3c6bf4..45d10a1 100644 --- a/zfcpconf.sh +++ b/zfcpconf.sh @@ -2,12 +2,10 @@ # 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: @@ -23,20 +21,12 @@ 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 fi if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then - exit 1 + return fi sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do case $line in @@ -44,17 +34,6 @@ 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 @@ -67,11 +46,11 @@ if [ -f "$CONFIG" ]; then WWPN=$2 FCPLUN=$3 fi - set_online ${DEVICE} + [ `cat /sys/bus/ccw/drivers/zfcp/${DEVICE}/online` = "0" ] \ + && echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online [ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/${FCPLUN} ] \ && echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/unit_add ;; esac done fi -exit 0