[gfal2-util/el6] Update for new upstream 1.0.0 release

Alejandro Alvarez aalvarez at fedoraproject.org
Wed Jul 2 12:56:24 UTC 2014


commit 73e0199e189cbe8569406c93411ae59ae7229ec4
Author: Alejandro Alvarez Ayllon <aalvarez at cern.ch>
Date:   Wed Jul 2 12:43:47 2014 +0200

    Update for new upstream 1.0.0 release

 .gitignore                        |    2 +-
 gfal2-util-disable-mkparent.patch |   23 +++++++++++++++
 gfal2-util.spec                   |   54 ++++++++++++++++++++++---------------
 sources                           |    2 +-
 4 files changed, 57 insertions(+), 24 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6308ca2..f6a3a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/gfal2-util-0.2.1.tar.gz
+/*.tar.gz
diff --git a/gfal2-util-disable-mkparent.patch b/gfal2-util-disable-mkparent.patch
new file mode 100644
index 0000000..3999b93
--- /dev/null
+++ b/gfal2-util-disable-mkparent.patch
@@ -0,0 +1,23 @@
+diff --git a/test/functional/test_copy.py b/test/functional/test_copy.py
+index b387dc2..56130a2 100644
+--- a/test/functional/test_copy.py
++++ b/test/functional/test_copy.py
+@@ -100,18 +100,5 @@ class UtilCopyTest(TestBase):
+         self.assertFalse(os.path.isfile(dst_path))
+         self.assertTrue(ret > 0)
+ 
+-    def test_copy_parent_mkdir(self):
+-        self.assertTrue(os.path.isfile(self.ffname1))
+-        dst_path = '/tmp/make/parent'
+-        self.assertFalse(os.path.isfile(dst_path))
+-
+-        (ret, out, err) = utils.run_command('gfal-copy', '-p file://' + self.ffname1 + ' file://' + dst_path)
+-
+-        self.assertTrue(os.path.isfile(dst_path))
+-        self.assertTrue(ret == 0)
+-
+-        os.unlink(dst_path)
+-        os.rmdir('/tmp/make/')
+-
+ if __name__ == '__main__':
+     unittest.main()
diff --git a/gfal2-util.spec b/gfal2-util.spec
index 1d2c8c3..4667ca3 100644
--- a/gfal2-util.spec
+++ b/gfal2-util.spec
@@ -1,58 +1,68 @@
-
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 %{!?python_version:  %global python_version  %(%{__python} -c "from sys import version_info; print('%d.%d'% (version_info[0],version_info[1]))")}
 
+Name:			gfal2-util
+Version:		1.0.0
+Release:		1%{?dist}
+Summary:		GFAL2 utility tools
+Group:			Applications/Internet
+License:		GPLv3
+URL:			https://svnweb.cern.ch/trac/lcgutil/wiki/gfal2
+# svn export http://svn.cern.ch/guest/lcgutil/gfal2-utils/tags/gfal2-utils_R_1_0_0 gfal2-util-1.0.0
+# tar czf gfal2-util-1.0.0.tar.gz gfal2-util-1.0.0
+Source0:		%{name}-%{version}.tar.gz
+# Disable one test broken because of gfal2, not gfal2-util
+Patch0:			%{name}-disable-mkparent.patch
+BuildRoot:		%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
-Name:				gfal2-util
-Version:			0.2.1
-Release:			1%{?dist}
-Summary:			GFAL2 utility tools
-Group:				Applications/Internet
-License:			GPLv3
-URL:				https://svnweb.cern.ch/trac/lcgutil/wiki/gfal2
-# svn export http://svn.cern.ch/guest/lcgutil/gfal2-utils/trunk gfal2-utils
-Source0:			http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/%{name}/%{name}-%{version}.tar.gz
-BuildRoot:			%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+BuildArch:		noarch
 
-#main lib dependencies
-BuildRequires:		cmake
-BuildRequires:		python2-devel
-BuildArch:			noarch
+BuildRequires:		gfal2-python >= 1.5.0
+Requires:		gfal2-python >= 1.5.0
 
-Requires:			gfal2-python >= 1.2.1
 %if "0%{?python_version}" <= "2.7"
-Requires:			python-argparse
+BuildRequires:		python-argparse
+Requires:		python-argparse
 %endif # python < 2.7
 
 %description
 gfal2-util is a set of basic utility tools for file 
 interactions and file copy based on the GFAL 2.0 toolkit.
 gfal2-util supports the protocols of GFAL 2.0 : WebDav(s),
- gridFTP, http(s), SRM, xrootd, etc...
+gridFTP, http(s), SRM, xrootd, etc...
 
 %clean
 rm -rf %{buildroot}
-make clean
+python setup.py clean
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-%cmake .
+python setup.py build
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
+python setup.py install --root=%{buildroot}
+
+%check
+python test/functional/test_all.py
 
 %files
 %defattr (-,root,root)
-%{python_sitelib}/gfal2_util
+%{python_sitelib}/gfal2_util*
 %{_bindir}/gfal-*
 %{_mandir}/man1/*
 %doc RELEASE-NOTES VERSION LICENSE
 
 
 %changelog
+* Wed Jul 02 2014 Alejandro Alvarez <aalvarez at cern.ch> - 1.0.0-1
+- Update for new upstream 1.0.0 release
+- Installation done with distutils
+- Run tests on check stage 
+
 * Mon Nov 04 2013 Adrien Devresse <adevress at cern.ch> - 0.2.1-1
  - Initial EPEL compatible version
diff --git a/sources b/sources
index 5f18b8c..8cc7d84 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ba0b8e1caaf77229ce19d3da02c3af34  gfal2-util-0.2.1.tar.gz
+63538ffc622e652348eed599396f3294  gfal2-util-1.0.0.tar.gz


More information about the scm-commits mailing list