Overview#

This page describes the process to build Mozilla LDAP SDK.

Note that the text in red may need to be adjusted according to the local environment.

Prerequisites#

$ dnf install mercurial git-remote-hg
$ dnf install fedpkg

Getting Source Code#

LDAP SDK source repository#

The LDAP SDK source repository contains the source code. This is where the development should be done.

There are two ways to get the source code, either using Mercurial or Git. Only one of them is needed.

To get the source repository using Mercurial:

$ hg clone ``\ ```https://hg.mozilla.org/projects/ldap-sdks <https://hg.mozilla.org/projects/ldap-sdks>`__`` \ ``ldap-sdks

To get the source repository using Git:

$ git clone hg::`https://hg.mozilla.org/projects/ldap-sdks <https://hg.mozilla.org/projects/ldap-sdks>`__`` \ ``ldap-sdks

The above command will create a new ldap-sdks folder.

LDAP SDK package repository#

The LDAP SDK package repository contains the files needed to build packages (i.e. source tarball, RPM spec file, patch files), but not the source code itself.

To get the package repository for Fedora:

$ fedpkg clone ldapjdk ``\ ``Fedora/ldapjdk

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

Building Fedora Packages#

To build Fedora packages, first generate a new the source archive (no need to build upstream binaries).

Go to ldap-sdks folder, make sure all changes are committed. If the source repository was cloned using Mercurial, execute the following:

$ hg archive -p ldapjdk-4.19`` -r default -t tgz -I buildjsdk.txt -I java-sdk ../\ ``Fedora/ldapjdk/ldapjdk-4.19.tar.gz

or if the source repository was cloned using Git, execute the following:

$ git archive --format=tar.gz --prefix ldapjdk-4.19/ldapjdk/ -o ../Fedora/ldapjdk/ldapjdk-4.19.tar.gz -v HEAD

Then go to Fedora/ldapjdk folder and follow the instructions below.

Update the source checksum, for example:

$ sha512sum --tag ldapjdk-4.19.tar.gz > sources

To build Fedora packages:

$ fedpkg local

To install the packages:

$ sudo dnf install noarch/*.rpm

or reinstall the packages (if the same version/release number has already been installed):

$ sudo dnf reinstall noarch/*.rpm

References#