Replace the deprecated p7zip with the official 7-Zip (7zip) package for enhanced POSIX support and performance

Problem/Justification

The current p7zip (v16.02) included in TrueNAS SCALE is a community fork that has been unmaintained since 2016. It suffers from significant limitations in modern Linux environments, specifically:

  1. Incomplete POSIX Support: Users frequently encounter E_NOTIMPL (Error: Not Implemented) when attempting to use advanced flags like -sni (store security information/permissions) or -snh (store hard links), which are critical for data-consistent backups.

  2. Wildcard Inconsistency: The exclusion logic (-xr!) in v16.02 is buggy and often fails to match paths correctly, leading to bloated backups containing temporary or versioning metadata (e.g., Syncthing’s .stversions).

  3. Performance Gap: It lacks optimizations for modern instruction sets (like the latest AVX2/AES-NI implementations) available in the official 7-Zip Linux port.

Impact

Switching to the official 7zip provides several key benefits:

  • Reliability: Full support for POSIX permissions and symbolic/hard links, ensuring that restored data maintains its original ownership and attributes.

  • Compatibility: Better interoperability with Windows 7-Zip clients, especially when using AES-256 encryption and Header Encryption (-mhe=on).

  • Efficiency: Improved multi-threading performance on modern multi-core CPUs (e.g., Intel 12th/13th Gen).

  • Maintenance: Leverages the upstream maintenance by Igor Pavlov, the original 7-Zip creator.

User Story

A user wants to automate a secure, encrypted backup of their Syncthing data directory to a remote location.

  1. The user writes a script using the command 7z a -p -mhe=on -sni -snh backup.7z /mnt/pool/syncthing.

  2. Unlike the old p7zip, the process completes successfully without E_NOTIMPL errors, and all folder permissions are preserved.

  3. The user can then move this .7z file to a Windows machine and extract it using the latest 7-Zip GUI, maintaining a seamless cross-platform workflow.

  4. In a disaster recovery scenario, the user restores the file back to TrueNAS, where all original Linux UIDs/GIDs are perfectly intact, allowing Docker containers to restart without permission issues.

You will get that either way because 7zip is dependency of p7zip in Trixie. Debian -- Details of package p7zip in trixie

屏幕截图 2026-04-06 071346
Thanks for your reply. To clarify, the theoretical dependency in Trixie doesn’t align with the current TrueNAS SCALE reality.

As shown in the screenshot, running 7z still invokes the legacy v16.02 (2016) instead of the modern v25.01.

Since current SCALE isn’t based on Trixie, that isn’t surprising. TrueNAS 26 will be based on Trixie.

What does this show?
which 7z

屏幕截图 2026-04-06 071346
Thanks for your reply. To clarify, the theoretical dependency in Trixie doesn’t align with the current TrueNAS SCALE reality.

As shown in the screenshot, running 7z still invokes the legacy v16.02 (2016) instead of the modern v25.01.

Thanks for the clarification. However, the situation remains consistent even on Debian 12 (Bookworm):

In the Bookworm repository, the 7zip package provides v22.01, while the p7zip package is stuck at the deprecated v16.02.

1 Like

屏幕截图 2026-04-06 082231

Why is p7zip even being offered by Debian in their package repos? 7-zip had superseded it a while ago.

That’s exactly the point. p7zip is essentially a legacy relic in the Debian ecosystem:

  1. In Bookworm (Current SCALE): 7zip and p7zip are two entirely separate packages. To avoid conflicts, they provide different binaries: 7zz for the modern version (v22.01) and 7z for the legacy one (v16.02). TrueNAS currently defaults to the legacy one.
  2. In Trixie (Future SCALE): Debian is officially superseding p7zip with 7zip. As confirmed in the Trixie repositories, p7zip becomes a transitional package, and the standard 7z command will finally point to the modern v25+ codebase (no more 7zz suffix needed).

Since 7zip is already available in the Bookworm repos, TrueNAS doesn’t need to wait for Trixie to fix this. Switching the default package now would resolve the current functional gaps (POSIX/ACL support).