Update to 1.10.8, based on the current rawhide spec file, also containing these changes:

- Added ppc64le arch support (Brent Baude <baude@us.ibm.com>)
  - Added AArch64 arch support (Marcin Juszkiewicz
    <mjuszkiewicz@redhat.com>, Peter Robinson <pbrobinson@gmail.com>)
  - Re-enable IDEA (rhbz#1003052) and SRP-6 Modernize spec file New
  - -doc subpackage containing HTML documentation Package Python
  - binding
This commit is contained in:
Thomas Moschny 2014-06-04 18:55:32 +02:00
parent e49d368d5d
commit f47d9511a5
9 changed files with 172 additions and 82 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@
/Botan-1.8.12.stripped.tbz
/Botan-1.8.13.stripped.tbz
/Botan-1.8.14.stripped.tbz
/Botan-1.10.5.stripped.tbz
/Botan-1.10.8.stripped.tbz

View File

@ -1,14 +1,11 @@
For legal reasons, the following modules have been completely removed
from the Botan package in Fedora:
* Block Ciphers
* IDEA [src/block/idea]
* RC6 [src/block/rc6]
* RC5 [src/block/rc5]
* Public Key Base
* ECC Public Key [src/pubkey/ecc_key]
* ECC Domain Parameters [src/pubkey/ec_dompar]
* ECDSA [src/pubkey/ecdsa]
* ECKAEG [src/pubkey/eckaeg]
* Math
* GF(p) Math [src/math/gfpmath]
* RC5 Block Cipher [src/block/rc5]
* RC6 Block Cipher [src/block/rc6]
* GF(p) Math [src/math/ec_gfp]
* ECC Domain Parameters [src/pubkey/ec_group]
* ECC Public Key [src/pubkey/ecc_key]
* ECDH [src/pubkey/ecdh]
* ECDSA [src/pubkey/ecdsa]
* GOST 34.10 [src/pubkey/gost_3410]

View File

@ -0,0 +1,50 @@
diff -Naur Botan-1.10.8.orig/src/build-data/arch/ppc64le.txt Botan-1.10.8/src/build-data/arch/ppc64le.txt
--- Botan-1.10.8.orig/src/build-data/arch/ppc64le.txt 1969-12-31 18:00:00.000000000 -0600
+++ Botan-1.10.8/src/build-data/arch/ppc64le.txt 2014-05-25 12:59:22.030001491 -0500
@@ -0,0 +1,16 @@
+
+endian little
+family ppc64le
+
+<aliases>
+ppc64el # For Debian
+</aliases>
+
+<submodels>
+</submodels>
+
+<submodel_aliases>
+</submodel_aliases>
+
+<isa_extn>
+</isa_extn>
diff -Naur Botan-1.10.8.orig/src/build-data/cc/gcc.txt Botan-1.10.8/src/build-data/cc/gcc.txt
--- Botan-1.10.8.orig/src/build-data/cc/gcc.txt 2014-05-25 12:44:19.580001491 -0500
+++ Botan-1.10.8/src/build-data/cc/gcc.txt 2014-05-25 12:55:57.750001491 -0500
@@ -83,6 +83,7 @@
mips64 -> "-mips3 -mcpu=SUBMODEL" mips64-
ppc32 -> "-mcpu=SUBMODEL" ppc
ppc64 -> "-mcpu=SUBMODEL" ppc
+ppc64le -> "-mcpu=SUBMODEL"
sparc32 -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus" sparc32-
sparc64 -> "-mcpu=v9 -mtune=SUBMODEL"
x86_32 -> "-march=SUBMODEL -momit-leaf-frame-pointer"
@@ -98,6 +99,7 @@
sparc32 -> "-m32 -mno-app-regs"
sparc64 -> "-m64 -mno-app-regs"
ppc64 -> "-m64"
+ppc64le -> "-m64"
# This should probably be used on most/all targets, but the docs are unclear
openbsd -> "-pthread"
diff -Naur Botan-1.10.8.orig/src/math/mp/mp_asm64/info.txt Botan-1.10.8/src/math/mp/mp_asm64/info.txt
--- Botan-1.10.8.orig/src/math/mp/mp_asm64/info.txt 2014-05-25 12:44:19.620001491 -0500
+++ Botan-1.10.8/src/math/mp/mp_asm64/info.txt 2014-05-25 12:45:01.580001491 -0500
@@ -13,6 +13,7 @@
mips64
ppc64
sparc64
+ppc64le
</arch>
# The inline asm only works with gcc, but it looks like (at least on

View File

@ -1,14 +0,0 @@
============================================================
--- src/math/numbertheory/numthry.cpp e810b1dace1f2f07c3fceabddb59844a8807d58f
+++ src/math/numbertheory/numthry.cpp 03df310d0075893ff7b86ca57867fa0f0293c22e
@@ -285,9 +285,9 @@ bool passes_mr_tests(RandomNumberGenerat
u32bit tests = miller_rabin_test_iterations(n.bits(), verify);
- BigInt nonce;
for(u32bit i = 0; i != tests; ++i)
{
+ BigInt nonce;
if(!verify && PRIMES[i] < (n-1))
nonce = PRIMES[i];
else

View File

@ -1,19 +0,0 @@
#
# old_revision [adcf24b7e258c125f78aaff4ef2d3557f1183c3e]
#
# patch "configure.py"
# from [b43917e0e74e7ef1ff0024542da0dabe104a1582]
# to [ba82e657a585f31e9ba20056a57c5f597c0f0297]
#
============================================================
--- configure.py b43917e0e74e7ef1ff0024542da0dabe104a1582
+++ configure.py ba82e657a585f31e9ba20056a57c5f597c0f0297
@@ -38,7 +38,7 @@ class BuildConfigurationInformation(obje
version_major = 1
version_minor = 8
version_patch = 14
- version_so_patch = 13
+ version_so_patch = 2
version_suffix = ''
version_string = '%d.%d.%d%s' % (

21
botan-aarch64.patch Normal file
View File

@ -0,0 +1,21 @@
Index: Botan-1.10.8/src/build-data/arch/aarch64.txt
===================================================================
--- /dev/null
+++ Botan-1.10.8/src/build-data/arch/aarch64.txt
@@ -0,0 +1,16 @@
+
+endian little
+family aarch64
+
+<aliases>
+arm64 # For Debian
+</aliases>
+
+<submodels>
+</submodels>
+
+<submodel_aliases>
+</submodel_aliases>
+
+<isa_extn>
+</isa_extn>

View File

@ -1,6 +1,8 @@
%global major_version 1.10
Name: botan
Version: 1.8.14
Release: 3%{?dist}
Version: %{major_version}.8
Release: 5%{?dist}
Summary: Crypto library written in C++
Group: System Environment/Libraries
@ -10,21 +12,22 @@ URL: http://botan.randombit.net/
# here: http://files.randombit.net/botan/Botan-%%{version}.tbz
Source0: Botan-%{version}.stripped.tbz
Source1: README.fedora
# soname was changed unintentionally upstream, revert it.
Patch0: botan-1.8.14-soname.patch
# patch to fix prime testing, see also
# http://botan.randombit.net/relnotes/1_10_8.html
Patch1: botan-1.8.14-fix_prime_testing.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: botan-aarch64.patch
Patch1: botan-1.10-add-ppc64le.patch
BuildRequires: gcc-c++
BuildRequires: python
BuildRequires: python-sphinx
BuildRequires: python-devel
BuildRequires: boost-python-devel
BuildRequires: bzip2-devel
BuildRequires: zlib-devel
BuildRequires: gmp-devel
BuildRequires: openssl-devel
# do not check .so files in the python_sitelib directory
%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$
%description
Botan is a BSD-licensed crypto library written in C++. It provides a
@ -38,25 +41,49 @@ flavor of the library.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: bzip2-devel
Requires: zlib-devel
Requires: gmp-devel
Requires: openssl-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation for %{name}
Group: Documentation
BuildArch: noarch
%description doc
%{summary}
This package contains HTML documentation for %{name}.
%package python
Summary: Python bindings for %{name}
Group: System Environment/Libraries
%description python
%{summary}
This package contains the Python binding for %{name}.
Note: The Python binding should be considered alpha software, and the
interfaces may change in the future.
%prep
%setup -q -n Botan-%{version}
%patch0 -p0
%patch1 -p0
%patch0 -p1
%patch1 -p1
cp -av %{SOURCE1} .
%build
# we have the necessary prerequisites, so enable optional modules
%define enable_modules gnump,bzip2,zlib,openssl
@ -71,23 +98,31 @@ cp -av %{SOURCE1} .
--os=linux \
--cpu=%{_arch} \
--enable-modules=%{enable_modules} \
--disable-modules=%{disable_modules}
--disable-modules=%{disable_modules} \
--with-boost-python \
--with-python-version=%{python_version}
# (ab)using CXX as an easy way to inject our CXXFLAGS
make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags}
make -f Makefile.python \
CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install \
DESTDIR=%{buildroot}%{_prefix} \
DOCDIR=_doc \
INSTALL_CMD_EXEC="install -p -m 755" \
INSTALL_CMD_DATA="install -p -m 644" \
INSTALL_CMD_DATA="install -p -m 644"
make -f Makefile.python install \
PYTHON_SITE_PACKAGE_DIR=%{buildroot}%{python_sitearch}
%clean
rm -rf %{buildroot}
# fixups
find doc/examples -type f -exec chmod -x {} \;
mv doc/examples/python doc/python-examples
rm _doc/manual/.buildinfo
rm -r _doc/manual/.doctrees
%post -p /sbin/ldconfig
@ -97,22 +132,30 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_libdir}/libbotan*-*.so
%doc _doc/readme.txt _doc/log.txt _doc/thanks.txt _doc/credits.txt
%doc _doc/license.txt _doc/fips140.tex _doc/pgpkeys.asc
%doc _doc/readme.txt
%doc doc/license.txt
%doc README.fedora
%{_libdir}/libbotan-%{major_version}.so.*
%files devel
%defattr(-,root,root,-)
%doc doc/examples
%doc _doc/api* _doc/tutorial*
%{_bindir}/botan-config
%{_bindir}/botan-config-%{major_version}
%{_includedir}/*
%exclude %{_libdir}/libbotan.a
%{_libdir}/libbotan.so
%{_libdir}/pkgconfig/botan-1.8.pc
%exclude %{_libdir}/libbotan-%{major_version}.a
%{_libdir}/libbotan-%{major_version}.so
%{_libdir}/pkgconfig/botan-%{major_version}.pc
%files doc
%doc _doc/manual
%doc _doc/readme.txt
%doc doc/license.txt
%files python
%doc doc/python-examples
%{python_sitearch}/%{name}
%check
@ -120,12 +163,22 @@ make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} check
# these checks would fail
mv checks/validate.dat{,.orig}
awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
awk '/\[.*\]/{f=0} /\[(RC5.*|RC6)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
checks/validate.dat.orig > checks/validate.dat
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate
%changelog
* Wed Jun 4 2014 Thomas Moschny <thomas.moschny@gmx.de> - 1.10.8-5
- Update to 1.10.8, based on the current rawhide spec file, also
containing these changes:
- Added ppc64le arch support (Brent Baude <baude@us.ibm.com>)
- Added AArch64 arch support (Marcin Juszkiewicz
<mjuszkiewicz@redhat.com>, Peter Robinson <pbrobinson@gmail.com>)
- Re-enable IDEA (rhbz#1003052) and SRP-6 Modernize spec file New
- -doc subpackage containing HTML documentation Package Python
- binding
* Sat May 10 2014 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.14-3
- Add patch to fix prime testing.

View File

@ -1,6 +1,6 @@
#! /bin/bash
version=1.8.14
version=1.10.8
name=Botan-${version}
suffix=.tbz
newsuffix=.stripped.tbz
@ -11,13 +11,13 @@ tmpfile=$(mktemp)
${compr} -cd ${name}${suffix} > ${tmpfile}
tar --delete --file=${tmpfile} ./Botan-${version}/src/block/idea
tar --delete --file=${tmpfile} ./Botan-${version}/src/block/rc6
tar --delete --file=${tmpfile} ./Botan-${version}/src/block/rc5
tar --delete --file=${tmpfile} ./Botan-${version}/src/math/gfpmath
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ec_dompar
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ecc_key
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ecdsa
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/eckaeg
tar --delete --file=${tmpfile} Botan-${version}/src/block/rc6
tar --delete --file=${tmpfile} Botan-${version}/src/block/rc5
tar --delete --file=${tmpfile} Botan-${version}/src/math/ec_gfp
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecc_key
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdh
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdsa
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ec_group
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/gost_3410
${compr} -c ${tmpfile} > ${name}${newsuffix}

View File

@ -1 +1 @@
4b5ce78b1cfc0735eb7ec4f6903068ca Botan-1.8.14.stripped.tbz
c7ebfad55bdfe0089e6201d11b0faa75 Botan-1.10.8.stripped.tbz