Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide installation steps for enterprise linux #278

Closed
TomasTomecek opened this issue Apr 23, 2019 · 30 comments · Fixed by packit/packit.dev#252
Closed

Provide installation steps for enterprise linux #278

TomasTomecek opened this issue Apr 23, 2019 · 30 comments · Fixed by packit/packit.dev#252
Assignees
Labels
kind/documentation Documentation needs updates. triaged This issue was already processed by the team.

Comments

@TomasTomecek
Copy link
Member

We should provide steps how to run packit tool on RHEL:

  • podman run -ti --rm rhel:7 bash
  • -e LANG=en_US.UTF-8 # otherwise click won't run
  • rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  • yum install -y rebase-helper python36-rpm python36-pip python36-requests python36-gssapi # do as much yum install as possible
  • sadly not everything is packaged in python36-
  • pip3 install --user packitos
@lachmanfrantisek lachmanfrantisek added kind/documentation Documentation needs updates. and removed docs labels Jun 27, 2019
@stale

This comment has been minimized.

@stale stale bot added the stale Is the issue still valid? label Nov 5, 2019
@jpopelka
Copy link
Member

Still nice to have it in docs.

@stale stale bot removed the stale Is the issue still valid? label Nov 12, 2019
@stale
Copy link

stale bot commented Jan 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
We are doing this to be sure that the issue is still relevant. Anyone can comment to remove the stale state. (The issues marked with pinned, security, bug or EPIC label
are not considered stale.)

@stale stale bot added the stale Is the issue still valid? label Jan 11, 2020
@jpopelka jpopelka removed the stale Is the issue still valid? label Jan 13, 2020
@csomh csomh added the triaged This issue was already processed by the team. label Mar 12, 2020
@stale

This comment has been minimized.

@stale stale bot added the stale Is the issue still valid? label May 11, 2020
@lachmanfrantisek lachmanfrantisek removed the stale Is the issue still valid? label May 18, 2020
@stale
Copy link

stale bot commented Jul 17, 2020

This issue has been marked as stale because it hasn't seen any
activity for the last 60 days.

Stale issues are closed after 14 days, unless the label is removed
by a maintainer or someone comments on it.

This is done in order to ensure that open issues are still relevant.

Thank you for your contribution! 🦄 🚀 🤖

(Note: issues labeled with pinned, security, bug or EPIC are
never marked as stale.)

@stale stale bot added the stale Is the issue still valid? label Jul 17, 2020
@stale stale bot closed this as completed Jul 31, 2020
@TomasTomecek TomasTomecek reopened this Aug 3, 2020
@stale stale bot removed the stale Is the issue still valid? label Aug 3, 2020
@stale
Copy link

stale bot commented Oct 2, 2020

This issue has been marked as stale because it hasn't seen any
activity for the last 60 days.

Stale issues are closed after 14 days, unless the label is removed
by a maintainer or someone comments on it.

This is done in order to ensure that open issues are still relevant.

Thank you for your contribution! 🦄 🚀 🤖

(Note: issues labeled with pinned, security, bug or EPIC are
never marked as stale.)

@stale stale bot added the stale Is the issue still valid? label Oct 2, 2020
@TomasTomecek
Copy link
Member Author

We will totally need this for Stream, so it's coming...

@stale stale bot removed the stale Is the issue still valid? label Oct 5, 2020
@stale
Copy link

stale bot commented Dec 4, 2020

This issue has been marked as stale because it hasn't seen any
activity for the last 60 days.

Stale issues are closed after 14 days, unless the label is removed
by a maintainer or someone comments on it.

This is done in order to ensure that open issues are still relevant.

Thank you for your contribution! 🦄 🚀 🤖

(Note: issues labeled with pinned or EPIC are
never marked as stale.)

@stale stale bot added the stale Is the issue still valid? label Dec 4, 2020
@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Dec 7, 2020

@TomasTomecek do we want to prioritize it?

What about a prepared image, wouldn't it be much easier to support and use?

@stale stale bot removed the stale Is the issue still valid? label Dec 7, 2020
@TomasTomecek
Copy link
Member Author

@nforro is working on building rebase-helper in EPEL8, once that's done, it should be trivial to update the docs wrt installation

@csomh
Copy link
Contributor

csomh commented Dec 7, 2020

I think it would be nice to try and solve this by packaging packit in EPEL8. Would this be even possible? What dependencies are missing?

@nforro
Copy link
Member

nforro commented Dec 7, 2020

@csomh As Tomas said, I'm working on it. There already is a COPR repo with packit built for EPEL8, but I'm currently trying to verify that everything works as expected.

@csomh
Copy link
Contributor

csomh commented Dec 7, 2020

@csomh As Tomas said, I'm working on it. There already is a COPR repo with packit built for EPEL8, but I'm currently trying to verify that everything works as expected.

Oh, I see, I thought that work is only on rebase-helper.

Thanks for the update and your work @nforro! If there is anything we can help with testing, please let us know.

@nforro
Copy link
Member

nforro commented Dec 7, 2020

Ok, I'm getting some test failures:

=========================== short test summary info ============================
FAILED tests/unit/test_git_utils.py::test_get_message_from_metadata[single key-value]
FAILED tests/unit/test_git_utils.py::test_get_message_from_metadata[multiple key-values]
FAILED tests/unit/test_package_config.py::test_package_config_parse[specfile_path+synced_files+downstream_package_name]
FAILED tests/unit/test_package_config.py::test_dist_git_package_url - Asserti...
FAILED tests/integration/test_create_update.py::test_basic_bodhi_update[f30-enhancement-This is the best upstream release ever: {version}-koji_builds0]
FAILED tests/integration/test_create_update.py::test_basic_bodhi_update[f30-enhancement-This is the best upstream release ever: {version}-None]
FAILED tests/integration/test_security.py::test_allowed_gpg_keys_allowed - pa...
FAILED tests/integration/test_source_git.py::test_basic_local_update_without_patching
FAILED tests/integration/test_source_git.py::test_basic_local_update_empty_patch[None]
FAILED tests/integration/test_source_git.py::test_basic_local_update_empty_patch[0.1.0]
FAILED tests/integration/test_source_git.py::test_basic_local_update_empty_patch[0.1*]
FAILED tests/integration/test_source_git.py::test_basic_local_update_empty_patch[0.*]
FAILED tests/integration/test_source_git.py::test_basic_local_update_patch_content
FAILED tests/integration/test_source_git.py::test_basic_local_update_patch_content_with_metadata
FAILED tests/integration/test_source_git.py::test_basic_local_update_patch_content_with_metadata_and_patch_ignored
FAILED tests/integration/test_source_git.py::test_basic_local_update_patch_content_with_downstream_patch
FAILED tests/integration/test_source_git.py::test_srpm[0.1.0] - packit.except...
FAILED tests/integration/test_source_git.py::test_srpm[0.1*] - packit.excepti...
FAILED tests/integration/test_source_git.py::test_srpm[0.*] - packit.exceptio...
FAILED tests/integration/test_source_git.py::test_srpm_merge_storm[0.1.0] - p...
FAILED tests/integration/test_source_git.py::test_srpm_merge_storm[0.1*] - pa...
FAILED tests/integration/test_source_git.py::test_srpm_merge_storm[0.*] - pac...
FAILED tests/integration/test_source_git.py::test_srpm_git_am[0.1.0] - ValueE...
FAILED tests/integration/test_source_git.py::test_srpm_git_am[0.1*] - ValueEr...
FAILED tests/integration/test_source_git.py::test_srpm_git_am[0.*] - ValueErr...
FAILED tests/integration/test_source_git.py::test_srpm_git_no_prefix_patches[0.1.0]
FAILED tests/integration/test_source_git.py::test_srpm_git_no_prefix_patches[0.1*]
FAILED tests/integration/test_source_git.py::test_srpm_git_no_prefix_patches[0.*]
FAILED tests/integration/test_source_git.py::test_srpm_empty_patch[0.1.0] - V...
FAILED tests/integration/test_source_git.py::test_srpm_empty_patch[0.1*] - Va...
FAILED tests/integration/test_source_git.py::test_srpm_empty_patch[0.*] - Val...
FAILED tests/integration/test_update.py::test_basic_local_update - ValueError...
FAILED tests/integration/test_update.py::test_basic_local_update_copy_upstream_release_description
FAILED tests/integration/test_update.py::test_basic_local_update_using_distgit
FAILED tests/integration/test_update.py::test_basic_local_update_direct_push
FAILED tests/integration/test_update.py::test_basic_local_update_from_downstream
FAILED tests/integration/test_upstream.py::test_create_srpm_git_desc_release
====== 37 failed, 894 passed, 4 skipped, 6 warnings in 513.33s (0:08:33) =======

However, all the integration test failures seem to be caused by Packit failed to clone the repository beer. I'm not sure what's going on there, fedpkg works fine.

Complete output here.

@nforro
Copy link
Member

nforro commented Dec 8, 2020

So the first two failures are trivial, they are caused by a change of a default in pyyaml: yaml/pyyaml#199
The solution is to explicitly pass default_flow_style=False to yaml.dump(). I can open a PR for that.

The other two seem to be a lot more complex, but I'll try to dig deeper into it.

@nforro
Copy link
Member

nforro commented Dec 8, 2020

Sorry, my bad, I wasn't using matching revision of the test suite. With the abovementioned fix all unit tests pass (still 33 failed integration tests though).

One more issue with the test suite I haven't mentioned yet. There is no contextlib.nullcontext in Python 3.6, but contextlib.suppress seems to be working as a replacement.

@nforro
Copy link
Member

nforro commented Dec 8, 2020

I think I figured out the cause (or at least one of them) behind failing integration tests:

