diff --git a/attr.patch b/attr.patch index e056fe0..d3e9b17 100644 --- a/attr.patch +++ b/attr.patch @@ -1,6 +1,6 @@ -From 118395dd551022faea75debac0dca30515f03949 Mon Sep 17 00:00:00 2001 +From f2d245886ad2e734922b17a8f1a3d24b5075c023 Mon Sep 17 00:00:00 2001 From: Callum Farmer -Date: Wed, 22 Jun 2022 14:41:34 +0100 +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 @@ -10,19 +10,26 @@ Subject: [PATCH] Fix %attr issues 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pesign-gen-repackage-spec b/pesign-gen-repackage-spec -index 688c375..e5c961a 100755 +index 688c375..ae7eba8 100755 --- a/pesign-gen-repackage-spec +++ b/pesign-gen-repackage-spec -@@ -416,8 +416,10 @@ sub print_files { +@@ -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}); -+ unless (-l "$path") { -+ $attrs .= sprintf('%%attr(%04o, %s, %s) ', ($f->{mode} & 07777), -+ $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() diff --git a/pesign-obs-integration.changes b/pesign-obs-integration.changes index cd84df0..860c1d4 100644 --- a/pesign-obs-integration.changes +++ b/pesign-obs-integration.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jul 9 16:19:57 UTC 2022 - Callum Farmer + +- Update attr.patch to fix ghost symlinks still being affected +- Add rpmlintrc.patch to stop copying it to the build output + ------------------------------------------------------------------- Wed Jun 22 20:02:36 UTC 2022 - Callum Farmer diff --git a/pesign-obs-integration.spec b/pesign-obs-integration.spec index 51b9d4e..09fe64d 100644 --- a/pesign-obs-integration.spec +++ b/pesign-obs-integration.spec @@ -28,6 +28,7 @@ Source: %{name}-%{version}.tar.gz Patch: order.patch Patch1: attr.patch Patch2: lang.patch +Patch3: rpmlintrc.patch BuildRequires: openssl Requires: fipscheck Requires: mozilla-nss-tools diff --git a/rpmlintrc.patch b/rpmlintrc.patch new file mode 100644 index 0000000..3b60ce4 --- /dev/null +++ b/rpmlintrc.patch @@ -0,0 +1,21 @@ +From 1441e0e2b3ece30febd88a0476189865b6738695 Mon Sep 17 00:00:00 2001 +From: Callum Farmer +Date: Tue, 12 Jul 2022 11:44:57 +0100 +Subject: [PATCH] Don't copy rpmlintrc to OTHER + +--- + pesign-repackage.spec.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pesign-repackage.spec.in b/pesign-repackage.spec.in +index 7b3d2e5..0c77133 100644 +--- a/pesign-repackage.spec.in ++++ b/pesign-repackage.spec.in +@@ -87,6 +87,7 @@ popd + # Copy files other than the meta files and RPMs to %_topdir/OTHER + OTHER_FILES=`find %_sourcedir/ -maxdepth 1 -type f \ + -not -regex '.*\.\(rpm\|spec\|rsasign\|sig\|crt\)' \ ++ -not -regex '.*\rpmlintrc' \ + -not -name "_buildenv" \ + -not -name "_statistics" \ + -not -name "logfile" \