Skip to main content

DEBIAN/control File

Single-Package Mode

In single-package mode, all content is integrated into a single deb package:

Package: <appid>
Version: <version>
Architecture: amd64
Section: utils
Priority: optional
Maintainer: Developer Name <your.email@example.com>
Depends: libc6 (>= 2.34), systemd
Description: Brief description
Detailed description of the application's functionality.

Field Reference:

FieldRequiredDescription
Package✅ YesPackage name. Must match the package field in config.ini.
Version✅ YesPackage version. Must match the version field in config.ini.
Architecture✅ Yesx86_64: amd64, aarch64: arm64.
SectionYesPackage classification (e.g., utils, web, net).
PriorityYesUsually optional.
Maintainer✅ YesDeveloper name and email.
DependsRecommendedRuntime dependencies. Declare all required system libraries and packages.
Description✅ YesFirst line is a brief description; subsequent lines are a detailed description. See the format rules below.

Architecture Field Reference:

TOS PlatformDEBIAN/control ArchitectureBuild Target
x86_64 / amd64amd64x86_64-pc-linux-gnu
aarch64 / arm64arm64aarch64-linux-gnu

Common Errors:

  • Using x86_64 in DEBIAN/control → must use amd64
  • Note: TOS 7 only supports 64-bit architectures (x86_64 and aarch64); 32-bit ARM (armhf/armel) is not supported.

Description Field Format:

  • Line 1: Brief description (max 80 characters, no leading whitespace)
  • Subsequent lines: Detailed description (each line must start with a single space, max 80 characters per line)
  • Empty lines in the description must contain a space followed by a period: .

Example:

Description: Short summary of the software package
This is the detailed description.
It can span multiple lines,
each beginning with a single space.
.
This is a new paragraph.

Dual-Package Mode

Dual-package mode is suitable for applications with existing generic standard deb packages. The source package remains unchanged, with an additional application data package provided.

Application Data Package DEBIAN/control:

Package: <appid>
Version: <version>
Architecture: all
Section: utils
Priority: optional
Maintainer: Developer Name <your.email@example.com>
Depends: <package> (>= <version>)
Description: Application data package - <App Name>
TerraMaster App Center metadata package for <App Name>.

Naming Note: The data package name uses <appid> (recommended to match config.ini.id), while the source package name uses <package> (the original application's default package name). The data package declares its dependency on the source package via the Depends field.

Dual-Package Field Association Rules:

FieldData PackageSource PackageAssociation Requirement
Package<appid><package>Data package name recommended to match config.ini.id
Version<version><version>Must be exactly the same
Architectureallamd64/arm64Data package is usually all; source package is the actual architecture

config.ini Field Associations:

FieldAssociation Description
config.ini.packageMust match the data package metadata package
config.ini.versionMust match the data package metadata version
config.ini.system_idMust match the source package systemd service id
config.ini.path (when external open)Must correspond to the nginx configuration file route, resolving to the <listen_port> provided by the source package

Data Package Internal File Structure:

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

Source Package Internal File Structure:

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