[pkg-nagios-changes] [Git][nagios-team/icinga-php-library][master] 3 commits: Add upstream patch to fix exceptions with Icinga DB.
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Sun Jul 3 16:18:09 BST 2022
Bas Couwenberg pushed to branch master at Debian Nagios Maintainer Group / icinga-php-library
Commits:
6ce7e474 by Bas Couwenberg at 2022-07-03T17:06:57+02:00
Add upstream patch to fix exceptions with Icinga DB.
- - - - -
949a08cd by Bas Couwenberg at 2022-07-03T17:12:14+02:00
Update lintian overrides.
- - - - -
218fd493 by Bas Couwenberg at 2022-07-03T17:12:14+02:00
Set distribution to unstable.
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/pr68-Binary-behavior-Return-non-resource-as-is.patch
- + debian/patches/series
- debian/source/lintian-overrides
Changes:
=====================================
debian/changelog
=====================================
@@ -1,8 +1,10 @@
-icinga-php-library (0.9.0-2) UNRELEASED; urgency=medium
+icinga-php-library (0.9.0-2) unstable; urgency=medium
* Bump Standards-Version to 4.6.1, no changes.
+ * Add upstream patch to fix exceptions with Icinga DB.
+ * Update lintian overrides.
- -- Bas Couwenberg <sebastic at debian.org> Tue, 21 Jun 2022 07:27:39 +0200
+ -- Bas Couwenberg <sebastic at debian.org> Sun, 03 Jul 2022 17:06:58 +0200
icinga-php-library (0.9.0-1) unstable; urgency=medium
=====================================
debian/patches/pr68-Binary-behavior-Return-non-resource-as-is.patch
=====================================
@@ -0,0 +1,36 @@
+Description: Binary behavior: Return non-resource as is
+ Otherwise the behavior throws an exception because it requires a
+ resource in fromDb(). This was created with the background that values
+ are only retrieved from the database via PDO. However, since behaviors
+ can be executed explicitly, any value can be passed from any source.
+ This must not fail if the value is not a resource. For example, we do
+ this in Icinga DB Web for values read from Redis.
+Author: Eric Lippmann <eric.lippmann at icinga.com>
+Origin: https://github.com/Icinga/ipl-orm/pull/68
+Bug: https://github.com/Icinga/icingaweb2/issues/4858
+
+--- a/vendor/ipl/orm/src/Behavior/Binary.php
++++ b/vendor/ipl/orm/src/Behavior/Binary.php
+@@ -27,19 +27,14 @@ class Binary extends PropertyBehavior im
+ */
+ protected $rewriteSubjects;
+
+- /**
+- * @throws UnexpectedValueException If value is set and not a resource
+- */
+ public function fromDb($value, $key, $_)
+ {
+ if ($value !== null) {
+- if (! is_resource($value)) {
+- throw new UnexpectedValueException(
+- sprintf('%s should be a resource got %s instead', $key, get_php_type($value))
+- );
++ if (is_resource($value)) {
++ return stream_get_contents($value);
+ }
+
+- return stream_get_contents($value);
++ return $value;
+ }
+
+ return null;
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+pr68-Binary-behavior-Return-non-resource-as-is.patch
=====================================
debian/source/lintian-overrides
=====================================
@@ -1,3 +1,6 @@
# composer is not used to build the package
composer-package-without-pkg-php-tools-builddep
+# False positive
+source-is-missing [asset/js/vendor/flatpickr.js]
+
View it on GitLab: https://salsa.debian.org/nagios-team/icinga-php-library/-/compare/f6358802246d3f47b3c0a36c1082cbef031b1f24...218fd493646650a2fab0d2539699e61d900efd9f
--
View it on GitLab: https://salsa.debian.org/nagios-team/icinga-php-library/-/compare/f6358802246d3f47b3c0a36c1082cbef031b1f24...218fd493646650a2fab0d2539699e61d900efd9f
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/20220703/219f2c10/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list