Produces RPMs for FLP packages out of aliBuild ouput
Project description
f2r
Command line tool to create RPMs out of aliBuild output.
Prerequisites
- aliBuild
- environment Modules 4.3 or higher, RPM is available from this S3 location
- Optional: To enable S3 support you need to create a config file under
~/.s3cfg, see CERN IT instructions - gem + fpm:
yum install rubygems -y ; gem install fpm
Installation
To just install the tool:
python3 -m pip install f2r
OR
Use flp-release-server role from system-configuration to fully provision a build server.
Quickstart
Build packages using aliBuild, eg:
aliBuild build O2Suite --defaults o2-dataflow --always-prefer-system
Then, run alienv as indicated by aliBuild in order to create modulefiles:
alienv enter O2Suite/latest-o2-dataflow
exit # do not forget to exit
And create RPMs providing same package and version as to alienv:
f2r generate --package O2Suite --version latest-o2-dataflow
Validate created RPMs (this requires sudo):
f2r validate
Create YUM repo:
f2r repo
and sync it to S3:
f2r sync
CLI options
Simple run f2r -h to see all available options
Developers documentation
Software lifecycle
- Make changes and merge MR when all tests pass
- Bump
versioninsetup.py - Publish to PyPI
python3 setup.py sdist bdist_wheelTWINE_USERNAME=$TWINE_USERNAME TWINE_PASSWORD=$TWINE_PASSWORD python3 -m twine upload --repository pypi dist/*
- Update build server using
pip
Simple description of the logic
Creates tree of dependencies by recursively iterating over "alidist" recipes. It disables certain packages based on selected "defaults". It retrieves versioning information from "modulefiles" (as "alidist" recipes do not provide that).
It is capable of generating "devel" RPMs. In such case, in addition to runtime dependencies, it also packs build dependencies. (NOTE: There is no source of truth for build dependencies versioning, therefore the latest available version is used.)
It picks up system dependencies when aliBuild package is not available. For this reason it uses definitions in (devel|runtime).slc*.yaml file translate system dependencies into list of RPM packages.
Then, it uses fpm tool to generate RPMs.
Setup virtual environment for development and test (venv)
cd flp-to-rpmpython3 -m venv envsource env/bin/activatepython -m pip install -r requirements.txtpython3 -m pip install .- You can execute and work. Next time just do
source env/bin/activateand then you are good to go. - If you modify the code, then rerun
python3 -m pip install .
Unit Tests
cd flp-to-rpm
source env/bin/activate
cd tests
# Run a test:
python -m unittest testModule.TestModule.test_versions
# Run all tests:
python3 -m unittest discover`
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file f2r-2.11.0.tar.gz.
File metadata
- Download URL: f2r-2.11.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cba35ac16f5b4299485ae78ffd517fbaf8454b31f31d8e74e7c036c3aa7164de
|
|
| MD5 |
c5746a6276a1cb79c14cf090362a12d0
|
|
| BLAKE2b-256 |
f948991e129f62caec2c4486e85b01d41aeabfb13fdc55e253d58e7d1fe8f5fb
|
File details
Details for the file f2r-2.11.0-py3-none-any.whl.
File metadata
- Download URL: f2r-2.11.0-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79efddc35e5b42f2a6deebd96f5781bfa3feb964afb7048424d60c8d6f0c37d4
|
|
| MD5 |
ebcbb0e9f8e7e5c4c7da9c34d5d92499
|
|
| BLAKE2b-256 |
934a5a6a4f494526b554ef5b8c0804db9247bdb7a86de6108f0f0243849a601a
|