Skip to content

chore(build): vendor all crates for offline intranet builds - #6

Merged
lzwind merged 2 commits into
linuxdeepin:mainfrom
add-uos:main
Sep 20, 2026
Merged

lzwind merged 2 commits into
linuxdeepin:mainfrom
add-uos:main

Conversation

@add-uos

@add-uos add-uos commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Replace crates.io with the local vendor/ directory via .cargo/config.toml (net.offline enabled) so cargo never touches the network. Protect vendored files inside debian/rules from dh_clean deletions and autotools-config rewrites, and build the Debian packages with --offline --locked and an isolated CARGO_HOME.

通过 .cargo/config.toml 将 crates.io 替换为本地 vendor/ 目录并开启 net.offline,构建过程完全不访问外网;debian/rules 中保护 vendored
文件不被 dh_clean 删除、不被 autotools 更新改写,Debian 打包改为
--offline --locked 并使用隔离的 CARGO_HOME。

Log: 改造为离线/内网构建,vendor 全部第三方依赖
Influence: 内网机器可直接 dpkg-buildpackage 离线打包;新增/升级依赖需 在有外网的机器执行 CARGO_NET_OFFLINE=false cargo vendor vendor 后同步 vendor/ 目录。

Replace crates.io with the local vendor/ directory via
.cargo/config.toml (net.offline enabled) so cargo never touches
the network. Protect vendored files inside debian/rules from
dh_clean deletions and autotools-config rewrites, and build the
Debian packages with --offline --locked and an isolated CARGO_HOME.

通过 .cargo/config.toml 将 crates.io 替换为本地 vendor/ 目录并开启
net.offline,构建过程完全不访问外网;debian/rules 中保护 vendored
文件不被 dh_clean 删除、不被 autotools 更新改写,Debian 打包改为
--offline --locked 并使用隔离的 CARGO_HOME。

Log: 改造为离线/内网构建,vendor 全部第三方依赖
Influence: 内网机器可直接 dpkg-buildpackage 离线打包;新增/升级依赖需
在有外网的机器执行 CARGO_NET_OFFLINE=false cargo vendor vendor 后同步
vendor/ 目录。

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 6835

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: add-uos

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

- update version to 0.4.2-1

log: update version to 0.4.2-1
@lzwind
lzwind merged commit 96d9f8b into linuxdeepin:main Sep 20, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants