SHA256
1
0
forked from pool/ocserv

Accepting request 580606 from network:vpn

- add firewalld service

OBS-URL: https://build.opensuse.org/request/show/580606
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocserv?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2018-02-27 16:00:28 +00:00 committed by Git OBS Bridge
commit e1fbbbb5a0
3 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 27 02:50:33 UTC 2018 - i@marguerite.su
- add firewalld service
-------------------------------------------------------------------
Sat Feb 24 05:43:55 UTC 2018 - i@marguerite.su

7
ocserv.firewalld.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>ocserv</short>
<description>open ports for ocserv vpn service</description>
<port port="9000" protocol="tcp"/>
<port port="9001" protocol="udp"/>
</service>

View File

@ -33,6 +33,7 @@ Source2: server.tmpl
Source3: user.tmpl
Source4: ocserv.SuSEfirewall
Source5: ocserv.sysctl
Source6: ocserv.firewalld.xml
Source99: README.SUSE
#PATCH-FIX-UPSTREAM marguerite@opensuse.org $LIBSYSTEMD_DAEMON env is not set on openSUSE
Patch1: %{name}-enable-systemd.patch
@ -42,6 +43,9 @@ Patch2: %{name}.config.patch
Patch3: %{name}-LZ4_compress_default.patch
BuildRequires: autogen
BuildRequires: dbus-1-devel
%if 0%{suse_version} >= 1500
BuildRequires: firewall-macros
%endif
BuildRequires: freeradius-client-devel
BuildRequires: gperf
BuildRequires: libev-devel
@ -105,6 +109,9 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} install
install -Dm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ocserv
install -Dm 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysctl.d/60-ocserv.conf
%if 0%{suse_version} >= 1500
install -D -m 644 %{SOURCE6} %{buildroot}%{_libexecdir}/firewalld/services/ocserv.xml
%endif
install -d %{buildroot}%{_sysconfdir}/ocserv/certificates
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ocserv/certificates
@ -125,6 +132,9 @@ install -m 0644 doc/systemd/socket-activated/ocserv.service %{buildroot}%{_unitd
%post
%service_add_post ocserv.service ocserv.socket
%if 0%{suse_version} >= 1500
%firewalld_reload
%endif
%preun
%service_del_preun ocserv.service ocserv.socket
@ -138,6 +148,11 @@ install -m 0644 doc/systemd/socket-activated/ocserv.service %{buildroot}%{_unitd
%config %{_sysconfdir}/ocserv
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ocserv
%config(noreplace) %{_sysconfdir}/sysctl.d/60-ocserv.conf
%if 0%{suse_version} >= 1500
%dir %{_libexecdir}/firewalld
%dir %{_libexecdir}/firewalld/services
%{_libexecdir}/firewalld/services/ocserv.xml
%endif
%{_bindir}/occtl
%{_bindir}/ocpasswd
%{_bindir}/ocserv-script