openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2021
- 1 participants
- 2358 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package pax-utils for openSUSE:Factory checked in at 2021-02-02 14:25:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pax-utils (Old)
and /work/SRC/openSUSE:Factory/.pax-utils.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pax-utils"
Tue Feb 2 14:25:16 2021 rev:25 rq:868413 version:1.2.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/pax-utils/pax-utils.changes 2020-08-20 22:33:29.748112290 +0200
+++ /work/SRC/openSUSE:Factory/.pax-utils.new.28504/pax-utils.changes 2021-02-02 14:25:23.723366032 +0100
@@ -1,0 +2,9 @@
+Mon Feb 1 14:24:19 UTC 2021 - Gianluca Gabrielli <gianluca.gabrielli(a)suse.com>
+
+- Update to 1.2.8.
+- Changes since 1.2.6:
+ - Add support for arm64 arch.
+ - Add flag -U/--uuid to dump the object's UUID.
+ This is in particular useful when comparing against TextAPI stubs, .tbd files.
+
+-------------------------------------------------------------------
Old:
----
pax-utils-1.2.6.tar.xz
New:
----
pax-utils-1.2.8.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pax-utils.spec ++++++
--- /var/tmp/diff_new_pack.OUF3jl/_old 2021-02-02 14:25:24.351367009 +0100
+++ /var/tmp/diff_new_pack.OUF3jl/_new 2021-02-02 14:25:24.355367016 +0100
@@ -1,7 +1,7 @@
#
# spec file for package pax-utils
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: pax-utils
-Version: 1.2.6
+Version: 1.2.8
Release: 0
Summary: Tools to Check ELF Files for Security Relevant Properties
License: GPL-2.0-or-later
++++++ pax-utils-1.2.6.tar.xz -> pax-utils-1.2.8.tar.xz ++++++
++++ 45023 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rabbitmq-server for openSUSE:Factory checked in at 2021-02-02 14:25:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rabbitmq-server (Old)
and /work/SRC/openSUSE:Factory/.rabbitmq-server.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rabbitmq-server"
Tue Feb 2 14:25:14 2021 rev:63 rq:868400 version:3.8.11
Changes:
--------
--- /work/SRC/openSUSE:Factory/rabbitmq-server/rabbitmq-server.changes 2020-10-26 16:22:38.935240881 +0100
+++ /work/SRC/openSUSE:Factory/.rabbitmq-server.new.28504/rabbitmq-server.changes 2021-02-02 14:25:20.583361149 +0100
@@ -1,0 +2,82 @@
+Mon Feb 1 03:31:44 PM UTC 2021 - Peter Simons <psimons(a)suse.com>
+
+- Update to RabbitMQ 3.8.11
+
+ * Quorum queues that had active consumers during a rolling
+ cluster upgrade could run into an exception and restart loop.
+
+ * Nodes that had reverse_dns_lookup set to true could not accept
+ client connections.
+
+- Update to RabbitMQ 3.8.10
+
+ * This release deprecates boot time definition import build into
+ the management plugin.
+
+ * Repeated polling of a quorum queue with basic.get that yielded
+ an empty response could result in an unbounded growth of log
+ segment files on on disk.
+
+ * RabbitMQ core plugin activation was revisited to be closer to
+ that of 3.7.x. This does not any related improvements w.r.t.
+ definition import, e.g. those introudced in RabbitMQ 3.8.6.
+
+ * Syslog dependency was not started correctly. This meant no log
+ messages were sent to Syslog.
+
+ * rabbitmq-diagnostics check_if_node_is_quorum_critical returned
+ a false positive for a node marked for maintenance.
+
+ * Queues could update their internal bookkeeping state
+ incorrectly in some cases, leading to a file_handle_cache
+ operation exception.
+
+ * Quorum queues now can use the reject-publish max length
+ overflow strategy.
+
+ * Quorum queues now support consumer priority.
+
+ * Per-user connection and queue limits. This is similar to
+ per-vhost limits but, as the name suggests, these limits are
+ associated for a given user.
+
+ * TLSv1.3 is no longer considered experimental (on Erlang 23) and
+ excluded from TLS listener configuration.
+
+ * When a node is put under maintenance, it will now stop all
+ local quorum queue replicas after completing leadership
+ transfer. This means that no quorum queue replicas on the node
+ will be considered for leader elections.
+
+ * Nodes now keep track of failed client authentication attempts
+ and expose it as a metric via both the Prometheus endpoint and
+ the HTTP API at GET /api/auth/attempts/{node}.
+
+ * bypass_pem_cache is a new configuration key that makes it
+ possible to disable the cache of PEM files used by the Erlang
+ TLS implementation. This rotated certificates quicker to detect
+ for nodes but can also increase latency for inbound TLS
+ connections, e.g. under high connection churn scenarios.
+
+ * Definition import now safely handles some missing queue object
+ arguments.
+
+ * rabbitmq.conf schema now allows for peer certificate chain
+ verification depth to be set to zero. When this value is used,
+ peer certificate must be signed by a trusted CA certificate
+ directly in order for the verification to pass.
+
+ * RABBITMQ_IO_THREAD_POOL_SIZE will no longer be respected by
+ RabbitMQ nodes. It is no longer relevant with supported Erlang
+ versions and will simplify rabbitmq-diagnostics
+ runtime_thread_stats output.
+
+ * The +K runtime parameter is no longer used by RabbitMQ nodes as
+ it has no effect with supported Erlang versions.
+
+-------------------------------------------------------------------
+Mon Nov 23 15:38:36 UTC 2020 - Franck Bui <fbui(a)suse.com>
+
+- %insserv_prereq is only requires when !have_systemd
+
+-------------------------------------------------------------------
Old:
----
rabbitmq-server-3.8.9.tar.xz
New:
----
rabbitmq-server-3.8.11.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rabbitmq-server.spec ++++++
--- /var/tmp/diff_new_pack.hj38li/_old 2021-02-02 14:25:21.351362344 +0100
+++ /var/tmp/diff_new_pack.hj38li/_new 2021-02-02 14:25:21.355362350 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rabbitmq-server
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -33,7 +33,7 @@
%define _make_args DESTDIR="%{buildroot}" PREFIX="%{_prefix}" RMQ_ROOTDIR=%{_rabbit_libdir} RMQ_ERLAPP_DIR=%{_rabbit_erllibdir} MAN_INSTALL_PATH="%{_mandir}" DOC_INSTALL_DIR=%{buildroot}/%{_docdir} VERSION=%{version} V=1
Name: rabbitmq-server
-Version: 3.8.9
+Version: 3.8.11
Release: 0
Summary: A message broker supporting AMQP, STOMP and MQTT
License: MPL-2.0
@@ -55,7 +55,7 @@
Source11: rabbitmq.config.example
BuildRequires: elixir
# https://www.rabbitmq.com/which-erlang.html
-BuildRequires: erlang >= 21.3
+BuildRequires: erlang >= 22.3
BuildRequires: erlang-src
BuildRequires: fdupes
BuildRequires: libxslt
@@ -65,14 +65,13 @@
BuildRequires: xmlto
BuildRequires: xz
BuildRequires: zip
-Requires: erlang >= 21.3
+Requires: erlang >= 22.3
Requires: erlang-epmd
Requires: logrotate
Provides: AMQP-server
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): shadow
Requires(pre): %fillup_prereq
-Requires(pre): %insserv_prereq
Requires: rabbitmq-server-plugins
%if 0%{?suse_version} > 1140
BuildRequires: pkgconfig(systemd)
@@ -82,6 +81,7 @@
%else
Requires: %fillup_prereq
Requires: %insserv_prereq
+Requires(pre): %insserv_prereq
%endif
# Do not use noarch since the Erlang packaging does not really allow that
#BuildArch: noarch
++++++ rabbitmq-server-3.8.9.tar.xz -> rabbitmq-server-3.8.11.tar.xz ++++++
++++ 34190 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package b43-fwcutter for openSUSE:Factory checked in at 2021-02-02 14:25:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/b43-fwcutter (Old)
and /work/SRC/openSUSE:Factory/.b43-fwcutter.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "b43-fwcutter"
Tue Feb 2 14:25:12 2021 rev:31 rq:868398 version:019
Changes:
--------
--- /work/SRC/openSUSE:Factory/b43-fwcutter/b43-fwcutter.changes 2016-01-08 15:23:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.b43-fwcutter.new.28504/b43-fwcutter.changes 2021-02-02 14:25:16.163354274 +0100
@@ -1,0 +2,5 @@
+Mon Oct 19 13:04:29 UTC 2020 - Ludwig Nussel <lnussel(a)suse.de>
+
+- use %_firmwaredir
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ b43-fwcutter.spec ++++++
--- /var/tmp/diff_new_pack.KSauDU/_old 2021-02-02 14:25:16.743355177 +0100
+++ /var/tmp/diff_new_pack.KSauDU/_new 2021-02-02 14:25:16.747355183 +0100
@@ -1,7 +1,7 @@
#
# spec file for package b43-fwcutter
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -22,7 +22,7 @@
Summary: Tool for extracting firmware from newer Broadcom WLAN drivers
License: BSD-2-Clause
Group: Hardware/Wifi
-Url: http://linuxwireless.org/en/users/Drivers/b43
+URL: http://linuxwireless.org/en/users/Drivers/b43
Source: http://bues.ch/b43/fwcutter/%{name}-%{version}.tar.bz2
Source1: install_bcm43xx_firmware
Requires: curl
@@ -70,15 +70,16 @@
mkdir -p %{buildroot}%{_sbindir}/
install -m 755 b43-fwcutter %{buildroot}%{_bindir}/
install -m 755 %{SOURCE1} %{buildroot}%{_sbindir}/
-mkdir -p %{buildroot}/lib/firmware/b43/
-mkdir -p %{buildroot}/lib/firmware/b43legacy/
+sed -i -e 's,/lib/firmware,%{_firmwaredir},' %{buildroot}%{_sbindir}/install_bcm43xx_firmware
+mkdir -p %{buildroot}%{_firmwaredir}/b43/
+mkdir -p %{buildroot}%{_firmwaredir}/b43legacy/
for i in a0g0bsinitvals5.fw a0g0bsinitvals9.fw a0g0initvals5.fw a0g0initvals9.fw a0g1bsinitvals13.fw a0g1bsinitvals5.fw a0g1bsinitvals9.fw a0g1initvals13.fw a0g1initvals5.fw a0g1initvals9.fw b0g0bsinitvals13.fw b0g0bsinitvals5.fw b0g0bsinitvals9.fw b0g0initvals13.fw b0g0initvals5.fw b0g0initvals9.fw lp0bsinitvals13.fw lp0bsinitvals14.fw lp0bsinitvals15.fw lp0bsinitvals16.fw lp0initvals13.fw lp0initvals14.fw lp0initvals15.fw lp0initvals16.fw n0absinitvals11.fw n0bsinitvals11.fw n0bsinitvals16.fw n0initvals11.fw n0initvals16.fw pcm5.fw sslpn0bsinitvals16.fw sslpn0initvals16.fw sslpn1bsinitvals20.fw sslpn1initvals20.fw sslpn2bsinitvals17.fw sslpn2bsinitvals19.fw sslpn2initvals17.fw sslpn2initvals19.fw sslpn4bsinitvals22.fw sslpn4initvals22.fw ucode11.fw ucode13.fw ucode14.fw ucode15.fw ucode16_lp.fw ucode16_mimo.fw ucode16_sslpn.fw ucode16_sslpn_nobt.fw ucode17.fw ucode19.fw ucode20.fw ucode22_sslpn.fw ucode5.fw ucode9.fw
do
- touch %{buildroot}/lib/firmware/b43/$i
+ touch %{buildroot}%{_firmwaredir}/b43/$i
done
for j in a0g0bsinitvals2.fw a0g0bsinitvals5.fw a0g0initvals2.fw a0g0initvals5.fw a0g1bsinitvals5.fw a0g1initvals5.fw b0g0bsinitvals2.fw b0g0bsinitvals5.fw b0g0initvals2.fw b0g0initvals5.fw pcm4.fw pcm5.fw ucode11.fw ucode2.fw ucode4.fw ucode5.fw
do
- touch %{buildroot}/lib/firmware/b43legacy/$j
+ touch %{buildroot}%{_firmwaredir}/b43legacy/$j
done
%files
@@ -88,79 +89,79 @@
%{_sbindir}/install_bcm43xx_firmware
#%{_mandir}/man1/b43-fwcutter.1.gz
#/usr/man/man1/b43-fwcutter.1.gz
-%dir /lib/firmware/b43
-%dir /lib/firmware/b43legacy
+%dir %{_firmwaredir}/b43
+%dir %{_firmwaredir}/b43legacy
# ghost b43 firmware
-%ghost /lib/firmware/b43/a0g0bsinitvals5.fw
-%ghost /lib/firmware/b43/a0g0bsinitvals9.fw
-%ghost /lib/firmware/b43/a0g0initvals5.fw
-%ghost /lib/firmware/b43/a0g0initvals9.fw
-%ghost /lib/firmware/b43/a0g1bsinitvals13.fw
-%ghost /lib/firmware/b43/a0g1bsinitvals5.fw
-%ghost /lib/firmware/b43/a0g1bsinitvals9.fw
-%ghost /lib/firmware/b43/a0g1initvals13.fw
-%ghost /lib/firmware/b43/a0g1initvals5.fw
-%ghost /lib/firmware/b43/a0g1initvals9.fw
-%ghost /lib/firmware/b43/b0g0bsinitvals13.fw
-%ghost /lib/firmware/b43/b0g0bsinitvals5.fw
-%ghost /lib/firmware/b43/b0g0bsinitvals9.fw
-%ghost /lib/firmware/b43/b0g0initvals13.fw
-%ghost /lib/firmware/b43/b0g0initvals5.fw
-%ghost /lib/firmware/b43/b0g0initvals9.fw
-%ghost /lib/firmware/b43/lp0bsinitvals13.fw
-%ghost /lib/firmware/b43/lp0bsinitvals14.fw
-%ghost /lib/firmware/b43/lp0bsinitvals15.fw
-%ghost /lib/firmware/b43/lp0bsinitvals16.fw
-%ghost /lib/firmware/b43/lp0initvals13.fw
-%ghost /lib/firmware/b43/lp0initvals14.fw
-%ghost /lib/firmware/b43/lp0initvals15.fw
-%ghost /lib/firmware/b43/lp0initvals16.fw
-%ghost /lib/firmware/b43/n0absinitvals11.fw
-%ghost /lib/firmware/b43/n0bsinitvals11.fw
-%ghost /lib/firmware/b43/n0bsinitvals16.fw
-%ghost /lib/firmware/b43/n0initvals11.fw
-%ghost /lib/firmware/b43/n0initvals16.fw
-%ghost /lib/firmware/b43/pcm5.fw
-%ghost /lib/firmware/b43/sslpn0bsinitvals16.fw
-%ghost /lib/firmware/b43/sslpn0initvals16.fw
-%ghost /lib/firmware/b43/sslpn1bsinitvals20.fw
-%ghost /lib/firmware/b43/sslpn1initvals20.fw
-%ghost /lib/firmware/b43/sslpn2bsinitvals17.fw
-%ghost /lib/firmware/b43/sslpn2bsinitvals19.fw
-%ghost /lib/firmware/b43/sslpn2initvals17.fw
-%ghost /lib/firmware/b43/sslpn2initvals19.fw
-%ghost /lib/firmware/b43/sslpn4bsinitvals22.fw
-%ghost /lib/firmware/b43/sslpn4initvals22.fw
-%ghost /lib/firmware/b43/ucode11.fw
-%ghost /lib/firmware/b43/ucode13.fw
-%ghost /lib/firmware/b43/ucode14.fw
-%ghost /lib/firmware/b43/ucode15.fw
-%ghost /lib/firmware/b43/ucode16_lp.fw
-%ghost /lib/firmware/b43/ucode16_mimo.fw
-%ghost /lib/firmware/b43/ucode16_sslpn.fw
-%ghost /lib/firmware/b43/ucode16_sslpn_nobt.fw
-%ghost /lib/firmware/b43/ucode17.fw
-%ghost /lib/firmware/b43/ucode19.fw
-%ghost /lib/firmware/b43/ucode20.fw
-%ghost /lib/firmware/b43/ucode22_sslpn.fw
-%ghost /lib/firmware/b43/ucode5.fw
-%ghost /lib/firmware/b43/ucode9.fw
+%ghost %{_firmwaredir}/b43/a0g0bsinitvals5.fw
+%ghost %{_firmwaredir}/b43/a0g0bsinitvals9.fw
+%ghost %{_firmwaredir}/b43/a0g0initvals5.fw
+%ghost %{_firmwaredir}/b43/a0g0initvals9.fw
+%ghost %{_firmwaredir}/b43/a0g1bsinitvals13.fw
+%ghost %{_firmwaredir}/b43/a0g1bsinitvals5.fw
+%ghost %{_firmwaredir}/b43/a0g1bsinitvals9.fw
+%ghost %{_firmwaredir}/b43/a0g1initvals13.fw
+%ghost %{_firmwaredir}/b43/a0g1initvals5.fw
+%ghost %{_firmwaredir}/b43/a0g1initvals9.fw
+%ghost %{_firmwaredir}/b43/b0g0bsinitvals13.fw
+%ghost %{_firmwaredir}/b43/b0g0bsinitvals5.fw
+%ghost %{_firmwaredir}/b43/b0g0bsinitvals9.fw
+%ghost %{_firmwaredir}/b43/b0g0initvals13.fw
+%ghost %{_firmwaredir}/b43/b0g0initvals5.fw
+%ghost %{_firmwaredir}/b43/b0g0initvals9.fw
+%ghost %{_firmwaredir}/b43/lp0bsinitvals13.fw
+%ghost %{_firmwaredir}/b43/lp0bsinitvals14.fw
+%ghost %{_firmwaredir}/b43/lp0bsinitvals15.fw
+%ghost %{_firmwaredir}/b43/lp0bsinitvals16.fw
+%ghost %{_firmwaredir}/b43/lp0initvals13.fw
+%ghost %{_firmwaredir}/b43/lp0initvals14.fw
+%ghost %{_firmwaredir}/b43/lp0initvals15.fw
+%ghost %{_firmwaredir}/b43/lp0initvals16.fw
+%ghost %{_firmwaredir}/b43/n0absinitvals11.fw
+%ghost %{_firmwaredir}/b43/n0bsinitvals11.fw
+%ghost %{_firmwaredir}/b43/n0bsinitvals16.fw
+%ghost %{_firmwaredir}/b43/n0initvals11.fw
+%ghost %{_firmwaredir}/b43/n0initvals16.fw
+%ghost %{_firmwaredir}/b43/pcm5.fw
+%ghost %{_firmwaredir}/b43/sslpn0bsinitvals16.fw
+%ghost %{_firmwaredir}/b43/sslpn0initvals16.fw
+%ghost %{_firmwaredir}/b43/sslpn1bsinitvals20.fw
+%ghost %{_firmwaredir}/b43/sslpn1initvals20.fw
+%ghost %{_firmwaredir}/b43/sslpn2bsinitvals17.fw
+%ghost %{_firmwaredir}/b43/sslpn2bsinitvals19.fw
+%ghost %{_firmwaredir}/b43/sslpn2initvals17.fw
+%ghost %{_firmwaredir}/b43/sslpn2initvals19.fw
+%ghost %{_firmwaredir}/b43/sslpn4bsinitvals22.fw
+%ghost %{_firmwaredir}/b43/sslpn4initvals22.fw
+%ghost %{_firmwaredir}/b43/ucode11.fw
+%ghost %{_firmwaredir}/b43/ucode13.fw
+%ghost %{_firmwaredir}/b43/ucode14.fw
+%ghost %{_firmwaredir}/b43/ucode15.fw
+%ghost %{_firmwaredir}/b43/ucode16_lp.fw
+%ghost %{_firmwaredir}/b43/ucode16_mimo.fw
+%ghost %{_firmwaredir}/b43/ucode16_sslpn.fw
+%ghost %{_firmwaredir}/b43/ucode16_sslpn_nobt.fw
+%ghost %{_firmwaredir}/b43/ucode17.fw
+%ghost %{_firmwaredir}/b43/ucode19.fw
+%ghost %{_firmwaredir}/b43/ucode20.fw
+%ghost %{_firmwaredir}/b43/ucode22_sslpn.fw
+%ghost %{_firmwaredir}/b43/ucode5.fw
+%ghost %{_firmwaredir}/b43/ucode9.fw
# ghost b43legacy firmware
-%ghost /lib/firmware/b43legacy/a0g0bsinitvals2.fw
-%ghost /lib/firmware/b43legacy/a0g0bsinitvals5.fw
-%ghost /lib/firmware/b43legacy/a0g0initvals2.fw
-%ghost /lib/firmware/b43legacy/a0g0initvals5.fw
-%ghost /lib/firmware/b43legacy/a0g1bsinitvals5.fw
-%ghost /lib/firmware/b43legacy/a0g1initvals5.fw
-%ghost /lib/firmware/b43legacy/b0g0bsinitvals2.fw
-%ghost /lib/firmware/b43legacy/b0g0bsinitvals5.fw
-%ghost /lib/firmware/b43legacy/b0g0initvals2.fw
-%ghost /lib/firmware/b43legacy/b0g0initvals5.fw
-%ghost /lib/firmware/b43legacy/pcm4.fw
-%ghost /lib/firmware/b43legacy/pcm5.fw
-%ghost /lib/firmware/b43legacy/ucode11.fw
-%ghost /lib/firmware/b43legacy/ucode2.fw
-%ghost /lib/firmware/b43legacy/ucode4.fw
-%ghost /lib/firmware/b43legacy/ucode5.fw
+%ghost %{_firmwaredir}/b43legacy/a0g0bsinitvals2.fw
+%ghost %{_firmwaredir}/b43legacy/a0g0bsinitvals5.fw
+%ghost %{_firmwaredir}/b43legacy/a0g0initvals2.fw
+%ghost %{_firmwaredir}/b43legacy/a0g0initvals5.fw
+%ghost %{_firmwaredir}/b43legacy/a0g1bsinitvals5.fw
+%ghost %{_firmwaredir}/b43legacy/a0g1initvals5.fw
+%ghost %{_firmwaredir}/b43legacy/b0g0bsinitvals2.fw
+%ghost %{_firmwaredir}/b43legacy/b0g0bsinitvals5.fw
+%ghost %{_firmwaredir}/b43legacy/b0g0initvals2.fw
+%ghost %{_firmwaredir}/b43legacy/b0g0initvals5.fw
+%ghost %{_firmwaredir}/b43legacy/pcm4.fw
+%ghost %{_firmwaredir}/b43legacy/pcm5.fw
+%ghost %{_firmwaredir}/b43legacy/ucode11.fw
+%ghost %{_firmwaredir}/b43legacy/ucode2.fw
+%ghost %{_firmwaredir}/b43legacy/ucode4.fw
+%ghost %{_firmwaredir}/b43legacy/ucode5.fw
%changelog
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package sof-firmware for openSUSE:Factory checked in at 2021-02-02 14:25:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sof-firmware (Old)
and /work/SRC/openSUSE:Factory/.sof-firmware.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sof-firmware"
Tue Feb 2 14:25:08 2021 rev:11 rq:868372 version:1.6.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/sof-firmware/sof-firmware.changes 2021-01-21 21:57:16.981855337 +0100
+++ /work/SRC/openSUSE:Factory/.sof-firmware.new.28504/sof-firmware.changes 2021-02-02 14:25:14.199351220 +0100
@@ -1,0 +2,6 @@
+Mon Feb 1 11:33:08 CET 2021 - tiwai(a)suse.de
+
+- Yet more ugly workarounds for the rpm shortness about the symlink
+ directory handling (bsc#1181554)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sof-firmware.spec ++++++
--- /var/tmp/diff_new_pack.aAsfR0/_old 2021-02-02 14:25:14.895352303 +0100
+++ /var/tmp/diff_new_pack.aAsfR0/_new 2021-02-02 14:25:14.899352309 +0100
@@ -84,11 +84,38 @@
rm -f %{buildroot}%{_firmwaredir}/intel/sof/community/sof-jsl.ri
%fdupes -s %{buildroot}
+# A grand opening of a monkey theater now:
+# as rpm cannot handle the transition from a directory to a symlinked
+# directory, we need many very ugly tricks to work around it.
+# See bsc#1180287 and bsc#1181554
+
+# At first, rename the old directory that will be overriden via symlink.
+# This has to be done at pre, not preun. Without this workaround, cpio
+# expansion fails.
%pre
-# Mighty rpm cannot handle the transition from a directory to a symlinked
-# directory, hence we have to get rid of it beforehand at this moment (but
-# not at un preun!): bsc#1180287
-test -h %{_firmwaredir}/intel/sof-tplg || rm -rf %{_firmwaredir}/intel/sof-tplg
+if test -d %{_firmwaredir}/intel/sof-tplg; then
+ if ! test -h %{_firmwaredir}/intel/sof-tplg; then
+ mv %{_firmwaredir}/intel/sof-tplg %{_firmwaredir}/intel/sof-tplg.old
+ fi
+fi
+
+# At next, rename the symlink at post if the old package contained the
+# directory; it's needed to avoid the old package removing the new contents
+# mistakenly. The old contents are removed here instead.
+%post
+if test -d %{_firmwaredir}/intel/sof-tplg.old; then
+ mv %{_firmwaredir}/intel/sof-tplg %{_firmwaredir}/intel/sof-tplg.new
+ rm -rf %{_firmwaredir}/intel/sof-tplg.old
+fi
+
+# At last in posttrans, recover the symlink again;
+# it's the only place we can use after the old package triggers run
+%posttrans
+if test -h %{_firmwaredir}/intel/sof-tplg.new; then
+ mv %{_firmwaredir}/intel/sof-tplg.new %{_firmwaredir}/intel/sof-tplg
+ # remove stale files
+ rm -f %{_firmwaredir}/intel/sof-tplg\;*
+fi
%files
%license LICENCE.*
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghostscript-fonts-grops for openSUSE:Factory checked in at 2021-02-02 14:25:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghostscript-fonts-grops (Old)
and /work/SRC/openSUSE:Factory/.ghostscript-fonts-grops.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghostscript-fonts-grops"
Tue Feb 2 14:25:06 2021 rev:9 rq:868373 version:1.22.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghostscript-fonts-grops/ghostscript-fonts-grops.changes 2020-09-28 14:30:43.378233938 +0200
+++ /work/SRC/openSUSE:Factory/.ghostscript-fonts-grops.new.28504/ghostscript-fonts-grops.changes 2021-02-02 14:25:12.939349261 +0100
@@ -1,0 +2,5 @@
+Mon Feb 1 10:13:58 UTC 2021 - Andreas Schwab <schwab(a)suse.de>
+
+- Use rpm.vercmp to compare versions
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghostscript-fonts-grops.spec ++++++
--- /var/tmp/diff_new_pack.xa4ybd/_old 2021-02-02 14:25:13.591350274 +0100
+++ /var/tmp/diff_new_pack.xa4ybd/_new 2021-02-02 14:25:13.595350280 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghostscript-fonts-grops
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,14 +12,14 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ghostscript-fonts-grops
Version: 1.22.2
Release: 0
-Url: http://www.gnu.org/software/groff/groff.html
+URL: http://www.gnu.org/software/groff/groff.html
Summary: Ghostscript fonts imported to groff for use with grops
License: GPL-2.0-only
Group: Productivity/Publishing/Troff
@@ -47,8 +47,7 @@
%build
%define gs_fonts %{_datadir}/ghostscript/fonts
%define gs_version %(gs --version)
-%define gs_ver %(gs --version | sed "s/\\.//")
-%if %{gs_ver} >= 950
+%if %{lua:print(rpm.vercmp(rpm.expand("%{gs_version}"), "9.50"))} >= 0
%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && gs -P- -dNOSAFER -dNODISPLAY -- pfbtopfa.ps %{gs_fonts}/%1.pfb devps/%1.pfa
%else
%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && pfbtopfa %{gs_fonts}/%1.pfb devps/%1.pfa
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ignition-config-transpiler for openSUSE:Factory checked in at 2021-02-02 14:25:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ignition-config-transpiler (Old)
and /work/SRC/openSUSE:Factory/.ignition-config-transpiler.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ignition-config-transpiler"
Tue Feb 2 14:25:02 2021 rev:6 rq:868368 version:0.9.0+git20210121.4bf0250
Changes:
--------
--- /work/SRC/openSUSE:Factory/ignition-config-transpiler/ignition-config-transpiler.changes 2020-10-13 15:44:31.185420548 +0200
+++ /work/SRC/openSUSE:Factory/.ignition-config-transpiler.new.28504/ignition-config-transpiler.changes 2021-02-02 14:25:08.267341994 +0100
@@ -1,0 +2,89 @@
+Mon Feb 01 13:15:22 UTC 2021 - kukuk(a)suse.de
+
+- Update to version 0.9.0+git20210121.4bf0250:
+ * config/fcos: Avoid merging invalid configs
+ * config/fcos/v1_{3,4_exp}: drop ESP from ppc64le boot_device layout
+ * NEWS: add news for 0.9.0
+ * docs/examples: add some monospacing
+ * base/v0_4_exp: teach with_mount_unit to create swap units
+ * base/v0_4_exp: abstract MountOptions handling into subtemplate
+ * docs: Update fcct download instructions
+ * build_for_container: stop building non-Linux-x86_64 binaries
+ * build_releases: rename for container build
+ * test: don't recompile fcct for every FCC in docs
+ * docs/development: clean up definition list
+ * README: move project layout section to dev docs
+ * docs: fix indentation level for storage.luks
+ * config/fcos/v1_[34]: un-RAID ESP
+ * docs: make storage.filesystems.path field optional
+ * docs: move systemd.units.name uniqueness constraint to units
+ * NEWS: add news for 0.8.0
+ * docs: document rhcos specs
+ * docs: specialize spec docs for the fcos variant
+ * docs/specs: unwrap lines
+ * config: add rhcos 0.2.0-experimental variant
+ * config: add rhcos 0.1.0 variant
+ * docs: update spec bump instructions
+ * docs: document spec 1.3.0
+ * docs: stabilize spec 1.3.0
+ * docs: add 46 to spec nav_order fields
+ * config/fcos/v1_4_exp: update sources for new package
+ * config/fcos/v1_4_exp: copy from v1_3
+ * config/fcos/v1_3_exp: stabilize
+ * config/fcos/v1_3_exp: add boot_device sugar
+ * config/fcos/v1_3_exp: switch back to Ignition spec 3.2.0
+ * vendor: update Ignition to 2.8.1
+ * test: use vendored Go packages
+ * translate: add primitive slice entries in AddFromCommonSource
+ * base/util: have VerifyTranslations log messages on the test object
+ * base/util: don't manually construct TranslationSet
+ * translate: add TranslationSet method for prefixing arbitrary paths
+ * config/fcos/*: import config/util as cutil
+ * docs: add luks wipe_volume field
+ * base/*: switch addMountUnits() to MergeTranslatedConfigs()
+ * base/util: add function to merge configs and TranslationSets
+ * vendor: bump Ignition to Git master for MergeStructTranscribe()
+ * base: warn if file/dir modes appear to have been specified in decimal
+ * base/*: consistently use testify
+ * base/*: combine local and remote mount unit templates
+ * base/*: add tests for with_mount_unit flag
+ * base/*: fix mount unit template Requires/After on systemd-fsck
+ * base: update comments for renamed functions
+ * config: split schema to separate source file
+ * vendor: update vcontext
+ * docs: remember to document Clevis custom PINs
+ * base: move test helper functions to utility package
+ * base: move ensurePathWithinFilesDir() to utility package
+ * base/util: invert MakeDataURL() compression boolean
+ * base: move data URL generation to utility package
+ * README: update project layout for refactor
+ * docs/development: update spec bump instructions for refactor
+ * config/fcos: rename fcos.go to translate.go
+ * *: consolidate named errors into config/common
+ * config/fcos: drop gratuitous versioned import identifier
+ * config: rename versioned TranslateBytes functions
+ * config: move validation into ToIgn* methods
+ * config: drop Translate functions
+ * config: move Translate() error check into base
+ * config: add registration function for external translators
+ * base: move variant/version fields to base configs
+ * config: rename Translate to TranslateBytes
+ * config: refactor options structs
+ * distro: drop package
+ * config: move fcos packages into fcos subdirectory
+ * config: move TranslateBytes implementation into a helper
+ * config: split common utility functions into util
+ * docs/examples: add LUKS example
+ * docs/examples: make title case not title case
+ * release-checklist: update tagging and GitHub release instructions
+ * release-checklist: update packaging instructions
+ * Providing example for password authentication with reference to the Fedora CoreOS documentation for Auth
+ * NEWS: add news for 0.7.0
+ * docs: link to Ignition docs site, not GitHub
+ * docs: update docs for spec bump
+ * config: handle spec bump
+ * base/v0_4_exp: add new experimental spec
+ * base/v0_3: stabilize base v0_3
+ * vendor: update Ignition to 2.7.0
+
+-------------------------------------------------------------------
Old:
----
fcct-0.6.0+git20200928.d002e54.tar.xz
New:
----
fcct-0.9.0+git20210121.4bf0250.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ignition-config-transpiler.spec ++++++
--- /var/tmp/diff_new_pack.cp0V7n/_old 2021-02-02 14:25:09.035343188 +0100
+++ /var/tmp/diff_new_pack.cp0V7n/_new 2021-02-02 14:25:09.039343194 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ignition-config-transpiler
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: ignition-config-transpiler
-Version: 0.6.0+git20200928.d002e54
+Version: 0.9.0+git20210121.4bf0250
Release: 0
Summary: Tool to convert a yaml config file into a Ignition configuration
License: Apache-2.0
++++++ _service ++++++
--- /var/tmp/diff_new_pack.cp0V7n/_old 2021-02-02 14:25:09.067343239 +0100
+++ /var/tmp/diff_new_pack.cp0V7n/_new 2021-02-02 14:25:09.071343245 +0100
@@ -1,6 +1,6 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="versionformat">0.6.0+git%cd.%h</param>
+ <param name="versionformat">0.9.0+git%cd.%h</param>
<param name="url">git://github.com/coreos/fcct.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.cp0V7n/_old 2021-02-02 14:25:09.091343276 +0100
+++ /var/tmp/diff_new_pack.cp0V7n/_new 2021-02-02 14:25:09.091343276 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/coreos/fcct.git</param>
- <param name="changesrevision">61b7e101918f3d3f5484f9ae6ef46022b9ec251f</param>
+ <param name="changesrevision">19eb8a33d974404ebc7ef01e58e50a3f55e123c8</param>
</service>
</servicedata>
\ No newline at end of file
++++++ fcct-0.6.0+git20200928.d002e54.tar.xz -> fcct-0.9.0+git20210121.4bf0250.tar.xz ++++++
++++ 30661 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package smenu for openSUSE:Factory checked in at 2021-02-02 14:25:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/smenu (Old)
and /work/SRC/openSUSE:Factory/.smenu.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "smenu"
Tue Feb 2 14:25:00 2021 rev:4 rq:868359 version:0.9.17
Changes:
--------
--- /work/SRC/openSUSE:Factory/smenu/smenu.changes 2020-09-25 16:33:13.447980376 +0200
+++ /work/SRC/openSUSE:Factory/.smenu.new.28504/smenu.changes 2021-02-02 14:25:06.283338908 +0100
@@ -1,0 +2,28 @@
+Sat Jan 30 16:20:37 UTC 2021 - Pierre Gentile <p.gen.progs(a)gmail.com>
+
+- Version 0.9.17
+* Fixes:
+ - The method to get the cursor location has been fixed and improved.
+ - A display problem when the title takes too many lines has been fixed.
+ - A failure when reopening /dev/tty is now fatal.
+ - Interesting signals are now trapped only when needed.
+ - The refresh mechanism when resizing the terminal has been fixed
+ and improved.
+ - \U does not need too be escaped anymore.
+* Improvements:
+ - The -Q|-ignore_quotes option has been added to provide a way to
+ ignore quotes when splitting the input stream/file into words.
+ - The -!|-int|-int_string option has been added to define a string to
+ be displayed on stdout when ^C is entered during a smenu session.
+ - The usage text is now displayed in case of an error on the command
+ line.
+ - The code to create include/exclude RE patterns has been simplified.
+ - smenu now mimics the Unix shell signal processing.
+* Misc:
+ - The availability of str(n)dup is now checked at compile time.
+ - Tests for RE patterns/inv. character have bee added.
+ - The obsolete autogen.sh script has been removed.
+ - github's ctxopt commit f779fb8 is now used.
+ - The code is now a little more readable.
+
+-------------------------------------------------------------------
Old:
----
smenu-0.9.16.tar.bz2
New:
----
smenu-0.9.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ smenu.spec ++++++
--- /var/tmp/diff_new_pack.9xgNTf/_old 2021-02-02 14:25:07.195340327 +0100
+++ /var/tmp/diff_new_pack.9xgNTf/_new 2021-02-02 14:25:07.195340327 +0100
@@ -1,8 +1,7 @@
#
# spec file for package smenu
#
-# Copyright (c) 2020 SUSE LLC
-# Copyright (c) Pierre Gentile <p.gen.progs(a)gmail.com>
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +17,7 @@
Name: smenu
-Version: 0.9.16
+Version: 0.9.17
Release: 0
Summary: A standard input word picker
License: GPL-2.0-only
@@ -43,6 +42,7 @@
%package tests
Summary: Testing system for %{name}
Group: Productivity/Text/Utilities
+Requires: smenu
%description tests
This packages contains some scripts and a number of tests to check the
++++++ smenu-0.9.16.tar.bz2 -> smenu-0.9.17.tar.bz2 ++++++
++++ 12676 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package cobbler for openSUSE:Factory checked in at 2021-02-02 14:24:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cobbler (Old)
and /work/SRC/openSUSE:Factory/.cobbler.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cobbler"
Tue Feb 2 14:24:57 2021 rev:61 rq:868358 version:3.1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/cobbler/cobbler.changes 2020-11-13 19:00:52.206236522 +0100
+++ /work/SRC/openSUSE:Factory/.cobbler.new.28504/cobbler.changes 2021-02-02 14:25:04.275335786 +0100
@@ -1,0 +2,20 @@
+Tue Jan 19 14:08:27 UTC 2021 - Dominik Gedon <dominik.gedon(a)suse.com>
+
+- Update spec file to satisfy current rpmbuild (>=4.16) and make
+ the build on Tumbleweed work again.
+
+-------------------------------------------------------------------
+Tue Jan 19 09:02:43 UTC 2021 - Dominik Gedon <dominik.gedon(a)suse.com>
+
+- Update tarball from upstream to remove the .pc quilt folder.
+
+-------------------------------------------------------------------
+Mon Jan 18 13:07:58 UTC 2021 - Dominik Gedon <dominik.gedon(a)suse.com>
+
+- Fix string replacement for @@xyz@@
+- Better performing string replacements
+- Added:
+ * better-string-replacement-performance.diff
+ * fix-string-replacement.diff
+
+-------------------------------------------------------------------
New:
----
better-string-replacement-performance.diff
fix-string-replacement.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cobbler.spec ++++++
--- /var/tmp/diff_new_pack.PYEY9p/_old 2021-02-02 14:25:05.299337378 +0100
+++ /var/tmp/diff_new_pack.PYEY9p/_new 2021-02-02 14:25:05.303337384 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -103,7 +103,7 @@
# To ensure correct byte compilation
%global __python %{__python3}
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
%global devsuffix dev
%else
%global devsuffix devel
@@ -117,7 +117,7 @@
Summary: Boot server configurator
URL: https://cobbler.github.io/
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
Packager: Cobbler Developers <cobbler(a)lists.fedorahosted.org>
Group: admin
%endif
@@ -136,6 +136,8 @@
Patch2: load_module_apache_suse_fix.diff
Patch3: fix-for-old-str.join-usage.diff
Patch4: remove-redundant-json-suffix.diff
+Patch5: better-string-replacement-performance.diff
+Patch6: fix-string-replacement.diff
BuildRequires: git-core
BuildRequires: %{system_release_pkg}
@@ -143,7 +145,7 @@
%if 0%{?suse_version}
BuildRequires: python-rpm-macros
%endif
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
BuildRequires: python3-deb-macros
BuildRequires: apache2-deb-macros
@@ -172,7 +174,7 @@
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 9 || 0%{?suse_version}
BuildRequires: systemd-rpm-macros
%endif
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
BuildRequires: systemd-deb-macros
Requires: systemd-sysv
Requires(post): python3-minimal
@@ -219,7 +221,7 @@
Recommends: logrotate
%endif
# https://github.com/cobbler/cobbler/issues/1685
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
Requires: init-system-helpers
%else
Requires: /sbin/service
@@ -273,6 +275,8 @@
%endif
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1
%if 0%{?suse_version}
# Set tftpboot location correctly for SUSE distributions
@@ -317,13 +321,13 @@
%pre
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
if [ "$1" = "upgrade" ]; then
%else
if [ $1 -ge 2 ]; then
%endif
# package upgrade: backup configuration
- DATE=$(date "+%Y%m%d-%H%M%S")
+ DATE=$(date "+%%Y%%m%%d-%%H%%M%%S")
if [ ! -d "%{_sharedstatedir}/cobbler/backup/upgrade-${DATE}" ]; then
mkdir -p "%{_sharedstatedir}/cobbler/backup/upgrade-${DATE}"
fi
@@ -337,7 +341,7 @@
fi
fi
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
%post
%{py3_bytecompile_post %{name}}
%{systemd_post cobblerd.service}
@@ -377,7 +381,7 @@
%endif
%post web
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
# Work around broken attr support
# Cf. https://github.com/debbuild/debbuild/issues/160
chown %{apache_user}:%{apache_group} %{_datadir}/cobbler/web
@@ -484,7 +488,7 @@
%license COPYING
%doc AUTHORS.in README.md
%config(noreplace) %{apache_etc}/vhosts.d/cobbler_web.conf
-%if %{_vendor} == "debbuild"
+%if "%{_vendor}" == "debbuild"
# Work around broken attr support
# Cf. https://github.com/debbuild/debbuild/issues/160
%{_datadir}/cobbler/web
++++++ better-string-replacement-performance.diff ++++++
diff --git a/cobbler/templar.py b/cobbler/templar.py
index aeb161214..ab2beb46f 100644
--- a/cobbler/templar.py
+++ b/cobbler/templar.py
@@ -24,6 +24,7 @@
from builtins import str
from builtins import object
+import re
import Cheetah
import functools
import os
@@ -139,9 +140,11 @@ def render(self, data_input, search_table, out_path, subject=None, template_type
repstr = server
search_table["http_server"] = repstr
- for x in list(search_table.keys()):
- if type(x) == str:
- data_out = data_out.replace("@@%s@@" % str(x), str(search_table[str(x)]))
+ # string replacements for @@xyz@@ in data_out with prior regex lookups of keys
+ regex = r"@@[a-zA-Z]*@@"
+ matches = re.finditer(regex, data_out, re.MULTILINE)
+ for matchNum, match in enumerate(matches, start=1):
+ data_out = data_out.replace(match.group(), search_table[str(match.group()).strip("@@")])
# remove leading newlines which apparently breaks AutoYAST ?
if data_out.startswith("\n"):
++++++ cobbler-3.1.2.obscpio ++++++
/work/SRC/openSUSE:Factory/cobbler/cobbler-3.1.2.obscpio /work/SRC/openSUSE:Factory/.cobbler.new.28504/cobbler-3.1.2.obscpio differ: char 27, line 1
++++++ cobbler-3.1.2.tar.gz ++++++
/work/SRC/openSUSE:Factory/cobbler/cobbler-3.1.2.tar.gz /work/SRC/openSUSE:Factory/.cobbler.new.28504/cobbler-3.1.2.tar.gz differ: char 12, line 1
++++++ fix-string-replacement.diff ++++++
Index: cobbler-3.1.2/cobbler/templar.py
===================================================================
--- cobbler-3.1.2.orig/cobbler/templar.py
+++ cobbler-3.1.2/cobbler/templar.py
@@ -141,7 +141,7 @@ class Templar(object):
search_table["http_server"] = repstr
# string replacements for @@xyz@@ in data_out with prior regex lookups of keys
- regex = r"@@[a-zA-Z]*@@"
+ regex = r"@@[\S]*?@@"
matches = re.finditer(regex, data_out, re.MULTILINE)
for matchNum, match in enumerate(matches, start=1):
data_out = data_out.replace(match.group(), search_table[str(match.group()).strip("@@")])
Index: cobbler-3.1.2/tests/xmlrpcapi/distro_profile_system_test.py
===================================================================
--- cobbler-3.1.2.orig/tests/xmlrpcapi/distro_profile_system_test.py
+++ cobbler-3.1.2/tests/xmlrpcapi/distro_profile_system_test.py
@@ -1157,3 +1157,20 @@ class TestDistroProfileSystem:
# Assert --> Let the test pass if the call is okay.
assert True
+
+ @pytest.mark.usefixtures("create_testdistro", "create_profile", "remove_testdistro", "remove_testprofile")
+ def test_render_vars(self, remote, token):
+ """
+ Test: string replacements for @@xyz@@
+ """
+
+ # Arrange --> There is nothing to be arranged
+ kernel_options = "tree=http://@@http_server@@/cblr/links/@@distro_name@@"
+
+ # Act
+ distro = remote.get_item_handle("distro", "testdistro0", token)
+ remote.modify_distro(distro, "kernel_options", kernel_options, token)
+ remote.save_distro(distro, token)
+
+ # Assert --> Let the test pass if the call is okay.
+ assert True
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-JSON-Validator for openSUSE:Factory checked in at 2021-02-02 14:24:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-JSON-Validator (Old)
and /work/SRC/openSUSE:Factory/.perl-JSON-Validator.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-JSON-Validator"
Tue Feb 2 14:24:54 2021 rev:28 rq:868344 version:4.13
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-JSON-Validator/perl-JSON-Validator.changes 2021-01-27 18:58:49.344487935 +0100
+++ /work/SRC/openSUSE:Factory/.perl-JSON-Validator.new.28504/perl-JSON-Validator.changes 2021-02-02 14:24:59.339328109 +0100
@@ -1,0 +2,10 @@
+Fri Jan 29 03:08:04 UTC 2021 - Tina M��ller <timueller+perl(a)suse.de>
+
+- updated to 4.13
+ see /usr/share/doc/packages/perl-JSON-Validator/Changes
+
+ 4.13 2021-01-28T18:22:43+0900
+ - Fix handling offset in RFC3339 date-time #236
+ - Add CLEAR method to JSON::Validator::Ref #237
+
+-------------------------------------------------------------------
Old:
----
JSON-Validator-4.12.tar.gz
New:
----
JSON-Validator-4.13.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-JSON-Validator.spec ++++++
--- /var/tmp/diff_new_pack.9NvHIv/_old 2021-02-02 14:25:00.047329210 +0100
+++ /var/tmp/diff_new_pack.9NvHIv/_new 2021-02-02 14:25:00.051329216 +0100
@@ -18,7 +18,7 @@
%define cpan_name JSON-Validator
Name: perl-JSON-Validator
-Version: 4.12
+Version: 4.13
Release: 0
Summary: Validate data against a JSON schema
License: Artistic-2.0
++++++ JSON-Validator-4.12.tar.gz -> JSON-Validator-4.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/Changes new/JSON-Validator-4.13/Changes
--- old/JSON-Validator-4.12/Changes 2021-01-24 23:52:34.000000000 +0100
+++ new/JSON-Validator-4.13/Changes 2021-01-28 10:22:43.000000000 +0100
@@ -1,5 +1,9 @@
Revision history for perl distribution JSON-Validator
+4.13 2021-01-28T18:22:43+0900
+ - Fix handling offset in RFC3339 date-time #236
+ - Add CLEAR method to JSON::Validator::Ref #237
+
4.12 2021-01-25T07:52:34+0900
- Fix not using Mojo::Exception::raise() #235
- Fix uninitialized warning when looking up schema for an internal $ref
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/MANIFEST new/JSON-Validator-4.13/MANIFEST
--- old/JSON-Validator-4.12/MANIFEST 2021-01-24 23:52:36.000000000 +0100
+++ new/JSON-Validator-4.13/MANIFEST 2021-01-28 10:22:44.000000000 +0100
@@ -52,7 +52,6 @@
t/draft6.t
t/draft7-acceptance.t
t/draft7.t
-t/formats.t
t/get.t
t/Helper.pm
t/id-keyword-draft4.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/META.json new/JSON-Validator-4.13/META.json
--- old/JSON-Validator-4.12/META.json 2021-01-24 23:52:36.000000000 +0100
+++ new/JSON-Validator-4.13/META.json 2021-01-28 10:22:44.000000000 +0100
@@ -63,6 +63,6 @@
},
"x_IRC" : "irc://irc.freenode.net/#mojo"
},
- "version" : "4.12",
+ "version" : "4.13",
"x_serialization_backend" : "JSON::PP version 4.04"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/META.yml new/JSON-Validator-4.13/META.yml
--- old/JSON-Validator-4.12/META.yml 2021-01-24 23:52:35.000000000 +0100
+++ new/JSON-Validator-4.13/META.yml 2021-01-28 10:22:44.000000000 +0100
@@ -32,5 +32,5 @@
homepage: https://mojolicious.org
license: http://www.opensource.org/licenses/artistic-license-2.0
repository: https://github.com/mojolicious/json-validator.git
-version: '4.12'
+version: '4.13'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/lib/JSON/Validator/Formats.pm new/JSON-Validator-4.13/lib/JSON/Validator/Formats.pm
--- old/JSON-Validator-4.12/lib/JSON/Validator/Formats.pm 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/lib/JSON/Validator/Formats.pm 2021-01-28 10:20:53.000000000 +0100
@@ -31,8 +31,10 @@
}
sub check_date_time {
- my @dt = $_[0] =~ m!^(\d{4})-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d+):(\d+))?$!io;
+ my @dt = $_[0] =~ m!^(\d{4})-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$!io;
return 'Does not match date-time format.' unless @dt;
+ return 'Time offset hour out of range.' if defined $dt[7] and $dt[7] > 23;
+ return 'Time offset minute out of range.' if defined $dt[8] and $dt[8] > 59;
@dt = map { s/^0//; $_ } reverse @dt[0 .. 5];
$dt[4] -= 1; # month are zero based
local $@;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/lib/JSON/Validator/Ref.pm new/JSON-Validator-4.13/lib/JSON/Validator/Ref.pm
--- old/JSON-Validator-4.12/lib/JSON/Validator/Ref.pm 2021-01-24 05:50:54.000000000 +0100
+++ new/JSON-Validator-4.13/lib/JSON/Validator/Ref.pm 2021-01-28 00:50:27.000000000 +0100
@@ -31,6 +31,11 @@
return undef;
}
+sub CLEAR {
+ my ($self) = @_;
+ $self->[0] = {};
+}
+
# Make it look like there is only one key in the hash
sub FIRSTKEY { scalar keys %{$_[0][0]}; each %{$_[0][0]} }
sub NEXTKEY { each %{$_[0][0]} }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/lib/JSON/Validator.pm new/JSON-Validator-4.13/lib/JSON/Validator.pm
--- old/JSON-Validator-4.12/lib/JSON/Validator.pm 2021-01-24 23:52:34.000000000 +0100
+++ new/JSON-Validator-4.13/lib/JSON/Validator.pm 2021-01-28 10:22:43.000000000 +0100
@@ -16,7 +16,7 @@
use constant RECURSION_LIMIT => $ENV{JSON_VALIDATOR_RECURSION_LIMIT} || 100;
-our $VERSION = '4.12';
+our $VERSION = '4.13';
our @EXPORT_OK = qw(joi validate_json);
our %SCHEMAS = (
@@ -55,8 +55,9 @@
my ($self, $args) = @_;
my $cloner;
- my $schema = $self->_new_schema($args->{schema} || $self->schema);
- my $schema_id = $schema->id || ($self->schema ? $self->schema->id : '');
+ my $get_data = $self->can('data') ? 'data' : 'schema';
+ my $schema = $self->_new_schema($args->{schema} || $self->$get_data);
+ my $schema_id = $schema->id;
my @topics = ([$schema->data, my $bundle = {}]); # ([$from, $to], ...);
if ($args->{replace}) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/Helper.pm new/JSON-Validator-4.13/t/Helper.pm
--- old/JSON-Validator-4.12/t/Helper.pm 2020-10-28 02:34:19.000000000 +0100
+++ new/JSON-Validator-4.13/t/Helper.pm 2021-01-28 00:59:36.000000000 +0100
@@ -83,7 +83,8 @@
my ($class, $category, @methods) = @_;
my $test_class = "t::test::$category";
eval "require $test_class;1" or die $@;
- (note("$category $_"), $test_class->$_) for @methods;
+ subtest "$category $_", sub { $test_class->$_ }
+ for @methods;
}
sub validate_ok {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/bundle.t new/JSON-Validator-4.13/t/bundle.t
--- old/JSON-Validator-4.12/t/bundle.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/bundle.t 2021-01-28 00:56:59.000000000 +0100
@@ -6,94 +6,103 @@
my $workdir = path(__FILE__)->to_abs->dirname;
my $jv = JSON::Validator->new;
-my $bundled;
-my $schema
- = JSON::Validator::Schema::Draft7->new({
- definitions => {name => {type => 'string'}}, surname => {'$ref' => '#/definitions/name'},
- });
-
-is $schema->bundle({replace => 1})->data->{surname}{type}, 'string', "schema->bundle";
-
-note 'Run multiple times to make sure _reset() works';
-for my $n (1 .. 3) {
- note "[$n] replace=1";
- $bundled = $jv->bundle({
- replace => 1,
- schema => {definitions => {name => {type => 'string'}}, surname => {'$ref' => '#/definitions/name'}},
- });
-
- is $bundled->{surname}{type}, 'string', "[$n] replace=1";
-
- note "[$n] replace=0";
- $bundled = $jv->schema({
- surname => {'$ref' => '#/definitions/name'},
- age => {'$ref' => 'b.json#/definitions/years'},
- definitions => {name => {type => 'string'}},
- B => {id => 'b.json', definitions => {years => {type => 'integer'}}},
- })->bundle;
- ok $bundled->{definitions}{name}, "[$n] definitions/name still in definitions";
- is $bundled->{definitions}{name}{type}, 'string', "[$n] definitions/name/type still in definitions";
- is $bundled->{definitions}{years}{type}, 'integer', "[$n] added to definitions";
- isnt $bundled->{age}, $jv->schema->get('/age'), "[$n] new age ref";
- is $bundled->{surname}, $jv->schema->get('/surname'), "[$n] same surname ref";
- is $bundled->{age}{'$ref'}, '#/definitions/years', "[$n] age \$ref point to /definitions/years";
- is $bundled->{surname}{'$ref'}, '#/definitions/name', "[$n] surname \$ref point to /definitions/name";
-}
-
-is $jv->get([qw(surname type)]), 'string', 'get /surname/$ref';
-is $jv->get('/surname/type'), 'string', 'get /surname/type';
-is $jv->get('/surname/$ref'), undef, 'get /surname/$ref';
-is $jv->schema->get('/surname/type'), 'string', 'schema get /surname/type';
-is $jv->schema->get('/surname/$ref'), '#/definitions/name', 'schema get /surname/$ref';
-
-$bundled = $jv->schema('data://main/bundled.json')->bundle;
-is_deeply [sort keys %{$bundled->{definitions}}], ['objtype'], 'no dup definitions';
-
-note 'definitions in disk spec';
-for my $path (
- ['test-definitions-key.json'],
- ['with-deep-mixed-ref.json'],
- ['with-deep-mixed-ref.json'],
- [File::Spec->updir, 'spec', 'with-deep-mixed-ref.json'],
- )
-{
- my $file = path $workdir, 'spec', @$path;
-
- my @expected = qw(age_json-SHA height unit_json-SHA weight_json-SHA);
- $expected[0] = 'age_json-type-SHA' if $path->[0] eq 'test-definitions-key.json';
-
- $bundled = $jv->schema($file)->bundle;
- is_deeply [sort map { s!-[a-z0-9]{10}$!-SHA!; $_ } keys %{$bundled->{definitions}}], \@expected,
- "right definitions in disk spec @$path"
- or diag join ', ', sort keys %{$bundled->{definitions}};
-}
-
-note 'ensure filenames with funny characters not mangled by Mojo::URL';
-my $file3 = path $workdir, 'spec', 'space bundle.json';
-eval { $bundled = $jv->schema($file3)->bundle };
-is $@, '', 'loaded absolute filename with space';
-is $bundled->{properties}{age}{description}, 'Age in years', 'right definitions in disk spec' or diag explain $bundled;
-
-note 'extract subset of schema';
-$jv->schema('data://main/bundled.json');
-$bundled = $jv->bundle({schema => $jv->get([qw(paths /withdots get)])});
-is_deeply(
- $bundled,
+subtest 'replace' => sub {
+ my $schema
+ = JSON::Validator::Schema::Draft7->new({
+ definitions => {name => {type => 'string'}}, surname => {'$ref' => '#/definitions/name'},
+ });
+
+ is $schema->bundle({replace => 1})->data->{surname}{type}, 'string', "schema->bundle";
+};
+
+subtest 'Run multiple times to make sure _reset() works' => sub {
+ for my $n (1 .. 3) {
+ note "[$n] replace=1";
+ my $bundled = $jv->bundle({
+ replace => 1,
+ schema => {definitions => {name => {type => 'string'}}, surname => {'$ref' => '#/definitions/name'}},
+ });
+
+ is $bundled->{surname}{type}, 'string', "[$n] replace=1";
+
+ note "[$n] replace=0";
+ $bundled = $jv->schema({
+ surname => {'$ref' => '#/definitions/name'},
+ age => {'$ref' => 'b.json#/definitions/years'},
+ definitions => {name => {type => 'string'}},
+ B => {id => 'b.json', definitions => {years => {type => 'integer'}}},
+ })->bundle;
+ ok $bundled->{definitions}{name}, "[$n] definitions/name still in definitions";
+ is $bundled->{definitions}{name}{type}, 'string', "[$n] definitions/name/type still in definitions";
+ is $bundled->{definitions}{years}{type}, 'integer', "[$n] added to definitions";
+ isnt $bundled->{age}, $jv->schema->get('/age'), "[$n] new age ref";
+ is $bundled->{surname}, $jv->schema->get('/surname'), "[$n] same surname ref";
+ is $bundled->{age}{'$ref'}, '#/definitions/years', "[$n] age \$ref point to /definitions/years";
+ is $bundled->{surname}{'$ref'}, '#/definitions/name', "[$n] surname \$ref point to /definitions/name";
+ }
+};
+
+subtest 'check bundled structure' => sub {
+ is $jv->get([qw(surname type)]), 'string', 'get /surname/$ref';
+ is $jv->get('/surname/type'), 'string', 'get /surname/type';
+ is $jv->get('/surname/$ref'), undef, 'get /surname/$ref';
+ is $jv->schema->get('/surname/type'), 'string', 'schema get /surname/type';
+ is $jv->schema->get('/surname/$ref'), '#/definitions/name', 'schema get /surname/$ref';
+
+ my $bundled = $jv->schema('data://main/bundled.json')->bundle;
+ is_deeply [sort keys %{$bundled->{definitions}}], ['objtype'], 'no dup definitions';
+};
+
+subtest 'definitions in disk spec' => sub {
+ for my $path (
+ ['test-definitions-key.json'],
+ ['with-deep-mixed-ref.json'],
+ ['with-deep-mixed-ref.json'],
+ [File::Spec->updir, 'spec', 'with-deep-mixed-ref.json'],
+ )
{
- definitions => {objtype => {properties => {propname => {type => 'string'}}, type => 'object'}},
- responses => {200 => {schema => {'$ref' => '#/definitions/objtype'}}}
- },
- 'subset of schema was bundled'
-) or diag explain $bundled;
-
-note 'no leaking path';
-my $ref_name_prefix = $workdir;
-$ref_name_prefix =~ s![^\w-]!_!g;
-$jv->schema(path $workdir, 'spec', 'bundle-no-leaking-filename.json');
-my @definitions = keys %{$bundled->{definitions}};
-ok @definitions, 'definitions are present';
-is_deeply [grep { 0 == index $_, $ref_name_prefix } @definitions], [], 'no leaking of path';
+ my $file = path $workdir, 'spec', @$path;
+
+ my @expected = qw(age_json-SHA height unit_json-SHA weight_json-SHA);
+ $expected[0] = 'age_json-type-SHA' if $path->[0] eq 'test-definitions-key.json';
+
+ my $bundled = $jv->schema($file)->bundle;
+ is_deeply [sort map { s!-[a-z0-9]{10}$!-SHA!; $_ } keys %{$bundled->{definitions}}], \@expected,
+ "right definitions in disk spec @$path"
+ or diag join ', ', sort keys %{$bundled->{definitions}};
+ }
+};
+
+subtest 'ensure filenames with funny characters not mangled by Mojo::URL' => sub {
+ my $file3 = path $workdir, 'spec', 'space bundle.json';
+ my $bundled = eval { $jv->schema($file3)->bundle };
+ is $@, '', 'loaded absolute filename with space';
+ is $bundled->{properties}{age}{description}, 'Age in years', 'right definitions in disk spec'
+ or diag explain $bundled;
+};
+
+subtest 'extract subset of schema' => sub {
+ my $bundled = $jv->schema('data://main/bundled.json')->bundle({schema => $jv->get([qw(paths /withdots get)])});
+ is_deeply(
+ $bundled,
+ {
+ definitions => {objtype => {properties => {propname => {type => 'string'}}, type => 'object'}},
+ responses => {200 => {schema => {'$ref' => '#/definitions/objtype'}}}
+ },
+ 'subset of schema was bundled'
+ ) or diag explain $bundled;
+};
+
+subtest 'no leaking path' => sub {
+ my $bundled = $jv->schema('data://main/bundled.json')->bundle({schema => $jv->get([qw(paths /withdots get)])});
+ my $ref_name_prefix = $workdir;
+ $ref_name_prefix =~ s![^\w-]!_!g;
+ $jv->schema(path $workdir, 'spec', 'bundle-no-leaking-filename.json');
+ my @definitions = keys %{$bundled->{definitions}};
+ ok @definitions, 'definitions are present';
+ is_deeply [grep { 0 == index $_, $ref_name_prefix } @definitions], [], 'no leaking of path';
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/coerce.t new/JSON-Validator-4.13/t/coerce.t
--- old/JSON-Validator-4.12/t/coerce.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/coerce.t 2021-01-28 00:50:27.000000000 +0100
@@ -5,13 +5,11 @@
my $jv = JSON::Validator->new;
my %coerce = (booleans => 1);
-is_deeply($jv->coerce(%coerce)->coerce, {booleans => 1}, 'hash is accepted');
+is_deeply($jv->coerce(%coerce)->coerce, {booleans => 1}, 'hash is accepted');
is_deeply($jv->coerce(\%coerce)->coerce, {booleans => 1}, 'hash reference is accepted');
-note 'coerce(1) is here for back compat reasons, even though not documented any more';
-is_deeply($jv->coerce(1)->coerce, {%coerce, numbers => 1, strings => 1}, '1 is accepted');
-
note 'make sure input is coerced';
+is_deeply($jv->coerce('booleans,numbers,strings')->coerce, {%coerce, numbers => 1, strings => 1}, '1 is accepted');
my @items = ([boolean => 'true'], [integer => '42'], [number => '4.2']);
for my $i (@items) {
for my $schema (schemas($i->[0])) {
@@ -38,6 +36,6 @@
{type => ['array', $base->{type}]},
{allOf => [$base]},
{anyOf => [{type => 'array'}, $base]},
- {oneOf => [$base, {type => 'array'}]},
+ {oneOf => [$base, {type => 'array'}]},
);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/draft2019-09.t new/JSON-Validator-4.13/t/draft2019-09.t
--- old/JSON-Validator-4.12/t/draft2019-09.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/draft2019-09.t 2021-01-28 00:59:36.000000000 +0100
@@ -5,8 +5,10 @@
my $schema = JSON::Validator::Schema::Draft201909->new;
t::Helper->schema($schema);
-ok $schema->formats->{duration}, 'duration';
-ok $schema->formats->{uuid}, 'uuid';
+subtest 'formats' => sub {
+ ok $schema->formats->{duration}, 'duration';
+ ok $schema->formats->{uuid}, 'uuid';
+};
t::Helper->test(number => qw(basic maximum minimum));
t::Helper->test(array => qw(basic items additional_items contains min_max min_max_contains));
@@ -15,26 +17,28 @@
t::Helper->test(object => qw(additional_properties pattern_properties min_max names));
t::Helper->test(object => qw(dependent_required dependent_schemas unevaluated_properties));
-note 'anchor';
-$schema->data({'$ref' => '#foo', '$defs' => {'A' => {'$anchor' => 'foo', 'type' => 'integer'}}})->resolve;
-is $schema->data->{type}, 'integer', 'foo anchor type';
-
-note 'recursiveRef, without recursiveAnchor';
-my $jv = JSON::Validator->new->schema('data://main/tree.json');
-$jv->schema('data://main/recursiveRef.json');
-isa_ok $jv->schema, 'JSON::Validator::Schema::Draft201909';
-is $jv->schema->data->{type}, 'object', 'recursiveRef type';
-is $jv->schema->data->{properties}{data}, true, 'recursiveRef properties data';
-is $jv->schema->data->{properties}{children}{items}{type}, 'object', 'recursiveRef properties data items';
-is $jv->schema->data->{properties}{children}{items}{properties}{children}{items}{type}, 'object', 'recursive';
-is_deeply [sort keys %{$jv->store->schemas}],
- [qw(data://main/recursiveRef.json data://main/tree.json urn:recursiveRef urn:tree)], 'schemas in the store';
+subtest 'anchor' => sub {
+ $schema->data({'$ref' => '#foo', '$defs' => {'A' => {'$anchor' => 'foo', 'type' => 'integer'}}})->resolve;
+ is $schema->data->{type}, 'integer', 'foo anchor type';
+};
+
+subtest 'recursiveRef, without recursiveAnchor' => sub {
+ my $jv = JSON::Validator->new->schema('data://main/tree.json');
+ $jv->schema('data://main/recursiveRef.json');
+ isa_ok $jv->schema, 'JSON::Validator::Schema::Draft201909';
+ is $jv->schema->data->{type}, 'object', 'recursiveRef type';
+ is $jv->schema->data->{properties}{data}, true, 'recursiveRef properties data';
+ is $jv->schema->data->{properties}{children}{items}{type}, 'object', 'recursiveRef properties data items';
+ is $jv->schema->data->{properties}{children}{items}{properties}{children}{items}{type}, 'object', 'recursive';
+ is_deeply [sort keys %{$jv->store->schemas}],
+ [qw(data://main/recursiveRef.json data://main/tree.json urn:recursiveRef urn:tree)], 'schemas in the store';
+};
-{
+subtest 'test caching' => sub {
no warnings 'redefine';
local *JSON::Validator::_load_from_data = sub { die 'not cached' };
ok eval { JSON::Validator->new->schema('data://main/tree.json') }, 'cached' or diag $@;
-}
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/draft4.t new/JSON-Validator-4.13/t/draft4.t
--- old/JSON-Validator-4.12/t/draft4.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/draft4.t 2021-01-28 01:01:06.000000000 +0100
@@ -9,16 +9,19 @@
t::Helper->test(object => qw(basic properties));
t::Helper->test(object => qw(additional_properties pattern_properties min_max));
-note 'exclusiveMaximum';
-schema_validate_ok 2.4, {exclusiveMaximum => true, maximum => 2.4}, E('/', '2.4 >= maximum(2.4)');
+subtest 'exclusiveMaximum' => sub {
+ schema_validate_ok 2.4, {exclusiveMaximum => true, maximum => 2.4}, E('/', '2.4 >= maximum(2.4)');
+};
-note 'exclusiveMinimum';
-schema_validate_ok 0, {exclusiveMaximum => true, maximum => 0}, E('/', '0 >= maximum(0)');
+subtest 'exclusiveMinimum' => sub {
+ schema_validate_ok 0, {exclusiveMaximum => true, maximum => 0}, E('/', '0 >= maximum(0)');
+};
-note 'bundle';
-my $bundle = JSON::Validator::Schema::Draft4->new('data://main/spec.json')->bundle;
-is $bundle->data->{properties}{name}{'$ref'}, '#/definitions/_name', 'bundle ref';
-is $bundle->data->{'definitions'}{_name}{type}, 'string', 'bundled spec under definitions';
+subtest 'bundle' => sub {
+ my $bundle = JSON::Validator::Schema::Draft4->new('data://main/spec.json')->bundle;
+ is $bundle->data->{properties}{name}{'$ref'}, '#/definitions/_name', 'bundle ref';
+ is $bundle->data->{'definitions'}{_name}{type}, 'string', 'bundled spec under definitions';
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/draft6.t new/JSON-Validator-4.13/t/draft6.t
--- old/JSON-Validator-4.12/t/draft6.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/draft6.t 2021-01-28 01:01:06.000000000 +0100
@@ -9,12 +9,14 @@
t::Helper->test(object => qw(basic properties));
t::Helper->test(object => qw(additional_properties pattern_properties min_max names));
-note 'exclusiveMaximum';
-schema_validate_ok 2.4, {exclusiveMaximum => 2.4}, E('/', '2.4 >= maximum(2.4)');
-schema_validate_ok 0, {exclusiveMaximum => 0}, E('/', '0 >= maximum(0)');
+subtest 'exclusiveMaximum' => sub {
+ schema_validate_ok 2.4, {exclusiveMaximum => 2.4}, E('/', '2.4 >= maximum(2.4)');
+ schema_validate_ok 0, {exclusiveMaximum => 0}, E('/', '0 >= maximum(0)');
+};
-note 'exclusiveMinimum';
-schema_validate_ok 4.2, {exclusiveMinimum => 4.2}, E('/', '4.2 <= minimum(4.2)');
-schema_validate_ok 0, {exclusiveMinimum => 0}, E('/', '0 <= minimum(0)');
+subtest 'exclusiveMinimum' => sub {
+ schema_validate_ok 4.2, {exclusiveMinimum => 4.2}, E('/', '4.2 <= minimum(4.2)');
+ schema_validate_ok 0, {exclusiveMinimum => 0}, E('/', '0 <= minimum(0)');
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/draft7.t new/JSON-Validator-4.13/t/draft7.t
--- old/JSON-Validator-4.12/t/draft7.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/draft7.t 2021-01-28 01:01:06.000000000 +0100
@@ -10,18 +10,21 @@
t::Helper->test(object => qw(basic properties));
t::Helper->test(object => qw(additional_properties pattern_properties min_max names));
-note 'exclusiveMaximum';
-schema_validate_ok 2.4, {exclusiveMaximum => 2.4}, E('/', '2.4 >= maximum(2.4)');
-schema_validate_ok 0, {exclusiveMaximum => 0}, E('/', '0 >= maximum(0)');
+subtest 'exclusiveMaximum' => sub {
+ schema_validate_ok 2.4, {exclusiveMaximum => 2.4}, E('/', '2.4 >= maximum(2.4)');
+ schema_validate_ok 0, {exclusiveMaximum => 0}, E('/', '0 >= maximum(0)');
+};
-note 'exclusiveMinimum';
-schema_validate_ok 4.2, {exclusiveMinimum => 4.2}, E('/', '4.2 <= minimum(4.2)');
-schema_validate_ok 0, {exclusiveMinimum => 0}, E('/', '0 <= minimum(0)');
+subtest 'exclusiveMinimum' => sub {
+ schema_validate_ok 4.2, {exclusiveMinimum => 4.2}, E('/', '4.2 <= minimum(4.2)');
+ schema_validate_ok 0, {exclusiveMinimum => 0}, E('/', '0 <= minimum(0)');
+};
-note 'bundle';
-my $bundle = JSON::Validator::Schema::Draft7->new('data://main/spec.json')->bundle;
-is $bundle->data->{properties}{name}{'$ref'}, '#/$defs/_name', 'bundle ref';
-is $bundle->data->{'$defs'}{_name}{type}, 'string', 'bundled spec under $defs';
+subtest 'bundle' => sub {
+ my $bundle = JSON::Validator::Schema::Draft7->new('data://main/spec.json')->bundle;
+ is $bundle->data->{properties}{name}{'$ref'}, '#/$defs/_name', 'bundle ref';
+ is $bundle->data->{'$defs'}{_name}{type}, 'string', 'bundled spec under $defs';
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/formats.t new/JSON-Validator-4.13/t/formats.t
--- old/JSON-Validator-4.12/t/formats.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/formats.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-use Mojo::Base -strict;
-use Test::More;
-
-BEGIN { use_ok('JSON::Validator::Formats'); }
-
-note 'byte';
-is JSON::Validator::Formats::check_byte('amh0aG9yc2Vu'), undef, 'byte amh0aG9yc2Vu';
-is JSON::Validator::Formats::check_byte("\0"), 'Does not match byte format.', 'byte null';
-
-note 'date';
-is JSON::Validator::Formats::check_date('2019-06-11'), undef, 'date 2019-06-11';
-is JSON::Validator::Formats::check_date('0000-00-00'), 'Month out of range.', 'date 0000-00-00';
-is JSON::Validator::Formats::check_date('0000-01-00'), 'Day out of range.', 'date 0000-01-00';
-is JSON::Validator::Formats::check_date('2014-12-09T20:49:37Z'), 'Does not match date format.',
- 'date 2014-12-09T20:49:37Z';
-is JSON::Validator::Formats::check_date('1-1-1'), 'Does not match date format.', 'date 1-1-1';
-is JSON::Validator::Formats::check_date('09-12-2014'), 'Does not match date format.', 'date 09-12-2014';
-is JSON::Validator::Formats::check_date('2014-DEC-09'), 'Does not match date format.', 'date 2014-DEC-09';
-is JSON::Validator::Formats::check_date('2014/04/09'), 'Does not match date format.', 'date 2014/04/09';
-
-{
- note 'double';
- local $TODO = 'cannot test double, since input is already rounded';
- is JSON::Validator::Formats::check_double('1.1000000238418599085576943252817727625370025634765626'), undef, 'double';
-}
-
-note 'email';
-is JSON::Validator::Formats::check_email('doe(a)example.org'), undef, 'email doe(a)example.org';
-is JSON::Validator::Formats::check_email('doe'), 'Does not match email format.', 'email doe';
-
-note 'float';
-is JSON::Validator::Formats::check_float(-1.10000002384186), undef, 'float -1.10000002384186';
-is JSON::Validator::Formats::check_float(1.10000002384186), undef, 'float 1.10000002384186';
-
-note 'int32';
-is JSON::Validator::Formats::check_int32(-2147483648), undef, 'int32 -2147483648';
-is JSON::Validator::Formats::check_int32(2147483647), undef, 'int32 2147483647';
-is JSON::Validator::Formats::check_int32(2147483648), 'Does not match int32 format.', 'int32 2147483648';
-
-SKIP: {
- note 'int64';
- skip 'Not a 64 bit Perl' unless JSON::Validator::Formats::IV_SIZE >= 8;
- is JSON::Validator::Formats::check_int64(-9223372036854775808), undef, 'int64 -9223372036854775808';
- is JSON::Validator::Formats::check_int64(9223372036854775807), undef, 'int64 9223372036854775807';
- is JSON::Validator::Formats::check_int64(9223372036854775808), 'Does not match int64 format.',
- 'int64 9223372036854775808';
-}
-
-note 'time';
-is JSON::Validator::Formats::check_time($_), undef, "time $_"
- for qw(23:02:55.831Z 23:02:55.01z 23:02:55-12:00 23:02:55+05:00);
-
-done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/jv-allof-and-not.t new/JSON-Validator-4.13/t/jv-allof-and-not.t
--- old/JSON-Validator-4.12/t/jv-allof-and-not.t 2020-09-28 03:07:46.000000000 +0200
+++ new/JSON-Validator-4.13/t/jv-allof-and-not.t 2021-01-28 01:15:56.000000000 +0100
@@ -1,29 +1,31 @@
use lib '.';
use t::Helper;
-note 'Property "required" must be present';
my $missing = E '/required', '/allOf/0 Missing property.';
my $schema = {type => 'object', allOf => [{required => ['required']}]};
-
-my @tests = (
+my @tests = (
[{foo => 1, required => 2}, $schema],
[{foo => 2, forbidden => 3}, $schema, $missing],
[{foo => 3, forbidden => 3, required => 2}, $schema],
[{foo => 4}, $schema, $missing]
);
-validate_ok @$_ for @tests;
-
-note 'Property "forbidden" must not be present';
-$schema->{not} = {required => ['forbidden']};
-splice @{$tests[1]}, 2, 0, E '/', 'Should not match.';
-$tests[2][2] = E '/', 'Should not match.';
-validate_ok @$_ for @tests;
-
-note 'Move "not" constraint to "allOf"';
-push @{$schema->{allOf}}, {not => delete $schema->{not}};
-$tests[1][2] = $tests[2][2] = E '/', '/allOf/1 Should not match.';
-$tests[1][3] = $missing;
-validate_ok @$_ for @tests;
+subtest 'property "required" must be present' => sub {
+ validate_ok @$_ for @tests;
+};
+
+subtest 'Property "forbidden" must not be present' => sub {
+ $schema->{not} = {required => ['forbidden']};
+ splice @{$tests[1]}, 2, 0, E '/', 'Should not match.';
+ $tests[2][2] = E '/', 'Should not match.';
+ validate_ok @$_ for @tests;
+};
+
+subtest 'Move "not" constraint to "allOf"' => sub {
+ push @{$schema->{allOf}}, {not => delete $schema->{not}};
+ $tests[1][2] = $tests[2][2] = E '/', '/allOf/1 Should not match.';
+ $tests[1][3] = $missing;
+ validate_ok @$_ for @tests;
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/jv-basic.t new/JSON-Validator-4.13/t/jv-basic.t
--- old/JSON-Validator-4.12/t/jv-basic.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/jv-basic.t 2021-01-28 01:28:15.000000000 +0100
@@ -3,13 +3,12 @@
sub j { Mojo::JSON::decode_json(Mojo::JSON::encode_json($_[0])); }
-validate_ok j($_), {type => 'any'} for undef, [], {}, 123, 'foo';
+validate_ok j($_), {type => 'any'} for undef, [], {}, 123, 'foo';
validate_ok j(undef), {type => 'null'};
-validate_ok j(1), {type => 'null'}, E('/', 'Expected null - got number.');
+validate_ok j(1), {type => 'null'}, E('/', 'Expected null - got number.');
validate_ok($_, {}) foreach (true, false, 1, 1.2, 'a string', {a => 'b'}, [1, 2, 3]);
-note 'TODO! true, false are draft 6+ only';
validate_ok($_, true) foreach (true, false, 1, 1.2, 'a string', {a => 'b'}, [1, 2, 3]);
validate_ok($_, false, E('/', 'Should not match.')) foreach (true, false, 1, 1.2, 'a string', {a => 'b'}, [1, 2, 3]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/jv-formats.t new/JSON-Validator-4.13/t/jv-formats.t
--- old/JSON-Validator-4.12/t/jv-formats.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/jv-formats.t 2021-01-28 10:20:53.000000000 +0100
@@ -4,7 +4,13 @@
my $schema = {type => 'object', properties => {v => {type => 'string'}}};
-{
+subtest 'byte' => sub {
+ local $schema->{properties}{v}{format} = 'byte';
+ validate_ok {v => 'amh0aG9yc2Vu'}, $schema;
+ validate_ok {v => "\0"}, $schema, E('/v', 'Does not match byte format.');
+};
+
+subtest 'date' => sub {
local $schema->{properties}{v}{format} = 'date';
validate_ok {v => '2014-12-09'}, $schema;
validate_ok {v => '0000-00-00'}, $schema, E('/v', 'Month out of range.');
@@ -14,31 +20,48 @@
validate_ok {v => '09-12-2014'}, $schema, E('/v', 'Does not match date format.');
validate_ok {v => '09-DEC-2014'}, $schema, E('/v', 'Does not match date format.');
validate_ok {v => '09/12/2014'}, $schema, E('/v', 'Does not match date format.');
-}
+};
-{
+subtest 'date-time' => sub {
local $schema->{properties}{v}{format} = 'date-time';
validate_ok {v => $_}, $schema
for ('2017-03-29T23:02:55.831Z', '2017-03-29t23:02:55.01z', '2017-03-29 23:02:55-12:00',
- '2016-02-29T23:02:55+05:00');
+ '2016-02-29T23:02:55+05:00', '2006-01-02 15:04:05+23:59', '2006-01-02 15:04:05-23:59');
- validate_ok {v => 'xxxx-xx-xxtxx:xx:xxz'}, $schema, E('/v', 'Does not match date-time format.');
- validate_ok {v => '2017-03-29\t23:02:55-12:00'}, $schema, E('/v', 'Does not match date-time format.');
- validate_ok {v => '2017-03-29T23:02:60Z'}, $schema, E('/v', 'Second out of range.');
- validate_ok {v => '2017-03-29T23:61:55Z'}, $schema, E('/v', 'Minute out of range.');
- validate_ok {v => '2017-03-29T24:02:55Z'}, $schema, E('/v', 'Hour out of range.');
- validate_ok {v => '2017-03-32T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
- validate_ok {v => '2017-02-30T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
- validate_ok {v => '2017-02-29T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
- validate_ok {v => '2017-03-00T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
- validate_ok {v => '2017-13-29T23:02:55Z'}, $schema, E('/v', 'Month out of range.');
- validate_ok {v => '2017-00-29T23:02:55Z'}, $schema, E('/v', 'Month out of range.');
-}
+ validate_ok {v => "2017-03-29\t23:02:55-12:00"}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29T23:02:55+0:0'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29T23:02:55+123:00'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29\t23:02:55+0:0'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29\t23:02:55+123:00'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29\t23:02:55-12'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29\t23:02:55-12:00'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => '2017-03-29T23:02:55-12'}, $schema, E('/v', 'Does not match date-time format.');
+ validate_ok {v => 'xxxx-xx-xxtxx:xx:xxz'}, $schema, E('/v', 'Does not match date-time format.');
+
+ validate_ok {v => '2017-03-29T23:02:60Z'}, $schema, E('/v', 'Second out of range.');
+ validate_ok {v => '2017-03-29T23:61:55Z'}, $schema, E('/v', 'Minute out of range.');
+ validate_ok {v => '2017-03-29T24:02:55Z'}, $schema, E('/v', 'Hour out of range.');
+ validate_ok {v => '2017-03-32T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
+ validate_ok {v => '2017-02-29T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
+ validate_ok {v => '2017-02-30T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
+ validate_ok {v => '2017-03-00T23:02:55Z'}, $schema, E('/v', 'Day out of range.');
+ validate_ok {v => '2017-00-29T23:02:55Z'}, $schema, E('/v', 'Month out of range.');
+ validate_ok {v => '2017-13-29T23:02:55Z'}, $schema, E('/v', 'Month out of range.');
+
+ validate_ok {v => '2017-03-29T23:02:55+23:60'}, $schema, E('/v', 'Time offset minute out of range.');
+ validate_ok {v => '2017-03-29T23:02:55+24:00'}, $schema, E('/v', 'Time offset hour out of range.');
+};
+
+subtest 'double' => sub {
+ local $schema->{properties}{v}{format} = 'double';
+ local $TODO = 'cannot test double, since input is already rounded';
+ validate_ok {v => '1.1000000238418599085576943252817727625370025634765626'}, $schema;
+};
-{
+subtest 'duration' => sub {
local $schema->{properties}{v}{format} = 'duration';
- validate_ok {v => 'foo'}, $schema, E('/v', 'Does not match duration format.');
+ validate_ok {v => 'foo'}, $schema, E('/v', 'Does not match duration format.');
validate_ok {v => 'P4Y'}, $schema;
validate_ok {v => 'PT0S'}, $schema;
validate_ok {v => 'P1M'}, $schema;
@@ -47,129 +70,151 @@
validate_ok {v => 'PT0,5M'}, $schema;
validate_ok {v => 'P23DT23H'}, $schema;
validate_ok {v => 'P3Y6M4DT12H30M5S'}, $schema;
-}
+};
-{
+subtest 'email' => sub {
local $schema->{properties}{v}{format} = 'email';
validate_ok {v => 'jhthorsen(a)cpan.org'}, $schema;
validate_ok {v => 'foo'}, $schema, E('/v', 'Does not match email format.');
validate_ok {v => '������@������.������'}, $schema, E('/v', 'Does not match email format.');
-}
+};
+
+subtest 'float' => sub {
+ local $schema->{properties}{v}{format} = 'float';
+ validate_ok {v => '-1.10000002384186'}, $schema;
+ validate_ok {v => '1.10000002384186'}, $schema;
+};
+
+subtest 'int32' => sub {
+ local $schema->{properties}{v}{format} = 'int32';
+ validate_ok {v => '-2147483648'}, $schema;
+ validate_ok {v => '2147483647'}, $schema;
+ validate_ok {v => '2147483648'}, $schema, E('/v', 'Does not match int32 format.');
+};
+
+subtest 'int64' => sub {
+ local $schema->{properties}{v}{format} = 'int64';
+ local $TODO = 'Not a 64 bit Perl' unless JSON::Validator::Formats::IV_SIZE >= 8;
+ validate_ok {v => '-9223372036854775808'}, $schema;
+ validate_ok {v => '9223372036854775807'}, $schema;
+ validate_ok {v => '9223372036854775808'}, $schema, E('/v', 'Does not match int64 format.');
+};
-{
+subtest 'hostname' => sub {
local $TODO = eval 'require Data::Validate::Domain;1' ? undef : 'Missing module';
local $schema->{properties}{v}{format} = 'hostname';
validate_ok {v => 'mojolicio.us'}, $schema;
validate_ok {v => '[]'}, $schema, E('/v', 'Does not match hostname format.');
-}
+};
-{
+subtest 'idn-email' => sub {
validate_ok {v => decode('UTF-8', '������@������.������')}, $schema;
local $TODO = eval 'require Net::IDN::Encode;1' ? undef : 'Missing module';
local $schema->{properties}{v}{format} = 'idn-email';
validate_ok {v => decode('UTF-8', '������@')}, $schema, E('/v', 'Does not match idn-email format.');
-}
+};
-{
+subtest 'idn-hostname' => sub {
local $schema->{properties}{v}{format} = 'idn-hostname';
validate_ok {v => decode('UTF-8', '������.������')}, $schema;
-}
+};
-{
+subtest 'iri' => sub {
local $schema->{properties}{v}{format} = 'iri';
validate_ok {v => 'http://mojolicio.us/?��=123'}, $schema;
validate_ok {v => decode('UTF-8', 'https://������.������/�����������')}, $schema;
validate_ok {v => '/�����������'}, $schema, E('/v', 'Scheme missing.');
-}
+};
-{
+subtest 'iri-reference' => sub {
local $schema->{properties}{v}{format} = 'iri-reference';
validate_ok {v => '/�����������'}, $schema;
validate_ok {v => '�����������'}, $schema;
- validate_ok {v => 'http:///�����������'}, $schema,
-}
+ validate_ok {v => 'http:///�����������'}, $schema,;
+};
-{
+subtest 'ipv4' => sub {
local $TODO = eval 'require Data::Validate::IP;1' ? undef : 'Missing module';
local $schema->{properties}{v}{format} = 'ipv4';
validate_ok {v => '255.100.30.1'}, $schema;
validate_ok {v => '300.0.0.0'}, $schema, E('/v', 'Does not match ipv4 format.');
-}
+};
-{
+subtest 'ipv6' => sub {
local $TODO = eval 'require Data::Validate::IP;1' ? undef : 'Missing module';
local $schema->{properties}{v}{format} = 'ipv6';
validate_ok {v => '::1'}, $schema;
validate_ok {v => '300.0.0.0'}, $schema, E('/v', 'Does not match ipv6 format.');
-}
+};
-{
+subtest 'json-pointer' => sub {
local $schema->{properties}{v}{format} = 'json-pointer';
validate_ok {v => ''}, $schema;
validate_ok {v => '/foo/bar'}, $schema;
validate_ok {v => 'foo/bar'}, $schema, E('/v', 'Does not match json-pointer format.');
-}
+};
-{
+subtest 'regex' => sub {
local $schema->{properties}{v}{format} = 'regex';
validate_ok {v => '(\w+)'}, $schema;
validate_ok {v => '(\w'}, $schema, E('/v', 'Does not match regex format.');
-}
+};
-{
+subtest 'relative-json-pointer' => sub {
local $schema->{properties}{v}{format} = 'relative-json-pointer';
validate_ok {v => '0'}, $schema;
validate_ok {v => '42#'}, $schema;
validate_ok {v => '100/foo/bar'}, $schema;
validate_ok {v => '#'}, $schema, E('/v', 'Relative JSON Pointer must start with a non-negative-integer.');
validate_ok {v => '42foo/bar'}, $schema, E('/v', 'Does not match relative-json-pointer format.');
-}
+};
-{
+subtest 'time' => sub {
local $schema->{properties}{v}{format} = 'time';
validate_ok {v => $_}, $schema for qw(23:02:55.831Z 23:02:55.01z 23:02:55-12:00 23:02:55+05:00);
validate_ok {v => 'xx:xx:xxz'}, $schema, E('/v', 'Does not match time format.');
validate_ok {v => '23:02:60Z'}, $schema, E('/v', 'Second out of range.');
validate_ok {v => '23:61:55Z'}, $schema, E('/v', 'Minute out of range.');
validate_ok {v => '24:02:55Z'}, $schema, E('/v', 'Hour out of range.');
-}
+};
-{
+subtest 'uri' => sub {
local $schema->{properties}{v}{format} = 'uri';
- validate_ok {v => '//example.com/no-scheme'}, $schema, E('/v', 'Scheme missing.');
- validate_ok {v => ''}, $schema, E('/v', 'Scheme, path or fragment are required.');
- validate_ok {v => '0://mojolicio.us/?x=123'}, $schema, E('/v', 'Scheme must begin with a letter.');
- validate_ok {v => 'http://example.com/%z'}, $schema, E('/v', 'Invalid hex escape.');
- validate_ok {v => 'http://example.com/%a'}, $schema, E('/v', 'Hex escapes are not complete.');
- validate_ok {v => 'http:////'}, $schema, E('/v', 'Path cannot not start with //.');
+ validate_ok {v => '//example.com/no-scheme'}, $schema, E('/v', 'Scheme missing.');
+ validate_ok {v => ''}, $schema, E('/v', 'Scheme, path or fragment are required.');
+ validate_ok {v => '0://mojolicio.us/?x=123'}, $schema, E('/v', 'Scheme must begin with a letter.');
+ validate_ok {v => 'http://example.com/%z'}, $schema, E('/v', 'Invalid hex escape.');
+ validate_ok {v => 'http://example.com/%a'}, $schema, E('/v', 'Hex escapes are not complete.');
+ validate_ok {v => 'http:////'}, $schema, E('/v', 'Path cannot not start with //.');
validate_ok {v => 'http://mojolicio.us/?x=123'}, $schema;
+ validate_ok {v => '/relative-path'}, $schema;
+ validate_ok {v => 'relative-path'}, $schema;
+};
- note 'TODO: relative paths should only be valid in draft4';
- validate_ok {v => '/relative-path'}, $schema;
- validate_ok {v => 'relative-path'}, $schema;
-}
-
-{
+subtest 'uri-reference' => sub {
local $schema->{properties}{v}{format} = 'uri-reference';
validate_ok {v => 'http:///whatever'}, $schema;
validate_ok {v => '/relative-path'}, $schema;
validate_ok {v => 'relative-path'}, $schema;
-}
+};
-{
+subtest 'uri-template' => sub {
local $schema->{properties}{v}{format} = 'uri-template';
validate_ok {v => 'http://mojolicio.us/?x={x}'}, $schema;
-}
+};
-{
+subtest 'unknown' => sub {
+ my $warn = 'no warnings seen';
+ local $SIG{__WARN__} = sub { $warn = shift };
local $schema->{properties}{v}{format} = 'unknown';
validate_ok {v => 'whatever'}, $schema;
-}
+ like $warn, qr{Format rule for 'unknown' is missing}, 'unknown format cause a warning';
+};
-{
+subtest 'uuid' => sub {
local $schema->{properties}{v}{format} = 'uuid';
validate_ok {v => '5782165B-6BB6-A72F-B3DD-369D707D6C72'}, $schema, E('/v', 'Does not match uuid format.');
validate_ok {v => '5782165B-6BB6-472F-B3DD-369D707D6C72'}, $schema;
-}
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/jv-object.t new/JSON-Validator-4.13/t/jv-object.t
--- old/JSON-Validator-4.12/t/jv-object.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/jv-object.t 2021-01-28 01:24:49.000000000 +0100
@@ -3,13 +3,13 @@
my $schema;
-{
+subtest 'basic' => sub {
$schema = {type => 'object'};
validate_ok {mynumber => 1}, $schema;
validate_ok [1], $schema, E('/', 'Expected object - got array.');
-}
+};
-{
+subtest 'patternProperties' => sub {
$schema->{properties} = {
number => {type => 'number'},
street_name => {type => 'string'},
@@ -24,41 +24,34 @@
validate_ok {number => 1600, street_name => 'Pennsylvania', street_type => 'Avenue', direction => 'NW'}, $schema;
validate_ok {'S_25' => 'This is a string', 'I_0' => 42}, $schema;
validate_ok {'S_0' => 42}, $schema, E('/S_0', 'Expected string - got number.');
-}
+};
-{
- local $TODO = 't/openapi-set-request.t fails because of some oneOf logic';
- my $data = {};
- validate_ok $data, {type => 'object', properties => {number => {type => 'number', default => 42}}};
- is $data->{number}, 42, 'default value was set';
-}
-
-{
+subtest 'additionalProperties' => sub {
local $schema->{additionalProperties} = 0;
validate_ok {number => 1600, street_name => 'Pennsylvania', street_type => 'Avenue', direction => 'NW',
foo => 'nope'}, $schema, E('/', 'Properties not allowed: direction, foo.');
$schema->{additionalProperties} = {type => 'string'};
validate_ok {number => 1600, street_name => 'Pennsylvania', street_type => 'Avenue', direction => 'NW'}, $schema;
-}
+};
-{
+subtest 'required' => sub {
local $schema->{required} = ['number', 'street_name'];
validate_ok {number => 1600, street_type => 'Avenue'}, $schema, E('/street_name', 'Missing property.');
-}
+};
-{
+subtest 'minProperties maxProperties' => sub {
$schema = {type => 'object', minProperties => 1};
validate_ok {}, $schema, E('/', 'Not enough properties: 0/1.');
$schema = {type => 'object', minProperties => 2, maxProperties => 3};
validate_ok {a => 1}, $schema, E('/', 'Not enough properties: 1/2.');
validate_ok {a => 1, b => 2}, $schema;
validate_ok {a => 1, b => 2, c => 3, d => 4}, $schema, E('/', 'Too many properties: 4/3.');
-}
+};
-{
+subtest 'dependencies' => sub {
$schema = {
- type => 'object',
+ type => 'object',
properties =>
{name => {type => 'string'}, credit_card => {type => 'number'}, billing_address => {type => 'string'}},
required => ['name'],
@@ -71,9 +64,9 @@
E('/billing_address', 'Missing property. Dependee: credit_card.');
$schema = {
- type => 'object',
- properties => {name => {type => 'string'}, credit_card => {type => 'number'}},
- required => ['name'],
+ type => 'object',
+ properties => {name => {type => 'string'}, credit_card => {type => 'number'}},
+ required => ['name'],
dependencies =>
{credit_card => {properties => {billing_address => {type => 'string'}}, required => ['billing_address']}},
};
@@ -82,70 +75,82 @@
validate_ok {name => 'John Doe', billing_address => '123 Main St'}, $schema;
validate_ok {name => 'John Doe', credit_card => 5555555555555555}, $schema,
E('/billing_address', 'Missing property.');
-}
-{
+ $schema = {dependencies => {bar => ['foo']}};
+ validate_ok {bar => 2}, $schema, E('/foo', 'Missing property. Dependee: bar.');
+
+ validate_ok {FOO => 1},
+ {
+ type => 'object',
+ propertyNames =>
+ {anyOf => [{type => 'string', enum => ['foo', 'bar', 'baz']}, {type => 'string', enum => ['hello']}]},
+ additionalProperties => {type => 'integer'},
+ },
+ E('/', '/propertyName/FOO /anyOf/0 Not in enum list: foo, bar, baz.'),
+ E('/', '/propertyName/FOO /anyOf/1 Not in enum list: hello.');
+};
+
+subtest 'patternProperties' => sub {
my $schema = {type => 'object', properties => {name => {type => 'string'}}};
validate_ok {}, $schema; # does not matter
ok !$schema->{patternProperties}, 'patternProperties was not added issue#47';
-}
+};
-{
+subtest 'propertyNames' => sub {
my $schema = {propertyNames => {minLength => 3, maxLength => 5}};
validate_ok {name => 'John', surname => 'Doe'}, $schema, E('/', '/propertyName/surname String is too long: 7/5.');
$schema->{propertyNames}{maxLength} = 7;
validate_ok {name => 'John', surname => 'Doe'}, $schema;
-}
+};
-sub TO_JSON { return {age => shift->{age}} }
-my $obj = bless {age => 'not_a_string'}, 'main';
-validate_ok $obj, {properties => {age => {type => 'integer'}}},
- E('/age', 'Expected integer - got string.', 'age is not a string');
-
-my $object_constant = {type => 'object', const => {a => 1}};
-validate_ok {a => 1}, $object_constant;
-validate_ok {b => 1}, $object_constant, E('/', q{Does not match const: {"a":1}.});
-
-
-validate_ok {foo => 'bar'}, {type => 'object', required => ['foo'], %$_} foreach { properties => {foo => {}} }
-, {additionalProperties => {}}, {patternProperties => {foo => {}}};
-
-validate_ok {foo => 'bar'}, {definitions => {my_true_ref => {}}, type => 'object', required => ['foo'], %$_}
- foreach { properties => {foo => {'$ref' => '#/definitions/my_true_ref'}} }
-, {additionalProperties => {'$ref' => '#/definitions/my_true_ref'}},
- {patternProperties => {foo => {'$ref' => '#/definitions/my_true_ref'}}};
-
-# TODO! true, false are draft 6+ only
-validate_ok {foo => 'bar'}, {type => 'object', required => ['foo'], %$_} foreach { properties => {foo => true} }
-, {additionalProperties => true}, {patternProperties => {foo => true}};
-
-validate_ok {foo => 'bar'}, {definitions => {my_true_ref => true}, type => 'object', required => ['foo'], %$_}
- foreach { properties => {foo => {'$ref' => '#/definitions/my_true_ref'}} }
-, {additionalProperties => {'$ref' => '#/definitions/my_true_ref'}},
- {patternProperties => {foo => {'$ref' => '#/definitions/my_true_ref'}}};
-
-validate_ok {foo => 'bar'}, {type => 'object', required => ['foo'], %$_}, E('/foo', 'Should not match.')
- foreach { properties => {foo => false} }
-, {patternProperties => {foo => false}};
-
-validate_ok {foo => 'bar'}, {definitions => {my_false_ref => false}, type => 'object', required => ['foo'], %$_},
- E('/foo', 'Should not match.')
- foreach { properties => {foo => {'$ref' => '#/definitions/my_false_ref'}} }
-, {additionalProperties => {'$ref' => '#/definitions/my_false_ref'}},
- {patternProperties => {foo => {'$ref' => '#/definitions/my_false_ref'}}};
-
-$schema = {dependencies => {bar => ['foo']}};
-validate_ok {bar => 2}, $schema, E('/foo', 'Missing property. Dependee: bar.');
-
-validate_ok {FOO => 1},
- {
- type => 'object',
- propertyNames =>
- {anyOf => [{type => 'string', enum => ['foo', 'bar', 'baz']}, {type => 'string', enum => ['hello']}]},
- additionalProperties => {type => 'integer'},
- },
- E('/', '/propertyName/FOO /anyOf/0 Not in enum list: foo, bar, baz.'),
- E('/', '/propertyName/FOO /anyOf/1 Not in enum list: hello.');
+subtest 'TO_JSON' => sub {
+ my $obj = bless {age => 'not_a_string'}, 'main';
+ validate_ok $obj, {properties => {age => {type => 'integer'}}},
+ E('/age', 'Expected integer - got string.', 'age is not a string');
+};
+
+subtest 'const' => sub {
+ my $object_constant = {type => 'object', const => {a => 1}};
+ validate_ok {a => 1}, $object_constant;
+ validate_ok {b => 1}, $object_constant, E('/', q{Does not match const: {"a":1}.});
+};
+
+subtest 'boolean schemas' => sub {
+ validate_ok {foo => 'bar'}, {type => 'object', required => ['foo'], %$_}
+ for ({properties => {foo => {}}}, {additionalProperties => {}}, {patternProperties => {foo => {}}});
+
+ validate_ok {foo => 'bar'},
+ {definitions => {my_true_ref => {}}, type => 'object', required => ['foo'], %$_}
+ for (
+ {properties => {foo => {'$ref' => '#/definitions/my_true_ref'}}},
+ {additionalProperties => {'$ref' => '#/definitions/my_true_ref'}},
+ {patternProperties => {foo => {'$ref' => '#/definitions/my_true_ref'}}},
+ );
+
+ validate_ok {foo => 'bar'}, {type => 'object', required => ['foo'], %$_}
+ for ({properties => {foo => true}}, {additionalProperties => true}, {patternProperties => {foo => true}});
+
+ validate_ok {foo => 'bar'},
+ {definitions => {my_true_ref => true}, type => 'object', required => ['foo'], %$_}
+ for (
+ {properties => {foo => {'$ref' => '#/definitions/my_true_ref'}}},
+ {additionalProperties => {'$ref' => '#/definitions/my_true_ref'}},
+ {patternProperties => {foo => {'$ref' => '#/definitions/my_true_ref'}}},
+ );
+
+ validate_ok {foo => 'bar'}, {type => 'object', required => ['foo'], %$_}, E('/foo', 'Should not match.')
+ for ({properties => {foo => false}}, {patternProperties => {foo => false}});
+
+ validate_ok {foo => 'bar'}, {definitions => {my_false_ref => false}, type => 'object', required => ['foo'], %$_},
+ E('/foo', 'Should not match.')
+ for (
+ {properties => {foo => {'$ref' => '#/definitions/my_false_ref'}}},
+ {additionalProperties => {'$ref' => '#/definitions/my_false_ref'}},
+ {patternProperties => {foo => {'$ref' => '#/definitions/my_false_ref'}}},
+ );
+};
done_testing;
+
+sub TO_JSON { return {age => shift->{age}} }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/load-from-app.t new/JSON-Validator-4.13/t/load-from-app.t
--- old/JSON-Validator-4.12/t/load-from-app.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/load-from-app.t 2021-01-28 00:50:27.000000000 +0100
@@ -5,6 +5,7 @@
my $jv = JSON::Validator->new;
$jv->ua->server->app(Mojolicious->new);
+$jv->ua->server->app->log(Mojo::Log->new->level('fatal'));
$jv->ua->server->app->routes->get(
'/spec' => sub {
my $c = shift;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/openapiv2-basic.t new/JSON-Validator-4.13/t/openapiv2-basic.t
--- old/JSON-Validator-4.12/t/openapiv2-basic.t 2021-01-24 05:50:55.000000000 +0100
+++ new/JSON-Validator-4.13/t/openapiv2-basic.t 2021-01-28 01:30:45.000000000 +0100
@@ -7,90 +7,104 @@
my $schema = JSON::Validator::Schema::OpenAPIv2->new;
my ($body, @errors);
-is $schema->specification, 'http://swagger.io/v2/schema.json', 'specification';
-is_deeply $schema->coerce, {booleans => 1, numbers => 1, strings => 1}, 'default coercion';
+subtest 'basic' => sub {
+ is $schema->specification, 'http://swagger.io/v2/schema.json', 'specification';
+ is_deeply $schema->coerce, {booleans => 1, numbers => 1, strings => 1}, 'default coercion';
+
+ eval {
+ my $s = JSON::Validator->new->schema('data://main/spec-resolve-refs.json')->schema->resolve;
+ is $s->get([qw(paths /user get responses 200 schema type)]), 'object', 'resolved "User"';
+ } or do {
+ diag $@;
+ ok 0, 'Could not resolve "User"';
+ };
-note 'jv->schema';
-$schema = JSON::Validator->new->schema($cwd->child(qw(spec v2-petstore.json)))->schema->resolve;
-isa_ok $schema, 'JSON::Validator::Schema::OpenAPIv2';
-
-note 'validate schema';
-@errors = @{JSON::Validator->new->schema({swagger => '2.0', paths => {}})->schema->errors};
-is "@errors", '/info: Missing property.', 'invalid schema';
-
-note 'parameters_for_request';
-is $schema->parameters_for_request([GET => '/pets/nope']), undef, 'no such path';
-cmp_deeply $schema->parameters_for_request([GET => '/pets']), [superhashof({in => 'query', name => 'limit'})],
- 'parameters_for_request inside path';
-cmp_deeply $schema->parameters_for_request([post => '/pets']),
- [superhashof({in => 'body', name => 'body', accepts => ['application/json']})], 'parameters_for_request for body';
-cmp_deeply $schema->parameters_for_request([get => '/pets/{petId}']), [superhashof({in => 'path', name => 'petId'})],
- 'parameters_for_request inside method';
-
-note 'parameters_for_response';
-is $schema->parameters_for_response([GET => '/pets/nope']), undef, 'no such path';
-cmp_deeply $schema->parameters_for_response([GET => '/pets']),
- [
- superhashof({in => 'header', name => 'x-next'}),
- superhashof({in => 'body', name => 'body', accepts => ['application/json']}),
- ],
- 'parameters_for_request inside path and default response code';
-cmp_deeply $schema->parameters_for_response([GET => '/pets', 404]),
- [superhashof({in => 'body', name => 'body', accepts => ['application/json']})], 'default response';
-
-note 'validate_request';
-@errors = $schema->validate_request([get => '/pets'], {query => {limit => 10, foo => '42'}});
-is "@errors", '', 'limit ok, even as string';
-
-@errors = $schema->validate_request([get => '/pets'], {query => {limit => 'foo'}});
-is "@errors", '/limit: Expected integer - got string.', 'limit failed';
-
-$body = {exists => 0};
-@errors = $schema->validate_request([POST => '/pets'], {body => \&body});
-is "@errors", '/body: Missing property.', 'default content type, but missing body';
-is_deeply $body, {content_type => 'application/json', exists => 0, in => 'body', name => 'body', valid => 0},
- 'input was mutated';
-
-$body = {exists => 1, value => {name => 'kitty'}};
-@errors = $schema->validate_request([POST => '/pets'], {body => \&body});
-is "@errors", '/body/id: Missing property.', 'missing id in body';
-
-$body = {exists => 1, value => {id => 42, name => 'kitty'}};
-@errors = $schema->validate_request([POST => '/pets'], {body => \&body});
-is "@errors", '', 'valid request body';
-is_deeply $body,
- {content_type => 'application/json', exists => 1, in => 'body', name => 'body', valid => 1, value => $body->{value}},
- 'input was mutated';
-
-note 'validate_response';
-$body = {exists => 1, value => {id => 42, name => 'kitty'}};
-@errors = $schema->validate_response([POST => '/pets', 201], {});
-is "@errors", '', 'valid response body 201';
-
-$body = {exists => 1, value => {code => 42}};
-@errors = $schema->validate_response([post => '/pets', 200], {body => \&body});
-is "@errors", '/body/message: Missing property.', 'valid response body default';
-
-note 'validate_response - accept';
-$body = {accept => 'text/plain'};
-@errors = $schema->validate_response([get => '/pets'], {body => \&body});
-is "@errors", '/header/Accept: Expected application/json - got text/plain.', 'invalid accept';
-is_deeply $body, {accept => 'text/plain', content_type => '', in => 'body', name => 'body', valid => 0},
- 'failed to negotiate content type';
-
-$body = {accept => 'application/*'};
-@errors = $schema->validate_response([get => '/pets'], {body => \&body});
-is "@errors", '', 'valid accept';
-is_deeply $body,
- {accept => 'application/*', content_type => 'application/json', in => 'body', name => 'body', valid => 1},
- 'negotiated content type';
-
-eval {
- my $schema = JSON::Validator->new->schema('data://main/spec-resolve-refs.json')->schema->resolve;
- is $schema->get([qw(paths /user get responses 200 schema type)]), 'object', 'resolved "User"';
-} or do {
- diag $@;
- ok 0, 'Could not resolve "User"';
+ $schema = JSON::Validator->new->schema($cwd->child(qw(spec v2-petstore.json)))->schema->resolve;
+ isa_ok $schema, 'JSON::Validator::Schema::OpenAPIv2';
+};
+
+subtest 'validate schema' => sub {
+ @errors = @{JSON::Validator->new->schema({swagger => '2.0', paths => {}})->schema->errors};
+ is "@errors", '/info: Missing property.', 'invalid schema';
+};
+
+subtest 'parameters_for_request' => sub {
+ is $schema->parameters_for_request([GET => '/pets/nope']), undef, 'no such path';
+ cmp_deeply $schema->parameters_for_request([GET => '/pets']), [superhashof({in => 'query', name => 'limit'})],
+ 'parameters_for_request inside path';
+ cmp_deeply $schema->parameters_for_request([post => '/pets']),
+ [superhashof({in => 'body', name => 'body', accepts => ['application/json']})], 'parameters_for_request for body';
+ cmp_deeply $schema->parameters_for_request([get => '/pets/{petId}']), [superhashof({in => 'path', name => 'petId'})],
+ 'parameters_for_request inside method';
+};
+
+subtest 'parameters_for_response' => sub {
+ is $schema->parameters_for_response([GET => '/pets/nope']), undef, 'no such path';
+ cmp_deeply $schema->parameters_for_response([GET => '/pets']),
+ [
+ superhashof({in => 'header', name => 'x-next'}),
+ superhashof({in => 'body', name => 'body', accepts => ['application/json']}),
+ ],
+ 'parameters_for_request inside path and default response code';
+ cmp_deeply $schema->parameters_for_response([GET => '/pets', 404]),
+ [superhashof({in => 'body', name => 'body', accepts => ['application/json']})], 'default response';
+};
+
+subtest 'validate_request' => sub {
+ @errors = $schema->validate_request([get => '/pets'], {query => {limit => 10, foo => '42'}});
+ is "@errors", '', 'limit ok, even as string';
+
+ @errors = $schema->validate_request([get => '/pets'], {query => {limit => 'foo'}});
+ is "@errors", '/limit: Expected integer - got string.', 'limit failed';
+
+ $body = {exists => 0};
+ @errors = $schema->validate_request([POST => '/pets'], {body => \&body});
+ is "@errors", '/body: Missing property.', 'default content type, but missing body';
+ is_deeply $body, {content_type => 'application/json', exists => 0, in => 'body', name => 'body', valid => 0},
+ 'input was mutated';
+
+ $body = {exists => 1, value => {name => 'kitty'}};
+ @errors = $schema->validate_request([POST => '/pets'], {body => \&body});
+ is "@errors", '/body/id: Missing property.', 'missing id in body';
+
+ $body = {exists => 1, value => {id => 42, name => 'kitty'}};
+ @errors = $schema->validate_request([POST => '/pets'], {body => \&body});
+ is "@errors", '', 'valid request body';
+ is_deeply $body,
+ {
+ content_type => 'application/json',
+ exists => 1,
+ in => 'body',
+ name => 'body',
+ valid => 1,
+ value => $body->{value}
+ },
+ 'input was mutated';
+};
+
+subtest 'validate_response' => sub {
+ $body = {exists => 1, value => {id => 42, name => 'kitty'}};
+ @errors = $schema->validate_response([POST => '/pets', 201], {});
+ is "@errors", '', 'valid response body 201';
+
+ $body = {exists => 1, value => {code => 42}};
+ @errors = $schema->validate_response([post => '/pets', 200], {body => \&body});
+ is "@errors", '/body/message: Missing property.', 'valid response body default';
+};
+
+subtest 'validate_response - accept' => sub {
+ $body = {accept => 'text/plain'};
+ @errors = $schema->validate_response([get => '/pets'], {body => \&body});
+ is "@errors", '/header/Accept: Expected application/json - got text/plain.', 'invalid accept';
+ is_deeply $body, {accept => 'text/plain', content_type => '', in => 'body', name => 'body', valid => 0},
+ 'failed to negotiate content type';
+
+ $body = {accept => 'application/*'};
+ @errors = $schema->validate_response([get => '/pets'], {body => \&body});
+ is "@errors", '', 'valid accept';
+ is_deeply $body,
+ {accept => 'application/*', content_type => 'application/json', in => 'body', name => 'body', valid => 1},
+ 'negotiated content type';
};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/openapiv3-basic.t new/JSON-Validator-4.13/t/openapiv3-basic.t
--- old/JSON-Validator-4.12/t/openapiv3-basic.t 2021-01-24 05:50:55.000000000 +0100
+++ new/JSON-Validator-4.13/t/openapiv3-basic.t 2021-01-28 01:30:45.000000000 +0100
@@ -8,89 +8,102 @@
my $schema = JSON::Validator::Schema::OpenAPIv3->new;
my ($body, $p, @errors);
-is $schema->specification, 'https://spec.openapis.org/oas/3.0/schema/2019-04-02', 'specification';
-is_deeply $schema->coerce, {booleans => 1, numbers => 1, strings => 1}, 'default coercion';
-
-note 'jv->schema';
-$schema = JSON::Validator->new->schema($cwd->child(qw(spec v3-petstore.json)))->schema;
-isa_ok $schema, 'JSON::Validator::Schema::OpenAPIv3';
-
-note 'validate schema';
-@errors = @{JSON::Validator->new->schema({openapi => '3.0.0', paths => {}})->schema->errors};
-is "@errors", '/info: Missing property.', 'invalid schema';
-
-note 'parameters_for_request';
-is $schema->parameters_for_request([GET => '/pets/nope']), undef, 'no such path';
-cmp_deeply $schema->parameters_for_request([GET => '/pets']), [superhashof({in => 'query', name => 'limit'})],
- 'parameters_for_request inside path';
-
-cmp_deeply $schema->parameters_for_request([post => '/pets']),
- [
- superhashof({in => 'cookie', name => 'debug'}),
- superhashof({in => 'body', name => 'body', accepts => [qw(application/json application/x-www-form-urlencoded)]})
- ],
- 'parameters_for_request for body';
-cmp_deeply $schema->parameters_for_request([get => '/pets/{petId}']),
- [superhashof({in => 'path', name => 'petId'}), superhashof({in => 'query', name => 'wantAge'})],
- 'parameters_for_request inside method';
-
-note 'parameters_for_response';
-is $schema->parameters_for_response([GET => '/pets/nope']), undef, 'no such path';
-cmp_deeply $schema->parameters_for_response([GET => '/pets']),
- [
- superhashof({in => 'header', name => 'x-next'}),
- superhashof({in => 'body', name => 'body', accepts => [qw(application/json application/xml)]}),
- ],
- 'parameters_for_request inside path and default response code';
-cmp_deeply $schema->parameters_for_response([GET => '/pets', 404]),
- [superhashof({in => 'body', name => 'body', accepts => [qw(application/json application/xml)]})], 'default response';
-
-note 'validate_request';
-$p = Mojo::Parameters->new('limit=10&foo=42');
-@errors = $schema->validate_request([get => '/pets'], {query => $p->to_hash});
-is "@errors", '', 'limit ok, even as string';
-
-@errors = $schema->validate_request([get => '/pets'], {query => {limit => 'foo'}});
-is "@errors", '/limit: Expected integer - got string.', 'limit failed';
-
-$body = {exists => 0};
-@errors = $schema->validate_request([POST => '/pets'], {body => \&body});
-is "@errors", '/body: Missing property.', 'default content type, but missing body';
-is_deeply $body, {content_type => 'application/json', exists => 0, in => 'body', name => 'body'}, 'input was mutated';
-
-$body = {exists => 1, value => {name => 'kitty'}};
-@errors = $schema->validate_request([POST => '/pets'], {body => \&body});
-is "@errors", '/body/id: Missing property.', 'missing id in body';
-
-$body = {exists => 1, value => {id => 42, name => 'kitty'}};
-@errors = $schema->validate_request([POST => '/pets'], {body => \&body});
-is "@errors", '', 'valid request body';
-is_deeply $body,
- {content_type => 'application/json', exists => 1, in => 'body', name => 'body', valid => 1, value => $body->{value}},
- 'input was mutated';
-
-note 'validate_response';
-$body = {exists => 1, value => {id => 42, name => 'kitty'}};
-@errors = $schema->validate_response([POST => '/pets', 201], {});
-is "@errors", '', 'valid response body 201';
-
-$body = {exists => 1, value => {code => 42}};
-@errors = $schema->validate_response([post => '/pets', 200], {body => \&body});
-is "@errors", '/body/message: Missing property.', 'valid response body default';
-
-note 'validate_response - accept';
-$body = {accept => 'text/plain'};
-@errors = $schema->validate_response([get => '/pets'], {body => \&body});
-is "@errors", '/header/Accept: Expected application/json, application/xml - got text/plain.', 'invalid accept';
-is_deeply $body, {accept => 'text/plain', content_type => '', in => 'body', name => 'body', valid => 0},
- 'failed to negotiate content type';
-
-$body = {accept => 'application/*'};
-@errors = $schema->validate_response([get => '/pets'], {body => \&body});
-is "@errors", '', 'valid accept';
-is_deeply $body,
- {accept => 'application/*', content_type => 'application/json', in => 'body', name => 'body', valid => 1},
- 'negotiated content type';
+subtest 'basic' => sub {
+ is $schema->specification, 'https://spec.openapis.org/oas/3.0/schema/2019-04-02', 'specification';
+ is_deeply $schema->coerce, {booleans => 1, numbers => 1, strings => 1}, 'default coercion';
+
+ $schema = JSON::Validator->new->schema($cwd->child(qw(spec v3-petstore.json)))->schema;
+ isa_ok $schema, 'JSON::Validator::Schema::OpenAPIv3';
+
+ @errors = @{JSON::Validator->new->schema({openapi => '3.0.0', paths => {}})->schema->errors};
+ is "@errors", '/info: Missing property.', 'invalid schema';
+};
+
+subtest 'parameters_for_request' => sub {
+ is $schema->parameters_for_request([GET => '/pets/nope']), undef, 'no such path';
+ cmp_deeply $schema->parameters_for_request([GET => '/pets']), [superhashof({in => 'query', name => 'limit'})],
+ 'parameters_for_request inside path';
+
+ cmp_deeply $schema->parameters_for_request([post => '/pets']),
+ [
+ superhashof({in => 'cookie', name => 'debug'}),
+ superhashof({in => 'body', name => 'body', accepts => [qw(application/json application/x-www-form-urlencoded)]})
+ ],
+ 'parameters_for_request for body';
+ cmp_deeply $schema->parameters_for_request([get => '/pets/{petId}']),
+ [superhashof({in => 'path', name => 'petId'}), superhashof({in => 'query', name => 'wantAge'})],
+ 'parameters_for_request inside method';
+};
+
+subtest 'parameters_for_response' => sub {
+ is $schema->parameters_for_response([GET => '/pets/nope']), undef, 'no such path';
+ cmp_deeply $schema->parameters_for_response([GET => '/pets']),
+ [
+ superhashof({in => 'header', name => 'x-next'}),
+ superhashof({in => 'body', name => 'body', accepts => [qw(application/json application/xml)]}),
+ ],
+ 'parameters_for_request inside path and default response code';
+ cmp_deeply $schema->parameters_for_response([GET => '/pets', 404]),
+ [superhashof({in => 'body', name => 'body', accepts => [qw(application/json application/xml)]})],
+ 'default response';
+};
+
+subtest 'validate_request' => sub {
+ $p = Mojo::Parameters->new('limit=10&foo=42');
+ @errors = $schema->validate_request([get => '/pets'], {query => $p->to_hash});
+ is "@errors", '', 'limit ok, even as string';
+
+ @errors = $schema->validate_request([get => '/pets'], {query => {limit => 'foo'}});
+ is "@errors", '/limit: Expected integer - got string.', 'limit failed';
+
+ $body = {exists => 0};
+ @errors = $schema->validate_request([POST => '/pets'], {body => \&body});
+ is "@errors", '/body: Missing property.', 'default content type, but missing body';
+ is_deeply $body, {content_type => 'application/json', exists => 0, in => 'body', name => 'body'}, 'input was mutated';
+
+ $body = {exists => 1, value => {name => 'kitty'}};
+ @errors = $schema->validate_request([POST => '/pets'], {body => \&body});
+ is "@errors", '/body/id: Missing property.', 'missing id in body';
+
+ $body = {exists => 1, value => {id => 42, name => 'kitty'}};
+ @errors = $schema->validate_request([POST => '/pets'], {body => \&body});
+ is "@errors", '', 'valid request body';
+ is_deeply $body,
+ {
+ content_type => 'application/json',
+ exists => 1,
+ in => 'body',
+ name => 'body',
+ valid => 1,
+ value => $body->{value}
+ },
+ 'input was mutated';
+};
+
+subtest 'validate_response' => sub {
+ $body = {exists => 1, value => {id => 42, name => 'kitty'}};
+ @errors = $schema->validate_response([POST => '/pets', 201], {});
+ is "@errors", '', 'valid response body 201';
+
+ $body = {exists => 1, value => {code => 42}};
+ @errors = $schema->validate_response([post => '/pets', 200], {body => \&body});
+ is "@errors", '/body/message: Missing property.', 'valid response body default';
+};
+
+subtest 'validate_response - accept' => sub {
+ $body = {accept => 'text/plain'};
+ @errors = $schema->validate_response([get => '/pets'], {body => \&body});
+ is "@errors", '/header/Accept: Expected application/json, application/xml - got text/plain.', 'invalid accept';
+ is_deeply $body, {accept => 'text/plain', content_type => '', in => 'body', name => 'body', valid => 0},
+ 'failed to negotiate content type';
+
+ $body = {accept => 'application/*'};
+ @errors = $schema->validate_response([get => '/pets'], {body => \&body});
+ is "@errors", '', 'valid accept';
+ is_deeply $body,
+ {accept => 'application/*', content_type => 'application/json', in => 'body', name => 'body', valid => 1},
+ 'negotiated content type';
+};
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/random-errors.t new/JSON-Validator-4.13/t/random-errors.t
--- old/JSON-Validator-4.12/t/random-errors.t 2020-10-13 05:31:27.000000000 +0200
+++ new/JSON-Validator-4.13/t/random-errors.t 2021-01-28 01:32:29.000000000 +0100
@@ -12,10 +12,10 @@
prop1 => {type => [qw(string null)]},
prop2 => {type => [qw(string null)], format => 'ipv4'},
prop3 => {type => [qw(string null)], format => 'ipv4'},
- prop4 => {type => 'string', enum => [qw(foo bar)]},
+ prop4 => {type => 'string', enum => [qw(foo bar)]},
prop5 => {type => [qw(string null)]},
prop6 => {type => 'string'},
- prop7 => {type => 'string', enum => [qw(foo bar)]},
+ prop7 => {type => 'string', enum => [qw(foo bar)]},
prop8 => {type => [qw(string null)], format => 'ipv4'},
prop9 => {type => [qw(string null)]},
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/JSON-Validator-4.12/t/ref.t new/JSON-Validator-4.13/t/ref.t
--- old/JSON-Validator-4.12/t/ref.t 2020-10-31 01:53:05.000000000 +0100
+++ new/JSON-Validator-4.13/t/ref.t 2021-01-28 00:50:27.000000000 +0100
@@ -25,6 +25,18 @@
}
);
+test(
+ 'ref clear',
+ {'$ref' => '#/inner', b => 2, foo => 44},
+ {'$ref' => '#/main', a => 1, foo => 42},
+ undef,
+ sub {
+ my ($ref, $tied) = @_;
+ %$ref = ();
+ pass 'still alive';
+ }
+);
+
done_testing;
sub test {
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-neovim-remote for openSUSE:Factory checked in at 2021-02-02 14:24:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-neovim-remote (Old)
and /work/SRC/openSUSE:Factory/.python-neovim-remote.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-neovim-remote"
Tue Feb 2 14:24:51 2021 rev:6 rq:868124 version:2.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-neovim-remote/python-neovim-remote.changes 2019-12-05 17:34:25.141447499 +0100
+++ /work/SRC/openSUSE:Factory/.python-neovim-remote.new.28504/python-neovim-remote.changes 2021-02-02 14:24:57.971325981 +0100
@@ -1,0 +2,5 @@
+Sun Jan 31 08:22:30 UTC 2021 - Matej Cepl <mcepl(a)suse.com>
+
+- Switch to using update-alternatives(1) to avoid collisions.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-neovim-remote.spec ++++++
--- /var/tmp/diff_new_pack.4hsjB3/_old 2021-02-02 14:24:58.671327070 +0100
+++ /var/tmp/diff_new_pack.4hsjB3/_new 2021-02-02 14:24:58.671327070 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-neovim-remote
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
License: MIT
Group: Development/Languages/Python
URL: https://github.com/mhinz/neovim-remote
-Source0: https://files.pythonhosted.org/packages/source/n/%{modname}/%{modname}-%{ve…
+Source0: https://files.pythonhosted.org/packages/source/n/neovim-remote/%{modname}-%…
BuildRequires: %{python_module neovim}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest}
@@ -34,8 +34,9 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-psutil
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
BuildArch: noarch
-
%python_subpackages
%description
@@ -54,6 +55,7 @@
%install
%python_install
+%python_clone -a %{buildroot}%{_bindir}/nvr
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -61,8 +63,14 @@
# diagnostic output.
%python_expand PYTHONPATH=. py.test-%{$python_bin_suffix} -v tests
+%post
+%python_install_alternative nvr
+
+%postun
+%python_uninstall_alternative nvr
+
%files %{python_files}
-%{_bindir}/nvr
+%python_alternative %{_bindir}/nvr
%{python_sitelib}/*
%changelog
1
0