From 5c94edceaae48ec14ad7359f89e28cc0489e6295 Mon Sep 17 00:00:00 2001
From: Guillaume Bougard <gbougard@teclib.com>
Date: Wed, 22 Jan 2025 10:04:14 +0100
Subject: [PATCH] fix: Use option to disable local package gpg check when
 installing with dnf Closes #797

---
 Changes                             | 2 ++
 contrib/unix/installer/RpmDistro.pm | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Changes b/Changes
index 856b7eb44..07fe7d29c 100644
--- a/Changes
+++ b/Changes
@@ -86,6 +86,8 @@ packaging:
   - libiconv 1.18
 * Update MacOSX packages to use OpenSSL 3.4.0
 * fix #816: Support --delaytime option in linux perl installer
+* fix #797: Use option to disable local package gpg check when installing with dnf
+  in linux perl installer
 
 1.11 Tue, 24 Sep 2024
 
diff --git a/contrib/unix/installer/RpmDistro.pm b/contrib/unix/installer/RpmDistro.pm
index af3b4589c..6e52e7d2d 100644
--- a/contrib/unix/installer/RpmDistro.pm
+++ b/contrib/unix/installer/RpmDistro.pm
@@ -136,7 +136,7 @@ sub install {
         $self->_prepareDistro();
         my $command = $self->{_yum} ? "yum -y install @rpms" :
             $self->{_zypper} ? "zypper -n install -y --allow-unsigned-rpm @rpms" :
-            $self->{_dnf} ? "dnf -y install @rpms" : "";
+            $self->{_dnf} ? "dnf -y install --setopt=localpkg_gpgcheck=0 @rpms" : "";
         die "Unsupported rpm based platform\n" unless $command;
         my $err = $self->system($command);
         if ($? >> 8 && $self->{_yum} && $self->downgradeAllowed()) {