Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/pdnsd/
Date: Mon, 01 Feb 2021 14:57:03
Message-Id: 1612191417.b8fbe13ab6d934481516622da1f285779a2e0e81.polynomial-c@gentoo
1 commit: b8fbe13ab6d934481516622da1f285779a2e0e81
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 1 14:56:46 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 1 14:56:57 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8fbe13a
7
8 net-dns/pdnsd: Removed old
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-dns/pdnsd/metadata.xml | 4 --
14 net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild | 131 -----------------------------------
15 2 files changed, 135 deletions(-)
16
17 diff --git a/net-dns/pdnsd/metadata.xml b/net-dns/pdnsd/metadata.xml
18 index 1198baddd17..b2ffc78b5c9 100644
19 --- a/net-dns/pdnsd/metadata.xml
20 +++ b/net-dns/pdnsd/metadata.xml
21 @@ -12,10 +12,6 @@
22 networking).
23 </longdescription>
24 <use>
25 - <flag name="isdn">
26 - Linux-only: check status of ippp interfaces with ISDN-specific
27 - system calls.
28 - </flag>
29 <flag name="urandom">
30 Linux-only: use /dev/urandom (pseudo-random number generation)
31 instead of the default use of random() PRNG.
32
33 diff --git a/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild b/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild
34 deleted file mode 100644
35 index 5a05f498a8b..00000000000
36 --- a/net-dns/pdnsd/pdnsd-1.2.9a-r1.ebuild
37 +++ /dev/null
38 @@ -1,131 +0,0 @@
39 -# Copyright 1999-2020 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=5
43 -
44 -inherit systemd user
45 -
46 -DESCRIPTION="Proxy DNS server with permanent caching"
47 -HOMEPAGE="http://members.home.nl/p.a.rombouts/pdnsd/"
48 -SRC_URI="http://members.home.nl/p.a.rombouts/pdnsd/releases/${P}-par.tar.gz"
49 -
50 -LICENSE="GPL-3"
51 -SLOT="0"
52 -KEYWORDS="~alpha amd64 arm ~ia64 ppc ~s390 sparc x86"
53 -IUSE="debug ipv6 isdn +urandom test"
54 -RESTRICT="!test? ( test )"
55 -
56 -RDEPEND=""
57 -DEPEND="test? ( net-dns/bind-tools )"
58 -
59 -pkg_setup() {
60 - enewgroup pdnsd
61 - enewuser pdnsd -1 -1 /var/lib/pdnsd pdnsd
62 -}
63 -
64 -src_configure() {
65 - local myconf=""
66 - use debug && myconf="${myconf} --with-debug=3"
67 - use urandom && myconf="${myconf} --with-random-device=/dev/urandom"
68 -
69 - econf \
70 - --sysconfdir=/etc/pdnsd \
71 - --with-cachedir=/var/cache/pdnsd \
72 - --with-default-id=pdnsd \
73 - $(use_enable ipv6) $(use_enable ipv6 ipv6-startup) \
74 - $(use_enable isdn) \
75 - ${myconf}
76 -}
77 -
78 -src_install() {
79 - emake DESTDIR="${D}" install
80 -
81 - dodoc AUTHORS ChangeLog* NEWS README THANKS TODO README.par
82 - docinto contrib ; dodoc contrib/{README,dhcp2pdnsd,pdnsd_dhcp.pl}
83 - docinto html ; dohtml doc/html/*
84 - docinto txt ; dodoc doc/txt/*
85 - newdoc doc/pdnsd.conf pdnsd.conf.sample
86 -
87 - newinitd "${FILESDIR}/pdnsd.rc8" pdnsd
88 - newinitd "${FILESDIR}/pdnsd.online.2" pdnsd-online
89 - systemd_newtmpfilesd "${FILESDIR}/pdnsd.tmpfiles" pdnsd.conf
90 - systemd_dounit "${FILESDIR}/pdnsd.service"
91 -
92 - mkdir "${T}"/confd || die
93 -
94 - cat - > "${T}"/confd/pdnsd-online <<EOF
95 -# Make sure to change the rc_need variable to the service for the
96 -# interface that connects you to the dns servers.
97 -#
98 -# For instance if you use a PPP connection on ppp0 to connect, set
99 -# rc_need="net.ppp0"
100 -
101 -rc_need="net.lo"
102 -EOF
103 -
104 - # Don't try to do the smart thing and add the --help output here:
105 - # it will cause the file to be etc-updated if the help text
106 - # changes and fails when cross-compiling.
107 - cat - > "${T}"/confd/pdnsd <<EOF
108 -# Command line options, check pdnsd --help for a list of valid
109 -# parameters. Note that most of the options that can be given at
110 -# command-line are also available as configuration parameters in
111 -# /etc/pdnsd/pdnsd.conf
112 -PDNSDCONFIG=""
113 -EOF
114 -
115 - doconfd "${T}"/confd/*
116 -
117 - # gentoo resolvconf support
118 - exeinto /etc/resolvconf/update.d
119 - newexe "${FILESDIR}/pdnsd.resolvconf-r1" pdnsd
120 -}
121 -
122 -src_test() {
123 - fail_kill() {
124 - kill -9 $(<"${T}"/pid)
125 - die "$1"
126 - }
127 -
128 - mkdir "${T}/pdnsd" || die
129 - echo -n -e "pd12\0\0\0\0" > "${T}/pdnsd/pdnsd.cache"
130 - IPS=$(grep ^nameserver /etc/resolv.conf | sed -e 's/nameserver \(.*\)/\tip=\1;/g' | xargs)
131 - sed -e "s/\tip=/${IPS}/" -e "s:cache_dir=:cache_dir=${T}/pdnsd:" "${FILESDIR}/pdnsd.conf.test" \
132 - > "${T}/pdnsd.conf.test"
133 - src/pdnsd -c "${T}/pdnsd.conf.test" -g -s -d -p "${T}/pid" || die "couldn't start daemon"
134 - sleep 3
135 -
136 - find "${T}" -ls
137 - [ -s "${T}/pid" ] || die "empty or no pid file created"
138 - [ -S "${T}/pdnsd/pdnsd.status" ] || fail_kill "no socket created"
139 - src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" server all up || fail_kill "failed to start the daemon"
140 - src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" status || fail_kill "failed to communicate with the daemon"
141 - sleep 3
142 -
143 - dig @127.0.0.1 -p 33455 localhost > "${T}"/dig.output 2>&1
144 - cat "${T}"/dig.output || die
145 - fgrep -q "status: NOERROR" "${T}"/dig.output || fail_kill "www.gentoo.org lookup failed"
146 -
147 - kill $(<"${T}/pid") || fail_kill "failed to terminate daemon"
148 -}
149 -
150 -pkg_postinst() {
151 - elog
152 - elog "Add pdnsd to your default runlevel - rc-update add pdnsd default"
153 - elog ""
154 - elog "Add pdnsd-online to your online runlevel."
155 - elog "The online interface will be listed in /etc/conf.d/pdnsd-online"
156 - elog ""
157 - elog "Sample config file in /etc/pdnsd/pdnsd.conf.sample"
158 -
159 - # The tmpfiles.d configuration does not come into effect before the
160 - # next reboot so create the cachedir now.
161 - local cachedir="/var/cache/pdnsd"
162 - if [[ ! -d ${cachedir} ]] ; then
163 - mkdir ${cachedir} || eerror "Failed to create cache"
164 - fi
165 - chown pdnsd:pdnsd ${cachedir} \
166 - || eerror "Failed to set ownership for cachedir"
167 - chmod 0750 ${cachedir} \
168 - || eerror "Failed to set permissions for cachedir"
169 -}