Control: tags 828632 + pending
Control: tags 829147 + pending

Dear maintainer,

I've prepared an NMU for tidy-html5 (versioned as 1:5.2.0-1.2) and
uploaded it to DELAYED/14. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru tidy-html5-5.2.0/debian/changelog tidy-html5-5.2.0/debian/changelog
--- tidy-html5-5.2.0/debian/changelog   2016-06-28 15:37:12.000000000 +0200
+++ tidy-html5-5.2.0/debian/changelog   2016-07-30 06:40:39.000000000 +0200
@@ -1,3 +1,21 @@
+tidy-html5 (1:5.2.0-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Pino Toscano ]
+  * Backport upstream commit 27143cc88e1d7cda7f08bdc4d78ce68dabf7575c to fix
+    build on non-Linux architectures; patch
+    upstream_Set-HAS_FUTIME-0-on-any-GNU-libc-platform.patch. (Closes: #828632)
+  * Backport upstream commit 10281040ca6b3a54db7880eed9c67957d11622eb to avoid
+    crashing in tidyCleanAndRepair if document was not loaded; patch
+    upstream_Avoid-crash-in-tidyCleanAndRepair-if-document-was-no.patch.
+
+  [ Daniel James ]
+  * Drop dependency on libdmalloc-dev to a Suggests:, not actually used
+    without an extra #define. (Closes: #829147)
+
+ -- Pino Toscano <p...@debian.org>  Sat, 30 Jul 2016 06:33:42 +0200
+
 tidy-html5 (1:5.2.0-1.1) unstable; urgency=medium
 
   [ Gianfranco Costamagna ]
diff -Nru tidy-html5-5.2.0/debian/control tidy-html5-5.2.0/debian/control
--- tidy-html5-5.2.0/debian/control     2016-06-28 15:37:12.000000000 +0200
+++ tidy-html5-5.2.0/debian/control     2016-07-30 06:34:49.000000000 +0200
@@ -49,7 +49,8 @@
 Package: libtidy-dev
 Section: libdevel
 Architecture: any
-Depends: libtidy5 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, 
libdmalloc-dev
+Depends: libtidy5 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Suggests: libdmalloc-dev
 Breaks: libtidy-0.99-0
 Replaces: libtidy-0.99-0 
 Description: HTML syntax checker and reformatter - development
diff -Nru tidy-html5-5.2.0/debian/patches/series 
tidy-html5-5.2.0/debian/patches/series
--- tidy-html5-5.2.0/debian/patches/series      2016-06-28 15:37:12.000000000 
+0200
+++ tidy-html5-5.2.0/debian/patches/series      2016-07-30 06:41:36.000000000 
+0200
@@ -1 +1,3 @@
 0001-Add-compatibility-headers.patch
+upstream_Set-HAS_FUTIME-0-on-any-GNU-libc-platform.patch
+upstream_Avoid-crash-in-tidyCleanAndRepair-if-document-was-no.patch
diff -Nru 
tidy-html5-5.2.0/debian/patches/upstream_Avoid-crash-in-tidyCleanAndRepair-if-document-was-no.patch
 
tidy-html5-5.2.0/debian/patches/upstream_Avoid-crash-in-tidyCleanAndRepair-if-document-was-no.patch
--- 
tidy-html5-5.2.0/debian/patches/upstream_Avoid-crash-in-tidyCleanAndRepair-if-document-was-no.patch
 1970-01-01 01:00:00.000000000 +0100
+++ 
tidy-html5-5.2.0/debian/patches/upstream_Avoid-crash-in-tidyCleanAndRepair-if-document-was-no.patch
 2016-07-30 06:33:27.000000000 +0200
@@ -0,0 +1,41 @@
+From 10281040ca6b3a54db7880eed9c67957d11622eb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <mic...@cihar.com>
+Date: Wed, 29 Jun 2016 16:11:10 +0200
+Subject: [PATCH] Avoid crash in tidyCleanAndRepair if document was not loaded
+
+These services can only be used when there is a document loaded, ie a
+lexer created.  But really should not be calling a Clean and Repair
+service with no doc!
+---
+ src/tidylib.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/src/tidylib.c b/src/tidylib.c
+index 28ebbb2..4787336 100755
+--- a/src/tidylib.c
++++ b/src/tidylib.c
+@@ -1908,9 +1908,18 @@ int         tidyDocCleanAndRepair( TidyDocImpl* doc )
+        it can ever be, so we can start detecting things that shouldn't
+        be in this version of HTML
+      */
+-    if (doc->lexer->versionEmitted & VERS_HTML5)
+-         TY_(CheckHTML5)( doc, &doc->root );
+-    TY_(CheckHTMLTagsAttribsVersions)( doc, &doc->root );
++    if (doc->lexer) 
++    {
++        /*\ 
++         *  Issue #429 #426 - These services can only be used
++         *  when there is a document loaded, ie a lexer created.
++         *  But really should not be calling a Clean and Repair
++         *  service with no doc!
++        \*/
++        if (doc->lexer->versionEmitted & VERS_HTML5)
++            TY_(CheckHTML5)( doc, &doc->root );
++        TY_(CheckHTMLTagsAttribsVersions)( doc, &doc->root );
++    }
+ 
+ #if !defined(NDEBUG) && defined(_MSC_VER)
+     SPRTF("All nodes AFTER clean and repair\n");
+-- 
+2.8.1
+
diff -Nru 
tidy-html5-5.2.0/debian/patches/upstream_Set-HAS_FUTIME-0-on-any-GNU-libc-platform.patch
 
tidy-html5-5.2.0/debian/patches/upstream_Set-HAS_FUTIME-0-on-any-GNU-libc-platform.patch
--- 
tidy-html5-5.2.0/debian/patches/upstream_Set-HAS_FUTIME-0-on-any-GNU-libc-platform.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
tidy-html5-5.2.0/debian/patches/upstream_Set-HAS_FUTIME-0-on-any-GNU-libc-platform.patch
    2016-07-30 06:31:35.000000000 +0200
@@ -0,0 +1,27 @@
+From 27143cc88e1d7cda7f08bdc4d78ce68dabf7575c Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.p...@tiscali.it>
+Date: Fri, 24 Jun 2016 23:45:10 +0200
+Subject: [PATCH] Set HAS_FUTIME=0 on any GNU libc platform
+
+GNU libc does not have <sys/utime.h> but <utime.h>, so set HAS_FUTIME=0
+for it; fixes build on non-Linux platforms using GNU libc.
+---
+ include/tidyplatform.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/tidyplatform.h b/include/tidyplatform.h
+index a36039f..d69c0c7 100644
+--- a/include/tidyplatform.h
++++ b/include/tidyplatform.h
+@@ -406,7 +406,7 @@ extern "C" {
+ #if PRESERVE_FILE_TIMES
+ 
+ #ifndef HAS_FUTIME
+-#if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || 
defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || 
defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || 
defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__)
++#if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || 
defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || 
defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || 
defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__) || 
defined(__GLIBC__)
+ #define HAS_FUTIME 0
+ #else
+ #define HAS_FUTIME 1
+-- 
+2.8.1
+

Reply via email to