|
Packit Service |
4684c1 |
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/330/badge)](https://bestpractices.coreinfrastructure.org/projects/330)
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|Branch|CI system|Status|Test suite coverage|Fuzzer coverage|
|
|
Packit Service |
4684c1 |
|:----:|:-------:|-----:|:------:|:-------------:|
|
|
Packit Service |
4684c1 |
|Master/3.6.x|Gitlab|[![build status](https://gitlab.com/gnutls/gnutls/badges/master/pipeline.svg)](https://gitlab.com/gnutls/gnutls/commits/master)|[![coverage report](https://gitlab.com/gnutls/gnutls/badges/master/coverage.svg)](https://gnutls.gitlab.io/coverage/master)|[![Fuzzer coverage report](https://gnutls.gitlab.io/coverage/master-fuzz/badge.svg)](https://gnutls.gitlab.io/coverage/master-fuzz)|
|
|
Packit Service |
4684c1 |
|Master/3.6.x|Travis|[![build status](https://travis-ci.org/gnutls/gnutls.svg?branch=master)](https://travis-ci.org/gnutls/gnutls)|N/A|N/A|
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
# GnuTLS -- Information for developers
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
GnuTLS implements the TLS/SSL (Transport Layer Security aka Secure
|
|
Packit Service |
4684c1 |
Sockets Layer) protocol. Additional information can be found at
|
|
Packit Service |
4684c1 |
[www.gnutls.org](https://www.gnutls.org/).
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This file contains instructions for developers and advanced users that
|
|
Packit Service |
4684c1 |
want to build from version controlled sources. See [INSTALL.md](INSTALL.md)
|
|
Packit Service |
4684c1 |
for building released versions.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
We require several tools to check out and build the software, including:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
* [Make](https://www.gnu.org/software/make/)
|
|
Packit Service |
4684c1 |
* [Automake](https://www.gnu.org/software/automake/) (use 1.11.3 or later)
|
|
Packit Service |
4684c1 |
* [Autoconf](https://www.gnu.org/software/autoconf/)
|
|
Packit Service |
4684c1 |
* [Autogen](https://www.gnu.org/software/autogen/) (use 5.16 or later)
|
|
Packit Service |
4684c1 |
* [Libtool](https://www.gnu.org/software/libtool/)
|
|
Packit Service |
4684c1 |
* [Gettext](https://www.gnu.org/software/gettext/)
|
|
Packit Service |
4684c1 |
* [Texinfo](https://www.gnu.org/software/texinfo/)
|
|
Packit Service |
4684c1 |
* [Tar](https://www.gnu.org/software/tar/)
|
|
Packit Service |
4684c1 |
* [Gzip](https://www.gnu.org/software/gzip/)
|
|
Packit Service |
4684c1 |
* [Texlive & epsf](https://www.tug.org/texlive/) (for PDF manual)
|
|
Packit Service |
4684c1 |
* [GTK-DOC](https://www.gtk.org/gtk-doc/) (for API manual)
|
|
Packit Service |
4684c1 |
* [Git](https://git-scm.com/)
|
|
Packit Service |
4684c1 |
* [Perl](https://www.cpan.org/)
|
|
Packit Service |
4684c1 |
* [Nettle](https://www.lysator.liu.se/~nisse/nettle/)
|
|
Packit Service |
4684c1 |
* [Guile](https://www.gnu.org/software/guile/)
|
|
Packit Service |
4684c1 |
* [p11-kit](https://p11-glue.github.io/p11-glue/p11-kit.html)
|
|
Packit Service |
4684c1 |
* [gperf](https://www.gnu.org/software/gperf/)
|
|
Packit Service |
4684c1 |
* [libtasn1](https://www.gnu.org/software/libtasn1/) (optional)
|
|
Packit Service |
4684c1 |
* [Libidn2](https://www.gnu.org/software/libidn/#libidn2) (optional, for internationalization of DNS, IDNA 2008)
|
|
Packit Service |
4684c1 |
* [Libunistring](https://www.gnu.org/software/libunistring/) (optional, for internationalization)
|
|
Packit Service |
4684c1 |
* [AWK](https://www.gnu.org/software/awk/) (for make dist, pmccabe2html)
|
|
Packit Service |
4684c1 |
* [bison](https://www.gnu.org/software/bison) (for datetime parser in certtool)
|
|
Packit Service |
4684c1 |
* [libunbound](https://unbound.net/) (for DANE support)
|
|
Packit Service |
4684c1 |
* [libabigail](https://pagure.io/libabigail/) (for abi comparison in make dist)
|
|
Packit Service |
4684c1 |
* [tcsd](https://trousers.sourceforge.net/) (for TPM support; optional)
|
|
Packit Service |
4684c1 |
* [swtpm](https://github.com/stefanberger/swtpm) (for TPM test; optional)
|
|
Packit Service |
4684c1 |
* [ncat](https://nmap.org/download.html) (for TPM test; optional)
|
|
Packit Service |
4684c1 |
* [tpm-tools](https://trousers.sourceforge.net/) (for TPM test; optional)
|
|
Packit Service |
4684c1 |
* [expect](https://core.tcl.tk/expect/index) (for TPM test; optional)
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The required software is typically distributed with your operating
|
|
Packit Service |
4684c1 |
system, and the instructions for installing them differ. Here are
|
|
Packit Service |
4684c1 |
some hints:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Debian/Ubuntu:
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
apt-get install -y dash git-core autoconf libtool gettext autopoint
|
|
Packit Service |
4684c1 |
apt-get install -y automake autogen nettle-dev libp11-kit-dev libtspi-dev libunistring-dev
|
|
Packit Service |
4684c1 |
apt-get install -y guile-2.2-dev libtasn1-6-dev libidn2-0-dev gawk gperf
|
|
Packit Service |
4684c1 |
apt-get install -y libunbound-dev dns-root-data bison gtk-doc-tools
|
|
Packit Service |
4684c1 |
apt-get install -y texinfo texlive texlive-generic-recommended texlive-extra-utils
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
__NOTE:__ Some software versions might not be available in older releases, e.g. `nettle-dev`.
|
|
Packit Service |
4684c1 |
Available backport repos, APT-Pinning or source code compilating can be used to install these versions (and dependencies) from a newer release.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Fedora/RHEL:
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
yum install -y dash git autoconf libtool gettext-devel automake autogen patch
|
|
Packit Service |
4684c1 |
yum install -y nettle-devel p11-kit-devel autogen-libopts-devel libunistring-devel
|
|
Packit Service |
4684c1 |
yum install -y trousers-devel guile22-devel libtasn1-devel libidn2-devel gawk gperf
|
|
Packit Service |
4684c1 |
yum install -y libtasn1-tools unbound-devel bison gtk-doc texinfo texlive
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Sometimes, you may need to install more recent versions of Automake,
|
|
Packit Service |
4684c1 |
Nettle, P11-kit and Autogen, which you will need to build from sources.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Dependencies that are used during make check or make dist are listed below.
|
|
Packit Service |
4684c1 |
Moreover, for basic interoperability testing you may want to install openssl
|
|
Packit Service |
4684c1 |
and mbedtls.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
* [Valgrind](https://valgrind.org/) (optional)
|
|
Packit Service |
4684c1 |
* [Libasan](https://gcc.gnu.org//) (optional)
|
|
Packit Service |
4684c1 |
* [datefudge](https://packages.debian.org/datefudge) (optional)
|
|
Packit Service |
4684c1 |
* [nodejs](https://nodejs.org/) (needed for certain test cases)
|
|
Packit Service |
4684c1 |
* [softhsm](https://www.opendnssec.org/softhsm/) (for testing smart card support)
|
|
Packit Service |
4684c1 |
* [dieharder](https://www.phy.duke.edu/~rgb/General/dieharder.php) (for testing PRNG)
|
|
Packit Service |
4684c1 |
* [lcov](https://linux-test-project.github.io/) (for code coverage)
|
|
Packit Service |
4684c1 |
* [util-linux](https://github.com/karelzak/util-linux) or just [lscpu](https://github.com/NanXiao/lscpu) (for CPU feature detection)
|
|
Packit Service |
4684c1 |
* [libev](hhttp://software.schmorp.de/pkg/libev.html) (for testing)
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Debian/Ubuntu:
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
apt-get install -y valgrind nodejs softhsm2 datefudge lcov libssl-dev libcmocka-dev expect libev-dev
|
|
Packit Service |
4684c1 |
apt-get install -y dieharder openssl abigail-tools socat net-tools ppp lockfile-progs util-linux
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
__NOTE:__ `libubsan0` and `libasan1` are required on older versions of Ubuntu <= 16.04. This packages must be manually added on these versions:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
apt-get install -y v libubsan0 libasan1
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Fedora/RHEL:
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
yum install -y valgrind libasan libasan-static libubsan nodejs softhsm datefudge lcov openssl-devel expect libev-devel
|
|
Packit Service |
4684c1 |
yum install -y dieharder mbedtls-utils openssl libabigail libcmocka-devel socat lockfile-progs util-linux
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
To download the version controlled sources:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
$ git clone https://gitlab.com/gnutls/gnutls.git
|
|
Packit Service |
4684c1 |
$ cd gnutls
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The next step is to bootstrap and ./configure:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
$ ./bootstrap
|
|
Packit Service |
4684c1 |
$ ./configure
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
When built this way, some developer defaults will be enabled. See
|
|
Packit Service |
4684c1 |
cfg.mk for details.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Then build the project normally, and run the test suite.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
$ make
|
|
Packit Service |
4684c1 |
$ make check
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
To test the code coverage of the test suite use the following:
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
$ ./configure --enable-code-coverage
|
|
Packit Service |
4684c1 |
$ make && make check && make code-coverage-capture
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Individual tests that may require additional hardware (e.g., smart cards)
|
|
Packit Service |
4684c1 |
are:
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
$ sh tests/suite/testpkcs11
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
# Building for windows
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
It is recommended to cross compile using Fedora and the following
|
|
Packit Service |
4684c1 |
dependencies:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
yum install -y wine mingw32-nettle mingw32-libtasn1 mingw32-gcc
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
and build as:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
mingw32-configure --enable-local-libopts --disable-non-suiteb-curves --disable-doc --without-p11-kit
|
|
Packit Service |
4684c1 |
mingw32-make
|
|
Packit Service |
4684c1 |
mingw32-make check
|
|
Packit Service |
4684c1 |
```
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
# Continuous Integration (CI)
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
We utilize two continuous integration systems, the gitlab-ci and travis.
|
|
Packit Service |
4684c1 |
Gitlab-CI is used to test most of the Linux systems (see .gitlab-ci.yml),
|
|
Packit Service |
4684c1 |
and is split in two phases, build image creation and compilation/test. The
|
|
Packit Service |
4684c1 |
build image creation is done at the gnutls/build-images subproject and
|
|
Packit Service |
4684c1 |
uploads the image at the gitlab.com container registry. The compilation/test
|
|
Packit Service |
4684c1 |
phase is on every commit to gnutls project.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The Travis based CI, is used to test compilation on MacOSX based systems.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
# Contributing
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
See [the contributing document](CONTRIBUTING.md).
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Happy hacking!
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
----------------------------------------------------------------------
|
|
Packit Service |
4684c1 |
Copying and distribution of this file, with or without modification,
|
|
Packit Service |
4684c1 |
are permitted in any medium without royalty provided the copyright
|
|
Packit Service |
4684c1 |
notice and this notice are preserved.
|