Skip to content

Commit

Permalink
Fix workspace ownership in codespaces (#148)
Browse files Browse the repository at this point in the history
* initial setup for wasmedge
* add meta-clang to gitignore
* Fix workspace ownership that break certain recipes
* revert kas file
* Dont add meta-clang in this commit
* Dont add meta-clang in this commit
* no meta-clang in gitignore
  • Loading branch information
vasilvas99 authored Sep 13, 2023
1 parent 9d7a2d0 commit d4984ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# Install Dependencies
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends socat file gawk wget git diffstat unzip texinfo \
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends socat file gawk wget acl git diffstat unzip texinfo \
gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit \
mesa-common-dev zstd liblz4-tool tmux mc skopeo fdisk ruby-full jq \
Expand Down
16 changes: 16 additions & 0 deletions .devcontainer/post-attach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
sudo chown root:kvm /dev/kvm
sudo chmod 0660 /dev/kvm

function take_workspace_ownership() {
local USER=$1
local DIR=$2
sudo chown -R ${USER} ${DIR}
sudo setfacl -bnR ${DIR}
}

# Optional: Mount Azure Storage as remote sstate-cache to improve build time.
# This is only required if you want to manually upload / sync build artifacts to your remote sstate-cache
# To configure the sstate-cache and upload local build artifacts, the following environment variables need to be set:
Expand All @@ -44,7 +51,16 @@ function azure-mount() {
fi
}



# First arg: local mount point
# Second arg: Name of Azure container
azure-mount "azure-sstate-cache" "yocto-sstate-cache"
azure-mount "azure-downloads-cache" "downloads"

# There is a umask issue in GitHub codespaces
# possibly related to: https://github.com/orgs/community/discussions/26026
# which causes some recipes to fail to build, due to wrong permissions (e.g. gpsd)
if [ -z "$CODESPACE_VSCODE_FOLDER" ]; then
take_dir_ownership $(whoami) ${CODESPACE_VSCODE_FOLDER}
fi

0 comments on commit d4984ea

Please sign in to comment.