From 9b1a660fb04a979a8aaf32cc67e3578247b2270c810a4396a7e196389983a479 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Fri, 17 Jul 2020 08:21:50 +0000 Subject: [PATCH] Accepting request 821456 from home:gary_lin:branches:Base:System Add 0001-Enable-find_provides-and-requires.patch (bsc#1114605) OBS-URL: https://build.opensuse.org/request/show/821456 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=90 --- 0001-Enable-find_provides-and-requires.patch | 55 ++++++++++++++++++++ pesign-obs-integration.changes | 8 +++ pesign-obs-integration.spec | 2 + 3 files changed, 65 insertions(+) create mode 100644 0001-Enable-find_provides-and-requires.patch diff --git a/0001-Enable-find_provides-and-requires.patch b/0001-Enable-find_provides-and-requires.patch new file mode 100644 index 0000000..e4ece10 --- /dev/null +++ b/0001-Enable-find_provides-and-requires.patch @@ -0,0 +1,55 @@ +From 42b934760a75cf077d3c5831aaa14d3d104ba5cd Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Wed, 3 Apr 2019 05:48:28 +0200 +Subject: [PATCH] Enable find_provides and requires + +to get automatic provides instead of manual ones +like the original package did + +Without this patch, +rpm -qpv --provides $rpm +differed significantly between OBS build and local osc build. +--- + pesign-gen-repackage-spec | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/pesign-gen-repackage-spec b/pesign-gen-repackage-spec +index 9cd374a..61eb8ba 100755 +--- a/pesign-gen-repackage-spec ++++ b/pesign-gen-repackage-spec +@@ -246,10 +246,6 @@ sub print_package { + if ($is_main) { + print SPEC "Name: $p->{name}\n"; + print SPEC "Buildroot: $directory\n"; +- print SPEC "\%define _use_internal_dependency_generator 0\n"; +- print SPEC "\%define __find_provides %{nil}\n"; +- print SPEC "\%define __find_requires %{nil}\n"; +- print SPEC "\%define __find_supplements %{nil}\n"; + if ($p->{nosource}) { + # We do not generate any no(src).rpm, but we want the + # %{sourcerpm} tag in the binary packages to match. +@@ -309,14 +305,20 @@ my %depflags = ( + "<" => (1 << 1), + ">" => (1 << 2), + "=" => (1 << 3), ++ find_requires => (1 << 14), ++ find_provides => (1 << 15), + rpmlib => (1 << 24), ++ config => (1 << 28), + ); + + sub print_deps { + my ($depname, $list) = @_; + ++DEPLOOP: + foreach my $d (@$list) { +- next if ($d->{flags} & $depflags{rpmlib}); ++ for my $flag (qw(rpmlib config find_requires find_provides)) { ++ next DEPLOOP if ($d->{flags} & $depflags{$flag}); ++ } + + print SPEC $depname; + my @deptypes; +-- +2.25.1 + diff --git a/pesign-obs-integration.changes b/pesign-obs-integration.changes index 58d8295..34426eb 100644 --- a/pesign-obs-integration.changes +++ b/pesign-obs-integration.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jul 17 07:25:34 UTC 2020 - Gary Ching-Pang Lin + +- Add 0001-Enable-find_provides-and-requires.patch (bsc#1114605) + + Enable this patch again since virtualbox-kmp is split from + the main package so the customized %find_provides for + virtualbox-x11-guest won't be affected anymore. + ------------------------------------------------------------------- Wed Feb 26 13:35:18 UTC 2020 - Marcus Meissner diff --git a/pesign-obs-integration.spec b/pesign-obs-integration.spec index 6e04fe8..5823773 100644 --- a/pesign-obs-integration.spec +++ b/pesign-obs-integration.spec @@ -41,6 +41,7 @@ Patch5: 0001-brp-99-compress-vmlinux-support-xz-compressed-vmlinu.patch 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 BuildRoot: %{_tmppath}/%{name}-%{version}-build # suse-module-tools <= 15.0.10 contains modsign-verify Requires: suse-module-tools >= 15.0.10 @@ -58,6 +59,7 @@ boot loader, kernel and kernel modules in the openSUSE Buildservice. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build