feat(packaging): scaffold Ubuntu PPA debian/ for marqdo CLI

Add control/rules/changelog and ppa-build-source.sh (cargo vendor + debuild -S).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-17 09:57:11 +08:00
1 parent 9431ad835c
commit 9bc7ef3b5a
11 files changed
+294 -4

No files matched your search

+1
View File
@@ -54,6 +54,7 @@
| [design/ext-agent-plan.md](design/ext-agent-plan.md) | **`## 多步` / `## plan` 锁定设计**(工作簿文件、subtask 执行、修订循环、`step` 默认写回) |
| [design/ext-cli.md](design/ext-cli.md) | **`marqdo ext list/add/remove` 官方扩展安装器** |
| [design/ext-cdn.md](design/ext-cdn.md) | **扩展 CDN(R2 / ext.marqdo.com)与分开发版** |
| [design/ubuntu-ppa.md](design/ubuntu-ppa.md) | **Ubuntu PPA 打包与上传** |
| [design/ext-web.md](design/ext-web.md) | **官方扩展 `ext/web`(页面/库表/绑定/后台;ABI + CLI;设计锁定)** |
| [design/ext-web-go-rewrite.md](design/ext-web-go-rewrite.md) | **`plugins/web` Go 全量重写**(多语言 ABI · 网页制备完备 · anlian 验收) |
| [adr/0004-web-plugin-go.md](adr/0004-web-plugin-go.md) | **Accepted:web 原生插件实现语言为 Go** |
+88
View File
@@ -0,0 +1,88 @@
# Ubuntu PPA packaging (Marqdo)
| | |
|---|---|
| Status | **Scaffold** — local `debian/` ready; first upload needs Launchpad PPA + vendored crates |
| Maintainer | cflmy \<pingan@cflmy.cn\> |
| GPG | `505943294D04C803` (fingerprint `52A1…C803`) |
| Suggested PPA | `ppa:cflmy/marqdo` |
## Goal
Users install with:
```bash
sudo add-apt-repository ppa:cflmy/marqdo
sudo apt update
sudo apt install marqdo
```
CLI and extension packs stay independent: the `.deb` ships the **interpreter**; `marqdo ext add …` still pulls from **https://ext.marqdo.com** (then GitHub / proxy).
## One-time Launchpad setup
1. Create PPA: https://launchpad.net/~cflmy/+activate-ppa → name e.g. `marqdo`
2. OpenPGP key already on Launchpad (done)
3. Sign Ubuntu Code of Conduct if Launchpad asks
4. On the build machine:
```bash
sudo apt install build-essential debhelper devscripts dput lintian \
dh-cargo cargo rustc pkg-config
```
## Package layout
Debian packaging lives under repo-root `debian/` (this tree).
| File | Role |
|------|------|
| `debian/control` | Package metadata / deps |
| `debian/changelog` | Upload revisions (`dch`) |
| `debian/rules` | `dh` + cargo build |
| `debian/copyright` | Apache-2.0 |
| `debian/source/format` | `3.0 (quilt)` |
| `debian/watch` | Optional upstream tarball watch |
| `scripts/ppa-build-source.sh` | Vendor + `debuild -S` helper |
## Versioning
- Upstream SemVer: `Cargo.toml` / git tag `vX.Y.Z`
- Debian revision: `X.Y.Z-1ppa1~SERIES` (SERIES = `noble`, `jammy`, …)
- **Ext pack** SemVer (`ext/VERSION`) is **not** the deb version; bump deb only when CLI/stdlib packaging changes.
## Build source package (local)
```bash
# from repo root, clean tree preferred
./scripts/ppa-build-source.sh noble # or jammy
# → ../build-area/marqdo_X.Y.Z-1ppa1~noble_source.changes
```
The script vendors Cargo crates into `vendor/` (Launchpad builders have **no network**).
## Upload
```bash
dput ppa:cflmy/marqdo ../build-area/marqdo_*_source.changes
```
Wait for https://launchpad.net/~cflmy/+archive/ubuntu/marqdo/+builds
## Series strategy
Start with **one** series you use daily (e.g. `noble` 24.04 or `resolute` 26.04). Copy the changelog stanza and rebuild per series, or use `backportpackage` later.
## Out of scope (v1 deb)
- Shipping `ext/native/*.so` inside the deb (use CDN `ext add`)
- WASM / VSIX
- Multi-arch cross builds beyond amd64
## Checklist for first upload
- [ ] PPA `marqdo` exists under `~cflmy`
- [ ] `./scripts/ppa-build-source.sh <series>` succeeds
- [ ] `lintian` on `.changes` is acceptable
- [ ] `dput` accepted; amd64 build green on Launchpad
- [ ] Fresh VM: `add-apt-repository` + `apt install marqdo` + `marqdo version`