From patchwork Thu Feb 6 21:55:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez X-Patchwork-Id: 13963810 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 A23F4225A52 for ; Thu, 6 Feb 2025 21:55:24 +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=1738878924; cv=none; b=Y9LYtyG4G6M740B7NWcpFhWC6bCmBelUaHBg9xZXjpwF7pM/cdzbhXdiaRDCyrMppubWzt32mIPXzJ1MhS/ItI3MRrXbQ6JcFTOTAu0qwmy7WyoWnntcfoGhx72LTdH1pX9OJHXiSF1rcSAaCKxzPN5fAjS2bL4QRjz9R2EMlFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738878924; c=relaxed/simple; bh=lYoYBmQ2i+lxTKtokjrX+xKTjvRZ+JKsZb/akvUd9j8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E7a/jZaSOvnGCddwHjHkKY7jcplhEPKfBaLJfxaNW9Dk//21JdtGoQSmGdGVOxwtBNYM3g9ZBfy4KXCIAsEe0oTKLJG1G8t8WDC2F5Oxdcm823F48anAwa+/pz30teer5oleimapVQVcqgFl/x0EiHRVFyuOx/1TCFjDKNkTXhE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JBuypWM+; 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="JBuypWM+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84179C4CEDD; Thu, 6 Feb 2025 21:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738878924; bh=lYoYBmQ2i+lxTKtokjrX+xKTjvRZ+JKsZb/akvUd9j8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JBuypWM+qJhb6JqnIznodjnETnf0AktcYdlwG/WuvIhD7c466b0vWo4u8Y7UDJ/iZ Mak01bZh7Uz76r17VKtmM1m7jaA4RfZUWQPwN+FUfMuMsfZJY0u2W+239Yu4cphlsO xrYCTAlXWxGCIsfBW3zaCVeGgja0XvUoC3VVa5HpB7u2gc4M5yXSkx5tr2kj3QO0+G 2jU9KYSG2+tIJ/VyWeu7lizBVOnA68saoSReCICucJRgNE4zNteNRF0sYS/wzYHaT6 aNNc9B3eWJxytiMf/O8SMJsHI1t7HWF1U/f0amQYV6PY64cJQrbeHdmEunzp35aZPu S27Iik3+1QvaQ== From: da.gomez@kernel.org Date: Thu, 06 Feb 2025 21:55:09 +0000 Subject: [PATCH 4/4] bringup_guestfs: ensure pool correct permissions Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250206-small-fixes-v1-4-4834edb167a3@samsung.com> References: <20250206-small-fixes-v1-0-4834edb167a3@samsung.com> In-Reply-To: <20250206-small-fixes-v1-0-4834edb167a3@samsung.com> To: Luis Chamberlain Cc: kdevops@lists.linux.dev, Daniel Gomez X-Mailer: b4 0.14.2 From: Daniel Gomez Ensure correct permissions for the storage pool path top directory. Otherwise, this directory ends with root permissions when LIBVIRT_URI_SYSTEM is used (default). Signed-off-by: Daniel Gomez --- scripts/bringup_guestfs.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh index 74eeceace9040f6ec716234f8d80ebfe7940dac7..3180b30e5e2d72147c382056f9ee474cce157722 100755 --- a/scripts/bringup_guestfs.sh +++ b/scripts/bringup_guestfs.sh @@ -14,7 +14,8 @@ IMG_FMT="qcow2" if [ "${CONFIG_LIBVIRT_EXTRA_DRIVE_FORMAT_RAW}" = "y" ]; then IMG_FMT="raw" fi -STORAGEDIR="${CONFIG_KDEVOPS_STORAGE_POOL_PATH}/kdevops/guestfs" +STORAGETOPDIR="${CONFIG_KDEVOPS_STORAGE_POOL_PATH}" +STORAGEDIR="${STORAGETOPDIR}/kdevops/guestfs" QEMU_GROUP=$CONFIG_LIBVIRT_QEMU_GROUP GUESTFSDIR="${TOPDIR}/guestfs" OS_VERSION=${CONFIG_VIRT_BUILDER_OS_VERSION} @@ -274,9 +275,9 @@ $USE_SUDO mkdir -p $BASE_IMAGE_DIR if [[ "$CONFIG_LIBVIRT_URI_SYSTEM" == "y" ]]; then - sudo chgrp -R $QEMU_GROUP $STORAGEDIR - sudo chmod -R g+rw $STORAGEDIR - sudo chmod -R g+s $STORAGEDIR + sudo chown -R $(whoami):$QEMU_GROUP $STORAGETOPDIR + sudo chmod -R g+rw $STORAGETOPDIR + sudo chmod -R g+s $STORAGETOPDIR fi cmdfile=$(mktemp)