commit icingaweb2 for openSUSE:Factory
Hello community, here is the log from the commit of package icingaweb2 for openSUSE:Factory checked in at 2018-05-29 10:40:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/icingaweb2 (Old) and /work/SRC/openSUSE:Factory/.icingaweb2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "icingaweb2" Tue May 29 10:40:02 2018 rev:4 rq:611412 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/icingaweb2/icingaweb2.changes 2018-04-30 22:58:08.738197391 +0200 +++ /work/SRC/openSUSE:Factory/.icingaweb2.new/icingaweb2.changes 2018-05-29 10:40:09.651031554 +0200 @@ -1,0 +2,6 @@ +Tue May 22 20:47:34 UTC 2018 - dev@stellardeath.org + +- Backport of fix for PHP 7.2 (upstream git commit dadd2c80f) + * 0001-Don-t-call-session_start-after-ini_set.patch + +------------------------------------------------------------------- New: ---- 0001-Don-t-call-session_start-after-ini_set.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ icingaweb2.spec ++++++ --- /var/tmp/diff_new_pack.r70P97/_old 2018-05-29 10:40:12.258935284 +0200 +++ /var/tmp/diff_new_pack.r70P97/_new 2018-05-29 10:40:12.262935137 +0200 @@ -1,6 +1,7 @@ # # spec file for package icingaweb2 # +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2013-2015 Icinga Development Team | GPLv2+ # # All modifications and additions to the file contributed by third parties @@ -15,17 +16,19 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define sversion 2.5.3 Name: icingaweb2 Version: 2.5.3 Release: 0 -License: GPL-2.0+ and MIT and BSD-3-Clause Summary: Icinga Web 2 -Url: https://icinga.org +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause Group: System/Monitoring +Url: https://icinga.org Source: https://github.com/Icinga/icingaweb2/archive/v%{sversion}.tar.gz Source99: %{name}-rpmlintrc +Patch0: 0001-Don-t-call-session_start-after-ini_set.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -43,9 +46,9 @@ BuildRequires: user(wwwrun) Requires(pre): user(wwwrun) %endif -BuildRequires: nagios-rpm-macros -BuildRequires: fdupes BuildRequires: apache2-devel +BuildRequires: fdupes +BuildRequires: nagios-rpm-macros %define wwwconfigdir %{_sysconfdir}/apache2/conf.d %define wwwdir %{_sysconfdir}/apache2 %define wwwuser wwwrun @@ -83,6 +86,7 @@ %package common Summary: Common files for Icinga Web 2 and the Icinga CLI +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause Group: System/Monitoring %{?amzn:Requires(pre): shadow-utils} %{?fedora:Requires(pre): shadow-utils} @@ -95,6 +99,7 @@ %package -n php-Icinga Summary: PHP bindings for Icinga +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause Group: Development/Libraries/PHP Requires: %{php} >= 5.6.0 Requires: %{php}-gd @@ -112,6 +117,7 @@ %package icingacli Summary: Icinga2 CLI +License: GPL-2.0-or-later AND MIT AND BSD-3-Clause Group: System/Monitoring Requires: %{name}-common = %{version} Requires: php-Icinga = %{version} @@ -125,9 +131,9 @@ %package vendor-dompdf Version: 0.6.1 -Release: 1 -License: LGPL-2.1 +Release: 0 Summary: Vendor lib dompdf for Icinga Web 2 +License: LGPL-2.1-only Group: System/Monitoring Requires: %{php} >= 5.6.0 @@ -136,9 +142,9 @@ %package vendor-HTMLPurifier Version: 4.6.0 -Release: 1 -License: LGPL-2.1 +Release: 0 Summary: Vendor lib HTMLPurifier for Icinga Web 2 +License: LGPL-2.1-only Group: System/Monitoring Requires: %{php} >= 5.6.0 @@ -147,9 +153,9 @@ %package vendor-JShrink Version: 1.0.1 -Release: 1 -License: BSD-3-Clause +Release: 0 Summary: Vendor lib JShrink for Icinga Web 2 +License: BSD-3-Clause Group: System/Monitoring Requires: %{php} >= 5.6.0 @@ -158,9 +164,9 @@ %package vendor-lessphp Version: 0.4.0 -Release: 1 -License: MIT +Release: 0 Summary: Vendor lib lessphp for Icinga Web 2 +License: MIT Group: System/Monitoring Requires: %{php} >= 5.6.0 @@ -169,9 +175,9 @@ %package vendor-Parsedown Version: 1.0.0 -Release: 1 -License: MIT +Release: 0 Summary: Vendor lib Parsedown for Icinga Web 2 +License: MIT Group: System/Monitoring Requires: %{php} >= 5.6.0 @@ -180,9 +186,9 @@ %package vendor-zf1 Version: 1.12.20 -Release: 1 -License: MIT +Release: 0 Summary: Vendor lib zf1 for Icinga Web 2 +License: MIT Group: System/Monitoring Requires: %{php} >= 5.6.0 @@ -191,6 +197,7 @@ %prep %setup -q -n %{name}-%{sversion} +%patch0 -p1 # rpmlint chmod -x ./library/vendor/HTMLPurifier/DefinitionCache/Serializer/README find . -type f -name *svg | xargs chmod -x @@ -257,11 +264,9 @@ %{docsdir} %docdir %{docsdir} - %pre common getent group %{icingawebgroup} >/dev/null || groupadd -r %{icingawebgroup} - %files common -f icinga.lang %defattr(-,root,root) %{basedir}/application/locale @@ -273,20 +278,17 @@ %attr(0770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir} %attr(0770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules - %files -n php-Icinga %defattr(-,root,root) %dir %{phpdir} %{phpdir}/Icinga - %files icingacli %defattr(-,root,root) %{basedir}/application/clicommands %config %{_sysconfdir}/bash_completion.d/icingacli %attr(0755,root,root) %{bindir}/icingacli - %files vendor-dompdf %defattr(-,root,root) %{basedir}/library/vendor/dompdf ++++++ 0001-Don-t-call-session_start-after-ini_set.patch ++++++
From dadd2c80f6819111f25e3799c072ec39c991897e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov"
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 e6f7218ad..40df89f9e 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 000000000..e6a6b1919 --- /dev/null +++ b/library/Icinga/Web/Session/Php72Session.php @@ -0,0 +1,37 @@ +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 e00544cf9..36dd84e9d 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 d835fb034..224e98462 100644 --- 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 BaseTestCase 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', -- 2.16.3
participants (1)
-
root@hilbert.suse.de