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

build: %files from stage fails to copy relative symlinks #2607

Open
dtrudg opened this issue Jan 31, 2024 · 1 comment
Open

build: %files from stage fails to copy relative symlinks #2607

dtrudg opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dtrudg
Copy link
Member

dtrudg commented Jan 31, 2024

Version of Singularity

main

Describe the bug

The following definition file fails to build:

09:38 am $ cat test.def 
BootStrap: docker
From: ubuntu:latest
Stage: devel

%post
mkdir -p /usr/mydir/mysubdir
ln -s ../bin/true /usr/mydir/true
ln -s ../../bin/true /usr/mydir/mysubdir/true

BootStrap: docker
From: ubuntu:latest
Stage: final

%files from devel
/usr/mydir
09:38 am $ sudo singularity build test.sif test.def
[sudo] password for dtrudg-sylabs: 
WARNING: 'nodev' mount option set on /tmp, it could be a source of failure during build process
INFO:    Starting build...
INFO:    Fetching OCI image...
28.2MiB / 28.2MiB [===================================================================================] 100 % 0.0 b/s 0s
INFO:    Extracting OCI image...
INFO:    Inserting Singularity configuration...
INFO:    Running post scriptlet
+ mkdir -p /usr/mydir/mysubdir
+ ln -s ../bin/true /usr/mydir/true
+ ln -s ../../bin/true /usr/mydir/mysubdir/true
INFO:    Fetching OCI image...
28.2MiB / 28.2MiB [===================================================================================] 100 % 0.0 b/s 0s
INFO:    Extracting OCI image...
INFO:    Inserting Singularity configuration...
INFO:    Copying /usr/mydir to 
FATAL:   While performing build: unable to copy files from stage to container fs: while copying [/tmp/build-temp-2697402686/rootfs/usr/mydir] to /tmp/build-temp-2218967937/rootfs/usr/mydir: invalid symlink "/tmp/build-temp-2218967937/rootfs/usr/mydir/mysubdir/true" -> "../../bin/true"
@dtrudg dtrudg added the bug Something isn't working label Jan 31, 2024
@dtrudg dtrudg self-assigned this Jan 31, 2024
@dtrudg
Copy link
Member Author

dtrudg commented Jan 31, 2024

The error invalid symlink is being raised from the docker/docker pkg/archive CopyWithTar code.

@dtrudg dtrudg added this to the SingularityCE 4.2.0 milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant