Swap default bin_dir to something that actually resembles reality
ClosedPublic

Authored by demon on Dec 4 2017, 4:07 PM.

Details

Reviewers
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rMSCAa29a9f05f0a2: Swap default bin_dir to something that actually resembles reality
Patch without arc
git checkout -b D906 && curl -L https://phabricator.wikimedia.org/D906?download=true | git apply
Summary

Scap supports two methods of installation:

  • Via a debian package. If that's the case, the bin_dir will be set to /usr/bin
  • Via pip/setup.py. In this scenario, the bin_dir should actually be /usr/local/bin

Using /srv/deployment/scap/scap/bin is a weird legacy setting from when we deployed Scap by using Scap. We don't do that anymore, so this default value makes zero sense. Even in Scap-Vagrant, we install somewhere unique from this.

Diff Detail

Repository
rMSCA Scap
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
demon created this revision.Dec 4 2017, 4:07 PM
Restricted Application added a reviewer: mmodell. · View Herald TranscriptDec 4 2017, 4:07 PM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald Transcript
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
demon requested review of this revision.Dec 4 2017, 4:09 PM
mmodell accepted this revision.Dec 4 2017, 5:37 PM
This revision is now accepted and ready to land.Dec 4 2017, 5:37 PM
This revision was automatically updated to reflect the committed changes.

We actually do use /srv/deployment/scap/scap in vagrant on the targets. scap-target-01, etc. It just gets the path from config.py. This change makes:

17:41:16 ['/usr/local/bin/scap', 'deploy-local', '-v', '--repo', 'mockbase/deploy', '-g', 'default', 'fetch', '--refresh-config'] on scap-target-02 returned [127]: bash: /usr/local/bin/scap: No such file or directory
demon added a comment.Dec 4 2017, 5:42 PM

Bah! Ok, reverting.