Skip to content

Commit

Permalink
cleanup: distfiles focus on user-visible packaging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abower-amd committed Nov 22, 2024
1 parent c4f4c00 commit 1d4c484
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 28 deletions.
37 changes: 36 additions & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Build requirements
Additionally, building RPMs requires `python3-devel` and
automatic versioning by `onload_mkdist` requires `git`.


Distributing as tarball
============

Expand All @@ -59,9 +60,24 @@ Distributing as tarball
target machine. Note that the built tarball can be installed with `--debug`
to enable debugging mode, which provides additional logging and error-checking.


Distributing as DEB or RPM package
==================================

`onload_mkpackage`
------------------

This script provides backwards-compatible support for `onload_mkdkms` and
`onload-make-official-srpm` as part of its more complete feature set for
package delivery. It can build source and/or binary RPM and DEB packages
from working tree or release tarball. It can filter any combination of DKMS,
Akmod, kmod, devel, and userland packages, and variants such as debug. It can
then install and load on local host for end-to-end testing and deployment or
build within Red Hat Mock for deployment elsewhere.

Usage
-----

To install Onload from source as DEB or RPM packages:

./scripts/onload_mkpackage --install
Expand All @@ -78,6 +94,23 @@ installing these source packages. Alternatively, these artifacts can simply
be specified as command line arguments to `onload_mkpackage` for use as inputs
in place of the current working tree.


Distributing as DKMS
====================

Since onload-9.0.0, the Onload mkdist tarball is now also the DKMS tarball.

Configuration file `dkms.conf` is now embedded in the Onload mkdist tarball,
enabling the `dkms` system to ingest it directly.[^1] This has simplified the
build flow, obsoleting the separate `onload_mkdkms` script along with its
RPM SPEC file. Instead, the DKMS RPM is now a sub-package of the main SPEC.
The DKMS solution for Debian was already a sub-package generated by the
Debian source package for Onload.

[^1]: To ingest directly in 2.2 < DKMS < 3.0.11, work around DKMS bug SC2157
by replacing `dkms ldarchive ...` with `tar xf onload-*.tgz -C /usr/src`.


Distributing as container image
===============================

Expand Down Expand Up @@ -115,6 +148,7 @@ Distributing as container image
These images are designed for reuse in compatible libc environments (eg. as input
to `COPY --from=`) rather than as a base image (ie. not `FROM onload-user`).


Building directly from repository
============

Expand Down Expand Up @@ -208,7 +242,8 @@ Installing from repository

scripts/onload <app>


Copyright
=========

This file: (c) Copyright 2020,2023 Xilinx, Inc.
This file: (c) Copyright 2020,2023-2024 Advanced Micro Devices, Inc.
35 changes: 8 additions & 27 deletions src/onload/distfiles/ReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,9 @@ Linux distribution support
- Debian 12 "Bookworm"
- Linux kernels 5.11 - 6.11

Packaging changes
-----------------

- Onload mkdist tarball is now also the DKMS tarball

Configuration file `dkms.conf` is now embedded in the Onload mkdist tarball,
enabling the `dkms` system to ingest it directly.[^1] This has simplified the
build flow, obsoleting the separate `onload_mkdkms` script along with its
RPM SPEC file. Instead, the DKMS RPM is now a sub-package of the main SPEC.

- Optional sub-packages

When building RPM or DEB packages, all sub-packages are built by default.
It is now possible to choose outputs. For example, to build only userland
and DKMS sub-packages:

rpmbuild -tb --without kmod --without akmod onload-*.tgz # RPM
debuild -i -uc -us --build-profiles=pkg.onload.nosource # DEB
Additional packaging options
----------------------------

- Akmods RPM sub-package as alternative to DKMS

Expand All @@ -50,18 +35,14 @@ Packaging changes
yum install -y onload-user onload-akmod
/usr/sbin/akmods # Optionally, build immediately

- New combined script `./scripts/onload_mkpackage`
- Optional sub-packages

This script provides backwards-compatible support for `onload_mkdkms` and
`onload-make-official-srpm` as part of its more complete feature set for
package delivery. It can build source and/or binary RPM and DEB packages
from working tree or release tarball. It can filter any combination of DKMS,
Akmod, kmod, devel, and userland packages, and variants such as debug. It can
then install and load on local host for end-to-end testing and deployment or
build within Red Hat Mock for deployment elsewhere.
When building RPM or DEB packages, all sub-packages are built by default.
It is now possible to choose outputs. For example, to build only userland
and DKMS sub-packages:

[^1]: To ingest directly in 2.2 < DKMS < 3.0.11, work around DKMS bug SC2157
by replacing `dkms ldarchive ...` with `tar xf onload-*.tgz -C /usr/src`.
rpmbuild -tb --without kmod --without akmod onload-*.tgz # RPM
debuild -i -uc -us --build-profiles=pkg.onload.nosource # DEB


Deprecation of tarball installation method (removal under consideration)
Expand Down

0 comments on commit 1d4c484

Please sign in to comment.