Accepting request 831346 from home:gary_lin:branches:Base:System
forward _binary_payload to the repackaged rpm (bsc#1175882) OBS-URL: https://build.opensuse.org/request/show/831346 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=92
This commit is contained in:
parent
9b1a660fb0
commit
bb7f067c5f
63
0001-Forward-_binary_payload-to-the-repackaged-rpm.patch
Normal file
63
0001-Forward-_binary_payload-to-the-repackaged-rpm.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From 8c1a628d671e58a3902bda1389a871a154b27469 Mon Sep 17 00:00:00 2001
|
||||
From: Gary Lin <glin@suse.com>
|
||||
Date: Wed, 2 Sep 2020 11:37:24 +0800
|
||||
Subject: [PATCH] Forward _binary_payload to the repackaged rpm (bsc#1175882)
|
||||
|
||||
Signed-off-by: Gary Lin <glin@suse.com>
|
||||
---
|
||||
pesign-gen-repackage-spec | 24 +++++++++++++++++++++++-
|
||||
1 file changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pesign-gen-repackage-spec b/pesign-gen-repackage-spec
|
||||
index e1ca24c..037da59 100755
|
||||
--- a/pesign-gen-repackage-spec
|
||||
+++ b/pesign-gen-repackage-spec
|
||||
@@ -142,15 +142,25 @@ my %script2tag = (
|
||||
# FIXME: triggers
|
||||
);
|
||||
|
||||
+# compressor => specfile payload
|
||||
+my %com2pl = (
|
||||
+ gzip => "gzdio",
|
||||
+ bzip2 => "bzdio",
|
||||
+ xz => "xzdio",
|
||||
+ lzma => "lzdio",
|
||||
+ zstd => "zstdio",
|
||||
+);
|
||||
+
|
||||
# tags which are printed verbatim in the specfile
|
||||
my @simple_tags = qw(version release license group summary packager vendor
|
||||
url distribution);
|
||||
+my @payload_tags = qw(payloadcompressor payloadflags);
|
||||
|
||||
sub load_package {
|
||||
my $rpm = shift;
|
||||
my %res;
|
||||
|
||||
- for my $tag (qw(name arch sourcerpm description), @simple_tags) {
|
||||
+ for my $tag (qw(name arch sourcerpm description), @simple_tags, @payload_tags) {
|
||||
$res{$tag} = query_single($rpm, $tag);
|
||||
}
|
||||
my @files;
|
||||
@@ -245,6 +255,18 @@ sub print_script {
|
||||
sub print_package {
|
||||
my ($p, $is_main) = @_;
|
||||
|
||||
+ my $payloadstr = "w.ufdio";
|
||||
+
|
||||
+ if ($p->{payloadcompressor}) {
|
||||
+ my $payload = $com2pl{$p->{payloadcompressor}};
|
||||
+ if ($payload) {
|
||||
+ $payloadstr = "w$p->{payloadflags}.$payload";
|
||||
+ } else {
|
||||
+ die "Unknown compressor: $p->{payloadcompressor}";
|
||||
+ }
|
||||
+ }
|
||||
+ print SPEC "\%define _binary_payload $payloadstr\n";
|
||||
+
|
||||
if ($is_main) {
|
||||
print SPEC "Name: $p->{name}\n";
|
||||
print SPEC "Buildroot: $directory\n";
|
||||
--
|
||||
2.28.0
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 2 03:39:46 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
- Add 0001-Forward-_binary_payload-to-the-repackaged-rpm.patch to
|
||||
forward _binary_payload to the repackaged rpm (bsc#1175882)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 17 07:25:34 UTC 2020 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
|
@ -42,6 +42,7 @@ Patch6: 0001-sign-stage3.bin-from-s390-tools-with-sign-files-bsc-.patch
|
||||
# https://github.com/openSUSE/pesign-obs-integration/pull/18
|
||||
Patch7: pesign-sign-s390x-kernel.patch
|
||||
Patch8: 0001-Enable-find_provides-and-requires.patch
|
||||
Patch9: 0001-Forward-_binary_payload-to-the-repackaged-rpm.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# suse-module-tools <= 15.0.10 contains modsign-verify
|
||||
Requires: suse-module-tools >= 15.0.10
|
||||
@ -60,6 +61,7 @@ boot loader, kernel and kernel modules in the openSUSE Buildservice.
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user