diff --git a/.gitignore b/.gitignore index 3dd2135..eab9caf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /rtslib-1.99.1.git644eece.tar.gz +/v2.1.fb1 diff --git a/python-rtslib-git-version.patch b/python-rtslib-git-version.patch deleted file mode 100644 index 6b18c1d..0000000 --- a/python-rtslib-git-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/rtslib/__init__.py b/rtslib/__init__.py -index b59eba6..7de59fb 100644 ---- a/rtslib/__init__.py -+++ b/rtslib/__init__.py -@@ -28,7 +28,7 @@ from tcm import FileIOStorageObject, IBlockStorageObject - from tcm import PSCSIBackstore, RDDRBackstore, RDMCPBackstore - from tcm import PSCSIStorageObject, RDDRStorageObject, RDMCPStorageObject - --__version__ = 'GIT_VERSION' -+__version__ = '644eece' - __author__ = "Jerome Martin " - __url__ = "http://www.risingtidesystems.com" - __description__ = "API for RisingTide Systems generic SCSI target." diff --git a/python-rtslib-update-specpath.patch b/python-rtslib-update-specpath.patch deleted file mode 100644 index 9aab244..0000000 --- a/python-rtslib-update-specpath.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 25f651279f95a29682bee72b56a6730a91d17f27 -Author: Andy Grover -Date: Wed Aug 17 16:08:15 2011 -0700 - - change spec_dir to /var/lib/target - - Signed-off-by: Andy Grover - -diff --git a/rtslib/node.py b/rtslib/node.py -index 413781f..6ce4dee 100644 ---- a/rtslib/node.py -+++ b/rtslib/node.py -@@ -25,12 +25,12 @@ from utils import fread, fwrite, RTSLibError, RTSLibNotInCFS - class CFSNode(object): - - # Where do we store the fabric modules spec files ? -- spec_dir = "/var/target/fabric" -+ spec_dir = "/var/lib/target/fabric" - # Where is the configfs base LIO directory ? - configfs_dir = '/sys/kernel/config/target' - # TODO: Make the ALUA path generic, not iscsi-centric - # What is the ALUA directory ? -- alua_metadata_dir = "/var/target/alua/iSCSI" -+ alua_metadata_dir = "/var/lib/target/alua/iSCSI" - - # CFSNode private stuff - diff --git a/python-rtslib-use-ethtool.patch b/python-rtslib-use-ethtool.patch deleted file mode 100644 index 88b6f05..0000000 --- a/python-rtslib-use-ethtool.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/rtslib/utils.py b/rtslib/utils.py -index c66292c..02fef1e 100644 ---- a/rtslib/utils.py -+++ b/rtslib/utils.py -@@ -24,7 +24,7 @@ import uuid - import glob - import socket - import ipaddr --import netifaces -+import ethtool - import subprocess - - from array import array -@@ -690,19 +690,19 @@ def list_eth_ips(ifnames=None): - all IPs of all ifaces excepted for lo. - ''' - if ifnames is None: -- ifnames = [iface for iface in list_eth_names() if iface != 'lo'] -+ devcfgs = [d for d in ethtool.get_devices() if d != 'lo'] -+ else: -+ devcfgs = ethtool.get_interfaces_info(ifnames) -+ - addrs = [] -- for iface in list_eth_names(): -- ifaddresses = netifaces.ifaddresses(iface) -- if netifaces.AF_INET in ifaddresses: -- addrs.extend(addr['addr'] -- for addr in ifaddresses[netifaces.AF_INET] -- if not addr['addr'].startswith('127.')) -- if netifaces.AF_INET6 in ifaddresses: -- addrs.extend(addr['addr'] -- for addr in ifaddresses[netifaces.AF_INET6] -- if not '%' in addr['addr'] -- if not addr['addr'].startswith('::')) -+ for d in devcfgs: -+ if d.ipv4_address: -+ addrs.append(d.ipv4_address) -+ # For IPv6 addresses, we might have more of them on the same device, -+ # and only grab global (universe) addresses. -+ for ip6 in [a for a in d.get_ipv6_addresses() if a.scope == 'universe']: -+ addrs.append(ip6.address) -+ - return sorted(set(addrs)) - - def is_ipv4_address(addr): diff --git a/python-rtslib.spec b/python-rtslib.spec index e36855f..c605ee0 100644 --- a/python-rtslib.spec +++ b/python-rtslib.spec @@ -1,34 +1,23 @@ -%global oname rtslib +%global oname rtslib-fb Name: python-rtslib License: AGPLv3 Group: System Environment/Libraries Summary: API for RisingTide Systems generic SCSI target -Version: 1.99.1.git644eece -Release: 8%{?dist} -# placeholder URL and source entries -# archive created using: -# git clone git://risingtidesystems.com/rtslib.git -# cd rtslib -# git archive 644eece --prefix rtslib-%{version}/ | gzip -n > rtslib-%{version}.tar.gz -URL: http://www.risingtidesystems.com/git/ -Source: %{oname}-%{version}.tar.gz -Patch1: %{name}-git-version.patch -Patch2: %{name}-use-ethtool.patch -Patch3: %{name}-update-specpath.patch +Version: 2.1.fb1 +Release: 1%{?dist} +URL: https://github.com/agrover/rtslib-fb/ +Source: https://github.com/agrover/%{oname}/tarball/v%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-ipaddr python-ethtool python-configobj python-devel Requires: python-ipaddr python-ethtool python-configobj %description -API for RisingTide Systems generic SCSI target. +API for generic Linux SCSI kernel target. %prep -%setup -q -n %{oname}-%{version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%setup -q -n agrover-%{oname}-436f85f %build %{__python} setup.py build @@ -50,6 +39,14 @@ rm -rf %{buildroot} %doc COPYING README %changelog +* Tue Dec 6 2011 Andy Grover - 2.1.fb1-1 +- Change upstream URL +- New upstream release +- Remove upstreamed patches: + * python-rtslib-git-version.patch + * python-rtslib-use-ethtool.patch + * python-rtslib-update-specpath.patch + * Mon Nov 14 2011 Andy Grover - 1.99.1.git644eece-8 - Change archive instructions to use gzip -n - Fix issues raised in Fedora package review (#744349) diff --git a/sources b/sources index 9eed6c7..72b8de1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -758c519cad364f290320918719db71ea rtslib-1.99.1.git644eece.tar.gz +6d3f77b1b33a81748e8db895b228603b v2.1.fb1