From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-gnome/meta-xfce 1/4] gdm: fix postinst-code to unbreak first boot issues
Date: Sat, 27 Apr 2013 21:31:11 +0200 [thread overview]
Message-ID: <20130427193111.GF3199@jama> (raw)
In-Reply-To: <1367087640-4264-2-git-send-email-schnitzeltony@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 3498 bytes --]
On Sat, Apr 27, 2013 at 08:33:57PM +0200, Andreas Müller wrote:
> Exiting postinst code leaves systemd.bbclass offline postinst code unexecuted,
> causes postinst not to finish at first boot (gdm.service is not aliased to
> display-manager.service -> started much too early) and is not neccesary:
> language preparation can be done offline.
>
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
> meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb | 31 ++++++++++-----------------
> 1 files changed, 12 insertions(+), 19 deletions(-)
>
> diff --git a/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb b/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb
> index 1e55dd9..87efc28 100644
> --- a/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb
> +++ b/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb
> @@ -4,9 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
>
> DEPENDS = "xinput gnome-panel tcp-wrappers libcanberra libxklavier grep consolekit libpam gnome-doc-utils gtk+ xrdb"
>
> -PR = "r15"
> +PR = "r16"
>
> -inherit gnome update-rc.d systemd
> +inherit gnome update-rc.d systemd useradd
>
> SRC_URI += " \
> file://cross-xdetection.diff \
> @@ -33,8 +33,8 @@ do_configure_prepend() {
> }
>
> do_install_prepend() {
> - mkdir -p ${D}/var/lib/gdm/.gconf.mandatory
> - cp ${WORKDIR}/%gconf-tree.xml ${D}/var/lib/gdm/.gconf.mandatory/
> + install -d ${D}/${localstatedir}/lib/gdm/.gconf.mandatory
> + install ${WORKDIR}/%gconf-tree.xml ${D}/${localstatedir}/lib/gdm/.gconf.mandatory/
> }
>
> do_install_append() {
> @@ -54,6 +54,9 @@ do_install_append() {
> sed -e 's,%sbindir%,${sbindir},g' \
> < ${WORKDIR}/gdm.service.in \
> > ${D}${systemd_unitdir}/system/gdm.service
> +
> + chown -R gdm:gdm ${D}${localstatedir}/lib/gdm
> + chmod 0750 ${D}${localstatedir}/lib/gdm
> }
>
> FILES_${PN} += "${datadir}/icon* \
> @@ -72,23 +75,13 @@ SYSTEMD_SERVICE_${PN} = "gdm.service"
> INITSCRIPT_NAME = "gdm"
> INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
>
> -pkg_postinst_${PN} () {
> - # can't do this offline
> - if [ "x$D" != "x" ]; then
> - exit 1
> - fi
> - grep "^gdm:" /etc/group > /dev/null || addgroup gdm
> - grep "^gdm:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/gdm gdm --ingroup gdm -g gdm
> -
> -if [ -d /var/lib/gdm ]; then
> - chown -R gdm:gdm /var/lib/gdm
> - chmod 0750 /var/lib/gdm
> -fi
> +USERADD_PACKAGES = "${PN}"
> +USERADD_PARAM_${PN} = "--system --no-create-home --home ${localstatedir}/lib/gdm --user-group gdm"
>
> +pkg_postinst_${PN} () {
> # Register up as default dm
> -mkdir -p ${sysconfdir}/X11/
> -echo "${bindir}/gdm" > ${sysconfdir}/X11/default-display-manager
> -
> +mkdir -p $D${sysconfdir}/X11/
> +echo "${bindir}/gdm" > $D${sysconfdir}/X11/default-display-manager
Maybe we should use u-a for default-display-manager like we use x-window-manager for WMs.
but git grep display-manager shows only
meta-oe/recipes-graphics/nonworking/slim/slim_1.3.2.bb
doing the same as gdm
> }
>
> pkg_postrm_${PN} () {
> --
> 1.7.4.4
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2013-04-27 19:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 18:33 [meta-gnome/meta-xfce 0/4] gdm/xfce-enhancements Andreas Müller
2013-04-27 18:33 ` [meta-gnome/meta-xfce 1/4] gdm: fix postinst-code to unbreak first boot issues Andreas Müller
2013-04-27 19:31 ` Martin Jansa [this message]
2013-04-29 7:33 ` Andreas Müller
2013-05-02 14:48 ` Andreas Müller
2013-05-02 14:58 ` Andreas Müller
2013-05-03 11:35 ` Martin Jansa
2013-05-03 11:44 ` Andreas Müller
2013-04-27 18:33 ` [meta-gnome/meta-xfce 2/4] gdm: avoid displaying system users in greeter's list Andreas Müller
2013-04-27 18:33 ` [meta-gnome/meta-xfce 3/4] gdm: cosmetics Andreas Müller
2013-04-27 18:34 ` [meta-gnome/meta-xfce 4/4] xfce4-session: remove unconditional consolekit RDEPENDS and use PACKAGECONFIG Andreas Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130427193111.GF3199@jama \
--to=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.