pax_global_header 0000666 0000000 0000000 00000000064 15067544756 0014535 g ustar 00root root 0000000 0000000 52 comment=e79cceb48b3bca7f432ddc34c51e7935d987ae1d
appstream-generator-0.10.1/ 0000775 0000000 0000000 00000000000 15067544756 0015574 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/.clang-format 0000664 0000000 0000000 00000004402 15067544756 0020147 0 ustar 00root root 0000000 0000000 ---
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: Cpp
Standard: C++11
ColumnLimit: 120
BreakBeforeBraces: Linux
PointerAlignment: Right
AlignAfterOpenBracket: AlwaysBreak
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: NonAssignment
AlignArrayOfStructures: Left
# format C++11 braced lists like function calls
Cpp11BracedListStyle: true
# do not put a space before C++11 braced lists
SpaceBeforeCpp11BracedList: false
# no namespace indentation to keep indent level low
NamespaceIndentation: None
# we use template< without space.
SpaceAfterTemplateKeyword: false
# Always break after template declaration
AlwaysBreakTemplateDeclarations: true
# macros for which the opening brace stays attached.
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
# keep lambda formatting multi-line if not empty
AllowShortLambdasOnASingleLine: Empty
# return types should not be on their own lines
AlwaysBreakAfterReturnType: None
PenaltyReturnTypeOnItsOwnLine: 1000
AlwaysBreakAfterDefinitionReturnType: None
# Break constructor initializers before the colon and after the commas,
# and never put the all in one line.
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
PackConstructorInitializers: Never
# Place ternary operators after line breaks
BreakBeforeTernaryOperators: true
# No own indentation level for access modifiers
IndentAccessModifiers: false
AccessModifierOffset: -4
# Add empty line only when access modifier starts a new logical block.
EmptyLineBeforeAccessModifier: LogicalBlock
# Only merge empty functions.
AllowShortFunctionsOnASingleLine: Empty
# Don't indent case labels.
IndentCaseLabels: false
# No space after C-style cast
SpaceAfterCStyleCast: false
# Never pack arguments or parameters
BinPackArguments: false
BinPackParameters: false
# Avoid breaking around an assignment operator
PenaltyBreakAssignment: 150
# Left-align newline escapes, e.g. in macros
AlignEscapedNewlines: Left
# Enums should be one entry per line
AllowShortEnumsOnASingleLine: false
# we want consecutive macros to be aligned
AlignConsecutiveMacros: true
# never sort includes, only regroup (in rare cases)
IncludeBlocks: Regroup
SortIncludes: Never
appstream-generator-0.10.1/.editorconfig 0000664 0000000 0000000 00000000666 15067544756 0020261 0 ustar 00root root 0000000 0000000 # See https://editorconfig.org/
root = true
[*]
end_of_line = lf
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 4
[*.d]
max_line_length = 120
dfmt_brace_style = knr
dfmt_soft_max_line_length = 100
dfmt_align_switch_statements = false
dfmt_space_before_function_parameters = true
dfmt_keep_line_breaks = true
[*.yml]
indent_style = space
indent_size = 2
[*.xml]
indent_style = space
indent_size = 2
appstream-generator-0.10.1/.github/ 0000775 0000000 0000000 00000000000 15067544756 0017134 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/.github/dependabot.yml 0000664 0000000 0000000 00000000316 15067544756 0021764 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
appstream-generator-0.10.1/.github/workflows/ 0000775 0000000 0000000 00000000000 15067544756 0021171 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/.github/workflows/build-test.yml 0000664 0000000 0000000 00000003730 15067544756 0023773 0 ustar 00root root 0000000 0000000 name: Build Test
permissions:
contents: read
on: [push, pull_request]
jobs:
build-debian-testing:
name: Debian Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Create Build Environment
run: cd tests/ci/ && podman build -t asgen -f ./Dockerfile-debian-testing .
- name: Build
run: podman run -a stdout -a stderr -e CXX=g++ -v `pwd`:/build asgen
./tests/ci/run-build.sh
- name: Tests
run: podman run -a stdout -a stderr -e CXX=g++ -v `pwd`:/build asgen
./tests/ci/run-tests.sh
build-debian-stable:
name: Debian Stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Create Build Environment
run: cd tests/ci/ && podman build -t asgen -f ./Dockerfile-debian-stable .
- name: Build
run: podman run -a stdout -a stderr -e CXX=g++ -v `pwd`:/build asgen
./tests/ci/run-build.sh
- name: Tests
run: podman run -a stdout -a stderr -e CXX=g++ -v `pwd`:/build asgen
./tests/ci/run-tests.sh
build-fedora-latest:
name: Fedora Latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Create Build Environment
run: cd tests/ci/ && podman build -t asgen -f ./Dockerfile-fedora-latest .
- name: Build
run: podman run -a stdout -a stderr -e CXX=g++ -v `pwd`:/build asgen
./tests/ci/run-build.sh
- name: Tests
run: podman run -a stdout -a stderr -e CXX=g++ -v `pwd`:/build asgen
./tests/ci/run-tests.sh
build-ubuntu-lts:
name: Ubuntu LTS
runs-on: ubuntu-24.04
env:
CC: gcc-14
CXX: g++-14
steps:
- uses: actions/checkout@v5
- name: Create Build Environment
run: sudo ./tests/ci/install-deps-deb.sh
- name: Make & Install 3rd-party
run: sudo ./tests/ci/ci-install-extern.sh
- name: Build
run: ./tests/ci/run-build.sh
- name: Tests
run: ./tests/ci/run-tests.sh
appstream-generator-0.10.1/.github/workflows/codeql.yml 0000664 0000000 0000000 00000001412 15067544756 0023161 0 ustar 00root root 0000000 0000000 name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '36 8 * * 5'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-24.04
env:
CC: gcc-14
CXX: g++-14
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
- name: Create Build Environment
run: sudo ./tests/ci/install-deps-deb.sh
- name: Make & Install 3rd-party
run: sudo ./tests/ci/ci-install-extern.sh
- name: Build & Test
run: ./tests/ci/run-build.sh codeql
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
appstream-generator-0.10.1/.github/workflows/coverity.yml 0000664 0000000 0000000 00000002675 15067544756 0023572 0 ustar 00root root 0000000 0000000 name: Coverity Scan
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: '0 3 1,15 * *'
jobs:
coverity:
if: github.repository == 'ximion/appstream-generator'
runs-on: ubuntu-24.04
env:
CC: gcc-14
CXX: g++-14
steps:
- uses: actions/checkout@v5
with:
fetch-tags: true
fetch-depth: 0
- name: Create Build Environment
run: sudo ./tests/ci/install-deps-deb.sh
- name: Make & Install 3rd-party
run: sudo ./tests/ci/ci-install-extern.sh
- name: Create Version String
id: version
run: |
git_commit=$(git rev-parse --short HEAD)
git_current_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo v1.0.0)
git_commit_no=$(git rev-list --count "${git_current_tag}..HEAD" 2>/dev/null)
git_version_full=${git_current_tag#v}; git_version_full=${git_version_full//-/.}
if [ "$git_commit_no" -gt 0 ]; then
git_version_full+=".git$git_commit_no"
fi
echo "Using version string: $git_version_full"
echo "git_version_full=$git_version_full" >> $GITHUB_OUTPUT
- name: Coverity
uses: vapier/coverity-scan-action@346291b388d0a99b2d82c8d46f5088d0fc494844
with:
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
version: ${{ steps.version.outputs.git_version_full }}
command: './tests/ci/run-build.sh coverity'
appstream-generator-0.10.1/.gitignore 0000664 0000000 0000000 00000000112 15067544756 0017556 0 ustar 00root root 0000000 0000000 build/
.dub
docs.json
dub.selections.json
__dummy.html
*.o
*.obj
*.so
*.a
appstream-generator-0.10.1/LICENSE 0000664 0000000 0000000 00000016743 15067544756 0016614 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
appstream-generator-0.10.1/MAINTAINERS 0000664 0000000 0000000 00000000047 15067544756 0017272 0 ustar 00root root 0000000 0000000 Matthias Klumpp
E-mail: mak@debian.org
appstream-generator-0.10.1/NEWS 0000664 0000000 0000000 00000077743 15067544756 0016315 0 ustar 00root root 0000000 0000000 Version 0.10.1
~~~~~~~~~~~~~~
Released: 2025-1ß-02
Features:
* engine: Limit default parallelism for main processing operations
* Skip intermediate data check if gcid is empty
* Print if data remains after manually removing a package
* engine: Add function to process all suitable data at once
Bugfixes:
* tests: Allow network test to have all tests skipped
* utils: Just use C++ standard library for copying directories
* Guard against null values in the database
* zarchive: Properly normalize paths
* yaml: Make sure Time field is always read as string
* Explicitly set up UTF-8 locale
* Ensure we aren't running on a bad libfyaml
* engine: Actually open the locale unit, so it can be used to find locale
* Don't just skip processing most new packages
Miscellaneous:
* Update the snapcraft file
Contributors:
Matthias Klumpp
Version 0.10.0
~~~~~~~~~~~~~~
Released: 2025-09-16
Notes:
* This release switches from using the D programming language to C++23.
This change should simplify maintenance of the tool and allow it to
be more compatible with other tooling. C++23 adopted a lot of D's
features, so this is a pretty direct port - still, issues may exist
even though this release has been tested extensively. So, perform your
own tests and report any issues!
Features:
* Translate the project from D to C++23
* zarchive: Support reading from hardlinks
* Use backward-cpp if available for automated crash backtraces
* Add optimization for repeated reads from large archives
* Add support for loading JPEG-XL icons
Bugfixes:
* zarchive: Ensure parent path is created before opening file
* debian: Ensure legacy-style repos get package descriptions for components
* Create document timestamps in the right format
* iconhandler: Render SVG with new API and properly report errors again
Miscellaneous:
* Add and enforce an npm lockfile
* Avoid some unnecessary data copies and refcounting where possible
Contributors:
Joey Riches, LN Liberda, Matthias Klumpp
Version 0.9.2
~~~~~~~~~~~~~~
Released: 2025-08-12
Features:
* data: Add tooltip hover for plot graph in section_pages.html
Bugfixes:
* snap: Don't include our glib
* freebsd backend: Start from meta.conf when gathering repository metadata
* freebsd: catch up with new pkg repository layout
* rpmmd: Port to dxml
* rpmmd: Download packages on-demand
* Sanitize UTF-8 before adding it to the database
* Drop removed no-bin-links argument from yarn invocation
Miscellaneous:
* Add AdwaitaLegacy to themeNames
* snap: Update some dependency versions
* snap: Build using system LDC and glibd
* Install JS stuff with NPM
* metainfo: Add developer name
Contributors:
Amin Bandali, Balló György, Gleb Popov, Joey Riches,
Matthias Klumpp
Version 0.9.1
~~~~~~~~~~~~~~
Released: 2023-11-11
Features:
* Implement a FreeBSD backend
* Add I/O caching for the FreeBSD backend
* Allow to manually specify a GIR directory at build time
* Include Yarn lockfile
* Add release information to metainfo file
* Build against AppStream 1.0
Bugfixes:
* Make building the RPMMD backend optional
* web: Better split archive sections
* ubuntu: Don't fail on repositories with no language packs
* utils: mkdirRecurse instead of mkdir inside parallel
Miscellaneous:
* Snap updates
* Add documentation how to install from Flathub
* Autoformat source code
Contributors:
Gleb Popov, Heather Ellsworth, Matthias Klumpp, Pablo Correa Gómez
Version 0.9.0
~~~~~~~~~~~~~~
Released: 2023-01-26
Features:
* Allow more complex repo-level metadata additions
Documentation:
* docs: Document modifications.json
* docs: document values of "Backend" in asgen config
* docs: clarify directory structure
Bugfixes:
* Make MetadataType override work again
* Ensure all user feature flags are applied properly again
* Retry failed download 4 times by default
* Even process an empty repository if action is forced
* Don't fail if icon directory for injected metadata is missing
* ci: Improve scripts and don't use deprecated commands
* ci: Install ffmpeg in the Fedora images
Contributors:
Matthias Klumpp, Miroslav Suchý, Neal Gompa
Version 0.8.8
~~~~~~~~~~~~~~
Released: 2022-04-10
Bugfixes:
* Use higher stack size for archive read generator
Contributors:
Matthias Klumpp
Version 0.8.7
~~~~~~~~~~~~~~
Released: 2022-02-22
Bugfixes:
* Fix build on 32-bit architectures
* Set CAInfo on compose instance as well
* Don't unlink components of fake packages
* Process icons by suite/section across all architectures
* Fix a bunch of Meson and D deprecation warnings
Version 0.8.6
~~~~~~~~~~~~~~
Released: 2021-12-22
Notes:
* This is the first release to fully use libappstream-compose for
almost all metadata analysis (except icon processing, which needs
special care).
Features:
* Reimplement data extractor using the compose API
* Enable screencasts in compose based on our screenshotVideos feature flag
* Run external metadata through the exact same processing as all other data
* Redirect glib debug messages to our own logging if in verbose mode
* Adjust parallel processing work unit sizes for seeding
* ci: Add Fedora to the CI environment
Bugfixes:
* Fix build with GLib >= 2.69
* engine: Protect iconTarFiles variable when scanning for icons in parallel
* Resolve some issue tag conflicts with as-compose
* Control batch processing better to enable better extractor reuse
* Add duplicate-metainfo exemption for injected data
* Improve explanation of the "no-metainfo" tag
* Don't emit "description-from-package" if "no-metainfo" was already present
Contributors:
Neal Gompa (ニール・ゴンパ), Matthias Klumpp
Version 0.8.5
~~~~~~~~~~~~~~
Released: 2021-08-28
Features:
* snap: Set `grade` to `stable`
* Improve metainfo/desktop deduplication code
* Use ascompose for adding translation status data
Bugfixes:
* Always mark desktop-file as handled when handling its metainfo file (#91)
* Fix compilation due to broken generated GdkPixbuf code
* config: Move setUseOptipng call after we determine if optipng is available
* snap: Add glib{,-networking} to asgen's stage-packages
* snap: Build libas from a tag
* Adjust for compose API changes
Contributors:
Balló György, Dan Printzell, Iain Lane and Matthias Klumpp
Version 0.8.4
~~~~~~~~~~~~~~
Released: 2021-03-02
Features:
* Replace our HashMap with native associative arrays
* Switch back to using the curl-based downloader again
* Use the desktop-entry parsing code from appstream-compose
* Try finding icons in /usr/share/icons root directory as well
* Update our own metainfo file and validate it
Bugfixes:
* snap: Set LD_LIBRARY_PATH to the stage dir for asgen's build
* snap: Install curl as a normal build-package
* snap: Build with -j1
* debian: Forget a package's filename when removing its temporary dir
* debian: Add more synchronization
* zarchive: Log the error when we can't open an archive
* various: Improve builddir != srcdir builds and build the snap like this
* Replace theme icon generator concurrency with a range
* snap: Build AppStream in debugoptimized mode instead of release mode
Contributors:
Iain Lane, Matthias Klumpp
Version 0.8.3
~~~~~~~~~~~~~~
Released: 2021-02-02
Notes:
* This release requires libappstream-compose from the AppStream project to build.
The library is still in progress and currently has an unstable API, but
is developed in sync with appstream-generator, so asgen can safely
depend on it.
Features:
* Elevate no-metainfo presence to a warning by default (Matthias Klumpp)
* Ignore all apps with only desktop-entry files using OnlyShowIn (Matthias Klumpp)
* Make use of the helper classes provided by appstream-compose (Matthias Klumpp)
* Add editorconfig (Matthias Klumpp)
* Use ascompose result type as base for the generator result container (Matthias Klumpp)
* Use the validator helper function from appstream-compose (Matthias Klumpp)
* Use metainfo parsing helper from appstream-compose (Matthias Klumpp)
* alpine: add capabilities to download packages via HTTP (Rasmus Thomsen)
* config: allow overriding export dir via --export-dir (Rasmus Thomsen)
Bugfixes:
* Add explicit option to disable network-dependent tests (Matthias Klumpp)
* Add missing CSS styling for permalinks to Debian template (Matthias Klumpp)
* Captialize "MetaInfo" the same everywhere in hint messages (Matthias Klumpp)
* Use binding generator to create the missing AppStream Utils functions (Matthias Klumpp)
* Never open contents cache DB env more than once in the same thread (Matthias Klumpp)
* Re-enable LMDB TLS support (Matthias Klumpp)
* downloader: Check read byte count before appending to buffer (Matthias Klumpp)
* Ensure export directory paths are sane, absolute paths all the time (Matthias Klumpp)
Version 0.8.2
~~~~~~~~~~~~~~
Released: 2020-05-12
Features:
* Add experimental Snapcraft build definition
* snap: Move to strict confinement (Iain Lane)
* snap: Lots of debugging & integration work (Iain Lane)
* Find external binaries in PATH instead of hardcoding absolute paths to them
* Add static bindings for libsoup
* Switch to new libsoup-based downloader, drop Curl
* Always log the generator version for some operations
* Display more verbose debug messages when downloads are retried
* Better messages for network connection errors
* Support Ubuntu language packs for l10n status info extraction
* Make permalink anchors visible in HTML output
* alpine: Add new backend for Alpine Linux (Rasmus Thomsen)
Bugfixes:
* Pull a few Mustache engine code improvements from upstream
* Throw a better error message in unit tests when ffprobe isn't found
* tests: Skip video metadata check if ffprobe can not be found
* Check if our GdkPixbuf is able to handle all essential image formats
* Slighty reduce default logging verbosity when finding icons
* Give up icon search when component was rejected in icon storage routine
* Swallow bad last-modified times from servers instead of freaking out
* Make downloader a thread-local singleton (instead of thread-global)
* Create XDG runtime dir in case it is missing
* Make a failure to read an archive symlink target non-fatal
* Print available font names in issue report if no matching font was found
* Handle unexpected NULL-byte files better
* Find Yarn, even when it was renamed
* Strip out release artifacts for components that have a package
Version 0.8.1
~~~~~~~~~~~~~~
Released: 2020-01-20
Bugfixes:
* Don't crash if a gettext locale has no strings
* Reject packages which should have a long description but don't have one
* debian: Search for bz2 files again, i18n still uses those
* Work around some curl/D behavior changes and make HTTPS downloads work again
* Check suite status before removing hints/components
* Don't fail download on HTTP status code 302
* Properly fail icon search in all failure cases, add more debug logging
* Ensure icon tarballs are closed immediately after writing to them
* Flip around sorting of suites on HTML reports
Version 0.8.0
~~~~~~~~~~~~~~
Released: 2019-09-24
Notes:
* This release needs FFmpeg installed if video screenshots should
be permitted. No transcoding will be done. Check out the options
to modify this feature in the documentation.
Features:
* Add Igor Khasilev's container implementations to the source
* Replace EMSI containers with built-in implementation
* Bump dependency on AppStream
* Fix build with latest AppStream
* Implement improved validation issue reporting
* Always build registry of all hint tags, instead of adding them on-demand
* Add AV1 video sample for video support tests
* Add video tag support, analyze and store videos
* Use generic download method for downloading screenshots as well
Bugfixes:
* Make dscanner happy again
* Drop wrap files: We don't need them anymore
* debian: Don't check for bz2 compressed indices
* Only add remote icons if we have a mediaBaseUrl and are permitting image caches
* Validate injected metainfo files as well
* Ignore pedantic issues in HTML reports
* Fix getFileContents when acting on remote data
* XML-escape validator explanations
Version 0.7.7
~~~~~~~~~~~~~~
Released: 2019-02-24
Features:
* Speed up locale search by moving it to its own database cache (Matthias Klumpp)
Bugfixes:
* Component removal requests don't need to have a package-name set (Matthias Klumpp)
Version 0.7.6
~~~~~~~~~~~~~~
Released: 2019-01-10
Features:
* Limit the amount of release metadata in output (Matthias Klumpp)
* Implement icon loading for injected metadata (Matthias Klumpp)
* Prefer some SFNT font metadata over internal heuristics (Matthias Klumpp)
* Implement Gettext locale processing (Matthias Klumpp)
* Use a struct instead of bitfield to store enabled generator features (Matthias Klumpp)
* Refactor locale statistics loader (Matthias Klumpp)
* Explicitly remove temporary package data after reading locale info (Matthias Klumpp)
* Make arch-specific injected metadata override arch:all data (Matthias Klumpp)
Bugfixes:
* Complain if the user wants to associate a component with a fake package (Matthias Klumpp)
* Check that fonts and OS components have an icon (Matthias Klumpp)
* Sanitize image URLs before attempting download (Matthias Klumpp)
Version 0.7.5
~~~~~~~~~~~~~~
Released: 2019-01-04
Features:
* Load components for Arch Linux (Balló György)
* Embed mustache-d code (Matthias Klumpp)
* Protect against HTTPS-to-HTTP downgrades (Matthias Klumpp)
* Allow asgen maintainer to mark components for removal and inject
additional metainfo files (Matthias Klumpp)
* docs: Document the metainfo injection feature (Matthias Klumpp)
Bugfixes:
* Fix a few issues found by dscanner (Matthias Klumpp)
* Properly error out on HTTP 404 status codes (Matthias Klumpp)
* Add wrapfile for mir-core (Matthias Klumpp)
* Also ignore web applications without an icon (Matthias Klumpp)
Version 0.7.4
~~~~~~~~~~~~~~
Released: 2018-08-04
Features:
* Write CID<->GCID mapping table as additional output data (Matthias Klumpp)
* Don't rebuild GLibD as part of asgen, use the shared library instead (Matthias Klumpp)
* Add hint to add launchable tag if .desktop file is missing (Matthias Klumpp)
* Use posix_spawn codepath for optipng if possible via GLib (Matthias Klumpp)
* Unconditionally add stock-type icon if desktop-file allows for it (Matthias Klumpp)
* Allow font languages to be specified in a languages tag (Matthias Klumpp)
* Improve font language processing with metainfo hints (Matthias Klumpp)
* fonts: Sort selected font styles, prefer regular style for samples (Matthias Klumpp)
* fonts: Use a random pangram for fonts supporting English (Matthias Klumpp)
* fonts: Assume 100% language support for all locale mentioned in font data (Matthias Klumpp)
Bugfixes:
* Fix build with phobos 2.081 (Antonio Rojas)
* Depend on non-broken Meson version (Matthias Klumpp)
* fonts: Always prefer English for samples if font supports it (Matthias Klumpp)
* Initialize font icon lookup table only if there are fonts (Matthias Klumpp)
Version 0.7.3
~~~~~~~~~~~~~~
Released: 2018-04-26
Features:
* Don't include desktop files with an empty OnlyShowIn and complain about that
* Improve decompression code slightly
* Improve code to check for inclusion of .desktop files
* Optimize category filter function
* ubuntu: Use GC managed arrays for langpack info storage
* ubuntu: Hold copy of language pack array per package
* ubuntu: Don't load language packs multiple times, cleanup index data properly
* Close package from a base suite immediately in the seeding step
Bugfixes:
* debian: Make package index threadsafe again
* Don't add data to contents store in parallel
* Don't add the same architecture multiple times when generating reports
* Enable static check for poor exception handling
* Don't run through a synchronized section when fetching package filename
* Update dscanner and invoke it from a more versatile Python script
Version 0.7.2
~~~~~~~~~~~~~~
Released: 2018-04-16
Features:
* Dramatically reduce memory usage of cruft cleanup operation
* Parallelize database cleanup a bit more
* debian: Add basic in-memory deduplication of translated texts for packages
Bugfixes:
* Fix build on 32bit architectures
* Make GStreamer entry entirely optional for packages
* Ensure we properly merge in desktop-entry data from launchable tags
* Never process desktop files twice
* Don't append desktop data to mime/category lists
* Update wrap files to work with gir-to-d >= 0.15
Version 0.7.1
~~~~~~~~~~~~~~
Released: 2018-04-06
Features:
* debian: Use TagFile class from Laniakea
* debian: Use the packages real architecture in its identifier
* debian: Implement packageForFile backend feature
* Do more complex parsing of metainfo license expressions
* ci: Enable more static analysis checks
* Improve manual page
Bugfixes:
* Never upscale icons if we don't need to, use pixmaps directory as last resort
* Update wrap files to work with gir-to-d >= 0.14
* Don't try to upscale tiny icons from the pixmaps directory
* Register HiDPI icons for fonts properly
* Fix some minor style issues found by D-Scanner
* Document WorkspaceDir config file option
Version 0.7.0
~~~~~~~~~~~~~~
Released: 2018-04-04
Notes:
* Processing single packages and calling publication and processing
separately is not a fully supported feature yet!
This release lays the groundwork for it, but its final implementation
will happen later. Do not use this in production!
Features:
* stdx.allocator-backed containers library
* Use stdx.allocator-backed HashMap in more places
* Trigger GC less aggressively, use smaller parallel work unit sizes
* Allow setting a workspace in config and calling asgen on a config file
* Add backend interface for processing a single package
* Allow calling only the metadata publication step
* Add framework for extracting data directly from package files
* Allow setting icon policy in configuration
* Add support for more icon types and customizable icon policy
* Allow icon upscaling in certain cases, but complain about it
* Modernize Meson definitions
* Document how to modify icon policies in configuration
* Use AppStream 0.12.0 and format 0.12 by default
Bugfixes:
* Update wrap files to be compatible with gir-to-d >= 0.13
* Improve ArchiveDecompressor usage
* For each array appender, try to guess capacity to reserve better
* Properly add remote icon URLs
* Fetch JavaScript bits with Yarn instead of Bower
* Ensure we can run asgen again from its build directory
* Ignore data from immutable suites on cleanup
* Don't parallelize cleanup data collection routine
* Release memory chunks faster during cleanup operations
Version 0.6.8
~~~~~~~~~~~~~~
Released: 2017-11-06
Notes:
* The -Ddownload_js build flag is now -Ddownload-js to follow the naming
of other Meson flags more closely.
Features:
* Encode AppStream library version in version info string on reports
* Don't require an install candidate for a webapp
* Update hicolor theme fallback definition
* Try to filter out symbolic icons for apps
* Allow processing only one section in a suite
* Relax icon scaling rules
Bugfixes:
* Move time graph legend to the top left
* ci: Use the packaged gir-to-d
* Drop an unused gdc conditional
* Ensure the validator never tests web URLs for validity
* Drop LLVM DC bug workaround and allow cross-module inlining
* Make D GIR interface build work again with recent Meson versions
* Don't fail if we have a dupe ID with no pkgname, can happen now with webapps
Version 0.6.7
~~~~~~~~~~~~~~
Released: 2017-10-02
Features:
* ci: Enable gdc again for testing (Matthias Klumpp)
* Make rpmmd backend work (Matthias Klumpp)
* Make an empty main function for embedded unittests (Matthias Klumpp)
* Add a metainfo file (Matthias Klumpp)
* Add a manual page (Matthias Klumpp)
* Sort suite names on the index page (Matthias Klumpp)
Bugfixes:
* use file.exists to check file existence (Antonio Rojas)
* arch: Don't ref generator results (Matthias Klumpp)
* Improve the icon tarball generation code (Matthias Klumpp)
* Resolve deprecation warning (Matthias Klumpp)
Version 0.6.6
~~~~~~~~~~~~~~
Released: 2017-09-22
Features:
* Add basic HiDPI support (Corentin Noël)
* Generate the HiDPI tarball (Corentin Noël)
* Add an 'info' command to dump package information (Matthias Klumpp)
* Handle the "Hidden" property in .desktop files and complain about it (Matthias Klumpp)
Bugfixes:
* arch: XML-escape package descriptions (Matthias Klumpp)
* Check for availability of a component-id at the right time (Matthias Klumpp)
* Make writing compressed results a bit more robust (Matthias Klumpp)
* Resolve all deprecation warnings and slightly improve code (Matthias Klumpp)
Version 0.6.5
~~~~~~~~~~~~~~
Released: 2017-07-02
Features:
* Generate type=codec metadata for gstreamer packages (Iain Lane)
* Add a feature flag for GStreamer processing (Iain Lane)
* ci: Switch to using upstream GirToD (Matthias Klumpp)
* Set asgen version in defines.d by Meson as well (Matthias Klumpp)
* Format graphs a bit nicer (Matthias Klumpp)
Bugfixes:
* Find files in DATADIR - not relative to the executable (Iain Lane)
* Fix typo in metadata-path hint (Matthias Klumpp)
* Try to be more informative when a component has no ID (Matthias Klumpp)
* Ensure the rDNS scheme is really followed before editing an ID (Matthias Klumpp)
Version 0.6.4
~~~~~~~~~~~~~~
Released: 2017-05-25
Features:
* Automatically generate GIR D bindings at build-time (Matthias Klumpp)
* Remove dub build file (Matthias Klumpp)
* Use Meson subproject/wrap to fetch mustache-d in case it is missing (Matthias Klumpp)
* Add a launchable tag to output if we can add one (Matthias Klumpp)
* Make legacy metainfo dir a warning (Matthias Klumpp)
* Validate launchable entries and add heuristics in case they aren't present (Matthias Klumpp)
Bugfixes:
* Import buildPath directly from std.path (Antonio Rojas)
* Remove spurious std.stream import (Matthias Klumpp)
Version 0.6.3
~~~~~~~~~~~~~~
Released: 2017-03-08
Features:
* Experiment with scoped classes (Matthias Klumpp)
* Drop embedded generator copy (Matthias Klumpp)
* Use final classes whenever possible (Matthias Klumpp)
* Centralize all export-dir locations in base config class (Matthias Klumpp)
* Allow to manually configure data export locations (Matthias Klumpp)
Bugfixes:
* Fix some quirks and make the tests work again (Matthias Klumpp)
* ci: Don't build with GDC (Matthias Klumpp)
* Don't fail if a suite has no base suite (Matthias Klumpp)
* engine: Process base suite packages for contents only (Iain Lane)
* Update README.md (#39) (Blake Kostner)
* debian: Only select the most recent packages for a scan (Matthias Klumpp)
* Streamline final component validity check, resolve a crash (Matthias Klumpp)
Version 0.6.2
~~~~~~~~~~~~~~
Released: 2017-01-24
Notes:
* GDC 6.x can't compile the project at time due to a GDC bug.
See https://bugzilla.gdcproject.org/show_bug.cgi?id=251 for more
information.
Features:
* Support desktop-app metainfo files without .desktop file if they have an icon set
* Write log entry when starting/finishing icon tarball write
* Update AppStream bindings
* Allow to specify allowed keys
* Don't show pedantic validator hints
* Allow metainfo file to specify sample texts for fonts
* Process XPM icons if they are large enough
Bugfixes:
* Safeguard against TLD checks with empty-or-null string
* Ensure desktop-apps have at least one valid category set
* Don't override metainfo name/summary with .desktop values
* Quit immediately if the component type is unknown
* Correctly read a font's full-name
* Don't needlessly reprocess fonts
Version 0.6.1
~~~~~~~~~~~~~~
Released: 2016-12-26
Features:
* Add a symlink so that Ubuntu uses the same template as Debian (Iain Lane)
* Support linking to "old suites" in the HTML index (Iain Lane)
* hints: icon-not-found: Explain the symlink problem for Debian & Ubuntu (Iain Lane)
* Add preliminary new asgen logo (Matthias Klumpp)
* Use struct for archive (Matthias Klumpp)
* Reuse AsMetadata while processing metainfo files (Matthias Klumpp)
Bugfixes:
* Correctly install templates with Meson (Matthias Klumpp)
* meson: Make finding mustache-d more robust (Matthias Klumpp)
* Fix build with DMD (Antonio Rojas)
* engine: Don't clean packages in base suites (Iain Lane)
* download: If we have a last-modified date, set the mtime of the target file (Iain Lane)
* Simplify zarchive code a little (Matthias Klumpp)
* Use module initializer to initialize global static data (Matthias Klumpp)
* Fix build on Debian with GDC (Matthias Klumpp)
Version 0.6.0
~~~~~~~~~~~~~~
Released: 2016-10-03
Notes:
* If possible, you should build Meson with the LLVM D compiler and the
Meson build system now.
Features:
* Produce better error messages on failed libarchive actions (Matthias Klumpp)
* Add a hook to the desktop file parser to run backend specific code (Iain Lane)
* Add an Ubuntu backend to retrieve langpack translations (Iain Lane)
* Open databases with NOTLS (Matthias Klumpp)
* Tweak the issue messages a bit (Matthias Klumpp)
* Complain about stuff in legacy paths (Matthias Klumpp)
* Only search for .desktop files if we have a DESKTOP_APP component (Matthias Klumpp)
* Create new Font class to read font metadata (Matthias Klumpp)
* Render an icon for fonts (Matthias Klumpp)
* Add dependencies on Pango, FreeType and Fontconfig (Matthias Klumpp)
* Determine languages a font supports (Matthias Klumpp)
* Reorganize code for proper namespacing (Matthias Klumpp)
* Render font screenshots (Matthias Klumpp)
* Map font full names to files in a spec-compliant way (Matthias Klumpp)
* Enable fonts support by default (Matthias Klumpp)
* Share ContentsStore between threads again (Matthias Klumpp)
* Make Meson a first-class buildsystem for asgen (Matthias Klumpp)
* Update README (Matthias Klumpp)
Bugfixes:
* Fix build on non-64-bit architectures (Matthias Klumpp)
* Work around LDC bug (Matthias Klumpp)
* fclose() the memstream when we are done with it (Iain Lane)
* debpkgindex: Be less noisy about translations in debug mode (Iain Lane)
* Use getTestSamplesDir (Iain Lane)
* Retry on all curl errors, not just timeouts (Iain Lane)
* Synchronise downloading of files (Iain Lane)
* ubuntu: Don't reference all packages, just the ones we need (langpacks) (Iain Lane)
* Use an ugly mutex to work around Fontconfig issues (Matthias Klumpp)
* Make FC mutex a bit more fine-grained (Matthias Klumpp)
Version 0.5.0
~~~~~~~~~~~~~~
Released: 2016-08-30
Features:
* Add more speed and style optimizations, make Package an abstract class (Matthias Klumpp)
* Use a string appender instead of a string array for writing output (Matthias Klumpp)
* debian: Support downloading files from a mirror, instead of having them local (Iain Lane)
* debian: Support DDTP translations (Iain Lane)
* Ignore some more useless categories (Matthias Klumpp)
* Add skeleton for RPMMD (Matthias Klumpp)
* Add a few optimizations using immutable and appender (Matthias Klumpp)
* Do not spawn compressors anymore, use libarchive directly (Matthias Klumpp)
* Make compiling with LDC easier (Matthias Klumpp)
* Add example for cruft collection script (Matthias Klumpp)
* Allow cleaning up statistical data retroactively (Matthias Klumpp)
* Rehash hash tables that we query often (Matthias Klumpp)
* Always optimize debug builds (Matthias Klumpp)
* Make a splitbuild with Meson and Ninja possible (Matthias Klumpp)
* Use AppStream's knowledge about TLDs to build smarter global-component-ids (Matthias Klumpp)
* Allow specifying the format version metadata should be built for (Matthias Klumpp)
* Adjust for AppStream 0.10 release (Matthias Klumpp)
* Perform legal checks before allowing metadata to be added to the pool (Matthias Klumpp)
Bugfixes:
* Fix dataUseJSTime in section overview template (Blake Kostner)
* debian: Only retrieve DDTP translations from the section we're looking at (Iain Lane)
* Fix deprecation warnings from LDC (Matthias Klumpp)
* Work around some weird JSON parser quirk (int incompatible with uint) (Matthias Klumpp)
* Prevent creating excess statistic entries (Matthias Klumpp)
* Fix potential crash (Matthias Klumpp)
* Use native generator when not compiling with GDC (Matthias Klumpp)
* Work correctly if CIDs omit the .desktop suffix (Matthias Klumpp)
* Only add valid category names to output (Matthias Klumpp)
* Don't emit description-from-package multiple times per package. (Matthias Klumpp)
Version 0.4.0
~~~~~~~~~~~~~~
Released: 2016-07-12
Features:
* README: Add link to D tour
* Run optipng with standard settings
* Add command to forget extracted data for a package
* Implement immutable suites
* Use appender more often and apply some style fixes
* Build with parallel by default when using Makefile
* Drop some deprecated stuff
Bugfixes:
* Display an error when processing a suite without section or arch
* debian: Fix exception message if directory does not exist
* Code improvements: More pure, more safe, more trusted
* Drop global data validation result box
* Don't crash if media pool directory does not exist and immutable suites are used
Version 0.3.0
~~~~~~~~~~~~~~
Released: 2016-05-24
Features:
* Register new backend for Arch Linux (Matthias Klumpp)
* arch: Add reader for lists index file and skeleton for PackageIndex (Matthias Klumpp)
* Make generic archive class work well with non-Debian packages (Matthias Klumpp)
* Add HTML anchors for maintainers on report pages (Matthias Klumpp)
* html: Show suite name in section overview (Matthias Klumpp)
* Allow not setting a MediaBaseUrl (Matthias Klumpp)
* Add some font rendering experiments (Matthias Klumpp)
* Allow storing multiple statitics entries per point in time (Matthias Klumpp)
* Make icon tarball build reproducible (Matthias Klumpp)
* Make ArchiveDecompressor API more powerful and always return const(ubyte)[] (Matthias Klumpp)
* arch: Speed up backend by loading all data in one go (Matthias Klumpp)
* Split "handleScreenshots" into more useful, fine-grained flags (Matthias Klumpp)
* Add timestamp to output and only touch it if something has changed (Matthias Klumpp)
* Only update metadata if the indices have been changed (Matthias Klumpp)
* Store media in pool subdirectory (Matthias Klumpp)
* Add flag to enforce metadata processing, even if nothing changed (Matthias Klumpp)
* Allow disabling metadata timestamps (Matthias Klumpp)
* Improve scan-skipping code (Matthias Klumpp)
Bugfixes:
* Fix build on non-64bit arches (Matthias Klumpp)
* Handle compressed empty files correctly (Neil Mayhew)
* Drop other, non-UTF-8 encodings from language codes too (Matthias Klumpp)
* Drop non-printable characters from .desktop file values (Matthias Klumpp)
* Loop over more things by-reference to reduce RAM usage (Matthias Klumpp)
* debian: Read Packages.xz files if no .gz file is available (Matthias Klumpp)
* Don't lie about thumbnail sizes in their filename (Matthias Klumpp)
* Don't duplicate architecture tag if there are multiple issues (Matthias Klumpp)
* Catch data serialization errors (Matthias Klumpp)
* Run bower with allow root to be able to make js as root (Harald Sitter)
Version 0.2.0
~~~~~~~~~~~~~~
Released: 2016-04-24
Features:
* Don't ship minified JS
* Get rid of (almost) all the embedded JS copies, use Bower
* Add makefile for convenience
* Use Flot for drawing graphs
* Update README
* Document all asgen-config settings
* Reserve subdb in contents database to cache icon data
* Make IconHandler use a pre-filtered list of icons
* Allow templates to override only parts of the default branding
* Add some default branding for Debian
* Show logo on generated HTML pages
* debian: Link some interesting resources from the main page
Bugfixes:
* Find aliased icons correctly
* Keep priority sorting of themes
* Make the hicolor theme always-available, using an embedded index copy if necessary
* Fix counting of issues
* Do not accidentally upscale screenshots while creating thumbnails
* debian: Don't make a missing package index fatal
* Don't fail if we are trying to add statistics too quickly
* Rename remove-valid to reflect what it actually does
* Ignore errors if we are trying to decompress a 0-byte gzip file
* Suite arguments aren't optional for process/remove-found
* Demote screenshot-no-thumbnails to info
Version 0.1.0
~~~~~~~~~~~~~~
Released: 2016-04-18
Notes:
* Initial release
appstream-generator-0.10.1/README.md 0000664 0000000 0000000 00000007625 15067544756 0017065 0 ustar 00root root 0000000 0000000 # AppStream Generator
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/backends/interfaces.h) 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
This project requires a C++23-capable compiler, GCC >= 14 or Clang >= 18 is recommended.
The following libraries and tools are required to build the generator:
* Meson (>= 1.0) [1]
* AppStream [2]
* libarchive (>= 3.2) [3]
* LMDB [4]
* Curl
* Cairo
* GdkPixbuf 2.0
* RSvg 2.0
* FreeType
* Fontconfig
* Pango
* Inja [5]
* Catch2 [6]
* oneAPI TBB [7]
* NPM (optional) [8]
[1]: http://mesonbuild.com/
[2]: https://github.com/ximion/appstream
[3]: https://libarchive.org/
[4]: https://symas.com/lmdb/
[5]: https://github.com/pantor/inja
[6]: https://github.com/catchorg/Catch2
[7]: https://uxlfoundation.github.io/oneTBB/
[8]: https://github.com/npm/cli
On Debian and derivatives of it, all build requirements can be installed using the following command:
```ShellSession
sudo apt install meson g++ \
libappstream-dev libappstream-compose-dev libsoup2.4-dev libarchive-dev \
libgdk-pixbuf2.0-dev librsvg2-dev libcairo2-dev libfreetype-dev libfontconfig1-dev \
libpango1.0-dev liblmdb-dev libtbb-dev libcatch2-dev \
npm
```
### 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! Using C++23 features is encouraged, if sensible.
Make sure your code compiles in maintainer mode, and format your changes to adhere to the project's coding style.
To help with the latter we provide the `autoformat.py` helper script to format code via *clang-format*.
appstream-generator-0.10.1/RELEASE 0000664 0000000 0000000 00000002007 15067544756 0016576 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.10.0.. | grep -i -v trivial | grep -v Merge > NEWS.new
--------------------------------------------------------------------------------
Version 0.10.1
~~~~~~~~~~~~~~
Released: 2025-xx-xx
Notes:
Features:
Bugfixes:
Miscellaneous:
Contributors:
--------------------------------------------------------------------------------
2. Commit changes in Git:
git commit -a -m "Release version 0.10.1"
git tag -s -f -m "Release 0.10.1" v0.10.1
git push --tags
git push
3. Do post release version bump in meson.build, RELEASE
4. Commit trivial changes:
git commit -a -m "trivial: post release version bump"
git push
5. Send an email to appstream@lists.freedesktop.org
=================================================
AppStream Generator 0.10.1 released!
Tarballs available here: https://github.com/ximion/appstream-generator/releases
=================================================
appstream-generator-0.10.1/TODO 0000664 0000000 0000000 00000000437 15067544756 0016270 0 ustar 00root root 0000000 0000000 = AppStream Generator TODO List =
=== Known issues ===
* No persistent problems at time :-)
=== Planned Features ===
* Use feature from the upcoming libappstream-compose
=== Whishlist / Random Ideas ===
* Add an icon-cache so we don't render SVG icons in themes multiple times.
appstream-generator-0.10.1/autoformat.py 0000775 0000000 0000000 00000007504 15067544756 0020340 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python3
#
# Copyright (C) 2015-2022 Matthias Klumpp
#
# SPDX-License-Identifier: LGPL-2.1+
#
# Format all AppStream source code in-place.
#
import os
import sys
import shutil
import fnmatch
import subprocess
import tempfile
from glob import glob
INCLUDE_LOCATIONS = [
'autoformat.py',
'src',
'tests',
]
EXCLUDE_MATCH = []
EXTRA_STYLE_RULES_FOR = []
def format_cpp_sources(sources, style_fname=None, extra_styles: list[str] = None):
"""Format C/C++ sources with clang-format."""
if not sources:
return
command = ['clang-format', '-i']
if extra_styles:
style_rules = []
if style_fname:
with open(style_fname, 'r') as f:
style_rules = [l.strip() for l in f.readlines()]
with tempfile.NamedTemporaryFile(mode='w') as fp:
style_rules.extend(extra_styles)
fp.write('\n'.join(style_rules))
fp.flush()
command.append('--style=file:{}'.format(fp.name))
command.extend(sources)
subprocess.run(command, check=True)
return
if style_fname:
command.append('--style=file:{}'.format(style_fname))
command.extend(sources)
subprocess.run(command, check=True)
def format_python_sources(sources):
"""Format Python sources with Black."""
command = [
'black',
'-S', # no string normalization
'-l',
'100', # line length
'-t',
'py311', # minimum Python target
]
command.extend(sources)
subprocess.run(command, check=True)
def run(current_dir, args):
# check for tools
if not shutil.which('clang-format'):
print(
'The `clang-format` formatter is not installed. Please install it to continue!',
file=sys.stderr,
)
return 1
if not shutil.which('black'):
print(
'The `black` formatter is not installed. Please install it to continue!',
file=sys.stderr,
)
return 1
# if no include directories are explicitly specified, we read all locations
if not INCLUDE_LOCATIONS:
INCLUDE_LOCATIONS.append('.')
# collect sources
cpp_sources = []
cpp_style_matches = [[]] * len(EXTRA_STYLE_RULES_FOR)
py_sources = []
for il_path_base in INCLUDE_LOCATIONS:
il_path = os.path.join(current_dir, il_path_base)
if os.path.isfile(il_path):
candidates = [il_path]
else:
candidates = glob(il_path + '/**/*', recursive=True)
for filename in candidates:
skip = False
for exclude in EXCLUDE_MATCH:
if fnmatch.fnmatch(filename, exclude):
skip = True
break
if skip:
continue
if filename.endswith(('.c', '.cpp', '.h', '.hpp')):
cpp_sources.append(filename)
for i, er in enumerate(EXTRA_STYLE_RULES_FOR):
for pattern in er[1]:
if fnmatch.fnmatch(filename, pattern):
cpp_style_matches[i].append(filename)
break
elif filename.endswith('.py'):
py_sources.append(filename)
# format
format_python_sources(py_sources)
format_cpp_sources(cpp_sources)
for i, er in enumerate(EXTRA_STYLE_RULES_FOR):
format_cpp_sources(
cpp_style_matches[i],
os.path.join(current_dir, '.clang-format'),
er[0],
)
return 0
if __name__ == '__main__':
thisfile = __file__
if not os.path.isabs(thisfile):
thisfile = os.path.normpath(os.path.join(os.getcwd(), thisfile))
thisdir = os.path.normpath(os.path.join(os.path.dirname(thisfile)))
os.chdir(thisdir)
sys.exit(run(thisdir, sys.argv[1:]))
appstream-generator-0.10.1/contrib/ 0000775 0000000 0000000 00000000000 15067544756 0017234 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/contrib/cleanup-cruft.sh.example 0000664 0000000 0000000 00000001351 15067544756 0023772 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# Script cleaning up the AppStream metadata pool and cache.
# This script should be run by a cronjob (e.g. every week).
#
set -e
set -o pipefail
set -u
WORKSPACE_DIR="/srv/appstream/workspace"
# only run one instance of the script
LOCKFILE="$WORKSPACE_DIR/.lock"
cleanup() {
rm -f "$LOCKFILE"
}
if ! lockfile -r8 $LOCKFILE; then
echo "aborting AppStream metadata cleanup because $LOCKFILE has already been locked"
exit 0
fi
trap cleanup 0
# Start logging
logdir="$WORKSPACE_DIR/logs/`date "+%Y/%m"`"
mkdir -p $logdir
NOW=`date "+%d_%H%M"`
LOGFILE="$logdir/${NOW}_cleanup.log"
exec >> "$LOGFILE" 2>&1
cd $WORKSPACE_DIR
# Cleanup superseded data
appstream-generator cleanup
# finish logging
exec > /dev/null 2>&1
appstream-generator-0.10.1/contrib/setup/ 0000775 0000000 0000000 00000000000 15067544756 0020374 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/contrib/setup/.gitignore 0000664 0000000 0000000 00000000016 15067544756 0022361 0 ustar 00root root 0000000 0000000 node_modules/
appstream-generator-0.10.1/contrib/setup/build_js.sh 0000775 0000000 0000000 00000001170 15067544756 0022525 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
if [ -n "$MESON_SOURCE_ROOT" ]; then
cd "$MESON_SOURCE_ROOT/contrib/setup/"
fi
NPM="npm"
if [ ! -z "$1" ]
then
NPM=$1
fi
$NPM ci --ignore-scripts
JS_TARGET=../../data/templates/default/static/js
[ ! -d "$JS_TARGET" ] && mkdir $JS_TARGET
[ ! -d "$JS_TARGET/jquery" ] && mkdir $JS_TARGET/jquery
install node_modules/jquery/dist/*.min.js -t $JS_TARGET/jquery
[ ! -d "$JS_TARGET/flot" ] && mkdir $JS_TARGET/flot
install node_modules/jquery-flot/jquery.flot*.js -t $JS_TARGET/flot
[ ! -d "$JS_TARGET/highlight" ] && mkdir $JS_TARGET/highlight
install node_modules/highlightjs/*.js -t $JS_TARGET/highlight
appstream-generator-0.10.1/contrib/setup/meson-install-templates.sh 0000775 0000000 0000000 00000000410 15067544756 0025507 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
cd "$MESON_SOURCE_ROOT"
echo "Installing templates..."
install -d "${DESTDIR}/${MESON_INSTALL_PREFIX}/share/appstream/templates"
cp -dpru --no-preserve=ownership data/templates/* -t "${DESTDIR}/${MESON_INSTALL_PREFIX}/share/appstream/templates"
appstream-generator-0.10.1/contrib/setup/package-lock.json 0000664 0000000 0000000 00000002276 15067544756 0023617 0 ustar 00root root 0000000 0000000 {
"name": "setup",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"highlightjs": "^9.10.0",
"jquery": "^3.3.1",
"jquery-flot": "^0.8.3"
}
},
"node_modules/highlightjs": {
"version": "9.16.2",
"resolved": "https://registry.npmjs.org/highlightjs/-/highlightjs-9.16.2.tgz",
"integrity": "sha512-FK1vmMj8BbEipEy8DLIvp71t5UsC7n2D6En/UfM/91PCwmOpj6f2iu0Y0coRC62KSRHHC+dquM2xMULV/X7NFg==",
"deprecated": "Use the 'highlight.js' package instead https://npm.im/highlight.js",
"license": "BSD-3-Clause"
},
"node_modules/jquery": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
"license": "MIT"
},
"node_modules/jquery-flot": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/jquery-flot/-/jquery-flot-0.8.3.tgz",
"integrity": "sha512-IkQCsA5t55Aubu8iove/X/KL34rdZTsDyx/bylC7F320N2bwsJhJe3Np8orsx1L8FEOoMDfNe3/pSb3xXKLxeQ==",
"deprecated": "flot has been abandoned"
}
}
}
appstream-generator-0.10.1/contrib/setup/package.json 0000664 0000000 0000000 00000000176 15067544756 0022666 0 ustar 00root root 0000000 0000000 {
"flat": true,
"dependencies": {
"highlightjs": "^9.10.0",
"jquery": "^3.3.1",
"jquery-flot": "^0.8.3"
}
}
appstream-generator-0.10.1/contrib/subprojects/ 0000775 0000000 0000000 00000000000 15067544756 0021577 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/contrib/subprojects/.gitignore 0000664 0000000 0000000 00000000056 15067544756 0023570 0 ustar 00root root 0000000 0000000 inja/
packagecache/
backward-cpp-*/
.wraplock
appstream-generator-0.10.1/contrib/subprojects/backward-cpp.wrap 0000664 0000000 0000000 00000001241 15067544756 0025026 0 ustar 00root root 0000000 0000000 [wrap-file]
directory = backward-cpp-1.6
source_url = https://github.com/bombela/backward-cpp/archive/refs/tags/v1.6.tar.gz
source_filename = backward-cpp-1.6.tar.gz
source_hash = c654d0923d43f1cea23d086729673498e4741fb2457e806cfaeaea7b20c97c10
patch_filename = backward-cpp_1.6-6_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/backward-cpp_1.6-6/get_patch
patch_hash = 2c952611584971cdcb04b5c4aeca3401f1fba9544e6203e08b933fd9c21427fc
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/backward-cpp_1.6-6/backward-cpp-1.6.tar.gz
wrapdb_version = 1.6-6
[provide]
backward-cpp = backward_dep
backward-cpp-interface = backward_interface_dep
appstream-generator-0.10.1/contrib/subprojects/inja.wrap 0000664 0000000 0000000 00000000127 15067544756 0023413 0 ustar 00root root 0000000 0000000 [wrap-git]
directory = inja
url = https://github.com/pantor/inja.git
revision = v3.4.0
appstream-generator-0.10.1/contrib/subprojects/nlohmann_json.wrap 0000664 0000000 0000000 00000000735 15067544756 0025342 0 ustar 00root root 0000000 0000000 [wrap-file]
directory = nlohmann_json-3.12.0
lead_directory_missing = true
source_url = https://github.com/nlohmann/json/releases/download/v3.12.0/include.zip
source_filename = nlohmann_json-3.12.0.zip
source_hash = b8cb0ef2dd7f57f18933997c9934bb1fa962594f701cd5a8d3c2c80541559372
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/nlohmann_json_3.12.0-1/nlohmann_json-3.12.0.zip
wrapdb_version = 3.12.0-1
[provide]
nlohmann_json = nlohmann_json_dep
appstream-generator-0.10.1/contrib/update-metadata.sh.example 0000664 0000000 0000000 00000001715 15067544756 0024266 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# Example script for updating AppStream metadata using appstream-generator.
# This script can easily be run by a cronjob.
#
set -e
set -o pipefail
set -u
SUITES="sid stretch"
WORKSPACE_DIR="/srv/appstream/workspace"
PUBLIC_DIR="/srv/appstream/public"
# only run one instance of the script
LOCKFILE="$WORKSPACE_DIR/.lock"
cleanup() {
rm -f "$LOCKFILE"
}
if ! lockfile -r8 $LOCKFILE; then
echo "aborting AppStream metadata extraction because $LOCKFILE has already been locked"
exit 0
fi
trap cleanup 0
# Start logging
logdir="$WORKSPACE_DIR/logs/`date "+%Y/%m"`"
mkdir -p $logdir
NOW=`date "+%d_%H%M"`
LOGFILE="$logdir/${NOW}.log"
exec >> "$LOGFILE" 2>&1
cd $WORKSPACE_DIR
# generate fresh metadata
for suite in $SUITES; do
appstream-generator process $suite
done
# Sync updated data to public directory
rsync -ak --delete-after --link-dest="$PUBLIC_DIR/" "$WORKSPACE_DIR/export/" "$PUBLIC_DIR/"
# finish logging
exec > /dev/null 2>&1
appstream-generator-0.10.1/data/ 0000775 0000000 0000000 00000000000 15067544756 0016505 5 ustar 00root root 0000000 0000000 appstream-generator-0.10.1/data/.gitignore 0000664 0000000 0000000 00000000155 15067544756 0020476 0 ustar 00root root 0000000 0000000 templates/default/static/js/jquery/
templates/default/static/js/flot/
templates/default/static/js/highlight/
appstream-generator-0.10.1/data/asgen-hints.json 0000664 0000000 0000000 00000015355 15067544756 0021631 0 ustar 00root root 0000000 0000000 {
"internal-error": {
"text": [ "A fatal problem appeared in the generator.",
"Please report a bug: {{msg}}"],
"severity": "error"
},
"internal-unknown-tag": {
"text": ["The generator emitted a tag '{{tag}}' which is unknown. This is a bug in the metadata generator, please",
"file a bugreport."],
"severity": "warning"
},
"icon-format-unsupported": {
"text": "Icon file '{{icon_fname}}' uses an unsupported image file format.",
"severity": "error"
},
"icon-not-found": {
"text": [ "The icon '{{icon_fname}}' was not found in the archive. This issue can have multiple reasons:",
"
",
"
The icon is not present in the archive.
",
"
The icon is in a wrong directory.
",
"
The icon is not available in a suitable size (at least 64x64px)
",
"
On Debian and Ubuntu, the icon is a symlink. The generator cannot read symlinks on these distributions - make the icon a real file.
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.
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.
More information
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/.
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.
More information
The offical AppStream specification can be found at freedesktop.org.
You can find the source-code of the AppStream Generator here.