diff --git a/NEWS b/NEWS
index 4accbd8..1ec7b64 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,78 @@
+Version 1.0.5
+~~~~~~~~~~~~~
+Released: 2025-04-24
+
+Features:
+ * qt: Expose markup conversion utils
+ * desktop-styles: Add android and iOS
+ * validator: Check for xml:lang="en" being used on description template elements
+ * validator: Flag cases of raw text in "description" elements
+ * metadata: Add more known extensions into as_metadata_file_guess_style()
+
+Specification:
+ * docs: Clarify that the style segment of a screenshot environment is optional
+ * docs: Explain consequences of defining an icon for desktop-app metainfo
+ * docs: Clarify that description content must be in p/li elements
+
+Bugfixes:
+ * validator: mark as_validator_issue_tag_list static
+ * docs: Add workaround for gi-docgen misnaming devhelp files
+ * compose: Do not permit SVG images as screenshots
+ * compose: Don't "forget" to scan remaining paths when re-encountering a dir
+ * pool: Try explicit singular term match if we only have low-quality tokens
+ * utils: Provide compatibility with Fedora icon tarballs when installing them
+ * utils: Remove leftover g_chmod()
+ * zstd-decompressor: Pass output/written data when decompression finished
+ * utils: Expect a dash in icons file name
+ * utils: Recognize .yml* and .yaml* file extension variants, and .zst extension
+ * utils: Rename the appstream file when re-saving it on install
+
+Contributors:
+ Alyssa Ross, Ismael Asensio, Kolja, Matthias Klumpp, Milan Crha
+
+Version 1.0.4
+~~~~~~~~~~~~~
+Released: 2024-12-08
+
+Features:
+ * bundle: Add AS_BUNDLE_KIND_SYSUPDATE
+ * desktop-style-ids: Add dark support for Plasma
+ * desktop-style-ids: add pantheon:dark
+ * qt: Expose branding color
+ * sysinfo: Add memory size detection support for Illumos and Solaris
+ * sysinfo: Add memory size detection support for GNU/Hurd
+ * validator: Don't fail validation if a snapshot release is missing a time
+
+Specification:
+ * docs: Note that support for some legacy path was dropped in 1.0
+ * docs: Update fd.o spec URLs
+ * docs: Better explain desktop applications
+ * Update ESRA website URL
+
+Bugfixes:
+ * validator: Make sure we read an initialised variable
+ * qt: Specify utc as the dates' timezone
+ * tests: Ignore some tests on Windows
+ * sysinfo: make uname() usage POSIX compliant
+ * Only emit legacy compat tag developer_name for catalog data
+ * compose: Allow file discovery even in symlinked directories
+ * Avoid a race condition when loading GResource data
+ * validator: Mention length limit in summary length warning message
+ * utils: Explicitly set permissions on installed metadata files
+ * as-vercmp: Fix gtkdoc to not start with '>'
+
+Miscellaneous:
+ * desktop-style-ids: Remove Endless
+ * ci: Fix FreeBSD build (update `py-gi-docgen`)
+ * ci: Update to Ubuntu 24.04 for Debian Testing builds
+ * utils: Assume 64px as size when installing an icon tarball of unknown size
+
+Contributors:
+ Adrien Plazas, Airat Makhmutov, Aleix Pol, Carl Schwan,
+ Cassidy James Blaede, Danielle Foré, Elliott Sales de Andrade,
+ James Addison, Marcel Telka, Matthias Klumpp, Roke Julian Lockhart,
+ Pino Toscano, sid
+
Version 1.0.3
~~~~~~~~~~~~~~
Released: 2024-04-24
diff --git a/README.md b/README.md
index 5af1945..dcb7d83 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,7 @@ To help with the latter we provide the `autoformat.py` helper script to format c
* libyaml
* libcurl (>= 7.62)
* libxmlb (>= 0.3.6)
+ * xsltproc & docbook-style-xsl
Optional:
* Vala Compiler (vapigen) (for Vala VAPI file)
diff --git a/RELEASE b/RELEASE
index 2123ca7..cb0cdab 100644
--- a/RELEASE
+++ b/RELEASE
@@ -2,15 +2,15 @@ AppStream Release Notes
1. Set variables
-OLD_VERSION="1.0.2"
-NEW_VERSION="1.0.3"
+OLD_VERSION="1.0.4"
+NEW_VERSION="1.0.5"
2. Write NEWS entries for AppStream in the same format as usual.
git shortlog v$OLD_VERSION.. | grep -i -v -E '^\s*(trivial:|l10n:)' | grep -v Merge > NEWS.new
--------------------------------------------------------------------------------
-Version 1.0.3
+Version 1.0.5
~~~~~~~~~~~~~~
Released: 2024-xx-xx
@@ -53,7 +53,7 @@ git push
10. Send an email to appstream@lists.freedesktop.org
=================================================
-AppStream 1.0.3 released!
+AppStream 1.0.5 released!
Tarballs available here: https://www.freedesktop.org/software/appstream/releases/
diff --git a/compose/asc-compose.c b/compose/asc-compose.c
index 0b746ad..cd04ada 100644
--- a/compose/asc-compose.c
+++ b/compose/asc-compose.c
@@ -1621,7 +1621,7 @@ asc_compose_process_task_cb (AscComposeTask *ctask, AscCompose *compose)
} /* end launch entry loop */
}
} /* end of desktop-entry support */
- } /* end of metadata parsing loop */
+ } /* end of metadata parsing loop */
/* process the remaining .desktop files */
if (as_flags_contains (priv->flags, ASC_COMPOSE_FLAG_PROCESS_UNPAIRED_DESKTOP)) {
@@ -2182,10 +2182,11 @@ asc_compose_run (AscCompose *compose, GCancellable *cancellable, GError **error)
if (as_flags_contains (priv->flags, ASC_COMPOSE_FLAG_NO_PARTIAL_URLS) &&
priv->media_baseurl == NULL) {
- g_set_error_literal (error,
- ASC_COMPOSE_ERROR,
- ASC_COMPOSE_ERROR_FAILED,
- _("Partial URLs are not allowed, but no base URL is set to create full URLs."));
+ g_set_error_literal (
+ error,
+ ASC_COMPOSE_ERROR,
+ ASC_COMPOSE_ERROR_FAILED,
+ _("Partial URLs are not allowed, but no base URL is set to create full URLs."));
return NULL;
}
@@ -2232,9 +2233,6 @@ asc_compose_run (AscCompose *compose, GCancellable *cancellable, GError **error)
temp_dir_created = TRUE;
}
- /* sanity check to ensure resources can be loaded */
- as_utils_ensure_resources ();
-
tasks = g_ptr_array_new_with_free_func ((GDestroyNotify) asc_compose_task_free);
for (guint i = 0; i < priv->units->len; i++) {
diff --git a/compose/asc-directory-unit.c b/compose/asc-directory-unit.c
index 80698e8..5c60781 100644
--- a/compose/asc-directory-unit.c
+++ b/compose/asc-directory-unit.c
@@ -81,11 +81,12 @@ asc_directory_unit_class_init (AscDirectoryUnitClass *klass)
}
static gboolean
-asc_directory_unit_find_files_recursive (GPtrArray *files,
- const gchar *path_orig,
- guint path_orig_len,
- const gchar *path,
- GError **error)
+asc_directory_unit_find_files_recursive_internal (GPtrArray *files,
+ const gchar *path_orig,
+ guint path_orig_len,
+ const gchar *path,
+ GHashTable *visited_dirs,
+ GError **error)
{
const gchar *tmp;
g_autoptr(GDir) dir = NULL;
@@ -104,14 +105,38 @@ asc_directory_unit_find_files_recursive (GPtrArray *files,
g_autofree gchar *path_new = NULL;
path_new = g_build_filename (path, tmp, NULL);
- /* search recursively, don't follow symlinks */
- if (g_file_test (path_new, G_FILE_TEST_IS_DIR) &&
- !g_file_test (path_new, G_FILE_TEST_IS_SYMLINK)) {
- if (!asc_directory_unit_find_files_recursive (files,
- path_orig,
- path_orig_len,
- path_new,
- error))
+ /* search recursively */
+ if (g_file_test (path_new, G_FILE_TEST_IS_DIR)) {
+ if (g_file_test (path_new, G_FILE_TEST_IS_SYMLINK)) {
+ g_autofree gchar *real_path = realpath (path_new, NULL);
+
+ if (!real_path) {
+ /* error if realpath fails (like memory allocation error or invalid path) */
+ g_set_error (error,
+ G_FILE_ERROR,
+ g_file_error_from_errno (errno),
+ "Failed to resolve real path");
+ return FALSE;
+ }
+
+ /* don't visit paths twice to avoid loops */
+ if (g_hash_table_contains (visited_dirs, real_path))
+ continue;
+
+ g_hash_table_add (visited_dirs, g_steal_pointer (&real_path));
+ } else {
+ if (g_hash_table_contains (visited_dirs, path_new))
+ continue;
+
+ g_hash_table_add (visited_dirs, g_strdup (path_new));
+ }
+
+ if (!asc_directory_unit_find_files_recursive_internal (files,
+ path_orig,
+ path_orig_len,
+ path_new,
+ visited_dirs,
+ error))
return FALSE;
} else {
g_ptr_array_add (files, g_strdup (path_new + path_orig_len));
@@ -121,6 +146,27 @@ asc_directory_unit_find_files_recursive (GPtrArray *files,
return TRUE;
}
+static gboolean
+asc_directory_unit_find_files_recursive (GPtrArray *files,
+ const gchar *path_orig,
+ guint path_orig_len,
+ const gchar *path,
+ GError **error)
+{
+ g_autoptr(GHashTable) visited_dirs = NULL;
+ g_autofree gchar *absolute_lookup_path = NULL;
+ visited_dirs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+ absolute_lookup_path = g_build_filename (path_orig, path, NULL);
+ g_debug ("Indexing location: %s\n", absolute_lookup_path);
+ return asc_directory_unit_find_files_recursive_internal (files,
+ path_orig,
+ path_orig_len,
+ path,
+ visited_dirs,
+ error);
+}
+
static gboolean
asc_directory_unit_open (AscUnit *unit, GError **error)
{
diff --git a/compose/asc-globals.c b/compose/asc-globals.c
index a77f394..4a8dcb2 100644
--- a/compose/asc-globals.c
+++ b/compose/asc-globals.c
@@ -57,6 +57,24 @@ G_DEFINE_TYPE_WITH_PRIVATE (AscGlobals, asc_globals, G_TYPE_OBJECT)
static AscGlobals *g_globals = NULL;
static GMutex g_globals_mutex;
+/**
+ * asc_get_resource_safe:
+ *
+ * A threadsafe variant to obtain the buit-in #GResource.
+ */
+static GResource *
+asc_get_resource_safe (void)
+{
+ static GResource *resource = NULL;
+
+ if (g_once_init_enter (&resource)) {
+ GResource *res = asc_get_resource ();
+ g_once_init_leave (&resource, res);
+ }
+
+ return resource;
+}
+
/**
* asc_compose_error_quark:
*
@@ -306,7 +324,7 @@ asc_globals_get_pangrams_for (const gchar *lang)
return priv->pangrams_en;
/* load array from resources */
- data = g_resource_lookup_data (asc_get_resource (),
+ data = g_resource_lookup_data (asc_get_resource_safe (),
"/org/freedesktop/appstream-compose/pangrams/en.txt",
G_RESOURCE_LOOKUP_FLAGS_NONE,
NULL);
diff --git a/compose/asc-hint-tags.c b/compose/asc-hint-tags.c
index cf91318..385f15c 100644
--- a/compose/asc-hint-tags.c
+++ b/compose/asc-hint-tags.c
@@ -59,7 +59,7 @@ AscHintTagStatic asc_hint_tag_list[] = {
{ "ancient-metadata",
AS_ISSUE_SEVERITY_WARNING,
"The AppStream metadata should be updated to follow a more recent version of the specification.
"
- "Please consult the XML quickstart guide for "
+ "Please consult the MetaInfo quickstart guides for "
"more information."
},
@@ -83,7 +83,7 @@ AscHintTagStatic asc_hint_tag_list[] = {
AS_ISSUE_SEVERITY_ERROR,
"Component does not contain a short summary. Ensure that the components MetaInfo file has a summary tag, or that its .desktop file "
"has a Comment= field set.
"
- "More information can be found in the Desktop Entry specification "
+ "More information can be found in the Desktop Entry specification "
"and the MetaInfo specification."
},
@@ -128,14 +128,14 @@ AscHintTagStatic asc_hint_tag_list[] = {
AS_ISSUE_SEVERITY_WARNING,
"The desktop-entry file `{{location}}` has the 'Hidden' property set. This is wrong for vendor-installed .desktop files, and "
"nullifies all effects this .desktop file has (including MIME associations), which most certainly is not intentional. "
- "See the specification for details."
+ "See the specification for details."
},
{ "desktop-entry-empty-onlyshowin",
AS_ISSUE_SEVERITY_WARNING,
"The desktop-entry file `{{location}}` has the 'OnlyShowIn' property set with an empty value. This might not be intended, as this will hide "
"the application from all desktops. If you do want to hide the application from all desktops, using 'NoDisplay=true' is more explicit. "
- "See the specification for details."
+ "See the specification for details."
},
{ "missing-launchable-desktop-file",
@@ -193,6 +193,11 @@ AscHintTagStatic asc_hint_tag_list[] = {
"This might be a temporary server issue, or the screenshot is no longer available."
},
+ { "screenshot-image-is-svg",
+ AS_ISSUE_SEVERITY_WARNING,
+ "The screenshot image at '{{url}}' is a vector graphic. Vector graphics are not allowed as screenshot images."
+ },
+
{ "screenshot-save-error",
AS_ISSUE_SEVERITY_WARNING,
"Unable to store screenshot for '{{url}}': {{error}}"
@@ -289,14 +294,14 @@ AscHintTagStatic asc_hint_tag_list[] = {
{ "no-metainfo",
AS_ISSUE_SEVERITY_WARNING,
- "This software component is missing a MetaInfo file "
+ "This software component is missing a MetaInfo file "
"as metadata source.
"
"To synthesize suitable metadata anyway, we took some data from its desktop-entry file.
"
"This has many disadvantages, like low-quality and incomplete metadata. Therefore clients may ignore this component entirely due to poor metadata.
"
"Additionally, a lot of software from desktop-entry files should either not be installable and searchable via the software catalog "
"(like desktop-specific settings applications) or be tagged accordingly via MetaInfo files.
"
"Please consider to either hide this .desktop file from AppStream by adding a X-AppStream-Ignore=true field to it, or to write a MetaInfo file for this component.
"
- "You can consult the MetaInfo quickstart guides for more information "
+ "You can consult the MetaInfo quickstart guides for more information "
"on how to write a MetaInfo file, or file a bug with the upstream author of this software component."
},
diff --git a/compose/asc-hint-tags.h b/compose/asc-hint-tags.h
index a403579..ccd0380 100644
--- a/compose/asc-hint-tags.h
+++ b/compose/asc-hint-tags.h
@@ -46,5 +46,5 @@ typedef struct {
extern AscHintTagStatic asc_hint_tag_list[];
-#pragma GCC visibility pop
+#pragma GCC visibility pop
G_END_DECLS
diff --git a/compose/asc-utils-fonts.c b/compose/asc-utils-fonts.c
index d506d17..307ce60 100644
--- a/compose/asc-utils-fonts.c
+++ b/compose/asc-utils-fonts.c
@@ -37,9 +37,9 @@ struct {
gint width;
gint height;
} font_screenshot_sizes[] = {
- {1024, 78},
- { 640, 48},
- { 0, 0 }
+ { 1024, 78 },
+ { 640, 48 },
+ { 0, 0 }
};
/**
diff --git a/compose/asc-utils-screenshots.c b/compose/asc-utils-screenshots.c
index 569e3b7..ffa4f38 100644
--- a/compose/asc-utils-screenshots.c
+++ b/compose/asc-utils-screenshots.c
@@ -41,11 +41,11 @@ struct {
gint width;
gint height;
} target_screenshot_sizes[] = {
- {1248, 702},
- { 752, 423},
- { 624, 351},
- { 224, 126},
- { 0, 0 }
+ { 1248, 702 },
+ { 752, 423 },
+ { 624, 351 },
+ { 224, 126 },
+ { 0, 0 }
};
static AscVideoInfo *
@@ -449,6 +449,21 @@ asc_process_screenshot_images_lang (AscResult *cres,
if (max_size_bytes == 0)
store_screenshots = FALSE;
+ {
+ AscImageFormat image_format = asc_image_format_from_filename (orig_img_url);
+
+ /* we do not allow vector graphics as screenshots */
+ if (image_format == ASC_IMAGE_FORMAT_SVG || image_format == ASC_IMAGE_FORMAT_SVGZ) {
+ asc_result_add_hint (cres,
+ cpt,
+ "screenshot-image-is-svg",
+ "url",
+ orig_img_url,
+ NULL);
+ return FALSE;
+ }
+ }
+
/* download our image */
img_bytes = as_curl_download_bytes (acurl, orig_img_url, &error);
if (img_bytes == NULL) {
@@ -713,9 +728,9 @@ asc_process_screenshot_images (AscResult *cres,
GHashTableIter ht_iter;
gpointer ht_key, ht_value;
g_autoptr(GHashTable) ht_lang_img = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- g_free,
- g_object_unref);
+ g_str_equal,
+ g_free,
+ g_object_unref);
imgs = as_screenshot_get_images_all (scr);
if (imgs->len == 0) {
diff --git a/data/desktop-style-ids.txt b/data/desktop-style-ids.txt
index 12dc9ca..f0d2ba3 100644
--- a/data/desktop-style-ids.txt
+++ b/data/desktop-style-ids.txt
@@ -1,21 +1,25 @@
# List of recognized GUI environments
# ID Human-readable name
#
-cinnamon Cinnamon
-dde Deepin
-ede EDE
-endless Endless
-gnome GNOME
-gnome:dark GNOME (Dark)
-lxde LXDE
-lxqt LXQt
-macos macOS
-mate Mate
-pantheon Pantheon
-plasma KDE Plasma
-plasma-mobile Plasma Mobile
-razor Razor
-rox Rox
-unity Unity
-windows Microsoft Windows
-xfce Xfce
+android Android
+cinnamon Cinnamon
+dde Deepin
+ede EDE
+gnome GNOME
+gnome:dark GNOME (Dark)
+ios iOS
+lxde LXDE
+lxqt LXQt
+macos macOS
+mate Mate
+pantheon Pantheon
+pantheon:dark Pantheon (Dark)
+plasma KDE Plasma
+plasma-mobile Plasma Mobile
+plasma-mobile:dark Plasma Mobile (Dark)
+plasma:dark KDE Plasma (Dark)
+razor Razor
+rox Rox
+unity Unity
+windows Microsoft Windows
+xfce Xfce
diff --git a/data/iana-filtered-tld-list.txt b/data/iana-filtered-tld-list.txt
index 9452b5b..01c2028 100644
--- a/data/iana-filtered-tld-list.txt
+++ b/data/iana-filtered-tld-list.txt
@@ -1,6 +1,6 @@
# IANA TLDs we recognize for AppStream IDs.
# Derived from the full list at https://data.iana.org/TLD/tlds-alpha-by-domain.txt
-# Last updated on 2024-04-24
+# Last updated on 2024-12-08
aaa
aarp
abb
@@ -541,7 +541,6 @@ sexy
sfr
sg
sh
-shaw
shia
shop
show
diff --git a/data/xdg-category-names.txt b/data/xdg-category-names.txt
index 4309eca..93d2953 100644
--- a/data/xdg-category-names.txt
+++ b/data/xdg-category-names.txt
@@ -19,6 +19,7 @@ Biology
BlocksGame
BoardGame
Building
+COSMIC
Calculator
Calendar
CardGame
diff --git a/debian/appstream.postrm b/debian/appstream.postrm
index 8376aae..0df3b5f 100755
--- a/debian/appstream.postrm
+++ b/debian/appstream.postrm
@@ -5,7 +5,7 @@ set -e
if [ "$1" = "purge" ]; then
# remove the AppStream global cache
rm -rf /var/cache/swcatalog/cache
- rmdir /var/cache/swcatalog/ | true
+ rmdir /var/cache/swcatalog/ || true
# remove the AppStream data fetched via APT
rm -rf /var/lib/swcatalog
diff --git a/debian/changelog b/debian/changelog
index eead9f9..d9183f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,40 @@
+appstream (1.0.5-1deepin1) unstable; urgency=medium
+
+ * Skip building doc package on architectures without compose support (e.g., sw64)
+ * appstream-doc includes appstream-compose API docs which are not generated
+ when ENABLE_COMPOSE=false
+ * Fixes dh_install error: missing files usr/share/gtk-doc/html/appstream-compose
+
+ -- lichenggang