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 4C56F43AA1 for ; Mon, 28 Jul 2025 00:18:03 +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=1753661886; cv=none; b=J+RJ5x+RC3wW8HDz8CAZYbD0Fy6Ypg6W2sUjSS/iBLnJMrIZN+dVzcVklajPX4ZOdhCafs0sbXmFUcPezeu8OTrShkJO3bUM0241CVJb4s6zWWR9dNyWHIr0HBxYNYhwdx1qWj55MatnrddyCooM83CvnmlSoYB/n1pf6nPeDCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753661886; c=relaxed/simple; bh=kZHlBWhUmrnWgWHcUWLVvToBntGFwCQwYVyq1GbDY/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gaPsjKpnVBE4zshweeX5R8jjKsv1HnUhcWdU66J8RpV4RVdtsMrfBTaVFcd/xvUiXg/atfnyatir4qokQuOpVALfC/HTkxE2CQCnXZv1lUqzzwdIrhMBcgoLG2xJvkFOvqYGVZse1Pu4vdcqZrIs7bQftPQwtfiIAjWSRtjY8ac= 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=AY54Q3Te; 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="AY54Q3Te" 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=oBQfdd0ejKiI8nBb7j4SxkW/CJV4HCWQh3F5heB4nRw=; b=AY54Q3TeBITR6VI5owPOLOXDcf 31U3suioSPV+s0wozLAHrmKhFvL3xaETY/9eI85l8HIE3QJn/yp2yiWq8yeb74w8mO/BEIzt/c/MO xMUyhH17xZtVTZ3/rzaGEt/6vitqgG9F5VRjjFqAVdvbIbwBY+cuEBTHAweC5B4yV5iPiv8Qp/X8b fzCJnWP2+bI03HVVzOsx+sqpzEQEljdhRuo2NnBCaa4f+g00sekIUqv2ep8G7PjbRwflpIdu8DPzJ hqB+QyxY+RpZGFBA3uNptTlbfN54RSqBsz0o/0dnPxbM49slwVDvZFN+KHdJu3os8G7FO0WY7qLhY AsxWBo2A==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugBZ4-0000000DNWg-2qe9; Mon, 28 Jul 2025 00:18:02 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 23/40] bootlinux: fix missing make command when using 9P builds Date: Sun, 27 Jul 2025 17:17:42 -0700 Message-ID: <20250728001800.3188617-24-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250728001800.3188617-1-mcgrof@kernel.org> References: <20250728001800.3188617-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 When bootlinux_9p is enabled, the kernel build happens on the host and is shared with guests via 9P. However, the install step still runs on the guest with 'make modules_install install', which requires make to be present on the guest. When the 9p build tasks were moved to a separate subrole, the reorganization included logic to skip all dependency installation when 9P is enabled, based on the assumption that guests wouldn't need build tools. This assumption was incorrect - while guests don't need the full kernel build toolchain, they still need basic tools like 'make' to run the installation commands. The current logic skips all dependency installation when 9P is enabled, causing the error: "[Errno 2] No such file or directory: b'make'" This commit adds a new install-minimal-deps task that ensures essential build tools (make, gcc, kmod) are installed on guests even when using 9P builds. This allows the kernel installation to succeed while still avoiding the full build dependency installation that isn't needed for 9P setups. The fix properly separates the concerns: full build dependencies are still skipped for 9P (since building happens on the host), but minimal tools required for installation are ensured to be present. Fixes: d0d54b450b0d ("bootlinux: Move 9p build tasks to a subrole") Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- .../install-minimal-deps/debian/main.yml | 19 +++++++++++++ .../tasks/install-minimal-deps/main.yml | 15 +++++++++++ .../install-minimal-deps/redhat/main.yml | 27 +++++++++++++++++++ .../tasks/install-minimal-deps/suse/main.yml | 13 +++++++++ playbooks/roles/bootlinux/tasks/main.yml | 8 ++++++ 5 files changed, 82 insertions(+) create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml diff --git a/playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml b/playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml new file mode 100644 index 00000000..9fd6834f --- /dev/null +++ b/playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml @@ -0,0 +1,19 @@ +--- +# Install minimal dependencies needed for kernel installation on Debian +# This is used when bootlinux_9p is enabled and the build happens on the host + +- name: Update apt cache + become: yes + become_method: sudo + apt: + update_cache: yes + +- name: Install minimal build tools for kernel installation + become: yes + become_method: sudo + apt: + name: + - make + - gcc + - kmod + state: present \ No newline at end of file diff --git a/playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml b/playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml new file mode 100644 index 00000000..d1e9f675 --- /dev/null +++ b/playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml @@ -0,0 +1,15 @@ +--- +- name: Debian-specific minimal setup + ansible.builtin.import_tasks: debian/main.yml + when: + - ansible_os_family == "Debian" + +- name: SuSE-specific minimal setup + ansible.builtin.import_tasks: suse/main.yml + when: + - ansible_os_family == "Suse" + +- name: Red Hat-specific minimal setup + ansible.builtin.import_tasks: redhat/main.yml + when: + - ansible_os_family == "RedHat" \ No newline at end of file diff --git a/playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml b/playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml new file mode 100644 index 00000000..c5cd6fbf --- /dev/null +++ b/playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml @@ -0,0 +1,27 @@ +--- +# Install minimal dependencies needed for kernel installation on Red Hat +# This is used when bootlinux_9p is enabled and the build happens on the host + +- name: Install minimal build tools for kernel installation + become: yes + become_method: sudo + yum: + name: + - make + - gcc + - kmod + state: present + when: + - ansible_facts['distribution_major_version']|int < 8 + +- name: Install minimal build tools for kernel installation (dnf) + become: yes + become_method: sudo + dnf: + name: + - make + - gcc + - kmod + state: present + when: + - ansible_facts['distribution_major_version']|int >= 8 \ No newline at end of file diff --git a/playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml b/playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml new file mode 100644 index 00000000..a17768f9 --- /dev/null +++ b/playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml @@ -0,0 +1,13 @@ +--- +# Install minimal dependencies needed for kernel installation on SUSE +# This is used when bootlinux_9p is enabled and the build happens on the host + +- name: Install minimal build tools for kernel installation + become: yes + become_method: sudo + zypper: + name: + - make + - gcc + - kmod-compat + state: present \ No newline at end of file diff --git a/playbooks/roles/bootlinux/tasks/main.yml b/playbooks/roles/bootlinux/tasks/main.yml index 2e5d950e..e908f313 100644 --- a/playbooks/roles/bootlinux/tasks/main.yml +++ b/playbooks/roles/bootlinux/tasks/main.yml @@ -19,6 +19,14 @@ ansible.builtin.import_tasks: file: install-deps/main.yml +# When using 9P builds, we still need make on the guest for modules_install +- name: Install essential build tools for 9P builds + ansible.builtin.import_tasks: + file: install-minimal-deps/main.yml + when: + - bootlinux_9p|bool + - not workflow_linux_packaged|bool + # We do this regardless of what distro you use - name: Install b4 become: yes -- 2.47.2