public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/systemd] rawhide: Use uniform format for %rhel conditionals
Date: Tue, 07 Jul 2026 10:18:03 GMT	[thread overview]
Message-ID: <178341948328.1.14844012402403083344.rpms-systemd-45c16dd369c9@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/systemd
            Branch : rawhide
            Commit : 45c16dd369c961b70664e473552def34d5469664
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
            Date   : 2026-07-07T12:17:50+02:00
            Stats  : +14/-7 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/systemd/c/45c16dd369c961b70664e473552def34d5469664?branch=rawhide

            Log:
            Use uniform format for %rhel conditionals

They were supposed to apply on old rhel only, but applied
on Fedora too by mistake.

Also restore the old dracut workaround. It *is* a few years
old at this point, but it's not certain that the dracut patch
has been propagated everywhere so it's safe to keep it.

[skip changelog]

---
diff --git a/systemd.spec b/systemd.spec
index 2fd1dd9..146dbd2 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -134,6 +134,13 @@ Source25:       98-default-mac-none.link
 
 Source26:       systemd-user
 
+%if 0%{?fedora} < 40 && 0%{?rhel} < 10
+# Work-around for dracut issue: run generators directly when we are in initrd
+# https://bugzilla.redhat.com/show_bug.cgi?id=2164404
+# Drop when dracut-060 is available.
+Patch:          https://github.com/systemd/systemd/pull/26494.patch
+%endif
+
 %if %{without upstream}
 # Those are downstream-only patches, but we don't want them in packit builds.
 
@@ -176,7 +183,7 @@ BuildRequires:  cryptsetup-devel
 BuildRequires:  systemd-rpm-macros
 %endif
 
-%if 0%{?rhel} == 0 || 0%{?rhel} > 10
+%if !%{defined rhel} || 0%{?rhel} > 10
 # Use dlopen-notes to generate Requires/Recommends from embedded metadata.
 # Currently, package-notes are not available on Centos Stream 9 or 10.
 BuildRequires:  package-notes >= 0.20
@@ -297,7 +304,7 @@ Requires:       /usr/bin/systemd-sysusers
 # so this biases towards the common version.
 Recommends:     systemd-sysusers%{_isa} = %{version}-%{release}
 
-%if 0%{?rhel} <= 10
+%if %{defined rhel} && 0%{?rhel} <= 10
 Requires:       libzstd.so.1%{?elf_suffix}
 %endif
 
@@ -354,7 +361,7 @@ Provides:       /usr/sbin/reboot
 Provides:       /usr/sbin/shutdown
 %endif
 
-%if 0%{?rhel} <= 10
+%if %{defined rhel} && 0%{?rhel} <= 10
 # libmount is always required, even in containers, so make it a hard dependency.
 Requires:       libmount.so.1%{?elf_suffix}
 Requires:       libmount.so.1(MOUNT_2.26)%{?elf_bits}
@@ -480,7 +487,7 @@ Requires(postun): systemd%{_isa} = %{version}-%{release}
 Requires(post): grep
 Requires:       kmod >= 18-4
 
-%if 0%{?rhel} <= 10
+%if %{defined rhel} && 0%{?rhel} <= 10
 # Libkmod is used to load modules. Assume that if we need udevd, we certainly
 # want to load modules, so make this into a hard dependency here.
 Requires:       libkmod.so.2%{?elf_suffix}
@@ -508,7 +515,7 @@ Provides:       systemd-timesyncd = %{version}-%{release}
 %endif
 Conflicts:      systemd-networkd < %{version}-%{release}
 
-%if 0%{?rhel} <= 10
+%if %{defined rhel} && 0%{?rhel} <= 10
 # Libkmod is used to load modules. Assume that if we need udevd, we certainly
 # want to load modules, so make this into a hard dependency here.
 Requires:       libkmod.so.2%{?elf_suffix}
@@ -659,7 +666,7 @@ License:        LGPL-2.1-or-later
 Requires:       firewalld-filesystem
 Provides:       systemd-journal-gateway = %{version}-%{release}
 Provides:       systemd-journal-gateway%{_isa} = %{version}-%{release}
-%if 0%{?rhel} <= 10
+%if %{defined rhel} && 0%{?rhel} <= 10
 Requires:       libmicrohttpd.so.12%{?elf_suffix}
 Requires:       libcurl.so.4%{?elf_suffix}
 %endif
@@ -699,7 +706,7 @@ enabled for this to have any effect.
 %package resolved
 Summary:        Network Name Resolution manager
 Requires:       systemd%{_isa} = %{version}-%{release}
-%if 0%{?rhel} <= 10
+%if %{defined rhel} && 0%{?rhel} <= 10
 Requires:       libidn2.so.0%{?elf_suffix}
 Requires:       libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
 %endif

                 reply	other threads:[~2026-07-07 10:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178341948328.1.14844012402403083344.rpms-systemd-45c16dd369c9@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox