To clone the source repository:
$ git clone [email protected]:dogtagpki/pki.git $ cd pki
By default it will checkout the master branch.
To list available branches:
$ git branch -r
To switch to a different branch:
$ git checkout <branch>
The branch names follow the following format:
DOGTAG_<major>_<minor>_BRANCH
During development PKI may require dependencies that are only available in PKI COPR repository.
To enable PKI COPR repository:
$ dnf copr -y enable @pki/<major>.<minor>
To install PKI dependencies:
$ dnf builddep -y --spec pki.spec
To build PKI packages:
$ ./build.sh [OPTIONS] <target>
Available packages:
- base
- server
- ca
- kra
- ocsp
- tks
- tps
- javadoc
- console
- theme
- meta
- debug
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/pki. 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 all packages with the current files in the source directory.
The package version number and release number will be determined by the Version and Release attributes in the pki.spec.
To change the working directory:
$ ./build.sh --work-dir=<working directory>
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
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=<distribution name>
Note: The distribution name should not be prefixed with a dot (e.g. fc28).
To build with the source code already checked into the current branch:
$ ./build.sh --source-tag=HEAD
This will produce the following source:
- pki-<version>.tar.gz: tarball containing the source code up to the HEAD of the branch
To build with a tarball and a patch file:
$ ./build.sh --source-tag=<tag>
This will produce the following sources:
- pki-<version>.tar.gz: a tarball containing the source code tagged with <tag>
- pki-<version>-<release>.patch: a combined patch containing all changes after <tag> up to HEAD
To build specified packages only:
$ ./build.sh --with-pkgs=base,server,ca,kra
To build everything except the specified packages:
$ ./build.sh --without-pkgs=base,server,ca,kra
It is equivalent to:
$ ./build.sh --with-pkgs=ocsp,tks,tps,javadoc,console,theme,meta,debug
To install the newly built packages:
$ dnf install $HOME/build/pki/RPMS/*