util.sanitize_source truncates squashfs source types

Bug #1851271 reported by Chad Smith on 2019-11-04
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
curtin
Low
Unassigned

Bug Description

When source contains the prefix squashfs:something util.santize_source trucates the uri returned to a single character

python3 -c 'from curtin.util import sanitize_source; print(sanitize_source("squashfs:mine"))'
{'type': 'fsimage', 'uri': 'm'}

Related branches

Ryan Harper (raharper) wrote :

Thanks for filing the bug. The 'squashfs:' prefix is currently unsupported.

The correct way to specify a squashfs source is via fsimage:// or http://

For example:

>>> util.sanitize_source("fsimage:///nfsmount/ubuntu.squash")
{'type': 'fsimage', 'uri': '///nfsmount/ubuntu.squash'}

>>> util.sanitize_source("http://cloud.images.ubuntu.com/bionic/test.squash")
{'type': 'fsimage', 'uri': 'http://cloud.images.ubuntu.com/bionic/test.squash'}

That said, we should fix the bug and add the prefix and suffix feature to
the documentation.

Changed in curtin:
importance: Undecided → Low
status: New → Triaged
Chad Smith (chad.smith) on 2019-11-05
summary: - util.santitize_source truncates squashfs source types
+ util.sanitize_source truncates squashfs source types

This bug is fixed with commit 95197ff5 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=95197ff5

Changed in curtin:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers