Skip to content

Commit

Permalink
podvm-mkosi: Try and fix permissions issues
Browse files Browse the repository at this point in the history
Now we switched to docker buildx we are seeing permissions
problems in the workflow e.g. :
```
#3 [internal] load build context
#3 transferring context: 50B done
#3 ERROR: error from sender: open build/fedora-tools/efi: permission denied
```
Thanks to @BbolroC, who has tried running these on a fork and
found that sudo and chown-ing seems to help this issue

Signed-off-by: stevenhorsman <[email protected]>
  • Loading branch information
stevenhorsman committed Aug 28, 2024
1 parent 71c9664 commit 0df4c2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cloud-api-adaptor/podvm-mkosi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ PHONY: image
image:
@echo "Enabling production preset..."
rm -rf resources/build*Image
rm -rf ./build
sudo rm -rf ./build
@echo "Building image..."
ifeq ($(SE_BOOT),true)
touch resources/buildS390xImage
sudo mkosi --profile production.conf --image system
sudo -E ../hack/build-s390x-se-image.sh
@echo "Building docker image..."
sudo chown -R $(USER): build
docker buildx build \
-t $(PODVM_NAME)-se:$(PODVM_TAG) \
-t $(PODVM_NAME)-se:latest \
Expand All @@ -82,6 +83,7 @@ else ifeq ($(ARCH),s390x)
sudo mkosi --profile production.conf --image system
sudo -E ../hack/build-s390x-image.sh
@echo "Building docker image..."
sudo chown -R $(USER): build
docker buildx build \
-t $(PODVM_NAME):$(PODVM_TAG) \
-t $(PODVM_NAME):latest \
Expand All @@ -97,13 +99,14 @@ image-debug:
@echo "Enabling debug preset..."
rm -rf resources/build*Image
touch resources/buildDebugImage
rm -rf ./build
sudo rm -rf ./build
@echo "Building debug image..."
ifeq ($(SE_BOOT),true)
touch resources/buildS390xImage
sudo mkosi --profile debug.conf
sudo -E ../hack/build-s390x-se-image.sh
@echo "Building docker image..."
sudo chown -R $(USER): build
docker buildx build \
-t $(PODVM_NAME)-se:$(PODVM_TAG)-debug \
-t $(PODVM_NAME)-se:latest \
Expand All @@ -114,6 +117,7 @@ else ifeq ($(ARCH),s390x)
sudo mkosi --profile debug.conf
sudo -E ../hack/build-s390x-image.sh
@echo "Building docker image..."
sudo chown -R $(USER): build
docker buildx build \
-t $(PODVM_NAME):$(PODVM_TAG)-debug \
-t $(PODVM_NAME):latest \
Expand Down Expand Up @@ -152,5 +156,5 @@ push-image-container:
PHONY: clean
clean:
rm -rf resources/buildDebugImage
rm -rf ./build
sudo rm -rf ./build
rm -rf ./resources/binaries-tree

0 comments on commit 0df4c2f

Please sign in to comment.