gpg: insecure memory warnings for tests
Hello,
while trying to package schleuder for Archlinux I get the following errors when running the tests during the packaging step:
Created database 'db/test.sqlite3'
Randomized with seed 63950
.....................................................................................................................................................................................................................................................................................................................................................................................................................................FFF.F.FF..............................................................................................................
Failures:
1) Schleuder::ListBuilder creates a listdir for the list
Failure/Error: raise Errors::KeyAdduidFailed.new(exc.to_s)
Schleuder::Errors::KeyAdduidFailed:
Adding a user-ID to the OpenPGP key failed with this message:
gpg: Warning: using insecure memory!
Kind regards,
Your Schleuder system.
# ./lib/schleuder/list_builder.rb:103:in `rescue in adduids'
# ./lib/schleuder/list_builder.rb:88:in `adduids'
# ./lib/schleuder/list_builder.rb:82:in `create_key'
# ./lib/schleuder/list_builder.rb:41:in `run'
# ./spec/schleuder/unit/list_builder_spec.rb:41:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:48:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:47:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# RuntimeError:
# gpg: Warning: using insecure memory!
# ./lib/schleuder/list_builder.rb:93:in `block in adduids'
2) Schleuder::ListBuilder creates a new, valid list
Failure/Error: raise Errors::KeyAdduidFailed.new(exc.to_s)
Schleuder::Errors::KeyAdduidFailed:
Adding a user-ID to the OpenPGP key failed with this message:
gpg: Warning: using insecure memory!
Kind regards,
Your Schleuder system.
# ./lib/schleuder/list_builder.rb:103:in `rescue in adduids'
# ./lib/schleuder/list_builder.rb:88:in `adduids'
# ./lib/schleuder/list_builder.rb:82:in `create_key'
# ./lib/schleuder/list_builder.rb:41:in `run'
# ./spec/schleuder/unit/list_builder_spec.rb:9:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:48:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:47:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# RuntimeError:
# gpg: Warning: using insecure memory!
# ./lib/schleuder/list_builder.rb:93:in `block in adduids'
3) Schleuder::ListBuilder subscribes the adminaddress and ignores the adminfingerprint if an adminkey was given
Failure/Error: raise Errors::KeyAdduidFailed.new(exc.to_s)
Schleuder::Errors::KeyAdduidFailed:
Adding a user-ID to the OpenPGP key failed with this message:
gpg: Warning: using insecure memory!
Kind regards,
Your Schleuder system.
# ./lib/schleuder/list_builder.rb:103:in `rescue in adduids'
# ./lib/schleuder/list_builder.rb:88:in `adduids'
# ./lib/schleuder/list_builder.rb:82:in `create_key'
# ./lib/schleuder/list_builder.rb:41:in `run'
# ./spec/schleuder/unit/list_builder_spec.rb:85:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:48:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:47:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# RuntimeError:
# gpg: Warning: using insecure memory!
# ./lib/schleuder/list_builder.rb:93:in `block in adduids'
4) Schleuder::ListBuilder subscribes the adminaddress and respects the given adminfingerprint
Failure/Error: raise Errors::KeyAdduidFailed.new(exc.to_s)
Schleuder::Errors::KeyAdduidFailed:
Adding a user-ID to the OpenPGP key failed with this message:
gpg: Warning: using insecure memory!
Kind regards,
Your Schleuder system.
# ./lib/schleuder/list_builder.rb:103:in `rescue in adduids'
# ./lib/schleuder/list_builder.rb:88:in `adduids'
# ./lib/schleuder/list_builder.rb:82:in `create_key'
# ./lib/schleuder/list_builder.rb:41:in `run'
# ./spec/schleuder/unit/list_builder_spec.rb:72:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:48:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:47:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# RuntimeError:
# gpg: Warning: using insecure memory!
# ./lib/schleuder/list_builder.rb:93:in `block in adduids'
5) Schleuder::ListBuilder subscribes the adminaddress and imports the adminkey
Failure/Error: raise Errors::KeyAdduidFailed.new(exc.to_s)
Schleuder::Errors::KeyAdduidFailed:
Adding a user-ID to the OpenPGP key failed with this message:
gpg: Warning: using insecure memory!
Kind regards,
Your Schleuder system.
# ./lib/schleuder/list_builder.rb:103:in `rescue in adduids'
# ./lib/schleuder/list_builder.rb:88:in `adduids'
# ./lib/schleuder/list_builder.rb:82:in `create_key'
# ./lib/schleuder/list_builder.rb:41:in `run'
# ./spec/schleuder/unit/list_builder_spec.rb:60:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:48:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:47:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# RuntimeError:
# gpg: Warning: using insecure memory!
# ./lib/schleuder/list_builder.rb:93:in `block in adduids'
6) Schleuder::ListBuilder creates a list-key with all required UIDs
Failure/Error: raise Errors::KeyAdduidFailed.new(exc.to_s)
Schleuder::Errors::KeyAdduidFailed:
Adding a user-ID to the OpenPGP key failed with this message:
gpg: Warning: using insecure memory!
Kind regards,
Your Schleuder system.
# ./lib/schleuder/list_builder.rb:103:in `rescue in adduids'
# ./lib/schleuder/list_builder.rb:88:in `adduids'
# ./lib/schleuder/list_builder.rb:82:in `create_key'
# ./lib/schleuder/list_builder.rb:41:in `run'
# ./spec/schleuder/unit/list_builder_spec.rb:49:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:48:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:47:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# RuntimeError:
# gpg: Warning: using insecure memory!
# ./lib/schleuder/list_builder.rb:93:in `block in adduids'
Finished in 4 minutes 20.7 seconds (files took 1.94 seconds to load)
539 examples, 6 failures
Failed examples:
rspec ./spec/schleuder/unit/list_builder_spec.rb:37 # Schleuder::ListBuilder creates a listdir for the list
rspec ./spec/schleuder/unit/list_builder_spec.rb:5 # Schleuder::ListBuilder creates a new, valid list
rspec ./spec/schleuder/unit/list_builder_spec.rb:81 # Schleuder::ListBuilder subscribes the adminaddress and ignores the adminfingerprint if an adminkey was given
rspec ./spec/schleuder/unit/list_builder_spec.rb:69 # Schleuder::ListBuilder subscribes the adminaddress and respects the given adminfingerprint
rspec ./spec/schleuder/unit/list_builder_spec.rb:56 # Schleuder::ListBuilder subscribes the adminaddress and imports the adminkey
rspec ./spec/schleuder/unit/list_builder_spec.rb:45 # Schleuder::ListBuilder creates a list-key with all required UIDs
Randomized with seed 63950
During these tests I don't really care about such errors and therefor I tried to ignore them. My current code for running the tests looks like this:
export GNUPGHOME=.gnupg
mkdir -p "${GNUPGHOME}"
echo "no-secmem-warning" >> "${GNUPGHOME}/gpg.conf"
export CHECK_CODE_COVERAGE=false
export SCHLEUDER_CONFIG=spec/schleuder.yml
export SCHLEUDER_ENV=test
bundle exec rake db:init
bundle exec rspec
Any idea how I can ignore these errors in my tests?
I can't use setuid, as the build environment has no permissions to do that.
Best regards