TomcatJSS Fedora source package is located at https://src.fedoraproject.org/rpms/tomcatjss.


$ dnf install git fedpkg rpm-build
$ dnf builddep tomcatjss

Getting Source Package#

To get the source package:

$ fedpkg clone tomcatjss ``\ ``Fedora/tomcatjss

The above command will create a new Fedora/tomcatjss folder.

To add a forked repository:

$ cd Fedora/tomcatjss
$ git remote add ``\ `` ``\ ```ssh:// <ssh://>`__@pkgs.fedoraproject.org/forks//rpms/tomcatjss.git

Updating Source Package#

Creating Source Tarball from Current Directory#

To create a source tarball from the current directory:

$ ant dist

The source tarball will be created in dist/source/tomcatjss-7.3.0.tar.gz. Move it into the source package:

$ mv dist/source/tomcatjss-7.3.0.tar.gz ../Fedora/tomcatjss

Creating Source Tarball from Git Repository#

Go to TomcatJSS upstream repository and execute the following:

$ VERSION=`grep "Version:" tomcatjss.spec | awk '{print $2;}'`
$ git archive --format=tar.gz --prefix tomcatjss-7.3.0/ -o ../Fedora/tomcatjss/tomcatjss-7.3.0.tar.gz -v HEAD

Downloading Source Tarball from GitHub#

Source tarball and patch files can be downloaded directly from GitHub, for example:

Updating Source Checksum#

To update the source checksum:

$ sha512sum --tag tomcatjss-7.3.0.tar.gz > sources

The sources file should contain something like this:

SHA512 (tomcatjss-7.3.0.tar.gz) = 6394d725af4fed1ace96963b306c62b90252654558e2f0eace8a0a31018934994fcf25ef5cedf07dea9b355f4fb078498db5e9e979dd9f1d6976fe91fafc680e

Merging RPM Spec Changes#

Changes in RPM spec file template needs to be merged with the actual RPM spec file. Use a visual merge tools such as Meld or Diffuse.

$ meld tomcatjss.spec.in ../Fedora/tomcatjss/tomcatjss.spec

The development source URL can be defined as follows:

Source:           https://github.com/dogtagpki/pki/archive/%{commit}/tomcatjss-%{commit}.tar.gz

%autosetup -n tomcatjss-%{commit} -p 1

The official source URL can be defined as follows:

Source:           https://github.com/dogtagpki/pki/archive/v%{version}/tomcatjss-%{version}.tar.gz

%autosetup -n tomcatjss-%{version} -p 1

Building TomcatJSS Package#

Creating Local Build#

To create a local build:

$ fedpkg local

Creating SRPM#

To create an SRPM:

$ fedpkg srpm

Creating Mock Build#

To create Mock build:

$ fedpkg mockbuild --root fedora-rawhide-x86_64

Creating COPR Build#

To create a COPR build for all platforms:

$ fedpkg copr-build <username>/pki-10.6

To create a COPR build for certain platforms only, create an SRPM, then execute the following command:

$ copr build <username>/pki-10.6 <SRPM> \
  -r fedora-27-x86_64 \
  -r fedora-28-x86_64 \
  -r fedora-rawhide-x86_64