Oracle Linux 8: Building RPM Packages From Source
Oracle Linux 8: Building RPM Packages From Source
Oracle Linux 8: Building RPM Packages From Source
F44226-04
April 2022
Oracle Linux 8 Building RPM Packages From Source,
F44226-04
2 General Requirements
Enable Required Developer Repositories 2-1
Install Packaging Tools and the Module Build Service 2-1
4 Building Modules
Create Git Repositories for Module Sources 4-1
Download Module Sources 4-1
Generate a Working modulemd and Plan the Required Git Repositories 4-3
Create Source Git Repositories and Branches 4-6
Remote Git Repositories 4-6
Local Git Repositories 4-7
Configure MBS for Remote Source Repositories 4-8
Module Build Service Mock Configuration 4-8
Triggering a Build 4-10
iii
Test a Module Build 4-10
iv
Preface
Oracle® Linux 8: Building RPM Packages From Source describes how to set up the Module
Build Service (MBS) to build modular RPM packages from source for Oracle Linux 8. The
information in this document is for training purposes and can be used in a development
environment to build software sources as modular binary RPM packages for Oracle Linux 8
so that changes to code can be easily tested across test platforms. Note that Oracle does not
support packages that are built externally and also does not support all of the components
within a build environment.
Conventions
The following text conventions are used in this document:
Convention Meaning
boldface Boldface type indicates graphical user
interface elements associated with an action,
or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or
placeholder variables for which you supply
particular values.
monospace Monospace type indicates commands within a
paragraph, URLs, code in examples, text that
appears on the screen, or text that you enter.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility
Program website at https://www.oracle.com/corporate/accessibility/.
For information about the accessibility of the Oracle Help Center, see the Oracle Accessibility
Conformance Report at https://www.oracle.com/corporate/accessibility/templates/
t2-11535.html.
v
Preface
build a more inclusive culture that positively impacts our employees, customers, and
partners, we are working to remove insensitive terms from our products and
documentation. We are also mindful of the necessity to maintain compatibility with our
customers' existing technologies and the need to ensure continuity of service as
Oracle's offerings and industry standards evolve. Because of these technical
constraints, our effort to remove insensitive terms is ongoing and will take time and
external cooperation.
vi
1
About Building Source Packages
This chapter provides overview information about building and packaging source packages
as binary RPM packages. A distinction is made between building standard non-modular
source packages and building source that is distributed within DNF modules and streams.
Some information on how to obtain source packages is also provided.
NOT_SUPPORTED:
This documentation illustrates how source packages for Oracle Linux 8 can be built
and packaged as binary RPM packages to effectively bootstrap Oracle Linux 8 from
source. The information that is provided here is intended to assist developers in
understanding how to build and package source code for Oracle Linux 8. Oracle
does not support packages that are built externally. These instructions do not imply
support for the infrastructure that is described or for any package build processes.
Note that you can encounter some issues when downloading the source RPM packages by
using the dnf download command if the package is released as a module. If necessary,
you can manually download source packages directly from https://yum.oracle.com/oracle-
linux-8.html.
Modular packages contain metadata with information about the packages that are part of the
module and are made available in a modular RPM repository that includes a YAML file that
provides more information about the modules and streams available. You cannot download
sources for modular packages directly by using the dnf download command. For more
information about downloading modular packages, see Download Module Sources.
More information about DNF modularity is provided in Oracle® Linux: Managing Software on
Oracle Linux.
1-1
Chapter 1
About the Module Build Service
If you intend to build the majority of packages directly from source, you should
consider creating a mirror of the yum repositories or ULN channels where the
packages are located. On an Oracle Linux 8 system, you can easily create a mirror of
all of the repositories or channels that your system is subscribed to by running the
following command:
mkdir source_rpms
The previous command downloads all of the sources for every package in every
repository for which the system is subscribed. You must ensure that the file system on
which you host these source RPM packages has sufficient space to store these
packages. You can find out how much space is used by each repository by running
dnf repolist -v.
For modular packages, the dnf reposync command downloads the source RPM
packages for each defined module stream, which means that multiple versions of the
same source package may exist in the repository mirror.
More information about the RPM packaging format can be found at https://rpm.org/
documentation and a detailed guide to RPM packaging is available at https://rpm-
packaging-guide.github.io/.
1-2
2
General Requirements
This chapter describes the required steps for building both modular and standard source
packages. Preparing a system as a build server requires that you enable developer
repositories which contain unsupported software. You must ensure that your system is
current with the latest updates and you must install the required build packages and
dependencies .
If you are building modular packages, several additional setup steps are required. For
instance you are also required to either host source content yourself either on a remote Git
service or locally within your own Git repositories. Modular package repositories must be
populated with source code and the Module Build Service must be configured appropriately.
Furthermore, you must configure the Module Build Service and related tools so that modular
RPMs can be generated. Information on this is provided in more detail in Building Modules.
Important:
Enabling the following repositories can result in a system running unsupported
packages. A system that is used for the purpose of building modular RPM packages
from source is, by nature, an unsupported system. If you proceed with these
instructions, use a dedicated system for which you do not intend to obtain direct
support from Oracle.
Many of the development tools, libraries and dependencies required to build the source
available for Oracle Linux 8 are hosted in unsupported developer repositories. Before
proceeding make sure that your system is up to date so that you have the most recent
version of any of the release packages installed:
sudo dnf update
Install the oracle-epel-release-el8 package if it is not already installed and enable all of
the required developer repositories:
sudo dnf install oracle-epel-release-el8
2-1
Chapter 2
Install Packaging Tools and the Module Build Service
You may need to install some additional dependencies before you are able to start
building all of your source packages and to meet any of your own build requirements.
Typically, build teams additionally install the following:
sudo dnf install -y gcc python3-service-identity
Optionally, if you use Git Large File Storage (LFS) to store RPM sources, install the
git-lfs package:
sudo dnf install git-lfs
2-2
3
Building Non-Modular Source RPM Packages
This chapter describes how to build non-modular source RPM packages. Two methods are
provided: the first is more direct and uses the rpmbuild utility directly; the second requires
that you set up the mock utility and configure the system to process builds using this tool.
There are several advantages to using the mock utility to build packages and you should
consider using this tool if you intend to do mutliple or regular builds of different packages.
Important:
Do not build source RPM packages as the root user. The build processes often run
scripts and processes that you may not have full control over and that could easily
cause system failure or could compromise a system.
Note:
When using the rpmbuild tool to build source RPM packages directly, you may
see warning messages similar to the following:
warning: user mockbuild does not exist - using root
These warnings can be ignored, as they are related to the way these source
packages are set up for build by using the mock utility within a more complex build
environment.
If the build dependencies that are specified in the SPEC file are not satisfied, the rpmbuild
--rebuild command errors out and lists the failed dependencies, for example:
rpmbuild --rebuild bash-4.4.19-12.el8.src.rpm
Installing bash-4.4.19-12.el8.src.rpm
...
error: Failed build dependencies:
autoconf is needed by bash-4.4.19-12.el8.x86_64
3-1
Chapter 3
Using the mock Utility to Build Sources
You can either manually install each dependency that is listed in the warning; or, you
can use the dnf builddep command to resolve all of the build dependencies
specified in the SPEC file that was extracted when you ran the rpmbuildcommand,
for example:
sudo dnf builddep -y ~/rpmbuild/SPECS/bash.spec
If all of the build dependencies are satisfied and the source package has been created
appropriately, the rpmbuild --rebuild command completes after the binary
package build is complete. You can access the package in ~/rpmbuild/RPMS.
If you need to modify source, apply alternative patches, or edit the SPEC file to
perform alternate actions during different stages of the build process, you can do so
and then build the binary and source packages again directly from the SPEC file, for
example:
rpmbuild -ba ~/rpmbuild/SPECS/bash.spec
The mock utility requires some preliminary configuration before using it to build for
Oracle Linux sources. A useful starting point is to create a /etc/mock/templates/
ol-8.tpl template file with a configuration similar to the following:
config_opts['chroot_setup_cmd'] = 'install tar gcc-c++ redhat-rpm-config
oraclelinux-release which xz sed \
make bzip2 gzip gcc coreutils unzip shadow-
utils diffutils cpio bash gawk \
rpm-build info patch util-linux findutils
grep'
config_opts['dist'] = 'el8' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['releasever'] = '8'
config_opts['package_manager'] = 'dnf'
config_opts['root'] = 'ol-8-{{ target_arch }}'
config_opts['dnf.conf'] = """
[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
3-2
Chapter 3
Using the mock Utility to Build Sources
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=1
assumeyes=1
syslog_ident=mock
syslog_device=
install_weak_deps=0
metadata_expire=0
best=1
module_platform_id=platform:el8
protected_packages=
# repos
[ol8_baseos_latest]
name=Oracle Linux 8 BaseOS Latest ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_appstream]
name=Oracle Linux 8 Application Stream ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/appstream/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_codeready_builder]
name=Oracle Linux 8 CodeReady Builder ($basearch) - Unsupported
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/codeready/builder/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_distro_builder]
name=Oracle Linux 8 Distro Builder ($basearch) - Unsupported
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/distro/builder/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
"""
Replace /etc/mock/default.cfg with the following content, substituting x86_64 with aarch64
if you intend to build packages for Arm platforms:
include('templates/ol-8.tpl')
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
Before any user can use the mock utility, the user must be added to the mock group. You can
do this by running the following command:
3-3
Chapter 3
Using the mock Utility to Build Sources
Note that if the user is currently logged in, the user may need to log out and then log
back in to the system for the change in group permissions to become active.
When the configuration is in place, you can start to build source packages by using the
mock utility. For example, to simply build a package directly from a source RPM
package:
mock --rebuild bash-4.4.19-12.el8.src.rpm
Packages are built in a chroot environment that is created for the build root that is
defined in the template. You can access the file system used in the chroot
in /var/lib/mock. For example, using the configurations presented in this
documentation would be similar to the following:
ls /var/lib/mock/ol-8-x86_64/root/builddir/build/SRPMS/
bash-4.4.19-12.el8.src.rpm
ls -lh /var/lib/mock/ol-8-x86_64/root/builddir/build/RPMS/
total 4.9M
-rw-r--r--. 1 root mock 1.6M Feb 3 02:10 bash-4.4.19-12.el8.x86_64.rpm
-rw-r--r--. 1 root mock 1.2M Feb 3 02:10 bash-debuginfo-4.4.19-12.el8.x86_64.rpm
-rw-r--r--. 1 root mock 841K Feb 3 02:10 bash-
debugsource-4.4.19-12.el8.x86_64.rpm
-rw-r--r--. 1 root mock 113K Feb 3 02:10 bash-devel-4.4.19-12.el8.x86_64.rpm
-rw-r--r--. 1 root mock 1.3M Feb 3 02:10 bash-doc-4.4.19-12.el8.x86_64.rpm
If you need to work with build artifacts within the mock chroot, you can also do the
following:
mock --shell
3-4
Chapter 3
Using the mock Utility to Build Sources
ls -lah /builddir/
total 20K
drwx------. 1 root 1000 120 Feb 4 09:21 .
dr-xr-xr-x. 1 root root 212 Feb 3 02:06 ..
-rw-------. 1 root root 50 Feb 4 09:21 .bash_history
-rw-r--r--. 1 root 1000 18 Aug 2 2020 .bash_logout
-rw-r--r--. 1 root 1000 141 Aug 2 2020 .bash_profile
-rw-r--r--. 1 root 1000 376 Aug 2 2020 .bashrc
-rw-rw-r--. 1 root root 130 Feb 3 02:06 .rpmmacros
drwxrwxr-x. 1 root 1000 88 Feb 3 02:06 build
You can find out more about mock in the MOCK(1) manual page or at https://github.com/rpm-
software-management/mock/.
3-5
4
Building Modules
This chapter describes how to build DNF modules. Some initial setup is required and this
process is more complicated than building individual source RPMs as a module can be
comprised of many source components and dependencies. The steps described in this
chapter provide information on how to get set up and started building module from the source
packages provided for Oracle Linux 8, using the Module Build Service.
Name : httpd
Stream : 2.4 [d][a]
Version : 8030020200818000036
Context : 9edba152
Architecture : x86_64
Profiles : common [d], devel, minimal
Default profiles : common
Repo : ol8_appstream
Summary : Apache HTTP Server
Description : Apache httpd is a powerful, efficient, and extensible HTTP server.
Requires : platform:[el8]
Artifacts : httpd-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
: httpd-devel-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
: httpd-filesystem-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.noarch
4-1
Chapter 4
Create Git Repositories for Module Sources
: httpd-manual-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.noarch
: httpd-tools-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
: mod_http2-0:1.15.7-2.module+el8.3.0+7816+49791cfd.x86_64
: mod_ldap-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
: mod_md-1:2.0.8-8.module+el8.3.0+7816+49791cfd.x86_64
: mod_proxy_html-1:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
: mod_session-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
: mod_ssl-1:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
Note that the Artifacts section of the output provides the list of packages that are
available for the module.
A single source package can be used to build several binary packages. To determine
which source packages are used for each binary package that is listed, you must use
the dnf repoquery command and disable modular filtering, for example:
dnf repoquery httpd-
filesystem-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.noarch --source -q --
disable-modular-filtering
httpd-2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.src.rpm
Repeat the previous query for each binary package listed in the Artifacts section of
the information that is returned from the yum server for the module.
When you have a list of all of the source packages to be downloaded, you can query
the yum server for the download URL to use to download the source package, for
example:
dnf repoquery httpd-2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.src --location -q
--disable-modular-filtering
https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackageSource/
httpd-2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.src.rpm
Use the URL that is returned by the command to download the source package file.
For example, use the curl command to download the package to the current
directory:
curl -O https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/
getPackageSource/httpd-2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.src.rpm
Repeat these steps to download each source package from the Oracle Linux yum
server.
4-2
Chapter 4
Create Git Repositories for Module Sources
Tip:
If a module for which you intend to build the sources is enabled, you can automate
many of these steps in a simple bash loop, as shown in the following example:
for bin in $(dnf module repoquery nginx:1.14 -q);
do
echo "Checking for sources in $bin"
for src in $(dnf repoquery $bin --source -q);
do
echo "-- Checking source package $src"
if [ ! -f $src ]
then
URL=$(dnf repoquery $(echo "${src%.*}") -q --location --disable-modular-
filtering)
echo "----> Downloading $URL"
curl -O $URL;
fi
done
done
It is not always desirable to enable modules on the build system and enabling some
modules could cause unintended conflicts. This tip is provided for users who are
more familiar with their build environment and what they intend to build.
4-3
Chapter 4
Create Git Repositories for Module Sources
4-4
Chapter 4
Create Git Repositories for Module Sources
minimal:
rpms:
- httpd
api:
rpms:
- httpd
- httpd-devel
- httpd-filesystem
- mod_ssl
components:
rpms:
httpd:
rationale: Apache httpd
ref: stream-2.4-rhel-8.3.0
buildorder: 10
arches: [aarch64, i686, x86_64]
mod_http2:
rationale: HTTP/2 support for Apache httpd
ref: stream-2.4-rhel-8.3.0
buildorder: 20
arches: [aarch64, i686, x86_64]
mod_md:
rationale: Certificate provisioning using ACME for Apache httpd
ref: stream-2.4-rhel-8.3.0
buildorder: 20
arches: [aarch64, i686, x86_64]
artifacts:
rpms:
- httpd-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
- httpd-devel-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
- httpd-filesystem-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.noarch
- httpd-manual-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.noarch
- httpd-tools-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
- mod_http2-0:1.15.7-2.module+el8.3.0+7816+49791cfd.x86_64
- mod_ldap-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
- mod_md-1:2.0.8-8.module+el8.3.0+7816+49791cfd.x86_64
- mod_proxy_html-1:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
- mod_session-0:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
- mod_ssl-1:2.4.37-30.0.1.module+el8.3.0+7816+49791cfd.x86_64
...
Note that the modulemd content that is provided by this output contains additional build
artifacts and cannot be used directly by MBS without modification. To make this content
usable, several keys in the YAML content must be removed, including the xmd and artifacts
entries. Note that the YAML content only starts in the output provided by dnf module info
at the line containing: ---.
You can either save the output from the dnf module info query and edit it manually to
generate a working modulemd file; or you can save the output from this command and run it
through the convert_repodata_modulemd.py script, include in the oracle-mbs-tools
package, to automatically parse it and generate a working YAML modulemd build
configuration file. For example:
dnf module info httpd:2.4:8030020200818000036 -v | convert_repodata_modulemd.py -i
ls *.yaml
httpd-2.4-8030020200818000036-9edba152.yaml
4-5
Chapter 4
Create Git Repositories for Module Sources
Note that you may need to change the version number in the modulemd configuration
file, as you cannot build an existing version of the same module. The typical version
label for modules uses the following convention:
<distribution version><update level><optional module version><date and time>
So for a module from Oracle Linux 8.3 with a version 01 built on 12 April 2021 at
15:30:22, the version would be: 8030120210412153022.
You should always check that the modulemd YAML file is valid before using it. You can
check validity using the modulemd-validator command. For example, run:
modulemd-validator httpd-2.4-8030020200818000036-9edba152.yaml
The following information in the modulemd YAML file is worth noting, as it describes
how source is pulled from Git, as well as the steps you might need to take before you
are able to build a module successfully:
• dependencies/buildrequires: before you are able to build the module, all build
dependencies must be met, specifically any modules listed under the
buildrequires entry must be built and made available before you can proceed
with a local build. If you are only interested in building a particular module, these
build dependencies can be met at build time and MBS can pull the required
modules from your configured yum repositories, as required.
• components/rpms: each component RPM name is used to define the Git repository
name where the source is located at the base URL that MBS is configured to use.
The ref parameter describes which branch should be used to build the correct
RPM packages for the particular module stream defined in the modulemd file.
Search the modulemd YAML file for the components:rpms entries. Each component
RPM entry represents a Git repository and is related to a corresponding source
package. The ref entry provided for each RPM is used to define the branch name
within the Git repository. For example, from the output provided above, the
httpd:2.4:8030020200818000036 module uses sources from the stream-2.4-
rhel-8.3.0 branches in each of the following three Git repositories: httpd, mod_http2
and mod_md.
Use this information to plan corresponding Git repositories and branches, as required
by the modulemd configuration information for each module and stream that you
intend to build.
4-6
Chapter 4
Create Git Repositories for Module Sources
cd component
2. Check out the branch matching the stream ref entry for the component RPM in the
modulemd:
git checkout ref
If the branch does not yet exist, you can create a local branch with:
git checkout -b ref
4. Add the sources to Git and push them to the remote server:
git add *
git push
If you had to create a new local branch to work in, when you push the sources to the
remote server you must ensure that it stores the source in a matching branch:
git push --set-upstream origin ref
$ cd component
4. Modify the modulemd file for this module to replace the ref entries to point to the path of
the new local repository that you have created. For example modify the following entry:
components:
rpms:
httpd:
4-7
Chapter 4
Configure MBS for Remote Source Repositories
so that it reads:
components:
rpms:
httpd:
rationale: Apache httpd
repository: file:///home/build/httpd
buildorder: 10
arches: [aarch64, i686, x86_64]
Ensure that the repository entry provides the file path to the correct location of the
repository that you have created for this source component RPM.
You must edit every ref entry within the modulemd to match the local repository
sources that for the module that you are building.
4-8
Chapter 4
Module Build Service Mock Configuration
Notably, this configuration sets the configuration for the different yum repositories that are
used during the build process to resolve any build dependencies or build requirements. Since
the build runs within a chroot environment, this yum configuration is separated from the host
system where MBS is running.
A working example configuration is provided within the package and enables commonly
required yum repositories. You may want to edit this file for additional repositories, if required.
The following contents of the configuration file are provided for reference purposes:
config_opts['root'] = '$root'
config_opts['target_arch'] = '$arch'
config_opts['legal_host_arches'] = ('$arch',)
config_opts['chroot_setup_cmd'] = 'install oraclelinux-release bash bzip2 coreutils
cpio diffutils findutils gawk gcc\
gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed yum shadow-utils
tar unzip util-linux\
which xz $group'
config_opts['rpmbuild_networking'] = True
config_opts['use_host_resolv'] = True
config_opts['use_nspawn'] = False
config_opts['dist'] = 'el8'
config_opts['dnf_vars'] = $dnf_vars
config_opts['releasever'] = '$releasever'
config_opts['module_enable'] = $enabled_modules
config_opts['use_bootstrap_container'] = False
config_opts['yum.conf'] = """
$yum_conf
[ol8_baseos_latest]
name=Oracle Linux 8 BaseOS Latest ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL8/baseos/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_appstream]
name=Oracle Linux 8 Application Stream ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL8/appstream/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_codeready_builder]
name=Oracle Linux 8 CodeReady Builder ($basearch) - Unsupported
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL8/codeready/
builder/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_distro_builder]
name=Oracle Linux 8 Distro Builder ($basearch) - Unsupported
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL8/distro/builder/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[ol8_developer_EPEL]
4-9
Chapter 4
Triggering a Build
"""
Triggering a Build
A modular build is triggered by using the mbs-manager build_module_locally
command. The command must be specified with several command-line options that
describe how the build process should function. The following example illustrates a
build of the packages for the 389-ds:1.4 module and stream:
mbs-manager build_module_locally --offline --stream 1.4 \
--add-local-build nodejs:10:20210206155331 --file 389-ds-stream-1.4.yaml
4-10
Chapter 4
Test a Module Build
Per the example, you would replace the user, module_name, stream and timestamp
variables with values that are appropriate to the environment you are testing.
Run the following dnf commands to validate that the module information is correct and that
the packages for the module stream can be installed:
sudo dnf module list
4-11