]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
QA: Make use of the new logging function.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 26 Jan 2010 19:44:04 +0000 (20:44 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 26 Jan 2010 19:44:04 +0000 (20:44 +0100)
tools/quality-agent.d/001-include-files
tools/quality-agent.d/001-remove-static-libs
tools/quality-agent.d/001-unsafe-files
tools/quality-agent.d/050-textrels
tools/quality-agent.d/090-python-hardlinks [changed mode: 0644->0755]
tools/quality-agent.d/090-remove-empty-dirs
tools/quality-agent.d/099-strip

index 596194dd45e31156bdbb1ba8d914822cb0e0f179..abf683cec69e4fbdda94c6eb97548bd74ecfd4c7 100755 (executable)
@@ -3,7 +3,7 @@
 . $(dirname ${0})/qa-include
 
 # Fix include files
-echo "${0##*/}: Fix include files"
+log "Fix include files"
 
 if [ ! -d "${BUILDROOT}/usr/include" ]; then
        exit 0
index 5ab204a42b6b076de903a4bf6fa5d5ec3c4be760..2422746f160d6060351fa6dbed22f99ff5e6794c 100755 (executable)
@@ -3,7 +3,7 @@
 . $(dirname ${0})/qa-include
 
 # Remove unwanted files
-echo "${0##*/}: Removing unwanted files: *.a *.la"
+log "Removing unwanted files: *.a *.la"
 for file in $(find ${BUILDROOT} -name "*.a" -or -name "*.la"); do
        
        # Don't remove libc_nonshared.a. It is used by gcc/ld.
@@ -13,7 +13,7 @@ for file in $(find ${BUILDROOT} -name "*.a" -or -name "*.la"); do
        [ "${file##*/}" = "libgcc_eh.a" ] && continue
        [ "${file##*/}" = "libfl_pic.a" ] && continue
        
-       echo "  Removing: ${file}"
+       log "  Removing: ${file}"
        rm -f ${file} || exit $?
 done
 
index 89ebc925fa0f8bf11fa40edcc96b57ccafda51a5..34e94832485fa2e7050b7cfa9c9253e53d3039e8 100755 (executable)
@@ -2,24 +2,24 @@
 
 . $(dirname ${0})/qa-include
 
-echo "${0##*/}: Searching for world-writeable files..."
+log "Searching for world-writeable files..."
 
 files=$(find ${BUILDROOT} -type f -perm -2 2>/dev/null)
 if [ -n "${files}" ]; then
-       echo "  QA Security Notice:"
-       echo "   - The folloing files will be world writable."
-       echo "   - This may or may not be a security problem, most of the time it is one."
-       echo "   - Please double check that these files really need a world writeable bit and file bugs accordingly."
-       echo
-       echo "${files}"
+       log "  QA Security Notice:"
+       log "   - The folloing files will be world writable."
+       log "   - This may or may not be a security problem, most of the time it is one."
+       log "   - Please double check that these files really need a world writeable bit and file bugs accordingly."
+       log
+       log "${files}"
        exit 1
 fi
 
 files=$(find ${BUILDROOT} -type f '(' -perm -2002 -o -perm -4002 ')')
 if [ -n "${files}" ]; then
-       echo "  QA Notice: Unsafe files detected (set*id and world writable)"
-       echo
-       echo "${files}"
+       log "  QA Notice: Unsafe files detected (set*id and world writable)"
+       log
+       log "${files}"
        exit 1
 fi
 
index 4db9187e7ddf8c3bc57124b7cd415838e0a26332..a3c2f2e70adb7b6084a5bd2660abdf60ca50ca60 100755 (executable)
@@ -3,16 +3,16 @@
 . $(dirname ${0})/qa-include
 
 # TEXTREL's are baaaaaaaad
-echo "${0##*/}: Searching for bad TEXTRELs"
+log "Searching for bad TEXTRELs"
 
 files=$(scanelf -qyRF '%t %p' ${BUILDROOT} 2>/dev/null | awk '{ print $NF }')
 if [ -n "${files}" ]; then
-       echo "  QA Notice: The following files contain runtime text relocations"
-       echo "   Text relocations force the dynamic linker to perform extra"
-       echo "   work at startup, waste system resources, and may pose a security"
-       echo "   risk. On some architectures, the code may not even function"
-       echo "   properly, if at all."
-       echo "${files}"
+       log "  QA Notice: The following files contain runtime text relocations"
+       log "   Text relocations force the dynamic linker to perform extra"
+       log "   work at startup, waste system resources, and may pose a security"
+       log "   risk. On some architectures, the code may not even function"
+       log "   properly, if at all."
+       log "${files}"
 
        exit 1
 fi
old mode 100644 (file)
new mode 100755 (executable)
index 5912693..8bcf6ea
@@ -3,11 +3,12 @@
 . $(dirname ${0})/qa-include
 
 # If the pyc and pyo files are the same, we can hardlink them
-echo "${0##*/}: Hard-linking python bytecode files"
+log "Hard-linking python bytecode files"
 
 for py in $(find ${BUILDROOT} -type f -name "*.py"); do
        if [ -e "${py}c" ] && [ -e "${py}o" ]; then
                if cmp -s "${py}c" "${py}o"; then
+                       log "  ${py}c -> ${py}o"
                        ln -f "${py}c" "${py}o"
                fi
        fi
index 66308114f3662809de6f3653278e6368640d421c..de859ba136dd335c8955915b68a5aefca69aea0c 100755 (executable)
@@ -3,12 +3,12 @@
 . $(dirname ${0})/qa-include
 
 # Remove unwanted files
-echo "${0##*/}: Remove empty directories"
+log "Remove empty directories"
 
 for dir in {,/usr}/{{,s}bin,lib{,exec}} /usr/share/man{,/man{0,1,2,3,4,5,6,7,8,9}}; do
        dir="${BUILDROOT}/${dir}"
        if [ -d "${dir}" ] && [ "$(ls -1A ${dir} | wc -l)" = "0" ]; then
-               echo "  Removing ${dir}"
+               log "  Removing ${dir}"
                rm -rf ${dir}
        fi
 done
index d4bdafc5e5bd5509b7f38ae13f741f3f37d02e1f..6afc8ad39a4700301f21d39f770cea883ad70ab5 100755 (executable)
@@ -3,14 +3,14 @@
 . $(dirname ${0})/qa-include
 
 # Strip debugging symbols
-echo "${0##*/}: Strip debugging symbols"
+log "Strip debugging symbols"
 for f in $(find ${BUILDROOT} -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \)); do
        if (file $f | grep -q ' shared object,'); then
                strip --strip-debug "$f" || :
        fi
 done
 
-echo "${0##*/}: Strip unneeded symbols"
+log "Strip unneeded symbols"
 for f in $(find ${BUILDROOT} -type f); do
        if (file $f | grep -q ' shared object,'); then
                strip --strip-unneeded "$f" || :