diff --git a/sanoid-2.0.1.tar.gz b/sanoid-2.0.1.tar.gz new file mode 100644 index 0000000..a90f2f0 --- /dev/null +++ b/sanoid-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e28bd2ee372d777cd58e3a2ddd9c5c04210d07323b648c6c21030d0f7a22a464 +size 106981 diff --git a/sanoid.spec b/sanoid.spec new file mode 100644 index 0000000..a6f4352 --- /dev/null +++ b/sanoid.spec @@ -0,0 +1,127 @@ +# Enable with systemctl "enable sanoid.timer" +%global _with_systemd 1 + +Name: sanoid +Version: 2.0.1 +Release: 1%{?dist} +BuildArch: noarch +Summary: A policy-driven snapshot management tool for ZFS file systems +Group: Applications/System +License: GPLv3 +URL: https://github.com/jimsalterjrs/sanoid +Source0: https://github.com/jimsalterjrs/%{name}/archive/v%{version}.tar.gz + +Requires: perl, mbuffer, lzop, pv, perl-Config-IniFiles, perl-Capture-Tiny +%if 0%{?_with_systemd} +Requires: systemd >= 212 + +BuildRequires: systemd +%endif + +%description +Sanoid is a policy-driven snapshot management +tool for ZFS file systems. You can use Sanoid +to create, automatically thin, and monitor snapshots +and pool health from a single eminently +human-readable TOML configuration file. + +%prep +%setup -q + +%build +echo "Nothing to build" + +%install +%{__install} -D -m 0644 sanoid.defaults.conf %{buildroot}/etc/sanoid/sanoid.defaults.conf +%{__install} -d %{buildroot}%{_sbindir} +%{__install} -m 0755 sanoid syncoid findoid sleepymutex %{buildroot}%{_sbindir} + +%if 0%{?_with_systemd} +%{__install} -d %{buildroot}%{_unitdir} +%endif + +%if 0%{?fedora} +%{__install} -D -m 0644 sanoid.conf %{buildroot}%{_docdir}/%{name}/examples/sanoid.conf +%endif +%if 0%{?rhel} +%{__install} -D -m 0644 sanoid.conf %{buildroot}%{_docdir}/%{name}-%{version}/examples/sanoid.conf +%endif + +%if 0%{?_with_systemd} +cat > %{buildroot}%{_unitdir}/%{name}.service < %{buildroot}%{_unitdir}/%{name}.timer < %{buildroot}%{_docdir}/%{name}-%{version}/examples/sanoid.cron +%endif +%endif + +%post +%{?_with_systemd:%{_bindir}/systemctl daemon-reload} + +%postun +%{?_with_systemd:%{_bindir}/systemctl daemon-reload} + +%files +%doc CHANGELIST VERSION README.md FREEBSD.readme +%license LICENSE +%{_sbindir}/sanoid +%{_sbindir}/syncoid +%{_sbindir}/findoid +%{_sbindir}/sleepymutex +%dir %{_sysconfdir}/%{name} +%config %{_sysconfdir}/%{name}/sanoid.defaults.conf +%if 0%{?fedora} +%{_docdir}/%{name} +%endif +%if 0%{?rhel} +%{_docdir}/%{name}-%{version} +%endif +%if 0%{?_with_systemd} +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}.timer +%endif + +%changelog +* Wed Dec 04 2018 Christoph Klaffl - 2.0.0 +- Bump to 2.0.0 +* Sat Apr 28 2018 Dominic Robinson - 1.4.18-1 +- Bump to 1.4.18 +* Thu Aug 31 2017 Dominic Robinson - 1.4.14-2 +- Add systemd timers +* Wed Aug 30 2017 Dominic Robinson - 1.4.14-1 +- Version bump +* Wed Jul 12 2017 Thomas M. Lapp - 1.4.13-1 +- Version bump +- Include FREEBSD.readme in docs +* Wed Jul 12 2017 Thomas M. Lapp - 1.4.9-1 +- Version bump +- Clean up variables and macros +- Compatible with both Fedora and Red Hat +* Sat Feb 13 2016 Thomas M. Lapp - 1.4.4-1 +- Initial RPM Package