Skip to content

Commit

Permalink
Replace %{?systemd_requires} with%{?systemd_ordering}
Browse files Browse the repository at this point in the history
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 systemd/systemd@2424b6b
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.
  • Loading branch information
jvoisin committed Dec 22, 2024
1 parent d345c87 commit 9418705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packaging/rpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions packaging/rpm/miniflux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9418705

Please sign in to comment.