From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1677245-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 3863715807A
	for <garchives@archives.gentoo.org>; Sun,  6 Oct 2024 20:41:16 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 511B0E29A4;
	Sun,  6 Oct 2024 20:41:15 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 39F8AE29A4
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Oct 2024 20:41:15 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 48C13343156
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Oct 2024 20:41:14 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id AD7A8B36
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Oct 2024 20:41:12 +0000 (UTC)
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" <dilfridge@gentoo.org>
Message-ID: <1728247257.40bb07e9456e1583e8e4328c07ccf894b4792d92.dilfridge@gentoo>
Subject: [gentoo-commits] proj/catalyst:dilfridge/qcow2 commit in: targets/support/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/support/create-qcow2.sh
X-VCS-Directories: targets/support/
X-VCS-Committer: dilfridge
X-VCS-Committer-Name: Andreas K. Hüttel
X-VCS-Revision: 40bb07e9456e1583e8e4328c07ccf894b4792d92
X-VCS-Branch: dilfridge/qcow2
Date: Sun,  6 Oct 2024 20:41:12 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 3dbe6243-f69b-4e7d-a4a6-1da5aba90422
X-Archives-Hash: bbc3621d39bb37597bbc407d58e5fdc5

commit:     40bb07e9456e1583e8e4328c07ccf894b4792d92
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  6 20:40:57 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct  6 20:40:57 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=40bb07e9

Minor fixes to qcow2 creation script

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 targets/support/create-qcow2.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/targets/support/create-qcow2.sh b/targets/support/create-qcow2.sh
index d54691a8..7d7dd2e7 100755
--- a/targets/support/create-qcow2.sh
+++ b/targets/support/create-qcow2.sh
@@ -73,16 +73,23 @@ mount ${mypartroot} "${mymountpoint}" || die "Could not mount root partition"
 mkdir -p "${mymountpoint}"/boot || die "Could not create boot mount point"
 mount ${mypartefi} "${mymountpoint}/boot" || die "Could not mount boot partition"
 
-# copy contents in
-cp -a "${clst_target_path}"/* "${my_mountpoint}/"
+# copy contents in - do we need extra preserve steps? rsync? tar?
+cp -a "${clst_target_path}"/* "${mymountpoint}/" || die "Could not copy content into mounted image"
 
 # at this point we have a working system
 
+# create a CONTENTS.gz file
+pushd "${mymountpoint}" || die "Could not cd into mountpoint"
+find . > "${1}.CONTENTS" || die "Could not list files in mountpoint"
+popd || die "Could not cd out of mountpoint"
+gzip "${1}.CONTENTS" || die "Could not compress file list"
+
 # note: the following must already have been done by the stage2:
 # - rudimentary configuration
 # - installation of cloud-init
 # - installation of kernel
 # - installation of fallback efi loader
+# - enabling of services
 # luckily efi requires no image magic, just regular files...
 
 # unmount things