# Generated by Makefile. Do not edit.
+commit 56f879e9564b28886565115ea7528ec13db97759
+Author: Hans Petter Jansson <hpj@cl.no>
+Date: Sat Jun 18 19:46:47 2016 +0200
+
+ Release: 0.23
+
+M NEWS
+
+commit 9de5e8b2c29da6896663979189f758eca03c479b
+Author: Hans Petter Jansson <hpj@cl.no>
+Date: Sat Jun 18 19:01:08 2016 +0200
+
+ validate: Add LXQt to list of registered environments.
+
+ Patch from Jauhien Piatlicki.
+ https://github.com/lxde/lxqt
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=79561
+
+M src/validate.c
+
+commit ccdf65853534b9f116ce6e38b0ad5375cf33820e
+Author: Matthias Clasen <mclasen@redhat.com>
+Date: Thu Dec 18 15:57:30 2014 -0500
+
+ Accept version 1.1
+
+ When the current spec version was updated to 1.1, we forgot
+ to ensure that we actually accept Version=1.1 in desktop files.
+
+M src/validate.c
+
+commit 5e8047d0d7a622dfd19dba0310ad58d8b4e2f16b
+Author: Hans Petter Jansson <hpj@cl.no>
+Date: Fri Jun 17 04:00:04 2016 +0200
+
+ validate: Ensure DBusActivatable filenames conform to reverse-DNS notation.
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=66904
+
+M src/validate.c
+
+commit ec0949091f7a771c852c0314108f9aa4b2a25575
+Author: Hans Petter Jansson <hpj@cl.no>
+Date: Wed May 11 22:41:14 2016 +0200
+
+ mimeutils: Allow multipart/related MIME type.
+
+ It's implemented as an extension of RFC 822 and is used for MHTML.
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=93376
+
+M src/mimeutils.c
+
+commit cddcd6612b66cb3963920b5f2734850a217d7020
+Author: Hans Petter Jansson <hpj@cl.no>
+Date: Mon Feb 29 01:50:14 2016 +0100
+
+ validate: Fix buffer over-read on incomplete escape sequence.
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=94303
+
+M src/validate.c
+
+commit be0c630a19aa1788ef731def911770ce497d6ba3
+Author: David Faure <faure@kde.org>
+Date: Tue Apr 1 22:29:08 2014 +0200
+
+ Add EDE to the list of desktop environments
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=56353
+
+M src/validate.c
+
+commit 848c82b2332d0556c22c10a9c64d1f39850271fe
+Author: Michael Webster <miketwebster@gmail.com>
+Date: Fri Mar 7 20:16:52 2014 -0500
+
+ Add Cinnamon to list of registered environments.
+
+ https://github.com/linuxmint/Cinnamon
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=73497
+
+M src/validate.c
+
+commit 9e279cc3fac9a7e92bf426867fa83c0c7aec5711
+Author: Jerome Leclanche <jerome@leclan.ch>
+Date: Tue Apr 1 15:33:16 2014 +0200
+
+ desktop-file-validate: Trailing semicolons have been downgraded to optional
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=76902
+ Approved by David Faure and Ryan Lortie
+
+M src/validate.c
+
+commit 08e0f4dc785be7d82ffe0aa5252dd6dbca648b3e
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Thu Aug 29 09:57:11 2013 +0200
+
+ release: post-release bump to 0.23
+
+M configure.ac
+
+commit 4944725bddcf5821d53d7d648fc53347ce12cc03
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Thu Aug 29 09:55:53 2013 +0200
+
+ release: 0.22
+
+M NEWS
+
commit a539c745051d7eeea6617a0512b71a649105de52
Author: Vincent Untz <vuntz@gnome.org>
Date: Thu Aug 29 09:53:31 2013 +0200
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for desktop-file-utils 0.22.
+# Generated by GNU Autoconf 2.69 for desktop-file-utils 0.23.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils>.
#
# Identity of this package.
PACKAGE_NAME='desktop-file-utils'
PACKAGE_TARNAME='desktop-file-utils'
-PACKAGE_VERSION='0.22'
-PACKAGE_STRING='desktop-file-utils 0.22'
+PACKAGE_VERSION='0.23'
+PACKAGE_STRING='desktop-file-utils 0.23'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils'
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures desktop-file-utils 0.22 to adapt to many kinds of systems.
+\`configure' configures desktop-file-utils 0.23 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of desktop-file-utils 0.22:";;
+ short | recursive ) echo "Configuration of desktop-file-utils 0.23:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-desktop-file-utils configure 0.22
+desktop-file-utils configure 0.23
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by desktop-file-utils $as_me 0.22, which was
+It was created by desktop-file-utils $as_me 0.23, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='desktop-file-utils'
- VERSION='0.22'
+ VERSION='0.23'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by desktop-file-utils $as_me 0.22, which was
+This file was extended by desktop-file-utils $as_me 0.23, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-desktop-file-utils config.status 0.22
+desktop-file-utils config.status 0.23
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
const char *locale_key,
const char *value);
static gboolean
+handle_dbus_activatable_key (kf_validator *kf,
+ const char *locale_key,
+ const char *value);
+static gboolean
handle_dev_key (kf_validator *kf,
const char *locale_key,
const char *value);
* specified) */
{ DESKTOP_STRING_LIST_TYPE, "Actions", FALSE, FALSE, FALSE, handle_actions_key },
- { DESKTOP_BOOLEAN_TYPE, "DBusActivatable", FALSE, FALSE, FALSE, NULL },
+ { DESKTOP_BOOLEAN_TYPE, "DBusActivatable", FALSE, FALSE, FALSE, handle_dbus_activatable_key },
/* Keys reserved for KDE */
};
static const char *show_in_registered[] = {
- "GNOME", "KDE", "LXDE", "MATE", "Razor", "ROX", "TDE", "Unity", "XFCE", "Old"
+ "GNOME", "KDE", "LXDE", "LXQt", "MATE", "Razor", "ROX", "TDE", "Unity", "XFCE", "Cinnamon", "EDE", "Old"
};
static struct {
/* + Values of type string may contain all ASCII characters except for control
* characters.
* Checked.
- * + The multiple values should be separated by a semicolon. Those keys which
- * have several values should have a semicolon as the trailing character.
- * Checked.
* + FIXME: how should an empty list be handled?
*/
static gboolean
return FALSE;
}
- if (i > 0 && value[i - 1] != ';') {
- print_fatal (kf, "value \"%s\" for %s list key \"%s\" in group \"%s\" "
- "does not have a semicolon (';') as trailing "
- "character\n",
- value, type, key, kf->current_group);
-
- return FALSE;
- }
-
- if (i > 1 && value[i - 1] == ';' && value[i - 2] == '\\' &&
- (i < 3 || value[i - 3] != '\\')) {
- print_fatal (kf, "value \"%s\" for %s list key \"%s\" in group \"%s\" "
- "has an escaped semicolon (';') as trailing character\n",
- value, type, key, kf->current_group);
-
- return FALSE;
- }
-
return TRUE;
}
* + If a postfixed key occurs, the same key must be also present without the
* postfix.
* Checked.
- * + The multiple values should be separated by a semicolon. Those keys which
- * have several values should have a semicolon as the trailing character.
- * FIXME: partly checked. We use checks that work for sure for ascii
- * characters, but that could possibly fail in some weird UTF-8 strings.
* + FIXME: how should an empty list be handled?
*/
static gboolean
const char *value)
{
char *locale_key;
- int len;
if (locale)
locale_key = g_strdup_printf ("%s[%s]", key, locale);
return FALSE;
}
- len = strlen (value);
-
- if (len > 0 && value[len - 1] != ';') {
- print_fatal (kf, "value \"%s\" for locale string list key \"%s\" in group "
- "\"%s\" does not have a semicolon (';') as trailing "
- "character\n",
- value, locale_key, kf->current_group);
-
- return FALSE;
- }
-
- if (len > 1 && value[len - 1] == ';' && value[len - 2] == '\\' &&
- (len < 3 || value[len - 3] != '\\')) {
- print_fatal (kf, "value \"%s\" for locale string list key \"%s\" in group "
- "\"%s\" has an escaped semicolon (';') as trailing "
- "character\n",
- value, locale_key, kf->current_group);
-
- return FALSE;
- }
-
if (!g_hash_table_lookup (kf->current_keys, key)) {
print_fatal (kf, "key \"%s\" in group \"%s\" is a localized key, but "
"there is no non-localized key \"%s\"\n",
const char *locale_key,
const char *value)
{
+ if (!strcmp (value, "1.1"))
+ return TRUE;
+
if (!strcmp (value, "1.0"))
return TRUE;
break;
case '\\':
PRINT_INVALID_IF_FLAG;
+
+ /* Escape character immediately followed by \0? */
+ if (*(c + 1) == '\0') {
+ print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" "
+ "ends in an incomplete escape sequence\n",
+ value, locale_key, kf->current_group);
+ retval = FALSE;
+ break;
+ }
+
c++;
if (*c == '\\' && in_quote)
escaped = !escaped;
return retval;
}
+/* + If the file describes a D-Bus activatable service, the filename must be in
+ * reverse-DNS notation, i.e. contain at least two dots including the dot
+ * in ".desktop".
+ * Checked.
+ */
+static gboolean
+handle_dbus_activatable_key (kf_validator *kf,
+ const char *locale_key,
+ const char *value)
+{
+ gchar *basename_utf8;
+ gchar *basename;
+ const gchar *p = NULL;
+ gboolean retval = TRUE;
+
+ /* If DBusActivatable=false, don't check */
+ if (strcmp (value, "true") && strcmp (value, "1"))
+ return TRUE;
+
+ basename = g_path_get_basename (kf->filename);
+ basename_utf8 = g_filename_to_utf8 (basename, -1, NULL, NULL, NULL);
+ if (!basename_utf8)
+ goto out;
+
+ p = g_utf8_strchr (basename_utf8, -1, '.');
+ if (!p)
+ goto out;
+ p = g_utf8_strchr (p + 1, -1, '.');
+
+out:
+ if (!p) {
+ print_fatal (kf, "DBusActivatable filename must conform to reverse-DNS notation\n");
+ retval = FALSE;
+ }
+
+ g_free (basename_utf8);
+ g_free (basename);
+ return retval;
+}
+
/* + The device to mount. (probably implies an absolute path)
* Checked.
*/
return (!kf.fatal_error);
}
-static void
-fixup_list (GKeyFile *keyfile,
- const gchar *filename,
- const gchar *key)
-{
- char *value;
- int len;
-
- value = g_key_file_get_value (keyfile, GROUP_DESKTOP_ENTRY, key, NULL);
- if (!value)
- return;
-
- len = strlen (value);
-
- if (len > 0 && (value[len - 1] != ';' ||
- (len > 1 && value[len - 2] == '\\' &&
- (len < 3 || value[len - 3] != '\\')))) {
- char *str;
-
- g_printerr ("%s: warning: key \"%s\" is a list and does not have a "
- "semicolon as trailing character, fixing\n",
- filename, key);
-
- str = g_strconcat (value, ";", NULL);
- g_key_file_set_value (keyfile, GROUP_DESKTOP_ENTRY,
- key, str);
- g_free (str);
- }
-}
-
/* return FALSE if we were unable to fix the file */
gboolean
desktop_file_fixup (GKeyFile *keyfile,
const char *filename)
{
- gchar **keys;
- gsize keys_nb;
- unsigned int i;
-
if (g_key_file_has_group (keyfile, GROUP_KDE_DESKTOP_ENTRY)) {
g_printerr ("%s: warning: renaming deprecated \"%s\" group to \"%s\"\n",
filename, GROUP_KDE_DESKTOP_ENTRY, GROUP_DESKTOP_ENTRY);
GROUP_KDE_DESKTOP_ENTRY, GROUP_DESKTOP_ENTRY);
}
- keys = g_key_file_get_keys (keyfile, GROUP_DESKTOP_ENTRY, &keys_nb, NULL);
-
- /* Fix lists to have a ';' at the end if they don't */
- for (i = 0; i < G_N_ELEMENTS (registered_desktop_keys); i++) {
- if (registered_desktop_keys[i].type == DESKTOP_STRING_LIST_TYPE ||
- registered_desktop_keys[i].type == DESKTOP_REGEXP_LIST_TYPE)
- fixup_list (keyfile, filename, registered_desktop_keys[i].name);
-
- if (registered_desktop_keys[i].type == DESKTOP_LOCALESTRING_LIST_TYPE) {
- gsize keylen;
- guint j;
-
- keylen = strlen (registered_desktop_keys[i].name);
- for (j = 0; j < keys_nb; j++) {
- if (g_str_has_prefix (keys[j], registered_desktop_keys[i].name) &&
- (keys[j][keylen] == '[' || keys[j][keylen] == '\0')) {
- fixup_list (keyfile, filename, keys[j]);
- }
- }
- }
- }
-
- g_strfreev (keys);
-
return TRUE;
}