From dc82b8cbd175a1558544ee8eb65fbdb2147123e057063160895c6f612f7d6b35 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 7 Nov 2019 10:52:27 +0000 Subject: [PATCH] Accepting request 744692 from home:qzhao:branches:GNOME:Factory - Update gnome-initial-setup.spec Drop gnome-initial-setup-disable-dep-on-started-docs.patch Drop gnome-initial-setup-mozc-engine-prioritized.patch Drop gnome-initial-setup-only-setup-keyboard.patch Drop gnome-initial-setup-only-launch-CJK.patch to avoid blank docs window appear after gnome-initial-setup finished (bnc#1125694, bnc#1131087). - Sync SLE's changelog to Factory. OBS-URL: https://build.opensuse.org/request/show/744692 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-initial-setup?expand=0&rev=72 --- ...al-setup-disable-dep-on-started-docs.patch | 30 - ...nitial-setup-mozc-engine-prioritized.patch | 48 - gnome-initial-setup-only-launch-CJK.patch | 45 - gnome-initial-setup-only-setup-keyboard.patch | 23 - gnome-initial-setup-smarter.patch | 1003 +++++++++++++++++ gnome-initial-setup.changes | 28 + gnome-initial-setup.spec | 29 +- 7 files changed, 1043 insertions(+), 163 deletions(-) delete mode 100644 gnome-initial-setup-disable-dep-on-started-docs.patch delete mode 100644 gnome-initial-setup-mozc-engine-prioritized.patch delete mode 100644 gnome-initial-setup-only-launch-CJK.patch delete mode 100644 gnome-initial-setup-only-setup-keyboard.patch create mode 100644 gnome-initial-setup-smarter.patch diff --git a/gnome-initial-setup-disable-dep-on-started-docs.patch b/gnome-initial-setup-disable-dep-on-started-docs.patch deleted file mode 100644 index bc4db91..0000000 --- a/gnome-initial-setup-disable-dep-on-started-docs.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup-copy-worker.c -=================================================================== ---- gnome-initial-setup-3.26.0.orig/gnome-initial-setup/gnome-initial-setup-copy-worker.c -+++ gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup-copy-worker.c -@@ -89,7 +89,6 @@ main (int argc, - move_file_from_homedir (src, dest, path); - - FILE (".config/gnome-initial-setup-done"); -- FILE (".config/run-welcome-tour"); - FILE (".config/dconf/user"); - FILE (".config/goa-1.0/accounts.conf"); - FILE (".config/monitors.xml"); -Index: gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup.c -=================================================================== ---- gnome-initial-setup-3.26.0.orig/gnome-initial-setup/gnome-initial-setup.c -+++ gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup.c -@@ -285,13 +285,6 @@ gis_ensure_stamp_files (void) - gchar *file; - GError *error = NULL; - -- file = g_build_filename (g_get_user_config_dir (), "run-welcome-tour", NULL); -- if (!g_file_set_contents (file, "yes", -1, &error)) { -- g_warning ("Unable to create %s: %s", file, error->message); -- g_clear_error (&error); -- } -- g_free (file); -- - file = g_build_filename (g_get_user_config_dir (), "gnome-initial-setup-done", NULL); - if (!g_file_set_contents (file, "yes", -1, &error)) { - g_warning ("Unable to create %s: %s", file, error->message); diff --git a/gnome-initial-setup-mozc-engine-prioritized.patch b/gnome-initial-setup-mozc-engine-prioritized.patch deleted file mode 100644 index a1696d5..0000000 --- a/gnome-initial-setup-mozc-engine-prioritized.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: gnome-initial-setup-3.31.90/gnome-initial-setup/pages/keyboard/cc-input-chooser.c -=================================================================== ---- gnome-initial-setup-3.31.90.orig/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 2019-02-04 23:16:02.000000000 +0100 -+++ gnome-initial-setup-3.31.90/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 2019-02-20 13:26:23.074350247 +0100 -@@ -273,6 +273,14 @@ sync_checkmark (GtkWidget *row, - should_be_visible = FALSE; - else - should_be_visible = g_strcmp0 (widget->id, priv->id) == 0 && g_strcmp0 (widget->type, priv->type) == 0; -+ -+ if ((g_strcmp0 (widget->id, "jp") == 0) && -+ (g_strcmp0 (priv->id, "jp") == 0)) -+ should_be_visible = FALSE; -+ -+ if (g_strcmp0 (widget->id, "mozc-jp") == 0) -+ should_be_visible = TRUE; -+ - gtk_widget_set_opacity (widget->checkmark, should_be_visible ? 1.0 : 0.0); - - if (widget->is_extra && should_be_visible) -@@ -451,6 +459,13 @@ input_visible (GtkListBoxRow *row, - - widget = get_input_widget (child); - -+ if((g_strcmp0 (widget->id, "mozc-jp") == 0) || -+ (g_strcmp0 (widget->id, "anthy") == 0)) -+ return TRUE; -+ -+ if(g_strcmp0 (widget->id, "Japanese (Mozc)") == 0) -+ return FALSE; -+ - if (!priv->showing_extra && widget->is_extra) - return FALSE; - -@@ -478,6 +493,14 @@ sort_inputs (GtkListBoxRow *a, - if (lb == NULL) - return -1; - -+ if (g_strcmp0 (la->id, "mozc-jp") == 0 || -+ g_strcmp0 (la->id, "anthy") == 0) -+ return -1; -+ -+ if (g_strcmp0 (lb->id, "mozc-jp") == 0 || -+ g_strcmp0 (lb->id, "anthy") == 0) -+ return 1; -+ - if (la->is_extra && !lb->is_extra) - return 1; - diff --git a/gnome-initial-setup-only-launch-CJK.patch b/gnome-initial-setup-only-launch-CJK.patch deleted file mode 100644 index a83f6c2..0000000 --- a/gnome-initial-setup-only-launch-CJK.patch +++ /dev/null @@ -1,45 +0,0 @@ -Index: gnome-initial-setup-3.20.1/gnome-initial-setup/gnome-initial-setup.c -=================================================================== ---- gnome-initial-setup-3.20.1.orig/gnome-initial-setup/gnome-initial-setup.c -+++ gnome-initial-setup-3.20.1/gnome-initial-setup/gnome-initial-setup.c -@@ -184,6 +184,30 @@ get_mode (void) - return GIS_DRIVER_MODE_NEW_USER; - } - -+static gboolean -+language_is_CJK() -+{ -+ gchar **env = g_get_environ (); -+ const gchar *value = g_environ_getenv (env, "LANG"); -+ -+ if (g_ascii_strcasecmp(value, "zh_CN.UTF-8") && -+ g_ascii_strcasecmp(value, "zh_HK.UTF-8") && -+ g_ascii_strcasecmp(value, "zh_MO.UTF-8") && -+ g_ascii_strcasecmp(value, "zh_TW.UTF-8") && -+ g_ascii_strcasecmp(value, "zh_SG.UTF-8") && -+ g_ascii_strcasecmp(value, "zh_MO.UTF-8") && -+ g_ascii_strcasecmp(value, "zh_MO.UTF-8") && -+ g_ascii_strcasecmp(value, "ja_JP.UTF-8") && -+ g_ascii_strcasecmp(value, "ko_KR.UTF-8")) { -+ g_strfreev(env); -+ return FALSE; -+ } -+ else { -+ g_strfreev(env); -+ return TRUE; -+ } -+} -+ - int - main (int argc, char *argv[]) - { -@@ -192,6 +216,9 @@ main (int argc, char *argv[]) - GOptionContext *context; - GisDriverMode mode; - -+ if (!language_is_CJK()) -+ return status; -+ - GOptionEntry entries[] = { - { "existing-user", 0, 0, G_OPTION_ARG_NONE, &force_existing_user_mode, - _("Force existing user mode"), NULL }, diff --git a/gnome-initial-setup-only-setup-keyboard.patch b/gnome-initial-setup-only-setup-keyboard.patch deleted file mode 100644 index 12b77e4..0000000 --- a/gnome-initial-setup-only-setup-keyboard.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -urp gnome-initial-setup-3.33.91.orig/gnome-initial-setup/gnome-initial-setup.c gnome-initial-setup-3.33.91/gnome-initial-setup/gnome-initial-setup.c ---- gnome-initial-setup-3.33.91.orig/gnome-initial-setup/gnome-initial-setup.c 2019-08-31 16:14:45.640964145 -0500 -+++ gnome-initial-setup-3.33.91/gnome-initial-setup/gnome-initial-setup.c 2019-08-31 16:21:35.551137124 -0500 -@@ -65,19 +65,10 @@ typedef struct { - #define PAGE(name, new_user_only) { #name, gis_prepare_ ## name ## _page, new_user_only } - - static PageData page_table[] = { -- PAGE (language, FALSE), - #ifdef ENABLE_REGION_PAGE - PAGE (region, FALSE), - #endif /* ENABLE_REGION_PAGE */ - PAGE (keyboard, FALSE), -- PAGE (eula, FALSE), -- PAGE (network, FALSE), -- PAGE (privacy, FALSE), -- PAGE (timezone, TRUE), -- PAGE (software, TRUE), -- PAGE (goa, FALSE), -- PAGE (account, TRUE), -- PAGE (password, TRUE), - PAGE (summary, FALSE), - { NULL }, - }; diff --git a/gnome-initial-setup-smarter.patch b/gnome-initial-setup-smarter.patch new file mode 100644 index 0000000..82d830c --- /dev/null +++ b/gnome-initial-setup-smarter.patch @@ -0,0 +1,1003 @@ +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/gis-driver.c gnome-initial-setup-3.26.0_new/gnome-initial-setup/gis-driver.c +--- gnome-initial-setup-3.26.0/gnome-initial-setup/gis-driver.c 2017-06-14 21:39:03.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/gis-driver.c 2019-02-27 18:51:00.329103410 +0800 +@@ -27,6 +27,7 @@ + #include + + #include "gis-assistant.h" ++#include "language-setting.h" + + #define GIS_TYPE_DRIVER_MODE (gis_driver_mode_get_type ()) + +@@ -83,6 +84,32 @@ + + G_DEFINE_TYPE_WITH_PRIVATE(GisDriver, gis_driver, GTK_TYPE_APPLICATION) + ++gboolean gis_cjk_region; ++ ++static gboolean ++current_locale_in_Asia() ++{ ++ gchar * ++ current_language = cc_common_language_get_current_language (); ++ ++ static gchar *expose_locale_list[] = {"zh_CN.UTF-8", ++ "zh_HK.UTF-8", ++ "zh_MO.UTF-8", ++ "zh_TW.UTF-8", ++ "zh_SG.UTF-8", ++ "ja_JP.UTF-8", ++ "ko_KR.UTF-8"}; ++ guint i = 0; ++ while (expose_locale_list[i]) ++ { ++ if (g_strcmp0 (expose_locale_list[i], current_language) == 0) ++ return (TRUE); ++ else ++ i++; ++ } ++ return (FALSE); ++} ++ + static void + gis_driver_finalize (GObject *object) + { +@@ -319,7 +346,16 @@ + + G_APPLICATION_CLASS (gis_driver_parent_class)->activate (app); + +- gtk_window_present (GTK_WINDOW (priv->main_window)); ++ if (current_locale_in_Asia()) ++ { ++ gis_cjk_region = TRUE; ++ gtk_window_present (GTK_WINDOW (priv->main_window)); ++ } ++ else ++ { ++ gis_cjk_region = FALSE; ++ gtk_widget_hide (GTK_WIDGET (priv->main_window)); ++ } + } + + static gboolean +@@ -436,6 +472,7 @@ + "icon-name", "preferences-system", + "deletable", FALSE, + NULL); ++ gtk_widget_hide (GTK_WIDGET(priv->main_window)); + + g_signal_connect (priv->main_window, + "realize", +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup.c gnome-initial-setup-3.26.0_new/gnome-initial-setup/gnome-initial-setup.c +--- gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup.c 2017-09-05 00:35:30.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/gnome-initial-setup.c 2019-02-27 16:05:26.596328724 +0800 +@@ -48,6 +48,7 @@ + #include "pages/account/gis-account-pages.h" + #include "pages/password/gis-password-page.h" + #include "pages/summary/gis-summary-page.h" ++#include "language-setting.h" + + #define VENDOR_PAGES_GROUP "pages" + #define VENDOR_PAGES_SKIP_KEY "skip" +@@ -82,6 +83,16 @@ + + #undef PAGE + ++static gchar ++ *SUSE_skip_pages [] = ++ { ++ "privacy", ++ "timezone", ++ "goa", ++ "account", ++ "password" ++ }; ++ + static gboolean + should_skip_page (GisDriver *driver, + const gchar *page_id, +@@ -100,42 +111,6 @@ + return FALSE; + } + +-static gchar ** +-pages_to_skip_from_file (void) +-{ +- GKeyFile *skip_pages_file; +- gchar **skip_pages = NULL; +- GError *error = NULL; +- +- /* VENDOR_CONF_FILE points to a keyfile containing vendor customization +- * options. This code will look for options under the "pages" group, and +- * supports the following keys: +- * - skip (optional): list of pages to be skipped. +- * +- * This is how this file would look on a vendor image: +- * +- * [pages] +- * skip=language +- */ +- skip_pages_file = g_key_file_new (); +- if (!g_key_file_load_from_file (skip_pages_file, VENDOR_CONF_FILE, +- G_KEY_FILE_NONE, &error)) { +- if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) +- g_warning ("Could not read file %s: %s", VENDOR_CONF_FILE, error->message); +- +- g_error_free (error); +- goto out; +- } +- +- skip_pages = g_key_file_get_string_list (skip_pages_file, VENDOR_PAGES_GROUP, +- VENDOR_PAGES_SKIP_KEY, NULL, NULL); +- +- out: +- g_key_file_free (skip_pages_file); +- +- return skip_pages; +-} +- + static void + destroy_pages_after (GisAssistant *assistant, + GisPage *page) +@@ -161,14 +136,11 @@ + PageData *page_data; + GisAssistant *assistant; + GisPage *current_page; +- gchar **skip_pages; + gboolean is_new_user; + + assistant = gis_driver_get_assistant (driver); + current_page = gis_assistant_get_current_page (assistant); + +- skip_pages = pages_to_skip_from_file (); +- + page_data = page_table; + + if (current_page != NULL) { +@@ -186,13 +158,11 @@ + if (page_data->new_user_only && !is_new_user) + continue; + +- if (should_skip_page (driver, page_data->page_id, skip_pages)) ++ if (should_skip_page (driver, page_data->page_id, SUSE_skip_pages)) + continue; + + page_data->prepare_page_func (driver); + } +- +- g_strfreev (skip_pages); + } + + static GisDriverMode +@@ -208,7 +178,7 @@ + main (int argc, char *argv[]) + { + GisDriver *driver; +- int status; ++ int status = 0; + GOptionContext *context; + GisDriverMode mode; + +@@ -254,6 +224,7 @@ + + driver = gis_driver_new (mode); + g_signal_connect (driver, "rebuild-pages", G_CALLBACK (rebuild_pages_cb), NULL); ++ + status = g_application_run (G_APPLICATION (driver), argc, argv); + + g_object_unref (driver); +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup.h gnome-initial-setup-3.26.0_new/gnome-initial-setup/gnome-initial-setup.h +--- gnome-initial-setup-3.26.0/gnome-initial-setup/gnome-initial-setup.h 2017-06-14 21:39:03.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/gnome-initial-setup.h 2019-02-27 18:35:26.507047546 +0800 +@@ -36,6 +36,7 @@ + #include "gis-keyring.h" + + void gis_ensure_stamp_files (void); ++extern gboolean gis_cjk_region; + + #endif /* __GNOME_INITIAL_SETUP_H__ */ + +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/language-setting.c gnome-initial-setup-3.26.0_new/gnome-initial-setup/language-setting.c +--- gnome-initial-setup-3.26.0/gnome-initial-setup/language-setting.c 1970-01-01 08:00:00.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/language-setting.c 2019-02-27 16:05:26.596328724 +0800 +@@ -0,0 +1,289 @@ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define GNOME_DESKTOP_USE_UNSTABLE_API ++#define GNOME_SYSTEM_LOCALE_DIR "org.gnome.system.locale" ++#define REGION_KEY "region" ++#define LOCALE_CONFIG_FILE "/etc/locale.conf" ++#include ++#include "language-setting.h" ++ ++#include ++#include ++#include "gis-driver.h" ++ ++static char *get_lang_for_user_object_path (const char *path); ++typedef struct _GisLanguagePagePrivate GisLanguagePagePrivate; ++ ++gboolean ++cc_common_language_has_font (const gchar *locale) ++{ ++ const FcCharSet *charset; ++ FcPattern *pattern; ++ FcObjectSet *object_set; ++ FcFontSet *font_set; ++ gchar *language_code; ++ gboolean is_displayable; ++ ++ is_displayable = FALSE; ++ pattern = NULL; ++ object_set = NULL; ++ font_set = NULL; ++ ++ if (!gnome_parse_locale (locale, &language_code, NULL, NULL, NULL)) ++ return FALSE; ++ ++ charset = FcLangGetCharSet ((FcChar8 *) language_code); ++ if (!charset) { ++ /* fontconfig does not know about this language */ ++ is_displayable = TRUE; ++ } ++ else { ++ /* see if any fonts support rendering it */ ++ pattern = FcPatternBuild (NULL, FC_LANG, FcTypeString, language_code, NULL); ++ ++ if (pattern == NULL) ++ goto done; ++ ++ object_set = FcObjectSetCreate (); ++ ++ if (object_set == NULL) ++ goto done; ++ ++ font_set = FcFontList (NULL, pattern, object_set); ++ ++ if (font_set == NULL) ++ goto done; ++ ++ is_displayable = (font_set->nfont > 0); ++ } ++ ++ done: ++ if (font_set != NULL) ++ FcFontSetDestroy (font_set); ++ ++ if (object_set != NULL) ++ FcObjectSetDestroy (object_set); ++ ++ if (pattern != NULL) ++ FcPatternDestroy (pattern); ++ ++ g_free (language_code); ++ ++ return is_displayable; ++} ++ ++gchar * ++cc_common_language_get_current_language (void) ++{ ++ gchar *language; ++ char *path; ++ const gchar *locale; ++ ++ path = g_strdup_printf ("/org/freedesktop/Accounts/User%d", getuid ()); ++ language = get_lang_for_user_object_path (path); ++ g_free (path); ++ if (language != NULL && *language != '\0') ++ return gnome_normalize_locale (language); ++ ++ locale = (const gchar *) setlocale (LC_MESSAGES, NULL); ++ if (locale) ++ language = gnome_normalize_locale (locale); ++ else ++ language = NULL; ++ ++ return language; ++} ++ ++static gboolean ++user_language_has_translations (const char *locale) ++{ ++ char *name, *language_code, *territory_code; ++ gboolean ret; ++ ++ gnome_parse_locale (locale, ++ &language_code, ++ &territory_code, ++ NULL, NULL); ++ name = g_strdup_printf ("%s%s%s", ++ language_code, ++ territory_code != NULL? "_" : "", ++ territory_code != NULL? territory_code : ""); ++ g_free (language_code); ++ g_free (territory_code); ++ ret = gnome_language_has_translations (name); ++ g_free (name); ++ ++ return ret; ++} ++ ++static char * ++get_lang_for_user_object_path (const char *path) ++{ ++ GError *error = NULL; ++ GDBusProxy *user; ++ GVariant *props; ++ char *lang; ++ ++ user = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, ++ G_DBUS_PROXY_FLAGS_NONE, ++ NULL, ++ "org.freedesktop.Accounts", ++ path, ++ "org.freedesktop.Accounts.User", ++ NULL, ++ &error); ++ if (user == NULL) { ++ g_warning ("Failed to get proxy for user '%s': %s", ++ path, error->message); ++ g_error_free (error); ++ return NULL; ++ } ++ props = g_dbus_proxy_get_cached_property (user, "Language"); ++ lang = g_variant_dup_string (props, NULL); ++ ++ g_variant_unref (props); ++ g_object_unref (user); ++ return lang; ++} ++ ++static void ++add_other_users_language (GHashTable *ht) ++{ ++ GVariant *variant; ++ GVariantIter *vi; ++ GError *error = NULL; ++ const char *str; ++ GDBusProxy *proxy; ++ ++ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, ++ G_DBUS_PROXY_FLAGS_NONE, ++ NULL, ++ "org.freedesktop.Accounts", ++ "/org/freedesktop/Accounts", ++ "org.freedesktop.Accounts", ++ NULL, ++ NULL); ++ ++ if (proxy == NULL) ++ return; ++ ++ variant = g_dbus_proxy_call_sync (proxy, ++ "ListCachedUsers", ++ NULL, ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, ++ &error); ++ if (variant == NULL) { ++ g_warning ("Failed to list existing users: %s", error->message); ++ g_error_free (error); ++ g_object_unref (proxy); ++ return; ++ } ++ g_variant_get (variant, "(ao)", &vi); ++ while (g_variant_iter_loop (vi, "o", &str)) { ++ char *lang; ++ char *name; ++ char *language; ++ ++ lang = get_lang_for_user_object_path (str); ++ if (lang != NULL && *lang != '\0' && ++ cc_common_language_has_font (lang) && ++ user_language_has_translations (lang)) { ++ name = gnome_normalize_locale (lang); ++ if (!g_hash_table_lookup (ht, name)) { ++ language = gnome_get_language_from_locale (name, NULL); ++ g_hash_table_insert (ht, name, language); ++ } ++ else { ++ g_free (name); ++ } ++ } ++ g_free (lang); ++ } ++ g_variant_iter_free (vi); ++ g_variant_unref (variant); ++ ++ g_object_unref (proxy); ++} ++ ++/* ++ * Note that @lang needs to be formatted like the locale strings ++ * returned by gnome_get_all_locales(). ++ */ ++static void ++insert_language (GHashTable *ht, ++ const char *lang) ++{ ++ char *label_own_lang; ++ char *label_current_lang; ++ char *label_untranslated; ++ char *key; ++ ++ key = g_strdup (lang); ++ ++ label_own_lang = gnome_get_language_from_locale (key, key); ++ label_current_lang = gnome_get_language_from_locale (key, NULL); ++ label_untranslated = gnome_get_language_from_locale (key, "C"); ++ ++ /* We don't have a translation for the label in ++ * its own language? */ ++ if (g_strcmp0 (label_own_lang, label_untranslated) == 0) { ++ if (g_strcmp0 (label_current_lang, label_untranslated) == 0) ++ g_hash_table_insert (ht, key, g_strdup (label_untranslated)); ++ else ++ g_hash_table_insert (ht, key, g_strdup (label_current_lang)); ++ } else { ++ g_hash_table_insert (ht, key, g_strdup (label_own_lang)); ++ } ++ ++ g_free (label_own_lang); ++ g_free (label_current_lang); ++ g_free (label_untranslated); ++} ++ ++static void ++insert_user_languages (GHashTable *ht) ++{ ++ char *name; ++ ++ /* Add the languages used by other users on the system */ ++ add_other_users_language (ht); ++ ++ /* Add current locale */ ++ name = cc_common_language_get_current_language (); ++ if (g_hash_table_lookup (ht, name) == NULL) { ++ insert_language (ht, name); ++ } else { ++ g_free (name); ++ } ++} ++ ++GHashTable * ++cc_common_language_get_initial_languages (void) ++{ ++ GHashTable *ht; ++ ++ ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); ++ ++ insert_language (ht, "en_US.UTF-8"); ++ insert_language (ht, "en_GB.UTF-8"); ++ insert_language (ht, "de_DE.UTF-8"); ++ insert_language (ht, "fr_FR.UTF-8"); ++ insert_language (ht, "es_ES.UTF-8"); ++ insert_language (ht, "zh_CN.UTF-8"); ++ insert_language (ht, "ja_JP.UTF-8"); ++ insert_language (ht, "ru_RU.UTF-8"); ++ insert_language (ht, "ar_EG.UTF-8"); ++ ++ insert_user_languages (ht); ++ ++ return ht; ++} +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/language-setting.h gnome-initial-setup-3.26.0_new/gnome-initial-setup/language-setting.h +--- gnome-initial-setup-3.26.0/gnome-initial-setup/language-setting.h 1970-01-01 08:00:00.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/language-setting.h 2019-02-27 16:05:26.596328724 +0800 +@@ -0,0 +1,13 @@ ++#ifndef __CC_COMMON_LANGUAGE_H__ ++#define __CC_COMMON_LANGUAGE_H__ ++ ++#include ++ ++G_BEGIN_DECLS ++ ++gchar *cc_common_language_get_current_language (void); ++GHashTable *cc_common_language_get_initial_languages (void); ++ ++G_END_DECLS ++ ++#endif +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/pages/keyboard/cc-input-chooser.c gnome-initial-setup-3.26.0_new/gnome-initial-setup/pages/keyboard/cc-input-chooser.c +--- gnome-initial-setup-3.26.0/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 2016-10-22 15:09:29.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 2019-02-27 16:05:26.596328724 +0800 +@@ -59,6 +59,7 @@ + + gboolean showing_extra; + gchar *locale; ++ gboolean is_Japanese; + gchar *id; + gchar *type; + GnomeXkbInfo *xkb_info; +@@ -272,8 +273,14 @@ + + if (priv->id == NULL || priv->type == NULL) + should_be_visible = FALSE; ++ else if (priv->is_Japanese) ++ { ++ if ( g_strcmp0 (widget->id, "mozc-jp") == 0) ++ should_be_visible = TRUE; ++ } + else + should_be_visible = g_strcmp0 (widget->id, priv->id) == 0 && g_strcmp0 (widget->type, priv->type) == 0; ++ + gtk_widget_set_opacity (widget->checkmark, should_be_visible ? 1.0 : 0.0); + + if (widget->is_extra && should_be_visible) +@@ -452,6 +459,14 @@ + + widget = get_input_widget (child); + ++ if (priv->is_Japanese) ++ { ++ if((g_strcmp0 (widget->id, "mozc-jp") == 0) || (g_strcmp0 (widget->id, "anthy") == 0)) ++ return TRUE; ++ if(g_strcmp0 (widget->id, "Japanese (Mozc)") == 0) ++ return FALSE; ++ } ++ + if (!priv->showing_extra && widget->is_extra) + return FALSE; + +@@ -468,6 +483,9 @@ + GtkListBoxRow *b, + gpointer data) + { ++ CcInputChooser *chooser = data; ++ CcInputChooserPrivate *priv = cc_input_chooser_get_instance_private (chooser); ++ + InputWidget *la, *lb; + + la = get_input_widget (gtk_bin_get_child (GTK_BIN (a))); +@@ -479,6 +497,18 @@ + if (lb == NULL) + return -1; + ++ if (priv->is_Japanese) ++ { ++ if (g_strcmp0 (la->id, "mozc-jp") == 0 && g_strcmp0 (lb->id, "anthy") == 0) ++ return -1; ++ if (g_strcmp0 (lb->id, "mozc-jp") == 0 && g_strcmp0 (la->id, "anthy") == 0) ++ return 1; ++ if (g_strcmp0 (la->id, "mozc-jp") == 0 || g_strcmp0 (la->id, "anthy") == 0) ++ return -1; ++ if (g_strcmp0 (lb->id, "mozc-jp") == 0 || g_strcmp0 (lb->id, "anthy") == 0) ++ return 1; ++ } ++ + if (la->is_extra && !lb->is_extra) + return 1; + +@@ -751,9 +781,13 @@ + gtk_list_box_set_selection_mode (GTK_LIST_BOX (priv->input_list), + GTK_SELECTION_NONE); + +- if (priv->locale == NULL) { ++ if (priv->locale == NULL) + priv->locale = cc_common_language_get_current_language (); +- } ++ ++ if(g_strcmp0(priv->locale, "ja_JP.UTF-8") == 0) ++ priv->is_Japanese = TRUE; ++ else ++ priv->is_Japanese = FALSE; + + get_locale_infos (chooser); + #ifdef HAVE_IBUS +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c gnome-initial-setup-3.26.0_new/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c +--- gnome-initial-setup-3.26.0/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c 2017-06-14 21:39:03.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c 2019-02-27 16:05:26.596328724 +0800 +@@ -33,6 +33,7 @@ + #include "gis-keyboard-page.h" + #include "keyboard-resources.h" + #include "cc-input-chooser.h" ++#include "cc-common-language.h" + + #define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.gnome.desktop.input-sources" + #define KEY_CURRENT_INPUT_SOURCE "current" +@@ -45,6 +46,7 @@ + GCancellable *cancellable; + GPermission *permission; + GSettings *input_settings; ++ gchar *current_language; + + GSList *system_sources; + }; +@@ -318,6 +320,29 @@ + update_page_complete (self); + } + ++gboolean ++current_locale_need_input_selection(GisKeyboardPage *self) ++{ ++ GisKeyboardPagePrivate *priv = gis_keyboard_page_get_instance_private (self); ++ ++ static gchar *expose_locale_list[] = {"zh_CN.UTF-8", ++ "zh_HK.UTF-8", ++ "zh_MO.UTF-8", ++ "zh_TW.UTF-8", ++ "zh_SG.UTF-8", ++ "ja_JP.UTF-8", ++ "ko_KR.UTF-8"}; ++ guint i = 0; ++ while (expose_locale_list[i]) ++ { ++ if (g_strcmp0 (expose_locale_list[i], priv->current_language) == 0) ++ return (TRUE); ++ else ++ i++; ++ } ++ return (FALSE); ++} ++ + static void + gis_keyboard_page_constructed (GObject *object) + { +@@ -337,6 +362,7 @@ + g_settings_delay (priv->input_settings); + + priv->cancellable = g_cancellable_new (); ++ priv->current_language = cc_common_language_get_current_language (); + + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, +@@ -354,7 +380,10 @@ + + update_page_complete (self); + +- gtk_widget_show (GTK_WIDGET (self)); ++ if (current_locale_need_input_selection(self)) ++ gtk_widget_show (GTK_WIDGET (self)); ++ else ++ gtk_widget_hide (GTK_WIDGET (self)); + } + + static void +diff -Nura gnome-initial-setup-3.26.0/gnome-initial-setup/pages/language/gis-language-page.c gnome-initial-setup-3.26.0_new/gnome-initial-setup/pages/language/gis-language-page.c +--- gnome-initial-setup-3.26.0/gnome-initial-setup/pages/language/gis-language-page.c 2017-06-14 21:39:03.000000000 +0800 ++++ gnome-initial-setup-3.26.0_new/gnome-initial-setup/pages/language/gis-language-page.c 2019-02-27 18:41:40.070361981 +0800 +@@ -28,17 +28,33 @@ + + #define GNOME_SYSTEM_LOCALE_DIR "org.gnome.system.locale" + #define REGION_KEY "region" ++#define LOCALE_CONFIG_FILE "/etc/locale.conf" + + #include "config.h" + #include "language-resources.h" + #include "gis-welcome-widget.h" + #include "cc-language-chooser.h" + #include "gis-language-page.h" ++#include "gnome-initial-setup.h" + + #include + #include + #include + #include ++#include ++#include ++#include ++ ++typedef struct _Region_Info ++{ ++ GPermission *permission; ++ GDBusProxy *localed; ++ GCancellable *cancellable; ++ gchar *language; ++ gchar *region; ++ gchar *system_language; ++ gchar *system_region; ++} Region_Info; + + struct _GisLanguagePagePrivate + { +@@ -49,6 +65,7 @@ + GDBusProxy *localed; + GPermission *permission; + const gchar *new_locale_id; ++ gchar *system_language; + + GCancellable *cancellable; + }; +@@ -103,62 +120,16 @@ + GParamSpec *pspec, + gpointer user_data) + { +- gchar *new_locale_id = user_data; ++ GisLanguagePagePrivate *priv = gis_language_page_get_instance_private (user_data); ++ gchar *new_locale_id = g_strdup (priv->new_locale_id); + + act_user_set_language (ACT_USER (object), new_locale_id); +- + g_free (new_locale_id); +-} + +-static void +-language_changed (CcLanguageChooser *chooser, +- GParamSpec *pspec, +- GisLanguagePage *page) +-{ +- GisLanguagePagePrivate *priv = gis_language_page_get_instance_private (page); +- GisDriver *driver; +- GSettings *region_settings; +- ActUser *user; +- +- priv->new_locale_id = cc_language_chooser_get_language (chooser); +- driver = GIS_PAGE (page)->driver; +- +- setlocale (LC_MESSAGES, priv->new_locale_id); +- gtk_widget_set_default_direction (gtk_get_locale_direction ()); +- +- if (gis_driver_get_mode (driver) == GIS_DRIVER_MODE_NEW_USER) { +- if (g_permission_get_allowed (priv->permission)) { +- set_localed_locale (page); +- } +- else if (g_permission_get_can_acquire (priv->permission)) { +- g_permission_acquire_async (priv->permission, +- NULL, +- change_locale_permission_acquired, +- page); +- } ++ if (!gis_cjk_region) { ++ gis_ensure_stamp_files (); ++ g_application_quit (G_APPLICATION (GIS_PAGE (user_data)->driver)); + } +- +- /* Ensure we won't override the selected language for format strings */ +- region_settings = g_settings_new (GNOME_SYSTEM_LOCALE_DIR); +- g_settings_reset (region_settings, REGION_KEY); +- g_object_unref (region_settings); +- +- user = act_user_manager_get_user (act_user_manager_get_default (), +- g_get_user_name ()); +- if (act_user_is_loaded (user)) +- act_user_set_language (user, priv->new_locale_id); +- else +- g_signal_connect (user, +- "notify::is-loaded", +- G_CALLBACK (user_loaded), +- g_strdup (priv->new_locale_id)); +- +- gis_driver_set_user_language (driver, priv->new_locale_id); +- +- gis_welcome_widget_show_locale (GIS_WELCOME_WIDGET (priv->welcome_widget), +- priv->new_locale_id); +- +- gis_driver_locale_changed (driver); + } + + static void +@@ -183,67 +154,162 @@ + priv->localed = proxy; + } + +-static char * +-get_item (const char *buffer, const char *name) ++static void ++language_confirmed (CcLanguageChooser *chooser, ++ GisLanguagePage *page) + { +- char *label, *start, *end, *result; +- char end_char; ++ gis_assistant_next_page (gis_driver_get_assistant (GIS_PAGE (page)->driver)); ++} + +- result = NULL; +- start = NULL; +- end = NULL; +- label = g_strconcat (name, "=", NULL); +- if ((start = strstr (buffer, label)) != NULL) ++void ++get_language_from_dbus_proxy (Region_Info *self) ++{ ++ g_autoptr (GVariant) v = NULL; ++ v = ++ g_dbus_proxy_get_cached_property (G_DBUS_PROXY (self->localed), "Locale"); ++ if (v) ++ { ++ g_autofree const gchar **strv = NULL; ++ gsize len; ++ gint i; ++ strv = g_variant_get_strv (v, &len); ++ for (i = 0; strv[i]; i++) + { +- start += strlen (label); +- end_char = '\n'; +- if (*start == '"') +- { +- start++; +- end_char = '"'; +- } +- +- end = strchr (start, end_char); ++ if (g_str_has_prefix (strv[i], "LANG=")) ++ self->language = g_strdup (strv[i] + strlen ("LANG=")); + } ++ } ++} + +- if (start != NULL && end != NULL) ++void ++get_language_from_config_file (Region_Info *self) ++{ ++ g_autoptr (GFile) file = g_file_new_for_path (LOCALE_CONFIG_FILE); ++ g_autoptr (GFileInputStream) in = g_file_read (file, NULL, NULL); ++ g_assert (in != NULL); ++ gssize read; ++ char temp[1000]; ++ char *head; ++ ++ if ((read = g_input_stream_read (G_INPUT_STREAM (in), temp, ++ G_N_ELEMENTS (temp) - 1, NULL, NULL))) ++ { ++ if ((head = strstr (temp, "LANG"))) + { +- result = g_strndup (start, end - start); ++ head = index (head, '='); ++ do {head++;} ++ while (isblank (head[0])); ++ *index (head, '\n') = '\0'; ++ self->language = g_strdup (head); + } +- +- g_free (label); +- +- return result; ++ } + } + +-static void +-update_distro_logo (GisLanguagePage *page) ++static gboolean ++connect_dbus_proxy (Region_Info * self) + { +- GisLanguagePagePrivate *priv = gis_language_page_get_instance_private (page); +- char *buffer; +- char *id; ++ g_autoptr (GDBusConnection) bus = NULL; ++ g_autoptr (GError) error = NULL; ++ GDBusProxy *proxy; + +- id = NULL; ++ self->permission = ++ polkit_permission_new_sync ("org.freedesktop.locale1.set-locale", NULL, ++ NULL, &error); ++ if (self->permission == NULL) ++ { ++ g_warning ++ ("Could not get 'org.freedesktop.locale1.set-locale' permission: %s", ++ error->message); ++ return FALSE; ++ } + +- if (g_file_get_contents ("/etc/os-release", &buffer, NULL, NULL)) ++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); ++ proxy = g_dbus_proxy_new_sync (bus, ++ G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, ++ NULL, ++ "org.freedesktop.locale1", ++ "/org/freedesktop/locale1", ++ "org.freedesktop.locale1", ++ self->cancellable, &error); ++ if (!proxy) ++ { ++ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ g_warning ("Failed to contact localed: %s\n", error->message); ++ return FALSE; ++ } ++ else + { +- id = get_item (buffer, "ID"); +- g_free (buffer); ++ self->localed = proxy; ++ return TRUE; + } ++} + +- if (g_strcmp0 (id, "fedora") == 0) ++static gboolean ++get_system_language (GisPage *page) ++{ ++ gboolean language_acquire = FALSE; ++ GisLanguagePagePrivate *priv = gis_language_page_get_instance_private (GIS_LANGUAGE_PAGE (page)); ++ Region_Info *self = g_malloc0 (sizeof (Region_Info)); ++ self->language = NULL; ++ ++ /*Try to get system language from DBUS, if DBUS don't have this value, language will keep NULL.*/ ++ if (connect_dbus_proxy (self)) ++ get_language_from_dbus_proxy (self); ++ if (self->language != NULL) ++ { ++ language_acquire = TRUE; ++ priv-> system_language = g_strdup(self->language); ++ priv->new_locale_id = g_strdup(self->language); ++ } ++ /*When get languge from DBUS failed, try to get from config file.*/ ++ if (!language_acquire) ++ { ++ get_language_from_config_file (self); ++ if (self->language != NULL) + { +- g_object_set (priv->logo, "icon-name", "fedora-logo-icon", NULL); ++ language_acquire = TRUE; ++ priv-> system_language = g_strdup(self->language); ++ priv->new_locale_id = g_strdup(self->language); + } ++ } + +- g_free (id); ++ g_clear_object (&self->permission); ++ g_clear_object (&self->localed); ++ g_clear_object (&self->cancellable); ++ g_free (self->language); ++ g_free (self->region); ++ g_free (self->system_language); ++ g_free (self->system_region); ++ g_free (self); ++ return language_acquire; + } + + static void +-language_confirmed (CcLanguageChooser *chooser, +- GisLanguagePage *page) ++silent_set_system_locale_to_user (GisLanguagePage *page) + { +- gis_assistant_next_page (gis_driver_get_assistant (GIS_PAGE (page)->driver)); ++ GisLanguagePagePrivate *priv = gis_language_page_get_instance_private (page); ++ GisDriver *driver; ++ GSettings *region_settings; ++ ActUser *user; ++ ++ driver = GIS_PAGE (page)->driver; ++ setlocale (LC_MESSAGES, priv->new_locale_id); ++ ++ region_settings = g_settings_new (GNOME_SYSTEM_LOCALE_DIR); ++ g_settings_reset (region_settings, REGION_KEY); ++ g_object_unref (region_settings); ++ ++ user = act_user_manager_get_user (act_user_manager_get_default (), g_get_user_name ()); ++ ++ if (act_user_is_loaded (user)) ++ act_user_set_language (user, priv->new_locale_id); ++ else ++ g_signal_connect (user, ++ "notify::is-loaded", ++ G_CALLBACK (user_loaded), ++ page); ++ ++ gis_driver_set_user_language (driver, priv->new_locale_id); + } + + static void +@@ -257,10 +323,6 @@ + + G_OBJECT_CLASS (gis_language_page_parent_class)->constructed (object); + +- update_distro_logo (page); +- +- g_signal_connect (priv->language_chooser, "notify::language", +- G_CALLBACK (language_changed), page); + g_signal_connect (priv->language_chooser, "confirm", + G_CALLBACK (language_confirmed), page); + +@@ -283,6 +345,12 @@ + } + + gis_page_set_complete (GIS_PAGE (page), TRUE); ++ ++ gtk_widget_hide (priv->language_chooser); ++ ++ if (get_system_language(GIS_PAGE (page))) ++ silent_set_system_locale_to_user (page); ++ + gtk_widget_show (GTK_WIDGET (page)); + } + diff --git a/gnome-initial-setup.changes b/gnome-initial-setup.changes index 1655b1c..ddbb2e9 100644 --- a/gnome-initial-setup.changes +++ b/gnome-initial-setup.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Oct 24 09:47:45 UTC 2019 - Cliff Zhao + +- Update gnome-initial-setup.spec + Drop gnome-initial-setup-disable-dep-on-started-docs.patch + Drop gnome-initial-setup-mozc-engine-prioritized.patch + Drop gnome-initial-setup-only-setup-keyboard.patch + Drop gnome-initial-setup-only-launch-CJK.patch + to avoid blank docs window appear after gnome-initial-setup + finished (bnc#1125694, bnc#1131087). + ------------------------------------------------------------------- Sat Oct 5 21:53:52 UTC 2019 - Bjørn Lie @@ -78,6 +89,12 @@ Tue Mar 5 06:03:49 UTC 2019 - Bjørn Lie + Improve account page behaviour when offline. + Updated translations. +------------------------------------------------------------------- +Wed Feb 27 08:18:15 UTC 2019 - qzhao@suse.com + +- Update gnome-initial-setup-smarter.patch: + Avoid duplicate privilege requirement(FATE#321126). + ------------------------------------------------------------------- Wed Feb 20 12:12:27 UTC 2019 - bjorn.lie@gmail.com @@ -93,6 +110,17 @@ Wed Feb 20 12:12:27 UTC 2019 - bjorn.lie@gmail.com - Add pkgconfig(packagekit-glib2) BuildRequires: New dependency. - Refresh patch with refresh_patches service. +------------------------------------------------------------------- +Wed Dec 19 08:39:41 UTC 2018 - qzhao@suse.com + +- Add gnome-initial-setup-smarter.patch, + Smarter gnome initial configuration: Find a method (better + upstream compatible) to allow gnome-initial-setup decide the + pop-ups smartly based on the system wise setup provided by the + installer(FATE#325763). + Adapt previous solutions to satisfy this feature. (FATE#321126, + boo#1067288, bnc#1029083). + ------------------------------------------------------------------- Wed Sep 26 16:14:52 UTC 2018 - bjorn.lie@gmail.com diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index 084017b..6893e52 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -24,16 +24,8 @@ License: GPL-2.0-or-later Group: System/GUI/GNOME Url: https://wiki.gnome.org/Design/OS/InitialSetup Source0: https://download.gnome.org/sources/gnome-initial-setup/3.34/%{name}-%{version}.tar.xz - -# PATCH-FEATURE-SLE gnome-initial-setup-only-launch-CJK.patch FATE#321126 qzhao@suse.com -- Make gnome-initial-setup only work for CJK -Patch0: gnome-initial-setup-only-launch-CJK.patch -# PATCH-FEATURE-SLE gnome-initial-setup-only-setup-keyboard.patch FATE#321126 yfjiang@suse.com -- Only launch the keyboard and IM setup -Patch1: gnome-initial-setup-only-setup-keyboard.patch -# PATCH-FEATURE-SLE gnome-initial-setup-disable-dep-on-started-docs.patch FATE#321126 yfjiang@suse.com -- Disable help dialog after g-i-s system to remove the dependency of gnome-getting-started-docs -Patch2: gnome-initial-setup-disable-dep-on-started-docs.patch -# PATCH-FIX-OPENSUSE gnome-initial-setup-mozc-engine-prioritized.patch boo#1067288 bnc#1029083 qzhao@suse.com -- Make the Mozc input engine as the 1st choice for Japanese environment. -Patch3: gnome-initial-setup-mozc-engine-prioritized.patch - +# PATCH-FEATURE-SLE gnome-initial-setup-smarter.patch FATE#325763 FATE#321126 boo#1067288 bnc#1029083 qzhao@suse.com -- Investigate gnome-initial-setup, and make a Smarter gnome initial configuration. +Patch0: gnome-initial-setup-smarter.patch BuildRequires: krb5-devel BuildRequires: meson BuildRequires: pkgconfig @@ -79,13 +71,10 @@ Initial assistant, helping you to get the system up and running. %prep %setup -q -# Only enable keyboard/im setup feature in CJK environment on both sle and leap, keeping tw consistent with upstream -%if 0%{?sle_version} >= 120300 +%if !0%{?is_opensuse} %patch0 -p1 -%patch1 -p1 -%patch2 -p1 %endif -%patch3 -p1 + %build %meson \ @@ -94,6 +83,10 @@ Initial assistant, helping you to get the system up and running. %install %meson_install +%if !0%{?is_opensuse} +rm -rf %{buildroot}%{_libexecdir}/gnome-welcome-tour +rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/gnome-welcome-tour.desktop +%endif %find_lang %{name} %{?no_lang_C} %pre @@ -115,10 +108,8 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} || : %{_datadir}/polkit-1/rules.d/20-gnome-initial-setup.rules %{_libexecdir}/gnome-initial-setup %{_libexecdir}/gnome-initial-setup-copy-worker -%{_libexecdir}/gnome-welcome-tour %{_sysconfdir}/xdg/autostart/gnome-initial-setup-copy-worker.desktop %{_sysconfdir}/xdg/autostart/gnome-initial-setup-first-login.desktop -%{_sysconfdir}/xdg/autostart/gnome-welcome-tour.desktop %{_userunitdir}/gnome-initial-setup-copy-worker.service %{_userunitdir}/gnome-initial-setup-first-login.service %{_userunitdir}/gnome-initial-setup.service @@ -129,6 +120,10 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} || : %{_userunitdir}/gnome-session.target.wants/gnome-welcome-tour.service %dir %{_userunitdir}/gnome-session@gnome-initial-setup.target.wants %{_userunitdir}/gnome-session@gnome-initial-setup.target.wants/gnome-initial-setup.service +%if 0%{?is_opensuse} +%{_libexecdir}/gnome-welcome-tour +%{_sysconfdir}/xdg/autostart/gnome-welcome-tour.desktop +%endif %files lang -f %{name}.lang