snaps with hyphens in their names get badly-named systemd mount definitions

Bug #1650261 reported by Barry Price on 2016-12-15
This bug affects 4 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)

Bug Description

e.g. installing the canonical-livepatch snap gives me:


The .service files are named sensibly, but the .mount files get a '\x2d' instead of a '-'.

This is particularly troublesome on hosts where /etc/ is kept in revision control, as e.g. bzr will crash on encountering these particular type of filenames.

Seth Arnold (seth-arnold) wrote :

Search for 'escape' on to discover the non-alphanumeric escaping algorithm; it's a bit involved. The tool can add and remove escaping as needed.


Changed in snapd (Ubuntu):
status: New → Confirmed
Sean Sosik-Hamor (sciri) wrote :

The duplicate status of this bug is wrong. This bug is correctly reporting the actual cause and should be fixed. Duplicate bug #1598304 is reporting the workaround in etckeeper.

Zygmunt Krynicki (zyga) wrote :

This is a "feature" of systemd and as such it is unlikely to be fixed.

Changed in snapd (Ubuntu):
status: Confirmed → Opinion
John Lenton (chipaca) wrote :

Sciri, how is this not a dupe? In both cases it's bzr having an expecation about what's a valid filename that is not supported by systemd mount units.

Stuart Bishop (stub) wrote :

The Bazaar bug target is a duplicate of Bug #1035045

Changed in bzr:
status: New → Won't Fix
Sean Sosik-Hamor (sciri) wrote :

John, it was my assumption that snapd adding backslashes to the filename was the bug itself (the cause), not bzr's mishandling of the backslash. So that lead to my assumption that the bzr/etckeeper bug was a workaround for a bug in snapd and therefore not a duplicate.

If this is truly a feature of snapd as Zygmunt points out above then I guess it is a duplicate.

Sean Sosik-Hamor (sciri) wrote :

And bzr bug target Bug #1035045 was just set to WONTFIX because it would break Windows support. So where does that leave us who use straight bzr instead of etckeeper (where Bug #1598304 is still NEW)?

Seth Arnold (seth-arnold) wrote :

Sean, I understand there's a fork of bzr currently under development; they may be more willing to accept Windows-impossible names on Linux or Linux-impossible names on Windows:

Further guessing, maybe it'd be possible to write a conversion tool that renames files back and forth into the subset of names that bzr accepts? (Ironically, a tool very much like the systemd-escape tool that started this bug.) Maybe it could be added as a bzr plugin, or a bzr hook, or just something that's run before every checkin/checkout?

I hope something here helps.


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers