View | Details | Raw Unified | Return to bug 223222 | Differences between
and this patch

Collapse All | Expand All

(-)dns/dnscrypt-proxy/Makefile (-1 / +1 lines)
Lines 1-62 Link Here
1
# Created by: Leo Vandewoestijne <freebsd@dns-lab.com>
1
# Created by: Leo Vandewoestijne <freebsd@dns-lab.com>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	dnscrypt-proxy
4
PORTNAME=	dnscrypt-proxy
5
PORTVERSION=	1.9.5
5
PORTVERSION=	1.9.5
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	dns
7
CATEGORIES=	dns
8
MASTER_SITES=	https://download.dnscrypt.org/dnscrypt-proxy/ \
8
MASTER_SITES=	https://download.dnscrypt.org/dnscrypt-proxy/ \
9
		http://download.dnscrypt.org/dnscrypt-proxy/ \
9
		http://download.dnscrypt.org/dnscrypt-proxy/ \
10
		http://dns-lab.com/downloads/dnscrypt-proxy/
10
		http://dns-lab.com/downloads/dnscrypt-proxy/
11
11
12
MAINTAINER=	freebsd@dns-lab.com
12
MAINTAINER=	freebsd@dns-lab.com
13
COMMENT=	Boost privacy and security of DNS
13
COMMENT=	Boost privacy and security of DNS
14
14
15
LICENSE=	MIT
15
LICENSE=	MIT
16
LICENSE_FILE=	${WRKSRC}/COPYING
16
LICENSE_FILE=	${WRKSRC}/COPYING
17
17
18
LIB_DEPENDS=	libsodium.so:security/libsodium
18
LIB_DEPENDS=	libsodium.so:security/libsodium
19
19
20
BROKEN_powerpc64=	fails to compile: fpst.c: error: redefinition of typedef 'FPST'
20
BROKEN_powerpc64=	fails to compile: fpst.c: error: redefinition of typedef 'FPST'
21
21
22
USERS=		_dnscrypt-proxy
22
USERS=		_dnscrypt-proxy
23
GROUPS=		_dnscrypt-proxy
23
GROUPS=		_dnscrypt-proxy
24
24
25
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
26
USES=		gmake
26
USES=		gmake
27
27
28
INSTALL_TARGET=	install-strip
28
INSTALL_TARGET=	install-strip
29
29
30
PORTDOCS=	AUTHORS ChangeLog INSTALL NEWS README* THANKS
30
PORTDOCS=	AUTHORS ChangeLog INSTALL NEWS README* THANKS
31
31
32
OPTIONS_DEFINE=	DOCS PLUGINS PLUGINS_RELAXED PLUGINS_ROOT
32
OPTIONS_DEFINE=	DOCS PLUGINS PLUGINS_RELAXED PLUGINS_ROOT
33
OPTIONS_SINGLE=	RCWHICH
33
OPTIONS_SINGLE=	RCWHICH
34
OPTIONS_SINGLE_RCWHICH=	RCSINGLE RCMULTI
34
OPTIONS_SINGLE_RCWHICH=	RCSINGLE RCMULTI
35
OPTIONS_DEFAULT=	PLUGINS RCSINGLE
35
OPTIONS_DEFAULT=	PLUGINS RCSINGLE
36
OPTIONS_SUB=	yes
36
OPTIONS_SUB=	yes
37
37
38
PLUGINS_CONFIGURE_ENABLE=	plugins
38
PLUGINS_CONFIGURE_ENABLE=	plugins
39
PLUGINS_LIB_DEPENDS=	libltdl.so:devel/libltdl \
39
PLUGINS_LIB_DEPENDS=	libltdl.so:devel/libltdl \
40
		libldns.so:dns/ldns
40
		libldns.so:dns/ldns
