Closed Obihoernchen closed 4 years ago
The current xcat-inventory package supports RHEL7 with python2. I don't think it's necessary to change shebang from python
to python2
you are right, we need a new release for RHEL8 with python3. we are working on if possible release one package can support both python2
and python3
It's necessary, otherwise you get:
*** ERROR: ambiguous python shebang in /opt/xcat/bin/xcat-inventory: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
when building on RHEL8. Also see: https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
@Obihoernchen , which rhel version of system did you build the rpm? If I build on rhel7 system and run on rhel8 system, it still hit same issue.
Problem: conflicting requests
- nothing provides python-sqlalchemy >= 0.8.0 needed by xcat-inventory-1:0.1.6-c65.noarch
- nothing provides python-six needed by xcat-inventory-1:0.1.6-c65.noarch
- nothing provides PyYAML needed by xcat-inventory-1:0.1.6-c65.noarch
- nothing provides python-psycopg2 needed by xcat-inventory-1:0.1.6-c65.noarch
- nothing provides python-jinja2 needed by xcat-inventory-1:0.1.6-c65.noarch
- nothing provides MySQL-python needed by xcat-inventory-1:0.1.6-c65.noarch
I used your modified spec.
%if 0%{?rhel} >= 8
Requires: python2-psycopg2 python2-sqlalchemy >= 0.8.0 python2-PyMySQL python2-pyyaml python2-six python2-jinja2 git
%else
Requires: python-psycopg2 python-sqlalchemy >= 0.8.0 MySQL-python PyYAML python-six python-jinja2 git
%endif
I will merge this PR, and will build two RPM , one for rhel7 and one for rhel8
Fixes https://github.com/xcat2/xcat-inventory/issues/221 and keeps RHEL7 compatibility.
Note: This should be changed to python3 very soon for RHEL8. But for now this works fine, too. I didn't want to change shebang to python3 as this would break RHEL7 support. We should think about providing two packages: python2 RHEL7 + python3 RHEL8 in the future.
A new release v0.1.7 should be created.