Patchwork [1/2] sysvinit: don't use useradd

login
register
mail settings
Submitter Saul Wold
Date Sept. 24, 2013, 2:45 p.m.
Message ID <1380033916-31464-2-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/58675/
State New
Headers show

Comments

Saul Wold - Sept. 24, 2013, 2:45 p.m.
It causes shadow to be used in core-image-minimal and increase the
size by 1.5M.  We will add the shutdown user to group via base-passwd
Ensure that sysvinit depends on base-passwd for the group chown.

[YOCTO #5230]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
Saul Wold - Sept. 24, 2013, 3:04 p.m.
On 09/24/2013 07:45 AM, Saul Wold wrote:
> It causes shadow to be used in core-image-minimal and increase the
> size by 1.5M.  We will add the shutdown user to group via base-passwd
> Ensure that sysvinit depends on base-passwd for the group chown.
>
> [YOCTO #5230]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>   meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
> index 97ecc51..9ec92e2 100644
> --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
> +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
>                       file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
>   PR = "r11"
>
> -RDEPENDS_${PN} = "${PN}-inittab"
> +RDEPENDS_${PN} = "${PN}-inittab base-passwd"
>
This should be in DEPENDS, RP has this already patched.

Thanks
	Sau!

>   SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/sysvinit/sysvinit-${PV}.tar.bz2 \
>              file://install.patch \
> @@ -24,7 +24,7 @@ SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5
>   S = "${WORKDIR}/sysvinit-${PV}"
>   B = "${S}/src"
>
> -inherit update-alternatives useradd
> +inherit update-alternatives
>   DEPENDS_append = " update-rc.d-native"
>
>   ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall"
> @@ -53,9 +53,6 @@ ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
>   ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
>   ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
>
> -USERADD_PACKAGES = "${PN}"
> -GROUPADD_PARAM_${PN} = "--system shutdown"
> -
>   PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
>   FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
>   FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
>

Patch

diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 97ecc51..9ec92e2 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -7,7 +7,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
 PR = "r11"
 
-RDEPENDS_${PN} = "${PN}-inittab"
+RDEPENDS_${PN} = "${PN}-inittab base-passwd"
 
 SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/sysvinit/sysvinit-${PV}.tar.bz2 \
            file://install.patch \
@@ -24,7 +24,7 @@  SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5
 S = "${WORKDIR}/sysvinit-${PV}"
 B = "${S}/src"
 
-inherit update-alternatives useradd
+inherit update-alternatives
 DEPENDS_append = " update-rc.d-native"
 
 ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall"
@@ -53,9 +53,6 @@  ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
 ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
 ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
 
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system shutdown"
-
 PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
 FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
 FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"