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

Adopt "password-store" #53 #54

Merged
merged 1 commit into from Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -73,14 +73,14 @@ Or you could rsync your local copy of the rockstor-rpmbuild repository, over fro
```shell
zypper install --no-recommends rpm-build
```
**NOTE: Solution 1: deinstallation of busybox-gzip ...**
**NOTE: Solution 1: de-installation of busybox-gzip ...**
May be required (replaced by the full gzip).
See: [pre-install gzip to avoid busybox-gzip via dependency](https://github.com/rockstor/rockstor-installer/issues/135)


## Build the RPM/SRPM

Both the regular RPM, and its source variant (SRPM) can be build with a single command.
Both the regular RPM, and its source variant (SRPM) can be built with a single command.

```shell
# Current dir must be that of the spec file:
Expand Down
11 changes: 11 additions & 0 deletions rockstor.spec
Expand Up @@ -47,6 +47,7 @@ BuildRequires: make
BuildRequires: postgresql13
BuildRequires: postgresql13-server
BuildRequires: postgresql13-server-devel
BuildRequires: password-store
# Notes re Poetry for future consideration:
# https://en.opensuse.org/openSUSE:Build_system_recipes#PEP517_style:
# https://github.com/openSUSE/python-rpm-macros/blob/79041e9986dd5427d0bc1f66936092ddfe04533b/README.md#install-macros
Expand Down Expand Up @@ -119,6 +120,7 @@ Requires: haveged
Requires: gcc
Requires: gcc-c++
Requires: make
Requires: password-store
%endif

# TUMBLEWEED
Expand Down Expand Up @@ -182,6 +184,7 @@ Requires: haveged
Requires: gcc
Requires: gcc-c++
Requires: make
Requires: password-store
%endif

# rpm build notes (from man rpmbuild):
Expand Down Expand Up @@ -280,6 +283,14 @@ install -m 644 ./conf/30-rockstor-nginx-override.conf %{buildroot}/etc/systemd/s
export LANG=C.UTF-8
export PYTHONIOENCODING=utf8
/usr/local/bin/poetry install --no-interaction --no-ansi > poetry-install.txt 2>&1

# Ensure GNUPG is setup for 'pass' (Idempotent)
/usr/bin/gpg --quick-generate-key --batch --passphrase '' rockstor@localhost || true
# Init 'pass' in ~ using above GPG key, and generate Django SECRET_KEY
# export Environment="PASSWORD_STORE_DIR=/root/.password-store"
/usr/bin/pass init rockstor@localhost
/usr/bin/pass generate --no-symbols --force python-keyring/rockstor/SECRET_KEY 100

export DJANGO_SETTINGS_MODULE=settings
/usr/local/bin/poetry run django-admin collectstatic --no-input --verbosity 1
cd src/rockstor/
Expand Down