From 0fa21c37c444739506c10107a34fbabd6ce7fe6f Mon Sep 17 00:00:00 2001 From: Itamar Reis Peixoto Date: Jan 26 2010 18:43:31 +0000 Subject: - new version 2.52 --- diff --git a/.cvsignore b/.cvsignore index 876e275..108ce3b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -dnsmasq-2.46.tar.gz +dnsmasq-2.52.tar.lzma diff --git a/dnsmasq-2.33-enable-dbus.patch b/dnsmasq-2.33-enable-dbus.patch deleted file mode 100644 index e2b3336..0000000 --- a/dnsmasq-2.33-enable-dbus.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN dnsmasq-2.33/src/config.h dnsmasq-2.33-patched/src/config.h ---- dnsmasq-2.33/src/config.h 2006-08-04 06:02:36.000000000 -0500 -+++ dnsmasq-2.33-patched/src/config.h 2006-08-15 15:14:19.000000000 -0500 -@@ -156,7 +156,7 @@ - /* platform independent options- uncomment to enable */ - /* #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 --git a/dnsmasq-2.33-initscript.patch b/dnsmasq-2.33-initscript.patch deleted file mode 100644 index 5e3421c..0000000 --- a/dnsmasq-2.33-initscript.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff -urN dnsmasq-2.33/rpm/dnsmasq.init dnsmasq-2.33-patched/rpm/dnsmasq.init ---- dnsmasq-2.33/rpm/dnsmasq.init 1969-12-31 18:00:00.000000000 -0600 -+++ dnsmasq-2.33-patched/rpm/dnsmasq.init 2006-08-15 15:12:17.000000000 -0500 -@@ -0,0 +1,75 @@ -+#!/bin/sh -+# -+# Startup script for the DNS caching server -+# -+# chkconfig: - 99 01 -+# description: This script starts your DNS caching server -+# processname: dnsmasq -+# pidfile: /var/run/dnsmasq.pid -+ -+# Source function library. -+. /etc/rc.d/init.d/functions -+ -+# Source networking configuration. -+. /etc/sysconfig/network -+ -+# Check that networking is up. -+[ ${NETWORKING} = "no" ] && exit 0 -+ -+dnsmasq=/usr/sbin/dnsmasq -+[ -f $dnsmasq ] || exit 0 -+ -+DOMAIN_SUFFIX=`dnsdomainname` -+if [ ! -z "${DOMAIN_SUFFIX}" ]; then -+ OPTIONS="-s $DOMAIN_SUFFIX" -+fi -+ -+RETVAL=0 -+ -+# See how we were called. -+case "$1" in -+ start) -+ echo -n "Starting dnsmasq: " -+ daemon $dnsmasq $OPTIONS -+ RETVAL=$? -+ echo -+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsmasq -+ ;; -+ stop) -+ if test "x`pidof dnsmasq`" != x; then -+ echo -n "Shutting down dnsmasq: " -+ killproc dnsmasq -+ fi -+ RETVAL=$? -+ echo -+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsmasq /var/run/dnsmasq.pid -+ ;; -+ status) -+ status dnsmasq -+ RETVAL=$? -+ ;; -+ reload) -+ echo -n "Reloading dnsmasq: " -+ killproc dnsmasq -HUP -+ RETVAL=$? -+ echo -+ ;; -+ restart) -+ $0 stop -+ $0 start -+ RETVAL=$? -+ ;; -+ condrestart) -+ if test "x`/sbin/pidof dnsmasq`" != x; then -+ $0 stop -+ $0 start -+ RETVAL=$? -+ fi -+ ;; -+ *) -+ echo "Usage: $0 {start|stop|restart|reload|condrestart|status}" -+ exit 1 -+esac -+ -+exit $RETVAL -+ diff --git a/dnsmasq-2.35-conf-dir.patch b/dnsmasq-2.35-conf-dir.patch deleted file mode 100644 index 00e754b..0000000 --- a/dnsmasq-2.35-conf-dir.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -urN dnsmasq-2.35/dnsmasq.conf.example dnsmasq-2.35-patched/dnsmasq.conf.example ---- dnsmasq-2.35/dnsmasq.conf.example 2006-10-18 15:24:50.000000000 -0500 -+++ dnsmasq-2.35-patched/dnsmasq.conf.example 2006-11-06 11:46:38.000000000 -0600 -@@ -382,4 +382,4 @@ - - # Include a another lot of configuration options. - #conf-file=/etc/dnsmasq.more.conf --#conf-dir=/etc/dnsmasq.d -+conf-dir=/etc/dnsmasq.d diff --git a/dnsmasq-2.46-tftp-server-vulnerabilities.patch b/dnsmasq-2.46-tftp-server-vulnerabilities.patch deleted file mode 100644 index 71b5f4f..0000000 --- a/dnsmasq-2.46-tftp-server-vulnerabilities.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up dnsmasq-2.48/src/tftp.c.tftp-server-vulnerabilities dnsmasq-2.48/src/tftp.c ---- dnsmasq-2.48/src/tftp.c.tftp-server-vulnerabilities 2009-10-05 11:15:10.104555320 +0100 -+++ dnsmasq-2.48/src/tftp.c 2009-10-05 11:15:12.104564277 +0100 -@@ -192,20 +192,21 @@ void tftp_request(struct listener *liste - - while ((opt = next(&p, end))) - { -- if (strcasecmp(opt, "blksize") == 0 && -- (opt = next(&p, end)) && -- !(daemon->options & OPT_TFTP_NOBLOCK)) -+ if (strcasecmp(opt, "blksize") == 0) - { -- transfer->blocksize = atoi(opt); -- if (transfer->blocksize < 1) -- transfer->blocksize = 1; -- if (transfer->blocksize > (unsigned)daemon->packet_buff_sz - 4) -- transfer->blocksize = (unsigned)daemon->packet_buff_sz - 4; -- transfer->opt_blocksize = 1; -- transfer->block = 0; -+ if ((opt = next(&p, end)) && -+ !(daemon->options & OPT_TFTP_NOBLOCK)) -+ { -+ transfer->blocksize = atoi(opt); -+ if (transfer->blocksize < 1) -+ transfer->blocksize = 1; -+ if (transfer->blocksize > (unsigned)daemon->packet_buff_sz - 4) -+ transfer->blocksize = (unsigned)daemon->packet_buff_sz - 4; -+ transfer->opt_blocksize = 1; -+ transfer->block = 0; -+ } - } -- -- if (strcasecmp(opt, "tsize") == 0 && next(&p, end) && !transfer->netascii) -+ else if (strcasecmp(opt, "tsize") == 0 && next(&p, end) && !transfer->netascii) - { - transfer->opt_transize = 1; - transfer->block = 0; -@@ -217,17 +218,17 @@ void tftp_request(struct listener *liste - { - if (daemon->tftp_prefix[0] == '/') - daemon->namebuff[0] = 0; -- strncat(daemon->namebuff, daemon->tftp_prefix, MAXDNAME); -+ strncat(daemon->namebuff, daemon->tftp_prefix, (MAXDNAME-1) - strlen(daemon->namebuff)); - if (daemon->tftp_prefix[strlen(daemon->tftp_prefix)-1] != '/') -- strncat(daemon->namebuff, "/", MAXDNAME); -+ strncat(daemon->namebuff, "/", (MAXDNAME-1) - strlen(daemon->namebuff)); - - if (daemon->options & OPT_TFTP_APREF) - { - size_t oldlen = strlen(daemon->namebuff); - struct stat statbuf; - -- strncat(daemon->namebuff, inet_ntoa(peer.sin_addr), MAXDNAME); -- strncat(daemon->namebuff, "/", MAXDNAME); -+ strncat(daemon->namebuff, inet_ntoa(peer.sin_addr), (MAXDNAME-1) - strlen(daemon->namebuff)); -+ strncat(daemon->namebuff, "/", (MAXDNAME-1) - strlen(daemon->namebuff)); - - /* remove unique-directory if it doesn't exist */ - if (stat(daemon->namebuff, &statbuf) == -1 || !S_ISDIR(statbuf.st_mode)) -@@ -245,8 +246,7 @@ void tftp_request(struct listener *liste - } - else if (filename[0] == '/') - daemon->namebuff[0] = 0; -- strncat(daemon->namebuff, filename, MAXDNAME); -- daemon->namebuff[MAXDNAME-1] = 0; -+ strncat(daemon->namebuff, filename, (MAXDNAME-1) - strlen(daemon->namebuff)); - - /* check permissions and open file */ - if ((transfer->file = check_tftp_fileperm(&len))) diff --git a/dnsmasq-configuration.patch b/dnsmasq-configuration.patch deleted file mode 100644 index 0233d17..0000000 --- a/dnsmasq-configuration.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -up dnsmasq-2.46/dnsmasq.conf.example.orig dnsmasq-2.46/dnsmasq.conf.example ---- dnsmasq-2.46/dnsmasq.conf.example.orig 2008-10-21 15:41:01.000000000 +0200 -+++ dnsmasq-2.46/dnsmasq.conf.example 2008-12-29 02:14:18.000000000 +0100 -@@ -365,7 +365,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, -diff -up dnsmasq-2.46/man/dnsmasq.8.orig dnsmasq-2.46/man/dnsmasq.8 ---- dnsmasq-2.46/man/dnsmasq.8.orig 2008-10-23 12:23:57.000000000 +0200 -+++ dnsmasq-2.46/man/dnsmasq.8 2008-12-29 02:14:18.000000000 +0100 -@@ -1171,7 +1171,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.46/man/es/dnsmasq.8.orig dnsmasq-2.46/man/es/dnsmasq.8 ---- dnsmasq-2.46/man/es/dnsmasq.8.orig 2008-11-03 12:18:56.000000000 +0100 -+++ dnsmasq-2.46/man/es/dnsmasq.8 2008-12-29 02:14:18.000000000 +0100 -@@ -1222,7 +1222,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.46/src/config.h.orig dnsmasq-2.46/src/config.h ---- dnsmasq-2.46/src/config.h.orig 2008-11-10 22:47:46.000000000 +0100 -+++ dnsmasq-2.46/src/config.h 2008-12-29 02:16:05.000000000 +0100 -@@ -43,7 +43,7 @@ - #elif defined(__sun__) || 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" -@@ -159,7 +159,7 @@ NOTES: - /* platform independent options- uncomment to enable */ - #define HAVE_TFTP - /* #define HAVE_BROKEN_RTC */ --/* #define HAVE_DBUS */ -+#define HAVE_DBUS - - /* Allow TFTP to be disabled with COPTS=-DNO_TFTP */ - #ifdef NO_TFTP diff --git a/dnsmasq-newglibc.patch b/dnsmasq-newglibc.patch deleted file mode 100644 index b9d358e..0000000 --- a/dnsmasq-newglibc.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -urN dnsmasq-2.41/CHANGELOG dnsmasq-2.42test1/CHANGELOG ---- dnsmasq-2.41/CHANGELOG 2008-02-11 05:48:46.000000000 -0600 -+++ dnsmasq-2.42test1/CHANGELOG 2008-02-13 15:06:43.000000000 -0600 -@@ -2462,6 +2462,9 @@ - when debug mode is set. Thanks to cedric Duval for the - patch. - -+version 2.42 (backported fix) -+ Define __USE_GNU to avoid problems with later glibc -+ headers. Thanks to Jima for spotting the problem. - - - -diff -urN dnsmasq-2.41/src/config.h dnsmasq-2.42test1/src/config.h ---- dnsmasq-2.41/src/config.h 2008-02-12 05:03:28.000000000 -0600 -+++ dnsmasq-2.42test1/src/config.h 2008-02-13 15:07:05.000000000 -0600 -@@ -85,13 +85,6 @@ - #endif - - --/* Get linux C library versions. */ --#if defined(__linux__) && !defined(__UCLIBC__) && !defined(__uClinux__) --/*# include */ --# include --#endif -- -- - /* Follows system specific switches. If you run on a - new system, you may want to edit these. - May replace this with Autoconf one day. -diff -urN dnsmasq-2.41/src/dnsmasq.h dnsmasq-2.42test1/src/dnsmasq.h ---- dnsmasq-2.41/src/dnsmasq.h 2008-02-01 15:42:35.000000000 -0600 -+++ dnsmasq-2.42test1/src/dnsmasq.h 2008-02-13 14:38:39.000000000 -0600 -@@ -17,6 +17,17 @@ - #define COPYRIGHT "Copyright (C) 2000-2008 Simon Kelley" - - /* get these before config.h for IPv6 stuff... */ -+/* Get linux C library versions. */ -+#ifdef __linux__ -+# include -+#endif -+ -+#ifdef __GLIBC__ -+/* needed for in6_pktinfo on later glibc releases */ -+# define __USE_GNU -+# define _GNU_SOURCE -+#endif -+ - #include - #include - diff --git a/dnsmasq.init b/dnsmasq.init new file mode 100644 index 0000000..81364f7 --- /dev/null +++ b/dnsmasq.init @@ -0,0 +1,77 @@ +#!/bin/sh +# +# Startup script for the DNS caching server +# +# chkconfig: - 49 50 +# description: This script starts your DNS caching server +# processname: dnsmasq +# pidfile: /var/run/dnsmasq.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +dnsmasq=/usr/sbin/dnsmasq +[ -f $dnsmasq ] || exit 0 + +DOMAIN_SUFFIX=`dnsdomainname` +if [ ! -z "${DOMAIN_SUFFIX}" ]; then + OPTIONS="-s $DOMAIN_SUFFIX" +fi + +pidfile=${PIDFILE-/var/run/dnsmasq.pid} +lockfile=${LOCKFILE-/var/lock/subsys/dnsmasq} + + +RETVAL=0 + +# See how we were called. +case "$1" in + start) + echo -n "Starting dnsmasq: " + daemon $dnsmasq $OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch ${lockfile} + ;; + stop) + echo -n "Shutting down dnsmasq: " + killproc -p ${pidfile} ${dnsmasq} + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f ${lockfile} ${pidfile} + ;; + status) + status dnsmasq + RETVAL=$? + ;; + reload) + echo -n "Reloading dnsmasq: " + killproc -p ${pidfile} ${dnsmasq} -HUP + RETVAL=$? + echo + ;; + restart) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + if test "x`pidfileofproc dnsmasq`" != x; then + $0 stop + $0 start + RETVAL=$? + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|condrestart|status}" + exit 1 +esac + +exit $RETVAL + diff --git a/dnsmasq.spec b/dnsmasq.spec index 5f313c5..5c969eb 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -10,27 +10,25 @@ %endif Name: dnsmasq -Version: 2.46 -Release: 3%{?extraversion}%{?dist} +Version: 2.52 +Release: 1%{?extraversion}%{?dist} Summary: A lightweight DHCP/caching DNS server Group: System Environment/Daemons License: GPLv2 or GPLv3 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}-configuration.patch -Patch2: %{name}-2.46-tftp-server-vulnerabilities.patch +Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.lzma +Source1: %{name}.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: dbus-devel BuildRequires: pkgconfig -Requires(post): /sbin/chkconfig -Requires(post): /sbin/service -Requires(post): /bin/sed /bin/grep -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service +Requires(post): chkconfig +Requires(preun): chkconfig +# This is for /sbin/service +Requires(preun): initscripts +Requires(post): initscripts %description Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. @@ -45,9 +43,18 @@ machines. %prep %setup -q -n %{name}-%{version}%{?extraversion} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 + +# use /var/lib/dnsmasq instead of /var/lib/misc +for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do + sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file" +done + +#enable dbus +sed -i 's|/\* #define HAVE_DBUS \*/|#define HAVE_DBUS|g' src/config.h + +#enable /etc/dnsmasq.d fix bz 526703 +sed -i 's|#conf-dir=/etc/dnsmasq.d|conf-dir=/etc/dnsmasq.d|g' dnsmasq.conf.example + %build make %{?_smp_mflags} @@ -56,7 +63,7 @@ make %{?_smp_mflags} %install 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} \ +mkdir -p $RPM_BUILD_ROOT%{_sbindir} \ $RPM_BUILD_ROOT%{_mandir}/man8 \ $RPM_BUILD_ROOT%{_var}/lib/dnsmasq \ $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.d \ @@ -64,7 +71,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_initrddir} \ install src/dnsmasq $RPM_BUILD_ROOT%{_sbindir}/dnsmasq install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf install dbus/dnsmasq.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/ -install rpm/dnsmasq.init $RPM_BUILD_ROOT%{_initrddir}/dnsmasq +install -Dp -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/dnsmasq install -m 644 man/dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8/ %clean @@ -111,9 +118,37 @@ fi %changelog -* Mon Oct 5 2009 Mark McLoughlin - 2.46-3 +* Tue Jan 26 2010 Itamar Reis Peixoto - 2.52-1 +- New Version 2.52 +- fix condrestart() in initscript bz 547605 +- fix sed to enable DBUS(the '*' need some escaping) bz 553161 + +* Sun Nov 22 2009 Itamar Reis Peixoto - 2.51-2 +- fix bz 512664 + +* Sat Oct 17 2009 Itamar Reis Peixoto - 2.51-1 +- move initscript from patch to a plain text file +- drop (dnsmasq-configuration.patch) and use sed instead +- enable /etc/dnsmasq.d fix bz 526703 +- change requires to package name instead of file +- new version 2.51 + +* Mon Oct 5 2009 Mark McLoughlin - 2.48-4 - Fix multiple TFTP server vulnerabilities (CVE-2009-2957, CVE-2009-2958) +* Wed Aug 12 2009 Ville Skyttä - 2.48-3 +- Use lzma compressed upstream tarball. + +* Fri Jul 24 2009 Fedora Release Engineering - 2.48-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 10 2009 Patrick "Jima" Laughton 2.48-1 +- Bugfix/feature enhancement update +- Fixing BZ#494094 + +* Fri May 29 2009 Patrick "Jima" Laughton 2.47-1 +- Bugfix/feature enhancement update + * Tue Feb 24 2009 Fedora Release Engineering - 2.46-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/import.log b/import.log new file mode 100644 index 0000000..b508fe2 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +dnsmasq-2_52-1_fc13:F-11:dnsmasq-2.52-1.fc13.src.rpm:1264530262 diff --git a/sources b/sources index 6906d20..ad582af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -79ec740d1a10ee75f13efa4ff36d0250 dnsmasq-2.46.tar.gz +2d156f322564fdd71ad238040cd607ac dnsmasq-2.52.tar.lzma