|
| 1 | ++++ |
| 2 | +title = "Repository Metadata and Configuration Templates" |
| 3 | ++++ |
| 4 | + |
| 5 | +This specification defines the structure and content of repository (and mirror) metadata and configuration templates used by AOSC OS installations. |
| 6 | + |
| 7 | +Structure and Functions |
| 8 | +=== |
| 9 | + |
| 10 | +- `/usr/share/repository-data/` - system configuration prefix, configuration files found in this directory should be shipped with packages |
| 11 | + - `mirror.toml` - repository metadata |
| 12 | + - `comps.toml` - component (package collection) metadata |
| 13 | +- `/etc/repository-data/ - user configuration prefix, configuration files found in this directory are user-defined |
| 14 | + - A copy of `mirror.toml` and `comps.toml` may be placed here and is used to supplement their counterparts in `/usr/share/repository-data/` |
| 15 | + - IDs found in these configurations must be unique to those in `/usr/share/repository-data/` |
| 16 | + |
| 17 | +Main Configuration Files |
| 18 | +=== |
| 19 | + |
| 20 | +`/usr/share/repository-data/mirror.toml`: |
| 21 | + |
| 22 | +```toml |
| 23 | +[origin] |
| 24 | +description.default = "AOSC main repository (auto-redirect)" |
| 25 | +description.zh_CN = "安同开源社区官方源(自动重定向)" |
| 26 | +url = "https://repo.aosc.io/anthon/" |
| 27 | +``` |
| 28 | + |
| 29 | +`/usr/share/repository-data/comps.toml`: |
| 30 | + |
| 31 | +```toml |
| 32 | +[main] |
| 33 | +description.default = "The main collection of packages" |
| 34 | +description.zh_CN = "主软件集" |
| 35 | + |
| 36 | +[bsp-loongarch64-nosimd] |
| 37 | +description.default = "Packages for LoongArch64 BSP for no-SIMD platforms" |
| 38 | +description.zh_CN = "用于无 SIMD 的龙架构(64 位)平台的软件包" |
| 39 | +``` |
| 40 | + |
| 41 | +Repository Configuration Template |
| 42 | +=== |
| 43 | + |
| 44 | +`/usr/share/repository-data/template.toml` instructs package management frontends (such as oma) on how to make use of the above information to generate repository configurations, sections defined in this template should be written in-order to the target configuration file: |
| 45 | + |
| 46 | +```toml |
| 47 | +[[config]] |
| 48 | +# For options with multiple values. |
| 49 | +# |
| 50 | +# - sources.list: comma-separated (",") |
| 51 | +# - DEB-822: whitespace-separated |
| 52 | +# |
| 53 | +# List of components (package collections) |
| 54 | +# |
| 55 | +# Written as an array and converted to string, space in sources.list or |
| 56 | +# whitespace-separated in DEB-822 configurations |
| 57 | +components = ["main"] |
| 58 | +# |
| 59 | +# Signature configuration, APT generally requires repository to be GPG-signed |
| 60 | +# |
| 61 | +signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"] |
| 62 | +# |
| 63 | +# Whether to check for repository signature |
| 64 | +# |
| 65 | +# Corresponds to "[trusted=yes]" in sources.list or "Trusted: yes" in DEB-822 |
| 66 | +# |
| 67 | +# Defaults to false if not specified |
| 68 | +always-trusted = <true|false> |
| 69 | +# |
| 70 | +# Architecture configuration - to define the range of architectures supported |
| 71 | +# by a specific repository |
| 72 | +# |
| 73 | +# Defaults to `dpkg --print-architecture` + all (noarch) if not specified |
| 74 | +# |
| 75 | +# For packages of multiple architectures |
| 76 | +architectures = ["amd64","arm64"] |
| 77 | +# For all architecture-agnostic packages |
| 78 | +architectures = ["all"] |
| 79 | +# For all architecture-specific packages |
| 80 | +architectures = ["any"] |
| 81 | +# Equivalent of default |
| 82 | +architectures = ["all","any"] |
| 83 | +# |
| 84 | +# Whether to enable the repository |
| 85 | +# |
| 86 | +# Corresponds to commented/not-commented in sources.list or "Enabled: yes/no" in DEB-822 |
| 87 | +# |
| 88 | +# Defaults to true if not specified |
| 89 | +enabled = <true|false> |
| 90 | +``` |
| 91 | + |
| 92 | +Example: Mainline Distribution |
| 93 | +--- |
| 94 | + |
| 95 | +```toml |
| 96 | +[[config]] |
| 97 | +components = ["main"] |
| 98 | +signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"] |
| 99 | +``` |
| 100 | + |
| 101 | +Example: loongarch64-nosimd |
| 102 | +--- |
| 103 | + |
| 104 | +```toml |
| 105 | +[[config]] |
| 106 | +components = ["bsp-loongarch64-nosimd"] |
| 107 | +signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"] |
| 108 | +architectures = ["loongarch64"] |
| 109 | + |
| 110 | +[[config]] |
| 111 | +components = ["main"] |
| 112 | +signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"] |
| 113 | +architectures = ["all"] |
| 114 | +``` |
0 commit comments