Blame README.md

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