The package rpms/botan2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/botan2.git/commit/?id=f2ee753acb4...
https://src.fedoraproject.org/cgit/rpms/botan2.git/commit/?id=48e0faaecec....
Change:
-ExcludeArch: ppc64le
+ExcludeArch: ppc64le
Thanks.
Full change:
============
commit 89ce07cbfb926372d17f8d16beb95e36407724da
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Mon Mar 19 17:19:03 2018 +0100
Update empty patch file with the real patch contents.
diff --git a/botan2.spec b/botan2.spec
index eb7cd4c..4dd9cb5 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -144,6 +144,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Mon Mar 19 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-9
+- Update empty patch file with the real patch contents.
+
* Sat Mar 17 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-8
- Add patch to fix test suite failures on ppc64le (see gh#1498).
- Add patch to fix test suite if SIMD instructions are not available (see gh#1495).
diff --git a/fix-testsuite-on-non-SIMD-machines.patch
b/fix-testsuite-on-non-SIMD-machines.patch
index e69de29..73ed106 100644
--- a/fix-testsuite-on-non-SIMD-machines.patch
+++ b/fix-testsuite-on-non-SIMD-machines.patch
@@ -0,0 +1,45 @@
+From 4d5fa7a0f30d0d62341be8488c807ccf9fc4f308 Mon Sep 17 00:00:00 2001
+From: Jack Lloyd <jack(a)randombit.net>
+Date: Sat, 17 Mar 2018 11:54:52 -0400
+Subject: [PATCH] Avoid calling run() on SIMD tests if SIMD instructions not
+ available.
+
+Problem is the same flag that enables the intrinsics also gives the
+compiler a free hand to emit same instructions for everything including
+function preambles. So on systems without SSE2/NEON/etc, even jumping
+to the test briefly causes a crash because GCC emits SIMD instructions
+for things other than our intrinsics.
+
+GH #1495
+---
+ src/tests/test_runner.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/tests/test_runner.cpp b/src/tests/test_runner.cpp
+index 321a1e1..65206b4 100644
+--- a/src/tests/test_runner.cpp
++++ b/src/tests/test_runner.cpp
+@@ -10,6 +10,7 @@
+ #include <botan/version.h>
+ #include <botan/rotate.h>
+ #include <botan/loadstor.h>
++#include <botan/cpuid.h>
+
+ namespace Botan_Tests {
+
+@@ -249,7 +250,11 @@ size_t Test_Runner::run_tests(const
std::vector<std::string>& tests_to_run,
+
+ try
+ {
+- if(Test* test = Test::get_test(test_name))
++ if(test_name == "simd_32" && Botan::CPUID::has_simd_32() ==
false)
++ {
++ results.push_back(Test::Result::Note(test_name, "SIMD not available on
this platform"));
++ }
++ else if(Test* test = Test::get_test(test_name))
+ {
+ std::vector<Test::Result> test_results = test->run();
+ results.insert(results.end(), test_results.begin(), test_results.end());
+--
+2.9.5
+
commit 6072734e203e522d8a4ddb902e150b5fddc044f4
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Sat Mar 17 18:41:14 2018 +0100
Add patch to fix test suite if SIMD instructions are not available (see gh#1495).
diff --git a/botan2.spec b/botan2.spec
index 6164e93..eb7cd4c 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -12,6 +12,7 @@ Patch0: 01-remove-rpath-gcc.patch
Patch1: put-isa-flags-after-cxxflags.patch
Patch2: python-try-sonames.patch
Patch3: avoid-problematic-altivec-construct.patch
+Patch4: fix-testsuite-on-non-SIMD-machines.patch
BuildRequires: gcc-c++
BuildRequires: python3
@@ -68,8 +69,10 @@ This package contains the Python3 binding for %{name}.
%patch1 -p1
# see gh#1497, backported commits ab87904, 5a0598b
%patch2 -p1
-# see gh#1498, backported commit 0ebad38
+# see gh#1498, backported and updated commit 0ebad38
%patch3 -p1
+# follow-up for gh#1495, backported commit b19cc5c
+%patch4 -p1
%build
@@ -143,6 +146,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
* Sat Mar 17 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-8
- Add patch to fix test suite failures on ppc64le (see gh#1498).
+- Add patch to fix test suite if SIMD instructions are not available (see gh#1495).
* Thu Mar 15 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-7
- Add patch to the Python module, supporting loading via
diff --git a/fix-testsuite-on-non-SIMD-machines.patch
b/fix-testsuite-on-non-SIMD-machines.patch
new file mode 100644
index 0000000..e69de29
commit f2ee753acb4a60d7504b1330325220e6905fe6e9
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Sat Mar 17 18:38:59 2018 +0100
Add patch to fix test suite failures on ppc64le (see gh#1498).
diff --git a/avoid-problematic-altivec-construct.patch
b/avoid-problematic-altivec-construct.patch
new file mode 100644
index 0000000..4bd108f
--- /dev/null
+++ b/avoid-problematic-altivec-construct.patch
@@ -0,0 +1,35 @@
+From f53d7593801544f6167514eba9755216eb836d84 Mon Sep 17 00:00:00 2001
+From: Jack Lloyd <jack(a)randombit.net>
+Date: Fri, 16 Mar 2018 12:47:13 -0400
+Subject: [PATCH] Avoid a problematic construct for AltiVec byteswap
+
+Seems to cause problems with GCC 8 on ppc64le. GH #1498
+---
+ src/lib/utils/simd/simd_32.h | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/utils/simd/simd_32.h b/src/lib/utils/simd/simd_32.h
+index d9a41c8..efa0006 100644
+--- a/src/lib/utils/simd/simd_32.h
++++ b/src/lib/utils/simd/simd_32.h
+@@ -593,9 +593,14 @@ class SIMD_4x32 final
+
+ #elif defined(BOTAN_SIMD_USE_ALTIVEC)
+
+- __vector unsigned char perm = vec_lvsl(0,
static_cast<uint32_t*>(nullptr));
+- perm = vec_xor(perm, vec_splat_u8(3));
+- return SIMD_4x32(vec_perm(m_vmx, m_vmx, perm));
++ union {
++ __vector unsigned int V;
++ uint32_t R[4];
++ } vec;
++
++ vec.V = m_vmx;
++ bswap_4(vec.R);
++ return SIMD_4x32(vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
+
+ #elif defined(BOTAN_SIMD_USE_NEON)
+
+--
+2.9.5
+
diff --git a/botan2.spec b/botan2.spec
index eade832..6164e93 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -11,8 +11,8 @@ Source0:
https://botan.randombit.net/releases/Botan-%{version}.tgz
Patch0: 01-remove-rpath-gcc.patch
Patch1: put-isa-flags-after-cxxflags.patch
Patch2: python-try-sonames.patch
+Patch3: avoid-problematic-altivec-construct.patch
-ExcludeArch: ppc64le
BuildRequires: gcc-c++
BuildRequires: python3
BuildRequires: python3-devel
@@ -68,6 +68,8 @@ This package contains the Python3 binding for %{name}.
%patch1 -p1
# see gh#1497, backported commits ab87904, 5a0598b
%patch2 -p1
+# see gh#1498, backported commit 0ebad38
+%patch3 -p1
%build
@@ -139,6 +141,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Sat Mar 17 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-8
+- Add patch to fix test suite failures on ppc64le (see gh#1498).
+
* Thu Mar 15 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-7
- Add patch to the Python module, supporting loading via
libbotan-2.so.X.
commit e79ea6de8f229e9d7eff3b2c53ef8a3d94b62679
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Thu Mar 15 22:35:34 2018 +0100
Add patch to the Python module, supporting loading via libbotan-2.so.X.
diff --git a/botan2.spec b/botan2.spec
index 710b34e..eade832 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -10,6 +10,7 @@ URL:
https://botan.randombit.net/
Source0:
https://botan.randombit.net/releases/Botan-%{version}.tgz
Patch0: 01-remove-rpath-gcc.patch
Patch1: put-isa-flags-after-cxxflags.patch
+Patch2: python-try-sonames.patch
ExcludeArch: ppc64le
BuildRequires: gcc-c++
@@ -65,6 +66,8 @@ This package contains the Python3 binding for %{name}.
%patch0 -p0
# see gh#1495
%patch1 -p1
+# see gh#1497, backported commits ab87904, 5a0598b
+%patch2 -p1
%build
@@ -136,6 +139,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Thu Mar 15 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-7
+- Add patch to the Python module, supporting loading via
+ libbotan-2.so.X.
+
* Thu Mar 15 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-6
- Set CXXFLAGS before calling configure.py.
- Patch for building on armv7hl (see gh#1495).
diff --git a/python-try-sonames.patch b/python-try-sonames.patch
new file mode 100644
index 0000000..11b7ee8
--- /dev/null
+++ b/python-try-sonames.patch
@@ -0,0 +1,63 @@
+From f4cc62c9c46e02715563faa5c86bafbe59429c42 Mon Sep 17 00:00:00 2001
+From: Jack Lloyd <jack(a)randombit.net>
+Date: Thu, 15 Mar 2018 15:29:56 -0400
+Subject: [PATCH] In Python module support loading via libbotan-2.so.X soname
+
+Needed for distros that ship the main library symlink in the dev package.
+
+GH #1497
+---
+ src/python/botan2.py | 29 ++++++++++++++++++++++-------
+ 1 file changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/src/python/botan2.py b/src/python/botan2.py
+index 7007194..2ec0f98 100755
+--- a/src/python/botan2.py
++++ b/src/python/botan2.py
+@@ -17,7 +17,7 @@ versions of Botan >= 2.0
+ """
+
+ import sys
+-from ctypes import CDLL, POINTER, byref, c_void_p, c_size_t, c_uint32, c_char, c_char_p,
create_string_buffer
++from ctypes import CDLL, POINTER, byref, c_void_p, c_size_t, c_uint32, c_int, c_char,
c_char_p, create_string_buffer
+ from binascii import hexlify, unhexlify, b2a_base64
+ from datetime import datetime
+ import time
+@@ -33,13 +33,28 @@ class BotanException(Exception):
+ #
+ # Module initialization
+ #
+-if sys.platform == 'darwin':
+- botan = CDLL('libbotan-2.dylib') # pylint: disable=invalid-name
+-else:
+- botan = CDLL('libbotan-2.so') # pylint: disable=invalid-name
+
+-if botan.botan_ffi_supports_api(20151015) is False:
+- raise BotanException("The Botan library does not support the FFI API expected
by this version of the Python module")
++def load_botan_dll(expected_version):
++
++ possible_dll_names = ['libbotan-2.dylib', 'libbotan-2.so'] + \
++ ['libbotan-2.so.%d' % (v) for v in reversed(range(0,
16))]
++
++ for dll_name in possible_dll_names:
++ try:
++ dll = CDLL(dll_name)
++ dll.botan_ffi_supports_api.argtypes = [c_uint32]
++ dll.botan_ffi_supports_api.restype = c_int
++ if dll.botan_ffi_supports_api(expected_version) == 0:
++ return dll
++ except OSError:
++ pass
++
++ return None
++
++botan = load_botan_dll(20150515) # pylint: disable=invalid-name
++
++if botan is None:
++ raise BotanException("Could not find a usable Botan shared object
library")
+
+ #
+ # Internal utilities
+--
+2.9.5
+
commit 897546d82f4897d4e37a0879eec6a9f00d202397
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Thu Mar 15 19:38:25 2018 +0100
Switch to %%ldconfig_scriptlets.
diff --git a/botan2.spec b/botan2.spec
index b7e780d..710b34e 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -85,6 +85,7 @@ export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
--with-sphinx \
--with-rst2man \
--distribution-info=$(cat /etc/os-release | grep ^NAME= | sed
's/NAME=//g') \
+ --disable-static-library \
--with-debug-info
%make_build
@@ -99,10 +100,7 @@ mv %{buildroot}%{_docdir}/botan-%{version} %{buildroot}%{_pkgdocdir}
rm -r %{buildroot}%{_pkgdocdir}/manual/{.doctrees,.buildinfo}
-%post -p /sbin/ldconfig
-
-
-%postun -p /sbin/ldconfig
+%ldconfig_scriptlets
%files
@@ -117,7 +115,6 @@ rm -r %{buildroot}%{_pkgdocdir}/manual/{.doctrees,.buildinfo}
%files devel
%license license.txt
%{_includedir}/*
-%exclude %{_libdir}/libbotan-%{major_version}.a
%{_libdir}/libbotan-%{major_version}.so
%{_libdir}/pkgconfig/botan-%{major_version}.pc
@@ -145,6 +142,8 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
- Make dependency on rst2man explicit.
- Don't use Python2 at all.
- Remove shebang from botan2.py.
+- Don't build a static library.
+- Switch to %%ldconfig_scriptlets.
* Tue Mar 13 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 2.4.0-5
- Update Python 2 dependency declarations to new packaging standards
commit 74e5a7b01fb76a56da97f2d4876b2683e94d295b
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Thu Mar 15 19:32:49 2018 +0100
Don't use Python2 at all.
Remove shebang from botan2.py.
diff --git a/02-fix-wrong-script-interpreter.patch
b/02-fix-wrong-script-interpreter.patch
deleted file mode 100644
index 6b6cc2b..0000000
--- a/02-fix-wrong-script-interpreter.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git src/python/botan2.py src/python/botan2.py
-index 6d1ee25fe..70534d5a5 100755
---- src/python/botan2.py
-+++ src/python/botan2.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- """
- Python wrapper of the botan crypto library
diff --git a/botan2.spec b/botan2.spec
index 9afea15..b7e780d 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -9,14 +9,13 @@ License: BSD
URL:
https://botan.randombit.net/
Source0:
https://botan.randombit.net/releases/Botan-%{version}.tgz
Patch0: 01-remove-rpath-gcc.patch
-Patch1: 02-fix-wrong-script-interpreter.patch
-Patch2: put-isa-flags-after-cxxflags.patch
+Patch1: put-isa-flags-after-cxxflags.patch
ExcludeArch: ppc64le
BuildRequires: gcc-c++
-BuildRequires: python2
-BuildRequires: python2-sphinx
+BuildRequires: python3
BuildRequires: python3-devel
+BuildRequires: %{_bindir}/sphinx-build
BuildRequires: %{_bindir}/rst2man
BuildRequires: bzip2-devel
BuildRequires: zlib-devel
@@ -64,9 +63,8 @@ This package contains the Python3 binding for %{name}.
%prep
%setup -q -n Botan-%{version}
%patch0 -p0
-%patch1 -p0
# see gh#1495
-%patch2 -p1
+%patch1 -p1
%build
@@ -75,7 +73,7 @@ export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
# we have the necessary prerequisites, so enable optional modules
%global enable_modules bzip2,zlib,openssl
-./configure.py \
+%{__python3} ./configure.py \
--prefix=%{_prefix} \
--libdir=%{_lib} \
--docdir=%{_docdir} \
@@ -94,7 +92,7 @@ export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
%install
make install DESTDIR=%{buildroot}
-chmod 755 %{buildroot}%{python3_sitearch}/botan2.py
+sed -e '1{/^#!/d}' -i %{buildroot}%{python3_sitearch}/botan2.py
# doc installation fixups
mv %{buildroot}%{_docdir}/botan-%{version} %{buildroot}%{_pkgdocdir}
@@ -145,6 +143,8 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
- Set CXXFLAGS before calling configure.py.
- Patch for building on armv7hl (see gh#1495).
- Make dependency on rst2man explicit.
+- Don't use Python2 at all.
+- Remove shebang from botan2.py.
* Tue Mar 13 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 2.4.0-5
- Update Python 2 dependency declarations to new packaging standards
commit a7fdd74088e90ba4088b3cb5e7654e0332a8f8d8
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Thu Mar 15 19:30:13 2018 +0100
Make dependency on rst2man explicit.
diff --git a/botan2.spec b/botan2.spec
index ebabe9e..9afea15 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -17,6 +17,7 @@ BuildRequires: gcc-c++
BuildRequires: python2
BuildRequires: python2-sphinx
BuildRequires: python3-devel
+BuildRequires: %{_bindir}/rst2man
BuildRequires: bzip2-devel
BuildRequires: zlib-devel
BuildRequires: openssl-devel
@@ -84,6 +85,7 @@ export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
--enable-modules=%{enable_modules} \
--with-python-version=%{python3_version} \
--with-sphinx \
+ --with-rst2man \
--distribution-info=$(cat /etc/os-release | grep ^NAME= | sed
's/NAME=//g') \
--with-debug-info
@@ -142,6 +144,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
* Thu Mar 15 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-6
- Set CXXFLAGS before calling configure.py.
- Patch for building on armv7hl (see gh#1495).
+- Make dependency on rst2man explicit.
* Tue Mar 13 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 2.4.0-5
- Update Python 2 dependency declarations to new packaging standards
commit 9c37fc9601eb1f5714a93d54c29502b94f15c92f
Author: Thomas Moschny <thm(a)fedoraproject.org>
Date: Thu Mar 15 19:28:23 2018 +0100
Set CXXFLAGS before calling configure.py.
diff --git a/botan2.spec b/botan2.spec
index 4a3d86d..ebabe9e 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -10,6 +10,7 @@ URL:
https://botan.randombit.net/
Source0:
https://botan.randombit.net/releases/Botan-%{version}.tgz
Patch0: 01-remove-rpath-gcc.patch
Patch1: 02-fix-wrong-script-interpreter.patch
+Patch2: put-isa-flags-after-cxxflags.patch
ExcludeArch: ppc64le
BuildRequires: gcc-c++
@@ -63,8 +64,13 @@ This package contains the Python3 binding for %{name}.
%setup -q -n Botan-%{version}
%patch0 -p0
%patch1 -p0
+# see gh#1495
+%patch2 -p1
+
%build
+export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
+
# we have the necessary prerequisites, so enable optional modules
%global enable_modules bzip2,zlib,openssl
@@ -133,6 +139,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Thu Mar 15 2018 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.4.0-6
+- Set CXXFLAGS before calling configure.py.
+- Patch for building on armv7hl (see gh#1495).
+
* Tue Mar 13 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 2.4.0-5
- Update Python 2 dependency declarations to new packaging standards
(See
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
diff --git a/put-isa-flags-after-cxxflags.patch b/put-isa-flags-after-cxxflags.patch
new file mode 100644
index 0000000..49cdd8b
--- /dev/null
+++ b/put-isa-flags-after-cxxflags.patch
@@ -0,0 +1,41 @@
+From 16355dfa26222c761b2b35c50e780ad518ccaf3f Mon Sep 17 00:00:00 2001
+From: Jack Lloyd <jack(a)randombit.net>
+Date: Thu, 15 Mar 2018 11:15:26 -0400
+Subject: [PATCH] Put ISA enabling flags after CXXFLAGS to override as needed
+
+See GH #1495
+---
+ src/build-data/makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in
+index 994963112..2039ade4e 100644
+--- a/src/build-data/makefile.in
++++ b/src/build-data/makefile.in
+@@ -114,22 +114,22 @@ fuzzer_corpus_zip: fuzzer_corpus
+
+ %{for lib_build_info}
+ %{obj}: %{src}
+- $(CXX) %{isa_flags} $(SO_OBJ_FLAGS) $(BUILD_FLAGS) %{include_paths} %{dash_c} %{src}
%{dash_o}$@
++ $(CXX) $(SO_OBJ_FLAGS) $(BUILD_FLAGS) %{isa_flags} %{include_paths} %{dash_c} %{src}
%{dash_o}$@
+ %{endfor}
+
+ %{for cli_build_info}
+ %{obj}: %{src}
+- $(CXX) %{isa_flags} $(BUILD_FLAGS) %{include_paths} %{dash_c} %{src} %{dash_o}$@
++ $(CXX) $(BUILD_FLAGS) %{isa_flags} %{include_paths} %{dash_c} %{src} %{dash_o}$@
+ %{endfor}
+
+ %{for test_build_info}
+ %{obj}: %{src}
+- $(CXX) %{isa_flags} $(BUILD_FLAGS) %{include_paths} %{dash_c} %{src} %{dash_o}$@
++ $(CXX) $(BUILD_FLAGS) %{isa_flags} %{include_paths} %{dash_c} %{src} %{dash_o}$@
+ %{endfor}
+
+ %{for fuzzer_build_info}
+ %{obj}: %{src}
+- $(CXX) %{isa_flags} $(BUILD_FLAGS) %{include_paths} %{dash_c} %{src} %{dash_o}$@
++ $(CXX) $(BUILD_FLAGS) %{isa_flags} %{include_paths} %{dash_c} %{src} %{dash_o}$@
+
+ %{exe}: %{obj} $(LIBRARIES)
+ $(EXE_LINK_CMD) %{obj} $(EXE_LINKS_TO) %{fuzzer_lib} %{output_to_exe}$@
commit 01712a66218e134c0284ab68084557d9447785b7
Author: Iryna Shcherbina <shcherbina.iryna(a)gmail.com>
Date: Tue Mar 13 21:09:42 2018 +0100
Update Python 2 dependency declarations to new packaging standards
diff --git a/botan2.spec b/botan2.spec
index 7500c22..4a3d86d 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -13,8 +13,8 @@ Patch1: 02-fix-wrong-script-interpreter.patch
ExcludeArch: ppc64le
BuildRequires: gcc-c++
-BuildRequires: python
-BuildRequires: python-sphinx
+BuildRequires: python2
+BuildRequires: python2-sphinx
BuildRequires: python3-devel
BuildRequires: bzip2-devel
BuildRequires: zlib-devel
@@ -133,6 +133,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Tue Mar 13 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 2.4.0-5
+- Update Python 2 dependency declarations to new packaging standards
+ (See
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
+
* Tue Mar 06 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-4
- Exclude ppc64le arch, fix linter warnings
commit 48e0faaecec6ea07c96d212cbf457708e10141b8
Author: Benjamin Kircher <benjamin.kircher(a)gmail.com>
Date: Tue Mar 6 16:38:34 2018 +0100
Exclude ppc64le arch, fix linter warnings
diff --git a/botan2.spec b/botan2.spec
index 784d1c5..7500c22 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -11,6 +11,7 @@ Source0:
https://botan.randombit.net/releases/Botan-%{version}.tgz
Patch0: 01-remove-rpath-gcc.patch
Patch1: 02-fix-wrong-script-interpreter.patch
+ExcludeArch: ppc64le
BuildRequires: gcc-c++
BuildRequires: python
BuildRequires: python-sphinx
@@ -78,7 +79,7 @@ This package contains the Python3 binding for %{name}.
--with-python-version=%{python3_version} \
--with-sphinx \
--distribution-info=$(cat /etc/os-release | grep ^NAME= | sed
's/NAME=//g') \
- --with-debug-info
+ --with-debug-info
%make_build
@@ -132,6 +133,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Tue Mar 06 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-4
+- Exclude ppc64le arch, fix linter warnings
+
* Tue Mar 06 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-3
- Fix macro expansion in changelog section
commit ccd22e1ceef80b534fb4f0913117ecba2a00f502
Author: Benjamin Kircher <benjamin.kircher(a)gmail.com>
Date: Tue Mar 6 15:34:03 2018 +0100
Fix macro expansion in changelog section
diff --git a/botan2.spec b/botan2.spec
index 14f6e00..784d1c5 100644
--- a/botan2.spec
+++ b/botan2.spec
@@ -2,7 +2,7 @@
Name: botan2
Version: 2.4.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Crypto and TLS for C++11
License: BSD
@@ -132,6 +132,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
%changelog
+* Tue Mar 06 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-3
+- Fix macro expansion in changelog section
+
* Sat Jan 13 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-2
- Remove INSTALL_ variables, not used anymore
@@ -145,7 +148,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
- Backport upstream fix for broken GOST on i686
* Wed Sep 06 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.2.0-3
-- Fix %check section after rpath removal, generate debug symbols
+- Fix %%check section after rpath removal, generate debug symbols
* Thu Aug 31 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.2.0-2
- Fix issues that came up in review, see RH Bugzilla #1487067
commit 174b6da115ad6e035917644c307a2b8298ed8c7a
Author: Benjamin Kircher <benjamin.kircher(a)gmail.com>
Date: Tue Mar 6 15:29:48 2018 +0100
Initial import from RH BZ #1487067
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1746619
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/Botan-2.4.0.tgz
diff --git a/01-remove-rpath-gcc.patch b/01-remove-rpath-gcc.patch
new file mode 100644
index 0000000..b0e377c
--- /dev/null
+++ b/01-remove-rpath-gcc.patch
@@ -0,0 +1,13 @@
+diff --git src/build-data/cc/gcc.txt src/build-data/cc/gcc.txt
+index 7249fae8e..69c00bbbe 100644
+--- src/build-data/cc/gcc.txt
++++ src/build-data/cc/gcc.txt
+@@ -49,7 +49,7 @@ openbsd -> "$(CXX) -shared -fPIC"
+ </so_link_commands>
+
+ <binary_link_commands>
+-linux -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
++linux -> "$(LINKER)"
+ default -> "$(LINKER)"
+ </binary_link_commands>
+
diff --git a/02-fix-wrong-script-interpreter.patch
b/02-fix-wrong-script-interpreter.patch
new file mode 100644
index 0000000..6b6cc2b
--- /dev/null
+++ b/02-fix-wrong-script-interpreter.patch
@@ -0,0 +1,10 @@
+diff --git src/python/botan2.py src/python/botan2.py
+index 6d1ee25fe..70534d5a5 100755
+--- src/python/botan2.py
++++ src/python/botan2.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ """
+ Python wrapper of the botan crypto library
diff --git a/README.md b/README.md
deleted file mode 100644
index 037e812..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# botan2
-
-The botan2 package
\ No newline at end of file
diff --git a/botan2.spec b/botan2.spec
new file mode 100644
index 0000000..14f6e00
--- /dev/null
+++ b/botan2.spec
@@ -0,0 +1,154 @@
+%global major_version 2
+
+Name: botan2
+Version: 2.4.0
+Release: 2%{?dist}
+Summary: Crypto and TLS for C++11
+
+License: BSD
+URL:
https://botan.randombit.net/
+Source0:
https://botan.randombit.net/releases/Botan-%{version}.tgz
+Patch0: 01-remove-rpath-gcc.patch
+Patch1: 02-fix-wrong-script-interpreter.patch
+
+BuildRequires: gcc-c++
+BuildRequires: python
+BuildRequires: python-sphinx
+BuildRequires: python3-devel
+BuildRequires: bzip2-devel
+BuildRequires: zlib-devel
+BuildRequires: openssl-devel
+
+%description
+Botan is a BSD-licensed crypto library written in C++. It provides a
+wide variety of basic cryptographic algorithms, X.509 certificates and
+CRLs, PKCS \#10 certificate requests, a filter/pipe message processing
+system, and a wide variety of other features, all written in portable
+C++. The API reference, tutorial, and examples may help impart the
+flavor of the library. This is the current stable release branch 2.x
+of Botan.
+
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+
+%package doc
+Summary: Documentation for %{name}
+BuildArch: noarch
+
+%description doc
+%{summary}
+
+This package contains HTML documentation for %{name}.
+
+
+%package -n python3-%{name}
+Summary: Python3 bindings for %{name}
+%{?python_provide:%python_provide python3-%{name}}
+
+%description -n python3-%{name}
+%{summary}
+
+This package contains the Python3 binding for %{name}.
+
+
+%prep
+%setup -q -n Botan-%{version}
+%patch0 -p0
+%patch1 -p0
+
+%build
+# we have the necessary prerequisites, so enable optional modules
+%global enable_modules bzip2,zlib,openssl
+
+./configure.py \
+ --prefix=%{_prefix} \
+ --libdir=%{_lib} \
+ --docdir=%{_docdir} \
+ --cc=gcc \
+ --os=linux \
+ --cpu=%{_arch} \
+ --enable-modules=%{enable_modules} \
+ --with-python-version=%{python3_version} \
+ --with-sphinx \
+ --distribution-info=$(cat /etc/os-release | grep ^NAME= | sed
's/NAME=//g') \
+ --with-debug-info
+
+%make_build
+
+%install
+make install DESTDIR=%{buildroot}
+
+chmod 755 %{buildroot}%{python3_sitearch}/botan2.py
+
+# doc installation fixups
+mv %{buildroot}%{_docdir}/botan-%{version} %{buildroot}%{_pkgdocdir}
+rm -r %{buildroot}%{_pkgdocdir}/manual/{.doctrees,.buildinfo}
+
+
+%post -p /sbin/ldconfig
+
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%license license.txt
+%dir %{_pkgdocdir}
+%{_pkgdocdir}/*.txt
+%{_libdir}/libbotan-%{major_version}.so.*
+%{_bindir}/botan
+%{_mandir}/man1/botan.1.gz
+
+
+%files devel
+%license license.txt
+%{_includedir}/*
+%exclude %{_libdir}/libbotan-%{major_version}.a
+%{_libdir}/libbotan-%{major_version}.so
+%{_libdir}/pkgconfig/botan-%{major_version}.pc
+
+
+%files doc
+%license license.txt
+%dir %{_pkgdocdir}
+%{_pkgdocdir}/manual
+
+
+%files -n python3-%{name}
+%license license.txt
+%{python3_sitearch}/%{name}.py
+%{python3_sitearch}/__pycache__/*
+
+
+%check
+LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test
+
+
+%changelog
+* Sat Jan 13 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-2
+- Remove INSTALL_ variables, not used anymore
+
+* Thu Jan 11 2018 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.4.0-1
+- New upstream version; add new man page for botan command line utility
+
+* Fri Dec 15 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.3.0-1
+- New upstream version
+
+* Thu Sep 07 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.2.0-4
+- Backport upstream fix for broken GOST on i686
+
+* Wed Sep 06 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.2.0-3
+- Fix %check section after rpath removal, generate debug symbols
+
+* Thu Aug 31 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.2.0-2
+- Fix issues that came up in review, see RH Bugzilla #1487067
+
+* Sat Aug 12 2017 Benjamin Kircher <benjamin.kircher(a)gmail.com> - 2.2.0-1
+- New package. No need for compat-openssl10-devel anymore with 2.2.0 release
diff --git a/sources b/sources
new file mode 100644
index 0000000..20a7ed2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (Botan-2.4.0.tgz) =
304663a7af280f206305b4a782bf77531547b8ab86bd4df89f03a1e11f3b70b8514ed2b8a4de545415efde83085678d7cf28e443aa9e80337a8b28274af6ae0e