Skip to content

Commit

Permalink
Merge pull request #59 from phillxnet/58-Update-DB-format-on-install_…
Browse files Browse the repository at this point in the history
…upgrade-if-required

Update DB format on install/upgrade if required #58
  • Loading branch information
phillxnet authored Jan 25, 2024
2 parents 983aaef + 70d4bea commit 15f83ee
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rockstor.spec
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Requires: firewalld
Requires: postgresql13
Requires: postgresql13-server
Requires: postgresql13-server-devel
Requires: postgresql13-contrib
Requires: rsync
Requires: smartmontools
Requires: hdparm
Expand Down Expand Up @@ -153,6 +154,7 @@ Requires: firewalld
Requires: postgresql13
Requires: postgresql13-server
Requires: postgresql13-server-devel
Requires: postgresql13-contrib
Requires: rsync
Requires: smartmontools
Requires: hdparm
Expand Down Expand Up @@ -304,9 +306,10 @@ cd src/rockstor/
%defattr(-, root, root)
# e.g. collected from /usr/src/packages/BUILDROOT/rockstor-4.5.2-0.x86_64
/opt/%{name}
# enable owner (root) execute on build.sh.
# enable owner (root) execute on ./build.sh & ./src/rockstor/scripts/db_upgrade.sh
# TODO: "warning: File listed twice: /opt/rockstor/build.sh"
%attr(744, root, root) /opt/%{name}/build.sh
%attr(744, root, root) /opt/%{name}/src/rockstor/scripts/db_upgrade.sh
# all rockstro* service files from buildroot
%{_unitdir}/%{name}*
# Our nginx override dir and all contents:
Expand Down Expand Up @@ -440,6 +443,12 @@ exit 0
# Last scriptlet to execute from old or new package versions.
# Executed from new package version during install & upgrade similarly.
#
# Ensure Postgres DB format is sufficiently upgraded before invoking build.sh.
# Requires matching postgresqlXX-* dependencies to target format requested.
# If a system currently uses an older DB format, the associated binaries are assumed.
# "10 13" prepares Leap 15.3 4.1.0-0 installs, dup'ed to 15.4 4.6.1-0, for > 5.0.5-0.
%{prefix}/%{name}/src/rockstor/scripts/db_upgrade.sh 10 13
#
# Run build.sh which:
# 1. Installs Poetry to system via pipx.
# 2. Uses Poetry to create .venv.
Expand Down

0 comments on commit 15f83ee

Please sign in to comment.