cryptonas-archive/deb-live_v0.3.5/config/chroot_local-hooks/50cnas-cherrypy-fix.sh

26 lines
949 B
Bash
Executable File

#!/bin/sh
#
# License: This script is distributed under the terms of version 2
# of the GNU GPL. See the LICENSE file included with the package.
#
# $Id: $
#
# this script is part of the build process of CryptoNAS
#
# 2008-11-27 James Crofts backported workaround from CherryPy src repository.
# See http://www.cherrypy.org/ticket/686 and
# http://devel.cryptobox.org/ticket/216.
#
## Stop the build process if any of the following steps fail
set -e
##Hack to prevent intermittent cherrypy crashes at startup
DIFF="/usr/share/cryptonas-live/_cpwsgiserver.py.diff"
##These two files are identical before the patch and must be identical
##afterward as well:
patch /var/lib/python-support/python2.4/cherrypy/_cpwsgiserver.py < ${DIFF}
patch /usr/share/python-support/python-cherrypy/cherrypy/_cpwsgiserver.py < ${DIFF}
##Remove the now-obsolete "compiled" Python file.
rm -f /var/lib/python-support/python2.4/cherrypy/_cpwsgiserver.pyc