DNS address allowed to contain '-', but not flatpak ID, any suggestion?

Matthias Klumpp matthias at tenstral.net
Tue Jan 30 15:12:46 UTC 2018


2018-01-30 15:49 GMT+01:00 Philip Withnall <philip at tecnocode.co.uk>:
> On Tue, 2018-01-30 at 22:43 +0800, Robin Lee wrote:
>> Hi, everybody!
>>
>> I am a Fedora packager and recently start to learn flatpak.
>>
>> I chose Zim as my first flatpak. The official web host of this
>> package is zim-wiki.org.
>> ( '-' is of course a valid character in a host name'. )
>> And the ID in appdata is 'org.zim-wiki.Zim'.
>>
>> So I tried to use the same ID as flatpak ID. But flatpak disallowed
>> this case:
>> "Only last name segment can contain -"
>>
>> So what is the best solution for this issue?
>> Choose another DNS address to be used as flatpak ID?
>> Sustitude '-' with another character or an escape sequence?
>> Or flatpak should remove the limit for '-'?
>
> This was discussed on the mailing list earlier this month:
>
> https://lists.freedesktop.org/archives/flatpak/2018-January/000906.html
>
> I would recommend `org.zim_wiki.Zim` as the flatpak ID. Ideally, the
> appdata ID could be changed to this too, but see the above discussion
> about that.

If you change the AppStream ID for Flatpak, please *always* change the
ID in the metainfo file as well (submit that change upstream).
AppStream in it's most recent version discourages the use of dashes in
IDs, so changing that is a good idea to be futureproof.

(The whole point of an AppStream component-ID is to uniquely identify
a software across different distribution systems, renaming it for
Flatpak only is therefore breaking that promise)

Cheers,
    Matthias


More information about the Flatpak mailing list