From 7948fee7e25707904f81ccc8854a1f98265c8f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Thu, 28 Nov 2019 13:20:16 +0100 Subject: [PATCH] Install ndisc6 package in element script The ndisc6 package is not yet available in EPEL 8. See: https://bugzilla.redhat.com/show_bug.cgi?id=1779134 Until the package is available set the pkg-map to "" for the ndisc6 package when distro is redhat and install the package using || true in the element script instead so that CentOS 8 build's do not fail because of the missing package. Once the package is in EPEL 8 this change can be reverted. Related-Bug: #1754219 Change-Id: Icd4bad8852ce5ba40fb0e7b0d335191efbe88c67 --- .../install.d/50-dhcp-all-interfaces | 11 +++++++++++ .../elements/dhcp-all-interfaces/pkg-map | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces b/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces index 0c180c01..0f140f02 100755 --- a/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -8,6 +8,17 @@ set -o pipefail SCRIPTDIR=$(dirname $0) +# TODO(hjensas): Once ndisc6 package is available in EPEL8 drop this, and add the package back in pkg-map. +# See: https://bugzilla.redhat.com/show_bug.cgi?id=1779134 +if [ -e "/etc/redhat-release" ]; then + if type dnf &>/dev/null; then + dnf -v -y install ndisc6 || true + else + yum -v -y install ndisc6 || true + fi +fi + + # this script is not needed on Gentoo. if [ "$DISTRO_NAME" != "gentoo" ]; then install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh diff --git a/diskimage_builder/elements/dhcp-all-interfaces/pkg-map b/diskimage_builder/elements/dhcp-all-interfaces/pkg-map index 95416c86..446cf7aa 100644 --- a/diskimage_builder/elements/dhcp-all-interfaces/pkg-map +++ b/diskimage_builder/elements/dhcp-all-interfaces/pkg-map @@ -2,7 +2,7 @@ "family": { "redhat": { "dhcp-client": "dhclient", - "ndisc6": "ndisc6" + "ndisc6": "" }, "gentoo": { "dhcp-client": "net-misc/dhcpcd",