From fc2bf22693fbb12f6e0c4d09227988eee57889e5cd197cefd70a093b340b20af Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Tue, 27 Feb 2018 03:21:12 +0000 Subject: [PATCH] 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 --- ocserv.changes | 5 +++++ ocserv.firewalld.xml | 7 +++++++ ocserv.spec | 15 +++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 ocserv.firewalld.xml diff --git a/ocserv.changes b/ocserv.changes index 0736ace..483621c 100644 --- a/ocserv.changes +++ b/ocserv.changes @@ -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 diff --git a/ocserv.firewalld.xml b/ocserv.firewalld.xml new file mode 100644 index 0000000..cc6edea --- /dev/null +++ b/ocserv.firewalld.xml @@ -0,0 +1,7 @@ + + + ocserv + open ports for ocserv vpn service + + + diff --git a/ocserv.spec b/ocserv.spec index ac4861c..cfb948b 100644 --- a/ocserv.spec +++ b/ocserv.spec @@ -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