41
PLUGINS_USE=	LDCONFIG=${PREFIX}/lib/dnscrypt-proxy
41
PLUGINS_USE=	LDCONFIG=${PREFIX}/lib/dnscrypt-proxy
42
PLUGINS_USES=	libtool
42
PLUGINS_USES=	libtool
43
PLUGINS_RELAXED_DESC=	Allow loading plugins owned by other users
43
PLUGINS_RELAXED_DESC=	Allow loading plugins owned by other users
44
PLUGINS_RELAXED_CONFIGURE_ENABLE=	relaxed-plugins-permissions
44
PLUGINS_RELAXED_CONFIGURE_ENABLE=	relaxed-plugins-permissions
45
PLUGINS_ROOT_DESC=	Only load plugins sitting in the default plugins directory
45
PLUGINS_ROOT_DESC=	Only load plugins sitting in the default plugins directory
46
PLUGINS_ROOT_CONFIGURE_ENABLE=	plugins-root
46
PLUGINS_ROOT_CONFIGURE_ENABLE=	plugins-root
47
RCWHICH_DESC=	Rc script to use:
47
RCWHICH_DESC=	Rc script to use:
48
RCSINGLE_DESC=	Use default rc script for single daemon
48
RCSINGLE_DESC=	Use default rc script for single daemon
49
RCSINGLE_VARS=	USE_RC_SUBR=${PORTNAME}
49
RCSINGLE_VARS=	USE_RC_SUBR=${PORTNAME}
50
RCSINGLE_SUB_FILES=	pkg-message
50
RCSINGLE_SUB_FILES=	pkg-message
51
RCMULTI_DESC=	Use experimental rc script for multiple instances
51
RCMULTI_DESC=	Use experimental rc script for multiple instances
52
RCMULTI_VARS=	USE_RC_SUBR=${PORTNAME}_multi
52
RCMULTI_VARS=	USE_RC_SUBR=${PORTNAME}_multi
53
RCMULTI_SUB_FILES=	pkg-message_multi
53
RCMULTI_SUB_FILES=	pkg-message_multi
54
54
55
post-install:
55
post-install:
56
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
56
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
57
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
57
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
58
	${INSTALL_MAN} ${WRKSRC}/man/dnscrypt-proxy.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
58
	${INSTALL_MAN} ${WRKSRC}/man/dnscrypt-proxy.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
59
	${INSTALL_MAN} ${WRKSRC}/man/hostip.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
59
	${INSTALL_MAN} ${WRKSRC}/man/hostip.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
60
	${MV} ${STAGEDIR}${PREFIX}/etc/dnscrypt-proxy.conf ${STAGEDIR}${PREFIX}/etc/dnscrypt-proxy.conf.sample
60
	${MV} ${STAGEDIR}${PREFIX}/etc/dnscrypt-proxy.conf ${STAGEDIR}${PREFIX}/etc/dnscrypt-proxy.conf.sample
