Compare commits

...

4 Commits

Author SHA1 Message Date
Philip Roche
bfeba29863 Bump UEFI disk image size for armhf to 3.5 GB LP:#1953609
Current impish builds fail with:
```
cp: error writing 'mountpoint/var/lib/snapd/snaps/snapd_14067.snap': No space left on device
cp: cannot create directory 'mountpoint/var/lib/snapd/ssl': No space left on device
```

This is a cherrypick backport from ubuntu/master
2021-12-08 12:01:01 +00:00
Brian Murray
c42513a609 releasing package livecd-rootfs version 2.742.1 2021-11-18 15:17:19 -08:00
Thomas Bechtold
36cd65e112 Add debian/changelog entry 2021-10-26 16:33:52 +02:00
Thomas Bechtold
408045732e magic-proxy: fix exception handling for URLError LP:#1946520
A urllib.error.URLError.reason variable can either be a string or
another Exception[0]. In case it's another exception, the current code
fails because the exception is passed into send_error() which tries
call html.escape() on the Exception. That fails because the Exception
is not a string. Converting the Exception to a string fixes this.

This fixes:

AttributeError: 'TimeoutError' object has no attribute 'replace'

[0]
https://docs.python.org/3/library/urllib.error.html#urllib.error.URLError.reason

(cherry picked from commit af888e24ff8ec478b490c6d0fc39131cd63a8079)
2021-10-26 16:32:13 +02:00
3 changed files with 24 additions and 2 deletions

15
debian/changelog vendored
View File

@ -1,3 +1,18 @@
livecd-rootfs (2.742.2) impish; urgency=medium
* Bump UEFI disk image size for armhf to 3.5 GB (LP: #1953609)
Current builds are failing because the disk size is not big enough.
This a backport from jammy and upstream livecd-rootfs:ubuntu/master.
-- Phil Roche <phil.roche@canonical.com> Wed, 08 Dec 2021 11:24:18 +0000
livecd-rootfs (2.742.1) impish; urgency=medium
[ Thomas Bechtold ]
* magic-proxy: fix exception handling for URLError LP: #1946520
-- Brian Murray <brian@ubuntu.com> Thu, 18 Nov 2021 15:17:05 -0800
livecd-rootfs (2.742) impish; urgency=medium
[ Brian Murray ]

View File

@ -21,6 +21,11 @@ case ${PROJECT:-} in
;;
esac
if [ "$ARCH" = "armhf" ]; then
# bump to 3.5G (3584*1024**2); Since Impish and Jammy armhf need more then the default 2.2G
IMAGE_SIZE=3758096384
fi
# Change image size for preinstalled generic images & all preinstalled riscv64 images
if [ -n "${SUBARCH:-}" ]; then
if [ "${SUBARCH:-}" = "generic" ] || [ "$ARCH" = "riscv64" ]; then

View File

@ -883,8 +883,10 @@ class ProxyingHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
self.__send_response(e)
except urllib.error.URLError as e:
self.log_message(
"urlopen() failed for {} with {}".format(uri, e.reason))
self.send_error(501, e.reason)
"urlopen() failed for {} with {}".format(uri, str(e.reason)))
# URLError.reason can either be a string or another Exception
# So do convert it to a string before sending the error (LP: #1946520)
self.send_error(501, str(e.reason))
def __get_host_path(self):