From 175f836676346bcec9d0a3611749f72226d861b6 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 2 Jul 2007 18:44:07 +0000 Subject: [PATCH 01/59] Setup of module libtommath --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0b10545 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: libtommath +# $Id$ +NAME := libtommath +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 6aeb452165d47535d11d0bf834c3edf16a6a9c01 Mon Sep 17 00:00:00 2001 From: jjh Date: Mon, 9 Jul 2007 23:16:46 +0000 Subject: [PATCH 02/59] adding spec --- libtommath.spec | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 libtommath.spec diff --git a/libtommath.spec b/libtommath.spec new file mode 100644 index 0000000..609f3f6 --- /dev/null +++ b/libtommath.spec @@ -0,0 +1,93 @@ +Name: libtommath +Version: 0.41 +Release: 5%{?dist} +Summary: a portable number theoretic multiple-precision integer library +Group: System Environment/Libraries +License: Public Domain +URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm +Source0: http://www.libtom.org/files/ltm-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: libtool + +Patch0: libtommath-makefile.patch + +%description +A free open source portable number theoretic multiple-precision integer +library written entirely in C. (phew!). The library is designed to +provide a simple to work with API that provides fairly efficient +routines that build out of the box without configuration. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +BuildRequires: tetex-latex, tetex-dvips, ghostscript + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q +%patch0 -p1 -b .makefile + + +%build +# no configure script ships with libtommath. Its only requirement is +# ANSI C. +export CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared +make %{?_smp_mflags} -f makefile poster manual docs + + +%install +# There is no configure script that ships with libtommath but it does +# understand DESTDIR and it installs via that and the +# INSTALL_USER and INSTALL_GROUP environment variables. +rm -rf $RPM_BUILD_ROOT +export INSTALL_USER=$(id -un) +export INSTALL_GROUP=$(id -gn) +make install INCPATH=%{_includedir}/tommath DESTDIR=$RPM_BUILD_ROOT LIBPATH=%{_libdir} -f makefile.shared +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' +find $RPM_BUILD_ROOT -name '*.h' -exec chmod 644 {} ';' + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%doc bn.pdf poster.pdf tommath.pdf +%{_includedir}/tommath +%{_libdir}/*.so + +%changelog +* Fri Jun 29 2007 Jeremy Hinegardner - 0.41-5 +- removed package name from summary + +* Wed Jun 27 2007 Jeremy Hinegardner - 0.41-4 +- changed patch to honor RPM_OPT_FLAGS +- changed patch to allow INCPATH to be set externally +- changed installation of headers to _includedir/tommath + +* Sun Jun 24 2007 Jeremy Hinegardner - 0.41-3 +- changed patch to bring it into line with the style of libtomcrypt + +* Sat Jun 23 2007 Jeremy Hinegardner - 0.41-2 +- add patch to makefile.shared to allow for /usr/lib64 installs +- update spec to pass libdir build and install process + +* Fri Jun 22 2007 Jeremy Hinegardner - 0.41-1 +- Initial spec file creation From d50b90ec29f86f40d9930d04aa199f4ccaa94640 Mon Sep 17 00:00:00 2001 From: jjh Date: Mon, 9 Jul 2007 23:22:19 +0000 Subject: [PATCH 03/59] adding initial patch --- .cvsignore | 1 + libtommath-makefile.patch | 37 +++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 39 insertions(+) create mode 100644 libtommath-makefile.patch diff --git a/.cvsignore b/.cvsignore index e69de29..48d0c04 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ltm-0.41.tar.bz2 diff --git a/libtommath-makefile.patch b/libtommath-makefile.patch new file mode 100644 index 0000000..c8e0c57 --- /dev/null +++ b/libtommath-makefile.patch @@ -0,0 +1,37 @@ +--- libtommath-0.41.orig/makefile.shared 2007-03-10 16:45:11.000000000 -0700 ++++ libtommath-0.41/makefile.shared 2007-06-27 22:07:28.000000000 -0600 +@@ -10,13 +10,15 @@ + ifndef IGNORE_SPEED + + #for speed +-CFLAGS += -O3 -funroll-loops ++# commented out for building in Fedora ++#CFLAGS += -O3 -funroll-loops + + #for size + #CFLAGS += -Os + + #x86 optimizations [should be valid for any GCC install though] +-CFLAGS += -fomit-frame-pointer ++# commented out for rpm building in Fedora ++#CFLAGS += -fomit-frame-pointer + + endif + +@@ -48,8 +50,14 @@ + #INCPATH-The directory to install the header files for libtommath. + #DATAPATH-The directory to install the pdf docs. + DESTDIR= +-LIBPATH=/usr/lib +-INCPATH=/usr/include ++ ++ifndef LIBPATH ++ LIBPATH=/usr/lib ++endif ++ ++ifndef INCPATH ++ INCPATH=/usr/include ++endif + DATAPATH=/usr/share/doc/libtommath/pdf + + OBJECTS=bncore.o bn_mp_init.o bn_mp_clear.o bn_mp_exch.o bn_mp_grow.o bn_mp_shrink.o \ diff --git a/sources b/sources index e69de29..f6552c3 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +96fafb55f86be27490957b89dea7b31b ltm-0.41.tar.bz2 From 8cfb22c470aab2ea308954da54993f2ed7289408 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 29 Aug 2007 04:29:21 +0000 Subject: [PATCH 04/59] - Rebuild for selinux ppc32 issue. --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 609f3f6..98e3713 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 5%{?dist} +Release: 6%{?dist} Summary: a portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -74,6 +74,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %changelog +* Wed Aug 29 2007 Fedora Release Engineering - 0.41-6 +- Rebuild for selinux ppc32 issue. + * Fri Jun 29 2007 Jeremy Hinegardner - 0.41-5 - removed package name from summary From c79674a533c2714ba0591cba42b622adf8e99585 Mon Sep 17 00:00:00 2001 From: jjh Date: Sun, 25 Nov 2007 23:48:56 +0000 Subject: [PATCH 05/59] fix multilib bugs --- libtommath.spec | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 98e3713..adb4c9d 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,7 +1,7 @@ Name: libtommath Version: 0.41 -Release: 6%{?dist} -Summary: a portable number theoretic multiple-precision integer library +Release: 7%{?dist} +Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -21,12 +21,21 @@ routines that build out of the box without configuration. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} -BuildRequires: tetex-latex, tetex-dvips, ghostscript %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package doc +Summary: Documentation files for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildRequires: tetex-latex, tetex-dvips, ghostscript + +%description doc +The %{name}-doc package contains PDF documentation for +using %{name}. + %prep %setup -q %patch0 -p1 -b .makefile @@ -69,11 +78,21 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) -%doc bn.pdf poster.pdf tommath.pdf +%doc LICENSE %{_includedir}/tommath %{_libdir}/*.so +%files doc +%defattr(-,root,root,-) +%doc LICENSE +%doc bn.pdf poster.pdf tommath.pdf + %changelog +* Sun Nov 25 2007 Jeremy Hinegardner - 0.41-7 +- Resolve multilib conflicts from Bug #342441 by splitting out + documentation to libtommath-docs subpackage +- fix rpmlint Summary: warning + * Wed Aug 29 2007 Fedora Release Engineering - 0.41-6 - Rebuild for selinux ppc32 issue. From e6cf5b2ee6f7e2525adebe68ca43668a78c7c4cb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 06:19:48 +0000 Subject: [PATCH 06/59] - Autorebuild for GCC 4.3 --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index adb4c9d..e5319ec 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Tue Feb 19 2008 Fedora Release Engineering - 0.41-8 +- Autorebuild for GCC 4.3 + * Sun Nov 25 2007 Jeremy Hinegardner - 0.41-7 - Resolve multilib conflicts from Bug #342441 by splitting out documentation to libtommath-docs subpackage From 9f18aa2664285fa185b4475d7bdff466c26f01e9 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 19:28:52 +0000 Subject: [PATCH 07/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index e5319ec..2537242 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 0.41-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Tue Feb 19 2008 Fedora Release Engineering - 0.41-8 - Autorebuild for GCC 4.3 From 4168481486a5171f02ea1036125dc578ad1d3cfd Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 08:46:55 +0000 Subject: [PATCH 08/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 2537242..3bcbcb3 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sat Jul 25 2009 Fedora Release Engineering - 0.41-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Feb 25 2009 Fedora Release Engineering - 0.41-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 564b14be5afc0d2ca3186fc82a6846ae16846b11 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:51:21 +0000 Subject: [PATCH 09/59] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0b10545..112fc02 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := libtommath SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 01233f1d3f379b245f99e2e3016a6095e9dce8ee Mon Sep 17 00:00:00 2001 From: jjh Date: Mon, 21 Jun 2010 00:12:10 +0000 Subject: [PATCH 10/59] fix for FTBFS --- libtommath.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 3bcbcb3..ec200cc 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -30,7 +30,7 @@ developing applications that use %{name}. Summary: Documentation files for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} -BuildRequires: tetex-latex, tetex-dvips, ghostscript +BuildRequires: tetex-latex, tetex-dvips, ghostscript, libtiff-tools %description doc The %{name}-doc package contains PDF documentation for @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sun Jun 20 2010 Jeremy Hinegardner - 0.41-11 +- fix bugs #555445 and #591543 + * Sat Jul 25 2009 Fedora Release Engineering - 0.41-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 7e638aefeada53094831b38ae707134605ab44d3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 21:46:08 +0000 Subject: [PATCH 11/59] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 112fc02..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: libtommath -# $Id$ -NAME := libtommath -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 1e8b8c8c02321580d62a27b263ea04e7e7c0adbf Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 06:07:26 -0600 Subject: [PATCH 12/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index ec200cc..61c355b 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 0.41-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Jun 20 2010 Jeremy Hinegardner - 0.41-11 - fix bugs #555445 and #591543 From e6e873a635fc40078f0ecbd5f73178f4f343e2f2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 02:32:54 -0600 Subject: [PATCH 13/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 61c355b..47b9a3e 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 0.41-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Feb 08 2011 Fedora Release Engineering - 0.41-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 1cb4069c795f20d1a23fa425566a550d8119ed5d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 16:24:26 -0500 Subject: [PATCH 14/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 47b9a3e..e3513de 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 0.41-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jan 13 2012 Fedora Release Engineering - 0.41-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From baefd828326f501d8b3d86c2a3d0c3ed8a43facc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 23:21:49 -0600 Subject: [PATCH 15/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index e3513de..4a95b45 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 14%{?dist} +Release: 15%{?dist} Summary: A portable number theoretic multiple-precision integer library Group: System Environment/Libraries License: Public Domain @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %doc bn.pdf poster.pdf tommath.pdf %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 0.41-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Thu Jul 19 2012 Fedora Release Engineering - 0.41-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 077a591a6665d1f0268dcc88f65a78932a4beead Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 11 Jun 2013 12:18:48 +0200 Subject: [PATCH 16/59] Fix tex/latex BuildRequires & SPEC file cleanup --- libtommath.spec | 69 ++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 4a95b45..6d0dadc 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,93 +1,92 @@ Name: libtommath Version: 0.41 -Release: 15%{?dist} +Release: 16%{?dist} Summary: A portable number theoretic multiple-precision integer library -Group: System Environment/Libraries License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm + Source0: http://www.libtom.org/files/ltm-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: libtommath-makefile.patch + +BuildRequires: ghostscript BuildRequires: libtool -Patch0: libtommath-makefile.patch +%if 0%{?rhel} == 6 +BuildRequires: libtiff +%else +BuildRequires: libtiff-tools +%endif + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +BuildRequires: tex(dvips) +BuildRequires: tex(latex) +%else +BuildRequires: tetex-dvips +BuildRequires: tetex-latex +%endif %description -A free open source portable number theoretic multiple-precision integer -library written entirely in C. (phew!). The library is designed to -provide a simple to work with API that provides fairly efficient -routines that build out of the box without configuration. +A free open source portable number theoretic multiple-precision integer library +written entirely in C. (phew!). The library is designed to provide a simple to +work with API that provides fairly efficient routines that build out of the box +without configuration. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. +The %{name}-devel package contains libraries and header files for developing +applications that use %{name}. %package doc Summary: Documentation files for %{name} -Group: Documentation Requires: %{name} = %{version}-%{release} -BuildRequires: tetex-latex, tetex-dvips, ghostscript, libtiff-tools %description doc -The %{name}-doc package contains PDF documentation for -using %{name}. +The %{name}-doc package contains PDF documentation for using %{name}. %prep %setup -q %patch0 -p1 -b .makefile - %build -# no configure script ships with libtommath. Its only requirement is -# ANSI C. +# no configure script ships with libtommath. Its only requirement is ANSI C. export CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared make %{?_smp_mflags} -f makefile poster manual docs - %install # There is no configure script that ships with libtommath but it does # understand DESTDIR and it installs via that and the # INSTALL_USER and INSTALL_GROUP environment variables. -rm -rf $RPM_BUILD_ROOT export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) -make install INCPATH=%{_includedir}/tommath DESTDIR=$RPM_BUILD_ROOT LIBPATH=%{_libdir} -f makefile.shared -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' -find $RPM_BUILD_ROOT -name '*.h' -exec chmod 644 {} ';' - - -%clean -rm -rf $RPM_BUILD_ROOT - +make install INCPATH=%{_includedir}/tommath DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared +find %{buildroot} -name '*.la' -exec rm -f {} ';' +find %{buildroot} -name '*.a' -exec rm -f {} ';' +find %{buildroot} -name '*.h' -exec chmod 644 {} ';' %post -p /sbin/ldconfig %postun -p /sbin/ldconfig - %files -%defattr(-,root,root,-) %doc LICENSE %{_libdir}/*.so.* %files devel -%defattr(-,root,root,-) -%doc LICENSE %{_includedir}/tommath %{_libdir}/*.so %files doc -%defattr(-,root,root,-) -%doc LICENSE %doc bn.pdf poster.pdf tommath.pdf %changelog +* Thu Jun 06 2013 Simone Caronni - 0.41-16 +- SPEC file cleanup, remove obsolete tags. +- Fix tex/latex BuildRequires. + * Thu Feb 14 2013 Fedora Release Engineering - 0.41-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From d93c54432cbc9e22e8fcf6b7fcc3d85d2271612b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 02:14:34 -0500 Subject: [PATCH 17/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 6d0dadc..9762c6d 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.41 -Release: 16%{?dist} +Release: 17%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -83,6 +83,9 @@ find %{buildroot} -name '*.h' -exec chmod 644 {} ';' %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 0.41-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Thu Jun 06 2013 Simone Caronni - 0.41-16 - SPEC file cleanup, remove obsolete tags. - Fix tex/latex BuildRequires. From fe1e6ed346d8c893536b2879cd7ab18ff73b277c Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 8 Aug 2013 15:43:09 +0200 Subject: [PATCH 18/59] Update to 0.42.0, some cleanup --- .gitignore | 1 + libtommath.spec | 30 ++++++++++++++++++------------ sources | 2 +- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 48d0c04..b4a9572 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ ltm-0.41.tar.bz2 +/ltm-0.42.0.tar.bz2 diff --git a/libtommath.spec b/libtommath.spec index 9762c6d..6dc5106 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,12 +1,12 @@ Name: libtommath -Version: 0.41 -Release: 17%{?dist} +Version: 0.42.0 +Release: 1%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm Source0: http://www.libtom.org/files/ltm-%{version}.tar.bz2 -Patch0: libtommath-makefile.patch +Patch0: %{name}-makefile.patch BuildRequires: ghostscript BuildRequires: libtool @@ -17,7 +17,7 @@ BuildRequires: libtiff BuildRequires: libtiff-tools %endif -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: tex(dvips) BuildRequires: tex(latex) %else @@ -33,7 +33,7 @@ without configuration. %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing @@ -41,7 +41,9 @@ applications that use %{name}. %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} +BuildArch: noarch +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < 0.42-1 %description doc The %{name}-doc package contains PDF documentation for using %{name}. @@ -51,20 +53,20 @@ The %{name}-doc package contains PDF documentation for using %{name}. %patch0 -p1 -b .makefile %build -# no configure script ships with libtommath. Its only requirement is ANSI C. +# no configure script ships with libtommath. Its only requirement is ANSI C. export CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared make %{?_smp_mflags} -f makefile poster manual docs %install -# There is no configure script that ships with libtommath but it does -# understand DESTDIR and it installs via that and the -# INSTALL_USER and INSTALL_GROUP environment variables. +# There is no configure script that ships with libtommath but it does understand +# DESTDIR and it installs via that and the INSTALL_USER and INSTALL_GROUP +# environment variables. export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) make install INCPATH=%{_includedir}/tommath DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared -find %{buildroot} -name '*.la' -exec rm -f {} ';' -find %{buildroot} -name '*.a' -exec rm -f {} ';' +find %{buildroot} -name '*.la' -delete +find %{buildroot} -name '*.a' -delete find %{buildroot} -name '*.h' -exec chmod 644 {} ';' %post -p /sbin/ldconfig @@ -83,6 +85,10 @@ find %{buildroot} -name '*.h' -exec chmod 644 {} ';' %doc bn.pdf poster.pdf tommath.pdf %changelog +* Thu Aug 08 2013 Simone Caronni - 0.42-1 +- Update to 0.42. +- Make doc package noarch and not requiring base package. + * Sat Aug 03 2013 Fedora Release Engineering - 0.41-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index f6552c3..3481602 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -96fafb55f86be27490957b89dea7b31b ltm-0.41.tar.bz2 +7380da904b020301be7045cb3a89039b ltm-0.42.0.tar.bz2 From 54c3dd9ca6a8a658206c100e8d836f39c6018b68 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 8 Aug 2013 16:28:37 +0200 Subject: [PATCH 19/59] Fix changelog and source permissions --- libtommath.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 6dc5106..456b3b3 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.42.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -65,9 +65,12 @@ make %{?_smp_mflags} -f makefile poster manual docs export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) make install INCPATH=%{_includedir}/tommath DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared +find %{buildroot} -name '*.h' -exec chmod 644 {} ';' +find %{buildroot} -name '*.c' -exec chmod 644 {} '; +chmod 644 LICENSE + find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete -find %{buildroot} -name '*.h' -exec chmod 644 {} ';' %post -p /sbin/ldconfig @@ -85,7 +88,11 @@ find %{buildroot} -name '*.h' -exec chmod 644 {} ';' %doc bn.pdf poster.pdf tommath.pdf %changelog -* Thu Aug 08 2013 Simone Caronni - 0.42-1 +* Thu Aug 08 2013 Simone Caronni - 0.42.0-2 +- Fix changelog entries. +- Remove executable bits from LICENSE file and source files. + +* Thu Aug 08 2013 Simone Caronni - 0.42.0-1 - Update to 0.42. - Make doc package noarch and not requiring base package. From 519166c45ca379234b82225a7511b397b14450ac Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 8 Aug 2013 16:38:49 +0200 Subject: [PATCH 20/59] Fix find commands --- libtommath.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 456b3b3..9c28242 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -65,8 +65,8 @@ make %{?_smp_mflags} -f makefile poster manual docs export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) make install INCPATH=%{_includedir}/tommath DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared -find %{buildroot} -name '*.h' -exec chmod 644 {} ';' -find %{buildroot} -name '*.c' -exec chmod 644 {} '; +find %{buildroot} -name '*.h' -exec chmod 644 {} \; +find %{buildroot} -name '*.c' -exec chmod 644 {} \; chmod 644 LICENSE find %{buildroot} -name '*.la' -delete From ec40d2fd5a59cdaedc9eebe1767fc3303c8bf2a9 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 29 Sep 2013 13:58:36 +0200 Subject: [PATCH 21/59] Move headers to default location. --- libtommath.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 9c28242..31799e0 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.42.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -64,7 +64,7 @@ make %{?_smp_mflags} -f makefile poster manual docs # environment variables. export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) -make install INCPATH=%{_includedir}/tommath DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared +make install DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared find %{buildroot} -name '*.h' -exec chmod 644 {} \; find %{buildroot} -name '*.c' -exec chmod 644 {} \; chmod 644 LICENSE @@ -81,13 +81,16 @@ find %{buildroot} -name '*.a' -delete %{_libdir}/*.so.* %files devel -%{_includedir}/tommath +%{_includedir}/*.h %{_libdir}/*.so %files doc %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sun Sep 29 2013 Simone Caronni - 0.42.0-3 +- Move headers to default location. + * Thu Aug 08 2013 Simone Caronni - 0.42.0-2 - Fix changelog entries. - Remove executable bits from LICENSE file and source files. From d220a71092c92f4228f2ae812c4560f517d6e1af Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 00:43:20 -0500 Subject: [PATCH 22/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 31799e0..191b569 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.42.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -88,6 +88,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 0.42.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun Sep 29 2013 Simone Caronni - 0.42.0-3 - Move headers to default location. From ed3ec95d4f805fb0e7f339d4c94970db252afdc9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 06:22:12 +0000 Subject: [PATCH 23/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 191b569..53af832 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.42.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -88,6 +88,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 0.42.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 0.42.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 71239bc8eb73ea6d72fcef3329decd289c43b874 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 17:26:42 +0000 Subject: [PATCH 24/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 53af832..185d3ed 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.42.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -88,6 +88,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 0.42.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sun Aug 17 2014 Fedora Release Engineering - 0.42.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From c5a0a5e61b9168cfb7ed7f09c2dcf2021655701b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 04:02:13 +0000 Subject: [PATCH 25/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 185d3ed..7228168 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 0.42.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm @@ -88,6 +88,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 0.42.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 1cf292d41951988a97a74afd34f6baff8a829ccb Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 23 Feb 2016 12:18:02 +0100 Subject: [PATCH 26/59] Update to 1.0 --- .gitignore | 1 + libtommath-makefile.patch | 37 - libtommath-tex.patch | 1791 +++++++++++++++++++++++++++++++++++++ libtommath.spec | 43 +- sources | 2 +- 5 files changed, 1828 insertions(+), 46 deletions(-) delete mode 100644 libtommath-makefile.patch create mode 100644 libtommath-tex.patch diff --git a/.gitignore b/.gitignore index b4a9572..5fa2ffb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ ltm-0.41.tar.bz2 /ltm-0.42.0.tar.bz2 +/ltm-1.0.tar.xz diff --git a/libtommath-makefile.patch b/libtommath-makefile.patch deleted file mode 100644 index c8e0c57..0000000 --- a/libtommath-makefile.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- libtommath-0.41.orig/makefile.shared 2007-03-10 16:45:11.000000000 -0700 -+++ libtommath-0.41/makefile.shared 2007-06-27 22:07:28.000000000 -0600 -@@ -10,13 +10,15 @@ - ifndef IGNORE_SPEED - - #for speed --CFLAGS += -O3 -funroll-loops -+# commented out for building in Fedora -+#CFLAGS += -O3 -funroll-loops - - #for size - #CFLAGS += -Os - - #x86 optimizations [should be valid for any GCC install though] --CFLAGS += -fomit-frame-pointer -+# commented out for rpm building in Fedora -+#CFLAGS += -fomit-frame-pointer - - endif - -@@ -48,8 +50,14 @@ - #INCPATH-The directory to install the header files for libtommath. - #DATAPATH-The directory to install the pdf docs. - DESTDIR= --LIBPATH=/usr/lib --INCPATH=/usr/include -+ -+ifndef LIBPATH -+ LIBPATH=/usr/lib -+endif -+ -+ifndef INCPATH -+ INCPATH=/usr/include -+endif - DATAPATH=/usr/share/doc/libtommath/pdf - - OBJECTS=bncore.o bn_mp_init.o bn_mp_clear.o bn_mp_exch.o bn_mp_grow.o bn_mp_shrink.o \ diff --git a/libtommath-tex.patch b/libtommath-tex.patch new file mode 100644 index 0000000..712a971 --- /dev/null +++ b/libtommath-tex.patch @@ -0,0 +1,1791 @@ +diff -Naur libtommath-1.0.old/bn.tex libtommath-1.0/bn.tex +--- libtommath-1.0.old/bn.tex 2016-02-23 11:24:13.632735129 +0100 ++++ libtommath-1.0/bn.tex 2016-02-23 11:43:13.580826898 +0100 +@@ -258,7 +258,7 @@ + So you may be thinking ``should I use LibTomMath?'' and the answer is a definite maybe. Let me tabulate what I think + are the pros and cons of LibTomMath by comparing it to the math routines from GnuPG\footnote{GnuPG v1.2.3 versus LibTomMath v0.28}. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|l|c|c|l|} +@@ -300,7 +300,7 @@ + There are three possible return codes a function may return. + + \index{MP\_OKAY}\index{MP\_YES}\index{MP\_NO}\index{MP\_VAL}\index{MP\_MEM} +-\begin{figure}[here!] ++\begin{figure}[h!] + \begin{center} + \begin{small} + \begin{tabular}{|l|l|} +@@ -823,7 +823,7 @@ + for any comparison. + + \index{MP\_GT} \index{MP\_EQ} \index{MP\_LT} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|c|c|} + \hline \textbf{Result Code} & \textbf{Meaning} \\ +@@ -1290,7 +1290,7 @@ + \end{alltt} + Where ``XXX'' is one of the following entries from the table \ref{fig:tuning}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|l|l|} +@@ -1739,7 +1739,7 @@ + (see fig. \ref{fig:primeopts}) which can be OR'ed together. The callback parameters are used as in + mp\_prime\_random(). + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|r|l|} +diff -Naur libtommath-1.0.old/tommath.src libtommath-1.0/tommath.src +--- libtommath-1.0.old/tommath.src 2016-02-03 19:07:27.000000000 +0100 ++++ libtommath-1.0/tommath.src 2016-02-23 11:46:48.428479620 +0100 +@@ -175,7 +175,7 @@ + typical RSA modulus would be at least greater than $10^{309}$. However, modern programming languages such as ISO C \cite{ISOC} and + Java \cite{JAVA} only provide instrinsic support for integers which are relatively small and single precision. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{center} + \begin{tabular}{|r|c|} + \hline \textbf{Data Type} & \textbf{Range} \\ +@@ -366,7 +366,7 @@ + exercises ranges from one (the easiest) to five (the hardest). The following table sumarizes the + scoring system used. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|c|l|} +@@ -573,7 +573,7 @@ + used within LibTomMath. + + \index{mp\_int} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + %\begin{verbatim} +@@ -670,7 +670,7 @@ + \textbf{int} data type with one of the following values (fig \ref{fig:errcodes}). + + \index{MP\_OKAY} \index{MP\_VAL} \index{MP\_MEM} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|l|l|} + \hline \textbf{Value} & \textbf{Meaning} \\ +@@ -719,7 +719,7 @@ + structure are set to valid values. The mp\_init algorithm will perform such an action. + + \index{mp\_init} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_init}. \\ +@@ -793,7 +793,7 @@ + When an mp\_int is no longer required by the application, the memory that has been allocated for its digits must be + returned to the application's memory pool with the mp\_clear algorithm. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_clear}. \\ +@@ -857,7 +857,7 @@ + is large enough to simply increase the \textbf{used} digit count. However, when the size of the array is too small it + must be re-sized appropriately to accomodate the result. The mp\_grow algorithm will provide this functionality. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_grow}. \\ +@@ -911,7 +911,7 @@ + of input mp\_ints to a given algorithm. The purpose of algorithm mp\_init\_size is similar to mp\_init except that it + will allocate \textit{at least} a specified number of digits. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -963,7 +963,7 @@ + The purpose of algorithm mp\_init\_multi is to initialize a variable length array of mp\_int structures in a single + statement. It is essentially a shortcut to multiple initializations. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_init\_multi}. \\ +@@ -1022,7 +1022,7 @@ + positive number which means that if the \textbf{used} count is decremented to zero, the sign must be set to + \textbf{MP\_ZPOS}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_clamp}. \\ +@@ -1090,7 +1090,7 @@ + a copy for the purposes of this text. The copy of the mp\_int will be a separate entity that represents the same + value as the mp\_int it was copied from. The mp\_copy algorithm provides this functionality. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_copy}. \\ +@@ -1205,7 +1205,7 @@ + useful within functions that need to modify an argument but do not wish to actually modify the original copy. The + mp\_init\_copy algorithm has been designed to help perform this task. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_init\_copy}. \\ +@@ -1235,7 +1235,7 @@ + Reseting an mp\_int to the default state is a common step in many algorithms. The mp\_zero algorithm will be the algorithm used to + perform this task. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_zero}. \\ +@@ -1265,7 +1265,7 @@ + With the mp\_int representation of an integer, calculating the absolute value is trivial. The mp\_abs algorithm will compute + the absolute value of an mp\_int. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_abs}. \\ +@@ -1297,7 +1297,7 @@ + With the mp\_int representation of an integer, calculating the negation is also trivial. The mp\_neg algorithm will compute + the negative of an mp\_int input. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_neg}. \\ +@@ -1334,7 +1334,7 @@ + \subsection{Setting Small Constants} + Often a mp\_int must be set to a relatively small value such as $1$ or $2$. For these cases the mp\_set algorithm is useful. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_set}. \\ +@@ -1375,7 +1375,7 @@ + To overcome the limitations of the mp\_set algorithm the mp\_set\_int algorithm is ideal. It accepts a ``long'' + data type as input and will always treat it as a 32-bit integer. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_set\_int}. \\ +@@ -1425,7 +1425,7 @@ + + To facilitate working with the results of the comparison functions three constants are required. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|r|l|} + \hline \textbf{Constant} & \textbf{Meaning} \\ +@@ -1438,7 +1438,7 @@ + \caption{Comparison Return Codes} + \end{figure} + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_cmp\_mag}. \\ +@@ -1479,7 +1479,7 @@ + Comparing with sign considerations is also fairly critical in several routines (\textit{division for example}). Based on an unsigned magnitude + comparison a trivial signed comparison algorithm can be written. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_cmp}. \\ +@@ -1560,7 +1560,7 @@ + Historically that convention stems from the MPI library where ``s\_'' stood for static functions that were hidden from the developer entirely. + + \newpage +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{center} + \begin{small} + \begin{tabular}{l} +@@ -1663,7 +1663,7 @@ + For example, the default for LibTomMath is to use a ``unsigned long'' for the mp\_digit ``type'' while $\beta = 2^{28}$. In ISO C an ``unsigned long'' + data type must be able to represent $0 \le x < 2^{32}$ meaning that in this case $\gamma \ge 32$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{center} + \begin{small} + \begin{tabular}{l} +@@ -1754,7 +1754,7 @@ + Recall from section 5.2 that an mp\_int represents an integer with an unsigned mantissa (\textit{the array of digits}) and a \textbf{sign} + flag. A high level addition is actually performed as a series of eight separate cases which can be optimized down to three unique cases. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_add}. \\ +@@ -1783,7 +1783,7 @@ + either \cite{TAOCPV2} or \cite{HAC} since they both only provide unsigned operations. The algorithm is fairly + straightforward but restricted since subtraction can only produce positive results. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|c|c|c|c|} +@@ -1833,7 +1833,7 @@ + \subsection{High Level Subtraction} + The high level signed subtraction algorithm is essentially the same as the high level signed addition algorithm. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_sub}. \\ +@@ -1865,7 +1865,7 @@ + \cite{HAC}. Also this algorithm is restricted by algorithm s\_mp\_sub. Chart \ref{fig:SubChart} lists the eight possible inputs and + the operations required. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{|c|c|c|c|c|} +@@ -1911,7 +1911,7 @@ + In a binary system where the radix is a power of two multiplication by two not only arises often in other algorithms it is a fairly efficient + operation to perform. A single precision logical shift left is sufficient to multiply a single digit by two. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -1967,7 +1967,7 @@ + \subsection{Division by Two} + A division by two can just as easily be accomplished with a logical shift right as multiplication by two can be with a logical shift left. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2024,7 +2024,7 @@ + degree. In this case $f(x) \cdot x = a_n x^{n+1} + a_{n-1} x^n + ... + a_0 x$. From a scalar basis point of view multiplying by $x$ is equivalent to + multiplying by the integer $\beta$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2080,7 +2080,7 @@ + + Division by powers of $x$ is easily achieved by shifting the digits right and removing any that will end up to the right of the zero'th digit. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2136,7 +2136,7 @@ + + \subsection{Multiplication by Power of Two} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2199,7 +2199,7 @@ + + \subsection{Division by Power of Two} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2252,7 +2252,7 @@ + The last algorithm in the series of polynomial basis power of two algorithms is calculating the remainder of division by $2^b$. This + algorithm benefits from the fact that in twos complement arithmetic $a \mbox{ (mod }2^b\mbox{)}$ is the same as $a$ AND $2^b - 1$. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2363,7 +2363,7 @@ + include $\alpha$ which shall represent the number of bits in the type \textbf{mp\_word}. This implies that $2^{\alpha} > 2 \cdot \beta^2$. The + constant $\delta = 2^{\alpha - 2lg(\beta)}$ will represent the maximal weight of any column in a product (\textit{see ~COMBA~ for more information}). + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2422,7 +2422,7 @@ + For example, consider multiplying $576$ by $241$. That is equivalent to computing $10^0(1)(576) + 10^1(4)(576) + 10^2(2)(576)$ which is best + visualized in the following table. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|c|c|c|c|c|c|l|} + \hline && & 5 & 7 & 6 & \\ +@@ -2500,7 +2500,7 @@ + Where $\vec x_n$ is the $n'th$ column of the output vector. Consider the following example which computes the vector $\vec x$ for the multiplication + of $576$ and $241$. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|c|c|c|c|c|} +@@ -2521,7 +2521,7 @@ + Now the columns must be fixed by propagating the carry upwards. The resultant vector will have one extra dimension over the input vector which is + congruent to adding a leading zero digit. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2577,7 +2577,7 @@ + the smaller input may not have more than $256$ digits if the Comba method is to be used. This is quite satisfactory for most applications since + $256$ digits would allow for numbers in the range of $0 \le x < 2^{7168}$ which, is much larger than most public key cryptographic algorithms require. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2783,7 +2783,7 @@ + of this system of equations has made Karatsuba fairly popular. In fact the cutoff point is often fairly low\footnote{With LibTomMath 0.18 it is 70 and 109 digits for the Intel P4 and AMD Athlon respectively.} + making it an ideal algorithm to speed up certain public key cryptosystems such as RSA and Diffie-Hellman. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2888,7 +2888,7 @@ + the algorithm can be faster than a baseline multiplication. However, the greater complexity of this algorithm places the cutoff point + (\textbf{TOOM\_MUL\_CUTOFF}) where Toom-Cook becomes more efficient much higher than the Karatsuba cutoff point. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2925,7 +2925,7 @@ + \caption{Algorithm mp\_toom\_mul} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2997,7 +2997,7 @@ + Now that algorithms to handle multiplications of every useful dimensions have been developed, a rather simple finishing touch is required. So far all + of the multiplication algorithms have been unsigned multiplications which leaves only a signed multiplication algorithm to be established. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3051,7 +3051,7 @@ + For any $n$-digit input, there are ${{\left (n^2 + n \right)}\over 2}$ possible unique single precision multiplications required compared to the $n^2$ + required for multiplication. The following diagram gives an example of the operations required. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{ccccc|c} + &&1&2&3&\\ +@@ -3080,7 +3080,7 @@ + The baseline squaring algorithm is meant to be a catch-all squaring algorithm. It will handle any of the input sizes that the faster routines + will not handle. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3159,7 +3159,7 @@ + mp\_word arrays. One array will hold the squares and the other array will hold the double products. With both arrays the doubling and + carry propagation can be moved to a $O(n)$ work level outside the $O(n^2)$ level. In this case, we have an even simpler solution in mind. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3249,7 +3249,7 @@ + The 100 digit halves will not be squared using Karatsuba, but instead using the faster Comba based squaring algorithm. If Karatsuba multiplication + were used instead, the 100 digit numbers would be squared with a slower Comba based multiplication. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3342,7 +3342,7 @@ + derive their own Toom-Cook squaring algorithm. + + \subsection{High Level Squaring} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3560,7 +3560,7 @@ + is considerably faster than the straightforward $3m^2$ method. + + \subsection{The Barrett Algorithm} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3634,7 +3634,7 @@ + In order to use algorithm mp\_reduce the value of $\mu$ must be calculated in advance. Ideally this value should be computed once and stored for + future use so that the Barrett algorithm can be used without delay. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3680,7 +3680,7 @@ + + From these two simple facts the following simple algorithm can be derived. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3706,7 +3706,7 @@ + final result of the Montgomery algorithm. If $k > lg(n)$ and $0 \le x < n^2$ then the final result is limited to + $0 \le r < \lfloor x/2^k \rfloor + n$. As a result at most a single subtraction is required to get the residue desired. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|l|} +@@ -3736,7 +3736,7 @@ + and $k^2$ single precision additions. At this rate the algorithm is most certainly slower than Barrett reduction and not terribly useful. + Fortunately there exists an alternative representation of the algorithm. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3758,7 +3758,7 @@ + This algorithm is equivalent since $2^tn$ is a multiple of $n$ and the lower $k$ bits of $x$ are zero by step 2. The number of single + precision shifts has now been reduced from $2k^2$ to $k^2 + k$ which is only a small improvement. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|l|r|} +@@ -3791,7 +3791,7 @@ + Instead of computing the reduction on a bit-by-bit basis it is actually much faster to compute it on digit-by-digit basis. Consider the + previous algorithm re-written to compute the Montgomery reduction in this new fashion. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3849,7 +3849,7 @@ + The baseline Montgomery reduction algorithm will produce the residue for any size input. It is designed to be a catch-all algororithm for + Montgomery reductions. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3933,7 +3933,7 @@ + With this change in place the Montgomery reduction algorithm can be performed with a Comba style multiplication loop which substantially increases + the speed of the algorithm. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4014,7 +4014,7 @@ + \subsection{Montgomery Setup} + To calculate the variable $\rho$ a relatively simple algorithm will be required. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4070,7 +4070,7 @@ + The variable $n$ reduces modulo $n - k$ to $k$. By putting $q = \lfloor x/n \rfloor$ and $r = x \mbox{ mod } n$ + into the equation the original congruence is reproduced, thus concluding the proof. The following algorithm is based on this observation. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4183,7 +4183,7 @@ + of $x$ and $q$. The resulting algorithm is very efficient and can lead to substantial improvements over Barrett and Montgomery reduction when modular + exponentiations are performed. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4249,7 +4249,7 @@ + To setup the restricted Diminished Radix algorithm the value $k = \beta - n_0$ is required. This algorithm is not really complicated but provided for + completeness. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4271,7 +4271,7 @@ + Another algorithm which will be useful is the ability to detect a restricted Diminished Radix modulus. An integer is said to be + of restricted Diminished Radix form if all of the digits are equal to $\beta - 1$ except the trailing digit which may be any value. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4304,7 +4304,7 @@ + In general the restricted Diminished Radix reduction algorithm is much faster since it has considerably lower overhead. However, this new + algorithm is much faster than either Montgomery or Barrett reduction when the moduli are of the appropriate form. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4346,7 +4346,7 @@ + \subsubsection{Unrestricted Setup} + To setup this reduction algorithm the value of $k = 2^p - n$ is required. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4385,7 +4385,7 @@ + that there will be value of $k$ that when added to the modulus causes a carry in the first digit which propagates all the way to the most + significant bit. The resulting sum will be a power of two. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4487,7 +4487,7 @@ + While this current method is a considerable speed up there are further improvements to be made. For example, the $a^{2^i}$ term does not need to + be computed in an auxilary variable. Consider the following equivalent algorithm. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4539,7 +4539,7 @@ + to be used when a small power of an input is required (\textit{e.g. $a^5$}). It is faster than simply multiplying $b - 1$ times for all values of + $b$ that are greater than three. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4590,7 +4590,7 @@ + computes the same exponentiation. A group of $k$ bits from the exponent is called a \textit{window}. That is it is a small window on only a + portion of the entire exponent. Consider the following modification to the basic left to right exponentiation algorithm. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4626,7 +4626,7 @@ + approach is to brute force search amongst the values $k = 2, 3, \ldots, 8$ for the lowest result. Table~\ref{fig:OPTK} lists optimal values of $k$ + for various exponent sizes and compares the number of multiplication and squarings required against algorithm~\ref{fig:LTOR}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|c|c|c|c|c|c|} +@@ -4655,7 +4655,7 @@ + + Table~\ref{fig:OPTK2} lists optimal values of $k$ for various exponent sizes and compares the work required against algorithm {\ref{fig:KARY}}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|c|c|c|c|c|c|} +@@ -4677,7 +4677,7 @@ + \label{fig:OPTK2} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4728,7 +4728,7 @@ + value of $(1/a) \mbox{ mod }c$ is computed using the modular inverse (\textit{see \ref{sec;modinv}}). If no inverse exists the algorithm + terminates with an error. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4780,7 +4780,7 @@ + + \subsection{Barrett Modular Exponentiation} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4830,7 +4830,7 @@ + \caption{Algorithm s\_mp\_exptmod} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4944,7 +4944,7 @@ + Calculating $b = 2^a$ can be performed much quicker than with any of the previous algorithms. Recall that a logical shift left $m << k$ is + equivalent to $m \cdot 2^k$. By this logic when $m = 1$ a quick power of two can be achieved. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4986,7 +4986,7 @@ + will be used. Let $x$ represent the divisor and $y$ represent the dividend. Let $q$ represent the integer quotient $\lfloor y / x \rfloor$ and + let $r$ represent the remainder $r = y - x \lfloor y / x \rfloor$. The following simple algorithm will be used to start the discussion. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5082,7 +5082,7 @@ + At most the quotient approaches $2\beta$, however, in practice this will not occur since that would imply the previous quotient digit was too small. + + \subsection{Radix-$\beta$ Division with Remainder} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5125,7 +5125,7 @@ + \caption{Algorithm mp\_div} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5248,7 +5248,7 @@ + Both addition and subtraction are performed by ``cheating'' and using mp\_set followed by the higher level addition or subtraction + algorithms. As a result these algorithms are subtantially simpler with a slight cost in performance. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5281,7 +5281,7 @@ + multiplication algorithm. Essentially this algorithm is a modified version of algorithm s\_mp\_mul\_digs where one of the multiplicands + only has one digit. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5323,7 +5323,7 @@ + Like the single digit multiplication algorithm, single digit division is also a fairly common algorithm used in radix conversion. Since the + divisor is only a single digit a specialized variant of the division algorithm can be used to compute the quotient. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5388,7 +5388,7 @@ + such as the real numbers. As a result the root found can be above the true root by few and must be manually adjusted. Ideally at the end of the + algorithm the $n$'th root $b$ of an integer $a$ is desired such that $b^n \le a$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5441,7 +5441,7 @@ + factoring for example, can make use of random values as starting points to find factors of a composite integer. In this case the algorithm presented + is solely for simulations and not intended for cryptographic use. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5483,7 +5483,7 @@ + such that they are printable. While outputting as base64 may not be too helpful for human operators it does allow communication via non binary + mediums. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{cc|cc|cc|cc} + \hline \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} \\ +@@ -5511,7 +5511,7 @@ + \label{fig:ASC} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5551,7 +5551,7 @@ + \subsection{Generating Radix-$n$ Output} + Generating radix-$n$ output is fairly trivial with a division and remainder algorithm. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5620,7 +5620,7 @@ + The most common approach (cite) is to reduce one input modulo another. That is if $a$ and $b$ are divisible by some integer $k$ and if $qa + r = b$ then + $r$ is also divisible by $k$. The reduction pattern follows $\left < a , b \right > \rightarrow \left < b, a \mbox{ mod } b \right >$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5646,7 +5646,7 @@ + greatest common divisors. The faster approach is based on the observation that if $k$ divides both $a$ and $b$ it will also divide $a - b$. + In particular, we would like $a - b$ to decrease in magnitude which implies that $b \ge a$. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5680,7 +5680,7 @@ + However, instead of factoring $b - a$ to find a suitable value of $p$ the powers of $p$ can be removed from $a$ and $b$ that are in common first. + Then inside the loop whenever $b - a$ is divisible by some power of $p$ it can be safely removed. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5725,7 +5725,7 @@ + The algorithms presented so far cannot handle inputs which are zero or negative. The following algorithm can handle all input cases properly + and will produce the greatest common divisor. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5812,7 +5812,7 @@ + Linear Feedback Shift Registers (LFSR) tend to use registers with periods which are co-prime (\textit{e.g. the greatest common divisor is one.}). + Similarly in number theory if a composite $n$ has two prime factors $p$ and $q$ then maximal order of any unit of $\Z/n\Z$ will be $[ p - 1, q - 1] $. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5935,7 +5935,7 @@ + factors of $p$ do not have to be known. Furthermore, if $(a, p) = 1$ then the algorithm will terminate when the recursion requests the + Jacobi symbol computation of $\left ( {1 \over a'} \right )$ which is simply $1$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6040,7 +6040,7 @@ + equation. + + \subsection{General Case} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6150,7 +6150,7 @@ + approximately $80\%$ of all candidate integers. The constant \textbf{PRIME\_SIZE} is equal to the number of primes in the test base. The + array \_\_prime\_tab is an array of the first \textbf{PRIME\_SIZE} prime numbers. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6196,7 +6196,7 @@ + integers known as Carmichael numbers will be a pseudo-prime to all valid bases. Fortunately such numbers are extremely rare as $n$ grows + in size. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6228,7 +6228,7 @@ + value must be equal to $-1$. The squarings are stopped as soon as $-1$ is observed. If the value of $1$ is observed first it means that + some value not congruent to $\pm 1$ when squared equals one which cannot occur if $n$ is prime. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +diff -Naur libtommath-1.0.old/tommath.tex libtommath-1.0/tommath.tex +--- libtommath-1.0.old/tommath.tex 2016-02-23 11:24:13.648735326 +0100 ++++ libtommath-1.0/tommath.tex 2016-02-23 11:43:13.591827034 +0100 +@@ -175,7 +175,7 @@ + typical RSA modulus would be at least greater than $10^{309}$. However, modern programming languages such as ISO C \cite{ISOC} and + Java \cite{JAVA} only provide instrinsic support for integers which are relatively small and single precision. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{center} + \begin{tabular}{|r|c|} + \hline \textbf{Data Type} & \textbf{Range} \\ +@@ -366,7 +366,7 @@ + exercises ranges from one (the easiest) to five (the hardest). The following table sumarizes the + scoring system used. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|c|l|} +@@ -534,7 +534,7 @@ + for new algorithms. This methodology allows new algorithms to be tested in a complete framework with relative ease. + + \begin{center} +-\begin{figure}[here] ++\begin{figure}[h] + \includegraphics{pics/design_process.ps} + \caption{Design Flow of the First Few Original LibTomMath Functions.} + \label{pic:design_process} +@@ -579,7 +579,7 @@ + used within LibTomMath. + + \index{mp\_int} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + %\begin{verbatim} +@@ -676,7 +676,7 @@ + \textbf{int} data type with one of the following values (fig \ref{fig:errcodes}). + + \index{MP\_OKAY} \index{MP\_VAL} \index{MP\_MEM} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|l|l|} + \hline \textbf{Value} & \textbf{Meaning} \\ +@@ -725,7 +725,7 @@ + structure are set to valid values. The mp\_init algorithm will perform such an action. + + \index{mp\_init} +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_init}. \\ +@@ -831,7 +831,7 @@ + When an mp\_int is no longer required by the application, the memory that has been allocated for its digits must be + returned to the application's memory pool with the mp\_clear algorithm. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_clear}. \\ +@@ -925,7 +925,7 @@ + is large enough to simply increase the \textbf{used} digit count. However, when the size of the array is too small it + must be re-sized appropriately to accomodate the result. The mp\_grow algorithm will provide this functionality. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_grow}. \\ +@@ -1022,7 +1022,7 @@ + of input mp\_ints to a given algorithm. The purpose of algorithm mp\_init\_size is similar to mp\_init except that it + will allocate \textit{at least} a specified number of digits. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -1108,7 +1108,7 @@ + The purpose of algorithm mp\_init\_multi is to initialize a variable length array of mp\_int structures in a single + statement. It is essentially a shortcut to multiple initializations. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_init\_multi}. \\ +@@ -1212,7 +1212,7 @@ + positive number which means that if the \textbf{used} count is decremented to zero, the sign must be set to + \textbf{MP\_ZPOS}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_clamp}. \\ +@@ -1310,7 +1310,7 @@ + a copy for the purposes of this text. The copy of the mp\_int will be a separate entity that represents the same + value as the mp\_int it was copied from. The mp\_copy algorithm provides this functionality. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_copy}. \\ +@@ -1479,7 +1479,7 @@ + useful within functions that need to modify an argument but do not wish to actually modify the original copy. The + mp\_init\_copy algorithm has been designed to help perform this task. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_init\_copy}. \\ +@@ -1527,7 +1527,7 @@ + Reseting an mp\_int to the default state is a common step in many algorithms. The mp\_zero algorithm will be the algorithm used to + perform this task. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_zero}. \\ +@@ -1579,7 +1579,7 @@ + With the mp\_int representation of an integer, calculating the absolute value is trivial. The mp\_abs algorithm will compute + the absolute value of an mp\_int. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_abs}. \\ +@@ -1640,7 +1640,7 @@ + With the mp\_int representation of an integer, calculating the negation is also trivial. The mp\_neg algorithm will compute + the negative of an mp\_int input. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_neg}. \\ +@@ -1703,7 +1703,7 @@ + \subsection{Setting Small Constants} + Often a mp\_int must be set to a relatively small value such as $1$ or $2$. For these cases the mp\_set algorithm is useful. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_set}. \\ +@@ -1759,7 +1759,7 @@ + To overcome the limitations of the mp\_set algorithm the mp\_set\_int algorithm is ideal. It accepts a ``long'' + data type as input and will always treat it as a 32-bit integer. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_set\_int}. \\ +@@ -1843,7 +1843,7 @@ + + To facilitate working with the results of the comparison functions three constants are required. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|r|l|} + \hline \textbf{Constant} & \textbf{Meaning} \\ +@@ -1856,7 +1856,7 @@ + \caption{Comparison Return Codes} + \end{figure} + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_cmp\_mag}. \\ +@@ -1938,7 +1938,7 @@ + Comparing with sign considerations is also fairly critical in several routines (\textit{division for example}). Based on an unsigned magnitude + comparison a trivial signed comparison algorithm can be written. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_cmp}. \\ +@@ -2047,7 +2047,7 @@ + Historically that convention stems from the MPI library where ``s\_'' stood for static functions that were hidden from the developer entirely. + + \newpage +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{center} + \begin{small} + \begin{tabular}{l} +@@ -2244,7 +2244,7 @@ + For example, the default for LibTomMath is to use a ``unsigned long'' for the mp\_digit ``type'' while $\beta = 2^{28}$. In ISO C an ``unsigned long'' + data type must be able to represent $0 \le x < 2^{32}$ meaning that in this case $\gamma \ge 32$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{center} + \begin{small} + \begin{tabular}{l} +@@ -2411,7 +2411,7 @@ + Recall from section 5.2 that an mp\_int represents an integer with an unsigned mantissa (\textit{the array of digits}) and a \textbf{sign} + flag. A high level addition is actually performed as a series of eight separate cases which can be optimized down to three unique cases. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_add}. \\ +@@ -2440,7 +2440,7 @@ + either \cite{TAOCPV2} or \cite{HAC} since they both only provide unsigned operations. The algorithm is fairly + straightforward but restricted since subtraction can only produce positive results. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|c|c|c|c|} +@@ -2529,7 +2529,7 @@ + \subsection{High Level Subtraction} + The high level signed subtraction algorithm is essentially the same as the high level signed addition algorithm. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{center} + \begin{tabular}{l} + \hline Algorithm \textbf{mp\_sub}. \\ +@@ -2561,7 +2561,7 @@ + \cite{HAC}. Also this algorithm is restricted by algorithm s\_mp\_sub. Chart \ref{fig:SubChart} lists the eight possible inputs and + the operations required. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{|c|c|c|c|c|} +@@ -2651,7 +2651,7 @@ + In a binary system where the radix is a power of two multiplication by two not only arises often in other algorithms it is a fairly efficient + operation to perform. A single precision logical shift left is sufficient to multiply a single digit by two. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2775,7 +2775,7 @@ + \subsection{Division by Two} + A division by two can just as easily be accomplished with a logical shift right as multiplication by two can be with a logical shift left. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2886,7 +2886,7 @@ + degree. In this case $f(x) \cdot x = a_n x^{n+1} + a_{n-1} x^n + ... + a_0 x$. From a scalar basis point of view multiplying by $x$ is equivalent to + multiplying by the integer $\beta$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -2929,7 +2929,7 @@ + + \newpage + \begin{center} +-\begin{figure}[here] ++\begin{figure}[h] + \includegraphics{pics/sliding_window.ps} + \caption{Sliding Window Movement} + \label{pic:sliding_window} +@@ -3001,7 +3001,7 @@ + + Division by powers of $x$ is easily achieved by shifting the digits right and removing any that will end up to the right of the zero'th digit. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3115,7 +3115,7 @@ + + \subsection{Multiplication by Power of Two} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3249,7 +3249,7 @@ + + \subsection{Division by Power of Two} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3387,7 +3387,7 @@ + The last algorithm in the series of polynomial basis power of two algorithms is calculating the remainder of division by $2^b$. This + algorithm benefits from the fact that in twos complement arithmetic $a \mbox{ (mod }2^b\mbox{)}$ is the same as $a$ AND $2^b - 1$. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3541,7 +3541,7 @@ + include $\alpha$ which shall represent the number of bits in the type \textbf{mp\_word}. This implies that $2^{\alpha} > 2 \cdot \beta^2$. The + constant $\delta = 2^{\alpha - 2lg(\beta)}$ will represent the maximal weight of any column in a product (\textit{see sub-section 5.2.2 for more information}). + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3600,7 +3600,7 @@ + For example, consider multiplying $576$ by $241$. That is equivalent to computing $10^0(1)(576) + 10^1(4)(576) + 10^2(2)(576)$ which is best + visualized in the following table. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{|c|c|c|c|c|c|l|} + \hline && & 5 & 7 & 6 & \\ +@@ -3753,7 +3753,7 @@ + Where $\vec x_n$ is the $n'th$ column of the output vector. Consider the following example which computes the vector $\vec x$ for the multiplication + of $576$ and $241$. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|c|c|c|c|c|} +@@ -3774,7 +3774,7 @@ + Now the columns must be fixed by propagating the carry upwards. The resultant vector will have one extra dimension over the input vector which is + congruent to adding a leading zero digit. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -3830,7 +3830,7 @@ + the smaller input may not have more than $256$ digits if the Comba method is to be used. This is quite satisfactory for most applications since + $256$ digits would allow for numbers in the range of $0 \le x < 2^{7168}$ which, is much larger than most public key cryptographic algorithms require. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4129,7 +4129,7 @@ + of this system of equations has made Karatsuba fairly popular. In fact the cutoff point is often fairly low\footnote{With LibTomMath 0.18 it is 70 and 109 digits for the Intel P4 and AMD Athlon respectively.} + making it an ideal algorithm to speed up certain public key cryptosystems such as RSA and Diffie-Hellman. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4387,7 +4387,7 @@ + the algorithm can be faster than a baseline multiplication. However, the greater complexity of this algorithm places the cutoff point + (\textbf{TOOM\_MUL\_CUTOFF}) where Toom-Cook becomes more efficient much higher than the Karatsuba cutoff point. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4424,7 +4424,7 @@ + \caption{Algorithm mp\_toom\_mul} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4768,7 +4768,7 @@ + Now that algorithms to handle multiplications of every useful dimensions have been developed, a rather simple finishing touch is required. So far all + of the multiplication algorithms have been unsigned multiplications which leaves only a signed multiplication algorithm to be established. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -4875,7 +4875,7 @@ + For any $n$-digit input, there are ${{\left (n^2 + n \right)}\over 2}$ possible unique single precision multiplications required compared to the $n^2$ + required for multiplication. The following diagram gives an example of the operations required. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{tabular}{ccccc|c} + &&1&2&3&\\ +@@ -4903,7 +4903,7 @@ + The baseline squaring algorithm is meant to be a catch-all squaring algorithm. It will handle any of the input sizes that the faster routines + will not handle. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5052,7 +5052,7 @@ + mp\_word arrays. One array will hold the squares and the other array will hold the double products. With both arrays the doubling and + carry propagation can be moved to a $O(n)$ work level outside the $O(n^2)$ level. In this case, we have an even simpler solution in mind. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5242,7 +5242,7 @@ + The 100 digit halves will not be squared using Karatsuba, but instead using the faster Comba based squaring algorithm. If Karatsuba multiplication + were used instead, the 100 digit numbers would be squared with a slower Comba based multiplication. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5442,7 +5442,7 @@ + derive their own Toom-Cook squaring algorithm. + + \subsection{High Level Squaring} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5705,7 +5705,7 @@ + is considerably faster than the straightforward $3m^2$ method. + + \subsection{The Barrett Algorithm} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5865,7 +5865,7 @@ + In order to use algorithm mp\_reduce the value of $\mu$ must be calculated in advance. Ideally this value should be computed once and stored for + future use so that the Barrett algorithm can be used without delay. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5931,7 +5931,7 @@ + + From these two simple facts the following simple algorithm can be derived. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -5957,7 +5957,7 @@ + final result of the Montgomery algorithm. If $k > lg(n)$ and $0 \le x < n^2$ then the final result is limited to + $0 \le r < \lfloor x/2^k \rfloor + n$. As a result at most a single subtraction is required to get the residue desired. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|l|} +@@ -5987,7 +5987,7 @@ + and $k^2$ single precision additions. At this rate the algorithm is most certainly slower than Barrett reduction and not terribly useful. + Fortunately there exists an alternative representation of the algorithm. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6009,7 +6009,7 @@ + This algorithm is equivalent since $2^tn$ is a multiple of $n$ and the lower $k$ bits of $x$ are zero by step 2. The number of single + precision shifts has now been reduced from $2k^2$ to $k^2 + k$ which is only a small improvement. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{small} + \begin{center} + \begin{tabular}{|c|l|r|} +@@ -6042,7 +6042,7 @@ + Instead of computing the reduction on a bit-by-bit basis it is actually much faster to compute it on digit-by-digit basis. Consider the + previous algorithm re-written to compute the Montgomery reduction in this new fashion. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6100,7 +6100,7 @@ + The baseline Montgomery reduction algorithm will produce the residue for any size input. It is designed to be a catch-all algororithm for + Montgomery reductions. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6287,7 +6287,7 @@ + With this change in place the Montgomery reduction algorithm can be performed with a Comba style multiplication loop which substantially increases + the speed of the algorithm. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6526,7 +6526,7 @@ + \subsection{Montgomery Setup} + To calculate the variable $\rho$ a relatively simple algorithm will be required. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6627,7 +6627,7 @@ + The variable $n$ reduces modulo $n - k$ to $k$. By putting $q = \lfloor x/n \rfloor$ and $r = x \mbox{ mod } n$ + into the equation the original congruence is reproduced, thus concluding the proof. The following algorithm is based on this observation. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6740,7 +6740,7 @@ + of $x$ and $q$. The resulting algorithm is very efficient and can lead to substantial improvements over Barrett and Montgomery reduction when modular + exponentiations are performed. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6888,7 +6888,7 @@ + To setup the restricted Diminished Radix algorithm the value $k = \beta - n_0$ is required. This algorithm is not really complicated but provided for + completeness. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6928,7 +6928,7 @@ + Another algorithm which will be useful is the ability to detect a restricted Diminished Radix modulus. An integer is said to be + of restricted Diminished Radix form if all of the digits are equal to $\beta - 1$ except the trailing digit which may be any value. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -6990,7 +6990,7 @@ + In general the restricted Diminished Radix reduction algorithm is much faster since it has considerably lower overhead. However, this new + algorithm is much faster than either Montgomery or Barrett reduction when the moduli are of the appropriate form. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7081,7 +7081,7 @@ + \subsubsection{Unrestricted Setup} + To setup this reduction algorithm the value of $k = 2^p - n$ is required. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7153,7 +7153,7 @@ + that there will be value of $k$ that when added to the modulus causes a carry in the first digit which propagates all the way to the most + significant bit. The resulting sum will be a power of two. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7293,7 +7293,7 @@ + While this current method is a considerable speed up there are further improvements to be made. For example, the $a^{2^i}$ term does not need to + be computed in an auxilary variable. Consider the following equivalent algorithm. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7345,7 +7345,7 @@ + to be used when a small power of an input is required (\textit{e.g. $a^5$}). It is faster than simply multiplying $b - 1$ times for all values of + $b$ that are greater than three. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7465,7 +7465,7 @@ + computes the same exponentiation. A group of $k$ bits from the exponent is called a \textit{window}. That is it is a small window on only a + portion of the entire exponent. Consider the following modification to the basic left to right exponentiation algorithm. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7501,7 +7501,7 @@ + approach is to brute force search amongst the values $k = 2, 3, \ldots, 8$ for the lowest result. Table~\ref{fig:OPTK} lists optimal values of $k$ + for various exponent sizes and compares the number of multiplication and squarings required against algorithm~\ref{fig:LTOR}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|c|c|c|c|c|c|} +@@ -7530,7 +7530,7 @@ + + Table~\ref{fig:OPTK2} lists optimal values of $k$ for various exponent sizes and compares the work required against algorithm {\ref{fig:KARY}}. + +-\begin{figure}[here] ++\begin{figure}[h] + \begin{center} + \begin{small} + \begin{tabular}{|c|c|c|c|c|c|} +@@ -7552,7 +7552,7 @@ + \label{fig:OPTK2} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7603,7 +7603,7 @@ + value of $(1/a) \mbox{ mod }c$ is computed using the modular inverse (\textit{see \ref{sec;modinv}}). If no inverse exists the algorithm + terminates with an error. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7754,7 +7754,7 @@ + + \subsection{Barrett Modular Exponentiation} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7804,7 +7804,7 @@ + \caption{Algorithm s\_mp\_exptmod} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -7896,7 +7896,7 @@ + the two cases of $mode = 1$ and $mode = 2$ respectively. + + \begin{center} +-\begin{figure}[here] ++\begin{figure}[h] + \includegraphics{pics/expt_state.ps} + \caption{Sliding Window State Diagram} + \label{pic:expt_state} +@@ -8163,7 +8163,7 @@ + Calculating $b = 2^a$ can be performed much quicker than with any of the previous algorithms. Recall that a logical shift left $m << k$ is + equivalent to $m \cdot 2^k$. By this logic when $m = 1$ a quick power of two can be achieved. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -8239,7 +8239,7 @@ + will be used. Let $x$ represent the divisor and $y$ represent the dividend. Let $q$ represent the integer quotient $\lfloor y / x \rfloor$ and + let $r$ represent the remainder $r = y - x \lfloor y / x \rfloor$. The following simple algorithm will be used to start the discussion. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -8335,7 +8335,7 @@ + At most the quotient approaches $2\beta$, however, in practice this will not occur since that would imply the previous quotient digit was too small. + + \subsection{Radix-$\beta$ Division with Remainder} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -8378,7 +8378,7 @@ + \caption{Algorithm mp\_div} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -8782,7 +8782,7 @@ + Both addition and subtraction are performed by ``cheating'' and using mp\_set followed by the higher level addition or subtraction + algorithms. As a result these algorithms are subtantially simpler with a slight cost in performance. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -8913,7 +8913,7 @@ + multiplication algorithm. Essentially this algorithm is a modified version of algorithm s\_mp\_mul\_digs where one of the multiplicands + only has one digit. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9020,7 +9020,7 @@ + Like the single digit multiplication algorithm, single digit division is also a fairly common algorithm used in radix conversion. Since the + divisor is only a single digit a specialized variant of the division algorithm can be used to compute the quotient. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9186,7 +9186,7 @@ + such as the real numbers. As a result the root found can be above the true root by few and must be manually adjusted. Ideally at the end of the + algorithm the $n$'th root $b$ of an integer $a$ is desired such that $b^n \le a$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9255,7 +9255,7 @@ + factoring for example, can make use of random values as starting points to find factors of a composite integer. In this case the algorithm presented + is solely for simulations and not intended for cryptographic use. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9339,7 +9339,7 @@ + such that they are printable. While outputting as base64 may not be too helpful for human operators it does allow communication via non binary + mediums. + +-\newpage\begin{figure}[here] ++\newpage\begin{figure}[h] + \begin{center} + \begin{tabular}{cc|cc|cc|cc} + \hline \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} \\ +@@ -9367,7 +9367,7 @@ + \label{fig:ASC} + \end{figure} + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9478,7 +9478,7 @@ + \subsection{Generating Radix-$n$ Output} + Generating radix-$n$ output is fairly trivial with a division and remainder algorithm. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9608,7 +9608,7 @@ + The most common approach (cite) is to reduce one input modulo another. That is if $a$ and $b$ are divisible by some integer $k$ and if $qa + r = b$ then + $r$ is also divisible by $k$. The reduction pattern follows $\left < a , b \right > \rightarrow \left < b, a \mbox{ mod } b \right >$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9634,7 +9634,7 @@ + greatest common divisors. The faster approach is based on the observation that if $k$ divides both $a$ and $b$ it will also divide $a - b$. + In particular, we would like $a - b$ to decrease in magnitude which implies that $b \ge a$. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9668,7 +9668,7 @@ + However, instead of factoring $b - a$ to find a suitable value of $p$ the powers of $p$ can be removed from $a$ and $b$ that are in common first. + Then inside the loop whenever $b - a$ is divisible by some power of $p$ it can be safely removed. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9713,7 +9713,7 @@ + The algorithms presented so far cannot handle inputs which are zero or negative. The following algorithm can handle all input cases properly + and will produce the greatest common divisor. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -9891,7 +9891,7 @@ + Linear Feedback Shift Registers (LFSR) tend to use registers with periods which are co-prime (\textit{e.g. the greatest common divisor is one.}). + Similarly in number theory if a composite $n$ has two prime factors $p$ and $q$ then maximal order of any unit of $\Z/n\Z$ will be $[ p - 1, q - 1] $. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -10060,7 +10060,7 @@ + factors of $p$ do not have to be known. Furthermore, if $(a, p) = 1$ then the algorithm will terminate when the recursion requests the + Jacobi symbol computation of $\left ( {1 \over a'} \right )$ which is simply $1$. + +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -10268,7 +10268,7 @@ + equation. + + \subsection{General Case} +-\newpage\begin{figure}[!here] ++\newpage\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -10407,7 +10407,7 @@ + approximately $80\%$ of all candidate integers. The constant \textbf{PRIME\_SIZE} is equal to the number of primes in the test base. The + array \_\_prime\_tab is an array of the first \textbf{PRIME\_SIZE} prime numbers. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -10536,7 +10536,7 @@ + integers known as Carmichael numbers will be a pseudo-prime to all valid bases. Fortunately such numbers are extremely rare as $n$ grows + in size. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} +@@ -10616,7 +10616,7 @@ + value must be equal to $-1$. The squarings are stopped as soon as $-1$ is observed. If the value of $1$ is observed first it means that + some value not congruent to $\pm 1$ when squared equals one which cannot occur if $n$ is prime. + +-\begin{figure}[!here] ++\begin{figure}[!h] + \begin{small} + \begin{center} + \begin{tabular}{l} diff --git a/libtommath.spec b/libtommath.spec index 7228168..ea3027d 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,12 +1,11 @@ Name: libtommath -Version: 0.42.0 -Release: 7%{?dist} +Version: 1.0 +Release: 1%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain -URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=ltm +URL: http://www.libtom.org/ -Source0: http://www.libtom.org/files/ltm-%{version}.tar.bz2 -Patch0: %{name}-makefile.patch +Source0: https://github.com/libtom/%{name}/releases/download/v%{version}/ltm-%{version}.tar.xz BuildRequires: ghostscript BuildRequires: libtool @@ -18,8 +17,22 @@ BuildRequires: libtiff-tools %endif %if 0%{?fedora} || 0%{?rhel} >= 7 +BuildRequires: tex(cmex10.pfb) +BuildRequires: tex(cmmi10.pfb) +BuildRequires: tex(cmmi5.pfb) +BuildRequires: tex(cmmi7.pfb) +BuildRequires: tex(cmr10.pfb) +BuildRequires: tex(cmr5.pfb) +BuildRequires: tex(cmr7.pfb) +BuildRequires: tex(cmsy10.pfb) +BuildRequires: tex(cmsy5.pfb) +BuildRequires: tex(cmsy7.pfb) BuildRequires: tex(dvips) +BuildRequires: tex(fmtutil.cnf) BuildRequires: tex(latex) +BuildRequires: tex(pd1enc.def) +BuildRequires: tex(pdftex.map) +BuildRequires: texlive-latex-bin-bin %else BuildRequires: tetex-dvips BuildRequires: tetex-latex @@ -50,13 +63,20 @@ The %{name}-doc package contains PDF documentation for using %{name}. %prep %setup -q -%patch0 -p1 -b .makefile +# Be verbose when calling latex so we can see what's breaking +sed -i -e 's|> /dev/null||g' makefile +# Latex syntax update +sed -i \ + -e 's|\[here\]|\[ht\]|g' \ + -e 's|\[here!\]|\[h!\]|g' \ + -e 's|\[!here\]|\[!ht\]|g' \ + *.{pl,src,tex} %build # no configure script ships with libtommath. Its only requirement is ANSI C. export CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared -make %{?_smp_mflags} -f makefile poster manual docs +make -f makefile poster manual docs %install # There is no configure script that ships with libtommath but it does understand @@ -77,7 +97,8 @@ find %{buildroot} -name '*.a' -delete %postun -p /sbin/ldconfig %files -%doc LICENSE +%{!?_licensedir:%global license %%doc} +%license LICENSE %{_libdir}/*.so.* %files devel @@ -88,6 +109,12 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Tue Feb 23 2016 Simone Caronni - 1.0-1 +- Fix FTBFS (#1307741). +- Update to 1.0. +- Update URL. +- Use license macro. + * Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 3481602..f662e64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7380da904b020301be7045cb3a89039b ltm-0.42.0.tar.bz2 +a95dc984d8409a6f355efb0831009a66 ltm-1.0.tar.xz From 7e9353113395708e79d52106f8d6ffc9a3f0d80c Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 23 Feb 2016 13:29:44 +0100 Subject: [PATCH 27/59] Cleanup SPEC file --- .gitignore | 1 + libtommath.spec | 21 ++++++++------------- sources | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 5fa2ffb..929b585 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ ltm-0.41.tar.bz2 /ltm-0.42.0.tar.bz2 /ltm-1.0.tar.xz +/libtommath-1.0.tar.gz diff --git a/libtommath.spec b/libtommath.spec index ea3027d..7ba2c55 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,11 +1,11 @@ Name: libtommath Version: 1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/ -Source0: https://github.com/libtom/%{name}/releases/download/v%{version}/ltm-%{version}.tar.xz +Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: ghostscript BuildRequires: libtool @@ -73,21 +73,12 @@ sed -i \ *.{pl,src,tex} %build -# no configure script ships with libtommath. Its only requirement is ANSI C. -export CFLAGS="$RPM_OPT_FLAGS" +export CFLAGS="%{optflags}" make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared make -f makefile poster manual docs %install -# There is no configure script that ships with libtommath but it does understand -# DESTDIR and it installs via that and the INSTALL_USER and INSTALL_GROUP -# environment variables. -export INSTALL_USER=$(id -un) -export INSTALL_GROUP=$(id -gn) -make install DESTDIR=%{buildroot} LIBPATH=%{_libdir} -f makefile.shared -find %{buildroot} -name '*.h' -exec chmod 644 {} \; -find %{buildroot} -name '*.c' -exec chmod 644 {} \; -chmod 644 LICENSE +%make_install LIBPATH=%{_libdir} -f makefile.shared find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete @@ -109,6 +100,10 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Tue Feb 23 2016 Simone Caronni - 1.0-2 +- Use proper source URL. +- Cleanup SPEC file. + * Tue Feb 23 2016 Simone Caronni - 1.0-1 - Fix FTBFS (#1307741). - Update to 1.0. diff --git a/sources b/sources index f662e64..4b1ba78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a95dc984d8409a6f355efb0831009a66 ltm-1.0.tar.xz +c62fbc717289f492246f8dd4dd72a602 libtommath-1.0.tar.gz From 90d49ade345646152ed04d2d20c93171f26bf7a9 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 23 Feb 2016 14:17:25 +0100 Subject: [PATCH 28/59] Remove unused patch --- libtommath-tex.patch | 1791 ------------------------------------------ 1 file changed, 1791 deletions(-) delete mode 100644 libtommath-tex.patch diff --git a/libtommath-tex.patch b/libtommath-tex.patch deleted file mode 100644 index 712a971..0000000 --- a/libtommath-tex.patch +++ /dev/null @@ -1,1791 +0,0 @@ -diff -Naur libtommath-1.0.old/bn.tex libtommath-1.0/bn.tex ---- libtommath-1.0.old/bn.tex 2016-02-23 11:24:13.632735129 +0100 -+++ libtommath-1.0/bn.tex 2016-02-23 11:43:13.580826898 +0100 -@@ -258,7 +258,7 @@ - So you may be thinking ``should I use LibTomMath?'' and the answer is a definite maybe. Let me tabulate what I think - are the pros and cons of LibTomMath by comparing it to the math routines from GnuPG\footnote{GnuPG v1.2.3 versus LibTomMath v0.28}. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|l|c|c|l|} -@@ -300,7 +300,7 @@ - There are three possible return codes a function may return. - - \index{MP\_OKAY}\index{MP\_YES}\index{MP\_NO}\index{MP\_VAL}\index{MP\_MEM} --\begin{figure}[here!] -+\begin{figure}[h!] - \begin{center} - \begin{small} - \begin{tabular}{|l|l|} -@@ -823,7 +823,7 @@ - for any comparison. - - \index{MP\_GT} \index{MP\_EQ} \index{MP\_LT} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|c|c|} - \hline \textbf{Result Code} & \textbf{Meaning} \\ -@@ -1290,7 +1290,7 @@ - \end{alltt} - Where ``XXX'' is one of the following entries from the table \ref{fig:tuning}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|l|l|} -@@ -1739,7 +1739,7 @@ - (see fig. \ref{fig:primeopts}) which can be OR'ed together. The callback parameters are used as in - mp\_prime\_random(). - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|r|l|} -diff -Naur libtommath-1.0.old/tommath.src libtommath-1.0/tommath.src ---- libtommath-1.0.old/tommath.src 2016-02-03 19:07:27.000000000 +0100 -+++ libtommath-1.0/tommath.src 2016-02-23 11:46:48.428479620 +0100 -@@ -175,7 +175,7 @@ - typical RSA modulus would be at least greater than $10^{309}$. However, modern programming languages such as ISO C \cite{ISOC} and - Java \cite{JAVA} only provide instrinsic support for integers which are relatively small and single precision. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{center} - \begin{tabular}{|r|c|} - \hline \textbf{Data Type} & \textbf{Range} \\ -@@ -366,7 +366,7 @@ - exercises ranges from one (the easiest) to five (the hardest). The following table sumarizes the - scoring system used. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|c|l|} -@@ -573,7 +573,7 @@ - used within LibTomMath. - - \index{mp\_int} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - %\begin{verbatim} -@@ -670,7 +670,7 @@ - \textbf{int} data type with one of the following values (fig \ref{fig:errcodes}). - - \index{MP\_OKAY} \index{MP\_VAL} \index{MP\_MEM} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|l|l|} - \hline \textbf{Value} & \textbf{Meaning} \\ -@@ -719,7 +719,7 @@ - structure are set to valid values. The mp\_init algorithm will perform such an action. - - \index{mp\_init} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_init}. \\ -@@ -793,7 +793,7 @@ - When an mp\_int is no longer required by the application, the memory that has been allocated for its digits must be - returned to the application's memory pool with the mp\_clear algorithm. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_clear}. \\ -@@ -857,7 +857,7 @@ - is large enough to simply increase the \textbf{used} digit count. However, when the size of the array is too small it - must be re-sized appropriately to accomodate the result. The mp\_grow algorithm will provide this functionality. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_grow}. \\ -@@ -911,7 +911,7 @@ - of input mp\_ints to a given algorithm. The purpose of algorithm mp\_init\_size is similar to mp\_init except that it - will allocate \textit{at least} a specified number of digits. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -963,7 +963,7 @@ - The purpose of algorithm mp\_init\_multi is to initialize a variable length array of mp\_int structures in a single - statement. It is essentially a shortcut to multiple initializations. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_init\_multi}. \\ -@@ -1022,7 +1022,7 @@ - positive number which means that if the \textbf{used} count is decremented to zero, the sign must be set to - \textbf{MP\_ZPOS}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_clamp}. \\ -@@ -1090,7 +1090,7 @@ - a copy for the purposes of this text. The copy of the mp\_int will be a separate entity that represents the same - value as the mp\_int it was copied from. The mp\_copy algorithm provides this functionality. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_copy}. \\ -@@ -1205,7 +1205,7 @@ - useful within functions that need to modify an argument but do not wish to actually modify the original copy. The - mp\_init\_copy algorithm has been designed to help perform this task. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_init\_copy}. \\ -@@ -1235,7 +1235,7 @@ - Reseting an mp\_int to the default state is a common step in many algorithms. The mp\_zero algorithm will be the algorithm used to - perform this task. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_zero}. \\ -@@ -1265,7 +1265,7 @@ - With the mp\_int representation of an integer, calculating the absolute value is trivial. The mp\_abs algorithm will compute - the absolute value of an mp\_int. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_abs}. \\ -@@ -1297,7 +1297,7 @@ - With the mp\_int representation of an integer, calculating the negation is also trivial. The mp\_neg algorithm will compute - the negative of an mp\_int input. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_neg}. \\ -@@ -1334,7 +1334,7 @@ - \subsection{Setting Small Constants} - Often a mp\_int must be set to a relatively small value such as $1$ or $2$. For these cases the mp\_set algorithm is useful. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_set}. \\ -@@ -1375,7 +1375,7 @@ - To overcome the limitations of the mp\_set algorithm the mp\_set\_int algorithm is ideal. It accepts a ``long'' - data type as input and will always treat it as a 32-bit integer. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_set\_int}. \\ -@@ -1425,7 +1425,7 @@ - - To facilitate working with the results of the comparison functions three constants are required. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|r|l|} - \hline \textbf{Constant} & \textbf{Meaning} \\ -@@ -1438,7 +1438,7 @@ - \caption{Comparison Return Codes} - \end{figure} - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_cmp\_mag}. \\ -@@ -1479,7 +1479,7 @@ - Comparing with sign considerations is also fairly critical in several routines (\textit{division for example}). Based on an unsigned magnitude - comparison a trivial signed comparison algorithm can be written. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_cmp}. \\ -@@ -1560,7 +1560,7 @@ - Historically that convention stems from the MPI library where ``s\_'' stood for static functions that were hidden from the developer entirely. - - \newpage --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{center} - \begin{small} - \begin{tabular}{l} -@@ -1663,7 +1663,7 @@ - For example, the default for LibTomMath is to use a ``unsigned long'' for the mp\_digit ``type'' while $\beta = 2^{28}$. In ISO C an ``unsigned long'' - data type must be able to represent $0 \le x < 2^{32}$ meaning that in this case $\gamma \ge 32$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{center} - \begin{small} - \begin{tabular}{l} -@@ -1754,7 +1754,7 @@ - Recall from section 5.2 that an mp\_int represents an integer with an unsigned mantissa (\textit{the array of digits}) and a \textbf{sign} - flag. A high level addition is actually performed as a series of eight separate cases which can be optimized down to three unique cases. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_add}. \\ -@@ -1783,7 +1783,7 @@ - either \cite{TAOCPV2} or \cite{HAC} since they both only provide unsigned operations. The algorithm is fairly - straightforward but restricted since subtraction can only produce positive results. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|c|c|c|c|} -@@ -1833,7 +1833,7 @@ - \subsection{High Level Subtraction} - The high level signed subtraction algorithm is essentially the same as the high level signed addition algorithm. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_sub}. \\ -@@ -1865,7 +1865,7 @@ - \cite{HAC}. Also this algorithm is restricted by algorithm s\_mp\_sub. Chart \ref{fig:SubChart} lists the eight possible inputs and - the operations required. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{|c|c|c|c|c|} -@@ -1911,7 +1911,7 @@ - In a binary system where the radix is a power of two multiplication by two not only arises often in other algorithms it is a fairly efficient - operation to perform. A single precision logical shift left is sufficient to multiply a single digit by two. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -1967,7 +1967,7 @@ - \subsection{Division by Two} - A division by two can just as easily be accomplished with a logical shift right as multiplication by two can be with a logical shift left. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2024,7 +2024,7 @@ - degree. In this case $f(x) \cdot x = a_n x^{n+1} + a_{n-1} x^n + ... + a_0 x$. From a scalar basis point of view multiplying by $x$ is equivalent to - multiplying by the integer $\beta$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2080,7 +2080,7 @@ - - Division by powers of $x$ is easily achieved by shifting the digits right and removing any that will end up to the right of the zero'th digit. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2136,7 +2136,7 @@ - - \subsection{Multiplication by Power of Two} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2199,7 +2199,7 @@ - - \subsection{Division by Power of Two} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2252,7 +2252,7 @@ - The last algorithm in the series of polynomial basis power of two algorithms is calculating the remainder of division by $2^b$. This - algorithm benefits from the fact that in twos complement arithmetic $a \mbox{ (mod }2^b\mbox{)}$ is the same as $a$ AND $2^b - 1$. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2363,7 +2363,7 @@ - include $\alpha$ which shall represent the number of bits in the type \textbf{mp\_word}. This implies that $2^{\alpha} > 2 \cdot \beta^2$. The - constant $\delta = 2^{\alpha - 2lg(\beta)}$ will represent the maximal weight of any column in a product (\textit{see ~COMBA~ for more information}). - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2422,7 +2422,7 @@ - For example, consider multiplying $576$ by $241$. That is equivalent to computing $10^0(1)(576) + 10^1(4)(576) + 10^2(2)(576)$ which is best - visualized in the following table. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|c|c|c|c|c|c|l|} - \hline && & 5 & 7 & 6 & \\ -@@ -2500,7 +2500,7 @@ - Where $\vec x_n$ is the $n'th$ column of the output vector. Consider the following example which computes the vector $\vec x$ for the multiplication - of $576$ and $241$. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|c|c|c|c|c|} -@@ -2521,7 +2521,7 @@ - Now the columns must be fixed by propagating the carry upwards. The resultant vector will have one extra dimension over the input vector which is - congruent to adding a leading zero digit. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2577,7 +2577,7 @@ - the smaller input may not have more than $256$ digits if the Comba method is to be used. This is quite satisfactory for most applications since - $256$ digits would allow for numbers in the range of $0 \le x < 2^{7168}$ which, is much larger than most public key cryptographic algorithms require. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2783,7 +2783,7 @@ - of this system of equations has made Karatsuba fairly popular. In fact the cutoff point is often fairly low\footnote{With LibTomMath 0.18 it is 70 and 109 digits for the Intel P4 and AMD Athlon respectively.} - making it an ideal algorithm to speed up certain public key cryptosystems such as RSA and Diffie-Hellman. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2888,7 +2888,7 @@ - the algorithm can be faster than a baseline multiplication. However, the greater complexity of this algorithm places the cutoff point - (\textbf{TOOM\_MUL\_CUTOFF}) where Toom-Cook becomes more efficient much higher than the Karatsuba cutoff point. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2925,7 +2925,7 @@ - \caption{Algorithm mp\_toom\_mul} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2997,7 +2997,7 @@ - Now that algorithms to handle multiplications of every useful dimensions have been developed, a rather simple finishing touch is required. So far all - of the multiplication algorithms have been unsigned multiplications which leaves only a signed multiplication algorithm to be established. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3051,7 +3051,7 @@ - For any $n$-digit input, there are ${{\left (n^2 + n \right)}\over 2}$ possible unique single precision multiplications required compared to the $n^2$ - required for multiplication. The following diagram gives an example of the operations required. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{ccccc|c} - &&1&2&3&\\ -@@ -3080,7 +3080,7 @@ - The baseline squaring algorithm is meant to be a catch-all squaring algorithm. It will handle any of the input sizes that the faster routines - will not handle. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3159,7 +3159,7 @@ - mp\_word arrays. One array will hold the squares and the other array will hold the double products. With both arrays the doubling and - carry propagation can be moved to a $O(n)$ work level outside the $O(n^2)$ level. In this case, we have an even simpler solution in mind. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3249,7 +3249,7 @@ - The 100 digit halves will not be squared using Karatsuba, but instead using the faster Comba based squaring algorithm. If Karatsuba multiplication - were used instead, the 100 digit numbers would be squared with a slower Comba based multiplication. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3342,7 +3342,7 @@ - derive their own Toom-Cook squaring algorithm. - - \subsection{High Level Squaring} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3560,7 +3560,7 @@ - is considerably faster than the straightforward $3m^2$ method. - - \subsection{The Barrett Algorithm} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3634,7 +3634,7 @@ - In order to use algorithm mp\_reduce the value of $\mu$ must be calculated in advance. Ideally this value should be computed once and stored for - future use so that the Barrett algorithm can be used without delay. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3680,7 +3680,7 @@ - - From these two simple facts the following simple algorithm can be derived. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3706,7 +3706,7 @@ - final result of the Montgomery algorithm. If $k > lg(n)$ and $0 \le x < n^2$ then the final result is limited to - $0 \le r < \lfloor x/2^k \rfloor + n$. As a result at most a single subtraction is required to get the residue desired. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|l|} -@@ -3736,7 +3736,7 @@ - and $k^2$ single precision additions. At this rate the algorithm is most certainly slower than Barrett reduction and not terribly useful. - Fortunately there exists an alternative representation of the algorithm. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3758,7 +3758,7 @@ - This algorithm is equivalent since $2^tn$ is a multiple of $n$ and the lower $k$ bits of $x$ are zero by step 2. The number of single - precision shifts has now been reduced from $2k^2$ to $k^2 + k$ which is only a small improvement. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|l|r|} -@@ -3791,7 +3791,7 @@ - Instead of computing the reduction on a bit-by-bit basis it is actually much faster to compute it on digit-by-digit basis. Consider the - previous algorithm re-written to compute the Montgomery reduction in this new fashion. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3849,7 +3849,7 @@ - The baseline Montgomery reduction algorithm will produce the residue for any size input. It is designed to be a catch-all algororithm for - Montgomery reductions. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3933,7 +3933,7 @@ - With this change in place the Montgomery reduction algorithm can be performed with a Comba style multiplication loop which substantially increases - the speed of the algorithm. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4014,7 +4014,7 @@ - \subsection{Montgomery Setup} - To calculate the variable $\rho$ a relatively simple algorithm will be required. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4070,7 +4070,7 @@ - The variable $n$ reduces modulo $n - k$ to $k$. By putting $q = \lfloor x/n \rfloor$ and $r = x \mbox{ mod } n$ - into the equation the original congruence is reproduced, thus concluding the proof. The following algorithm is based on this observation. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4183,7 +4183,7 @@ - of $x$ and $q$. The resulting algorithm is very efficient and can lead to substantial improvements over Barrett and Montgomery reduction when modular - exponentiations are performed. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4249,7 +4249,7 @@ - To setup the restricted Diminished Radix algorithm the value $k = \beta - n_0$ is required. This algorithm is not really complicated but provided for - completeness. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4271,7 +4271,7 @@ - Another algorithm which will be useful is the ability to detect a restricted Diminished Radix modulus. An integer is said to be - of restricted Diminished Radix form if all of the digits are equal to $\beta - 1$ except the trailing digit which may be any value. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4304,7 +4304,7 @@ - In general the restricted Diminished Radix reduction algorithm is much faster since it has considerably lower overhead. However, this new - algorithm is much faster than either Montgomery or Barrett reduction when the moduli are of the appropriate form. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4346,7 +4346,7 @@ - \subsubsection{Unrestricted Setup} - To setup this reduction algorithm the value of $k = 2^p - n$ is required. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4385,7 +4385,7 @@ - that there will be value of $k$ that when added to the modulus causes a carry in the first digit which propagates all the way to the most - significant bit. The resulting sum will be a power of two. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4487,7 +4487,7 @@ - While this current method is a considerable speed up there are further improvements to be made. For example, the $a^{2^i}$ term does not need to - be computed in an auxilary variable. Consider the following equivalent algorithm. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4539,7 +4539,7 @@ - to be used when a small power of an input is required (\textit{e.g. $a^5$}). It is faster than simply multiplying $b - 1$ times for all values of - $b$ that are greater than three. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4590,7 +4590,7 @@ - computes the same exponentiation. A group of $k$ bits from the exponent is called a \textit{window}. That is it is a small window on only a - portion of the entire exponent. Consider the following modification to the basic left to right exponentiation algorithm. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4626,7 +4626,7 @@ - approach is to brute force search amongst the values $k = 2, 3, \ldots, 8$ for the lowest result. Table~\ref{fig:OPTK} lists optimal values of $k$ - for various exponent sizes and compares the number of multiplication and squarings required against algorithm~\ref{fig:LTOR}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|c|c|c|c|c|c|} -@@ -4655,7 +4655,7 @@ - - Table~\ref{fig:OPTK2} lists optimal values of $k$ for various exponent sizes and compares the work required against algorithm {\ref{fig:KARY}}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|c|c|c|c|c|c|} -@@ -4677,7 +4677,7 @@ - \label{fig:OPTK2} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4728,7 +4728,7 @@ - value of $(1/a) \mbox{ mod }c$ is computed using the modular inverse (\textit{see \ref{sec;modinv}}). If no inverse exists the algorithm - terminates with an error. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4780,7 +4780,7 @@ - - \subsection{Barrett Modular Exponentiation} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4830,7 +4830,7 @@ - \caption{Algorithm s\_mp\_exptmod} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4944,7 +4944,7 @@ - Calculating $b = 2^a$ can be performed much quicker than with any of the previous algorithms. Recall that a logical shift left $m << k$ is - equivalent to $m \cdot 2^k$. By this logic when $m = 1$ a quick power of two can be achieved. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4986,7 +4986,7 @@ - will be used. Let $x$ represent the divisor and $y$ represent the dividend. Let $q$ represent the integer quotient $\lfloor y / x \rfloor$ and - let $r$ represent the remainder $r = y - x \lfloor y / x \rfloor$. The following simple algorithm will be used to start the discussion. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5082,7 +5082,7 @@ - At most the quotient approaches $2\beta$, however, in practice this will not occur since that would imply the previous quotient digit was too small. - - \subsection{Radix-$\beta$ Division with Remainder} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5125,7 +5125,7 @@ - \caption{Algorithm mp\_div} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5248,7 +5248,7 @@ - Both addition and subtraction are performed by ``cheating'' and using mp\_set followed by the higher level addition or subtraction - algorithms. As a result these algorithms are subtantially simpler with a slight cost in performance. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5281,7 +5281,7 @@ - multiplication algorithm. Essentially this algorithm is a modified version of algorithm s\_mp\_mul\_digs where one of the multiplicands - only has one digit. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5323,7 +5323,7 @@ - Like the single digit multiplication algorithm, single digit division is also a fairly common algorithm used in radix conversion. Since the - divisor is only a single digit a specialized variant of the division algorithm can be used to compute the quotient. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5388,7 +5388,7 @@ - such as the real numbers. As a result the root found can be above the true root by few and must be manually adjusted. Ideally at the end of the - algorithm the $n$'th root $b$ of an integer $a$ is desired such that $b^n \le a$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5441,7 +5441,7 @@ - factoring for example, can make use of random values as starting points to find factors of a composite integer. In this case the algorithm presented - is solely for simulations and not intended for cryptographic use. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5483,7 +5483,7 @@ - such that they are printable. While outputting as base64 may not be too helpful for human operators it does allow communication via non binary - mediums. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{cc|cc|cc|cc} - \hline \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} \\ -@@ -5511,7 +5511,7 @@ - \label{fig:ASC} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5551,7 +5551,7 @@ - \subsection{Generating Radix-$n$ Output} - Generating radix-$n$ output is fairly trivial with a division and remainder algorithm. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5620,7 +5620,7 @@ - The most common approach (cite) is to reduce one input modulo another. That is if $a$ and $b$ are divisible by some integer $k$ and if $qa + r = b$ then - $r$ is also divisible by $k$. The reduction pattern follows $\left < a , b \right > \rightarrow \left < b, a \mbox{ mod } b \right >$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5646,7 +5646,7 @@ - greatest common divisors. The faster approach is based on the observation that if $k$ divides both $a$ and $b$ it will also divide $a - b$. - In particular, we would like $a - b$ to decrease in magnitude which implies that $b \ge a$. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5680,7 +5680,7 @@ - However, instead of factoring $b - a$ to find a suitable value of $p$ the powers of $p$ can be removed from $a$ and $b$ that are in common first. - Then inside the loop whenever $b - a$ is divisible by some power of $p$ it can be safely removed. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5725,7 +5725,7 @@ - The algorithms presented so far cannot handle inputs which are zero or negative. The following algorithm can handle all input cases properly - and will produce the greatest common divisor. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5812,7 +5812,7 @@ - Linear Feedback Shift Registers (LFSR) tend to use registers with periods which are co-prime (\textit{e.g. the greatest common divisor is one.}). - Similarly in number theory if a composite $n$ has two prime factors $p$ and $q$ then maximal order of any unit of $\Z/n\Z$ will be $[ p - 1, q - 1] $. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5935,7 +5935,7 @@ - factors of $p$ do not have to be known. Furthermore, if $(a, p) = 1$ then the algorithm will terminate when the recursion requests the - Jacobi symbol computation of $\left ( {1 \over a'} \right )$ which is simply $1$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6040,7 +6040,7 @@ - equation. - - \subsection{General Case} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6150,7 +6150,7 @@ - approximately $80\%$ of all candidate integers. The constant \textbf{PRIME\_SIZE} is equal to the number of primes in the test base. The - array \_\_prime\_tab is an array of the first \textbf{PRIME\_SIZE} prime numbers. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6196,7 +6196,7 @@ - integers known as Carmichael numbers will be a pseudo-prime to all valid bases. Fortunately such numbers are extremely rare as $n$ grows - in size. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6228,7 +6228,7 @@ - value must be equal to $-1$. The squarings are stopped as soon as $-1$ is observed. If the value of $1$ is observed first it means that - some value not congruent to $\pm 1$ when squared equals one which cannot occur if $n$ is prime. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -diff -Naur libtommath-1.0.old/tommath.tex libtommath-1.0/tommath.tex ---- libtommath-1.0.old/tommath.tex 2016-02-23 11:24:13.648735326 +0100 -+++ libtommath-1.0/tommath.tex 2016-02-23 11:43:13.591827034 +0100 -@@ -175,7 +175,7 @@ - typical RSA modulus would be at least greater than $10^{309}$. However, modern programming languages such as ISO C \cite{ISOC} and - Java \cite{JAVA} only provide instrinsic support for integers which are relatively small and single precision. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{center} - \begin{tabular}{|r|c|} - \hline \textbf{Data Type} & \textbf{Range} \\ -@@ -366,7 +366,7 @@ - exercises ranges from one (the easiest) to five (the hardest). The following table sumarizes the - scoring system used. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|c|l|} -@@ -534,7 +534,7 @@ - for new algorithms. This methodology allows new algorithms to be tested in a complete framework with relative ease. - - \begin{center} --\begin{figure}[here] -+\begin{figure}[h] - \includegraphics{pics/design_process.ps} - \caption{Design Flow of the First Few Original LibTomMath Functions.} - \label{pic:design_process} -@@ -579,7 +579,7 @@ - used within LibTomMath. - - \index{mp\_int} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - %\begin{verbatim} -@@ -676,7 +676,7 @@ - \textbf{int} data type with one of the following values (fig \ref{fig:errcodes}). - - \index{MP\_OKAY} \index{MP\_VAL} \index{MP\_MEM} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|l|l|} - \hline \textbf{Value} & \textbf{Meaning} \\ -@@ -725,7 +725,7 @@ - structure are set to valid values. The mp\_init algorithm will perform such an action. - - \index{mp\_init} --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_init}. \\ -@@ -831,7 +831,7 @@ - When an mp\_int is no longer required by the application, the memory that has been allocated for its digits must be - returned to the application's memory pool with the mp\_clear algorithm. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_clear}. \\ -@@ -925,7 +925,7 @@ - is large enough to simply increase the \textbf{used} digit count. However, when the size of the array is too small it - must be re-sized appropriately to accomodate the result. The mp\_grow algorithm will provide this functionality. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_grow}. \\ -@@ -1022,7 +1022,7 @@ - of input mp\_ints to a given algorithm. The purpose of algorithm mp\_init\_size is similar to mp\_init except that it - will allocate \textit{at least} a specified number of digits. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -1108,7 +1108,7 @@ - The purpose of algorithm mp\_init\_multi is to initialize a variable length array of mp\_int structures in a single - statement. It is essentially a shortcut to multiple initializations. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_init\_multi}. \\ -@@ -1212,7 +1212,7 @@ - positive number which means that if the \textbf{used} count is decremented to zero, the sign must be set to - \textbf{MP\_ZPOS}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_clamp}. \\ -@@ -1310,7 +1310,7 @@ - a copy for the purposes of this text. The copy of the mp\_int will be a separate entity that represents the same - value as the mp\_int it was copied from. The mp\_copy algorithm provides this functionality. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_copy}. \\ -@@ -1479,7 +1479,7 @@ - useful within functions that need to modify an argument but do not wish to actually modify the original copy. The - mp\_init\_copy algorithm has been designed to help perform this task. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_init\_copy}. \\ -@@ -1527,7 +1527,7 @@ - Reseting an mp\_int to the default state is a common step in many algorithms. The mp\_zero algorithm will be the algorithm used to - perform this task. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_zero}. \\ -@@ -1579,7 +1579,7 @@ - With the mp\_int representation of an integer, calculating the absolute value is trivial. The mp\_abs algorithm will compute - the absolute value of an mp\_int. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_abs}. \\ -@@ -1640,7 +1640,7 @@ - With the mp\_int representation of an integer, calculating the negation is also trivial. The mp\_neg algorithm will compute - the negative of an mp\_int input. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_neg}. \\ -@@ -1703,7 +1703,7 @@ - \subsection{Setting Small Constants} - Often a mp\_int must be set to a relatively small value such as $1$ or $2$. For these cases the mp\_set algorithm is useful. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_set}. \\ -@@ -1759,7 +1759,7 @@ - To overcome the limitations of the mp\_set algorithm the mp\_set\_int algorithm is ideal. It accepts a ``long'' - data type as input and will always treat it as a 32-bit integer. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_set\_int}. \\ -@@ -1843,7 +1843,7 @@ - - To facilitate working with the results of the comparison functions three constants are required. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|r|l|} - \hline \textbf{Constant} & \textbf{Meaning} \\ -@@ -1856,7 +1856,7 @@ - \caption{Comparison Return Codes} - \end{figure} - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_cmp\_mag}. \\ -@@ -1938,7 +1938,7 @@ - Comparing with sign considerations is also fairly critical in several routines (\textit{division for example}). Based on an unsigned magnitude - comparison a trivial signed comparison algorithm can be written. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_cmp}. \\ -@@ -2047,7 +2047,7 @@ - Historically that convention stems from the MPI library where ``s\_'' stood for static functions that were hidden from the developer entirely. - - \newpage --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{center} - \begin{small} - \begin{tabular}{l} -@@ -2244,7 +2244,7 @@ - For example, the default for LibTomMath is to use a ``unsigned long'' for the mp\_digit ``type'' while $\beta = 2^{28}$. In ISO C an ``unsigned long'' - data type must be able to represent $0 \le x < 2^{32}$ meaning that in this case $\gamma \ge 32$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{center} - \begin{small} - \begin{tabular}{l} -@@ -2411,7 +2411,7 @@ - Recall from section 5.2 that an mp\_int represents an integer with an unsigned mantissa (\textit{the array of digits}) and a \textbf{sign} - flag. A high level addition is actually performed as a series of eight separate cases which can be optimized down to three unique cases. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_add}. \\ -@@ -2440,7 +2440,7 @@ - either \cite{TAOCPV2} or \cite{HAC} since they both only provide unsigned operations. The algorithm is fairly - straightforward but restricted since subtraction can only produce positive results. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|c|c|c|c|} -@@ -2529,7 +2529,7 @@ - \subsection{High Level Subtraction} - The high level signed subtraction algorithm is essentially the same as the high level signed addition algorithm. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{center} - \begin{tabular}{l} - \hline Algorithm \textbf{mp\_sub}. \\ -@@ -2561,7 +2561,7 @@ - \cite{HAC}. Also this algorithm is restricted by algorithm s\_mp\_sub. Chart \ref{fig:SubChart} lists the eight possible inputs and - the operations required. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{|c|c|c|c|c|} -@@ -2651,7 +2651,7 @@ - In a binary system where the radix is a power of two multiplication by two not only arises often in other algorithms it is a fairly efficient - operation to perform. A single precision logical shift left is sufficient to multiply a single digit by two. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2775,7 +2775,7 @@ - \subsection{Division by Two} - A division by two can just as easily be accomplished with a logical shift right as multiplication by two can be with a logical shift left. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2886,7 +2886,7 @@ - degree. In this case $f(x) \cdot x = a_n x^{n+1} + a_{n-1} x^n + ... + a_0 x$. From a scalar basis point of view multiplying by $x$ is equivalent to - multiplying by the integer $\beta$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -2929,7 +2929,7 @@ - - \newpage - \begin{center} --\begin{figure}[here] -+\begin{figure}[h] - \includegraphics{pics/sliding_window.ps} - \caption{Sliding Window Movement} - \label{pic:sliding_window} -@@ -3001,7 +3001,7 @@ - - Division by powers of $x$ is easily achieved by shifting the digits right and removing any that will end up to the right of the zero'th digit. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3115,7 +3115,7 @@ - - \subsection{Multiplication by Power of Two} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3249,7 +3249,7 @@ - - \subsection{Division by Power of Two} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3387,7 +3387,7 @@ - The last algorithm in the series of polynomial basis power of two algorithms is calculating the remainder of division by $2^b$. This - algorithm benefits from the fact that in twos complement arithmetic $a \mbox{ (mod }2^b\mbox{)}$ is the same as $a$ AND $2^b - 1$. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3541,7 +3541,7 @@ - include $\alpha$ which shall represent the number of bits in the type \textbf{mp\_word}. This implies that $2^{\alpha} > 2 \cdot \beta^2$. The - constant $\delta = 2^{\alpha - 2lg(\beta)}$ will represent the maximal weight of any column in a product (\textit{see sub-section 5.2.2 for more information}). - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3600,7 +3600,7 @@ - For example, consider multiplying $576$ by $241$. That is equivalent to computing $10^0(1)(576) + 10^1(4)(576) + 10^2(2)(576)$ which is best - visualized in the following table. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{|c|c|c|c|c|c|l|} - \hline && & 5 & 7 & 6 & \\ -@@ -3753,7 +3753,7 @@ - Where $\vec x_n$ is the $n'th$ column of the output vector. Consider the following example which computes the vector $\vec x$ for the multiplication - of $576$ and $241$. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|c|c|c|c|c|} -@@ -3774,7 +3774,7 @@ - Now the columns must be fixed by propagating the carry upwards. The resultant vector will have one extra dimension over the input vector which is - congruent to adding a leading zero digit. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -3830,7 +3830,7 @@ - the smaller input may not have more than $256$ digits if the Comba method is to be used. This is quite satisfactory for most applications since - $256$ digits would allow for numbers in the range of $0 \le x < 2^{7168}$ which, is much larger than most public key cryptographic algorithms require. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4129,7 +4129,7 @@ - of this system of equations has made Karatsuba fairly popular. In fact the cutoff point is often fairly low\footnote{With LibTomMath 0.18 it is 70 and 109 digits for the Intel P4 and AMD Athlon respectively.} - making it an ideal algorithm to speed up certain public key cryptosystems such as RSA and Diffie-Hellman. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4387,7 +4387,7 @@ - the algorithm can be faster than a baseline multiplication. However, the greater complexity of this algorithm places the cutoff point - (\textbf{TOOM\_MUL\_CUTOFF}) where Toom-Cook becomes more efficient much higher than the Karatsuba cutoff point. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4424,7 +4424,7 @@ - \caption{Algorithm mp\_toom\_mul} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4768,7 +4768,7 @@ - Now that algorithms to handle multiplications of every useful dimensions have been developed, a rather simple finishing touch is required. So far all - of the multiplication algorithms have been unsigned multiplications which leaves only a signed multiplication algorithm to be established. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -4875,7 +4875,7 @@ - For any $n$-digit input, there are ${{\left (n^2 + n \right)}\over 2}$ possible unique single precision multiplications required compared to the $n^2$ - required for multiplication. The following diagram gives an example of the operations required. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{tabular}{ccccc|c} - &&1&2&3&\\ -@@ -4903,7 +4903,7 @@ - The baseline squaring algorithm is meant to be a catch-all squaring algorithm. It will handle any of the input sizes that the faster routines - will not handle. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5052,7 +5052,7 @@ - mp\_word arrays. One array will hold the squares and the other array will hold the double products. With both arrays the doubling and - carry propagation can be moved to a $O(n)$ work level outside the $O(n^2)$ level. In this case, we have an even simpler solution in mind. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5242,7 +5242,7 @@ - The 100 digit halves will not be squared using Karatsuba, but instead using the faster Comba based squaring algorithm. If Karatsuba multiplication - were used instead, the 100 digit numbers would be squared with a slower Comba based multiplication. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5442,7 +5442,7 @@ - derive their own Toom-Cook squaring algorithm. - - \subsection{High Level Squaring} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5705,7 +5705,7 @@ - is considerably faster than the straightforward $3m^2$ method. - - \subsection{The Barrett Algorithm} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5865,7 +5865,7 @@ - In order to use algorithm mp\_reduce the value of $\mu$ must be calculated in advance. Ideally this value should be computed once and stored for - future use so that the Barrett algorithm can be used without delay. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5931,7 +5931,7 @@ - - From these two simple facts the following simple algorithm can be derived. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -5957,7 +5957,7 @@ - final result of the Montgomery algorithm. If $k > lg(n)$ and $0 \le x < n^2$ then the final result is limited to - $0 \le r < \lfloor x/2^k \rfloor + n$. As a result at most a single subtraction is required to get the residue desired. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|l|} -@@ -5987,7 +5987,7 @@ - and $k^2$ single precision additions. At this rate the algorithm is most certainly slower than Barrett reduction and not terribly useful. - Fortunately there exists an alternative representation of the algorithm. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6009,7 +6009,7 @@ - This algorithm is equivalent since $2^tn$ is a multiple of $n$ and the lower $k$ bits of $x$ are zero by step 2. The number of single - precision shifts has now been reduced from $2k^2$ to $k^2 + k$ which is only a small improvement. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{small} - \begin{center} - \begin{tabular}{|c|l|r|} -@@ -6042,7 +6042,7 @@ - Instead of computing the reduction on a bit-by-bit basis it is actually much faster to compute it on digit-by-digit basis. Consider the - previous algorithm re-written to compute the Montgomery reduction in this new fashion. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6100,7 +6100,7 @@ - The baseline Montgomery reduction algorithm will produce the residue for any size input. It is designed to be a catch-all algororithm for - Montgomery reductions. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6287,7 +6287,7 @@ - With this change in place the Montgomery reduction algorithm can be performed with a Comba style multiplication loop which substantially increases - the speed of the algorithm. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6526,7 +6526,7 @@ - \subsection{Montgomery Setup} - To calculate the variable $\rho$ a relatively simple algorithm will be required. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6627,7 +6627,7 @@ - The variable $n$ reduces modulo $n - k$ to $k$. By putting $q = \lfloor x/n \rfloor$ and $r = x \mbox{ mod } n$ - into the equation the original congruence is reproduced, thus concluding the proof. The following algorithm is based on this observation. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6740,7 +6740,7 @@ - of $x$ and $q$. The resulting algorithm is very efficient and can lead to substantial improvements over Barrett and Montgomery reduction when modular - exponentiations are performed. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6888,7 +6888,7 @@ - To setup the restricted Diminished Radix algorithm the value $k = \beta - n_0$ is required. This algorithm is not really complicated but provided for - completeness. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6928,7 +6928,7 @@ - Another algorithm which will be useful is the ability to detect a restricted Diminished Radix modulus. An integer is said to be - of restricted Diminished Radix form if all of the digits are equal to $\beta - 1$ except the trailing digit which may be any value. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -6990,7 +6990,7 @@ - In general the restricted Diminished Radix reduction algorithm is much faster since it has considerably lower overhead. However, this new - algorithm is much faster than either Montgomery or Barrett reduction when the moduli are of the appropriate form. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7081,7 +7081,7 @@ - \subsubsection{Unrestricted Setup} - To setup this reduction algorithm the value of $k = 2^p - n$ is required. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7153,7 +7153,7 @@ - that there will be value of $k$ that when added to the modulus causes a carry in the first digit which propagates all the way to the most - significant bit. The resulting sum will be a power of two. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7293,7 +7293,7 @@ - While this current method is a considerable speed up there are further improvements to be made. For example, the $a^{2^i}$ term does not need to - be computed in an auxilary variable. Consider the following equivalent algorithm. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7345,7 +7345,7 @@ - to be used when a small power of an input is required (\textit{e.g. $a^5$}). It is faster than simply multiplying $b - 1$ times for all values of - $b$ that are greater than three. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7465,7 +7465,7 @@ - computes the same exponentiation. A group of $k$ bits from the exponent is called a \textit{window}. That is it is a small window on only a - portion of the entire exponent. Consider the following modification to the basic left to right exponentiation algorithm. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7501,7 +7501,7 @@ - approach is to brute force search amongst the values $k = 2, 3, \ldots, 8$ for the lowest result. Table~\ref{fig:OPTK} lists optimal values of $k$ - for various exponent sizes and compares the number of multiplication and squarings required against algorithm~\ref{fig:LTOR}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|c|c|c|c|c|c|} -@@ -7530,7 +7530,7 @@ - - Table~\ref{fig:OPTK2} lists optimal values of $k$ for various exponent sizes and compares the work required against algorithm {\ref{fig:KARY}}. - --\begin{figure}[here] -+\begin{figure}[h] - \begin{center} - \begin{small} - \begin{tabular}{|c|c|c|c|c|c|} -@@ -7552,7 +7552,7 @@ - \label{fig:OPTK2} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7603,7 +7603,7 @@ - value of $(1/a) \mbox{ mod }c$ is computed using the modular inverse (\textit{see \ref{sec;modinv}}). If no inverse exists the algorithm - terminates with an error. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7754,7 +7754,7 @@ - - \subsection{Barrett Modular Exponentiation} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7804,7 +7804,7 @@ - \caption{Algorithm s\_mp\_exptmod} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -7896,7 +7896,7 @@ - the two cases of $mode = 1$ and $mode = 2$ respectively. - - \begin{center} --\begin{figure}[here] -+\begin{figure}[h] - \includegraphics{pics/expt_state.ps} - \caption{Sliding Window State Diagram} - \label{pic:expt_state} -@@ -8163,7 +8163,7 @@ - Calculating $b = 2^a$ can be performed much quicker than with any of the previous algorithms. Recall that a logical shift left $m << k$ is - equivalent to $m \cdot 2^k$. By this logic when $m = 1$ a quick power of two can be achieved. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -8239,7 +8239,7 @@ - will be used. Let $x$ represent the divisor and $y$ represent the dividend. Let $q$ represent the integer quotient $\lfloor y / x \rfloor$ and - let $r$ represent the remainder $r = y - x \lfloor y / x \rfloor$. The following simple algorithm will be used to start the discussion. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -8335,7 +8335,7 @@ - At most the quotient approaches $2\beta$, however, in practice this will not occur since that would imply the previous quotient digit was too small. - - \subsection{Radix-$\beta$ Division with Remainder} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -8378,7 +8378,7 @@ - \caption{Algorithm mp\_div} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -8782,7 +8782,7 @@ - Both addition and subtraction are performed by ``cheating'' and using mp\_set followed by the higher level addition or subtraction - algorithms. As a result these algorithms are subtantially simpler with a slight cost in performance. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -8913,7 +8913,7 @@ - multiplication algorithm. Essentially this algorithm is a modified version of algorithm s\_mp\_mul\_digs where one of the multiplicands - only has one digit. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9020,7 +9020,7 @@ - Like the single digit multiplication algorithm, single digit division is also a fairly common algorithm used in radix conversion. Since the - divisor is only a single digit a specialized variant of the division algorithm can be used to compute the quotient. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9186,7 +9186,7 @@ - such as the real numbers. As a result the root found can be above the true root by few and must be manually adjusted. Ideally at the end of the - algorithm the $n$'th root $b$ of an integer $a$ is desired such that $b^n \le a$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9255,7 +9255,7 @@ - factoring for example, can make use of random values as starting points to find factors of a composite integer. In this case the algorithm presented - is solely for simulations and not intended for cryptographic use. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9339,7 +9339,7 @@ - such that they are printable. While outputting as base64 may not be too helpful for human operators it does allow communication via non binary - mediums. - --\newpage\begin{figure}[here] -+\newpage\begin{figure}[h] - \begin{center} - \begin{tabular}{cc|cc|cc|cc} - \hline \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} & \textbf{Value} & \textbf{Char} \\ -@@ -9367,7 +9367,7 @@ - \label{fig:ASC} - \end{figure} - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9478,7 +9478,7 @@ - \subsection{Generating Radix-$n$ Output} - Generating radix-$n$ output is fairly trivial with a division and remainder algorithm. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9608,7 +9608,7 @@ - The most common approach (cite) is to reduce one input modulo another. That is if $a$ and $b$ are divisible by some integer $k$ and if $qa + r = b$ then - $r$ is also divisible by $k$. The reduction pattern follows $\left < a , b \right > \rightarrow \left < b, a \mbox{ mod } b \right >$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9634,7 +9634,7 @@ - greatest common divisors. The faster approach is based on the observation that if $k$ divides both $a$ and $b$ it will also divide $a - b$. - In particular, we would like $a - b$ to decrease in magnitude which implies that $b \ge a$. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9668,7 +9668,7 @@ - However, instead of factoring $b - a$ to find a suitable value of $p$ the powers of $p$ can be removed from $a$ and $b$ that are in common first. - Then inside the loop whenever $b - a$ is divisible by some power of $p$ it can be safely removed. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9713,7 +9713,7 @@ - The algorithms presented so far cannot handle inputs which are zero or negative. The following algorithm can handle all input cases properly - and will produce the greatest common divisor. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -9891,7 +9891,7 @@ - Linear Feedback Shift Registers (LFSR) tend to use registers with periods which are co-prime (\textit{e.g. the greatest common divisor is one.}). - Similarly in number theory if a composite $n$ has two prime factors $p$ and $q$ then maximal order of any unit of $\Z/n\Z$ will be $[ p - 1, q - 1] $. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -10060,7 +10060,7 @@ - factors of $p$ do not have to be known. Furthermore, if $(a, p) = 1$ then the algorithm will terminate when the recursion requests the - Jacobi symbol computation of $\left ( {1 \over a'} \right )$ which is simply $1$. - --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -10268,7 +10268,7 @@ - equation. - - \subsection{General Case} --\newpage\begin{figure}[!here] -+\newpage\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -10407,7 +10407,7 @@ - approximately $80\%$ of all candidate integers. The constant \textbf{PRIME\_SIZE} is equal to the number of primes in the test base. The - array \_\_prime\_tab is an array of the first \textbf{PRIME\_SIZE} prime numbers. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -10536,7 +10536,7 @@ - integers known as Carmichael numbers will be a pseudo-prime to all valid bases. Fortunately such numbers are extremely rare as $n$ grows - in size. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} -@@ -10616,7 +10616,7 @@ - value must be equal to $-1$. The squarings are stopped as soon as $-1$ is observed. If the value of $1$ is observed first it means that - some value not congruent to $\pm 1$ when squared equals one which cannot occur if $n$ is prime. - --\begin{figure}[!here] -+\begin{figure}[!h] - \begin{small} - \begin{center} - \begin{tabular}{l} From f09990a1cd316d3863db2abdc87704b9fb41da2f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 23 Feb 2016 14:39:44 +0100 Subject: [PATCH 29/59] Remove useless latex build requirements --- libtommath.spec | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 7ba2c55..488fd46 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/ @@ -17,22 +17,8 @@ BuildRequires: libtiff-tools %endif %if 0%{?fedora} || 0%{?rhel} >= 7 -BuildRequires: tex(cmex10.pfb) -BuildRequires: tex(cmmi10.pfb) -BuildRequires: tex(cmmi5.pfb) -BuildRequires: tex(cmmi7.pfb) -BuildRequires: tex(cmr10.pfb) -BuildRequires: tex(cmr5.pfb) -BuildRequires: tex(cmr7.pfb) -BuildRequires: tex(cmsy10.pfb) -BuildRequires: tex(cmsy5.pfb) -BuildRequires: tex(cmsy7.pfb) BuildRequires: tex(dvips) -BuildRequires: tex(fmtutil.cnf) BuildRequires: tex(latex) -BuildRequires: tex(pd1enc.def) -BuildRequires: tex(pdftex.map) -BuildRequires: texlive-latex-bin-bin %else BuildRequires: tetex-dvips BuildRequires: tetex-latex @@ -100,6 +86,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Tue Feb 23 2016 Simone Caronni - 1.0-3 +- Remove useless latex build requirements. + * Tue Feb 23 2016 Simone Caronni - 1.0-2 - Use proper source URL. - Cleanup SPEC file. From 55f9fab3cb8a39b666addd5200421742d72b2e19 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 23 Feb 2016 15:00:18 +0100 Subject: [PATCH 30/59] Fix installs with non-standard buildroots (#1299860) --- libtommath.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 488fd46..59dd058 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/ @@ -64,7 +64,7 @@ make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared make -f makefile poster manual docs %install -%make_install LIBPATH=%{_libdir} -f makefile.shared +%make_install LIBPATH=%{_libdir} INCPATH=%{_includedir} -f makefile.shared find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete @@ -86,6 +86,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Tue Feb 23 2016 Simone Caronni - 1.0-4 +- Fix installs with non-standard buildroots (#1299860). + * Tue Feb 23 2016 Simone Caronni - 1.0-3 - Remove useless latex build requirements. From 2ebfe6d5bcf5473126c02573cf8d9e52aa445e92 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 19:34:57 +0000 Subject: [PATCH 31/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 59dd058..0c933ec 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/ @@ -86,6 +86,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Tue Feb 23 2016 Simone Caronni - 1.0-4 - Fix installs with non-standard buildroots (#1299860). From baf704e7cfb469cf3eef392966489ef9fb0ad66f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 25 Jun 2017 11:46:22 +0200 Subject: [PATCH 32/59] Update URL (#1463608, #1463547) --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 0c933ec..5b529a0 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.org/ @@ -86,6 +86,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Sun Jun 25 2017 Simone Caronni - 1.0-6 +- Update URL (#1463608, #1463547). + * Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 71763c3e24959c95b8368822c1d2cc8fc162b323 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 25 Jun 2017 22:33:13 +0200 Subject: [PATCH 33/59] Update URL for real.. --- libtommath.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 5b529a0..b6f8abe 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,9 +1,9 @@ Name: libtommath Version: 1.0 -Release: 6%{?dist} +Release: 8%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain -URL: http://www.libtom.org/ +URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -74,7 +74,6 @@ find %{buildroot} -name '*.a' -delete %postun -p /sbin/ldconfig %files -%{!?_licensedir:%global license %%doc} %license LICENSE %{_libdir}/*.so.* @@ -86,7 +85,7 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog -* Sun Jun 25 2017 Simone Caronni - 1.0-6 +* Sun Jun 25 2017 Simone Caronni - 1.0-7 - Update URL (#1463608, #1463547). * Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 From 81d50fd115efe4aea02d2de03668567e0dc609fa Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 19:51:50 +0000 Subject: [PATCH 34/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index b6f8abe..0eeab7d 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -85,6 +85,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sun Jun 25 2017 Simone Caronni - 1.0-7 - Update URL (#1463608, #1463547). From c2c4f36f3f920bb8df9741f148e228a11bbe7b86 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 02:24:12 +0000 Subject: [PATCH 35/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 0eeab7d..ec43828 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -85,6 +85,9 @@ find %{buildroot} -name '*.a' -delete %doc bn.pdf poster.pdf tommath.pdf %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From c92091ce4d0d98da1c38a17e5f3638a574d990a1 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 17 Sep 2017 14:23:36 +0200 Subject: [PATCH 36/59] Update to 1.0.1 --- .gitignore | 1 + libtommath.spec | 132 ++++++++++-------------------------------------- sources | 2 +- 3 files changed, 29 insertions(+), 106 deletions(-) diff --git a/.gitignore b/.gitignore index 929b585..e2fa594 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ ltm-0.41.tar.bz2 /ltm-0.42.0.tar.bz2 /ltm-1.0.tar.xz /libtommath-1.0.tar.gz +/libtommath-1.0.1.tar.gz diff --git a/libtommath.spec b/libtommath.spec index ec43828..16b8aa8 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath -Version: 1.0 -Release: 10%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -8,21 +8,15 @@ URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: ghostscript -BuildRequires: libtool - -%if 0%{?rhel} == 6 -BuildRequires: libtiff -%else BuildRequires: libtiff-tools -%endif - -%if 0%{?fedora} || 0%{?rhel} >= 7 -BuildRequires: tex(dvips) -BuildRequires: tex(latex) -%else -BuildRequires: tetex-dvips -BuildRequires: tetex-latex -%endif +BuildRequires: libtool +BuildRequires: texlive-dvips-bin +BuildRequires: texlive-latex-bin-bin +BuildRequires: texlive-makeindex-bin +BuildRequires: texlive-mfware-bin +BuildRequires: tex(cmr10.tfm) +BuildRequires: tex(fancyhdr.sty) +BuildRequires: tex(hyphen.tex) %description A free open source portable number theoretic multiple-precision integer library @@ -49,22 +43,20 @@ The %{name}-doc package contains PDF documentation for using %{name}. %prep %setup -q -# Be verbose when calling latex so we can see what's breaking -sed -i -e 's|> /dev/null||g' makefile -# Latex syntax update +# Fix permissions on installed library +sed -i -e 's/644 $(LIBNAME)/755 $(LIBNAME)/g' makefile.shared +# Fix pkgconfig path sed -i \ - -e 's|\[here\]|\[ht\]|g' \ - -e 's|\[here!\]|\[h!\]|g' \ - -e 's|\[!here\]|\[!ht\]|g' \ - *.{pl,src,tex} + -e 's|^prefix=.*|prefix=%{_prefix}|g' \ + -e 's|^libdir=.*|libdir=%{_libdir}|g' \ + %{name}.pc.in %build -export CFLAGS="%{optflags}" -make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared -make -f makefile poster manual docs +%make_build V=1 CFLAGS="%{optflags} -I./" -f makefile.shared +%make_build V=1 -f makefile poster manual docs %install -%make_install LIBPATH=%{_libdir} INCPATH=%{_includedir} -f makefile.shared +%make_install V=1 CFLAGS="%{optflags} -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete @@ -80,11 +72,18 @@ find %{buildroot} -name '*.a' -delete %files devel %{_includedir}/*.h %{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc %files doc -%doc bn.pdf poster.pdf tommath.pdf +%doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Mon Sep 11 2017 Simone Caronni - 1.0.1-1 +- Update to 1.0.1. +- Trim changelog. +- Clean up SPEC file. +- Remove RHEL 6 support. + * Thu Aug 03 2017 Fedora Release Engineering - 1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild @@ -115,80 +114,3 @@ find %{buildroot} -name '*.a' -delete * Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 0.42.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Aug 17 2014 Fedora Release Engineering - 0.42.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.42.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun Sep 29 2013 Simone Caronni - 0.42.0-3 -- Move headers to default location. - -* Thu Aug 08 2013 Simone Caronni - 0.42.0-2 -- Fix changelog entries. -- Remove executable bits from LICENSE file and source files. - -* Thu Aug 08 2013 Simone Caronni - 0.42.0-1 -- Update to 0.42. -- Make doc package noarch and not requiring base package. - -* Sat Aug 03 2013 Fedora Release Engineering - 0.41-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Jun 06 2013 Simone Caronni - 0.41-16 -- SPEC file cleanup, remove obsolete tags. -- Fix tex/latex BuildRequires. - -* Thu Feb 14 2013 Fedora Release Engineering - 0.41-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Jul 19 2012 Fedora Release Engineering - 0.41-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Jan 13 2012 Fedora Release Engineering - 0.41-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Feb 08 2011 Fedora Release Engineering - 0.41-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sun Jun 20 2010 Jeremy Hinegardner - 0.41-11 -- fix bugs #555445 and #591543 - -* Sat Jul 25 2009 Fedora Release Engineering - 0.41-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 0.41-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Tue Feb 19 2008 Fedora Release Engineering - 0.41-8 -- Autorebuild for GCC 4.3 - -* Sun Nov 25 2007 Jeremy Hinegardner - 0.41-7 -- Resolve multilib conflicts from Bug #342441 by splitting out - documentation to libtommath-docs subpackage -- fix rpmlint Summary: warning - -* Wed Aug 29 2007 Fedora Release Engineering - 0.41-6 -- Rebuild for selinux ppc32 issue. - -* Fri Jun 29 2007 Jeremy Hinegardner - 0.41-5 -- removed package name from summary - -* Wed Jun 27 2007 Jeremy Hinegardner - 0.41-4 -- changed patch to honor RPM_OPT_FLAGS -- changed patch to allow INCPATH to be set externally -- changed installation of headers to _includedir/tommath - -* Sun Jun 24 2007 Jeremy Hinegardner - 0.41-3 -- changed patch to bring it into line with the style of libtomcrypt - -* Sat Jun 23 2007 Jeremy Hinegardner - 0.41-2 -- add patch to makefile.shared to allow for /usr/lib64 installs -- update spec to pass libdir build and install process - -* Fri Jun 22 2007 Jeremy Hinegardner - 0.41-1 -- Initial spec file creation diff --git a/sources b/sources index 4b1ba78..042f13a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c62fbc717289f492246f8dd4dd72a602 libtommath-1.0.tar.gz +SHA512 (libtommath-1.0.1.tar.gz) = d3da5c015e26f88d50774085848d0d45cd5fc2c0f85ddc4166e14ba804e82dbd18b464c3bfe2242bedb7f772a9e77eb1d8da99178f5d763206c4ee68c26060f4 From e7206f5249588b616b32f75eb6e8080fcd1bcf1a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 3 Feb 2018 12:48:59 +0100 Subject: [PATCH 37/59] Switch to %ldconfig_scriptlets Signed-off-by: Igor Gnatenko --- libtommath.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 16b8aa8..30a42ca 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -61,9 +61,7 @@ sed -i \ find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %license LICENSE @@ -78,6 +76,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Sat Feb 03 2018 Igor Gnatenko - 1.0.1-2 +- Switch to %%ldconfig_scriptlets + * Mon Sep 11 2017 Simone Caronni - 1.0.1-1 - Update to 1.0.1. - Trim changelog. From 5c9638a278a45847b896e5c0273437d530229b44 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 23:32:04 +0000 Subject: [PATCH 38/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 30a42ca..d439f27 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -76,6 +76,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Feb 03 2018 Igor Gnatenko - 1.0.1-2 - Switch to %%ldconfig_scriptlets From caf54814041d8393a9d5372e91a6cd065f074d2b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 25 Feb 2018 12:16:22 +0100 Subject: [PATCH 39/59] Add BuildRequires: ghostscript-tools-dvipdf --- libtommath.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index d439f27..376ada0 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -11,6 +11,7 @@ BuildRequires: ghostscript BuildRequires: libtiff-tools BuildRequires: libtool BuildRequires: texlive-dvips-bin +BuildRequires: ghostscript-tools-dvipdf BuildRequires: texlive-latex-bin-bin BuildRequires: texlive-makeindex-bin BuildRequires: texlive-mfware-bin @@ -76,6 +77,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Sun Feb 25 2018 Florian Weimer - 1.0.1-4 +- Add BuildRequires: ghostscript-tools-dvipdf + * Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 0c2ccf0a79a6d1b4e8906fa01c1744dbe86ff5da Mon Sep 17 00:00:00 2001 From: Rafael Santos Date: Thu, 5 Apr 2018 23:23:38 +0200 Subject: [PATCH 40/59] Fix Fedora build flags injection - Resolves #1548832 Signed-off-by: Rafael Santos --- libtommath.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 376ada0..54114d9 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -53,11 +53,12 @@ sed -i \ %{name}.pc.in %build -%make_build V=1 CFLAGS="%{optflags} -I./" -f makefile.shared +%set_build_flags +%make_build V=1 CFLAGS="$CFLAGS -I./" -f makefile.shared %make_build V=1 -f makefile poster manual docs %install -%make_install V=1 CFLAGS="%{optflags} -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared +%make_install V=1 CFLAGS="$CFLAGS -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete @@ -77,6 +78,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Thu Apr 05 2018 Rafael Santos - 1.0.1-5 +- Resolves #1548832 - Fix Fedora build flags injection + * Sun Feb 25 2018 Florian Weimer - 1.0.1-4 - Add BuildRequires: ghostscript-tools-dvipdf From 9afd93e28f822659326e482cc09d821bf471178d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 08:56:38 +0000 Subject: [PATCH 41/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 54114d9..5bb470f 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -78,6 +78,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Apr 05 2018 Rafael Santos - 1.0.1-5 - Resolves #1548832 - Fix Fedora build flags injection From 012269fcc3e37c6030763b33f609019319c94dfc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 08:23:26 +0000 Subject: [PATCH 42/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 5bb470f..5b2ef20 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -78,6 +78,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 5e35edf62160d22beb76fa072915627745418b6b Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Mon, 13 May 2019 20:18:27 -0400 Subject: [PATCH 43/59] Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) --- libtommath.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 5b2ef20..314e7c1 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -15,6 +15,7 @@ BuildRequires: ghostscript-tools-dvipdf BuildRequires: texlive-latex-bin-bin BuildRequires: texlive-makeindex-bin BuildRequires: texlive-mfware-bin +BuildRequires: texlive-updmap-map BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) @@ -78,6 +79,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Tue May 14 2019 Scott Talbert - 1.0.1-8 +- Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) + * Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 46165f9eacca166955e0147b952656bdf0f71d3a Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sun, 2 Jun 2019 10:16:24 +0100 Subject: [PATCH 44/59] Disable parallel build for docs --- libtommath.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 314e7c1..d6cc8eb 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -56,7 +56,7 @@ sed -i \ %build %set_build_flags %make_build V=1 CFLAGS="$CFLAGS -I./" -f makefile.shared -%make_build V=1 -f makefile poster manual docs +make V=1 -f makefile poster manual docs %install %make_install V=1 CFLAGS="$CFLAGS -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared @@ -79,6 +79,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Sun Jun 02 2019 Leigh Scott - 1.0.1-9 +- Disable parallel build for docs + * Tue May 14 2019 Scott Talbert - 1.0.1-8 - Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) From a5e79a27fa1b948ae3c2181f4e5bc76e90b76f6b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 14:33:43 +0000 Subject: [PATCH 45/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index d6cc8eb..66e43de 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.0.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -79,6 +79,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Jun 02 2019 Leigh Scott - 1.0.1-9 - Disable parallel build for docs From f70ef9a4cd73b9574b07199b6da1db458e4c7818 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 16 Oct 2019 07:09:57 +0200 Subject: [PATCH 46/59] Update to 1.1.0 --- .gitignore | 1 + libtommath.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e2fa594..0850c3b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ ltm-0.41.tar.bz2 /ltm-1.0.tar.xz /libtommath-1.0.tar.gz /libtommath-1.0.1.tar.gz +/libtommath-1.1.0.tar.gz diff --git a/libtommath.spec b/libtommath.spec index 66e43de..013629b 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath -Version: 1.0.1 -Release: 10%{?dist} +Version: 1.1.0 +Release: 1%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -79,6 +79,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Wed Oct 16 2019 Simone Caronni - 1.1.0-1 +- Update to 1.1.0. + * Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 042f13a..cc6cb2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libtommath-1.0.1.tar.gz) = d3da5c015e26f88d50774085848d0d45cd5fc2c0f85ddc4166e14ba804e82dbd18b464c3bfe2242bedb7f772a9e77eb1d8da99178f5d763206c4ee68c26060f4 +SHA512 (libtommath-1.1.0.tar.gz) = 264942414033be70fb73590ec65912a3e8c6ee9c00fb0ce5b684a861af4804b6ccfb8d01821cc5c61348768b44c9c11fd58af0b54d654366329b01b56c644ea7 From 3d440f64b6e276a39061456b6690f0390f86c9d2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 10:34:59 +0000 Subject: [PATCH 47/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 013629b..45208f3 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -79,6 +79,9 @@ find %{buildroot} -name '*.a' -delete %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Oct 16 2019 Simone Caronni - 1.1.0-1 - Update to 1.1.0. From 25d7dd7745baf2ffb5907491412f93ce6fe3b5d2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 25 Feb 2020 14:40:48 +0100 Subject: [PATCH 48/59] Exclude doc package from flatpak build The problem is that the BuildRequires ghostscript.spec in turn has a Requires: %{_bindir}/dvips which would expand to non-existent /app/bin/dvips when libtommath is built as a flatpak (as a dependency of building libreoffice as a flatpak), which would break the build. The easiest fix appears to be to just not build docs for the flatpak case. --- libtommath.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 45208f3..375c828 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -7,9 +7,11 @@ URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildRequires: libtool + +%if ! 0%{?flatpak} BuildRequires: ghostscript BuildRequires: libtiff-tools -BuildRequires: libtool BuildRequires: texlive-dvips-bin BuildRequires: ghostscript-tools-dvipdf BuildRequires: texlive-latex-bin-bin @@ -19,6 +21,7 @@ BuildRequires: texlive-updmap-map BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) +%endif %description A free open source portable number theoretic multiple-precision integer library @@ -34,6 +37,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%if ! 0%{?flatpak} %package doc Summary: Documentation files for %{name} BuildArch: noarch @@ -42,6 +46,7 @@ Obsoletes: %{name}-doc < 0.42-1 %description doc The %{name}-doc package contains PDF documentation for using %{name}. +%endif %prep %setup -q @@ -56,7 +61,9 @@ sed -i \ %build %set_build_flags %make_build V=1 CFLAGS="$CFLAGS -I./" -f makefile.shared +%if ! 0%{?flatpak} make V=1 -f makefile poster manual docs +%endif %install %make_install V=1 CFLAGS="$CFLAGS -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared @@ -75,8 +82,10 @@ find %{buildroot} -name '*.a' -delete %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc +%if ! 0%{?flatpak} %files doc %doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf +%endif %changelog * Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 From 716054176477599efa764a15f8430c0dab160195 Mon Sep 17 00:00:00 2001 From: "Pokorra, Gerd" Date: Sat, 11 Apr 2020 08:17:58 +0200 Subject: [PATCH 49/59] update to 1.2.0 --- .gitignore | 1 + libtommath.spec | 14 ++++++++++---- sources | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0850c3b..8680cbf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ltm-0.41.tar.bz2 /libtommath-1.0.tar.gz /libtommath-1.0.1.tar.gz /libtommath-1.1.0.tar.gz +/libtommath-1.2.0.tar.gz diff --git a/libtommath.spec b/libtommath.spec index 375c828..74ad32b 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath -Version: 1.1.0 -Release: 2%{?dist} +Version: 1.2.0 +Release: 1%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -18,6 +18,7 @@ BuildRequires: texlive-latex-bin-bin BuildRequires: texlive-makeindex-bin BuildRequires: texlive-mfware-bin BuildRequires: texlive-updmap-map +BuildRequires: texlive-appendix BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) @@ -62,7 +63,7 @@ sed -i \ %set_build_flags %make_build V=1 CFLAGS="$CFLAGS -I./" -f makefile.shared %if ! 0%{?flatpak} -make V=1 -f makefile poster manual docs +make V=1 -f makefile manual docs %endif %install @@ -84,10 +85,15 @@ find %{buildroot} -name '*.a' -delete %if ! 0%{?flatpak} %files doc -%doc doc/bn.pdf doc/poster.pdf doc/tommath.pdf +%doc doc/bn.pdf %endif %changelog +* Thu Apr 09 2020 Gerd Pokorra - 1.2.0-1 +- Update to 1.2.0. +- Remove poster make tag +- Add BuildRequires texlive-appendix + * Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index cc6cb2f..fd4b630 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libtommath-1.1.0.tar.gz) = 264942414033be70fb73590ec65912a3e8c6ee9c00fb0ce5b684a861af4804b6ccfb8d01821cc5c61348768b44c9c11fd58af0b54d654366329b01b56c644ea7 +SHA512 (libtommath-1.2.0.tar.gz) = 500bce4467d6cdb0b014e6c66d3b994a8d63b51475db6c3cd77c15c8368fbab4e3b5c458fcd5b35838b74c457a33c15b42d2356964f5ef2a0bd31fd544735c9a From 3a24832e50c33c20b332a2ed51d6e92d3005569e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 05:45:05 +0000 Subject: [PATCH 50/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 74ad32b..a48c12b 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -89,6 +89,9 @@ find %{buildroot} -name '*.a' -delete %endif %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Apr 09 2020 Gerd Pokorra - 1.2.0-1 - Update to 1.2.0. - Remove poster make tag From 80cd5a661f7d2ab1e14850bdde5f998417ce999f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 6 Jan 2021 20:15:49 +0000 Subject: [PATCH 51/59] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- libtommath.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/libtommath.spec b/libtommath.spec index a48c12b..8ca350b 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -7,6 +7,7 @@ URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildRequires: make BuildRequires: libtool %if ! 0%{?flatpak} From d265503cccbcf301d6bc2b16b4596360e8987542 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Tue, 26 Jan 2021 10:57:47 +0100 Subject: [PATCH 52/59] Add missing BRs --- libtommath.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 8ca350b..6512a41 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,13 +1,13 @@ Name: libtommath Version: 1.2.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: make +BuildRequires: make BuildRequires: libtool %if ! 0%{?flatpak} @@ -23,6 +23,10 @@ BuildRequires: texlive-appendix BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) +BuildRequires: tex(l3backend-dvips.def) +BuildRequires: tex(amssymb.sty) +BuildRequires: tex(expl3.sty) +BuildRequires: tex(epstopdf-base.sty) %endif %description @@ -90,6 +94,9 @@ find %{buildroot} -name '*.a' -delete %endif %changelog +* Mon Jan 25 2021 Than Ngo - 1.2.0-3 +- Add missing BRs + * Tue Jul 28 2020 Fedora Release Engineering - 1.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 2cd88be804e197cc255af3fdabedbd9734145ac8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 12:33:27 +0000 Subject: [PATCH 53/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libtommath.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtommath.spec b/libtommath.spec index 6512a41..7302984 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.2.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -94,6 +94,9 @@ find %{buildroot} -name '*.a' -delete %endif %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Jan 25 2021 Than Ngo - 1.2.0-3 - Add missing BRs From b08453884d94a27a3029b005863f97d6615ea54f Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 3 Nov 2021 13:59:31 +0100 Subject: [PATCH 54/59] Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) (see: #1965446) --- libtommath.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index 7302984..dc34948 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -18,7 +18,6 @@ BuildRequires: ghostscript-tools-dvipdf BuildRequires: texlive-latex-bin-bin BuildRequires: texlive-makeindex-bin BuildRequires: texlive-mfware-bin -BuildRequires: texlive-updmap-map BuildRequires: texlive-appendix BuildRequires: tex(cmr10.tfm) BuildRequires: tex(fancyhdr.sty) @@ -94,6 +93,10 @@ find %{buildroot} -name '*.a' -delete %endif %changelog +* Wed Nov 03 2021 Frantisek Sumsal - 1.2.0-5 +- Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) +- (see: #1965446) + * Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 0e645442d59a03f12467a5363b5689888a660652 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 13 Dec 2021 17:00:45 +0100 Subject: [PATCH 55/59] Add a couple of missing build requires Also, sort all BRs alphabetically. --- libtommath.spec | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index dc34948..d16aa15 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.2.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -12,20 +12,22 @@ BuildRequires: libtool %if ! 0%{?flatpak} BuildRequires: ghostscript -BuildRequires: libtiff-tools -BuildRequires: texlive-dvips-bin BuildRequires: ghostscript-tools-dvipdf -BuildRequires: texlive-latex-bin-bin -BuildRequires: texlive-makeindex-bin -BuildRequires: texlive-mfware-bin -BuildRequires: texlive-appendix +BuildRequires: libtiff-tools +BuildRequires: tex(amssymb.sty) BuildRequires: tex(cmr10.tfm) +BuildRequires: tex(epstopdf-base.sty) +BuildRequires: tex(expl3.sty) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyphen.tex) BuildRequires: tex(l3backend-dvips.def) -BuildRequires: tex(amssymb.sty) -BuildRequires: tex(expl3.sty) -BuildRequires: tex(epstopdf-base.sty) +BuildRequires: texlive-appendix +BuildRequires: texlive-dvips-bin +BuildRequires: texlive-kpathsea +BuildRequires: texlive-latex-bin-bin +BuildRequires: texlive-makeindex-bin +BuildRequires: texlive-metafont +BuildRequires: texlive-mfware-bin %endif %description @@ -93,6 +95,9 @@ find %{buildroot} -name '*.a' -delete %endif %changelog +* Mon Dec 13 2021 Frantisek Sumsal - 1.2.0-6 +- Add a couple of missing BRs (texlive-kpathsea and texlive-metafont) + * Wed Nov 03 2021 Frantisek Sumsal - 1.2.0-5 - Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) - (see: #1965446) From 08d5b3906fd2cfc3033dcd3bdec4e9e1ec2e2b60 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 4 Jan 2022 21:22:16 +0100 Subject: [PATCH 56/59] Initial EPEL 9 build for BZ#2029481 Temporarily skip building docs due to work around BZ#2031879 --- libtommath.spec | 45 +++++---------------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/libtommath.spec b/libtommath.spec index d16aa15..34492f7 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.2.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -10,26 +10,6 @@ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{ BuildRequires: make BuildRequires: libtool -%if ! 0%{?flatpak} -BuildRequires: ghostscript -BuildRequires: ghostscript-tools-dvipdf -BuildRequires: libtiff-tools -BuildRequires: tex(amssymb.sty) -BuildRequires: tex(cmr10.tfm) -BuildRequires: tex(epstopdf-base.sty) -BuildRequires: tex(expl3.sty) -BuildRequires: tex(fancyhdr.sty) -BuildRequires: tex(hyphen.tex) -BuildRequires: tex(l3backend-dvips.def) -BuildRequires: texlive-appendix -BuildRequires: texlive-dvips-bin -BuildRequires: texlive-kpathsea -BuildRequires: texlive-latex-bin-bin -BuildRequires: texlive-makeindex-bin -BuildRequires: texlive-metafont -BuildRequires: texlive-mfware-bin -%endif - %description A free open source portable number theoretic multiple-precision integer library written entirely in C. (phew!). The library is designed to provide a simple to @@ -44,17 +24,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%if ! 0%{?flatpak} -%package doc -Summary: Documentation files for %{name} -BuildArch: noarch -Provides: %{name}-doc = %{version}-%{release} -Obsoletes: %{name}-doc < 0.42-1 - -%description doc -The %{name}-doc package contains PDF documentation for using %{name}. -%endif - %prep %setup -q # Fix permissions on installed library @@ -68,9 +37,6 @@ sed -i \ %build %set_build_flags %make_build V=1 CFLAGS="$CFLAGS -I./" -f makefile.shared -%if ! 0%{?flatpak} -make V=1 -f makefile manual docs -%endif %install %make_install V=1 CFLAGS="$CFLAGS -I./" PREFIX=%{_prefix} LIBPATH=%{_libdir} -f makefile.shared @@ -89,12 +55,11 @@ find %{buildroot} -name '*.a' -delete %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%if ! 0%{?flatpak} -%files doc -%doc doc/bn.pdf -%endif - %changelog +* Tue Jan 04 2022 Frantisek Sumsal - 1.2.0-7 +- Initial EPEL 9 build for BZ#2029481 +- Temporarily skip building docs due to work around BZ#2031879 + * Mon Dec 13 2021 Frantisek Sumsal - 1.2.0-6 - Add a couple of missing BRs (texlive-kpathsea and texlive-metafont) From 39654cc9a42744b9e480c617cf6d7b97569372f3 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Sat, 2 Sep 2023 23:01:12 +0200 Subject: [PATCH 57/59] Convert to %autorelease and %autochangelog [skip changelog] --- changelog | 94 +++++++++++++++++++++++++++++++++++++++++++++++ libtommath.spec | 97 +------------------------------------------------ 2 files changed, 96 insertions(+), 95 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..f689794 --- /dev/null +++ b/changelog @@ -0,0 +1,94 @@ +* Tue Jan 04 2022 Frantisek Sumsal - 1.2.0-7 +- Initial EPEL 9 build for BZ#2029481 +- Temporarily skip building docs due to work around BZ#2031879 + +* Mon Dec 13 2021 Frantisek Sumsal - 1.2.0-6 +- Add a couple of missing BRs (texlive-kpathsea and texlive-metafont) + +* Wed Nov 03 2021 Frantisek Sumsal - 1.2.0-5 +- Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) +- (see: #1965446) + +* Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jan 25 2021 Than Ngo - 1.2.0-3 +- Add missing BRs + +* Tue Jul 28 2020 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Apr 09 2020 Gerd Pokorra - 1.2.0-1 +- Update to 1.2.0. +- Remove poster make tag +- Add BuildRequires texlive-appendix + +* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Oct 16 2019 Simone Caronni - 1.1.0-1 +- Update to 1.1.0. + +* Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Jun 02 2019 Leigh Scott - 1.0.1-9 +- Disable parallel build for docs + +* Tue May 14 2019 Scott Talbert - 1.0.1-8 +- Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) + +* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Apr 05 2018 Rafael Santos - 1.0.1-5 +- Resolves #1548832 - Fix Fedora build flags injection + +* Sun Feb 25 2018 Florian Weimer - 1.0.1-4 +- Add BuildRequires: ghostscript-tools-dvipdf + +* Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1.0.1-2 +- Switch to %%ldconfig_scriptlets + +* Mon Sep 11 2017 Simone Caronni - 1.0.1-1 +- Update to 1.0.1. +- Trim changelog. +- Clean up SPEC file. +- Remove RHEL 6 support. + +* Thu Aug 03 2017 Fedora Release Engineering - 1.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Jun 25 2017 Simone Caronni - 1.0-7 +- Update URL (#1463608, #1463547). + +* Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Feb 23 2016 Simone Caronni - 1.0-4 +- Fix installs with non-standard buildroots (#1299860). + +* Tue Feb 23 2016 Simone Caronni - 1.0-3 +- Remove useless latex build requirements. + +* Tue Feb 23 2016 Simone Caronni - 1.0-2 +- Use proper source URL. +- Cleanup SPEC file. + +* Tue Feb 23 2016 Simone Caronni - 1.0-1 +- Fix FTBFS (#1307741). +- Update to 1.0. +- Update URL. +- Use license macro. + +* Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/libtommath.spec b/libtommath.spec index 34492f7..f5881fb 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,6 +1,6 @@ Name: libtommath Version: 1.2.0 -Release: 7%{?dist} +Release: %autorelease Summary: A portable number theoretic multiple-precision integer library License: Public Domain URL: http://www.libtom.net/ @@ -56,97 +56,4 @@ find %{buildroot} -name '*.a' -delete %{_libdir}/pkgconfig/*.pc %changelog -* Tue Jan 04 2022 Frantisek Sumsal - 1.2.0-7 -- Initial EPEL 9 build for BZ#2029481 -- Temporarily skip building docs due to work around BZ#2031879 - -* Mon Dec 13 2021 Frantisek Sumsal - 1.2.0-6 -- Add a couple of missing BRs (texlive-kpathsea and texlive-metafont) - -* Wed Nov 03 2021 Frantisek Sumsal - 1.2.0-5 -- Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) -- (see: #1965446) - -* Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jan 25 2021 Than Ngo - 1.2.0-3 -- Add missing BRs - -* Tue Jul 28 2020 Fedora Release Engineering - 1.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Apr 09 2020 Gerd Pokorra - 1.2.0-1 -- Update to 1.2.0. -- Remove poster make tag -- Add BuildRequires texlive-appendix - -* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Oct 16 2019 Simone Caronni - 1.1.0-1 -- Update to 1.1.0. - -* Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Jun 02 2019 Leigh Scott - 1.0.1-9 -- Disable parallel build for docs - -* Tue May 14 2019 Scott Talbert - 1.0.1-8 -- Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) - -* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Apr 05 2018 Rafael Santos - 1.0.1-5 -- Resolves #1548832 - Fix Fedora build flags injection - -* Sun Feb 25 2018 Florian Weimer - 1.0.1-4 -- Add BuildRequires: ghostscript-tools-dvipdf - -* Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Feb 03 2018 Igor Gnatenko - 1.0.1-2 -- Switch to %%ldconfig_scriptlets - -* Mon Sep 11 2017 Simone Caronni - 1.0.1-1 -- Update to 1.0.1. -- Trim changelog. -- Clean up SPEC file. -- Remove RHEL 6 support. - -* Thu Aug 03 2017 Fedora Release Engineering - 1.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sun Jun 25 2017 Simone Caronni - 1.0-7 -- Update URL (#1463608, #1463547). - -* Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Feb 23 2016 Simone Caronni - 1.0-4 -- Fix installs with non-standard buildroots (#1299860). - -* Tue Feb 23 2016 Simone Caronni - 1.0-3 -- Remove useless latex build requirements. - -* Tue Feb 23 2016 Simone Caronni - 1.0-2 -- Use proper source URL. -- Cleanup SPEC file. - -* Tue Feb 23 2016 Simone Caronni - 1.0-1 -- Fix FTBFS (#1307741). -- Update to 1.0. -- Update URL. -- Use license macro. - -* Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild +%autochangelog From a0108a4f71a0e20fb7a8a39e3131c5caa090c466 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Sat, 2 Sep 2023 21:44:15 +0200 Subject: [PATCH 58/59] Fix CVE-2023-36328 (#2236877,#2236878) --- CVE-2023-36328.patch | 137 +++++++++++++++++++++++++++++++++++++++++++ libtommath.spec | 4 +- 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 CVE-2023-36328.patch diff --git a/CVE-2023-36328.patch b/CVE-2023-36328.patch new file mode 100644 index 0000000..a7c8b0c --- /dev/null +++ b/CVE-2023-36328.patch @@ -0,0 +1,137 @@ +From beba892bc0d4e4ded4d667ab1d2a94f4d75109a9 Mon Sep 17 00:00:00 2001 +From: czurnieden +Date: Tue, 9 May 2023 17:17:12 +0200 +Subject: [PATCH] Fix possible integer overflow + +--- + bn_mp_2expt.c | 4 ++++ + bn_mp_grow.c | 4 ++++ + bn_mp_init_size.c | 5 +++++ + bn_mp_mul_2d.c | 4 ++++ + bn_s_mp_mul_digs.c | 4 ++++ + bn_s_mp_mul_digs_fast.c | 4 ++++ + bn_s_mp_mul_high_digs.c | 4 ++++ + bn_s_mp_mul_high_digs_fast.c | 4 ++++ + 8 files changed, 33 insertions(+) + +diff --git a/bn_mp_2expt.c b/bn_mp_2expt.c +index 0ae3df1bf..23de0c3c5 100644 +--- a/bn_mp_2expt.c ++++ b/bn_mp_2expt.c +@@ -12,6 +12,10 @@ mp_err mp_2expt(mp_int *a, int b) + { + mp_err err; + ++ if (b < 0) { ++ return MP_VAL; ++ } ++ + /* zero a as per default */ + mp_zero(a); + +diff --git a/bn_mp_grow.c b/bn_mp_grow.c +index 9e904c547..2b1682651 100644 +--- a/bn_mp_grow.c ++++ b/bn_mp_grow.c +@@ -9,6 +9,10 @@ mp_err mp_grow(mp_int *a, int size) + int i; + mp_digit *tmp; + ++ if (size < 0) { ++ return MP_VAL; ++ } ++ + /* if the alloc size is smaller alloc more ram */ + if (a->alloc < size) { + /* reallocate the array a->dp +diff --git a/bn_mp_init_size.c b/bn_mp_init_size.c +index d62268721..99573833f 100644 +--- a/bn_mp_init_size.c ++++ b/bn_mp_init_size.c +@@ -6,6 +6,11 @@ + /* init an mp_init for a given size */ + mp_err mp_init_size(mp_int *a, int size) + { ++ ++ if (size < 0) { ++ return MP_VAL; ++ } ++ + size = MP_MAX(MP_MIN_PREC, size); + + /* alloc mem */ +diff --git a/bn_mp_mul_2d.c b/bn_mp_mul_2d.c +index 87354de20..bfeaf2eb2 100644 +--- a/bn_mp_mul_2d.c ++++ b/bn_mp_mul_2d.c +@@ -9,6 +9,10 @@ mp_err mp_mul_2d(const mp_int *a, int b, mp_int *c) + mp_digit d; + mp_err err; + ++ if (b < 0) { ++ return MP_VAL; ++ } ++ + /* copy */ + if (a != c) { + if ((err = mp_copy(a, c)) != MP_OKAY) { +diff --git a/bn_s_mp_mul_digs.c b/bn_s_mp_mul_digs.c +index 64509d4cb..3682b4980 100644 +--- a/bn_s_mp_mul_digs.c ++++ b/bn_s_mp_mul_digs.c +@@ -16,6 +16,10 @@ mp_err s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) + mp_word r; + mp_digit tmpx, *tmpt, *tmpy; + ++ if (digs < 0) { ++ return MP_VAL; ++ } ++ + /* can we use the fast multiplier? */ + if ((digs < MP_WARRAY) && + (MP_MIN(a->used, b->used) < MP_MAXFAST)) { +diff --git a/bn_s_mp_mul_digs_fast.c b/bn_s_mp_mul_digs_fast.c +index b2a287b02..3c4176a87 100644 +--- a/bn_s_mp_mul_digs_fast.c ++++ b/bn_s_mp_mul_digs_fast.c +@@ -26,6 +26,10 @@ mp_err s_mp_mul_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int digs) + mp_digit W[MP_WARRAY]; + mp_word _W; + ++ if (digs < 0) { ++ return MP_VAL; ++ } ++ + /* grow the destination as required */ + if (c->alloc < digs) { + if ((err = mp_grow(c, digs)) != MP_OKAY) { +diff --git a/bn_s_mp_mul_high_digs.c b/bn_s_mp_mul_high_digs.c +index 2bb2a5098..c9dd355f8 100644 +--- a/bn_s_mp_mul_high_digs.c ++++ b/bn_s_mp_mul_high_digs.c +@@ -15,6 +15,10 @@ mp_err s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) + mp_word r; + mp_digit tmpx, *tmpt, *tmpy; + ++ if (digs < 0) { ++ return MP_VAL; ++ } ++ + /* can we use the fast multiplier? */ + if (MP_HAS(S_MP_MUL_HIGH_DIGS_FAST) + && ((a->used + b->used + 1) < MP_WARRAY) +diff --git a/bn_s_mp_mul_high_digs_fast.c b/bn_s_mp_mul_high_digs_fast.c +index a2c4fb692..4ce7f590c 100644 +--- a/bn_s_mp_mul_high_digs_fast.c ++++ b/bn_s_mp_mul_high_digs_fast.c +@@ -19,6 +19,10 @@ mp_err s_mp_mul_high_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int + mp_digit W[MP_WARRAY]; + mp_word _W; + ++ if (digs < 0) { ++ return MP_VAL; ++ } ++ + /* grow the destination as required */ + pa = a->used + b->used; + if (c->alloc < pa) { diff --git a/libtommath.spec b/libtommath.spec index f5881fb..d78d18b 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -7,6 +7,8 @@ URL: http://www.libtom.net/ Source0: https://github.com/libtom/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch: CVE-2023-36328.patch + BuildRequires: make BuildRequires: libtool @@ -25,7 +27,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%setup -q +%autosetup -p1 # Fix permissions on installed library sed -i -e 's/644 $(LIBNAME)/755 $(LIBNAME)/g' makefile.shared # Fix pkgconfig path From 69165e2d8a4f203c9f8d92b148833fdf36b130aa Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 30 Oct 2023 23:18:12 +0300 Subject: [PATCH 59/59] Remove unnecessary files and fix spec-file --- changelog | 94 ----------------------------------------- libtommath.spec | 109 +++++++++++++++++++++++++++++++++++++++++++++++- sources | 1 - 3 files changed, 108 insertions(+), 96 deletions(-) delete mode 100644 changelog delete mode 100644 sources diff --git a/changelog b/changelog deleted file mode 100644 index f689794..0000000 --- a/changelog +++ /dev/null @@ -1,94 +0,0 @@ -* Tue Jan 04 2022 Frantisek Sumsal - 1.2.0-7 -- Initial EPEL 9 build for BZ#2029481 -- Temporarily skip building docs due to work around BZ#2031879 - -* Mon Dec 13 2021 Frantisek Sumsal - 1.2.0-6 -- Add a couple of missing BRs (texlive-kpathsea and texlive-metafont) - -* Wed Nov 03 2021 Frantisek Sumsal - 1.2.0-5 -- Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) -- (see: #1965446) - -* Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jan 25 2021 Than Ngo - 1.2.0-3 -- Add missing BRs - -* Tue Jul 28 2020 Fedora Release Engineering - 1.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Apr 09 2020 Gerd Pokorra - 1.2.0-1 -- Update to 1.2.0. -- Remove poster make tag -- Add BuildRequires texlive-appendix - -* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Oct 16 2019 Simone Caronni - 1.1.0-1 -- Update to 1.1.0. - -* Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Jun 02 2019 Leigh Scott - 1.0.1-9 -- Disable parallel build for docs - -* Tue May 14 2019 Scott Talbert - 1.0.1-8 -- Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) - -* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Apr 05 2018 Rafael Santos - 1.0.1-5 -- Resolves #1548832 - Fix Fedora build flags injection - -* Sun Feb 25 2018 Florian Weimer - 1.0.1-4 -- Add BuildRequires: ghostscript-tools-dvipdf - -* Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Feb 03 2018 Igor Gnatenko - 1.0.1-2 -- Switch to %%ldconfig_scriptlets - -* Mon Sep 11 2017 Simone Caronni - 1.0.1-1 -- Update to 1.0.1. -- Trim changelog. -- Clean up SPEC file. -- Remove RHEL 6 support. - -* Thu Aug 03 2017 Fedora Release Engineering - 1.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sun Jun 25 2017 Simone Caronni - 1.0-7 -- Update URL (#1463608, #1463547). - -* Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Feb 23 2016 Simone Caronni - 1.0-4 -- Fix installs with non-standard buildroots (#1299860). - -* Tue Feb 23 2016 Simone Caronni - 1.0-3 -- Remove useless latex build requirements. - -* Tue Feb 23 2016 Simone Caronni - 1.0-2 -- Use proper source URL. -- Cleanup SPEC file. - -* Tue Feb 23 2016 Simone Caronni - 1.0-1 -- Fix FTBFS (#1307741). -- Update to 1.0. -- Update URL. -- Use license macro. - -* Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/libtommath.spec b/libtommath.spec index d78d18b..a3eff90 100644 --- a/libtommath.spec +++ b/libtommath.spec @@ -1,3 +1,13 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 10; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + Name: libtommath Version: 1.2.0 Release: %autorelease @@ -58,4 +68,101 @@ find %{buildroot} -name '*.a' -delete %{_libdir}/pkgconfig/*.pc %changelog -%autochangelog +* Sat Sep 02 2023 Frantisek Sumsal - 1.2.0-10 +- Fix CVE-2023-36328 (#2236877,#2236878) + +* Tue Jan 04 2022 Frantisek Sumsal - 1.2.0-7 +- Initial EPEL 9 build for BZ#2029481 +- Temporarily skip building docs due to work around BZ#2031879 + +* Mon Dec 13 2021 Frantisek Sumsal - 1.2.0-6 +- Add a couple of missing BRs (texlive-kpathsea and texlive-metafont) + +* Wed Nov 03 2021 Frantisek Sumsal - 1.2.0-5 +- Drop an obsoleted texlive-updmap-map build dependency (#1999507, #1987664) +- (see: #1965446) + +* Thu Jul 22 2021 Fedora Release Engineering - 1.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jan 25 2021 Than Ngo - 1.2.0-3 +- Add missing BRs + +* Tue Jul 28 2020 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Apr 09 2020 Gerd Pokorra - 1.2.0-1 +- Update to 1.2.0. +- Remove poster make tag +- Add BuildRequires texlive-appendix + +* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Oct 16 2019 Simone Caronni - 1.1.0-1 +- Update to 1.1.0. + +* Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Jun 02 2019 Leigh Scott - 1.0.1-9 +- Disable parallel build for docs + +* Tue May 14 2019 Scott Talbert - 1.0.1-8 +- Add BR texlive-updmap-map to fix FTBFS when building docs (#1675313) + +* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Apr 05 2018 Rafael Santos - 1.0.1-5 +- Resolves #1548832 - Fix Fedora build flags injection + +* Sun Feb 25 2018 Florian Weimer - 1.0.1-4 +- Add BuildRequires: ghostscript-tools-dvipdf + +* Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1.0.1-2 +- Switch to %%ldconfig_scriptlets + +* Mon Sep 11 2017 Simone Caronni - 1.0.1-1 +- Update to 1.0.1. +- Trim changelog. +- Clean up SPEC file. +- Remove RHEL 6 support. + +* Thu Aug 03 2017 Fedora Release Engineering - 1.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Jun 25 2017 Simone Caronni - 1.0-7 +- Update URL (#1463608, #1463547). + +* Fri Feb 10 2017 Fedora Release Engineering - 1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Feb 23 2016 Simone Caronni - 1.0-4 +- Fix installs with non-standard buildroots (#1299860). + +* Tue Feb 23 2016 Simone Caronni - 1.0-3 +- Remove useless latex build requirements. + +* Tue Feb 23 2016 Simone Caronni - 1.0-2 +- Use proper source URL. +- Cleanup SPEC file. + +* Tue Feb 23 2016 Simone Caronni - 1.0-1 +- Fix FTBFS (#1307741). +- Update to 1.0. +- Update URL. +- Use license macro. + +* Thu Feb 04 2016 Fedora Release Engineering - 0.42.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + diff --git a/sources b/sources deleted file mode 100644 index fd4b630..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (libtommath-1.2.0.tar.gz) = 500bce4467d6cdb0b014e6c66d3b994a8d63b51475db6c3cd77c15c8368fbab4e3b5c458fcd5b35838b74c457a33c15b42d2356964f5ef2a0bd31fd544735c9a