From bfa610b01a6f1053d52879af9d6547483fc7a000e171de11879324309ac88b58 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 13 Jun 2017 10:12:52 +0000 Subject: [PATCH 1/4] . OBS-URL: https://build.opensuse.org/package/show/server:mail/mailx?expand=0&rev=54 --- mailx-12.5-openssl-1.1.0f.patch | 26 ++++++++++++++++++++++++-- mailx.spec | 1 + 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/mailx-12.5-openssl-1.1.0f.patch b/mailx-12.5-openssl-1.1.0f.patch index 979fef1..83c985e 100644 --- a/mailx-12.5-openssl-1.1.0f.patch +++ b/mailx-12.5-openssl-1.1.0f.patch @@ -1,9 +1,31 @@ --- + mailx.1 | 5 +++++ openssl.c | 29 ++++++++++++++++++++++++++--- - 1 file changed, 26 insertions(+), 3 deletions(-) + 2 files changed, 31 insertions(+), 3 deletions(-) +--- mailx.1 ++++ mailx.1 2017-06-13 10:10:21.024015088 +0000 +@@ -2723,6 +2723,8 @@ Only applicable if SSL/TLS support is bu + Accept SSLv2 connections. + These are normally not allowed + because this protocol version is insecure. ++.br ++.B WARNING: on modern systems SSLv2 as well as SSLv3 are deprecated! + .TP + .B stealthmua + Inhibits the generation of +@@ -3609,6 +3611,9 @@ for a specific account. + Gives the pathname to an entropy daemon socket, + see + .IR RAND_egd (3). ++.br ++.B WARNING: On Linux this API is ignored, use the string option ++.B ssl-rand-file. + .TP + .B ssl-rand-file + Gives the pathname to a file with entropy data, --- openssl.c -+++ openssl.c 2017-06-12 12:57:43.048652634 +0200 ++++ openssl.c 2017-06-13 10:05:15.133697760 +0000 @@ -138,7 +138,12 @@ ssl_rand_init(void) if ((cp = value("ssl-rand-egd")) != NULL) { diff --git a/mailx.spec b/mailx.spec index 8970f29..db1f0b7 100644 --- a/mailx.spec +++ b/mailx.spec @@ -79,6 +79,7 @@ minor enhancements like the ability to set a "From:" address. %patch11 -p1 -b .0003 %patch12 -p1 -b .0004 %patch13 -p0 -b .ssl11f +exit 1 %patch -p1 -b .0 %build From dc0dde244ea76a3f11d5dd54504b4654ed096eb5d7a06b1734c316a2846e1418 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 13 Jun 2017 11:15:26 +0000 Subject: [PATCH 2/4] . OBS-URL: https://build.opensuse.org/package/show/server:mail/mailx?expand=0&rev=55 --- mailx.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/mailx.spec b/mailx.spec index db1f0b7..8970f29 100644 --- a/mailx.spec +++ b/mailx.spec @@ -79,7 +79,6 @@ minor enhancements like the ability to set a "From:" address. %patch11 -p1 -b .0003 %patch12 -p1 -b .0004 %patch13 -p0 -b .ssl11f -exit 1 %patch -p1 -b .0 %build From d17def138a962135bc006e14bb965bbb2ae305cd7430fa687b4f41126132bae9 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 7 Jun 2018 09:36:47 +0000 Subject: [PATCH 3/4] update-alternatives OBS-URL: https://build.opensuse.org/package/show/server:mail/mailx?expand=0&rev=57 --- mailx.changes | 6 ++++++ mailx.spec | 26 +++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/mailx.changes b/mailx.changes index 8f35066..e6ee89a 100644 --- a/mailx.changes +++ b/mailx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 7 09:35:26 UTC 2018 - werner@suse.de + +- Use update-alternatives to allow an other package like mailutils + to provide /usr/bin/mail as well + ------------------------------------------------------------------- Mon Jun 12 11:11:38 UTC 2017 - werner@suse.de diff --git a/mailx.spec b/mailx.spec index 8970f29..851173b 100644 --- a/mailx.spec +++ b/mailx.spec @@ -1,7 +1,7 @@ # # spec file for package mailx # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,14 +24,17 @@ BuildRequires: openssl-devel BuildRequires: pcre BuildRequires: pkg-config BuildRequires: postfix +BuildRequires: update-alternatives BuildRequires: pkgconfig(openssl) +Requires(post): update-alternatives +Requires(preun): update-alternatives Url: http://heirloom.sourceforge.net/mailx.html Provides: mail Recommends: smtp_daemon Version: 12.5 Release: 0 Summary: A MIME-Capable Implementation of the mailx Command -License: BSD-4-Clause and MPL-1.1 +License: BSD-4-Clause AND MPL-1.1 Group: Productivity/Networking/Email/Utilities Source: mailx-%{version}.tar.bz2 Patch: mailx-%{version}.dif @@ -105,11 +108,28 @@ minor enhancements like the ability to set a "From:" address. %clean rm -rf $RPM_BUILD_ROOT +%post +%{_sbindir}/update-alternatives --quiet --force \ + --install %{_bindir}/mail mail %{_bindir}/mailx 20 \ + --slave /bin/mail binmail %{_bindir}/mailx \ + --slave %{_bindir}/Mail Mail %{_bindir}/mailx \ + --slave %{_mandir}/man1/mail.1%{?ext_man} mail.1%{?ext_man} %{_mandir}/man1/mailx.1%{?ext_man} \ + --slave %{_mandir}/man1/Mail.1%{?ext_man} Mail.1%{?ext_man} %{_mandir}/man1/mailx.1%{?ext_man} + +%preun +%{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mu-mail + %files %defattr(-,root,root) -%doc COPYING README manual.ps.gz nail.rc +%license COPYING +%doc README manual.ps.gz nail.rc /bin/mail %config /etc/mail.rc +%ghost %config %{_sysconfdir}/alternatives/binmail +%ghost %config %{_sysconfdir}/alternatives/Mail +%ghost %config %{_sysconfdir}/alternatives/mail +%ghost %config %{_sysconfdir}/alternatives/Mail.1%{?ext_man} +%ghost %config %{_sysconfdir}/alternatives/mail.1%{?ext_man} /usr/bin/Mail /usr/bin/mail /usr/bin/mailx From 7a619d980eead5bc26c3a17ea39413cf6cbb8c76d0701c2b96b6bccd7a836343 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 11 Jun 2018 09:52:20 +0000 Subject: [PATCH 4/4] Accepting request 615839 from home:jengelh:branches:server:mail - Remove redundant %clean section. - Replace old $RPM_* shell vars by macros. OBS-URL: https://build.opensuse.org/request/show/615839 OBS-URL: https://build.opensuse.org/package/show/server:mail/mailx?expand=0&rev=58 --- mailx.changes | 6 ++++++ mailx.spec | 27 ++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/mailx.changes b/mailx.changes index e6ee89a..49baa28 100644 --- a/mailx.changes +++ b/mailx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jun 10 23:54:07 UTC 2018 - jengelh@inai.de + +- Remove redundant %clean section. +- Replace old $RPM_* shell vars by macros. + ------------------------------------------------------------------- Thu Jun 7 09:35:26 UTC 2018 - werner@suse.de diff --git a/mailx.spec b/mailx.spec index 851173b..40a1bc2 100644 --- a/mailx.spec +++ b/mailx.spec @@ -86,27 +86,24 @@ minor enhancements like the ability to set a "From:" address. %build CC=gcc - CFLAGS="${RPM_OPT_FLAGS} -pipe -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN $(pkg-config --cflags openssl)" + CFLAGS="%{optflags} -pipe -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN $(pkg-config --cflags openssl)" export CC CFLAGS $SHELL ./makeconfig - make %{?jobs:-j%jobs} PREFIX=/usr CC="$CC" CFLAGS="$CFLAGS" + make %{?_smp_mflags} PREFIX=/usr CC="$CC" CFLAGS="$CFLAGS" tbl < mailx.1 | groff -mandocdb -Tps | grep -v %%%%CreationDate > manual.ps gzip -9fn manual.ps %install - make install PREFIX=/usr DESTDIR=${RPM_BUILD_ROOT} - rm -rf ${RPM_BUILD_ROOT}/bin - mkdir ${RPM_BUILD_ROOT}/bin - ln -sf ../usr/bin/mailx ${RPM_BUILD_ROOT}/bin/mail - ln -sf mailx ${RPM_BUILD_ROOT}/usr/bin/Mail - ln -sf mailx ${RPM_BUILD_ROOT}/usr/bin/mail - ln -sf mailx.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/Mail.1.gz - ln -sf mailx.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/mail.1.gz - install -m 0644 mail.rc ${RPM_BUILD_ROOT}/etc - mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name} - -%clean - rm -rf $RPM_BUILD_ROOT + %make_install PREFIX=/usr + rm -rf %{buildroot}/bin + mkdir %{buildroot}/bin + ln -sf ../usr/bin/mailx %{buildroot}/bin/mail + ln -sf mailx %{buildroot}/usr/bin/Mail + ln -sf mailx %{buildroot}/usr/bin/mail + ln -sf mailx.1.gz %{buildroot}%{_mandir}/man1/Mail.1.gz + ln -sf mailx.1.gz %{buildroot}%{_mandir}/man1/mail.1.gz + install -m 0644 mail.rc %{buildroot}/etc + mkdir -p %{buildroot}%{_defaultdocdir}/%{name} %post %{_sbindir}/update-alternatives --quiet --force \