Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jitterentropy: 3.3.1 -> 3.4.1 #241671

Merged
merged 3 commits into from
Jul 13, 2023
Merged

Conversation

thillux
Copy link
Contributor

@thillux thillux commented Jul 5, 2023

Description of changes

Update jitterentropy to 3.4.1 in order to enable ARM64 support for direct high resolution timestamp reading.
Furthermore, disable jitterentropy's own install with strip, as it is redundant and failed for me when cross-compiling
x86-64 to aarch64.

For a complete changelog, see: https://www.chronox.de/jent.html

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jul 5, 2023
@thillux thillux changed the title Update jitterentropy to 3.4.1 jitterentropy: 3.3.1 -> 3.4.1 Jul 5, 2023
@ofborg ofborg bot requested review from JohnAZoidberg and c0bw3b July 5, 2023 11:48
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jul 5, 2023
@nikstur nikstur self-requested a review July 5, 2023 12:00
@thillux
Copy link
Contributor Author

thillux commented Jul 5, 2023

Build of rng-tools is failing with this update. For a updated package, see #241685.

Copy link
Contributor

@nikstur nikstur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the correct form for the commit messages. This makes it possible for ofborg to build the right package.

@thillux thillux force-pushed the jitterentropy-3.4.1 branch from cb8a42f to 3dcb2bb Compare July 6, 2023 20:09
@thillux
Copy link
Contributor Author

thillux commented Jul 6, 2023

rng-tools 6.16 was merged now, so we can look at this MR again.

@nikstur
Copy link
Contributor

nikstur commented Jul 7, 2023

The message of 3dcb2bb should also start with the component, e.g.: jitterentropy: disable upstream install strip

@nikstur
Copy link
Contributor

nikstur commented Jul 7, 2023

Result of nixpkgs-review pr 241671 run on x86_64-linux 1

3 packages built:
  • jitterentropy
  • jitterentropy.dev
  • rng-tools

@thillux thillux force-pushed the jitterentropy-3.4.1 branch from 3dcb2bb to 211459b Compare July 7, 2023 08:41
@thillux
Copy link
Contributor Author

thillux commented Jul 7, 2023

The message of 3dcb2bb should also start with the component, e.g.: jitterentropy: disable upstream install strip

Done

@nikstur nikstur self-requested a review July 7, 2023 09:07
Copy link
Contributor

@nikstur nikstur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikstur nikstur added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jul 7, 2023
@nikstur nikstur requested a review from Janik-Haag July 7, 2023 09:08
@Janik-Haag
Copy link
Member

Result of nixpkgs-review pr 241671 run on x86_64-linux 1

1 package failed to build:
  • rng-tools
2 packages built:
  • jitterentropy
  • jitterentropy.dev

Copy link
Member

@Janik-Haag Janik-Haag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff looks good, rng-tools is expected to fail because of the version miss merge and should be fine after a rebase since #241685 is already merged, right?

@nikstur
Copy link
Contributor

nikstur commented Jul 7, 2023

1 package failed to build:

Very odd. For me all packages build (just ran nixpkgs-review again). This should already be rebased for the changes in rng-tools.

@Janik-Haag
Copy link
Member

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/kkq1fcasz7vqb9p9cc5sx3pdiry398nz-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "autoreconfPhase" }
autoreconfPhase
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /nix/store/b39bm70xs1pkjay30b57yrxywxnx4fhg-autoconf-2.71/bin/autoconf --force
configure.ac:77: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/ax_pthread.m4:88: AX_PTHREAD is expanded from...
configure.ac:77: the top level
autoreconf: running: /nix/store/b39bm70xs1pkjay30b57yrxywxnx4fhg-autoconf-2.71/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:74: installing './ar-lib'
configure.ac:28: installing './compile'
configure.ac:23: installing './config.guess'
configure.ac:23: installing './config.sub'
configure.ac:25: installing './install-sh'
configure.ac:25: installing './missing'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory '.'
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./config.sub
Updating Autotools / GNU config script to a newer upstream version: ./config.guess
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-dependency-tracking --prefix=/nix/store/82w96fwf9w0sshmjrlbi20y1b6yv4dx6-rng-tools-6.16 --enable-jitterentropy --without-nistbeacon --with-pkcs11 --with-rtlsdr --without-qrypt
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /nix/store/c2bq8xsayc90s33fd5xbm1vh5lrmwcfq-coreutils-9.3/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /nix/store/c2bq8xsayc90s33fd5xbm1vh5lrmwcfq-coreutils-9.3/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking dependency style of gcc... none
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking for ranlib... ranlib
checking the archiver (ar) interface... ar
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /nix/store/yw3g789y5fpmxbzgkhs4nv7xdnyklsjd-gnugrep-3.11/bin/grep
checking for egrep... /nix/store/yw3g789y5fpmxbzgkhs4nv7xdnyklsjd-gnugrep-3.11/bin/grep -E
checking whether gcc needs -traditional... no
checking for a sed that does not truncate output... /nix/store/n31qkcw7f4jkkl0crczd6hiyy8sdjaz5-gnused-4.9/bin/sed
checking whether gcc is Clang... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for sys/auxv.h... yes
configure: Searching for jitterentropy library
checking for library containing jent_version... -ljitterentropy
checking for jent_notime_settick in -ljitterentropy... no
checking for gcc options needed to detect all undeclared functions... none needed
checking whether pthread_attr_setaffinity_np is declared... yes
checking pkg-config is at least version 0.9.0... yes
checking for libp11... yes
checking for libcrypto... yes
checking for librtlsdr... yes
checking for openssl... yes
checking for libcap... yes
checking dependency style of gcc... (cached) none
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating contrib/Makefile
config.status: creating tests/Makefile
config.status: creating rngd.8
config.status: creating rngtest.1
config.status: creating rng-tools-config.h
config.status: executing depfiles commands
@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j8 SHELL=/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash AR:=\$\(AR\) PKCS11_ENGINE=/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so
make  all-recursive
make[1]: Entering directory '/build/source'
Making all in contrib
make[2]: Entering directory '/build/source/contrib'
gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o randstat.o randstat.c
gcc  -g -O2   -o randstat randstat.o  -ljitterentropy 
make[2]: Leaving directory '/build/source/contrib'
Making all in tests
make[2]: Entering directory '/build/source/tests'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/build/source/tests'
make[2]: Entering directory '/build/source'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -c -o stats.o stats.c
gcc -DHAVE_CONFIG_H -I.     -g -O2 -c -o rngtest.o rngtest.c
gcc -DHAVE_CONFIG_H -I.     -g -O2 -c -o fips.o fips.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd.o `test -f 'rngd.c' || echo './'`rngd.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd_entsource.o `test -f 'rngd_entsource.c' || echo './'`rngd_entsource.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd_linux.o `test -f 'rngd_linux.c' || echo './'`rngd_linux.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-util.o `test -f 'util.c' || echo './'`util.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-ossl_helpers.o `test -f 'ossl_helpers.c' || echo './'`ossl_helpers.c
�[01m�[Krngd_linux.c:�[m�[K In function '�[01m�[Krandom_add_entropy�[m�[K':
�[01m�[Krngd_linux.c:169:17:�[m�[K �[01;35m�[Kwarning: �[m�[Kignoring return value of '�[01m�[Kwrite�[m�[K' declared with attribute '�[01m�[Kwarn_unused_result�[m�[K' [�[01;35m�[K�]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result�-Wunused-result�]8;;��[m�[K]
  169 |                 �[01;35m�[Kwrite(random_fd, buf, size)�[m�[K;
      |                 �[01;35m�[K^~~~~~~~~~~~~~~~~~~~~~~~~~~�[m�[K
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd_rdrand.o `test -f 'rngd_rdrand.c' || echo './'`rngd_rdrand.c
gcc -DHAVE_CONFIG_H -I.     -g -O2 -c -o rdrand_asm.o rdrand_asm.S
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd_jitter.o `test -f 'rngd_jitter.c' || echo './'`rngd_jitter.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd_rtlsdr.o `test -f 'rngd_rtlsdr.c' || echo './'`rngd_rtlsdr.c
gcc -DHAVE_CONFIG_H -I.     -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -c -o rngd-rngd_pkcs11.o `test -f 'rngd_pkcs11.c' || echo './'`rngd_pkcs11.c
rm -f librngd.a
ar cru librngd.a fips.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib librngd.a
gcc  -g -O2   -o rngtest stats.o rngtest.o librngd.a -ljitterentropy 
gcc  -I/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/include/ -I/nix/store/0c7kp9vg2j1azd97j0rk1xrg31k39b73-libusb-1.0.26-dev/include/libusb-1.0 -DDEFAULT_PKCS11_ENGINE=\"/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so\" -I/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/include -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include  -I/nix/store/b6d7j76gz5df09sap8j3z0h1kw8alvzq-openssl-3.0.9-dev/include -I/nix/store/p691jsa2ilmqx4q0lfzhb74dkpzmfary-libcap-2.69-dev/include -pthread -g -O2 -pthread  -o rngd rngd-rngd.o rngd-rngd_entsource.o rngd-rngd_linux.o rngd-util.o rngd-ossl_helpers.o  rngd-rngd_rdrand.o rdrand_asm.o  rngd-rngd_jitter.o rngd-rngd_rtlsdr.o   rngd-rngd_pkcs11.o librngd.a -ljitterentropy  -L/nix/store/9x4iyq9wbjgx2i2c86rwf1i9lbdp1dsf-rtl-sdr-0.8.0/lib -lrtlsdr -lusb-1.0 -L/nix/store/bfvl60vfhlj69adz5l4cnm642yxzlbch-libp11-0.4.12/lib -lp11 -L/nix/store/73dswnrd48wncy29ij3b4i71554ap74s-openssl-3.0.9/lib -lcrypto    -L/nix/store/73dswnrd48wncy29ij3b4i71554ap74s-openssl-3.0.9/lib -lssl -lcrypto -L/nix/store/1n19h2v246ahp9rksw0y7q87c58rjax5-libcap-2.69-lib/lib -lcap   -ljitterentropy 
make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
patching script interpreter paths in tests/rngtestjitter.sh tests/rngtesturandom.sh tests/rngtestzero.sh
tests/rngtestjitter.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/sh"
tests/rngtesturandom.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/sh"
tests/rngtestzero.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/sh"
check flags: -j8 SHELL=/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash AR:=\$\(AR\) PKCS11_ENGINE=/nix/store/y7g2qfxrlhiqg3csyy3864mg8yczpzrc-opensc-0.23.0/lib/opensc-pkcs11.so VERBOSE=y check
Making check in contrib
make[1]: Entering directory '/build/source/contrib'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/build/source/contrib'
Making check in tests
make[1]: Entering directory '/build/source/tests'
make  rngtesturandom.sh rngtestzero.sh rngtestjitter.sh
make[2]: Entering directory '/build/source/tests'
make[2]: Nothing to be done for 'rngtesturandom.sh'.
make[2]: Nothing to be done for 'rngtestzero.sh'.
make[2]: Nothing to be done for 'rngtestjitter.sh'.
make[2]: Leaving directory '/build/source/tests'
make  check-TESTS
make[2]: Entering directory '/build/source/tests'
make[3]: Entering directory '/build/source/tests'
�[0;32mPASS�[m: rngtestzero.sh
�[0;32mPASS�[m: rngtesturandom.sh
�[0;31mFAIL�[m: rngtestjitter.sh
==========================================
   rng-tools 6.16: tests/test-suite.log
==========================================

# TOTAL: 3
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: rngtestjitter.sh
======================

Disabling 0: Hardware RNG Device (hwrng)
Disabling 2: Intel RDRAND Instruction RNG (rdrand)
Disabling 1: TPM RNG Device (tpm)
Initializing available sources
[jitter]: JITTER timeout set to 5 sec
[jitter]: Initializing AES buffer
[jitter]: Unable to obtain AES key, disabling JITTER source
[jitter]: Initialization Failed
[pkcs11]: No pkcs11 slots available
[pkcs11]: Initialization Failed
[rtlsdr]: Initialization Failed
Can't open any entropy source
Maybe RNG device modules are not loaded
FAIL rngtestjitter.sh (exit status: 1)

�[0;31m============================================================================�[m
�[0;31mTestsuite summary for rng-tools 6.16�[m
�[0;31m============================================================================�[m
�[1m# TOTAL: 3�[m
�[0;32m# PASS:  2�[m
# SKIP:  0
# XFAIL: 0
�[0;31m# FAIL:  1�[m
# XPASS: 0
# ERROR: 0
�[0;31m============================================================================�[m
�[0;31mSee tests/test-suite.log�[m
�[0;31mPlease report to Neil Horman <nhorman@tuxdriver.com>�[m
�[0;31m============================================================================�[m
make[3]: *** [Makefile:523: test-suite.log] Error 1
make[3]: Leaving directory '/build/source/tests'
make[2]: *** [Makefile:631: check-TESTS] Error 2
make[2]: Leaving directory '/build/source/tests'
make[1]: *** [Makefile:718: check-am] Error 2
make[1]: Leaving directory '/build/source/tests'
make: *** [Makefile:1013: check-recursive] Error 1

that's the build log

@nikstur
Copy link
Contributor

nikstur commented Jul 7, 2023

@ofborg build rng-tools

@Janik-Haag
Copy link
Member

Now ofborg failed as well :/

@thillux thillux force-pushed the jitterentropy-3.4.1 branch from 211459b to d92f351 Compare July 9, 2023 11:42
@thillux
Copy link
Contributor Author

thillux commented Jul 9, 2023

I rebased to master again.

@thillux
Copy link
Contributor Author

thillux commented Jul 9, 2023

Result of nixpkgs-review pr 241671 run on x86_64-linux 1

3 packages built:
  • jitterentropy
  • jitterentropy.dev
  • rng-tools

@Janik-Haag
Copy link
Member

Result of nixpkgs-review pr 241671 run on x86_64-linux 1

1 package failed to build:
  • rng-tools
2 packages built:
  • jitterentropy
  • jitterentropy.dev

@Janik-Haag
Copy link
Member

I don't get it, still failes with the same error for me.

@nikstur
Copy link
Contributor

nikstur commented Jul 10, 2023

This might be an issue with hardware impurities. I think the most sensible thing to do here is to disable the test on rng-tools.

@thillux
Copy link
Contributor Author

thillux commented Jul 10, 2023

@nikstur suggested, that these tests may be somehow hardware dependent. I'll test on some other platform this evening and will have a look again @Janik-Haag.

@Janik-Haag
Copy link
Member

Thank's for all the effort, I really appreciate it D:

@thillux
Copy link
Contributor Author

thillux commented Jul 10, 2023

@Janik-Haag I also experienced a failing test on an older notebook. Increasing the timeout in rng-tools did the trick for me:

diff --git a/rngd.c b/rngd.c
index 38b81c6..a241dbf 100644
--- a/rngd.c
+++ b/rngd.c
@@ -232,7 +232,7 @@ static struct rng_option jitter_options[] = {
        [JITTER_OPT_TIMEOUT] = {
                .key = "timeout",
                .type = VAL_INT,
-               .int_val = 5,
+               .int_val = 10,
        },
        {
                .key = NULL,

Should I add a commit, which patches this in rng-tools?

@thillux thillux force-pushed the jitterentropy-3.4.1 branch from d92f351 to daa4a03 Compare July 10, 2023 10:02
@Janik-Haag
Copy link
Member

Result of nixpkgs-review pr 241671 run on x86_64-linux 1

3 packages built:
  • jitterentropy
  • jitterentropy.dev
  • rng-tools

@Janik-Haag
Copy link
Member

Jup that fixed it, I will merge this once ci is successful. Sorry for all the trouble. Btw my computer isn't thaattttt old, it's a t480 from 2018 so only 5 years with a 4 core/8 thread i7.

@thillux
Copy link
Contributor Author

thillux commented Jul 10, 2023

My daily driver notebook is a T430 from 2011 or so. That's what old meant for me :) I did not have your T480 from the future in mind ^^

@mweinelt mweinelt removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jul 10, 2023
@thillux thillux requested review from nikstur and Janik-Haag July 10, 2023 16:22
Copy link
Contributor

@nikstur nikstur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a minimum the patch needs a link to the upstream PR or Issue.

However, overall, I'd prefer if we just disable the tests instead of including a patch here. The patch will remain in the git history forever and patching upstream bugs is out of scope for Nixpkgs (unless its fixing something Nix-specific or is security relevant).

@thillux
Copy link
Contributor Author

thillux commented Jul 10, 2023

Upstream discussion around rng-tools and current kernels: nhorman/rng-tools#195
This discussion mentions, that rng-tools do not initialize jitterentropy correctly when running in a VM without increasing the timeout of jitterentropy.

@Janik-Haag
Copy link
Member

Janik-Haag commented Jul 10, 2023

At a minimum the patch needs a link to the upstream PR or Issue.

That's not entirely correct there are some cases where we have to patch stuff like paths or other stuff that is nix specific where a comment describing why and what are we doing is enough. In this case a comment with the link to the upstream issue should be enough in my opinion.

@nikstur
Copy link
Contributor

nikstur commented Jul 10, 2023

patch stuff like paths or other stuff that is nix specific

That's the key to me: if something is nix specific (i.e. is only relevant for Nixpkgs and NixOS) it should (and also kinda has) to be patched inside Nixpkgs. But this is not the case here.

Every patch we include becomes a maintenance burden for Nixpkgs maintainers, so we should be wary of them and use them very sparingly. That's why, for example, the systemd maintainers in Nixpkgs try to actively reduce the number of patches we need to apply: #80038

Anyways, anything becomes bikeshedding at some point, so I'm fine with including the patch as is if we get a comment inside the code.

@Janik-Haag
Copy link
Member

I just wanted to paint a bigger picture, that it's not always possible to put in a link to the upstream issue so the minimum is a comment, and as soon as it's added I'll happily merge it. Your point is totally valid and I would have missed is in this case.

thillux added 2 commits July 13, 2023 12:20
update to new version 3.4.1 in order to gain support
for native timestamps on ARM64.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
This install strip is later done through nixpkgs and is not needed.
Furthermore it failed for me when cross compiling on x86-64 to aarch64.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
@thillux thillux force-pushed the jitterentropy-3.4.1 branch from daa4a03 to 8f6e64e Compare July 13, 2023 10:21
@thillux
Copy link
Contributor Author

thillux commented Jul 13, 2023

rng-tools already has a closed PR regarding the timeout behavior. nhorman/rng-tools#178

I'm currently testing with an adapted package for rng-tools, which sets a larger timeout for the tests, without needing a separate patch. I'll ping you, if it works for me.

…ropy-3.4.1

With jitterentropy 3.4.1 the initial timeout of rng-tools for the
initialization of jitterentropy seems to be too small in some cases.
Set a larger timeout for tests. Add comment how this timeout can be
set by users needing it.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
@thillux thillux force-pushed the jitterentropy-3.4.1 branch from 8f6e64e to a8efd66 Compare July 13, 2023 10:51
@thillux
Copy link
Contributor Author

thillux commented Jul 13, 2023

@nikstur @Janik-Haag Please have a look again, if this works for you. I can build rng-tools with running tests on my platform with the latest commit even without an additional patch.

@thillux thillux requested a review from nikstur July 13, 2023 12:58
@Janik-Haag
Copy link
Member

Result of nixpkgs-review pr 241671 run on x86_64-linux 1

3 packages built:
  • jitterentropy
  • jitterentropy.dev
  • rng-tools

Copy link
Contributor

@nikstur nikstur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that we were able to avoid the patch!

@Janik-Haag Janik-Haag merged commit 351143b into NixOS:master Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants