forked from pool/vsftpd
Accepting request 593212 from home:vitezslav_cizek:branches:network
- Add firewalld service file (bsc#1083705) OBS-URL: https://build.opensuse.org/request/show/593212 OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=123
This commit is contained in:
parent
d2c5c6ef17
commit
4be5277927
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 3 11:48:08 UTC 2018 - vcizek@suse.com
|
||||
|
||||
- Add firewalld service file (bsc#1083705)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 13 09:41:39 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
|
8
vsftpd.firewalld
Normal file
8
vsftpd.firewalld
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>vsftpd ports</short>
|
||||
<description>vsftpd ports for both active and passive connections</description>
|
||||
<port protocol="tcp" port="21"/> <!-- control connection port -->
|
||||
<port protocol="tcp" port="30000-30100"/> <!-- passive mode port range -->
|
||||
</service>
|
||||
|
37
vsftpd.spec
37
vsftpd.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package vsftpd
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -21,6 +21,11 @@
|
||||
%else
|
||||
%global with_systemd 0
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%define use_firewalld 1
|
||||
%else
|
||||
%define use_firewalld 0
|
||||
%endif
|
||||
Name: vsftpd
|
||||
Version: 3.0.3
|
||||
Release: 0
|
||||
@ -38,6 +43,7 @@ Source7: vsftpd.service
|
||||
Source8: vsftpd@.service
|
||||
Source9: %{name}.keyring
|
||||
Source10: vsftpd.socket
|
||||
Source11: %{name}.firewalld
|
||||
Source1000: https://security.appspot.com/downloads/%{name}-%{version}.tar.gz.asc
|
||||
Patch1: vsftpd-2.0.4-lib64.diff
|
||||
Patch3: vsftpd-2.0.4-xinetd.diff
|
||||
@ -81,13 +87,15 @@ BuildRequires: libopenssl-devel
|
||||
BuildRequires: pam-devel
|
||||
Requires: logrotate
|
||||
Requires(pre): shadow
|
||||
Provides: ftp-server
|
||||
%if %{use_firewalld}
|
||||
Requires(post): firewall-macros
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1330
|
||||
Requires(pre): group(nobody)
|
||||
Requires: group(nobody)
|
||||
Requires: user(ftp)
|
||||
Requires(pre): group(nobody)
|
||||
%endif
|
||||
Provides: ftp-server
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
@ -164,8 +172,13 @@ install -D -m 0644 %{SOURCE10} %{buildroot}/%{_unitdir}/%{name}.socket
|
||||
install -D -m 755 %{SOURCE3} %{buildroot}%{_initddir}/%{name}
|
||||
ln -sf %{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
# install firewall information file
|
||||
%if %{use_firewalld}
|
||||
install -D -m 644 %{SOURCE11} %{buildroot}%{_libexecdir}/firewalld/services/%{name}.xml
|
||||
%else
|
||||
install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
|
||||
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
||||
%endif
|
||||
|
||||
%pre
|
||||
getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty ftpsecure
|
||||
@ -187,6 +200,9 @@ getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Sec
|
||||
%insserv_cleanup
|
||||
%restart_on_update %{name}
|
||||
%endif
|
||||
%if %{use_firewalld}
|
||||
%{firewalld_reload}
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if %{with_systemd}
|
||||
@ -197,7 +213,6 @@ getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Sec
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_unitdir}/%{name}.socket
|
||||
@ -216,9 +231,17 @@ getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Sec
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%{_mandir}/man5/%{name}.conf.*
|
||||
%{_mandir}/man8/%{name}.*
|
||||
%doc BUGS AUDIT Changelog LICENSE README README.security
|
||||
%doc REWARD SPEED TODO SECURITY TUNING SIZE FAQ EXAMPLE COPYING
|
||||
%license LICENSE
|
||||
%doc BUGS AUDIT Changelog README README.security
|
||||
%license COPYING
|
||||
%doc REWARD SPEED TODO SECURITY TUNING SIZE FAQ EXAMPLE
|
||||
%doc README.SUSE
|
||||
%if %{use_firewalld}
|
||||
%dir %{_libexecdir}/firewalld
|
||||
%dir %{_libexecdir}/firewalld/services
|
||||
%{_libexecdir}/firewalld/services/%{name}.xml
|
||||
%else
|
||||
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user