m2005 untar error on msys2 (tar01 directory)

Sebastian Huber sebastian.huber at embedded-brains.de
Tue May 5 05:08:53 UTC 2020


On 05/05/2020 06:11, Chris Johns wrote:

> On 5/5/20 10:46 am, Joel Sherrill wrote:
>> Hi
>>
>> Windows (msys2) is completely dead in the water for m2005 due to a 
>> symlink added to the RTEMS source
>>
>> $ tar Jxf rtems-5.0.0-m2005-1.tar.xz
>> tar: rtems-5.0.0-m2005-1/testsuites/libtests/tar01/symlink: Cannot 
>> create symlink to ‘home/test_file’: No such file or directory
>> tar: Exiting with failure status due to previous errors
>>
>> The rtems tar file has this in it:
>>
>> -rw-r--r-- chris/1010     1228 2020-05-01 03:03 
>> rtems-5.0.0-m2005-1/testsuites/libtests/tar01/tar01.scn
>> lrwxr-xr-x chris/1010        0 2020-05-01 03:03 
>> rtems-5.0.0-m2005-1/testsuites/libtests/tar01/symlink -> home/test_file
>> -rw-r--r-- chris/1010     8108 2020-05-01 03:03 
>> rtems-5.0.0-m2005-1/testsuites/libtests/tar01/init.c
>> -rw-r--r-- chris/1010      478 2020-05-01 03:03 
>> rtems-5.0.0-m2005-1/testsuites/libtests/tar01/tar01.doc
>> drwxr-xr-x chris/1010        0 2020-05-01 03:03 
>> rtems-5.0.0-m2005-1/testsuites/libtests/tar01/home/
>> -rw-r--r-- chris/1010       73 2020-05-01 03:03 
>> rtems-5.0.0-m2005-1/testsuites/libtests/tar01/home/test_file
>>
>> We recently battled this with newlib and that solution won't work here.
>
> I have raised #3938 and will remove the link from the source tree. The 
> test will need to be fixed at some point.
>
I can confirm this issue. I tried a workaround you find on the internet:

$ export MSYS=winsymlinks:nativestrict

$ tar xf rtems-5.0.0-m2005-1.tar.xz
tar: rtems-5.0.0-m2005-1/testsuites/libtests/tar01/symlink: Cannot 
create symlink to ‘home/test_file’: Operation not permitted
tar: Exiting with failure status due to previous errors

It seems I have a problem with symbolic links in general:

$ ln -s a b
ln: failed to create symbolic link 'b': Operation not permitted

If I unset MSYS, then the ln -s copies the file.

$ unset MSYS

$ ln -s a b

$ echo x > a

$ echo y > b

$ cat a
x

$ cat b
y



More information about the devel mailing list