- Fixed to enable systemd support in configure
- Fixed to install the service template correctly as openvpn@.service. Use "systemctl enable openvpn@foo.service" to enable instance using /etc/openvpn/foo.conf. - Fixed openvpn-tmpfile.conf to use GID root, there is no openvpn group. - Disabled all systemd post install macros trying to use not existing openvpn.service file. OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=57
This commit is contained in:
parent
817fa15d7a
commit
38fd21b2e6
@ -1,7 +1,13 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 23 10:22:32 UTC 2013 - mt@suse.de
|
Tue Apr 23 10:22:32 UTC 2013 - mt@suse.de
|
||||||
|
|
||||||
- Fixed GID to root in openvpn-tmpfile.conf, there is no openvpn group.
|
- Fixed to enable systemd support in configure
|
||||||
|
- Fixed to install the service template correctly as openvpn@.service.
|
||||||
|
Use "systemctl enable openvpn@foo.service" to enable instance using
|
||||||
|
/etc/openvpn/foo.conf.
|
||||||
|
- Fixed openvpn-tmpfile.conf to use GID root, there is no openvpn group.
|
||||||
|
- Disabled all systemd post install macros trying to use not existing
|
||||||
|
openvpn.service file.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 26 14:38:48 UTC 2013 - aj@suse.com
|
Tue Mar 26 14:38:48 UTC 2013 - aj@suse.com
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I
|
Description=OpenVPN Robust And Highly Flexible Tunneling Application Instance using %I.conf
|
||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
PrivateTmp=true
|
|
||||||
Type=forking
|
Type=forking
|
||||||
|
PrivateTmp=true
|
||||||
PIDFile=/var/run/openvpn/%i.pid
|
PIDFile=/var/run/openvpn/%i.pid
|
||||||
ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
|
ExecStart=/usr/sbin/openvpn --daemon --suppress-timestamps --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
|
||||||
|
ExecReload=/sbin/killproc -p /var/run/openvpn/%i.pid -HUP /usr/sbin/openvpn
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
35
openvpn.spec
35
openvpn.spec
@ -132,14 +132,15 @@ find contrib sample -type f -perm +100 \
|
|||||||
export CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing"
|
export CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing"
|
||||||
export LDFLAGS
|
export LDFLAGS
|
||||||
%configure \
|
%configure \
|
||||||
--enable-iproute2 \
|
--enable-iproute2 \
|
||||||
--enable-x509-alt-username \
|
--enable-x509-alt-username \
|
||||||
--enable-password-save \
|
--enable-password-save \
|
||||||
--enable-plugins \
|
--enable-systemd \
|
||||||
--enable-plugin-down-root \
|
--enable-plugins \
|
||||||
--enable-plugin-auth-pam \
|
--enable-plugin-down-root \
|
||||||
--with-lzo-headers=%_includedir/lzo \
|
--enable-plugin-auth-pam \
|
||||||
CFLAGS="$CFLAGS -fPIE $PLUGIN_DEFS" \
|
--with-lzo-headers=%_includedir/lzo \
|
||||||
|
CFLAGS="$CFLAGS -fPIE $PLUGIN_DEFS" \
|
||||||
LDFLAGS="$LDFLAGS -pie -lpam -rdynamic -Wl,-rpath,%{_libdir}/%{name}/plugin/lib"
|
LDFLAGS="$LDFLAGS -pie -lpam -rdynamic -Wl,-rpath,%{_libdir}/%{name}/plugin/lib"
|
||||||
make
|
make
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/openvpn
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/openvpn
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/openvpn
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/openvpn
|
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/openvpn
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
install -D -m 644 $RPM_SOURCE_DIR/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
|
install -D -m 644 $RPM_SOURCE_DIR/%{name}.service %{buildroot}/%{_unitdir}/%{name}@.service
|
||||||
# tmpfiles.d
|
# tmpfiles.d
|
||||||
mkdir -p %{buildroot}%{_libexecdir}/tmpfiles.d
|
mkdir -p %{buildroot}%{_libexecdir}/tmpfiles.d
|
||||||
install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
|
install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
|
||||||
@ -170,23 +171,21 @@ install -m 755 $RPM_SOURCE_DIR/client-netconfig.down sample/sample-scripts/clien
|
|||||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/{OpenVPN,%name}
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/{OpenVPN,%name}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if %{with_systemd}
|
%if ! %{with_systemd}
|
||||||
%service_add_post %{name}.service
|
#service_add_post #{name}@.service
|
||||||
%else
|
#else
|
||||||
%{?fillup_and_insserv:%fillup_and_insserv}
|
%{?fillup_and_insserv:%fillup_and_insserv}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if %{with_systemd}
|
%if ! %{with_systemd}
|
||||||
%service_del_preun %{name}.service
|
#service_del_preun #{name}@.service
|
||||||
%else
|
%else
|
||||||
%{?stop_on_removal:%stop_on_removal openvpn}
|
%{?stop_on_removal:%stop_on_removal openvpn}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if %{with_systemd}
|
%if ! %{with_systemd}
|
||||||
%service_del_postun %{name}.service
|
|
||||||
%else
|
|
||||||
%{?insserv_cleanup:%insserv_cleanup}
|
%{?insserv_cleanup:%insserv_cleanup}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -203,7 +202,7 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/{OpenVPN,%name}
|
|||||||
%doc %{_mandir}/man8/openvpn.8.gz
|
%doc %{_mandir}/man8/openvpn.8.gz
|
||||||
%config(noreplace) %{_sysconfdir}/openvpn/
|
%config(noreplace) %{_sysconfdir}/openvpn/
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}@.service
|
||||||
%{_libexecdir}/tmpfiles.d/%{name}.conf
|
%{_libexecdir}/tmpfiles.d/%{name}.conf
|
||||||
%else
|
%else
|
||||||
%config %{_sysconfdir}/init.d/openvpn
|
%config %{_sysconfdir}/init.d/openvpn
|
||||||
|
Loading…
Reference in New Issue
Block a user