correction bugs sur les fichiers de générations des paquets deb et wheel

This commit is contained in:
Vincent BENOIT
2022-11-17 11:38:34 +01:00
parent d97901a7d5
commit 193573524a
4 changed files with 21 additions and 9 deletions

3
MANIFEST.in Normal file
View File

@@ -0,0 +1,3 @@
include requirements.txt
graft ConfBack
global-exclude *.git *.swp

View File

@@ -1,9 +1,9 @@
#!/bin/bash
#
# Author : vincent.benoit@scle.fr
# Date : 07/2022
# Author : vincent.benoit@benserv.fr
# Date : Novembre 2022
# Version : 1.0
# Brief : création des packages necessaires pour le backend ScleSignRESTful
# Brief : création des packages necessaires pour le backend Configurateur
#
###########################################################################
@@ -11,12 +11,21 @@ create_deb() {
dirname=configurateurback-$1
/usr/bin/mkdir -p bdist_deb/$dirname
cd bdist_deb/$dirname
debvers=`/usr/bin/cat /etc/debian_version`
echo "$debvers"
IFS='.'
read -ra vers <<< "$debvers"
if [ "$vers" == "10" ]; then
# Write compat file to deb template for Debian 10.x
cat > $2/misc/template/compat << EOF
11
EOF
fi
/usr/bin/dh_make -t $2/misc/template -n -y -i -d
/usr/bin/find $2/3rdparty -type f -exec /usr/bin/cp -a {} . \;
/usr/bin/find $2/certs/pub -type f -exec /usr/bin/cp -a {} . \;
/usr/bin/find $2/template -type f -exec /usr/bin/cp -a {} . \;
/usr/bin/cp -a $2/run_prod.py .
/usr/bin/find $2/misc -type f -name "*.service" -exec /usr/bin/cp -a {} . \;
/usr/bin/dpkg-buildpackage -b -uc -us -rfakeroot
/usr/bin/rm -f $2/misc/template/compat
cd ..
if [ $? == "0" ] && [ ! -d "$2/dist" ]; then
/usr/bin/mkdir -p $2/dist
@@ -30,7 +39,7 @@ create_wheel() {
}
echo "*** Remove old dirs ***"
/usr/bin/rm -rf bdist_deb build dist ScleSignRESTful.egg-info
/usr/bin/rm -rf bdist_deb build dist ConfigurateurBack.egg-info
echo "*** read version ***"
vers=`/usr/bin/cat ConfBack/VERSION`
rootpath=`pwd`

View File

@@ -8,7 +8,7 @@ Wants=kineintercom.service
Type=simple
User=pi
Group=pi
ExecStart=/usr/bin/python3 /usr/local/bin/run_prod.py
ExecStart=/usr/bin/python3 /opt/configurateur/bin/run_prod.py
Restart=on-failure
RestartSec=15s

View File

@@ -1,2 +1,2 @@
configurateur_backend.service /lib/systemd/system/
run_prod.py /usr/local/bin/
run_prod.py /opt/configurateur/bin/