Accepting request 1085182 from openSUSE:Tools

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1085182
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=125
This commit is contained in:
Dominique Leuenberger 2023-05-09 11:05:40 +00:00 committed by Git OBS Bridge
commit 56c10058ca
3 changed files with 47 additions and 7 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Apr 28 21:21:21 UTC 2023 - olaf@aepfle.de
- remove timestamps from png files
-------------------------------------------------------------------
Sat Apr 8 23:58:34 UTC 2023 - Oleg Girko <ol@infoserver.lv>
- Ignore more sections when comparing ELF executable files
-------------------------------------------------------------------
Fri Nov 25 23:51:35 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -17,7 +17,7 @@
Name: build-compare
Version: 20221206T204012.bb70754
Version: 20230428T221133.82ffb27
Release: 0
Summary: Build Result Compare Script
License: GPL-2.0-or-later

View File

@ -83,8 +83,39 @@ filter_dvi() {
}
filter_png() {
convert "$f" +set date:create +set date:modify "${f}.$PPID.$$"
mv -f "${f}.$PPID.$$" "${f}"
perl -e '
use strict;
use warnings;
my $a, my $b, my $c, my $d, my $f;
open ($f, "+<", shift);
$d = read($f, $c, 8);
($a,$b) = unpack("N2", $c);
unless($a == 0x89504e47 && $b == 0x0d0a1a0a) {
die("bogus png file.");
}
sub fn {
my ($fd, $l) = @_;
my $d = sprintf("%d", $l + 4);
$d = pack("a$d", "");
print($fd $d);
}
for ($d = read($f, $c, 8); $d > 0; $d = read($f, $c, 8)) {
($a,$b) = unpack("N a4", $c);
if ($b eq "tIME") {
fn($f, $a);
} elsif ($b eq "tEXt") {
$d = read($f, $c, $a);
$b = unpack("Z$a", $c);
if ($b eq "date:create" || $b eq "date:modify") {
$d = seek($f, -$a, 1);
fn($f, $a);
}
} else {
$d = seek($f, $a + 4, 1);
}
}
close($f);
' "$f"
}
filter_emacs_lisp() {
@ -422,10 +453,7 @@ normalize_file()
filter_generic dvi
;;
*.png)
# Try to remove timestamps, only if convert from ImageMagick is installed
if [[ $(type -p convert) ]]; then
filter_generic png
fi
filter_generic png
;;
/usr/share/locale/*/LC_MESSAGES/*.mo|\
/usr/share/locale-bundle/*/LC_MESSAGES/*.mo|\
@ -931,6 +959,8 @@ check_single_file()
/\.build-id/d
/\.gnu_debuglink/d
/\.gnu_debugdata/d
/\.note\.package/d
/\.note\.go\.buildid/d
p
}
'))