-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve BuildRequires use #28
Comments
The results of some initial experimentation with this issue look promising:
This is a far faster and more informative fail than during the Poetry venv creation for the %check run of all out tests. I'll continue with abstracting all that is needed to build - on top of rpm-build's own dependencies, which do overlap with our requirements a little: rpm-build dependencies (Leap 15.5 Minimal_VM image)
|
Followed by:
So missing git: we use the git options available in %prep to prepare our code, adding accordingly to build requirements: they are likely also a recommended to rpm-build itself but I want to have the minimum required here to improve our chances of doing test rpm builds (and consequently running our tests) on small hosts.
|
We have of course to start, and possibly configure HBA access to postgresql before running rpmbuild.
|
Short of finding how we BuildRequires on a systemd service running we will have to advise:
but we then have, of course, to configure HBA on the local postgresql - as we do in initrock:
|
See the modifications used by our initrock (rockstor-pre.service) to acomodate our testing requirements of postgresql: |
To enable the use of this repo to help with testing rpmbuld function: we might consider adding a script that will allow configure Postgres sufficiently to run our tests - a requirement for a successful rpm package build. This may help with setting up transient workers to test-build rpm packages (and thus run our tests also) at key points in development. |
HBA Host Based Authentication (Postgresql)Akin to our behaviour in initrock (rockstor-pre.servcie invoked): we can instantiate pg_hba.conf as follows (dedicated test systems only):
|
DB setup as per initrock (minimal for tests) - WILL DESTROY EXISTING DB.To run our tests on a non prior rockstor instance we need to establish db as per initrock. DB tune:
DB setup:
In our proof of concept test-running Minimal-VM we have errors concerning pre-existing postgresql:
However we have our slightly more than minimal db tune/setup for establishing a throw-away test runner via a %check rpmbuild:
|
OS setup related failures that could constitute incomplete OS for test runs (remit of issue re BuildRequires):
All of the above very likely represent unit test improvements to be had regarding unwanted/unrequired OS sensitivity during test runs. I.e. insufficient mocking of OS components. The above likely false dependencies/requirements, that might otherwise be satisfied by additional BuildRequires entries, have been spun-off to the now linked issue: "Improve OS independence re unit tests" rockstor/rockstor-core#2633 EDIT: pull request for spin-off issue: |
Use our existing OS flavour/version sections for Leap/TW to add a proposed minimum BuildRequires for a rpmbuild (%check included) on a Minimal_VM host of our upstream OS. Given external postgresql install and config.
Closing as: |
Follow-up: 5.0.1-0 release
5.0.2-0
Where the latter host OS, in addition to Minimal_VM pre-installs, only has our BuildRequires installed. |
Test install of rpm built in last comment. Followin 15.5 adapted instructions re repos here: OBS home repo for our shellinabox
RequiresOur additional package requires in 15.5 are currently as follows:
|
We currently make almost no use of the BuildRequires section. It is proposed that we bring this key rpmbuild feature into play more to enable a better out-of-the-box experience re rpmbuild runs on say Minimal-VM images. Our new Poetry based install method requires that we build many of our required dependencies, and so we have specified these within the final install dependencies section. But this ignores the initial rpmbuild requirements that can be well served by BuildRequires.
These changes should be address first in the testing branch.
The text was updated successfully, but these errors were encountered: