forked from pool/gnuhealth
- update for boo#1167126, 1167128
- clean up of spec file to get rid of warnings added gnuhealth-rpmlintrc OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth?expand=0&rev=49
This commit is contained in:
parent
d12fd3b3a5
commit
78c327e88f
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:bf5b08bbfa78fec560ac157d4d2a5b1d33f5d7985d22bf07514540c912b6fa3c
|
oid sha256:ac96d19802dbe16f854a6a55a52afda18e42e4dd6da86da9e724a0b0a8f9330f
|
||||||
size 10492401
|
size 10492316
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# gnuhealth-control
|
# gnuhealth-control
|
||||||
# The GNU Health control center
|
# The GNU Health control center for openSUSE Installations
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# GNU Health: The Free Health and Hospital Information System
|
# GNU Health: The Free Health and Hospital Information System
|
||||||
# Copyright (C) 2008-2015 Luis Falcon <falcon@gnu.org>
|
# Copyright (C) 2008-2015 Luis Falcon <falcon@gnu.org>
|
||||||
# Adaption to openSUSE Axel Braun <axel.braun@gmx.de>
|
# Adaption to openSUSE Axel Braun <axel.braun@gnuhealth.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -24,14 +24,12 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
VERSION="3.6.3-openSUSE"
|
VERSION="3.6.3.1-openSUSE"
|
||||||
|
|
||||||
TRYTON_URL="http://downloads.tryton.org"
|
TRANSLATE_URL="https://translate.gnusolidario.org"
|
||||||
GNUHEALTH_URL="http://ftp.gnu.org/gnu/health"
|
GNUHEALTH_DIR=$(rpm -ql gnuhealth | egrep '^/usr/lib/python.\..{1,2}/site-packages$')
|
||||||
TRANSLATE_URL="http://translate.gnusolidario.org"
|
|
||||||
GNUHEALTH_DIR=$(ls -d /usr/lib/python3.* )/site-packages/trytond/modules
|
|
||||||
|
|
||||||
UPDATE_DOWNLOAD_DIR="/tmp/gnuhealth_update"
|
UPDATE_DOWNLOAD_DIR=$(mktemp -d)
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -93,31 +91,8 @@ cli_msg()
|
|||||||
|
|
||||||
get_current_values()
|
get_current_values()
|
||||||
{
|
{
|
||||||
# Bail out if no GNU Health profile exists
|
|
||||||
#if [ ! -e $HOME/.gnuhealthrc ]
|
|
||||||
#then
|
|
||||||
# cli_msg "ERROR" "No GNU Health profile found !"
|
|
||||||
# exit 1
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# Stop if it can't find the GNU Health version
|
|
||||||
#if [ -z "$GNUHEALTH_VERSION" ]
|
|
||||||
#then
|
|
||||||
# cli_msg "ERROR" "Could not find the GNU Health version env. variable"
|
|
||||||
# exit 1
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# Stop if current GNU Health version < 2.8.0
|
|
||||||
#local raw_ver=`echo $GNUHEALTH_VERSION | tr -d '.'`
|
|
||||||
#if [ $raw_ver -lt 280 ]
|
|
||||||
#then
|
|
||||||
# cli_msg "ERROR" "GNU Health version must be at least 2.8"
|
|
||||||
# exit 1
|
|
||||||
#fi
|
|
||||||
|
|
||||||
cli_msg "INFO" "Environment variables"
|
cli_msg "INFO" "Environment variables"
|
||||||
#cli_msg "INFO" "GNUHEALTH_VERSION = ${GNUHEALTH_VERSION}"
|
|
||||||
#cli_msg "INFO" "TRYTON VERSION = ${TRYTON_VERSION}"
|
|
||||||
cli_msg "INFO" "PYTHONPATH = $PYTHONPATH"
|
cli_msg "INFO" "PYTHONPATH = $PYTHONPATH"
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -129,8 +104,10 @@ do_backup()
|
|||||||
|
|
||||||
local COMMAND=$1
|
local COMMAND=$1
|
||||||
local BACKDATE=`date -u +%Y-%m-%d_%H%M%S`
|
local BACKDATE=`date -u +%Y-%m-%d_%H%M%S`
|
||||||
local LOCKFILE="/tmp/.gnuhealth_backup.lock"
|
# lockfile is moved to a location not writeable/predictable by user
|
||||||
local INFOFILE="/tmp/gnuhealth_backup.log"
|
local LOCKFILE="/var/run/gnuhealth_backup.lock"
|
||||||
|
# Infofile is moved to a location not writeable by user
|
||||||
|
local INFOFILE="/var/log/gnuhealth_backup.log"
|
||||||
local BACKDIR=""
|
local BACKDIR=""
|
||||||
local DB=""
|
local DB=""
|
||||||
|
|
||||||
@ -164,7 +141,7 @@ do_backup()
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch $LOCKFILE
|
echo $$ > $LOCKFILE
|
||||||
|
|
||||||
# Backup start
|
# Backup start
|
||||||
|
|
||||||
@ -190,21 +167,14 @@ do_backup()
|
|||||||
|
|
||||||
cli_msg "INFO" "Backup successfully written to ${BACKDIR}/${BACKUP_NAME}" | tee -a $INFOFILE
|
cli_msg "INFO" "Backup successfully written to ${BACKDIR}/${BACKUP_NAME}" | tee -a $INFOFILE
|
||||||
#AB - END
|
#AB - END
|
||||||
#Remove lock file
|
#Remove lock file
|
||||||
rm $LOCKFILE
|
rm $LOCKFILE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_status()
|
check_status()
|
||||||
{
|
{
|
||||||
# TRYTOND_PIDS=`pgrep -f "^.*python.*trytond.*$"`
|
|
||||||
# if [ $? = 0 ]
|
|
||||||
# then
|
|
||||||
# cli_msg "INFO" "GNU Health / Tryton instance(s) with PID(s) :"
|
|
||||||
# echo $TRYTOND_PIDS
|
|
||||||
# else
|
|
||||||
# cli_msg "INFO" "No GNU Health instance seems to be running"
|
|
||||||
# fi
|
|
||||||
systemctl status gnuhealth
|
systemctl status gnuhealth
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -219,163 +189,27 @@ check_download_dir()
|
|||||||
|
|
||||||
check_updates()
|
check_updates()
|
||||||
{
|
{
|
||||||
# source $HOME/.gnuhealthrc
|
|
||||||
|
|
||||||
zypper lu | grep "trytond , gnuhealth"
|
cli_msg "INFO" "Running zypper to check for updates"
|
||||||
|
zypper lu | grep "trytond , gnuhealth"
|
||||||
|
|
||||||
# local TRYTOND_PATCHLEVEL=`echo ${TRYTON_VERSION} | cut -d'.' -f3`
|
|
||||||
|
|
||||||
# local TRYTON_MODULES=`cd ${GNUHEALTH_DIR}; ls -1d trytond*`
|
|
||||||
# TRYTON_MAJOR_MINOR=`echo $TRYTON_VERSION | cut -d'.' -f1-2`
|
|
||||||
|
|
||||||
# NEED_UPDATE_TRYTOND=0
|
|
||||||
# NEED_UPDATE_MODULES=0
|
|
||||||
# NEED_UPDATE_PATCHSETS=0
|
|
||||||
# MOD_UPDATES=""
|
|
||||||
# NEED_DELETE=0
|
|
||||||
# TO_DELETE=""
|
|
||||||
|
|
||||||
# cli_msg "INFO" "TRYTON SERVER : Checking latest patchlevel"
|
|
||||||
|
|
||||||
# LATEST_TRYTOND=`wget --quiet -O - ${TRYTON_URL}/${TRYTON_MAJOR_MINOR} | egrep -o trytond-${TRYTON_MAJOR_MINOR}.[0-9\.]+.tar.gz | sort -V | tail -1`
|
|
||||||
# local LATEST_TRYTOND_PATCHLEVEL=`echo ${LATEST_TRYTOND} | cut -d'.' -f3`
|
|
||||||
|
|
||||||
# Check latest tryton server against local version
|
|
||||||
# if (( ${TRYTOND_PATCHLEVEL} < ${LATEST_TRYTOND_PATCHLEVEL} )); then
|
|
||||||
# cli_msg "WARNING" "TRYTON SERVER patchlevel ${TRYTOND_PATCHLEVEL} is outdated ! A newer version is available (${LATEST_TRYTOND})"
|
|
||||||
# NEED_DELETE=1
|
|
||||||
# TO_DELETE="${TO_DELETE} ${GNUHEALTH_DIR}/tryton/server/trytond-${TRYTON_MAJOR_MINOR}.${TRYTOND_PATCHLEVEL}"
|
|
||||||
# NEED_UPDATE_TRYTOND=1
|
|
||||||
# else
|
|
||||||
# cli_msg "INFO" "TRYTON SERVER patchlevel ${TRYTOND_PATCHLEVEL} is at the latest version"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# Check latest tryton modules against local version
|
|
||||||
# for MODULE in ${TRYTON_MODULES}; do
|
|
||||||
# MODNAME=`echo $MODULE | cut -d'-' -f1`
|
|
||||||
# MODULE_PATCHLEVEL=`echo $MODULE | sed 's/^.*\.\([[:digit:]]*\)$/\1/'`
|
|
||||||
# LATEST_MODULE=`wget --quiet -O - ${TRYTON_URL}/${TRYTON_MAJOR_MINOR} | egrep -o ${MODNAME}-${TRYTON_MAJOR_MINOR}.[0-9\.]+.tar.gz | sort -V | tail -1`
|
|
||||||
# LATEST_MODULE_PATCHLEVEL=`echo ${LATEST_MODULE} | cut -d'.' -f3`
|
|
||||||
# if (( ${MODULE_PATCHLEVEL} < ${LATEST_MODULE_PATCHLEVEL} )); then
|
|
||||||
# cli_msg "WARNING" "${MODNAME} patchlevel ${MODULE_PATCHLEVEL} is outdated ! A newer version is available (${LATEST_MODULE})"
|
|
||||||
# NEED_UPDATE_MODULES=1
|
|
||||||
# MOD_UPDATES="${MOD_UPDATES} ${LATEST_MODULE}"
|
|
||||||
# NEED_DELETE=1
|
|
||||||
# TO_DELETE="${TO_DELETE} ${GNUHEALTH_DIR}/tryton/server/modules/${MODNAME}-${TRYTON_MAJOR_MINOR}.${MODULE_PATCHLEVEL}"
|
|
||||||
# else
|
|
||||||
# cli_msg "INFO" "${MODNAME} patchlevel ${MODULE_PATCHLEVEL} is at the latest version"
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
|
|
||||||
# Check latest GNU HEALTH PATCHSETS against local version
|
|
||||||
# cli_msg "INFO" "GNU HEALTH KERNEL : Checking latest PATCHSETS"
|
|
||||||
|
|
||||||
# GNUHEALTH_MAJOR_MINOR=`echo $GNUHEALTH_VERSION | cut -d'.' -f1-2`
|
|
||||||
# GNUHEALTH_PATCHSET=`echo $GNUHEALTH_VERSION | cut -d'.' -f3`
|
|
||||||
|
|
||||||
# PATCHSETS_NUM=`wget --quiet -O - ${GNUHEALTH_URL}/ | egrep -o gnuhealth_patchset-${GNUHEALTH_MAJOR_MINOR}\.[0-9\.]+.tar.gz | uniq | wc -l | tr -d ' '`
|
|
||||||
|
|
||||||
# if (( ${PATCHSETS_NUM} > 0 )); then
|
|
||||||
# cli_msg "INFO" "Number of Patchsets for this version : ${PATCHSETS_NUM}"
|
|
||||||
|
|
||||||
# LATEST_GNUHEALTH=`wget --quiet -O - ${GNUHEALTH_URL}/ | egrep -o gnuhealth_patchset-${GNUHEALTH_MAJOR_MINOR}\.[0-9\.]+.tar.gz | sort -V | tail -1`
|
|
||||||
# LATEST_GNUHEALTH_PATCHSET=`echo ${LATEST_GNUHEALTH} | cut -d'.' -f3`
|
|
||||||
|
|
||||||
# if (( ${GNUHEALTH_PATCHSET} < ${LATEST_GNUHEALTH_PATCHSET} )); then
|
|
||||||
# cli_msg "WARNING" "GNU HEALTH patchset ${GNUHEALTH_PATCHSET} is outdated ! A newer version is available (${LATEST_GNUHEALTH})"
|
|
||||||
# NEED_UPDATE_PATCHSETS=1
|
|
||||||
# let PSET=GNUHEALTH_PATCHSET+1
|
|
||||||
# for n in `seq $PSET $LATEST_GNUHEALTH_PATCHSET`
|
|
||||||
# do
|
|
||||||
# PATCHSETS="$PATCHSETS gnuhealth_patchset-${GNUHEALTH_MAJOR_MINOR}.$n.tar.gz"
|
|
||||||
# done
|
|
||||||
|
|
||||||
# else
|
|
||||||
# cli_msg "INFO" "GNU HEALTH patchset ${GNUHEALTH_PATCHSET} is at the latest version"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# else
|
|
||||||
# cli_msg "INFO" "** NO GNU HEALTH PATCHSETS FOUND FOR THIS VERSION **"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_updates()
|
install_updates()
|
||||||
{
|
{
|
||||||
|
|
||||||
#if [ $NEED_UPDATE_TRYTOND -eq 1 ]; then
|
|
||||||
# cli_msg "INFO" "Downloading TRYTON SERVER $LATEST_TRYTOND"
|
|
||||||
# wget --quiet --directory-prefix=${UPDATE_DOWNLOAD_DIR}/trytond ${TRYTON_URL}/${TRYTON_MAJOR_MINOR}/${LATEST_TRYTOND} || exit 1
|
|
||||||
# cli_msg "INFO" "--> Uncompressing TRYTON SERVER $LATEST_TRYTOND"
|
|
||||||
# tar -xzf ${UPDATE_DOWNLOAD_DIR}/trytond/${LATEST_TRYTOND} --directory ${GNUHEALTH_DIR}/tryton/server || exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# if [ $NEED_UPDATE_MODULES -eq 1 ]; then
|
|
||||||
# for mod in ${MOD_UPDATES}
|
|
||||||
# do
|
|
||||||
# cli_msg "INFO" "Downloading $mod"
|
|
||||||
# wget --quiet --directory-prefix=${UPDATE_DOWNLOAD_DIR}/modules ${TRYTON_URL}/${TRYTON_MAJOR_MINOR}/${mod} || exit 1
|
|
||||||
# cli_msg "INFO" "--> Uncompressing ${mod}"
|
|
||||||
# tar -xzf ${UPDATE_DOWNLOAD_DIR}/modules/${mod} --directory ${GNUHEALTH_DIR}/tryton/server/modules || exit 1
|
|
||||||
# done
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# if [ $NEED_UPDATE_PATCHSETS -eq 1 ]; then
|
|
||||||
# for patchset in ${PATCHSETS}
|
|
||||||
# do
|
|
||||||
# cli_msg "INFO" "Downloading $patchset"
|
|
||||||
# wget --quiet --directory-prefix=${UPDATE_DOWNLOAD_DIR}/patchsets ${GNUHEALTH_URL}/${patchset} || exit 1
|
|
||||||
# cli_msg "INFO" "--> Applying PATCHSET $patchset"
|
|
||||||
# tar -xzf ${UPDATE_DOWNLOAD_DIR}/patchsets/${patchset} --directory ${HOME} || exit 1
|
|
||||||
# done
|
|
||||||
# fi
|
|
||||||
|
|
||||||
if [ $2 == "--dry-run" ];then
|
if [ $2 == "--dry-run" ];then
|
||||||
sudo zypper up -D trytond* gnuhealth
|
zypper up -D -- "trytond*" "gnuhealth*"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo zypper up trytond* gnuhealth
|
sudo zypper up -- "trytond*" "gnuhealth*"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#remove_old()
|
|
||||||
#{
|
|
||||||
# if [ ${NEED_DELETE} -eq 1 ]; then
|
|
||||||
# cli_msg "WARNING" "Removing obsolete kernel and/or modules : ${TO_DELETE}"
|
|
||||||
# rm -rf ${TO_DELETE}
|
|
||||||
# fi
|
|
||||||
#}
|
|
||||||
|
|
||||||
relink_mods()
|
relink_mods()
|
||||||
{
|
{
|
||||||
# source $HOME/.gnuhealthrc
|
|
||||||
|
|
||||||
# if [ ${NEED_DELETE} -eq 1 ]; then
|
|
||||||
# local TRYTON_MODS=`cd ${GNUHEALTH_DIR}/tryton/server/modules; ls -1d trytond_*`
|
|
||||||
# for mod in ${TRYTON_MODS}; do
|
|
||||||
# local modname=`echo ${mod} | cut -d'-' -f1 | cut -d'_' -f2-`
|
|
||||||
# cli_msg "INFO" "Relinking : ${mod}"
|
|
||||||
# ln -sf ${GNUHEALTH_DIR}/tryton/server/modules/${mod} ${GNUHEALTH_DIR}/tryton/server/${TRYTOND}/trytond/modules/${modname} || exit 1
|
|
||||||
# done
|
|
||||||
|
|
||||||
# cli_msg "INFO" "Relinking GNU Health modules ..."
|
|
||||||
# local HEALTH_MODS=`cd ${GNUHEALTH_DIR}/tryton/server/modules; ls -1d health*`
|
|
||||||
# for mod in ${HEALTH_MODS}; do
|
|
||||||
# cli_msg "INFO" "--> Relinking : ${mod}"
|
|
||||||
# ln -sf ${GNUHEALTH_DIR}/tryton/server/modules/${mod} ${GNUHEALTH_DIR}/tryton/server/${TRYTOND}/trytond/modules/ || exit 1
|
|
||||||
# done
|
|
||||||
|
|
||||||
# cli_msg "INFO" "Relinking local modules and customizations ..."
|
|
||||||
|
|
||||||
# local LOCAL_MODS=`cd ${GNUHEALTH_DIR}/tryton/server/modules/local; ls -A`
|
|
||||||
# for mod in ${LOCAL_MODS}; do
|
|
||||||
# cli_msg "INFO" "--> Relinking : ${mod}"
|
|
||||||
# ln -sf ${GNUHEALTH_DIR}/tryton/server/modules/local/${mod} ${GNUHEALTH_DIR}/tryton/server/${TRYTOND}/trytond/modules/ || exit 1
|
|
||||||
# done
|
|
||||||
|
|
||||||
# fi
|
|
||||||
|
|
||||||
sudo systemctl restart gnuhealth
|
sudo systemctl restart gnuhealth
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -409,26 +243,26 @@ getlang() {
|
|||||||
|
|
||||||
local lang_to_install=$2
|
local lang_to_install=$2
|
||||||
local lang_file=${lang_to_install}.zip
|
local lang_file=${lang_to_install}.zip
|
||||||
# source $HOME/.gnuhealthrc || exit 1
|
|
||||||
cli_msg "INFO" "Going to modules directory ${GNUHEALTH_DIR} "
|
cli_msg "INFO" "Going to modules directory ${GNUHEALTH_DIR} "
|
||||||
|
|
||||||
cd ${GNUHEALTH_DIR} || exit 1
|
cd ${GNUHEALTH_DIR} || exit 1
|
||||||
cli_msg "INFO" "Retrieving language pack file for ${lang_to_install}"
|
cli_msg "INFO" "Retrieving language pack file for ${lang_to_install}"
|
||||||
wget ${TRANSLATE_URL}/export/?path=/${lang_to_install}/GNUHEALTH/ -O /tmp/${lang_file} || exit 1
|
wget ${TRANSLATE_URL}/export/?path=/${lang_to_install}/GNUHEALTH/ -O $UPDATE_DOWNLOAD_DIR/${lang_file} || exit 1
|
||||||
cli_msg "INFO" "Installing / Updating language files for ${lang_to_install} ..."
|
cli_msg "INFO" "Installing / Updating language files for ${lang_to_install} ..."
|
||||||
|
|
||||||
bsdtar --strip-components 3 --exclude *webdav3* --exclude *caldav* -xzf /tmp/${lang_file} || exit 1
|
bsdtar --strip-components 3 --exclude *webdav3* --exclude *caldav* -xzf $UPDATE_DOWNLOAD_DIR/${lang_file} || exit 1
|
||||||
cli_msg "INFO" "Language pack ${lang_to_install} sucessfully installed / updated"
|
cli_msg "INFO" "Language pack ${lang_to_install} sucessfully installed / updated"
|
||||||
chmod -R a+r ${GNUHEALTH_DIR}
|
chmod -R a+r ${GNUHEALTH_DIR}
|
||||||
cli_msg "INFO" "Read permissions set"
|
cli_msg "INFO" "Read permissions set"
|
||||||
cli_msg "INFO" "You now need to update the database modules"
|
cli_msg "INFO" "You now need to update the database modules"
|
||||||
# cd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bailout() {
|
bailout() {
|
||||||
cli_msg "ERROR" "Bailing out !"
|
cli_msg "ERROR" "Bailing out !"
|
||||||
cli_msg "ERROR" "Removing backup lock file"
|
cli_msg "ERROR" "Removing backup lock file"
|
||||||
rm -f $LOCKFILE
|
rm -f $LOCKFILE
|
||||||
|
rm -rf $UPDATE_DOWNLOAD_DIR
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
gnuhealth-rpmlintrc
Normal file
5
gnuhealth-rpmlintrc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# false positive: the lib dependency check is wrong here
|
||||||
|
# ignore the warning for now
|
||||||
|
addFilter("explicit-lib-dependency python3-passlib");
|
||||||
|
# ignore suse-missing-rclink
|
||||||
|
addFilter("suse-missing-rclink gnuhealth");
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 31 16:09:25 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- update for boo#1167126, 1167128
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 17 13:32:03 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- clean up of spec file to get rid of warnings
|
||||||
|
added gnuhealth-rpmlintrc
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Mar 14 15:24:49 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
Sat Mar 14 15:24:49 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
@ -3,6 +3,16 @@ Description=GNU Health server
|
|||||||
After=syslog.target
|
After=syslog.target
|
||||||
Requires=postgresql.service
|
Requires=postgresql.service
|
||||||
Conflicts=trytond.service
|
Conflicts=trytond.service
|
||||||
|
PrivateTmp=true
|
||||||
|
ProtectSystem=true
|
||||||
|
ProtectHome=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
MountFlags=private
|
||||||
|
NoNewPrivileges=true
|
||||||
|
PrivateDevices=true
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
@ -33,14 +33,15 @@ BuildRequires: python3-setuptools
|
|||||||
BuildRequires: trytond
|
BuildRequires: trytond
|
||||||
|
|
||||||
URL: http://health.gnu.org
|
URL: http://health.gnu.org
|
||||||
##ource0: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source: %{name}-%{version}.tar.gz
|
###http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz
|
||||||
Source1: GNUHealth.README.SUSE
|
Source1: GNUHealth.README.SUSE
|
||||||
Source2: gnuhealth-control
|
Source2: gnuhealth-control
|
||||||
Source3: gnuhealth.service
|
Source3: gnuhealth.service
|
||||||
Source4: gnuhealth-webdav@.service
|
Source4: gnuhealth-webdav@.service
|
||||||
Source5: openSUSE-gnuhealth-setup
|
Source5: openSUSE-gnuhealth-setup
|
||||||
Source6: gnuhealth
|
Source6: gnuhealth
|
||||||
|
Source7: gnuhealth-rpmlintrc
|
||||||
Patch0: shebang.diff
|
Patch0: shebang.diff
|
||||||
##atch1: xmlfix.diff
|
##atch1: xmlfix.diff
|
||||||
##atch2: demo.diff
|
##atch2: demo.diff
|
||||||
@ -135,15 +136,19 @@ install -p -m 755 scripts/demo/install_demo_database.sh %{buildroot}%{_bindir}/i
|
|||||||
#delete empty demo directory
|
#delete empty demo directory
|
||||||
rm -rf scripts/demo
|
rm -rf scripts/demo
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/%{name}-webdav@.service
|
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-webdav@.service
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tryton
|
mkdir -p %{buildroot}%{_sysconfdir}/tryton
|
||||||
|
|
||||||
#need to create two links
|
#remove double license file:
|
||||||
##ln -s $(ls -d /usr/lib/python3.* )/site-packages/trytond/modules/calendar %{buildroot}$(ls -d /usr/lib/python3.* )/site-packages/trytond/modules/health_caldav
|
rm backend/fhir/client/COPYING
|
||||||
##ln -s $(ls -d /usr/lib/python3.* )/site-packages/trytond/modules/webdav %{buildroot}$(ls -d /usr/lib/python3.* )/site-packages/trytond/modules/health_webdav3_server
|
|
||||||
|
#Move FHIR serer to examples directory
|
||||||
|
mkdir -p -m 755 %{buildroot}%{_docdir}/%{name}/examples/
|
||||||
|
mv backend/fhir* %{buildroot}%{_docdir}/%{name}/examples/.
|
||||||
|
rmdir backend
|
||||||
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
@ -173,23 +178,25 @@ EOF
|
|||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun gnuhealth.service
|
%service_del_preun gnuhealth.service
|
||||||
|
%service_del_preun gnuhealth-webdav@.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%service_del_postun gnuhealth.service
|
%service_del_postun gnuhealth.service
|
||||||
|
%service_del_postun gnuhealth-webdav@.service
|
||||||
|
|
||||||
%files -n %{name}-orthanc
|
%files -n %{name}-orthanc
|
||||||
%{python3_sitelib}/%{name}_orthanc*
|
%{python3_sitelib}/%{name}_orthanc*
|
||||||
%{python3_sitelib}/trytond/modules/health_orthanc*
|
%{python3_sitelib}/trytond/modules/health_orthanc*
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(744,root,root)
|
|
||||||
%{_bindir}/gnuhealth-control
|
%{_bindir}/gnuhealth-control
|
||||||
%{_bindir}/openSUSE-gnuhealth-setup
|
%{_bindir}/openSUSE-gnuhealth-setup
|
||||||
%{_bindir}/install_demo_database.sh
|
%{_bindir}/install_demo_database.sh
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%{_unitdir}/%{name}-webdav@.service
|
%{_unitdir}/%{name}-webdav@.service
|
||||||
%defattr(-,root,root)
|
%doc README Changelog gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* config/* doc/*
|
||||||
%doc README Changelog gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/*
|
%{_docdir}/%{name}/examples*
|
||||||
|
%dir %{_sysconfdir}/tryton
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%exclude %{python3_sitelib}/%{name}_orthanc*
|
%exclude %{python3_sitelib}/%{name}_orthanc*
|
||||||
%exclude %{python3_sitelib}/trytond/modules/health_orthanc*
|
%exclude %{python3_sitelib}/trytond/modules/health_orthanc*
|
||||||
|
@ -43,6 +43,15 @@ diff -U 3 -dHrN -- a/health_calendar/setup.py b/health_calendar/setup.py
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (C) 2011-2020 Luis Falcon <falcon@gnuhealth.org>
|
# Copyright (C) 2011-2020 Luis Falcon <falcon@gnuhealth.org>
|
||||||
# Copyright (C) 2011 Cédric Krier
|
# Copyright (C) 2011 Cédric Krier
|
||||||
|
diff -U 3 -dHrN -- a/health_caldav/tests/scenario_calendar.py b/health_caldav/tests/scenario_calendar.py
|
||||||
|
--- a/health_caldav/tests/scenario_calendar.py 2019-10-04 22:33:03.000000000 +0200
|
||||||
|
+++ b/health_caldav/tests/scenario_calendar.py 2020-03-17 14:04:47.692913921 +0100
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
from argparse import ArgumentParser
|
||||||
diff -U 3 -dHrN -- a/health_crypto/setup.py b/health_crypto/setup.py
|
diff -U 3 -dHrN -- a/health_crypto/setup.py b/health_crypto/setup.py
|
||||||
--- a/health_crypto/setup.py 2019-11-20 09:16:02.000000000 +0100
|
--- a/health_crypto/setup.py 2019-11-20 09:16:02.000000000 +0100
|
||||||
+++ b/health_crypto/setup.py 2020-01-15 16:58:43.120008340 +0100
|
+++ b/health_crypto/setup.py 2020-01-15 16:58:43.120008340 +0100
|
||||||
|
Loading…
Reference in New Issue
Block a user