Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package icingaweb2.

It contains additional patches for PHP 7.3 support. The initial patch
for #914457 only fixed the issues in the icingaweb2 code, the additional
(upstream) patches also fix the issues in the vendor libraries.

The package in unstable also fixes the Icon list in the documentation
module.

The other changes make the package lintian clean.

unblock icingaweb2/2.6.2-3

Kind Regards,

Bas
diff -Nru icingaweb2-2.6.2/debian/changelog icingaweb2-2.6.2/debian/changelog
--- icingaweb2-2.6.2/debian/changelog   2018-11-23 18:36:14.000000000 +0100
+++ icingaweb2-2.6.2/debian/changelog   2019-03-05 10:35:01.000000000 +0100
@@ -1,3 +1,14 @@
+icingaweb2 (2.6.2-3) unstable; urgency=medium
+
+  * Team upload.
+  * Bump Standards-Version to 4.3.0, no changes.
+  * Fix Icons list in 'Developer Style' documentation.
+  * Add upstream patches to fix PHP 7.3 support.
+  * Use .maintscript files instead of dpkg-maintscript-helper directly.
+  * Update lintian override for normalize.css.
+
+ -- Bas Couwenberg <sebas...@debian.org>  Tue, 05 Mar 2019 10:35:01 +0100
+
 icingaweb2 (2.6.2-2) unstable; urgency=medium
 
   * Team upload.
diff -Nru icingaweb2-2.6.2/debian/control icingaweb2-2.6.2/debian/control
--- icingaweb2-2.6.2/debian/control     2018-11-23 18:35:14.000000000 +0100
+++ icingaweb2-2.6.2/debian/control     2018-12-25 23:27:47.000000000 +0100
@@ -8,7 +8,7 @@
                php-cli,
                node-uglify (>= 2) | yui-compressor,
                node-source-map | yui-compressor
-Standards-Version: 4.2.1
+Standards-Version: 4.3.0
 Vcs-Browser: https://salsa.debian.org/nagios-team/pkg-icingaweb2
 Vcs-Git: https://salsa.debian.org/nagios-team/pkg-icingaweb2.git
 Homepage: https://icinga.com
diff -Nru icingaweb2-2.6.2/debian/icingacli.maintscript 
icingaweb2-2.6.2/debian/icingacli.maintscript
--- icingaweb2-2.6.2/debian/icingacli.maintscript       1970-01-01 
01:00:00.000000000 +0100
+++ icingaweb2-2.6.2/debian/icingacli.maintscript       2019-03-05 
10:35:01.000000000 +0100
@@ -0,0 +1 @@
+rm_conffile /etc/bash_completion.d/icingacli 2.4.0-1~
diff -Nru icingaweb2-2.6.2/debian/icingacli.postinst 
icingaweb2-2.6.2/debian/icingacli.postinst
--- icingaweb2-2.6.2/debian/icingacli.postinst  2018-11-23 18:35:14.000000000 
+0100
+++ icingaweb2-2.6.2/debian/icingacli.postinst  1970-01-01 01:00:00.000000000 
+0100
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-dpkg-maintscript-helper rm_conffile \
-   "/etc/bash_completion.d/icingacli" "2.4.0-1~" -- "$@"
-
-#DEBHELPER#
-
-exit 0
diff -Nru icingaweb2-2.6.2/debian/icingacli.postrm 
icingaweb2-2.6.2/debian/icingacli.postrm
--- icingaweb2-2.6.2/debian/icingacli.postrm    2018-11-23 18:35:14.000000000 
+0100
+++ icingaweb2-2.6.2/debian/icingacli.postrm    1970-01-01 01:00:00.000000000 
+0100
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-dpkg-maintscript-helper rm_conffile \
-   "/etc/bash_completion.d/icingacli" "2.4.0-1~" -- "$@"
-
-#DEBHELPER#
-
-exit 0
diff -Nru icingaweb2-2.6.2/debian/icingacli.preinst 
icingaweb2-2.6.2/debian/icingacli.preinst
--- icingaweb2-2.6.2/debian/icingacli.preinst   2018-11-23 18:35:14.000000000 
+0100
+++ icingaweb2-2.6.2/debian/icingacli.preinst   1970-01-01 01:00:00.000000000 
+0100
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-dpkg-maintscript-helper rm_conffile \
-   "/etc/bash_completion.d/icingacli" "2.4.0-1~" -- "$@"
-
-#DEBHELPER#
-
-exit 0
diff -Nru icingaweb2-2.6.2/debian/icingaweb2.install 
icingaweb2-2.6.2/debian/icingaweb2.install
--- icingaweb2-2.6.2/debian/icingaweb2.install  2018-11-23 18:35:15.000000000 
+0100
+++ icingaweb2-2.6.2/debian/icingaweb2.install  2019-03-05 10:19:26.000000000 
+0100
@@ -1,20 +1,21 @@
-public doc                       usr/share/icingaweb2
+public doc                                   usr/share/icingaweb2
 
