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

[TODO] Implement building/packaging and testing RPMs #90

Open
3 tasks
webknjaz opened this issue Jul 8, 2020 · 10 comments
Open
3 tasks

[TODO] Implement building/packaging and testing RPMs #90

webknjaz opened this issue Jul 8, 2020 · 10 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@webknjaz
Copy link
Member

webknjaz commented Jul 8, 2020

  • Figure out what to target and the build env
  • Define test containers
  • Integrate into tox+GHA
@webknjaz webknjaz added the enhancement New feature or request label Jul 8, 2020
@webknjaz webknjaz self-assigned this Jul 8, 2020
@webknjaz
Copy link
Member Author

webknjaz commented Jul 16, 2020

New pointers/questions:

  1. 2.10+ only?
  2. spec files + build: https://docs.fedoraproject.org/en-US/quick-docs/create-hello-world-rpm/ / https://rpm-packaging-guide.github.io/ / https://drive.google.com/file/d/1Bi5p-dRW_Q-qcMAr4_89VhnEoAGyxEZ6/view?usp=sharing
    • rpmdev-newspec will create a spec file
    • put things in the right directories, and run rpmbuild -ba mypackage.spec
  3. using centos/fedora + mock as a build env?
    • UBI available:
      $ podman run -it --rm -v `pwd`:/io --name ubi8 registry.access.redhat.com/ubi8/ubi bash
  4. runtime deps: libssh, ansible?
  5. build deps: python? libssh-dev?
  6. test containers: centos/fedora/ubi?

@webknjaz webknjaz added help wanted Extra attention is needed question Further information is requested labels Jul 16, 2020
@webknjaz
Copy link
Member Author

@ganeshrn could you please document the requirements here? There's no clear/complete understanding of the target envs...

@webknjaz
Copy link
Member Author

webknjaz commented Aug 4, 2020

Based on the last call, the plan is:

  1. Package RPM for Fedora
  2. Package RPM for CentOS
  3. Package RPM for RHEL8
  4. Rely on Python 3 that the recent Ansible is linked against in these OSs
  5. Wait for the new channel/repository to get created in Brew (Koji)

@webknjaz webknjaz added this to the Feb 2021 milestone Oct 21, 2020
@webknjaz
Copy link
Member Author

webknjaz commented Apr 29, 2021

Requested adding libssh-devel to ubi8: https://bugzilla.redhat.com/show_bug.cgi?id=1954863.

UPD: this is not going to happen so I've applied a hack to install them from CentOS RPMs in the CI.

@webknjaz webknjaz assigned pabelanger and unassigned ganeshrn Jun 11, 2021
@webknjaz
Copy link
Member Author

@pabelanger could you please help figure out the RHEL channel this is supposed to get in?

@webknjaz
Copy link
Member Author

Extra unsolved question: do we need to build RPMs for custom archs (it's currently only set up for x86_64). I'd like this to be integrated but objectively having QEMU may be ridiculously slow.

@pabelanger
Copy link

Side idea: figure out if we could use bindep to declare deps for building RPMs because they are only available in CI workflow files right now which is suboptimal.

Ref: rbtcollins.wordpress.com/2015/07/12/bootstrapping-developer-environments-for-openstack / rbtcollins/bindep / docs.opendev.org/opendev/bindep/latest / pypi.org/project/bindep

How to install packages returned by bindep: jakobandersen.github.io/mod/compiling.html#quick-start + ansible -m package? / ansible/ansible-builder@abb609a/ansible_builder/steps.py#L78

Examples: https://github.com/openstack/openstack-ansible/blob/master/bindep.txt / gerrit.cesnet.cz/plugins/gitiles/github/openstack-infra/zuul/+/19f8d27fd8d8a02322d3a56f8e18403df527d855/bindep.txt / https://github.com/openstack/ansible-role-python_venv_build/blob/master/bindep.txt

Another idea: extract running rpmlint into tox (may depend on tox-dev/tox-bindep).

You'd do something like: https://github.com/ansible-collections/ansible.netcommon/blob/main/bindep.txt#L10

Which we automatically pickup in our python-builder image (assemble script) when we build containers. We standardize on bindep.txt files in our Zuul CI, to make is easier for developers to distro level packages into jobs.

So adding something here, is possible.

@webknjaz
Copy link
Member Author

You'd do something like: https://github.com/ansible-collections/ansible.netcommon/blob/main/bindep.txt#L10

Which we automatically pickup in our python-builder image (assemble script) when we build containers. We standardize on bindep.txt files in our Zuul CI, to make is easier for developers to distro level packages into jobs.

I want that for this repo's in-tree automation specifically, not for Zuul. Meaning that the automation needs to learn how to install those things (possibly from within tox).

@pabelanger
Copy link

You'd do something like: https://github.com/ansible-collections/ansible.netcommon/blob/main/bindep.txt#L10
Which we automatically pickup in our python-builder image (assemble script) when we build containers. We standardize on bindep.txt files in our Zuul CI, to make is easier for developers to distro level packages into jobs.

I want that for this repo's in-tree automation specifically, not for Zuul. Meaning that the automation needs to learn how to install those things (possibly from within tox).

https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/bindep is the ansible role we use to manage bindep files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants