Date: Wednesday, November 2, 2022 @ 12:06:26
  Author: foutrelis
Revision: 1341014

upgpkg: git-crypt 0.7.0-2: OpenSSL 3.0 rebuild

Added:
  git-crypt/trunk/openssl-3.0.patch
Modified:
  git-crypt/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   23 ++++++++++++------
 openssl-3.0.patch |   66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-11-02 11:13:30 UTC (rev 1341013)
+++ PKGBUILD    2022-11-02 12:06:26 UTC (rev 1341014)
@@ -8,25 +8,34 @@
 
 pkgname=git-crypt
 pkgver=0.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Transparent file encryption in Git'
 arch=(x86_64)
 url="https://www.agwa.name/projects/$pkgname";
 license=(GPL3)
-depends=(git
-         openssl)
-makedepends=(libxslt)
+depends=(git openssl)
+makedepends=(libxslt docbook-xsl)
 _archive="$pkgname-$pkgver"
 # Upstream has temporarily lost access to PGP keys, see:
 # https://github.com/AGWA/git-crypt/issues/245
-source=("$url/downloads/$_archive.tar.gz") #{,.asc})
-sha256sums=('50f100816a636a682404703b6c23a459e4d30248b2886a5cf571b0d52527c7d8')
+source=("$url/downloads/$_archive.tar.gz" #{,.asc}
+        openssl-3.0.patch)
+sha256sums=('50f100816a636a682404703b6c23a459e4d30248b2886a5cf571b0d52527c7d8'
+            'b8dc43540bfd80993359890a6064ef51a932d9e677b3cd62527c6cff4bdfc1f4')
             # 'SKIP')
 # validpgpkeys=('EF5D84C1838F2EB6D8968C0410378EFC2080080C') # Andrew Ayer 
<[email protected]>
 
+prepare() {
+       cd "$_archive"
+
+       # https://github.com/AGWA/git-crypt/pull/249
+       patch -Np1 -i ../openssl-3.0.patch
+}
+
 build() {
        cd "$_archive"
-       make ENABLE_MAN=yes PREFIX=/usr
+       make ENABLE_MAN=yes PREFIX=/usr \
+         
DOCBOOK_XSL=/usr/share/xml/docbook/xsl-stylesheets-*/manpages/docbook.xsl
 }
 
 package() {

Added: openssl-3.0.patch
===================================================================
--- openssl-3.0.patch                           (rev 0)
+++ openssl-3.0.patch   2022-11-02 12:06:26 UTC (rev 1341014)
@@ -0,0 +1,66 @@
+From c1cdc4097a90d3314bb287d51ff83c98d86a677c Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 14 May 2022 00:03:51 +0200
+Subject: [PATCH] fix build with libressl >= 3.5.0
+
+Fix the following build failure with libressl >= 3.5.0:
+
+crypto-openssl-10.cpp:78:18: error: field 'ctx' has incomplete type 'HMAC_CTX' 
{aka 'hmac_ctx_st'}
+   78 |         HMAC_CTX ctx;
+      |                  ^~~
+
+Fixes:
+ - 
http://autobuild.buildroot.org/results/98747d470c2ad59280934e160d24bd3fdad1503c
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ crypto-openssl-10.cpp | 5 ++---
+ crypto-openssl-11.cpp | 5 ++---
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/crypto-openssl-10.cpp b/crypto-openssl-10.cpp
+index f0f2c53..1623690 100644
+--- a/crypto-openssl-10.cpp
++++ b/crypto-openssl-10.cpp
+@@ -28,16 +28,15 @@
+  * as that of the covered work.
+  */
+ 
+-#include <openssl/opensslconf.h>
++#include <openssl/hmac.h>
+ 
+-#if !defined(OPENSSL_API_COMPAT)
++#if defined(HMAC_cleanup)
+ 
+ #include "crypto.hpp"
+ #include "key.hpp"
+ #include "util.hpp"
+ #include <openssl/aes.h>
+ #include <openssl/sha.h>
+-#include <openssl/hmac.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
+ #include <openssl/err.h>
+diff --git a/crypto-openssl-11.cpp b/crypto-openssl-11.cpp
+index adf03bb..518b90c 100644
+--- a/crypto-openssl-11.cpp
++++ b/crypto-openssl-11.cpp
+@@ -28,16 +28,15 @@
+  * as that of the covered work.
+  */
+ 
+-#include <openssl/opensslconf.h>
++#include <openssl/hmac.h>
+ 
+-#if defined(OPENSSL_API_COMPAT)
++#if !defined(HMAC_cleanup)
+ 
+ #include "crypto.hpp"
+ #include "key.hpp"
+ #include "util.hpp"
+ #include <openssl/aes.h>
+ #include <openssl/sha.h>
+-#include <openssl/hmac.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
+ #include <openssl/err.h>

Reply via email to