!6 reset %defattr when -k option specified

From: @xinyingchao 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2022-03-28 06:41:51 +00:00 committed by Gitee
commit e693dbd50f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 10ef16bc38f4b3480a60fff829df09cb6b02761b Mon Sep 17 00:00:00 2001
From: licunlong1 <licunlong1@huawei.com>
Date: Wed, 9 Mar 2022 16:40:49 +0800
Subject: [PATCH] reset %defattr when users want to keep files permission, uid
and gid
---
rpmrebuild_files.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rpmrebuild_files.sh b/rpmrebuild_files.sh
index 30bd91d..f0798a8 100755
--- a/rpmrebuild_files.sh
+++ b/rpmrebuild_files.sh
@@ -69,6 +69,10 @@ if [ "X$RPMREBUILD_CAP_FROM_FS" = "Xyes" ]; then
fi
fi
+if [ "X$RPMREBUILD_PUG_FROM_FS" = "Xyes" ]; then
+ echo "%defattr(-,-,-,-)"
+fi
+
while :; do
read file_type
[ "x$file_type" = "x" ] && break
--
2.23.0

View File

@ -1,11 +1,13 @@
Name: rpmrebuild
Version: 2.16
Release: 1
Release: 2
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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: rpm grep bash cpio textutils rpm-build
@ -56,6 +58,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%{_mandir}/fr/man1/*.gz
%changelog
* Mon Mar 28 2022 yuanxin <yuanxin24@h-partners.com> - 2.16-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:reset %defattr when -k option specified
* Mon Jul 19 2021 yuanxin <yuanxin24@huawei.com> - 2.16-1
- Type:enhancement
- ID:NA