1873385 - ignore driverless utilities during tags creation
This commit is contained in:
parent
717b3b3c32
commit
638a826bbd
22
0001-examples-cupstree.py-remove-shebang.patch
Normal file
22
0001-examples-cupstree.py-remove-shebang.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 09145aa3ad0ce6e0558aceccabcafdf6c1b282d8 Mon Sep 17 00:00:00 2001
|
||||
From: zdohnal <zdohnal@redhat.com>
|
||||
Date: Fri, 28 Aug 2020 07:48:20 +0200
|
||||
Subject: [PATCH] examples/cupstree.py: remove shebang
|
||||
|
||||
It is unneeded within examples.
|
||||
---
|
||||
examples/cupstree.py | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/examples/cupstree.py b/examples/cupstree.py
|
||||
index e954615..af19b07 100755
|
||||
--- a/examples/cupstree.py
|
||||
+++ b/examples/cupstree.py
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/python
|
||||
import cups
|
||||
|
||||
def do_indent (indent):
|
||||
--
|
||||
2.26.2
|
||||
|
28
0001-postscriptdriver.prov-ignore-driverless-utilities.patch
Normal file
28
0001-postscriptdriver.prov-ignore-driverless-utilities.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 845c65358e3ba6e5972df1dd37756be97130cc90 Mon Sep 17 00:00:00 2001
|
||||
From: zdohnal <zdohnal@redhat.com>
|
||||
Date: Fri, 28 Aug 2020 08:23:24 +0200
|
||||
Subject: [PATCH] postscriptdriver.prov: ignore driverless utilities
|
||||
|
||||
Driverless utilities are generic tools for driverless support, which generate 'drivers' based on communication with a device, so it is not usable to try to generate rpm tags for specific models.
|
||||
Creating generic ```postscriptdriver(driverless)``` doesn't make sense too, because utilities are shipped within core printing packages (CUPS/cups-filters), so just ignore postscriptdriver tag creation for them.
|
||||
---
|
||||
postscriptdriver.prov | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/postscriptdriver.prov b/postscriptdriver.prov
|
||||
index 7447def..c9e3cee 100755
|
||||
--- a/postscriptdriver.prov
|
||||
+++ b/postscriptdriver.prov
|
||||
@@ -243,7 +243,8 @@ class TagBuilder:
|
||||
self.ids = DeviceIDs ()
|
||||
|
||||
for path in paths:
|
||||
- if path.find ("/usr/lib/cups/driver/") != -1:
|
||||
+ if path.find ("/usr/lib/cups/driver/") != -1 and \
|
||||
+ path.find("driverless") == -1:
|
||||
try:
|
||||
self.ids += DynamicDriver (path).list ()
|
||||
except TimedOut:
|
||||
--
|
||||
2.26.2
|
||||
|
@ -6,15 +6,21 @@
|
||||
Summary: Python bindings for CUPS
|
||||
Name: python-cups
|
||||
Version: 2.0.1
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
# older URL, but still with useful information about pycups
|
||||
#URL: http://cyberelk.net/tim/software/pycups/
|
||||
URL: https://github.com/OpenPrinting/pycups/
|
||||
Source: https://github.com/OpenPrinting/pycups/releases/download/v%{version}/pycups-%{version}.tar.gz
|
||||
License: GPLv2+
|
||||
|
||||
# all taken from upstream
|
||||
Patch01: 0001-examples-cupstree.py-remove-shebang.patch
|
||||
Patch02: 0001-postscriptdriver.prov-ignore-driverless-utilities.patch
|
||||
|
||||
# gcc is no longer in buildroot by default
|
||||
BuildRequires: gcc
|
||||
# for autosetup
|
||||
BuildRequires: git
|
||||
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: python3-devel
|
||||
@ -40,9 +46,7 @@ Summary: Documentation for python-cups
|
||||
Documentation for python-cups.
|
||||
|
||||
%prep
|
||||
%setup -n pycups-%{version}
|
||||
|
||||
sed -i '/^#!\/usr\/bin\/python/d' examples/cupstree.py
|
||||
%autosetup -S git -n pycups-%{version}
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -67,6 +71,9 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||
%doc examples html
|
||||
|
||||
%changelog
|
||||
* Fri Aug 28 2020 Zdenek Dohnal <zdohnal@redhat.com> - 2.0.1-5
|
||||
- 1873385 - ignore driverless utilities during tags creation
|
||||
|
||||
* Wed Jul 29 2020 Zdenek Dohnal <zdohnal@redhat.com> - 2.0.1-4
|
||||
- use %%python3_sitearch in filter_provides_in, otherwise the package fails to build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user