The package rpms/sssd.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/sssd.git/commit/?id=d5cf0fa7bf84ab7b....
Change: +%ifarch %{valgrind_arches}
Thanks.
Full change: ============
commit 555ed6d61162d1f6149f339e3f65e125d7e83d57 Author: Andrea Bolognani abologna@redhat.com Date: Thu Feb 27 16:49:58 2025 +0100
Fix riscv64 build
In addition to the check added around the valgrind-devel BuildRequires in the previous commit, we also need to backport an upstream fix. With these changes, the package can be built successfully on riscv64.
Signed-off-by: Andrea Bolognani abologna@redhat.com
diff --git a/0001-configure-Require-valgrind-devel-when-valgrind-is-en.patch b/0001-configure-Require-valgrind-devel-when-valgrind-is-en.patch new file mode 100644 index 0000000..65284c7 --- /dev/null +++ b/0001-configure-Require-valgrind-devel-when-valgrind-is-en.patch @@ -0,0 +1,91 @@ +From 3aab117ea3c543e5711577456c5bb87ae6b8fbd3 Mon Sep 17 00:00:00 2001 +From: Andrea Bolognani abologna@redhat.com +Date: Thu, 20 Feb 2025 18:16:21 +0100 +Subject: [PATCH] configure: Require valgrind-devel when valgrind is enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Currently we include <valgrind/valgrind.h> unconditionally to +access the RUNNING_ON_VALGRIND macro, which allows us to skip +one of the tests which is known not to work correctly under +valgrind. + +However, if only the runtime part of valgrind in installed on +the system and the devel part is missing, this will result in +a very late compilation error. Checking for the header's +presence at configure time allows us to provide better +diagnostics, earlier. + +More importantly, this makes it possible to build sssd at all +on architectures where valgrind is not yet available, such as +riscv64. + +Signed-off-by: Andrea Bolognani abologna@redhat.com + +Reviewed-by: Alejandro López allopez@redhat.com +Reviewed-by: Alexey Tikhonov atikhono@redhat.com +(cherry picked from commit 8477aa0658f5af5133a694bba09e0a68fbedc649) +--- + configure.ac | 7 +++++++ + src/tests/cmocka/test_iobuf.c | 6 ++++++ + 2 files changed, 13 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 90cb1f3ec..804c150de 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -543,6 +543,13 @@ AM_CHECK_PAM_WRAPPER + AM_CHECK_TEST_CA + AX_VALGRIND_CHECK + ++AS_IF([test x$VALGRIND_ENABLED = xyes], [ ++ AC_CHECK_HEADERS([valgrind/valgrind.h],,AC_MSG_ERROR([valgrind-devel required with valgrind enabled])) ++], [ ++ AC_CHECK_HEADERS([valgrind/valgrind.h]) ++]) ++ ++ + # Check if the user wants SSSD to be compiled with systemtap probes + AM_CHECK_SYSTEMTAP + +diff --git a/src/tests/cmocka/test_iobuf.c b/src/tests/cmocka/test_iobuf.c +index 7b4de54f5..145bee07e 100644 +--- a/src/tests/cmocka/test_iobuf.c ++++ b/src/tests/cmocka/test_iobuf.c +@@ -20,6 +20,8 @@ + */ + #define _GNU_SOURCE /* For memmem() */ + ++#include "config.h" ++ + #include <stdio.h> + #include <fcntl.h> + #include <errno.h> +@@ -28,7 +30,9 @@ + #include <string.h> + #include <stddef.h> + #include <setjmp.h> ++#ifdef HAVE_VALGRIND_VALGRIND_H + #include <valgrind/valgrind.h> ++#endif + #include <cmocka.h> + #include <sys/mman.h> + #include <sys/stat.h> +@@ -187,11 +191,13 @@ static void test_sss_iobuf_secure(void **state) + struct sss_iobuf *iobuf_secret_2; + struct sss_iobuf *iobuf_nosecret; + ++#ifdef HAVE_VALGRIND_VALGRIND_H + /* Valgrind interferes with this test by somehow making disappear the heap. + * So don't run it on Valgrind. */ + if (RUNNING_ON_VALGRIND) { + skip(); + } ++#endif + + + mem_ctx = talloc_new(NULL); +-- +2.48.1 + diff --git a/sssd.spec b/sssd.spec index ee4c587..92a0b2d 100644 --- a/sssd.spec +++ b/sssd.spec @@ -64,7 +64,7 @@
Name: sssd Version: %{downstream_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: System Security Services Daemon License: GPL-3.0-or-later URL: https://github.com/SSSD/sssd/ @@ -72,6 +72,7 @@ Source0: %{url}/archive/%{upstream_version}/%{name}-%{upstream_version}.tar.gz Source1: sssd.sysusers
### Patches ### +Patch0001: 0001-configure-Require-valgrind-devel-when-valgrind-is-en.patch
### Dependencies ###
@@ -1195,6 +1196,9 @@ fi %systemd_postun_with_restart sssd.service
%changelog +* Thu Feb 27 2025 Andrea Bolognani abologna@redhat.com - 2.10.2-3 +- Fix riscv64 build (thanks David Abdurachmanov) + * Mon Feb 10 2025 Alexey Tikhonov atikhono@redhat.com - 2.10.2-2 - Rebuild against Samba 4.22.0 rc1 (f42-build-side-105181)
commit d5cf0fa7bf84ab7b8e4fac4a65b79d0cb549e62b Author: David Abdurachmanov davidlt@rivosinc.com Date: Thu Aug 15 18:51:54 2024 +0300
Properly check valgrind arches
Signed-off-by: David Abdurachmanov davidlt@rivosinc.com
diff --git a/sssd.spec b/sssd.spec index 0d34d76..ee4c587 100644 --- a/sssd.spec +++ b/sssd.spec @@ -171,7 +171,9 @@ BuildRequires: systemtap-sdt-dtrace %endif BuildRequires: uid_wrapper BuildRequires: po4a +%ifarch %{valgrind_arches} BuildRequires: valgrind-devel +%endif %if %{build_subid} BuildRequires: shadow-utils-subid-devel %endif
arch-excludes@lists.fedoraproject.org