- check rpm capabilities for recommends/suggests

- Ignore /usr/lib/.build-id differences in package filelist

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=247
This commit is contained in:
Olaf Hering 2018-04-13 07:12:49 +00:00 committed by Git OBS Bridge
parent 6ef835da17
commit 1fe1bd2bc8
4 changed files with 39 additions and 4 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Apr 13 07:10:30 UTC 2018 - olaf@aepfle.de
- check rpm capabilities for recommends/suggests
-------------------------------------------------------------------
Fri Dec 8 16:57:00 UTC 2017 - ol@infoserver.lv
- Ignore /usr/lib/.build-id differences in package filelist
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Dec 4 10:21:44 UTC 2017 - olaf@aepfle.de Mon Dec 4 10:21:44 UTC 2017 - olaf@aepfle.de

View File

@ -21,7 +21,7 @@ Summary: Build Result Compare Script
License: GPL-2.0+ License: GPL-2.0+
Group: Development/Tools/Building Group: Development/Tools/Building
Url: https://github.com/openSUSE/build-compare Url: https://github.com/openSUSE/build-compare
Version: 20171204T112209.f06fbac Version: 20180413T091103.4639e30
Release: 0 Release: 0
Source1: COPYING Source1: COPYING
Source2: same-build-result.sh Source2: same-build-result.sh
@ -30,8 +30,8 @@ Source4: functions.sh
Source5: srpm-check.sh Source5: srpm-check.sh
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: bash Requires: bash
Requires: coreutils
Requires: cpio Requires: cpio
Requires: coreutils
Requires: diffutils Requires: diffutils
Requires: file Requires: file
Requires: gawk Requires: gawk

View File

@ -10,6 +10,12 @@
RPM="rpm -qp --nodigest --nosignature" RPM="rpm -qp --nodigest --nosignature"
set_rpm_meta_global_variables() {
local pkg=$1
local rpm_tags=
local out=`mktemp`
# Name, Version, Release # Name, Version, Release
QF_NAME="%{NAME}" QF_NAME="%{NAME}"
QF_VER_REL="%{VERSION}-%{RELEASE}" QF_VER_REL="%{VERSION}-%{RELEASE}"
@ -21,8 +27,19 @@ QF_PROVIDES="[%{PROVIDENAME} %{PROVIDEFLAGS} %{PROVIDEVERSION}\\n]\\n"
QF_PROVIDES="${QF_PROVIDES}[%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\\n]\\n" QF_PROVIDES="${QF_PROVIDES}[%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\\n]\\n"
QF_PROVIDES="${QF_PROVIDES}[%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\\n]\\n" QF_PROVIDES="${QF_PROVIDES}[%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\\n]\\n"
QF_PROVIDES="${QF_PROVIDES}[%{OBSOLETENAME} %{OBSOLETEFLAGS} %{OBSOLETEVERSION}\\n]\\n" QF_PROVIDES="${QF_PROVIDES}[%{OBSOLETENAME} %{OBSOLETEFLAGS} %{OBSOLETEVERSION}\\n]\\n"
QF_PROVIDES="${QF_PROVIDES}[%{RECOMMENDNAME} %{RECOMMENDFLAGS} %{RECOMMENDVERSION}\\n]\\n"
QF_PROVIDES="${QF_PROVIDES}[%{SUPPLEMENTNAME} %{SUPPLEMENTFLAGS} %{SUPPLEMENTVERSION}\\n]\\n" rpm_tags="%{RECOMMENDNAME} %{RECOMMENDFLAGS} %{RECOMMENDVERSION}"
check_header "%{NAME} ${rpm_tags}" > "${out}"
if test -s "${out}"
then
QF_PROVIDES="${QF_PROVIDES}[${rpm_tags}\\n]\\n"
fi
rpm_tags="%{SUPPLEMENTNAME} %{SUPPLEMENTFLAGS} %{SUPPLEMENTVERSION}"
check_header "%{NAME} ${rpm_tags}" > "${out}"
if test -s "${out}"
then
QF_PROVIDES="${QF_PROVIDES}[${rpm_tags}\\n]\\n"
fi
# don't look at RELEASE, it contains our build number # don't look at RELEASE, it contains our build number
QF_TAGS="%{NAME} %{VERSION} %{EPOCH}\\n" QF_TAGS="%{NAME} %{VERSION} %{EPOCH}\\n"
@ -65,6 +82,7 @@ QF_ALL="$QF_ALL\n___QF_PROVIDES___\n${QF_PROVIDES}\n___QF_PROVIDES___\n"
QF_ALL="$QF_ALL\n___QF_SCRIPT___\n${QF_SCRIPT}\n___QF_SCRIPT___\n" QF_ALL="$QF_ALL\n___QF_SCRIPT___\n${QF_SCRIPT}\n___QF_SCRIPT___\n"
QF_ALL="$QF_ALL\n___QF_FILELIST___\n${QF_FILELIST}\n___QF_FILELIST___\n" QF_ALL="$QF_ALL\n___QF_FILELIST___\n${QF_FILELIST}\n___QF_FILELIST___\n"
QF_ALL="$QF_ALL\n___QF_CHECKSUM___\n${QF_CHECKSUM}\n___QF_CHECKSUM___\n" QF_ALL="$QF_ALL\n___QF_CHECKSUM___\n${QF_CHECKSUM}\n___QF_CHECKSUM___\n"
}
check_header() check_header()
{ {
@ -83,6 +101,7 @@ function trim_release_old()
/\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\|$version_release_old_regex_l)\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g} /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\|$version_release_old_regex_l)\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
s/\(\/var\/adm\/update-messages\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g s/\(\/var\/adm\/update-messages\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
/\/usr\/lib\/\.build-id/d
" "
} }
function trim_release_new() function trim_release_new()
@ -91,6 +110,7 @@ function trim_release_new()
/\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\|$version_release_new_regex_l)\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g} /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\|$version_release_new_regex_l)\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
s/\(\/var\/adm\/update-messages\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g s/\(\/var\/adm\/update-messages\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
/\/usr\/lib\/\.build-id/d
" "
} }
# Get single directory or filename with long or short release string # Get single directory or filename with long or short release string
@ -222,6 +242,8 @@ function cmp_rpm_meta ()
rpm_meta_old=`mktemp` rpm_meta_old=`mktemp`
rpm_meta_new=`mktemp` rpm_meta_new=`mktemp`
set_rpm_meta_global_variables $oldrpm
check_header "$QF_ALL" $oldrpm > $rpm_meta_old check_header "$QF_ALL" $oldrpm > $rpm_meta_old
check_header "$QF_ALL" $newrpm > $rpm_meta_new check_header "$QF_ALL" $newrpm > $rpm_meta_new

