From 124d07410161427222c002bec023b7d2ca03a465 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Thu, 20 Jun 2019 23:27:36 +0100 Subject: [PATCH] Unbreak cpc/server builds, by ensuring that includes are copied with archived symlinks, and only hooks resolve symlinks when getting copied. --- debian/changelog | 3 +++ live-build/auto/config | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e84ac61a..ab5403eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ livecd-rootfs (2.597) UNRELEASED; urgency=medium * Install s390-tools-zkey into the installer layer for zkey support in subiquity. + * Unbreak cpc/server builds, by ensuring that includes are copied with + archived symlinks, and only hooks resolve symlinks when getting + copied. -- Dimitri John Ledkov Thu, 20 Jun 2019 23:25:13 +0100 diff --git a/live-build/auto/config b/live-build/auto/config index e75b99cc..28667e64 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1103,8 +1103,20 @@ EOF ;; ubuntu-core:system-image|ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled) - cp -afL /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ - config/ + # Ensure that most things e.g. includes.chroot are copied as is + for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do + case entry in + hooks) + # But hooks are shared across the projects with symlinks + # dereference them + cp -afL $entry config/ + ;; + *) + # Most places want to preserve symlinks as is + cp -af $entry config/ + ;; + esac + done if [ "$PROJECT" = "ubuntu-cpc" ]; then case ${IMAGE_TARGETS:-} in