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:
2018-02-27 03:21:12 +00:00
committed by Git OBS Bridge
parent 99d43d9130
commit fc2bf22693
3 changed files with 27 additions and 0 deletions

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} > 120300
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} > 120300
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} > 120300
%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} > 120300
%dir %{_libexecdir}/firewalld
%dir %{_libexecdir}/firewalld/services
%{_libexecdir}/firewalld/services/ocserv.xml
%endif
%{_bindir}/occtl
%{_bindir}/ocpasswd
%{_bindir}/ocserv-script