- New upstream test release

- Moving dnsmasq.leases to /var/lib/dnsmasq/ as per BZ#407901
- Ignoring dangerous-command-in-%%post rpmlint warning (as per above fix)
- Patch consolidation/cleanup
- Removed conditionals for Fedora <= 3 and Aurora 2.0
This commit is contained in:
Patrick Laughton 2007-12-04 15:46:52 +00:00
parent b4e45c36b3
commit 91d4b30e7b
2 changed files with 87 additions and 17 deletions

View File

@ -0,0 +1,63 @@
diff -up dnsmasq-2.41test20/src/config.h.orig dnsmasq-2.41test20/src/config.h
--- dnsmasq-2.41test20/src/config.h.orig 2007-11-27 14:09:01.000000000 -0600
+++ dnsmasq-2.41test20/src/config.h 2007-12-04 08:21:49.000000000 -0600
@@ -42,7 +42,7 @@
#elif defined(__sun__)
# define LEASEFILE "/var/cache/dnsmasq.leases"
#else
-# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
+# define LEASEFILE "/var/lib/dnsmasq/dnsmasq.leases"
#endif
#if defined(__FreeBSD__)
# define CONFFILE "/usr/local/etc/dnsmasq.conf"
@@ -182,7 +182,7 @@ NOTES:
#define HAVE_TFTP
/* #define HAVE_BROKEN_RTC */
/* #define HAVE_ISC_READER */
-/* #define HAVE_DBUS */
+#define HAVE_DBUS
#if defined(HAVE_BROKEN_RTC) && defined(HAVE_ISC_READER)
# error HAVE_ISC_READER is not compatible with HAVE_BROKEN_RTC
diff -up dnsmasq-2.41test20/man/es/dnsmasq.8.orig dnsmasq-2.41test20/man/es/dnsmasq.8
--- dnsmasq-2.41test20/man/es/dnsmasq.8.orig 2007-11-27 14:09:01.000000000 -0600
+++ dnsmasq-2.41test20/man/es/dnsmasq.8 2007-12-04 08:33:07.000000000 -0600
@@ -1075,7 +1075,7 @@ un CPU de 1GHz y aproximadamente 60MB de
.IR /etc/ethers
-.IR /var/lib/misc/dnsmasq.leases
+.IR /var/lib/dnsmasq/dnsmasq.leases
.IR /var/db/dnsmasq.leases
diff -up dnsmasq-2.41test20/man/dnsmasq.8.orig dnsmasq-2.41test20/man/dnsmasq.8
--- dnsmasq-2.41test20/man/dnsmasq.8.orig 2007-11-27 14:09:01.000000000 -0600
+++ dnsmasq-2.41test20/man/dnsmasq.8 2007-12-04 08:33:07.000000000 -0600
@@ -1070,7 +1070,7 @@ file needs a 1GHz processor and about 60
.IR /etc/ethers
-.IR /var/lib/misc/dnsmasq.leases
+.IR /var/lib/dnsmasq/dnsmasq.leases
.IR /var/db/dnsmasq.leases
diff -up dnsmasq-2.41test20/dnsmasq.conf.example.orig dnsmasq-2.41test20/dnsmasq.conf.example
--- dnsmasq-2.41test20/dnsmasq.conf.example.orig 2007-11-27 14:09:01.000000000 -0600
+++ dnsmasq-2.41test20/dnsmasq.conf.example 2007-12-04 08:44:16.000000000 -0600
@@ -344,7 +344,7 @@
# The DHCP server needs somewhere on disk to keep its lease database.
# This defaults to a sane location, but if you want to change it, use
# the line below.
-#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
+#dhcp-leasefile=/var/lib/dnsmasq/dnsmasq.leases
# Set the DHCP server to authoritative mode. In this mode it will barge in
# and take over the lease for any client which broadcasts on the network,
@@ -461,4 +461,4 @@
# Include a another lot of configuration options.
#conf-file=/etc/dnsmasq.more.conf
-#conf-dir=/etc/dnsmasq.d
+conf-dir=/etc/dnsmasq.d

View File

