dnsmasq-vl.spec 8.4 KB

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