# zimbra/zm-build architecture

> Architecture diagram of the GitHub repository zimbra/zm-build, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zimbra/zm-build
- Repository: https://github.com/zimbra/zm-build

## Overview

zm-build is a build system for producing FOSS Zimbra Collaboration Suite releases. The documented workflow is: an engineer configures and invokes the build, which uses repository, remote, and staging specifications to assemble a release artifact. The tree also shows bundling, package, installation, and upgrade components, but no source excerpts establish their call relationships. The graph therefore includes these major product areas without guessing their connections.

Main entry points: [`build.pl`](https://github.com/zimbra/zm-build/blob/develop/build.pl) (Build command), [`instructions/FOSS_repo_list.pl`](https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_repo_list.pl) (Repository selection), [`instructions/FOSS_remote_list.pl`](https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_remote_list.pl) (Remote mapping), [`instructions/FOSS_staging_list.pl`](https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_staging_list.pl) (Staging plan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Build orchestration"]
  node_build["Build command<br/>[build.pl]"]
end

subgraph group_inputs["Build inputs"]
  node_repo_map["Repository selection<br/>[FOSS_repo_list.pl]"]
  node_remote_map["Remote mapping"]
  node_staging["Staging plan"]
end

subgraph group_release["Release assembly"]
  node_bundle_scripts["Bundle scripts"]
  node_package_specs["Package definitions"]
  node_installer["Installer setup"]
  node_upgrade["Upgrade support<br/>[zmupgrade.pm]"]
end

node_engineer(("Build engineer"))
node_release_artifact["Build archive"]

node_engineer -->|"invokes"| node_build
node_build -->|"selects repositories"| node_repo_map
node_build -->|"maps remotes"| node_remote_map
node_build -->|"uses staging order"| node_staging
node_build -->|"produces archive"| node_release_artifact

click node_build "https://github.com/zimbra/zm-build/blob/develop/build.pl"
click node_repo_map "https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_repo_list.pl"
click node_remote_map "https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_remote_list.pl"
click node_staging "https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_staging_list.pl"
click node_bundle_scripts "https://github.com/zimbra/zm-build/tree/develop/instructions/bundling-scripts"
click node_package_specs "https://github.com/zimbra/zm-build/tree/develop/rpmconf/Spec"
click node_installer "https://github.com/zimbra/zm-build/tree/develop/rpmconf/Install"
click node_upgrade "https://github.com/zimbra/zm-build/blob/develop/rpmconf/Upgrade/zmupgrade.pm"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_build toneBlue
class node_repo_map,node_remote_map,node_staging toneAmber
class node_bundle_scripts,node_package_specs,node_installer,node_upgrade toneMint
class node_engineer,node_release_artifact toneIndigo
```

## Components

### Build orchestration

- [Build command](https://github.com/zimbra/zm-build/blob/develop/build.pl): `build.pl`

### Build inputs

- [Repository selection](https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_repo_list.pl): `instructions/FOSS_repo_list.pl`
- [Remote mapping](https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_remote_list.pl): `instructions/FOSS_remote_list.pl`
- [Staging plan](https://github.com/zimbra/zm-build/blob/develop/instructions/FOSS_staging_list.pl): `instructions/FOSS_staging_list.pl`

### Release assembly

- [Bundle scripts](https://github.com/zimbra/zm-build/tree/develop/instructions/bundling-scripts): `instructions/bundling-scripts`
- [Package definitions](https://github.com/zimbra/zm-build/tree/develop/rpmconf/Spec): `rpmconf/Spec`
- [Installer setup](https://github.com/zimbra/zm-build/tree/develop/rpmconf/Install): `rpmconf/Install`
- [Upgrade support](https://github.com/zimbra/zm-build/blob/develop/rpmconf/Upgrade/zmupgrade.pm): `rpmconf/Upgrade/zmupgrade.pm`

### Other components

- **Build engineer**
- **Build archive**

## Connections

- Build engineer → Build command: invokes (evidence: `README.md`)
- Build command → Repository selection: selects repositories (evidence: `README.md`)
- Build command → Remote mapping: maps remotes (evidence: `README.md`)
- Build command → Staging plan: uses staging order (evidence: `README.md`)
- Build command → Build archive: produces archive (evidence: `README.md`)
