diff --git a/.gitignore b/.gitignore index f9c375d..2711247 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vtun-3.0.1.tar.gz /vtun-3.0.1.tar.gz /vtun-3.0.3.tar.gz +/vtun-3.0.4.tar.gz diff --git a/sources b/sources index d62f2f2..1487886 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f3becf2a0270910a841060c08d1db824 vtun-3.0.3.tar.gz +SHA512 (vtun-3.0.4.tar.gz) = b1bb7294bd745c2ca888704e2b0f8e05447b5e01bec0f921648afe363d61a19508dea9e26663993cd69c506aa92621e76f36045bddf7c3723d13a72741ca6781 diff --git a/vtun-client-sighup.patch b/vtun-client-sighup.patch deleted file mode 100644 index c67bc91..0000000 --- a/vtun-client-sighup.patch +++ /dev/null @@ -1,33 +0,0 @@ -When sending a SIGHUP to a vtun client process which is unable to connect -to the remote server, it will attempt to reconnect without sleeping between -consecutive attempts. This results in a CPU usage spike, and a flood of -data sent to syslog. -This patch causes the first sleep after SIGHUP to be discarded, then allows -sleep to be used again in subsequent iterations. -diff -NarU5 a/client.c b/client.c ---- a/client.c 2012-07-08 01:32:57.000000000 -0400 -+++ b/client.c 2016-03-21 17:17:34.111775616 -0400 -@@ -131,10 +131,11 @@ - - if( connect_t(s,(struct sockaddr *) &svr_addr, host->timeout) ){ - if (!vtun.quiet || errno != ETIMEDOUT) - vtun_syslog(LOG_INFO,"Connect to %s failed. %s(%d)", vtun.svr_name, - strerror(errno), errno); -+ client_term = 0; - } else { - if( auth_client(s, host) ){ - vtun_syslog(LOG_INFO,"Session %s[%s] opened",host->host,vtun.svr_name); - - host->rmt_fd = s; -@@ -143,10 +144,11 @@ - client_term = tunnel(host); - - vtun_syslog(LOG_INFO,"Session %s[%s] closed",host->host,vtun.svr_name); - } else { - vtun_syslog(LOG_INFO,"Connection denied by %s",vtun.svr_name); -+ client_term = 0; - } - } - close(s); - free_sopt(&host->sopt); - } diff --git a/vtun-nostrip.patch b/vtun-nostrip.patch index fb4aa65..cd07a1a 100644 --- a/vtun-nostrip.patch +++ b/vtun-nostrip.patch @@ -1,7 +1,9 @@ -diff -up vtun-3.0.3/Makefile.in~ vtun-3.0.3/Makefile.in ---- vtun-3.0.3/Makefile.in~ 2012-07-09 07:55:38.000000000 +0300 -+++ vtun-3.0.3/Makefile.in 2012-09-16 16:12:41.176283091 +0300 -@@ -99,6 +99,5 @@ install: vtund install_config install_ma +diff -NarU5 a/Makefile.in b/Makefile.in +--- a/Makefile.in 2016-10-01 17:46:00.000000000 -0400 ++++ b/Makefile.in 2017-03-17 16:49:16.195772745 -0400 +@@ -97,8 +97,7 @@ + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR) $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR) $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR) $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR) diff --git a/vtun.spec b/vtun.spec index bb1ac44..8c642de 100644 --- a/vtun.spec +++ b/vtun.spec @@ -1,6 +1,6 @@ Name: vtun -Version: 3.0.3 -Release: 16%{?dist} +Version: 3.0.4 +Release: 5%{?dist} Summary: Virtual tunnel over TCP/IP networks License: GPLv2+ Group: System Environment/Daemons @@ -10,12 +10,16 @@ Source1: vtun.socket Source2: vtun.service Source3: vtun.sysconfig Patch0: vtun-nostrip.patch -Patch1: vtun-client-sighup.patch Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units -BuildRequires: zlib-devel lzo-devel openssl-devel bison flex systemd-units autoconf +BuildRequires: zlib-devel lzo-devel bison flex systemd-units autoconf +%if 0%{?fedora} >= 26 +BuildRequires: compat-openssl10-devel +%else +BuildRequires: openssl-devel +%endif #enable PIE/PIC: %global _hardened_build 1 @@ -33,7 +37,6 @@ require modification to any kernel parts. %prep %setup -q %patch0 -p1 -%patch1 -p1 %build %{__autoconf} @@ -48,6 +51,11 @@ 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" +# tmpfiles.d configuration for /var/lock/vtund: +mkdir -p %{buildroot}/%{_tmpfilesdir} +cat > %{buildroot}/%{_tmpfilesdir}/%{name}.conf << EOT +d %{_localstatedir}/lock/vtund 0755 root root - +EOT %post %systemd_post vtun.service vtun.socket @@ -66,13 +74,30 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %{_unitdir}/vtun.socket %{_unitdir}/vtun.service %{_sbindir}/vtund +%{_tmpfilesdir}/%{name}.conf %dir %{_localstatedir}/log/vtund -%ghost %dir %{_localstatedir}/lock/vtund +%dir %{_localstatedir}/lock/vtund %{_mandir}/man5/vtund.conf.5* %{_mandir}/man8/vtun.8* %{_mandir}/man8/vtund.8* %changelog +* Sat Sep 02 2017 Gabriel Somlo 3.0.3-5 +- remove segfaulting openssl-1.1 patch; use compat-openssl10 instead + +* Sat Sep 02 2017 Gabriel Somlo 3.0.3-4 +- apply openssl-1.1 patch only on Fedora >= 26, to avoid epel7 (#1487003) + +* Thu Aug 03 2017 Fedora Release Engineering - 3.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Gabriel Somlo 3.0.3-2 +- add /usr/lib/tmpfiles.d/vtun.conf to enable lock dir. on tmpfs + +* Fri Mar 17 2017 Gabriel Somlo 3.0.3-1 +- update to 3.0.4 +- patch for openssl-1.1 transition + * Sat Feb 11 2017 Fedora Release Engineering - 3.0.3-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild