Skip to main content

Produces RPMs for FLP packages out of aliBuild ouput

Project description

f2r

Command line tool to create RPMs out of aliBuild output.

Prerequisites

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 version in setup.py
  • Publish to PyPI
    • python3 setup.py sdist bdist_wheel
    • TWINE_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)

  1. cd flp-to-rpm
  2. python3 -m venv env
  3. source env/bin/activate
  4. python -m pip install -r requirements.txt
  5. python3 -m pip install .
  6. You can execute and work. Next time just do source env/bin/activate and then you are good to go.
  7. 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 tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

f2r-2.12.0.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

f2r-2.12.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file f2r-2.12.0.tar.gz.

File metadata

  • Download URL: f2r-2.12.0.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for f2r-2.12.0.tar.gz
Algorithm Hash digest
SHA256 5ae29f0c2d41e515a396277cdf01e23fa6b667b70852e7a077408db5103a56b7
MD5 956fe50ce1be34da795796383b9df6c8
BLAKE2b-256 8225f54509084e977aabce497ea6bb48d10584afd83084aace8d6d56fb80169f

See more details on using hashes here.

File details

Details for the file f2r-2.12.0-py3-none-any.whl.

File metadata

  • Download URL: f2r-2.12.0-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for f2r-2.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1fe115b4aacde10e4214cda9c8e5886ad31ef4f9ea5f108cc09568d432231b0
MD5 9a6dd5a6ae9db1d98ef1835c3cfefda9
BLAKE2b-256 7a0c29edc2345b15ab01e40a164e51d20ae4c590dd561ea247d7c909768e0bf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page