dnsmasq-vl.spec 9.6 KB

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