forked from pool/gnuhealth
Accepting request 747441 from Application:ERP:GNUHealth:Factory
boo#1156476 OBS-URL: https://build.opensuse.org/request/show/747441 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuhealth?expand=0&rev=34
This commit is contained in:
@@ -77,10 +77,18 @@ go to 'manage profiles' -> add -> name it 'localhost' -> Host: localhost
|
||||
DONE. (now really)
|
||||
|
||||
Upgrade
|
||||
-------
|
||||
=======
|
||||
|
||||
* openSUSE supports online upgrade (zypper dup) between releases. In case you
|
||||
are updating your installation from openSUSE Leap 42.2 to 42.3, the following message will appear:
|
||||
* openSUSE supports online upgrade (zypper dup) between releases.
|
||||
|
||||
* In case you upgrade from a previous GNU Health make sure you apply the
|
||||
upgrade procedures described in /usr/share/doc/packages/gnuhealth/upgrade.
|
||||
|
||||
Afterwards, as user tryton, run tryton-admin to update your installation:
|
||||
|
||||
> /usr/bin/trytond-admin -c /etc/tryton/trytond.conf --all -d mydb
|
||||
|
||||
* In case you are updating your installation from openSUSE Leap 42.2 to 42.3, the following message will appear:
|
||||
|
||||
Problem: gnuhealth-3.2.0-12.1.noarch requires python3-PyWebDAV3-GNUHealth, but this requirement cannot be provided
|
||||
uninstallable providers: python3-PyWebDAV3-GNUHealth-0.10.1-1.1.noarch[repo-oss]
|
||||
@@ -91,13 +99,6 @@ Upgrade
|
||||
This message is somewhat misleading, as the new python3-PyWebDAV3-GNUHealth conflicts with python-PyWebDAV.
|
||||
Go for Solution 2
|
||||
|
||||
* In case you upgrade from a previous GNU Health make sure you apply the
|
||||
upgrade procedures described in /usr/share/doc/packages/gnuhealth/upgrade.
|
||||
|
||||
As user tryton, run tryton-admin:
|
||||
|
||||
> /usr/bin/trytond-admin -c /etc/tryton/trytond.conf --all -d mydb
|
||||
|
||||
* GNU_Health 3.0 on openSUSE delivered 2 modules, which are not (yet) in 3.2
|
||||
anymore: pdq and hl7. You need to delete them first
|
||||
|
||||
@@ -185,4 +186,4 @@ Have fun and keep the neighborhood well and fit!
|
||||
[4] https://github.com/mbehrle/tryton/blob/wiki/InstallationonopenSUSE.md
|
||||
|
||||
|
||||
-- Axel Braun <axel.braun@gmx.de> Fri Dec 7 18:21:20 UTC 2018
|
||||
-- Axel Braun <axel.braun@gmx.de> Wed Oct 30 11:11:20 UTC 2019
|
103
demo.diff
Normal file
103
demo.diff
Normal file
@@ -0,0 +1,103 @@
|
||||
diff --git a/scripts/demo/install_demo_database.sh b/scripts/demo/install_demo_database.sh
|
||||
--- a/scripts/demo/install_demo_database.sh
|
||||
+++ b/scripts/demo/install_demo_database.sh
|
||||
@@ -1,47 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
# Script to download/unpack and locally install the GNU Health demo database
|
||||
|
||||
-URL="http://health.gnu.org/downloads/postgres_dumps/gnuhealth-3.0.1-demo-data.tar.gz"
|
||||
-DB="gnuhealth_demo"
|
||||
+URL="https://www.gnuhealth.org/downloads/postgres_dumps/gnuhealth-$1-demo.sql.gz"
|
||||
+DB="ghdemo$1"
|
||||
|
||||
-if [[ $USER != "gnuhealth" ]]; then
|
||||
- echo "Run script as gnuhealth user"
|
||||
+help()
|
||||
+{
|
||||
+ cat << EOF
|
||||
+
|
||||
+GNU Health HMIS demo database installer
|
||||
+
|
||||
+usage: `basename $0` <db_version>
|
||||
+
|
||||
+ Example:
|
||||
+ $ bash ./install_demo_dabase.sh 36
|
||||
+
|
||||
+ will install the latest demo db for version 3.6.x
|
||||
+EOF
|
||||
+ exit 0
|
||||
+}
|
||||
+
|
||||
+bailout () {
|
||||
+ echo "Error"
|
||||
+ echo "Cleaning up..."
|
||||
+ cleanup
|
||||
exit 1
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+if [ $# -eq 0 ]; then
|
||||
+ help
|
||||
fi
|
||||
|
||||
+cleanup () {
|
||||
+ rm -f gnuhealth_demo_database.sql.gz
|
||||
+ rm -f gnuhealth_demo_database.sql
|
||||
+ }
|
||||
|
||||
-if psql -l | grep -q "$DB"; then
|
||||
+
|
||||
+if psql -l | grep -wq "$DB"; then
|
||||
echo "$DB database already exists"
|
||||
echo " delete it/change target database before proceeding"
|
||||
- exit 1
|
||||
+ bailout
|
||||
fi
|
||||
|
||||
-function cleanup {
|
||||
- rm -f demo_database.sql.gz
|
||||
- rm -f demo_database.sql
|
||||
- exit
|
||||
- }
|
||||
|
||||
-trap cleanup SIGHUP SIGINT SIGTERM EXIT
|
||||
|
||||
-echo -n 'Downloading the demo database...'
|
||||
-wget -q "$URL" -O demo_database.sql.gz
|
||||
-echo 'COMPLETE'
|
||||
+echo -n "Downloading the demo database..."
|
||||
+wget "$URL" -O gnuhealth_demo_database.sql.gz || bailout
|
||||
+echo 'SUCCESS...'
|
||||
|
||||
-echo -n 'Unpacking the database...'
|
||||
-gunzip -q demo_database.sql.gz
|
||||
-echo 'COMPLETE'
|
||||
+echo -n "Unpacking the database..."
|
||||
+gunzip -q gnuhealth_demo_database.sql.gz || bailout
|
||||
+echo 'SUCCESS...'
|
||||
|
||||
-echo -n 'Initializing empty database...'
|
||||
-psql -q -d template1 -c "create database $DB encoding='unicode'"
|
||||
-echo 'COMPLETE'
|
||||
+echo -n "Initializing empty database..."
|
||||
+createdb $DB
|
||||
+echo 'SUCCESS...'
|
||||
|
||||
-echo -n 'Importing demo database...'
|
||||
-psql -q "$DB" < demo_database.sql > /dev/null 2>&1
|
||||
-echo 'COMPLETE'
|
||||
+echo "Importing demo database..."
|
||||
+psql -q "$DB" < gnuhealth_demo_database.sql > /dev/null 2>&1 || bailout
|
||||
+echo "IMPORT OF DEMO DATABASE $DB COMPLETED SUCCESFULLY !"
|
||||
|
||||
-echo 'Use Tryton to access (with non-gnuhealth user!)...'
|
||||
+echo "Login Info:"
|
||||
echo " Database: $DB"
|
||||
-echo ' Username: admin'
|
||||
-echo ' Password: gnusolidario'
|
||||
+echo " Username: admin"
|
||||
+echo " Password: gnusolidario"
|
||||
exit 0
|
||||
+
|
||||
+
|
||||
|
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 18:22:37 UTC 2019 - Axel Braun <axel.braun@gmx.de>
|
||||
|
||||
- demo.diff to update installation script for demo-db added
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 11 16:10:20 UTC 2019 - Axel Braun <axel.braun@gmx.de>
|
||||
|
||||
|
@@ -40,6 +40,7 @@ Source3: gnuhealth.service
|
||||
Source4: gnuhealth-webdav@.service
|
||||
Source5: openSUSE-gnuhealth-setup
|
||||
Source6: gnuhealth
|
||||
Patch0: demo.diff
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -94,7 +95,7 @@ You would need the GNU Health Client as well, on the same or a different machine
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
#%patch0 -p1
|
||||
%patch0 -p1
|
||||
cp %{S:1} .
|
||||
cp %{S:2} .
|
||||
|
||||
@@ -116,6 +117,10 @@ mkdir -p -m 755 %{buildroot}%{_bindir}
|
||||
install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control
|
||||
install -p -m 755 %{S:5} %{buildroot}%{_bindir}/openSUSE-gnuhealth-setup
|
||||
install -p -m 755 %{S:6} %{buildroot}%{_bindir}/gnuhealth
|
||||
install -p -m 755 scripts/demo/install_demo_database.sh %{buildroot}%{_bindir}/install_demo_database.sh
|
||||
|
||||
#delete empty demo directory
|
||||
rm -rf scripts/demo
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
||||
@@ -159,6 +164,7 @@ EOF
|
||||
%defattr(744,root,root)
|
||||
%{_bindir}/gnuhealth-control
|
||||
%{_bindir}/openSUSE-gnuhealth-setup
|
||||
%{_bindir}/install_demo_database.sh
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_unitdir}/%{name}-webdav@.service
|
||||
%defattr(-,root,root)
|
||||
|
Reference in New Issue
Block a user