Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rng-tools for openSUSE:Factory 
checked in at 2021-03-24 16:14:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rng-tools (Old)
 and      /work/SRC/openSUSE:Factory/.rng-tools.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rng-tools"

Wed Mar 24 16:14:59 2021 rev:46 rq:880699 version:6.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/rng-tools/rng-tools.changes      2021-01-25 
18:23:54.428453651 +0100
+++ /work/SRC/openSUSE:Factory/.rng-tools.new.2401/rng-tools.changes    
2021-03-24 16:15:54.388124991 +0100
@@ -1,0 +2,14 @@
+Thu Mar 18 13:04:28 UTC 2021 - Paolo Stivanin <i...@paolostivanin.com>
+
+- update to 6.12:
+  * Fix compiler warning over log message format
+  * Fix some typos in force-reseed documentation in rngd man page
+  * Improve --list option so that we properly capture entropy sources
+    that are available and configured on at build time, but failed
+    initalization at run time (due to lack of hw, or some other error, etc)
+  * Drop the use of libsysfs - we only used it to access a single file,
+    and we can do so with a simple open/read/close.
+    Given the lack of maintenance of libsysfs, we can save lots of
+    effort by dropping this lib
+
+-------------------------------------------------------------------

Old:
----
  v6.11.tar.gz

New:
----
  v6.12.tar.gz

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

Other differences:
------------------
++++++ rng-tools.spec ++++++
--- /var/tmp/diff_new_pack.dwy1qm/_old  2021-03-24 16:15:54.992125625 +0100
+++ /var/tmp/diff_new_pack.dwy1qm/_new  2021-03-24 16:15:54.992125625 +0100
@@ -18,7 +18,7 @@
 
 %{!?_udevrulesdir: %global _udevrulesdir %(pkg-config --variable=udevdir 
udev)/rules.d }
 Name:           rng-tools
-Version:        6.11
+Version:        6.12
 Release:        0
 Summary:        Support daemon for hardware random device
 License:        GPL-3.0-or-later
@@ -33,7 +33,6 @@
 BuildRequires:  libp11-devel
 BuildRequires:  libxml2-devel
 BuildRequires:  pkgconfig
-BuildRequires:  sysfsutils-devel
 BuildRequires:  pkgconfig(systemd)
 BuildRequires:  pkgconfig(udev)
 Requires:       opensc

++++++ v6.11.tar.gz -> v6.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/.travis.yml 
new/rng-tools-6.12/.travis.yml
--- old/rng-tools-6.11/.travis.yml      2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/.travis.yml      2021-03-11 13:57:40.000000000 +0100
@@ -14,7 +14,6 @@
 addons:
   apt:
     packages:
-      libsysfs-dev
       libxml2
       libxml2-dev
       libssl-dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/Makefile.am 
new/rng-tools-6.12/Makefile.am
--- old/rng-tools-6.11/Makefile.am      2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/Makefile.am      2021-03-11 13:57:40.000000000 +0100
@@ -31,7 +31,7 @@
 rngd_SOURCES   += rngd_rtlsdr.c
 endif
 
-rngd_LDADD     = librngd.a -lsysfs $(LIBS) $(librtlsdr_LIBS) ${libp11_LIBS} 
${libcrypto_LIBS} ${jansson_LIBS} ${libcurl_LIBS} ${libxml2_LIBS} 
${openssl_LIBS} $(PTHREAD_LIBS)
+rngd_LDADD     = librngd.a $(LIBS) $(librtlsdr_LIBS) ${libp11_LIBS} 
${libcrypto_LIBS} ${jansson_LIBS} ${libcurl_LIBS} ${libxml2_LIBS} 
${openssl_LIBS} $(PTHREAD_LIBS)
 
 if PKCS11 
 rngd_SOURCES   += rngd_pkcs11.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/configure.ac 
new/rng-tools-6.12/configure.ac
--- old/rng-tools-6.11/configure.ac     2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/configure.ac     2021-03-11 13:57:40.000000000 +0100
@@ -17,7 +17,7 @@
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335  
USA
 
-AC_INIT(rng-tools, 6.11, [Neil Horman <nhor...@tuxdriver.com>])
+AC_INIT(rng-tools, 6.12, [Neil Horman <nhor...@tuxdriver.com>])
 AC_PREREQ(2.52)
 AC_CONFIG_SRCDIR([rngd.c])
 AC_CANONICAL_TARGET
@@ -144,11 +144,6 @@
 dnl AC_TYPE_SIZE_T
 dnl AC_TYPE_PID_T
 
-dnl -----------------------------
-dnl Checks for required libraries
-dnl -----------------------------
-AC_SEARCH_LIBS(sysfs_get_mnt_path, sysfs, [], [AC_MSG_ERROR([libsysfs is 
required])],[])
-
 dnl -------------------------------------
 dnl Checks for optional library functions
 dnl -------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/rngd.8.in new/rng-tools-6.12/rngd.8.in
--- old/rng-tools-6.11/rngd.8.in        2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/rngd.8.in        2021-03-11 13:57:40.000000000 +0100
@@ -21,7 +21,7 @@
 [\fB\-s\fR, \fB\-\-random-step=\fInnn\fR]
 [\fB\-t\fR, \fB\-\-test\fR]
 [\fB\-W\fR, \fB\-\-fill-watermark=\fInnn\fR]
-[\fB\-R\fR, \fB\-\-force_reseed=\fInnn\fR]
+[\fB\-R\fR, \fB\-\-force-reseed=\fInnn\fR]
 [\fB\-q\fR, \fB\-\-quiet\fR]
 [\fB\-?\fR, \fB\-\-help\fR]
 [\fB\-V\fR, \fB\-\-version\fR]
@@ -110,10 +110,10 @@
 entropy pool (usually 4096 bits).  A value of 0 to this option will cause no
 watermark to be set.
 .TP
-\fB\-R\fI n\fR, \fB\-\-force_reseed=\fInnn\fR
+\fB\-R\fI n\fR, \fB\-\-force-reseed=\fInnn\fR
 For newer kernels which support non-blocking entropy pools, it is still
 beneficial to periodically add fresh entropy as a reseeding event.
---force_reseed defines the number of seconds between which fresh entropy is
+--force-reseed defines the number of seconds between which fresh entropy is
 added to the kernel entropy pool.  Defaults to 5 minutes.
 .TP
 \fB\-q\fR, \fB\-\-quiet\fR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/rngd.c new/rng-tools-6.12/rngd.c
--- old/rng-tools-6.11/rngd.c   2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/rngd.c   2021-03-11 13:57:40.000000000 +0100
@@ -857,6 +857,7 @@
                                found = 1;
                                message(LOG_CONS|LOG_INFO, "%d: %s (%s)\n", i,
                                        entropy_sources[i].rng_name, 
entropy_sources[i].rng_sname);
+                               entropy_sources[i].failed_init = false;
                        }
                if (!found)
                        message(LOG_CONS|LOG_INFO, "None");
@@ -874,9 +875,11 @@
                                ent_src->fipsctx = malloc(sizeof(fips_ctx_t));
                                fips_init(ent_src->fipsctx, 
discard_initial_data(ent_src));
                                message_entsrc(ent_src, LOG_DAEMON|LOG_INFO, 
"Initialized\n");
+                               ent_src->failed_init = false;
                        } else {
                                message_entsrc(ent_src, LOG_DAEMON|LOG_ERR, 
"Initialization Failed\n");
                                ent_src->disabled = true;
+                               ent_src->failed_init = true;
                        }
                }
        }
@@ -891,6 +894,14 @@
                                message(LOG_CONS|LOG_INFO, "%d: %s (%s)\n", i,
                                        entropy_sources[i].rng_name, 
entropy_sources[i].rng_sname);
                        }
+               message(LOG_CONS|LOG_INFO, "Available entropy sources that 
failed initalization:\n");
+               for (i=0; i < ENT_MAX; i++) 
+                       if (entropy_sources[i].init && 
entropy_sources[i].disabled == true && entropy_sources[i].failed_init == true) {
+                               rc = 1;
+                               message(LOG_CONS|LOG_INFO, "%d: %s (%s)\n", i,
+                                       entropy_sources[i].rng_name, 
entropy_sources[i].rng_sname);
+                       }
+
                quiet = true;
                close_all_entropy_sources();
                return rc;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/rngd.h new/rng-tools-6.12/rngd.h
--- old/rng-tools-6.11/rngd.h   2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/rngd.h   2021-03-11 13:57:40.000000000 +0100
@@ -140,6 +140,7 @@
        char *rng_fname;
        int rng_fd;
        bool disabled;
+       bool failed_init;
        int failures;
        int success;
        size_t ent_gathered;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/rngd_entsource.c 
new/rng-tools-6.12/rngd_entsource.c
--- old/rng-tools-6.11/rngd_entsource.c 2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/rngd_entsource.c 2021-03-11 13:57:40.000000000 +0100
@@ -36,7 +36,6 @@
 #include <syslog.h>
 #include <string.h>
 #include <stddef.h>
-#include <sysfs/libsysfs.h>
 
 #include "rngd.h"
 #include "fips.h"
@@ -159,7 +158,7 @@
  */
 int init_entropy_source(struct rng *ent_src)
 {
-       struct sysfs_attribute *rngavail;
+       int rngavail_fd;
        char buf[16];
 
        ent_src->rng_fd = open(ent_src->rng_fname, O_RDONLY | O_NOCTTY);
@@ -177,24 +176,24 @@
        /* RHEL7: since /dev/hwrng will exist now even if there isn't an rng 
backing it,
         * check to see if rng_available is empty, and return error if it is.
         */
-       rngavail = sysfs_open_attribute(RNG_AVAIL);
-       if (!rngavail) {
-               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "Unable to open 
sysfs attribute: %s\n", RNG_AVAIL);
+       rngavail_fd = open(RNG_AVAIL, O_RDONLY | O_NOCTTY);
+       if (rngavail_fd == -1) {
+               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "Unable to open 
sysfs file: %s\n", RNG_AVAIL);
                return 1;
        }
 
-       if (sysfs_read_attribute(rngavail)) {
-               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "Error reading 
sysfs attribute: %s\n", RNG_AVAIL);
-               sysfs_close_attribute(rngavail);
+       if (read(rngavail_fd, buf, sizeof(buf)) < 0) {
+               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "Error reading 
sysfs file: %s\n", RNG_AVAIL);
+               close(rngavail_fd);
                return 1;
        }
 
-       if (strncmp(rngavail->value, "\n", 1) == 0) {
-               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "no available rng 
device\n");
-               sysfs_close_attribute(rngavail);
+       if (strncmp(buf, "\n", 1) == 0) {
+               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "No available rng 
device\n");
+               close(rngavail_fd);
                return 1;
        }
-       sysfs_close_attribute(rngavail);
+       close(rngavail_fd);
 
 source_valid:
        /* Bootstrap FIPS tests */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/rngd_jitter.c 
new/rng-tools-6.12/rngd_jitter.c
--- old/rng-tools-6.11/rngd_jitter.c    2021-01-08 15:06:59.000000000 +0100
+++ new/rng-tools-6.12/rngd_jitter.c    2021-03-11 13:57:40.000000000 +0100
@@ -143,7 +143,7 @@
        size_t total;
 try_again:
        while (need) {
-               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "xread_jitter 
requests %d bytes from pipe\n", need);
+               message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "xread_jitter 
requests %ld bytes from pipe\n", need);
                request = read(pipefds[0], &bptr[size-need], need);
                if ((request < need) && 
ent_src->rng_options[JITTER_OPT_USE_AES].int_val) {
                        message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, 
"xread_jitter falls back to AES\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rng-tools-6.11/rngd_nistbeacon.c 
new/rng-tools-6.12/rngd_nistbeacon.c
--- old/rng-tools-6.11/rngd_nistbeacon.c        2021-01-08 15:06:59.000000000 
+0100
+++ new/rng-tools-6.12/rngd_nistbeacon.c        2021-03-11 13:57:40.000000000 
+0100
@@ -39,7 +39,6 @@
 #include <time.h>
 #include <sys/mman.h>
 #include <endian.h>
-#include <sysfs/libsysfs.h>
 #include <curl/curl.h>
 #include <libxml/xmlreader.h>
 #include <jansson.h>

Reply via email to