all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH v4 many] fix #4995: Include symlinks in zip file restore
@ 2024-01-24 10:15 Filip Schauer
  2024-01-24 10:15 ` [pbs-devel] [PATCH v4 proxmox 1/3] compression: Refactor ZipEntry creation and add FileType enum Filip Schauer
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Filip Schauer @ 2024-01-24 10:15 UTC (permalink / raw)
  To: pbs-devel

Include symlinks when restoring files from a backup as a zip file.

Resulting ZIP files were successfully tested on Linux with: zipinfo,
unzip, unar

On Windows the extracted symlinks show up as regular files containing
the path to the destination. As far as I am aware Windows Explorer does
not support symlinks in ZIP files.

Changes since v3:
* Move content to Regular FileType enum
* Make ZipEntry private
* Add take_reader function to FileType enum

Changes since v2:
* Add a FileType enum and embed the symlink target into the enum.
* Add unit tests for ZipEncoder to the proxmox-compression crate

Changes since v1:
* Use P instead of &Path
* Fix compile error due to misplaced comma
* Check content before symlink_target, since regular files are more
  common than symlinks

proxmox:

Filip Schauer (3):
  compression: Refactor ZipEntry creation and add FileType enum
  compression: Add support for symlinks in zip files
  compression: Add unit tests for the ZipEncoder

 proxmox-compression/Cargo.toml   |   2 +-
 proxmox-compression/src/zip.rs   | 159 +++++++++++++++++++------------
 proxmox-compression/tests/zip.rs | 123 ++++++++++++++++++++++++
 3 files changed, 223 insertions(+), 61 deletions(-)
 create mode 100644 proxmox-compression/tests/zip.rs

proxmox-backup:

Filip Schauer (2):
  pxar: Adopt FileType enum when adding a zip entry
  fix #4995: pxar: Include symlinks in zip file creation

 pbs-client/src/pxar/extract.rs | 59 +++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 23 deletions(-)

-- 
2.39.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-29 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 10:15 [pbs-devel] [PATCH v4 many] fix #4995: Include symlinks in zip file restore Filip Schauer
2024-01-24 10:15 ` [pbs-devel] [PATCH v4 proxmox 1/3] compression: Refactor ZipEntry creation and add FileType enum Filip Schauer
2024-01-24 10:15 ` [pbs-devel] [PATCH v4 proxmox 2/3] compression: Add support for symlinks in zip files Filip Schauer
2024-01-24 10:15 ` [pbs-devel] [PATCH v4 proxmox 3/3] compression: Add unit tests for the ZipEncoder Filip Schauer
2024-01-24 10:15 ` [pbs-devel] [PATCH v4 backup 1/2] pxar: Adopt FileType enum when adding a zip entry Filip Schauer
2024-01-24 10:15 ` [pbs-devel] [PATCH v4 backup 2/2] fix #4995: pxar: Include symlinks in zip file creation Filip Schauer
2024-01-29 12:44 ` [pbs-devel] [PATCH v4 many] fix #4995: Include symlinks in zip file restore Folke Gleumes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal