Skip to main content

Dual-Package Mode Specification

In dual-package mode, the original application package (deb source package) remains unchanged, with an additional application data package (deb data package) provided. The deb data package contains the configuration files required by TOS 7.0, and both are packaged into a tar.gz archive for submission.

Data Package Naming Rule: <appid>.deb (recommended to match config.ini.id, all lowercase)

Data Package Internal File Structure:

<appid>.deb
├── DEBIAN/
│ ├── control
│ └── postinst
└── usr/
└── local/
└── <appid>/
├── config.ini
├── <appid>.lang
├── images/
│ └── icons/
│ └── <appid>.svg
├── webui.bz2 # Required for WebUI applications
└── nginx/ # Only needed for external open
└── <appid>.conf

Data Package DEBIAN/postinst:

#!/bin/bash
set -e

# Ensure correct configuration file permissions
chmod 644 /usr/local/<appid>/config.ini 2>/dev/null || true
chmod 644 /usr/local/<appid>/<appid>.lang 2>/dev/null || true
chmod 644 /usr/local/<appid>/images/icons/<appid>.svg 2>/dev/null || true

exit 0

Data Package config.ini Notes:

  • The icon path is fixed as /images/icons/<appid>.svg (matching the data package icon filename)
  • id must exactly match the id field in config.ini
  • version must exactly match the Version in the source package metadata
  • application_type must be set to deb-TarGz
  • package must match the Package field in the data package's DEBIAN/control

Source Package Internal File Structure:

<package>.deb
├── DEBIAN/
│ ├── control
│ ├── preinst
│ ├── postinst
│ ├── prerm
│ └── postrm
└── usr/
└── local/
└── <appid>/
├── bin/
│ └── <binary_name>
├── depends/ # If dependencies exist
│ ├── bin/
│ ├── lib/
│ └── ...
└── init.d/
└── <system_id>.service

Submission Archive Structure:

<appid>_<platform>.tar.gz
├── <appid>.deb # Deb data package
└── <package>.deb # Deb source package

GitHub Repository Data Structure (Dual-Package Mode):

<appid>_<platform>.tar.gz
├── <appid>.deb # Application data package
└── <package>.deb # Deb source package (original application package)

Dual-Package Mode Mandatory Constraints:

ConstraintDescriptionViolation Consequence
Installation OrderThe source package (<package>.deb) must be installed first, followed by the data package (<appid>.deb). The data package depends on the source package.Installation failure
Strict Version ConsistencyThe Version of both packages must be exactly the same. Any version mismatch triggers automatic rejection.Automatic rejection
No Binaries in Data PackageThe data package (<appid>.deb) must not contain any executable binary files, compiled code, or system-specific libraries. Only configuration files, icons, language files, nginx configurations, and other static resources are allowed.Intercepted at the automatic validation stage before submission, without entering manual review.
Data Package ArchitectureThe data package Architecture must be all, and must not be amd64 or arm64. Configuration files are architecture-independent.Automatic rejection
Source Package IndependenceThe deb source package must be independently installable on the TOS 7.0 system using the dpkg -i command.Installation failure
Dependency DeclarationThe data package's Depends field must include the source package name, and specifying the version is recommended.Rejection
Systemd Service File OwnershipThe systemd service file (.service) must be in the source package; the data package must not contain it. The data package is only responsible for TOS platform configuration and display.Rejection
Uninstallation OrderWhen uninstalling, remove the data package first, then the source package. Uninstalling the data package does not affect the source package's runtime data.

Installation and Uninstallation Process:

# Installation order
sudo dpkg -i <package>.deb # 1. Install deb source package first
sudo dpkg -i <appid>.deb # 2. Then install deb data package

# Uninstallation order
sudo dpkg --remove <appid> # 1. Uninstall data package first
sudo dpkg --purge <package> # 2. Then uninstall source package (`<package>` is the `Package` field value declared in the source package's DEBIAN/control, which is usually different from the data package's `<appid>`)