Skip to content

Commit

Permalink
Merge pull request #54 from phillxnet/53-Adopt-password-store
Browse files Browse the repository at this point in the history
Adopt "password-store" #53
  • Loading branch information
phillxnet authored Dec 4, 2023
2 parents d6b0d84 + b00dca1 commit b2f3a45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit b2f3a45

Please sign in to comment.