View | Details | Raw Unified | Return to bug 249367
Collapse All | Expand All

(-)/usr/ports/dns/knot2/Makefile (-120 lines)
Lines 1-120 Link Here
1
# Created by: Leo Vandewoestijne <freebsd@dns.company>
2
# $FreeBSD: head/dns/knot2/Makefile 548443 2020-09-13 01:55:26Z dbaio $
3
4
PORTNAME=	knot
5
DISTVERSION=	2.9.6
6
CATEGORIES=	dns
7
MASTER_SITES=	https://secure.nic.cz/files/knot-dns/ \
8
		https://dns.company/downloads/knot-dns/
9
PKGNAMESUFFIX?=	2
10
11
MAINTAINER=	freebsd@dns.company
12
COMMENT?=	High performance authoritative-only DNS server
13
14
LICENSE=	GPLv3
15
LICENSE_FILE=	${WRKSRC}/COPYING
16
17
CONFLICTS=	knot-1.* knot1-[0-6].*
18
19
BUILD_DEPENDS=	autoconf>=2.65:devel/autoconf \
20
		gsed:textproc/gsed
21
22
LIB_DEPENDS=	libgnutls.so:security/gnutls \
23
		liblmdb.so:databases/lmdb
24
25
USES=		alias libtool localbase pkgconfig tar:xz
26
27
HAS_CONFIGURE=	yes
28
BINARY_ALIAS=	sed=${LOCALBASE}/bin/gsed
29
CONFIGURE_ARGS=	--enable-recvmmsg=no \
30
		--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig \
31
		--mandir=${MANPREFIX}/man
32
33
.if !defined(UTILS_ONLY) && !defined(LIB_ONLY)
34
CONFIGURE_ARGS+=	--with-rundir=/var/run/knot \
35
			--with-storage=/var/db/knot
36
USE_RC_SUBR=	${PORTNAME}
37
SUB_FILES=	pkg-message
38
USES+=		libedit
39
LIB_DEPENDS+=	liburcu.so:sysutils/liburcu
40
.endif
41
42
.if defined(UTILS_ONLY) || defined(LIB_ONLY)
43
CONFIGURE_ARGS+=	--disable-daemon \
44
			--disable-modules
45
.endif
46
47
.if defined(LIB_ONLY)
48
CONFIGURE_ARGS+=	--disable-utilities
49
.endif
50
51
USE_LDCONFIG=	yes
52
INSTALL_TARGET=	install-strip
53
54
USERS=		knot
55
GROUPS=		knot
56
SUB_LIST+=	USERS="${USERS}" GROUPS="${GROUPS}"
57
58
PORTDOCS=	COPYING NEWS README
59
60
OPTIONS_DEFINE=			DNSTAP DOCS
61
62
.if !defined(LIB_ONLY)
63
OPTIONS_DEFINE+=		IDN
64
.endif
65
66
.if !defined(UTILS_ONLY) && !defined(LIB_ONLY)
67
OPTIONS_DEFINE+=		FASTPARSER MAXMINDDB
68
.endif
69
70
DNSTAP_DESC=			dnstap support (see dnstap.info)
71
DNSTAP_CONFIGURE_ENABLE=	dnstap
72
DNSTAP_CONFIGURE_WITH=		module-dnstap=yes
73
DNSTAP_LIB_DEPENDS=		libprotobuf-c.so:devel/protobuf-c \
74
				libfstrm.so:devel/fstrm
