forked from pool/ocserv
c5d48392d7
OBS-URL: https://build.opensuse.org/request/show/285939 OBS-URL: https://build.opensuse.org/package/show/network:vpn/ocserv?expand=0&rev=1
138 lines
4.7 KiB
RPMSpec
138 lines
4.7 KiB
RPMSpec
#
|
|
# spec file for package ocserv
|
|
#
|
|
# Copyright (c) 2015 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
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
Name: ocserv
|
|
Version: 0.9.0.1
|
|
Release: 0
|
|
License: GPL-2.0+
|
|
Summary: OpenConnect VPN Server
|
|
Url: http://www.infradead.org/ocserv
|
|
Group: Productivity/Networking/Security
|
|
Source: ftp://ftp.infradead.org/pub/ocserv/%{name}-%{version}.tar.xz
|
|
Source1: ca.tmpl
|
|
Source2: server.tmpl
|
|
Source3: user.tmpl
|
|
Source99: README.SUSE
|
|
#PATCH-FIX-UPSTREAM marguerite@opensuse.org str_init lacks a parameter
|
|
Patch: %{name}-str_init.patch
|
|
#PATCH-FIX-UPSTREAM marguerite@opensuse.org $LIBSYSTEMD_DAEMON env is not set on openSUSE
|
|
Patch1: %{name}-enable-systemd.patch
|
|
#PATCH-FIX-UPSTREAM marguerite@opensuse.org tweak configuration
|
|
Patch2: %{name}.config.patch
|
|
BuildRequires: autogen
|
|
BuildRequires: libtool
|
|
BuildRequires: pkg-config
|
|
BuildRequires: libgnutls-devel >= 3.1.10
|
|
BuildRequires: protobuf-devel
|
|
BuildRequires: libtalloc-devel
|
|
BuildRequires: libnl3-devel
|
|
BuildRequires: readline5-devel
|
|
BuildRequires: pam-devel
|
|
BuildRequires: freeradius-client-devel
|
|
BuildRequires: libseccomp-devel
|
|
BuildRequires: dbus-1-devel
|
|
BuildRequires: systemd-devel
|
|
%if 0%{?suse_version} > 1310
|
|
BuildRequires: liblz4-devel
|
|
%endif
|
|
# /usr/bin/certtool for generating certificates
|
|
Requires: gnutls >= 3.1.10
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%{?systemd_requires}
|
|
|
|
%description
|
|
OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to
|
|
be a secure, small, fast and configurable VPN server. It implements
|
|
the OpenConnect SSL VPN protocol, and has also (currently experimental)
|
|
compatibility with clients using the AnyConnect SSL VPN protocol.
|
|
The OpenConnect protocol provides a dual TCP/UDP VPN channel, and
|
|
uses the standard IETF security protocols to secure it. The server
|
|
is implemented primarily for the GNU/Linux platform but its code
|
|
is designed to be portable to other UNIX variants as well.
|
|
|
|
Ocserv's main features are security through privilege separation
|
|
and sandboxing, accounting, and resilience due to a combined use
|
|
of TCP and UDP. Authentication occurs in an isolated security
|
|
module process, and each user is assigned an unprivileged worker
|
|
process, and a networking (tun) device. That not only eases the
|
|
control of the resources of each user or group of users, but also
|
|
prevents data leak (e.g., heartbleed-style attacks), and privilege
|
|
escalation due to any bug on the VPN handling (worker) process.
|
|
A management interface allows for viewing and querying logged-in users.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-0.9.0
|
|
%patch -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
autoreconf -fiv
|
|
|
|
%build
|
|
%configure --enable-systemd \
|
|
--enable-seccomp \
|
|
--enable-linux-namespaces \
|
|
--disable-rpath \
|
|
--enable-local-libopts \
|
|
--enable-libopts-install
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot} %{?_smp_mflags}
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/ocserv/certificates
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ocserv/certificates
|
|
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ocserv/certificates
|
|
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/ocserv/certificates
|
|
install -m 0644 %{SOURCE99} %{buildroot}%{_sysconfdir}/ocserv/
|
|
install -m 0644 doc/sample.config %{buildroot}%{_sysconfdir}/ocserv/ocserv.conf
|
|
install -m 0644 doc/sample.passwd %{buildroot}%{_sysconfdir}/ocserv/ocpasswd
|
|
install -m 0755 doc/scripts/ocserv-script %{buildroot}%{_bindir}
|
|
|
|
install -d %{buildroot}%{_unitdir}
|
|
# if --with-dubs, here should be "standalone"
|
|
install -m 0644 doc/systemd/socket-activated/ocserv.socket %{buildroot}%{_unitdir}
|
|
install -m 0644 doc/systemd/socket-activated/ocserv.service %{buildroot}%{_unitdir}
|
|
|
|
%pre
|
|
%service_add_pre ocserv.service ocserv.socket
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
%service_add_post ocserv.service ocserv.socket
|
|
|
|
%preun
|
|
%service_del_preun ocserv.service ocserv.socket
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
%service_del_postun ocserv.service ocserv.socket
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS ChangeLog LICENSE NEWS README COPYING TODO
|
|
%config %{_sysconfdir}/ocserv
|
|
%{_bindir}/occtl
|
|
%{_bindir}/ocpasswd
|
|
%{_bindir}/ocserv-script
|
|
%{_sbindir}/ocserv
|
|
%{_unitdir}/ocserv.service
|
|
%{_unitdir}/ocserv.socket
|
|
%{_mandir}/man8/occtl.8.gz
|
|
%{_mandir}/man8/ocpasswd.8.gz
|
|
%{_mandir}/man8/ocserv.8.gz
|
|
|