[pkg-nagios-changes] [Git][nagios-team/pkg-icingaweb2][master] 2 commits: Add upstream patch for PHP 7.2 support.

Bas Couwenberg gitlab at salsa.debian.org
Tue May 8 07:02:03 BST 2018


Bas Couwenberg pushed to branch master at Debian Nagios Maintainer Group / pkg-icingaweb2


Commits:
5804954d by Bas Couwenberg at 2018-05-08T07:56:28+02:00
Add upstream patch for PHP 7.2 support.

- - - - -
2b81a1c4 by Bas Couwenberg at 2018-05-08T07:56:54+02:00
Set distribution to experimental.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0001-Don-t-call-session_start-after-ini_set.patch
- + debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+icingaweb2 (2.5.3-1~exp3) experimental; urgency=medium
+
+  * Team upload.
+  * Add upstream patch for PHP 7.2 support.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 08 May 2018 07:56:36 +0200
+
 icingaweb2 (2.5.3-1~exp2) experimental; urgency=medium
 
   * Team upload.


=====================================
debian/patches/0001-Don-t-call-session_start-after-ini_set.patch
=====================================
--- /dev/null
+++ b/debian/patches/0001-Don-t-call-session_start-after-ini_set.patch
@@ -0,0 +1,91 @@
+Description: Don't call session_start() after ini_set()
+Author: "Alexander A. Klimov" <alexander.klimov at icinga.com>
+Origin: https://github.com/Icinga/icingaweb2/pull/3315/commits/dadd2c80f6819111f25e3799c072ec39c991897e
+Bug: https://github.com/Icinga/icingaweb2/issues/3185
+
+--- a/library/Icinga/Web/Session.php
++++ b/library/Icinga/Web/Session.php
+@@ -29,7 +29,7 @@ class Session
+     public static function create(BaseSession $session = null)
+     {
+         if ($session === null) {
+-            self::$session = new PhpSession();
++            self::$session = PhpSession::create();
+         } else {
+             self::$session = $session;
+         }
+--- /dev/null
++++ b/library/Icinga/Web/Session/Php72Session.php
+@@ -0,0 +1,37 @@
++<?php
++/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */
++
++namespace Icinga\Web\Session;
++
++use Icinga\Application\Logger;
++use Icinga\Exception\ConfigurationError;
++use Icinga\Web\Cookie;
++
++/**
++ * Session implementation in PHP
++ */
++class Php72Session extends PhpSession
++{
++    /**
++     * Open a PHP session
++     */
++    protected function open()
++    {
++        session_name($this->sessionName);
++
++        $cookie = new Cookie('bogus');
++        session_set_cookie_params(
++            0,
++            $cookie->getPath(),
++            $cookie->getDomain(),
++            $cookie->isSecure(),
++            true
++        );
++
++        session_start(array(
++            'use_cookies'       => true,
++            'use_only_cookies'  => true,
++            'use_trans_sid'     => false
++        ));
++    }
++}
+--- a/library/Icinga/Web/Session/PhpSession.php
++++ b/library/Icinga/Web/Session/PhpSession.php
+@@ -38,6 +38,21 @@ class PhpSession extends Session
+      *
+      * @param   array   $options    An optional array of ini options to set
+      *
++     * @return  static
++     *
++     * @throws  ConfigurationError
++     * @see     http://php.net/manual/en/session.configuration.php
++     */
++    public static function create(array $options = null)
++    {
++        return version_compare(PHP_VERSION, '7.2.0') < 0 ? new self($options) : new Php72Session($options);
++    }
++
++    /**
++     * Create a new PHPSession object using the provided options (if any)
++     *
++     * @param   array   $options    An optional array of ini options to set
++     *
+      * @throws  ConfigurationError
+      * @see     http://php.net/manual/en/session.configuration.php
+      */
+--- a/test/php/library/Icinga/Web/Session/PhpSessionTest.php
++++ b/test/php/library/Icinga/Web/Session/PhpSessionTest.php
+@@ -13,7 +13,7 @@ class PhpSessionTest extends BaseTestCas
+         if (!is_writable('/tmp')) {
+             $this->markTestSkipped('Could not write to session directory');
+         }
+-        return new PhpSession(
++        return PhpSession::create(
+             array(
+                 'use_cookies'   => false,
+                 'save_path'     => '/tmp',


=====================================
debian/patches/series
=====================================
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Don-t-call-session_start-after-ini_set.patch



View it on GitLab: https://salsa.debian.org/nagios-team/pkg-icingaweb2/compare/1edbf429cffddb50de8ea61ad53aaae12f743863...2b81a1c4b8ec002731fef739664beb42db7d8bf6

---
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-icingaweb2/compare/1edbf429cffddb50de8ea61ad53aaae12f743863...2b81a1c4b8ec002731fef739664beb42db7d8bf6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20180508/52737415/attachment-0001.html>


More information about the pkg-nagios-changes mailing list