Skip to content

Commit

Permalink
Rename securedrop-admin to sdw-admin
Browse files Browse the repository at this point in the history
Resolves #586
  • Loading branch information
eloquence committed Jul 23, 2020
1 parent dcef4ec commit 34a16a2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include dom0/*.j2
include dom0/*.yml
include dom0/*.conf
include dom0/remove-tags
include dom0/securedrop-admin
include dom0/sdw-admin
include dom0/securedrop-login
include dom0/securedrop-launcher.desktop
include dom0/securedrop-handle-upgrade
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ You can install the staging environment in two ways:

- If you have an up-to-date clone of this repo with a valid configuration in `dom0`, you can use the `make staging` target to provision a staging environment. Prior to provisioning, `make staging` will set your `config.json` environment to `staging`. As part of the provisioning, your package repository configuration will be updated to use the latest test release of the RPM package, and the latest nightlies of the Debian packages.

- If you want to install a staging environment from scratch in a manner similar to a production install (starting from an RPM, and using `securedrop-admin` for the installation), follow the process in the following sections.
- If you want to install a staging environment from scratch in a manner similar to a production install (starting from an RPM, and using `sdw-admin` for the installation), follow the process in the following sections.

#### Download and install securedrop-workstation-dom0-config package

Expand Down Expand Up @@ -267,7 +267,7 @@ Your workstation configuration will reside in `/usr/share/securedrop-workstation
In a terminal in `dom0`, run the following commands:

```
[dom0]$ securedrop-admin --apply
[dom0]$ sdw-admin --apply
```

## Development
Expand Down
2 changes: 1 addition & 1 deletion launcher/sdw_updater_gui/Updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def apply_dom0_state():
"""
Applies the dom0 state to ensure dom0 and AppVMs are properly
Configured. This will *not* enforce configuration inside the AppVMs.
Here, we call qubectl directly (instead of through securedrop-admin) to
Here, we call qubectl directly (instead of through sdw-admin) to
ensure it is environment-specific.
"""
sdlog.info("Applying dom0 state")
Expand Down
4 changes: 2 additions & 2 deletions rpm-build/SPECS/securedrop-workstation-dom0-config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ install -m 644 dom0/securedrop-login %{buildroot}/srv/salt/
install -m 644 dom0/securedrop-launcher.desktop %{buildroot}/srv/salt/
install -m 655 dom0/securedrop-handle-upgrade %{buildroot}/srv/salt/
install -m 655 dom0/update-xfce-settings %{buildroot}/srv/salt/
install -m 755 scripts/securedrop-admin.py %{buildroot}/%{_bindir}/securedrop-admin
install -m 755 scripts/sdw-admin.py %{buildroot}/%{_bindir}/sdw-admin
install -m 644 sd-app/* %{buildroot}/srv/salt/sd/sd-app/
install -m 644 sd-proxy/* %{buildroot}/srv/salt/sd/sd-proxy/
install -m 644 sd-whonix/* %{buildroot}/srv/salt/sd/sd-whonix/
Expand All @@ -87,7 +87,7 @@ install -m 644 launcher/sdw_util/*.py %{buildroot}/srv/salt/launcher/sdw_util/
%doc README.md LICENSE
%attr(755, root, root) /opt/securedrop/launcher/sdw-launcher.py
%attr(755, root, root) /opt/securedrop/launcher/sdw-notify.py
%attr(755, root, root) %{_bindir}/securedrop-admin
%attr(755, root, root) %{_bindir}/sdw-admin
%{python3_sitelib}/securedrop_workstation_dom0_config*
%{_datadir}/%{name}
/opt/securedrop/launcher/**/*.py
Expand Down
14 changes: 7 additions & 7 deletions scripts/securedrop-admin.py → scripts/sdw-admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def copy_config():
["sudo", "cp", os.path.join(SCRIPTS_PATH, "sd-journalist.sec"), SALT_PATH]
)
except subprocess.CalledProcessError:
raise SDAdminException("Error copying configuration")
raise SDWAdminException("Error copying configuration")


def provision_all():
Expand All @@ -64,7 +64,7 @@ def provision_all():
try:
subprocess.check_call([os.path.join(SCRIPTS_PATH, "scripts/provision-all")])
except subprocess.CalledProcessError:
raise SDAdminException("Error during provision-all")
raise SDWAdminException("Error during provision-all")


def validate_config(path):
Expand All @@ -74,7 +74,7 @@ def validate_config(path):
try:
validator = SDWConfigValidator(path) # noqa: F841
except ValidationError:
raise SDAdminException("Error while validating configuration")
raise SDWAdminException("Error while validating configuration")


def refresh_salt():
Expand All @@ -85,12 +85,12 @@ def refresh_salt():
try:
subprocess.check_call(["sudo", "rm", "-rf", "/var/cache/salt"])
except subprocess.CalledProcessError:
raise SDAdminException("Error while clearing Salt cache")
raise SDWAdminException("Error while clearing Salt cache")

try:
subprocess.check_call(["sudo", "qubesctl", "saltutil.sync_all", "refresh=true"])
except subprocess.CalledProcessError:
raise SDAdminException("Error while synchronizing Salt")
raise SDWAdminException("Error while synchronizing Salt")


def perform_uninstall():
Expand Down Expand Up @@ -122,7 +122,7 @@ def perform_uninstall():
["sudo", "dnf", "-y", "-q", "remove", "securedrop-workstation-dom0-config"]
)
except subprocess.CalledProcessError:
raise SDAdminException("Error during uninstall")
raise SDWAdminException("Error during uninstall")

print(
"Instance secrets (Journalist Interface token and Submission private key) are still "
Expand Down Expand Up @@ -158,7 +158,7 @@ def main():
sys.exit(0)


class SDAdminException(Exception):
class SDWAdminException(Exception):
pass


Expand Down

0 comments on commit 34a16a2

Please sign in to comment.