All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't replace login.defs with shadow-sysroot bbappend
@ 2016-07-28  7:26 Oliver Graute
  2016-07-28  7:53 ` Zhenhua Luo
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Graute @ 2016-07-28  7:26 UTC (permalink / raw)
  To: yocto

Hello list,

i'm trying to replace /etc/login.defs on the target with my own one. So
I created a shadow-sysroot_%.bbappend file with this content:

FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"

# As we're overriding login.defs_shadow-sysroot we have to readd the checksum for it here
# as it's containing the license for this component
LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=286ba0946b3b8a300da3893d7b3af060"

SRC_URI_append = " file://login.defs_shadow-sysroot "

S = "${WORKDIR}"

do_install_append() {
	install -d ${D}${sysconfdir}
	install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
}

FILES_${PN} = "${D}${sysconfdir}/login.defs"


If I run "bitbake shadow-sysroot" everything seems fine. But on the target
there is no package shadow-sysroot after a complete image build. Just these:

opkg list  | grep shadow
shadow - 4.2.1-r0
shadow-base - 4.2.1-r0
shadow-securetty - 4.2.1-r3

If I explicit added shadow-sysroot to my fsl-image.bb where I put all my
other packages for the target in I get this error.

bitbake fsl-image

Collected errors:
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'shadow-sysroot'.

ERROR: Function failed: do_rootfs


Some clue what is wrong here? I'am on jethro yocto branch.

Best regards,

Oliver


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can't replace login.defs with shadow-sysroot bbappend
  2016-07-28  7:26 Can't replace login.defs with shadow-sysroot bbappend Oliver Graute
@ 2016-07-28  7:53 ` Zhenhua Luo
  2016-07-29 11:53   ` Oliver Graute
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenhua Luo @ 2016-07-28  7:53 UTC (permalink / raw)
  To: Oliver Graute; +Cc: yocto@yoctoproject.org

Hi Oliver, 

The following line in shadow-sysroot.bb disables the final binary packages generation. You can try to add bbappend for shadow to do the customization. 

# don't create any packages
# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
# and this has another copy of /etc/login.defs already provided by shadow
PACKAGES = ""


Best Regards,

Zhenhua

> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] On Behalf Of Oliver Graute
> Sent: Thursday, July 28, 2016 3:26 PM
> To: yocto@yoctoproject.org
> Subject: [yocto] Can't replace login.defs with shadow-sysroot bbappend
> 
> Hello list,
> 
> i'm trying to replace /etc/login.defs on the target with my own one. So I
> created a shadow-sysroot_%.bbappend file with this content:
> 
> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
> 
> # As we're overriding login.defs_shadow-sysroot we have to readd the
> checksum for it here # as it's containing the license for this component
> LIC_FILES_CHKSUM = "file://login.defs_shadow-
> sysroot;md5=286ba0946b3b8a300da3893d7b3af060"
> 
> SRC_URI_append = " file://login.defs_shadow-sysroot "
> 
> S = "${WORKDIR}"
> 
> do_install_append() {
> 	install -d ${D}${sysconfdir}
> 	install -p -m 755 ${S}/login.defs_shadow-sysroot
> ${D}${sysconfdir}/login.defs }
> 
> FILES_${PN} = "${D}${sysconfdir}/login.defs"
> 
> 
> If I run "bitbake shadow-sysroot" everything seems fine. But on the target
> there is no package shadow-sysroot after a complete image build. Just these:
> 
> opkg list  | grep shadow
> shadow - 4.2.1-r0
> shadow-base - 4.2.1-r0
> shadow-securetty - 4.2.1-r3
> 
> If I explicit added shadow-sysroot to my fsl-image.bb where I put all my other
> packages for the target in I get this error.
> 
> bitbake fsl-image
> 
> Collected errors:
>  * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'shadow-
> sysroot'.
> 
> ERROR: Function failed: do_rootfs
> 
> 
> Some clue what is wrong here? I'am on jethro yocto branch.
> 
> Best regards,
> 
> Oliver
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can't replace login.defs with shadow-sysroot bbappend
  2016-07-28  7:53 ` Zhenhua Luo
@ 2016-07-29 11:53   ` Oliver Graute
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Graute @ 2016-07-29 11:53 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: yocto@yoctoproject.org

On 28/07/16, Zhenhua Luo wrote:
> Hi Oliver, 
> 
> The following line in shadow-sysroot.bb disables the final binary packages generation. You can try to add bbappend for shadow to do the customization. 
> 
> # don't create any packages
> # otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
> # and this has another copy of /etc/login.defs already provided by shadow
> PACKAGES = ""

thx for this usefull note. It works for me with shadow_%.bbappend.

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://login.defs"

do_install_append() {
	install -m 644 ${WORKDIR}/login.defs ${D}${sysconfdir}/login.defs
}

FILES_${PN} += "${sysconfdir}/login.defs"

Best regards,

Oliver


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-29 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28  7:26 Can't replace login.defs with shadow-sysroot bbappend Oliver Graute
2016-07-28  7:53 ` Zhenhua Luo
2016-07-29 11:53   ` Oliver Graute

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.