From 24f974cff9e9559f3ab308661572740ea432f2a3 Mon Sep 17 00:00:00 2001
Message-ID: <24f974cff9e9559f3ab308661572740ea432f2a3.1692703067.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 22 Aug 2023 13:42:27 +0300
Subject: [PATCH] Revert recent %_root_prefix macro addition (RhBug:2233454)
Commit cececfb6851234aca3e8d102de1c192c6bdf3e67 introduced %_root_prefix
macro but this clashes with pre-existing use in scl-utils:
https://bugzilla.redhat.com/show_bug.cgi?id=223345:
Just query the value from pkg-config if available and otherwise use
hardcoded value pointing to /usr instead. We don't need an intermediate
global macro for this.
---
CMakeLists.txt | 6 +++++-
macros.in | 3 +--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e40e889f6..9ff85fa99 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,11 @@ function(makemacros)
set(infodir "\${prefix}/${CMAKE_INSTALL_INFODIR}")
set(mandir "\${prefix}/${CMAKE_INSTALL_MANDIR}")
set(rundir /run)
- set(root_prefix /usr)
+
+ pkg_get_variable(sysusersdir systemd sysusersdir)
+ if (NOT sysusersdir)
+ set(sysusersdir /usr/lib/sysusers.d)
+ endif()
findutil(__7ZIP "7za;7z")
findutil(__BZIP2 bzip2)
diff --git a/macros.in b/macros.in
index 070aa8348..175e475e7 100644
--- a/macros.in
+++ b/macros.in
@@ -957,7 +957,6 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\
# Macro(s) slavishly copied from autoconf's config.status.
#
%_prefix @prefix@
-%_root_prefix @root_prefix@
%_exec_prefix %{_prefix}
%_bindir %{_exec_prefix}/bin
%_sbindir %{_exec_prefix}/sbin
@@ -971,7 +970,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\
%_includedir %{_prefix}/include
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man
-%_sysusersdir %{_root_prefix}/lib/sysusers.d
+%_sysusersdir @sysusersdir@
#==============================================================================
# ---- config.guess platform macros.
--
2.41.0