Compare commits

..

162 commits

Author SHA1 Message Date
Dan Horák
44975e04d9 update filelist for multi-arch builds 2026-01-06 19:41:55 +01:00
Dan Horák
1e19416b2b drop outdated patch and add new placeholder one 2026-01-06 19:31:58 +01:00
Dan Horák
020fb91110 - rebased to 2.40.0 (rhbz#2421447) 2026-01-06 18:13:01 +00:00
Dan Horák
09f8677bca - rebased to 2.39.0 (rhbz#2403755) 2025-11-14 09:14:49 +00:00
Fedora Release Engineering
41042d250b Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 17:51:29 +00:00
Dan Horák
f7557efaba - rebased to 2.38.0 (rhbz#2374765) 2025-06-27 15:19:56 +00:00
Benjamin A. Beasley
43b62453bd Update License (for s390utils/s390utils-base) to reflect Rust deps. 2025-03-13 13:08:31 -04:00
Benjamin A. Beasley
7efda8631f Properly generate Rust BuildRequires on Fedora 2025-03-13 11:27:33 -04:00
Dan Horák
745b0f7706 update fedora patch filename 2025-02-28 18:33:21 +01:00
Jakub Čajka
ee43d0c73b
Debundle rust dependencies 2025-02-28 11:15:18 +01:00
Jakub Čajka
488af3d803
rebased to 2.37.0 (rhbz#2330787) 2025-02-28 11:15:11 +01:00
Dan Horák
8cf2e7926d - rebased to 2.36.0 (rhbz#2330787) 2025-02-24 14:39:27 +00:00
Dan Horák
3484222eb4 use systemd-tmpfiles for /var/log/ts-shell
Also generalize the systemd-sysusers and systemd-tmpfiles support.
2025-02-07 14:56:33 +00:00
Fabio Valentini
ffe5dc6c52
Rebuild for openssl crate >= v0.10.70 (RUSTSEC-2025-0004) 2025-02-06 13:47:34 +01:00
Dan Horák
008037d366 finish migration to sysusers.d by removing the now redundant %pre scriptlets 2025-02-04 18:59:34 +01:00
Dan Horák
7b6090d409 update for merged bin and sbin 2025-01-20 22:10:31 +01:00
Dan Horák
9886d22bc2 - fix build with gcc15
- Resolves: rhbz#2338176
2025-01-20 19:08:37 +01:00
Zbigniew Jędrzejewski-Szmek
a3da2ffb3c add sysusers.d config
For https://pagure.io/releng/failed-composes/issue/7714#comment-951273.
2025-01-15 11:49:26 +01:00
Dan Horák
2add3e66cd support merged bin and sbin
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin)
2025-01-14 15:04:02 +00:00
Dan Horák
c0f10fd579 don't package scsi_logging_level as it is provided by sg3_utils 2025-01-14 14:43:02 +00:00
Dan Horák
a0ae4f8f73 switch to %make_install 2025-01-14 14:08:22 +00:00
Zbigniew Jędrzejewski-Szmek
865e5c3bac Build against rust-thiserror1-devel 2025-01-14 13:02:34 +00:00
Dan Horák
d55343afd6 - rebased to 2.35.0 (rhbz#2316232) 2024-10-03 09:12:25 +00:00
Dan Horák
35192dda78 - don't make Rust warnings fatal 2024-08-26 13:11:02 +02:00
Dan Horák
33c843d374 be more specific for the rpminspect badfuncs check 2024-08-14 09:09:23 +00:00
Dan Horák
4ac12c1bd1 - rebased to 2.34.0 (rhbz#2302462) 2024-08-12 13:50:19 +00:00
Fedora Release Engineering
9aeeea236f Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 04:41:16 +00:00
Dan Horák
fdae42f94f - "which" is not required any more
- Revert "zipl/src: Fix problems when target parameters are specified by user"
2024-07-15 13:30:55 +02:00
Dan Horák
32cf987a54 update fedora patch filename for 2.33.1 2024-06-26 15:26:25 +00:00
Dan Horák
b2e91e120a Add which as a dependency for base and ziomon subpackages
Some tools in the base and ziomon subpackages require which, so add the
depedency explictly.
2024-06-20 10:23:46 +02:00
Dan Horák
7471fc863b - rebased to 2.33.1 (rhbz#2283542) 2024-05-28 09:37:35 +00:00
Yaakov Selkowitz
4a01dbe43e Update Rust macro usage
The rust-toolset macros in RHEL 10 are now compatible with Fedora's in
terms of handling vendoring and automatic generation of license information
and bundled provides.
2024-05-21 18:51:12 -04:00
Dan Horák
38dd409cb6 - rebased to 2.32.0 (rhbz#2273003) 2024-04-04 09:57:42 +00:00
Neal Gompa
93479b677f Add 's390-tools' Provides to all packages
The upstream name of this is 's390-tools', and nearly all
other Linux distributions ship it as such. Make life easier
for people by also providing this name.
2024-03-08 10:45:47 -05:00
Dan Horák
882b26e468 unconditionally build with rust 2024-02-05 11:25:21 +00:00
Dan Horák
0226a1b211 - rebased to 2.31.0 (rhbz#2262499) 2024-02-05 11:07:42 +00:00
Dan Horák
3eddb1a036 - add s390utils-se-data as a noarch subpackage with Secure Execution data files 2024-01-26 08:38:00 +00:00
Dan Horák
ad9e1ad7a0 - rebased to 2.30.0 (rhbz#2252519) 2024-01-02 14:26:47 +00:00
Yaakov Selkowitz
0f03699129 Fix build with libxml2-2.12.0
https://github.com/ibm-s390-linux/s390-tools/pull/160
2023-12-12 19:50:01 -05:00
Fabio Valentini
f00ff2ac55
Rebuild for openssl crate >= v0.10.60 (RUSTSEC-2023-0044, RUSTSEC-2023-0072) 2023-12-01 16:17:48 +01:00
Dan Horák
2c0b6d2ea2 enable multi-arch builds
Select tools are expected to be used on non-s390x platforms, so drop
ExclusiveArch and add a special %files section for this case. The tools
will be available in the s390utils binary rpm.
2023-11-13 10:10:17 +01:00
Dan Horák
8a3c26800a - fix upstream kernel installations
Apply changes from the grub2 kernel install helper script to the zipl
helper.

Related: rhbz#2239008
2023-11-10 12:11:25 +01:00
Dan Horák
ca71fe340e let cp remove the destination files
clone of https://src.fedoraproject.org/rpms/grub2/c/e1206cf45b3bdde97e166d5c0d55842c864a1c9e?branch=rawhide
2023-11-10 11:59:34 +01:00
Dan Horák
7a5c89e84a do not preserve ownership or xattrs on copied files
clone of https://src.fedoraproject.org/rpms/grub2/c/8800efcb0bea5750f77f88a05ac9211a19cbc7a0?branch=rawhide
2023-11-10 11:48:10 +01:00
Dan Horák
40db3a57ae rename installed kernel to match name used in boot entry
clone of https://src.fedoraproject.org/rpms/grub2/c/af4f1536b6e498b88c1b07d00fc047184453839a?branch=rawhide
2023-11-10 11:41:36 +01:00
Dan Horák
70bd1af9bd request a specific version of zerocopy as we have a newer one too 2023-11-09 11:20:35 +01:00
Dan Horák
51cd104ddd use %license for LICENSE 2023-11-09 09:46:07 +01:00
Dan Horák
5184801f0e switch to %autosetup 2023-10-24 13:40:29 +00:00
Yaakov Selkowitz
535cc10766 Use vendored dependencies in RHEL builds
RHEL does not package individual rust crate dependencies.  Instead,
rust-based packages must vendor these, and use the RHEL macros to
build them.
2023-10-23 20:50:30 -04:00
Jakub Čajka
3b4ba770c1
Move all package options to bconds 2023-09-06 11:00:23 +02:00
Jakub Čajka
702b044c20
Enable rust based tools 2023-09-01 12:44:40 +02:00
Jakub Čajka
3fa397e687
Fix missing semicolon
Resolves: BZ#2235734
2023-08-31 13:08:54 +02:00
Jakub Čajka
9e549c2e6c Convert to the SPDX 2023-08-08 08:51:16 +00:00
Dan Horák
087a10568c - rebased to 2.29.0 2023-08-07 08:50:46 +00:00
Fedora Release Engineering
262d603726 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 00:55:06 +00:00
Dan Horák
4b655c64f1 add rpminspect.yaml 2023-07-14 10:04:29 +02:00
Dan Horák
d81d4fd383 - rebased to 2.28.0 2023-07-13 15:10:59 +00:00
Dan Horák
da9838c800 modernize %patch usage 2023-05-31 13:10:36 +00:00
Dan Horák
b43bfd7eed - rebased to 2.27.0 2023-05-31 12:44:16 +00:00
Petr Písař
a6e30a308a Unescape Patch100 definition
Broken with commit 9e98b44d8b.
2023-05-19 16:40:48 +02:00
Petr Písař
57b37fee1f Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19) 2023-05-19 16:25:40 +02:00
Dan Horák
d6f3723e10 - rebased to 2.26.0 2023-03-03 10:01:46 +00:00
Dan Horák
9e98b44d8b - add post GA fixes 2023-01-31 15:24:52 +01:00
Dan Horák
607a6825f4 Revert "Generate /etc/kernel/cmdline if it does not exist"
This reverts commit 77693cd7eb.

Although it fixes the situation when a new kernel is being installed in
a %post script, it breaks the initial kernel installation, because the
BLS snippet doesn't exists yet.
2023-01-23 13:26:41 +00:00
Dan Horák
685ce32c07 - update kernel install script to write /etc/kernel/cmdline 2023-01-19 10:00:30 +01:00
Robbie Harwood
77693cd7eb Generate /etc/kernel/cmdline if it does not exist
Don't fall back to reading /proc/cmdline: that will likely reflect the
installer environment which will result in a non-booting kernel entry.

See-also: rhbz#1940288
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2023-01-17 11:35:16 -05:00
Dan Horák
c33643ba10 - rebased to 2.25.0 2022-12-09 13:54:52 +00:00
Dan Horák
bef2b35dc9 - update for Transparent DASD PPRC (Peer-to-Peer Remote Copy) handling 2022-11-22 17:35:10 +00:00
Dan Horák
af41c81d1b - rebased to 2.24.0 2022-11-10 16:45:34 +00:00
Dan Horák
473c14c9ab - rebased to 2.23.0 2022-08-19 09:04:27 +00:00
Fedora Release Engineering
a7424a8ff0 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 07:54:12 +00:00
Dan Horák
6f524eab5a add missing BR 2022-06-27 11:49:35 +00:00
Dan Horák
ca6b193ac3 - rebased to 2.22.0 2022-06-27 10:20:07 +00:00
Dan Horák
cc536faf67 - do not fail on emtpy /proc/cmdline when installing kernel (#1899759) 2022-05-31 11:54:12 +00:00
Dan Horák
f7710610d8 chreipl-fcp-mpath man page is distributed pregenerated 2022-04-26 11:47:55 +02:00
Dan Horák
1c93647293 Revert "fix cpictl permissions (#2024102)"
This reverts commit 78ef6e86e5.
2022-04-26 11:15:46 +02:00
Dan Horák
a2cb8e5beb - rebased to 2.21.0 2022-04-22 13:27:04 +00:00
Dan Horák
6dc91fa6ea - rebased to 2.20.0
- switch to fuse3
2022-02-07 09:53:18 +00:00
Fedora Release Engineering
ad7942bd0c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 00:14:49 +00:00
Dan Horák
a483890884 - update ccw udev rules 2021-11-26 16:49:21 +01:00
Dan Horák
78ef6e86e5 fix cpictl permissions (#2024102) 2021-11-18 12:06:45 +00:00
Dan Horák
b385215ded - rebased to 2.19.0
- cmsfs-fuse Requires glibc-gconv-extra (#2022652)
2021-11-16 15:38:15 +00:00
Dan Horák
c69c48c992 - move vmcp to core (#1931287) 2021-10-21 13:13:40 +02:00
Dan Horák
ea8f5ea852 - rebased to 2.18.0 2021-10-05 10:10:21 +00:00
Fedora Release Engineering
083020797b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 16:57:00 +00:00
Dan Horák
a8e761756e drop trailing slash when listing dirs with %dir in %files 2021-07-15 10:48:13 +02:00
Dan Horák
287377b414 base should own the /usr/lib64/zkey directory 2021-07-15 10:46:57 +02:00
Dan Horák
c1e8b3a309 workaround a build issue with new ld (binutils >= 2.36)
The new ld doesn't ignore an unrecorgnized -no-pie option.

Related: https://github.com/ibm-s390-linux/s390-tools/pull/106
2021-07-14 14:26:27 +02:00
Dan Horák
0419550a2a remove a comment 2021-07-08 11:44:55 +02:00
Dan Horák
9e8e130a7c use URLs for RHEL/Fedora specific scripts and configs 2021-07-08 11:42:31 +02:00
Dan Horák
2a913049ee modernize ccw udev rules 2021-07-08 11:38:29 +02:00
Dan Horák
ce7722eab4 - rebased to 2.17.0 2021-07-07 17:49:40 +00:00
Dan Horák
e4da637a53 zfcpconf: set exit code explicitly (#1977434) 2021-06-30 11:36:03 +02:00
Dan Horák
b2e74b0a3e mk-s390image script requires file 2021-06-22 21:31:28 +02:00
Dan Horák
2bf7d95c95 - drop obsolete setting from device_cio_free.service 2021-06-17 10:00:57 +02:00
Dan Horák
02409651fa - drop superfluous Require from s390utils-base 2021-03-01 10:54:27 +00:00
Dan Horák
3d1d949272 - rebased to 2.16.0 2021-02-24 18:05:21 +00:00
Fedora Release Engineering
d792b32be1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 19:51:30 +00:00
Tom Stellard
7a34f7d689 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 21:02:58 +00:00
Dan Horák
6ce1f4d14f - move lszdev to core 2021-01-05 16:28:32 +00:00
Dan Horák
1409803b15 - move fdasd to core 2021-01-04 16:53:36 +01:00
Dan Horák
a823de10da move cio_ignore man page to core too 2020-11-03 16:33:34 +01:00
Petr Šabata
ab939b3c36 Fix the development package dependency by adding epoch
Signed-off-by: Petr Šabata <contyk@redhat.com>
2020-10-29 11:15:12 +01:00
Dan Horák
0450181b8e - rebased to 2.15.1 2020-10-29 07:38:46 +00:00
Dan Horák
4a5ecf837b - move mk-s390image to /usr/bin 2020-10-28 08:04:41 +00:00
Dan Horák
1cc3998852 - rebased to 2.15.0 2020-10-27 10:17:25 +00:00
Dan Horák
2ff6f78332 move cio_ignore to core
Seems dracut needs cio_ignore when creating initrd during kernel installation.
2020-10-26 11:16:40 +01:00
Dan Horák
1b35631849 - update scripts for https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh 2020-10-07 15:09:59 +02:00
Dan Horák
2f9ebbc0ab bump release 2020-09-21 17:38:52 +02:00
Dan Horák
83bfc0e7d7 - rebuilt for net-snmp 5.9 2020-09-21 17:38:11 +02:00
Dan Horák
cf1344b04d fix date in changelog 2020-08-26 10:50:18 +02:00
Dan Horák
a895d0c8be - add support for auto LUN scan to zfcpconf.sh (#1552697) 2020-08-26 10:49:18 +02:00
Dan Horák
a9bf2dafeb - rebased to 2.14.0 2020-08-25 09:44:19 +02:00
Fedora Release Engineering
1f19dda30e - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 10:09:21 +00:00
Javier Martinez Canillas
6f6a4deece - add a default entry in zipl.conf if there isn't one present (#1698363)
When a kernel-debug package is installed, it should only be set as default
if DEFAULTDEBUG=yes is set in /etc/sysconfig/kernel. But currently there's
no default field set in /etc/zipl.conf so the implicit order used to sort
boot entries is used.

The debug kernels contains a +debug suffix which makes them be sorted with
more precedence than non-debug kernels by the RPM sorting algorithm:

rpm --eval '%{lua: print(rpm.vercmp("4.18.0-193.el8.s390x+debug", "4.18.0-193.el8.s390x"))}'
1

So using the implicit order when a debug kernel is installed and a default
is not set leads to a wrong behavior.

The zipl kernel-install script attempts to set a default entry if has to,
but only if one is present in the zipl.conf file. Take also into account
the case when there isn't one to avoid using the implicit sorting and not
cover these corner cases like the one with the debug kernel.

Resolves: rhbz#1698363
2020-07-23 09:32:32 +02:00
Dan Horák
b8f75bde3c move more stuff to core
- move {dasd,zfcp}.conf, the installer writes them
- move *_cio_free symlinks, used in initrd
- move dasdinfo, used in initrd
2020-06-11 13:22:27 +02:00
Dan Horák
f9a139cce4 move man pages to core 2020-06-11 11:19:11 +02:00
Dan Horák
383f5e27aa update some texts 2020-06-11 11:15:55 +02:00
Jakub Čajka
0aa4b528e1 Clean up systemd post script macros 2020-06-11 11:11:36 +02:00
Jakub Čajka
365ca29316 - split off core package with basic functionalities and reduced deps from base sub-package 2020-06-11 11:11:36 +02:00
Dan Horák
e477a92045 fix build with rpm 4.16 2020-06-04 09:44:27 +00:00
Dan Horák
6b21143baa - avoid dependency on network-scripts (part of PR #4) 2020-06-01 10:23:32 +02:00
Jakub Čajka
5e82789fe7 - avoid dependency on network-scrips 2020-06-01 10:21:28 +02:00
Dan Horák
1ec03967cb add missing BR 2020-05-11 07:22:29 -04:00
Dan Horák
974303a2f3 - rebased to 2.13.0 2020-05-11 06:46:04 -04:00
Dan Horák
58aa25016f - rebuilt for json-c soname bump 2020-04-22 18:56:19 +02:00
Fedora Release Engineering
78962171af - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 22:43:22 +00:00
Dan Horák
6e980e4fa1 - fix service order after switching to real root file system (#1790496, #1790790) 2020-01-14 13:20:20 +01:00
Dan Horák
920a9af392 - rebased to 2.12.0 2020-01-06 06:22:01 -05:00
Dan Horák
4295214706 - drop src_vipa (#1781683)
- kernel-install: skip BOOT_IMAGE param when copying the cmdline to BLS snippets
2019-12-13 13:32:12 +01:00
Javier Martinez Canillas
3e57fc3074 - skip BOOT_IMAGE param when copying the cmdline to BLS snippets
The bootloaders add a BOOT_IMAGE parameter that is present in the kernel
command line exposed via the /proc/cmdline virtual file. If this param
is added to the kernel cmdline in the BLS snippet, it will be duplicated.

Resolves: #1782321
2019-12-13 12:34:26 +01:00
Dan Horák
594bda140c update changelog 2019-12-02 15:52:42 +01:00
Jan Hlavac
e0e6dde32f kernel-install: fix BLS-related decision logic
In the commit 63205a4dc4c400f75571869d87682c0cdb475830, there was
introduced a change in the decision logic of the 20-zipl-kernel.install
script. Specifically, whether the Boot Loader Specification (BLS) is
used. Instead of just checking the existence of the /sbin/new-kernel-pkg
file, the existence of the /boot/loader/entries directory is also
checked.

More thorough testing revealed that the above commit covers only the
case when a new kernel is added. However, the remaining cases should
also be covered. That means the case when a rescue kernel is added and
the case when some kernel is removed.

Resolves: #1778243
Fixes: #1755899

Signed-off-by: Jan Hlavac <jhlavac@redhat.com>
2019-12-02 15:52:42 +01:00
Javier Martinez Canillas
b3e6ad36b4 - force a BLS config if /boot/loader/entries directory exists (#1755899)
The /usr/lib/kernel/install.d/20-zipl-kernel.install script checks if the
/sbin/new-kernel-pkg script exists to determine whether a BLS config has
to be used or not.

This file should not exist in RHEL8 but it does in some corner cases for
example when doing an in-place upgrade from RHEL7 to RHEL8 since it is
required by the LEAPP tool for the RPM transaction to succeeded.

To cover that, not only check if the /sbin/new-kernel-pkg is not present
but also if the /boot/loader/entries directory exists and use either of
these as a condition to use a BLS configuration.
2019-12-02 15:52:42 +01:00
Javier Martinez Canillas
2cd85a32d2 - remove 00-zipl-prepare.install plugin that is not needed anymore
The kernel-install plugin removed the "${BOOT_DIR_ABS%/*}" directory that
was created unconditionally by the kernel-install script. Since the other
plugins used the existence of this directory as the indication on whether
systemd-boot was used or not.

But now the kernel-install script doesn't unconditionally create this dir
anymore and if $BOOT/$MACHINE_ID exists, so there's no need anymore to do
any cleanup.
2019-12-02 15:52:37 +01:00
Dan Horák
87ca1f4032 update changelog 2019-12-02 13:38:45 +01:00
Dan Horák
cb145202ea apply kernel install/update script fixes from #1600480, #1665060 2019-12-02 13:36:48 +01:00
Dan Horák
0379a19cd4 merge stage3 signing support from RHEL 2019-09-12 14:04:25 +02:00
Dan Horák
18c25ca8a6 - rebased to 2.11.0 2019-09-09 08:05:11 -04:00
Dan Horák
b42105540f - rebased to 2.10.0 2019-08-05 10:22:13 -04:00
Fedora Release Engineering
a8004b6c5b - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 22:35:18 +00:00
Dan Horák
4f95e67dc9 - fix /tmp being deleted when kernel-core is installed in a container (#1726286) (javierm) 2019-07-02 17:07:15 +02:00
Javier Martinez Canillas
5229fe4f01 - fix /tmp being deleted when kernel-core is installed in a container (#1726286)
The kernel-install script created unconditionally a $BOOT_DIR_ABS directory
that was used by the sd-boot bootloader. The kernel-install plugins checked
the existence of that directory to decide whether the BLS snippets would be
created in the path expected by sd-boot or the one expected by zipl.

But the $BOOT_DIR_ABS contains the machine ID that's set in the environment
variable $KERNEL_INSTALL_MACHINE_ID. If there's no machine ID set, then the
$BOOT_DIR_ABS is set to a temporary directory that's removed after all the
kernel-install plugins exit.

The $KERNEL_INSTALL_MACHINE_ID isn't set for example when kernel-install is
executed in a container since there won't be an /etc/machine-id file. This
causes 20-zipl-kernel.install script to wrongly remove the /tmp directory.

So if $KERNEL_INSTALL_MACHINE_ID isn't set, just exit the script since the
BLS snippets can't be installed anyways since their filename also contain
the machine ID.

Also, don't attempt to remove $BOOT_DIR_ABS because kernel-install doesn't
create this directory anymore and instead is created only when sd-boot is
installed.
2019-07-02 17:05:48 +02:00
Igor Gnatenko
81aaf37c09
Rebuild for RPM 4.15
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-11 17:22:19 +02:00
Dan Horák
61130fa91d - rebased to 2.9.0 2019-05-22 08:27:50 -04:00
Dan Horák
1a182b31d3 - dbginfo.sh needs tar (#1705628) 2019-05-02 19:03:28 +02:00
Dan Horák
b1b957aaf0 - fix building zipl with gcc9 (#1687085) 2019-03-09 17:50:42 +01:00
Dan Horák
bd0e3fb9c2 - rebased to 2.8.0 2019-02-18 07:31:45 -05:00
Fedora Release Engineering
6fa2feaf5b - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 14:41:20 +00:00
Igor Gnatenko
378300fbc7 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:48 +01:00
Dan Horák
234b2c55c3 - create cpacfstats group needed by cpacfstatsd 2019-01-28 16:42:02 +01:00
Dan Horák
848b61ef39 switch to using %{buildroot} only 2019-01-10 10:21:37 +01:00
Dan Horák
b45c50cd89 - load protected key support kernel module early on boot 2019-01-10 10:19:08 +01:00
Dan Horák
f39b11e184 drop upstreamed patch 2019-01-04 11:25:06 +01:00
Dan Horák
51e189a385 - rebased to 2.7.1 2019-01-02 08:44:15 -05:00
Dan Horák
95b85f6150 - fix deps for dropped cmsfs subpackage 2018-12-05 14:42:09 +01:00
Dan Horák
a8e0a7dfa6 - drop the original cmsfs subpackage 2018-11-19 10:22:54 -05:00
Dan Horák
b0eb99190c - Make zipl to use the BLS title field as the IPL section name 2018-11-12 17:07:10 +01:00
Dan Horák
01b858f02d - rebased to 2.7.0 2018-10-31 07:21:30 -04:00
Dan Horák
2ff30e744f - don't relink the zkey tools 2018-10-22 15:05:00 +02:00
Peter Jones
c301cb59af Make the blscfg sort order match what grub2 and grubby do.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-10-19 11:56:25 +02:00
Javier Martinez Canillas
2f4b67cd1e Fix kernel-install scripts issues (#1634803)
The 91-zipl.install kernel-install script attempts to execute zipl when a
kernel is installed, but this will fail if there isn't a zipl confg file.

Also, the kernel-install scripts are using ',' as the sed delimiter when
updating the kernel command line options in the BLS fragment file. But it
is valid to have that character in a cmdline so instead use '#' for that.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-10-01 19:19:00 +02:00
20 changed files with 1361 additions and 709 deletions

9
.gitignore vendored
View file

@ -5,10 +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-2.0.0.tar.gz
/s390-tools-2.1.0.tar.gz
/s390-tools-2.2.0.tar.gz
/s390-tools-2.3.0.tar.gz
/s390-tools-2.4.0.tar.gz
/s390-tools-2.5.0.tar.gz
/s390-tools-2.6.0.tar.gz
/s390-tools-*.tar.gz
/s390-tools-*-rust-vendor.tar.xz

View file

@ -1,5 +1,9 @@
#!/bin/bash
if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
exit 0
fi
[[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel
COMMAND="$1"
@ -11,10 +15,8 @@ KERNEL_DIR="${KERNEL_IMAGE%/*}"
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
# Remove it, since for zipl the images are always installed in /boot
rm -rf "${BOOT_DIR_ABS%/*}"
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"
@ -52,27 +54,31 @@ EOF
case "$COMMAND" in
add)
if [[ "${KERNEL_DIR}" != "/boot" ]]; then
# rename to match the name used in the pseudo-BLS snippet above
cp --remove-destination --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}"
command -v restorecon &>/dev/null && \
restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}"
for i in \
"$KERNEL_IMAGE" \
"$KERNEL_DIR"/System.map \
"$KERNEL_DIR"/config \
"$KERNEL_DIR"/zImage.stub
do
[[ -e "$i" ]] || continue
cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
cp --preserve=timestamps -T "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
command -v restorecon &>/dev/null && \
restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}"
done
# hmac is .vmlinuz-<version>.hmac so needs a special treatment
i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
if [[ -e "$i" ]]; then
cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
cp --preserve=timestamps "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
command -v restorecon &>/dev/null && \
restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
fi
fi
if [[ ! -f /sbin/new-kernel-pkg ]]; then
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
@ -81,43 +87,57 @@ case "$COMMAND" in
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
[[ "${i#initrd=*}" != "$i" || "${i#BOOT_IMAGE=*}" != "$i" ]] && continue
BOOT_OPTIONS+=("$i")
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
[[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
if [[ -f "${KERNEL_DIR}/bls.conf" ]]; then
cp -aT "${KERNEL_DIR}/bls.conf" "${BLS_TARGET}" || exit $?
cp --preserve=timestamps -T "${KERNEL_DIR}/bls.conf" "${BLS_TARGET}" || exit $?
sed -i -e "s,^linux.*,linux /boot/vmlinuz-${KERNEL_VERSION},g" "${BLS_TARGET}"
sed -i -e "s,^initrd.*,initrd /boot/initramfs-${KERNEL_VERSION}.img,g" "${BLS_TARGET}"
sed -i -e "s,^options.*,options ${BOOT_OPTIONS[*]},g" "${BLS_TARGET}"
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
ARCH="$(uname -m)"
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/\.${ARCH}/-debug.${ARCH}/")"
cp -aT "${BLS_TARGET}" "${BLS_DEBUG}"
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/\.${ARCH}/-debug.${ARCH}/")"
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}"
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
@ -128,10 +148,21 @@ case "$COMMAND" in
exit 77
;;
remove)
if [[ ! -f /sbin/new-kernel-pkg ]]; then
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
ARCH="$(uname -m)"
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/\.${ARCH}/-debug.${ARCH}/")"
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

View file

@ -15,7 +15,7 @@ BLS_DIR="/boot/loader/entries"
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
case "$COMMAND" in
add)
if [[ ! -f /sbin/new-kernel-pkg ]]; then
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
@ -29,17 +29,11 @@ case "$COMMAND" in
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
BLS_RESCUE="${BLS_DIR}/${MACHINE_ID}-0-rescue.conf"
if [[ -f "${BLS_RESCUE}" ]] && grep -q '^options.*$kernelopts' "${BLS_RESCUE}"; then
sed -i -e "s,^linux.*,linux /boot/vmlinuz-0-rescue-${MACHINE_ID},g" "${BLS_RESCUE}"
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}"
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}#g" "${BLS_RESCUE}"
fi
fi
;;

View file

@ -1,5 +1,9 @@
#!/bin/bash
if [[ ! -f /etc/zipl.conf ]]; then
exit 0
fi
COMMAND="$1"
case "$COMMAND" in

View file

@ -1,13 +1,4 @@
ACTION!="add|change", GOTO="ccw_end"
ACTION!="add|bind|change", GOTO="ccw_end"
SUBSYSTEM!="ccw", GOTO="ccw_end"
ATTRS{cutype}=="1731/01", RUN+="ccw_init"
ATTRS{cutype}=="1731/02", RUN+="ccw_init"
ATTRS{cutype}=="1731/05", RUN+="ccw_init"
ATTRS{cutype}=="1731/06", RUN+="ccw_init"
ATTRS{cutype}=="3088/01", RUN+="ccw_init"
ATTRS{cutype}=="3088/08", RUN+="ccw_init"
ATTRS{cutype}=="3088/60", RUN+="ccw_init"
ATTRS{cutype}=="3088/61", RUN+="ccw_init"
ATTRS{cutype}=="3088/1e", RUN+="ccw_init"
ATTRS{cutype}=="3088/1f", RUN+="ccw_init"
DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init"
LABEL="ccw_end"

View file

@ -24,6 +24,25 @@ 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
@ -49,14 +68,19 @@ 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
exit 1
CONFIG_FILE=$(get_config_by_subchannel_nm $CHANNEL)
if [ -n "$CONFIG_FILE" ]; then
NETTYPE=$(sed -nr "/^\[ethernet\]/ { :l /^s390-nettype[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE)
SUBCHANNELS=$(sed -nr "/^\[ethernet\]/ { :l /^s390-subchannels[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE | sed -e "s/;/,/g" -e "s/,$//")
LAYER2=$(sed -nr "/^\[ethernet-s390-options\]/ { :l /^layer2[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE)
else
exit 1
fi
fi
else
echo "Unknown mode=$MODE"

View file

@ -1,12 +0,0 @@
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"

View file

@ -1,31 +0,0 @@
From 25442f958a12b428b7d063b927ac48965dcd8164 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
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

View file

@ -1,11 +0,0 @@
--- 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++)
{

View file

@ -306,6 +306,14 @@ if [ $MODE_ZNET ]; then
eval "$line"
free_device $SUBCHANNELS
done
for line in $(LANG=C grep -E -i -h \
"^s390-subchannels=([0-9]\.[0-9]\.[a-f0-9]+;){2,3}$" \
$( (ls /etc/NetworkManager/system-connections/*.nmconnection 2> /dev/null || echo "__no_config_file") | \
LC_ALL=C sed -e "$__sed_discard_ignored_files") 2> /dev/null)
do
SUBCHANNELS="$(echo $line | sed -e "s/s390-subchannels=//" -e "s/;/,/g")"
free_device $SUBCHANNELS
done
fi
[ -z "$ALL_DEVICES" ] && exit 0

View file

@ -1,13 +1,12 @@
[Unit]
Description=Free all devices on startup
DefaultDependencies=no
Before=sysinit.target
Before=sysinit.target systemd-udev-trigger.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/device_cio_free
StandardOutput=syslog
[Install]
WantedBy=sysinit.target

9
rpminspect.yaml Normal file
View file

@ -0,0 +1,9 @@
---
pathmigration:
excluded_paths:
- /lib/s390-tools
badfuncs:
allowed:
/usr/bin/qethqoat:
- inet_ntoa

View file

@ -1,241 +0,0 @@
From 1f8c561494e6bbecaaa02ff9cd1b2b9216da59df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 31 Aug 2018 10:07:35 +0200
Subject: [PATCH 1/4] drop LOADLIBES variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Remove depreciated LOADLIBES variable from the Makefile rules, LDLIBS serves
the same purpose these days.
Signed-off-by: Dan Horák <dan@danny.cz>
---
common.mak | 2 +-
cpuplugd/Makefile | 2 +-
ipl_tools/Makefile | 2 +-
vmconvert/Makefile | 2 +-
vmur/Makefile | 2 +-
ziomon/Makefile | 10 +++++-----
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/common.mak b/common.mak
index 7d11b10..6029687 100644
--- a/common.mak
+++ b/common.mak
@@ -240,7 +240,7 @@ endif
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
%: %.o
- $(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
%.a:
$(AR) rcs $@ $^
diff --git a/cpuplugd/Makefile b/cpuplugd/Makefile
index a9a49ab..916638d 100644
--- a/cpuplugd/Makefile
+++ b/cpuplugd/Makefile
@@ -7,7 +7,7 @@ LDLIBS += -lm
OBJECTS = daemon.o cpu.o info.o terms.o config.o main.o getopt.o mem.o
cpuplugd: $(OBJECTS)
- $(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
clean:
rm -f cpuplugd $(OBJECTS)
diff --git a/ipl_tools/Makefile b/ipl_tools/Makefile
index 128ec3e..506d5cd 100644
--- a/ipl_tools/Makefile
+++ b/ipl_tools/Makefile
@@ -6,7 +6,7 @@ objects = main.o ccw.o fcp.o system.o shutdown.o \
cmd_lsshut.o cmd_chshut.o cmd_lsreipl.o cmd_chreipl.o proc.o
chreipl: $(objects)
- $(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
lsreipl:
ln -sf chreipl lsreipl
diff --git a/vmconvert/Makefile b/vmconvert/Makefile
index 4d0216c..380eb19 100644
--- a/vmconvert/Makefile
+++ b/vmconvert/Makefile
@@ -9,7 +9,7 @@ libs = $(rootdir)/libvmdump/libvmdump.a
objects = vmconvert.o
vmconvert: $(objects) $(libs)
- $(LINKXX) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINKXX) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
install: all
$(INSTALL) -d -m 755 $(DESTDIR)$(USRBINDIR) $(DESTDIR)$(MANDIR)/man1
diff --git a/vmur/Makefile b/vmur/Makefile
index 1a6bddc..2c1c2d5 100644
--- a/vmur/Makefile
+++ b/vmur/Makefile
@@ -11,7 +11,7 @@ libs = $(rootdir)/libvmdump/libvmdump.a \
objects = vmur.o
vmur: $(objects) $(libs)
- $(LINKXX) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINKXX) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
install: all
$(INSTALL) -d -m 755 $(DESTDIR)$(USRSBINDIR) $(DESTDIR)$(MANDIR)/man8
diff --git a/ziomon/Makefile b/ziomon/Makefile
index 778401b..61c2399 100644
--- a/ziomon/Makefile
+++ b/ziomon/Makefile
@@ -12,33 +12,33 @@ ziomon_mgr_main.o: ziomon_mgr.c
ziomon_mgr: LDLIBS += -lm
ziomon_mgr: ziomon_dacc.o ziomon_util.o ziomon_mgr_main.o ziomon_tools.o \
ziomon_zfcpdd.o ziomon_msg_tools.o
- $(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
ziomon_util_main.o: ziomon_util.c ziomon_util.h
$(CC) -DWITH_MAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) -c $< -o $@
ziomon_util: LDLIBS += -lm
ziomon_util: ziomon_util_main.o ziomon_tools.o
- $(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
ziomon_zfcpdd_main.o: ziomon_zfcpdd.c ziomon_zfcpdd.h
$(CC) -DWITH_MAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) -c $< -o $@
ziomon_zfcpdd: LDLIBS += -lm -lrt -lpthread
ziomon_zfcpdd: ziomon_zfcpdd_main.o ziomon_tools.o
- $(LINK) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
ziorep_traffic: ziorep_traffic.o ziorep_framer.o ziorep_frameset.o \
ziorep_printers.o ziomon_dacc.o ziomon_util.o \
ziomon_msg_tools.o ziomon_tools.o ziomon_zfcpdd.o \
ziorep_cfgreader.o ziorep_collapser.o ziorep_utils.o \
ziorep_filters.o
- $(LINKXX) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINKXX) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
ziorep_utilization: ziorep_utilization.o ziorep_framer.o ziorep_frameset.o \
ziorep_printers.o ziomon_dacc.o ziomon_util.o \
ziomon_msg_tools.o ziomon_tools.o ziomon_zfcpdd.o \
ziorep_cfgreader.o ziorep_collapser.o ziorep_utils.o \
ziorep_filters.o
- $(LINKXX) $(ALL_LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
+ $(LINKXX) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
install: all
$(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
--
2.17.1
From fb5268e46eac79cfdf683ddfff6d685df6008b38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 31 Aug 2018 10:13:38 +0200
Subject: [PATCH 2/4] zkey: Drop redundant include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dan Horák <dan@danny.cz>
---
zkey/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/zkey/Makefile b/zkey/Makefile
index 68f35cf..725cb3b 100644
--- a/zkey/Makefile
+++ b/zkey/Makefile
@@ -22,7 +22,6 @@ else
INSTALL_TARGETS += zkey-cryptsetup-skip-cryptsetup2
endif
-CPPFLAGS += -I../include
LIBS = $(rootdir)/libutil/libutil.a
detect-libcryptsetup.h:
--
2.17.1
From 577cbdaee51c0104465e4b77e5d931f8232d92e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 31 Aug 2018 10:17:07 +0200
Subject: [PATCH 3/4] zkey: Be consistent when refering to libutil.a
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dan Horák <dan@danny.cz>
---
zkey/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/zkey/Makefile b/zkey/Makefile
index 725cb3b..7e2047a 100644
--- a/zkey/Makefile
+++ b/zkey/Makefile
@@ -22,7 +22,7 @@ else
INSTALL_TARGETS += zkey-cryptsetup-skip-cryptsetup2
endif
-LIBS = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a
detect-libcryptsetup.h:
echo "#include <libcryptsetup.h>" > detect-libcryptsetup.h
@@ -69,10 +69,10 @@ keystore.o: keystore.c keystore.h properties.h
zkey-cryptsetup.o: check-dep-zkey-cryptsetup zkey-cryptsetup.c pkey.h misc.h
zkey: LDLIBS = -ldl -lcrypto
-zkey: zkey.o pkey.o properties.o keystore.o $(LIBS)
+zkey: zkey.o pkey.o properties.o keystore.o $(libs)
zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c
-zkey-cryptsetup: zkey-cryptsetup.o pkey.o $(LIBS)
+zkey-cryptsetup: zkey-cryptsetup.o pkey.o $(libs)
install-common:
$(INSTALL) -d -m 755 $(DESTDIR)$(USRBINDIR)
--
2.17.1
From b474b9d1a567e132f79c2a17ebbc3b56794e4797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 31 Aug 2018 04:29:39 -0400
Subject: [PATCH 4/4] zkey: Be explicit about linking the tools
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
I've met cases when the make's default rule for linking was used instead omitting
the ALL_LDFLAGS variable. The linking rule from common.mak is defined for linking
*.o files only, here we have libutil.a too.
Signed-off-by: Dan Horák <dan@danny.cz>
---
zkey/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/zkey/Makefile b/zkey/Makefile
index 7e2047a..901ddd4 100644
--- a/zkey/Makefile
+++ b/zkey/Makefile
@@ -70,9 +70,11 @@ zkey-cryptsetup.o: check-dep-zkey-cryptsetup zkey-cryptsetup.c pkey.h misc.h
zkey: LDLIBS = -ldl -lcrypto
zkey: zkey.o pkey.o properties.o keystore.o $(libs)
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c
zkey-cryptsetup: zkey-cryptsetup.o pkey.o $(libs)
+ $(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
install-common:
$(INSTALL) -d -m 755 $(DESTDIR)$(USRBINDIR)
--
2.17.1

View file

@ -0,0 +1,348 @@
From b2daaa34776ba6afec879e362378f6f7563590a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
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 <pjones@redhat.com>
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 <pjones@redhat.com>
Signed-off-by: Dan Horák <dan@danny.cz>
---
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 <rpm/rpmlib.h>
+
#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

View file

@ -1,106 +0,0 @@
From 0318dfbc726a82ce1e9309e55186f3c4faae72f1 Mon Sep 17 00:00:00 2001
From: Eric Sandeen <sandeen@sandeen.net>
Date: Wed, 12 Sep 2018 09:40:22 -0500
Subject: [PATCH] zipl: use FIEMAP mapping ioctl if it exists
zipl currently uses the FIBMAP ioctl to map blocks for the bootloader;
on XFS, if FIBMAP is requested on a reflinked file, it will fail -
and FIBMAP returns 0 in this case, which is indistinguishable from a
hole. This causes boot to fail because the file is not mapped.
We can use the FIEMAP ioctl instead, which is able to map reflinked
files. While FIEMAP is able to map entire extents at once, here we
simply use it to obtain the mapping block-by-block so that it fits
in with the current FIBMAP calls.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
zipl/src/disk.c | 57 +++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 53 insertions(+), 4 deletions(-)
diff --git a/zipl/src/disk.c b/zipl/src/disk.c
index 0d8e7796..43092bf1 100644
--- a/zipl/src/disk.c
+++ b/zipl/src/disk.c
@@ -21,6 +21,8 @@
#include <sys/sysmacros.h>
#include <sys/vfs.h>
#include <unistd.h>
+#include <linux/fs.h>
+#include <linux/fiemap.h>
#include "lib/util_proc.h"
@@ -550,8 +552,12 @@ disk_get_blocknum(int fd, int fd_is_basedisk, blocknum_t logical,
{
struct statfs buf;
blocknum_t phy_per_fs;
- int mapped;
+ blocknum_t mapped;
+ int block;
int subblock;
+ int fiemap_size;
+ int map_offset;
+ struct fiemap *fiemap;
/* No file system: partition or raw disk */
if (info->fs_block_size == -1) {
@@ -576,12 +582,55 @@ disk_get_blocknum(int fd, int fd_is_basedisk, blocknum_t logical,
}
/* Get mapping in file system blocks */
phy_per_fs = info->fs_block_size / info->phy_block_size;
- mapped = logical / phy_per_fs;
subblock = logical % phy_per_fs;
- if (ioctl(fd, FIBMAP, &mapped)) {
- error_reason("Could not get file mapping");
+
+ /* First try FIEMAP, more complicated to set up */
+ fiemap_size = sizeof(struct fiemap) + sizeof(struct fiemap_extent);
+
+ fiemap = misc_malloc(fiemap_size);
+ if (!fiemap)
return -1;
+ memset(fiemap, 0, fiemap_size);
+
+ fiemap->fm_extent_count = 1;
+ fiemap->fm_flags = FIEMAP_FLAG_SYNC;
+ /* fm_start, fm_length in bytes; logical is in physical block units */
+ fiemap->fm_start = logical * info->phy_block_size;
+ fiemap->fm_length = info->phy_block_size;
+
+ if (ioctl(fd, FS_IOC_FIEMAP, (unsigned long)fiemap)) {
+ /* FIEMAP failed, fall back to FIBMAP */
+ block = logical / phy_per_fs;
+ if (ioctl(fd, FIBMAP, &block)) {
+ error_reason("Could not get file mapping");
+ free(fiemap);
+ return -1;
+ }
+ mapped = block;
+ } else {
+ if (fiemap->fm_mapped_extents) {
+ if (fiemap->fm_extents[0].fe_flags &
+ FIEMAP_EXTENT_ENCODED) {
+ error_reason("File mapping is encoded");
+ free(fiemap);
+ return -1;
+ }
+ /*
+ * returned extent may start prior to our request
+ */
+ map_offset = fiemap->fm_start -
+ fiemap->fm_extents[0].fe_logical;
+ mapped = fiemap->fm_extents[0].fe_physical +
+ map_offset;
+ /* set mapped to fs block units */
+ mapped = mapped / info->fs_block_size;
+ } else {
+ mapped = 0;
+ }
}
+
+ free(fiemap);
+
if (mapped == 0) {
/* This is a hole in the file */
*physical = 0;

View file

@ -61,10 +61,10 @@ index 871935c783f..d8d5eca5867 100755
;;
--)
shift
diff --git a/scripts/zipl-switch-to-blscfg.1 b/scripts/zipl-switch-to-blscfg.1
diff --git a/scripts/zipl-switch-to-blscfg.8 b/scripts/zipl-switch-to-blscfg.8
index 6bd14d00d14..71b904ffd1c 100644
--- a/scripts/zipl-switch-to-blscfg.1
+++ b/scripts/zipl-switch-to-blscfg.1
--- a/scripts/zipl-switch-to-blscfg.8
+++ b/scripts/zipl-switch-to-blscfg.8
@@ -37,9 +37,9 @@ The DIRECTORY where the BLS fragments will be generated. The directory is create
The FILE used for zipl configuration file, defaults to /etc/zipl.conf.

View file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,2 @@
SHA512 (cmsfs-1.1.8c.tar.gz) = 2ba5687d378fdd9871283728e81f1399047e74f9bba3936726eda11a978fe6ced1a300f15acb871d5daa26e61069d89767c753cf584f2731f5e99985db96aef0
SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7
SHA512 (s390-tools-2.6.0.tar.gz) = 0f35eae85896c4fbc784d0e0549c7856741e7d8ba979f2897c6f546987485d19019dac36b9443d2ff10f8da3128de2203c7526fac480756388fc61380a93536e
SHA512 (s390-tools-2.40.0.tar.gz) = 1943429581b280bf9ea370da3700a234d509837cb45b2354cdf79b38db87d2183010d18d9132defd77b9d8e11b7e002c447ffd7c912e20a50da4cb6877758c0e
SHA512 (s390-tools-2.40.0-rust-vendor.tar.xz) = fd1894c4e950a3c51054432731a3aeef4318e794aa4af2dc5fed31da16dce2020f014a64241e44766fb40b0fd6c1ac5943366e38dcfebf264875220ecf1285b5

View file

@ -2,10 +2,12 @@
# config file syntax:
# deviceno WWPN FCPLUN
# deviceno # allowed when auto LUN scan is enabled and port is in NPIV mode
#
# Example:
# 0.0.4000 0x5005076300C213e9 0x5022000000000000
# 0.0.4001 0x5005076300c213e9 0x5023000000000000
# 0.0.5000
#
#
# manual setup:
@ -21,12 +23,20 @@
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
return
exit 1
fi
sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do
case $line in
@ -34,6 +44,17 @@ if [ -f "$CONFIG" ]; then
*)
[ -z "$line" ] && continue
set $line
if [ $# -eq 1 ]; then
DEVICE=${1##*0x}
if [ `cat /sys/module/zfcp/parameters/allow_lun_scan` = "Y" ]; then
set_online ${DEVICE}
grep -q NPIV /sys/bus/ccw/devices/${DEVICE}/host*/fc_host/host*/port_type || \
echo "Error: Only device ID (${DEVICE}) given, but port not in NPIV mode"
else
echo "Error: Only device ID (${DEVICE}) given, but LUN scan is disabled for the zfcp module"
fi
continue
fi
if [ $# -eq 5 ]; then
DEVICE=$1
SCSIID=$2
@ -46,11 +67,11 @@ if [ -f "$CONFIG" ]; then
WWPN=$2
FCPLUN=$3
fi
[ `cat /sys/bus/ccw/drivers/zfcp/${DEVICE}/online` = "0" ] \
&& echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online
set_online ${DEVICE}
[ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/${FCPLUN} ] \
&& echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/unit_add
;;
esac
done
fi
exit 0