diff options
Diffstat (limited to 'net-dns/dnsmasq')
-rw-r--r-- | net-dns/dnsmasq/Manifest | 17 | ||||
-rw-r--r-- | net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild | 192 | ||||
-rw-r--r-- | net-dns/dnsmasq/dnsmasq-2.76.ebuild | 188 | ||||
-rw-r--r-- | net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild | 198 | ||||
-rw-r--r-- | net-dns/dnsmasq/dnsmasq-2.77.ebuild | 196 | ||||
-rw-r--r-- | net-dns/dnsmasq/dnsmasq-2.78.ebuild | 198 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 | 29 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 | 29 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-r2 | 23 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init-r3 | 23 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq.confd-r1 | 4 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq.service-r1 | 12 | ||||
-rw-r--r-- | net-dns/dnsmasq/metadata.xml | 22 |
13 files changed, 1131 insertions, 0 deletions
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest new file mode 100644 index 000000000000..bc2d66a37eca --- /dev/null +++ b/net-dns/dnsmasq/Manifest @@ -0,0 +1,17 @@ +AUX dnsmasq-init-dhcp-r1 570 SHA256 f93f49d5894d165c79a3bab7658a5405c8f303afbce6aec99a97b36b2a2b478f SHA512 d0ac774f48aae8a24b9e45c7bcc139fbb3efa0d181bbdd6010e66b62ce546a91deeaee2ca207d367e65748d160c92b54223bf012b26179ae48bd8b3812a0b9d9 WHIRLPOOL bff55ad4e83890689fb18e4e018e056dce9e6af48dad0d6118c8a588534d5bb361935c000d59dd1ca843932c0f55bb9008489f68faf11b4cd8601ee97a9330fc +AUX dnsmasq-init-dhcp-r2 592 SHA256 ee59c1d6b2e010d07fb2a759827ef6e0cad32dc247423a3ca2572e2ec7fd6e71 SHA512 25620b563a8489a3c1715f17ff4e36695ec08878515c3b2aebab723e8747d38cfbd07c1850f6fef0421653f88032096a839ef6e42fe0c20cc008cfe67bf6c9ea WHIRLPOOL 29a0c1f872c1e5d467cdc8ef22e88482a7b06524b5c80d443a23e5b13aaff94f29ff347a2303de630e251b90005b3766551a35ff3840519eb052aacd3cebb40a +AUX dnsmasq-init-r2 457 SHA256 8b184410ebc510841f6a4f6f2b622e97cb7d5d697ece8e1f30e34dbcafad21fe SHA512 8cf3092fcc095c307009d12a150883386bd1b0dcdc9cac0c5d1a24df80405bdba89497c88a1e2ac1e1259d3684bc6a6089f477a4f735fb8d0f4edcc29d6e9a06 WHIRLPOOL b7f8ef9cf3e2c99e1d8339a0e0f097ebe92b4443763d8be5af36a2f55466c5f5ad561aaedc49cac5961a35e65756ecae0932bf952658e71b3222f07bd77cf011 +AUX dnsmasq-init-r3 481 SHA256 1c68a33f6039905c3d0e236d091b19b54de58267bf4d848c9f60a4589cfcf191 SHA512 23f292dbf479479ef9d23c0c23ccb2735995f97d37156df3a3818a69ce938ffc2ec7be636771f960038a2e876521f144cc2f2a6fd154de94ff309b50f0cbfa44 WHIRLPOOL 9c35b773b6faa29cd40910e334b780e365a96503b67038227ae6ac881c3a3b7f66af2d8063a58b2f5adfd00264fe0cdae3fc68fcf4bfc467c7a20ff2d1ab844c +AUX dnsmasq.confd-r1 170 SHA256 51c0672a70d5d6793d295d82db666d372fb081e8627318f67c88e48d08d254b5 SHA512 9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8 WHIRLPOOL 86f364adcb5576bfb2cc84d13dd087bef987cae70eee1ae7816f0febc58ec637a97fea357c506456781eab116e257d06b1e45f7e2bbd81849251c15067a347ab +AUX dnsmasq.service-r1 278 SHA256 2cca1e7ec70aee80c9d1f59e7f17b515e5fa66b08835ed0fddbe799d2b39db04 SHA512 3571417b23071d9c3cfaf6d00363adb2cb011d04f1ed38631ddecd6eaa2c9ed37e1435a1fd32c40b0de43b0a84dd1ac8691a0a29493b391bafbb843d581bafc1 WHIRLPOOL efbb77d8a3ec69bd030f219ffb975ec0a5680f0d4da8b05bbb896db26c444c861fb47d96dfe8201f21acf5085fb465892ef33263de677390308b2328a8a7e33e +DIST dnsmasq-2.76.tar.xz 480796 SHA256 4b92698dee19ca0cb2a8f2e48f1d2dffd01a21eb15d1fbed4cf085630c8c9f96 SHA512 8a930f3e7cdc0c291ce89bea8128a4b8438b9aa9e660a2ac037e0baa4c5c74f4482a8f83b0410066a759444b3c4e1cf62a9beb625e38509690227996de10e06a WHIRLPOOL e0710f879fd6f8e27581b8c400704660941601cd2077f32d7c2b3f9791c6be8404469770e74f7e1a03880507a32a30c19b89f6a953a757ad01305f829448f0bc +DIST dnsmasq-2.77.tar.xz 487244 SHA256 6eac3b1c50ae25170e3ff8c96ddb55236cf45007633fdb8a35b1f3e02f5f8b8a SHA512 6ca98a71a8fdfd606e29c58b34dadfa63148c39f931570cca67a287e044d52c6ec2f8acbf5620ada3312e9db3a2fd63877188d829c070beaa730607e3309e768 WHIRLPOOL 94a4fdc23d81fe38456756d81e53f1258ccd360c4d22952c889f2d5f76d401696587a5362f5aacd1ef86799874ac9eae3c3879d0fe81b66beeafb2f3ce0e01d0 +DIST dnsmasq-2.78.tar.xz 489172 SHA256 89949f438c74b0c7543f06689c319484bd126cc4b1f8c745c742ab397681252b SHA512 9b79b84e5a768d52f90f6335ccef2c404ecd7a13e78e49f4cd0755fffc6cf34d0dc96ad4c72cad1dab3c5743a8d0d789b3e9b6e625b03c5675bb898ca61a698b WHIRLPOOL 3fdde3511c39b5f42a8166936576b60f7114a54388e317136ef9c4b5770c02106706dc0612361b18d25fa16a340e613c98aa78973e2dc038dc93f2a664d27606 +EBUILD dnsmasq-2.76-r1.ebuild 4434 SHA256 dbce5a41e168eadcb76288763c1c92d4eb063a0fbf525c0bcba79d9cb74053e0 SHA512 e6bdf4024337b4a58656e848c0e37ce7e866a452c88ecc4f8b98fa5cdaba6040d839c52654c1604270577dfe23e195ad20bfd0058b18500d591b80c5e14fdf48 WHIRLPOOL df90df04eac87f460efe664e085f2bb1aaaddb8195f45631e79f4f26530f851d11afc12d0105ad49ff7068730f01efea1e159cbd86e989ca37acff55649e05c7 +EBUILD dnsmasq-2.76.ebuild 4313 SHA256 de5cea480d2b30ca4fe36b2701efe91188162f9befbd4d8ea1d0303044fbfc79 SHA512 dbe879468b566b1b12f069b7bae4a9abdab7cdd3677fb4aad0c514ab1b2510a5e17910527b107a137454e6008e0717731f7159a8e91736554ff456bb88c70206 WHIRLPOOL 18173c1b9601f466d5b821bc04880b7549d6c67e80da7e47929a8b8df0dc8f87ab2f2518475b9cdc6cd0d9a7ae38770f8e86b7c1e93fdfaf3eddcf51154962e5 +EBUILD dnsmasq-2.77-r1.ebuild 4586 SHA256 63ea93e59a737c9e4c7a3dd7f3b00bb85484070cbb504f7a85c493f6ab7dfb24 SHA512 f4510d0648c3827231b3eb77e8fb151ab6f770c59d15fbf72134509c7d6292af3d43149b81b00a5353a9d69e356abe401e29982f1e0eb141984c2095188eeca7 WHIRLPOOL 0107a6df9b6aa7f95ebcdbf335e075bddeeda3020dec93a0fa05d2bd1d734430883469b1de05d3eb67d7e500ff6e5b6714b7d00dfca1bebfb435d0bb6b1b65ec +EBUILD dnsmasq-2.77.ebuild 4554 SHA256 4c11d59e86b721755954e553d22b3d3eb81a8fc35e3ecb6a32b4329589a5416a SHA512 0b470711d65db27c994309dd72c213127b1ae87e506fa0ada259152315a06724f2df786c14903bc6b63a50b01948106e68aebc93a5b81a1a3baab353fe37627a WHIRLPOOL 7112ff2c81f411146b9893b192ff7a84e751bd2a54a2be7cddd8f1703b6d0181bd759eafb3b81978af3ab2b52fd0b36750213eb98ef1e326b2f1ab3ea688f7fb +EBUILD dnsmasq-2.78.ebuild 4580 SHA256 6283b2ef6141f900b8d416ff68bf57d61de06eaade281735182e22daec5f1d0e SHA512 4dc7961b3b7ba645dd462f3641f5e5836fdddd4c9dd61d0f737cd19cb2503a230462c037d5955e66b2d50931a8782d1fb97520514a8bf540f914fc6dab09a6ff WHIRLPOOL 8c42aeb1866a18db41a46695f22d3767824623f0d39bf958b4d317b9be67bba129de8895371fac5637a11f8201f4178567c38c40bba3adbfb63c164367e2c54d +MISC ChangeLog 8738 SHA256 241379ae12e786c5cfa51e58455858bab861389383f4577036615c2d59858758 SHA512 c91759c34187dac57d8fe266204a0538d7daf465c9cb4377037474e2ff33071d7018ecc1e008f62ad36df5363abdeb4fa998e0111df4f844fa7675b48d01e4b8 WHIRLPOOL 789019f9c260e216c5f81606c2df3a9e6a39c8953a63a0ceac032ae85b36dff1fa2eecfb527b3683b8e1a60c93efb3dcf5f5441cde5ea5127b096c1f28061af8 +MISC ChangeLog-2015 38329 SHA256 cd8d8df7e7c362a1f284d2ef412c4d9352a472427f25a4ac677b8e3f6a7bfae0 SHA512 80d2755dc22f94c4b35ae57522bab311541c328c703f897dd2427a158d5faccb3d2f55b222129a300f2dbdb53fe899d0d18ae6fd599639f201311ff05028a056 WHIRLPOOL 629bc81f6d6413e1a581cd65a984fadf7f0002ad7cc9862490fdf8d9c4786ce2e71b9b60a8dc0677ad9d483027eac97ac28a7a86483fd870fbae7ee4ea019ee8 +MISC metadata.xml 1149 SHA256 18b445c1b193937f84d229879321ab7c36199a82a4bcb100e087929f73d5f850 SHA512 7fad0bb400a664a67e82173015dcc2fc95644dd6c357e787b8257a193dc14adbee8f5a04cb4422fadefdeec0d3dc5bd986f4f5b44ee420b8a104cb5a8e1b58a6 WHIRLPOOL 8648a3e6f7424dd49e6d483da4559b3be08de89e730466f1515857505e8f5bf4a70347dff2531f900762fabf9480f1165437e970c4ccfcd0ac7af1a3d76cbd2b diff --git a/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild new file mode 100644 index 000000000000..27f157cd660e --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp" +DM_LINGUAS="de es fi fr id it no pl pt_BR ro" +for dm_lingua in ${DM_LINGUAS}; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( + sys-devel/gettext + net-dns/libidn + ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( + dev-libs/nettle[static-libs(+)] + ) + ) + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword="${uword^^}" + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + default + + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use_have idn)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/lease-tools \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + COPTS="${COPTS}" \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in ${DM_LINGUAS}; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + docinto html/ + dodoc *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} + doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 + if use ipv6; then + dosbin contrib/lease-tools/dhcp_release6 + doman contrib/lease-tools/dhcp_release6.1 + fi + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/dnsmasq-2.76.ebuild b/net-dns/dnsmasq/dnsmasq-2.76.ebuild new file mode 100644 index 000000000000..3b3d54b64eb9 --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.76.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp" +DM_LINGUAS="de es fi fr id it no pl pt_BR ro" +for dm_lingua in ${DM_LINGUAS}; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( + sys-devel/gettext + net-dns/libidn + ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( + dev-libs/nettle[static-libs(+)] + ) + ) + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword="${uword^^}" + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + default + + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use_have idn)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/lease-tools \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + COPTS="${COPTS}" \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in ${DM_LINGUAS}; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + docinto html/ + dodoc *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} + doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild new file mode 100644 index 000000000000..754968a7d317 --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.77-r1.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" + +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify" +IUSE+=" ipv6 lua nls script selinux static tftp" + +DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) + +for dm_lingua in "${DM_LINGUAS[@]}"; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( + !libidn2? ( net-dns/libidn ) + libidn2? ( >=net-dns/libidn2-2.0 ) + ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( sys-devel/gettext ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( dev-libs/nettle[static-libs(+)] ) + ) + virtual/pkgconfig +" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script ) + libidn2? ( idn )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword="${uword^^}" + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + default + + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use libidn2 || use_have idn)" + COPTS+="$(use_have libidn2)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have -n id id)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/lease-tools \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + COPTS="${COPTS}" \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in "${DM_LINGUAS[@]}"; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + docinto html/ + dodoc *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} + doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 + if use ipv6; then + dosbin contrib/lease-tools/dhcp_release6 + doman contrib/lease-tools/dhcp_release6.1 + fi + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/dnsmasq-2.77.ebuild b/net-dns/dnsmasq/dnsmasq-2.77.ebuild new file mode 100644 index 000000000000..3b26668c2df5 --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.77.ebuild @@ -0,0 +1,196 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" + +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify" +IUSE+=" ipv6 lua nls script selinux static tftp" + +DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) + +for dm_lingua in "${DM_LINGUAS[@]}"; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + libidn2? ( >=net-dns/libidn2-2.0 ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( sys-devel/gettext ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( dev-libs/nettle[static-libs(+)] ) + ) + virtual/pkgconfig +" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script ) + libidn2? ( !idn )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword="${uword^^}" + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + default + + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use_have idn)" + COPTS+="$(use_have libidn2)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have -n id id)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/lease-tools \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + COPTS="${COPTS}" \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in "${DM_LINGUAS[@]}"; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + docinto html/ + dodoc *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} + doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 + if use ipv6; then + dosbin contrib/lease-tools/dhcp_release6 + doman contrib/lease-tools/dhcp_release6.1 + fi + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/dnsmasq-2.78.ebuild b/net-dns/dnsmasq/dnsmasq-2.78.ebuild new file mode 100644 index 000000000000..579f6ab2876b --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.78.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs flag-o-matic user systemd + +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" + +IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify" +IUSE+=" ipv6 lua nls script selinux static tftp" + +DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) + +for dm_lingua in "${DM_LINGUAS[@]}"; do + IUSE+=" linguas_${dm_lingua}" +done + +CDEPEND="dbus? ( sys-apps/dbus ) + idn? ( + !libidn2? ( net-dns/libidn ) + libidn2? ( >=net-dns/libidn2-2.0 ) + ) + lua? ( dev-lang/lua:* ) + conntrack? ( net-libs/libnetfilter_conntrack ) + nls? ( sys-devel/gettext ) +" + +DEPEND="${CDEPEND} + app-arch/xz-utils + dnssec? ( + dev-libs/nettle[gmp] + static? ( dev-libs/nettle[static-libs(+)] ) + ) + virtual/pkgconfig +" + +RDEPEND="${CDEPEND} + dnssec? ( + !static? ( + dev-libs/nettle[gmp] + ) + ) + selinux? ( sec-policy/selinux-dnsmasq ) +" + +REQUIRED_USE="dhcp-tools? ( dhcp ) + lua? ( script ) + libidn2? ( idn )" + +use_have() { + local useflag no_only uword + if [[ $1 == '-n' ]]; then + no_only=1 + shift + fi + useflag="${1}" + shift + + uword="${1:-${useflag}}" + shift + + while [[ ${uword} ]]; do + uword="${uword^^}" + + if ! use "${useflag}"; then + echo -n " -DNO_${uword}" + elif [[ -z "${no_only}" ]]; then + echo -n " -DHAVE_${uword}" + fi + uword="${1}" + shift + done +} + +pkg_pretend() { + if use static; then + einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." + use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored." + fi +} + +pkg_setup() { + enewgroup dnsmasq + enewuser dnsmasq -1 -1 /dev/null dnsmasq +} + +src_prepare() { + default + + sed -i -r 's:lua5.[0-9]+:lua:' Makefile + sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example +} + +src_configure() { + COPTS="$(use_have -n auth-dns auth)" + COPTS+="$(use_have conntrack)" + COPTS+="$(use_have dbus)" + COPTS+="$(use libidn2 || use_have idn)" + COPTS+="$(use_have libidn2)" + COPTS+="$(use_have -n inotify)" + COPTS+="$(use_have -n dhcp dhcp dhcp6)" + COPTS+="$(use_have -n ipv6 ipv6 dhcp6)" + COPTS+="$(use_have -n id id)" + COPTS+="$(use_have lua luascript)" + COPTS+="$(use_have -n script)" + COPTS+="$(use_have -n tftp)" + COPTS+="$(use_have dnssec)" + COPTS+="$(use_have static dnssec_static)" +} + +src_compile() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + COPTS="${COPTS}" \ + CONFFILE="/etc/${PN}.conf" \ + all$(use nls && echo "-i18n") + + use dhcp-tools && emake -C contrib/lease-tools \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + CC="$(tc-getCC)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + all +} + +src_install() { + local lingua puid + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + COPTS="${COPTS}" \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") + + for lingua in "${DM_LINGUAS[@]}"; do + use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua} + done + [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/ + + dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example + dodoc -r logo + + docinto html/ + dodoc *.html + + newinitd "${FILESDIR}"/dnsmasq-init-r3 ${PN} + newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} + + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + insinto /usr/share/dnsmasq + doins trust-anchors.conf + + if use dhcp; then + dodir /var/lib/misc + newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r2 ${PN} + fi + if use dbus; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi + + if use dhcp-tools; then + dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} + doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 + if use ipv6; then + dosbin contrib/lease-tools/dhcp_release6 + doman contrib/lease-tools/dhcp_release6.1 + fi + fi + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service +} + +pkg_preinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}" +} + +pkg_postinst() { + # temporary workaround to (hopefully) prevent leases file from being removed + [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 new file mode 100644 index 000000000000..b62630f7140b --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r1 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +pidfile="/var/run/dnsmasq.pid" +command="/usr/sbin/dnsmasq" +command_args="-x ${pidfile} ${DNSMASQ_OPTS}" +retry="TERM/3/TERM/5" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +start_pre() { + checkpath --owner dnsmasq:dnsmasq \ + --mode 0644 \ + --file /var/lib/misc/dnsmasq.leases +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + kill -HUP "$(cat "${pidfile}")" + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 new file mode 100644 index 000000000000..610ce7a5d2e1 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +pidfile="/var/run/dnsmasq.pid" +command="/usr/sbin/dnsmasq" +command_args="-x ${pidfile} ${DNSMASQ_OPTS}" +retry="TERM/3/TERM/5" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +start_pre() { + checkpath --owner dnsmasq:dnsmasq \ + --mode 0644 \ + --file /var/lib/misc/dnsmasq.leases +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r2 b/net-dns/dnsmasq/files/dnsmasq-init-r2 new file mode 100644 index 000000000000..ed487b9fd1bb --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +pidfile="/var/run/dnsmasq.pid" +command="/usr/sbin/dnsmasq" +command_args="-x ${pidfile} ${DNSMASQ_OPTS}" +retry="TERM/3/TERM/5" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP $(cat "${pidfile}") + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r3 b/net-dns/dnsmasq/files/dnsmasq-init-r3 new file mode 100644 index 000000000000..9d58b26fa5ee --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init-r3 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +pidfile="/var/run/dnsmasq.pid" +command="/usr/sbin/dnsmasq" +command_args="-x ${pidfile} ${DNSMASQ_OPTS}" +retry="TERM/3/TERM/5" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq.confd-r1 b/net-dns/dnsmasq/files/dnsmasq.confd-r1 new file mode 100644 index 000000000000..0e94463074c9 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.confd-r1 @@ -0,0 +1,4 @@ +# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq + +# See the dnsmasq(8) man page for possible options to put here. +DNSMASQ_OPTS="--user=dnsmasq --group=dnsmasq" diff --git a/net-dns/dnsmasq/files/dnsmasq.service-r1 b/net-dns/dnsmasq/files/dnsmasq.service-r1 new file mode 100644 index 000000000000..8e313bcfd996 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.service-r1 @@ -0,0 +1,12 @@ +[Unit] +Description=A lightweight DHCP and caching DNS server +After=network.target + +[Service] +Type=simple +ExecStartPre=/usr/sbin/dnsmasq --test +ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml new file mode 100644 index 000000000000..dd1a2a161c68 --- /dev/null +++ b/net-dns/dnsmasq/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> +<email>chutzpah@gentoo.org</email> +<name>Patrick McLean</name> +</maintainer> +<use> + <flag name="auth-dns">Add support for acting as an authorative DNS server.</flag> + <flag name="conntrack">Add support for Linux conntrack connection marking.</flag> + <flag name="dhcp-tools">Install extra command line tools for manually managing DHCP leases.</flag> + <flag name="dhcp">Enable support for acting as a DHCP server.</flag> + <flag name="dnssec">Enable support DNSSEC validation and caching.</flag> + <flag name="id">Whether report *.bind CHAOS info to clients, otherwise forward such requests upstream instead</flag> + <flag name="libidn2">Enable support for Internationalized Domain Names, via net-dns/libidn2 rather than net-dns/libidn</flag> + <flag name="script">Enable support for calling scripts when leases change.</flag> + <flag name="tftp">Enables built in TFTP server for netbooting.</flag> +</use> +<upstream> + <remote-id type="cpe">cpe:/a:thekelleys:dnsmasq</remote-id> +</upstream> +</pkgmetadata> |