Skip to content

Conversation

@phillxnet
Copy link
Member

A silent failure of 'rpm --import' to update our expiration extended public key was observed when the prior non-extended key existed within rpmkeys.

Fixes #2988

Resolve by blindly removing known prior keys by Version on every rockstor systemd cascade (rockstor-pre specifically), and moving the rpm --import in-code-private-key from Web-UI activation to the same systemd service. Both command invocations are set to be failure tolerant.

A silent failure of 'rpm --import' to update our expiration extended
public key was observed when the prior non-extended key existed
within rpmkeys.

Resolve by blindly removing known prior keys by Version on every
rockstor systemd cascade (rockstor-pre specifically), and moving
the `rpm --import in-code-private-key` from Web-UI activation to
the same systemd service. Both command invocations are set to
be failure tolerant.
@phillxnet
Copy link
Member Author

Testing

A source install on Tumbleweed was modified with the patched files. This install had the prior

rpmkeys --list | grep Rockstor
5f043187-5ed2a099: The Rockstor Project (Rockstor Development) <support@rockstor.com> public key
rpm -qi gpg-pubkey-5f043187-5ed2a099

Indicated rpm prior import of the older non-extended key.
This key was then updated via:

curl https://rockstor.com/ROCKSTOR-GPG-KEY > /opt/rockstor/conf/ROCKSTOR-GPG-KEY

and all rockstor service stopped and restarted:

systemctl stop rockstor*
systemctl start rockstor-bootstrap

and the Rockstor key found and examined similarly:

rpmkeys --list | grep Rockstor
5f043187-5ed2a099: The Rockstor Project (Rockstor Development) <support@rockstor.com> public key
rpm -qi gpg-pubkey-5f043187-5ed2a099

In the above example the new key was instantiated under the same 'package' name as the prior, now removed, package.

@phillxnet
Copy link
Member Author

Testing rpm build

A Leap 15.6 host was used with no prior Rockstor public keys:

systemctl stop rockstor*
rpm --erase gpg-pubkey-5f043187

/opt/rockstor/conf/ROCKSTOR-GPG-KEY was confirmed to have the extended key.

systemctl start rockstor-bootstrap.service

A new gpg-pubkey-5f043187 rpm pub-key package version was found to have been installed with the following Version-Revision info:

rpm -qi gpg-pubkey-5f043187
Name        : gpg-pubkey
Version     : 5f043187
Release     : 68331efe

And the Description was confirmed to contain the extended public key.

The same system was reboot to ensure all rockstor services started as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant