Buildroot configuration

Versioning

In ELN project we work on the buildroot configuration rather than the content of Fedora packages. As ELN buildroot configuration may change frequently and independently from Fedora releases, it has its own versioning.

This approach allows us to rebuild RPM packages on buildroot changes without changing the spec file of a package in dist-git.

ELN Buildroot version is written as XY.

The X version refers to major changes in the ELN buildroot (generally those events that necessitate a mass-rebuild). The Y version refers to changes in the buildroot configuration that are compatible and will apply to future builds in the ELN buildroot.

We start this number at 100, where 1 is the X version and 00 is the Y version.

In ELN buildroot we build Fedora Rawhide packages in the EL-like setting. Thus, following macro values are set by default:

Table 1. Macros values
Macro Value Description

%{fedora}

%{nil}

Unset

%{rhel}

11

Integer value one higher than the most recently released major version of RHEL

%{eln}

XY

Version of the eln buildroot. Not tied to any RHEL or Fedora release.

%{dist}

.eln%{eln}

eln-disttag, for example .eln101

We set these values in Koji for the eln-build tag as follows:

koji edit-tag \
        -x rpm.macro.fedora=%{nil} \
	-x rpm.macro.rhel=9 \
	-x rpm.macro.eln=101 \
	-x 'rpm.macro.dist=%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}.eln%{eln}%{?with_bootstrap:~bootstrap}' \
	eln-build

Compiler flags and other tweaks

Table 2. Compiler Flags
Arch Rawhide ELN

aarch64

-

-

i686

-

-

ppc64le

-

-

s390x

-march=zEC12 -mtune=z13

-march=z14 -mtune=z15

x86_64

-

-march=x86-64-v2

The compiler flag tweaks can be found in /usr/lib/rpm/redhat/macros The above options are from redhat-rpm-config-200-1

Building with the ELN buildroot

Simply specify eln as the release when kicking off a koji build using fedpkg:

fedpkg --release eln build [--scratch] [--srpm [SRPM]] [...]

mock can also be used to perform builds locally.

A supported mock configuration is available in the mock-core-configs package version 33 or later. This enables the ELN environment to be used locally by running (for arch x86_64):

mock -r fedora-eln-x86_64 ...

If the official mock configuration is not yet available, an unsupported configuration file can be downloaded here. See mock#649