egrep -i "Debian|Ubuntu" /etc/issue
if [ \$? = 0 ]; then
INSTALLCMD="apt-get install -q --yes"
+ INSTALLPKGS="lintian"
else
INSTALLCMD="yum install -q -y --nogpgcheck"
+ INSTALLPKGS="rpmlint"
fi
cat << EndArrangeScript > arrange_lb_test_root.sh
export LBTSTCOLS
-${INSTALLCMD} globus-proxy-utils postgresql postgresql-server emi-lb-nagios-plugins voms-clients curl wget sudo bc
+${INSTALLCMD} globus-proxy-utils postgresql postgresql-server emi-lb-nagios-plugins voms-clients curl wget sudo bc $INSTALLPKGS
/etc/init.d/postgresql initdb >/dev/null 2>&1
/etc/init.d/postgresql start
echo ./lb-test-threaded.sh \$OUTPUT_OPT >> arrange_lb_test_user.sh
echo ./lb-test-harvester.sh \$OUTPUT_OPT >> arrange_lb_test_user.sh
echo ./lb-test-nagios-probe.sh \$OUTPUT_OPT >> arrange_lb_test_user.sh
+echo ./lb-test-packaging.sh \$OUTPUT_OPT >> arrange_lb_test_user.sh
echo perl ./lb-test-purge.pl --i-want-to-purge $remotehost:9000 \$OUTPUT_OPT >> arrange_lb_test_user.sh
echo 'echo "</literal>"' >> arrange_lb_test_user.sh
echo 'echo "<verbatim>"' >> arrange_lb_test_user.sh
echo
$SYS_GREP ${jobid} $$_notifications.txt > /dev/null
}
+
+function check_rpmlint() {
+ local pkg=''
+ local out=''
+ local ret=0
+
+ echo "Packages compliance check output:"
+ while test -n "$1"; do
+ for pkg in `rpm -qa --queryformat '%{NAME} ' $1`; do
+ echo $pkg
+ out="`rpmlint $pkg`"
+ echo "$out"
+ echo
+ if echo $out | grep -i '^E:' >/dev/null; then
+ ret=1
+ fi
+ done
+
+ shift
+ done
+
+ return $ret
+}
+
+function check_lintian() {
+ local dir=/tmp/lintian-check.$$
+ local pkgs=''
+ local pkg=''
+ local out=''
+ local ret=0
+
+ while test -n "$1"; do
+ pkgs="$pkgs `dpkg-query -W -f '${Source}\n' $1 2>$dir/query.log`"
+ shift
+ done
+ pkgs=`echo "$pkgs" | sort | uniq`
+
+ rm -f $dir
+ mkdir $dir
+ printf "Downloading packages..."
+ (cd $dir; apt-get -d source $pkgs >$dir/download.log)
+ if test $? -eq 0; then
+ test_done
+ else
+ test_failed
+ fi
+
+ echo "Packages compliance check output:"
+ for pkg in $pkgs; do
+ echo $pkg:
+ out="`lintian $dir/${pkg}_*.dsc`"
+ echo "$out"
+ echo
+ if echo $out | grep -i '^E:' >/dev/null; then
+ ret=1
+ fi
+ done
+
+ rm -rf $dir
+ return $ret
+}
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+# See http://www.eu-egee.org/partners for details on the copyright holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# show help and usage
+progname=`basename $0`
+showHelp()
+{
+cat << EndHelpHeader
+Script producing errors and warnings due to packaging.
+
+Prerequisities:
+ - installed all tested packages
+ - Scientific Linux: installed rpmlint
+ - Debian: installed lintian
+
+Tests called:
+
+ called rpmlint or lintian on the packages
+
+Returned values:
+ Exit TEST_OK: Test Passed
+ Exit TEST_ERROR: Test Failed
+ Exit 2: Wrong Input
+
+EndHelpHeader
+
+ echo "Usage: $progname [OPTIONS]"
+ echo "Options:"
+ echo " -h | --help Show this help message."
+ echo " -t | --text Format output as plain ASCII text."
+ echo " -c | --color Format output as text with ANSI colours (autodetected by default)."
+ echo " -x | --html Format output as html."
+}
+
+# read common definitions and functions
+COMMON=lb-common.sh
+if [ ! -r ${COMMON} ]; then
+ printf "Common definitions '${COMMON}' missing!"
+ exit 2
+fi
+source ${COMMON}
+
+while test -n "$1"
+do
+ case "$1" in
+ "-h" | "--help") showHelp && exit 2 ;;
+ "-t" | "--text") setOutputASCII ;;
+ "-c" | "--color") setOutputColor ;;
+ "-x" | "--html") setOutputHTML ;;
+ esac
+ shift
+done
+
+
+##
+# Starting the test
+#####################
+
+test_start
+
+
+if egrep -i "Debian|Ubuntu" /etc/issue >/dev/null; then
+ check_lintian \*glite-jobid\* \*glite-lbu\* \*glite-lbjp-\* \*glite-lb-\* emi-lb\* \*glite-security-gss\* \*glite-security-gsoap-plugin\* \*glite-jp-\*
+ ret=$?
+else
+ check_rpmlint glite-jobid-\* glite-lbjp-\* glite-lb-\* emi-lb-\*
+ ret=$?
+fi
+
+#printf "Packages compliance..."
+#if test $ret -eq 0; then
+# test_done
+#else
+# test_failed
+#fi
+
+
+test_end
+
+exit $TEST_OK
egrep -i "Debian|Ubuntu" /etc/issue
if [ \$? = 0 ]; then
INSTALLCMD="apt-get install -q --yes"
+ INSTALLPKGS="lintian"
else
INSTALLCMD="yum install -q -y --nogpgcheck"
+ INSTALLPKGS="rpmlint"
fi
cat << EndArrangeScript > arrange_px_test_root.sh
export PXTSTCOLS
-${INSTALLCMD} globus-proxy-utils voms-clients curl wget xml-commons-apis
+${INSTALLCMD} globus-proxy-utils voms-clients curl wget xml-commons-apis $INSTALLPKGS
cd /tmp
echo 'echo "</verbatim>"' >> arrange_px_test_user.sh
echo 'echo "<literal>"' >> arrange_px_test_user.sh
echo ./px-test-all.sh \$OUTPUT_OPT >> arrange_px_test_user.sh
+echo ./px-test-packaging.sh \$OUTPUT_OPT >> arrange_px_test_user.sh
echo 'echo "</literal>"' >> arrange_px_test_user.sh
echo 'echo "<verbatim>"' >> arrange_px_test_user.sh
echo echo ================== >> arrange_px_test_user.sh
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+# See http://www.eu-egee.org/partners for details on the copyright holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# show help and usage
+progname=`basename $0`
+showHelp()
+{
+cat << EndHelpHeader
+Script producing errors and warnings due to packaging.
+
+Prerequisities:
+ - installed all tested packages
+ - Scientific Linux: installed rpmlint
+ - Debian: installed lintian
+
+Tests called:
+
+ called rpmlint or lintian on the packages
+
+Returned values:
+ Exit TEST_OK: Test Passed
+ Exit TEST_ERROR: Test Failed
+ Exit 2: Wrong Input
+
+EndHelpHeader
+
+ echo "Usage: $progname [OPTIONS]"
+ echo "Options:"
+ echo " -h | --help Show this help message."
+ echo " -t | --text Format output as plain ASCII text."
+ echo " -c | --color Format output as text with ANSI colours (autodetected by default)."
+ echo " -x | --html Format output as html."
+}
+
+# read common definitions and functions
+COMMON=px-common.sh
+if [ ! -r ${COMMON} ]; then
+ printf "Common definitions '${COMMON}' missing!"
+ exit 2
+fi
+source ${COMMON}
+
+while test -n "$1"
+do
+ case "$1" in
+ "-h" | "--help") showHelp && exit 2 ;;
+ "-t" | "--text") setOutputASCII ;;
+ "-c" | "--color") setOutputColor ;;
+ "-x" | "--html") setOutputHTML ;;
+ esac
+ shift
+done
+
+
+##
+# Starting the test
+#####################
+
+test_start
+
+
+if egrep -i "Debian|Ubuntu" /etc/issue >/dev/null; then
+ check_lintian glite-px-\* libglite-security-proxyrenewal-\* emi-px-\*
+ ret=$?
+else
+ check_rpmlint glite-px-\* emi-px\*
+ ret=$?
+fi
+
+#printf "Packages compliance..."
+#if test $ret -eq 0; then
+# test_done
+#else
+# test_failed
+#fi
+
+
+test_end
+
+exit $TEST_OK
egrep -i "Debian|Ubuntu" /etc/issue
if [ \$? = 0 ]; then
INSTALLCMD="apt-get install -q --yes"
+ INSTALLPKGS="lintian"
else
INSTALLCMD="yum install -q -y --nogpgcheck"
+ INSTALLPKGS="rpmlint"
fi
cat << EndArrangeScript > arrange_gridsite_test_root.sh
export GSTSTCOLS
-${INSTALLCMD} voms-clients httpd mod_ssl curl wget nc lsof
+${INSTALLCMD} voms-clients httpd mod_ssl curl wget nc lsof $INSTALLPKGS
HTTPD_CONFDIR=/tmp
for dir in /etc/httpd /etc/apache /etc/apache2; do
./ping-remote.sh $remotehost \$OUTPUT_OPT
./ping-local.sh \$OUTPUT_OPT -f \$HTTPD_CONF
./gridsite-test-all.sh \$OUTPUT_OPT
+./gridsite-test-packaging.sh \$OUTPUT_OPT
echo "</literal>"
echo "<verbatim>"
echo ==================
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+# See http://www.eu-egee.org/partners for details on the copyright holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# show help and usage
+progname=`basename $0`
+showHelp()
+{
+cat << EndHelpHeader
+Script producing errors and warnings due to packaging.
+
+Prerequisities:
+ - installed all tested packages
+ - Scientific Linux: installed rpmlint
+ - Debian: installed lintian
+
+Tests called:
+
+ called rpmlint or lintian on the packages
+
+Returned values:
+ Exit TEST_OK: Test Passed
+ Exit TEST_ERROR: Test Failed
+ Exit 2: Wrong Input
+
+EndHelpHeader
+
+ echo "Usage: $progname [OPTIONS]"
+ echo "Options:"
+ echo " -h | --help Show this help message."
+ echo " -t | --text Format output as plain ASCII text."
+ echo " -c | --color Format output as text with ANSI colours (autodetected by default)."
+ echo " -x | --html Format output as html."
+}
+
+# read common definitions and functions
+COMMON=gridsite-common.sh
+if [ ! -r ${COMMON} ]; then
+ printf "Common definitions '${COMMON}' missing!"
+ exit 2
+fi
+source ${COMMON}
+
+while test -n "$1"
+do
+ case "$1" in
+ "-h" | "--help") showHelp && exit 2 ;;
+ "-t" | "--text") setOutputASCII ;;
+ "-c" | "--color") setOutputColor ;;
+ "-x" | "--html") setOutputHTML ;;
+ esac
+ shift
+done
+
+
+##
+# Starting the test
+#####################
+
+test_start
+
+
+if egrep -i "Debian|Ubuntu" /etc/issue >/dev/null; then
+ check_lintian libgridsite\*
+ ret=$?
+else
+ check_rpmlint gridsite-\*
+ ret=$?
+fi
+
+#printf "Packages compliance..."
+#if test $ret -eq 0; then
+# test_done
+#else
+# test_failed
+#fi
+
+
+test_end
+
+exit $TEST_OK