Skip to content

Commit

Permalink
Fix --with-systemd on Debian-based distributions
Browse files Browse the repository at this point in the history
These changes propagate the "--with-systemd" configure option to the RPM spec
file, allowing Debian-based distributions to package systemd-related files.

Signed-off-by: loli10K <[email protected]>
  • Loading branch information
loli10K committed Dec 15, 2017
1 parent f6940bb commit ce79f60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions config/user-systemd.m4
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_SYSTEMD], [
systemdmoduleloaddir=$withval,systemdmodulesloaddir=/usr/lib/modules-load.d)
AS_IF([test "x$enable_systemd" = xyes],
[
AS_IF([test "x$enable_systemd" = xyes], [
ZFS_INIT_SYSTEMD=systemd
ZFS_MODULE_LOAD=modules-load.d
DEFINE_SYSTEMD='--define "_systemd 1" --define "_unitdir $(systemdunitdir)" --define "_presetdir $(systemdpresetdir)"'
modulesloaddir=$systemdmodulesloaddir
])
],[
DEFINE_SYSTEMD=''
])
AC_SUBST(ZFS_INIT_SYSTEMD)
AC_SUBST(ZFS_MODULE_LOAD)
AC_SUBST(DEFINE_SYSTEMD)
AC_SUBST(systemdunitdir)
AC_SUBST(systemdpresetdir)
AC_SUBST(modulesloaddir)
Expand Down
2 changes: 1 addition & 1 deletion config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ AC_DEFUN([ZFS_AC_RPM], [
])
RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)" --define "_udevdir $(udevdir)" --define "_udevruledir $(udevruledir)" --define "_initconfdir $(DEFAULT_INITCONF_DIR)" $(DEFINE_INITRAMFS)'
RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)" --define "_udevdir $(udevdir)" --define "_udevruledir $(udevruledir)" --define "_initconfdir $(DEFAULT_INITCONF_DIR)" $(DEFINE_INITRAMFS) $(DEFINE_SYSTEMD)'
RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)" --define "require_spldir $(SPL)" --define "require_splobj $(SPL_OBJ)" --define "ksrc $(LINUX)" --define "kobj $(LINUX_OBJ)"'
RPM_DEFINE_DKMS=
Expand Down
5 changes: 4 additions & 1 deletion rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ BuildRequires: libudev-devel
BuildRequires: libattr-devel
BuildRequires: openssl-devel
Requires: openssl
%if 0%{?_systemd}
BuildRequires: systemd
%endif
%endif

%if 0%{?_systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd
%endif

# The zpool iostat/status -c scripts call some utilities like lsblk and iostat
Expand Down

0 comments on commit ce79f60

Please sign in to comment.