public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/aide] rawhide: Use hash implementation from bundled nettle on RHEL
@ 2026-11-05  6:20 Daiki Ueno
  0 siblings, 0 replies; only message in thread
From: Daiki Ueno @ 2026-11-05  6:20 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/aide
            Branch : rawhide
            Commit : 0f4a84ebbe7c50eb0fc331ca9e7d8fce6faf0ac3
            Author : Daiki Ueno <dueno@redhat.com>
            Date   : 2026-11-04T14:46:37+09:00
            Stats  : +49/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/aide/c/0f4a84ebbe7c50eb0fc331ca9e7d8fce6faf0ac3?branch=rawhide

            Log:
            Use hash implementation from bundled nettle on RHEL

In RHEL, the nettle package is bundled in gnutls for FIPS
certification. Since aide only relies on nettle for hash algorithms
for non-cryptographic purposes, statically link to the library to
avoid unnecessary dependency. We could make it link to full-fledged
crypto libs such as openssl or gnutls, though it is currently not
possible as aide supports legacy/not-widely-supported algorithms such
as GOST hashes.

---
diff --git a/.gitignore b/.gitignore
index 5830dd1..1365a0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,6 @@ aide-0.14.tar.gz.asc
 /aide-0.19.2.tar.gz.asc
 /aide-0.19.4.tar.gz
 /aide-0.19.4.tar.gz.asc
+/nettle-4.0.tar.gz
+/nettle-4.0.tar.gz.sig
+/nettle-release-keyring.gpg

diff --git a/aide.spec b/aide.spec
index 5937abe..0b5b29a 100644
--- a/aide.spec
+++ b/aide.spec
@@ -1,9 +1,12 @@
+%bcond bundled_nettle 0%{?rhel}
+%global nettle_version 4.0
+
 Summary:        Intrusion detection environment
 Name:           aide
 Version:        0.19.4
 Release:        %autorelease
 URL:            https://github.com/aide/aide
-License:        GPL-2.0-or-later
+License:        GPL-2.0-or-later AND (LGPL-3.0-or-later OR GPL-2.0-or-later)
 
 Source0:        %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
 Source1:        %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc
@@ -16,13 +19,23 @@ Source5:        aide.logrotate
 Source6:        aide-check.service
 Source7:        aide-check.timer
 
+%if %{with bundled_nettle}
+Provides:	bundled(nettle) = %{nettle_version}
+Source200:	nettle-%{nettle_version}.tar.gz
+# Taken from the main nettle package
+Source201:	nettle-%{nettle_version}.tar.gz.sig
+Source202:	nettle-release-keyring.gpg
+%endif
+
 Patch0:         aide-include-permission-checks.patch
 
 BuildRequires:  gcc
 BuildRequires:  make
 BuildRequires:  bison flex
 BuildRequires:  pcre2-devel
+%if !%{with bundled_nettle}
 BuildRequires:  nettle-devel
+%endif
 BuildRequires:  zlib-devel
 BuildRequires:  libcurl-devel
 BuildRequires:  libacl-devel
@@ -49,7 +62,36 @@ checker and intrusion detection program.
 %autosetup -p1
 cp -a %{SOURCE4} .
 
+%if %{with bundled_nettle}
+%{gpgverify} --keyring='%{SOURCE202}' --signature='%{SOURCE201}' --data='%{SOURCE200}'
+
+mkdir -p bundled_nettle
+pushd bundled_nettle
+tar --strip-components=1 -xf %{SOURCE200}
+popd
+%endif
+
 %build
+%if %{with bundled_nettle}
+pushd bundled_nettle
+./.bootstrap
+
+# For annocheck
+export ASM_FLAGS="-Wa,--generate-missing-build-notes=yes"
+
+%configure --disable-documentation \
+	   --disable-shared \
+	   --disable-public-key
+%make_build
+ln -s . nettle
+popd
+
+export NETTLE_DIR="$PWD/bundled_nettle"
+
+export NETTLE_CFLAGS="-I$NETTLE_DIR"
+export NETTLE_LIBS="$NETTLE_DIR/libnettle.a"
+%endif
+
 #autoreconf -ivf
 %configure  \
   --disable-static \

diff --git a/sources b/sources
index 90dde0e..7c67f4c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,5 @@
 SHA512 (aide-0.19.4.tar.gz) = e3e1bc695ce4d1586ad61a6fa47d51fce4638709fe41be61f5bf092b4107222bde4361649e3a2b5923f43ac41a0c8fe08a599cef73aa5f201fee96dc09918859
 SHA512 (aide-0.19.4.tar.gz.asc) = cebfce947a7ca5c9fea3cea05ad0fcfc736a4719fc3ffae2228668e45f57e4450b09e6f4fb067234e4f9e8e6b512e40d1692c590352b49a4b1763b4fe205efb8
+SHA512 (nettle-4.0.tar.gz) = 833303d94f5a67094011ad4dd931fffdb9adf679b4df241a544a08194a66e6e449398b704ba5b29d52c1c3b5ada6f6dc18b24d1adb3382a68470a11645bf13cd
+SHA512 (nettle-4.0.tar.gz.sig) = 5f66a4f32b35473d54a1f9e1473e56530c9d22182169449568ae1a27c76a380c2a1d400b4e94c89f1b12bf22b21cf7021a3622da09b6c95f1e8d38929ae89f48
+SHA512 (nettle-release-keyring.gpg) = 0e59447eb74017439c8b5b5b05173c0ffd710705d2a9c1f74833b7034fad1608fa1bdd2c308e6c42214553cd648606b6a07044ea39677b1b3452cb4d07bf889b

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-05  6:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05  6:20 [rpms/aide] rawhide: Use hash implementation from bundled nettle on RHEL Daiki Ueno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox