Documentation ¶
Index ¶
- type AppImage
- func (ai *AppImage) AppStreamFile() (*appstream.Component, error)
- func (ai *AppImage) AppStreamID() string
- func (ai *AppImage) Close()
- func (ai *AppImage) DesktopEntry(s string) (name string)
- func (ai *AppImage) DesktopFile() (*desktop.File, error)
- func (ai *AppImage) ELFSectionAsString(section string) (string, error)
- func (ai *AppImage) HasSignature() (ok bool)
- func (ai *AppImage) ID() AppImageID
- func (ai *AppImage) SHA256WithoutSignature() ([]byte, error)
- func (ai *AppImage) Signature() (signedby openpgp.Entity, ok bool, err error)
- type AppImageID
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppImage ¶
type AppImage struct { ImageFormatType uint FS *squashfs.SquashFS // contains filtered or unexported fields }
func (*AppImage) AppStreamID ¶
func (*AppImage) DesktopEntry ¶
func (*AppImage) ELFSectionAsString ¶
func (*AppImage) HasSignature ¶
func (*AppImage) ID ¶
func (ai *AppImage) ID() AppImageID
ID tries to generate a stable identifier for the application that remains the same across updates. AppImage does not specify anything like that. However, the docs note that optionally an AppStream can be placed at a known location. an AppStream does specify such an ID. If available, use that. If not, we try to make a synthetic ID. If the application has update information (.upd_info ELF section) we build a synthetic ID from that, as the AppImage spec say
URL to the .zsync file (URL MUST NOT change from version to version)
for Zsync URLs. For github updates <username>-<repo> should hopefully reasonably stable and for Pling, we have a product ID that we can use.
If a file has no update information, we take the (slightly processed) "Name" entry from the .desktop file.
If there's no desktop file, we're out of ideas and just use the (slightly processed) file name of the AppImage on disk. Using some simple heuristics trying to cut out version numbers.
func (*AppImage) SHA256WithoutSignature ¶
SHA256WithoutSignature computes the SHA256 sum of the AppImage but treats the ELF sections .sha256_sig and .sig_key as if they were entirely 0x00 bytes. That's because this hash is later signed and stuffed into exactly these sections
type AppImageID ¶
type AppImageID string