%if 0%{?fedora} >= 28
Source0: %{upstream_name}-%{version}.tar.gz
%endif

The condition is obviously false on EPEL, so we end up with a spec file without any sources.

@lachmanfrantisek
Copy link
Member

The condition is obviously false on EPEL, so we end up with a spec file without any sources.

Good catch!

@nforro
Copy link
Member

nforro commented Dec 10, 2020

I think there is only one remaining issue, git in RHEL/EPEL 8 doesn't support the %GF format placeholder, so CommitVerifier.get_commit_signer_fingerprint() doesn't work:

packit/packit/security.py

Lines 152 to 155 in 143c2a7

@staticmethod
def get_commit_signer_fingerprint(commit: git.Commit) -> str:
"""Get a signer fingerprint from the given commit"""
return CommitVerifier._get_commit_info(commit, pretty_format="%GF")

@nforro
Copy link
Member

nforro commented Dec 10, 2020

Never mind, git was just rebased to version 2.27 in RHEL 8.

@lachmanfrantisek
Copy link
Member

@nforro Thanks for the update!

I am not aware of any usage of this feature (checking the commit signatures) so I would not be worried about that specifically.

Never mind, git was just rebased to version 2.27 in RHEL 8.

Just to make it clear. Does this mean that the %GF is supported there?

@nforro
Copy link
Member

nforro commented Dec 11, 2020

Just to make it clear. Does this mean that the %GF is supported there?

Yes, it was added in 2.20. I'm testing this in mock and I didn't update the installed packages for a couple of days, so I missed the git update.

@TomasTomecek
Copy link
Member Author

happy new year everyone! so how are we doing here?

@nforro
Copy link
Member

nforro commented Jan 4, 2021

so how are we doing here?

As far as the dependencies in EPEL 8 go, pretty much the only blocker now is python-setuptools_scm_git_archive. I'm about to initiate non-responsive maintainer process.

@nforro
Copy link
Member

nforro commented Jan 5, 2021

I thought it would be nice to run (at least part of) the test suite in %check. However in EPEL 8 that would require one more dependency to be added, python-flexmock, and also pytest >= 3.9.0, but that can be worked around by reimplementing the missing tmp_path fixture, something like this seems to work:

@pytest.fixture()
def tmp_path(tmpdir_factory):
    return pathlib.Path(tmpdir_factory.mktemp('packit'))

@TomasTomecek
Copy link
Member Author

I thought it would be nice to run (at least part of) the test suite in %check. However in EPEL 8 that would require one more dependency to be added, python-flexmock, and also pytest >= 3.9.0, but that can be worked around by reimplementing the missing tmp_path fixture, something like this seems to work:

@pytest.fixture()
def tmp_path(tmpdir_factory):
    return pathlib.Path(tmpdir_factory.mktemp('packit'))

I'm personally not a huge fan of %check, especially when we run all the tests in PRs upstream and downstream (via fedora CI). How about we discussed this on the next architecture meeting?

@nforro
Copy link
Member

nforro commented Jan 7, 2021

I'm personally not a huge fan of %check, especially when we run all the tests in PRs upstream and downstream (via fedora CI).

I'm not too fond of %check myself, but if we want to add CentOS (?) 8 to the CI, the problem with missing/incompatible dependencies remains, doesn't it?

How about we discussed this on the next architecture meeting?

Sure.

@TomasTomecek
Copy link
Member Author

I'm personally not a huge fan of %check, especially when we run all the tests in PRs upstream and downstream (via fedora CI).

I'm not too fond of %check myself, but if we want to add CentOS (?) 8 to the CI, the problem with missing/incompatible dependencies remains, doesn't it?

Not necessarily, we could install them from PyPI :)

@stale
Copy link

stale bot commented Mar 16, 2021

This issue has been marked as stale because it hasn't seen any
activity for the last 60 days.

Stale issues are closed after 14 days, unless the label is removed
by a maintainer or someone comments on it.

This is done in order to ensure that open issues are still relevant.

Thank you for your contribution! 🦄 🚀 🤖

(Note: issues labeled with pinned or EPIC are
never marked as stale.)

@stale stale bot added the stale Is the issue still valid? label Mar 16, 2021
@jpopelka
Copy link
Member

we could install them from PyPI :)

fixed in 1f2fa7b

@stale stale bot removed the stale Is the issue still valid? label Mar 16, 2021
@TomasTomecek TomasTomecek self-assigned this Mar 16, 2021
TomasTomecek added a commit to TomasTomecek/packit.dev that referenced this issue Mar 16, 2021
Fixes packit/packit#278

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
softwarefactory-project-zuul bot added a commit to packit/packit.dev that referenced this issue Mar 17, 2021
Howto install on RHEL/CentOS or run in a container

Fixes packit/packit#278
Fixes packit/packit#762

Reviewed-by: Tomas Tomecek <tomas@tomecek.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Documentation needs updates. triaged This issue was already processed by the team.
Projects
None yet
5 participants