Without this patch, people running STR against a remote machine without root cannot use this role ...
Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com
https://docs.fedoraproject.org/en-US/ci/standard-test-interface/#_invocation
4. MUST execute the playbook as root.
If you want this change, then we need change STI. Sorry. It is not about me. It is about standard.
@dperpeet @bookwar kindly asking for help here :) seems we are going against our users here.
@dhowells uses standard-test-source role and wants to use 1minutetip to execute the test suite from his localhost as non-root (tests run remotely on a VM). This worked before (see fix for the same problem here: https://pagure.io/standard-test-roles/c/df015d247fb79ca0252c982ecc4c4b0ad44dae41?branch=master). With reimplementation of standard-test-source role this regressed and user cannot use this role if he is not root. Can you provide an ack for @astepano so we can fix this small change so 1minutetip workflow again works pls?
rebased onto b4145594e501ed5cf2c89d3bc626426288e7d14e
@bgoncalv volunteered to rewrite STR to run rpm-build on test-env. It will be the best solution
This change works for me.
Tested-by: David Howells dhowells@redhat.com
My change will no drop the requirement of rpm-build on test system. rpm-build will continue to be needed as to run rpm -q --specfile... rpm-build is needed. Unless you know any other way to get this info.
rpm -q --specfile...
I'm okay with @mvadkert change, I think the main reason for STI to require to run the playbook as root is due to dynamic inventory. But there are use cases where the inventory is already provisioned. Maybe the role could check if rpm-build is already installed and if it is don't try to this task (but I don't know the best way to do it).
root
rpm-build
Other solution would add rpm-build as STR dep on spec file.
@bgoncalv @mvadkert it seems we agreed to merge it with adding a banner, that easy to spot to git-commit or code itself.
Agreed, I am preparing the PR
rebased onto 5a6f4be19963f9ad823eff7196c0abfc11be627f
I added code to handle better the error when run without root and rpm-build is not installed
rebased onto fea88d1bbe81987ae97322b538b325949f57f349
Added a banner also ...
rebased onto ec737762bdd4c393ae4cf08a6fc4aca2bee6e7ec
and rebased against master HEAD
1 new commit added
debug
pretty please pagure-ci rebuild
I don't know why, but Centos-CI OpenShift doesn't like this PR :D
yeah, I will need too look, no idea yet ..
Will open a new pr
Pull-Request has been closed by mvadkert
Without this patch, people running STR against a remote machine
without root cannot use this role ...
Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com