util.sanitize_source truncates squashfs source types

Bug #1851271 reported by Chad Smith
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
curtin
Fix Committed
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

Revision history for this message
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)
summary: - util.santitize_source truncates squashfs source types
+ util.sanitize_source truncates squashfs source types
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.