1
0
Fork 0
forked from s3lph/matemat

fix: bottle by default re-encodes UTF-8 to latin1

This commit is contained in:
s3lph 2023-09-09 18:38:59 +02:00
parent 76918a0f2c
commit 623dadb62a
Signed by untrusted user: s3lph
GPG key ID: 0AA29A52FB33CFB5
4 changed files with 20 additions and 6 deletions

View file

@ -58,9 +58,9 @@ steps:
- sed -re 's/file-magic/python-magic/' -i setup.py - sed -re 's/file-magic/python-magic/' -i setup.py
- | - |
(for version in "$(cat CHANGELOG.md | grep '<!-- BEGIN CHANGES' | cut -d ' ' -f 4)"; do (for version in "$(cat CHANGELOG.md | grep '<!-- BEGIN CHANGES' | cut -d ' ' -f 4)"; do
echo "matemat (${version}-1) stable; urgency=medium\n" echo "matemat ($${version}-1) stable; urgency=medium\n"
cat CHANGELOG.md | grep -A 1000 "<"'!'"-- BEGIN CHANGES ${version} -->" | grep -B 1000 "<"'!'"-- END CHANGES ${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g' cat CHANGELOG.md | grep -A 1000 "<"'!'"-- BEGIN CHANGES $${version} -->" | grep -B 1000 "<"'!'"-- END CHANGES $${version} -->" | tail -n +2 | head -n -1 | sed -re 's/^-/ */g'
echo "\n -- ${PACKAGE_AUTHOR} $(date -R)\n" echo "\n -- s3lph@kabelsalat.ch $(date -R)\n"
done) > package/debian/matemat/usr/share/doc/matemat/changelog done) > package/debian/matemat/usr/share/doc/matemat/changelog
- gzip -9n package/debian/matemat/usr/share/doc/matemat/changelog - gzip -9n package/debian/matemat/usr/share/doc/matemat/changelog
- cp -r static/ package/debian/matemat/usr/lib/matemat/static/ - cp -r static/ package/debian/matemat/usr/lib/matemat/static/
@ -82,8 +82,8 @@ steps:
- chmod +x matemat/usr/lib/matemat/matemat matemat/DEBIAN/postinst matemat/DEBIAN/prerm matemat/DEBIAN/postrm - chmod +x matemat/usr/lib/matemat/matemat matemat/DEBIAN/postinst matemat/DEBIAN/prerm matemat/DEBIAN/postrm
- sed -re "s/__VERSION__/$${MATEMAT_VERSION}-1/g" -i matemat/DEBIAN/control - sed -re "s/__VERSION__/$${MATEMAT_VERSION}-1/g" -i matemat/DEBIAN/control
- dpkg-deb --build matemat - dpkg-deb --build matemat
- mv matemat.deb "matemat_${MATEMAT_VERSION}-1_all.deb" - mv matemat.deb "matemat_$${MATEMAT_VERSION}-1_all.deb"
- sudo -u nobody lintian "matemat_${MATEMAT_VERSION}-1_all.deb" || true - sudo -u nobody lintian "matemat_$${MATEMAT_VERSION}-1_all.deb" || true
- >- - >-
curl curl
--user "$${GITEA_API_USERNAME}:$${GITEA_API_PASSWORD}" --user "$${GITEA_API_USERNAME}:$${GITEA_API_PASSWORD}"

View file

@ -1,5 +1,18 @@
# Matemat Changelog # Matemat Changelog
<!-- BEGIN RELEASE v0.3.7 -->
## Version 0.3.7
Fix bottle's default behavior of reencoding UTF-8 to latin1
### Changes
<!-- BEGIN CHANGES 0.3.7 -->
- Fix bottle's default behavior of reencoding UTF-8 to latin1
<!-- END CHANGES 0.3.7 -->
<!-- END RELEASE v0.3.7 -->
<!-- BEGIN RELEASE v0.3.6.1 --> <!-- BEGIN RELEASE v0.3.6.1 -->
## Version 0.3.6.1 ## Version 0.3.6.1

View file

@ -1,2 +1,2 @@
__version__ = '0.3.6.1' __version__ = '0.3.7'

View file

@ -93,6 +93,7 @@ def main():
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
from matemat.webserver.pagelets.receipt_smtp_cron import receipt_smtp_cron from matemat.webserver.pagelets.receipt_smtp_cron import receipt_smtp_cron
# Start the web server # Start the web server
bottle.FormsDict.recode_unicode = False
bottle.run(host=host, port=port) bottle.run(host=host, port=port)
# Stop cron # Stop cron
cron.shutdown() cron.shutdown()