Spring til hovedindhold
Version: TOS 7

Packaging and Verification

Deb Package Filename Naming Convention (Recommended):

  • The version is read from the version field in config.ini, not from the file name. Including a version number in the file name is optional; the recommended form omits it.
  • The platform does not validate the file name; it identifies the package type from the extension (.deb = single package, .tar.gz = dual-package archive) and verifies identity from config.ini after parsing the package. The names below are recommended so that packages are easy to distinguish by packaging hierarchy. Note that <appid> and <platform> are extracted from config.ini. <platform> is either x86_64 or aarch64.
Packaging ModeFormatExample
Single-package<appid>_<platform>.debmyapp_x86_64.deb
Dual-package (Archive)<appid>_<platform>.tar.gzmyapp_x86_64.tar.gz
Dual-package (Data Package)<appid>.debmyapp.deb
Dual-package (Source Package)<package>.debmyapp-backend.deb

Lintian Verification Requirements:

  • All Error (E) level issues must be fixed before submission
  • Warning (W) level issues should be reviewed; platform-critical warnings must be fixed
  • Info (I) level issues are informational, optionally addressed
  • Only use lintian --suppress-tags=<tag> for documented, intentional deviations

Dual-Package Archive Structure: The .tar.gz archive must have the following structure:

<appid>_<platform>.tar.gz
├── <appid>.deb # Application data package (recommended to match config.ini.id)
└── <package>.deb # Deb source package (use the default name, no modification needed)

The archive root must not contain subdirectories — .deb files must be at the root level of the archive.

Description:

  • <appid>.deb: Deb data package, used for display and operations in the App Center
  • <package>.deb: Deb source package, used to fulfill deb service functionality

Method 1: Single-Package Mode​

Step 1: Build the Deb Package

dpkg-deb --build ./<AppRootDir> ./<appid>_<version>_amd64.deb

Step 2: Verify the Package

dpkg-deb -c <appid>_<version>_amd64.deb
dpkg-deb -I <appid>_<version>_amd64.deb
lintian <appid>_<version>_amd64.deb # If lintian is available

Step 3: Generate Checksum

sha256sum <appid>_<version>_amd64.deb > <appid>_<version>_amd64.deb.sha256

Step 4: Test Installation

sudo dpkg -i <appid>_<version>_amd64.deb
sudo systemctl status <system_id>
sudo dpkg --purge <appid> # Uninstall

Method 2: Dual-Package Mode​

Step 1: Build the Deb Source Package

dpkg-deb --build ./<AppRootDir> ./<package>.deb

Step 2: Build the Deb Data Package

mkdir -p /tmp/<appid>/DEBIAN
mkdir -p /tmp/<appid>/usr/local/<appid>

# Copy TOS 7.0 configuration files to the data package
cp config.ini /tmp/<appid>/usr/local/<appid>/
cp <appid>.lang /tmp/<appid>/usr/local/<appid>/
cp -r images /tmp/<appid>/usr/local/<appid>/
# If external open, also copy nginx configuration
cp -r nginx /tmp/<appid>/usr/local/<appid>/ 2>/dev/null || true

# Create DEBIAN/control (see 8.13.2)
# ...

# Build the data package
dpkg-deb --build /tmp/<appid> ./<appid>.deb

Step 3: Package the Submission Archive

tar -czf <appid>_<platform>.tar.gz <appid>.deb <package>.deb

Step 4: Verify, Checksum, and Test Installation

# Verify
dpkg-deb -c <package>.deb && dpkg-deb -I <package>.deb
dpkg-deb -c <appid>.deb && dpkg-deb -I <appid>.deb

# Checksum
sha256sum <appid>_<platform>.tar.gz > <appid>_<platform>.tar.gz.sha256

# Test Installation
sudo dpkg -i <package>.deb
sudo dpkg -i <appid>.deb
sudo systemctl status <system_id>