View File

@ -659,6 +659,7 @@ check_single_file()
# <!-- Generated by javadoc (version 1.7.0_75) on Tue Feb 03 02:20:12 GMT 2015 --> # <!-- Generated by javadoc (version 1.7.0_75) on Tue Feb 03 02:20:12 GMT 2015 -->
# <!-- Generated by javadoc on Tue Feb 03 00:02:48 GMT 2015 --> # <!-- Generated by javadoc on Tue Feb 03 00:02:48 GMT 2015 -->
# <!-- Generated by javadoc (1.8.0_72) on Thu Mar 03 12:50:28 GMT 2016 --> # <!-- Generated by javadoc (1.8.0_72) on Thu Mar 03 12:50:28 GMT 2016 -->
# <!-- Generated by javadoc (10-internal) on Wed Feb 07 06:33:41 GMT 2018 -->
# <meta name="date" content="2015-02-03"> # <meta name="date" content="2015-02-03">
# </head> # </head>
sed -i -e ' sed -i -e '
@ -672,6 +673,8 @@ check_single_file()
t next t next
s/^\(<!-- Generated by javadoc\) \((\(build\|version\) [0-9._]\+) on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \5/ s/^\(<!-- Generated by javadoc\) \((\(build\|version\) [0-9._]\+) on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \5/
t next t next
s/^\(<!-- Generated by javadoc\) ([0-9._]\+-internal) on ... ... .. ..:..:.. \(GMT\|UTC\) .... \(-->\)/\1 some-date-removed-by-build-compare \3/
t next
s/^\(<!-- Generated by javadoc\) \(on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \3/ s/^\(<!-- Generated by javadoc\) \(on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \3/
t next t next
s/^<meta name="date" content="[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}">/<meta name="date" content="some-date-removed-by-build-compare">/ s/^<meta name="date" content="[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}">/<meta name="date" content="some-date-removed-by-build-compare">/