diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-08-18 18:16:17 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-08-18 18:16:17 +0100 |
commit | fc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch) | |
tree | 326613a08f25851c388715e205576a2e7d25dc4f /net-dns/pdnsd | |
parent | b24bd25253fe093f722ab576d29fdc41d04cb1ee (diff) |
gentoo resync : 18.08.2019
Diffstat (limited to 'net-dns/pdnsd')
-rw-r--r-- | net-dns/pdnsd/Manifest | 3 | ||||
-rw-r--r-- | net-dns/pdnsd/files/pdnsd-online.confd | 7 | ||||
-rw-r--r-- | net-dns/pdnsd/files/pdnsd.confd | 5 | ||||
-rw-r--r-- | net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild | 106 |
4 files changed, 121 insertions, 0 deletions
diff --git a/net-dns/pdnsd/Manifest b/net-dns/pdnsd/Manifest index 3c820a25e271..11492b7f05f1 100644 --- a/net-dns/pdnsd/Manifest +++ b/net-dns/pdnsd/Manifest @@ -1,4 +1,6 @@ +AUX pdnsd-online.confd 226 BLAKE2B 8846e8eb10d97b4fbfb8bb5615cb5f0f58c7ea9561ff378eac69155888f82406c06a21db6bdb12a82cad7e124b2b842b980b313d86d31c723d93f7a14d0a70ce SHA512 6f860b253acbe8b18f6473b987c9ba222e2f078981acd5162606834c34de5a388925aad3d1ed73a7a7b1f166871f93f1968ec38da9030b0eadfceb01f8e0bf1f AUX pdnsd.conf.test 370 BLAKE2B f48396e0f78954a6c0c21df19776b1bb8f221b5325612413b76f61110779d5f109eeffc952d66492dda308eba6f9d4bcc03b1c5a0f2748a22052a6028a7a57b4 SHA512 1882df76c4f3280041b9045b8ae06b929c8c418206270c25b09e604e591a5fb287328af340ec9164fb36c5af8bd2c9216a6a0fdf6eefad3986cc3221880d8138 +AUX pdnsd.confd 232 BLAKE2B 227f6f6aff676221021619bf3bb3052f8c8c3729eedc3f58e1e56cd69cff014276564e47ac293108576c163159571623ac701657ef844c537d7263f46bf9f72b SHA512 e50abe37c914d070b44c8aa63d57924840ba07c5668a0760dfc89e05a25176e76d96e9c7acfef5010750fa2cee38f01dfddc60b3a526f87763ab130caf7b5d8c AUX pdnsd.online.2 568 BLAKE2B 05c51f8769c6d32ada77f8a0f1784680ff6a3156d46e478442d90b5b240a568ef0ff65a52cfe261fb4de6fd76f5c41bb54e535dd690de3026861b0c7e2a28d84 SHA512 15d0be2ec2c6e9c9b598bc63a30d72e77ea7b80a14547f0a1c7af1680afabc4fe56eb4ff8ad8470642ed1b441acff11d6b4f01f14e9486d1502f9b841beab99d AUX pdnsd.rc8 573 BLAKE2B 9ba317e4c8df4c351452cb2de554c38b341e3ddf621d40c1486baec2312cc300091590a0afe6bd0e279f7371d003a3e95a6fd413eca7601245a22c3c3d705856 SHA512 be012cc164301bada209dfa26087eac85735fae2dd82d76e3f1154ba21df122be2be05bc029e9219c69514de4835495aed51dcbb99e19daf3fec75110b5d941c AUX pdnsd.resolvconf-r1 17538 BLAKE2B 0797bf3800e5ca1bf3d4c55cbd0862bb8a6964b5b1c4554fa9e500368909a8fb2d309a561d5b097ac828f1e1dd5601df3a7a112ae9dd4132fdae2731a3cd3096 SHA512 22a92df825d560ec03860c1a9a6000f32e19b33ccda0f6412830ebca13499e6d45161267bb30658aa9ed4b5862bae04e304e25358c30ee6d80a9deea90ba989f @@ -6,4 +8,5 @@ AUX pdnsd.service 269 BLAKE2B b14978db01ec729a6e04d4849a468fd45999c1fbd7d21e986b AUX pdnsd.tmpfiles 37 BLAKE2B c4da53c3d0ebea88e456e6ea07b2505ed187e074286bb40fabde6a27c4cc017dabea3207e8fde80aa3fe38957b12ce8e09c809b369f06356c1737ae0825cdbff SHA512 7beacc66e8504ca0f8e613dfc8ed2479362f1ebc98ffab902622b36c795fe75e176d9f0a330ad74e10a7f7b1597cce068d94eea6511a75b941e42b2458b76df5 DIST pdnsd-1.2.9a-par.tar.gz 516061 BLAKE2B 33f2fa85f4b2fa3b709e612c12c8a6edff67f3d2203a8ccd9e838f72b8ab2664eb2e88c0957c08c64568581d9eeb4bede9157ba0928fa6d28ccca279f71fbd1a SHA512 4fde296642306aa986ddb7cad0b5991bcd397656d93ef4962706276848c7fa62c664a40198e807d029637f116e8000c237d98b91cbbfec5c08b134d8bb3adf81 EBUILD pdnsd-1.2.9a-r1.ebuild 4074 BLAKE2B f4efe1ca8b8d59d357d9dc3ef287ecd38846b1ee94fca864e600a94758775b7c861510d545f7202a40bd3a3f659dbbf6d531ce2cd95d90e88bfb49c039f92d03 SHA512 2378463b4df77ed3cca083e4434ccbec9b1bfebe65a2fbd42acb10a90f1ae22e43e875302fcf5a47c35702b57186a4303234f29b2618d502ee06e75d13d6c554 +EBUILD pdnsd-1.2.9a-r2.ebuild 3237 BLAKE2B 443a730a92b6ed3d19437035b8e1d2179744331a2a847012060e9b8913dfbac0dcc82cc007d2e22030803d9b7880495af149adda42fbb7f6dbccf279a312ff92 SHA512 0c1016fa373001c5fc32aed688b010646429d7ceeabde04b1cb161d0e8d871a9a2693635561b6e0a03e622ca266c839c824237d43201843935a1769da843fcfc MISC metadata.xml 814 BLAKE2B 2f0e173648d270958a54e378a0638936666c958f69768047e24d4d6cd03d9f52d89940cf57fb346d27fd2806c6ea6be378ff4d950161d475f1f0a0eac0fe206f SHA512 b5bca37d42c4c50031a968297332e824e2830481903ae4036347ffbf554a0a37efb582d8a52b6bba48a0566db81942b1052aca5ed16bbe248fcec46ea99090a8 diff --git a/net-dns/pdnsd/files/pdnsd-online.confd b/net-dns/pdnsd/files/pdnsd-online.confd new file mode 100644 index 000000000000..eb8d764f0700 --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd-online.confd @@ -0,0 +1,7 @@ +# Make sure to change the rc_need variable to the service for the +# interface that connects you to the dns servers. +# +# For instance if you use a PPP connection on ppp0 to connect, set +# rc_need="net.ppp0" + +rc_need="net.lo" diff --git a/net-dns/pdnsd/files/pdnsd.confd b/net-dns/pdnsd/files/pdnsd.confd new file mode 100644 index 000000000000..87dc6d63ae77 --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.confd @@ -0,0 +1,5 @@ +# Command line options, check pdnsd --help for a list of valid +# parameters. Note that most of the options that can be given at +# command-line are also available as configuration parameters in +# /etc/pdnsd/pdnsd.conf +PDNSDCONFIG="" diff --git a/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild b/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild new file mode 100644 index 000000000000..941fd2c1f91c --- /dev/null +++ b/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd + +DESCRIPTION="Proxy DNS server with permanent caching" +HOMEPAGE="http://members.home.nl/p.a.rombouts/pdnsd/" +SRC_URI="http://members.home.nl/p.a.rombouts/pdnsd/releases/${P}-par.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~s390 ~sparc ~x86" +IUSE="debug ipv6 isdn +urandom test" + +RDEPEND=" + acct-group/pdnsd + acct-user/pdnsd +" +DEPEND="test? ( net-dns/bind-tools )" + +src_configure() { + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/pdnsd + --with-cachedir="${EPREFIX}"/var/cache/pdnsd + --with-default-id=pdnsd + $(use_enable ipv6) + $(use_enable ipv6 ipv6-startup) + $(use_enable isdn) + $(usex debug '--with-debug=3' '') + $(usex urandom "--with-random-device=${EPREFIX}/dev/urandom" '') + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + local DOCS=( AUTHORS ChangeLog* NEWS README THANKS TODO README.par ) + default + + docinto contrib + dodoc contrib/{README,dhcp2pdnsd,pdnsd_dhcp.pl} + + docinto html + dodoc doc/html/* + docinto txt + dodoc doc/txt/* + newdoc doc/pdnsd.conf pdnsd.conf.sample + + newinitd "${FILESDIR}/pdnsd.rc8" pdnsd + newconfd "${FILESDIR}/pdnsd.confd" pdnsd + newinitd "${FILESDIR}/pdnsd.online.2" pdnsd-online + newconfd "${FILESDIR}/pdnsd-online.confd" pdnsd-online + systemd_newtmpfilesd "${FILESDIR}/pdnsd.tmpfiles" pdnsd.conf + systemd_dounit "${FILESDIR}/pdnsd.service" +} + +src_test() { + fail_kill() { + kill -9 $(<"${T}"/pid) + die "$1" + } + + mkdir "${T}/pdnsd" || die + echo -n -e "pd12\0\0\0\0" > "${T}/pdnsd/pdnsd.cache" + IPS="$(grep ^nameserver /etc/resolv.conf | sed -e 's/nameserver \(.*\)/\tip=\1;/g' | xargs)" + sed -e "s/\tip=/${IPS}/" -e "s:cache_dir=:cache_dir=${T}/pdnsd:" "${FILESDIR}/pdnsd.conf.test" \ + > "${T}/pdnsd.conf.test" + src/pdnsd -c "${T}/pdnsd.conf.test" -g -s -d -p "${T}/pid" || die "couldn't start daemon" + sleep 3 + + find "${T}" -ls + [ -s "${T}/pid" ] || die "empty or no pid file created" + [ -S "${T}/pdnsd/pdnsd.status" ] || fail_kill "no socket created" + src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" server all up || fail_kill "failed to start the daemon" + src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" status || fail_kill "failed to communicate with the daemon" + sleep 3 + + dig @127.0.0.1 -p 33455 localhost > "${T}"/dig.output 2>&1 + cat "${T}"/dig.output || die + fgrep -q "status: NOERROR" "${T}"/dig.output || fail_kill "www.gentoo.org lookup failed" + + kill $(<"${T}/pid") || fail_kill "failed to terminate daemon" +} + +pkg_postinst() { + elog + elog "Add pdnsd to your default runlevel - rc-update add pdnsd default" + elog "" + elog "Add pdnsd-online to your online runlevel." + elog "The online interface will be listed in /etc/conf.d/pdnsd-online" + elog "" + elog "Sample config file in /etc/pdnsd/pdnsd.conf.sample" + + # The tmpfiles.d configuration does not come into effect before the + # next reboot so create the cachedir now. + local cachedir="${EPREFIX}/var/cache/pdnsd" + if [[ ! -d "${cachedir}" ]] ; then + mkdir "${cachedir}" || eerror "Failed to create cache" + fi + chown pdnsd:pdnsd "${cachedir}" \ + || eerror "Failed to set ownership for cachedir" + chmod 0750 "${cachedir}" \ + || eerror "Failed to set permissions for cachedir" +} |