[vtun/el6] added /etc/sysconfig/vtun environment file; updated unit files

Gabriel L. Somlo somlo at fedoraproject.org
Sun Nov 16 04:30:13 UTC 2014


commit d9d88a92e11be5acb33889ec4ea9f914c36ba2e4
Author: Gabriel L. Somlo <somlo at cmu.edu>
Date:   Sat Nov 15 23:30:11 2014 -0500

    added /etc/sysconfig/vtun environment file; updated unit files

 vtun.service   |   13 ++++++++++---
 vtun.socket    |    1 -
 vtun.spec      |   31 +++++++++++++++++++++++++++----
 vtun.sysconfig |   16 ++++++++++++++++
 4 files changed, 53 insertions(+), 8 deletions(-)
---
diff --git a/vtun.service b/vtun.service
index d872e6f..edf21da 100644
--- a/vtun.service
+++ b/vtun.service
@@ -1,7 +1,14 @@
 [Unit]
 Description=Virtual Tunnels over TCP/IP networks
-After=local-fs.target
+After=syslog.target network.target
 
 [Service]
-ExecStart=/usr/sbin/vtund -i 
-StandardInput=socket
+Type=forking
+EnvironmentFile=/etc/sysconfig/vtun
+ExecStart=/usr/sbin/vtund $OPTIONS
+ExecReload=/usr/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vtun.socket b/vtun.socket
index 0dd22f9..07f9d3d 100644
--- a/vtun.socket
+++ b/vtun.socket
@@ -3,7 +3,6 @@ Description=Vtun Activation Socket
 
 [Socket]
 ListenStream=5000
-Accept=true
 
 [Install]
 WantedBy=sockets.target
diff --git a/vtun.spec b/vtun.spec
index a66c301..38e46ec 100644
--- a/vtun.spec
+++ b/vtun.spec
@@ -1,6 +1,6 @@
 Name: vtun
 Version: 3.0.3
-Release: 3%{?dist}
+Release: 9%{?dist}
 Summary: Virtual tunnel over TCP/IP networks
 License: GPLv2+
 Group: System Environment/Daemons
@@ -8,12 +8,13 @@ Url: http://vtun.sourceforge.net
 Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Source1: vtun.socket
 Source2: vtun.service
+Source3: vtun.sysconfig
 Patch0: vtun-nostrip.patch
 
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
-BuildRequires: zlib-devel lzo-devel openssl-devel bison flex systemd-units
+BuildRequires: zlib-devel lzo-devel openssl-devel bison flex systemd-units autoconf
 
 #enable PIE/PIC:
 %global _hardened_build 1
@@ -33,12 +34,14 @@ require modification to any kernel parts.
 %patch0 -p1
 
 %build
+%{__autoconf}
 %configure
 make %{?_smp_mflags}
 
 %install
 install -D -m 0644 -p %{SOURCE1} %{buildroot}/%{_unitdir}/vtun.socket
 install -D -m 0644 -p %{SOURCE2} %{buildroot}/%{_unitdir}/vtun.service
+install -D -m 0644 -p %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/vtun
 make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p"
 
 %post
@@ -54,6 +57,7 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p"
 %defattr(-,root,root,-)
 %doc ChangeLog Credits FAQ README README.LZO README.Setup README.Shaper TODO vtund.conf
 %config(noreplace) %{_sysconfdir}/vtund.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/vtun
 %{_unitdir}/vtun.socket
 %{_unitdir}/vtun.service
 %{_sbindir}/vtund
@@ -64,9 +68,28 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p"
 %{_mandir}/man8/vtund.8*
 
 %changelog
-* Wed May 01 2013 Gabriel Somlo <somlo at cmu.edu> 3.0.3-3
+* Fri Nov 14 2014 Gabriel Somlo <somlo at cmu.edu> 3.0.3-9
+- added /etc/sysconfig/vtun environment file
+- updated unit files
+
+* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.3-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.3-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.3-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Mon May 13 2013 Gabriel Somlo <somlo at cmu.edu> 3.0.3-5
+- added autoconf step to support aarch64 (#926708)
+
+* Wed May 01 2013 Gabriel Somlo <somlo at cmu.edu> 3.0.3-4
 - rebuild with PIE (#955286)
 
+* Fri Feb 15 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> 
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
 * Sun Sep 16 2012 Gabriel Somlo <somlo at cmu.edu> 3.0.3-2
 - avoid stripping too early to preserve debuginfo (#857716)
 
@@ -96,7 +119,7 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p"
 - add support for systemd (#661331)
 
 * Tue Nov 30 2010 Gabriel Somlo <somlo at cmu.edu> 3.0.1-8
-- using %ghost on /var/lock/vtund directory (#656720)
+- using ghost on /var/lock/vtund directory (#656720)
 
 * Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 3.0.1-7
 - rebuilt with new openssl
diff --git a/vtun.sysconfig b/vtun.sysconfig
new file mode 100644
index 0000000..467bd8b
--- /dev/null
+++ b/vtun.sysconfig
@@ -0,0 +1,16 @@
+# Comment out one of the following for client or server mode
+#
+# To run vtun as a server:
+#
+#OPTIONS='-s'
+#
+#
+#
+#To run vtun as a client, we need:
+#
+#  - session name, e.g. "lion"; must be present in both client and server
+#    config files.
+#
+#  - server address or host name.
+#
+#OPTIONS='lion vtun-server.example.com'


More information about the scm-commits mailing list