Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package obs-service-source_validator for
openSUSE:Factory checked in at 2022-01-14 23:12:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-source_validator (Old)
and /work/SRC/openSUSE:Factory/.obs-service-source_validator.new.1892
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-source_validator"
Fri Jan 14 23:12:44 2022 rev:52 rq:945827 version:0.21
Changes:
--------
---
/work/SRC/openSUSE:Factory/obs-service-source_validator/obs-service-source_validator.changes
2021-03-12 13:30:08.778058772 +0100
+++
/work/SRC/openSUSE:Factory/.obs-service-source_validator.new.1892/obs-service-source_validator.changes
2022-01-14 23:13:19.654635153 +0100
@@ -1,0 +2,9 @@
+Mon Dec 20 13:56:48 UTC 2021 - [email protected]
+
+- Update to version 0.21:
+ * 45-stale-changes allow for multibuild specfiles with empty default flavour
+ * Fix running the checks on a directory with whitespace in its path
+ * spec_query: print line numbers on %if/%else/%endif error
+ * 20-files-present-and-references: do not complain about debian.*.triggers
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-source_validator.spec ++++++
--- /var/tmp/diff_new_pack.HsnaRF/_old 2022-01-14 23:13:20.242635532 +0100
+++ /var/tmp/diff_new_pack.HsnaRF/_new 2022-01-14 23:13:20.246635535 +0100
@@ -1,7 +1,7 @@
#
# spec file for package obs-service-source_validator
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
++++++ _service ++++++
--- /var/tmp/diff_new_pack.HsnaRF/_old 2022-01-14 23:13:20.270635550 +0100
+++ /var/tmp/diff_new_pack.HsnaRF/_new 2022-01-14 23:13:20.274635553 +0100
@@ -1,6 +1,6 @@
<services>
<service name="tar_scm" mode="manual">
- <param
name="url">git://github.com/openSUSE/obs-service-source_validator.git</param>
+ <param
name="url">https://github.com/openSUSE/obs-service-source_validator.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="versionformat">@PARENT_TAG@</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.HsnaRF/_old 2022-01-14 23:13:20.290635563 +0100
+++ /var/tmp/diff_new_pack.HsnaRF/_new 2022-01-14 23:13:20.294635566 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">git://github.com/openSUSE/obs-service-source_validator.git</param>
- <param
name="changesrevision">fb282ed7748b76a1473f105f60985e5c23c4402b</param></service></servicedata>
+ <param
name="changesrevision">c68d7a28c4ecd88b179359b030098503e75adc0b</param></service></servicedata>
(No newline at EOF)
++++++ obs-service-source_validator-0.21.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/.gitignore
new/obs-service-source_validator-0.21/.gitignore
--- old/obs-service-source_validator-0.21/.gitignore 1970-01-01
01:00:00.000000000 +0100
+++ new/obs-service-source_validator-0.21/.gitignore 2021-12-14
18:30:23.000000000 +0100
@@ -0,0 +1 @@
+*.sw?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-source_validator-0.21/20-files-present-and-referenced
new/obs-service-source_validator-0.21/20-files-present-and-referenced
--- old/obs-service-source_validator-0.21/20-files-present-and-referenced
2021-03-09 17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/20-files-present-and-referenced
2021-12-14 18:30:23.000000000 +0100
@@ -2,8 +2,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
OSC_MODE=""
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
BASE_DIR=$(dirname $0)
@@ -53,7 +53,7 @@
;;
esac
-for i in $DIR_TO_CHECK/*.spec ; do
+for i in "$DIR_TO_CHECK"/*.spec ; do
test -f "$i" || continue
if [ -e "$DIR_TO_CHECK/_multibuild" ]; then
sed -n -e
's,.*<\(flavor\|package\)>\([^<]*\)</\(flavor\|package\)>.*,\2,p' \
@@ -76,16 +76,16 @@
cleanup_and_exit 1
fi
done
-for i in $DIR_TO_CHECK/*.dsc ; do
+for i in "$DIR_TO_CHECK"/*.dsc ; do
test -f "$i" || continue
( sed -ne '/^Files:/,$p' < "$i" | sed -e 1d | sed -e '/^[^ ]/,$d' |
while read debchk debsize debfile ; do echo "$debfile" ; done ) >>
$TMPDIR/sources
done
# Add debian only patches to the allowed sources list.
# but strip tailing -p1 arguments
-test -f $DIR_TO_CHECK/debian.series && \
+test -f "$DIR_TO_CHECK/debian.series" && \
sed -e '/^$/d' -e '/^#/d' -e 's,[ \t]*-p[0123456789]*$,,' \
- $DIR_TO_CHECK/debian.series >> $TMPDIR/sources
+ "$DIR_TO_CHECK/debian.series" >> $TMPDIR/sources
test -f $TMPDIR/sources || cleanup_and_exit
@@ -101,11 +101,11 @@
# XML validate files starting with _..
if [ -x $(type -p xmllint) ]; then
- for i in $DIR_TO_CHECK/_service; do
- test -f $i || continue
- BASE=${i##*/}
+ for i in "$DIR_TO_CHECK/_service"; do
+ test -f "$i" || continue
+ BASE="${i##*/}"
- xmllint --format $i >/dev/null || {
+ xmllint --format "$i" >/dev/null || {
echo "(E) $(basename $i) is not valid XML"
RETURN=2
continue
@@ -113,7 +113,7 @@
# Check if _service is sane
if [ "$BASE" = "_service" ]; then
- xmllint --format $i > $TMPDIR/_service
+ xmllint --format "$i" > $TMPDIR/_service
if egrep -q "service .*mode=." $TMPDIR/_service \
&& ! egrep -q "service
.*mode=.(disabled|buildtime|explicit|localonly)" \
@@ -163,10 +163,10 @@
# Verify GPG keys
#
-if [ -f $DIR_TO_CHECK/*.keyring 2>/dev/null ]; then
+if [ -f "$DIR_TO_CHECK"/*.keyring 2>/dev/null ]; then
GPG_OPTIONS="--homedir $TMPDIR -q --no-default-keyring --keyring
$TMPDIR/.checkifvalidsourcedir-gpg-keyring --trust-model always"
- gpg $GPG_OPTIONS --import $DIR_TO_CHECK/*.keyring
- for i in $DIR_TO_CHECK/*.sig $DIR_TO_CHECK/*.sign $DIR_TO_CHECK/*.asc; do
+ gpg $GPG_OPTIONS --import "$DIR_TO_CHECK"/*.keyring
+ for i in "$DIR_TO_CHECK"/*.sig "$DIR_TO_CHECK"/*.sign
"$DIR_TO_CHECK"/*.asc; do
if [ -f "$i" ]; then
validatefn=${i%.asc}
validatefn=${validatefn%.sig}
@@ -213,7 +213,7 @@
#
# now check if everything is marked in spec files.
#
-for i in $DIR_TO_CHECK/* $DIR_TO_CHECK/.* ; do
+for i in "$DIR_TO_CHECK"/* "$DIR_TO_CHECK"/.* ; do
BASE=${i##*/}
case $BASE in
\.|\.\.) continue ;;
@@ -230,7 +230,7 @@
else
echo "- package has $BASE: (new or modified)"
echo
"--------------------------------------------------------------"
- cat $DIR_TO_CHECK/$BASE
+ cat "$DIR_TO_CHECK/$BASE"
echo
"--------------------------------------------------------------"
if test "$BATCHMODE" != true ; then
echo -n "Is this correct? [N/y/d] (y to ignore) "
@@ -259,7 +259,7 @@
else
echo "- package has $BASE: (new or modified)"
echo
"--------------------------------------------------------------"
- cat $DIR_TO_CHECK/$BASE
+ cat "$DIR_TO_CHECK/$BASE"
echo
"--------------------------------------------------------------"
if test "$BATCHMODE" != true ; then
echo -n "Is this correct? [N/y/d] (y to ignore) "
@@ -355,25 +355,26 @@
debian.*.postinst | \
debian.*.postrm | \
debian.*.preinst | \
- debian.*.prerm | \
+ debian.*.prerm | \
+ debian.*.triggers | \
debian.*.lintian-overrides )
;;
*)
SEARCHTERM=${BASE//\\/\\\\}
grep -a -x "$SEARCHTERM" $TMPDIR/sources > /dev/null && continue
- test -f $DIR_TO_CHECK/_service && egrep -q 'mode=.remoterun'
$DIR_TO_CHECK/_service && continue
- test -f $DIR_TO_CHECK/_service && egrep -q
'name=.product_converter' $DIR_TO_CHECK/_service && continue
+ test -f "$DIR_TO_CHECK/_service" && egrep -q 'mode=.remoterun'
"$DIR_TO_CHECK/_service" && continue
+ test -f "$DIR_TO_CHECK/_service" && egrep -q
'name=.product_converter' "$DIR_TO_CHECK/_service" && continue
# be a bit more relaxed for osc, it won't upload directories anyway
- [ -d "$DIR_TO_CHECK/$BASE" ] && [ -d $DIR_TO_CHECK/.osc ] &&
continue
+ [ -d "$DIR_TO_CHECK/$BASE" ] && [ -d "$DIR_TO_CHECK/.osc" ] &&
continue
# and source services on server side
- [ -d "$DIR_TO_CHECK/$BASE" ] && [ -d $DIR_TO_CHECK/.old ] &&
continue
+ [ -d "$DIR_TO_CHECK/$BASE" ] && [ -d "$DIR_TO_CHECK/.old" ] &&
continue
warn_on_unmentioned_files $BASE
if test "$RETURN" != "2" ; then
if [ -d "$DIR_TO_CHECK/$BASE" ] ; then
# be a bit more relaxed for osc, it won't upload
directories anyway
- if [ ! -d $DIR_TO_CHECK/.osc ] ; then
+ if [ ! -d "$DIR_TO_CHECK/.osc" ] ; then
echo "!! $BASE is a directory !!"
if test "$BATCHMODE" != true ; then
echo " remove subtree with 'r'"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/30-patches-applied
new/obs-service-source_validator-0.21/30-patches-applied
--- old/obs-service-source_validator-0.21/30-patches-applied 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/30-patches-applied 2021-12-14
18:30:23.000000000 +0100
@@ -3,8 +3,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
BATCHMODE=""
test "$1" = "--batchmode" && { BATCHMODE="--batchmode" ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
HELPERS_DIR="/usr/lib/obs/service/source_validators/helpers"
@@ -14,12 +14,12 @@
RETURN=0
test "$VERBOSE" = true && echo -n "- checking if all metioned patches are
being applied in specfile "
-for i in $DIR_TO_CHECK/*.spec ; do
- test -f $i || continue
+for i in "$DIR_TO_CHECK"/*.spec ; do
+ test -f "$i" || continue
test "$VERBOSE" = true && echo -n "."
RETURN=0
# WARNING only at the moment, just complain loudly ...
- /usr/lib/obs/service/source_validators/helpers/check_patches_applied
$BATCHMODE $i || RETURN=1
+ /usr/lib/obs/service/source_validators/helpers/check_patches_applied
$BATCHMODE "$i" || RETURN=1
done
test "$VERBOSE" = true && echo "done"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-source_validator-0.21/40-sequence-changes
new/obs-service-source_validator-0.21/40-sequence-changes
--- old/obs-service-source_validator-0.21/40-sequence-changes 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/40-sequence-changes 2021-12-14
18:30:23.000000000 +0100
@@ -2,8 +2,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
HELPERS_DIR="/usr/lib/obs/service/source_validators/helpers"
$HELPERS_DIR/check_input_filename "$DIR_TO_CHECK" || exit 1
@@ -13,24 +13,24 @@
test "$VERBOSE" = true && echo -n "- checking for sequence in changes files "
FIRST_CHANGES=""
RETURN=0
-for i in $DIR_TO_CHECK/*.changes ; do
- test -f $i || continue
- if [ $i != ${i%_source.changes} ];then
+for i in "$DIR_TO_CHECK"/*.changes ; do
+ test -f "$i" || continue
+ if [ "$i" != "${i%_source.changes}" ];then
/usr/lib/obs/service/source_validators/helpers/check_debian_source_changes $i
&& continue
echo "(W) File ends with '_source.changes' but is not a valid debian
source changes file"
fi
RETURN=0
test -n "$FIRST_CHANGES" || FIRST_CHANGES=$i
if test -n "$FIRST_CHANGES" -a "$FIRST_CHANGES" != "$i" ; then
- if cmp -s $FIRST_CHANGES $i ; then
+ if cmp -s $FIRST_CHANGES "$i" ; then
continue
fi
fi
- /usr/lib/obs/service/source_validators/helpers/check_dates_in_changes $i
|| {
+ /usr/lib/obs/service/source_validators/helpers/check_dates_in_changes "$i"
|| {
echo "Please fix with your own tools or try
/usr/lib/obs/service/source_validators/helpers/fix_changelog" >&2;
RETURN=1
}
-
/usr/lib/obs/service/source_validators/helpers/convert_changes_to_rpm_changelog
--check < $i > /dev/null || {
+
/usr/lib/obs/service/source_validators/helpers/convert_changes_to_rpm_changelog
--check < "$i" > /dev/null || {
echo "Please fix with your own tools or try
/usr/lib/obs/service/source_validators/helpers/fix_changelog" >&2;
RETURN=1
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/45-stale-changes
new/obs-service-source_validator-0.21/45-stale-changes
--- old/obs-service-source_validator-0.21/45-stale-changes 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/45-stale-changes 2021-12-14
18:30:23.000000000 +0100
@@ -2,8 +2,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
HELPERS_DIR="/usr/lib/obs/service/source_validators/helpers"
$HELPERS_DIR/check_input_filename "$DIR_TO_CHECK" || exit 1
@@ -13,7 +13,7 @@
RETURN=0
test "$VERBOSE" = true && echo -n "- checking for stale or missing changes "
-test -f $DIR_TO_CHECK/_service && egrep -q 'name=.product_converter'
$DIR_TO_CHECK/_service && {
+test -f "$DIR_TO_CHECK/_service" && egrep -q 'name=.product_converter'
"$DIR_TO_CHECK/_service" && {
test "$VERBOSE" = true && echo skipped for product
exit 0
}
@@ -37,29 +37,29 @@
test -n "$SPECLIST" && {
for i in $SPECLIST ; do
case $i in
- *-) i=${i}MACRO ; DO_PASS="1"
- ;;
+ *-) i=${i}MACRO ; DO_PASS="1" ;;
+ -*) i=${i#-} ;; # multi-flavour with empty default
esac
- test -f $DIR_TO_CHECK/$i.changes && DO_PASS=1
+ test -f "$DIR_TO_CHECK/$i.changes" && DO_PASS=1
done
test "$DO_PASS" = "1" || {
echo "WARNING: No .changes file found. This package can not be submitted
to openSUSE product projects."
exit 0
}
# check for stale .changes files
-for i in $DIR_TO_CHECK/*.changes ; do
- test -f $i || continue
- N=`basename $i .changes`
+for i in "$DIR_TO_CHECK"/*.changes ; do
+ test -f "$i" || continue
+ N=`basename "$i" .changes`
OKAY=0
for pack in $SPECLIST ; do
test "$pack" = "$N" && OKAY=1
case $pack in
- *-) test "${pack}MACRO" = "$N" && OKAY=1
- ;;
+ *-) test "${pack}MACRO" = "$N" && OKAY=1 ;;
+ -*) test "${pack#-}" = "$N" && OKAY=1 ;;
esac
done
if test $OKAY = 0 ; then
- if ! grep -q "^Source[0-9]*:.*$N.changes" $DIR_TO_CHECK/*.spec ; then
+ if ! grep -q "^Source[0-9]*:.*$N.changes" "$DIR_TO_CHECK"/*.spec ; then
echo "ERROR: $(basename $i) not a subpackage, please remove"
RETURN=1
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/50-spec-version
new/obs-service-source_validator-0.21/50-spec-version
--- old/obs-service-source_validator-0.21/50-spec-version 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/50-spec-version 2021-12-14
18:30:23.000000000 +0100
@@ -2,8 +2,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
HELPERS_DIR="/usr/lib/obs/service/source_validators/helpers"
$HELPERS_DIR/check_input_filename "$DIR_TO_CHECK" || exit 1
@@ -12,21 +12,21 @@
RETURN=0
test "$VERBOSE" = true && echo -n "- checking version in specfile "
-for i in $DIR_TO_CHECK/*.spec ; do
+for i in "$DIR_TO_CHECK"/*.spec ; do
WARNING_SHOWN=""
- test -f $i || continue
+ test -f "$i" || continue
test "$VERBOSE" = true && echo -n "."
RETURN=0
- grep -a ^Version: $i > /dev/null || {
- echo ERROR: Can not recognize Version in `basename $i`.
+ grep -a ^Version: "$i" > /dev/null || {
+ echo ERROR: Can not recognize Version in `basename "$i"`.
echo Remember that Version: must be at the beginning of line.
RETURN=1
}
- grep -a ^Version: $i | while read KEY VERSION ; do
+ grep -a ^Version: "$i" | while read KEY VERSION ; do
case "$VERSION" in
AUTO)
- test -e $DIR_TO_CHECK/get_version_number.sh || {
- echo ERROR: `basename $i` has Version \"AUTO\" but
get_version_number.sh does not exist.
+ test -e "$DIR_TO_CHECK"/get_version_number.sh || {
+ echo ERROR: `basename "$i"` has Version \"AUTO\" but
get_version_number.sh does not exist.
RETURN=1
}
;;
@@ -36,18 +36,18 @@
echo "packager is responsible that the resulting string"
echo "is non-empty and contains no \"-\"."
echo "----------"
- grep -A2 -B2 -a -i -e "^Version:.*%" $i
+ grep -A2 -B2 -a -i -e "^Version:.*%" "$i"
echo "----------"
WARNING_SHOWN="yes"
sleep 2
fi
;;
*-*)
- echo ERROR: `basename $i` has a Version with a \"-\". This is not
allowed.
+ echo ERROR: `basename "$i"` has a Version with a \"-\". This is
not allowed.
RETURN=1
;;
"")
- echo ERROR: `basename $i` has empty Version field. This is not
allowed.
+ echo ERROR: `basename "$i"` has empty Version field. This is not
allowed.
RETURN=1
;;
esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/60-spec-filelist
new/obs-service-source_validator-0.21/60-spec-filelist
--- old/obs-service-source_validator-0.21/60-spec-filelist 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/60-spec-filelist 2021-12-14
18:30:23.000000000 +0100
@@ -2,8 +2,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
HELPERS_DIR="/usr/lib/obs/service/source_validators/helpers"
$HELPERS_DIR/check_input_filename "$DIR_TO_CHECK" || exit 1
@@ -12,15 +12,15 @@
test "$VERBOSE" = true && echo -n "- checking forbidden paths in filelists "
RETURN=0
-for SPECFILE in $DIR_TO_CHECK/*.spec ; do
- test -f $SPECFILE || continue
+for SPECFILE in "$DIR_TO_CHECK"/*.spec ; do
+ test -f "$SPECFILE" || continue
test "$VERBOSE" = true && echo -n "."
IS_FILE_LIST=false
RETURN=0
if test -f "$SPECFILE" -a -s "$SPECFILE" ; then
- SEDOUT=$(sed -ne "/^%file/,\${;p;}" $SPECFILE)
+ SEDOUT=$(sed -ne "/^%file/,\${;p;}" "$SPECFILE")
while read -r LINE ; do
case "$LINE" in
%file*)
@@ -33,7 +33,7 @@
case $LINE in
*/usr/man/*|*/usr/info/*|*/usr/bin/X11/*)
RETURN=1
- echo "(E)" `basename $SPECFILE` uses forbidden file
path \"$LINE\".
+ echo "(E)" `basename "$SPECFILE"` uses forbidden file
path \"$LINE\".
;;
esac
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/70-baselibs
new/obs-service-source_validator-0.21/70-baselibs
--- old/obs-service-source_validator-0.21/70-baselibs 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/70-baselibs 2021-12-14
18:30:23.000000000 +0100
@@ -2,8 +2,8 @@
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
test "$1" = "--batchmode" && { BATCHMODE=true ; shift ; }
-DIR_TO_CHECK=$1
-DESTINATIONDIR=$2
+DIR_TO_CHECK="$1"
+DESTINATIONDIR="$2"
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
HELPERS_DIR="/usr/lib/obs/service/source_validators/helpers"
$HELPERS_DIR/check_input_filename "$DIR_TO_CHECK" || exit 1
@@ -16,16 +16,16 @@
}
# PASS if there is no baselibs.conf
-[ -f $DIR_TO_CHECK/baselibs.conf ] || exit 0
+[ -f "$DIR_TO_CHECK/baselibs.conf" ] || exit 0
BUILTBINARIES=()
if [ -e "$DIR_TO_CHECK/_multibuild" ]; then
while read i; do
# PASS if we have trouble parsing the .spec file
BUILTBINARIES+=($($HELPERS_DIR/spec_query --specfile
"$DIR_TO_CHECK"/*.spec --print-subpacks \
- --buildflavor $i)) || exit 0
+ --buildflavor "$i")) || exit 0
BUILTBINARIES+=($($HELPERS_DIR/spec_query --no-conditionals --specfile
"$DIR_TO_CHECK"/*.spec --print-subpacks \
- --buildflavor $i)) || exit 0
+ --buildflavor "$i")) || exit 0
done < <(sed -n -e
's,.*<\(flavor\|package\)>\([^<]*\)</\(flavor\|package\)>.*,\2,p'
"$DIR_TO_CHECK/_multibuild")
fi
for i in "$DIR_TO_CHECK"/*.spec; do
@@ -36,7 +36,7 @@
# add known keywords from baselibs specification
BUILTBINARIES+=('arch' 'targetname' 'targettype')
-BASELIBSREF=$(grep -o "^[a-zA-Z0-9.+_-]\+" $DIR_TO_CHECK/baselibs.conf)
+BASELIBSREF=$(grep -o "^[a-zA-Z0-9.+_-]\+" "$DIR_TO_CHECK/baselibs.conf")
RETURN=0
for rpm in $BASELIBSREF; do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-source_validator-0.21/helpers/check_dates_in_changes
new/obs-service-source_validator-0.21/helpers/check_dates_in_changes
--- old/obs-service-source_validator-0.21/helpers/check_dates_in_changes
2021-03-09 17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/helpers/check_dates_in_changes
2021-12-14 18:30:23.000000000 +0100
@@ -13,7 +13,7 @@
usage 1
fi
-for CHANGES in $* ; do
+for CHANGES in "$@" ; do
TROUBLE_FOUND=false
@@ -55,13 +55,13 @@
esac
DATE=`date +%s --date "$DATESTR" 2> /dev/null`
test $? -gt 0 -o -z "$DATE" -o "$LAST_IS_YEAR" != true && {
- echo $CHANGES
+ echo "$CHANGES"
echo "(E) INVALID \"$DATESTR\" "
TROUBLE_FOUND=true
}
;;
esac
- done < $CHANGES
+ done < "$CHANGES"
done
if test $TROUBLE_FOUND = false ; then
exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/obs-service-source_validator-0.21/helpers/spec_query
new/obs-service-source_validator-0.21/helpers/spec_query
--- old/obs-service-source_validator-0.21/helpers/spec_query 2021-03-09
17:51:33.000000000 +0100
+++ new/obs-service-source_validator-0.21/helpers/spec_query 2021-12-14
18:30:23.000000000 +0100
@@ -25,7 +25,7 @@
my %seen;
my $dtags;
my @ifs;
- while (<F>) {
+ for (my $line = 0; <F>; $line++) {
# only process if conditionals in non line continuation contexts
if (/^\s*%(?:define|global).*\\$/) {
push @$spec, $_;
@@ -39,20 +39,20 @@
}
if (/^\s*%if\s+.*%\{?name/ && $keep_name_conditionals) {
- unshift @ifs, $st_ifname;
+ unshift @ifs, { $st_ifname => $line };
} elsif (/^\s*%if/) {
- unshift @ifs, $st_if;
+ unshift @ifs, { $st_if => $line };
next;
} elsif (/^\s*%else/) {
- die("got %else without %if\n") unless @ifs;
- if ($ifs[0] == $st_ifname) {
+ die($line . ": %else without %if\n") unless @ifs;
+ if (exists $ifs[0]{$st_ifname}) {
push @$spec, "%endif";
- $ifs[0] = $st_if;
+ $ifs[0] = { $st_if => $line };
}
next;
} elsif (/^\s*%endif/) {
- die("got %endif without %if\n") unless @ifs;
- push @$spec, "%endif" if $ifs[0] == $st_ifname;
+ die($line . ": %endif without %if\n") unless @ifs;
+ push @$spec, "%endif" if (exists $ifs[0]{$st_ifname});
shift @ifs;
next;
}
@@ -70,7 +70,11 @@
}
push @$spec, $_;
}
- die("got %if without %endif\n") if @ifs;
+ if (@ifs and exists $ifs[0]{$st_if}) {
+ die($ifs[0]{$st_if} . ": %if without %endif\n");
+ } elsif (@ifs) {
+ die($ifs[0]{$st_ifname} . ": %if name without %endif\n");
+ }
close(F) || die("close: $!\n");
my @amb = sort(keys(%$dtags));
die('Ambiguous tags: ' . join(', ', @amb) . "\n") if $unique_sources && @amb;