SHA256
8
0
forked from pool/Botan

1 Commits

Author SHA256 Message Date
e75e2a3279 Sync changes to SLFO-1.2 branch 2025-08-20 08:55:30 +02:00
13 changed files with 1567 additions and 204 deletions

BIN
Botan-1.10.3.tar.bz2 (Stored with Git LFS)

Binary file not shown.

BIN
Botan-3.7.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

11
Botan-3.7.1.tar.xz.asc Normal file
View File

@@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEYh2vZBHhhRxM+aLhYhHr8e+637wFAmejWl8ACgkQYhHr8e+6
37yUjgf9FJ0XTa7PFROjsIkgn2SOTP4wvOB0TLBsyUNuXLVWgyCV3wcdjbmSEzpW
x4o7iGGH6VdBjENNoEATlQeoERZ+/Vne1Ro5O1ZnM/tQ+HdOTczOrwZ1tCnj5TE9
p5v4kBYhvL3R0lKPArn1FwFFH6055cow+cunzUEHBdCW0fWf3z66GNbb50/PYU7f
j42dCMtkyCqLo+ULuYpwvwBF8u4vAxoHiNt50dXznhyhth98OWbpAJRIYqv9eKEB
07S+t2TWhdFQqymM/24QPce/KzJptRjfNJsu6dy41BCYzXGLXvtB51lrT98+DTEP
DyW4G+Uw9TC2htiL2wPohpSqRGN5ng==
=yb6U
-----END PGP SIGNATURE-----

View File

@@ -1,44 +0,0 @@
Index: src/build-data/makefile/unix.in
===================================================================
--- src/build-data/makefile/unix.in.orig 2011-06-21 17:33:59.550471797 +0200
+++ src/build-data/makefile/unix.in 2011-06-21 17:35:52.643901474 +0200
@@ -12,12 +12,12 @@ VERSION = %{version}
SERIES = %{version_major}.%{version_minor}
# Installation Settings
-DESTDIR = %{prefix}
+DESTDIR =
-BINDIR = $(DESTDIR)/bin
-LIBDIR = $(DESTDIR)/%{libdir}
-HEADERDIR = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
-DOCDIR = $(DESTDIR)/%{docdir}/botan-$(VERSION)
+BINDIR = $(DESTDIR)%{prefix}/bin
+LIBDIR = $(DESTDIR)%{libdir}
+HEADERDIR = $(DESTDIR)%{includedir}/botan-$(SERIES)/botan
+DOCDIR = $(DESTDIR)%{docdir}/Botan-$(VERSION)
PKGCONF_DIR = $(LIBDIR)/pkgconfig
CONFIG_SCRIPT = %{botan_config}
Index: src/build-data/makefile/unix_shr.in
===================================================================
--- src/build-data/makefile/unix_shr.in.orig 2011-06-21 17:33:59.550471797 +0200
+++ src/build-data/makefile/unix_shr.in 2011-06-21 17:35:50.812926900 +0200
@@ -14,12 +14,12 @@ VERSION = %{version}
SERIES = %{version_major}.%{version_minor}
# Installation Settings
-DESTDIR = %{prefix}
+DESTDIR =
-BINDIR = $(DESTDIR)/bin
-LIBDIR = $(DESTDIR)/%{libdir}
-HEADERDIR = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
-DOCDIR = $(DESTDIR)/%{docdir}/botan-$(VERSION)
+BINDIR = $(DESTDIR)%{prefix}/bin
+LIBDIR = $(DESTDIR)%{libdir}
+HEADERDIR = $(DESTDIR)%{includedir}/botan-$(SERIES)/botan
+DOCDIR = $(DESTDIR)%{docdir}/Botan-$(VERSION)
PKGCONF_DIR = $(LIBDIR)/pkgconfig
CONFIG_SCRIPT = %{botan_config}

View File

