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