Accepting request 243762 from home:vwallfahrer:branches:network

- Removed Suse and all other OS/Distribution related subdirs from 
  contrib, so only the rest gets packaged. The subdirs are not 
  necessary anymore (bnc#889028).  

- Removed README.SUSE file, it was to confusing and not necessary (bnc#889972). 
  Information is already present in the upstream documentation.
- Split up vendor-files.tar.bz2 into single files
- Comply with systemd packaging guidlines

OBS-URL: https://build.opensuse.org/request/show/243762
OBS-URL: https://build.opensuse.org/package/show/network/dnsmasq?expand=0&rev=60
This commit is contained in:
Reinhard Max 2014-08-06 11:50:45 +00:00 committed by Git OBS Bridge
parent 02afb350f8
commit a3cec7836a
7 changed files with 184 additions and 11 deletions

24
SuSEFirewall.dnsmasq-dhcp Normal file
View File

@ -0,0 +1,24 @@
# Only the variables TCP, UDP, RPC, IP and BROADCAST are allowed.
# More may be supported in the future.
#
# For a more detailed description of the individual variables see
# the comments for FW_SERVICES_*_EXT in /etc/sysconfig/SuSEfirewall2
#
## Name: dnsmasq
## Description: Open ports for the dnsmasq DNS/DHCP server
# space separated list of allowed TCP ports
TCP=""
# space separated list of allowed UDP ports
UDP="bootps"
# space separated list of allowed RPC services
RPC=""
# space separated list of allowed IP protocols
IP=""
# space separated list of allowed UDP broadcast ports
BROADCAST="bootps"

24
SuSEFirewall.dnsmasq-dns Normal file
View File

@ -0,0 +1,24 @@
# Only the variables TCP, UDP, RPC, IP and BROADCAST are allowed.
# More may be supported in the future.
#
# For a more detailed description of the individual variables see
# the comments for FW_SERVICES_*_EXT in /etc/sysconfig/SuSEfirewall2
#
## Name: dnsmasq
## Description: Open ports for the dnsmasq DNS/DHCP server
# space separated list of allowed TCP ports
TCP=""
# space separated list of allowed UDP ports
UDP="domain"
# space separated list of allowed RPC services
RPC=""
# space separated list of allowed IP protocols
IP=""
# space separated list of allowed UDP broadcast ports
BROADCAST=""

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed Aug 6 06:48:20 UTC 2014 - vwallfahrer@suse.com
- Removed Suse and all other OS/Distribution related subdirs from
contrib, so only the rest gets packaged. The subdirs are not
necessary anymore (bnc#889028).
-------------------------------------------------------------------
Tue Aug 5 08:19:42 UTC 2014 - vwallfahrer@suse.com
- Removed README.SUSE file, it was to confusing and not necessary (bnc#889972).
Information is already present in the upstream documentation.
- Split up vendor-files.tar.bz2 into single files
- Comply with systemd packaging guidlines
-------------------------------------------------------------------
Thu Jun 12 08:15:29 UTC 2014 - cdenicolo@suse.com

12
dnsmasq.reg Normal file
View File

@ -0,0 +1,12 @@
#############################################################################
#
# OpenSLP registration file
#
# register domain name service (DNS) daemon
#
#############################################################################
service:domain://$HOSTNAME:53,en,65535
watch-port-udp=53
description=Domain Name Service

View File

@ -26,15 +26,20 @@ Provides: dns_daemon
PreReq: /usr/sbin/useradd /bin/mkdir
Url: http://www.thekelleys.org.uk/dnsmasq/
Source: http://www.thekelleys.org.uk/dnsmasq/dnsmasq-%{version}.tar.gz
Source1: vendor-files.tar.bz2
Source1: dnsmasq.reg
Source2: dnsmasq.service
Source3: rc.dnsmasq-suse
Source4: SuSEFirewall.dnsmasq-dhcp
Source5: SuSEFirewall.dnsmasq-dns
Patch1: group_and_isc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-devel
BuildRequires: libidn-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig(libnetfilter_conntrack)
BuildRequires: pkgconfig(systemd)
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%endif
%{?systemd_requires}
%description
@ -57,7 +62,6 @@ server's leases.
%prep
%setup -q -n dnsmasq-%{version}
%setup -q -T -D -a1 -n dnsmasq-%{version}
%patch1 -p1
%build
@ -98,9 +102,9 @@ make install-i18n DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr AWK=gawk
install -d -m 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/slp.reg.d
install -d -m 755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
install -m 644 dnsmasq.conf.example $RPM_BUILD_ROOT/%{_sysconfdir}/dnsmasq.conf
install -m 644 dnsmasq.reg $RPM_BUILD_ROOT/%{_sysconfdir}/slp.reg.d/
install -m 644 SuSEFirewall.dnsmasq-dns ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dns
install -m 644 SuSEFirewall.dnsmasq-dhcp ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dhcp
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_sysconfdir}/slp.reg.d/
install -m 644 %SOURCE5 ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dns
install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/dnsmasq-dhcp
install -d 755 ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/
install -m 644 dbus/dnsmasq.conf ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/dnsmasq.conf
install -D -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/dnsmasq.service
@ -114,12 +118,17 @@ install -m 644 contrib/wrt/dhcp_release.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/dhcp_
install -m 755 contrib/wrt/dhcp_lease_time ${RPM_BUILD_ROOT}%{_bindir}/dhcp_lease_time
install -m 644 contrib/wrt/dhcp_lease_time.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/dhcp_lease_time.1
rm contrib/wrt/{dhcp_release,dhcp_lease_time}
rm -rf contrib/Suse
rm -rf contrib/Solaris10
rm -rf contrib/dnsmasq_MacOSX-pre10.4
rm -rf contrib/slackware-dnsmasq
rm -rf contrib/MacOSX-launchd
%find_lang %{name} --with-man
%files -f %{name}.lang
%defattr(-,root,root)
%doc CHANGELOG COPYING COPYING-v3 FAQ doc.html setup.html dnsmasq.conf.example contrib README.SUSE dbus
%doc CHANGELOG COPYING COPYING-v3 FAQ doc.html setup.html dnsmasq.conf.example contrib dbus
%config(noreplace) %{_sysconfdir}/dnsmasq.conf
%{_sbindir}/dnsmasq
%{_sbindir}/rcdnsmasq
@ -128,11 +137,13 @@ rm contrib/wrt/{dhcp_release,dhcp_lease_time}
%dir %{_sysconfdir}/slp.reg.d/
%config %attr(0644,root,root) /%{_sysconfdir}/slp.reg.d/dnsmasq.reg
%{_mandir}/man8/dnsmasq.8.gz
/etc/dbus-1/system.d/dnsmasq.conf
%config(noreplace) /etc/dbus-1/system.d/dnsmasq.conf
%{_unitdir}/dnsmasq.service
%dir %attr(0750,tftp,tftp) /srv/tftpboot
%files utils
%defattr(-,root,root)
%{_bindir}/dhcp_*
%{_mandir}/man1/dhcp_*

90
rc.dnsmasq-suse Normal file
View File

@ -0,0 +1,90 @@
#! /bin/sh
#
# init.d/dnsmasq
#
### BEGIN INIT INFO
# Provides: dnsmasq
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# 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)
if grep "^[^#].*/etc/ppp/" /etc/dnsmasq.conf >/dev/null 2>&1; then
echo
echo "Warning! dnsmasq can not read the /etc/ppp directory anymore";
echo " but /etc/ppp seems to be used in your config";
echo " use /var/run/ instead like /var/run/dnsmasq-forwarders.conf";
echo
fi
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 dnsmasq
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|force-reload)
if $0 status ; then
$0 restart
else
rc_reset
fi
rc_status
;;
restart)
if checkproc -p $NAMED_PID $NAMED_BIN ; then
$0 stop
fi
$0 start
rc_status
;;
reload)
echo -n "Reloading name service masq caching server unsupported "
rc_failed 3
rc_status -v
;;
sighup)
echo -n "Sending SIGHUP to name service masq caching server "
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|sighup|probe}"
exit 1
;;
esac
rc_exit

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1993e5ab5c6e6d96938a89430dd3ddb607a92f976d33ea607530aad69cd74c14
size 1855