1 |
commit: 03b0458f99af0352b933bec57b7aff351f2c4480 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 29 14:18:18 2021 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 29 14:19:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03b0458f |
7 |
|
8 |
net-dns/bind: fix rndc keygen |
9 |
|
10 |
Package-Manager: Portage-3.0.17, Repoman-3.0.2 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
net-dns/bind/bind-9.16.15.ebuild | 24 ++++-------------------- |
14 |
net-dns/bind/metadata.xml | 1 - |
15 |
2 files changed, 4 insertions(+), 21 deletions(-) |
16 |
|
17 |
diff --git a/net-dns/bind/bind-9.16.15.ebuild b/net-dns/bind/bind-9.16.15.ebuild |
18 |
index 629ba6fe981..9fab32caeb8 100644 |
19 |
--- a/net-dns/bind/bind-9.16.15.ebuild |
20 |
+++ b/net-dns/bind/bind-9.16.15.ebuild |
21 |
@@ -36,8 +36,7 @@ SLOT="0" |
22 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" |
23 |
# -berkdb by default re bug 602682 |
24 |
IUSE="-berkdb +caps +dlz dnstap doc dnsrps fixed-rrset geoip geoip2 gssapi |
25 |
-json ldap lmdb mysql odbc postgres python selinux static-libs |
26 |
-urandom xml +zlib" |
27 |
+json ldap lmdb mysql odbc postgres python selinux static-libs xml +zlib" |
28 |
# sdb-ldap - patch broken |
29 |
# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 |
30 |
|
31 |
@@ -281,16 +280,9 @@ python_install() { |
32 |
pkg_postinst() { |
33 |
tmpfiles_process "${FILESDIR}"/named.conf |
34 |
|
35 |
- if [ ! -f '/etc/bind/rndc.key' && ! -f '/etc/bind/rndc.conf' ]; then |
36 |
- if use urandom; then |
37 |
- einfo "Using /dev/urandom for generating rndc.key" |
38 |
- /usr/sbin/rndc-confgen -r /dev/urandom -a |
39 |
- echo |
40 |
- else |
41 |
- einfo "Using /dev/random for generating rndc.key" |
42 |
- /usr/sbin/rndc-confgen -a |
43 |
- echo |
44 |
- fi |
45 |
+ if [[ ! -f '/etc/bind/rndc.key' && ! -f '/etc/bind/rndc.conf' ]]; then |
46 |
+ einfo "Using /dev/urandom for generating rndc.key" |
47 |
+ /usr/sbin/rndc-confgen -a |
48 |
chown root:named /etc/bind/rndc.key || die |
49 |
chmod 0640 /etc/bind/rndc.key || die |
50 |
fi |
51 |
@@ -363,14 +355,6 @@ pkg_config() { |
52 |
mknod ${CHROOT}/dev/zero c 1 5 || die |
53 |
chmod 0666 ${CHROOT}/dev/zero || die |
54 |
|
55 |
- if use urandom; then |
56 |
- mknod ${CHROOT}/dev/urandom c 1 9 || die |
57 |
- chmod 0666 ${CHROOT}/dev/urandom || die |
58 |
- else |
59 |
- mknod ${CHROOT}/dev/random c 1 8 || die |
60 |
- chmod 0666 ${CHROOT}/dev/random || die |
61 |
- fi |
62 |
- |
63 |
if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
64 |
cp -a /etc/bind ${CHROOT}/etc/ || die |
65 |
cp -a /var/bind ${CHROOT}/var/ || die |
66 |
|
67 |
diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml |
68 |
index e9cc55bb874..6bcb4fe262b 100644 |
69 |
--- a/net-dns/bind/metadata.xml |
70 |
+++ b/net-dns/bind/metadata.xml |
71 |
@@ -18,6 +18,5 @@ |
72 |
<flag name="gssapi">Enable gssapi support</flag> |
73 |
<flag name="json">Enable JSON statistics channel</flag> |
74 |
<flag name="lmdb">Enable LMDB support to store configuration for 'addzone' zones</flag> |
75 |
- <flag name="urandom">Use /dev/urandom instead of /dev/random</flag> |
76 |
</use> |
77 |
</pkgmetadata> |