dsh-ubuntu-packaging: Inspecting, Generating, and Planning Debian/Ubuntu Source Packages in DSH

Preface

In DeepSeek Harness (dsh), when enabling agents to participate in packaging work, the difficulty often lies not in “whether you can write debian/control”, but in a complete set of stable actions: first understanding the existing debian/ layout, then performing static checks aligned with Lintian, generating skeletons when necessary, finally providing executable build and test steps, and locating missing Build-Depends or rule errors from logs upon failure. Manually flipping through documentation, piecing together commands, and letting the model improvise all easily miss review points like changelog and control mismatches, DEP-5, DEP-8, etc.

Below introduces the community plugin dsh-ubuntu-packaging (maintainer HougeLangley, category Workflow). It provides six read-only tools (except scaffolding) and the runtime skill ubuntu-packaging on the host machine, specifically designed for Ubuntu/Debian source packages: inspection, linting, scaffolding, build planning, test planning, and build log diagnosis, and by default does not spawn a shell or access the network.

What is this

dsh-ubuntu-packaging is a toolkit for Ubuntu/Debian source packages for DeepSeek Harness. The plugin registers tools and skills within the dsh process, helping agents complete the “Check → Fix Ideas → Plan Build/Test → Read Logs for Troubleshooting” cycle following a fixed methodology.

Repository: https://github.com/HougeLangley/dsh-ubuntu-packaging
Community Directory Page: https://www.skillhub.cn/plugins/HougeLangley/dsh-ubuntu-packaging

Note: SkillHub and other community directories have no official affiliation with DeepSeek or Synthesia (幻方); the DSH ecosystem philosophy is “everything is a plugin”. Please check the source code and license yourself before installing (this plugin is MIT).

Core Capabilities

Six Host Tools

Except for ubuntu_scaffold_package which only writes to <sourceDir>/debian/, the other tools do not modify the disk; build and test plans are text plans to be executed by you or the agent on a host with the toolchain. None spawn a shell or go online.

Tool Function
ubuntu_inspect_package Parse debian/, normalize output layout, changelog, deb822 control, rules, source/format, DEP-3 patches, DEP-8 tests, and issues found during inspection
ubuntu_lint_package Static check, compatible with Lintian; can set strict: true to treat warnings as failures
ubuntu_scaffold_package Generate verified debian/ skeleton; refuses to write if debian/ already exists unless overwrite: true
ubuntu_build_plan Output an ordered build plan based on the distribution baseline (toolchain, source preparation, sbuild/dpkg-buildpackage/debuild, artifact checks, lintian, signing and upload instructions, etc.)
ubuntu_test_plan Output a test plan (lintian, install/smoke/remove/purge, DEP-8, autopkgtest scenarios and failure diversion strategies)
ubuntu_diagnose_build Read the build log provided (inline text or file path), provide evidence, cause, specific fix, and documentation links

The default Lint and plan distribution baselines are Ubuntu 26.04 LTS “resolute”; differences for 25.10 “questing” and 24.04 LTS “noble” are separately documented.

Skill ubuntu-packaging

The plugin also registers the runtime skill ubuntu-packaging, encapsulating resolute/questing/noble baselines, source and binary packages, version strings, dpkg-buildpackage/sbuild/debuild/gbp builds, lintian/autopkgtest/piuparts/reprotest testing, PPA and archive publishing steps, FTBFS and autopkgtest fix playbooks, changelog conventions, DEP-3/DEP-5, debian/watch, and troubleshooting tables. Reference materials are located in the repository skills/ubuntu-packaging/references/.

Environment and Dependencies

  • dsh: 0.2.x series, specifically 0.2.0 or higher (package.json engines.dsh is >=0.2.0-0 <0.3.0-0).
  • Node.js: 22 or higher; pure ESM, no TypeScript, no build steps.
  • Real build and package testing: Suggest running on Ubuntu 22.04 or higher (or Debian derivatives) hosts, installing dpkg-buildpackage, sbuild, lintian, autopkgtest, etc., as root; prerequisites for each plan are listed in the body text. On Ubuntu 25.10 and newer versions, sbuild recommends using the unshare backend.

The tools themselves can run in any environment that can execute dsh to read files and generate plans; running the full build chain on Ubuntu is the “real machine” scenario.

Installation and Enablement

Can be loaded into web or desktop profile, commands are the same except for the profile name. After choosing one way, restart dsh web or the desktop application. If the optional peer @deepseek-ai/dsh-tools is missing, it only warns; activation and skill loading can still succeed.

Install from GitHub

dsh plugin --profile web add github:HougeLangley/dsh-ubuntu-packaging

Install from v0.1.0 release tarball

curl -LO https://github.com/HougeLangley/dsh-ubuntu-packaging/releases/download/v0.1.0/dsh-ubuntu-packaging-0.1.0.tgz
dsh plugin --profile web add ./dsh-ubuntu-packaging-0.1.0.tgz

dsh plugin add can also directly use the release URL instead of a local path.

Install from Plugins Page

Add github:HougeLangley/dsh-ubuntu-packaging, a released .tgz, or a local path in Settings → Plugins, then enable the plugin.

The plugin runs with the current dsh process permissions; please verify the repository source code and MIT license terms before installing and enabling.

Typical Usage (README Example Prompts)

The following prompts are excerpted from the official README and can be used directly after enabling the plugin (replace paths and metadata according to your project).

Inspect package before upload

Inspect ./hello-2.10 and tell me what would fail review: changelog versus control mismatch, debhelper compat, missing DEP-5 fields, malformed patches. Then fix the lint errors you find.

Generate debian/ skeleton

Scaffold a debian/ directory for ./hello-2.10: package hello, upstream 2.10, -0ubuntu1, target resolute, maintainer Jane Doe <jane@example.com>, homepage https://www.gnu.org/software/hello/, license GPL-3+, autotools build, and include a DEP-8 smoke test.

Diagnose failed build

Here is my sbuild log. Why did it fail, which Build-Depends line in debian/control is missing, and what exactly should I patch?

Suggested workflow: first use ubuntu_inspect_package / ubuntu_lint_package to identify review risks, use ubuntu_scaffold_package if directories are missing, then use ubuntu_build_plan and ubuntu_test_plan to execute against the host toolchain; leave failed logs to ubuntu_diagnose_build.

Security and Side Effects (Design Boundaries)

The official README emphasizes:

  • The six tools do not execute shell; plan text needs to be executed by yourself.
  • No network: no downloading source code, no querying Launchpad, no uscan, no uploading.
  • Write scope: only ubuntu_scaffold_package writes to <sourceDir>/debian/.
  • No auto-fix, no auto-upload: the conclusion includes specific editing suggestions, and it is up to you whether to apply them.

Applicable Scenarios and Notes

Suitable for: Developers maintaining Ubuntu/Debian source packages in DSH, needing Lintian alignment checks and reproducible build/test checklists, and wanting agents to follow the ubuntu-packaging skill instead of guessing commands.

Note: Star count and user scale are based on the GitHub page (directory link shows 0); package.json current version is 0.1.1, coexisting with the example tarball v0.1.0 installation method in the README, depending on your chosen installation source. Real packaging still relies on the local sudo apt installed toolchain; the plugin does not replace the execution of sbuild or autopkgtest.

Conclusion

dsh-ubuntu-packaging brings common inspection, linting, scaffolding, and build/test planning for Debian/Ubuntu source packages into a set of DSH tools and skills, and converges troubleshooting to log evidence and actionable fix instructions. If you repeatedly deal with debian/ in Harness workflows, you can enable the plugin with the commands above and then combine the example prompts in the README to implement the first round of inspection or scaffolding.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye