avahi/avahi.spec
Martin Bacovsky 3799991c11 - upgrade to new upstream 0.6.17
- redundant patches removal
- removed auto* stuff from specfile since that was no longer needed
- Resolves: #232205: 'service {avahi-dnsconfd,avahi-daemon} status' returns
    0 when the service is stopped
2007-03-14 15:52:21 +00:00

577 lines
19 KiB
RPMSpec

%{?!WITH_MONO: %define WITH_MONO 1}
%{?!WITH_COMPAT_DNSSD: %define WITH_COMPAT_DNSSD 1}
%{?!WITH_COMPAT_HOWL: %define WITH_COMPAT_HOWL 1}
%ifarch ppc64 s390 s390x
%define WITH_MONO 0
%endif
Name: avahi
Version: 0.6.17
Release: 1%{?dist}
Summary: Local network service discovery
Group: System Environment/Base
License: LGPL
URL: http://avahi.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: dbus, libdaemon, expat, python, dbus-python, libcap
Requires(post): initscripts, chkconfig, ldconfig
# BuildRequires: autoconf
# BuildRequires: automake
# BuildRequires: libtool
BuildRequires: dbus-devel >= 0.90
BuildRequires: dbus-glib-devel >= 0.70
BuildRequires: dbus-python
BuildRequires: libxml2-python
BuildRequires: gtk2-devel
BuildRequires: qt-devel
BuildRequires: libglade2-devel
BuildRequires: libdaemon-devel
BuildRequires: glib2-devel
BuildRequires: libcap-devel
BuildRequires: expat-devel
BuildRequires: python
BuildRequires: gdbm-devel
BuildRequires: pygtk2
%if %{WITH_MONO}
BuildRequires: mono-devel >= 1.1.13
%endif
Obsoletes: howl
Source0: %{name}-%{version}.tar.gz
# enable mono's mcs to work in beehive buildroot:
Patch6: avahi-0.6.3-MONO_SHARED_DIR.patch
Patch14: avahi-0.6.9-bz189427.patch
Patch17: avahi-0.6.11-use-ipv6-yes.patch
Patch20: avahi-0.6.15-initscript.patch
Patch21: avahi-0.6.17-exitcode.patch
%description
Avahi is a system which facilitates service discovery on
a local network -- this means that you can plug your laptop or
computer into a network and instantly be able to view other people who
you can chat with, find printers to print to or find files being
shared. This kind of technology is already found in MacOS X (branded
'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') and is very
convenient.
%package tools
Summary: Tools for mDNS browsing and publishing
Group: System Environment/Base
Requires: %{name} = %{version}, gtk2, pygtk2, libglade2, pygtk2-libglade, gdbm
%description tools
Tools that use avahi to browse and publish mDNS services and hosts.
%package glib
Summary: Glib libraries for avahi
Group: System Environment/Base
Requires: %{name} = %{version}
Requires: glib2
%description glib
Libraries for easy use of avahi from glib applications.
%package glib-devel
Summary: Libraries and header files for avahi glib development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
Requires: %{name}-glib = %{version}
Requires: glib2-devel
%description glib-devel
The avahi-devel package contains the header files and libraries
necessary for developing programs using avahi with glib.
%package qt3
Summary: Qt3 libraries for avahi
Group: System Environment/Base
Requires: %{name} = %{version}
Requires: qt
%description qt3
Libraries for easy use of avahi from Qt3 applications.
%package qt3-devel
Summary: Libraries and header files for avahi Qt3 development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
Requires: %{name}-qt3 = %{version}
Requires: qt-devel
%description qt3-devel
The avahi-qt3-devel package contains the header files and libraries
necessary for developing programs using avahi with Qt3.
%if %{WITH_MONO}
%package sharp
Summary: Mono language bindings for avahi mono development
Group: Development/Libraries
Requires: mono-core >= 1.1.13
%description sharp
The avahi-sharp package contains the files needed to develop
mono programs that use avahi.
%endif
%package devel
Summary: Libraries and header files for avahi development
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
The avahi-devel package contains the header files and libraries
necessary for developing programs using avahi.
%package compat-howl
Summary: Libraries for howl compatibility.
Group: Development/Libraries
Requires: %{name} = %{version}
Obsoletes: howl-libs
%description compat-howl
Libraries that are compatible with those provided by the howl package.
%package compat-howl-devel
Summary: Header files for development with the howl compatibility libraries.
Group: Development/Libraries
Requires: avahi-compat-howl = %{version}
Obsoletes: howl-devel
%description compat-howl-devel
Header files for development with the howl compatibility libraries.
%package compat-libdns_sd
Summary: Libraries for Apple Bonjour mDNSResponder compatibility.
Group: Development/Libraries
Requires: %{name} = %{version}
%description compat-libdns_sd
Libraries for Apple Bonjour mDNSResponder compatibility.
%package compat-libdns_sd-devel
Summary: Header files for development with the Apple Bonjour mDNSResponder compatibility libraries.
Group: Development/Libraries
Requires: avahi-compat-libdns_sd = %{version}
%description compat-libdns_sd-devel
Header files for development with the Apple Bonjour mDNSResponder compatibility libraries.
%define avahi_user_uid 70
%prep
%setup -q
%if %{WITH_MONO}
%patch6 -p1 -b .MONO_SHARED_DIR
%endif
%patch14 -p1 -b .bz189427
%patch17 -p1 -b .use-ipv6-yes
%patch20 -p1 -b .initscript
%patch21 -p1 -b .exitcode
%build
# auto* update needed for avahi-0.5.2-fedora.patch
# aclocal -I common
# libtoolize --force
# automake-1.10 --add-missing
# autoconf
%configure --with-distro=fedora --disable-qt4 --disable-monodoc --without-python-twisted --with-avahi-user=avahi --with-avahi-group=avahi --enable-compat-howl --with-avahi-priv-access-group=avahi\
%if %{WITH_COMPAT_DNSSD}
--enable-compat-libdns_sd \
%endif
%if ! %{WITH_MONO}
--disable-mono \
%endif
;
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
# remove example
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/avahi/services/ssh.service
# remove desktop file for avahi-discover
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/avahi-discover.desktop
# create /var/run/avahi-daemon to ensure correct selinux policy for it:
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
# remove the documentation directory - let \%doc handle it:
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
# remove avahi-bookmarks - unusable without python-twisted,
# which has been judged dangerous and is removed from the
# Fedora Core distribution:
rm -f $RPM_BUILD_ROOT/%{_bindir}/avahi-bookmarks $RPM_BUILD_ROOT/%{_mandir}/man1/avahi-bookmarks*
#
# move initscripts into /etc/rc.d/init.d :
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/* $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/*
#
# Make /etc/avahi/etc/localtime owned by avahi:
mkdir -p $RPM_BUILD_ROOT/etc/avahi/etc
touch $RPM_BUILD_ROOT/etc/avahi/etc/localtime
#
# fix bug 197414 - add missing symlinks for avahi-compat-howl and avahi-compat-dns-sd
%if %{WITH_COMPAT_HOWL}
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/howl.pc
%endif
%if %{WITH_COMPAT_DNSSD}
ln -s avahi-compat-libdns_sd.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libdns_sd.pc
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT/%{_includedir}/
%endif
#
:;
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# Add the "avahi" user
/usr/sbin/useradd -c 'Avahi daemon' -u %{avahi_user_uid} \
-s /sbin/nologin -r -d '/' avahi 2> /dev/null || :
%post
/sbin/ldconfig
# Run avahi-daemon by default:
/sbin/chkconfig --add avahi-daemon >/dev/null 2>&1 || :;
# avahi-dnsconfd NOT run by default in any runlevel; add it
# so system-config-services can see it
/sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 || :;
if [ "$1" -eq 1 ]; then
# We should realy make dbus reload the system.d config here. Dunno how though.
# kill -HUP `cat /var/run/messagebus.pid` ?
if [ -s /etc/localtime ]; then
cp -cfp /etc/localtime /etc/avahi/etc/localtime || :;
fi;
fi;
%postun
/sbin/ldconfig
if [ "$1" -ge "1" ]; then
/sbin/service avahi-daemon condrestart >/dev/null 2>&1
/sbin/service avahi-dnsconfd condrestart >/dev/null 2>&1
fi
%preun
if [ "$1" -eq 0 ]; then
service avahi-daemon stop > /dev/null 2>&1
/sbin/chkconfig --del avahi-daemon
service avahi-dnsconfd stop >/dev/null 2>&1
/sbin/chkconfig --del avahi-dnsconfd
fi
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
%post qt3 -p /sbin/ldconfig
%postun qt3 -p /sbin/ldconfig
%files
%defattr(0644,root,root,0755)
%doc docs/* avahi-daemon/example.service avahi-daemon/ssh.service
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/*
%dir %{_sysconfdir}/avahi
%dir %{_sysconfdir}/avahi/etc
%ghost %{_sysconfdir}/avahi/etc/localtime
%{_sysconfdir}/avahi/hosts
%dir %{_sysconfdir}/avahi/services
%attr(0755,avahi,avahi) %dir %{_localstatedir}/run/avahi-daemon
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%config %{_sysconfdir}/avahi/avahi-dnsconfd.action
%config %{_sysconfdir}/avahi/avahi-autoipd.action
%config %{_sysconfdir}/avahi/services/sftp-ssh.service
%config %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
%attr(755,root,root) %{_sbindir}/*
%attr(755,root,root) %{_libdir}/libavahi-common.so.*
%attr(755,root,root) %{_libdir}/libavahi-core.so.*
%attr(755,root,root) %{_libdir}/libavahi-client.so.*
%attr(755,root,root) %{_datadir}/avahi
%exclude %{_datadir}/avahi/interfaces
%exclude %{_datadir}/avahi/service-types*
%{_mandir}/man5/*
%{_mandir}/man8/*
%files tools
%defattr(0755, root, root, 0755)
%{_bindir}/*
# These are .py files only, so they don't go in lib64
%{_prefix}/lib/python?.?/site-packages/*
%attr(0644,root,root) %{_mandir}/man1/*
%{_datadir}/avahi/interfaces/
%{_datadir}/avahi/service-types*
%files devel
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libavahi-common.so
%attr(755,root,root) %{_libdir}/libavahi-core.so
%attr(755,root,root) %{_libdir}/libavahi-client.so
%{_includedir}/avahi-client
%{_includedir}/avahi-common
%{_includedir}/avahi-core
%{_libdir}/pkgconfig/avahi-core.pc
%{_libdir}/pkgconfig/avahi-client.pc
%files glib
%defattr(0755, root, root, 0755)
%{_libdir}/libavahi-glib.so.*
%files glib-devel
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libavahi-glib.so
%{_includedir}/avahi-glib
%{_libdir}/pkgconfig/avahi-glib.pc
%files qt3
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libavahi-qt3.so.*
%{_libdir}/pkgconfig/avahi-qt3.pc
%files qt3-devel
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libavahi-qt3.so
%{_includedir}/avahi-qt3
%if %{WITH_MONO}
%files sharp
%defattr(0644, root, root, 0755)
%{_libdir}/mono/avahi-sharp
%{_libdir}/mono/gac/avahi-sharp
%{_libdir}/pkgconfig/avahi-sharp.pc
%endif
%if %{WITH_COMPAT_HOWL}
%files compat-howl
%defattr(0755, root, root, 0755)
%{_libdir}/libhowl.so.*
%files compat-howl-devel
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libhowl.so
%{_includedir}/avahi-compat-howl
%{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/howl.pc
%endif
%if %{WITH_COMPAT_DNSSD}
%files compat-libdns_sd
%defattr(0755, root, root, 0755)
%{_libdir}/libdns_sd.so.*
%files compat-libdns_sd-devel
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libdns_sd.so
%{_includedir}/avahi-compat-libdns_sd
%{_includedir}/dns_sd.h
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%{_libdir}/pkgconfig/libdns_sd.pc
%endif
%changelog
* Mon Mar 12 2007 Martin Bacovsky <mbacovsk@redhat.com> - 0.6.17-1
- upgrade to new upstream 0.6.17
- redundant patches removal
- removed auto* stuff from specfile since that was no longer needed
- Resolves: #232205: 'service {avahi-dnsconfd,avahi-daemon} status'
returns 0 when the service is stopped
* Fri Feb 2 2007 Christopher Aillon <cailloN@redhat.com> - 0.6.16-3
- Remove bogus mono-libdir patches
* Tue Jan 23 2007 Jeremy Katz <katzj@redhat.com> - 0.6.16-2
- nuke bogus avahi-sharp -> avahi-devel dep
* Mon Jan 22 2007 Martin Bacovsky <mbacovsk@redhat.com> - 0.6.16-1.fc7
- Resolves: #221763: CVE-2006-6870 Maliciously crafted packed can DoS avahi daemon
- upgrade to new upstream
- patch revision
- Resolves: #218140: avahi configuration file wants a non-existent group
* Wed Dec 6 2006 Jeremy Katz <katzj@redhat.com> - 0.6.15-4
- rebuild against python 2.5
* Mon Nov 27 2006 Martin Bacovsky <mbacovsk@redhat.com> - 0.6.15-3
- automake-1.10 required for building
* Mon Nov 27 2006 Martin Bacovsky <mbacovsk@redhat.com> - 0.6.15-2
- automake-1.9 required for building
* Thu Nov 24 2006 Martin Bacovsky <mbacovsk@redhat.com> - 0.6.15-1
- Upgrade to 0.6.15
- patches revision
* Mon Sep 18 2006 Martin Stransky <stransky@redhat.com> - 0.6.11-6
- added patch from #206445 - ia64: unaligned access errors seen
during startup of avahi-daemon
- removed unused patches
* Thu Sep 7 2006 Dan Walsh <dwalsh@redhat.com> - 0.6.11-5
- Maintain the security context on the localtime file
* Wed Aug 23 2006 Martin Stransky <stransky@redhat.com> - 0.6.11-4
- fix for #204710 - /etc/init.d/avahi-dnsconfd missing line
continuation slash (\) in description
* Wed Aug 23 2006 Martin Stransky <stransky@redhat.com> - 0.6.11-3
- added fix for #200767 - avahi-dnsconfd Segmentation fault
with invalid command line argument
- added dist tag
* Tue Jul 18 2006 John (J5) Palmieri <johnp@redhat.com> - 0.6.11-2.fc6
- add BR for dbus-glib-devel
- fix deprecated functions
* Mon Jul 17 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.11-1.fc6
- Upgrade to upstream version 0.6.11
- fix bug 195674: set 'use-ipv6=yes' in avahi-daemon.conf
- fix bug 197414: avahi-compat-howl and avahi-compat-dns-sd symlinks
- fix bug 198282: avahi-compat-{howl-devel,dns-sd-devel} Requires:
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com>
- rebuild
* Tue Jun 13 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.10-3.FC6
- rebuild for broken mono deps
* Tue Jun 06 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.10-2.FC6
- fix bug 194203: fix permissions on /var/run/avahi-daemon
* Tue May 30 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.10-1.FC6
- Upgrade to upstream version 0.6.10
- fix bug 192080: split avahi-compat-libdns_sd into separate package
(same goes for avahi-compat-howl)
* Tue May 02 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-9.FC6
- fix avahi-sharp issues for banshee - patches from caillon@redhat.com
* Thu Apr 20 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-9.FC6
- fix bug 189427: correct avahi-resolve --help typo
* Mon Mar 20 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-8.FC6
- fix bug 185972: remove ellipses in initscript
- fix bug 185965: make chkconfigs unconditional
* Thu Mar 16 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-6
- Fix bug 185692: install avahi-sharp into %{_prefix}/lib, not %{_libdir}
* Thu Mar 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-4
- fix scriptlet error introduced by last fix:
if user has disabled avahi-daemon, do not enable it during %post
* Wed Mar 08 2006 Bill Nottingham <notting@redhat.com> - 0.6.9-2
- fix scriplet error during installer
- move service-types* to the tools package (avoids multilib conflicts)
* Tue Mar 07 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-1
- Upgrade to upstream version 0.6.9
* Thu Feb 23 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.8-1
- Upgrade to upstream version 0.6.8
- fix bug 182462: +Requires(post): initscripts, chkconfig, ldconfig
* Fri Feb 17 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.7-1
- Upgrade to upstream version 0.6.7
* Fri Feb 17 2006 Karsten Hopp <karsten@redhat.de> - 0.6.6-4
- BuildRequires pygtk2
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.6.6-3.1
- bump again for double-long bug on ppc(64)
* Fri Feb 10 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.6-3
- rebuild for new gcc (again)
- further fix for bug 178746: fix avahi-dnsconfd initscript
* Tue Feb 07 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.6-2
- rebuild for new gcc, glibc, glibc-kernheaders
* Wed Feb 01 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.6-1
- fix bug 179448: mis-alignment of input cmsghdr msg->msg_control buffer on ia64
- Upgrade to 0.6.6
* Thu Jan 26 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.5-1
- Upgrade to upstream version 0.6.5
- Make /etc/avahi/etc and /etc/avahi/etc/localtime owned by avahi
package; copy system localtime into chroot in post
* Mon Jan 23 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.4-4
- fix bug 178689: copy localtime to chroot
- fix bug 178784: fix avahi-dnsconfd initscript
* Fri Jan 20 2006 Peter Jones <pjones@redhat.com> - 0.6.4-3
- fix subsystem locking in the initscript
* Thu Jan 19 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.4-2
- fix bug 178127: fully localize the initscript
* Mon Jan 16 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.4-1
- Upgrade to upstream version 0.6.4
* Thu Jan 12 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.3-2
- fix bug 177610: Enable mono support with new avahi-sharp package
- fix bug 177609: add gdbm / gdbm-devel Requires for avahi-browse
* Mon Jan 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.3-1
- Upgrade to upstream version 0.6.3
- fix bug 177148: initscript start should not fail if avahi-daemon running
* Thu Dec 22 2005 Jason Vas Dias <jvdias@redhat.com> - 0.6.1-3
- move initscripts from /etc/init.d to /etc/rc.d/init.d
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Fri Dec 09 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6.1-2
- fix bug 175352: Do not chkconfig --add avahi-daemon
if user has already configured it
* Wed Dec 07 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6.1-1
- Upgrade to 0.6.1
* Mon Dec 05 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-6
- fix bug 174799 - fix .spec file \%files permissions
* Fri Dec 02 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-5
- python-twisted has been removed from the FC-5 distribution - disable its use
* Thu Dec 01 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-4
- Rebuild for dbus-0.6 - remove use of DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
* Wed Nov 30 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-3
- fix bug 172047 - tools should require python-twisted
- fix bug 173985 - docs directory permissions
* Mon Nov 21 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-1
- Upgrade to upstream version 0.6 - now provides 'avahi-howl-compat'
libraries / includes.
* Mon Nov 14 2005 Jason Vas Dias<jvdias@redhat.com> - 0.5.2-7
- fix bug 172034: fix ownership of /var/run/avahi-daemon/
- fix bug 172772: .spec file improvements from matthias@rpmforge.net
* Mon Oct 31 2005 Jason Vas Dias<jvdias@redhat.com> - 0.5.2-6
- put back avahi-devel Obsoletes: howl-devel
* Mon Oct 31 2005 Alexander Larsson <alexl@redhat.com> - 0.5.2-5
- Obsoletes howl, howl-libs, as we want to get rid of them on updates
- No provides yet, as the howl compat library is in Avahi 0.6.0.
* Sun Oct 30 2005 Florian La Roche <laroche@redhat.com>
- disable the Obsoletes: howl until the transition is complete
* Fri Oct 28 2005 Jason Vas Dias<jvdias@redhat.com> - 0.5.2-3
- change initscript to start avahi-daemon AFTER messagebus
* Wed Oct 26 2005 Karsten Hopp <karsten@redhat.de> 0.5.2-2
- add buildrequires dbus-python
* Fri Oct 21 2005 Alexander Larsson <alexl@redhat.com> - 0.5.2-1
- Initial package