check if the file is a symbolic link in brp-digest-list

This commit is contained in:
fly_fzc 2023-11-03 15:22:50 +08:00
parent 4da686657f
commit 59b583b8ae
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 0eea7318489474d20e391cc55eb81f2a642e36f8 Mon Sep 17 00:00:00 2001
From: gaoyusong <gaoyusong2@huawei.com>
Date: Fri, 3 Nov 2023 10:55:26 +0800
Subject: [PATCH] check if the file is a symbolic link in brp-digest-list
---
brp-digest-list | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/brp-digest-list b/brp-digest-list
index 9ec50a2..77248c9 100644
--- a/brp-digest-list
+++ b/brp-digest-list
@@ -18,7 +18,7 @@ cat - > $BIN_PKG_FILES
trap "rm -f \"${BIN_PKG_FILES}\"" 0 2 3 5 10 13 15
# File empty, exit
-if [ -z $(head -c 1 $BIN_PKG_FILES) ]; then
+if [ -L $BIN_PKG_FILES ] || [ -z $(head -c 1 $BIN_PKG_FILES) ]; then
exit 0
fi
--
2.27.0

View File

@ -3,7 +3,7 @@
Name: %{vendor}-rpm-config Name: %{vendor}-rpm-config
Version: 30 Version: 30
Release: 44 Release: 45
License: GPL+ License: GPL+
Summary: specific rpm configuration files Summary: specific rpm configuration files
URL: https://gitee.com/openeuler/openEuler-rpm-config URL: https://gitee.com/openeuler/openEuler-rpm-config
@ -31,6 +31,7 @@ Patch17: Feature-support-EBS-sign-for-IMA-digest-list.patch
Patch18: fix-brp-ldconfig-riscv-default-library-directory.patch Patch18: fix-brp-ldconfig-riscv-default-library-directory.patch
Patch19: add-pyproject-macros.patch Patch19: add-pyproject-macros.patch
Patch20: add-pytest-and-tox-macros.patch Patch20: add-pytest-and-tox-macros.patch
Patch21: check-if-the-file-is-a-symbolic-link-in-brp-digest-list.patch
Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
@ -142,6 +143,9 @@ sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir
%{rpmvdir}/find-requires.ksyms %{rpmvdir}/find-requires.ksyms
%changelog %changelog
* Fri Nov 03 2023 fuanan <fuanan3@h-partners.com> - 30-45
- check if the file is a symbolic link in brp-digest-list
* Thu Nov 2 2023 Yang Yanchao <yangyanchao6@huawei.com> - 30-44 * Thu Nov 2 2023 Yang Yanchao <yangyanchao6@huawei.com> - 30-44
- kmodtool: use tmp.$$ instand of tmp.txt - kmodtool: use tmp.$$ instand of tmp.txt