Build the RPM package for the application manifests
To build your own RPMs, you must create a spec file that adds the application manifests to the RPM package. If the application RPMs and other elements needed for image building are accessible to image builder, you can use the method that you prefer.
The following is an example procedure.
-
You have set up a Red Hat Enterprise Linux for Edge (RHEL for Edge) 9.6 build host that meets the image builder system requirements.
-
You have root access to the host.
-
The file tree required to build RPM packages was created.
-
In the
~/rpmbuild/SPECSdirectory, create a file such as<application_workload_manifests.spec>using the following template:Example spec fileName: <application_workload_manifests> Version: 0.0.1 Release: 1%{?dist} Summary: Adds workload manifests to microshift BuildArch: noarch License: GPL Source0: %{name}-%{version}.tar.gz #Requires: microshift %description Adds workload manifests to microshift %prep %autosetup %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/microshift/manifests cp -pr ~/manifests $RPM_BUILD_ROOT/%{_prefix}/lib/microshift/ %clean rm -rf $RPM_BUILD_ROOT %files %{_prefix}/lib/microshift/manifests/** %changelog * _<DDD MM DD YYYY username@domain - V major.minor.patch> - <your_change_log_comment>The
%installsection creates the target directory inside the RPM package,/usr/lib/microshift/manifests/and copies the manifests from the source home directory,~/manifests.All of the required YAML files must be in the source home directory
~/manifests, including akustomize.yamlfile if you are using kustomize. -
Build your RPM package in the
~/rpmbuild/RPMSdirectory by running the following command:$ rpmbuild -bb ~/rpmbuild/SPECS/<application_workload_manifests.spec>