Skip to content

Commit 869d805

Browse files
authored
Support bin-sbin merge on Fedora
Starting with Fedora 42, Fedora has been working on merging /bin and /sbin directories. See https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin To support this, make sure we do not put files into */sbin directories on these distributions by respecting the distribution set value of %{_sbindir}. In addition, explicitly set `mounthelperdir`, which affects the placement of `mount.zfs`, which does not respect %{_sbindir} by default. Making it point to %{_sbindir} will allow it to work correctly on Fedora, while keeping its previous directory of `/sbin` on all other distributions. Note that files that used to reside in */sbin directories on Fedora will stay accessible under these paths, as the distribution maintains symlinks. No changes are needed to external scripts invoking these binaries. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ralf Ertzinger <[email protected]> Closes #18373
1 parent 8553675 commit 869d805

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rpm/generic/zfs.spec.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
# Since Fedora 42, Fedora has unified /bin and /sbin. For this to
2+
# work, we must not override _sbindir
3+
%if 0%{?fedora} >= 42
4+
%else
15
%global _sbindir /sbin
6+
%endif
27
%global _libdir /%{_lib}
38

49
# Set the default udev directory based on distribution.
@@ -393,6 +398,7 @@ support for unlocking datasets on user login.
393398
--with-pammoduledir=%{_libdir}/security \
394399
--with-python=%{__python} \
395400
--with-pkgconfigdir=%{_pkgconfigdir} \
401+
--with-mounthelperdir=%{_sbindir} \
396402
--disable-static \
397403
%{debug} \
398404
%{debuginfo} \

0 commit comments

Comments
 (0)