Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F22C81F3FE2 for ; Sat, 18 Oct 2025 18:16:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760811367; cv=none; b=V+TVkRI/Fn0CAV4KyjQJGmVm3lsnTls5RFwAxP12Tcnzu+wKx8hbzfCIxXx+6DXlW/2cGDdsihV2dQA3LDNeqP43ea57eSlet1QiiTHjn/VE3OA0Me/QkDRKwyxR80gStaeqYdGNENxEhMgLWJuwb+HzraJGcwyxfqkdWnqRFY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760811367; c=relaxed/simple; bh=FgLBBO7q2Daqjz0dB4Xphrw99FFzkTZKjmCE8JOLrBI=; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From: In-Reply-To:Content-Type; b=qSBbfCVMCT+FNZZyBVPM/+iI2fLdwmEW/BfBYqLRPodr8uxo3tlZ93rsf9JXLQzl5EE3lmimLNO+yUvvLl9EKFonWU5B6gNY3JuK5Bwi4wkFqkN6OiswYrndc9kfSDZ3fj5fWGdUIzMeVNiWDDv2jkWqXkKqbxDznI1k1wAoaU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uUNhzdKm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uUNhzdKm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 160C7C4CEF8; Sat, 18 Oct 2025 18:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760811364; bh=FgLBBO7q2Daqjz0dB4Xphrw99FFzkTZKjmCE8JOLrBI=; h=Date:Subject:To:References:Cc:From:In-Reply-To:From; b=uUNhzdKmwekwcnoa11ihw086R8uYv0ECA6fyQxvG/2BHJS+oEe8BTFe4t57s+UQYh eZSHFnJ5oneySyTiJUfet+Lhxk6QCTVTZ8yMjDI84Q6eZ8JB8TPQO4lujd/d8LYItt KBVVBjJfmXF7qt6h+AewANTXQejPQ3pberKCB0nEaB0ZhcusoX2c67aikZCK9D80La mgdDN27y8Rf0URgQxo7CZvJNTYjTHlftMmJez7ErQ0y76FZysoyOZQw2x48ykeriQV PxPVVwUagr1gVBb2bJuSDBXAuMNbbwBQrqmUDjC7PtoHHQjIBTznuVWE89YRBe8Bcn 2/MqQ2cAFYOmw== Message-ID: Date: Sat, 18 Oct 2025 14:16:03 -0400 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/8] guestfs: Fix dracut-config-rescue removal for Debian systems To: Luis Chamberlain References: <20251018023154.2239688-1-mcgrof@kernel.org> <20251018023154.2239688-4-mcgrof@kernel.org> Content-Language: en-US Cc: Daniel Gomez , kdevops@lists.linux.dev From: Chuck Lever Organization: kernel.org In-Reply-To: <20251018023154.2239688-4-mcgrof@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/17/25 10:31 PM, Luis Chamberlain wrote: > The virt-builder template was trying to uninstall dracut-config-rescue > package unconditionally, but this package only exists on Fedora/RHEL > systems. Debian uses initramfs-tools instead of dracut. > > This was causing base image customization to fail with: > E: Unable to locate package dracut-config-rescue > virt-customize: error: apt-get remove 'dracut-config-rescue': command > exited with an error > > Conditionalize the dracut cleanup section to only run on non-Debian > systems. This allows Debian Trixie base images to be created successfully > while preserving the cleanup behavior for Fedora/RHEL/openSUSE systems > that use dracut. > > Generated-by: Claude AI > Signed-off-by: Luis Chamberlain > --- > playbooks/roles/base_image/templates/virt-builder.j2 | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/playbooks/roles/base_image/templates/virt-builder.j2 b/playbooks/roles/base_image/templates/virt-builder.j2 > index b5de57d4..5e3e4cd8 100644 > --- a/playbooks/roles/base_image/templates/virt-builder.j2 > +++ b/playbooks/roles/base_image/templates/virt-builder.j2 > @@ -14,10 +14,12 @@ copy-in {{ guestfs_distro_source_and_dest_file }}:{{ target_dir }} > > install sudo,qemu-guest-agent,python3,bash,policycoreutils-python-utils > > +{% if not (distro_debian_based is defined and distro_debian_based) %} Claude copied a bug I introduced. You want this: {% if guestfs_debian is defined and guestfs_debian %} instead, but it will work only after applying "base_image: Replace distro checks" which is in the cel-fixes branch. I can merge that right now. With that change, for the series: Reviewed-by: Chuck Lever > # get rid of any rescue initramfs images, and prevent new ones from being generated > uninstall dracut-config-rescue > delete /boot/*rescue* > delete /boot/loader/entries/*rescue* > +{% endif %} > > run-command useradd {{ kdevops_uid }} -s /bin/bash -m kdevops > append-line /etc/sudoers.d/kdevops:kdevops ALL=(ALL) NOPASSWD: ALL -- Chuck Lever