Task 532: .PET File Format

Task 532: .PET File Format

1. List of Properties for .PET File Format

The .PET file format is used for Puppy Linux installation packages. It is essentially a gzipped tar archive (.tar.gz) with a 32-byte hexadecimal MD5 checksum appended to the end for integrity verification. The internal structure mimics a Linux filesystem hierarchy for direct overlay during installation. There is no traditional header or magic number specific to .PET beyond the gzip magic (0x1F 0x8B at offset 0), as identification relies on the file extension and the appended MD5.

Intrinsic properties (structural elements and metadata inherent to the format, including those related to its filesystem projection):

  • Appended MD5 Checksum: A 32-byte (32 hexadecimal characters) string at the end of the file, representing the MD5 hash of the preceding .tar.gz content.
  • Computed MD5 Hash: The MD5 hash calculated from the file content excluding the last 32 bytes (for verification; should match the appended checksum).
  • Integrity Status: Whether the computed MD5 matches the appended MD5 (true/false).
  • Archive Type: Gzipped tar archive containing a filesystem structure (e.g., directories like /usr/bin, /etc, projecting onto the root filesystem).
  • Metadata File: pet.specs (a text file at the tar root with a single |-delimited line of package metadata).
  • pet.specs Field 1 - Full Package Name: The complete package identifier (e.g., "medit-0.9.4").
  • pet.specs Field 2 - Base Package Name: The package name without version or architecture (e.g., "medit").
  • pet.specs Field 3 - Version: The package version (e.g., "0.9.4").
  • pet.specs Field 4 - Package Release: Build or release identifier (e.g., "2as").
  • pet.specs Field 5 - Category: Package category (e.g., "Document", "System", "Network").
  • pet.specs Field 6 - Size: Approximate installed size (e.g., "3500K").
  • pet.specs Field 7 - Repository Path: Path in the repository (e.g., "office/medit/0.9.4").
  • pet.specs Field 8 - Full Filename: The original package filename (e.g., "medit-0.9.4-i486-2as.pet").
  • pet.specs Field 9 - Dependencies: Comma-separated list of dependencies, prefixed with "+" (e.g., "+atk,+cairo").
  • pet.specs Field 10 - Description: Brief package description (e.g., "Multiplatform GTK text editor").
  • Post-Install Script: Presence of pinstall.sh at tar root (yes/no; optional shell script executed after installation).
  • Post-Uninstall Script: Presence of puninstall.sh at tar root (yes/no; optional shell script executed after uninstallation).
  • Desktop Files: List of .desktop files at tar root (for menu integration; optional, comma-separated if multiple).
  • Icon Files: List of icon files at tar root (e.g., 16x16 XPM or 48x48 PNG/XPM with "48" in name; optional, comma-separated if multiple).
  • Filesystem Projection: The tar contains directories mirroring Linux paths (e.g., /usr, /etc), which are overlaid onto the system's root during installation.

3. Ghost Blog Embedded HTML JavaScript for Drag-and-Drop .PET File Dump

.PET File Property Dumper
Drag and drop a .PET file here

Note: The gzip and tar parsing are placeholders in this embedded script (as full implementation requires additional libraries like pako.js and tar-js). In a real ghost blog post, include those libraries via