Hello community, here is the log from the commit of package gnuhealth for openSUSE:Factory checked in at 2017-07-05 23:56:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnuhealth (Old) and /work/SRC/openSUSE:Factory/.gnuhealth.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnuhealth" Wed Jul 5 23:56:18 2017 rev:10 rq:507739 version:3.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gnuhealth/gnuhealth.changes 2017-03-28 15:24:22.779233369 +0200 +++ /work/SRC/openSUSE:Factory/.gnuhealth.new/gnuhealth.changes 2017-07-05 23:56:18.938174178 +0200 @@ -1,0 +2,15 @@ +Sun Jul 2 16:19:59 UTC 2017 - [email protected] + +- Version 3.2.0 + +------------------------------------------------------------------- +Sat Jun 24 10:56:45 UTC 2017 - [email protected] + +- Requirement on python3-PyWebDAV3-GNUHealth added + +------------------------------------------------------------------- +Tue Jun 20 15:26:18 UTC 2017 - [email protected] + +- GNU Health version 3.1.0b3 + +------------------------------------------------------------------- Old: ---- gnuhealth-3.0.8.tar.gz New: ---- gnuhealth-3.2.0.tar.gz gnuhealth.service ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnuhealth.spec ++++++ --- /var/tmp/diff_new_pack.Ifh9Ga/_old 2017-07-05 23:56:19.898038966 +0200 +++ /var/tmp/diff_new_pack.Ifh9Ga/_new 2017-07-05 23:56:19.902038403 +0200 @@ -2,7 +2,7 @@ # spec file for package gnuhealth # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2014-2016 Dr. Axel Braun +# Copyright (c) 2014-2017 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,20 +17,22 @@ # -%define majorver 3.0 - +%define majorver 3.2 Name: gnuhealth # List of additional build dependencies -BuildRequires: python-setuptools +BuildRequires: fdupes +BuildRequires: python3-setuptools -Version: %{majorver}.8 +Version: %{majorver}.0 Release: 0 Url: http://health.gnu.org Source: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz +#Source: %{name}-%{version}.tar.gz Source1: GNUHealth.README.SUSE Source2: gnuhealth-control +Source3: gnuhealth.service BuildArch: noarch @@ -39,17 +41,18 @@ Group: Productivity/Office/Management Requires: proteus -Requires: python-PyWebDAV -Requires: python-caldav -Requires: python-cracklib -Requires: python-hl7apy -Requires: python-imaging -Requires: python-ldap -Requires: python-polib -Requires: python-qrcode -Requires: python-simpleeval -Requires: python-six -Requires: python-vobject +Requires: python3-PyWebDAV3-GNUHealth +Requires: python3-caldav +Requires: python3-cracklib +Requires: python3-hl7apy +Requires: python3-ldap3 +Requires: python3-polib +Requires: python3-pyBarcode +Requires: python3-pymongo +Requires: python3-qrcode +Requires: python3-simpleeval +Requires: python3-six +Requires: python3-vobject Requires: trytond Requires: trytond_account Requires: trytond_account_invoice @@ -62,6 +65,7 @@ Requires: trytond_party Requires: trytond_product Requires: trytond_purchase +Requires: trytond_purchase_request Requires: trytond_stock Requires: trytond_stock_lot Requires: trytond_stock_supply @@ -89,41 +93,49 @@ cp %{S:2} . %build +#export LANG=en_US.UTF-8 +#export LC_CTYPE=en_US.UTF-8 +#export RC_LANG=en_US.UTF-8 for i in h*; do cd $i - python setup.py build + python3 setup.py build cd .. done - #pdq # cd pdq -# python setup.py build +# python3 setup.py build # cd .. +for i in try*; do + cd $i + python3 setup.py build + cd .. +done %install for i in h*; do cd $i - python setup.py install --prefix=%_prefix --root=%buildroot + python3 setup.py install --prefix=%_prefix --root=%buildroot cd .. done #pdq # cd pdq -# python setup.py install --prefix=%_prefix --root=%buildroot +# python3 setup.py install --prefix=%_prefix --root=%buildroot # cd .. +for i in try*; do + cd $i + python3 setup.py install --prefix=%_prefix --root=%buildroot + cd .. +done mkdir -p -m 755 %{buildroot}%{_bindir} install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control -# create user -%pre -#getent group tryton > /dev/null || /usr/sbin/groupadd -r tryton -#getent passwd gnuhealth > /dev/null || /usr/sbin/useradd -r -g tryton \ -# -d %{_localstatedir}/lib/%{name} -c 'GNU Health' gnuhealth -# Dont create as system user -#getent passwd gnuhealth > /dev/null || /usr/sbin/useradd -g tryton \ -# -c 'GNU Health' gnuhealth -#: +mkdir -p $RPM_BUILD_ROOT%{_unitdir} +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service + +%fdupes -s %{buildroot} +%pre #Write environment changes to /etc/bash.bashrc.local cat > /etc/bash.bashrc.local << "EOF" alias cdlogs='cd /var/log/trytond' @@ -133,9 +145,21 @@ alias editconf='${EDITOR} /etc/tryton/trytond.conf' EOF +%service_add_pre gnuhealth.service + +%post +%service_add_post gnuhealth.service + +%preun +%service_del_preun gnuhealth.service + +%postun +%service_del_postun gnuhealth.service + %files %defattr(744,root,root) %{_bindir}/gnuhealth-control +%{_unitdir}/%{name}.service %defattr(-,root,root) %doc README Changelog COPYING gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/* %{python_sitelib}/* ++++++ GNUHealth.README.SUSE ++++++ --- /var/tmp/diff_new_pack.Ifh9Ga/_old 2017-07-05 23:56:19.946032205 +0200 +++ /var/tmp/diff_new_pack.Ifh9Ga/_new 2017-07-05 23:56:19.950031642 +0200 @@ -14,11 +14,13 @@ <you are logged in as user 'root'> #su postgres #nano /var/lib/pgsql/data/pg_hba.conf -Change the line + +FOR LOCAL CONNECTIONS (Database on the same machine) change the line local all all md5 to local all all trust -Save your input. + +Save your input. This will make sure that Tryton/GNUHealth server can connect to the database 3) Create a role for 'tryton' in the database (sill as user postgres) #psql -c "CREATE USER tryton WITH CREATEDB;" @@ -32,7 +34,7 @@ uncomment super_pwd 6) start gnuhealth/trytond: -#systemctl start trytond +#systemctl start gnuhealth 7) Install the tryton client: #zypper in tryton @@ -40,10 +42,40 @@ 8) Open the tryton client: #tryton go to 'manage profiles' -> add -> name it 'localhost' -> Host: localhost --> you should now see a button to create a database +-> you should now see a selection of available databases + +Note: Fron Tryton Release 4.2 onwards it is not possible anymore to create databases +from the Frontend. You need to do this manually (see /usr/share/doc/packages/trytond/tryton-server.README.SUSE) DONE. -Check /usr/share/doc/packages/trytond/tryton-server.README.SUSE for more Information + +Upgrade +------- + + * In case you upgrade from a previous GNU Health make sure you apply the + upgrade procedures described in /usr/share/doc/packages/gnuhealth/upgrade. + + 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 + + Log in as database owner (usually tryton): + + # sudo su tryton -s /bin/bash + + Delete the 2 modules: + # psql mydb + delete from ir_module where name='pdq'; + delete from ir_module where name='hl7'; + + Quit with CRTL-D + Apply the database patch: + + # psql mydb < /usr/share/doc/packages/gnuhealth/upgrade/3.2/upgrade_32.sql + + Remember to replace mydb with the name of your database. GNUHealth for openSUSE (a bit more in detail) @@ -81,7 +113,7 @@ Nevertheless, you can use gnuhealth-control to create database backups, install languages and updates. Make sure the version of gnuhealth-control ends on -openSUSE. gnuhealth-control should run as root, if in doubt. In case you want to install additional Tryton modules, you need to include the Tryton repository: -zypper ar -f http://download.opensuse.org/repositories/Application:/ERP:/Tryton:/3.8/openSUSE_Leap_42.2 tryton +zypper ar -f http://download.opensuse.org/repositories/Application:/ERP:/Tryton:/4.2/openSUSE_Leap_42.3 tryton You may use the GNUHealth mailing list ([email protected]) for remarks or questions. @@ -105,4 +137,4 @@ [4] https://github.com/mbehrle/tryton/blob/wiki/InstallationonopenSUSE.md - -- Axel Braun <[email protected]> Wed Sep 28 18:35:02 UTC 2016 + -- Axel Braun <[email protected]> TUE Jun 20 15:40:04 UTC 2017 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Ifh9Ga/_old 2017-07-05 23:56:19.974028262 +0200 +++ /var/tmp/diff_new_pack.Ifh9Ga/_new 2017-07-05 23:56:19.978027698 +0200 @@ -1,4 +1,4 @@ <services> -<service name="download_files" mode="localonly" /> +<service name="download_files" mode="disabled" /> </services> ++++++ gnuhealth-3.0.8.tar.gz -> gnuhealth-3.2.0.tar.gz ++++++ /work/SRC/openSUSE:Factory/gnuhealth/gnuhealth-3.0.8.tar.gz /work/SRC/openSUSE:Factory/.gnuhealth.new/gnuhealth-3.2.0.tar.gz differ: char 5, line 1 ++++++ gnuhealth-control ++++++ --- /var/tmp/diff_new_pack.Ifh9Ga/_old 2017-07-05 23:56:20.018022064 +0200 +++ /var/tmp/diff_new_pack.Ifh9Ga/_new 2017-07-05 23:56:20.018022064 +0200 @@ -24,12 +24,12 @@ # ############################################################################## -VERSION="3.0.2.1-openSUSE" +VERSION="3.2.0-openSUSE" TRYTON_URL="http://downloads.tryton.org" GNUHEALTH_URL="http://ftp.gnu.org/gnu/health" TRANSLATE_URL="http://translate.gnusolidario.org" -GNUHEALTH_DIR="/usr/lib/python/site-packages/trytond/modules" +GNUHEALTH_DIR=$(ls -d /usr/lib/python3.* )/site-packages/trytond/modules UPDATE_DOWNLOAD_DIR="/tmp/gnuhealth_update" @@ -178,9 +178,14 @@ cli_msg "INFO" "Creating compressed tarball with DB and GNU Health Attachment directory" | tee -a $INFOFILE -# tar -cvf "${BACKDIR}/gnuhealth_${DB}_with_fs_backup_${BACKDATE}.tar.gz" $HOME || bailout tar -cvf "${BACKDIR}/gnuhealth_${DB}_with_fs_backup_${BACKDATE}.tar.gz" /var/lib/tryton || bailout - + + message "INFO" "Creating tarball with compressed DB and GNU Health home directory" | tee -a $INFOFILE + + tar -cvf "${BACKDIR}/gnuhealth_${DB}_with_fs_backup_${BACKDATE}.tar" \ + ${BACKDIR}/backup_${DB}_${BACKDATE}.gz ${BACKDIR}/gnuhealth_${DB}_fs_backup_${BACKDATE}.tar.gz \ + || bailout + cli_msg "INFO" "Backup Successful" | tee -a $INFOFILE #Remove lock file @@ -198,7 +203,7 @@ # else # cli_msg "INFO" "No GNU Health instance seems to be running" # fi - systemctl status trytond + systemctl status gnuhealth } @@ -324,6 +329,7 @@ # fi if [ $2 == "--dry-run" ];then + sudo zypper up -D trytond* gnuhealth exit 0 fi ++++++ gnuhealth.service ++++++ [Unit] Description=GNU Health server After=syslog.target Requires=postgresql.service [Service] Type=simple User=tryton Group=tryton PIDFile=/var/lib/trytond/trytond.pid ExecStart=/usr/bin/trytond --config /etc/tryton/trytond.conf --pidfile=/var/lib/tryton/trytond.pid --logconf=/etc/tryton/trytond_log.conf # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 # We rely on systemd to restart trytond if it dies Restart=always [Install] WantedBy=multi-user.target
