STI tests.yml: Custom defined variables
by Miro Hrončok
Hello,
please bare with me because my Ansible skills are close to none. I only use it
for Fedora CI.
I've read
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.ht...
I have this (simplified) tests.yml:
---
- hosts: localhost
roles:
- role: standard-test-basic
tests:
- smoke:
dir: python/smoke
run: VERSION=3.11 ./venv.sh
required_packages:
- python3.11
- python3.11-devel
Full version in
https://src.fedoraproject.org/rpms/python3.11/blob/rawhide/f/tests/tests.yml
I would like to replace all occurrences of 3.11 with a variable:
---
- hosts: localhost
roles:
- role: standard-test-basic
tests:
- smoke:
dir: python/smoke
run: VERSION={{ pybasever }} ./venv.sh
required_packages:
- python{{ pybasever }}
- python{{ pybasever }}-devel
But where do I put pybasever: '3.11' exactly?
Bonus question: Can I read the tested package name and regex it into the variable?
pybasever: {{ xxx_package_name|pex_regex_replace('^python', '') }}
Thanks,
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
1 year, 3 months
[RFC] Build tag in RPM: from NVR to NVRB
by Aleksandra Fedorova
Hi, all,
I'd like to discuss how we can add Build tag in the RPM.
As one of the key points is to turn it into a common standard for rpm
packages across the ecosystem, the conversation is currently opened
upstream [1] and in RHEL Engineering. And I'd like to get Fedora
community on board.
This is not a finalized proposal and I think it is not ready yet to be
a Fedora Change.
But I want to start a conversation and ask for opinions. There are
also some open questions which need help, especially the requirements
around build reason. And alternative suggestions are welcome as well.
I've posted long version at
https://discussion.fedoraproject.org/t/rfc-build-tag-in-rpms/39954
You can comment there (simply login with your FAS id) or here on the
mailing list.
And I am going to update that post with the new feedback.
Shorter version:
================================================
We'd like to introduce Build Number/Tag/Id in the rpm metadata.
By this change we would like to:
* Provide a possibility to change build environment and rebuild rpm
packages without changing their content: neither sources nor spec
files.
* Set a common standard for the RPM-based ecosystem, which can be used
not just within Fedora, but also by Remixes, downstreams, SIGs and
other distributions.
The most visible impact of the proposal would be the filename change:
Current: dnf-4.9.0-12.fc36.noarch.rpm
Proposed: dnf-4.9.0-12.fc36.34897715.noarch.rpm
It can be implemented in two steps:
1) Now → Compatibility mode
* Introduce Build tag in the rpm metadata
* Introduce “build reason” to be added to rpm changelog as a top entry
* Enable passing Build tag value to the build in Koji. The value of
the Build tag will be set from Koji build id.
* Introduce macro in Release field of the rpm spec files, which adds
Build tag after the usual disttag
Release: 12.%{?dist}%{?build:.%{build}}
* Introduce option to pass “build reason” to a Koji build via koji cli
and fedpkg/centpkg tooling.
2) Compatibility mode → Final
* Implement support for the upgrade path on the rpm side in a
compatible way. So that NV(R’=R+B) and NVRB are treated the same.
* Remove %{build} part from Release tag and use independent Build tag
for versioning.
================================================
[1] https://github.com/rpm-software-management/rpm/discussions/2031
--
Aleksandra Fedorova
CI for Fedora/CentOS Stream/RHEL
bookwar on Matrix/IRC
1 year, 3 months
Running STI test as non-root
by Miro Hrončok
Hello CI,
we have discovered a serious usability problem in one of our packages that
existed for a while but did not show on the CI.
Apparently, the problem only shows up when actual users do the things.
However, our STI tests on Fedora CI run as root, hiding the issue.
I want to stop running our tests as root. Is there some idiomatic way to do that?
I was thinking about changing this:
tests:
- smoke_pypy38:
dir: python/smoke
run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh
- smoke_pypy39:
dir: python/smoke
run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh
To this:
tests:
- create_user:
run: adduser testuser
- smoke_pypy38:
dir: python/smoke
run: runuser testuser -c 'PYTHON=pypy3.8 VERSION=3.8 ./venv.sh'
- smoke_pypy39:
dir: python/smoke
run: runuser testuser -c 'PYTHON=pypy3.9 VERSION=3.9 ./venv.sh'
But is there some better way?
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
1 year, 3 months