From 941870545049706cbcc1b7146eb05ca15d207a3c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 22 Dec 2024 21:11:20 +0100 Subject: [PATCH] Replace %{?systemd_requires} with%{?systemd_ordering} As said [in the documentation](https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_dependencies_on_the_systemd_package): > If the package wants to use systemd tools if they are available, but does not want to declare a dependency, then the %{?systemd_ordering} macro MAY be used as a weaker form of %{?systemd_requires} that only declares an ordering during an RPM transaction. See https://github.com/systemd/systemd/commit/2424b6bd716f0c1c3bf3406b1fd1a16ba1b6a556 and https://pagure.io/packaging-committee/issue/644 for more information. And also use `--setopt=install_weak_deps=False` to avoid installing a lot of useless dependencies. --- packaging/rpm/Dockerfile | 2 +- packaging/rpm/miniflux.spec | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packaging/rpm/Dockerfile b/packaging/rpm/Dockerfile index 87eae784746..58cbd46de80 100644 --- a/packaging/rpm/Dockerfile +++ b/packaging/rpm/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /go/src/app RUN make miniflux FROM rockylinux:9 -RUN dnf install -y rpm-build systemd +RUN dnf install --setopt=install_weak_deps=False -y rpm-build systemd-rpm-macros RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} RUN echo "%_topdir /root/rpmbuild" >> .rpmmacros COPY --from=build /go/src/app/miniflux /root/rpmbuild/SOURCES/miniflux diff --git a/packaging/rpm/miniflux.spec b/packaging/rpm/miniflux.spec index e5617215273..827ecac5138 100644 --- a/packaging/rpm/miniflux.spec +++ b/packaging/rpm/miniflux.spec @@ -16,8 +16,7 @@ BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release} BuildArch: x86_64 Requires(pre): shadow-utils -%{?systemd_requires} -BuildRequires: systemd +%{?systemd_ordering} AutoReqProv: no