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

Submitted by brendank310 on Oct. 29, 2018, 4:41 p.m. | Patch ID: 155949

Details

Message ID a3ce539915c9a45c2b8032260ea65d6ee5b00f6b.1540830650.git.brendank310@gmail.com
State Changes Requested
Headers show

Commit Message

brendank310 Oct. 29, 2018, 4:41 p.m.
From: Brendan Kerrigan <kerriganb@ainfosec.com>

Signed-off-by: Brendan Kerrigan <kerriganb@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

Patch hide | download patch | download mbox

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@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@.@1@.@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}"
+FILES_${PN} += "${libdir}"
+
+SRCREV="${AUTOREV}"
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson gobject-introspection 
+

Comments

Andreas Müller Oct. 29, 2018, 10:43 p.m.
On Mon, Oct 29, 2018 at 5:41 PM brendank310 <brendank310@gmail.com> wrote:
>
> From: Brendan Kerrigan <kerriganb@ainfosec.com>
>
> Signed-off-by: Brendan Kerrigan <kerriganb@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@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@.@1@.@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
>
Ross Burton Oct. 30, 2018, 11:30 a.m.
On Mon, 29 Oct 2018 at 16:42, brendank310 <brendank310@gmail.com> wrote:
> +accountsservice: Remove internationalization
> +
> +  The i18n internationalization fails within the OE
> +  environment.

Probably because you don't depend on gettext-native.

> +         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 \

That's a mirror of
https://gitlab.freedesktop.org/accountsservice/accountsservice.

Also tarballs are at https://www.freedesktop.org/software/accountsservice/.

> +           file://0001-strip-out-intl.patch \
> +           "
> +
> +FILES_${PN} += "${systemd_system_unitdir}"

Use the systemd class instead.

> +FILES_${PN} += "${libdir}"

As discussed.

> +SRCREV="${AUTOREV}"

As discussed.

Ross
Martin Jansa Oct. 30, 2018, 11:48 a.m.
On Mon, Oct 29, 2018 at 11:43:09PM +0100, Andreas Müller wrote:
> On Mon, Oct 29, 2018 at 5:41 PM brendank310 <brendank310@gmail.com> wrote:
> >
> > From: Brendan Kerrigan <kerriganb@ainfosec.com>
> >
> > Signed-off-by: Brendan Kerrigan <kerriganb@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@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@.@1@.@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 \

protocol=git and branch=master are default, please drop them.

> > +           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.

Please while doing these styleguide changes, please use 4 spaces for
indentation *everywhere* and the closing " for multiline variables
should be first character on separate line (not indented).

This does apply to other changes in this patch series as well.

> > +FILES_${PN} += "${libdir}"
> ^ Is this required?
> > +
> > +SRCREV="${AUTOREV}"
> ^ No AUTOREV - set a commid ID

And set PV to something meaningful while doing that.

> > +S = "${WORKDIR}/git"
> > +
> > +inherit pkgconfig meson gobject-introspection
> > +
> > --
> > 2.17.1
> >
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel