1
0
pesign-obs-integration/0001-Enable-find_provides-and-requires.patch

56 lines
1.6 KiB
Diff
Raw Normal View History

From 42b934760a75cf077d3c5831aaa14d3d104ba5cd Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
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