pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc
Module Name: pkgsrc
Committed By: jschauma
Date: Fri Sep 13 18:02:45 UTC 2024
Modified Files:
pkgsrc/doc: CHANGES-2024
Added Files:
pkgsrc/security/liboqs: DESCR Makefile PLIST PLIST.Linux PLIST.NetBSD
buildlink3.mk distinfo
pkgsrc/security/liboqs/patches: patch-common.c
Log Message:
add security/liboqs version 0.10.1
liboqs is an open source C library for quantum-safe cryptographic
algorithms. It provides a collection of open-source implementations of
quantum-safe key encapsulation mechanism (KEM) and digital signature
algorithms, a common API for these algorithms, and a test harness and
benchmarking routines.
`liboqs` is part of the Open Quantum Safe (OQS) project.
This package is largely based on work done by logan%cyberstorm.mu@localhost in
pkgsrc-wip with minor modifications by myself.
To generate a diff of this commit:
cvs rdiff -u -r1.5614 -r1.5615 pkgsrc/doc/CHANGES-2024
cvs rdiff -u -r0 -r1.1 pkgsrc/security/liboqs/DESCR \
pkgsrc/security/liboqs/Makefile pkgsrc/security/liboqs/PLIST \
pkgsrc/security/liboqs/PLIST.Linux pkgsrc/security/liboqs/PLIST.NetBSD \
pkgsrc/security/liboqs/buildlink3.mk pkgsrc/security/liboqs/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/security/liboqs/patches/patch-common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/doc/CHANGES-2024
diff -u pkgsrc/doc/CHANGES-2024:1.5614 pkgsrc/doc/CHANGES-2024:1.5615
--- pkgsrc/doc/CHANGES-2024:1.5614 Fri Sep 13 18:01:12 2024
+++ pkgsrc/doc/CHANGES-2024 Fri Sep 13 18:02:44 2024
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-2024,v 1.5614 2024/09/13 18:01:12 pin Exp $
+$NetBSD: CHANGES-2024,v 1.5615 2024/09/13 18:02:44 jschauma Exp $
Changes to the packages collection and infrastructure in 2024:
@@ -8639,3 +8639,4 @@ Changes to the packages collection and i
Updated mail/mblaze to 1.3 [schmonz 2024-09-13]
Updated misc/nq to 1.0 [schmonz 2024-09-13]
Updated sysutils/macchina to 6.2.1 [pin 2024-09-13]
+ Added security/liboqs version 0.10.1 [jschauma 2024-09-13]
Added files:
Index: pkgsrc/security/liboqs/DESCR
diff -u /dev/null pkgsrc/security/liboqs/DESCR:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/DESCR Fri Sep 13 18:02:44 2024
@@ -0,0 +1,7 @@
+liboqs is an open source C library for quantum-safe cryptographic
+algorithms. It provides a collection of open-source implementations of
+quantum-safe key encapsulation mechanism (KEM) and digital signature
+algorithms, a common API for these algorithms, and a test harness and
+benchmarking routines.
+
+`liboqs` is part of the Open Quantum Safe (OQS) project.
Index: pkgsrc/security/liboqs/Makefile
diff -u /dev/null pkgsrc/security/liboqs/Makefile:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/Makefile Fri Sep 13 18:02:44 2024
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2024/09/13 18:02:44 jschauma Exp $
+
+DISTNAME= liboqs-0.10.1
+CATEGORIES= security
+MASTER_SITES= ${MASTER_SITE_GITHUB:=open-quantum-safe/}
+
+MAINTAINER= logan%cyberstorm.mu@localhost
+HOMEPAGE= https://github.com/open-quantum-safe/liboqs/
+COMMENT= Post quantum crypto library
+LICENSE= mit
+
+# Used only for tests, not for other parts of the build.
+USE_TOOLS+= bash:test
+PYTHON_FOR_BUILD_ONLY= test
+TOOLS_CREATE+= python3
+TOOLS_PATH.python3= ${TOOL_PYTHONBIN:Q}
+
+REPLACE_BASH+= tests/run_astyle.sh
+REPLACE_BASH+= tests/test_spdx.sh
+REPLACE_BASH+= tests/test_vectors.sh
+
+TEST_DEPENDS+= astyle>=0:../../devel/astyle
+TEST_DEPENDS+= ${PYPKGPREFIX}-test>=0:../../devel/py-test
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist>=0:../../devel/py-test-xdist
+TEST_DEPENDS+= ${PYPKGPREFIX}-yaml>=0:../../textproc/py-yaml
+
+TEST_TARGET= run_tests
+
+.include "../../devel/cmake/build.mk"
+.include "../../lang/python/pyversion.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/security/liboqs/PLIST
diff -u /dev/null pkgsrc/security/liboqs/PLIST:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/PLIST Fri Sep 13 18:02:44 2024
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2024/09/13 18:02:44 jschauma Exp $
+include/oqs/common.h
+include/oqs/kem.h
+include/oqs/kem_bike.h
+include/oqs/kem_classic_mceliece.h
+include/oqs/kem_frodokem.h
+include/oqs/kem_hqc.h
+include/oqs/kem_kyber.h
+include/oqs/kem_ntruprime.h
+include/oqs/oqs.h
+include/oqs/oqsconfig.h
+include/oqs/rand.h
+include/oqs/sig.h
+include/oqs/sig_dilithium.h
+include/oqs/sig_falcon.h
+include/oqs/sig_sphincs.h
+lib/cmake/liboqs/liboqsConfig.cmake
+lib/cmake/liboqs/liboqsConfigVersion.cmake
+lib/cmake/liboqs/liboqsTargets-noconfig.cmake
+lib/cmake/liboqs/liboqsTargets.cmake
+lib/liboqs.a
+lib/pkgconfig/liboqs.pc
Index: pkgsrc/security/liboqs/PLIST.Linux
diff -u /dev/null pkgsrc/security/liboqs/PLIST.Linux:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/PLIST.Linux Fri Sep 13 18:02:45 2024
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST.Linux,v 1.1 2024/09/13 18:02:45 jschauma Exp $
+include/oqs/aes.h
+include/oqs/sha2.h
+include/oqs/sha3.h
+include/oqs/sha3x4.h
Index: pkgsrc/security/liboqs/PLIST.NetBSD
diff -u /dev/null pkgsrc/security/liboqs/PLIST.NetBSD:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/PLIST.NetBSD Fri Sep 13 18:02:45 2024
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.NetBSD,v 1.1 2024/09/13 18:02:45 jschauma Exp $
+include/oqs/kem_ml_kem.h
+include/oqs/sig_ml_dsa.h
Index: pkgsrc/security/liboqs/buildlink3.mk
diff -u /dev/null pkgsrc/security/liboqs/buildlink3.mk:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/buildlink3.mk Fri Sep 13 18:02:45 2024
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2024/09/13 18:02:45 jschauma Exp $
+
+BUILDLINK_TREE+= liboqs
+
+.if !defined(LIBOQS_BUILDLINK3_MK)
+LIBOQS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.liboqs+= liboqs>=0.10.1
+BUILDLINK_PKGSRCDIR.liboqs?= ../../security/liboqs
+
+.endif # LIBOQS_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -liboqs
Index: pkgsrc/security/liboqs/distinfo
diff -u /dev/null pkgsrc/security/liboqs/distinfo:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/distinfo Fri Sep 13 18:02:45 2024
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2024/09/13 18:02:45 jschauma Exp $
+
+BLAKE2s (liboqs-0.10.1.tar.gz) = be2ee7034329338c50be0a3197191473b6c2d42dd9f5c9b0335e7e207a52cab4
+SHA512 (liboqs-0.10.1.tar.gz) = 7049c084d9bef2064ff5ad4964bf5071b2fe0553c2dfe7522b32b3a441fcdd46f718adeca63a163e95d5f86c3f092b02ffa3190822861f566b498654711c722d
+Size (liboqs-0.10.1.tar.gz) = 4255203 bytes
+SHA1 (patch-common.c) = 8841eacb7500a1a589786eb710aa22f603a24af7
Index: pkgsrc/security/liboqs/patches/patch-common.c
diff -u /dev/null pkgsrc/security/liboqs/patches/patch-common.c:1.1
--- /dev/null Fri Sep 13 18:02:45 2024
+++ pkgsrc/security/liboqs/patches/patch-common.c Fri Sep 13 18:02:45 2024
@@ -0,0 +1,58 @@
+$NetBSD: patch-common.c,v 1.1 2024/09/13 18:02:45 jschauma Exp $
+
+From https://github.com/open-quantum-safe/liboqs/pull/1876
+
+--- src/common/common.c.orig 2024-06-07 14:38:26.000000000 +0000
++++ src/common/common.c 2024-09-10 04:14:27.028014167 +0000
+@@ -141,6 +141,51 @@
+ }
+ #endif
+ }
++#elif defined(__NetBSD__) || defined(__NetBSD)
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <aarch64/armreg.h>
++
++static void set_available_cpu_extensions(void) {
++ /* mark that this function has been called */
++ cpu_ext_data[OQS_CPU_EXT_INIT] = 1;
++ unsigned int cpu = 0;
++ size_t len;
++ char impl_buf[8];
++ int mib[2], ncpu;
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_NCPU;
++ len = sizeof(ncpu);
++ if (sysctl(mib, 2, &ncpu, &len, NULL, 0) != 0) {
++ fprintf(stderr, "Error getting HWCAP for ARM on NetBSD\n");
++ return;
++ }
++
++ char path[128];
++ struct aarch64_sysctl_cpu_id id;
++
++ len = sizeof(id);
++ snprintf(path, sizeof(path), "machdep.cpu%d.cpu_id", cpu);
++ if (sysctlbyname(path, &id, &len, NULL, 0) != 0) {
++ fprintf(stderr, "Error getting HWCAP for ARM on NetBSD\n");
++ return;
++ }
++
++ /* extensions from aarch64-option-extensions.def */
++ if (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_ADVSIMD) == ID_AA64PFR0_EL1_ADV_SIMD_IMPL) {
++ cpu_ext_data[OQS_CPU_EXT_ARM_NEON] = 1;
++ }
++ if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_AES) == ID_AA64ISAR0_EL1_AES_AES) {
++ cpu_ext_data[OQS_CPU_EXT_ARM_AES] = 1;
++ }
++ if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA2) & ID_AA64ISAR0_EL1_SHA2_SHA256HSU) != 0) {
++ cpu_ext_data[OQS_CPU_EXT_ARM_SHA2] = 1;
++ }
++ if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA3) & ID_AA64ISAR0_EL1_SHA3_EOR3) != 0) {
++ cpu_ext_data[OQS_CPU_EXT_ARM_SHA3] = 1;
++ }
++}
+ #elif defined(_WIN32)
+ static void set_available_cpu_extensions(void) {
+ /* mark that this function has been called */
Home |
Main Index |
Thread Index |
Old Index