Hello community,

here is the log from the commit of package qrencode for openSUSE:Factory 
checked in at 2020-10-18 16:28:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qrencode (Old)
 and      /work/SRC/openSUSE:Factory/.qrencode.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qrencode"

Sun Oct 18 16:28:52 2020 rev:24 rq:841965 version:4.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/qrencode/qrencode.changes        2020-09-23 
18:37:33.077167778 +0200
+++ /work/SRC/openSUSE:Factory/.qrencode.new.3486/qrencode.changes      
2020-10-18 16:30:35.184735578 +0200
@@ -1,0 +2,8 @@
+Thu Oct 15 13:06:53 UTC 2020 - Dirk Mueller <dmuel...@suse.com>
+
+- update to 4.1.1:
+  * Some minor bugs in Micro QR Code generation have been fixed.
+  * The data capacity calculations are now correct. These bugs probably did not
+    affect the Micro QR Code generation.
+
+-------------------------------------------------------------------

Old:
----
  qrencode-4.1.0.tar.bz2

New:
----
  qrencode-4.1.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qrencode.spec ++++++
--- /var/tmp/diff_new_pack.MCdANg/_old  2020-10-18 16:30:36.816736305 +0200
+++ /var/tmp/diff_new_pack.MCdANg/_new  2020-10-18 16:30:36.820736306 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package qrencode
 #
-# Copyright (c) 2019 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
@@ -18,12 +18,12 @@
 
 %define so_ver 4
 Name:           qrencode
-Version:        4.1.0
+Version:        4.1.1
 Release:        0
 Summary:        C library for encoding data in a QR Code symbol
 License:        LGPL-2.1-or-later
 Group:          Productivity/Graphics/Other
-Url:            https://github.com/fukuchi/libqrencode
+URL:            https://github.com/fukuchi/libqrencode
 Source0:        https://fukuchi.org/works/qrencode/%{name}-%{version}.tar.bz2
 Source1:        baselibs.conf
 BuildRequires:  cmake >= 3.1.0

++++++ qrencode-4.1.0.tar.bz2 -> qrencode-4.1.1.tar.bz2 ++++++
++++ 1654 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/CMakeLists.txt new/qrencode-4.1.1/CMakeLists.txt
--- old/qrencode-4.1.0/CMakeLists.txt   2020-08-29 11:47:24.000000000 +0200
+++ new/qrencode-4.1.1/CMakeLists.txt   2020-09-28 03:16:22.000000000 +0200
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.1.0)
 
-project(QRencode VERSION 4.1.0 LANGUAGES C)
+project(QRencode VERSION 4.1.1 LANGUAGES C)
 
 option(WITH_TOOLS "Build utility tools"  YES )
 option(WITH_TESTS "Build tests"  NO )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/ChangeLog new/qrencode-4.1.1/ChangeLog
--- old/qrencode-4.1.0/ChangeLog        2020-08-29 11:47:24.000000000 +0200
+++ new/qrencode-4.1.1/ChangeLog        2020-09-28 08:47:44.000000000 +0200
@@ -1,3 +1,14 @@
+2020.09.28 Kentaro Fukuchi <kent...@fukuchi.org>
+       [hotfix]
+       * qrinput.c, tests/test_estimatebit.c:
+         - Fixed a bug in the estimation of the Micro QR Code's data length
+           in QRinput_estimateBitStreamSizeOfEntry() has been fixed.
+         - Fixed a bug in the calculation of the Micro QR Code's data capacity 
in
+           QRinput_encodeBitStream().
+         - A test case to test the bugs above has been added.
+         - Level check failure in QRinput_new2() on Windows has been fixed.
+       * Bumped version to 4.1.1.
+
 2020.08.29 Kentaro Fukuchi <kent...@fukuchi.org>
        [release-4.1.0]
        * .github/workflows/{cmake,configure,cmake-windows}.yml:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/NEWS new/qrencode-4.1.1/NEWS
--- old/qrencode-4.1.0/NEWS     2020-08-29 11:47:24.000000000 +0200
+++ new/qrencode-4.1.1/NEWS     2020-09-28 08:47:44.000000000 +0200
@@ -1,6 +1,12 @@
 libqrencode NEWS - Overview of changes
 ======================================
 
+Version 4.1.1 (2020.9.28)
+-------------------------
+* Some minor bugs in Micro QR Code generation have been fixed.
+  * The data capacity calculations are now correct. These bugs probably did not
+    affect the Micro QR Code generation.
+
 Version 4.1.0 (2020.8.29)
 -------------------------
 * Command line tool "qrencode" has been improved:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/configure.ac new/qrencode-4.1.1/configure.ac
--- old/qrencode-4.1.0/configure.ac     2020-08-29 11:47:24.000000000 +0200
+++ new/qrencode-4.1.1/configure.ac     2020-09-28 03:16:22.000000000 +0200
@@ -1,6 +1,6 @@
 m4_define([__MAJOR_VERSION], [4])dnl
 m4_define([__MINOR_VERSION], [1])dnl
-m4_define([__MICRO_VERSION], [0])dnl
+m4_define([__MICRO_VERSION], [1])dnl
 m4_define([__VERSION], [__MAJOR_VERSION.__MINOR_VERSION.__MICRO_VERSION])dnl
 AC_INIT(QRencode, __VERSION)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/qrinput.c new/qrencode-4.1.1/qrinput.c
--- old/qrencode-4.1.0/qrinput.c        2020-08-29 11:46:04.000000000 +0200
+++ new/qrencode-4.1.1/qrinput.c        2020-09-28 08:47:44.000000000 +0200
@@ -117,7 +117,7 @@
 {
        QRinput *input;
 
-       if(version < 0 || version > QRSPEC_VERSION_MAX || level > QR_ECLEVEL_H) 
{
+       if(version < 0 || version > QRSPEC_VERSION_MAX || level < 0 || level > 
QR_ECLEVEL_H) {
                errno = EINVAL;
                return NULL;
        }
@@ -890,7 +890,7 @@
        }
 
        if(mqr) {
-               l = QRspec_lengthIndicator(entry->mode, version);
+               l = MQRspec_lengthIndicator(entry->mode, version);
                m = version - 1;
                bits += l + m;
        } else {
@@ -1018,7 +1018,11 @@
 
        prevsize = (int)BitStream_size(bstream);
 
-       words = QRspec_maximumWords(entry->mode, version);
+       if(mqr) {
+               words = MQRspec_maximumWords(entry->mode, version);
+       } else {
+               words = QRspec_maximumWords(entry->mode, version);
+       }
        if(words != 0 && entry->size > words) {
                st1 = QRinput_List_newEntry(entry->mode, words, entry->data);
                if(st1 == NULL) goto ABORT;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/tests/test_estimatebit.c 
new/qrencode-4.1.1/tests/test_estimatebit.c
--- old/qrencode-4.1.0/tests/test_estimatebit.c 2020-08-29 11:46:04.000000000 
+0200
+++ new/qrencode-4.1.1/tests/test_estimatebit.c 2020-09-28 03:16:22.000000000 
+0200
@@ -139,11 +139,34 @@
        QRinput_free(gstream);
 }
 
+/* Taken from JISX 0510:2018, p.23 */
+static void test_numbit1_mqr(void)
+{
+       QRinput *stream;
+       char *str = "0123456789012345";
+       int bits;
+
+       testStart("Estimation of Numeric stream for Micro QR Code (16 digits)");
+       stream = QRinput_newMQR(3, QR_ECLEVEL_M);
+       QRinput_append(stream, QR_MODE_NUM, 16, (const unsigned char *)str);
+       bits = QRinput_estimateBitStreamSize(stream, 
QRinput_getVersion(stream));
+       assert_equal(bits, 61, "Estimated bit length is wrong: %d, expected: 
%d.\n", bits, 61);
+       QRinput_free(stream);
+
+       stream = QRinput_newMQR(4, QR_ECLEVEL_M);
+       QRinput_append(stream, QR_MODE_NUM, 16, (const unsigned char *)str);
+       bits = QRinput_estimateBitStreamSize(stream, 
QRinput_getVersion(stream));
+       assert_equal(bits, 63, "Estimated bit length is wrong: %d, expected: 
%d.\n", bits, 63);
+       QRinput_free(stream);
+
+       testFinish();
+}
+
 int main()
 {
        gstream = QRinput_new();
 
-       int tests = 8;
+       int tests = 9;
        testInit(tests);
        test_numbit();
        test_numbit2();
@@ -153,6 +176,7 @@
        test_kanji();
        test_structure();
        test_mix();
+       test_numbit1_mqr();
        testReport(tests);
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/qrencode-4.1.0/tests/test_qrinput.c new/qrencode-4.1.1/tests/test_qrinput.c
--- old/qrencode-4.1.0/tests/test_qrinput.c     2020-08-29 11:46:04.000000000 
+0200
+++ new/qrencode-4.1.1/tests/test_qrinput.c     2020-09-28 03:16:22.000000000 
+0200
@@ -889,6 +889,38 @@
        testFinish();
 }
 
+static void test_QRinput_new_invalid(void)
+{
+       testStart("Invalid input to QRinput_new2()");
+       QRinput *input;
+
+       input = QRinput_new2(-1, QR_ECLEVEL_H);
+       assert_null(input, "QRinput_new2() returns non-null for invalid version 
(-1).\n");
+       assert_equal(errno, EINVAL, "Error code is not EINVAL.\n");
+       input = QRinput_new2(41, QR_ECLEVEL_H);
+       assert_null(input, "QRinput_new2() returns non-null for invalid version 
(41).\n");
+       assert_equal(errno, EINVAL, "Error code is not EINVAL.\n");
+       input = QRinput_new2(1, -1);
+       assert_null(input, "QRinput_new2() returns non-null for invalid level 
(-1).\n");
+       assert_equal(errno, EINVAL, "Error code is not EINVAL.\n");
+       input = QRinput_new2(1, 5);
+       assert_null(input, "QRinput_new2() returns non-null for invalid level 
(5).\n");
+       assert_equal(errno, EINVAL, "Error code is not EINVAL.\n");
+       testFinish();
+}
+
+static void test_QRinput_getErrorCorrectionLevel(void)
+{
+       testStart("Invalid input to QRinput_getErrorCorrectionLevel()");
+       QRinput *input;
+       QRecLevel level;
+
+       input = QRinput_new2(1, QR_ECLEVEL_H);
+       level = QRinput_getErrorCorrectionLevel(input);
+       assert_equal(level, QR_ECLEVEL_H, "QRinput_getErrorCorrectionLevel() 
fails to return expected level.\n");
+       testFinish();
+}
+
 static void test_mqr_new(void)
 {
        QRinput *input;
@@ -1044,7 +1076,7 @@
 
 int main()
 {
-       int tests = 40;
+       int tests = 42;
        testInit(tests);
 
        test_encodeNumeric();
@@ -1078,6 +1110,8 @@
        test_parity2();
        test_null_free();
        test_estimateVersionBoundaryCheck();
+       test_QRinput_new_invalid();
+       test_QRinput_getErrorCorrectionLevel();
 
        test_mqr_new();
        test_mqr_setversion();


Reply via email to