61
61
62
.include <bsd.port.mk>
62
.include <bsd.port.mk>
(-)dns/dnscrypt-proxy/files/dnscrypt-proxy.in (-2 / +2 lines)
Lines 1-52 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD$
3
# $FreeBSD$
4
#
4
#
5
# PROVIDE: dnscrypt_proxy
5
# PROVIDE: dnscrypt_proxy
6
# REQUIRE: SERVERS cleanvar ldconfig
6
# REQUIRE: SERVERS cleanvar ldconfig
7
# BEFORE: named local_unbound unbound
7
# BEFORE: named local_unbound unbound
8
# KEYWORD: shutdown
8
# KEYWORD: shutdown
9
#
9
#
10
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
10
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
11
#
11
#
12
# dnscrypt_proxy_enable (bool):	Set to NO by default.
12
# dnscrypt_proxy_enable (bool):	Set to NO by default.
13
#				Set to YES to enable dnscrypt-proxy.
13
#				Set to YES to enable dnscrypt-proxy.
14
# dnscrypt_proxy_conf (str):    Unset by default. Will override all other
14
# dnscrypt_proxy_conf (str):    Unset by default. Will override all other
15
#                               settings and only use the config file.
15
#                               settings and only use the config file.
16
# dnscrypt_proxy_uid (str):	Set to "_dnscrypt-proxy" by default.
16
# dnscrypt_proxy_uid (str):	Set to "_dnscrypt-proxy" by default.
17
#                              	User to switch to after starting.
17
#                              	User to switch to after starting.
18
# dnscrypt_proxy_resolver (str):Set to "cisco" by default.
18
# dnscrypt_proxy_resolver (str):Set to "random" by default.
19
#                              	Choose a different upstream resolver.
19
#                              	Choose a different upstream resolver.
20
# dnscrypt_proxy_pidfile (str):	default: "/var/run/dnscrypt-proxy.pid"
20
# dnscrypt_proxy_pidfile (str):	default: "/var/run/dnscrypt-proxy.pid"
21
#                              	Location of pid file.
21
#                              	Location of pid file.
22
# dnscrypt_proxy_logfile (str):	default: "/var/log/dnscrypt-proxy.log"
22
# dnscrypt_proxy_logfile (str):	default: "/var/log/dnscrypt-proxy.log"
23
#                              	Location of log file.
23
#                              	Location of log file.
24
#
24
#
25
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
25
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
26
# and add the following to rc.conf:
26
# and add the following to rc.conf:
27
# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"
27
# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"
28
# dnscrypt_proxy_flags='-a 127.0.0.2'
28
# dnscrypt_proxy_flags='-a 127.0.0.2'
29
29
30
. /etc/rc.subr
30
. /etc/rc.subr
31
31
32
name=dnscrypt_proxy
32
name=dnscrypt_proxy
33
rcvar=dnscrypt_proxy_enable
33
rcvar=dnscrypt_proxy_enable
34
34
35
load_rc_config ${name}
35
load_rc_config ${name}
36
36
37
: ${dnscrypt_proxy_enable:=NO}
37
: ${dnscrypt_proxy_enable:=NO}
38
: ${dnscrypt_proxy_uid=_dnscrypt-proxy} # User to run daemon as
38
: ${dnscrypt_proxy_uid=_dnscrypt-proxy} # User to run daemon as
39
: ${dnscrypt_proxy_resolver=cisco} # resolver to use
39
: ${dnscrypt_proxy_resolver=random}     # resolver to use
40
: ${dnscrypt_proxy_pidfile=/var/run/dnscrypt-proxy.pid} # Path to pid file
40
: ${dnscrypt_proxy_pidfile=/var/run/dnscrypt-proxy.pid} # Path to pid file
41
: ${dnscrypt_proxy_logfile=/var/log/dnscrypt-proxy.log} # Path to log file
41
: ${dnscrypt_proxy_logfile=/var/log/dnscrypt-proxy.log} # Path to log file
42
42
43
command=%%PREFIX%%/sbin/dnscrypt-proxy
43
command=%%PREFIX%%/sbin/dnscrypt-proxy
44
if [ ${dnscrypt_proxy_conf} ]; then
44
if [ ${dnscrypt_proxy_conf} ]; then
45
command_args="${dnscrypt_proxy_conf}"
45
command_args="${dnscrypt_proxy_conf}"
46
else
46
else
47
command_args="-d -p ${dnscrypt_proxy_pidfile} -l ${dnscrypt_proxy_logfile} -u ${dnscrypt_proxy_uid} -R ${dnscrypt_proxy_resolver}"
47
command_args="-d -p ${dnscrypt_proxy_pidfile} -l ${dnscrypt_proxy_logfile} -u ${dnscrypt_proxy_uid} -R ${dnscrypt_proxy_resolver}"
48
fi
48
fi
49
procname=%%PREFIX%%/sbin/dnscrypt-proxy
49
procname=%%PREFIX%%/sbin/dnscrypt-proxy
50
pidfile=${dnscrypt_proxy_pidfile}
50
pidfile=${dnscrypt_proxy_pidfile}
51
51
52
run_rc_command "$1"
52
run_rc_command "$1"
(-)dns/dnscrypt-proxy/files/dnscrypt-proxy_multi.in (-1 / +1 lines)
Lines 1-71 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD$
3
# $FreeBSD$
4
#
4
#
5
# PROVIDE: dnscrypt_proxy
5
# PROVIDE: dnscrypt_proxy
6
# REQUIRE: SERVERS cleanvar ldconfig
6
# REQUIRE: SERVERS cleanvar ldconfig
7
# BEFORE: named local_unbound unbound
7
# BEFORE: named local_unbound unbound
8
# KEYWORD: shutdown
8
# KEYWORD: shutdown
9
#
9
#
10
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
10
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
11
#
11
#
12
# dnscrypt_proxy_instances (str): Set to "dnscrypt_proxy" by default.
12
# dnscrypt_proxy_instances (str): Set to "dnscrypt_proxy" by default.
13
#                                 List of dnscrypt_proxy instance id's,
13
#                                 List of dnscrypt_proxy instance id's,
14
#                                 e.g. "dnscrypt_proxy_1 dnscrypt_proxy_2", etc.
14
#                                 e.g. "dnscrypt_proxy_1 dnscrypt_proxy_2", etc.
15
# {instance_id}_enable (bool):    Set to NO by default.
15
# {instance_id}_enable (bool):    Set to NO by default.
16
#                                 Set to YES to enable dnscrypt-proxy.
16
#                                 Set to YES to enable dnscrypt-proxy.
17
# {instance_id}_uid (str):        Set to "_dnscrypt-proxy" by default.
17
# {instance_id}_uid (str):        Set to "_dnscrypt-proxy" by default.
18
#                              	  User to switch to after starting.
18
#                              	  User to switch to after starting.
19
# {instance_id}_resolver (str):   Set to "opendns" by default.
19
# {instance_id}_resolver (str):   Set to "opendns" by default.
20
#                              	  Choose a different upstream resolver.
20
#                              	  Choose a different upstream resolver.
21
# {instance_id}_pidfile (str):    default: "/var/run/dnscrypt-proxy.pid"
21
# {instance_id}_pidfile (str):    default: "/var/run/dnscrypt-proxy.pid"
22
#                              	  Location of pid file.
22
#                              	  Location of pid file.
23
# {instance_id}_logfile (str):	  default: "/var/log/dnscrypt-proxy.log"
23
# {instance_id}_logfile (str):	  default: "/var/log/dnscrypt-proxy.log"
24
#                                 Location of log file.
24
#                                 Location of log file.
25
#
25
#
26
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
26
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
27
# and add the following to rc.conf:
27
# and add the following to rc.conf:
28
# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"
28
# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"
29
# dnscrypt_proxy_flags='-a 127.0.0.2'
29
# dnscrypt_proxy_flags='-a 127.0.0.2'
30
30
31
. /etc/rc.subr
31
. /etc/rc.subr
32
32
33
name=dnscrypt_proxy
33
name=dnscrypt_proxy
34
rcvar=dnscrypt_proxy_enable
34
rcvar=dnscrypt_proxy_enable
35
35
36
load_rc_config ${name}
36
load_rc_config ${name}
37
37
38
: ${dnscrypt_proxy_instances="${name}"}
38
: ${dnscrypt_proxy_instances="${name}"}
39
: ${dnscrypt_proxy_enable:=NO}
39
: ${dnscrypt_proxy_enable:=NO}
40
40
41
dnscrypt_proxy_enable_tmp=${dnscrypt_proxy_enable}
41
dnscrypt_proxy_enable_tmp=${dnscrypt_proxy_enable}
42
42
43
command=%%PREFIX%%/sbin/dnscrypt-proxy
43
command=%%PREFIX%%/sbin/dnscrypt-proxy
44
procname=%%PREFIX%%/sbin/dnscrypt-proxy
44
procname=%%PREFIX%%/sbin/dnscrypt-proxy
45
45
46
for i in $dnscrypt_proxy_instances; do
46
for i in $dnscrypt_proxy_instances; do
47
    name=${i}
