From bb5dc8ec04d089507c26f58974b056ae1aa334ca Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 21 Nov 2022 11:55:57 +0100 Subject: [PATCH] Fix gshadow configure check (switching to glibc implementation) Related to: --- shadow-utils-configure-gshadow.patch | 20 ++++++++++++++++++++ shadow-utils.spec | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 shadow-utils-configure-gshadow.patch diff --git a/shadow-utils-configure-gshadow.patch b/shadow-utils-configure-gshadow.patch new file mode 100644 index 0000000..a983ce0 --- /dev/null +++ b/shadow-utils-configure-gshadow.patch @@ -0,0 +1,20 @@ +The missing #include causes the configure check to fail +spuriously, resulting in HAVE_SHADOWGRP not being defined. + +Submitted upstream: + +diff --git a/configure.ac b/configure.ac +index 924254a0c8171802..6c7d9839979e037d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -116,6 +116,10 @@ if test "$ac_cv_header_shadow_h" = "yes"; then + ac_cv_libc_shadowgrp, + AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include ++ #ifdef HAVE_GSHADOW_H ++ #include ++ #endif ++ int + main() + { + struct sgrp *sg = sgetsgent("test:x::"); diff --git a/shadow-utils.spec b/shadow-utils.spec index da2d3bd..0953cbc 100644 --- a/shadow-utils.spec +++ b/shadow-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing accounts and shadow password files Name: shadow-utils Version: 4.13 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: BSD-3-Clause AND GPL-2.0-or-later URL: https://github.com/shadow-maint/shadow @@ -31,6 +31,7 @@ Patch4: shadow-4.11.1-audit-update.patch Patch5: shadow-4.5-usermod-unlock.patch # Additional SElinux related changes - upstreamability unknown Patch6: shadow-4.12.3-selinux-perms.patch +Patch7: shadow-utils-configure-gshadow.patch ### Dependencies ### Requires: audit-libs >= 1.6.5 @@ -98,6 +99,7 @@ Development files for shadow-utils-subid. %patch4 -p1 -b .audit-update %patch5 -p1 -b .unlock %patch6 -p1 -b .selinux-perms +%patch7 -p1 iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 cp -f doc/HOWTO.utf8 doc/HOWTO @@ -271,6 +273,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.a %{_libdir}/libsubid.so %changelog +* Mon Nov 21 2022 Florian Weimer - 2:4.13-2 +- Fix gshadow configure check (switching to glibc implementation) + * Wed Nov 9 2022 Iker Pedrosa - 2:4.13-1 - Rebase to version 4.13 - SPDX license migration