Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1509936 - Disable python-dmidecode build for s390x
Summary: Disable python-dmidecode build for s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-dmidecode
Version: 7.4-Alt
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: lijiang
QA Contact: Mike Gahagan
URL:
Whiteboard:
Depends On: 1617942
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-06 11:41 UTC by Lukas Doktor
Modified: 2019-02-15 03:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 11:48:42 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3314 None None None 2018-10-30 11:48:49 UTC

Description Lukas Doktor 2017-11-06 11:41:39 UTC
Description of problem:
The `dmidecode` for s390x does not exists, but this module is available for python, which makes no sense as it actually can't get any data.

Version-Release number of selected component (if applicable):
python-dmidecode-3.12.2-1.el7.s390x

How reproducible:
Always

Steps to Reproduce:
>>> import dmidecode
>>> dmidecode.bios()


Actual results:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: [src/dmidecodemodule.c:328] Error decoding DMI data

Expected results:
dmidecode should not be available to install (or it should behave correctly)

Additional info:

Comment 2 lijiang 2018-06-22 07:33:17 UTC
[root@ibm-z-10 ~]# dmesg|grep "/dev/mem"
[  739.354298] Program python tried to access /dev/mem between f0000->100000.
[  744.269732] Program python tried to access /dev/mem between f0000->100000.

The python-dmidecode will access "/dev/mem", looks like it has no permission to access "/dev/mem", furthermore, we can also see some warnings about this.

** COLLECTED WARNINGS **
/dev/mem (mmap): Operation not permitted
No SMBIOS nor DMI entry point found, sorry.
/dev/mem (mmap): Operation not permitted
** END OF WARNINGS **

This warning should probably related to the kernel enables the option "CONFIG_STRICT_DEVMEM".

I'm not sure if another packages will depend on the python-dmidecode. That could need to talk about disabling build for s390x whether it is reasonable.
By the way, upstream hasn't maintained this package.

Thanks.

Comment 3 Mike Gahagan 2018-06-22 12:49:51 UTC
x86 is about the only arch left where /dev/mem is readable in this manner.

Comment 4 lijiang 2018-06-28 08:24:57 UTC
(In reply to Mike Gahagan from comment #3)
> x86 is about the only arch left where /dev/mem is readable in this manner.

Sure, we previously disabled the kernel option(CONFIG_STRICT_DEVMEM), it doesn't have WARNINGS, but it returns the null string, in fact, that might make no sense.

Comment 5 Lukas Doktor 2018-07-12 12:56:47 UTC
(In reply to lijiang from comment #2)
> [root@ibm-z-10 ~]# dmesg|grep "/dev/mem"
> [  739.354298] Program python tried to access /dev/mem between f0000->100000.
> [  744.269732] Program python tried to access /dev/mem between f0000->100000.
> 
> The python-dmidecode will access "/dev/mem", looks like it has no permission
> to access "/dev/mem", furthermore, we can also see some warnings about this.
> 
> ** COLLECTED WARNINGS **
> /dev/mem (mmap): Operation not permitted
> No SMBIOS nor DMI entry point found, sorry.
> /dev/mem (mmap): Operation not permitted
> ** END OF WARNINGS **
> 
> This warning should probably related to the kernel enables the option
> "CONFIG_STRICT_DEVMEM".
> 
> I'm not sure if another packages will depend on the python-dmidecode. That
> could need to talk about disabling build for s390x whether it is reasonable.
> By the way, upstream hasn't maintained this package.
> 
> Thanks.

I'm not sure what info should I provide. I'm not aware of any program depending on python-dmesg but if there was it should be fixed not to use it as it won't work anyway.

Comment 6 lijiang 2018-07-24 09:41:41 UTC
built rpm package:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17337993

Comment 8 Mike Gahagan 2018-07-26 15:40:29 UTC
I've confirmed there are no s/390x builds of python-dmidecode-3.12.2-3.el7 there are s/390 builds of it however and it probably makes sense to disable those. Note also that alpha 1.2 has python-dmidecode-3.12.2-2.el7.s390x.rpm so as long as we bump up the version of python-dmidecode in future composes we should be fine.

Marking Verified based on the 3.12.2-3.el7 version.

Comment 9 Jan Stodola 2018-08-03 17:22:28 UTC
Since there is no dmidecode for s390, I suppose python-dmidecode should not be built for s390 either.

Actually, python-dmidecode.s390 (and it's dependency libxml2-python.s390) got pulled into compose RHEL-7.6-20180802.2 instead of python-dmidecode.s390x as a dependency of rhn-client-tools - is this what we want?

Since rhn-client-tools requires python-dmidecode, there would be a missing dependency on s390x if there is no python-dmidecode for s390/s390x.
Adding tkasparek (rhn-client-tools maintainer) to CC to be aware of this possible dependency issue.

Moving this bug back to ASSIGNED to clarify what will happen with s390 build of python-dmidecode.

Comment 10 Tomáš Kašpárek 2018-08-06 07:59:09 UTC
Satellite 5 (and thus rhn-client-tools) does NOT support RHEL ALT, as long as these changes end up in regular RHEL 7 we're okay in this.
If these changes end up in both versions of RHEL 7 (regular and ALT), let me know and we should work together on some solution for this.

However I was not able to even run reproducer from the OP.
>>> import dmidecode
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/dmidecode.py", line 29, in <module>
    from dmidecodemod import *
ImportError: /usr/lib/python2.7/site-packages/dmidecodemod.so: wrong ELF class: ELFCLASS32

[root@ibm-z-35 ~]# uname -a
Linux ibm-z-35.rhts.eng.bos.redhat.com 3.10.0-931.el7.s390x #1 SMP Tue Jul 31 17:55:54 EDT 2018 s390x s390x s390x GNU/Linux
[root@ibm-z-35 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.6 Beta (Maipo)

Looking into the issue more.

Comment 11 Jan Stodola 2018-08-06 08:26:08 UTC
RHEL and RHEL-ALT contain mostly the same packages, so this change affects both RHEL and RHEL-ALT s390x composes.

Comment 12 Tomáš Kašpárek 2018-08-06 11:17:28 UTC
(In reply to Tomáš Kašpárek from comment #10)
> Satellite 5 (and thus rhn-client-tools) does NOT support RHEL ALT, as long
> as these changes end up in regular RHEL 7 we're okay in this.

I meant 'as long as these changes DOES NOT end up', sorry for confusion :(

Comment 13 lijiang 2018-08-07 00:55:26 UTC
Hi, Tomáš Kašpárek
Do you have a plan to remove the dependency for the rhn-client-tools? Actually, the python-dmidecode can't get the any data on s390x.

Comment 14 Tomas Lestach 2018-08-14 13:17:26 UTC
If there's a way how to stop requiring python-dmidecode (and to keep the rhn-client-tools a noarch package), I'm ok to proceed with this BZ.

Background info:
dmidecode is actually missing not only in RHEL8, but also in RHEL7, RHEL6 and RHEL5 for the s390x architecture.

Comment 15 Lukas Doktor 2018-08-15 09:48:34 UTC
Note that this is not only s390x problem, for example here is bz related to aarch64 https://bugzilla.redhat.com/show_bug.cgi?id=1509938 and (don't remember where) but I heard dmidecode should only work on x86_64. It'd be nice to get rid of this dependency.

Comment 16 Tomas Lestach 2018-08-15 13:28:31 UTC
(In reply to Lukas Doktor from comment #15)
> Note that this is not only s390x problem, for example here is bz related to
> aarch64 ...

Sure, it's just I'm talking for Satellite 5 product and aarch64 is not relevant for us ... while s390x is ...  a lot. :-)

Comment 17 Dave Young 2018-08-16 08:45:09 UTC
There is another bug, Lianbo mentioned python-dmidecode upstream is no response for long time, maybe not maitained:

https://bugzilla.redhat.com/show_bug.cgi?id=1606950

Does anyone see problems if we drop it?

Comment 18 lijiang 2018-09-07 03:36:37 UTC
Hi, Mike and Jan
This bug only disables s390x on rhel-7.6 branch, if anyone also wants to disable s390 on rhel-7.6 branch, he can create a new bug. So i move the status to ON_QA again, Would you like to check it? 

Thanks.

Comment 19 Mike Gahagan 2018-09-10 20:39:21 UTC
confirmed RHEL-7.6-20180907.0 does not contain python-dmidecode for s/390x or s/390

Comment 21 errata-xmlrpc 2018-10-30 11:48:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3314


Note You need to log in before you can comment on or make changes to this bug.