[oe] [RFC meta-gnome][PATCH 04/16] accountsservice: add recipe for Accounts Service

Andreas Müller schnitzeltony at gmail.com
Mon Oct 29 22:43:09 UTC 2018


On Mon, Oct 29, 2018 at 5:41 PM brendank310 <brendank310 at gmail.com> wrote:
>
> From: Brendan Kerrigan <kerriganb at ainfosec.com>
>
> Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
> ---
>  .../accountsservice/0001-strip-out-intl.patch | 104 ++++++++++++++++++
>  .../gnome3/accountsservice_git.bb             |  24 ++++
>  2 files changed, 128 insertions(+)
>  create mode 100644 meta-gnome/recipes-gnome/gnome3/accountsservice/0001-strip-out-intl.patch
>  create mode 100644 meta-gnome/recipes-gnome/gnome3/accountsservice_git.bb
>
> diff --git a/meta-gnome/recipes-gnome/gnome3/accountsservice/0001-strip-out-intl.patch b/meta-gnome/recipes-gnome/gnome3/accountsservice/0001-strip-out-intl.patch
> new file mode 100644
> index 000000000..622b3335d
> --- /dev/null
> +++ b/meta-gnome/recipes-gnome/gnome3/accountsservice/0001-strip-out-intl.patch
> @@ -0,0 +1,104 @@
> +accountsservice: Remove internationalization
> +
> +  The i18n internationalization fails within the OE
> +  environment.
> +
> +  Upstream-Status: Inappropriate [disable-feature]
> +
> +  Signed-off-by: Brendan Kerrigan <kerriganb at ainfosec.com>
> +
> +diff --git a/data/meson.build b/data/meson.build
> +index 4987937..6274e5d 100644
> +--- a/data/meson.build
> ++++ b/data/meson.build
> +@@ -28,15 +28,6 @@ configure_file(
> +
> + policy = act_namespace.to_lower() + '.policy'
> +
> +-i18n.merge_file(
> +-  policy,
> +-  input: policy + '.in',
> +-  output: policy,
> +-  po_dir: po_dir,
> +-  install: true,
> +-  install_dir: policy_dir,
> +-)
> +-
> + if install_systemd_unit_dir
> +   service = 'accounts-daemon.service'
> +
> +diff --git a/meson.build b/meson.build
> +index 77b6a3f..7da5d5d 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -25,8 +25,6 @@ act_pkgincludedir = join_paths(act_includedir, act_api_name)
> +
> + act_namespace = 'org.freedesktop.Accounts'
> +
> +-act_gettext = 'accounts-service'
> +-
> + soversion = 0
> + current = 0
> + revision = 0
> +@@ -35,11 +33,9 @@ libversion = '@0 at .@1 at .@2@'.format(soversion, current, revision)
> + act_buildtype = get_option('buildtype')
> +
> + gnome = import('gnome')
> +-i18n = import('i18n')
> + pkg = import('pkgconfig')
> +
> + data_dir = join_paths(meson.current_source_dir(), 'data')
> +-po_dir = join_paths(meson.current_source_dir(), 'po')
> +
> + top_inc = include_directories('.')
> +
> +@@ -52,9 +48,6 @@ config_h.set_quoted('VERSION', act_version)
> + config_h.set('_DEFAULT_SOURCE', true)
> + config_h.set('_GNU_SOURCE', true)
> +
> +-# i18n
> +-config_h.set_quoted('GETTEXT_PACKAGE', act_gettext)
> +-
> + # headers
> + check_headers = [
> +   'paths.h',
> +@@ -182,7 +175,6 @@ config_h.set('WITH_SYSTEMD', enable_systemd or enable_elogind)
> +
> + subdir('data')
> + subdir('src')
> +-subdir('po')
> +
> + enable_docbook = get_option('docbook')
> + if enable_docbook
> +diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
> +index 12be9cb..712db6c 100644
> +--- a/src/libaccountsservice/act-user-manager.c
> ++++ b/src/libaccountsservice/act-user-manager.c
> +@@ -35,7 +35,6 @@
> + #endif /* HAVE_PATHS_H */
> +
> + #include <glib.h>
> +-#include <glib/gi18n-lib.h>
> + #include <glib/gstdio.h>
> + #include <glib-object.h>
> + #include <gio/gio.h>
> +diff --git a/src/main.c b/src/main.c
> +index 9caec7f..acbd422 100644
> +--- a/src/main.c
> ++++ b/src/main.c
> +@@ -155,7 +155,6 @@ main (int argc, char *argv[])
> +         };
> +
> +         setlocale (LC_ALL, "");
> +-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
> +
> + #if !GLIB_CHECK_VERSION (2, 35, 3)
> +         g_type_init ();
> +@@ -167,7 +166,6 @@ main (int argc, char *argv[])
> +         }
> +
> +         context = g_option_context_new ("");
> +-        g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
> +         g_option_context_set_summary (context, _("Provides D-Bus interfaces for querying and manipulating\nuser account information."));
> +         g_option_context_add_main_entries (context, entries, NULL);
> +         if (!g_option_context_parse (context, &argc, &argv, &error)) {
> diff --git a/meta-gnome/recipes-gnome/gnome3/accountsservice_git.bb b/meta-gnome/recipes-gnome/gnome3/accountsservice_git.bb
> new file mode 100644
> index 000000000..a019a8c6d
> --- /dev/null
> +++ b/meta-gnome/recipes-gnome/gnome3/accountsservice_git.bb
> @@ -0,0 +1,24 @@
> +DESCRIPTION = "Accounts Service"
> +LICENSE = "GPLv3"
> +DEPENDS = " \
> +            glib-2.0 \
> +            gsettings-desktop-schemas \
> +            polkit \
> +            dbus \
> +          "
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> +
> +SRC_URI = "git://anongit.freedesktop.org/accountsservice.git;protocol=git;branch=master \
> +           file://0001-strip-out-intl.patch \
> +           "
> +
> +FILES_${PN} += "${systemd_system_unitdir}"
> +FILES_${PN} += "${datadir}"
^ I hate styleguide nitpickers :) - but please put this into one
statement and to the end of the recipe.
> +FILES_${PN} += "${libdir}"
^ Is this required?
> +
> +SRCREV="${AUTOREV}"
^ No AUTOREV - set a commid ID
> +S = "${WORKDIR}/git"
> +
> +inherit pkgconfig meson gobject-introspection
> +
> --
> 2.17.1
>



More information about the Openembedded-devel mailing list