[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/32003] Specifying --package-metadata might not be possible and i
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile |
Date: |
Tue, 23 Jul 2024 22:57:17 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32003
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Benjamin Drung from comment #11)
> (In reply to H.J. Lu from comment #9)
> > It should be human readable.
>
> What do you recommend? IMO percent-escaping is readable enough and increases
> the size of the already long string not too much.
>
> The encoding of the JSON
> {"type":"deb","os":"ubuntu","name":"dpkg","version":"1.22.6ubuntu15",
> "architecture":"amd64"} would be:
>
> -Wl,--encoded-package-metadata=%7B%22type%22:%22deb%22%2C%22os%22:
> %22ubuntu%22%2C%22name%22:%22dpkg%22%2C%22version%22:%221.22.
> 6ubuntu15%22%2C%22architecture%22:%22amd64%22%7D
>
> At first it might look confusing, but the relevant strings can be seen on a
> second look: "type", "deb", "os", "ubuntu", "name", "dpkg", "version",
> "1.22.6ubuntu15", "architecture", "amd64". Only the beginning of the version
> number is harder to see.
>
> There are multiple tools that can encode/decode it. For example Python's
> urllib.parse.unquote and urllib.parse.quote.
>
> I am open for better encodings. I am open for making --package-metadata
> percent-decode the value instead of adding a new parameter. Percents are
> relative safe encoding option. The Debian package name and the Debian
> version are not allowed to contain percents. The os, type, and architecture
> will not have percents in the
%22 isn't human readable. Do we need to escape { and }? We need to escape "
and ,. Should $ be supported in JSON code? Will "%[string]" escape work?
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, (continued)
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/22
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, jbeulich at suse dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bluca at debian dot org, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile,
hjl.tools at gmail dot com <=
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bdrung at posteo dot de, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/23
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, jbeulich at suse dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, jbeulich at suse dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, hjl.tools at gmail dot com, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, sam at gentoo dot org, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, dilfridge at gentoo dot org, 2024/07/24
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, bluca at debian dot org, 2024/07/25
- [Bug ld/32003] Specifying --package-metadata might not be possible and is too fragile, doko at debian dot org, 2024/07/31