Overview#

This page describes the development process for JSS 4.5 or later. For older version see this page.

Dependencies#

During development JSS may require dependencies that are only available in COPR Repositories.

To enable PKI COPR repository:

$ dnf copr -y enable @pki/10.6

To install JSS dependencies:

$ dnf builddep -y --spec jss.spec.in

Building JSS Packages#

To build JSS packages:

$ ./build.sh [OPTIONS] [target]

Available targets:

  • src: build RPM sources (tarball and patch)

  • spec: build RPM spec and everything above

  • srpm: build SRPM package and everything above

  • rpm: build RPM packages and everything above (default)

The default working directory is $HOME/build/jss. During the build process the following subfolders will be created:

  • BUILD: contains unpacked source code

  • BUILDROOT: contains installed binaries

  • RPMS: contains the binary packages

  • SOURCES: contains the tarball and patch files

  • SPECS: contains the spec file

  • SRPMS: contains the source package

To start the build process:

$ ./build.sh

It will build JSS packages with the files in the local source directory.

The package version number and release number will be determined by the Version and Release attributes in the jss.spec.in.

Changing Working Directory#

To change the working directory:

$ ./build.sh --work-dir=/tmp/jss

Adding Timestamp and Commit ID#

To add the current timestamp and the latest commit ID of the current branch into the release number:

$ ./build.sh --with-timestamp --with-commit-id

Changing Distribution Name#

The default distribution name can be obtained with the following command:

$ rpm --eval '%{dist}' | cut -c 2-

To change the distribution name:

$ ./build.sh --dist=

Note: The distribution name should not be prefixed with a dot (e.g. fc28).

Building with Current Branch#

To build with the code already checked into the current branch:

$ ./build.sh --source-tag=HEAD

This will produce the following source:

  • jss-.tar.gz: tarball containing the source code up to the HEAD of the branch

Building with Patched Tarball#

To build with a tarball and a patch file:

$ ./build.sh --source-tag=v4.5.0

This will produce the following sources:

  • jss-.tar.gz: a tarball containing the source code tagged with v4.5.0

  • jss–.patch: a combined patch containing all changes after v4.5.0 up to HEAD

Notes:

  • Do not specify a tag that does not exist in the current branch.

  • The patch can be split into smaller patches if necessary.

  • It may be possible to add another option to generate separate patch for each commit instead of a combined one.

Installing JSS Packages#

To install JSS packages:

$ dnf install $HOME/build/jss/RPMS/*

References#