OSInside / kiwi

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

ubuntu 18.04 deboostrap with https / missing components in debootstrap #1157

Closed lorenzen-b1 closed 5 years ago

lorenzen-b1 commented 5 years ago

Problem description

generation of an ubuntu image /w https URIs in the repositories fails because apt-transport-https is not in main component

Expected behaviour

kiwi detects that not only main component is enabled in repositories and adds --components=main,restricted,universe,multiverse as argument to deboostrap

Steps to reproduce the behaviour

run

sudo kiwi --debug --type vmx system build --description=kiwi-descriptions/ubuntu/x86_64/ubuntu-bionic-JeOS/ --target-dir=ubuntu-1804/out --allow-existing-root

kiwi-descriptions is current master / 34784b4725b52f8f0a717f99928afaaeca83c740

config.xml:

<?xml version="1.0" encoding="utf-8"?>

<!-- The line below is required in order to use the multibuild OBS features -->
<!-- OBS-Profiles: @BUILD_FLAVOR@ -->

<image schemaversion="6.9" name="LimeJeOS-Ubuntu-18.04">
    <description type="system">
        <author>Marcus Schaefer</author>
        <contact>ms@suse.com</contact>
        <specification>vmx disk test build for Ubuntu</specification>
    </description>
    <preferences>
        <version>1.16.4</version>
        <packagemanager>apt-get</packagemanager>
        <bootsplash-theme>sabily</bootsplash-theme>
        <bootloader-theme>ubuntu-mate</bootloader-theme>
        <locale>en_US</locale>
        <keytable>us</keytable>
        <timezone>UTC</timezone>
        <rpm-check-signatures>false</rpm-check-signatures>
        <type image="vmx" filesystem="ext4" bootloader="grub2" format="vmdk" kernelcmdline="console=ttyS0 splash"/>
    </preferences>
    <users>
        <user password="$1$xyz" home="/root" name="root" groups="root"/>
    </users>
    <repository type="apt-deb" alias="Bionic-security" distribution="bionic-security" components="main multiverse restricted universe" repository_gpgcheck="false">
        <source path="https://x/ubuntu"/>
    </repository>
    <repository type="apt-deb" alias="Bionic-updates" distribution="bionic-updates" components="main multiverse restricted universe" repository_gpgcheck="false">
        <source path="https://x/ubuntu"/>
    </repository>
    <repository type="apt-deb" alias="Bionic" distribution="bionic" components="main multiverse restricted universe" repository_gpgcheck="false">
        <source path="https://x/ubuntu"/>
    </repository>
    <packages type="image">
        <package name="grub2-themes-ubuntu-mate"/>
        <package name="plymouth-theme-sabily"/>
        <package name="plymouth"/>
        <package name="linux-generic"/>
        <package name="isolinux"/>
        <package name="syslinux"/>
        <package name="syslinux-common"/>
        <package name="dracut"/>
        <package name="grub2"/>
        <package name="init"/>
        <package name="gnupg"/>
        <package name="iproute2"/>
        <package name="iptables"/>
        <package name="iputils-ping"/>
        <package name="ifupdown"/>
        <package name="isc-dhcp-client"/>
        <package name="netbase"/>
        <package name="dbus"/>
        <package name="cloud-init"/>
        <package name="open-vm-tools"/>
    </packages>
    <packages type="iso">
        <package name="dracut-kiwi-live"/>
    </packages>
    <!-- Needed to make sure debootstrap is called -->
    <packages type="bootstrap">
        <package name="apt-utils"/>
    </packages>
</image>

A rather dirty hack around would be this:

diff /usr/lib/python3.6/site-packages/kiwi/package_manager/apt.py /tmp/apt.py-orig
150d149
<             cmd.append('--components=main,restricted,universe,multiverse')

OS and Software information

schaefi commented 5 years ago

good catch, I'll come up with a PR next

Finkregh commented 5 years ago

wow, thanks!