From 57dd69f3ab35555c6a371d7b32463a2f34159706 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 09 2014 09:12:16 +0000 Subject: import python27-python-werkzeug-0.8.3-5.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c5619a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Werkzeug-0.8.3.tar.gz diff --git a/.python27-python-werkzeug.metadata b/.python27-python-werkzeug.metadata new file mode 100644 index 0000000..cee525b --- /dev/null +++ b/.python27-python-werkzeug.metadata @@ -0,0 +1 @@ +e61fd2a1c7f7eef817cf8a6716c74bf426db9f57 SOURCES/Werkzeug-0.8.3.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index ce46a88..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -\ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/werkzeug-fips-errors-fix.patch b/SOURCES/werkzeug-fips-errors-fix.patch new file mode 100644 index 0000000..63c663c --- /dev/null +++ b/SOURCES/werkzeug-fips-errors-fix.patch @@ -0,0 +1,42 @@ +--- Werkzeug-0.8.3/werkzeug/contrib/cache.py ++++ Werkzeug-0.8.3/werkzeug/contrib/cache.py +@@ -625,7 +625,10 @@ class FileSystemCache(BaseCache): + pass + + def _get_filename(self, key): +- hash = md5(key).hexdigest() ++ try: ++ hash = md5(key).hexdigest() ++ except ValueError as err: ++ raise ValueError, "MD5 is disabled in FIPS mode (%s)." % err + return os.path.join(self._path, hash) + + def get(self, key): +--- Werkzeug-0.8.3/werkzeug/http.py ++++ Werkzeug-0.8.3/werkzeug/http.py +@@ -558,7 +558,10 @@ def parse_etags(value): + + def generate_etag(data): + """Generate an etag for some data.""" +- return md5(data).hexdigest() ++ try: ++ return md5(data).hexdigest() ++ except ValueError as err: ++ raise ValueError, "MD5 is disabled in FIPS mode (%s)." % err + + + def parse_date(value): +--- Werkzeug-0.8.3/werkzeug/security.py ++++ Werkzeug-0.8.3/werkzeug/security.py +@@ -72,7 +72,10 @@ def _hash_internal(method, salt, password): + return None + if isinstance(salt, unicode): + salt = salt.encode('utf-8') +- h = hmac.new(salt, None, _hash_mods[method]) ++ try: ++ h = hmac.new(salt, None, _hash_mods[method]) ++ except ValueError as err: ++ raise ValueError, "MD5 is disabled in FIPS mode (%s)." % err + else: + if method not in _hash_funcs: + return None diff --git a/SPECS/python-werkzeug.spec b/SPECS/python-werkzeug.spec new file mode 100644 index 0000000..36aa1f0 --- /dev/null +++ b/SPECS/python-werkzeug.spec @@ -0,0 +1,127 @@ +%{?scl:%scl_package python-werkzeug} +%{!?scl:%global pkg_name %{name}} + +%global srcname Werkzeug + +Name: %{?scl_prefix}python-werkzeug +Version: 0.8.3 +Release: 5%{?dist} +Summary: The Swiss Army knife of Python web development + +Group: Development/Libraries +License: BSD +URL: http://werkzeug.pocoo.org/ +Source0: http://pypi.python.org/packages/source/W/Werkzeug/%{srcname}-%{version}.tar.gz +Patch1: werkzeug-fips-errors-fix.patch +BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: %{?scl_prefix}python-devel +BuildRequires: %{?scl_prefix}python-setuptools +BuildRequires: %{?scl_prefix}python-sphinx + +%description +Werkzeug +======== + +Werkzeug started as simple collection of various utilities for WSGI +applications and has become one of the most advanced WSGI utility +modules. It includes a powerful debugger, full featured request and +response objects, HTTP utilities to handle entity tags, cache control +headers, HTTP dates, cookie handling, file uploads, a powerful URL +routing system and a bunch of community contributed addon modules. + +Werkzeug is unicode aware and doesn't enforce a specific template +engine, database adapter or anything else. It doesn't even enforce +a specific way of handling requests and leaves all that up to the +developer. It's most useful for end user applications which should work +on as many server environments as possible (such as blogs, wikis, +bulletin boards, etc.). + +%package doc +Summary: Documentation for %{pkg_name} +Group: Documentation +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} + + +%description doc +Documentation and examples for %{pkg_name}. + +%prep +%setup -q -n %{srcname}-%{version} +%{__sed} -i 's/\r//' LICENSE +%{__sed} -i '1d' werkzeug/testsuite/multipart/collect.py +%patch1 -p1 + + +%build +%{?scl:scl enable %{scl} "} +%{__python} setup.py build +%{?scl:"} +find examples/ -name '*.py' -executable | xargs chmod -x +find examples/ -name '*.png' -executable | xargs chmod -x +pushd docs +%{?scl:scl enable %{scl} "} +make html +%{?scl:"} +popd + +%install +%{__rm} -rf %{buildroot} +%{?scl:scl enable %{scl} "} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%{?scl:"} +%{__rm} -rf docs/_build/html/.buildinfo +%{__rm} -rf examples/cupoftee/db.pyc + +%check +%{?scl:scl enable %{scl} "} +%{__python} setup.py test +%{?scl:"} + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc AUTHORS LICENSE PKG-INFO CHANGES +%{python_sitelib}/* + +%files doc +%defattr(-,root,root,-) +%doc docs/_build/html examples + +%changelog +* Wed May 15 2013 Matej Stuchlik - 0.8.3-5 +- Improved error messages in FIPS + +* Tue May 07 2013 Bohuslav Kabrda - 0.8.3-4 +- Rebuild to generate bytecode properly after fixing rhbz#956289 + +* Wed Sep 19 2012 Bohuslav Kabrda - 0.8.3-3 +- Rebuilt for SCL. + +* Sat Jul 21 2012 Fedora Release Engineering - 0.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Feb 5 2012 Haïkel Guémar - 0.8.3-1 +- upstream 0.8.3 (fixes XSS security issues) + +* Wed Jan 25 2012 Haïkel Guémar - 0.8.2-1 +- upstream 0.8.2 + +* Sat Jan 14 2012 Fedora Release Engineering - 0.6.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 0.6.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 22 2010 David Malcolm - 0.6.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Sun May 23 2010 Peter Halliday - 0.6.2-1 +- Updating because upstream release of Werkzeug 0.6.2 +* Sat Mar 05 2010 Peter Halliday - 0.6-1 +- Updating because upstream release of Werkzeug 0.6 +* Tue Aug 25 2009 Peter Halliday - 0.5.1-1 +- Initial package