forked from pool/python-urlgrabber
Accepting request 1069119 from devel:languages:python
- Clean up SPEC file - Raise proper exception from urlgrab() when local file is not found (bsc#1208288) - Added: * fix-urlgrab-file-schema-comparison.patch OBS-URL: https://build.opensuse.org/request/show/1069119 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-urlgrabber?expand=0&rev=32
This commit is contained in:
26
fix-urlgrab-file-schema-comparison.patch
Normal file
26
fix-urlgrab-file-schema-comparison.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From 779f65c1845968b59e5bfa21cf0468ba3664271b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
||||
<psuarezhernandez@suse.com>
|
||||
Date: Wed, 1 Mar 2023 14:00:08 +0000
|
||||
Subject: [PATCH] Fix comparison to work with expected bytes string
|
||||
|
||||
The urlgrab function initially coverts given url to bytes string
|
||||
via the _to_utf8() helper. This make "url" parameter to be bytes,
|
||||
and therefore we need to fix the this comparison
|
||||
---
|
||||
urlgrabber/grabber.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: urlgrabber-4.1.0/urlgrabber/grabber.py
|
||||
===================================================================
|
||||
--- urlgrabber-4.1.0.orig/urlgrabber/grabber.py
|
||||
+++ urlgrabber-4.1.0/urlgrabber/grabber.py
|
||||
@@ -1210,7 +1210,7 @@ class URLGrabber(object):
|
||||
if not filename:
|
||||
# This is better than nothing.
|
||||
filename = 'index.html'
|
||||
- if scheme == 'file' and not opts.copy_local:
|
||||
+ if scheme == b'file' and not opts.copy_local:
|
||||
# just return the name of the local file - don't make a
|
||||
# copy currently
|
||||
path = url2pathname(path)
|
||||
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 3 08:07:59 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Clean up SPEC file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 1 16:29:38 UTC 2023 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com>
|
||||
|
||||
- Raise proper exception from urlgrab() when local file is not found (bsc#1208288)
|
||||
|
||||
- Added:
|
||||
* fix-urlgrab-file-schema-comparison.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 3 14:30:01 UTC 2022 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-urlgrabber
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define modname urlgrabber
|
||||
Name: python-urlgrabber
|
||||
Version: 4.1.0
|
||||
@@ -26,12 +25,14 @@ License: LGPL-2.1-only
|
||||
Group: Development/Libraries/Python
|
||||
URL: https://github.com/rpm-software-management/urlgrabber
|
||||
Source: https://github.com/rpm-software-management/%{modname}/releases/download/%{modname}-4-1-0/%{modname}-%{version}.tar.gz
|
||||
# PATCH-FIX_UPSTREAM https://github.com/rpm-software-management/urlgrabber/pull/32
|
||||
# PATCH-FIX_UPSTREAM gh#rpm-software-management/urlgrabber!32
|
||||
Patch0: use-binary-mode-when-reopening-files.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/rpm-software-management/urlgrabber/pull/35
|
||||
# PATCH-FIX_UPSTREAM gh#rpm-software-management/urlgrabber!35
|
||||
Patch1: fix_find_proxy_logic_and_drop_six.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/rpm-software-management/urlgrabber/pull/34
|
||||
# PATCH-FIX_UPSTREAM gh#rpm-software-management/urlgrabber!34
|
||||
Patch2: avoid_crashing_when_urlgrabber_debug_enabled.patch
|
||||
# PATCH-FIX_UPSTREAM gh#rpm-software-management/urlgrabber!37
|
||||
Patch3: fix-urlgrab-file-schema-comparison.patch
|
||||
|
||||
BuildRequires: %{python_module pycurl}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -74,12 +75,16 @@ rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly instal
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative urlgrabber
|
||||
if [ ! -f %{_libexecdir}/urlgrabber-ext-down ] ; then
|
||||
update-alternatives --remove urlgrabber-ext-down %{_libexecdir}/urlgrabber-ext-down
|
||||
fi
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc ChangeLog README TODO
|
||||
%python_alternative %{_bindir}/urlgrabber
|
||||
%python_alternative %{_libexecdir}/urlgrabber-ext-down
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/urlgrabber
|
||||
%{python_sitelib}/urlgrabber-%{version}*-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user