forked from pool/ocserv
Accepting request 580402 from home:MargueriteSu:branches:network:vpn
- add firewalld service OBS-URL: https://build.opensuse.org/request/show/580402 OBS-URL: https://build.opensuse.org/package/show/network:vpn/ocserv?expand=0&rev=15
This commit is contained in:
parent
99d43d9130
commit
fc2bf22693
@ -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
|
Sat Feb 24 05:43:55 UTC 2018 - i@marguerite.su
|
||||||
|
|
||||||
|
7
ocserv.firewalld.xml
Normal file
7
ocserv.firewalld.xml
Normal 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>
|
15
ocserv.spec
15
ocserv.spec
@ -33,6 +33,7 @@ Source2: server.tmpl
|
|||||||
Source3: user.tmpl
|
Source3: user.tmpl
|
||||||
Source4: ocserv.SuSEfirewall
|
Source4: ocserv.SuSEfirewall
|
||||||
Source5: ocserv.sysctl
|
Source5: ocserv.sysctl
|
||||||
|
Source6: ocserv.firewalld.xml
|
||||||
Source99: README.SUSE
|
Source99: README.SUSE
|
||||||
#PATCH-FIX-UPSTREAM marguerite@opensuse.org $LIBSYSTEMD_DAEMON env is not set on openSUSE
|
#PATCH-FIX-UPSTREAM marguerite@opensuse.org $LIBSYSTEMD_DAEMON env is not set on openSUSE
|
||||||
Patch1: %{name}-enable-systemd.patch
|
Patch1: %{name}-enable-systemd.patch
|
||||||
@ -42,6 +43,9 @@ Patch2: %{name}.config.patch
|
|||||||
Patch3: %{name}-LZ4_compress_default.patch
|
Patch3: %{name}-LZ4_compress_default.patch
|
||||||
BuildRequires: autogen
|
BuildRequires: autogen
|
||||||
BuildRequires: dbus-1-devel
|
BuildRequires: dbus-1-devel
|
||||||
|
%if 0%{suse_version} > 120300
|
||||||
|
BuildRequires: firewall-macros
|
||||||
|
%endif
|
||||||
BuildRequires: freeradius-client-devel
|
BuildRequires: freeradius-client-devel
|
||||||
BuildRequires: gperf
|
BuildRequires: gperf
|
||||||
BuildRequires: libev-devel
|
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 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ocserv
|
||||||
install -Dm 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysctl.d/60-ocserv.conf
|
install -Dm 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysctl.d/60-ocserv.conf
|
||||||
|
%if 0%{suse_version} > 120300
|
||||||
|
install -D -m 644 %{SOURCE6} %{buildroot}%{_libexecdir}/firewalld/services/ocserv.xml
|
||||||
|
%endif
|
||||||
|
|
||||||
install -d %{buildroot}%{_sysconfdir}/ocserv/certificates
|
install -d %{buildroot}%{_sysconfdir}/ocserv/certificates
|
||||||
install -m 0644 %{SOURCE1} %{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
|
%post
|
||||||
%service_add_post ocserv.service ocserv.socket
|
%service_add_post ocserv.service ocserv.socket
|
||||||
|
%if 0%{suse_version} > 120300
|
||||||
|
%firewalld_reload
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun ocserv.service ocserv.socket
|
%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 %{_sysconfdir}/ocserv
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ocserv
|
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ocserv
|
||||||
%config(noreplace) %{_sysconfdir}/sysctl.d/60-ocserv.conf
|
%config(noreplace) %{_sysconfdir}/sysctl.d/60-ocserv.conf
|
||||||
|
%if 0%{suse_version} > 120300
|
||||||
|
%dir %{_libexecdir}/firewalld
|
||||||
|
%dir %{_libexecdir}/firewalld/services
|
||||||
|
%{_libexecdir}/firewalld/services/ocserv.xml
|
||||||
|
%endif
|
||||||
%{_bindir}/occtl
|
%{_bindir}/occtl
|
||||||
%{_bindir}/ocpasswd
|
%{_bindir}/ocpasswd
|
||||||
%{_bindir}/ocserv-script
|
%{_bindir}/ocserv-script
|
||||||
|
Loading…
Reference in New Issue
Block a user