packages: nss_mdns/nss_mdns.spec - do not build the insecure legacy (no-ava...
jajcus
jajcus at pld-linux.org
Sun May 2 19:15:47 CEST 2010
Author: jajcus Date: Sun May 2 17:15:47 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- do not build the insecure legacy (no-avahi) code by default
- avahi bcond also added
- add nss_mdns to /etc/resolv.conf in %post
- Release: 2
---- Files affected:
packages/nss_mdns:
nss_mdns.spec (1.11 -> 1.12)
---- Diffs:
================================================================
Index: packages/nss_mdns/nss_mdns.spec
diff -u packages/nss_mdns/nss_mdns.spec:1.11 packages/nss_mdns/nss_mdns.spec:1.12
--- packages/nss_mdns/nss_mdns.spec:1.11 Fri Dec 28 16:18:56 2007
+++ packages/nss_mdns/nss_mdns.spec Sun May 2 19:15:42 2010
@@ -1,9 +1,15 @@
# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_with legacy # enable the insecure legacy code (no avahi
+ # dependency then)
+%bcond_without avahi # disable avahi support
+#
Summary: mDNS Service Switch Module
Summary(pl.UTF-8): Moduł NSS mDNS
Name: nss_mdns
Version: 0.10
-Release: 1
+Release: 2
License: LGPL v2.1
Group: Base
Source0: http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-%{version}.tar.gz
@@ -12,6 +18,10 @@
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
+Requires(post): /etc/nsswitch.conf
+Requires(post): grep
+Requires(post): sed
+%{!?with_legacy:Requires: avahi}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _libdir /%{_lib}
@@ -40,7 +50,8 @@
%{__autoheader}
%{__automake}
%configure \
- --enable-legacy
+ --%{?with_legacy:en}%{!?with_legacy:dis}able-legacy \
+ --%{?with_avahi:en}%{!?with_avahi:dis}able-avahi
%{__make}
%install
@@ -49,6 +60,14 @@
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%post
+if ! grep -q '^hosts:.*mdns' /etc/nsswitch.conf ; then
+ %banner %{name} <<-EOF
+ Adding Multicast-DNS resolver to /etc/nsswitch.conf
+EOF
+ sed -i -e's/^\(hosts:.*\)dns\(.*\)/\1mdns4_minimal [NOTFOUND=return] dns mdns4\2/' /etc/nsswitch.conf
+fi
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -63,6 +82,12 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.12 2010/05/02 17:15:42 jajcus
+- do not build the insecure legacy (no-avahi) code by default
+- avahi bcond also added
+- add nss_mdns to /etc/resolv.conf in %post
+- Release: 2
+
Revision 1.11 2007/12/28 15:18:56 zbyniu
- up to 0.10
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nss_mdns/nss_mdns.spec?r1=1.11&r2=1.12&f=u
More information about the pld-cvs-commit
mailing list