47
    name=${i}
48
48
49
    eval ${name}_enable=${dnscrypt_proxy_enable_tmp}
49
    eval ${name}_enable=${dnscrypt_proxy_enable_tmp}
50
    rcvar=${name}_enable
50
    rcvar=${name}_enable
51
51
52
    load_rc_config ${i}
52
    load_rc_config ${i}
53
53
54
    eval dnscrypt_proxy_uid_tmp=\${${i}_uid}
54
    eval dnscrypt_proxy_uid_tmp=\${${i}_uid}
55
    eval dnscrypt_proxy_resolver_tmp=\${${i}_resolver}
55
    eval dnscrypt_proxy_resolver_tmp=\${${i}_resolver}
56
    eval dnscrypt_proxy_pidfile_tmp=\${${i}_pidfile}
56
    eval dnscrypt_proxy_pidfile_tmp=\${${i}_pidfile}
57
    eval dnscrypt_proxy_logfile_tmp=\${${i}_logfile}
57
    eval dnscrypt_proxy_logfile_tmp=\${${i}_logfile}
58
58
59
:   ${dnscrypt_proxy_uid_tmp:=_dnscrypt-proxy}       # User to run daemon as
59
:   ${dnscrypt_proxy_uid_tmp:=_dnscrypt-proxy}       # User to run daemon as
60
:   ${dnscrypt_proxy_resolver_tmp:=cisco}            # resolver to use
60
:   ${dnscrypt_proxy_resolver_tmp:=random}           # resolver to use
61
:   ${dnscrypt_proxy_pidfile_tmp:=/var/run/${i}.pid} # Path to pid file
61
:   ${dnscrypt_proxy_pidfile_tmp:=/var/run/${i}.pid} # Path to pid file
62
:   ${dnscrypt_proxy_logfile_tmp:=/var/log/${i}.log} # Path to log file
62
:   ${dnscrypt_proxy_logfile_tmp:=/var/log/${i}.log} # Path to log file
63
63
64
    command_args="-d -p ${dnscrypt_proxy_pidfile_tmp} -l ${dnscrypt_proxy_logfile_tmp} -u ${dnscrypt_proxy_uid_tmp} -R ${dnscrypt_proxy_resolver_tmp}"
64
    command_args="-d -p ${dnscrypt_proxy_pidfile_tmp} -l ${dnscrypt_proxy_logfile_tmp} -u ${dnscrypt_proxy_uid_tmp} -R ${dnscrypt_proxy_resolver_tmp}"
65
65
66
    pidfile=${dnscrypt_proxy_pidfile_tmp}
66
    pidfile=${dnscrypt_proxy_pidfile_tmp}
67
67
68
    _rc_restart_done=false # workaround for: service dnscrypt-proxy restart
68
    _rc_restart_done=false # workaround for: service dnscrypt-proxy restart
69
69
70
    run_rc_command "$1"
70
    run_rc_command "$1"
71
done
71
done

Return to bug 223222