1
0
Joey Lee 62b873db57 Accepting request 989007 from home:gmbr3:Active
- Update attr.patch to fix ghost symlinks still being affected
- Add rpmlintrc.patch to stop copying it to the build output

OBS-URL: https://build.opensuse.org/request/show/989007
OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=115
2022-07-26 05:30:14 +00:00

36 lines
1.2 KiB
Diff

From f2d245886ad2e734922b17a8f1a3d24b5075c023 Mon Sep 17 00:00:00 2001
From: Callum Farmer <gmbr3@opensuse.org>
Date: Sat, 9 Jul 2022 16:15:26 +0100
Subject: [PATCH] Fix %attr issues
1) Avoid assigning %attr's to symlinks which causes rpmbuild spam
2) Change perms mask to 07777 to ensure SUID/SGID is copied over
---
pesign-gen-repackage-spec | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pesign-gen-repackage-spec b/pesign-gen-repackage-spec
index 688c375..ae7eba8 100755
--- a/pesign-gen-repackage-spec
+++ b/pesign-gen-repackage-spec
@@ -416,8 +416,6 @@ sub print_files {
$attrs .= "\%dir ";
utime($f->{mtime}, $f->{mtime}, $path);
}
- $attrs .= sprintf('%%attr(%04o, %s, %s) ', ($f->{mode} & 0777),
- $f->{owner}, $f->{group});
if ($f->{flags} & $filetypes{config}) {
$attrs .= "%config ";
my @cfg_attrs;
@@ -448,6 +446,10 @@ sub print_files {
symlink($f->{target}, $path);
}
}
+ unless (S_ISLNK($f->{mode})) {
+ $attrs .= sprintf('%%attr(%04o, %s, %s) ', ($f->{mode} & 07777),
+ $f->{owner}, $f->{group});
+ }
# mtime of symlinks is also not preserved by cpio
if (S_ISLNK($f->{mode})) {
# perl core does not provide lutimes()/utimensat()