From b86e2082bff182d3c38137f3325a6b09154e6057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Mon, 23 Jul 2018 17:00:37 +0800 Subject: [PATCH] Workaround for Ubuntu 18.04 busybox bug (#5421) * Workaround for Ubuntu 18.04 busybox bug https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/1753572 * Add cpio to the Ubuntu 18.04 diskless pkglist --- .../netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist | 1 + .../netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist | 1 + xCAT-server/share/xcat/netboot/ubuntu/genimage | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist index 583d62ad1..0d5ea275e 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.ppc64el.pkglist @@ -16,3 +16,4 @@ dnsutils tar gzip xz-utils +cpio diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist index 583d62ad1..0d5ea275e 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu18.04.x86_64.pkglist @@ -16,3 +16,4 @@ dnsutils tar gzip xz-utils +cpio diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index 7675422f0..054ac2924 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -1650,6 +1650,16 @@ EOMS push @filestoadd, $_; } + # Workaround for Ubuntu 18.04 busybox bug + # https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/1753572 + # On Ubuntun 18.04, will use GNU cpio instead of busybox cpio + if ("ubuntu18.04" eq $osver) { + foreach ("bin/cpio") { + getlibs($_); + push @filestoadd, $_; + } + } + # Additional binaries needed for udev on s390x if ($arch eq "s390x") { foreach ("sbin/udevsettle", "sbin/udevtrigger", "sbin/udevd", "sbin/depmod") {