aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-07-29 13:28:04 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-07-29 13:28:04 +0300
commit84b428d383665f6c45eaba85be37eb7e9c944b0e (patch)
treee64cea8c8761602b47ed2e68425e1a1429e5267c
parent46716ae53b90f8c6c4c523bf2f65b783adb69003 (diff)
downloadnixsap-84b428d383665f6c45eaba85be37eb7e9c944b0e.tar.gz
IcingaWeb2: 2.5.3 -> 2.6.0
-rw-r--r--modules/pkgs/icingaweb2/default.nix5
-rw-r--r--modules/pkgs/icingaweb2/php72.patch109
2 files changed, 2 insertions, 112 deletions
diff --git a/modules/pkgs/icingaweb2/default.nix b/modules/pkgs/icingaweb2/default.nix
index d28f15d..40aebb0 100644
--- a/modules/pkgs/icingaweb2/default.nix
+++ b/modules/pkgs/icingaweb2/default.nix
@@ -3,17 +3,16 @@
}:
stdenv.mkDerivation rec {
- version = "2.5.3";
+ version = "2.6.0";
name = "icingaweb2-${version}";
src = fetchurl {
url = "https://github.com/Icinga/icingaweb2/archive/v${version}.tar.gz";
- sha256 = "14k5rn09v2ww71x6d8p9rh980nwsmwan2gff0b82dvcmb02576fs";
+ sha256 = "1m0gi8zbrag4jwdcqicq5bb3s07z7kz0fg41a22cbqlgx6adivaa";
};
patches = [
./sproxy.patch
- ./php72.patch
];
buildPhase = "true";
diff --git a/modules/pkgs/icingaweb2/php72.patch b/modules/pkgs/icingaweb2/php72.patch
deleted file mode 100644
index ace8d96..0000000
--- a/modules/pkgs/icingaweb2/php72.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From dadd2c80f6819111f25e3799c072ec39c991897e Mon Sep 17 00:00:00 2001
-From: "Alexander A. Klimov" <alexander.klimov@icinga.com>
-Date: Wed, 24 Jan 2018 17:38:20 +0100
-Subject: [PATCH] Don't call session_start() after ini_set()
-
-refs #3185
----
- library/Icinga/Web/Session.php | 2 +-
- library/Icinga/Web/Session/Php72Session.php | 37 ++++++++++++++++++++++
- library/Icinga/Web/Session/PhpSession.php | 15 +++++++++
- .../library/Icinga/Web/Session/PhpSessionTest.php | 2 +-
- 4 files changed, 54 insertions(+), 2 deletions(-)
- create mode 100644 library/Icinga/Web/Session/Php72Session.php
-
-diff --git a/library/Icinga/Web/Session.php b/library/Icinga/Web/Session.php
-index e6f7218ad2..40df89f9e4 100644
---- 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;
- }
-diff --git a/library/Icinga/Web/Session/Php72Session.php b/library/Icinga/Web/Session/Php72Session.php
-new file mode 100644
-index 0000000000..e6a6b19197
---- /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
-+ ));
-+ }
-+}
-diff --git a/library/Icinga/Web/Session/PhpSession.php b/library/Icinga/Web/Session/PhpSession.php
-index e00544cf9b..36dd84e9dd 100644
---- a/library/Icinga/Web/Session/PhpSession.php
-+++ b/library/Icinga/Web/Session/PhpSession.php
-@@ -33,6 +33,21 @@ class PhpSession extends Session
- */
- protected $sessionName = 'Icingaweb2';
-
-+ /**
-+ * Create a new PHPSession object using the provided options (if any)
-+ *
-+ * @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)
- *
-diff --git a/test/php/library/Icinga/Web/Session/PhpSessionTest.php b/test/php/library/Icinga/Web/Session/PhpSessionTest.php
-index d835fb034c..224e984621 100644
---- a/test/php/library/Icinga/Web/Session/PhpSessionTest.php
-+++ b/test/php/library/Icinga/Web/Session/PhpSessionTest.php
-@@ -13,7 +13,7 @@ private function getSession()
- 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',