1 Star 0 Fork 90

yueyaoqiang/openEuler-rpm-config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
exclude-kernel-source-and-EFI-files-in-digest-list-building.patch 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
From 85e9f95d163eb3daa75add855be3208472c51850 Mon Sep 17 00:00:00 2001
From: Anakin Zhang <benjamin93@163.com>
Date: Thu, 8 Apr 2021 19:09:00 +0800
Subject: [PATCH] exclude kernel source and EFI files in digest list building
Signed-off-by: Anakin Zhang <benjamin93@163.com>
---
brp-digest-list | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/brp-digest-list b/brp-digest-list
index c3b2156..e698b7a 100644
--- a/brp-digest-list
+++ b/brp-digest-list
@@ -8,8 +8,6 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi
-
-
# Create temporary file listing files in the manifest
#[ -n "$TMPDIR" ] || TMPDIR="/tmp"
TMPDIR="/tmp"
@@ -34,6 +32,8 @@ mkdir -p $DIGEST_LIST_DIR.sig
gen_digest_lists -i M: -t metadata -f compact -d $DIGEST_LIST_DIR -i l:policy \
-i i: -o add -p -1 -m immutable -i L:$BIN_PKG_FILES -i u: \
-A $RPM_BUILD_ROOT -i e: \
+ -i E:/usr/src \
+ -i E:/boot/efi \
-i F:/lib \
-i F:/usr/lib \
-i F:/lib64 \
@@ -43,16 +43,18 @@ gen_digest_lists -i M: -t metadata -f compact -d $DIGEST_LIST_DIR -i l:policy \
-i F:/lib/firmware \
-i F:/usr/lib/firmware
-f="$DIGEST_LIST_DIR/0-metadata_list-compact-$(basename $BIN_PKG_FILES)"
-[ -f $f ] || exit 0
+DIGEST_LIST_PATH="$DIGEST_LIST_DIR/0-metadata_list-compact-$(basename $BIN_PKG_FILES)"
+[ -f $DIGEST_LIST_PATH ] || exit 0
-chmod 644 $f
-echo $f
+chmod 644 $DIGEST_LIST_PATH
+echo $DIGEST_LIST_PATH
# Generate TLV digest list to check metadata
gen_digest_lists -i M: -t metadata -f compact -d $DIGEST_LIST_DIR.tlv \
-i l:policy -i i: -o add -p -1 -m immutable -i L:$BIN_PKG_FILES -i u: \
-T -A $RPM_BUILD_ROOT -i e: \
+ -i E:/usr/src \
+ -i E:/boot/efi \
-i F:/lib \
-i F:/usr/lib \
-i F:/lib64 \
@@ -62,11 +64,11 @@ gen_digest_lists -i M: -t metadata -f compact -d $DIGEST_LIST_DIR.tlv \
-i F:/lib/firmware \
-i F:/usr/lib/firmware
-f="$DIGEST_LIST_DIR.tlv/0-metadata_list-compact_tlv-$(basename $BIN_PKG_FILES)"
-[ -f $f ] || exit 0
+DIGEST_LIST_TLV_PATH="$DIGEST_LIST_DIR.tlv/0-metadata_list-compact_tlv-$(basename $BIN_PKG_FILES)"
+[ -f $DIGEST_LIST_TLV_PATH ] || exit 0
-chmod 644 $f
-echo $f
+chmod 644 $DIGEST_LIST_TLV_PATH
+echo $DIGEST_LIST_TLV_PATH
if [[ "$(basename $BIN_PKG_FILES)" =~ "digest-list-tools" && \
! $(basename $BIN_PKG_FILES) =~ "debug" ]]; then
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yueyaoqiang/openEuler-rpm-config.git
git@gitee.com:yueyaoqiang/openEuler-rpm-config.git
yueyaoqiang
openEuler-rpm-config
openEuler-rpm-config
master

搜索帮助