Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions deploy_dep

This file was deleted.

162 changes: 0 additions & 162 deletions install_dep

This file was deleted.

33 changes: 16 additions & 17 deletions linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,34 @@ command:
- deepin-editor

build: |
# 下载和安装依赖
apt -y install --download-only qt6-5compat-dev qt6-base-dev qt6-tools-dev-tools qt6-tools-dev qt6-base-private-dev qt6-svg-dev libdtk6widget-dev libdtk6gui-dev libdtk6core-dev libdtk6declarative-dev libpolkit-qt6-1-dev libkf6syntaxhighlighting-dev libkf6codecs-dev libgtest-dev libgmock-dev libchardet-dev libuchardet-dev libicu-dev deepin-event-log
bash ./install_dep /var/cache/apt/archives "$PREFIX"

# 修改路径
sed -i 's|set(QT_LRELEASE "/lib/qt${QT_VERSION_MAJOR}/bin/lrelease")|set(QT_LRELEASE "lrelease")|g' cmake/translation-generate.cmake

# 构建
# 优先从 /runtime 解析 Qt6/DTK6,避免 buildext 装入 /usr 的 qt6 开发包抢占 find_package
VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
cmake -B build ${conf_args} \
-DCMAKE_PREFIX_PATH=/runtime \
-DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DVERSION=${VERSION}
cmake --build build -j`nproc`
cmake --build build --target install > install.log 2>&1

# 项目生成应用名和动态隐式加载的依赖库,ldd无法找到的其他库
LDD_FILES=(
deepin-editor
libdeepin-event-log.so
libzpdcallback.so

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High · ZPD restrictions are bypassed

When a ZPD-enabled build’s base/runtime layers do not provide libzpdcallback.so, libzpdcallback.so is dynamically loaded and is not captured by normal link dependency resolution. With the library removed from the explicit deployment list and absent from runtime dependencies, loadCustomDLL() leaves the callbacks null, so ZPD access-control hooks do not run and configured clipboard restrictions are bypassed.

Include libzpdcallback.so in the packaged app by restoring it to the explicit deployment list or declaring it as a runtime dependency.

Also at linglong.yaml:35.

Prompt for AI agents
In `linglong.yaml` at line 43:

**ZPD restrictions are bypassed**

When a ZPD-enabled build’s base/runtime layers do not provide `libzpdcallback.so`, `libzpdcallback.so` is dynamically loaded and is not captured by normal link dependency resolution. With the library removed from the explicit deployment list and absent from runtime dependencies, `loadCustomDLL()` leaves the callbacks null, so ZPD access-control hooks do not run and configured clipboard restrictions are bypassed.

Include `libzpdcallback.so` in the packaged app by restoring it to the explicit deployment list or declaring it as a runtime dependency.

Also at `linglong.yaml:35`.

)

# 生成.install 文件
bash ./deploy_dep "${LDD_FILES[@]}"
cmake --build build --target install

# allow apt download in build and do apt update
# 构建期与运行期缺失依赖声明式安装,由 linglong 解析闭包
buildext:
apt:
build_depends:
- libc6
- cmake
- libchardet-dev
- libicu-dev
- libkf6codecs-dev
- libkf6syntaxhighlighting-dev
- libuchardet-dev
depends:
- deepin-event-log
- libchardet1
- libkf6codecs6
- libkf6syntaxhighlighting6
- libuchardet0
Loading