Skip to content
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

Uninstalls RPM in prep-dev script #613

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

conorsch
Copy link
Contributor

Status

Ready for review

Description of Changes

Follow up to #587.

The dnf install -y <local_file> action will not reinstall a package
if the versions are the same. Since we expect package contents to
change, but not version strings, when running make clone, let's make
sure to uninstall the rpm package in dom0 so that the install action
always takes effect.

Testing

First, let's observe the problem. The steps to reproduce assume that you've already got a version of `securedrop-workstation-config

  1. In dev VM, check out main branch in this repo
  2. In dom0, run make clone && make prep-dev. This is just to confirm that you've got a recent version of the rpm already present
  3. In dom0, confirm file is absent: sudo ls -1 /srv/salt/ | grep sd-test shows nothing
  4. In dev VM, run touch dom0/sd-test.sls to create a new file
  5. In dom0, run make clone && make prep-dev
  6. In dom0, confirm file is still absent: sudo ls -1 /srv/salt/ | grep sd-test shows nothing

Now let's test the fix.

  1. In dev VM, check out this feature branch
  2. In dev VM, run git status and confirm dom0/sd-test.sls is still present locally (you don't need to commit it)
  3. In dom0, confirm file is absent: sudo ls -1 /srv/salt/ | grep sd-test shows nothing
  4. In dom0, run make clone && make prep-dev
  5. In dom0, confirm file is present: sudo ls -1 /srv/salt/ | grep sd-test shows "sd-test.sls"

Checklist

If you have made code changes

  • Linter (make flake8) passes in the development environment (this box may
    be left unchecked, as flake8 also runs in CI)

If you have made changes to the provisioning logic

  • All tests (make test) pass in dom0 of a Qubes install

  • This PR adds/removes files, and includes required updates to the packaging
    logic in MANIFEST.in and rpm-build/SPECS/securedrop-workstation-dom0-config.spec

Follow up to #587.

The `dnf install -y <local_file>` action will not reinstall a package
if the versions are the same. Since we expect package contents to
change, but not version strings, when running `make clone`, let's make
sure to uninstall the rpm package in dom0 so that the install action
always takes effect.
scripts/prep-dev Outdated Show resolved Hide resolved
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test plan passes, this LGTM!

@zenmonkeykstop zenmonkeykstop merged commit 56c86b1 into main Sep 14, 2020
SecureDrop Team Board automation moved this from Ready for Review to Done Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants