1 Star 0 Fork 4

src-oepkgs-oE-rv/portreserve

forked from src-openEuler/portreserve 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
portreserve.spec 2.24 KB
一键复制 编辑 原始数据 按行查看 历史
dogsheng 提交于 2019-11-19 11:53 . Package init
Name: portreserve
Version: 0.0.5
Release: 21
Summary: Reserve ports to prevent portmap mapping them
License: GPLv2+
URL: http://cyberelk.net/tim/portreserve/
Source0: http://cyberelk.net/tim/data/portreserve/stable/%{name}-%{version}.tar.bz2
Source1: portreserve.service
Patch0001: portreserve-pid-file.patch
BuildRequires: gcc xmlto systemd-units
Requires(post): systemd-units systemd-sysv
Requires(preun): systemd-units
Requires(postun): systemd-units
Obsoletes: portreserve-selinux < 0.0.3-3
%description
The portreserve program aims to help services with well-known ports that lie in the
bindresvport() range (currently 600-1023).. It prevents programs requesting a port
to the libc from occupying a real service's port by occupying it itself, until the
real service tells it to release the port (generally in the init script).
%package help
Summary: Help documents for portreserve
Requires: %{name} = %{version}-%{release}
%description help
Man pages and other related help documents for portreserve.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure --sbindir=/sbin
make
%install
%make_install
install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_tmpfilesdir}
install -d %{buildroot}%{_sysconfdir}/portreserve
install -d %{buildroot}%{_localstatedir}/run/portreserve
install -m644 %{SOURCE1} %{buildroot}%{_unitdir}/portreserve.service
cat << EOF > %{buildroot}%{_tmpfilesdir}/portreserve.conf
d %{_localstatedir}/run/portreserve 0755 root root 10d
EOF
%post
%systemd_post portreserve.service
%preun
%systemd_preun portreserve.service
%postun
%systemd_postun_with_restart portreserve.service
%triggerun -- portreserve < 0.0.5-3
%{_bindir}/systemd-sysv-convert --save portreserve >/dev/null 2>&1 ||:
/sbin/chkconfig --del portreserve >/dev/null 2>&1 || :
/bin/systemctl try-restart portreserve.service >/dev/null 2>&1 || :
%files
%doc COPYING
%{_unitdir}/portreserve.service
%dir %{_sysconfdir}/portreserve
%dir %{_localstatedir}/run/portreserve
%config %{_tmpfilesdir}/portreserve.conf
/sbin/*
%files help
%doc ChangeLog README NEWS
%{_mandir}/*/*
%changelog
* Wed Nov 06 2019 yanzhihua <yanzhihua4@huawei.com> - 0.0.5-21
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/portreserve.git
git@gitee.com:src-oepkgs-oe-rv/portreserve.git
src-oepkgs-oe-rv
portreserve
portreserve
master

搜索帮助