Hi -
Using Redhat 7.9
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs AMD Ryzen Threadripper 1950X 16-Core Processor (800F11),ASM,AES-NI)
I have a directory with a bunch of libraries and symbolic links. If I create the archive with this command, everything is fine, and links are preserved:
But I don't want every single file to be in the archive, so i dump a list of names to a file, and prune out the libs that that i do not want. Creating the zip with:
7z a /data/foo.zip -bb3 -snl -mx3 -tzip -i@/tmp/zip_include_file.txt
creates it okay, but all the symbolic links are replaced with text files:
find . -name "libapr*" -ls
13763950 4 -rwxr-xr-x 1 17 Feb 17 09:55 ./libapr-1.so
13763953 4 -rwxr-xr-x 1 21 Feb 17 09:55 ./libaprutil-1.so
13763954 4 -rwxr-xr-x 1 21 Feb 17 09:55 ./libaprutil-1.so.0
13763951 4 -rwxr-xr-x 1 17 Feb 17 09:55 ./libapr-1.so.0
13763955 580 -rwxr-xr-x 1 590216 Feb 17 09:55 ./libaprutil-1.so.0.3.9
13763952 836 -rwxr-xr-x 1 856032 Feb 17 09:55 ./libapr-1.so.0.3.9
Is there a way to preserve symbolic links when creating an archive from a file list?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi -
Using Redhat 7.9
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs AMD Ryzen Threadripper 1950X 16-Core Processor (800F11),ASM,AES-NI)
I have a directory with a bunch of libraries and symbolic links. If I create the archive with this command, everything is fine, and links are preserved:
7z a /data/foo.zip -bb3 -snl -mx3 -tzip .
on extraction of foo.zip, i see symbolic links:
find . -name "libapr*" -ls
13763977 0 lrwxrwxrwx 1 17 Feb 17 12:49 ./libapr-1.so -> libapr-1.so.0.3.9
13763980 0 lrwxrwxrwx 1 21 Feb 17 12:49 ./libaprutil-1.so -> libaprutil-1.so.0.3.9
13763981 0 lrwxrwxrwx 1 21 Feb 17 12:49 ./libaprutil-1.so.0 -> libaprutil-1.so.0.3.9
13763978 0 lrwxrwxrwx 1 17 Feb 17 12:49 ./libapr-1.so.0 -> libapr-1.so.0.3.9
13763982 580 -rwxr-xr-x 1 590216 Feb 17 09:55 ./libaprutil-1.so.0.3.9
13763979 836 -rwxr-xr-x 1 856032 Feb 17 09:55 ./libapr-1.so.0.3.9
But I don't want every single file to be in the archive, so i dump a list of names to a file, and prune out the libs that that i do not want. Creating the zip with:
7z a /data/foo.zip -bb3 -snl -mx3 -tzip -i@/tmp/zip_include_file.txt
creates it okay, but all the symbolic links are replaced with text files:
find . -name "libapr*" -ls
13763950 4 -rwxr-xr-x 1 17 Feb 17 09:55 ./libapr-1.so
13763953 4 -rwxr-xr-x 1 21 Feb 17 09:55 ./libaprutil-1.so
13763954 4 -rwxr-xr-x 1 21 Feb 17 09:55 ./libaprutil-1.so.0
13763951 4 -rwxr-xr-x 1 17 Feb 17 09:55 ./libapr-1.so.0
13763955 580 -rwxr-xr-x 1 590216 Feb 17 09:55 ./libaprutil-1.so.0.3.9
13763952 836 -rwxr-xr-x 1 856032 Feb 17 09:55 ./libapr-1.so.0.3.9
Is there a way to preserve symbolic links when creating an archive from a file list?