1 |
commit: 0bc40f3a0e81ee6e520a0c5ffa006e4e68371735 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 25 02:07:09 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 25 02:07:09 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bc40f3a |
7 |
|
8 |
net-dns/avahi: bump to 0.6.31-r9 to fix bug #559408. |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
net-dns/avahi/avahi-0.6.31-r9.ebuild | 253 +++++++++++++++++++++ |
13 |
.../avahi/files/avahi-0.6.31-invalid_packet.patch | 21 ++ |
14 |
2 files changed, 274 insertions(+) |
15 |
|
16 |
diff --git a/net-dns/avahi/avahi-0.6.31-r9.ebuild b/net-dns/avahi/avahi-0.6.31-r9.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..1f873b8 |
19 |
--- /dev/null |
20 |
+++ b/net-dns/avahi/avahi-0.6.31-r9.ebuild |
21 |
@@ -0,0 +1,253 @@ |
22 |
+# Copyright 1999-2015 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI="5" |
27 |
+ |
28 |
+PYTHON_COMPAT=( python2_7 ) |
29 |
+PYTHON_REQ_USE="gdbm" |
30 |
+ |
31 |
+WANT_AUTOMAKE=1.11 |
32 |
+ |
33 |
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \ |
34 |
+ python-r1 systemd user |
35 |
+ |
36 |
+DESCRIPTION="System which facilitates service discovery on a local network" |
37 |
+HOMEPAGE="http://avahi.org/" |
38 |
+SRC_URI="http://avahi.org/download/${P}.tar.gz" |
39 |
+ |
40 |
+LICENSE="LGPL-2.1" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux" |
43 |
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils" |
44 |
+ |
45 |
+REQUIRED_USE=" |
46 |
+ utils? ( || ( gtk gtk3 ) ) |
47 |
+ python? ( dbus gdbm ) |
48 |
+ mono? ( dbus ) |
49 |
+ howl-compat? ( dbus ) |
50 |
+ mdnsresponder-compat? ( dbus ) |
51 |
+" |
52 |
+ |
53 |
+COMMON_DEPEND=" |
54 |
+ dev-libs/libdaemon |
55 |
+ dev-libs/expat |
56 |
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] |
57 |
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] ) |
58 |
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] ) |
59 |
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] ) |
60 |
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] ) |
61 |
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
62 |
+ kernel_linux? ( sys-libs/libcap ) |
63 |
+ introspection? ( dev-libs/gobject-introspection:= ) |
64 |
+ mono? ( |
65 |
+ dev-lang/mono |
66 |
+ gtk? ( dev-dotnet/gtk-sharp ) |
67 |
+ ) |
68 |
+ python? ( |
69 |
+ ${PYTHON_DEPS} |
70 |
+ gtk? ( dev-python/pygtk ) |
71 |
+ dbus? ( dev-python/dbus-python ) |
72 |
+ ) |
73 |
+ bookmarks? ( |
74 |
+ dev-python/twisted-core |
75 |
+ dev-python/twisted-web |
76 |
+ ) |
77 |
+" |
78 |
+ |
79 |
+DEPEND=" |
80 |
+ ${COMMON_DEPEND} |
81 |
+ dev-util/intltool |
82 |
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
83 |
+ doc? ( |
84 |
+ app-doc/doxygen |
85 |
+ ) |
86 |
+" |
87 |
+ |
88 |
+RDEPEND=" |
89 |
+ ${COMMON_DEPEND} |
90 |
+ howl-compat? ( !net-misc/howl ) |
91 |
+ mdnsresponder-compat? ( !net-misc/mDNSResponder ) |
92 |
+ selinux? ( sec-policy/selinux-avahi ) |
93 |
+" |
94 |
+ |
95 |
+pkg_preinst() { |
96 |
+ enewgroup netdev |
97 |
+ enewgroup avahi |
98 |
+ enewuser avahi -1 -1 -1 avahi |
99 |
+ |
100 |
+ if use autoipd; then |
101 |
+ enewgroup avahi-autoipd |
102 |
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd |
103 |
+ fi |
104 |
+} |
105 |
+ |
106 |
+pkg_setup() { |
107 |
+ use mono && mono-env_pkg_setup |
108 |
+} |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ if use ipv6; then |
112 |
+ sed -i \ |
113 |
+ -e s/use-ipv6=no/use-ipv6=yes/ \ |
114 |
+ avahi-daemon/avahi-daemon.conf || die |
115 |
+ fi |
116 |
+ |
117 |
+ sed -i\ |
118 |
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \ |
119 |
+ doxygen_to_devhelp.xsl || die |
120 |
+ |
121 |
+ # Make gtk utils optional |
122 |
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch |
123 |
+ |
124 |
+ # Fix init scripts for >=openrc-0.9.0, bug #383641 |
125 |
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch |
126 |
+ |
127 |
+ # install-exec-local -> install-exec-hook |
128 |
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch |
129 |
+ |
130 |
+ # Backport host-name-from-machine-id patch, bug #466134 |
131 |
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch |
132 |
+ |
133 |
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575 |
134 |
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch |
135 |
+ |
136 |
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch |
137 |
+ |
138 |
+ # allow building client without the daemon |
139 |
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch |
140 |
+ |
141 |
+ # Fix build under various locales, bug #501664 |
142 |
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch |
143 |
+ |
144 |
+ # Fix "Invalid response packet from host", bug #559408. |
145 |
+ eptch "${FILESDIR}"/${P}-invalid_packet.patch |
146 |
+ |
147 |
+ # Drop DEPRECATED flags, bug #384743 |
148 |
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die |
149 |
+ |
150 |
+ # Fix references to Lennart's home directory, bug #466210 |
151 |
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die |
152 |
+ |
153 |
+ # Bug #525832 |
154 |
+ epatch_user |
155 |
+ |
156 |
+ # Prevent .pyc files in DESTDIR |
157 |
+ >py-compile |
158 |
+ |
159 |
+ eautoreconf |
160 |
+ |
161 |
+ # bundled manpages |
162 |
+ multilib_copy_sources |
163 |
+} |
164 |
+ |
165 |
+src_configure() { |
166 |
+ # those steps should be done once-per-ebuild rather than per-ABI |
167 |
+ use sh && replace-flags -O? -O0 |
168 |
+ use python && python_export_best |
169 |
+ |
170 |
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module |
171 |
+ unset DISPLAY |
172 |
+ |
173 |
+ multilib-minimal_src_configure |
174 |
+} |
175 |
+ |
176 |
+multilib_src_configure() { |
177 |
+ local myconf=( --disable-static ) |
178 |
+ |
179 |
+ if use python; then |
180 |
+ myconf+=( |
181 |
+ $(multilib_native_use_enable dbus python-dbus) |
182 |
+ $(multilib_native_use_enable gtk pygtk) |
183 |
+ ) |
184 |
+ fi |
185 |
+ |
186 |
+ if use mono; then |
187 |
+ myconf+=( $(multilib_native_use_enable doc monodoc) ) |
188 |
+ fi |
189 |
+ |
190 |
+ if ! multilib_is_native_abi; then |
191 |
+ myconf+=( |
192 |
+ # used by daemons only |
193 |
+ --disable-libdaemon |
194 |
+ --with-xml=none |
195 |
+ ) |
196 |
+ fi |
197 |
+ |
198 |
+ econf \ |
199 |
+ --localstatedir="${EPREFIX}/var" \ |
200 |
+ --with-distro=gentoo \ |
201 |
+ --disable-python-dbus \ |
202 |
+ --disable-pygtk \ |
203 |
+ --disable-xmltoman \ |
204 |
+ --disable-monodoc \ |
205 |
+ --enable-glib \ |
206 |
+ --enable-gobject \ |
207 |
+ $(multilib_native_use_enable test tests) \ |
208 |
+ $(multilib_native_use_enable autoipd) \ |
209 |
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \ |
210 |
+ $(use_enable howl-compat compat-howl) \ |
211 |
+ $(multilib_native_use_enable doc doxygen-doc) \ |
212 |
+ $(multilib_native_use_enable mono) \ |
213 |
+ $(use_enable dbus) \ |
214 |
+ $(multilib_native_use_enable python) \ |
215 |
+ $(use_enable gtk) \ |
216 |
+ $(use_enable gtk3) \ |
217 |
+ $(use_enable nls) \ |
218 |
+ $(multilib_native_use_enable introspection) \ |
219 |
+ $(multilib_native_use_enable utils gtk-utils) \ |
220 |
+ --disable-qt3 \ |
221 |
+ $(use_enable qt4) \ |
222 |
+ $(use_enable gdbm) \ |
223 |
+ $(systemd_with_unitdir) \ |
224 |
+ "${myconf[@]}" |
225 |
+} |
226 |
+ |
227 |
+multilib_src_compile() { |
228 |
+ emake |
229 |
+ |
230 |
+ multilib_is_native_abi && use doc && emake avahi.devhelp |
231 |
+} |
232 |
+ |
233 |
+multilib_src_install() { |
234 |
+ emake install DESTDIR="${D}" |
235 |
+ use bookmarks && use python && use dbus && use gtk || \ |
236 |
+ rm -f "${ED}"/usr/bin/avahi-bookmarks |
237 |
+ |
238 |
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc |
239 |
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h |
240 |
+ |
241 |
+ # Needed for running on systemd properly, bug #537000 |
242 |
+ if multilib_is_native_abi; then |
243 |
+ ln -s avahi-daemon.service "${D}$(systemd_get_unitdir)"/dbus-org.freedesktop.Avahi.service || die |
244 |
+ fi |
245 |
+ |
246 |
+ if multilib_is_native_abi && use doc; then |
247 |
+ dohtml -r doxygen/html/. || die |
248 |
+ insinto /usr/share/devhelp/books/avahi |
249 |
+ doins avahi.devhelp || die |
250 |
+ fi |
251 |
+} |
252 |
+ |
253 |
+multilib_src_install_all() { |
254 |
+ if use autoipd; then |
255 |
+ insinto /$(get_libdir)/rcscripts/net |
256 |
+ doins "${FILESDIR}"/autoipd.sh |
257 |
+ |
258 |
+ insinto /$(get_libdir)/netifrc/net |
259 |
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh |
260 |
+ fi |
261 |
+ |
262 |
+ dodoc docs/{AUTHORS,NEWS,README,TODO} |
263 |
+ |
264 |
+ prune_libtool_files --all |
265 |
+} |
266 |
+ |
267 |
+pkg_postinst() { |
268 |
+ if use autoipd; then |
269 |
+ elog |
270 |
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)" |
271 |
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!" |
272 |
+ elog |
273 |
+ fi |
274 |
+} |
275 |
|
276 |
diff --git a/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch b/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch |
277 |
new file mode 100644 |
278 |
index 0000000..5cfb465 |
279 |
--- /dev/null |
280 |
+++ b/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch |
281 |
@@ -0,0 +1,21 @@ |
282 |
+Fix "Invalid response packet from host". Bug #559408. |
283 |
+ |
284 |
+See http://pkgs.fedoraproject.org/cgit/avahi.git/plain/avahi-0.6.31-invalid_packet.patch |
285 |
+ |
286 |
+diff -up avahi-0.6.31/avahi-core/server.c.invalid_packet avahi-0.6.31/avahi-core/server.c |
287 |
+--- avahi-0.6.31/avahi-core/server.c.invalid_packet 2015-09-22 08:12:58.544588701 -0500 |
288 |
++++ avahi-0.6.31/avahi-core/server.c 2015-09-22 08:13:39.743862403 -0500 |
289 |
+@@ -972,11 +972,9 @@ static void dispatch_packet(AvahiServer |
290 |
+ return; |
291 |
+ } |
292 |
+ |
293 |
+- if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT) != 0 || |
294 |
+- avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 || |
295 |
+- avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0) { |
296 |
++ if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0) { |
297 |
+ |
298 |
+- avahi_log_warn("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address)); |
299 |
++ avahi_log_debug("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address)); |
300 |
+ return; |
301 |
+ } |
302 |
+ |