Accepting request 507739 from Application:ERP:Tryton:Factory
Final version GNU Health 3.2 OBS-URL: https://build.opensuse.org/request/show/507739 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuhealth?expand=0&rev=10
This commit is contained in:
parent
7063960bca
commit
b62dfd1c83
@ -14,11 +14,13 @@ You have already installed the package gnuhealth and found this documentation. G
|
|||||||
<you are logged in as user 'root'>
|
<you are logged in as user 'root'>
|
||||||
#su postgres
|
#su postgres
|
||||||
#nano /var/lib/pgsql/data/pg_hba.conf
|
#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
|
local all all md5
|
||||||
to
|
to
|
||||||
local all all trust
|
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)
|
3) Create a role for 'tryton' in the database (sill as user postgres)
|
||||||
#psql -c "CREATE USER tryton WITH CREATEDB;"
|
#psql -c "CREATE USER tryton WITH CREATEDB;"
|
||||||
@ -32,7 +34,7 @@ Save your input.
|
|||||||
uncomment super_pwd
|
uncomment super_pwd
|
||||||
|
|
||||||
6) start gnuhealth/trytond:
|
6) start gnuhealth/trytond:
|
||||||
#systemctl start trytond
|
#systemctl start gnuhealth
|
||||||
|
|
||||||
7) Install the tryton client:
|
7) Install the tryton client:
|
||||||
#zypper in tryton
|
#zypper in tryton
|
||||||
@ -40,10 +42,40 @@ uncomment super_pwd
|
|||||||
8) Open the tryton client:
|
8) Open the tryton client:
|
||||||
#tryton
|
#tryton
|
||||||
go to 'manage profiles' -> add -> name it 'localhost' -> Host: localhost
|
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.
|
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)
|
GNUHealth for openSUSE (a bit more in detail)
|
||||||
@ -81,7 +113,7 @@ Unlike the standard GNUHealth setup, openSUSE treats GNUHealth as add-on (additi
|
|||||||
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.
|
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:
|
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 (health@gnu.org) for remarks or questions.
|
You may use the GNUHealth mailing list (health@gnu.org) for remarks or questions.
|
||||||
|
|
||||||
@ -105,4 +137,4 @@ Have fun and keep the neighborhood well and fit!
|
|||||||
[4] https://github.com/mbehrle/tryton/blob/wiki/InstallationonopenSUSE.md
|
[4] https://github.com/mbehrle/tryton/blob/wiki/InstallationonopenSUSE.md
|
||||||
|
|
||||||
|
|
||||||
-- Axel Braun <axel.braun@gmx.de> Wed Sep 28 18:35:02 UTC 2016
|
-- Axel Braun <axel.braun@gmx.de> TUE Jun 20 15:40:04 UTC 2017
|
||||||
|
2
_service
2
_service
@ -1,4 +1,4 @@
|
|||||||
<services>
|
<services>
|
||||||
|
|
||||||
<service name="download_files" mode="localonly" />
|
<service name="download_files" mode="disabled" />
|
||||||
</services>
|
</services>
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:aa9dff0407aa610554b203f93853491af2f10e43d72b5a8d06b0191c5834834d
|
|
||||||
size 10203592
|
|
3
gnuhealth-3.2.0.tar.gz
Normal file
3
gnuhealth-3.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0f281ce173a18a77062a7deed9d25996d23933045d976f490604a48567a44347
|
||||||
|
size 10217658
|
@ -24,12 +24,12 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
VERSION="3.0.2.1-openSUSE"
|
VERSION="3.2.0-openSUSE"
|
||||||
|
|
||||||
TRYTON_URL="http://downloads.tryton.org"
|
TRYTON_URL="http://downloads.tryton.org"
|
||||||
GNUHEALTH_URL="http://ftp.gnu.org/gnu/health"
|
GNUHEALTH_URL="http://ftp.gnu.org/gnu/health"
|
||||||
TRANSLATE_URL="http://translate.gnusolidario.org"
|
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"
|
UPDATE_DOWNLOAD_DIR="/tmp/gnuhealth_update"
|
||||||
|
|
||||||
@ -178,9 +178,14 @@ do_backup()
|
|||||||
|
|
||||||
cli_msg "INFO" "Creating compressed tarball with DB and GNU Health Attachment directory" | tee -a $INFOFILE
|
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
|
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
|
cli_msg "INFO" "Backup Successful" | tee -a $INFOFILE
|
||||||
|
|
||||||
#Remove lock file
|
#Remove lock file
|
||||||
@ -198,7 +203,7 @@ check_status()
|
|||||||
# else
|
# else
|
||||||
# cli_msg "INFO" "No GNU Health instance seems to be running"
|
# cli_msg "INFO" "No GNU Health instance seems to be running"
|
||||||
# fi
|
# fi
|
||||||
systemctl status trytond
|
systemctl status gnuhealth
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,6 +329,7 @@ install_updates()
|
|||||||
# fi
|
# fi
|
||||||
|
|
||||||
if [ $2 == "--dry-run" ];then
|
if [ $2 == "--dry-run" ];then
|
||||||
|
sudo zypper up -D trytond* gnuhealth
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jul 2 16:19:59 UTC 2017 - axel.braun@gmx.de
|
||||||
|
|
||||||
|
- Version 3.2.0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 24 10:56:45 UTC 2017 - axel.braun@gmx.de
|
||||||
|
|
||||||
|
- Requirement on python3-PyWebDAV3-GNUHealth added
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 20 15:26:18 UTC 2017 - axel.braun@gmx.de
|
||||||
|
|
||||||
|
- GNU Health version 3.1.0b3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Mar 26 16:29:15 UTC 2017 - axel.braun@gmx.de
|
Sun Mar 26 16:29:15 UTC 2017 - axel.braun@gmx.de
|
||||||
|
|
||||||
|
21
gnuhealth.service
Normal file
21
gnuhealth.service
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[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
|
@ -2,7 +2,7 @@
|
|||||||
# spec file for package gnuhealth
|
# spec file for package gnuhealth
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,20 +17,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define majorver 3.0
|
%define majorver 3.2
|
||||||
|
|
||||||
Name: gnuhealth
|
Name: gnuhealth
|
||||||
|
|
||||||
# List of additional build dependencies
|
# List of additional build dependencies
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
Version: %{majorver}.8
|
Version: %{majorver}.0
|
||||||
Release: 0
|
Release: 0
|
||||||
|
|
||||||
Url: http://health.gnu.org
|
Url: http://health.gnu.org
|
||||||
Source: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz
|
Source: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz
|
||||||
|
#Source: %{name}-%{version}.tar.gz
|
||||||
Source1: GNUHealth.README.SUSE
|
Source1: GNUHealth.README.SUSE
|
||||||
Source2: gnuhealth-control
|
Source2: gnuhealth-control
|
||||||
|
Source3: gnuhealth.service
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -39,17 +41,18 @@ License: GPL-3.0+
|
|||||||
Group: Productivity/Office/Management
|
Group: Productivity/Office/Management
|
||||||
|
|
||||||
Requires: proteus
|
Requires: proteus
|
||||||
Requires: python-PyWebDAV
|
Requires: python3-PyWebDAV3-GNUHealth
|
||||||
Requires: python-caldav
|
Requires: python3-caldav
|
||||||
Requires: python-cracklib
|
Requires: python3-cracklib
|
||||||
Requires: python-hl7apy
|
Requires: python3-hl7apy
|
||||||
Requires: python-imaging
|
Requires: python3-ldap3
|
||||||
Requires: python-ldap
|
Requires: python3-polib
|
||||||
Requires: python-polib
|
Requires: python3-pyBarcode
|
||||||
Requires: python-qrcode
|
Requires: python3-pymongo
|
||||||
Requires: python-simpleeval
|
Requires: python3-qrcode
|
||||||
Requires: python-six
|
Requires: python3-simpleeval
|
||||||
Requires: python-vobject
|
Requires: python3-six
|
||||||
|
Requires: python3-vobject
|
||||||
Requires: trytond
|
Requires: trytond
|
||||||
Requires: trytond_account
|
Requires: trytond_account
|
||||||
Requires: trytond_account_invoice
|
Requires: trytond_account_invoice
|
||||||
@ -62,6 +65,7 @@ Requires: trytond_currency
|
|||||||
Requires: trytond_party
|
Requires: trytond_party
|
||||||
Requires: trytond_product
|
Requires: trytond_product
|
||||||
Requires: trytond_purchase
|
Requires: trytond_purchase
|
||||||
|
Requires: trytond_purchase_request
|
||||||
Requires: trytond_stock
|
Requires: trytond_stock
|
||||||
Requires: trytond_stock_lot
|
Requires: trytond_stock_lot
|
||||||
Requires: trytond_stock_supply
|
Requires: trytond_stock_supply
|
||||||
@ -89,41 +93,49 @@ cp %{S:1} .
|
|||||||
cp %{S:2} .
|
cp %{S:2} .
|
||||||
|
|
||||||
%build
|
%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
|
for i in h*; do
|
||||||
cd $i
|
cd $i
|
||||||
python setup.py build
|
python3 setup.py build
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
|
||||||
#pdq
|
#pdq
|
||||||
# cd pdq
|
# cd pdq
|
||||||
# python setup.py build
|
# python3 setup.py build
|
||||||
# cd ..
|
# cd ..
|
||||||
|
for i in try*; do
|
||||||
|
cd $i
|
||||||
|
python3 setup.py build
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
for i in h*; do
|
for i in h*; do
|
||||||
cd $i
|
cd $i
|
||||||
python setup.py install --prefix=%_prefix --root=%buildroot
|
python3 setup.py install --prefix=%_prefix --root=%buildroot
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
#pdq
|
#pdq
|
||||||
# cd pdq
|
# cd pdq
|
||||||
# python setup.py install --prefix=%_prefix --root=%buildroot
|
# python3 setup.py install --prefix=%_prefix --root=%buildroot
|
||||||
# cd ..
|
# cd ..
|
||||||
|
for i in try*; do
|
||||||
|
cd $i
|
||||||
|
python3 setup.py install --prefix=%_prefix --root=%buildroot
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
mkdir -p -m 755 %{buildroot}%{_bindir}
|
mkdir -p -m 755 %{buildroot}%{_bindir}
|
||||||
install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control
|
install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control
|
||||||
|
|
||||||
# create user
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||||
%pre
|
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
||||||
#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
|
|
||||||
#:
|
|
||||||
|
|
||||||
|
%fdupes -s %{buildroot}
|
||||||
|
|
||||||
|
%pre
|
||||||
#Write environment changes to /etc/bash.bashrc.local
|
#Write environment changes to /etc/bash.bashrc.local
|
||||||
cat > /etc/bash.bashrc.local << "EOF"
|
cat > /etc/bash.bashrc.local << "EOF"
|
||||||
alias cdlogs='cd /var/log/trytond'
|
alias cdlogs='cd /var/log/trytond'
|
||||||
@ -133,9 +145,21 @@ alias cdmods='cd /usr/lib/python/site-packages/trytond/modules'
|
|||||||
alias editconf='${EDITOR} /etc/tryton/trytond.conf'
|
alias editconf='${EDITOR} /etc/tryton/trytond.conf'
|
||||||
EOF
|
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
|
%files
|
||||||
%defattr(744,root,root)
|
%defattr(744,root,root)
|
||||||
%{_bindir}/gnuhealth-control
|
%{_bindir}/gnuhealth-control
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README Changelog COPYING gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/*
|
%doc README Changelog COPYING gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/*
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
Loading…
Reference in New Issue
Block a user