75
# XXX: because `kdig_CPPFLAGS += $(DNSTAP_CFLAGS)' line is missing from
76
# `src/Makefile.am' file (and thus pre-generated `src/Makefile.in') which
77
# should contain "$libfstrm_CFLAGS $libprotobuf_c_CFLAGS" set by configure
78
# script, provide it here explicitly as patching those files would result
79
# in higher line count.  Ideally this bug should be fixed upstream.
80
DNSTAP_CPPFLAGS=		-I${LOCALBASE}/include
81
82
DOCS_CONFIGURE_OFF=		--disable-documentation
83
84
FASTPARSER_DESC=		Fast zone parser (demanding compilation)
85
FASTPARSER_CONFIGURE_ENABLE=	fastparser
86
87
IDN_CONFIGURE_WITH=		libidn
88
IDN_CONFIGURE_OFF=		--without-libidn
89
IDN_LIB_DEPENDS=		libidn2.so:dns/libidn2
90
91
MAXMINDDB_DESC=			Enable MaxMind for geodb module
92
MAXMINDDB_LIB_DEPENDS=		libmaxminddb.so:net/libmaxminddb
93
MAXMINDDB_CONFIGURE_ENABLE=	maxminddb
94
95
.include <bsd.port.options.mk>
96
97
.if ${ARCH} == i386
98
USES+=				autoreconf
99
EXTRA_PATCHES+=			${PATCHDIR}/extrapatch-configure.ac
100
.endif
101
102
post-patch:
103
.if !defined(UTILS_ONLY) && !defined(LIB_ONLY)
104
	@${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|' \
105
		${WRKSRC}/src/Makefile.in
106
	@${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|' \
107
		${WRKSRC}/src/Makefile.in
108
	@${RM} -r ${WRKSRC}/src/zscanner/scanner.c
109
.endif
110
111
post-install:
112
.if !defined(UTILS_ONLY) && !defined(LIB_ONLY)
113
	${MV} ${STAGEDIR}${ETCDIR}/knot.sample.conf \
114
		${STAGEDIR}${ETCDIR}/knot.conf.sample
115
	@${MKDIR} ${STAGEDIR}/var/run/knot ${STAGEDIR}/var/db/knot
116
.endif
117
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
118
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
119
120
.include <bsd.port.mk>
(-)/usr/ports/dns/knot2/distinfo (-3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1599955330
2
SHA256 (knot-2.9.6.tar.xz) = bf742883c6825b54f19f2dadca2c94fec1ff8bdcf0a52388e2e167937594b2e7
3
SIZE (knot-2.9.6.tar.xz) = 1188412
(-)/usr/ports/dns/knot2/files/extrapatch-configure.ac (-12 lines)
Lines 1-12 Link Here
1
--- configure.ac.orig	2020-02-03 00:11:36 UTC
2
+++ configure.ac
3
@@ -636,7 +636,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sched.h>]]
4
 AC_LINK_IFELSE(
5
   [AC_LANG_PROGRAM([[#include <stdint.h>]],
6
                    [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]])],
7
-  [AC_DEFINE(HAVE_ATOMIC, 1, [Define to 1 if you have '__atomic' functions.])]
8
+  [AS_IF([test -z "$CC_CLANG_VERSION" -o $host_cpu != "i386"],
9
+         [AC_DEFINE(HAVE_ATOMIC, 1, [Define to 1 if you have '__atomic' functions.])])]
10
 )
11
 
12
 # Check for '__sync' compiler builtin atomic functions.
(-)/usr/ports/dns/knot2/files/knot.in (-118 lines)
Lines 1-118 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: head/dns/knot2/files/knot.in 489774 2019-01-09 12:33:30Z swills $
4
#
5
# PROVIDE: knot
6
# REQUIRE: SERVERS cleanvar
7
# KEYWORD: shutdown
8
#
9
# Add the following lines to /etc/rc.conf to enable knot:
10
#
11
# knot_enable="YES":	Set to NO by default.
12
#			Set it to YES to enable knot.
13
# knot_config="":	Set to %%PREFIX%%/etc/knot/knot.conf
14
#			by default.
15
#
16
# -----------------------------------------------------------------------------
17
#
18
# This script supports running multiple instances of knot.
19
# To run additional instances link this script to something like
20
# % ln -s knot knot_foo
21
# and define additional knot_foo_* variables in one of
22
# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/knot_foo
23
#
24
# Below NAME should be substituted with the name of this script. By default
25
# it is knot, so read as knot_enable. If you linked the script to
26
# knot_foo, then read as knot_foo_enable etc.
27
#
28
# The following variables are supported (defaults are shown).
29
# You can place them in any of
30
# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME
31
#
32
# NAME_enable="NO"	# set to YES to enable knot
33
#
34
# # optional:
35
# NAME_config="%%PREFIX%%/etc/knot/NAME.conf"  # (-c)onfig file
36
# NAME_config="db:/var/db/knot/confdb"         # (-C)onfig database
37
# NAME_diruser="%%USERS%%"    # /var/db/NAME and /var/run/NAME are created if they
38
# NAME_dirgroup="%%GROUPS%%"  # don't exist. These don't control the user/group knot
39
#                       # runs as, the config file has a setting for that.
40
#
41
# You also need to set the rundir directive in the server section of the
42
# config file to /var/run/NAME (if using a NAME other than the default)
43
# and you will want the storage directive(s) declared in the zone section
44
# to point to /var/db/NAME overriding the default of /var/db/knot.
45
#
46
# For further documentation, please see knot.conf(5).
47
48
. /etc/rc.subr
49
50
case "$0" in
51
/etc/rc*)
52
	# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
53
	# so get the name of the script from $_file
54
	name="$_file"
55
	;;
56
*)
57
	name="$0"
