From c1156c0dab332b2e77b0f1b187734185079698c3a91537cc0436bddab84b048a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 2 Feb 2015 11:33:28 +0000 Subject: [PATCH 01/12] Accepting request 283746 from home:olh:branches:openSUSE:Tools - 2015.02.02 - Trim VERSION-RELEASE also in rpmlint log - Adjust regex for spec comparing in src.rpm - handle also stick and setuid directory from file(1) output OBS-URL: https://build.opensuse.org/request/show/283746 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=160 --- build-compare.changes | 8 ++++++++ build-compare.spec | 2 +- rpm-check.sh | 2 +- same-build-result.sh | 10 +++++----- srpm-check.sh | 9 +++++++-- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 9bcc730..fc68f3c 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 2 10:05:40 UTC 2015 - olaf@aepfle.de + +- 2015.02.02 +- Trim VERSION-RELEASE also in rpmlint log +- Adjust regex for spec comparing in src.rpm +- handle also stick and setuid directory from file(1) output + ------------------------------------------------------------------- Wed Jan 21 08:34:32 UTC 2015 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index 08fb7c7..c1ddd38 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -1,7 +1,7 @@ # # spec file for package build-compare # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/rpm-check.sh b/rpm-check.sh index d6141e2..948e8af 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -608,7 +608,7 @@ check_single_file() return 1 fi ;; - directory) + directory|setuid, directory|sticky, directory) # tar might package directories - ignore them here return 0 ;; diff --git a/same-build-result.sh b/same-build-result.sh index 3f1269d..3f9a025 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -62,10 +62,10 @@ bash $SCMPSCRIPT "$osrpm" "$nsrpm" || exit 1 OLDRPMS=($(find "$OLDDIR" -type f -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm')) NEWRPMS=($(find $NEWDIRS -type f -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort --field-separator=/ --key=7|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm')) -# Get release from first RPM and keep for rpmlint check +# Get version-release from first RPM and keep for rpmlint check # Remember to quote the "." for future regexes -release1=$(rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${OLDRPMS[0]}"|sed -e 's/\./\\./g') -release2=$(rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[0]}"|sed -e 's/\./\\./g') +ver_rel1=$(rpm -qp --nodigest --nosignature --qf "%{VERSION}-%{RELEASE}" "${OLDRPMS[0]}"|sed -e 's/\./\\./g') +ver_rel2=$(rpm -qp --nodigest --nosignature --qf "%{VERSION}-%{RELEASE}" "${NEWRPMS[0]}"|sed -e 's/\./\\./g') SUCCESS=1 rpmqp='rpm -qp --qf %{NAME} --nodigest --nosignature ' @@ -106,8 +106,8 @@ if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log" # Sort the files first since the order of messages is not deterministic # Remove release from files - sort -u $OLDDIR/rpmlint.log|sed -e "s,$release1,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1 - sort -u $OTHERDIR/rpmlint.log|sed -e "s,$release2,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2 + sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1 + sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2 if ! cmp -s $file1 $file2; then echo "rpmlint.log files differ:" diff -u $file1 $file2 |head -n 20 diff --git a/srpm-check.sh b/srpm-check.sh index f2571a2..9cd2260 100644 --- a/srpm-check.sh +++ b/srpm-check.sh @@ -27,6 +27,10 @@ source $FUNCTIONS oldrpm=`readlink -f $1` newrpm=`readlink -f $2` +# Get version-release from first RPM and keep for rpmlint check +# Remember to quote the "." for future regexes +ver_rel_old=$(rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${oldrpm}"|sed -e 's/\./\\./g') +ver_rel_new=$(rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${newrpm}"|sed -e 's/\./\\./g') # For source RPMs, we can just check the metadata in the spec file # if those are not the same, the source RPM has changed and therefore @@ -36,6 +40,7 @@ cmp_spec RES=$? case $RES in 0) + echo "RPM meta information is identical" exit 0 ;; 1) @@ -63,8 +68,8 @@ check_single_file() local file=$1 case $file in *.spec) - sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file - sed -i -e "s,Release:.*$release2,Release: @RELEASE@," new/$file + sed -i -e "s,Release:.*${ver_rel_old}$,Release: @RELEASE@," old/$file + sed -i -e "s,Release:.*${ver_rel_new}$,Release: @RELEASE@," new/$file if ! cmp -s old/$file new/$file; then echo "$file differs (spec file)" diff -u old/$file new/$file | head -n 20 From 7a28f8563ee7cc20deeff282a1c8b65041c152ba0a5a890f9ca7c10fd579a7d5 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 2 Feb 2015 11:57:59 +0000 Subject: [PATCH 02/12] Quote space in directory string check OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=161 --- rpm-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm-check.sh b/rpm-check.sh index 948e8af..df58c01 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -608,7 +608,7 @@ check_single_file() return 1 fi ;; - directory|setuid, directory|sticky, directory) + directory|setuid,\ directory|sticky,\ directory) # tar might package directories - ignore them here return 0 ;; From aa8bfed1286f6bae6ba01cfdd9ee2750eada8a684744c612afb18d467d231f4a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 3 Feb 2015 13:39:06 +0000 Subject: [PATCH 03/12] Accepting request 283857 from home:olh:branches:openSUSE:Tools - 2015.02.03 - Trim .TH also in perl man pages (bnc#915941) - Trim first line of man page to catch overly verbose tools OBS-URL: https://build.opensuse.org/request/show/283857 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=162 --- build-compare.changes | 7 +++++ build-compare.spec | 2 +- rpm-check.sh | 73 ++++++++++++++++++++++++++++--------------- 3 files changed, 55 insertions(+), 27 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index fc68f3c..3ed89eb 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 3 11:34:39 UTC 2015 - olaf@aepfle.de + +- 2015.02.03 +- Trim .TH also in perl man pages (bnc#915941) +- Trim first line of man page to catch overly verbose tools + ------------------------------------------------------------------- Mon Feb 2 10:05:40 UTC 2015 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index c1ddd38..ebdb15a 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -20,7 +20,7 @@ Name: build-compare Summary: Build Result Compare Script License: GPL-2.0+ Group: Development/Tools/Building -Version: 2015.01.21 +Version: 2015.02.03 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/rpm-check.sh b/rpm-check.sh index df58c01..4e6d7d7 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -146,6 +146,47 @@ diff_two_files() return 0 } +trim_man_first_line() +{ + # Handles the first line if it is like: + #.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) + #.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. + local f=$1 + sed -i -e '1{ + s|^\.\\"[[:blank:]]\+Automatically[[:blank:]]generated[[:blank:]]by[[:blank:]]Pod::Man[[:blank:]].*|.\\" Overly verbose Pod::Man| + s|^\.\\"[[:blank:]]\+DO[[:blank:]]NOT[[:blank:]]MODIFY[[:blank:]]THIS[[:blank:]]FILE![[:blank:]]\+It[[:blank:]]was[[:blank:]]generated[[:blank:]]by[[:blank:]]help2man[[:blank:]].*|.\\" Overly verbose help2man| + }' $f +} + +trim_man_TH() +{ + # Handles lines like: + # .TH debhelper 7 "2010-02-27" "7.4.15" "Debhelper" + # .TH DIRMNGR-CLIENT 1 2010-02-27 "Dirmngr 1.0.3" "GNU Privacy Guard" + # .TH ccmake 1 "March 06, 2010" "ccmake 2.8.1-rc3" + # .TH QEMU-IMG 1 "2010-03-14" " " " " + # .TH kdecmake 1 "May 07, 2010" "cmake 2.8.1" + # .TH "appender.h" 3 "12 May 2010" "Version 1.2.1" "log4c" \" -*- nroff -*- + # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*- + # .TH "OFFLINEIMAP" "1" "11 May 2010" "John Goerzen" "OfflineIMAP Manual" + # .TH gv 3guile "13 May 2010" + #.TH "GIT\-ARCHIMPORT" "1" "09/13/2010" "Git 1\&.7\&.1" "Git Manual" + # .TH LDIRECTORD 8 "2010-10-20" "perl v5.12.2" "User Contributed Perl Documentation" + # .TH ccmake 1 "February 05, 2012" "ccmake 2.8.7" + # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*- + # .TH ARCH "1" "September 2010" "GNU coreutils 8.5" "User Commands" + # .TH "GCM-CALIBRATE" "1" "03 February 2012" "" "" + #.TH Locale::Po4a::Xml.pm 3pm "2015-01-30" "Po4a Tools" "Po4a Tools" + local f=$1 + # (.TH quoted section) (quoted_date)(*) + sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "qq2000-01-01"\3|' $f + # (.TH unquoted section) (quoted_date)(*) + sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "uq2000-02-02"\3|' $f + # (.TH quoted section) (unquoted_date)(*) + sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 qu2000-03-03\3|' $f + # (.TH unquoted section) (unquoted_date)(*) + sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 uu2000-04-04\3|' $f +} strip_numbered_anchors() { @@ -421,37 +462,17 @@ check_single_file() /usr/share/man/man3/*3pm) for f in old/$file new/$file; do sed -i -e 's| 3 "20..-..-.." "perl v5....." "User Contributed Perl Documentation"$| 3 "2009-01-01" "perl v5.10.0" "User Contributed Perl Documentation"|' $f + trim_man_TH $f + trim_man_first_line $f done ;; /usr/share/man/man*/*|/usr/lib/texmf/doc/man/*/*) - # Handles lines like: - # .TH debhelper 7 "2010-02-27" "7.4.15" "Debhelper" - # .TH DIRMNGR-CLIENT 1 2010-02-27 "Dirmngr 1.0.3" "GNU Privacy Guard" - # .TH ccmake 1 "March 06, 2010" "ccmake 2.8.1-rc3" - # .TH QEMU-IMG 1 "2010-03-14" " " " " - # .TH kdecmake 1 "May 07, 2010" "cmake 2.8.1" - # .TH "appender.h" 3 "12 May 2010" "Version 1.2.1" "log4c" \" -*- nroff -*- - # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*- - # .TH "OFFLINEIMAP" "1" "11 May 2010" "John Goerzen" "OfflineIMAP Manual" - # .TH gv 3guile "13 May 2010" - #.TH "GIT\-ARCHIMPORT" "1" "09/13/2010" "Git 1\&.7\&.1" "Git Manual" - # .TH LDIRECTORD 8 "2010-10-20" "perl v5.12.2" "User Contributed Perl Documentation" - # .TH ccmake 1 "February 05, 2012" "ccmake 2.8.7" - # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*- - # .TH ARCH "1" "September 2010" "GNU coreutils 8.5" "User Commands" - # .TH "GCM-CALIBRATE" "1" "03 February 2012" "" "" for f in old/$file new/$file; do - # (.TH quoted section) (quoted_date)(*) - sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "qq2000-01-01"\3|' $f - # (.TH unquoted section) (quoted_date)(*) - sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "uq2000-02-02"\3|' $f - # (.TH quoted section) (unquoted_date)(*) - sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 qu2000-03-03\3|' $f - # (.TH unquoted section) (unquoted_date)(*) - sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 uu2000-04-04\3|' $f - # generated by docbook xml: - #.\" Date: 09/13/2010 + trim_man_TH $f + trim_man_first_line $f + # generated by docbook xml: + #.\" Date: 09/13/2010 sed -i -e 's|Date: [0-1][0-9]/[0-9][0-9]/201[0-9]|Date: 09/13/2010|' $f done ;; From 18b7878e566af4a1a66bf55dcab9023963854dfdb0bf7d3eb13df1d430010046 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 3 Feb 2015 16:50:57 +0000 Subject: [PATCH 04/12] - Use correct offset for patching mtime out of .pyc files OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=163 --- build-compare.changes | 1 + rpm-check.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 3ed89eb..f1c0a56 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -4,6 +4,7 @@ Tue Feb 3 11:34:39 UTC 2015 - olaf@aepfle.de - 2015.02.03 - Trim .TH also in perl man pages (bnc#915941) - Trim first line of man page to catch overly verbose tools +- Use correct offset for patching mtime out of .pyc files ------------------------------------------------------------------- Mon Feb 2 10:05:40 UTC 2015 - olaf@aepfle.de diff --git a/rpm-check.sh b/rpm-check.sh index 4e6d7d7..110c414 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -373,8 +373,8 @@ check_single_file() done return $ret;; *.pyc|*.pyo) - perl -e "open fh, '+<', 'old/$file'; seek fh, 3, SEEK_SET; print fh '0000';" - perl -e "open fh, '+<', 'new/$file'; seek fh, 3, SEEK_SET; print fh '0000';" + perl -e "open fh, '+<', 'old/$file'; seek fh, 4, SEEK_SET; print fh '0000';" + perl -e "open fh, '+<', 'new/$file'; seek fh, 4, SEEK_SET; print fh '0000';" ;; *.bz2) bunzip2 -c old/$file > old/${file/.bz2/} From f2c6521bf35aa0172f199cc1f55196f5d1a020f77f9a15fd2e9346da915b6e92 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 3 Feb 2015 17:05:52 +0000 Subject: [PATCH 05/12] - Add BuildIgnore to allow bootstrap in sle11 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=164 --- build-compare.changes | 1 + build-compare.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/build-compare.changes b/build-compare.changes index f1c0a56..ee23b6b 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -5,6 +5,7 @@ Tue Feb 3 11:34:39 UTC 2015 - olaf@aepfle.de - Trim .TH also in perl man pages (bnc#915941) - Trim first line of man page to catch overly verbose tools - Use correct offset for patching mtime out of .pyc files +- Add BuildIgnore to allow bootstrap in sle11 ------------------------------------------------------------------- Mon Feb 2 10:05:40 UTC 2015 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index ebdb15a..443c4f6 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -29,6 +29,7 @@ Source4: functions.sh Source5: srpm-check.sh BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +#!BuildIgnore: build-compare %description This package contains scripts to find out if the build result differs From 72c12e67f0f4092ddd837d5f5972cf767419add80eca936c4906464f98f391ef Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 4 Feb 2015 16:13:15 +0000 Subject: [PATCH 06/12] - 2015.02.04 - Handle ruby gem files, they are tar archives (bnc#916047) - Remove Creator: and CreationDate: tags from .ps files (bnc#915952) OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=165 --- build-compare.changes | 7 +++++++ build-compare.spec | 3 ++- rpm-check.sh | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index ee23b6b..d36ff52 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 4 15:53:05 UTC 2015 - olaf@aepfle.de + +- 2015.02.04 +- Handle ruby gem files, they are tar archives (bnc#916047) +- Remove Creator: and CreationDate: tags from .ps files (bnc#915952) + ------------------------------------------------------------------- Tue Feb 3 11:34:39 UTC 2015 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index 443c4f6..51ed2ee 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -20,7 +20,8 @@ Name: build-compare Summary: Build Result Compare Script License: GPL-2.0+ Group: Development/Tools/Building -Version: 2015.02.03 +Url: https://github.com/openSUSE/build-compare +Version: 2015.02.04 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/rpm-check.sh b/rpm-check.sh index 110c414..83b0570 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -547,6 +547,14 @@ check_single_file() echo "$file and $oldfn are same" return 0 ;; + *.ps) + for f in "old/$file" "new/$file"; do + sed -i -e ' + /^%%CreationDate:[[:blank:]]/d + /^%%Creator:[[:blank:]]groff[[:blank:]]version[[:blank:]]/d + ' "$f" + done + ;; *pdf) # PDF files contain a unique ID, remove it # Format of the ID is: @@ -648,6 +656,13 @@ check_single_file() return 1 fi ;; + POSIX\ tar\ archive) + mv old/$file{,.tar} + mv new/$file{,.tar} + if ! check_single_file ${file}.tar; then + return 1 + fi + ;; cpio\ archive) mv old/$file{,.cpio} mv new/$file{,.cpio} From cd9b71cb675a6ab851b69f6669079382b55e8723da0983dcd5a212ae958d470d Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 4 Feb 2015 16:34:54 +0000 Subject: [PATCH 07/12] - Correct regex for hostname in libtool (bnc#916268) OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=166 --- build-compare.changes | 1 + rpm-check.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index d36ff52..e375ad8 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -4,6 +4,7 @@ Wed Feb 4 15:53:05 UTC 2015 - olaf@aepfle.de - 2015.02.04 - Handle ruby gem files, they are tar archives (bnc#916047) - Remove Creator: and CreationDate: tags from .ps files (bnc#915952) +- Correct regex for hostname in libtool (bnc#916268) ------------------------------------------------------------------- Tue Feb 3 11:34:39 UTC 2015 - olaf@aepfle.de diff --git a/rpm-check.sh b/rpm-check.sh index 83b0570..9c6cf93 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -491,7 +491,7 @@ check_single_file() ;; */libtool) for f in old/$file new/$file; do - sed -i -e 's|^# Libtool was configured on host [a-z0-9]*:$|Libtool was configured on host x42:|' $f + sed -i -e 's|^# Libtool was configured on host [A-Za-z0-9]*:$|# Libtool was configured on host x42:|' $f done ;; /etc/mail/*cf|/etc/sendmail.cf) From c2901887b4fde76ab865ad2a68ae17d2d3461b8def70d7cf58e64fa40214193b Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 4 Feb 2015 18:08:42 +0000 Subject: [PATCH 08/12] - Remove more javadoc references (bnc#916161) OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=167 --- build-compare.changes | 5 +++++ rpm-check.sh | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index e375ad8..8ae358d 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 4 17:57:27 UTC 2015 - olaf@aepfle.de + +- Remove more javadoc references (bnc#916161) + ------------------------------------------------------------------- Wed Feb 4 15:53:05 UTC 2015 - olaf@aepfle.de diff --git a/rpm-check.sh b/rpm-check.sh index 9c6cf93..8942197 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -427,7 +427,22 @@ check_single_file() # There are more timestamps in html, so far we handle only some primitive versions. for f in old/$file new/$file; do # Javadoc: - sed -i -e "s,^,^," $f + # + # + # + sed -i -e ' + /^/{ + : next + n + /^<\/head>/{ + b end_head + } + s/^\(\)/\1 some-date-removed-by-build-compare \5/ + s/^// + b next + } + : end_head + ' $f sed -i -e 's|^$||' $f sed -i -e 's|||' $f # Gjdoc HtmlDoclet: @@ -718,3 +733,4 @@ if test "$ret" = 0; then echo "RPM content is identical" fi exit $ret +# vim: tw=666 ts=2 et From d9327c64876286b7bc5de2147c06d2659d02c8d90f9b816ad0b50118d78d36ce Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 5 Feb 2015 08:33:57 +0000 Subject: [PATCH 09/12] One more javadoc variant, remove old sed commands for javadoc OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=168 --- rpm-check.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpm-check.sh b/rpm-check.sh index 8942197..820b8e9 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -429,6 +429,8 @@ check_single_file() # Javadoc: # # + # + # # sed -i -e ' /^/{ @@ -438,13 +440,14 @@ check_single_file() b end_head } s/^\(\)/\1 some-date-removed-by-build-compare \5/ + t next + s/^\(\)/\1 some-date-removed-by-build-compare \3/ + t next s/^// b next } : end_head ' $f - sed -i -e 's|^$||' $f - sed -i -e 's|||' $f # Gjdoc HtmlDoclet: sed -i -e 's%Generated by Gjdoc HtmlDoclet [0-9,.]*, part of GNU Classpath Tools, on .*, 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.%Generated by Gjdoc.%' $f sed -i -e 's%, on [A-Z][a-z]* [0-9]*, 20?? [0-9]*:??:?? \(a|p\)\.m\. GMT.

