From 2b989876bd80a34fd50aa47e7d7034140181ff84 Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Sat, 15 Nov 2014 23:29:59 -0500 Subject: [PATCH 1/3] added /etc/sysconfig/vtun environment file; updated unit files --- vtun.service | 13 ++++++++++--- vtun.socket | 1 - vtun.spec | 19 ++++++++++++++++--- vtun.sysconfig | 16 ++++++++++++++++ 4 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 vtun.sysconfig 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 31a58ac..38e46ec 100644 --- a/vtun.spec +++ b/vtun.spec @@ -1,6 +1,6 @@ Name: vtun Version: 3.0.3 -Release: 6%{?dist} +Release: 9%{?dist} Summary: Virtual tunnel over TCP/IP networks License: GPLv2+ Group: System Environment/Daemons @@ -8,6 +8,7 @@ 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 @@ -40,6 +41,7 @@ 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 @@ -55,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 @@ -65,10 +68,20 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %{_mandir}/man8/vtund.8* %changelog +* Fri Nov 14 2014 Gabriel Somlo 3.0.3-9 +- added /etc/sysconfig/vtun environment file +- updated unit files + +* Mon Aug 18 2014 Fedora Release Engineering - 3.0.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.0.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun Aug 04 2013 Fedora Release Engineering - 3.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild -* Mon May 13 2013 Gabriel Somlo 2.0.5-5 +* Mon May 13 2013 Gabriel Somlo 3.0.3-5 - added autoconf step to support aarch64 (#926708) * Wed May 01 2013 Gabriel Somlo 3.0.3-4 @@ -106,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 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 - 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' From f55630984085b3f9236cc3ddc3de0f1f80ce183c Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Thu, 20 Nov 2014 17:15:58 -0500 Subject: [PATCH 2/3] enhanced service file (don't daemonize vtund) --- vtun.service | 3 +-- vtun.spec | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vtun.service b/vtun.service index edf21da..a9e6aca 100644 --- a/vtun.service +++ b/vtun.service @@ -3,9 +3,8 @@ Description=Virtual Tunnels over TCP/IP networks After=syslog.target network.target [Service] -Type=forking EnvironmentFile=/etc/sysconfig/vtun -ExecStart=/usr/sbin/vtund $OPTIONS +ExecStart=/usr/sbin/vtund -n $OPTIONS ExecReload=/usr/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure diff --git a/vtun.spec b/vtun.spec index 38e46ec..a091433 100644 --- a/vtun.spec +++ b/vtun.spec @@ -1,6 +1,6 @@ Name: vtun Version: 3.0.3 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Virtual tunnel over TCP/IP networks License: GPLv2+ Group: System Environment/Daemons @@ -68,6 +68,9 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %{_mandir}/man8/vtund.8* %changelog +* Thu Nov 20 2014 Gabriel Somlo 3.0.3-10 +- enhanced service file (-n to prevent daemonizing vtund) + * Fri Nov 14 2014 Gabriel Somlo 3.0.3-9 - added /etc/sysconfig/vtun environment file - updated unit files From 055524ee689f43503f513abb237f067dcb1c81ef Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Tue, 23 Dec 2014 00:10:24 -0500 Subject: [PATCH 3/3] enhanced service file (remove "KillMode", use default "cgroup" mode) --- vtun.service | 1 - vtun.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vtun.service b/vtun.service index a9e6aca..d26d83c 100644 --- a/vtun.service +++ b/vtun.service @@ -6,7 +6,6 @@ After=syslog.target network.target EnvironmentFile=/etc/sysconfig/vtun ExecStart=/usr/sbin/vtund -n $OPTIONS ExecReload=/usr/bin/kill -HUP $MAINPID -KillMode=process Restart=on-failure [Install] diff --git a/vtun.spec b/vtun.spec index a091433..102d8c3 100644 --- a/vtun.spec +++ b/vtun.spec @@ -1,6 +1,6 @@ Name: vtun Version: 3.0.3 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Virtual tunnel over TCP/IP networks License: GPLv2+ Group: System Environment/Daemons @@ -68,6 +68,9 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %{_mandir}/man8/vtund.8* %changelog +* Tue Dec 23 2014 Gabriel Somlo 3.0.3-11 +- enhanced service file (remove "KillMode", use default "cgroup" mode) + * Thu Nov 20 2014 Gabriel Somlo 3.0.3-10 - enhanced service file (-n to prevent daemonizing vtund)