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`

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.11.0.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

f2r-2.11.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

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

Hashes for f2r-2.11.0.tar.gz
Algorithm Hash digest
SHA256 cba35ac16f5b4299485ae78ffd517fbaf8454b31f31d8e74e7c036c3aa7164de
MD5 c5746a6276a1cb79c14cf090362a12d0
BLAKE2b-256 f948991e129f62caec2c4486e85b01d41aeabfb13fdc55e253d58e7d1fe8f5fb

See more details on using hashes here.

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

Hashes for f2r-2.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79efddc35e5b42f2a6deebd96f5781bfa3feb964afb7048424d60c8d6f0c37d4
MD5 ebcbb0e9f8e7e5c4c7da9c34d5d92499
BLAKE2b-256 934a5a6a4f494526b554ef5b8c0804db9247bdb7a86de6108f0f0243849a601a

See more details on using hashes here.

Supported by

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