[521] | 1 | Name: dnsmasq |
---|
[10543] | 2 | Version: 2.76 |
---|
| 3 | Release: 1%{?_dist_release} |
---|
[521] | 4 | Summary: A lightweight DHCP/caching DNS server |
---|
| 5 | Summary(ja): 軽量 DHCP/DNSキャッシュサーバ |
---|
| 6 | |
---|
| 7 | Group: System Environment/Daemons |
---|
| 8 | License: GPLv2 or GPLv3 |
---|
| 9 | URL: http://www.thekelleys.org.uk/dnsmasq/ |
---|
[10543] | 10 | Source0: http://www.thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.xz |
---|
[521] | 11 | Patch0: %{name}-2.33-initscript.patch |
---|
| 12 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 13 | |
---|
[10543] | 14 | BuildRequires: dbus-devel, libidn-devel, nettle-devel |
---|
[521] | 15 | BuildRequires: pkgconfig |
---|
| 16 | |
---|
| 17 | Requires(post): /sbin/chkconfig |
---|
| 18 | Requires(post): /sbin/service |
---|
| 19 | Requires(post): /bin/sed /bin/grep |
---|
| 20 | Requires(preun): /sbin/chkconfig |
---|
| 21 | Requires(preun): /sbin/service |
---|
| 22 | |
---|
[8067] | 23 | Vendor: Project Vine |
---|
| 24 | Distribution: Vine Linux |
---|
| 25 | |
---|
[521] | 26 | %description |
---|
| 27 | Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. |
---|
| 28 | It is designed to provide DNS and, optionally, DHCP, to a small network. |
---|
| 29 | It can serve the names of local machines which are not in the global |
---|
| 30 | DNS. The DHCP server integrates with the DNS server and allows machines |
---|
| 31 | with DHCP-allocated addresses to appear in the DNS with names configured |
---|
| 32 | either in each host or in a central configuration file. Dnsmasq supports |
---|
| 33 | static and dynamic DHCP leases and BOOTP for network booting of diskless |
---|
| 34 | machines. |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | %prep |
---|
| 38 | %setup -q -n %{name}-%{version} |
---|
| 39 | %patch0 -p1 |
---|
| 40 | |
---|
[10543] | 41 | # use /var/lib/dnsmasq instead of /var/lib/misc |
---|
| 42 | for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do |
---|
| 43 | sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file" |
---|
| 44 | done |
---|
| 45 | |
---|
| 46 | # fix the path to the trust anchor |
---|
| 47 | sed -i 's|%%%%PREFIX%%%%|%{_prefix}|' dnsmasq.conf.example |
---|
| 48 | |
---|
| 49 | #enable dbus |
---|
| 50 | sed -i 's|/\* #define HAVE_DBUS \*/|#define HAVE_DBUS|g' src/config.h |
---|
| 51 | |
---|
| 52 | #enable IDN support |
---|
| 53 | sed -i 's|/\* #define HAVE_IDN \*/|#define HAVE_IDN|g' src/config.h |
---|
| 54 | |
---|
| 55 | #enable DNSSEC support |
---|
| 56 | sed -i 's|/\* #define HAVE_DNSSEC \*/|#define HAVE_DNSSEC|g' src/config.h |
---|
| 57 | |
---|
| 58 | #enable /etc/dnsmasq.d fix bz 526703, ignore RPM backup files |
---|
| 59 | cat << EOF >> dnsmasq.conf.example |
---|
| 60 | |
---|
| 61 | # Include all files in /etc/dnsmasq.d except RPM backup files |
---|
| 62 | conf-dir=%{_sysconfdir}/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig |
---|
| 63 | EOF |
---|
| 64 | |
---|
| 65 | |
---|
[521] | 66 | %build |
---|
| 67 | make %{?_smp_mflags} |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | %install |
---|
| 71 | rm -rf $RPM_BUILD_ROOT |
---|
| 72 | # normally i'd do 'make install'...it's a bit messy, though |
---|
| 73 | mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_initrddir} \ |
---|
| 74 | $RPM_BUILD_ROOT%{_mandir}/man8 \ |
---|
| 75 | $RPM_BUILD_ROOT%{_var}/lib/dnsmasq \ |
---|
| 76 | $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.d \ |
---|
| 77 | $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d |
---|
| 78 | install src/dnsmasq $RPM_BUILD_ROOT%{_sbindir}/dnsmasq |
---|
| 79 | install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf |
---|
| 80 | install dbus/dnsmasq.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/ |
---|
| 81 | install rpm/dnsmasq.init $RPM_BUILD_ROOT%{_initrddir}/dnsmasq |
---|
| 82 | install -m 644 man/dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8/ |
---|
| 83 | |
---|
| 84 | %clean |
---|
| 85 | rm -rf $RPM_BUILD_ROOT |
---|
| 86 | |
---|
| 87 | %post |
---|
| 88 | if [ "$1" = "2" ]; then # if we're being upgraded |
---|
| 89 | # if using the old leases location, move the file to the new one |
---|
| 90 | # but only if we're not clobbering another file |
---|
| 91 | # |
---|
| 92 | if [ -f /var/lib/misc/dnsmasq.leases -a ! -f /var/lib/dnsmasq/dnsmasq.leases ]; then |
---|
| 93 | # causes rpmlint to report dangerous-command-in-post, |
---|
| 94 | # but that's the price of selinux compliance :-( |
---|
| 95 | mv -f /var/lib/misc/dnsmasq.leases /var/lib/dnsmasq/dnsmasq.leases || : |
---|
| 96 | fi |
---|
| 97 | # ugly, but kind of necessary |
---|
| 98 | if [ ! `grep -q dhcp-leasefile=/var/lib/misc/dnsmasq.leases %{_sysconfdir}/dnsmasq.conf` ]; then |
---|
| 99 | cp %{_sysconfdir}/dnsmasq.conf %{_sysconfdir}/dnsmasq.conf.tmp || : |
---|
| 100 | sed -e 's/var\/lib\/misc/var\/lib\/dnsmasq/' < %{_sysconfdir}/dnsmasq.conf.tmp > %{_sysconfdir}/dnsmasq.conf || : |
---|
| 101 | rm -f %{_sysconfdir}/dnsmasq.conf.tmp || : |
---|
| 102 | fi |
---|
| 103 | /sbin/service dnsmasq condrestart >/dev/null 2>&1 || : |
---|
| 104 | else # if we're being installed |
---|
| 105 | /sbin/chkconfig --add dnsmasq |
---|
| 106 | fi |
---|
| 107 | |
---|
| 108 | %preun |
---|
| 109 | if [ "$1" = "0" ]; then # execute this only if we are NOT doing an upgrade |
---|
| 110 | /sbin/service dnsmasq stop >/dev/null 2>&1 || : |
---|
| 111 | /sbin/chkconfig --del dnsmasq |
---|
| 112 | fi |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | %files |
---|
| 116 | %defattr(-,root,root,-) |
---|
[10543] | 117 | %license COPYING* |
---|
| 118 | %doc CHANGELOG FAQ doc.html setup.html dbus/DBus-interface |
---|
[521] | 119 | %config(noreplace) %attr(644,root,root) %{_sysconfdir}/dnsmasq.conf |
---|
| 120 | %dir /etc/dnsmasq.d |
---|
| 121 | %dir %{_var}/lib/dnsmasq |
---|
| 122 | %config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf |
---|
| 123 | %{_initrddir}/dnsmasq |
---|
| 124 | %{_sbindir}/dnsmasq |
---|
| 125 | %{_mandir}/man8/dnsmasq* |
---|
| 126 | |
---|
| 127 | |
---|
| 128 | %changelog |
---|
[10543] | 129 | * Tue Jul 5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.76-1 |
---|
| 130 | - new upstream release. |
---|
| 131 | |
---|
[8067] | 132 | * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.45-3 |
---|
| 133 | - rebuild with VineSeed environment |
---|
| 134 | |
---|
[3525] | 135 | * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 2.45-2 |
---|
| 136 | - rebuilt with rpm-4.8.1-3 |
---|
| 137 | |
---|
[521] | 138 | * Thu Jul 31 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.45-1 |
---|
| 139 | - initial build for Vine Linux |
---|
| 140 | |
---|
| 141 | * Mon Jul 21 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.45-1 |
---|
| 142 | - Upstream release (bugfixes) |
---|
| 143 | |
---|
| 144 | * Wed Jul 16 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.43-2 |
---|
| 145 | - New upstream release, contains fixes for CVE-2008-1447/CERT VU#800113 |
---|
| 146 | - Dropped patch for newer glibc (merged upstream) |
---|
| 147 | |
---|
| 148 | * Wed Feb 13 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.8 |
---|
| 149 | - Added upstream-authored patch for newer glibc (thanks Simon!) |
---|
| 150 | |
---|
| 151 | * Wed Feb 13 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.7 |
---|
| 152 | - New upstream release |
---|
| 153 | |
---|
| 154 | * Wed Jan 30 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.6.rc1 |
---|
| 155 | - Release candidate |
---|
| 156 | - Happy Birthday Isaac! |
---|
| 157 | |
---|
| 158 | * Wed Jan 23 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.5.test30 |
---|
| 159 | - Bugfix update |
---|
| 160 | |
---|
| 161 | * Mon Dec 31 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.4.test26 |
---|
| 162 | - Bugfix/feature enhancement update |
---|
| 163 | |
---|
| 164 | * Thu Dec 13 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.3.test24 |
---|
| 165 | - Upstream fix for fairly serious regression |
---|
| 166 | |
---|
| 167 | * Tue Dec 04 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.41-0.2.test20 |
---|
| 168 | - New upstream test release |
---|
| 169 | - Moving dnsmasq.leases to /var/lib/dnsmasq/ as per BZ#407901 |
---|
| 170 | - Ignoring dangerous-command-in-%%post rpmlint warning (as per above fix) |
---|
| 171 | - Patch consolidation/cleanup |
---|
| 172 | - Removed conditionals for Fedora <= 3 and Aurora 2.0 |
---|
| 173 | |
---|
| 174 | * Tue Sep 18 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.40-1 |
---|
| 175 | - Finalized upstream release |
---|
| 176 | - Removing URLs from patch lines (CVS is the authoritative source) |
---|
| 177 | - Added more magic to make spinning rc/test packages more seamless |
---|
| 178 | |
---|
| 179 | * Sun Aug 26 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.40-0.1.rc2 |
---|
| 180 | - New upstream release candidate (feature-frozen), thanks Simon! |
---|
| 181 | - License clarification |
---|
| 182 | |
---|
| 183 | * Tue May 29 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.39-1 |
---|
| 184 | - New upstream version (bugfixes, enhancements) |
---|
| 185 | |
---|
| 186 | * Mon Feb 12 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.38-1 |
---|
| 187 | - New upstream version with bugfix for potential hang |
---|
| 188 | |
---|
| 189 | * Tue Feb 06 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.37-1 |
---|
| 190 | - New upstream version |
---|
| 191 | |
---|
| 192 | * Wed Jan 24 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.36-1 |
---|
| 193 | - New upstream version |
---|
| 194 | |
---|
| 195 | * Mon Nov 06 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.35-2 |
---|
| 196 | - Stop creating /etc/sysconfig on %%install |
---|
| 197 | - Create /etc/dnsmasq.d on %%install |
---|
| 198 | |
---|
| 199 | * Mon Nov 06 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.35-1 |
---|
| 200 | - Update to 2.35 |
---|
| 201 | - Removed UPGRADING_to_2.0 from %%doc as per upstream change |
---|
| 202 | - Enabled conf-dir in default config as per RFE BZ#214220 (thanks Chris!) |
---|
| 203 | - Added %%dir /etc/dnsmasq.d to %%files as per above RFE |
---|
| 204 | |
---|
| 205 | * Tue Oct 24 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.34-2 |
---|
| 206 | - Fixed BZ#212005 |
---|
| 207 | - Moved %%postun scriptlet to %%post, where it made more sense |
---|
| 208 | - Render scriptlets safer |
---|
| 209 | - Minor cleanup for consistency |
---|
| 210 | |
---|
| 211 | * Thu Oct 19 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.34-1 |
---|
| 212 | - Hardcoded version in patches, as I'm getting tired of updating them |
---|
| 213 | - Update to 2.34 |
---|
| 214 | |
---|
| 215 | * Mon Aug 28 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.33-2 |
---|
| 216 | - Rebuild for FC6 |
---|
| 217 | |
---|
| 218 | * Tue Aug 15 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.33-1 |
---|
| 219 | - Update |
---|
| 220 | |
---|
| 221 | * Sat Jul 22 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.32-3 |
---|
| 222 | - Added pkgconfig BuildReq due to reduced buildroot |
---|
| 223 | |
---|
| 224 | * Thu Jul 20 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.32-2 |
---|
| 225 | - Forced update due to dbus version bump |
---|
| 226 | |
---|
| 227 | * Mon Jun 12 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 2.32-1 |
---|
| 228 | - Update from upstream |
---|
| 229 | - Patch from Dennis Gilmore fixed the conditionals to detect Aurora Linux |
---|
| 230 | |
---|
| 231 | * Mon May 8 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.31-1 |
---|
| 232 | - Removed dbus config patch (now provided upstream) |
---|
| 233 | - Patched in init script (no longer provided upstream) |
---|
| 234 | - Added DBus-interface to docs |
---|
| 235 | |
---|
| 236 | * Tue May 2 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-4.2 |
---|
| 237 | - More upstream-recommended cleanups :) |
---|
| 238 | - Killed sysconfig file (provides unneeded functionality) |
---|
| 239 | - Tweaked init script a little more |
---|
| 240 | |
---|
| 241 | * Tue May 2 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-4 |
---|
| 242 | - Moved options out of init script and into /etc/sysconfig/dnsmasq |
---|
| 243 | - Disabled DHCP_LEASE in sysconfig file, fixing bug #190379 |
---|
| 244 | - Simon Kelley provided dbus/dnsmasq.conf, soon to be part of the tarball |
---|
| 245 | |
---|
| 246 | * Thu Apr 27 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-3 |
---|
| 247 | - Un-enabled HAVE_ISC_READER, a hack to enable a deprecated feature (request) |
---|
| 248 | - Split initscript & enable-dbus patches, conditionalized dbus for FC3 |
---|
| 249 | - Tweaked name field in changelog entries (trying to be consistent) |
---|
| 250 | |
---|
| 251 | * Mon Apr 24 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-2 |
---|
| 252 | - Disabled stripping of binary while installing (oops) |
---|
| 253 | - Enabled HAVE_ISC_READER/HAVE_DBUS via patch |
---|
| 254 | - Added BuildReq for dbus-devel |
---|
| 255 | |
---|
| 256 | * Mon Apr 24 2006 Patrick "Jima" Laughton <jima@auroralinux.org> 2.30-1 |
---|
| 257 | - Initial Fedora Extras RPM |
---|