- Update to version 10.1+1602850462:

* Compress kernel modules in batch and in parallel
  * Forward _binary_payload to the repackaged rpm (bsc#1175882)
- remove 0001-Forward-_binary_payload-to-the-repackaged-rpm.patch,
  parallel-compression.patch (upstream)

OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=95
This commit is contained in:
Dirk Mueller 2020-10-21 12:49:41 +00:00 committed by Git OBS Bridge
parent e7dce62cd8
commit 20d454911d
8 changed files with 14 additions and 129 deletions

View File

@ -1,63 +0,0 @@
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

View File

@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/openSUSE/pesign-obs-integration.git</param>
<param name="changesrevision">a5e821a6876c15eea5b188385900357993b41e1b</param></service></servicedata>
<param name="changesrevision">d64b3f6f8d82e6006c9290aecedd412789eda6f9</param></service></servicedata>

View File

@ -1,41 +0,0 @@
Index: pesign-obs-integration/pesign-gen-repackage-spec
===================================================================
--- pesign-obs-integration.orig/pesign-gen-repackage-spec
+++ pesign-obs-integration/pesign-gen-repackage-spec
@@ -391,6 +391,7 @@ my %verifyflags = (
sub print_files {
my $files = shift;
+ my @tocompress;
for my $f (@$files) {
my $path = "$directory/$f->{name}";
@@ -445,9 +446,9 @@ sub print_files {
if ($compress eq "xz" &&
$f->{name} =~ /\.ko$/ && S_ISREG($f->{mode})) {
- system("xz", "-f", "-9", $path);
- chmod($f->{mode}, $path . ".xz");
- utime($f->{mtime}, $f->{mtime}, $path . ".xz");
+ chmod($f->{mode}, $path);
+ utime($f->{mtime}, $f->{mtime}, $path);
+ push(@tocompress, $path);
print SPEC "$attrs " . quote($f->{name}) . ".xz\n";
} else {
print SPEC "$attrs " . quote($f->{name}) . "\n";
@@ -457,6 +458,15 @@ sub print_files {
print SPEC "$attrs " . quote($f->{name}) . ".sig\n";
}
}
+
+ if ($#tocompress >= 0) {
+ my $m = "$output/modulelist.txt";
+ open(M, '>', $m) or die "$m: $!\n";
+ print M join("\n", @tocompress);
+ close(M);
+ system("xargs -a $m -t -P 4 -n 1 xz -f");
+ unlink($m);
+ }
}
my %packages;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae254d8544651b0da0f339dfb8eaf08d49490b556af1267ca8201d4d250299eb
size 36528

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:93e4014c45c962a8c9b724e7554267187ae46fa6d6e9df00e97f834c2b05b797
size 37172

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Oct 21 12:44:19 UTC 2020 - dmueller@suse.com
- Update to version 10.1+1602850462:
* Compress kernel modules in batch and in parallel
* Forward _binary_payload to the repackaged rpm (bsc#1175882)
- remove 0001-Forward-_binary_payload-to-the-repackaged-rpm.patch,
parallel-compression.patch (upstream)
-------------------------------------------------------------------
Thu Oct 15 21:13:24 UTC 2020 - dmueller@suse.com

View File

@ -18,16 +18,13 @@
Name: pesign-obs-integration
Version: 10.1+1595385080
Version: 10.1+1602850462
Release: 0
Summary: Macros and scripts to sign the kernel and bootloader
License: GPL-2.0-only
Group: Development/Tools/Other
URL: https://en.opensuse.org/openSUSE:UEFI_Image_File_Sign_Tools
Source: %{name}-%{version}.tar.gz
Patch1: 0001-Forward-_binary_payload-to-the-repackaged-rpm.patch
# https://github.com/openSUSE/pesign-obs-integration/pull/21
Patch2: parallel-compression.patch
BuildRequires: openssl
Requires: fipscheck
Requires: mozilla-nss-tools

View File

@ -1,17 +0,0 @@
Format: 3.0 (native)
Source: pesign-obs-integration
Binary: pesign-obs-integration, dh-signobs
Architecture: all
Version: 10.1+1595385080
Maintainer: Michal Marek <mmarek@suse.cz>
Standards-Version: 3.9.8
Build-Depends: debhelper (>= 7), openssl, shellcheck
Package-List:
dh-signobs deb devel optional arch=all
pesign-obs-integration deb devel optional arch=all
Checksums-Sha1:
201030b4dc2ca4a8aac813874dff5c70dbaa7b6a 34917 pesign-obs-integration_10.1.tar.gz
Checksums-Sha256:
aa851dbdad6c83cee002fbe7f4e8b3f72e556da361cbf3843c5bcf479eaeec1e 34917 pesign-obs-integration_10.1.tar.gz
Files:
c1866a4c83c00569df115c04f6b9e919 34917 pesign-obs-integration_10.1.tar.gz