forked from pool/pesign-obs-integration
- Add attr.patch to fix: * Avoid assigning %attr's to symlinks which causes rpmbuild spam * Change perms mask to 07777 to ensure SUID/SGID is copied over - Add lang.patch to support %lang OBS-URL: https://build.opensuse.org/request/show/984716 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=113
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From bce11d8c51c7298887a5c576ba0f577cac80eb5e Mon Sep 17 00:00:00 2001
|
|
From: Callum Farmer <gmbr3@opensuse.org>
|
|
Date: Thu, 23 Jun 2022 13:20:37 +0100
|
|
Subject: [PATCH] Support %lang
|
|
|
|
---
|
|
pesign-gen-repackage-spec | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/pesign-gen-repackage-spec b/pesign-gen-repackage-spec
|
|
index 688c375..3d1e1d2 100755
|
|
--- a/pesign-gen-repackage-spec
|
|
+++ b/pesign-gen-repackage-spec
|
|
@@ -166,7 +166,7 @@ sub load_package {
|
|
$res{$tag} = query_single($rpm, $tag);
|
|
}
|
|
my @files;
|
|
- my @list = query_array($rpm, qw(filenames fileflags filemodes fileusername filegroupname filesizes filemtimes filelinktos fileverifyflags));
|
|
+ my @list = query_array($rpm, qw(filenames fileflags filemodes fileusername filegroupname filesizes filemtimes filelinktos fileverifyflags filelangs));
|
|
for my $file (@list) {
|
|
my $new = {
|
|
name => $file->[0],
|
|
@@ -178,6 +178,7 @@ sub load_package {
|
|
mtime => $file->[6],
|
|
target => $file->[7],
|
|
verify => $file->[8],
|
|
+ lang => $file->[9],
|
|
};
|
|
push(@files, $new);
|
|
if ($new->{name} =~ /\.ko$/ && S_ISREG($new->{mode})) {
|
|
@@ -462,7 +463,9 @@ sub print_files {
|
|
if ($verify_attrs) {
|
|
$attrs .= "%verify(not $verify_attrs) ";
|
|
}
|
|
-
|
|
+ if ($f->{lang} ne "") {
|
|
+ $attrs .= sprintf('%%lang(%s) ', $f->{lang});
|
|
+ }
|
|
if ($compress ne "" &&
|
|
$f->{name} =~ /\.ko$/ && S_ISREG($f->{mode})) {
|
|
chmod($f->{mode}, $path);
|