From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51967140E34 for ; Sat, 18 Oct 2025 02:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760754719; cv=none; b=dDGxf+yMzhgbnDGlEN+pZotl71SVUPqZdF/PcuYfIjYSkhEV86Ksle0uOIBAfx95CiPqe6K9JXWv6XQKPb64lm7MYwl23Pg+ROKl7bboZXp6EStZPzUiF/wLcCORk3VzNDkXPxlos4lTUuC/l+EOX+SJIJUo6Xm+r/IrcYVMW9Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760754719; c=relaxed/simple; bh=TY8EvDdAWyQmAC/5LAUN4as7tW8uruumWF0WsGBB2sg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B+/15Y1Z4nHg4HTxlZDEeYlXOdOceRLmjadwR/vrSzUlTiD3nDjKZNODFkCeOhKtNsKmdMkqA+y/eFmtzPHJXfMmW6RSw9+HyQkZZ+Z9j0sJEYwu5pEQ6AJK2ZppWyvrgDCLuKlekscGQCRJm/fI2mfVFo3Dp9ZpAbmuvPb3pcU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=WGJ+GRs7; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="WGJ+GRs7" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=Kca7pIUDNPTkSMA6tHJ0msgXUyyAWaZzTkVYnK1JaNg=; b=WGJ+GRs7ZhDwmRCKwOAhoq26t7 4Txxm2jooziX1cksrZuZrMT4+6wsimTzVBTDcP9cY0pRYSPcaMiCIJv7NuesM3I1IYbiKAgYRAtBO iF3ZJAPg6kHT0haDMrEqBUCwFkWlB3y5iXDnmSZOXUBuSkhgo3CikNtTftgYyPiNpwkjt3aPDtLIA Co+SD9JhuG2o2eD9CUUpxfE+K40LkNLUAA2Lzs+z71+vy14wEnW7MCDfBTw3/pOwMup0SCRtfnmFc TM1zGr6Ndrag014j87tKn2dN87N0meTt6iVoIBAUd6bcXliHYDpQodsfOjQuBTpytA+lWdKcHgTVf 7j0w4hzA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9wjc-00000009OeL-3xVg; Sat, 18 Oct 2025 02:31:56 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 2/8] guestfs: Don't delete APT sources copied from host Date: Fri, 17 Oct 2025 19:31:47 -0700 Message-ID: <20251018023154.2239688-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251018023154.2239688-1-mcgrof@kernel.org> References: <20251018023154.2239688-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain The virt-builder template was deleting the APT sources file after copying it from the host and using it for package installation. This left the guest with NO package sources configured, causing firstboot "apt update" commands to fail. The delete logic appeared to assume the guest would fall back to default Debian repos, but there was no fallback mechanism. If the user explicitly enables CONFIG_GUESTFS_COPY_SOURCES_FROM_HOST_TO_GUEST, they want their guest to use their local mirror configuration. Remove the delete command so the copied sources file persists in the guest. This allows firstboot apt commands to succeed and enables the guest to use the same mirror as the host. Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- playbooks/roles/base_image/templates/virt-builder.j2 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/playbooks/roles/base_image/templates/virt-builder.j2 b/playbooks/roles/base_image/templates/virt-builder.j2 index 608dc31f..b5de57d4 100644 --- a/playbooks/roles/base_image/templates/virt-builder.j2 +++ b/playbooks/roles/base_image/templates/virt-builder.j2 @@ -77,9 +77,5 @@ firstboot-command update-locale LANG=en_US.UTF-8 firstboot-command systemctl stop ssh firstboot-command systemctl start ssh -{% if guestfs_copy_sources_from_host_to_guest %} -delete /etc/apt/sources.list.d/debian.sources -{% endif %} - {% endif %} {% endif %} -- 2.51.0