Your message dated Sun, 19 Dec 2021 23:19:11 +0000
with message-id <e1mz5sr-00055h...@fasolo.debian.org>
and subject line Bug#1001824: fixed in xml2rfc 3.12.0-2
has caused the Debian Bug report #1001824,
regarding xml2rfc: Incompatible with current weaseyprint
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1001824: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001824
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: xml2rfc
Version: 3.12.0-1
Severity: serious
Tags: ftbfs upstream patch
Justification: fails to build from source

Note: Using ftbfs because that's the closest thing we have to an
autopkgtest failure.

The new version of weasyprint no longer uses the same PDF generation
libraries and as a result, xml2rfc's detection mechanism for if it is
capable of making a PDF is not working (see attached patch).

Once the detection mechanism is patched, PDF generation works fine,
which leads me to believe the test failure is bogus:

======================================================================
FAIL: test_text_content (__main__.PdfWriterTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/xml2rfc-3.12.0/test.py", line 510, in test_text_content
    self.assertIn(t, text)
AssertionError: 'RFC' not found in 'l- WN –&,ÛžÆ TNDQ&·sX l-%Zñ¢<³ WN P½RÔ n®>Ø 
%˜oh l† .µ ¬( .µ=N'

----------------------------------------------------------------------

If things were really that garbled, I don't see how it could make a PDF.

Reported upstream:

https://trac.ietf.org/trac/xml2rfc/ticket/696

In the interim, I think it might make sense to apply the attached patch
and get rid of the failing test.  If we go down this path, then this
will also need fixing (get rid of HAVE_CAIRO and HAVE_PANGO):

xml2rfc-3.12.0/test.py", line 513, in test_included_fonts
    if xml2rfc.HAVE_WEASYPRINT and xml2rfc.HAVE_PYCAIRO and xml2rfc.HAVE_CAIRO 
and xml2rfc.HAVE_PANGO:

Scott K
diff -ruN a/xml2rfc/__init__.py b/xml2rfc/__init__.py
--- a/xml2rfc/__init__.py       2021-12-16 10:31:27.857538775 -0500
+++ b/xml2rfc/__init__.py       2021-12-16 22:56:51.310061387 -0500
@@ -40,21 +40,6 @@
 except (ImportError, OSError):
     cairo = False
     HAVE_PYCAIRO = False
-try:
-    from weasyprint.text import cairo
-    HAVE_CAIRO = True
-    CAIRO_VERSION = cairo.cairo_version()
-except (ImportError, OSError):
-    HAVE_CAIRO = False
-    CAIRO_VERSION = None
-try:
-    from weasyprint.text import pango
-    HAVE_PANGO = True
-    PANGO_VERSION = pango.pango_version
-except (ImportError, OSError, AttributeError):
-    HAVE_PANGO = False
-    PANGO_VERSION = None
-
 
 def get_versions():
     import sys
diff -ruN a/xml2rfc/run.py b/xml2rfc/run.py
--- a/xml2rfc/run.py    2021-12-16 10:31:27.861538832 -0500
+++ b/xml2rfc/run.py    2021-12-16 23:00:12.948957766 -0500
@@ -35,10 +35,6 @@
         missing += "\nCould not import weasyprint"
     if not xml2rfc.HAVE_PYCAIRO:
         missing += "\nCould not import pycairo"
-    if not xml2rfc.HAVE_CAIRO:
-        missing += "\nCould not find the cairo lib"
-    if not xml2rfc.HAVE_PANGO:
-        missing += "\nCould not find the pango lib"
     return missing
 
 
@@ -212,7 +208,7 @@
                            help='outputs formatted HTML to file')
     formatgroup.add_argument('--nroff', action='store_true',
                            help='outputs formatted nroff to file (only v2 
input)')
-    if xml2rfc.HAVE_CAIRO and xml2rfc.HAVE_PANGO:
+    if xml2rfc.HAVE_PYCAIRO and xml2rfc.HAVE_WEASYPRINT:
         formatgroup.add_argument('--pdf', action='store_true',
                                help='outputs formatted PDF to file')
     else:

--- End Message ---
--- Begin Message ---
Source: xml2rfc
Source-Version: 3.12.0-2
Done: Scott Kitterman <sc...@kitterman.com>

We believe that the bug you reported is fixed in the latest version of
xml2rfc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1001...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Scott Kitterman <sc...@kitterman.com> (supplier of updated xml2rfc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 19 Dec 2021 17:53:10 -0500
Source: xml2rfc
Architecture: source
Version: 3.12.0-2
Distribution: unstable
Urgency: medium
Maintainer: Daniel Kahn Gillmor <d...@fifthhorseman.net>
Changed-By: Scott Kitterman <sc...@kitterman.com>
Closes: 1001824
Changes:
 xml2rfc (3.12.0-2) unstable; urgency=medium
 .
   * Update package description to mention building PDF documents
   * Update to work with weasyprint > 53.0 (Closes: #1001824)
     - Update depends and test depends
     - Add debian/patches/0002-build-pdf-weasyprint-53.patch
Checksums-Sha1:
 3ffc499e29b964e65d32aa055901c812f4105105 2616 xml2rfc_3.12.0-2.dsc
 551c25196cf4899e91855216e8872f0dd4d22f58 21728 xml2rfc_3.12.0-2.debian.tar.xz
 941177a83bf650594f54c256c8613e1f576744b1 6500 xml2rfc_3.12.0-2_source.buildinfo
Checksums-Sha256:
 bcc63dd8efafba10c578074e4510bdcc83d0067d9252bdf4b07602fca012882b 2616 
xml2rfc_3.12.0-2.dsc
 1e5719df6833c19258f77a183f22427a9d4877e624593798c003a1ff15cbf8a8 21728 
xml2rfc_3.12.0-2.debian.tar.xz
 36ce74963aa262d5a282dec4d4ec03721f27202cc0c50c072dc1781cf8ac94d9 6500 
xml2rfc_3.12.0-2_source.buildinfo
Files:
 28e876b1b51691d77c6a78e9c35d337c 2616 non-free/text optional 
xml2rfc_3.12.0-2.dsc
 1e86f830bf083a4e51103d156fb0a1d7 21728 non-free/text optional 
xml2rfc_3.12.0-2.debian.tar.xz
 58e64f0f0d6e9b45fd1ba3cc2029e1d3 6500 non-free/text optional 
xml2rfc_3.12.0-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE53Kb/76FQA/u7iOxeNfe+5rVmvEFAmG/uCoACgkQeNfe+5rV
mvGZRw/+Ml+5VEXa/hiXsYFoP2KoQsdMPTgri+8XwsQluMIuUWtTfwT+3XtmdiDk
cZjEiZy8HcKLpS1eA1rTZ2vc6KsNdt1xsKObiRhcY9pvLrMEjG660SaGPXFwu3nP
P7vItPnUQD71NkkX3aHnoCHpGaumlLkts3d9iHTUPVOTW1nh6VfgBWuKf6OS+L/m
a5lN6KXH7cnBIvZZwZMFCrm9eRiPpweKnmwA5yMHeuUFyf5RKkJle7ve/I5I731G
MeqGoORqWDXfa5ercuxSJBbnFkBVjYlzvWQ2r/Ol58WX4kv1AMLAj5gWDW5QrzWe
omK835AFmft6OVoSJBYhutZkOrEndSvCTJ/4RnMz5uWwaEs5YsiipkCVJ2CbkSJy
ucilq8nRPUuz/XWOb9KCFMr3OfQ97xTZQ49pnp1N6A5XxODVcmF1YwH/q4NNhptl
UT5vfouKtd0a7BpLL11qppnGxxZsEfw4YSTw6OfcqTC/TPZAQJz7MHRz67dlkrJ2
ENPX+/88muLLixBOhWpodLIyaOKXsm3WwKUolduuunlu+jl+p0FejMa0+3EEJ3ze
TS61TClH+FCWeixBJPrLn3HmzGbUxlSIUv468zamp3lA7v+FJX4awP4sO3JgQRXr
KMBYAnz4P0DDil/97GLaTHJDvoifnMxmr12MYC7L2hYvik6N4ZI=
=zI9X
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to