Skip to main content

f2r

Command line tool to create RPMs out of aliBuild output.

Prerequisites

  • aliBuild 1.16.0 or higher (writes .meta.json in the install directories)
  • 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 create RPMs providing the package and version as found under sw/<architecture>/:

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 lint and tests pass
  • Bump version in pyproject.toml
  • Push a git tag matching the version: the release CI job builds the sdist and wheel with python3 -m build and uploads them to PyPI
  • 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 the .meta.json file that aliBuild writes in each install directory (sw/<architecture>/<package>/<version>/.meta.json), which lists the direct runtime and build dependencies resolved for that build.

It is capable of generating "devel" RPMs. In such case, in addition to runtime dependencies, it also packs build dependencies, with the versions recorded in .meta.json.

A dependency listed in the recipe but not recorded in .meta.json was not built by aliBuild and is treated as a system dependency. Definitions in (devel|runtime).slc*.yaml translate system dependencies into a list of RPM packages.

Then, it uses fpm tool to generate RPMs.

Development setup

cd flp-to-rpm
python3 -m venv env
source env/bin/activate
python3 -m pip install -e '.[dev]'

The editable install exposes the f2r command and picks up code changes without reinstalling.

Lint and unit tests

Run from the repository root:

ruff check .
ruff format --check .
python3 -m unittest discover tests

# Run a single test:
python3 -m unittest tests.testPackage.TestPackage.test_deps_with_versions

Download files

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

Source Distribution

f2r-3.0.2.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

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

f2r-3.0.2-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: f2r-3.0.2.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.14

File hashes

Hashes for f2r-3.0.2.tar.gz
Algorithm Hash digest
SHA256 27ab2287850521c2f07e0ca31174a494535b87c8eff5a39e18b82bb068c7acbd
MD5 439aefab131a1d6cf8caea7da43eca59
BLAKE2b-256 38b1c9f710bfa07a59873e2ac053ee80df49686848ef25153ee9b9b7eb72462e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: f2r-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.14

File hashes

Hashes for f2r-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19e89ac4452d78d1953699e2c7d860e1a5de9e19ce09e72adc51ff419a799f72
MD5 1148f1a74bdb207d3b48da7a5f0888c2
BLAKE2b-256 e7956a288d59d4e5ff961ae7f7e94cb6c6ae6b4982e99b378f35d168b4b47cd7

See more details on using hashes here.

Release history Release notifications | RSS feed

3.2.0

2 files

3.1.0

2 files

3.0.3

2 files

This release

3.0.2 This release

2 files

3.0.1

2 files

3.0.0

2 files

2.13.0

2 files

2.12.0

2 files

2.11.0

2 files

2.10.0

2 files

2.9.0

2 files

2.8.3

2 files

2.8.2

2 files

2.8.1

2 files

2.8.0

2 files

2.7.0

1 file

2.6.6

1 file

2.6.5

1 file

2.6.4

1 file

2.6.3

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

1 file

2.5.1

2 files

2.5.0

2 files

2.4.14

2 files

2.4.13

1 file

2.4.12

2 files

2.4.11

2 files

2.4.9

1 file

2.4.8

2 files

2.4.7

2 files

2.4.6

2 files

2.4.5

2 files

2.4.4

2 files

2.4.3

2 files

2.4.2

2 files

2.4.1

2 files

2.4.0

2 files

2.3.1

2 files

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.6.0

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.2

2 files

1.4.0

2 files

1.2.10

2 files

1.2.9

2 files

1.2.8

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page