I had to update the bug description, due to a finding in the test build.
The original version identified only that dracut-network is Architecture: all
so dh_install never selects an .install.s390x file for it, and proposed listing
the modules in the architecture-independent debian/dracut-network.install
instead.
That proposed fix does not work, because the upstream Makefile removes
the s390 modules from the staging tree unless ARCH is s390x, so on the
build architecture of an arch-independent package the files are not
there and dh_install aborts with "missing files".
Fixed it to add them to debian/dracut-core.install.s390x, which belongs
to an Architecture: any package and already carries the other s390-only
modules.
** Description changed:
- The dracut (s390x-specific) modules 68cms, 74zfcp and 74znet are present
- in the upstream source, but do not end up in any binary package.
-
- As a result rd.znet and rd.zfcp have no effect on s390x, and no z/VM CMS
- configuration file can be read.
+ The dracut (s390x-specific) modules 68cms, 74zfcp and 74znet are present in
the upstream source, but do not end up in any binary package.
+ As a result rd.znet and rd.zfcp have no effect on s390x, and no z/VM CMS
configuration file can be read.
The three modules are listed in debian/dracut-network.install.s390x, which is
a copy of debian/dracut-network.install:
usr/lib/dracut/modules.d/68cms
usr/lib/dracut/modules.d/74zfcp
usr/lib/dracut/modules.d/74znet
- However, dracut-network is "Architecture: all". dh_install selects
- debian/<package>.install.<arch> based on the build architecture, and an
- architecture-independent binary is built only once, on a single
- architecture. The .install.s390x file is therefore never selected, and
- the three modules are dropped on every architecture, s390x included.
+ However, that file can never take effect, because dracut-network is
+ "Architecture: all". dh_install selects debian/<package>.install.<arch>
+ based on the build architecture, and an architecture-independent binary
+ is built only once, on a single architecture. The .install.s390x file is
+ therefore never selected, and the three modules are dropped on every
+ architecture, s390x included. And on that build architecture the files
+ are not even there.
- By contrast dracut-core is "Architecture: any", so its debian/dracut-
- core.install.s390x is used on the s390x build and the modules listed
- there, 74dasd and 74dasd_mod, are shipped correctly.
+ The upstream Makefile install target removes the s390 modules unless it is
building on s390x:
+ ifneq ($(ARCH),s390x)
+ for f in cio_ignore cms dasd dasd_mod dcssblk zfcp zipl znet; do \
+ rm -r $(DESTDIR)$(pkglibdir)/modules.d/[0-9][0-9]${f}; \
+ done
+ else
+ rm -r $(DESTDIR)$(pkglibdir)/modules.d/[0-9][0-9]warpclock
+ endif
+ and debian/rules sets ARCH from DEB_HOST_ARCH_CPU. So on the build
architecture of an arch-independent package the modules are already deleted
from debian/tmp before dh_install even runs. No .install file in an
"Architecture: all" package can ship them.
- That smells like the dracut-network variant was copied from the dracut-
- core one without noticing the different Architecture field.
+ By contrast dracut-core is "Architecture: any", so its
debian/dracut-core.install.s390x is used on the s390x build and the modules
listed there - 69cio_ignore, 73zipl, 74dasd, 74dasd_mod and 74dcssblk - are
shipped correctly. The three missing ones are exactly those that ended up in
the dracut-network list instead.
+ That smells like the dracut-network variant was copied from the dracut-core
one without noticing the different Architecture field.
# check:
$ dpkg-deb -c dracut-network_112-7_all.deb | grep -cE 'znet|zfcp|68cms'
0
-
There is no architecture-specific build of 'dracut-network'.
For comparison, the dracut-core modules do arrive:
$ dpkg-deb -c dracut-core_112-7_s390x.deb | grep -oE '74dasd[a-z_]*'
74dasd
74dasd_mod
-
- Upstream carries all of them: dracut-ng tag 112 contains 68cms, 74dasd,
- 74dasd_mod, 74zfcp and 74znet under modules.d/.
+ Upstream carries all of them: dracut-ng tag 112 contains 68cms, 74dasd,
74dasd_mod, 74zfcp and 74znet under modules.d/.
# impact:
On s390x with a dracut-generated initramfs:
-
- rd.znet= has no effect, so channel-attached network devices, including
QETH/OSA and HiperSockets, cannot be configured from the kernel cmd-line. On a
system whose only network path needs a non-default relative port or layer, the
device cannot be brought up at all.
- rd.zfcp= has no effect, so an FCP LUN needed early cannot be activated from
the kernel command line.
- 68cms is absent, so a z/VM CMS configuration file cannot be read.
-
- This grows in importance as the Ubuntu installer moves to dracut, and it
- currently blocks the use of the established cross-distribution mechanism
- for early IBM Z device configuration (see LP: #2170669)
+ This grows in importance as the Ubuntu installer moves to dracut, and it
currently blocks the use of the established cross-distribution mechanism for
early IBM Z device configuration (see LP: #2170669)
# fix
- List the three modules in the architecture-independent
d/dracut-network.install, and drop d/dracut-network.install.s390x entirely.
-
- Shipping them on all architectures is harmless, because each one gates on the
architecture in its own check().
- For example modules.d/74znet/module-setup.sh:
- check() {
- [ "$DRACUT_ARCH" = "s390" ] || [ "$DRACUT_ARCH" = "s390x" ] ||
return 1
- require_binaries grep sed seq readlink chzdev || return 1
- return 0
- }
-
- For 68cms and 74zfcp things are similar, as is 74dasd in dracut-core.
- So dracut will therefore never include any of them in a non-s390 initramfs,
and the only cost elsewhere is a few kilobytes of shell script on disk.
+ Add the three modules to d/dracut-core.install.s390x, and drop
d/dracut-network.install.s390x entirely.
+ dracut-core is "Architecture: any", so it is built on s390x with ARCH=s390x,
the Makefile keeps the modules there, and the .install.s390x file is actually
selected.
+ That file already carries the other s390-only modules, so afterwards it
matches the Makefile's s390 set exactly: cio_ignore, cms, dasd, dasd_mod,
dcssblk, zfcp, zipl, znet.
+ d/dracut-network.install stays untouched.
+ The three then ship in dracut-core rather than dracut-network, which is a
slight layering oddity for network modules, but it follows what this package
already does with the other architecture-specific modules.
+ Their module dependencies stay satisfiable: 74znet depends only on bash,
74zfcp declares none, and 68cms depends on znet, which moves along with it.
# alternatives:
-
- - Making dracut-network "Architecture: any" would work, but multiplies
- the binary across every architecture for three small shell modules.
-
- - Moving the modules into debian/dracut-core.install.s390x would work,
- since that package is Architecture: any, but places network modules in
- the core package.
-
- And this btw. would also affect Debian, since we sync from Debian (with
- no Ubuntu delta) - so in prep. that should probably also be forwarded to
- Debian.
+ - Listing the three in the architecture-independent d/dracut-network.install
does not work. On the build architecture of an arch-independent package the
files have already been removed, so dh_install just aborts with "missing files,
aborting".
+ - Making dracut-network "Architecture: any" would work, but multiplies the
binary across every architecture for three small shell modules.
+ And this btw. would also affect Debian, since we sync from Debian (with no
Ubuntu delta) - so in prep. that should probably also be forwarded to Debian.
# verification:
+ $ dpkg-deb -c dracut-core_<fixed-version>_s390x.deb | grep -E
'modules.d/(68cms|74zfcp|74znet)'
- dpkg-deb -c dracut-network_<fixed-version>_all.deb | grep -E
- 'modules.d/(68cms|74zfcp|74znet)'
+ Confirmed with a test build in ppa:fheimes/lp2171808:
+ dracut-core on s390x goes from 118 to 121 modules, the three added ones being
exactly 68cms, 74zfcp and 74znet, and 74znet/parse-ccw.sh - the rd.znet parser
- is now shipped.
On an s390x system, rd.znet= with non-default values actually takes effect.
However, testing with portno=0 or layer2=1 proves nothing, since those are
already the defaults.
debdiff against 112-7 is attached
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171808
Title:
s390x dracut modules 68cms, 74zfcp and 74znet are not shipped
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2171808/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs