packaging: create the plugin-shellcheck-core subpackage#185
packaging: create the plugin-shellcheck-core subpackage#185kdudka merged 3 commits intocsutils:mainfrom
Conversation
Instead of using `%package -n csmock-common`, we can simply write `%package common` etc. This is easier to read and easier to maintain. Related: csutils#185
... so that one can easily install the `run-shellcheck.sh` script without unnecessary dependencies on `mock` etc. Related: https://issues.redhat.com/browse/OSH-738 Closes: csutils#185
c3b5676 to
43a5c4a
Compare
rhyw
left a comment
There was a problem hiding this comment.
I tried on a rhel9 server, the csmock-plugin-shellcheck-core can be installed without bringing additional deps. here's the files installed:
[root@2006276284f1 src]# rpm -ql csmock-plugin-shellcheck-core
/usr/share/csmock
/usr/share/csmock/scripts
/usr/share/csmock/scripts/run-shellcheck.sh
/usr/share/licenses/csmock-plugin-shellcheck-core
/usr/share/licenses/csmock-plugin-shellcheck-core/COPYING
I also installed the csmock-plugin-shellcheck with rpm -i --nodeps:
[root@2006276284f1 src]# rpm -ql csmock-plugin-shellcheck
/usr/lib/python3.9/site-packages/csmock/plugins/__pycache__/shellcheck.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/csmock/plugins/__pycache__/shellcheck.cpython-39.pyc
/usr/lib/python3.9/site-packages/csmock/plugins/shellcheck.py
Comparing with the previous csmock-plugin-shellcheck-3.7.0-1.el9.noarch.rpm package:
[root@8217478ad3a7 src]# rpm -ql csmock-plugin-shellcheck-3.7.0-1.el9
/usr/lib/python3.9/site-packages/csmock/plugins/__pycache__/shellcheck.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/csmock/plugins/__pycache__/shellcheck.cpython-39.pyc
/usr/lib/python3.9/site-packages/csmock/plugins/shellcheck.py
/usr/share/csmock/scripts/run-shellcheck.sh
I can see the difference is that /usr/share/licenses/csmock-plugin-shellcheck-core/COPYING is installed along with the -core package. Assuming it's the intended change, this looks good to me.
I tried later by running the script, /usr/share/csmock/scripts/run-shellcheck.sh * or /usr/share/csmock/scripts/run-shellcheck.sh . all gives desired output to shellcheck-results directory.
Note that since it's not running in a chroot environment, we'll need to install shellcheck for the script to run correctly. Otherwise:
+ timeout 30 shellcheck --format=json test/script/e2e_run.sh
timeout: failed to run command 'shellcheck': No such file or directory
+ timeout 30 shellcheck --format=json test/script/ocm.sh
+ timeout 30 shellcheck --format=json test/script/e2e_setup.sh
timeout: failed to run command 'shellcheck': No such file or directory
timeout: failed to run command 'shellcheck': No such file or directory
timeout: failed to run command 'shellcheck': No such file or directory
+ timeout 30 shellcheck --format=json test/script/util.sh
timeout: failed to run command 'shellcheck': No such file or directory
I think it's also the desired behavior per our discussion in slack.
LGTM
... so that one can easily install the `run-shellcheck.sh` script without unnecessary dependencies on `mock` etc. Related: https://issues.redhat.com/browse/OSH-738 Related: csutils#185
... so that `run-shellcheck.sh` works out of the box. Related: https://issues.redhat.com/browse/OSH-738 Closes: csutils#185
43a5c4a to
3d65f58
Compare
|
@rhyw Thanks for review!
IIRC, there is a policy in Fedora packaging that each installed package should provide the license file.
I have introduced a weak dependency on |
|
change 3d65f58 looks good. Thanks for the update! |
... so that one can easily install the `run-shellcheck.sh` script without unnecessary dependencies on `mock` etc. Related: https://issues.redhat.com/browse/OSH-738 Related: csutils#185
... so that `run-shellcheck.sh` works out of the box. Related: https://issues.redhat.com/browse/OSH-738 Closes: csutils#185
3d65f58 to
57add2e
Compare
|
@rhyw Thanks for review! |
... so that one can easily install the
run-shellcheck.shscript without unnecessary dependencies onmocketc.Related: https://issues.redhat.com/browse/OSH-738