-
Notifications
You must be signed in to change notification settings - Fork 46
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
Remove legacy updater #430
Conversation
25cbedd
to
ba42f32
Compare
To cherry-pick this change without creating a new commit, as part of provisioning, you can use this command on the
The change will be staged but not committed:
Until we're ready to merge this, I'll keep it in sync with |
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.
Minor comments, throughout. Haven't tested, but based on visual review, does what it says on the tin.
- /etc/pki/rpm-gpg/RPM-GPG-KEY-securedrop-workstation-test | ||
- /etc/cron.daily/securedrop-update-cron |
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.
Because the clean action ensures state=absent, it actually makes sense to preserve the entries here. Note that /srv/*
items may still need to be removed, either here or via clean-salt
.
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.
Done.
ba42f32
to
e034bbb
Compare
ac2c430
to
90d0c25
Compare
Since this changes the RPM, it should bump the package version -- I've not done that for now, but will before promoting to "ready", once other dependencies for this PR are met. |
@@ -43,16 +43,14 @@ install -m 755 -d %{buildroot}/srv/salt/sd/sd-workstation | |||
install -m 755 -d %{buildroot}/srv/salt/sd/sys-firewall | |||
install -m 755 -d %{buildroot}/usr/share/%{name}/scripts | |||
install -m 755 -d %{buildroot}/srv/salt/sd/usb-autoattach | |||
install -m 755 -d %{buildroot}/%{_bindir} |
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.
This is necessary as the directory was previously created as part of the setup.py
run.
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.
(As an aside, %{_bindir}
has a leading slash, so those sorts of uses resolve to //
. That's a noop, but can omit the unnecessary /
- which is also used in the original code - if that's preferred.)
158600c
to
08e30b2
Compare
(Rebased to fix conflicts.) |
08e30b2
to
e27aad7
Compare
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.
After merging #458, the only thing that the cron job will is customization within templates themselves. Given the runtimes of the make all
command and the ability for potential admins to manually apply those states, I think this is fine to merge now.
LGTM, thanks @eloquence and @kushaldas . Tested with provided test plan and additional steps (specifically staging scenario).
Development environment
- Run
make clean
- Confirm the following files do not exist (
make clean
logic is still removing them)-
/srv/salt/securedrop-update
-
/usr/bin/securedrop-update
-
/etc/cron.daily/securedrop-update-cron
(symlink)
-
- Run
make all
-
make all
completes without error - Confirm the following files do not exist (
make clean
logic is still removing them)-
/srv/salt/securedrop-update
-
/usr/bin/securedrop-update
-
/etc/cron.daily/securedrop-update-cron
(symlink)
-
-
make test
: All tests pass
Staging Environment
- Build rpm on this branch
- Installs successfully in dom0
-
securedrop-admin --apply
completes successfully -
securedrop-update
and/etc/cron.daily/securedrop-update-cron
are absent
Status
Ready for review
Description
Resolves #412
The preflight updater is now at feature parity with the cron job that fires every 24 hours to update VMs:
Therefore, it is safe to remove the cron job at this time. This PR preserves the
securedrop-login
script, which enforces updates to thesd-viewer
template on login, until #415 is resolved.NOTE: Because it changes the contents of the RPM package, this PR bumps the RPM version.
Test plan
Preparatory steps
master
)make clone
it intodom0
Test plan
make clean
make clean
logic is still removing them)/srv/salt/securedrop-update
/usr/bin/securedrop-update
/etc/cron.daily/securedrop-update-cron
(symlink)make all
make clean
logic is still removing them)/srv/salt/securedrop-update
/usr/bin/securedrop-update
/etc/cron.daily/securedrop-update-cron
(symlink)Checklist
make flake8
passesmake test
passes in dom0Attribution
This PR is based on #322, originally by @kushaldas.