OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
301 stars 152 forks source link

libnss_* is being stripped from netboot #798

Closed luizluca closed 6 years ago

luizluca commented 6 years ago

Problem description

I'm building a LEAP 15.0 PXE image from Tumbleweed that uses NBD root:

<type image="pxe" filesystem="squashfs" boot="netboot/suse-leap15.0"/>

After the initrd is created, it cannot mount root because DNS fails. The root cause is missing libnss_* libraries. There were stripped.

$ grep libnss_dns build/image-root.log 
DEBUG: --> kiwi_strip_libs='libdmraid-events-isw libfontenc libfreetype libgcc_s libnsl libnss_compat libnss_dns libnss_files libpng libresolv librt libsysfs libutempter libutil libkmod libselinux libsepol libdevmapper libply-boot-client libply-splash-graphics libsplashy libsplashycnf libjpeg libkms libaio libdrm'
DEBUG: Removing library: /lib64/libnss_dns-2.26.so

I copied the <strip type="libs"> section from /usr/lib/python3.6/site-packages/kiwi/config/strip.xml into my kiwi configuration. However, it did not change the behavior.

Expected behaviour

libnss_dns should not be removed, specially from a netboot initrd

Steps to reproduce the behaviour

OS and Software information

schaefi commented 6 years ago

Hmm, that's bad. actually the libs listed in should be protected from any removal, libnss_dns is part of it.

@davidcassany: could you take a look at this one ?

davidcassany commented 6 years ago

@schaefi, sure I'm having a look