Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: [PATCH] base-passwd: Move update-passwd into a separate package
Date: Mon, 14 Nov 2011 13:57:19 +0000	[thread overview]
Message-ID: <1321279039.26881.62.camel@ted> (raw)
In-Reply-To: <8AFC2447-9963-4DF0-80E2-198516B3A813@dominion.thruhere.net>

update-passwd is the only user of the passwd/group.master files
and was never used by OE since it wasn't run.

This patch packages this separately and adds an appropriate postinst
to make the package useful so people can include it as they wish.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
index 05be23f..f6e17f9 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Base system master password/group files."
 DESCRIPTION = "The master copies of the user database files
(/etc/passwd and /etc/group).  The update-passwd tool is also provided
to keep the system databases synchronized with these master files."
 SECTION = "base"
-PR = "r5"
+PR = "r9"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM =
"file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
 
@@ -16,6 +16,11 @@ S = "${WORKDIR}/base-passwd"
 
 inherit autotools
 
+PACKAGES =+ "${PN}-update"
+FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}"
+
+ALLOW_EMPTY_${PN} = "1"
+
 SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
 
 do_install () {
@@ -78,3 +83,10 @@ fi
 	d.setVar('pkg_preinst_${PN}', preinst)
 }
 
+pkg_postinst_${PN}-update () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+	exit 0
+fi
+${sbindir}/update-passwd
+}





  reply	other threads:[~2011-11-14 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 12:49 [PATCH] base-passwd: Fix the broken preinst/postinstall Richard Purdie
2011-11-14 12:52 ` Phil Blundell
2011-11-14 13:03   ` Otavio Salvador
2011-11-14 13:37   ` Koen Kooi
2011-11-14 13:57     ` Richard Purdie [this message]
2011-11-14 15:15       ` [PATCH] base-passwd: Move update-passwd into a separate package Phil Blundell
2011-11-14 17:19         ` Richard Purdie
2011-11-14 17:38           ` Phil Blundell
2011-11-14 13:58     ` [PATCH] base-passwd: Fix the broken preinst/postinstall Richard Purdie

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=1321279039.26881.62.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox