appimage

package
v0.0.0-...-4f60042 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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 Open

func Open(file string) (*AppImage, error)

func (*AppImage) AppStreamFile

func (ai *AppImage) AppStreamFile() (*appstream.Component, error)

func (*AppImage) AppStreamID

func (ai *AppImage) AppStreamID() string

func (*AppImage) Close

func (ai *AppImage) Close()

func (*AppImage) DesktopEntry

func (ai *AppImage) DesktopEntry(s string) (name string)

func (*AppImage) DesktopFile

func (ai *AppImage) DesktopFile() (*desktop.File, error)

func (*AppImage) ELFSectionAsString

func (ai *AppImage) ELFSectionAsString(section string) (string, error)

func (*AppImage) HasSignature

func (ai *AppImage) HasSignature() (ok bool)

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

func (ai *AppImage) SHA256WithoutSignature() ([]byte, error)

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

func (*AppImage) Signature

func (ai *AppImage) Signature() (signedby openpgp.Entity, ok bool, err error)

type AppImageID

type AppImageID string

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewSkipReader

func NewSkipReader(r io.Reader) *Reader

func (*Reader) AddSkip

func (s *Reader) AddSkip(offset, size int)

func (*Reader) Read

func (s *Reader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL