Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libcotp for openSUSE:Factory checked 
in at 2021-12-30 15:55:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libcotp (Old)
 and      /work/SRC/openSUSE:Factory/.libcotp.new.1896 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libcotp"

Thu Dec 30 15:55:47 2021 rev:3 rq:943233 version:1.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/libcotp/libcotp.changes  2020-04-23 
18:39:59.297184015 +0200
+++ /work/SRC/openSUSE:Factory/.libcotp.new.1896/libcotp.changes        
2021-12-30 15:56:14.420692468 +0100
@@ -1,0 +2,7 @@
+Wed Dec 29 08:44:18 UTC 2021 - Paolo Stivanin <i...@paolostivanin.com>
+
+- Update to v1.2.4:
+  * small fixes from PVS scan
+  * tests: do no require installation to run tests
+
+-------------------------------------------------------------------

Old:
----
  v1.2.2.tar.gz

New:
----
  v1.2.4.tar.gz
  v1.2.4.tar.gz.asc

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

Other differences:
------------------
++++++ libcotp.spec ++++++
--- /var/tmp/diff_new_pack.dRfkLB/_old  2021-12-30 15:56:14.876692819 +0100
+++ /var/tmp/diff_new_pack.dRfkLB/_new  2021-12-30 15:56:14.884692825 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libcotp
 #
-# 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
@@ -16,18 +16,19 @@
 #
 
 
+%define libsoname %{name}12
 %if 0%{?fedora_version}
 %global debug_package %{nil}
 %endif
-%define libsoname %{name}12
 Name:           libcotp
-Version:        1.2.2
+Version:        1.2.4
 Release:        0
 Summary:        C library for generating TOTP and HOTP
 License:        Apache-2.0
 Group:          Development/Libraries/C and C++
 URL:            https://github.com/paolostivanin/%{name}
-Source:         
https://github.com/paolostivanin/%{name}/archive/v%{version}.tar.gz
+Source0:        
https://github.com/paolostivanin/%{name}/archive/v%{version}.tar.gz
+Source1:        
https://github.com/paolostivanin/%{name}/archive/v%{version}.tar.gz.asc
 BuildRequires:  cmake
 BuildRequires:  gcc
 BuildRequires:  gcc-c++

++++++ v1.2.2.tar.gz -> v1.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/CMakeLists.txt 
new/libcotp-1.2.4/CMakeLists.txt
--- old/libcotp-1.2.2/CMakeLists.txt    2019-02-01 17:15:54.000000000 +0100
+++ new/libcotp-1.2.4/CMakeLists.txt    2021-12-29 09:35:40.000000000 +0100
@@ -17,7 +17,7 @@
 # set up versioning.
 set(BUILD_MAJOR "1")
 set(BUILD_MINOR "2")
-set(BUILD_VERSION "2")
+set(BUILD_VERSION "4")
 set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_VERSION})
 
 set(CMAKE_C_STANDARD 11)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/README.md new/libcotp-1.2.4/README.md
--- old/libcotp-1.2.2/README.md 2019-02-01 17:15:54.000000000 +0100
+++ new/libcotp-1.2.4/README.md 2021-12-29 09:35:40.000000000 +0100
@@ -4,11 +4,6 @@
        src="https://scan.coverity.com/projects/12748/badge.svg"/>
 </a>
 
-<a href="https://app.shippable.com/github/paolostivanin/libcotp";>
-  <img alt="Shippable Build Status"
-       
src="https://api.shippable.com/projects/58e3d5759401b40600a7c026/badge?branch=master"/>
-</a>
-
 C library that generates TOTP and HOTP according to 