@ -11,7 +11,7 @@
Name: dnsmasq
Version: 2.41
Release: 0.1.%{?extraversion}%{?dist}
Release: 0.2.%{?extraversion}%{?dist}
Summary: A lightweight DHCP/caching DNS server
Group: System Environment/Daemons
@ -19,18 +19,15 @@ License: GPLv2
URL: http://www.thekelleys.org.uk/dnsmasq/
Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.gz
Patch0: %{name}-2.33-initscript.patch
Patch1: %{name}-2.33-enable-dbus.patch
Patch2: %{name}-2.35-conf-dir.patch
Patch1: %{name}-configuration.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%fedora" > "3" || "%aurora" > "2"
BuildRequires: dbus-devel
%endif
BuildRequires: pkgconfig
Requires(post): /sbin/chkconfig
Requires(post): /sbin/service
Requires(post): /bin/sed /bin/grep
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
@ -48,10 +45,7 @@ machines.
%prep
%setup -q -n %{name}-%{version}%{?extraversion}
%patch0 -p1
%if "%fedora" > "3" || "%aurora" > "2"
%patch1 -p1
%endif
%patch2 -p1
%build
make %{?_smp_mflags}
@ -62,13 +56,12 @@ rm -rf $RPM_BUILD_ROOT
# normally i'd do 'make install'...it's a bit messy, though
mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_initrddir} \
$RPM_BUILD_ROOT%{_mandir}/man8 \
$RPM_BUILD_ROOT%{_var}/lib/dnsmasq \
$RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.d \
$RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d
install src/dnsmasq $RPM_BUILD_ROOT%{_sbindir}/dnsmasq
install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf
%if "%fedora" > "3" || "%aurora" > "2"
install dbus/dnsmasq.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/
%endif
install rpm/dnsmasq.init $RPM_BUILD_ROOT%{_initrddir}/dnsmasq
install -m 644 man/dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8/
@ -77,6 +70,20 @@ rm -rf $RPM_BUILD_ROOT
%post
if [ "$1" = "2" ]; then # if we're being upgraded
# if using the old leases location, move the file to the new one
# but only if we're not clobbering another file
#
if [ -f /var/lib/misc/dnsmasq.leases -a ! -f /var/lib/dnsmasq/dnsmasq.leases ]; then
# causes rpmlint to report dangerous-command-in-post,
# but that's the price of selinux compliance :-(
mv -f /var/lib/misc/dnsmasq.leases /var/lib/dnsmasq/dnsmasq.leases || :
fi
# ugly, but kind of necessary
if [ ! `grep -q dhcp-leasefile=/var/lib/misc/dnsmasq.leases %{_sysconfdir}/dnsmasq.conf` ]; then
cp %{_sysconfdir}/dnsmasq.conf %{_sysconfdir}/dnsmasq.conf.tmp || :
sed -e 's/var\/lib\/misc/var\/lib\/dnsmasq/' < %{_sysconfdir}/dnsmasq.conf.tmp > %{_sysconfdir}/dnsmasq.conf || :
rm -f %{_sysconfdir}/dnsmasq.conf.tmp || :
fi
/sbin/service dnsmasq condrestart >/dev/null 2>&1 || :
else # if we're being installed
/sbin/chkconfig --add dnsmasq
@ -94,20 +101,20 @@ fi
%doc CHANGELOG COPYING FAQ doc.html setup.html dbus/DBus-interface
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnsmasq.conf
%dir /etc/dnsmasq.d
%if "%fedora" > "3" || "%aurora" > "2"
%dir %{_var}/lib/dnsmasq
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
%endif
%{_initrddir}/dnsmasq
%{_sbindir}/dnsmasq
%{_mandir}/man8/dnsmasq*
%changelog
* Tue Nov 27 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.1.test20
- New upstream test release
* Mon Oct 22 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.1.test11
* Tue Dec 04 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.2.test20
- New upstream test release
- Moving dnsmasq.leases to /var/lib/dnsmasq/ as per BZ#407901
- Ignoring dangerous-command-in-%%post rpmlint warning (as per above fix)
- Patch consolidation/cleanup
- Removed conditionals for Fedora <= 3 and Aurora 2.0
* Tue Sep 18 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.40-1
- Finalized upstream release