[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] install.sh: Preserve directory symlinks


  • To: Thierry Escande <thierry.escande@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Mon, 16 Mar 2026 11:36:42 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vates.tech smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Dpu8iTh2sFvUOhDWYTcPAeVJmYYtyW1UMq5u+rOi40A=; b=js/aLWr0RyWt2WsJBPt+uvlCLtBiGJUAbheQbYwAe2VZFeSHrLZNcsAexa8vRA7sm3ngDhR24ClJ0n8GlGzJPbf/Ih6E/nP2c8XqRmzW6Esu00fk2tVajoZJdIITwgenE/mfV2IW+9gyKvgbAHFG+BDL0i8y+iEmx08XBhOrw6EeskyAlCn1thOIxADbyvluJurTK7N8KFO2mgHsyyelzYXIe/SVLyG4Vke+EWapUjf/2her9OA//t6iWZwkT11P3c1fx7e4SWE4pNhx0OfyXGqmS/+duSvma1A6nB1YeGxLskbe3TfGqYZrWGBs2xsBwThTzS+wjfIOYoWoH0S5zg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OrZnrfoPWqsbo8gCEW2mIe7dvGvQ8KjoINO82bKvOtM+dLCkmgH3I6jhxNFPTL/8YCo8eqGm7rC7w+XHiVq4cKaWesnq18WkgPYnWnZWwjLCN1YesFrCTxmvPx2XqXVuyRBVhTsL9Scp4epvv8HvIBnXcHyJpMYO5Em9sj4KqSmvBI4r6wOrrGCwqXqfKm4AoZm+I6aRN9JUJWNBiAlc6qaoDWwB0pOvQFHdN49UV77XDd0qbrkDGkYkPtOUbn8Kb7ySQhuhD/jYNYot3QAJ88IdmAFFB30OHNHM6l4Q166nkQ/pQJtcNqKADR1lZAGh7FpQj9/6k1LQK0vceCA8Vg==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Mon, 16 Mar 2026 15:37:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2026-03-13 13:25, Thierry Escande wrote:
In various distros (i.e. Debian) some folders like /lib or /var/run are
symlinks. Using the tar option --keep-directory-symlink preserves these
symlinks.

Signed-off-by: Thierry Escande <thierry.escande@xxxxxxxxxx>

Coincidentally, I hit this last week. I think the commit message should be expanded because it resulted in a non-functioning system. I switched to make debball, but thanks for fixing this.

I saw Ubuntu's /lib -> /usr/lib symlink replaced with a directory for /lib/systemd/system/xen-watchdog-sleep.sh. With /lib broken, systemd (/sbin/init) could not start and boot fails.

The fix was easy -  just restoring the /lib symlink.

So maybe add "Replacing the /lib symlink with a directory results in a non-functioning system."?

I thought /var/run was addressed by:
Fixes: 9d628ff6cc21 ("tools: Fix install.sh for systemd")
It hasn't been an issue for me since that change.

For /lib a fixes is either:
Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume")

or

Fixes: b34bde262c8c ("systemd: fall back to default system-sleep dir without systemd-devel")

It might have only been the second one that defaulted to /lib causing the problem. Though the issue is more general.

I do think a fixes and backport are warranted. With the commit message updated:

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Tested-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Thanks,
Jason

---
  install.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install.sh b/install.sh
index 3e11c4d46f..5d0b7a4933 100644
--- a/install.sh
+++ b/install.sh
@@ -27,7 +27,7 @@ tmp="`mktemp -d`"
  echo "Installing Xen from '$src' to '$dst'..."
  (cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
-(cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
+(cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" 
--keep-directory-symlink -xf -
  rm -rf "$tmp"
echo "All done."




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.