From 39ebce4d44d3fc4c329a4501d501e1b2a77629fe Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 20 Mar 2017 12:55:23 -0400 Subject: [PATCH] New upstream release 5.40 - Properly mark license files - Rebase patches - Eliminate unnecessary Provides - Small spec cleanups and fixes --- .gitignore | 2 + sources | 4 +- ...hpriv.patch => stunnel-5.40-authpriv.patch | 70 ++++++++++--------- stunnel-5.40-systemd-service.patch | 17 +++++ stunnel-systemd-service.patch | 16 ----- stunnel.spec | 53 ++++++++------ stunnel@.service | 2 +- 7 files changed, 92 insertions(+), 72 deletions(-) rename stunnel-5.30-authpriv.patch => stunnel-5.40-authpriv.patch (60%) create mode 100644 stunnel-5.40-systemd-service.patch delete mode 100644 stunnel-systemd-service.patch diff --git a/.gitignore b/.gitignore index 940148b..f7b8ea6 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,5 @@ stunnel-4.33.tar.gz.asc /stunnel-5.34.tar.gz.asc /stunnel-5.35.tar.gz /stunnel-5.35.tar.gz.asc +/stunnel-5.40.tar.gz +/stunnel-5.40.tar.gz.asc diff --git a/sources b/sources index b2aee9e..d9c2f5b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9079f5fafbccaf88b7d92b227d78249a stunnel-5.35.tar.gz -dce00ebaffb9cebed636c2121e009b7d stunnel-5.35.tar.gz.asc +SHA512 (stunnel-5.40.tar.gz) = 2dd403f212f701370775516d25ea441fe41564daf1460f8a9ba4eb960adfb5f007ebfb51a90503fa168c420f06e17a6d20f1b0eab697e2abb6a42dc6f1f898b2 +SHA512 (stunnel-5.40.tar.gz.asc) = acbbf7c6deba14f178f05d4a93888da361a0ab3f5b701100ab519ff226b73ad491392f187f1264a3e510e7bf7ff3103bb3e2c79b60f3c6975feb986c16352eb5 diff --git a/stunnel-5.30-authpriv.patch b/stunnel-5.40-authpriv.patch similarity index 60% rename from stunnel-5.30-authpriv.patch rename to stunnel-5.40-authpriv.patch index bd3c344..4100df5 100644 --- a/stunnel-5.30-authpriv.patch +++ b/stunnel-5.40-authpriv.patch @@ -1,31 +1,8 @@ -diff -up stunnel-5.30/doc/stunnel.html.in.authpriv stunnel-5.30/doc/stunnel.html.in ---- stunnel-5.30/doc/stunnel.html.in.authpriv 2015-12-05 22:53:08.000000000 +0100 -+++ stunnel-5.30/doc/stunnel.html.in 2016-02-03 16:39:02.259239765 +0100 -@@ -246,7 +246,7 @@ - -

Level is one of the syslog level names or numbers emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), or debug (7). All logs for the specified level and all levels numerically less than it will be shown. Use debug = debug or debug = 7 for greatest debugging output. The default is notice (5).

- --

The syslog facility 'daemon' will be used unless a facility name is supplied. (Facilities are not supported on Win32.)

-+

The syslog facility 'authpriv' will be used unless a facility name is supplied. (Facilities are not supported on Win32.)

- -

Case is ignored for both facilities and levels.

- -diff -up stunnel-5.30/doc/stunnel.pod.in.authpriv stunnel-5.30/doc/stunnel.pod.in ---- stunnel-5.30/doc/stunnel.pod.in.authpriv 2015-12-05 22:52:36.000000000 +0100 -+++ stunnel-5.30/doc/stunnel.pod.in 2016-02-03 16:39:20.123338658 +0100 -@@ -195,7 +195,7 @@ info (6), or debug (7). All logs for th - all levels numerically less than it will be shown. Use I or - I for greatest debugging output. The default is notice (5). - --The syslog facility 'daemon' will be used unless a facility name is supplied. -+The syslog facility 'authpriv' will be used unless a facility name is supplied. - (Facilities are not supported on Win32.) - - Case is ignored for both facilities and levels. -diff -up stunnel-5.30/doc/stunnel.8.in.authpriv stunnel-5.30/doc/stunnel.8.in ---- stunnel-5.30/doc/stunnel.8.in.authpriv 2015-12-05 22:53:08.000000000 +0100 -+++ stunnel-5.30/doc/stunnel.8.in 2016-02-03 16:38:31.199067820 +0100 -@@ -207,7 +207,7 @@ info (6), or debug (7). All logs for th +diff --git a/doc/stunnel.8.in b/doc/stunnel.8.in +index a00cc78..85a0123 100644 +--- a/doc/stunnel.8.in ++++ b/doc/stunnel.8.in +@@ -204,7 +204,7 @@ info (6), or debug (7). All logs for the specified level and all levels numerically less than it will be shown. Use \fIdebug = debug\fR or \&\fIdebug = 7\fR for greatest debugging output. The default is notice (5). .Sp @@ -34,12 +11,39 @@ diff -up stunnel-5.30/doc/stunnel.8.in.authpriv stunnel-5.30/doc/stunnel.8.in (Facilities are not supported on Win32.) .Sp Case is ignored for both facilities and levels. -diff -up stunnel-5.30/src/options.c.authpriv stunnel-5.30/src/options.c ---- stunnel-5.30/src/options.c.authpriv 2016-01-15 17:45:23.000000000 +0100 -+++ stunnel-5.30/src/options.c 2016-02-03 15:07:56.309333700 +0100 -@@ -610,8 +610,12 @@ NOEXPORT char *parse_global_option(CMD c +diff --git a/doc/stunnel.html.in b/doc/stunnel.html.in +index b7a0663..6bb01cd 100644 +--- a/doc/stunnel.html.in ++++ b/doc/stunnel.html.in +@@ -244,7 +244,7 @@ + +

Level is one of the syslog level names or numbers emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), or debug (7). All logs for the specified level and all levels numerically less than it will be shown. Use debug = debug or debug = 7 for greatest debugging output. The default is notice (5).

+ +-

The syslog facility 'daemon' will be used unless a facility name is supplied. (Facilities are not supported on Win32.)

++

The syslog facility 'authpriv' will be used unless a facility name is supplied. (Facilities are not supported on Win32.)

+ +

Case is ignored for both facilities and levels.

+ +diff --git a/doc/stunnel.pod.in b/doc/stunnel.pod.in +index 42d3a33..3806b5a 100644 +--- a/doc/stunnel.pod.in ++++ b/doc/stunnel.pod.in +@@ -192,7 +192,7 @@ info (6), or debug (7). All logs for the specified level and + all levels numerically less than it will be shown. Use I or + I for greatest debugging output. The default is notice (5). + +-The syslog facility 'daemon' will be used unless a facility name is supplied. ++The syslog facility 'authpriv' will be used unless a facility name is supplied. + (Facilities are not supported on Win32.) + + Case is ignored for both facilities and levels. +diff --git a/src/options.c b/src/options.c +index 5881486..345d274 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -1554,8 +1554,12 @@ NOEXPORT char *parse_service_option(CMD cmd, SERVICE_OPTIONS *section, case CMD_BEGIN: - new_service_options.log_level=LOG_NOTICE; + section->log_level=LOG_NOTICE; #if !defined (USE_WIN32) && !defined (__vms) +#if defined(LOG_AUTHPRIV) + new_global_options.log_facility=LOG_AUTHPRIV; diff --git a/stunnel-5.40-systemd-service.patch b/stunnel-5.40-systemd-service.patch new file mode 100644 index 0000000..10ad1bb --- /dev/null +++ b/stunnel-5.40-systemd-service.patch @@ -0,0 +1,17 @@ +diff --git a/tools/stunnel.service.in b/tools/stunnel.service.in +index 53ad3e7..620a0e7 100644 +--- a/tools/stunnel.service.in ++++ b/tools/stunnel.service.in +@@ -1,10 +1,11 @@ + [Unit] + Description=TLS tunnel for network daemons +-After=syslog.target ++After=syslog.target network.target + + [Service] + ExecStart=@bindir@/stunnel + Type=forking ++PrivateTmp=true + + [Install] + WantedBy=multi-user.target diff --git a/stunnel-systemd-service.patch b/stunnel-systemd-service.patch deleted file mode 100644 index f5df2ab..0000000 --- a/stunnel-systemd-service.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urNp stunnel-5.18/tools/stunnel.service.in stunnel-5.18-patch/tools/stunnel.service.in ---- stunnel-5.18/tools/stunnel.service.in 2015-06-01 10:25:32.000000000 -0400 -+++ stunnel-5.18-patch/tools/stunnel.service.in 2015-06-22 11:30:49.156263119 -0400 -@@ -1,10 +1,11 @@ - [Unit] - Description=SSL tunnel for network daemons --After=syslog.target -+After=syslog.target network.target - - [Service] - ExecStart=@bindir@/stunnel - Type=forking -+PrivateTmp=true - - [Install] - WantedBy=multi-user.target diff --git a/stunnel.spec b/stunnel.spec index 02ed744..3edd452 100644 --- a/stunnel.spec +++ b/stunnel.spec @@ -1,7 +1,10 @@ -Summary: An SSL-encrypting socket wrapper +# Do not generate provides for private libraries +%global __provides_exclude_from ^%{_libdir}/stunnel/.*$ + +Summary: A TLS-encrypting socket wrapper Name: stunnel -Version: 5.35 -Release: 2%{?dist} +Version: 5.40 +Release: 1%{?dist} License: GPLv2 Group: Applications/Internet URL: http://www.stunnel.org/ @@ -13,12 +16,12 @@ Source4: stunnel-sfinger.conf Source5: pop3-redirect.xinetd Source6: stunnel-pop3s-client.conf Source7: stunnel@.service -Patch0: stunnel-5.30-authpriv.patch -Patch1: stunnel-systemd-service.patch +Patch0: stunnel-5.40-authpriv.patch +Patch1: stunnel-5.40-systemd-service.patch Patch2: stunnel-configure-ac.patch # util-linux is needed for rename BuildRequires: openssl-devel, pkgconfig, tcp_wrappers-devel, util-linux -BuildRequires: autoconf automake +BuildRequires: autoconf automake libtool BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2html %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 @@ -29,9 +32,10 @@ Requires(postun): systemd-units %endif %description -Stunnel is a socket wrapper which can provide SSL (Secure Sockets -Layer) support to ordinary applications. For example, it can be used -in conjunction with imapd to create an SSL secure IMAP server. +Stunnel is a socket wrapper which can provide TLS/SSL +(Transport Layer Security/Secure Sockets Layer) support +to ordinary applications. For example, it can be used in +conjunction with imapd to create a TLS secure IMAP server. %prep %setup -q @@ -40,7 +44,7 @@ in conjunction with imapd to create an SSL secure IMAP server. %patch2 -p1 %build -autoreconf +autoreconf -v CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS if pkg-config openssl ; then CFLAGS="$CFLAGS `pkg-config --cflags openssl`"; @@ -51,30 +55,32 @@ fi make V=1 LDADD="-pie -Wl,-z,defs,-z,relro,-z,now" %install -#rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +#rm -rf %{buildroot} +make install DESTDIR=%{buildroot} # Move the translated man pages to the right subdirectories, and strip off the # language suffixes. #for lang in fr pl ; do for lang in pl ; do - mkdir -p $RPM_BUILD_ROOT/%{_mandir}/${lang}/man8 - mv $RPM_BUILD_ROOT/%{_mandir}/man8/*.${lang}.8* $RPM_BUILD_ROOT/%{_mandir}/${lang}/man8/ - rename ".${lang}" "" $RPM_BUILD_ROOT/%{_mandir}/${lang}/man8/* + mkdir -p %{buildroot}/%{_mandir}/${lang}/man8 + mv %{buildroot}/%{_mandir}/man8/*.${lang}.8* %{buildroot}/%{_mandir}/${lang}/man8/ + rename ".${lang}" "" %{buildroot}/%{_mandir}/${lang}/man8/* done mkdir srpm-docs cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} srpm-docs %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 -mkdir -p $RPM_BUILD_ROOT%{_unitdir} -cp $RPM_BUILD_ROOT%{_datadir}/doc/stunnel/examples/%{name}.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service -cp %{SOURCE7} $RPM_BUILD_ROOT%{_unitdir}/%{name}@.service +mkdir -p %{buildroot}%{_unitdir} +cp %{buildroot}%{_datadir}/doc/stunnel/examples/%{name}.service %{buildroot}%{_unitdir}/%{name}.service +cp %{SOURCE7} %{buildroot}%{_unitdir}/%{name}@.service %endif %files -%doc AUTHORS BUGS ChangeLog COPY* CREDITS PORTS README TODO +%{!?_licensedir:%global license %%doc} +%doc AUTHORS BUGS ChangeLog CREDITS PORTS README TODO %doc tools/stunnel.conf-sample %doc srpm-docs/* +%license COPY* %lang(en) %doc doc/en/* -%lang(po) %doc doc/pl/* +%lang(pl) %doc doc/pl/* %{_bindir}/stunnel %exclude %{_bindir}/stunnel3 %exclude %{_datadir}/doc/stunnel @@ -106,6 +112,13 @@ cp %{SOURCE7} $RPM_BUILD_ROOT%{_unitdir}/%{name}@.service %endif %changelog +* Mon Mar 20 2017 Neal Gompa - 5.40-1 +- New upstream release 5.40 +- Properly mark license files +- Rebase patches +- Eliminate unnecessary Provides +- Small spec cleanups and fixes + * Sat Feb 11 2017 Fedora Release Engineering - 5.35-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/stunnel@.service b/stunnel@.service index ea203e5..d31ac9c 100644 --- a/stunnel@.service +++ b/stunnel@.service @@ -1,5 +1,5 @@ [Unit] -Description=SSL tunnel for %I +Description=TLS tunnel for %I After=syslog.target network.target [Service]