0002-fix-darwin-ARM-CPU-darwin-krb5-path-fix.patch

application/octet-stream

Filename: 0002-fix-darwin-ARM-CPU-darwin-krb5-path-fix.patch
Type: application/octet-stream
Part: 1
Message: kerberos/001_auth test fails on arm CPU darwin

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch 0002
Subject: fix: darwin: ARM CPU darwin krb5 path fix
File+
src/test/kerberos/t/001_auth.pl 9 2
From d389ecd90f0999d7c8c35f2ec612cca11b3a69e9 Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
Date: Fri, 23 Sep 2022 14:30:06 +0300
Subject: [PATCH 2/2] fix: darwin: ARM CPU darwin krb5 path fix

---
 src/test/kerberos/t/001_auth.pl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index 47169a1d1e..b1dc9d8ef5 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -34,8 +34,15 @@ my ($krb5_bin_dir, $krb5_sbin_dir);
 
 if ($^O eq 'darwin')
 {
-	$krb5_bin_dir  = '/usr/local/opt/krb5/bin';
-	$krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
+	# in arm CPUS krb5 package is installed in /opt/homebrew/opt/krb5 path
+	# need to double check it
+	my $krb5_path = '/usr/local/opt/krb5';
+	if (! -e $krb5_path || (-e $krb5_path && ! -d $krb5_path))
+	{
+		$krb5_path = '/opt/homebrew/opt/krb5';
+	}
+	$krb5_bin_dir = $krb5_path . '/bin';
+	$krb5_sbin_dir = $krb5_path . '/sbin';
 }
 elsif ($^O eq 'freebsd')
 {
-- 
2.25.1