]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - rpm/redhat/zfs.spec.in
New upstream version 0.7.9
[mirror_zfs-debian.git] / rpm / redhat / zfs.spec.in
index 8df57fa46e465d27f92f1ab6b7fafde2890ca4f7..5b89db021f77042a5c4988fae7c046a5b06d3b96 100644 (file)
 %bcond_with    debug
 %bcond_with    systemd
 
+# Python permits the !/usr/bin/python shebang for scripts that are cross
+# compatible between python2 and python3, but Fedora 28 does not.  Fedora
+# wants us to choose python3 for cross-compatible scripts.  Since we want
+# to support python2 and python3 users, exclude our scripts from Fedora 28's
+# RPM build check, so that we don't get a bunch of build warnings.
+#
+# Details: https://github.com/zfsonlinux/zfs/issues/7360
+#
+%global __brp_mangle_shebangs_exclude_from arc_summary.py|arcstat.py|dbufstat.py|test-runner.py
+
 # Generic enable switch for systemd
 %if %{with systemd}
 %define _systemd 1
@@ -86,12 +96,15 @@ BuildRequires:  libuuid-devel
 BuildRequires:  libblkid-devel
 BuildRequires:  libudev-devel
 BuildRequires:  libattr-devel
+%if 0%{?fedora} >= 28
+BuildRequires:  libtirpc-devel
+%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
@@ -183,6 +196,7 @@ Requires:       acl
 Requires:       sudo
 Requires:       sysstat
 Requires:       rng-tools
+Requires:      libaio
 AutoReqProv:    no
 
 %description test
@@ -245,8 +259,15 @@ find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
 
 %post
 %if 0%{?_systemd}
+%if 0%{?systemd_post:1}
 %systemd_post %{systemd_svcs}
 %else
+if [ "$1" = "1" -o "$1" = "install" ] ; then
+    # Initial installation
+    systemctl preset %{systemd_svcs} >/dev/null || true
+fi
+%endif
+%else
 if [ -x /sbin/chkconfig ]; then
     /sbin/chkconfig --add zfs-import
     /sbin/chkconfig --add zfs-mount
@@ -258,9 +279,17 @@ exit 0
 
 %preun
 %if 0%{?_systemd}
+%if 0%{?systemd_preun:1}
 %systemd_preun %{systemd_svcs}
 %else
-if [ "$1" = "0" ] && [ -x /sbin/chkconfig ]; then
+if [ "$1" = "0" -o "$1" = "remove" ] ; then
+    # Package removal, not upgrade
+    systemctl --no-reload disable %{systemd_svcs} >/dev/null || true
+    systemctl stop %{systemd_svcs} >/dev/null || true
+fi
+%endif
+%else
+if [ "$1" = "0" -o "$1" = "remove" ] && [ -x /sbin/chkconfig ]; then
     /sbin/chkconfig --del zfs-import
     /sbin/chkconfig --del zfs-mount
     /sbin/chkconfig --del zfs-share
@@ -271,7 +300,11 @@ exit 0
 
 %postun
 %if 0%{?_systemd}
+%if 0%{?systemd_postun:1}
 %systemd_postun %{systemd_svcs}
+%else
+systemctl --system daemon-reload >/dev/null || true
+%endif
 %endif
 
 %files
@@ -333,6 +366,15 @@ exit 0
 %endif
 
 %changelog
+* Tue May 08 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.9-1
+- Released 0.7.9-1, detailed release notes are available at:
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.9
+* Mon Apr 09 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.8-1
+- Released 0.7.8-1, detailed release notes are available at:
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.8
+* Wed Mar 14 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.7-1
+- Released 0.7.7-1, detailed release notes are available at:
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.7
 * Thu Feb 01 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.6-1
 - Released 0.7.6-1, detailed release notes are available at:
 - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.6