Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
https://tests.reproducible-builds.org/debian/rb-pkg/stretch/amd64/python-pgmagick.html * Backport upstream FTBFS fix to handle version detection of graphicsmagick security updates that identify themself as version 1.4. The fix is already included in the version in buster.
diff -Nru python-pgmagick-0.6.4/debian/changelog python-pgmagick-0.6.4/debian/changelog --- python-pgmagick-0.6.4/debian/changelog 2017-01-22 15:45:47.000000000 +0200 +++ python-pgmagick-0.6.4/debian/changelog 2020-01-12 19:44:17.000000000 +0200 @@ -1,3 +1,12 @@ +python-pgmagick (0.6.4-1+deb9u1) stretch; urgency=medium + + * Non-maintainer upload. + * Backport upstream FTBFS fix to handle version detection + of graphicsmagick security updates that identify themself + as version 1.4. + + -- Adrian Bunk <b...@debian.org> Sun, 12 Jan 2020 19:44:17 +0200 + python-pgmagick (0.6.4-1) unstable; urgency=medium * New upstream release diff -Nru python-pgmagick-0.6.4/debian/patches/0001-Refactor-DPGMAGICK_LIB_GRAPHICSMAGICK-detection.patch python-pgmagick-0.6.4/debian/patches/0001-Refactor-DPGMAGICK_LIB_GRAPHICSMAGICK-detection.patch --- python-pgmagick-0.6.4/debian/patches/0001-Refactor-DPGMAGICK_LIB_GRAPHICSMAGICK-detection.patch 1970-01-01 02:00:00.000000000 +0200 +++ python-pgmagick-0.6.4/debian/patches/0001-Refactor-DPGMAGICK_LIB_GRAPHICSMAGICK-detection.patch 2020-01-12 19:43:47.000000000 +0200 @@ -0,0 +1,65 @@ +From 360e1d7e833189339146dc633176ccda15be04d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juraj=20Koma=C4=8Dka?= <komac...@gmail.com> +Date: Wed, 12 Jul 2017 08:11:55 +0200 +Subject: Refactor -DPGMAGICK_LIB_GRAPHICSMAGICK detection + +Use new function library_supports_api that will provide easy way to support different major and minor versions in the future. +--- + setup.py | 34 ++++++++++++++++++++++------------ + 1 file changed, 22 insertions(+), 12 deletions(-) + +diff --git a/setup.py b/setup.py +index 00a1bde..b32e1a4 100644 +--- a/setup.py ++++ b/setup.py +@@ -75,6 +75,24 @@ def find_file(filename, search_dirs): + return root + return False + ++def library_supports_api(library_version, api_version, different_major_breaks_support=True): ++ """ ++ Returns whether api_version is supported by given library version. ++ E. g. library_version (1,3,21) returns True for api_version (1,3,21), (1,3,19), (1,3,'x'), (1,2,'x'), (1, 'x') ++ False for (1,3,24), (1,4,'x'), (2,'x') ++ ++ different_major_breaks_support - if enabled and library and api major versions are different always return False ++ ex) with library_version (2,0,0) and for api_version(1,3,24) returns False if enabled, True if disabled ++ """ ++ assert isinstance(library_version, (tuple, list)) # won't work with e.g. generators ++ assert len(library_version) == 3 ++ sequence_type = type(library_version) # assure we will compare same types ++ api_version = sequence_type(0 if num == 'x' else num for num in api_version) ++ if different_major_breaks_support and library_version[0] != api_version[0]: ++ return False ++ assert len(api_version) <= 3 # otherwise following comparision won't work as intended, e.g. (2, 0, 0) > (2, 0, 0, 0) ++ return library_version >= api_version ++ + # find to header path + header_path = find_file('Magick++.h', search_include_dirs) + if not header_path: +@@ -138,18 +156,10 @@ if _version: + # ex) 1.2 -> 1.2.0 + _version.append(0) + if LIBRARY == 'GraphicsMagick': +- ext_compile_args = [] +- if _version[0] == 1 and _version[1] == 3 and _version[2] >= 24: +- ext_compile_args.append("-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_24") +- if _version[0] == 1 and _version[1] == 3 and _version[2] >= 22: +- ext_compile_args.append("-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_22") +- if _version[0] == 1 and _version[1] == 3 and _version[2] >= 20: +- ext_compile_args.append("-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_20") +- if _version[0] == 1 and _version[1] == 3 and _version[2] == 19: +- ext_compile_args.append("-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_19") +- if _version[0] == 1 and _version[1] == 3 and _version[2] >= 6: +- # for not Ubuntu10.04 +- ext_compile_args.append("-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6") ++ # 1.3.6 for not Ubuntu10.04 ++ _tested_api_versions = ((1,3,26), (1,3,24), (1,3,22), (1,3,20), (1,3,19), (1,3,6)) ++ _supportedApiVersions = (v for v in _tested_api_versions if library_supports_api(_version, v)) ++ ext_compile_args = ["-DPGMAGICK_LIB_GRAPHICSMAGICK_" + '_'.join(map(str, version)) for version in _supportedApiVersions] + if not (_version[0] == 1 and _version[1] == 1): + # for GM version 1.3.x and higher + ext_compile_args.append("-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x") +-- +2.20.1 + diff -Nru python-pgmagick-0.6.4/debian/patches/series python-pgmagick-0.6.4/debian/patches/series --- python-pgmagick-0.6.4/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ python-pgmagick-0.6.4/debian/patches/series 2020-01-12 19:38:30.000000000 +0200 @@ -0,0 +1 @@ +0001-Refactor-DPGMAGICK_LIB_GRAPHICSMAGICK-detection.patch