summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlphaJack2024-02-24 19:31:11 +0100
committerAlphaJack2024-02-24 19:31:11 +0100
commit847a320a014555ab08877d084bac1a8a8016cc12 (patch)
treed92cbc1f8e43ed6e31c6d2d064670afc4c7f6e81
parente10baad53493a0db0257fb1e36798318ee1deccf (diff)
downloadaur-847a320a014555ab08877d084bac1a8a8016cc12.tar.gz
Updated libcorecrypto to 2022
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD41
-rw-r--r--corecrypto.zip.b21
-rw-r--r--corecrypto.zip.sha2561
4 files changed, 32 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ead8080a2597..11f43228ae8a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = libcorecrypto
pkgdesc = Library implementing Apple low-level cryptographic primitives
- pkgver = 2021
+ pkgver = 2022
pkgrel = 1
url = https://developer.apple.com/security/
arch = x86_64
@@ -10,12 +10,14 @@ pkgbase = libcorecrypto
makedepends = clang
makedepends = cmake
makedepends = curl
- makedepends = unzip
+ makedepends = python
+ provides = libcorecrypto
+ conflicts = libcorecrypto-git
source = LICENSE
- source = corecrypto.zip.sha256
+ source = corecrypto.zip.b2
source = code-coverage.cmake
- sha256sums = ffaf28b090b70d896fad024204eb0a84d0fb4d2f32c9861b9ba7f78bc50120e7
- sha256sums = 0f0ccf24817608571d17beee416ebda10156c4d9cd493624be28da37c43243c9
- sha256sums = f1f87321815aebb67af9da7f85a1d6d7805fb85ed5ef2cc0559a082a6c8dd5d1
+ b2sums = 571233903371c819e99b2e39f4b32013b37e3c8a618d54ee27d98b0c61bfb50f702780f597e096df9d8e8e4d0ad0a4e3fcaf6949b7035796ecb5be274c1894d0
+ b2sums = 97e9b6d5e586bdd53ed81db49af3da6dee10ca3e2007f2043555eaebab8aa6136d5679b1f4c30132bdbb87f869c3f27b7283a24bad0c6b610c04be8f13930a2b
+ b2sums = d934a8493da900214c10781bfdf58e6a4c776ac15030ba8ab6b4ab51ab505acffc4eb9050482471f347e2efae1118824aa52d32af2fc6bcad67475ab4e0d2cd2
pkgname = libcorecrypto
diff --git a/PKGBUILD b/PKGBUILD
index 8cfd5ba7f06d..1824348db84c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,29 @@
# Maintainer: AlphaJack <alphajack at tuta dot io>
pkgname="libcorecrypto"
-pkgver=2021
+# curl -s https://developer.apple.com/security/ | grep 'rel="/file/?file=security&agree=Yes"' | cut -d "(" -f2 | cut -d ")" -f1 | grep -o '[0-9]\+'
+pkgver=2022
pkgrel=1
pkgdesc="Library implementing Apple low-level cryptographic primitives"
url="https://developer.apple.com/security/"
license=("custom")
arch=("x86_64" "armv7h" "aarch64")
-makedepends=("clang" "cmake" "curl" "unzip")
+makedepends=("clang" "cmake" "curl" "python")
source=("LICENSE"
- "corecrypto.zip.sha256"
+ "corecrypto.zip.b2"
"code-coverage.cmake")
-sha256sums=('ffaf28b090b70d896fad024204eb0a84d0fb4d2f32c9861b9ba7f78bc50120e7'
- '0f0ccf24817608571d17beee416ebda10156c4d9cd493624be28da37c43243c9'
- 'f1f87321815aebb67af9da7f85a1d6d7805fb85ed5ef2cc0559a082a6c8dd5d1')
+b2sums=('571233903371c819e99b2e39f4b32013b37e3c8a618d54ee27d98b0c61bfb50f702780f597e096df9d8e8e4d0ad0a4e3fcaf6949b7035796ecb5be274c1894d0'
+ '97e9b6d5e586bdd53ed81db49af3da6dee10ca3e2007f2043555eaebab8aa6136d5679b1f4c30132bdbb87f869c3f27b7283a24bad0c6b610c04be8f13930a2b'
+ 'd934a8493da900214c10781bfdf58e6a4c776ac15030ba8ab6b4ab51ab505acffc4eb9050482471f347e2efae1118824aa52d32af2fc6bcad67475ab4e0d2cd2')
+provides=("libcorecrypto")
+conflicts=("libcorecrypto-git")
-build(){
+prepare(){
# get corecrypto.zip from apple website
# since apple doesn't allow redistribution of the archive, and that a canonical download link would have been too mainstream, i had to use firefox > copy as curl
# also the server doesn't seem to support byte ranges, so to skip the download we cannot rely on curl
- if [ -f "corecrypto.zip" ] && sha256sum --check --quiet "corecrypto.zip.sha256"; then
- echo "[OK] Skipping download, corecrypto.zip already exists"
- else
- echo "[W8] Downloading corecrypto.zip from Apple (~40MB)"
+ echo "==> Retrieving corecrypto.zip from Apple (~40MB)..."
+ if [ ! -f "corecrypto.zip" ]; then
curl -s 'https://developer.apple.com/file/?file=security&agree=Yes' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
@@ -39,13 +40,16 @@ build(){
-H 'Sec-Fetch-User: ?1' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
- -o "corecrypto.zip"
- echo "[OK] Download complete"
+ -o "corecrypto.zip"
fi
- echo "[W8] Checking hash"
- sha256sum --check --quiet "corecrypto.zip.sha256" || return 1
- echo "[OK] Hash matches"
- unzip -q -o "corecrypto.zip"
+ echo " -> Found corecrypto.zip"
+ echo "==> Validating corecrypto.zip with b2sums..."
+ b2sum --check --quiet "corecrypto.zip.b2" || return 1
+ echo " corecrypto.zip. ... Passed"
+ bsdtar --extract --file "corecrypto.zip"
+}
+
+build(){
cd "corecrypto"
#
install -d "scripts"
@@ -56,7 +60,8 @@ build(){
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
- -Wno-dev
+ -Wno-dev \
+ -Wimplicit-function-declaration
# avoid errors, as per https://github.com/NyaMisty/AltServer-Linux/
sed '/corecrypto_perf\|corecrypto_test/d' -i "build/CMakeFiles/Makefile2"
cmake --build "build" -j "$(nproc)"
diff --git a/corecrypto.zip.b2 b/corecrypto.zip.b2
new file mode 100644
index 000000000000..8fc864b4ec41
--- /dev/null
+++ b/corecrypto.zip.b2
@@ -0,0 +1 @@
+9d3d1afcdeaa76fe32e67ef95c6a10f8103700ca7c40903717b4ddb228f0b472ca63679c124e4e8b7c11973b9b6112ee1c48b7aa9dcd46f80f387ed613689d2e corecrypto.zip
diff --git a/corecrypto.zip.sha256 b/corecrypto.zip.sha256
deleted file mode 100644
index b2c4edbd3609..000000000000
--- a/corecrypto.zip.sha256
+++ /dev/null
@@ -1 +0,0 @@
-14e4994d2a937c5f21aaf12367ec34758971c3a30eec773916a0dd5ad207b645 corecrypto.zip