Blame SPECS/targetd.spec

286ce3
Name:           targetd
286ce3
License:        GPLv3
286ce3
Group:          System Environment/Libraries
286ce3
Summary:        Service to make storage remotely configurable
286ce3
Version:        0.8.6
286ce3
Release:        1%{?dist}
286ce3
URL:            https://github.com/open-iscsi/targetd
286ce3
Source:         https://github.com/open-iscsi/targetd/releases/download/v%{version}/targetd-%{version}.tar.gz
286ce3
Source1:        targetd.service
286ce3
Source2:        targetd.yaml
286ce3
BuildArch:      noarch
286ce3
BuildRequires:  systemd, python-devel
286ce3
Requires:       python-rtslib PyYAML python-setproctitle
286ce3
Requires:       lvm2-python-libs >= 2.02.99, nfs-utils, btrfs-progs
286ce3
Requires(post): systemd
286ce3
Requires(preun): systemd
286ce3
Requires(postun): systemd
286ce3
286ce3
286ce3
%description
286ce3
targetd turns the machine into a remotely-configurable storage appliance.
286ce3
It supports an HTTP/jsonrpc-2.0 interface to let a remote
286ce3
administrator allocate volumes from an LVM volume group, and export
286ce3
those volumes over iSCSI.
286ce3
286ce3
%prep
286ce3
%setup -q
286ce3
286ce3
%build
286ce3
%{__python2} setup.py build
286ce3
gzip --stdout targetd.8 > targetd.8.gz
286ce3
286ce3
%install
286ce3
mkdir -p %{buildroot}%{_mandir}/man8/
286ce3
mkdir -p %{buildroot}%{_unitdir}
286ce3
mkdir -p %{buildroot}%{_sysconfdir}/target/
286ce3
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/targetd.service
286ce3
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/target/targetd.yaml
286ce3
install -m 644 targetd.8.gz %{buildroot}%{_mandir}/man8/
286ce3
%{__python2} setup.py install --skip-build --root %{buildroot}
286ce3
286ce3
%post
286ce3
if [ $1 -eq 1 ] ; then
286ce3
    # Initial installation
286ce3
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
286ce3
fi
286ce3
286ce3
%preun
286ce3
if [ $1 -eq 0 ] ; then
286ce3
    # Package removal, not upgrade
286ce3
    /bin/systemctl --no-reload disable targetd.service > /dev/null 2>&1 || :
286ce3
    /bin/systemctl stop targetd.service > /dev/null 2>&1 || :
286ce3
fi
286ce3
286ce3
%postun
286ce3
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
286ce3
if [ $1 -ge 1 ] ; then
286ce3
    # Package upgrade, not uninstall
286ce3
    /bin/systemctl try-restart targetd.service >/dev/null 2>&1 || :
286ce3
fi
286ce3
286ce3
%files
286ce3
%{_bindir}/targetd
286ce3
%{_unitdir}/targetd.service
286ce3
%{python2_sitelib}/*
286ce3
%doc LICENSE README.md API.md client
286ce3
%{_mandir}/man8/targetd.8.gz
286ce3
%config(noreplace) %{_sysconfdir}/target/targetd.yaml
286ce3
286ce3
%changelog
286ce3
* Thu Apr 27 2017 Tony Asleson <tasleson@redhat.com> - 0.8.6-1
286ce3
- Update to latest version
286ce3
286ce3
* Fri Feb 17 2017 Tony Asleson <tasleson@redhat.com> - 0.8.5-1
286ce3
- Update to latest version
286ce3
- Be explicit in using python2
286ce3
286ce3
* Mon Feb 10 2014 Andy Grover <agrover@redhat.com> - 0.7.1-1
286ce3
- Upddate to latest version
286ce3
- Update service file for switching dependency to rtslib from targetcli
286ce3
286ce3
* Mon Jan 27 2014 Andy Grover <agrover@redhat.com> - 0.6.1-3
286ce3
- Update Source/URL
286ce3
286ce3
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.6.1-2
286ce3
- Mass rebuild 2013-12-27
286ce3
286ce3
* Thu Aug 8 2013 Andy Grover <agrover@redhat.com> 0.6.1-1
286ce3
- Update to latest version, make needed changes
286ce3
- Drop patches:
286ce3
  * require-password.patch
286ce3
  * use-std-ssl.patch
286ce3
- Change requires from python-lvm to lvm2-python-libs
286ce3
286ce3
* Mon Aug  5 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.1-7
286ce3
- Add systemd to BuildReq to fix FTBFS
286ce3
286ce3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-6
286ce3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
286ce3
286ce3
* Tue Apr 16 2013 Andy Grover <agrover@redhat.com> - 0.3.1-5
286ce3
- Update require-password.patch
286ce3
- Change target.yaml to not include a commented-out default password
286ce3
286ce3
* Tue Apr 16 2013 Andy Grover <agrover@redhat.com> - 0.3.1-4
286ce3
- Remove dependency on python-tlslite
286ce3
286ce3
* Mon Apr 15 2013 Andy Grover <agrover@redhat.com> - 0.3.1-3
286ce3
- Add patch
286ce3
  * use-std-ssl.patch
286ce3
  * require-password.patch
286ce3
286ce3
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
286ce3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
286ce3
286ce3
* Wed Oct 17 2012 Andy Grover <agrover@redhat.com> - 0.3.1-1
286ce3
- New upstream version
286ce3
286ce3
* Mon Sep 24 2012 Andy Grover <agrover@redhat.com> - 0.3-1
286ce3
- New upstream version
286ce3
286ce3
* Fri Sep 7 2012 Andy Grover <agrover@redhat.com> - 0.2.4-1
286ce3
- New upstream version
286ce3
286ce3
* Tue Aug 28 2012 Andy Grover <agrover@redhat.com> - 0.2.3-1
286ce3
- New upstream version
286ce3
- Add new dependency python-tlslite
286ce3
286ce3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-3
286ce3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
286ce3
286ce3
* Mon Jun 25 2012 Andy Grover <agrover@redhat.com> - 0.2.2-2
286ce3
- Add proper pkg requires
286ce3
286ce3
* Mon Jun 25 2012 Andy Grover <agrover@redhat.com> - 0.2.2-1
286ce3
- Initial packaging