From 61342f245209ffce336dd97bce9e09cb92d6092887bd318b96261f2126a46cb7 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Wed, 6 Nov 2019 06:46:05 +0000 Subject: [PATCH 1/2] Accepting request 745580 from home:gary_lin:branches:Base:System to keep the files in the OTHER directory (boo#1155474) OBS-URL: https://build.opensuse.org/request/show/745580 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=83 --- ...eep-the-files-in-the-OTHER-directory.patch | 49 +++++++++++++++++++ pesign-obs-integration.changes | 6 +++ pesign-obs-integration.spec | 2 + 3 files changed, 57 insertions(+) create mode 100644 0001-Keep-the-files-in-the-OTHER-directory.patch diff --git a/0001-Keep-the-files-in-the-OTHER-directory.patch b/0001-Keep-the-files-in-the-OTHER-directory.patch new file mode 100644 index 0000000..23a814a --- /dev/null +++ b/0001-Keep-the-files-in-the-OTHER-directory.patch @@ -0,0 +1,49 @@ +From dafa41a72190c0fa02afe6acdc06f05eb0eda937 Mon Sep 17 00:00:00 2001 +From: Gary Lin +Date: Wed, 6 Nov 2019 11:43:44 +0800 +Subject: [PATCH] Keep the files in the OTHER directory + +We currently only kept the "*.log" files for the repackaging while there +are some use cases that the user might need other types of files. + +Update pesign-repackage.spec.in to filter out the meta and internal files +and keep the files in the OTHER directory. + +Bugzilla entry: + OBS do not export some files to API OTHER on x86_64 + https://bugzilla.suse.com/show_bug.cgi?id=1155474 + +Signed-off-by: Gary Lin +--- + pesign-repackage.spec.in | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/pesign-repackage.spec.in b/pesign-repackage.spec.in +index ca8d325..1679878 100644 +--- a/pesign-repackage.spec.in ++++ b/pesign-repackage.spec.in +@@ -84,10 +84,18 @@ for rpm in %_sourcedir/*.rpm; do + rpms=("${rpms[@]}" "$rpm") + done + popd +-for log in %_sourcedir/*.log; do +- if test -e "$log"; then ++# 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 -name "_buildenv" \ ++ -not -name "_statistics" \ ++ -not -name "logfile" \ ++ -not -name "meta" \ ++ -print` ++for file in $OTHER_FILES; do ++ if test -e "$file"; then + mkdir -p "%_topdir/OTHER" +- cp "$log" "$_" ++ cp "$file" "$_" + fi + done + mkdir rsasigned +-- +2.23.0 + diff --git a/pesign-obs-integration.changes b/pesign-obs-integration.changes index cab73e7..b5d71f2 100644 --- a/pesign-obs-integration.changes +++ b/pesign-obs-integration.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 6 03:52:16 UTC 2019 - Gary Ching-Pang Lin + +- 0001-Keep-the-files-in-the-OTHER-directory.patch to keep the + files in the OTHER directory (boo#1155474) + ------------------------------------------------------------------- Thu Aug 1 02:41:28 UTC 2019 - Gary Ching-Pang Lin diff --git a/pesign-obs-integration.spec b/pesign-obs-integration.spec index f36fd34..99ccab0 100644 --- a/pesign-obs-integration.spec +++ b/pesign-obs-integration.spec @@ -35,6 +35,7 @@ Source: %{name}_%{version}.tar.gz Patch1: 0001-Passthrough-license-tag.patch Patch2: 0001-Add-support-for-kernel-module-compression.patch Patch3: 0001-Initialize-compress-variable.patch +Patch4: 0001-Keep-the-files-in-the-OTHER-directory.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # suse-module-tools <= 15.0.10 contains modsign-verify Requires: suse-module-tools >= 15.0.10 @@ -48,6 +49,7 @@ boot loader, kernel and kernel modules in the openSUSE Buildservice. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build From 034791523ef4605a7afa83b7095280e2f4dafb0584d87045f953cc4406010251 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Thu, 7 Nov 2019 01:47:34 +0000 Subject: [PATCH 2/2] Accepting request 745872 from home:jirislaby:branches:Base:System - 0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch to support xz-compressed vmlinux (bnc#1155921) OBS-URL: https://build.opensuse.org/request/show/745872 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=84 --- ...vmlinux-support-xz-compressed-vmlinu.patch | 38 +++++++++++++++++++ pesign-obs-integration.changes | 6 +++ pesign-obs-integration.spec | 2 + 3 files changed, 46 insertions(+) create mode 100644 0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch diff --git a/0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch b/0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch new file mode 100644 index 0000000..fbe07af --- /dev/null +++ b/0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch @@ -0,0 +1,38 @@ +From: Jiri Slaby +Date: Wed, 6 Nov 2019 10:57:01 +0100 +Subject: brp-99-compress-vmlinux: support xz-compressed vmlinux +Patch-mainline: submitted as PR#16 +References: bnc#1155921 + +Signed-off-by: Jiri Slaby +--- + brp-99-compress-vmlinux | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/brp-99-compress-vmlinux b/brp-99-compress-vmlinux +index 2c8222d23024..ffe3841fb836 100755 +--- a/brp-99-compress-vmlinux ++++ b/brp-99-compress-vmlinux +@@ -11,11 +11,13 @@ kernel-*) + exit 0 + esac + for f in $RPM_BUILD_ROOT/boot/vmlinux-*; do +- if test -e "$f" -a -e "$f.gz"; then +- echo "gzip $f" +- # Deliberately not using gzip -n; the vmlinux image has a +- # predictable timestamp (bnc#880848#c20) +- gzip -k -9 -f "$f" +- fi ++ for compression in gz/gzip xz; do ++ if test -e "$f" -a -e "$f.${compression%/*}"; then ++ echo "${compression#*/} $f" ++ # Deliberately not using -n; the vmlinux image has a ++ # predictable timestamp (bnc#880848#c20) ++ ${compression#*/} -k -9 -f "$f" ++ fi ++ done + done + +-- +2.24.0 + diff --git a/pesign-obs-integration.changes b/pesign-obs-integration.changes index b5d71f2..2268f1b 100644 --- a/pesign-obs-integration.changes +++ b/pesign-obs-integration.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 6 09:58:34 UTC 2019 - Jiri Slaby + +- 0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch + to support xz-compressed vmlinux (bnc#1155921) + ------------------------------------------------------------------- Wed Nov 6 03:52:16 UTC 2019 - Gary Ching-Pang Lin diff --git a/pesign-obs-integration.spec b/pesign-obs-integration.spec index 99ccab0..aebd7d2 100644 --- a/pesign-obs-integration.spec +++ b/pesign-obs-integration.spec @@ -36,6 +36,7 @@ Patch1: 0001-Passthrough-license-tag.patch Patch2: 0001-Add-support-for-kernel-module-compression.patch Patch3: 0001-Initialize-compress-variable.patch Patch4: 0001-Keep-the-files-in-the-OTHER-directory.patch +Patch5: 0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # suse-module-tools <= 15.0.10 contains modsign-verify Requires: suse-module-tools >= 15.0.10 @@ -50,6 +51,7 @@ boot loader, kernel and kernel modules in the openSUSE Buildservice. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build