diff --git a/.gitignore b/.gitignore index 627d6b7..005e938 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /targetd-0.3.1.tar.gz /targetd-0.6.tar.gz /targetd-0.6.1.tar.gz +/targetd-0.7.tar.gz diff --git a/sources b/sources index 74e492a..b108cc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c40ba0dd7c5f65e1bd2cb80872aeeb17 targetd-0.6.1.tar.gz +a0eef1ebf5adeedb454a13f2259d3f24 targetd-0.7.tar.gz diff --git a/targetd.spec b/targetd.spec index 97a52d1..f73236e 100644 --- a/targetd.spec +++ b/targetd.spec @@ -2,7 +2,7 @@ Name: targetd License: GPLv3 Group: System Environment/Libraries Summary: Service to make storage remotely configurable -Version: 0.6.1 +Version: 0.7 Release: 1%{?dist} URL: https://github.com/agrover/targetd Source: https://github.com/downloads/agrover/%{name}/%{name}-%{version}.tar.gz @@ -10,7 +10,7 @@ Source1: targetd.service Source2: targetd.yaml BuildArch: noarch BuildRequires: systemd, python-devel -Requires: targetcli PyYAML python-setproctitle +Requires: PyYAML python-setproctitle Requires: lvm2-python-libs >= 2.02.99, nfs-utils, btrfs-progs Requires(post): systemd Requires(preun): systemd @@ -40,24 +40,13 @@ install -m 644 targetd.8.gz %{buildroot}%{_mandir}/man8/ %{__python} setup.py install --skip-build --root %{buildroot} %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post targetd.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable targetd.service > /dev/null 2>&1 || : - /bin/systemctl stop targetd.service > /dev/null 2>&1 || : -fi +%systemd_preun targetd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart targetd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart targetd.service %files %{_bindir}/targetd @@ -68,6 +57,10 @@ fi %config(noreplace) %{_sysconfdir}/target/targetd.yaml %changelog +* Fri Nov 8 2013 Andy Grover 0.7-1 +- New upstream version +- Use systemd spec macros + * Thu Aug 8 2013 Andy Grover 0.6.1-1 - Update to latest version, make needed changes - Drop patches: