Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (12056)
;; emacs local configuration settings for knot source
;; surmised by dkg on 2017-03-25 12:15:55-0500
((c-mode
(indent-tabs-mode . t)
(tab-width . 8)
(c-basic-offset . 8)
(c-file-style . "linux"))
)
.git
/*.tar.gz
/*.tar.bz2
/*.tar.xz
*.swp
*~
*.la
*.a
*.o
*.orig
*.lo
*.rej
*.pyc
*.pc
.libs/
.deps/
.dirstamp
/tmp
/Knot.creator.user*
/Makefile
/Makefile.in
/src/Makefile
/src/Makefile.in
/src/tests/Makefile
/src/tests/Makefile.in
/src/zscanner/Makefile
/src/zscanner/Makefile.in
/samples/Makefile
/samples/Makefile.in
/doc/Makefile
/doc/Makefile.in
/man/Makefile
/man/Makefile.in
/Knot.cflags
/Knot.cxxflags
/Doxyfile
/aclocal.m4
/ar-lib
/autoscan.log
......@@ -45,55 +36,69 @@
/src/config.h
/src/config.h.in
/src/stamp-*
/doc/html/
/INSTALL
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/src/knot/conf/libknotd_la-cf-lex.c
/src/knot/conf/libknotd_la-cf-parse.c
/src/knot/conf/libknotd_la-cf-parse.h
/tests/sample_conf.c
/src/zscanner/descriptor.h
/src/zscanner/descriptor.c
/src/zscanner/scanner.c
/src/zscanner/tests/tap/libtap.a
/tests/tap/libtap.a
/tests/tmp/
/src/zscanner/tests/tmp/
/test-driver
Makefile
Makefile.in
/src/lib*/version.h
/samples/knot.sample.conf
/src/knot/modules/static_modules.h
# dnstap
/src/contrib/dnstap/Makefile
/src/contrib/dnstap/Makefile.in
/src/contrib/dnstap/dnstap.pb-c.c
/src/contrib/dnstap/dnstap.pb-c.h
# zscanner
/src/libzscanner/scanner.c
# xdp
/src/libknot/xdp/bpf-kernel.ll
# Binaries
/src/knotc
/src/knotd
/src/kcatalogprint
/src/kdig
/src/keymgr
/src/khost
/src/knsupdate
/src/kjournalprint
/src/knotc
/src/knotd
/src/knsec3hash
/src/zscanner/tests/runtests
/src/zscanner/tests/zscanner-tool
/tests/runtests
/tests/acl
/tests/base32hex
/tests/base64
/tests/conf
/tests/descriptor
/tests/dname
/tests/dnssec_keys
/tests/dnssec_nsec3
/tests/dnssec_sign
/tests/dnssec_zone_nsec
/tests/dthreads
/tests/events
/tests/fdset
/tests/hattrie
/tests/hhash
/tests/journal
/tests/rrl
/tests/rrset
/tests/server
/tests/slab
/tests/wire
/tests/zonedb
/tests/ztree
/src/knsupdate
/src/kxdpgun
/src/kzonecheck
/src/kzonesign
# Generated tarballs
/knot-*.tar.xz
# Packaging output
/pkg
# Code coverage
*.gcda
*.gcno
/coverage.info
/coverage.html
# Vagrant
.vagrant
# eclipse
/.project
/.cproject
/.settings/
# cygwin
*.exe
*.exe.manifest
# clang
.qtc_clangd
variables:
DEBIAN_FRONTEND: noninteractive
LC_ALL: C
GIT_STRATEGY: fetch
DOCKER_DRIVER: overlay2
GIT_SUBMODULE_STRATEGY: recursive
DISTROTEST_PRIORITY: 6
PKGTEST: 0
stages:
- image
- build
- test
- pkg
- documentation
.image: &image
stage: image
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --no-cache -t "$IMAGE_TAG" "scripts/docker/$IMAGE_NAME-$IMAGE_VER"
- docker push "$IMAGE_TAG"
tags:
- dind
only:
variables:
- $SCHEDULE_TYPE == "weekly"
docker:knot-dns:debian:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:debian-arm64:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME-arm64:$IMAGE_VER
tags:
- dind
- arm64
docker:knot-dns:debian:unstable:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: unstable
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:ubuntu:
<<: *image
variables:
IMAGE_NAME: ubuntu
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:rocky:
<<: *image
variables:
IMAGE_NAME: rocky
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:fedora:
<<: *image
variables:
IMAGE_NAME: fedora
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
.fedora_latest: &fedora_latest
image: "$CI_REGISTRY/knot/knot-dns/fedora:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.rocky_latest: &rocky_latest
image: "$CI_REGISTRY/knot/knot-dns/rocky:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.debian_stable: &debian_stable
image: "$CI_REGISTRY/knot/knot-dns/debian:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.debian_stable_arm64: &debian_stable_arm64
image: "$CI_REGISTRY/knot/knot-dns/debian-arm64:latest"
tags:
- docker
- linux
- arm64
except:
- schedules
.debian_unstable: &debian_unstable
image: "$CI_REGISTRY/knot/knot-dns/debian:unstable"
tags:
- docker
- linux
- amd64
except:
- schedules
.ubuntu_latest: &ubuntu_latest
image: "$CI_REGISTRY/knot/knot-dns/ubuntu:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.build: &build_job
stage: build
script:
- autoreconf -fi
- ./configure --disable-fastparser --enable-quic $EXTRA_CONFIGURE || ( cat config.log && exit 1 )
- make all V=1
artifacts:
untracked: true
expire_in: '1 hour'
except:
- schedules
.test: &test_job
stage: test
before_script:
- find -exec touch -t $(date +%m%d%H%M) {} \;
script:
- make check V=1
except:
- schedules
build:fedora:amd64:
<<: *fedora_latest
<<: *build_job
test:fedora:amd64:
<<: *fedora_latest
<<: *test_job
dependencies:
- build:fedora:amd64
build:rocky:amd64:
<<: *rocky_latest
<<: *build_job
test:rocky:amd64:
<<: *rocky_latest
<<: *test_job
dependencies:
- build:rocky:amd64
build:ubuntu:amd64:
<<: *ubuntu_latest
<<: *build_job
test:ubuntu:amd64:
<<: *ubuntu_latest
<<: *test_job
dependencies:
- build:ubuntu:amd64
build:debian:amd64:
variables:
EXTRA_CONFIGURE: --enable-xdp=yes
<<: *debian_stable
<<: *build_job
except: # run on schedules as well, for debian:symbols tests
test:debian:amd64:
<<: *debian_stable
<<: *test_job
dependencies:
- build:debian:amd64
build:debian:arm64:
<<: *debian_stable_arm64
<<: *build_job
test:debian:arm64:
<<: *debian_stable_arm64
<<: *test_job
dependencies:
- build:debian:arm64
build:debian:unstable:amd64:
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64
build:debian:unstable:amd64:asan:
variables:
CC: clang
CFLAGS: "-fsanitize=address -g -O2 -fno-omit-frame-pointer"
LDFLAGS: "-fsanitize=address"
LSAN_OPTIONS: verbosity=1:log_threads=1
allow_failure: true
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:asan:
variables:
CC: clang
CFLAGS: "-fsanitize=address -g -O2"
LDFLAGS: "-fsanitize=address"
LSAN_OPTIONS: verbosity=1:log_threads=1
allow_failure: true
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64:asan
build:debian:unstable:amd64:ubsan:
variables:
CC: clang
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
allow_failure: true
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:ubsan:
variables:
CC: clang
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
allow_failure: true
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64:ubsan
build:archive:
<<: *debian_stable
stage: build
script:
- autoreconf -fi
- mkdir _build
- cd _build
- ../configure
- make distcheck V=1 DISTCHECK_CONFIGURE_FLAGS="--disable-static" -j2
- make html singlehtml
only:
- master
- tags
- triggers
- schedules
except: []
artifacts:
paths:
- _build/*.tar.xz
- _build/doc/_build/html
- _build/doc/_build/singlehtml
pages:
stage: documentation
needs:
- build:archive
script:
- mkdir -p public/master
- mv _build/doc/_build/html public/master/html
- mv _build/doc/_build/singlehtml public/master/singlehtml
only:
- master
artifacts:
paths:
- public
build:documentation:
<<: *debian_stable
stage: documentation
only:
- tags
- triggers
dependencies:
- build:debian:amd64
script:
- make -C doc html singlehtml pdf epub V=1
artifacts:
paths:
- doc/_build/html/
- doc/_build/singlehtml/
- doc/_build/latex/KnotDNS.pdf
- doc/_build/epub/KnotDNS.epub
expire_in: '1 hour'
# packaging tests using apkg
.apkg_image: &apkg_image
# apkg images use LC_ALL=C.UTF-8
variables:
LC_ALL: C.UTF-8
.pkg_test: &pkg_test
<<: *apkg_image
stage: pkg
needs:
- pkg:make-archive
only:
variables:
- $PKGTEST == "1"
artifacts:
paths:
- pkg/
expire_in: '1 week'
script:
- python3 -m pip install git+https://gitlab.nic.cz/packaging/apkg.git
# make sure the archive from pkg:make-archive is available
- apkg info cache | grep archive/dev
- apkg install --build-dep
- apkg test --test-dep
.pkg_test_deb: &pkg_test_deb
<<: *pkg_test
before_script:
- apt update
pkg:make-archive:
# archive is created once and reused in other pkg jobs
<<: *apkg_image
stage: pkg
needs:
- build:debian:amd64
only:
variables:
- $PKGTEST == "1"
image: $CI_REGISTRY/packaging/apkg/test/debian-12
artifacts:
paths:
- pkg/
before_script:
- apt update
script:
- python3 -m pip install apkg
- apkg build-dep
- apkg make-archive
pkg:debian-13:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-13
pkg:debian-12:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-12
pkg:debian-11:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-11
pkg:ubuntu-24.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-24.04
pkg:ubuntu-22.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-22.04
pkg:ubuntu-20.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-20.04
pkg:fedora-41:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/fedora-41
pkg:fedora-40:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/fedora-40
pkg:alma-9:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/alma-9
pkg:rocky-8:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/rocky-8
pkg:opensuse-15.6:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/opensuse-15.6
[submodule "tests-fuzz/fuzz_zscanner.in"]
path = tests-fuzz/fuzz_zscanner.in
url = https://gitlab.nic.cz/knot/fuzzing/fuzz_zscanner.in.git
[submodule "tests-fuzz/fuzz_packet.in"]
path = tests-fuzz/fuzz_packet.in
url = https://gitlab.nic.cz/knot/fuzzing/fuzz_packet.in.git
Ľuboš Slovák <lubos.slovak@nic.cz>
Marek Vavruša <marek.vavrusa@nic.cz>
Jan Kadlec <jan.kadlec@nic.cz>
Daniel Salzman <daniel.salzman@nic.cz>
Jan Včelák <jan.vcelak@nic.cz>
Ondřej Surý <ondrej.sury@nic.cz>
Ondřej Filip <ondrej.filip@nic.cz>
This diff is collapsed.
## Intermediate stage ##
FROM debian:bookworm-slim AS builder
# Environment
ENV BUILD_PKGS \
autoconf \
automake \
gcc \
libbpf-dev \
libedit-dev \
libfstrm-dev \
libgnutls28-dev \
libidn2-dev \
liblmdb-dev \
libmaxminddb-dev \
libmnl-dev \
libnghttp2-dev \
libngtcp2-crypto-gnutls-dev \
libngtcp2-dev \
libprotobuf-c-dev \
libsystemd-dev \
libtool \
liburcu-dev \
libxdp-dev \
make \
pkg-config \
protobuf-c-compiler
# Install dependencies
RUN apt-get update && \
apt-get install -yqq ${BUILD_PKGS}
# Build the project
COPY . /knot-src
WORKDIR /knot-src
ARG FASTPARSER=disable
RUN autoreconf -if && \
CFLAGS="-g -O2 -DNDEBUG -D_FORTIFY_SOURCE=3 -fstack-protector-strong" \
./configure --prefix=/ \
--with-rundir=/rundir \
--with-storage=/storage \
--with-configdir=/config \
--with-module-dnstap=yes \
--${FASTPARSER}-fastparser \
--enable-quic \
--enable-dnstap \
--disable-static \
--disable-documentation && \
make -j$(grep -c ^processor /proc/cpuinfo)
# Run unittests if requested and install the project
ARG CHECK=disable
RUN if [ "$CHECK" = "enable" ]; then make -j$(grep -c ^processor /proc/cpuinfo) check; fi && \
make install DESTDIR=/tmp/knot-install
## Final stage ##
FROM debian:bookworm-slim
LABEL maintainer="Knot DNS <knot-dns@labs.nic.cz>"
# Environment
ENV RUNTIME_PKGS \
dbus \
libbpf1 \
libedit2 \
libfstrm0 \
libgnutls30 \
libidn2-0 \
liblmdb0 \
libmaxminddb0 \
libmnl0 \
libnghttp2-14 \
libngtcp2-crypto-gnutls2 \
libngtcp2-9 \
libprotobuf-c1 \
liburcu8 \
libxdp1
# Install dependencies and create knot user and group
ARG UID=53
RUN apt-get update && \
apt-get install -yqq ${RUNTIME_PKGS} adduser && \
rm -rf /var/lib/apt/lists/* && \
ldconfig && \
adduser --quiet --system --group --no-create-home --home /storage --uid=${UID} knot && \
install -o knot -g knot -d /config /rundir /storage
# Copy artifacts
# `COPY --from=builder /tmp/knot-install/ /` doesn't work with DOCKER_BUILDKIT=1 under buildx
COPY --from=builder /tmp/knot-install/bin/ /bin/
COPY --from=builder /tmp/knot-install/config/ /config/
COPY --from=builder /tmp/knot-install/include/ /include/
COPY --from=builder /tmp/knot-install/lib/ /lib/
COPY --from=builder /tmp/knot-install/sbin/ /sbin/
# Prepare configurations for optional D-Bus signaling
COPY --from=builder /knot-src/distro/common/system-local.conf /etc/dbus-1/
COPY --from=builder /knot-src/distro/common/cz.nic.knotd.conf /usr/share/dbus-1/system.d/
RUN mkdir -p /run/dbus
# Expose port
EXPOSE 53/UDP
EXPOSE 53/TCP
EXPOSE 853/UDP
EXPOSE 853/TCP
# Prepare shared directories
VOLUME /config
VOLUME /rundir
VOLUME /storage
/*!
\defgroup server Server control module.
\defgroup threading Threading API.
\defgroup network Socket API.
\defgroup config Server configuration.
\defgroup query_processing DNS query processing.
\defgroup utils Utilities, constants and macros.
\defgroup debugging Server debugging API.
\defgroup logging Server logging API.
\defgroup statistics Statistics module (optional).
\defgroup libknot libknot - library of DNS-related functions
\defgroup hashing Hash table and functions.
\defgroup common_lib Common library.
\defgroup alloc Memory allocation.
\defgroup tests Unit tests.
\defgroup zoneparser Zone compiler utility
\defgroup ctl Control utility
\defgroup zone-load-dump Zone loading and dumping
\defgroup xfr Zone transfers
\defgroup zone_scanner Zone scanner (core)
\defgroup zone_scanner_test Zone scanner testing environment
\defgroup knot_utils DNS utilities like host, dig and nsupdate
\mainpage Knot API documentation.
Knot is an open-source, high-performace, purely authoritative DNS server.
<h2>Features</h2>
Knot DNS supports the following DNS features:
- TCP/UDP protocols
- AXFR - master, slave
- IXFR - master (primary master experimental), slave
- TSIG
- ENDS0
- DNSSEC, including NSEC3
- NSID
- Unknown RR types
Server features:
- Adding/removing zones on-the-fly
- Reconfiguring server instance on-the-fly
- IPv4 / IPv6 support
- Semantic checks of zones
<h2>Compiling and running the server</h2>
See the User manual - links to current version are provided in the
<a href="https://git.nic.cz/redmine/projects/knot-dns/wiki">Knot DNS Wiki</a>.
Alternatively you can generate the manual from the sources in Info format:
\code
$ make doc
\endcode
or in PDF:
\code
$ make pdf
\endcode
<h2>Server modules</h2>
- \ref server
- \ref threading
- \ref network
- \ref config
- \ref query_processing
- \ref utils
- \ref debugging
- \ref logging
- \ref statistics
<h2>DNS library</h2>
- \ref libknot
- \ref hashing
- \ref xfr
<h2>Zone processing</h2>
- \ref zoneparser
- \ref zone-load-dump
- \ref zone_scanner
- \ref zone_scanner_test
<h2>Common library</h2>
- \ref common_lib
- \ref alloc
<h2>Other modules</h2>
- \ref tests
- \ref ctl
*/
This diff is collapsed.
This diff is collapsed.
Features not supported
======================
Here is a list of the most notable features that are not supported in the
current version of Knot.
* Other DNS classes than IN, partially CH (CS, HS)
Known bugs
==========
* Rarely, incremental transfer fails to reschedule
* Rarely when DNSSEC is enabled, Knot crashes in OpenSSL code
// ADD PREDEFINED MACROS HERE!
./src/config.h
\ No newline at end of file
This diff is collapsed.
src
tests
src/common
src/contrib
src/contrib/dnstap
src/contrib/libngtcp2
src/contrib/libngtcp2/ngtcp2
src/contrib/libngtcp2/ngtcp2/crypto
src/contrib/libngtcp2/ngtcp2/lib
src/contrib/licenses
src/contrib/openbsd
src/contrib/proxyv2
src/contrib/qp-trie
src/contrib/ucw
src/contrib/url-parser
src/contrib/vpool
src/knot
src/knot/catalog
src/knot/common
src/knot/conf
src/knot/ctl
src/knot/dnssec
src/knot/dnssec/kasp
src/knot/events
src/knot/events/handlers
src/knot/include
src/knot/journal
src/knot/modules
src/knot/modules/cookies
src/knot/modules/dnsproxy
src/knot/modules/dnstap
src/knot/modules/geoip
src/knot/modules/noudp
src/knot/modules/onlinesign
src/knot/modules/probe
src/knot/modules/queryacl
src/knot/modules/rrl
src/knot/modules/stats
src/knot/modules/synthrecord
src/knot/modules/whoami
src/knot/nameserver
src/knot/query
src/knot/server
src/knot/updates
src/knot/worker
src/knot/zone
src/libdnssec
src/libdnssec/key
src/libdnssec/keystore
src/libdnssec/nsec
src/libdnssec/p11
src/libdnssec/shared
src/libdnssec/sign
src/libknot
src/libknot/control
src/libknot/db
src/libknot/packet
src/libknot/probe
src/libknot/rrtype
src/libknot/xdp
src/libknot/yparser
src/libzscanner
src/utils
src/zscanner
src/utils/common
src/utils/kcatalogprint
src/utils/kdig
src/utils/keymgr
src/utils/khost
src/utils/kjournalprint
src/utils/knotc
src/utils/knotd
src/utils/knsec3hash
src/utils/knsupdate
src/utils/knsupdate/tests
src/utils/kxdpgun
src/utils/kzonecheck
src/utils/kzonesign
tests
tests/contrib
tests-fuzz
tests-fuzz/check
tests-fuzz/knotd_wrap
tests/knot
tests/knot/semantic_check_data
tests/libdnssec
tests/libknot
tests/libzscanner
tests/libzscanner/data
tests/libzscanner/data/includes
tests/modules
tests/tap
tests/utils
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src samples doc man
SUBDIRS = src tests tests-fuzz python samples distro doc
include $(srcdir)/tests/Makefile.inc
EXTRA_DIST = README.md
.PHONY: singlehtml epub install-singlehtml install-epub
singlehtml install-singlehtml epub install-epub:
$(MAKE) -C doc $@
.PHONY: check-compile
check-compile:
$(MAKE) $(AM_MAKEFLAGS) -C tests $@
$(MAKE) $(AM_MAKEFLAGS) -C tests-fuzz $@
AM_DISTCHECK_CONFIGURE_FLAGS =
CODE_COVERAGE_INFO = coverage.info
CODE_COVERAGE_HTML = coverage.html
CODE_COVERAGE_DIRS = \
src/contrib \
src/knot \
src/libdnssec \
src/libknot \
src/libzscanner
code_coverage_quiet = --quiet
check-code-coverage:
if CODE_COVERAGE_ENABLED
$(MAKE) $(AM_MAKEFLAGS) code-coverage-initial
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
$(MAKE) $(AM_MAKEFLAGS) code-coverage-html
$(MAKE) $(AM_MAKEFLAGS) code-coverage-summary
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-initial:
if CODE_COVERAGE_ENABLED
$(LCOV) $(code_coverage_quiet) \
--no-external \
$(foreach dir, $(CODE_COVERAGE_DIRS), --directory $(top_builddir)/$(dir)) \
--capture --initial \
--ignore-errors source \
--no-checksum \
--compat-libtool \
--output-file $(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-capture:
if CODE_COVERAGE_ENABLED
$(LCOV) $(code_coverage_quiet) \
--no-external \
$(foreach dir, $(CODE_COVERAGE_DIRS), --directory $(builddir)/$(dir)) \
--capture \
--ignore-errors source \
--no-checksum \
--compat-libtool \
--output-file $(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-html:
if CODE_COVERAGE_ENABLED
@echo "Generating code coverage HTML report (this might take a while)"
LANG=C $(GENHTML) $(code_coverage_quiet) \
--output-directory $(CODE_COVERAGE_HTML) \
--title "Knot DNS $(PACKAGE_VERSION) Code Coverage" \
--legend --show-details \
--ignore-errors source \
$(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-summary:
if CODE_COVERAGE_ENABLED
$(LCOV) \
--summary $(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
if CODE_COVERAGE_ENABLED
clean-local: code-coverage-clean
-find . -name "*.gcno" -delete
code-coverage-clean:
-$(LCOV) --directory $(top_builddir) -z
-rm -rf $(CODE_COVERAGE_INFO) $(CODE_COVERAGE_HTML)
-find . -name "*.gcda" -o -name "*.gcov" -delete
endif
.PHONY: check-code-coverage code-coverage-initial code-coverage-capture code-coverage-html code-coverage-summary code-coverage-clean
.NOTPARALLEL: clean
This diff is collapsed.
Dependencies
============
Knot DNS has several dependencies:
* libtool
* autoconf > 2.65
* flex >= 2.5.31
* bison >= 2.3
* libssl >= 1.0.0 (>= 1.0.1 is required for ECDSA)
* liburcu >= 0.5.4
Optional packages:
* libcap-ng >= 0.6.4 (for POSIX 1003.1e capabilites(7))
Dependencies for building documentation:
* texinfo
Installation
============
Knot DNS may already be included in your operating system distribution and
therefore can be installed from packages (Linux) or ports (BSD). This is
always preferred unless you want to test the latest features, contribute to
Knot development, or you just know what you are doing.
Following sections describe how to build Knot DNS from the source code.
1) Install prerequisites
Debian based distributions
--------------------------
Update the system:
$ sudo apt-get update
$ sudo apt-get upgrade
Install prerequisites:
$ sudo apt-get install git-core libtool autoconf flex bison libssl-dev liburcu-dev
Install optional packages:
($ sudo apt-get install libcap-ng-dev)
If the liburcu-dev package is not present, install it from the source code
(http://lttng.org/urcu)
Fedora like distributions
-------------------------
Update the system:
$ yum upgrade
Ensure all base development tools are available:
$ yum install @buildsys-build
Ensure all prerequisites are installed:
$ yum install libtool autoconf flex bison openssl-devel userspace-rcu-devel
Install optional packages:
($ yum install libcap-ng-devel)
OS X
----
Not all prerequisites are preinstalled for OS X.
- liburcu must be compiled from sources
- liburcu requires gcc-4.6 from MacPorts, as it depends on __thread keyword
$ CC=gcc-mp-4.6 ARCH=x86_64 ./configure
$ make && sudo make install
- liburcu >= 0.7.0 works with supplied compiler, however ARCH must still be set
- alternative is to set it with configure parameter --target
Compiling Knot DNS with gcc-mp-4.6 is recommended, but not necessary.
2) Install Knot DNS
Knot DNS requires compiler to support atomic intrinsics.
GCC version at least 4.1 supports legacy atomic builtins, however 4.7
or newer is preferred.
Clang supports atomics since version 2.9.
Get the source code:
$ git clone git://git.nic.cz/knot-dns.git
Or extract source package to knot-dns directory
Compile Knot
$ cd knot-dns
$ autoreconf -if
$ ./configure
$ make
Install Knot DNS into system:
$ sudo make install
$ sudo ldconfig
NOTE: If you want to reduce zscanner compile time, use configure option --disable-fastparser.
Running
=======
1) Each server needs configuration file. Please see samples/knot.sample.conf
for reference or samples/knot.full.conf for more examples.
Configuration file has to specify:
- storage for PID files, journal files etc.
- network interfaces
- served zones
E.g. use the default config file:
$ cd /etc/knot
$ mv knot.sample.conf knot.conf
Modify the config:
$ vim knot.conf
2) Prepare working directory
$ mv example.com.zone /var/lib/knot/
3) Start the server. This can be done by running the 'knotd' command.
Alternatively, your distribution should have an init script available, if you've
installed Knot using a binary package.
Start Knot in foreground to see if it runs:
$ knotd -c myserver.conf
For more information, refer to the user manual or:
$ knotc -h
$ knotd -h
This diff is collapsed.