Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix permission denied when echoing to /dev/stdout #415

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

trz42
Copy link
Collaborator

@trz42 trz42 commented Dec 5, 2023

In some cases, echoing to /dev/stdout triggers a permission denied. Particularly, this happens when sourcing the init script (init/bash) or the script to set key EESSI environment variables (init/eessi_environment_variables). See #413

This PR works around the issue by implementing a fix suggested in https://unix.stackexchange.com/a/38580

fixes #413

@trz42 trz42 added the bug Something isn't working label Dec 5, 2023
Copy link

eessi-bot bot commented Dec 5, 2023

Instance eessi-bot-mc-aws is configured to build:

  • arch x86_64/generic for repo eessi-hpc.org-2023.06-compat
  • arch x86_64/generic for repo eessi-hpc.org-2023.06-software
  • arch x86_64/generic for repo eessi.io-2023.06-compat
  • arch x86_64/generic for repo eessi.io-2023.06-software
  • arch x86_64/intel/haswell for repo eessi-hpc.org-2023.06-compat
  • arch x86_64/intel/haswell for repo eessi-hpc.org-2023.06-software
  • arch x86_64/intel/haswell for repo eessi.io-2023.06-compat
  • arch x86_64/intel/haswell for repo eessi.io-2023.06-software
  • arch x86_64/intel/skylake_avx512 for repo eessi-hpc.org-2023.06-compat
  • arch x86_64/intel/skylake_avx512 for repo eessi-hpc.org-2023.06-software
  • arch x86_64/intel/skylake_avx512 for repo eessi.io-2023.06-compat
  • arch x86_64/intel/skylake_avx512 for repo eessi.io-2023.06-software
  • arch x86_64/amd/zen2 for repo eessi-hpc.org-2023.06-compat
  • arch x86_64/amd/zen2 for repo eessi-hpc.org-2023.06-software
  • arch x86_64/amd/zen2 for repo eessi.io-2023.06-compat
  • arch x86_64/amd/zen2 for repo eessi.io-2023.06-software
  • arch x86_64/amd/zen3 for repo eessi-hpc.org-2023.06-compat
  • arch x86_64/amd/zen3 for repo eessi-hpc.org-2023.06-software
  • arch x86_64/amd/zen3 for repo eessi.io-2023.06-compat
  • arch x86_64/amd/zen3 for repo eessi.io-2023.06-software
  • arch aarch64/generic for repo eessi-hpc.org-2023.06-compat
  • arch aarch64/generic for repo eessi-hpc.org-2023.06-software
  • arch aarch64/generic for repo eessi.io-2023.06-compat
  • arch aarch64/generic for repo eessi.io-2023.06-software
  • arch aarch64/neoverse_n1 for repo eessi-hpc.org-2023.06-compat
  • arch aarch64/neoverse_n1 for repo eessi-hpc.org-2023.06-software
  • arch aarch64/neoverse_n1 for repo eessi.io-2023.06-compat
  • arch aarch64/neoverse_n1 for repo eessi.io-2023.06-software
  • arch aarch64/neoverse_v1 for repo eessi-hpc.org-2023.06-compat
  • arch aarch64/neoverse_v1 for repo eessi-hpc.org-2023.06-software
  • arch aarch64/neoverse_v1 for repo eessi.io-2023.06-compat
  • arch aarch64/neoverse_v1 for repo eessi.io-2023.06-software

@trz42 trz42 changed the title Fix permission denied issue echoing to /dev/stdout Fix permission denied when echoing to /dev/stdout Dec 5, 2023
Copy link
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine:

ocaisa@LAPTOP-O6HF2IKC:~$ cat bash.func
function show_msg {
  # only echo msg if EESSI_SILENT is unset
  msg=$1
  if [[ ! -v EESSI_SILENT ]]; then
    echo "$msg"
  fi
}
ocaisa@LAPTOP-O6HF2IKC:~$ source bash.func
ocaisa@LAPTOP-O6HF2IKC:~$ show_msg test
test
ocaisa@LAPTOP-O6HF2IKC:~$ EESSI_SILENT=1 show_msg test
ocaisa@LAPTOP-O6HF2IKC:~$

@ocaisa
Copy link
Member

ocaisa commented Dec 19, 2023

@boegel I'm not sure how this would actually get deployed so I'm reluctant to hit merge

@bedroge
Copy link
Collaborator

bedroge commented Dec 21, 2023

@boegel I'm not sure how this would actually get deployed so I'm reluctant to hit merge

We basically need to redo the procedure for ingesting the init scripts: that means merging this PR, creating a new tarball using https://github.com/EESSI/software-layer/blob/2023.06-software.eessi.io/create_directory_tarballs.sh, and uploading the tarball to the S3 bucket using https://github.com/EESSI/eessi-bot-software-layer/blob/develop/scripts/eessi-upload-to-staging.

@boegel boegel merged commit 1473142 into EESSI:2023.06-software.eessi.io Dec 21, 2023
@boegel
Copy link
Contributor

boegel commented Dec 21, 2023

tarball eessi-2023.06-init-1703152153.tar.gz created and uploaded to S3 bucket to deploy these changes...

@boegel boegel added the 2023.06-software.eessi.io 2023.06 version of software.eessi.io label Jan 11, 2024
TopRichard added a commit to TopRichard/software-layer that referenced this pull request Jul 2, 2024
….18-GCC/12.3.0

{2023.06}[GCC/12.3.0] BCFtools V1.18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2023.06-software.eessi.io 2023.06 version of software.eessi.io bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-bash: /dev/stdout: Permission denied when enabling EESSI
5 participants