To clone the source repository:
$ git clone git@github.com:dogtagpki/pki.git
$ cd pkiBy default it will checkout the master branch.
To list available branches:
$ git branch -rTo switch to a different branch:
$ git checkout <branch>The branch names follow the following formats:
masterv<major>v<major>.<minor>DOGTAG_<major>_<minor>_BRANCH
During development PKI may require dependencies that are only available in COPR repositories.
The COPR repository names follow the following formats:
@pki/master@pki/<major>@pki/<major>.<minor>
Enable the COPR repository that corresponds to the current branch:
$ sudo dnf copr -y enable <repository>To install PKI dependencies:
$ sudo dnf builddep -y --spec pki.specTo build PKI:
$ ./build.sh [OPTIONS] <target>Available targets:
dist: build PKI binaries (default)install: install PKI binariessrc: build RPM sources (tarball and patch)spec: build RPM sources and RPM specsrpm: build RPM sources, RPM spec, and SRPM packagerpm: build RPM sources, RPM spec, SRPM package, and RPM packages
To build the binaries:
$ ./build.sh distIt will build the binaries with the current files in the source directory.
The package version number and release number will be determined by the macros defined in the pki.spec.
To install the binaries:
$ ./build.sh installThe default working directory is ~/build/pki.
To change the working directory:
$ ./build.sh --work-dir=<path>To build RPM packages:
$ ./build.sh rpmThe following subfolders will be created in the working directory:
BUILD: contains unpacked source codeBUILDROOT: contains installed binariesRPMS: contains the binary packagesSOURCES: contains the tarball and patch filesSPECS: contains the spec fileSRPMS: contains the source package
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 rpmThe default distribution name can be obtained with the following command:
$ rpm --eval '%{dist}' | cut -c 2-To change the distribution name:
$ ./build.sh --dist=<name> rpmNote: The distribution name should not be prefixed with a dot (e.g. fc36).
To build with the source code already committed into the current branch:
$ ./build.sh --source-tag=HEAD rpmThis will produce the following file:
pki-<version>.tar.gz: tarball containing the source code up to theHEADof the branch
To build with a tarball and a patch file:
$ ./build.sh --source-tag=<tag> rpmThis will produce the following files:
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 toHEAD
To build the specified packages only:
$ ./build.sh --with-pkgs=base,server,ca,kra,ocsp,tks,tps,acme rpmTo build everything except the specified packages:
$ ./build.sh --without-pkgs=javadoc,theme,meta,tests,debug rpmAvailable packages:
baseservercakraocsptkstpsacmejavadocthememetatestsdebug
To install the RPM packages:
$ sudo dnf install ~/build/pki/RPMS/*