https://bugs.kde.org/show_bug.cgi?id=367601

            Bug ID: 367601
           Summary: fake-dev-random should not be used unconditionally
           Product: trojita
           Version: git
          Platform: Compiled Sources
                OS: OpenBSD
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Cryptography
          Assignee: trojita-b...@kde.org
          Reporter: cas...@schutijser.com

The fake-dev-random library, used in some Cryptography unit tests, should not
be used unconditionally. On OpenBSD, I am not able to compile trojita when I
enable the tests:


gmake -f CMakeFiles/fake-dev-random.dir/build.make
CMakeFiles/fake-dev-random.dir/build
gmake[2]: Entering directory '/home/caspar/src/trojita/_build'
[ 56%] Building C object
CMakeFiles/fake-dev-random.dir/tests/Utils/fake-dev-random.c.o
/usr/local/bin/egcc  -DQT_STRICT_ITERATORS -DQT_USE_FAST_CONCATENATION
-DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_QSTRINGBUILDER -Dfake_dev_random_EXPORTS
-I/home/caspar/src/trojita/src -I/home/caspar/src/trojita/_build  -g -fPIC   -o
CMakeFiles/fake-dev-random.dir/tests/Utils/fake-dev-random.c.o   -c
/home/caspar/src/trojita/tests/Utils/fake-dev-random.c
/home/caspar/src/trojita/tests/Utils/fake-dev-random.c:10:24: fatal error:
bits/fcntl.h: No such file or directory
 #include <bits/fcntl.h>
                        ^
compilation terminated.


The same problem probably applies to some other non-Linux operating systems
too.

There is no need to make it compile on OpenBSD; /dev/random does not block
there.

The commit message that introduced this file (commit
f29e5b1d84425965dfa3eee89b8b370c551ddd90) states the following: "Regarding the
test suite -- the /dev/urandom faking is needed for pre-2.1 GnuPG.". In my
humble opinion, it's unfortunate that the fake-dev-random hack is used
regardless of the GnuPG version.

Reproducible: Always

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to