diff options
author | San Mehat <san@google.com> | 2010-01-20 09:56:15 -0800 |
---|---|---|
committer | San Mehat <san@google.com> | 2010-01-20 10:55:09 -0800 |
commit | ffd68729961f7383f2e35494a03ccdef20f86c98 (patch) | |
tree | 25d5c558caaceb322fc3541d922fa56a1adb6d22 /contrib/Suse | |
parent | 8d761fe81866f3efe760adf225c57da8ee9cbda8 (diff) | |
download | android_external_dnsmasq-ffd68729961f7383f2e35494a03ccdef20f86c98.tar.gz android_external_dnsmasq-ffd68729961f7383f2e35494a03ccdef20f86c98.tar.bz2 android_external_dnsmasq-ffd68729961f7383f2e35494a03ccdef20f86c98.zip |
dnsmasq: Direct import of version 2.51
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'contrib/Suse')
-rwxr-xr-x | contrib/Suse/README | 6 | ||||
-rwxr-xr-x | contrib/Suse/README.susefirewall | 27 | ||||
-rwxr-xr-x | contrib/Suse/dnsmasq-SuSE.patch | 23 | ||||
-rwxr-xr-x | contrib/Suse/dnsmasq-suse.spec | 111 | ||||
-rwxr-xr-x | contrib/Suse/rc.dnsmasq-suse | 79 |
5 files changed, 246 insertions, 0 deletions
diff --git a/contrib/Suse/README b/contrib/Suse/README new file mode 100755 index 0000000..3fdc186 --- /dev/null +++ b/contrib/Suse/README @@ -0,0 +1,6 @@ +This packaging is now unmaintained in the dnsmasq source: dnsmasq is +included in Suse proper, and up-to-date packages are now available +from + +ftp://ftp.suse.com/pub/people/ug/ + diff --git a/contrib/Suse/README.susefirewall b/contrib/Suse/README.susefirewall new file mode 100755 index 0000000..2f19ca6 --- /dev/null +++ b/contrib/Suse/README.susefirewall @@ -0,0 +1,27 @@ +This is a patch against SuSEfirewall2-3.1-206 (SuSE 9.x and older) +It fixes the depancy from the dns daemon name 'named' +After appending the patch, the SuSEfirewall is again able to autodetect +the dnsmasq named service. +This is a very old bug in the SuSEfirewall script. +The SuSE people think the name of the dns server will allways 'named' + + +--- /sbin/SuSEfirewall2.orig 2004-01-23 13:30:09.000000000 +0100 ++++ /sbin/SuSEfirewall2 2004-01-23 13:31:56.000000000 +0100 +@@ -764,7 +764,7 @@ + echo 'FW_ALLOW_INCOMING_HIGHPORTS_UDP should be set to yes, if you are running a DNS server!' + + test "$FW_SERVICE_AUTODETECT" = yes -o "$FW_SERVICE_AUTODETECT" = dmz -o "$FW_SERVICE_AUTODETECT" = ext && { +- test "$FW_SERVICE_DNS" = no -a '!' "$START_NAMED" = no && check_srv named && { ++ test "$FW_SERVICE_DNS" = no -a '!' "$START_NAMED" = no && check_srv dnsmasq && { + echo -e 'Warning: detected activated named, enabling FW_SERVICE_DNS! + You still have to allow tcp/udp port 53 on internal, dmz and/or external.' + FW_SERVICE_DNS=$FW_SERVICE_AUTODETECT +@@ -878,7 +878,7 @@ + test -e /etc/resolv.conf || echo "Warning: /etc/resolv.conf not found" + # Get ports/IP bindings of NAMED/SQUID + test "$FW_SERVICE_DNS" = yes -o "$FW_SERVICE_DNS" = dmz -o "$FW_SERVICE_DNS" = ext -o "$START_NAMED" = yes && DNS_PORT=`$LSOF -i -n -P | \ +- $AWK -F: '/^named .* UDP / {print $2}'| $GREP -vw 53 | $SORT -un` ++ $AWK -F: '/^dnsmasq .* UDP / {print $2}'| $GREP -vw 53 | $SORT -un` + test "$FW_SERVICE_SQUID" = yes -o "$FW_SERVICE_SQUID" = dmz -o "$FW_SERVICE_SQUID" = ext -o "$START_SQUID" = yes && SQUID_PORT=`$LSOF -i -n -P | \ + $AWK -F: '/^squid .* UDP/ {print $2}'| $SORT -un` diff --git a/contrib/Suse/dnsmasq-SuSE.patch b/contrib/Suse/dnsmasq-SuSE.patch new file mode 100755 index 0000000..626245f --- /dev/null +++ b/contrib/Suse/dnsmasq-SuSE.patch @@ -0,0 +1,23 @@ +--- man/dnsmasq.8 2004-08-08 20:57:56.000000000 +0200 ++++ man/dnsmasq.8 2004-08-12 00:40:01.000000000 +0200 +@@ -69,7 +69,7 @@ + .TP + .B \-g, --group=<groupname> + Specify the group which dnsmasq will run +-as. The defaults to "dip", if available, to facilitate access to ++as. The defaults to "dialout", if available, to facilitate access to + /etc/ppp/resolv.conf which is not normally world readable. + .TP + .B \-v, --version +--- src/config.h 2004-08-11 11:39:18.000000000 +0200 ++++ src/config.h 2004-08-12 00:40:01.000000000 +0200 +@@ -44,7 +44,7 @@ + #endif + #define DEFLEASE 3600 /* default lease time, 1 hour */ + #define CHUSER "nobody" +-#define CHGRP "dip" ++#define CHGRP "dialout" + #define DHCP_SERVER_PORT 67 + #define DHCP_CLIENT_PORT 68 + + diff --git a/contrib/Suse/dnsmasq-suse.spec b/contrib/Suse/dnsmasq-suse.spec new file mode 100755 index 0000000..ff8ba8f --- /dev/null +++ b/contrib/Suse/dnsmasq-suse.spec @@ -0,0 +1,111 @@ +############################################################################### +# +# General +# +############################################################################### + +Name: dnsmasq +Version: 2.33 +Release: 1 +Copyright: GPL +Group: Productivity/Networking/DNS/Servers +Vendor: Simon Kelley +Packager: Simon Kelley +URL: http://www.thekelleys.org.uk/dnsmasq +Provides: dns_daemon +Conflicts: bind bind8 bind9 +PreReq: %fillup_prereq %insserv_prereq +Autoreqprov: on +Source0: %{name}-%{version}.tar.bz2 +BuildRoot: /var/tmp/%{name}-%{version} +Summary: A lightweight caching nameserver + +%description +Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. It +is designed to provide DNS and, optionally, DHCP, to a small network. It can +serve the names of local machines which are not in the global DNS. The DHCP +server integrates with the DNS server and allows machines with DHCP-allocated +addresses to appear in the DNS with names configured either in each host or +in a central configuration file. Dnsmasq supports static and dynamic DHCP +leases and BOOTP for network booting of diskless machines. + + + +############################################################################### +# +# Build +# +############################################################################### + +%prep +%setup -q +patch -p0 <rpm/%{name}-SuSE.patch + +%build +%{?suse_update_config:%{suse_update_config -f}} +make all-i18n DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr + +############################################################################### +# +# Install +# +############################################################################### + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p ${RPM_BUILD_ROOT}/etc/init.d +make install-i18n DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr +install -o root -g root -m 755 rpm/rc.dnsmasq-suse $RPM_BUILD_ROOT/etc/init.d/dnsmasq +install -o root -g root -m 644 dnsmasq.conf.example $RPM_BUILD_ROOT/etc/dnsmasq.conf +strip $RPM_BUILD_ROOT/usr/sbin/dnsmasq +ln -sf ../../etc/init.d/dnsmasq $RPM_BUILD_ROOT/usr/sbin/rcdnsmasq + +############################################################################### +# +# Clean up +# +############################################################################### + +%clean +rm -rf $RPM_BUILD_ROOT + +############################################################################### +# +# Post-install scriptlet +# +############################################################################### + +%post +%{fillup_and_insserv dnsmasq} + +############################################################################### +# +# Post-uninstall scriptlet +# +# The %postun script executes after the package has been removed. It is the +# last chance for a package to clean up after itself. +# +############################################################################### + +%postun +%{insserv_cleanup} + +############################################################################### +# +# File list +# +############################################################################### + +%files +%defattr(-,root,root) +%doc CHANGELOG COPYING FAQ doc.html setup.html UPGRADING_to_2.0 rpm/README.susefirewall +%doc contrib +%config /etc/init.d/dnsmasq +%config /etc/dnsmasq.conf +/usr/sbin/rcdnsmasq +/usr/sbin/dnsmasq +/usr/share/locale/*/LC_MESSAGES/* +%doc %{_mandir}/man8/dnsmasq.8.gz +%doc %{_mandir}/*/man8/dnsmasq.8.gz + + diff --git a/contrib/Suse/rc.dnsmasq-suse b/contrib/Suse/rc.dnsmasq-suse new file mode 100755 index 0000000..71f4c72 --- /dev/null +++ b/contrib/Suse/rc.dnsmasq-suse @@ -0,0 +1,79 @@ +#! /bin/sh +# +# init.d/dnsmasq +# +### BEGIN INIT INFO +# Provides: dnsmasq +# Required-Start: $network $remote_fs $syslog +# Required-Stop: +# Default-Start: 3 5 +# Default-Stop: +# Description: Starts internet name service masq caching server (DNS) +### END INIT INFO + +NAMED_BIN=/usr/sbin/dnsmasq +NAMED_PID=/var/run/dnsmasq.pid +NAMED_CONF=/etc/dnsmasq.conf + +if [ ! -x $NAMED_BIN ] ; then + echo -n "dnsmasq not installed ! " + exit 5 +fi + +. /etc/rc.status +rc_reset + +case "$1" in + start) + echo -n "Starting name service masq caching server " + checkproc -p $NAMED_PID $NAMED_BIN + if [ $? -eq 0 ] ; then + echo -n "- Warning: dnsmasq already running ! " + else + [ -e $NAMED_PID ] && echo -n "- Warning: $NAMED_PID exists ! " + fi + startproc -p $NAMED_PID $NAMED_BIN -u nobody + rc_status -v + ;; + stop) + echo -n "Shutting name service masq caching server " + checkproc -p $NAMED_PID $NAMED_BIN + [ $? -ne 0 ] && echo -n "- Warning: dnsmasq not running ! " + killproc -p $NAMED_PID -TERM $NAMED_BIN + rc_status -v + ;; + try-restart) + $0 stop && $0 start + rc_status + ;; + restart) + $0 stop + $0 start + rc_status + ;; + force-reload) + $0 reload + rc_status + ;; + reload) + echo -n "Reloading name service masq caching server " + checkproc -p $NAMED_PID $NAMED_BIN + [ $? -ne 0 ] && echo -n "- Warning: dnsmasq not running ! " + killproc -p $NAMED_PID -HUP $NAMED_BIN + rc_status -v + ;; + status) + echo -n "Checking for name service masq caching server " + checkproc -p $NAMED_PID $NAMED_BIN + rc_status -v + ;; + probe) + test $NAMED_CONF -nt $NAMED_PID && echo reload + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit + |