portreserve-vl.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. Summary: TCP port reservation utility
  2. Summary(ja): TCP ポート予約ユーティリティ
  3. Name: portreserve
  4. Version: 0.0.4
  5. Release: 1%{?_dist_release}
  6. License: GPLv2+
  7. Group: System Environment/Daemons
  8. URL: http://cyberelk.net/tim/portreserve/
  9. Source0: http://cyberelk.net/tim/data/portreserve/stable/%{name}-%{version}.tar.bz2
  10. Patch1: portreserve-infinite-loop.patch
  11. Patch2: portreserve-initscript.patch
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  13. BuildRequires: xmlto
  14. %description
  15. The portreserve program aims to help services with well-known ports that
  16. lie in the portmap range. It prevents portmap from a real service's port
  17. by occupying it itself, until the real service tells it to release the
  18. port (generally in the init script).
  19. %prep
  20. %setup -q
  21. # Prevent infinite loop.
  22. %patch1 -p1 -b .infinite-loop
  23. # Fixed initscript exit code for "status" action (bug #619089).
  24. %patch2 -p1 -b .initscript
  25. %build
  26. %configure --sbindir=/sbin
  27. make
  28. %install
  29. rm -rf %{buildroot}
  30. make DESTDIR=%{buildroot} install
  31. mkdir -p %{buildroot}%{_localstatedir}/run/portreserve
  32. mkdir -p %{buildroot}%{_initrddir}
  33. install -m755 portreserve.init %{buildroot}%{_initrddir}/portreserve
  34. mkdir -p %{buildroot}%{_sysconfdir}/portreserve
  35. mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
  36. cat <<EOF > %{buildroot}%{_sysconfdir}/tmpfiles.d/portreserve.conf
  37. d %{_localstatedir}/run/portreserve 0755 root root 10d
  38. EOF
  39. %clean
  40. rm -rf %{buildroot}
  41. %post
  42. # Do this unconditionally to fix up the initscript's start priority.
  43. # Earlier versions had an incorrect dependency (bug #487250).
  44. /sbin/chkconfig --add portreserve
  45. %preun
  46. if [ "$1" = 0 ]; then
  47. /sbin/service portreserve stop >/dev/null 2>&1
  48. /sbin/chkconfig --del portreserve
  49. fi
  50. %postun
  51. if [ "$1" -ge "1" ]; then
  52. /sbin/service portreserve condrestart >/dev/null 2>&1
  53. fi
  54. %files
  55. %defattr(-,root,root)
  56. %doc ChangeLog README COPYING NEWS
  57. %ghost %dir %{_localstatedir}/run/portreserve
  58. %dir %{_sysconfdir}/portreserve
  59. %config %{_sysconfdir}/tmpfiles.d/portreserve.conf
  60. %attr(755,root,root) %{_initrddir}/portreserve
  61. /sbin/*
  62. %{_mandir}/*/*
  63. %changelog
  64. * Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.0.4-1
  65. - initial build for Vine Linux
  66. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-8
  67. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  68. * Thu Dec 2 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-7
  69. - /var/run changes for systemd (bug #656670).
  70. * Thu Nov 18 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-6
  71. - Fixed initscript exit code for "status" action (bug #619089).
  72. * Thu Mar 4 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-5
  73. - Added comments to all patches.
  74. * Fri Jan 22 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-4
  75. - Walk the list of newmaps correctly (bug #557781).
  76. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-2
  77. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  78. * Fri Feb 27 2009 Tim Waugh <twaugh@redhat.com> 0.0.4-1
  79. - 0.0.4:
  80. - Fixed initscript so that it will not be reordered to start after
  81. rpcbind (bug #487250).
  82. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-4
  83. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  84. * Wed Feb 4 2009 Tim Waugh <twaugh@redhat.com> 0.0.3-3
  85. - No longer need SELinux policy as it is now part of the
  86. selinux-policy package.
  87. * Wed Oct 15 2008 Tim Waugh <twaugh@redhat.com> 0.0.3-2
  88. - New selinux sub-package for SELinux policy. Policy contributed by
  89. Miroslav Grepl (thanks!).
  90. * Tue Jul 1 2008 Tim Waugh <twaugh@redhat.com> 0.0.3-1
  91. - 0.0.3:
  92. - Allow multiple services to be defined in a single configuration
  93. file.
  94. - Allow protocol specifications, e.g. ipp/udp.
  95. * Mon Jun 30 2008 Tim Waugh <twaugh@redhat.com> 0.0.2-1
  96. - 0.0.2.
  97. * Fri May 9 2008 Tim Waugh <twaugh@redhat.com> 0.0.1-2
  98. - More consistent use of macros.
  99. - Build requires xmlto.
  100. - Don't use %%makeinstall.
  101. - No need to run make check.
  102. * Thu May 8 2008 Tim Waugh <twaugh@redhat.com> 0.0.1-1
  103. - Default permissions for directories.
  104. - Initscript should not be marked config.
  105. - Fixed license tag.
  106. - Better buildroot tag.
  107. * Wed Sep 3 2003 Tim Waugh <twaugh@redhat.com>
  108. - Initial spec file.