58
	;;
59
esac
60
61
name="${name##*/}"
62
rcvar=${name}_enable
63
64
load_rc_config ${name}
65
66
eval ": \${${name}_enable:=\"NO\"}"
67
eval ": \${${name}_diruser:=\"%%USERS%%\"}"
68
eval ": \${${name}_dirgroup:=\"%%GROUPS%%\"}"
69
eval ": \${${name}_config:=\"%%PREFIX%%/etc/knot/${name}.conf\"}"
70
71
configfile="$(eval echo \${${name}_config})"
72
diruser="$(eval echo \${${name}_diruser})"
73
dirgroup="$(eval echo \${${name}_dirgroup})"
74
75
command=%%PREFIX%%/sbin/knotd
76
case "$configfile" in
77
db:*)
78
	config_args="-C ${configfile#db:}"
79
	;;
80
*)
81
	config_args="-c ${configfile}"
82
	;;
83
esac
84
command_args="${config_args} -d"
85
control="%%PREFIX%%/sbin/knotc"
86
pidfile="/var/run/${name}/knot.pid"
87
88
case "$configfile" in
89
db:*)
90
	required_files=${configfile#db:}/data.mdb
91
	;;
92
*)
93
	required_files=${configfile}
94
	;;
95
esac
96
97
extra_commands=reload
98
reload_cmd="knot_reload"
99
start_precmd="knot_prestart"
100
101
knot_prestart()
102
{
103
	if [ ! -d /var/run/${name} ]; then
104
		install -d -o ${diruser} -g ${dirgroup} /var/run/${name}
105
	fi
106
	if [ ! -d /var/db/${name} ]; then
107
		install -d -o ${diruser} -g ${dirgroup} /var/db/${name}
108
	fi
109
	${control} ${config_args} conf-check
110
}
111
112
knot_reload()
113
{
114
	echo "Reloading ${name}."
115
	${control} ${config_args} reload
116
}
117
118
run_rc_command "$1"
(-)/usr/ports/dns/knot2/files/pkg-message.in (-21 lines)
Lines 1-21 Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
  To start using Knot DNS, you should complete the following tasks:
5
6
    cp %%ETCDIR%%/knot.conf.sample %%ETCDIR%%/knot.conf
7
    $EDITOR %%ETCDIR%%/knot.conf
8
9
    sysrc knot_enable=YES
10
    sysrc knot_config=%%ETCDIR%%/knot.conf
11
    service knot start
12
13
  Please consult the documentation:
14
   - man knotd
15
   - https://www.knot-dns.cz/documentation/
16
17
  When upgrading from 2.4.x read:
18
   - https://www.knot-dns.cz/docs/2.5/html/migration.html#upgrade-2-4-x-to-2-5-x
19
EOM
20
}
21
]
(-)/usr/ports/dns/knot2/pkg-descr (-14 lines)
Lines 1-14 Link Here
1
Knot DNS is a high-performance authoritative-only DNS server which
2
supports all key features of the domain name system including zone
3
AXFR and IXFR, DDNS and DNSSEC.  Its key features:
4
5
 * Open source
6
 * High-performance, multi-threaded, and mostly lock-free
7
   implementation which scales well on SMPs
8
 * Object-oriented design
9
 * Support for all important DNS protocols:
10
   - Full and incremental zone transfers
11
   - EDNS0 and DNSSEC extensions, including NSEC3
