!13 fix the CreateBuildRoot error when using rpmrebuild command

From: @dongyuzhen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2022-06-28 12:49:14 +00:00 committed by Gitee
commit d32792f433
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From ae0eae172e9f6775aa231ca003346329bd4a9ef0 Mon Sep 17 00:00:00 2001
From: dongyuzhen <dongyuzhen@h-partners.com>
Date: Thu, 16 Jun 2022 10:53:57 +0800
Subject: [PATCH] fix the CreateBuildRoot error when using rpmrebuild command
Because the rpmrebuild_buildroot.sh file writing is not standard,when
using rpmrebuild command,the system will report CreateBuildRoot error.
---
rpmrebuild_buildroot.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpmrebuild_buildroot.sh b/rpmrebuild_buildroot.sh
index 731a609..4af3c0a 100755
--- a/rpmrebuild_buildroot.sh
+++ b/rpmrebuild_buildroot.sh
@@ -74,7 +74,7 @@ while :; do
# result will be 4 permissions characters
file_perm="${file_perm#${not_perm}}"
Mkdir_p "$BuildRoot/$file" || Critical "$MY_BASENAME Mkdir_p $BuildRoot/$file"
- chmod "$file_perm $BuildRoot/$file" || Critical "$MY_BASENAME chmod $file_perm $BuildRoot/$file"
+ chmod "$file_perm" "$BuildRoot/$file" || Critical "$MY_BASENAME chmod $file_perm $BuildRoot/$file"
;;
*)
--
2.27.0

View File

@ -1,12 +1,13 @@
Name: rpmrebuild
Version: 2.16
Release: 2
Release: 3
Summary: A tool to build a rpm file from the rpm database
License: GPLv2+
URL: http://rpmrebuild.sourceforge.net
Source0: https://downloads.sourceforge.net/rpmrebuild/%{name}-%{version}.tar.gz
Patch9000: bugfix-reset-defattr-when-users-want-to-keep-files-permissi.patch
Patch9001: openEuler-fix-the-CreateBuildRoot-error-when-using-rpmrebuild-command.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -58,6 +59,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%{_mandir}/fr/man1/*.gz
%changelog
* Tue Jun 28 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix the CreateBuildRoot error when using rpmrebuild command
* Mon Mar 28 2022 yuanxin <yuanxin24@h-partners.com> - 2.16-2
- Type:bugfix
- ID:NA