@@ -1,12 +0,0 @@
Index: src/build-data/botan.pc.in
===================================================================
--- src/build-data/botan.pc.in.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/build-data/botan.pc.in 2011-06-21 18:17:45.434985232 +0200
@@ -1,6 +1,6 @@
prefix=%{prefix}
exec_prefix=${prefix}
-libdir=${prefix}/%{libdir}
+libdir=${prefix}%{libdir}
includedir=${prefix}/include/botan-%{version_major}.%{version_minor}
Name: Botan

View File

@@ -1,51 +0,0 @@
Index: src/utils/types.h
===================================================================
--- src/utils/types.h.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/utils/types.h 2011-06-21 16:48:39.324325773 +0200
@@ -9,8 +9,8 @@
#define BOTAN_TYPES_H__
#include <botan/build.h>
-#include <stddef.h>
-
+#include <cstddef>
+#include <stdint.h>
/**
* The primary namespace for the botan library
*/
@@ -19,22 +19,22 @@ namespace Botan {
/**
* Typedef representing an unsigned 8-bit quantity
*/
-typedef unsigned char byte;
+typedef uint8_t byte;
/**
* Typedef representing an unsigned 16-bit quantity
*/
-typedef unsigned short u16bit;
+typedef uint16_t u16bit;
/**
* Typedef representing an unsigned 32-bit quantity
*/
-typedef unsigned int u32bit;
+typedef uint32_t u32bit;
/**
* Typedef representing a signed 32-bit quantity
*/
-typedef signed int s32bit;
+typedef int32_t s32bit;
/**
* Typedef representing an unsigned 64-bit quantity
@@ -44,7 +44,7 @@ typedef signed int s32bit;
#elif defined(__KCC)
typedef unsigned __long_long u64bit;
#elif defined(__GNUG__)
- __extension__ typedef unsigned long long u64bit;
+ __extension__ typedef uint64_t u64bit;
#else
typedef unsigned long long u64bit;
#endif

View File

@@ -1,15 +0,0 @@
Index: src/build-data/buildh.in
===================================================================
--- src/build-data/buildh.in.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/build-data/buildh.in 2011-06-21 14:54:51.287402063 +0200
@@ -3,8 +3,8 @@
#define BOTAN_BUILD_CONFIG_H__
/*
-* This file was automatically generated %{timestamp} UTC by
-* %{user}@%{hostname} running '%{command_line}'
+* This file was automatically generated by
+* %{user} running '%{command_line}'
*
* Target
* - Compiler: %{cc} %{lib_opt} %{mach_opt}

BIN
Botan-ull_constants.patch.bz2 (Stored with Git LFS)

Binary file not shown.

File diff suppressed because it is too large Load Diff

31
Botan.keyring Normal file
View File

@@ -0,0 +1,31 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQELBEGD1j0BCADHxPJkPcjJE+4Dlisx2hVc0Dj6JI1MSLrkM8R+2bOhVUSferxP
T1EMPhfrAdOHTAloyvRThJztnZsNKqfLL49GGcBLdEGAVNks1pG37Teze5Lx1XIu
zJFrozL2sqBy5C6nHpFgd1tcD68Rah2wp0u2cR9owXf1IqKdEfuo661+MTv7wTB1
4hKV75nB7Z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Kbw3nODxsN
8IrSn/5KBqJ/V/AtN+fpxIywa1stfEPdb8NlEsiyPppvXYjAEvKWNoKJn8QTtlcG
Bya8mcpIwmEJHHEQNbR7XkY+IKkzm6NAJOO8uTJ6ZU1sIuNKD+ytnH4QkQZjIqMZ
mBEuMbBxLqX0QaN8a9SavatLevPFk09TVxzzD6LnhfZimQn9qWvWh7KgZlk5t7Am
jUChrmwgwRFJiVMp3ZkmrScmDOzVWKFKehH6jAAhbkzXQbIyjIe2llYpEKWyQ3wN
QSFN5WXqoI4K4IVQFpBDgX4RtCFWY/kVQiabKqEyfGrGNla3gK0gsq/1ZyxJ37h/
0KYLwogm3qaNxN+AybeEmgDjtmY=
=0I8E
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -1,7 +1,8 @@
# #
# spec file for package Botan # spec file for package Botan
# #
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -12,42 +13,35 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%define version_suffix 1_10-0 %define version_suffix 3-7
%define short_version 1.10 %define short_version 3
Name: Botan Name: Botan
Version: 1.10.3 Version: 3.7.1
Release: 0 Release: 0
Url: http://botan.randombit.net
Summary: A C++ Crypto Library Summary: A C++ Crypto Library
License: BSD-3-Clause License: BSD-2-Clause
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Source: Botan-%{version}.tar.bz2 URL: https://botan.randombit.net
Source2: baselibs.conf Source0: https://botan.randombit.net/releases/Botan-%{version}.tar.xz
Patch0: Botan-inttypes.patch Source1: https://botan.randombit.net/releases/Botan-%{version}.tar.xz.asc
Patch1: Botan-ull_constants.patch.bz2 Source2: %{name}.keyring
Patch2: Botan-fix_install_paths.patch Source3: baselibs.conf
Patch4: Botan-no-buildtime.patch
Patch6: Botan-fix_pkgconfig.patch
Patch7: dont-set-mach-value.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: bzip2 >= 1.0.2
Requires: gmp >= 4.1
Requires: zlib
BuildRequires: bzip2 >= 1.0.2 BuildRequires: bzip2 >= 1.0.2
BuildRequires: gcc-c++ BuildRequires: c++_compiler
BuildRequires: gmp-devel
BuildRequires: gmp-devel >= 4.1
BuildRequires: libbz2-devel BuildRequires: libbz2-devel
BuildRequires: libqt4-devel BuildRequires: pkgconfig
BuildRequires: openssl-devel BuildRequires: python3
BuildRequires: pkg-config BuildRequires: trousers-devel
BuildRequires: python
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(sqlite3)
%if 0%{?suse_version} < 1600
BuildRequires: gcc12-c++
%endif
%description %description
Botan is a C++ library that provides support for many common Botan is a C++ library that provides support for many common
@@ -57,7 +51,7 @@ supported, including RSA, DSA, DES, AES, MD5, and SHA-1.
%package -n libbotan-%{version_suffix} %package -n libbotan-%{version_suffix}
Summary: A C++ Crypto Library Summary: A C++ Crypto Library
Group: Development/Libraries/C and C++ Group: System/Libraries
%description -n libbotan-%{version_suffix} %description -n libbotan-%{version_suffix}
Botan is a C++ library that provides support for many common Botan is a C++ library that provides support for many common
@@ -68,61 +62,102 @@ supported, including RSA, DSA, DES, AES, MD5, and SHA-1.
%package -n libbotan-devel %package -n libbotan-devel
Summary: Development files for Botan Summary: Development files for Botan
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: gmp-devel Requires: libbotan-%{version_suffix} = %{version}
Requires: libbz2-devel Requires: libbz2-devel
Requires: trousers-devel
Requires: pkgconfig(liblzma)
Requires: pkgconfig(sqlite3)
Provides: Botan-devel = %{version} Provides: Botan-devel = %{version}
Obsoletes: Botan-devel < %{version} Obsoletes: Botan-devel < %{version}
Requires: libbotan-%{version_suffix} = %{version}
%define botan_docdir %{_datadir}/doc/packages/%{name}-%{version}
%description -n libbotan-devel %description -n libbotan-devel
This package contains the header files and libraries needed to develop This package contains the header files and libraries needed to develop
programs that use the Botan library. programs that use the Botan library.
%package -n python3-botan
Summary: Botan python bindings
Group: Development/Languages/Python
Requires: python3
%description -n python3-botan
This package contains the python bindings to libbotan's C98 interface.
%package doc
%define botan_docdir %{_docdir}/botan-%{version}
Summary: Documentation of Botan
Group: Development/Libraries/C and C++
BuildArch: noarch
%description doc
Documentation of Botan package.
%prep %prep
%setup -q %autosetup -n Botan-%{version}
%patch0
%patch1
%patch2
%patch4
%patch6
%patch7
%build %build
%define _lto_cflags %{nil}
export RPM_OPT_FLAGS export RPM_OPT_FLAGS
%define common_config_flags --libdir=%{_lib} --with-bzip2 --with-zlib --with-gnump --with-openssl %if 0%{?suse_version} < 1600
./configure.py --prefix=%_prefix --libdir=%{_libdir} \ export CC=gcc-12
export CXX=g++-12
%endif
python3 ./configure.py \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--libdir=%{_libdir} \
--docdir=%{_defaultdocdir} \ --docdir=%{_defaultdocdir} \
--includedir=%{_includedir} \ --includedir=%{_includedir} \
--with-bzip2 \ --with-bzip2 \
--with-zlib \ --with-zlib \
--with-gnump \ --with-lzma \
--with-openssl \ --with-sqlite \
--enable-modules=qt_mutex \ --with-tpm \
--with-tr1-implementation=system \ %ifarch %{ix86}
--cpu=%_target_cpu --cpu=x86_32
make %{?_smp_mflags} WARN_FLAGS="$RPM_OPT_FLAGS -I/usr/include/Qt" %else
%ifarch %{arm}
--cpu=arm
%else
--cpu=%{_target_cpu}
%endif
%endif
%make_build WARN_FLAGS="%{optflags}"
%install %install
%makeinstall sed -i 's/env python/env python3/' src/scripts/install.py
%make_install
rm -f %{buildroot}/%{_libdir}/libbotan*.a rm -f %{buildroot}/%{_libdir}/libbotan*.a
chmod +x %{buildroot}%{python3_sitearch}/botan3.py
sed -i '1s@^#!/.*@#!%{_bindir}/python3@' %{buildroot}%{python3_sitearch}/botan3.py
%post -n libbotan-%{version_suffix} -p /sbin/ldconfig %check
%make_build check
%postun -n libbotan-%{version_suffix} -p /sbin/ldconfig %ldconfig_scriptlets -n libbotan-%{version_suffix}
%files -n libbotan-%{version_suffix} %files
%defattr(-,root,root) %license license.txt
%{_bindir}/botan
%files doc
%license license.txt
%docdir %{botan_docdir} %docdir %{botan_docdir}
%{botan_docdir} %{botan_docdir}
%files -n libbotan-%{version_suffix}
%license license.txt
%{_libdir}/libbotan-%{short_version}.so.* %{_libdir}/libbotan-%{short_version}.so.*
%files -n libbotan-devel %files -n libbotan-devel
%defattr(-,root,root) %license license.txt
%{_libdir}/libbotan-%{short_version}.so %{_libdir}/libbotan-%{short_version}.so
%{_libdir}/pkgconfig/botan-%{short_version}.pc %{_libdir}/pkgconfig/botan-%{short_version}.pc
%{_includedir}/botan-%{short_version} %{_includedir}/botan-%{short_version}
%{_bindir}/botan-config-%{short_version} %{_libdir}/cmake
%files -n python3-botan
%license license.txt
%{python3_sitearch}/botan3.py
%changelog %changelog

View File

@@ -1,4 +1,4 @@
libbotan-1_10-0 libbotan-3-7
libbotan-devel libbotan-devel
requires -libbotan-<targettype> = <version> requires -libbotan-<targettype> = <version>
requires "libbotan-1_10-0-<targettype> = <version>" requires "libbotan-3-7-<targettype> = <version>"

View File

@@ -1,13 +0,0 @@
We don't want any fiddling with -march, our flags via %optflags are always right
--- configure.py
+++ configure.py
@@ -1081,7 +1081,7 @@
options.cpu, options.debug_build),
'lib_opt': cc.library_opt_flags(options),
- 'mach_opt': cc.mach_opts(options.arch, options.cpu),
+ 'mach_opt': '',
'check_opt': '' if options.no_optimizations else cc.check_opt_flags,
'lang_flags': cc.lang_flags + options.extra_flags,
'warn_flags': warning_flags(cc.warning_flags,