Hello community, here is the log from the commit of package gnuhealth for openSUSE:Factory checked in at 2019-11-12 11:56:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnuhealth (Old) and /work/SRC/openSUSE:Factory/.gnuhealth.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnuhealth" Tue Nov 12 11:56:11 2019 rev:34 rq:747441 version:3.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/gnuhealth/gnuhealth.changes 2019-06-12 13:19:09.592555474 +0200 +++ /work/SRC/openSUSE:Factory/.gnuhealth.new.2990/gnuhealth.changes 2019-11-12 11:57:57.703505673 +0100 @@ -1,0 +2,5 @@ +Mon Nov 11 18:22:37 UTC 2019 - Axel Braun <axel.br...@gmx.de> + +- demo.diff to update installation script for demo-db added + +------------------------------------------------------------------- New: ---- demo.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnuhealth.spec ++++++ --- /var/tmp/diff_new_pack.FXRM5J/_old 2019-11-12 11:57:59.139507203 +0100 +++ /var/tmp/diff_new_pack.FXRM5J/_new 2019-11-12 11:57:59.143507208 +0100 @@ -40,6 +40,7 @@ Source4: gnuhealth-webdav@.service Source5: openSUSE-gnuhealth-setup Source6: gnuhealth +Patch0: demo.diff BuildArch: noarch @@ -94,7 +95,7 @@ %prep %setup -q -n %{name}-%{version} -#%patch0 -p1 +%patch0 -p1 cp %{S:1} . cp %{S:2} . @@ -116,6 +117,10 @@ 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 @@ %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) ++++++ GNUHealth.README.SUSE ++++++ --- /var/tmp/diff_new_pack.FXRM5J/_old 2019-11-12 11:57:59.187507254 +0100 +++ /var/tmp/diff_new_pack.FXRM5J/_new 2019-11-12 11:57:59.191507259 +0100 @@ -77,10 +77,18 @@ 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 @@ 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 @@ [4] https://github.com/mbehrle/tryton/blob/wiki/InstallationonopenSUSE.md - -- Axel Braun <axel.br...@gmx.de> Fri Dec 7 18:21:20 UTC 2018 + -- Axel Braun <axel.br...@gmx.de> Wed Oct 30 11:11:20 UTC 2019 \ No newline at end of file ++++++ demo.diff ++++++ 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 + +