[FIX] packaging: fix debian package issue #1059326
When installing the Odoo Debian package on Bookworm, under certain conditions, the following bug may arise: `Warn: Can't find .pfb for face 'Times-Roman'` See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059326 As this bug is not yet fixed on the Debian side, this commit is a workaround. closes odoo/odoo#154017 X-original-commit: 70e192137e9b603c502aea878313cd7611fe0337 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
committed by
Christophe Monniez
parent
7ab9d0e468
commit
a6f166e68b
Vendored
+10
@@ -7,6 +7,7 @@ ODOO_GROUP="odoo"
|
||||
ODOO_DATA_DIR=/var/lib/odoo
|
||||
ODOO_LOG_DIR=/var/log/odoo
|
||||
ODOO_USER="odoo"
|
||||
GSFONTS_DIR=/usr/share/fonts/type1/gsfonts
|
||||
|
||||
case "${1}" in
|
||||
configure)
|
||||
@@ -24,6 +25,15 @@ case "${1}" in
|
||||
mkdir -p $ODOO_LOG_DIR
|
||||
chown $ODOO_USER:$ODOO_GROUP $ODOO_LOG_DIR
|
||||
chmod 0750 $ODOO_LOG_DIR
|
||||
# work around https://bugs.debian.org/1059326
|
||||
|
||||
if ! [ -e ${GSFONTS_DIR}/n021003l.pfb ] ; then
|
||||
if ! [ -d ${GSFONTS_DIR} ] ; then
|
||||
mkdir ${GSFONTS_DIR}
|
||||
touch ${GSFONTS_DIR}/.created-by-odoo-package
|
||||
fi
|
||||
ln -s /usr/share/fonts/X11/Type1/C059-Roman.pfb ${GSFONTS_DIR}/n021003l.pfb
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
|
||||
Vendored
+8
@@ -5,11 +5,19 @@ set -e
|
||||
ODOO_LIB_DIR=/var/lib/odoo
|
||||
ODOO_USER="odoo"
|
||||
ODOO_GROUP="odoo"
|
||||
GSFONTS_DIR=/usr/share/fonts/type1/gsfonts
|
||||
|
||||
case "${1}" in
|
||||
remove)
|
||||
deluser --quiet --system $ODOO_USER || true
|
||||
delgroup --quiet --system --only-if-empty $ODOO_GROUP || true
|
||||
# remove workaround for https://bugs.debian.org/1059326
|
||||
if [ -L ${GSFONTS_DIR}/n021003l.pfb ] ; then
|
||||
rm ${GSFONTS_DIR}/n021003l.pfb
|
||||
if [ "$(ls -A ${GSFONTS_DIR})" = ".created-by-odoo-package" ] ; then
|
||||
rm -fr ${GSFONTS_DIR}
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
purge)
|
||||
|
||||
Reference in New Issue
Block a user