12
   - NSID
13
14
WWW: https://www.knot-dns.cz/
(-)/usr/ports/dns/knot2/pkg-plist (-100 lines)
Lines 1-100 Link Here
1
bin/kdig
2
bin/khost
3
bin/knsec3hash
4
bin/knsupdate
5
bin/kzonecheck
6
%%ETCDIR%%/example.com.zone
7
%%ETCDIR%%/knot.conf.sample
8
include/knot/module.h
9
include/libdnssec/binary.h
10
include/libdnssec/crypto.h
11
include/libdnssec/dnssec.h
12
include/libdnssec/error.h
13
include/libdnssec/key.h
14
include/libdnssec/keyid.h
15
include/libdnssec/keystore.h
16
include/libdnssec/keytag.h
17
include/libdnssec/nsec.h
18
include/libdnssec/pem.h
19
include/libdnssec/random.h
20
include/libdnssec/sign.h
21
include/libdnssec/tsig.h
22
include/libdnssec/version.h
23
include/libknot/attribute.h
24
include/libknot/codes.h
25
include/libknot/consts.h
26
include/libknot/control/control.h
27
include/libknot/cookies.h
28
include/libknot/db/db.h
29
include/libknot/db/db_lmdb.h
30
include/libknot/db/db_trie.h
31
include/libknot/descriptor.h
32
include/libknot/dname.h
33
include/libknot/endian.h
34
include/libknot/errcode.h
35
include/libknot/error.h
36
include/libknot/libknot.h
37
include/libknot/lookup.h
38
include/libknot/mm_ctx.h
39
include/libknot/packet/compr.h
40
include/libknot/packet/pkt.h
41
include/libknot/packet/rrset-wire.h
42
include/libknot/packet/wire.h
43
include/libknot/rdata.h
44
include/libknot/rdataset.h
45
include/libknot/rrset-dump.h
46
include/libknot/rrset.h
47
include/libknot/rrtype/dnskey.h
48
include/libknot/rrtype/ds.h
49
include/libknot/rrtype/naptr.h
50
include/libknot/rrtype/nsec.h
51
include/libknot/rrtype/nsec3.h
52
include/libknot/rrtype/nsec3param.h
53
include/libknot/rrtype/opt.h
54
include/libknot/rrtype/rdname.h
55
include/libknot/rrtype/rrsig.h
56
include/libknot/rrtype/soa.h
57
include/libknot/rrtype/tsig.h
58
include/libknot/tsig-op.h
59
include/libknot/tsig.h
60
include/libknot/version.h
61
include/libknot/wire.h
62
include/libknot/yparser/yparser.h
63
include/libknot/yparser/ypformat.h
64
include/libknot/yparser/ypschema.h
65
include/libknot/yparser/yptrafo.h
66
include/libzscanner/error.h
67
include/libzscanner/scanner.h
68
include/libzscanner/version.h
69
lib/libdnssec.a
70
lib/libdnssec.so
71
lib/libdnssec.so.7
72
lib/libdnssec.so.7.0.0
73
lib/libknot.a
74
lib/libknot.so
75
lib/libknot.so.10
76
lib/libknot.so.10.0.0
77
lib/libzscanner.a
78
lib/libzscanner.so
79
lib/libzscanner.so.3
80
lib/libzscanner.so.3.0.0
81
libdata/pkgconfig/knotd.pc
82
libdata/pkgconfig/libdnssec.pc
83
libdata/pkgconfig/libknot.pc
84
libdata/pkgconfig/libzscanner.pc
85
man/man1/kdig.1.gz
86
man/man1/khost.1.gz
87
man/man1/knsec3hash.1.gz
88
man/man1/knsupdate.1.gz
89
man/man1/kzonecheck.1.gz
90
man/man5/knot.conf.5.gz
91
man/man8/keymgr.8.gz
92
man/man8/kjournalprint.8.gz
93
man/man8/knotc.8.gz
94
man/man8/knotd.8.gz
95
sbin/keymgr
96
sbin/kjournalprint
97
sbin/knotc
98
sbin/knotd
99
@dir(knot,knot,750) /var/db/knot
100
@dir(knot,knot,750) /var/run/knot

Return to bug 249367