%, on January 1, 2009 0:00:00 a.m. GMT.

%' $f From facecfbfa1a5a7a737a842891809a5d1c33b4038bec2e5c04cf3b53bc4cfe010 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 5 Feb 2015 09:18:42 +0000 Subject: [PATCH 10/12] - Handle *.war files like *.jar files OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=169 --- build-compare.changes | 1 + rpm-check.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index 8ae358d..087f450 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -2,6 +2,7 @@ Wed Feb 4 17:57:27 UTC 2015 - olaf@aepfle.de - Remove more javadoc references (bnc#916161) +- Handle *.war files like *.jar files ------------------------------------------------------------------- Wed Feb 4 15:53:05 UTC 2015 - olaf@aepfle.de diff --git a/rpm-check.sh b/rpm-check.sh index 820b8e9..5191524 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -337,7 +337,7 @@ check_single_file() done return $ret ;; - *.zip|*.jar) + *.zip|*.jar|*.war) cd old unjar_l ./$file |sort > flist # 10-05-2010 14:39 From 2cf8919076c3fc82777fbcc06929483c72b98f8688c45aaf64aaefec31443cb6 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 5 Feb 2015 15:22:14 +0000 Subject: [PATCH 11/12] - Trim name-version-release string in update-scripts OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=170 --- build-compare.changes | 1 + functions.sh | 17 +++++++++++++++-- same-build-result.sh | 1 + srpm-check.sh | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 087f450..4eb3c5c 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -3,6 +3,7 @@ Wed Feb 4 17:57:27 UTC 2015 - olaf@aepfle.de - Remove more javadoc references (bnc#916161) - Handle *.war files like *.jar files +- Trim name-version-release string in update-scripts ------------------------------------------------------------------- Wed Feb 4 15:53:05 UTC 2015 - olaf@aepfle.de diff --git a/functions.sh b/functions.sh index dd090c5..6e93d84 100644 --- a/functions.sh +++ b/functions.sh @@ -19,13 +19,21 @@ check_header() # - it is used as direntry below certain paths # - it is assigned to some variable in scripts, at the end of a line # - it is used in PROVIDES, at the end of a line +# Trim name-version-release string: +# - it is used in update-scripts which are called by libzypp function trim_release_old() { - sed -e "/\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$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}" + sed -e " + /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$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 + " } function trim_release_new() { - sed -e "/\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$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}" + sed -e " + /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$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 + " } # Get single directory or filename with long or short release string function grep_release_old() @@ -119,6 +127,8 @@ function cmp_spec () # Remember to quote the . which is in release version_release_old=$($RPM --qf "%{VERSION}-%{RELEASE}" "$oldrpm") version_release_new=$($RPM --qf "%{VERSION}-%{RELEASE}" "$newrpm") + name_ver_rel_old=$($RPM --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$oldrpm") + name_ver_rel_new=$($RPM --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$newrpm") # Short version without B_CNT version_release_old_regex_s=${version_release_old%.*} version_release_old_regex_s=${version_release_old_regex_s//./\\.} @@ -127,6 +137,8 @@ function cmp_spec () # Long version with B_CNT version_release_old_regex_l=${version_release_old//./\\.} version_release_new_regex_l=${version_release_new//./\\.} + name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.} + name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.} # This might happen when?! echo "comparing RELEASE" if [ "${version_release_old%.*}" != "${version_release_new%.*}" ] ; then @@ -225,3 +237,4 @@ function cmp_spec () rm $file1 $file2 return $RES } +# vim: tw=666 ts=2 et diff --git a/same-build-result.sh b/same-build-result.sh index 3f9a025..a2d69a5 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -141,3 +141,4 @@ if test $SUCCESS -eq 0; then fi echo 'compare validated built as identical !' exit 0 +# vim: tw=666 ts=2 et diff --git a/srpm-check.sh b/srpm-check.sh index 9cd2260..895cf6a 100644 --- a/srpm-check.sh +++ b/srpm-check.sh @@ -97,3 +97,4 @@ done rm -rf $dir exit $ret +# vim: tw=666 ts=2 et From 2edf4d28d7f50fecd2ca9e61f346dbb60a4329f28365d8d5fa208169e5ee9afd Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 6 Feb 2015 10:37:35 +0000 Subject: [PATCH 12/12] - 2015.02.06 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=171 --- build-compare.changes | 3 ++- build-compare.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 4eb3c5c..94824da 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,6 +1,7 @@ ------------------------------------------------------------------- -Wed Feb 4 17:57:27 UTC 2015 - olaf@aepfle.de +Fri Feb 6 10:35:56 UTC 2015 - olaf@aepfle.de +- 2015.02.06 - Remove more javadoc references (bnc#916161) - Handle *.war files like *.jar files - Trim name-version-release string in update-scripts diff --git a/build-compare.spec b/build-compare.spec index 51ed2ee..2be26cd 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -21,7 +21,7 @@ Summary: Build Result Compare Script License: GPL-2.0+ Group: Development/Tools/Building Url: https://github.com/openSUSE/build-compare -Version: 2015.02.04 +Version: 2015.02.06 Release: 0 Source1: COPYING Source2: same-build-result.sh