Skip to content

Conversation

@sekikn
Copy link
Contributor

@sekikn sekikn commented Jul 28, 2020

@guyuqi @mattAndruff @masatana Would you review if possible? In this PR, I intended:

  • Specify python package name explicitly as 'python2' in spec files so that they work with CentOS 8 and Fedora 31
  • Replace Ambari functions that depend on the rpm-python package, which is not provided on CentOS 8, with an implementation using the rpm command
  • Define the python command as an alias of python2 on CentOS 8 and Fedora 31, which don't provide unversioned python command by default

I confirmed that Ambari, Livy and Zeppelin (the latter of two use Python3, in contrast to Ambari) are successfully built on CentOS 7, 8 and Fedora 31 with this PR.

- ts = rpm.TransactionSet()
- packages = ts.dbMatch()
+ import os
+ packages = os.popen("rpm -qa --queryformat '%{name} '").read().split()
Copy link
Contributor

@masatana masatana Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages variable should contain a dict-like object as this is used like this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, thanks! I fixed the succeeding for-loop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Thanks!

@masatana
Copy link
Contributor

masatana commented Jul 29, 2020

@sekikn Thanks for working on this! I haven't tested this patch yet, but it looks good except for one point.
I'll test this patch on my environment later.

Copy link
Member

@iwasakims iwasakims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. ./gradlew toolchain, ./gradlew ambari-rpm and sudo yum install ambari-server worked for both CentOS 7 and CentOS 8 with the patch.

@masatana
Copy link
Contributor

LGTM (non-binding). I also built (./gradlew toolchain && ./gradlew ambari-pkg) and installed on CentOS8 with success.
If we encounter any problems with running Ambari on CentOS8, let's fix it with another addendum patch.

@sekikn sekikn merged commit fd5a140 into apache:master Jul 30, 2020
@sekikn
Copy link
Contributor Author

sekikn commented Jul 30, 2020

Thank you for the review @masatana @iwasakims, just merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants