require systemd-rpm-macros rather than systemd

The `BuildRequires: systemd` was added in d7389e7 (use systemd instead
of xinetd (bz 737183), 2013-04-30).  Since then, the systemd macros have
been split into a subpackage¹.  Adjust our BuildRequires (with an
exception for EL-7).

Replace `Requires*: systemd` in git-daemon with %{?systemd_requires}.

¹ https://src.fedoraproject.org/rpms/systemd/c/c9030f0 (Split out the
  rpm macros into systemd-rpm-macros subpackage, 2018-11-02),
This commit is contained in:
Todd Zullinger 2022-07-23 15:28:15 -04:00
parent 0266063d10
commit 3eb6f047dc

View File

@ -77,7 +77,7 @@
Name: git Name: git
Version: 2.37.1 Version: 2.37.1
Release: 1%{?rcrev}%{?dist}.1 Release: 2%{?rcrev}%{?dist}
Summary: Fast Version Control System Summary: Fast Version Control System
License: GPLv2 License: GPLv2
URL: https://git-scm.com/ URL: https://git-scm.com/
@ -161,8 +161,11 @@ BuildRequires: perl
# endif use_perl_interpreter # endif use_perl_interpreter
BuildRequires: pkgconfig(bash-completion) BuildRequires: pkgconfig(bash-completion)
BuildRequires: sed BuildRequires: sed
# For macros %if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: systemd-rpm-macros
%else
BuildRequires: systemd BuildRequires: systemd
%endif
BuildRequires: tcl BuildRequires: tcl
BuildRequires: tk BuildRequires: tk
BuildRequires: xz BuildRequires: xz
@ -360,10 +363,7 @@ Requires: perl(DBD::SQLite)
%package daemon %package daemon
Summary: Git protocol daemon Summary: Git protocol daemon
Requires: git-core = %{version}-%{release} Requires: git-core = %{version}-%{release}
Requires: systemd %{?systemd_requires}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description daemon %description daemon
The git daemon for supporting git:// access to git repositories The git daemon for supporting git:// access to git repositories
@ -1007,6 +1007,9 @@ rmdir --ignore-fail-on-non-empty "$testdir"
%{?with_docs:%{_pkgdocdir}/git-svn.html} %{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog %changelog
* Sat Jul 23 2022 Todd Zullinger <tmz@pobox.com> - 2.37.1-2
- require systemd-rpm-macros rather than systemd
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.37.1-1.1 * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.37.1-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild