The package rpms/cryptlib.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cryptlib.git/commit/?id=a3e9fc40f....
Change:
+ExclusiveArch: x86_64 aarch64 ppc64le
Thanks.
Full change:
============
commit a3e9fc40f72102f775c1f44d112aa09b0cb5ed92
Author: Ralf Senderek <fedora(a)senderek.ie>
Date: Fri Mar 4 22:17:46 2022 +0100
Resolve the illegal instruction issue caused by -march=native
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6974414..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-/3.4.5
-/3.4.6
-/devel
-/cl346_fedora.zip
-/cl346_fedora.zip.sig
-/cryptlib-tests.tar.gz
-/cryptlib-perlfiles.tar.gz
diff --git a/COPYING b/COPYING
deleted file mode 100644
index efaaae9..0000000
--- a/COPYING
+++ /dev/null
@@ -1,60 +0,0 @@
-This file contains the usage terms for cryptlib. The full details of cryptlib
-usage are provided on the cryptlib home page; although this file and the
-information on the web page should be identical, in case of any dispute the
-web page takes precedence. This file is included because some distributions
-require the presence of a COPYING file.
-
-cryptlib is distributed under a dual license that allows free, open-source use
-under a GPL-compatible license and closed-source use under a standard
-commercial license. The GPL-compatible license (a.k.a. the Sleepycat license)
-is given below. Further details on this license are available from the
-cryptlib home page.
-
- Copyright 1992-2016 Peter Gutmann. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. Redistributions in any form must be accompanied by information on how to
- obtain complete source code for the cryptlib software and any accompanying
- software that uses the cryptlib software. The source code must either be
- included in the distribution or be available for no more than the cost of
- distribution, and must be freely redistributable under reasonable
- conditions. For an executable file, complete source code means the source
- code for all modules it contains or uses. It does not include source code
- for modules or files that typically accompany the major components of the
- operating system on which the executable file runs.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO
- EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- OF SUCH DAMAGE.
-
-Note that decoupling the software from the user, for example by running in a
-SaaS configuration, does not exempt you from these requirements.
-
-If you're unable to comply with the above license then the following,
-alternate usage conditions apply:
-
- Any large-scale commercial use of cryptlib requires a license. "Large-scale
- commercial use" means any revenue-generating purpose such as use for
- company-internal purposes, or use of cryptlib in an application or product,
- with a total gross revenue of over US$5,000. This allows cryptlib to be
- used in freeware and shareware applications, for evaluation and research
- purposes, and for non-revenue-generating or personal use without charge. In
- addition the author reserves the right to grant free licenses for commercial
- use in special cases (for example where there is a general benefit to the
- public), contact the author for details if you think you qualify.
diff --git a/ccflagspatch b/ccflagspatch
deleted file mode 100644
index 61352cd..0000000
--- a/ccflagspatch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cl-original/makefile 2019-03-10 11:50:35.325298573 +0100
-+++ cl-patched/makefile 2019-03-10 11:53:03.663407724 +0100
-@@ -90,7 +90,7 @@
- # Further cc flags are gathered dynamically at runtime via the ccopts.sh
- # script.
-
--CFLAGS = -c -D__UNIX__ -DNDEBUG -I.
-+CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(ADDFLAGS)
- CFLAGS_DEBUG = -c -D__UNIX__ -I. -g -O1
- CFLAGS_DEBUGGCC = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1
- CFLAGS_ANALYSE = -c -D__UNIX__ -I.
diff --git a/cl346_fedora.zip b/cl346_fedora.zip
deleted file mode 100644
index ed4f8cd..0000000
Binary files a/cl346_fedora.zip and /dev/null differ
diff --git a/cl346_fedora.zip.sig b/cl346_fedora.zip.sig
deleted file mode 100644
index 1e8c10f..0000000
Binary files a/cl346_fedora.zip.sig and /dev/null differ
diff --git a/configpatch b/configpatch
new file mode 100644
index 0000000..ed29304
--- /dev/null
+++ b/configpatch
@@ -0,0 +1,21 @@
+--- cl-original/misc/config.h 2022-03-04 17:55:32.643896948 +0100
++++ cl-patched/misc/config.h 2022-03-04 19:46:36.843663542 +0100
+@@ -218,7 +218,7 @@
+
+ /* Whether to build the Java/JNI interface or not */
+
+-/* #define USE_JAVA */
++#define USE_JAVA
+
+ /* Whether to provide descriptive text messages for errors or not.
+ Disabling these can reduce code size, at the expense of making error
+@@ -1327,4 +1327,9 @@
+ #undef USE_ERRMSGS
+ #endif /* 0 */
+
++#undef USE_IDEA
++#undef USE_OBSCURE_ALGORITHMS
++#undef USE_PATENTED_ALGORITHMS
++#define USE_SHA2_EXT
++
+ #endif /* _CONFIG_DEFINED */
diff --git a/cryptlib.spec b/cryptlib.spec
index a182e2f..d6e757c 100644
--- a/cryptlib.spec
+++ b/cryptlib.spec
@@ -1,31 +1,33 @@
-%global includetests 0
+%global includetests 1
# 0=no, 1=yes
%global cryptlibdir %{_libdir}/%{name}
%global withpython2 0
Name: cryptlib
Version: 3.4.6
-Release: 4%{?dist}
+Release: 6%{?dist}
Summary: Security library and toolkit for encryption and authentication services
License: Sleepycat and OpenSSL
URL:
https://www.cs.auckland.ac.nz/~pgut001/cryptlib
-Source0:
https://crypto-bone.com/fedora/cl346_fedora.zip
-Source1:
https://crypto-bone.com/fedora/cl346_fedora.zip.sig
+Source0:
https://senderek.ie/fedora/cl346_fedora.zip
+Source1:
https://senderek.ie/fedora/cl346_fedora.zip.sig
# for security reasons a public signing key should always be stored in distgit
# and never be used with a URL to make impersonation attacks harder
# (verified:
https://senderek.ie/keys/codesigningkey)
Source2: gpgkey-3274CB29956498038A9C874BFBF6E2C28E9C98DD.asc
-Source3:
https://crypto-bone.com/fedora/README-manual
-Source4:
https://crypto-bone.com/fedora/cryptlib-tests.tar.gz
-Source5:
https://crypto-bone.com/fedora/cryptlib-perlfiles.tar.gz
+Source3:
https://senderek.ie/fedora/README-manual
+Source4:
https://senderek.ie/fedora/cryptlib-tests.tar.gz
+Source5:
https://senderek.ie/fedora/cryptlib-perlfiles.tar.gz
# soname is now libcl.so.3.4
Patch1: flagspatch
-Patch2: javapatch
+Patch2: configpatch
Patch3: errorpatch
+Patch4: testpatch
+Patch5: x86-64patch
-ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
+ExclusiveArch: x86_64 aarch64 ppc64le
BuildRequires: gcc
BuildRequires: libbsd-devel
@@ -143,6 +145,8 @@ cd %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
# remove pre-build jar file
rm %{_builddir}/%{name}-%{version}/bindings/cryptlib.jar
@@ -164,10 +168,10 @@ cp /etc/alternatives/java_sdk/include/jni.h .
cp /etc/alternatives/java_sdk/include/linux/jni_md.h .
make clean
-make shared %{?_smp_mflags} ADDFLAGS="%{optflags}"
+make shared ADDFLAGS="%{optflags}"
ln -s libcl.so.3.4.6 libcl.so
ln -s libcl.so libcl.so.3.4
-make stestlib %{?_smp_mflags} ADDFLAGS="%{optflags}"
+make stestlib ADDFLAGS="%{optflags}"
# build python modules
cd bindings
@@ -257,12 +261,12 @@ tar xpzf %{SOURCE4}
# in KOJI tests must be disabled as there is no networking
%if %{includetests}
cd %{_builddir}/%{name}-%{version}
- ln -s libcl.so.3.4.6 ./libcl.so.3.4
export LD_LIBRARY_PATH=.
echo "Running tests on the cryptlib library. This will take a few
minutes."
- echo "Network access is necessary to complete all tests!"
- ./stestlib > %{_builddir}/%{name}-%{version}/stestlib.log
- cp %{_builddir}/%{name}-%{version}/stestlib.log
%{buildroot}%{_docdir}/%{name}/stestlib.log
+ cp %{buildroot}%{cryptlibdir}/c/cryptlib-test.c .
+ sed -i '41s/<cryptlib\/cryptlib.h>/\".\/cryptlib.h\"/'
cryptlib-test.c
+ gcc -o cryptlib-test cryptlib-test.c -L. libcl.so.3.4.6
+ ./cryptlib-test
%endif
@@ -309,6 +313,12 @@ tar xpzf %{SOURCE4}
%changelog
+* Fri Mar 04 2022 Ralf Senderek <innovation(a)senderek.ie> - 3.4.6-6
+- Define -march=x86-64
+
+* Sat Feb 26 2022 Ralf Senderek <innovation(a)senderek.ie> - 3.4.6-5
+- Correct date in test/cert.c
+
* Thu Feb 17 2022 Ralf Senderek <innovation(a)senderek.ie> - 3.4.6-4
- Drop i686
diff --git a/gccversionpatch b/gccversionpatch
deleted file mode 100644
index 4d97861..0000000
--- a/gccversionpatch
+++ /dev/null
@@ -1,33 +0,0 @@
---- cl-original/tools/ccopts.sh 2019-11-23 17:03:39.315504598 +0100
-+++ cl-testpatch/tools/ccopts.sh 2020-01-22 18:49:01.093189548 +0100
-@@ -508,10 +508,17 @@
- # apparent version less than 10 we add a trailing zero to the string to make
- # the checks that follow work.
-
--GCC_VER="$($CC -dumpversion | tr -d '.' | cut -c 1-2)"
--if [ "$GCC_VER" -lt 10 ] ; then
-- GCC_VER="${GCC_VER}0" ;
--fi
-+GCC_VER="$($CC -dumpversion)"
-+case $GCC_VER in
-+ [0-9])
-+ GCC_VER="${GCC_VER}0" ;;
-+
-+ [0-9][0-9]*)
-+ GCC_VER="$(echo $GCC_VER | tr -d '.' | cut -c 1-3)"
;;
-+
-+ *)
-+ GCC_VER="$(echo $GCC_VER | tr -d '.' | cut -c 1-2)"
;;
-+esac
-
- # Try and determine the CPU type. This is made more complex by a pile of
- # *BSE's which, along with antideluvian tools like an as that doesn't
-@@ -606,7 +613,7 @@
- CCARGS="$CCARGS -march=pentium" ;;
- esac ;
- else
-- CCARGS="$CCARGS -mcpu=pentium" ;
-+ CCARGS="$CCARGS -march=native" ;
- fi ;
- fi
-
diff --git a/javapatch b/javapatch
deleted file mode 100644
index 7d5f510..0000000
--- a/javapatch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cl-original/misc/config.h 2021-12-03 16:43:09.959891808 +0100
-+++ cl-patched/misc/config.h 2021-12-03 16:44:07.248896490 +0100
-@@ -218,7 +218,7 @@
-
- /* Whether to build the Java/JNI interface or not */
-
--/* #define USE_JAVA */
-+#define USE_JAVA
-
- /* Whether to provide descriptive text messages for errors or not.
- Disabling these can reduce code size, at the expense of making error
diff --git a/sources b/sources
index abc18c1..8afab63 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
SHA512 (cl346_fedora.zip) =
a6149c91ce262f5aed253e0e1de297f690b5ecfa194c06fe4a68d233a450666bce3ca51473fbe17b88aa6fede058ec9b91b6cf7378c7b192de312a503cbd7a93
SHA512 (cl346_fedora.zip.sig) =
64e66b074823eeb42d2bdaa6d7136c2b3100aede2575a86ceb2257f3859511f2e1d57c3a9cfdc4e96ccc28ef0de66798bae31c51dc582dc9aa528e3d5a33b7f6
SHA512 (cryptlib-perlfiles.tar.gz) =
b975d34acfd1d99a224bbd5536483e5489feac8801a567740ec668bcef9a1eff67fddbdad53f61b2ff48bd43396e92f070ebf4de622f3edeb70428f4aaae2ff6
-SHA512 (cryptlib-tests.tar.gz) =
25f3cc41fd5fa1e8a3f1c800b86039cb960249c98a16243f7aef1af9ec1747cbc11b18a0d7b5c059a61c5247b45f290f84f3a4a11fc3257cb895607940e05c93
+SHA512 (cryptlib-tests.tar.gz) =
3c32ed3af34617decec5edce97bb54d8a5a242b2214d2055aca6ed71f500fe4cfb8df2d3a1bfb13e003060eccdbb4428042b15b4bc8580cb2eaeedd8f61776d0
diff --git a/testpatch b/testpatch
new file mode 100644
index 0000000..efb100e
--- /dev/null
+++ b/testpatch
@@ -0,0 +1,14 @@
+--- cl-original/test/certs.c 2022-02-25 19:58:23.896919893 +0100
++++ cl-patched/test/certs.c 2022-02-25 19:59:14.352826858 +0100
+@@ -50,9 +50,9 @@
+
+ #define ONE_YEAR_TIME ( 365 * 86400L )
+ #if defined( __MWERKS__ ) || defined( SYMANTEC_C ) || defined( __MRC__ )
+- #define CERTTIME_DATETEST ( ( ( 2021 - 1970 ) * ONE_YEAR_TIME ) + 2082844800L )
++ #define CERTTIME_DATETEST ( ( ( 2022 - 1970 ) * ONE_YEAR_TIME ) + 2082844800L )
+ #else
+- #define CERTTIME_DATETEST ( ( 2021 - 1970 ) * ONE_YEAR_TIME )
++ #define CERTTIME_DATETEST ( ( 2022 - 1970 ) * ONE_YEAR_TIME )
+ #endif /* Macintosh-specific weird epoch */
+ #if ( ULONG_MAX > 0xFFFFFFFFUL ) || defined( _M_X64 )
+ #define SYSTEM_64BIT
diff --git a/threadpatch b/threadpatch
deleted file mode 100644
index 422bafe..0000000
--- a/threadpatch
+++ /dev/null
@@ -1,24 +0,0 @@
---- cl-original/kernel/thread.h 2021-06-24 14:55:26.169597780 +0200
-+++ cl-patched/kernel/thread.h 2021-06-24 14:58:02.485568178 +0200
-@@ -2979,6 +2979,8 @@
- "Posix is portable in the sense that you can use a forklift to move the
- printed volumes around" */
-
-+#include <sched.h>
-+
- #define THREADFUNC_DEFINE( name, arg ) void *name( void *arg )
- #define THREAD_CREATE( function, arg, threadHandle, syncHandle, status ) \
- { \
-@@ -3016,7 +3018,11 @@
- #if defined( __linux__ ) && !defined( __USE_GNU )
- void pthread_yield( void );
- #endif /* Present but not prototyped unless GNU extensions are enabled */
-- #define THREAD_YIELD() pthread_yield()
-+
-+ #if defined( __linux__ ) && ( OSVERSION > 3 )
-+ #define THREAD_YIELD() sched_yield()
-+ #endif
-+
- #endif /* Not-very-portable Posix portability */
- #define THREAD_SLEEP( ms ) { \
- struct timeval tv = { 0 }; \
diff --git a/x86-64patch b/x86-64patch
new file mode 100644
index 0000000..907c569
--- /dev/null
+++ b/x86-64patch
@@ -0,0 +1,11 @@
+--- cl-original/tools/ccopts.sh 2022-03-04 19:32:14.642320216 +0100
++++ cl-patched/tools/ccopts.sh 2022-03-04 19:45:06.169944941 +0100
+@@ -897,7 +897,7 @@
+ if [ $GENERICBUILD -gt 0 ] ; then
+ echo " (Enabling lowest-common-denominator build options for cross-platform
library)." >&2 ;
+ else
+- CCARGS="$CCARGS -march=native -mtune=generic" ;
++ CCARGS="$CCARGS -march=x86-64 -mtune=generic" ;
+ fi
+ if [ "$ARCH" = "x86_64" ] ; then
+ CCARGS="$CCARGS -fPIC" ;