Hello community, here is the log from the commit of package python-rtslib-fb for openSUSE:Factory checked in at 2018-04-11 14:00:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rtslib-fb (Old) and /work/SRC/openSUSE:Factory/.python-rtslib-fb.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-rtslib-fb" Wed Apr 11 14:00:35 2018 rev:16 rq:595002 version:2.1.67 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rtslib-fb/python-rtslib-fb.changes 2018-02-27 16:58:12.647493716 +0100 +++ /work/SRC/openSUSE:Factory/.python-rtslib-fb.new/python-rtslib-fb.changes 2018-04-11 14:02:53.888836711 +0200 @@ -1,0 +2,20 @@ +Mon Apr 09 21:41:01 UTC 2018 - lduncan@suse.com + +- Update to version 2.1.fb67: + * Add missing dependency on six in setup.py + * Display a more meaningful error when targetcli cannot change "dbroot" + * Raise an error about failing to change the dbroot value only if the directory does not exist + * More compatibility syntax for legacy distros + * Remove hba-only directories in clear_existing() + * Correct name for Xen pvscsi + * version 2.1.fb65 + * Fix unqualified reference to pyudev.Device + * version 2.1.fb66 + * create: remove stale hba-only dir + * version 2.1.fb67 +- This replaced rtslib-fb-2.1.fb64.tar.xz with + rtslib-fb-2.1.fb67.tar.xz, and it also removed + the patch correct-name-for-xen-pvscsi.patch, + since it is already in the updated tarball + +------------------------------------------------------------------- Old: ---- correct-name-for-xen-pvscsi.patch rtslib-fb-2.1.fb64.tar.xz New: ---- rtslib-fb-2.1.fb67.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rtslib-fb.spec ++++++ --- /var/tmp/diff_new_pack.Lozx8U/_old 2018-04-11 14:02:55.280786403 +0200 +++ /var/tmp/diff_new_pack.Lozx8U/_new 2018-04-11 14:02:55.280786403 +0200 @@ -17,18 +17,17 @@ %define oname rtslib-fb -%define realver 2.1.fb64 +%define realver 2.1.fb67 %define dbdir %{_sysconfdir}/target %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-%{oname} -Version: 2.1.64 +Version: 2.1.67 Release: 0%{?dist} Summary: API for Linux kernel SCSI target (aka LIO) License: Apache-2.0 Group: Development/Languages/Python Url: http://github.com/open-iscsi/rtslib-fb.git Source: %{oname}-%{realver}.tar.xz -Patch1: correct-name-for-xen-pvscsi.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pyudev} BuildRequires: %{python_module setuptools} @@ -50,7 +49,6 @@ %prep %setup -q -n %{oname}-%{realver} -%patch1 -p1 %build %python_build ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Lozx8U/_old 2018-04-11 14:02:55.316785102 +0200 +++ /var/tmp/diff_new_pack.Lozx8U/_new 2018-04-11 14:02:55.320784957 +0200 @@ -4,8 +4,8 @@ <param name="url">https://github.com/open-iscsi/rtslib-fb.git</param> <param name="subdir"></param> <param name="filename">rtslib-fb</param> - <param name="versionformat">2.1.fb64</param> - <param name="revision">v2.1.fb64</param> + <param name="versionformat">2.1.fb67</param> + <param name="revision">v2.1.fb67</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.Lozx8U/_old 2018-04-11 14:02:55.340784235 +0200 +++ /var/tmp/diff_new_pack.Lozx8U/_new 2018-04-11 14:02:55.340784235 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/open-iscsi/rtslib-fb.git</param> - <param name="changesrevision">737496e24ede21effc807a553cebe88ed5660a2b</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">a46e6bf9ea0f83acdff1761a11c502ea5863945f</param></service></servicedata> \ No newline at end of file ++++++ rtslib-fb-2.1.fb64.tar.xz -> rtslib-fb-2.1.fb67.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rtslib-fb-2.1.fb64/rtslib/fabric.py new/rtslib-fb-2.1.fb67/rtslib/fabric.py --- old/rtslib-fb-2.1.fb64/rtslib/fabric.py 2017-08-15 23:28:33.000000000 +0200 +++ new/rtslib-fb-2.1.fb67/rtslib/fabric.py 2018-02-12 18:34:38.000000000 +0100 @@ -118,8 +118,8 @@ from .target import Target from .utils import _get_auth_attr, _set_auth_attr -version_attributes = {"lio_version", "version"} -discovery_auth_attributes = {"discovery_auth"} +version_attributes = set(["lio_version", "version"]) +discovery_auth_attributes = set(["discovery_auth"]) target_names_excludes = version_attributes | discovery_auth_attributes @@ -440,7 +440,7 @@ class XenPvScsiFabricModule(_BaseFabricModule): def __init__(self): - super(XenPvScsiFabricModule, self).__init__('xen_pvscsi') + super(XenPvScsiFabricModule, self).__init__('xen-pvscsi') self._path = "%s/%s" % (self.configfs_dir, 'xen-pvscsi') self.features = ("nexus", "tpgts") self.wwn_types = ('naa',) @@ -469,7 +469,7 @@ "tcm_fc": FCoEFabricModule, # "usb_gadget": USBGadgetFabricModule, # very rare, don't show "vhost": VhostFabricModule, - "xen_pvscsi": XenPvScsiFabricModule, + "xen-pvscsi": XenPvScsiFabricModule, "ibmvscsis": IbmvscsisFabricModule, } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rtslib-fb-2.1.fb64/rtslib/node.py new/rtslib-fb-2.1.fb67/rtslib/node.py --- old/rtslib-fb-2.1.fb64/rtslib/node.py 2017-08-15 23:28:33.000000000 +0200 +++ new/rtslib-fb-2.1.fb67/rtslib/node.py 2018-02-12 18:34:38.000000000 +0100 @@ -52,9 +52,16 @@ ''' if mode not in ['any', 'lookup', 'create']: raise RTSLibError("Invalid mode: %s" % mode) + if self.exists and mode == 'create': - raise RTSLibError("This %s already exists in configFS" - % self.__class__.__name__) + # ensure that self.path is not stale hba-only dir + if os.path.samefile(os.path.dirname(self.path), self.configfs_dir+'/core') \ + and not next(os.walk(self.path))[1]: + os.rmdir(self.path) + else: + raise RTSLibError("This %s already exists in configFS" + % self.__class__.__name__) + elif not self.exists and mode == 'lookup': raise RTSLibNotInCFS("No such %s in configfs: %s" % (self.__class__.__name__, self.path)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rtslib-fb-2.1.fb64/rtslib/root.py new/rtslib-fb-2.1.fb67/rtslib/root.py --- old/rtslib-fb-2.1.fb64/rtslib/root.py 2017-08-15 23:28:33.000000000 +0200 +++ new/rtslib-fb-2.1.fb67/rtslib/root.py 2018-02-12 18:34:38.000000000 +0100 @@ -21,6 +21,7 @@ import os import stat import json +import glob from .node import CFSNode from .target import Target @@ -164,7 +165,12 @@ return self._dbroot = fread(dbroot_path) if self._dbroot != self._preferred_dbroot: - fwrite(dbroot_path, self._preferred_dbroot+"\n") + try: + fwrite(dbroot_path, self._preferred_dbroot+"\n") + except: + if not os.path.isdir(self._preferred_dbroot): + raise RTSLibError("Cannot set dbroot to {}. Please check if this directory exists." + .format(self._preferred_dbroot)) self._dbroot = fread(dbroot_path) def _get_dbroot(self): @@ -201,6 +207,11 @@ for so in self.storage_objects: so.delete() + # If somehow some hbas still exist (no storage object within?) clean + # them up too. + for hba_dir in glob.glob("%s/core/*_*" % self.configfs_dir): + os.rmdir(hba_dir) + def restore(self, config, clear_existing=False, abort_on_error=False): ''' Takes a dict generated by dump() and reconfigures the target to match. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rtslib-fb-2.1.fb64/rtslib/utils.py new/rtslib-fb-2.1.fb67/rtslib/utils.py --- old/rtslib-fb-2.1.fb64/rtslib/utils.py 2017-08-15 23:28:33.000000000 +0200 +++ new/rtslib-fb-2.1.fb67/rtslib/utils.py 2018-02-12 18:34:38.000000000 +0100 @@ -149,7 +149,7 @@ @raises: DeviceNotFoundError if corresponding device not found @raises: EnvironmentError, ValueError in some situations ''' - device = Device.from_device_file(_CONTEXT, os.path.realpath(str(path))) + device = pyudev.Device.from_device_file(_CONTEXT, os.path.realpath(str(path))) return _get_size_for_dev(device) get_block_size = get_size_for_blk_dev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rtslib-fb-2.1.fb64/setup.py new/rtslib-fb-2.1.fb67/setup.py --- old/rtslib-fb-2.1.fb64/setup.py 2017-08-15 23:28:33.000000000 +0200 +++ new/rtslib-fb-2.1.fb67/setup.py 2018-02-12 18:34:38.000000000 +0100 @@ -20,7 +20,7 @@ setup ( name = 'rtslib-fb', - version = '2.1.64', + version = '2.1.67', description = 'API for Linux kernel SCSI target (aka LIO)', license = 'Apache 2.0', maintainer = 'Andy Grover', @@ -28,7 +28,10 @@ url = 'http://github.com/open-iscsi/rtslib-fb', packages = ['rtslib_fb', 'rtslib'], scripts = ['scripts/targetctl'], - install_requires = ['pyudev >= 0.16.1'], + install_requires = [ + 'pyudev >= 0.16.1', + 'six', + ], classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3",