AppStream is an effort to provide additional metadata and unique IDs for all software available in a Linux system.
This repository contains the server-side of the AppStream infrastructure, a tool to generate metadata from distribution packages. You can find out more about AppStream collection metadata at [Freedesktop](https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html).
The AppStream generator is currently primarily used by Debian, but is written in a distribution agnostic way. Backends only need to implement [two interfaces](src/asgen/backends/interfaces.d) to to be ready.
If you are looking for the AppStream client-tools, the [AppStream repository](https://github.com/ximion/appstream) is where you want to go.
## Install from Flathub
You can install an up-to-date version of AppStream Generator from [Flathub](https://flathub.org) if you just
want to quickly test the software with your repository:
```ShellSession
# Add Flathub remote
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Install appstream-generator
flatpak install org.freedesktop.appstream.generator
# Run appstream-generator
flatpak run org.freedesktop.appstream.generator --help
```
You can use AppStream Generator as [documented](docs/usage.md), but you will need to replace all
`appstream-generator` commands with `flatpak run org.freedesktop.appstream.generator` and may need
to set the workspace as absolute path using `-w` instead of relying on autodetection.
## Usage
Take a look at the [docs/](docs/index.md) directory in the source tree for information on how to use the generator and write configuration files for it.
## Development

### Build dependencies
* LDC[1]
* Meson (>= 0.46) [2]
* GLibD [3]
* AppStream [4]
* libarchive (>= 3.2) [5]
* LMDB [6]
* GirToD [7]
* LibSoup
* Cairo
* GdkPixbuf 2.0
* RSvg 2.0
* FreeType
* Fontconfig
* Pango
* Yarn (optional) [8]
[1]: https://github.com/ldc-developers/ldc/releases
[2]: http://mesonbuild.com/
[3]: https://github.com/gtkd-developers/GlibD
[4]: https://github.com/ximion/appstream
[5]: https://libarchive.org/
[6]: https://symas.com/lmdb/
[7]: https://github.com/gtkd-developers/gir-to-d
[8]: https://yarnpkg.com/
On Debian and derivatives of it, all build requirements can be installed using the following command:
```ShellSession
sudo apt install meson ldc gir-to-d libappstream-dev libsoup2.4-dev libarchive-dev \
libgdk-pixbuf2.0-dev librsvg2-dev libcairo2-dev libfreetype6-dev libfontconfig1-dev \
libpango1.0-dev liblmdb-dev libglibd-2.0-dev
```
### Build instructions
To build the tool with Meson, create a `build` subdirectory, change into it and run `meson .. && ninja` to build.
In summary:
```ShellSession
$ mkdir build && cd build
$ meson -Ddownload-js=true ..
$ ninja
$ sudo ninja install
```
We support several options to be set to influence the build. Change into the build directory and run `mesonconf` to see them all.
You might want to perform an optimized debug build by passing `--buildtype=debugoptimized` to `meson` or just do a release build straight
away with `--buildtype=release` in case you want to use the resulting binaries productively. By default, the build happens without optimizations
which slows down the generator.
## Hacking
Pull-requests and patches are very welcome! If you are new to D, it is highly recommended to take a few minutes to look at the D tour to get a feeling of what the language can do: https://tour.dlang.org/
appstream-generator-0.9.1/RELEASE 0000664 0000000 0000000 00000001761 14523760244 0016520 0 ustar 00root root 0000000 0000000 AppStream Generator Release Notes
1. Write NEWS entries for AppStream Generator in the same format as usual.
git shortlog v0.9.0.. | grep -i -v trivial | grep -v Merge > NEWS.new
--------------------------------------------------------------------------------
Version 0.9.1
~~~~~~~~~~~~~~
Released: 2023-xx-xx
Notes:
Features:
Bugfixes:
Contributors:
--------------------------------------------------------------------------------
2. Commit changes in Git:
git commit -a -m "Release version 0.9.1"
git tag -s -f -m "Release 0.9.1" v0.9.1 /usr/share/icons/hicolor/<size>/apps and ensure the Icon= value",
"of the .desktop file is set correctly."
],
"severity": "error"
},
"icon-scaled-up": {
"text": "Icon file '{{icon_name}}' was scaled up from {{icon_size}}px to {{scale_size}}px. Please try to supply a bigger icon.",
"severity": "warning"
},
"icon-too-small": {
"text": [ "Only a very small icon ('{{icon_name}}', {{icon_size}}px) could be located.",
"Please try to supply a bigger icon (at least 64x64px) in the Freedesktop icon path (/usr/share/icons/hicolor/%size%/apps/)."
],
"severity": "error"
},
"pkg-extract-error": {
"text": "Could not extract file '{{fname}}' from package '{{pkg_fname}}'. Error: {{error}}",
"severity": "error"
},
"pkg-empty-file": {
"text": ["Could not extract file '{{fname}}' from package '{{pkg_fname}}'.",
"Icon data was empty. The icon might be a symbolic link pointing at a file outside of this package.",
"Please do not do that and instead place the icons in their appropriate directories in /usr/share/icons/hicolor/."],
"severity": "error"
},
"image-write-error": {
"text": ["Could write new image generated from '{{fname}}' (package '{{pkg_fname}}'): {{error}}"],
"severity": "error"
},
"metainfo-validation-error": {
"text": "Validation of the MetaInfo file failed: {{msg}}",
"severity": "warning"
},
"no-install-candidate": {
"text": "Component has no install candidate defined. A package must be associated with a package or bundle providing it.",
"severity": "error"
},
"metainfo-duplicate-id": {
"text": ["The component-id '{{cid}}' already appeared in package '{{pkgname}}'. AppStream-IDs must be unique, please resolve which package will be",
"providing this component by default.<launchable type=\"desktop-id\"/> tag value of the AppStream MetaInfo file is not adapted as well, or if the MetaInfo file is located in a different package than the .desktop file.<id/> tag. If the component metadata has no launchable tag and no",
"icon tag of type stock, check if a .desktop file named after the component-ID is located in the same package."],
"severity": "error"
},
"description-from-package": {
"text": ["This software component gets its description from the package it is located in.X-AppStream-Ignore=true field to its .desktop file, or to write a MetaInfo file for ",
"this component to take the long description upstream. In future, components without MetaInfo file might be dropped from the metadata entirely.",
"You can consult the XML quickstart guides for more information on how to write a MetaInfo file."],
"severity": "info"
},
"no-metainfo": {
"text": ["This software component is missing a MetaInfo file to provide metadata.X-AppStream-Ignore=true field to it, or to write a MetaInfo file for this component and send it upstream.AppStream is a metadata specification which permits software components to provide information about themselves to automated systems and end-users before the software is actually installed.
The appstream-generator tool generates AppStream metadata from the repositories of a software distribution. It currently supports the following repository formats / distributions: Debian, Ubuntu, Arch Linux, RPM-MD (Fedora, Mageia).
The generator will produce AppStream catalog metadata files in the AppStream YAML or XML format to be shipped to users, as well as a detailed HTML report about found components and HTML and JSON reports on issues detected with the scanned metadata. It reads .desktop files as well as metainfo files, renders fonts, scales images, caches screenshots etc. to produce high-quality metadata for AppStream based software centers to consume. Usually, appstream-generator is integrated with the existing software build & packaging workflow of a distribution.
Welcome to the AppStream Generator HTML pages!
These pages exist to provide a user-friendly view on the issues discovered by the AppStream metadata generator while extracting metadata from packages in the {{project_name}} archive. They can also be used to take a look at the raw metadata, to spot possible problems with the data itself or the generation process.
AppStream is a cross-distro XML format to provide metadata for software components and to assign unique identifiers to software.
In Debian, we parse all XML provided by upstream projects as well as other metadata (.desktop-files, ...), and compile a single YAML
metadata file from it, which is then shipped to users via APT.
While the official AppStream specification is based on XML, Debian uses a YAML version of the format for easier use in existing scripts and for better archive integration. This format is called DEP-11, and initially had a much wider scope in enhancing archive metadata than AppStream had. Today AppStream covers that as well, and DEP-11 is only a YAML version of AppStream.
The generated metadata can for example be used by software centers like GNOME Software or KDE Discover to display a user-friendly application-centric
view on the package archive.
It can also be used by other software to find missing plugins, codecs, fonts, etc. or simply by users to install software on any Linux distribution
without knowing the exact package name.
See AppStream @ wiki.d.o for information about AppStream integration and usage in Debian.
The offical AppStream specification can be found at freedesktop.org, a description
of the DEP-11 YAML format is hosted there as well.
You can find the source-code of the AppStream Generator here.
Log files of the generator runs are stored in logs/, machine-readable issue hints can be found in hints/, valid metadata is located in data/ and all exported media is made available via media/.
Welcome to the AppStream Generator HTML pages!
These pages exist to provide a user-friendly view on the issues discovered by the AppStream metadata generator while extracting metadata from packages in the {{project_name}} archive. They can also be used to take a look at the raw metadata, to spot possible problems with the data itself or the generation process.
AppStream is a cross-distro XML format to provide metadata for software components and to assign unique identifiers to software.
In {{project_name}}, we parse all XML provided by upstream projects as well as other metadata (.desktop-files, ...), and compile a single
metadata file from it, which is then shipped to users.
The generated metadata can for example be used by software centers like GNOME Software or KDE Discover to display a user-friendly application-centric
view on the package archive.
It can also be used by other software to find missing plugins, codecs, fonts, etc. or simply by users to install software on any Linux distribution
without knowing the exact package name.
The offical AppStream specification can be found at freedesktop.org.
You can find the source-code of the AppStream Generator here.
{{metadata}}