[RFC-6238](https://tools.ietf.org/html/rfc6238)
 
 ## Requirements
@@ -63,3 +58,4 @@
 `totp_verify` and `hotp_verify` can return, in addition to one of the previous 
code, also the error `INVALID_OTP` if the given OTP doesn't match the computed 
one.
 
 In case of success, the value returned by `get_totp`, `get_hotp` and 
`get_totp_at` **must be freed** once no longer needed.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/shippable.yml 
new/libcotp-1.2.4/shippable.yml
--- old/libcotp-1.2.2/shippable.yml     2019-02-01 17:15:54.000000000 +0100
+++ new/libcotp-1.2.4/shippable.yml     1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-language: c
-
-branches:
-  only:
-    - master
-
-compiler:
-  - gcc
-  - clang
-
-build:
-  ci:
-    - mkdir -pv "shippable/testresults"
-    - sudo add-apt-repository ppa:snaipewastaken/ppa
-    - sudo apt update
-    - sudo apt install cmake libgcrypt20-dev criterion-dev
-    - git clone https://github.com/paolostivanin/libbaseencode.git
-    - cd libbaseencode && mkdir build && cd $_
-    - cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-    - make
-    - sudo make install
-    - cd ../..
-    - mkdir build && cd $_
-    - cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-    - make
-    - sudo make install
-    - cmake .. -DBUILD_TESTING=ON
-    - make
-    - ./tests/test_cotp --xml=test.xml
-    - mv -v test.xml ../shippable/testresults
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/src/otp.c new/libcotp-1.2.4/src/otp.c
--- old/libcotp-1.2.2/src/otp.c 2019-02-01 17:15:54.000000000 +0100
+++ new/libcotp-1.2.4/src/otp.c 2021-12-29 09:35:40.000000000 +0100
@@ -31,6 +31,10 @@
 normalize_secret (const char *K)
 {
     char *nK = calloc (1, strlen (K) + 1);
+    if (nK == NULL) {
+        fprintf (stderr, "Error during memory allocation\n");
+        return nK;
+    }
 
     int i = 0, j = 0;
     while (K[i] != '\0') {
@@ -58,9 +62,10 @@
     const char steam_alphabet[] = "23456789BCDFGHJKMNPQRTVWXY";
 
     char code[6];
+    size_t steam_alphabet_len = strlen(steam_alphabet);
     for (int i = 0; i < 5; i++) {
-        int mod = bin_code % strlen(steam_alphabet);
-        bin_code = bin_code / strlen(steam_alphabet);
+        int mod = bin_code % steam_alphabet_len;
+        bin_code = bin_code / steam_alphabet_len;
         code[i] = steam_alphabet[mod];
     }
     code[5] = '\0';
@@ -104,6 +109,9 @@
     size_t secret_len = (size_t) ((strlen(K) + 1.6 - 1) / 1.6);
 
     char *normalized_K = normalize_secret (K);
+    if (normalized_K == NULL) {
+        return NULL;
+    }
     unsigned char *secret = base32_decode(normalized_K, strlen(normalized_K), 
&err);
     free (normalized_K);
     if (secret == NULL) {
@@ -134,11 +142,16 @@
     char *token = malloc((size_t)digits_length + 1);
     if (token == NULL) {
         fprintf (stderr, "Error during memory allocation\n");
-        return NULL;
+        return token;
     } else {
         int extra_char = digits_length < 10 ? 0 : 1;
         char *fmt = calloc(1, 5 + extra_char);
-        memcpy (fmt, "%.", 2);
+        if (fmt == NULL) {
+            fprintf (stderr, "Error during memory allocation\n");
+            free (token);
+            return fmt;
+        }
+        memcpy (fmt, "%.", 3);
         snprintf (fmt + 2, 2 + extra_char, "%d", digits_length);
         memcpy (fmt + 3 + extra_char, "d", 2);
         snprintf (token, digits_length + 1, fmt, tk);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/tests/CMakeLists.txt 
new/libcotp-1.2.4/tests/CMakeLists.txt
--- old/libcotp-1.2.2/tests/CMakeLists.txt      2019-02-01 17:15:54.000000000 
+0100
+++ new/libcotp-1.2.4/tests/CMakeLists.txt      2021-12-29 09:35:40.000000000 
+0100
@@ -3,6 +3,8 @@
     add_executable (test_cotp test_otp.c)
 
     target_link_libraries (test_cotp -lcotp -lcriterion -lbaseencode -lgcrypt)
+    target_link_directories (test_cotp PRIVATE ${PROJECT_BINARY_DIR})
+    add_dependencies (test_cotp cotp)
 
     add_test (NAME TestCOTP COMMAND test_cotp)
 ENDIF(BUILD_TESTING)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/tests/docker/Dockerfile 
new/libcotp-1.2.4/tests/docker/Dockerfile
--- old/libcotp-1.2.2/tests/docker/Dockerfile   1970-01-01 01:00:00.000000000 
+0100
+++ new/libcotp-1.2.4/tests/docker/Dockerfile   2021-12-29 09:35:40.000000000 
+0100
@@ -0,0 +1,34 @@
+FROM archlinux:latest
+
+ARG BRANCH=master
+
+COPY PKGBUILD /tmp/PKGBUILD
+
+RUN pacman -Syu --noconfirm ; \
+    pacman -S gcc git clang cmake pkg-config libgcrypt fakeroot sudo 
--noconfirm ; \
+    pacman -S base-devel --noconfirm
+
+RUN useradd -m -G wheel -s /bin/bash test ; \
+    cp /tmp/PKGBUILD /home/test/ && chown test:test /home/test/PKGBUILD ; \
+    sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' 
/etc/sudoers
+
+USER test
+RUN cd /home/test && makepkg
+
+USER root
+RUN pacman -U /home/test/*zst --noconfirm
+
+USER test
+RUN yay -S criterion --noconfirm ; \
+    gpg --keyserver pool.sks-keyservers.net --recv-keys 4EC1EA64 ; \
+    yay -S libbaseencode --noconfirm
+
+USER root
+RUN git clone https://github.com/paolostivanin/libcotp -b $BRANCH ; \
+    cd libcotp ; \
+    mkdir build && cd $_ ; \
+    cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=ON ; \
+    make -j2 ;\
+    ./tests/test_cotp ;\
+    make install
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/tests/docker/PKGBUILD 
new/libcotp-1.2.4/tests/docker/PKGBUILD
--- old/libcotp-1.2.2/tests/docker/PKGBUILD     1970-01-01 01:00:00.000000000 
+0100
+++ new/libcotp-1.2.4/tests/docker/PKGBUILD     2021-12-29 09:35:40.000000000 
+0100
@@ -0,0 +1,43 @@
+# Maintainer: Jguer <joaogg3 at gmail dot com>
+pkgname=yay-bin
+pkgver=11.0.2
+pkgrel=1
+pkgdesc="Yet another yogurt. Pacman wrapper and AUR helper written in go. 
Pre-compiled."
+arch=('x86_64' 'aarch64' 'armv6h' 'armv7h')
+url="https://github.com/Jguer/yay";
+license=('GPL3')
+depends=(
+  'git'
+)
+optdepends=(
+  'sudo'
+)
+provides=('yay')
+conflicts=('yay' 'libalpm.so<13')
+
+source_x86_64=("https://github.com/Jguer/yay/releases/download/v${pkgver}/${pkgname/-bin/}_${pkgver}_x86_64.tar.gz";)
+source_aarch64=("https://github.com/Jguer/yay/releases/download/v${pkgver}/${pkgname/-bin/}_${pkgver}_aarch64.tar.gz";)
+source_armv6h=("https://github.com/Jguer/yay/releases/download/v${pkgver}/${pkgname/-bin/}_${pkgver}_armv6h.tar.gz";)
+source_armv7h=("https://github.com/Jguer/yay/releases/download/v${pkgver}/${pkgname/-bin/}_${pkgver}_armv7h.tar.gz";)
+
+sha256sums_x86_64=('3b6334a4e719138c80f4c271a77b97bd740329677dfffe6bbe54679a0052140e')
+sha256sums_aarch64=('d1c1b2d74783cb366a86480fcea9d7fbb325d170815014642ac0790e9bad6637')
+sha256sums_armv6h=('7b4dd9d33d56b600955ead52bb5bd86bc9ac6fc45c24f0c6b686153b184eb905')
+sha256sums_armv7h=('80a6317383552272ca9a9d251531fb2ca6e310e811b034a680e6632d4a294f15')
+
+package() {
+  _output="${srcdir}/${pkgname/-bin/}_${pkgver}_${CARCH}"
+  install -Dm755 "${_output}/${pkgname/-bin/}" 
"${pkgdir}/usr/bin/${pkgname/-bin/}"
+  install -Dm644 "${_output}/yay.8" "${pkgdir}/usr/share/man/man8/yay.8"
+
+  # Shell autocompletion script
+  install -Dm644 "${_output}/bash" 
"${pkgdir}/usr/share/bash-completion/completions/yay"
+  install -Dm644 "${_output}/zsh" "${pkgdir}/usr/share/zsh/site-functions/_yay"
+  install -Dm644 "${_output}/fish" 
"${pkgdir}/usr/share/fish/vendor_completions.d/yay.fish"
+
+  LANGS="pt pt_BR en es eu fr_FR ja pl_PL ru_RU zh_CN ko"
+  for lang in ${LANGS}; do
+    install -Dm644 "${_output}/${lang}.mo" 
"${pkgdir}/usr/share/locale/${lang}/LC_MESSAGES/yay.mo"
+  done
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/tests/docker/run_docker.sh 
new/libcotp-1.2.4/tests/docker/run_docker.sh
--- old/libcotp-1.2.2/tests/docker/run_docker.sh        1970-01-01 
01:00:00.000000000 +0100
+++ new/libcotp-1.2.4/tests/docker/run_docker.sh        2021-12-29 
09:35:40.000000000 +0100
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [[ -z "$1" ]]; then
+    echo "Usage: $0 <branch-name>"
+    exit 1
+fi
+
+docker build -t "testme:Dockerfile" --build-arg BRANCH="$1" .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libcotp-1.2.2/tests/test_otp.c 
new/libcotp-1.2.4/tests/test_otp.c
--- old/libcotp-1.2.2/tests/test_otp.c  2019-02-01 17:15:54.000000000 +0100
+++ new/libcotp-1.2.4/tests/test_otp.c  2021-12-29 09:35:40.000000000 +0100
@@ -1,6 +1,6 @@
 #include <criterion/criterion.h>
 #include <string.h>
-#include <cotp.h>
+#include "../src/cotp.h"
 #include <baseencode.h>
 
 

++++++ v1.2.4.tar.gz.asc ++++++
Not Found
(No newline at EOF)

Reply via email to