[oe-commits] Richard Purdie : base-passwd: Move update-passwd into a separate package

git at git.openembedded.org git at git.openembedded.org
Thu Nov 17 10:47:26 UTC 2011


Module: openembedded-core.git
Branch: master-next
Commit: 77ab0f09546c5f6217a8e2f1bc30cf3d4306e3fa
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=77ab0f09546c5f6217a8e2f1bc30cf3d4306e3fa

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Mon Nov 14 13:54:22 2011 +0000

base-passwd: Move update-passwd into a separate package

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 at linuxfoundation.org>

---

 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

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..5feb924 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 [ -n "$D" ]; then
+	exit 0
+fi
+${sbindir}/update-passwd
+}





More information about the Openembedded-commits mailing list