-application/controllers          usr/share/icingaweb2/application
-application/fonts/fontello-ifont/css 
usr/share/icingaweb2/application/fonts/fontello-ifont
-application/forms                usr/share/icingaweb2/application
-application/layouts              usr/share/icingaweb2/application
-application/views                usr/share/icingaweb2/application
+application/controllers                      usr/share/icingaweb2/application
+application/fonts/fontello-ifont/config.json 
usr/share/icingaweb2/application/fonts/fontello-ifont
+application/fonts/fontello-ifont/css         
usr/share/icingaweb2/application/fonts/fontello-ifont
+application/forms                            usr/share/icingaweb2/application
+application/layouts                          usr/share/icingaweb2/application
+application/views                            usr/share/icingaweb2/application
 
-etc/schema                       usr/share/icingaweb2/etc
+etc/schema                                   usr/share/icingaweb2/etc
 
-packages/files/public/index.php  usr/share/icingaweb2/public
-debian/icingaweb2.conf           etc/apache2/conf-available
+packages/files/public/index.php              usr/share/icingaweb2/public
+debian/icingaweb2.conf                       etc/apache2/conf-available
 
 # TODO: vendor libraries - should be moved to a proper package
-library/vendor/dompdf/*          usr/share/icingaweb2/library/vendor/dompdf
-library/vendor/HTMLPurifier/*    
usr/share/icingaweb2/library/vendor/HTMLPurifier
-library/vendor/HTMLPurifier.*    usr/share/icingaweb2/library/vendor
-library/vendor/JShrink/*.php     usr/share/icingaweb2/library/vendor/JShrink
-library/vendor/lessphp/*.php     usr/share/icingaweb2/library/vendor/lessphp
-library/vendor/Parsedown/*.php   usr/share/icingaweb2/library/vendor/Parsedown
+library/vendor/dompdf/*                      
usr/share/icingaweb2/library/vendor/dompdf
+library/vendor/HTMLPurifier/*                
usr/share/icingaweb2/library/vendor/HTMLPurifier
+library/vendor/HTMLPurifier.*                
usr/share/icingaweb2/library/vendor
+library/vendor/JShrink/*.php                 
usr/share/icingaweb2/library/vendor/JShrink
+library/vendor/lessphp/*.php                 
usr/share/icingaweb2/library/vendor/lessphp
+library/vendor/Parsedown/*.php               
usr/share/icingaweb2/library/vendor/Parsedown
diff -Nru icingaweb2-2.6.2/debian/icingaweb2.lintian-overrides 
icingaweb2-2.6.2/debian/icingaweb2.lintian-overrides
--- icingaweb2-2.6.2/debian/icingaweb2.lintian-overrides        2018-11-23 
18:35:15.000000000 +0100
+++ icingaweb2-2.6.2/debian/icingaweb2.lintian-overrides        2019-03-05 
10:35:01.000000000 +0100
@@ -10,7 +10,7 @@
 
 # Not guarateerd compatible
 embedded-javascript-library * please use libjs-jquery*
-embedded-javascript-library * please use node-normalize.css
+embedded-javascript-library * please use libjs-normalize
 
 # Embedded module documentation
 package-contains-documentation-outside-usr-share-doc usr/share/icingaweb2/doc/*
diff -Nru icingaweb2-2.6.2/debian/patches/break-continue.patch 
icingaweb2-2.6.2/debian/patches/break-continue.patch
--- icingaweb2-2.6.2/debian/patches/break-continue.patch        2018-11-23 
18:35:15.000000000 +0100
+++ icingaweb2-2.6.2/debian/patches/break-continue.patch        2019-03-05 
10:35:01.000000000 +0100
@@ -3,6 +3,7 @@
 Author: Bas Couwenberg <sebas...@debian.org>
 Bug-Debian: https://bugs.debian.org/914457
 Forwarded: https://github.com/Icinga/icingaweb2/pull/3634
+Applied-Upstream: 
https://github.com/Icinga/icingaweb2/commit/8ebf53558093c631402e8e3565b99af3b29a7373
 
 --- a/library/Icinga/Application/Modules/Module.php
 +++ b/library/Icinga/Application/Modules/Module.php
diff -Nru 
icingaweb2-2.6.2/debian/patches/GridChart-Fix-compatibility-issues-with-PHP-7.3.patch
 
icingaweb2-2.6.2/debian/patches/GridChart-Fix-compatibility-issues-with-PHP-7.3.patch
--- 
icingaweb2-2.6.2/debian/patches/GridChart-Fix-compatibility-issues-with-PHP-7.3.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
icingaweb2-2.6.2/debian/patches/GridChart-Fix-compatibility-issues-with-PHP-7.3.patch
       2019-03-05 10:35:01.000000000 +0100
@@ -0,0 +1,15 @@
+Description: GridChart: Fix compatibility issues with PHP 7.3
+Author: Markus Frosch <markus.fro...@icinga.com>
+Origin: 
https://github.com/Icinga/icingaweb2/pull/3637/commits/ecfaf7cedef6801f837dbb082ad420bad98069cc
+
+--- a/library/Icinga/Chart/GridChart.php
++++ b/library/Icinga/Chart/GridChart.php
+@@ -409,7 +409,7 @@ class GridChart extends Chart
+                         );
+                         break;
+                     default:
+-                        continue;
++                        continue 2;
+                 }
+                 $el = $this->setupGraph($graphObj, $graph);
+                 if ($el) {
diff -Nru icingaweb2-2.6.2/debian/patches/series 
icingaweb2-2.6.2/debian/patches/series
--- icingaweb2-2.6.2/debian/patches/series      2018-11-23 18:35:15.000000000 
+0100
+++ icingaweb2-2.6.2/debian/patches/series      2019-03-05 10:35:01.000000000 
+0100
@@ -1 +1,5 @@
 break-continue.patch
+vendor-Update-zf1-for-PHP-7.3.patch
+vendor-Update-JShrink-to-1.3.1.patch
+GridChart-Fix-compatibility-issues-with-PHP-7.3.patch
+vendor-Update-dompdf-to-a-fixed-version-for-PHP-7.3.patch
diff -Nru 
icingaweb2-2.6.2/debian/patches/vendor-Update-dompdf-to-a-fixed-version-for-PHP-7.3.patch
 
icingaweb2-2.6.2/debian/patches/vendor-Update-dompdf-to-a-fixed-version-for-PHP-7.3.patch
--- 
icingaweb2-2.6.2/debian/patches/vendor-Update-dompdf-to-a-fixed-version-for-PHP-7.3.patch
   1970-01-01 01:00:00.000000000 +0100
+++ 
icingaweb2-2.6.2/debian/patches/vendor-Update-dompdf-to-a-fixed-version-for-PHP-7.3.patch
   2019-03-05 10:35:01.000000000 +0100
@@ -0,0 +1,321 @@
+Description: vendor: Update dompdf to a fixed version for PHP 7.3
+ https://github.com/dompdf/dompdf/pull/1854
+Author: Markus Frosch <markus.fro...@icinga.com>
+Origin: 
https://github.com/Icinga/icingaweb2/pull/3637/commits/f4f61dff5b601b0964d457b9c90b94132dea5d02
+
+--- a/library/vendor/dompdf/SOURCE
++++ b/library/vendor/dompdf/SOURCE
+@@ -1,16 +1,26 @@
+-GLOBIGNORE=$0; rm -rf *
++#!/bin/bash
++set -eux
++#GLOBIGNORE=$0; rm -rf *
+ 
+-curl https://codeload.github.com/dompdf/dompdf/tar.gz/v0.8.2 -o 
dompdf-0.8.2.tar.gz
+-tar xzf dompdf-0.8.2.tar.gz --strip-components 1 
dompdf-0.8.2/{lib,src,LICENSE.LGPL}
+-rm dompdf-0.8.2.tar.gz
++#DOMPDF_VERSION=0.8.2
++DOMPDF_VERSION=6a77a427984f97743018ace3e095fbf0edaaee29 # 
https://github.com/dompdf/dompdf/pull/1854
++
++PHP_FONTLIB_VERSION=0.5.1
++PHP_SVGLIB_VERSION=0.3.2
++
++rm -rf lib/ src/
++
++curl -LsS https://github.com/dompdf/dompdf/archive/"$DOMPDF_VERSION".tar.gz 
-o /tmp/dompdf.tar.gz
++tar xf /tmp/dompdf.tar.gz --strip-components 1 
dompdf-"$DOMPDF_VERSION"/{lib,src,LICENSE.LGPL}
++rm /tmp/dompdf.tar.gz
+ mv LICENSE.LGPL LICENSE
+ 
+-curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.5.1 -o 
php-font-lib-0.5.1.tar.gz
+-mkdir -p lib/php-font-lib
+-tar xzf php-font-lib-0.5.1.tar.gz --strip-components 1 -C lib/php-font-lib 
php-font-lib-0.5.1/{src,LICENSE}
+-rm php-font-lib-0.5.1.tar.gz
+-
+-curl https://codeload.github.com/PhenX/php-svg-lib/tar.gz/v0.3.2 -o 
php-svg-lib-0.3.2.tar.gz
+-mkdir -p lib/php-svg-lib
+-tar xzf php-svg-lib-0.3.2.tar.gz --strip-components 1 -C lib/php-svg-lib 
php-svg-lib-0.3.2/src
+-rm php-svg-lib-0.3.2.tar.gz
++curl -LsS 
https://github.com/PhenX/php-font-lib/archive/"$PHP_FONTLIB_VERSION".tar.gz -o 
/tmp/php-font-lib.tar.gz
++[ -d lib/php-font-lib ] || mkdir -p lib/php-font-lib
++tar xf /tmp/php-font-lib.tar.gz --strip-components 1 -C lib/php-font-lib 
php-font-lib-"$PHP_FONTLIB_VERSION"/{src,LICENSE}
++rm /tmp/php-font-lib.tar.gz
++
++curl -LsS 
https://github.com/PhenX/php-svg-lib/archive/v"$PHP_SVGLIB_VERSION".tar.gz -o 
/tmp/php-svg-lib.tar.gz
++[ -d lib/php-svg-lib ] || mkdir -p lib/php-svg-lib
++tar xf /tmp/php-svg-lib.tar.gz --strip-components 1 -C lib/php-svg-lib 
php-svg-lib-"$PHP_SVGLIB_VERSION"/src
++rm /tmp/php-svg-lib.tar.gz
+--- a/library/vendor/dompdf/lib/Cpdf.php
++++ b/library/vendor/dompdf/lib/Cpdf.php
+@@ -464,28 +464,28 @@ class Cpdf
+                         // Named with limited valid values
+                         case 'NonFullScreenPageMode':
+                             if (!in_array($v, array('UseNone', 'UseOutlines', 
'UseThumbs', 'UseOC'))) {
+-                                continue;
++                                continue 2;
+                             }
+                             $o['info'][$k] = $v;
+                             break;
+ 
+                         case 'Direction':
+                             if (!in_array($v, array('L2R', 'R2L'))) {
+-                                continue;
++                                continue 2;
+                             }
+                             $o['info'][$k] = $v;
+                             break;
+ 
+                         case 'PrintScaling':
+                             if (!in_array($v, array('None', 'AppDefault'))) {
+-                                continue;
++                                continue 2;
+                             }
+                             $o['info'][$k] = $v;
+                             break;
+ 
+                         case 'Duplex':
+                             if (!in_array($v, array('None', 'AppDefault'))) {
+-                                continue;
++                                continue 2;
+                             }
+                             $o['info'][$k] = $v;
+                             break;
+@@ -4801,12 +4801,12 @@ EOT;
+         imagesavealpha($img, false);
+ 
+         // create temp alpha file
+-        $tempfile_alpha = tempnam($this->tmp, "cpdf_img_");
++        $tempfile_alpha = @tempnam($this->tmp, "cpdf_img_");
+         @unlink($tempfile_alpha);
+         $tempfile_alpha = "$tempfile_alpha.png";
+ 
+         // create temp plain file
+-        $tempfile_plain = tempnam($this->tmp, "cpdf_img_");
++        $tempfile_plain = @tempnam($this->tmp, "cpdf_img_");
+         @unlink($tempfile_plain);
+         $tempfile_plain = "$tempfile_plain.png";
+ 
+--- a/library/vendor/dompdf/src/Adapter/CPDF.php
++++ b/library/vendor/dompdf/src/Adapter/CPDF.php
+@@ -562,6 +562,25 @@ class CPDF implements Canvas
+     }
+ 
+     /**
++     * Draw line at the specified coordinates on every page.
++     *
++     * See {@link Style::munge_color()} for the format of the colour array.
++     *
++     * @param float $x1
++     * @param float $y1
++     * @param float $x2
++     * @param float $y2
++     * @param array $color
++     * @param float $width
++     * @param array $style optional
++     */
++    public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = 
array())
++    {
++        $_t = 'line';
++        $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 
'width', 'style');
++    }
++
++    /**
+      * @param float $x
+      * @param float $y
+      * @param float $r1
+@@ -608,7 +627,7 @@ class CPDF implements Canvas
+             imageinterlace($im, false);
+ 
+             $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
+-            $tmp_name = tempnam($tmp_dir, "{$type}dompdf_img_");
++            $tmp_name = @tempnam($tmp_dir, "{$type}dompdf_img_");
+             @unlink($tmp_name);
+             $filename = "$tmp_name.png";
+             $this->_image_cache[] = $filename;
+@@ -1092,6 +1111,10 @@ class CPDF implements Canvas
+                         }
+                         $eval->evaluate($code, array('PAGE_NUM' => 
$page_number, 'PAGE_COUNT' => $this->_page_count));
+                         break;
++
++                    case 'line':
++                        $this->line( $x1, $y1, $x2, $y2, $color, $width, 
$style );
++                        break;
+                 }
+             }
+ 
+--- a/library/vendor/dompdf/src/Adapter/GD.php
++++ b/library/vendor/dompdf/src/Adapter/GD.php
+@@ -729,7 +729,7 @@ class GD implements Canvas
+         $func_name = "imagecreatefrom$img_type";
+         if (!function_exists($func_name)) {
+             if (!method_exists("Dompdf\Helpers", $func_name)) {
+-                throw new \Exception("Function $func_name() not found.  
Cannot convert $type image: $img_url.  Please install the image PHP 
extension.");
++                throw new \Exception("Function $func_name() not found.  
Cannot convert $img_type image: $img_url.  Please install the image PHP 
extension.");
+             }
+             $func_name = "\\Dompdf\\Helpers::" . $func_name;
+         }
+@@ -977,6 +977,11 @@ class GD implements Canvas
+     {
+         // N/A
+     }
++
++    public function page_line()
++    {
++        // N/A
++    }
+ 
+     /**
+      * Streams the image to the client.
+--- a/library/vendor/dompdf/src/Adapter/PDFLib.php
++++ b/library/vendor/dompdf/src/Adapter/PDFLib.php
+@@ -208,7 +208,7 @@ class PDFLib implements Canvas
+             $this->_pdf->begin_document("", "");
+         } else {
+             $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
+-            $tmp_name = tempnam($tmp_dir, "libdompdf_pdf_");
++            $tmp_name = @tempnam($tmp_dir, "libdompdf_pdf_");
+             @unlink($tmp_name);
+             $this->_file = "$tmp_name.pdf";
+             $this->_pdf->begin_document($this->_file, "");
+@@ -763,6 +763,25 @@ class PDFLib implements Canvas
+     }
+ 
+     /**
++     * Draw line at the specified coordinates on every page.
++     *
++     * See {@link Style::munge_color()} for the format of the colour array.
++     *
++     * @param float $x1
++     * @param float $y1
++     * @param float $x2
++     * @param float $y2
++     * @param array $color
++     * @param float $width
++     * @param array $style optional
++     */
++    public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = 
array())
++    {
++        $_t = 'line';
++        $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 
'width', 'style');
++    }
++
++    /**
+      * @param float $x1
+      * @param float $y1
+      * @param float $r1
+@@ -1259,6 +1278,11 @@ class PDFLib implements Canvas
+                         }
+                         $eval->evaluate($code, array('PAGE_NUM' => $p, 
'PAGE_COUNT' => $this->_page_count));
+                         break;
++
++                    case 'line':
++                        $this->line( $x1, $y1, $x2, $y2, $color, $width, 
$style );
++                        break;
++
+                 }
+             }
+ 
+--- a/library/vendor/dompdf/src/Css/Stylesheet.php
++++ b/library/vendor/dompdf/src/Css/Stylesheet.php
+@@ -1357,7 +1357,7 @@ class Stylesheet
+                                 $key = $page_selector;
+ 
+                             default:
+-                                continue;
++                                continue 3;
+                         }
+ 
+                         // Store the style for later...
+--- a/library/vendor/dompdf/src/Dompdf.php
++++ b/library/vendor/dompdf/src/Dompdf.php
+@@ -368,7 +368,7 @@ class Dompdf
+ 
+             $ext = strtolower(pathinfo($realfile, PATHINFO_EXTENSION));
+             if (!in_array($ext, $this->allowedLocalFileExtensions)) {
+-                throw new Exception("Permission denied on $file.");
++                throw new Exception("Permission denied on $file. This file 
extension is forbidden");
+             }
+ 
+             if (!$realfile) {
+@@ -607,7 +607,7 @@ class Dompdf
+                             if (!$accept) {
+                                 //found at least one mediatype, but none of 
the accepted ones
+                                 //Skip this css file.
+-                                continue;
++                                continue 2;
+                             }
+                         }
+ 
+@@ -628,7 +628,7 @@ class Dompdf
+                         ($media = $tag->getAttribute("media")) &&
+                         !in_array($media, $acceptedmedia)
+                     ) {
+-                        continue;
++                        continue 2;
+                     }
+ 
+                     $css = "";
+@@ -945,7 +945,7 @@ class Dompdf
+      *
+      * @param array $options options (see above)
+      *
+-     * @return string
++     * @return string|null
+      */
+     public function output($options = array())
+     {
+--- a/library/vendor/dompdf/src/FontMetrics.php
++++ b/library/vendor/dompdf/src/FontMetrics.php
+@@ -186,7 +186,7 @@ class FontMetrics
+         $fontDir = $this->getOptions()->getFontDir();
+         $remoteHash = md5($remoteFile);
+         $localFile = $fontDir . DIRECTORY_SEPARATOR . $remoteHash;
+-        $localTempFile = tempnam($this->options->get("tempDir"), 
"dompdf-font-");
++        $localTempFile = @tempnam($this->options->get("tempDir"), 
"dompdf-font-");
+ 
+         $cacheEntry = $localFile;
+         $localFile .= ".".strtolower(pathinfo(parse_url($remoteFile, 
PHP_URL_PATH),PATHINFO_EXTENSION));
+--- a/library/vendor/dompdf/src/FrameDecorator/Page.php
++++ b/library/vendor/dompdf/src/FrameDecorator/Page.php
+@@ -515,7 +515,7 @@ class Page extends AbstractFrameDecorato
+         // parents of $frame must fit on the page as well:
+         $p = $frame->get_parent();
+         while ($p) {
+-            $max_y += $p->get_style()->computed_bottom_spacing();
++            $max_y += (float) $p->get_style()->computed_bottom_spacing();
+             $p = $p->get_parent();
+         }
+ 
+--- a/library/vendor/dompdf/src/Image/Cache.php
++++ b/library/vendor/dompdf/src/Image/Cache.php
+@@ -88,7 +88,7 @@ class Cache
+                     } // From remote
+                     else {
+                         $tmp_dir = $dompdf->getOptions()->getTempDir();
+-                        $resolved_url = tempnam($tmp_dir, "ca_dompdf_img_");
++                        $resolved_url = @tempnam($tmp_dir, "ca_dompdf_img_");
+                         $image = "";
+ 
+                         if ($data_uri) {
+--- a/library/vendor/dompdf/src/Renderer/AbstractRenderer.php
++++ b/library/vendor/dompdf/src/Renderer/AbstractRenderer.php
+@@ -401,7 +401,7 @@ abstract class AbstractRenderer
+             $this->_canvas->get_cpdf()->addImagePng($filedummy, $x, 
$this->_canvas->get_height() - $y - $height, $width, $height, $bg);
+         } else {
+             $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
+-            $tmp_name = tempnam($tmp_dir, "bg_dompdf_img_");
++            $tmp_name = @tempnam($tmp_dir, "bg_dompdf_img_");
+             @unlink($tmp_name);
+             $tmp_file = "$tmp_name.png";
+ 
+--- a/library/vendor/dompdf/src/Renderer/Text.php
++++ b/library/vendor/dompdf/src/Renderer/Text.php
+@@ -137,7 +137,7 @@ class Text extends AbstractRenderer
+ 
+             switch ($text_deco) {
+                 default:
+-                    continue;
++                    continue 2;
+ 
+                 case "underline":
+                     $deco_y += $base - $descent + $underline_offset + 
$line_thickness / 2;
diff -Nru icingaweb2-2.6.2/debian/patches/vendor-Update-JShrink-to-1.3.1.patch 
icingaweb2-2.6.2/debian/patches/vendor-Update-JShrink-to-1.3.1.patch
--- icingaweb2-2.6.2/debian/patches/vendor-Update-JShrink-to-1.3.1.patch        
1970-01-01 01:00:00.000000000 +0100
+++ icingaweb2-2.6.2/debian/patches/vendor-Update-JShrink-to-1.3.1.patch        
2019-03-05 10:35:01.000000000 +0100
@@ -0,0 +1,64 @@
+Description: vendor: Update JShrink to 1.3.1
+ This fixes mainly problems with PHP 7.3.
+Author: Markus Frosch <markus.fro...@icinga.com>
+Origin: 
https://github.com/Icinga/icingaweb2/pull/3637/commits/87e81e6b3ae87d30a975ed193531d3f483932a5b
+
+--- a/library/vendor/JShrink/Minifier.php
++++ b/library/vendor/JShrink/Minifier.php
+@@ -183,7 +183,7 @@ class Minifier
+                 // new lines
+                 case "\n":
+                     // if the next line is something that can't stand alone 
preserve the newline
+-                    if (strpos('(-+[@', $this->b) !== false) {
++                    if ($this->b !== false && strpos('(-+[@', $this->b) !== 
false) {
+                         echo $this->a;
+                         $this->saveString();
+                         break;
+@@ -231,7 +231,7 @@ class Minifier
+                             // check for some regex that breaks stuff
+                             if ($this->a === '/' && ($this->b === '\'' || 
$this->b === '"')) {
+                                 $this->saveRegex();
+-                                continue;
++                                continue 3;
+                             }
+ 
+                             echo $this->a;
+@@ -274,9 +274,8 @@ class Minifier
+         if (isset($this->c)) {
+             $char = $this->c;
+             unset($this->c);
+-
+-            // Otherwise we start pulling from the input.
+         } else {
++            // Otherwise we start pulling from the input.
+             $char = substr($this->input, $this->index, 1);
+ 
+             // If the next character doesn't exist return false.
+@@ -459,11 +458,8 @@ class Minifier
+         echo $this->a;
+ 
+         // Loop until the string is done
+-        while (true) {
+-
+-            // Grab the very next character and load it into a
+-            $this->a = $this->getChar();
+-
++        // Grab the very next character and load it into a
++        while (($this->a = $this->getChar()) !== false) {
+             switch ($this->a) {
+ 
+                 // If the string opener (single or double quote) is used
+--- a/library/vendor/JShrink/SOURCE
++++ b/library/vendor/JShrink/SOURCE
+@@ -1,4 +1,7 @@
+-curl https://codeload.github.com/tedious/JShrink/tar.gz/v1.3.0 -o 
JShrink-1.3.0.tar.gz
+-tar xzf JShrink-1.3.0.tar.gz --strip-components 1 JShrink-1.3.0/LICENSE
+-tar xzf JShrink-1.3.0.tar.gz --strip-components 3 
JShrink-1.3.0/src/JShrink/Minifier.php
+-rm JShrink-1.3.0.tar.gz
++#!/bin/bash
++set -eux
++VERSION=1.3.1
++curl -LsS https://github.com/tedious/JShrink/archive/v"$VERSION".tar.gz -o 
/tmp/JShrink.tar.gz
++tar xzf /tmp/JShrink.tar.gz --strip-components 1 JShrink-"$VERSION"/LICENSE
++tar xzf /tmp/JShrink.tar.gz --strip-components 3 
JShrink-"$VERSION"/src/JShrink/Minifier.php
++rm /tmp/JShrink.tar.gz
diff -Nru icingaweb2-2.6.2/debian/patches/vendor-Update-zf1-for-PHP-7.3.patch 
icingaweb2-2.6.2/debian/patches/vendor-Update-zf1-for-PHP-7.3.patch
--- icingaweb2-2.6.2/debian/patches/vendor-Update-zf1-for-PHP-7.3.patch 
1970-01-01 01:00:00.000000000 +0100
+++ icingaweb2-2.6.2/debian/patches/vendor-Update-zf1-for-PHP-7.3.patch 
2019-03-05 10:35:01.000000000 +0100
@@ -0,0 +1,48 @@
+Description: vendor: Update zf1 for PHP 7.3
+Author: Markus Frosch <markus.fro...@icinga.com>
+Origin: 
https://github.com/Icinga/icingaweb2/pull/3645/commits/113a10481ba5c60c16a3f6740c4ba925920a4947
+
+--- a/library/vendor/Zend/Form.php
++++ b/library/vendor/Zend/Form.php
+@@ -1159,7 +1159,7 @@ class Zend_Form implements Iterator, Cou
+                 } else {
+                     switch ($argc) {
+                         case 0:
+-                            continue;
++                            continue 2;
+                         case (1 <= $argc):
+                             $type = array_shift($spec);
+                         case (2 <= $argc):
+@@ -1664,7 +1664,7 @@ class Zend_Form implements Iterator, Cou
+      */
+     public function addSubForms(array $subForms)
+     {
+-        foreach ($subForms as $key => $spec) {          
++        foreach ($subForms as $key => $spec) {
+             $name = (string) $key;
+             if ($spec instanceof Zend_Form) {
+                 $this->addSubForm($spec, $name);
+@@ -1676,7 +1676,7 @@ class Zend_Form implements Iterator, Cou
+                 $order = null;
+                 switch ($argc) {
+                     case 0:
+-                        continue;
++                        continue 2;
+                     case (1 <= $argc):
+                         $subForm = array_shift($spec);
+ 
+--- a/library/vendor/Zend/README.md
++++ b/library/vendor/Zend/README.md
+@@ -1,6 +1,6 @@
+ # icingaweb2-vendor-zf1
+ 
+-icingaweb2-vendor-zf1 is [Icinga Web 
2](https://icinga.com/products/icinga-web-2/)'s fork of
++icingaweb2-vendor-zf1 is [Icinga Web 
2](https://www.icinga.org/products/icinga-web-2/)'s fork of
+ [Zend Framework](https://framework.zend.com/) 1 which is
+ [end-of-life](https://framework.zend.com/blog/2016-06-28-zf1-eol.html) since 
Sep 28, 2016.
+ We've reduced the library to the minimum required by Icinga Web 2 and its 
modules.
+--- a/library/vendor/Zend/VERSION
++++ b/library/vendor/Zend/VERSION
+@@ -1 +1 @@
+-v1.12.20
++v1.12.20-23-gc1f645550
diff -Nru icingaweb2-2.6.2/debian/rules icingaweb2-2.6.2/debian/rules
--- icingaweb2-2.6.2/debian/rules       2018-11-23 18:35:15.000000000 +0100
+++ icingaweb2-2.6.2/debian/rules       2019-03-05 10:35:01.000000000 +0100
@@ -40,7 +40,8 @@
              
debian/*/usr/share/icingaweb2/library/vendor/dompdf/lib/fonts/DejaVuSerif-Italic.ttf
 
        # Remove executable bit
-       chmod -x debian/*/usr/share/icingaweb2/public/font/ifont.* \
-                
debian/*/usr/share/icingaweb2/library/vendor/HTMLPurifier/DefinitionCache/Serializer/README
+       chmod -x 
debian/*/usr/share/icingaweb2/application/fonts/fontello-ifont/config.json \
+                
debian/*/usr/share/icingaweb2/library/vendor/HTMLPurifier/DefinitionCache/Serializer/README
 \
+                debian/*/usr/share/icingaweb2/public/font/ifont.*
 
 # vi: ts=4 sw=4 noexpandtab :

Reply via email to