Hi Martin,
Just an update: The patch you pointed out, includes following line:
+PACKAGECONFIG[python] =
"--with-python=${PYTHON},--without-python,,python3-core"
However, I found another patch from you:
https://patchwork.openembedded.org/patch/147883/
which includes:
+PACKAGECONFIG[python] =
"--with-python=${PYTHON},--without-python,python3-core,python3-core"
With that change, I was able to build core-image-minimal, and python3 is
removed from target rootfs.
Thanks for the help
Carlos
-----Original Message-----
From: [email protected] <[email protected]> On Behalf
Of Bejar-Colonia, Carlos
Sent: Tuesday, June 26, 2018 5:27 PM
To: Martin Hundebøll <[email protected]>; Khem Raj <[email protected]>
Cc: Yocto Project <[email protected]>
Subject: Re: [yocto] Rocko: how to remove python3 from target's rootfs
Hi Martin,
I've downloaded bind_9.10.6.bb recipe and applied the patch you pointed, but
do_install fails
error: invalid Python installation: unable to open
/home/carlos/develop/allegro/build-atmel/tmp/work/cortexa5hf-vfp-poky-linux-gnueabi/bind/9.10.6-r0/recipe-sysroot/usr/lib/python3.5/config-3.5m/Makefile
(No such file or directory)
Makefile:465: recipe for target 'install' failed
make[2]: *** [install] Error 1
make[2]: Leaving directory
'/home/carlos/develop/allegro/build-atmel/tmp/work/cortexa5hf-vfp-poky-linux-gnueabi/bind/9.10.6-r0/build/bin/python'
Makefile:114: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory
'/home/carlos/develop/allegro/build-atmel/tmp/work/cortexa5hf-vfp-poky-linux-gnueabi/bind/9.10.6-r0/build/bin'
Makefile:120: recipe for target 'install' failed
make: *** [install] Error 1
ERROR: oe_runmake failed
I've also tried the patch from Armin Kuster (Patch ID 151778), bind_9.12.1.bb
builds fine, but dhcp_4.3.6.bb do_compile fails
./.libs/libomapi.so: undefined reference to `POST'
collect2: error: ld returned 1 exit status
Makefile:433: recipe for target 'svtest' failed
make[1]: *** [svtest] Error 1
make[1]: Leaving directory
'/home/carlos/develop/allegro/build-atmel/tmp/work/cortexa5hf-vfp-poky-linux-gnueabi/dhcp/4.3.6-r0/build/omapip'
Makefile:464: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.
This error is similar to what is posted here:
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ferrors.yoctoproject.org%2FErrors%2FDetails%2F180628%2F&data=02%7C01%7Ccarlos.bejar-colonia%40philips.com%7C2bf072692e2e474451f508d5dbb8b70e%7C1a407a2d76754d178692b3ac285306e4%7C0%7C0%7C636656508753264238&sdata=joLMocU8wz3z5uAPMJ%2FigSK0mpbuPjkQPXUzeI0JKko%3D&reserved=0
Could you clarified if those errors were already handled, so I can fetch the
fix?
Thanks,
Carlos
-----Original Message-----
From: Martin Hundebøll <[email protected]>
Sent: Tuesday, June 26, 2018 2:59 AM
To: Bejar-Colonia, Carlos <[email protected]>; Khem Raj
<[email protected]>
Cc: Yocto Project <[email protected]>
Subject: Re: [yocto] Rocko: how to remove python3 from target's rootfs
Hi Bejar,
On 2018-06-25 22:02, Bejar-Colonia, Carlos wrote:
> Looks like the dhcp dependency is explicit: dhcp->bind->python3
> recipes-connectivity/dhcp/dhcp.inc
> DEPENDS = "openssl bind"
> recipes-connectivity/bind/bind_9.10.5-P3.bb
> RDEPENDS_${PN} = "python3-core"
>
> In the build area: dhcp/4.3.6-r0/packages-split/dhcp-client.shlibdeps
> dhcp-libs (>= 4.3.6)
> bind (>= 9.10.5-P3)
> glibc (>= 2.26)
>
> Does it mean that python3 cannot be removed from target rootfs?
>
> On the other hand, I see this file in rootfs: /usr/sbin/dnssec-checkds, which
> requires python3 (#! /usr/bin/python3).
> I believe this file gets installed from bind_9.10.5-P3.bb
>
> do_install_append() {
> sed -i -e '1s,#!.*python3,#! /usr/bin/python3,'
> ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds }
>
> How can I move this file to a different package?
I had the same issue a while back, and submitted this patch:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.openembedded.org%2Fpatch%2F148257%2F&data=02%7C01%7Ccarlos.bejar-colonia%40philips.com%7C5bf80069779142d49a9208d5db324507%7C1a407a2d76754d178692b3ac285306e4%7C0%7C0%7C636655931318995045&sdata=2QBW2XS2r7Kx3mQdTN%2BPVQpCvp%2Bh0TI7Ql6HPJymlBU%3D&reserved=0
Since then Armin incorporated my patch with his version upgrade here:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.openembedded.org%2Fpatch%2F151778%2F&data=02%7C01%7Ccarlos.bejar-colonia%40philips.com%7C5bf80069779142d49a9208d5db324507%7C1a407a2d76754d178692b3ac285306e4%7C0%7C0%7C636655931318995045&sdata=yIMyeknuFenkNPGtG7ItvX6WzNnhhNbF1Exoca9vmNw%3D&reserved=0
If you maintain your own meta layer, you can either create a bbappend file to
implement the package config feature, or you can simply add the updated version
from Armin.
// Martin
> -----Original Message-----
> From: Khem Raj <[email protected]>
> Sent: Friday, June 22, 2018 11:33 AM
> To: Bejar-Colonia, Carlos <[email protected]>
> Cc: Yocto Project <[email protected]>
> Subject: Re: [yocto] Rocko: how to remove python3 from target's rootfs
>
> On Fri, Jun 22, 2018 at 8:17 AM Bejar-Colonia, Carlos
> <[email protected]> wrote:
>>
>> Hello Yocto Team,
>>
>>
>>
>> I’ve upgraded my Yocto system from Morty to Rocko and I’ve noticed
>> that python3 gets installed in the rootfs, which I don’t want (it
>> takes a lot disk space)
>>
>> I’ve noticed that when I add dhcp-client package to the rootfs
>> (CORE_IMAGE_EXTRA_INSTALL += "dhcp-client"), python3 gets installed as well.
>>
>> However, with Morty, python3 does not get installed in the rootfs after
>> adding dhcp-client pakage.
>>
>>
>>
>> Probably someone has already done this, but I was not able to figure it out.
>> I tried: IMAGE_INSTALL_remove += "python3-core", didn’t help.
>>
>> Any hints on how to remove python3 from the target’s rootfs (without
>> removing dhcp-client)?
>
> when there are scripts in packages which requires a certain kind of
> interpreter e.g. perl. python. bash, sh etc. system can autodetect that if
> interpreter is specified in first line of script and add the appropriate
> runtime dependency, since this script otherwise will be useless on target.
>
> I suspect build for dhcp is adding such a file into dhcp-client package which
> might be resulting in this implicit dep.
>
> So please check it in the build area for dhcp especially under
> packages-split/dhcp-client
>
> for any such scripts.
>
> if there are any and you find that these scripts are not required for
> normal functioning of dhcp-client on target then move this script out
> into another package where it might be more appropriate, that can
> eliminate this rdep
>>
>>
>>
>> Thanks,
>>
>> Carlos
>>
>>
>>
>>
>>
>>
>> ________________________________
>> The information contained in this message may be confidential and legally
>> protected under applicable law. The message is intended solely for the
>> addressee(s). If you are not the intended recipient, you are hereby notified
>> that any use, forwarding, dissemination, or reproduction of this message is
>> strictly prohibited and may be unlawful. If you are not the intended
>> recipient, please contact the sender by return e-mail and destroy all copies
>> of the original message.
>> --
>> _______________________________________________
>> yocto mailing list
>> [email protected]
>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
>> s
>> ts.yoctoproject.org%2Flistinfo%2Fyocto&data=02%7C01%7Ccarlos.bejar-co
>> l
>> onia%40philips.com%7C61df7be949544db87dd608d5d85573b8%7C1a407a2d76754
>> d
>> 178692b3ac285306e4%7C0%7C0%7C636652783876282171&sdata=ufsRBgUTpR%2Fkm
>> X
>> nFCeMK0DbS27uX9L8z15Y0S3Z%2Bct0%3D&reserved=0
--
Kind regards,
Martin Hundebøll
Embedded Linux Consultant
+45 61 65 54 61
[email protected]
Geanix IVS
DK39600706
--
_______________________________________________
yocto mailing list
[email protected]
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Flistinfo%2Fyocto&data=02%7C01%7Ccarlos.bejar-colonia%40philips.com%7C2bf072692e2e474451f508d5dbb8b70e%7C1a407a2d76754d178692b3ac285306e4%7C0%7C0%7C636656508753264238&sdata=ZaUC2yrZt5sKENBgjyfoKjBVvmDiDPpuI1BC%2F%2F2LHLM%3D&reserved=0
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto