forked from pool/ceph-iscsi
Accepting request 680089 from filesystems:ceph:nautilus
M10 candidate OBS-URL: https://build.opensuse.org/request/show/680089 OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph-iscsi?expand=0&rev=13
This commit is contained in:
parent
769781abd1
commit
3ef5c15212
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:33be18f43707240de5b6db29968724abbc2aeecad75903b7b3200a163d64f8a8
|
|
||||||
size 118656
|
|
3
ceph-iscsi-3.0+1551350485.g157b5fd.tar.gz
Normal file
3
ceph-iscsi-3.0+1551350485.g157b5fd.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5daa65bb7ae3ff91cf703c1f4b4997ec36c57ca01e2361c5bfd7a38709cd517c
|
||||||
|
size 121611
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 28 10:45:20 UTC 2019 - ncutler@suse.com
|
||||||
|
|
||||||
|
- Update to 3.0+1551350485.g157b5fd:
|
||||||
|
+ refactor spec file for better Fedora/RHEL and Python 3 support (Ricardo Dias)
|
||||||
|
+ rados pool for storing configuration is now configurable (Ricardo Marques)
|
||||||
|
+ support for specifying the cluster client name (Ricardo Dias)
|
||||||
|
+ new version numbering scheme ensuring tarball name is always unique (Nathan Cutler)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 7 17:00:40 UTC 2019 - ncutler@suse.com
|
||||||
|
|
||||||
|
- checkin.sh: append git SHA1 to version number
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 4 10:55:10 UTC 2019 - ncutler@suse.com
|
Mon Feb 4 10:55:10 UTC 2019 - ncutler@suse.com
|
||||||
|
|
||||||
|
108
ceph-iscsi.spec
108
ceph-iscsi.spec
@ -14,53 +14,59 @@
|
|||||||
#
|
#
|
||||||
# Please submit bugfixes or comments via http://tracker.ceph.com/
|
# Please submit bugfixes or comments via http://tracker.ceph.com/
|
||||||
#
|
#
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?rhel} == 7
|
||||||
%global _remote_tarball_prefix https://github.com/ceph/ceph-iscsi/archive/%{version}/
|
%global with_python2 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
Name: ceph-iscsi
|
Name: ceph-iscsi
|
||||||
Version: 3.0+1549277704
|
Version: 3.0+1551350485.g157b5fd
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Group: System/Filesystems
|
Group: System/Filesystems
|
||||||
Summary: Python modules for Ceph iSCSI gateway configuration management
|
Summary: Python modules for Ceph iSCSI gateway configuration management
|
||||||
|
%if 0%{?suse_version}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
|
%else
|
||||||
|
License: GPLv3+
|
||||||
|
%endif
|
||||||
URL: https://github.com/ceph/ceph-iscsi
|
URL: https://github.com/ceph/ceph-iscsi
|
||||||
Source0: %{?_remote_tarball_prefix}%{name}-%{version}.tar.gz
|
Source0: %{version}/%{name}-%{version}.tar.gz
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
Source98: checkin.sh
|
Source98: checkin.sh
|
||||||
Source99: README-checkin.txt
|
Source99: README-checkin.txt
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildArch: noarch
|
Obsoletes: ceph-iscsi-config
|
||||||
|
Obsoletes: ceph-iscsi-cli
|
||||||
|
|
||||||
Obsoletes: ceph-iscsi-config
|
%if 0%{?with_python2}
|
||||||
Obsoletes: ceph-iscsi-cli
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
Requires: python-rados >= 10.2.2
|
||||||
Requires: python-rados >= 10.2.2
|
Requires: python-rbd >= 10.2.2
|
||||||
Requires: python-rbd >= 10.2.2
|
Requires: python-netifaces >= 0.10.4
|
||||||
Requires: python-netifaces >= 0.10.4
|
Requires: python-rtslib >= 2.1.fb67
|
||||||
Requires: python-rtslib >= 2.1.fb67
|
Requires: rpm-python >= 4.11
|
||||||
Requires: rpm-python >= 4.11
|
Requires: python-cryptography
|
||||||
Requires: python-cryptography
|
Requires: python-flask >= 0.10.1
|
||||||
Requires: python-flask >= 0.10.1
|
%else
|
||||||
BuildRequires: python-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python3-setuptools
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
Requires: python3-rados >= 10.2.2
|
Requires: python3-rados >= 10.2.2
|
||||||
Requires: python3-rbd >= 10.2.2
|
Requires: python3-rbd >= 10.2.2
|
||||||
Requires: python3-netifaces >= 0.10.4
|
Requires: python3-netifaces >= 0.10.4
|
||||||
Requires: python3-rtslib >= 2.1.fb67
|
Requires: python3-rtslib >= 2.1.fb67
|
||||||
Requires: python3-rpm >= 4.11
|
|
||||||
Requires: python3-cryptography
|
Requires: python3-cryptography
|
||||||
Requires: python3-Flask >= 0.10.1
|
Requires: python3-rpm >= 4.11
|
||||||
|
%if 0%{?suse_version}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python3-devel
|
Requires: python3-Flask >= 0.10.1
|
||||||
BuildRequires: python3-setuptools
|
%else
|
||||||
|
Requires: python3-flask >= 0.10.1
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
@ -82,32 +88,48 @@ performance statistics, supporting monitoring and visualisation tools like
|
|||||||
Grafana.
|
Grafana.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?with_python2}
|
||||||
%{__python2} setup.py build
|
%{__python2} setup.py build
|
||||||
%endif
|
%else
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%python3_build
|
%python3_build
|
||||||
|
%else
|
||||||
|
%{py3_build}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?with_python2}
|
||||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-scripts %{_bindir}
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-scripts %{_bindir}
|
||||||
%endif
|
%else
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%python3_install
|
%python3_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%else
|
||||||
|
%{py3_install}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 0644 .%{_unitdir}/rbd-target-gw.service %{buildroot}%{_unitdir}
|
install -m 0644 .%{_unitdir}/rbd-target-gw.service %{buildroot}%{_unitdir}
|
||||||
install -m 0644 .%{_unitdir}/rbd-target-api.service %{buildroot}%{_unitdir}
|
install -m 0644 .%{_unitdir}/rbd-target-api.service %{buildroot}%{_unitdir}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/rbd-target-gw.service.d
|
|
||||||
install -m 0644 .%{_sysconfdir}/systemd/system/rbd-target-gw.service.d/dependencies.conf %{buildroot}%{_sysconfdir}/systemd/system/rbd-target-gw.service.d/
|
|
||||||
mkdir -p %{buildroot}%{_mandir}/man8
|
mkdir -p %{buildroot}%{_mandir}/man8
|
||||||
install -m 0644 gwcli.8 %{buildroot}%{_mandir}/man8/
|
install -m 0644 gwcli.8 %{buildroot}%{_mandir}/man8/
|
||||||
gzip %{buildroot}%{_mandir}/man8/gwcli.8
|
gzip %{buildroot}%{_mandir}/man8/gwcli.8
|
||||||
|
mkdir -p %{buildroot}%{_unitdir}/rbd-target-gw.service.d
|
||||||
|
install -m 0644 .%{_sysconfdir}/systemd/system/rbd-target-gw.service.d/dependencies.conf %{buildroot}%{_unitdir}/rbd-target-gw.service.d/
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
|
ln -s service %{buildroot}%{_sbindir}/rcrbd-target-gw
|
||||||
|
ln -s service %{buildroot}%{_sbindir}/rcrbd-target-api
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%service_add_pre rbd-target-gw.service rbd-target-api.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
@ -119,9 +141,9 @@ gzip %{buildroot}%{_mandir}/man8/gwcli.8
|
|||||||
%service_add_post rbd-target-gw.service rbd-target-api.service
|
%service_add_post rbd-target-gw.service rbd-target-api.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%pre
|
%preun
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%service_add_pre rbd-target-gw.service rbd-target-api.service
|
%service_del_preun rbd-target-gw.service rbd-target-api.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
@ -132,20 +154,15 @@ gzip %{buildroot}%{_mandir}/man8/gwcli.8
|
|||||||
%service_del_postun rbd-target-gw.service rbd-target-api.service
|
%service_del_postun rbd-target-gw.service rbd-target-api.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%service_del_preun rbd-target-gw.service rbd-target-api.service
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n ceph-iscsi
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README
|
%doc README
|
||||||
%doc iscsi-gateway.cfg_sample
|
%doc iscsi-gateway.cfg_sample
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?with_python2}
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%endif
|
%else
|
||||||
%if 0%{?suse_version}
|
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
%{_bindir}/gwcli
|
%{_bindir}/gwcli
|
||||||
@ -153,10 +170,15 @@ gzip %{buildroot}%{_mandir}/man8/gwcli.8
|
|||||||
%{_bindir}/rbd-target-api
|
%{_bindir}/rbd-target-api
|
||||||
%{_unitdir}/rbd-target-gw.service
|
%{_unitdir}/rbd-target-gw.service
|
||||||
%{_unitdir}/rbd-target-api.service
|
%{_unitdir}/rbd-target-api.service
|
||||||
%{_sysconfdir}/systemd/system/rbd-target-gw.service.d
|
|
||||||
%{_mandir}/man8/gwcli.8.gz
|
%{_mandir}/man8/gwcli.8.gz
|
||||||
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-gw
|
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-gw
|
||||||
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-api
|
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-api
|
||||||
|
%dir %{_unitdir}/rbd-target-gw.service.d
|
||||||
|
%{_unitdir}/rbd-target-gw.service.d/dependencies.conf
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%{_sbindir}/rcrbd-target-gw
|
||||||
|
%{_sbindir}/rcrbd-target-api
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
|
@ -92,10 +92,13 @@ if [ ! -d .git ]; then
|
|||||||
echo "no .git present. run this from the base dir of the git checkout."
|
echo "no .git present. run this from the base dir of the git checkout."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
GIT_SHA1=$(git describe --long --tags | cut -d"-" -f3)
|
||||||
echo "Extracting spec file"
|
echo "Extracting spec file"
|
||||||
VERSION=$(grep ^Version *spec | sed -r "s/^Version:\s+//")
|
VERSION=$(grep ^Version *spec | sed -r "s/^Version:\s+//")
|
||||||
VERSION="${VERSION}+$(date +%s)"
|
VERSION="${VERSION}+$(date +%s).${GIT_SHA1}"
|
||||||
sed -i -e 's/^Version:.*/Version: '$VERSION'/' $PROJECT.spec
|
sed -i -e 's/^Version:.*/Version: '$VERSION'/' $PROJECT.spec
|
||||||
|
sed -i -e 's#^Source0:.*#Source0: %{version}/%{name}-%{version}.tar.gz#' $PROJECT.spec
|
||||||
|
sed -i -e '/Source0/a %if 0%{?suse_version}\nSource98: checkin.sh\nSource99: README-checkin.txt\n%endif' $PROJECT.spec
|
||||||
cp $PROJECT.spec $THIS_DIR
|
cp $PROJECT.spec $THIS_DIR
|
||||||
echo "Version number is ->$VERSION<-"
|
echo "Version number is ->$VERSION<-"
|
||||||
cd ..
|
cd ..
|
||||||
|
Loading…
Reference in New Issue
Block a user