From 4a5c8bfda1f044c0060a6f0bc985e3d6724872b6 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Feb 03 2016 20:15:31 +0000 Subject: initial package Resolves: rhbz#1303245 --- diff --git a/.gitignore b/.gitignore index e69de29..7650d3a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/lrbd-1.0.2-cc757bc.tar.gz diff --git a/lrbd.spec b/lrbd.spec new file mode 100644 index 0000000..d095f9f --- /dev/null +++ b/lrbd.spec @@ -0,0 +1,74 @@ +%global commitdate 20160129 +%global commit cc757bc3ee1df981fa7eac5ac16ebae6c29b1a42 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: lrbd +Version: 1.0.2 +Release: 0.1.%{commitdate}git%{shortcommit}%{?dist} +Summary: Configure iSCSI access to Ceph rbd images +License: LGPLv2+ +URL: https://github.com/SUSE/lrbd +Source0: https://github.com/SUSE/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz +BuildArch: noarch + +Requires: python-netifaces +Requires: python-rados +Requires: python-rbd +Requires: ceph-common +Requires: targetcli >= 2.1 +Requires(preun): systemd +Requires(postun): systemd +Requires(post): systemd + +BuildRequires: systemd +BuildRequires: python2-devel +BuildRequires: python-mock +BuildRequires: python-netifaces +BuildRequires: python-nose +BuildRequires: python-rados +BuildRequires: python-rbd + +%description +This utility creates, modifies and retrieves a centralized configuration from +Ceph for configuring iSCSI access on a host. + +%prep +%autosetup -n %{name}-%{commit} + +%build +for f in man/lrbd.*; do + gzip ${f} +done + +%check +make tests + +%install +# Makefile has no "install" target. Just copy files to %%{buildroot}. +install -p -D -m 755 lrbd %{buildroot}%{_sbindir}/lrbd +install -p -D -m 644 man/lrbd.conf.5.gz %{buildroot}%{_mandir}/man5/lrbd.conf.5.gz +install -p -D -m 644 man/lrbd.8.gz %{buildroot}%{_mandir}/man8/lrbd.8.gz +install -p -D -m 644 sysconfig/lrbd %{buildroot}%{_sysconfdir}/sysconfig/lrbd +install -p -D -m 644 systemd/lrbd.service %{buildroot}%{_unitdir}/lrbd.service + +%post +%systemd_post lrbd.service + +%preun +%systemd_preun lrbd.service + +%postun +%systemd_postun lrbd.service + +%files +%license LICENSE +%doc README.md samples +%{_sbindir}/lrbd +%{_mandir}/man5/lrbd.conf.* +%{_mandir}/man8/lrbd.* +%{_unitdir}/lrbd.service +%config(noreplace) %{_sysconfdir}/sysconfig/lrbd + +%changelog +* Fri Jan 29 2016 Ken Dreyer - 1.0.2-0.1.20160129gitcc757bc +- initial package (rhbz#1303245) diff --git a/sources b/sources index e69de29..fb1eaac 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +98e6b075b5eae80bd369abd96a449198 lrbd-1.0.2-cc757bc.tar.gz