-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add rpm import in %post #4
Conversation
4884830
to
149e29f
Compare
cfe85fb
to
233379b
Compare
233379b
to
9d4bc70
Compare
I wasn't able to get the clean install plan to work; but also I didn't have a clean install so I manually deleted the key from the rpm database, could that have caused any issues? I built the RPM, installed it, verified the repo file was created, but installing the GPG key didn't work. Looking at my journalctl logs, I see:
Haven't looked up what "import read failed(2)" means yet. Then I tried doing it manually from a dom0 terminal ( |
Also, when I uninstall the package ( |
Based on rpm-software-management/rpm#2683 I think it's just masking the underlying error. |
hm, thanks / sorry about that - I'll take another look. I did step through all the test plans on my sdw machine last week. |
f920801
to
f14f1fd
Compare
f14f1fd
to
f39e184
Compare
f39e184
to
f0b994f
Compare
ok, I think we're ready for re-review :) When doing the 'upgrade' test (reinstalling the package on top of itself), wait about a minute after the package was installed for the first time (basically, watch the journal to be sure that the previous transaction lock held by importing the key has cleanly expired). Similarly, in the uninstall case, wait about 15-30 seconds to see the key removed from the rpm db. |
Everything looks good so far, I'm just waiting on my SDW system to re-provision so I can test the last "Upgrade testing: existing installs" steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test plan checks out, nice work :)
Add rpm key import in boostrap package post. There are 3 cases (clean install, upgrade package, uninstall); cover all of them.
See https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/ for guidelines on scriptlet ordering in upgrade, uninstall, etc.
Fixes freedomofpress/securedrop-workstation#423
Test plan
Clean install (no SDW)
Build this package with
make build-rpm
and install it in dom0.rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n' | grep 'SecureDrop Release Signing Key'
shows an entry corresponding to our release signing key in the rpm db (note: there's a 10 second delay because of trying to avoid rpm db transaction lock)Upgrade testing: existing installs (existing SDW/4.2 setup, release key imported into rpm database and yum.repos file present in dom0)
Upgrade testing: keyring package upgrade
This test plan is meant to 'test' a keyring upgrade, meaning that the key is removed then reimported from the rpm database.
Reinstall the keyring package on top of itself via
sudo dnf reinstall
. While installing, watch the journal in a separate terminal.Testing notes:
Removing files manually (manually deleting the key file or .repo file) then reinstalling the kerying package overtop of itself will not re-install the files or re-import the key. (This is standard rpm behaviour).