Hello community, here is the log from the commit of package brp-check-suse for openSUSE:Factory checked in at 2011-12-12 16:56:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/brp-check-suse (Old) and /work/SRC/openSUSE:Factory/.brp-check-suse.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "brp-check-suse", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/brp-check-suse/brp-check-suse.changes 2011-09-23 01:52:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.brp-check-suse.new/brp-check-suse.changes 2011-12-12 16:57:04.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Dec 9 14:18:30 UTC 2011 - [email protected] + +- let rpm call everything below /usr/lib/rpm/brp-suse.d and do no + longer define a hard coded list of brp scripts + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ brp-check-suse.spec ++++++ --- /var/tmp/diff_new_pack.M8SpXC/_old 2011-12-12 16:58:17.000000000 +0100 +++ /var/tmp/diff_new_pack.M8SpXC/_new 2011-12-12 16:58:17.000000000 +0100 @@ -15,15 +15,13 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: brp-check-suse +AutoReqProv: off +Summary: Build root policy check scripts License: GPL-2.0+ Group: Development/Tools/Building -AutoReqProv: off -Summary: build root policy check scripts Version: 1.0 -Release: 44 +Release: 0 Url: http://gitorious.org/opensuse/brp-check-suse/ # # Note: don't rebuild this manually. Instead submit your patches @@ -34,32 +32,32 @@ # make package # Source0: %{name}-%{version}.tar.bz2 -BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global provfind sh -c "grep -v 'brp-desktop.data' | %__find_provides" %global __find_provides %provfind %description -build root policy check scripts - +This package contains all suse scripts called in the +build root checking or in parts implemeting SUSE policies. %prep %setup -q +%ifnarch x86_64 s390x ppc64 +rm brp-65-lib64-linux +%endif %build # nothing to do %install -install -d $RPM_BUILD_ROOT/usr/lib/rpm -install -d $RPM_BUILD_ROOT/etc/rpm -cp -a brp-* $RPM_BUILD_ROOT/usr/lib/rpm -cp -a macros.* $RPM_BUILD_ROOT/etc/rpm +install -d $RPM_BUILD_ROOT/usr/lib/rpm/brp-suse.d +mv brp*data $RPM_BUILD_ROOT/usr/lib/rpm/ +cp -a brp-* $RPM_BUILD_ROOT/usr/lib/rpm/brp-suse.d %files %defattr(-, root, root) %doc COPYING -/etc/rpm/* /usr/lib/rpm/* %changelog ++++++ brp-check-suse-1.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-05-permissions new/brp-check-suse-1.0/brp-05-permissions --- old/brp-check-suse-1.0/brp-05-permissions 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-05-permissions 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,16 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# used to also run on / if uid == 0 but that's really broken +if [ -e /etc/permissions -a -x /usr/bin/chkstat ]; then + /usr/bin/chkstat \ + --root "$RPM_BUILD_ROOT" \ + --noheader \ + --set \ + --system \ + --no-fscaps \ + --level secure +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-15-strip-debug new/brp-check-suse-1.0/brp-15-strip-debug --- old/brp-check-suse-1.0/brp-15-strip-debug 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-15-strip-debug 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,38 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + echo "RPM_BUILD_ROOT is not set or set to / : skipping strip" + exit 0 +fi +if [ "$NO_BRP_STRIP_DEBUG" = "true" ] ; then + echo "NO_BRP_STRIP_DEBUG is set: skipping strip" + exit 0 +fi + +FIND_IGNORE='\( -path $RPM_BUILD_ROOT/usr/lib/debug -o -path $RPM_BUILD_ROOT/lib/modules -o -path $RPM_BUILD_ROOT/opt/cross -o -path $RPM_BUILD_ROOT/proc \) -prune -o' + +# Strip debuginfo from ELF binaries, but not static libraries or kernel modules +for f in $(find $RPM_BUILD_ROOT $(echo "$(eval "echo $FIND_IGNORE")") \ + \( -name "*.a" -o -name "*.ko" \) -prune -o \ + -type f \( -perm /0111 -o -name "*.so*" \) -exec file {} \; | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'); do + mode=$(stat -c %a $f) + chmod u+w $f || : + strip -p --strip-debug --discard-locals -R .comment -R .note $f || : + chmod $mode $f +done + +# Don't strip debuginfo from static libs, but compiler-generated local symbols +for f in $(find $RPM_BUILD_ROOT $(echo "$(eval "echo $FIND_IGNORE")") \ + -type f -name "*.a" -print) ; do + case $(file $f) in + *"current ar"*|*ELF*", not stripped"*) + chmod u+w $f || : + strip -p --discard-locals -R .comment -R .note $f || : + ;; + *) + echo "WARNING: Strange looking archive $(file $f)" + continue + ;; + esac +done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-20-check-la new/brp-check-suse-1.0/brp-20-check-la --- old/brp-check-suse-1.0/brp-20-check-la 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-20-check-la 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,70 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +MASTER_ERROR_CODE=0 +for f in `find $RPM_BUILD_ROOT -type f -name "*.la" ` ; do + # first try to see if this really looks like a libtool file + grep -q "libdir=" $f || continue + grep -q "library_names=" $f || continue + ERROR_CODE=0 + grep -q "libdir=.*$RPM_BUILD_ROOT" $f && ERROR_CODE=1 + grep -q "libdir=.*/usr/src/packages/BUILD/" $f && ERROR_CODE=2 + grep -q "dependency_libs=.*$RPM_BUILD_ROOT" $f && ERROR_CODE=3 + grep -q "dependency_libs=.*/usr/src/packages/BUILD/" $f && ERROR_CODE=4 + chmod -x -- "$f" 2>/dev/null + if [ "$ERROR_CODE" != "0" ] ; then + MASTER_ERROR_CODE=$ERROR_CODE + echo "found trace of \$RPM_BUILD_ROOT or \$RPM_BUILD_DIR" + echo "in installed .la file $f" + fi + + . $f + NON_TRIVIAL_DEP=0 + if test -z "$dependency_libs" -a "$shouldnotlink" = "no"; then + echo "WARNING: found empty dependency_libs variable. please remove" + echo " the pointless libtool .la file $f" + echo " If you don't understand this, [email protected]" + # make this an error after 10.2 + #MASTER_ERROR_CODE=$ERROR_CODE + NON_TRIVIAL_DEP=1 + fi + + for dep in $dependency_libs; do + case $dep in + -l*) + NON_TRIVIAL_DEP=1 + break + ;; + *.la) + NON_TRIVIAL_DEP=1 + break + ;; + -L/usr/lib) + ;; + -L/lib) + ;; + -L/usr/lib64) + ;; + -L/lib64) + break + ;; + -L*) + NON_TRIVIAL_DEP=1 + break + ;; + *) + ;; + esac + done + + if test "$shouldnotlink" != "yes" -a $NON_TRIVIAL_DEP = 0; then + echo "WARNING: found only trivial dependencies. consider removing" + echo " the pointless libtool .la file $f" + echo " If you don't understand this, [email protected]" + fi +done + +exit $MASTER_ERROR_CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-25-symlink new/brp-check-suse-1.0/brp-25-symlink --- old/brp-check-suse-1.0/brp-25-symlink 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-25-symlink 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,186 @@ +#!/bin/sh + +# Task: go through the files in $RPM_BUILD_ROOT and +# relink symbolic links so that: +# links crossing top level directory boundaries (/usr/* -> /etc/*) +# are absolute links +# links below one top level directory (/usr/bin/* -> /usr/lib/*) +# are relative links +# NOTE: we're not doing this to fix a problem (as no matter how you +# do it you fix one problem by creating another). We're doing it +# so we can document this as policy - so you can rely on it + +# Additional Task: check some usual errors arround symlinks e.g. +# dangling symlinks or symlinks to init scripts in wrong location + +# Author: Stephan Kulow <[email protected]> + +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" ]; then + exit 0 +fi + +LC_ALL= +LANG= +LC_TIME=POSIX + +BASENAME=/usr/bin/basename +DIRNAME=/usr/bin/dirname +READLINK=/usr/bin/readlink + +cd $RPM_BUILD_ROOT + +had_errors=0 + +links=`find . -type l | sed -e "s,^./,/,"` +for link in $links +do + link_dest=`$READLINK ./$link` + orig_link_dest=$link_dest + + new_link_dest=NONE + link_dir=`$DIRNAME $link` + + case $link_dest in + .|..|../..) # link to current dir + continue ;; + .*) # relative links up + link_dest="$link_dir/$link_dest" + ;; + /*) # absolute links + ;; + */*) # relative links down + link_dest="$link_dir/$link_dest" + ;; + *) # the rest + continue + esac + + # cleaning out double slash + link_dest=`echo $link_dest | sed -e 's,//*,/,g; s,/\.$,/,; s,/$,,'` + + # eliminating /./ components + link_dest=`echo $link_dest | sed -e "s,/\./,/,g"`; + + counter=0 + # eliminating back references + while echo $link_dest | egrep -q '/\.\.'; do + link_dest=`echo $link_dest | sed -e "s,/[^/]*/\.\.,,"`; + case $link_dest in + /..*) # this is very mean + echo "ERROR: $link points to illegal $link_dest" + exit 1 + ;; + esac + counter=$((counter + 1)) + if test $counter -gt 10; then + echo "ERROR: more than 10 back references in $link?" + exit 1 + fi + done + + # black list + case "$link,$link_dest" in + *,/var/lib/named*) + continue;; + /usr/etc,*|/usr/tmp,*) + continue;; + */share/texmf/*|/usr/share/terminfo/*) + continue;; + /sbin/init,*) # don't create absolute symlink for /sbin/init + continue;; + *share/automake-*) + echo "ERROR: link target $link points into automake directory" + echo " You might want to add a -c to the automake call (or just" + echo " skip the files from packaging)" + exit 1 + ;; + *,/opt/kde3/share/doc*/HTML/*/common) # white listed for not existant + ;; + *,/usr/share/doc/kde/HTML/*/common) # white listed for not existant + ;; + *,/proc/*) # links pointing into /proc file system + ;; + *) + if test ! -L ./$link_dest && test ! -e $link_dest && test ! -e ./$link_dest; then + echo "ERROR: link target doesn't exist (neither in build root nor in installed system):" + echo " $link -> $link_dest" + echo "Add the package providing the target to neededforbuild and Requires" + test "$NO_BRP_STALE_LINK_ERROR" != "yes" && had_errors=1 + fi + ;; + esac + + forced_absolute=0 + for prefix in /usr/X11R6/lib/X11 /usr/X11R6/include/X11 /usr/X11R6/lib/X11/app-defaults ; do + if echo $link | grep -q "^$prefix/"; then + if echo $link_dest | grep -q "^$prefix/"; then + # if it's below it, it's fine + : + else + forced_absolute=1 + fi + fi + done + + dest_dir=`$DIRNAME $link_dest` + + # figuring out (currently) correct destination + if test "$link_dir" = "$dest_dir" || test "$dest_dir" = "."; then + new_link_dest=`$BASENAME $link_dest` + else + # figuring out top level directory + top_link=`echo $link | sed -e 's,^\(/[^/]*\)/.*,\1,'` + top_dest=`echo $link_dest | sed -e 's,^\(/[^/]*\)/.*,\1,'` + if test "$forced_absolute" = 0 && test "$top_link" = "$top_dest"; then # supposed to be relative + + # first we need to cut out the common prefix + link_tmp=$link + while test "$top_link" = "$top_dest"; do + link_orig=$link_tmp + dest_orig=$link_dest + link_tmp=`echo $link_tmp | sed -e 's,^\(/[^/]*\)/,/,'` + link_dest=`echo $link_dest | sed -e 's,^\(/[^/]*\)/,/,'` + top_link=`echo $link_tmp | sed -e 's,^\(/[^/]*\)/.*,\1,'` + top_dest=`echo $link_dest | sed -e 's,^\(/[^/]*\)/.*,\1,'` + + if test "$top_dest" = "$dest_orig" || test "$top_link" = "$link_orig"; then + link_tmp=$link_orig + link_dest=$dest_orig + break + fi + done + + # now we add a .. for every directory component + link_tmp=`$DIRNAME $link_tmp` + + if test "$link_tmp" = "$link_dest"; then + new_link_dest=. + elif test "$link_tmp" != "/"; then # we have a directory component + link_rel= + + while test -n "$link_tmp"; do + link_tmp=`echo $link_tmp | sed -e 's,^\(/[^/]*\),,'` + link_rel="../$link_rel" + done + + new_link_dest=`echo $link_rel/$link_dest | sed -e "s,//*,/,g"` + else + # get rid of the slash + link_dest=`echo $link_dest | sed -e 's,^/,,'` + new_link_dest=$link_dest + fi + else + new_link_dest=$link_dest + fi + fi + + if test "$new_link_dest" != NONE && test "$new_link_dest" != "$orig_link_dest"; then + echo "INFO: relinking $link -> $new_link_dest (was $orig_link_dest)" + rm ./$link && ln -s $new_link_dest ./$link + fi +done + +if test "$had_errors" = 1; then + exit 1 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-30-desktop new/brp-check-suse-1.0/brp-30-desktop --- old/brp-check-suse-1.0/brp-30-desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-30-desktop 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,4 @@ +#!/bin/sh + +perl -I/usr/lib/rpm/brp-desktop.data -MXML::Parser /usr/lib/rpm/brp-desktop.data/xdg_menu --root-menu /usr/lib/rpm/brp-desktop.data/applications.menu --format validate + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-35-rpath new/brp-check-suse-1.0/brp-35-rpath --- old/brp-check-suse-1.0/brp-35-rpath 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-35-rpath 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,47 @@ +#!/bin/bash +# author: Dirk Mueller <[email protected]> +# based on script by Thomas Biege <[email protected]> + +# last update: 2005-12-16 + +unset CDPATH + +# if using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi +if [ "$NO_BRP_CHECK_RPATH" = "true" ] ; then + echo "NO_BRP_CHECK_RPATH is set: skipping check" + exit 0 +fi + +HAD_ERRORS=0 +# check RPATH for bad directories +for FILE in $(find $RPM_BUILD_ROOT -type f \( -perm -0100 -o -perm -0010 -o -perm -0001 \) 2>/dev/null); do + for RPATH_VAL in $(objdump -p "$FILE" 2>/dev/null | egrep -w '(RPATH|RUNPATH)' | awk '{ print $2 ":"}'); do + if [ "${RPATH_VAL:0:7}" = "\$ORIGIN" ]; then continue;fi + + while [ -n "$RPATH_VAL" ]; do + RPATH_VAL_NXT=${RPATH_VAL%%:*} + RPATH_VAL=${RPATH_VAL##$RPATH_VAL_NXT:} + test -d "$RPATH_VAL_NXT" && RPATH_VAL_NXT=$(cd ${RPATH_VAL_NXT//#\/\//\/}; pwd -P) + + case ":$RPATH_VAL_NXT" in + :/usr/lib*) + ;; + :/lib*) + ;; + :/opt/*/lib*) + ;; + :/usr/X11R6/lib*) + ;; + *) + echo "ERROR: RPATH \"$RPATH_VAL_NXT\" on $FILE is not allowed" + HAD_ERRORS=1 + esac + done + done +done + +exit $HAD_ERRORS +#exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-40-rootfs new/brp-check-suse-1.0/brp-40-rootfs --- old/brp-check-suse-1.0/brp-40-rootfs 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-40-rootfs 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,46 @@ +#!/bin/sh + +# If using normal root, avoid check. Will give too much false positive +if [ -z "$RPM_BUILD_ROOT" ]; then + exit 0 +fi + +OUT_OF_FS=0 +for f in `find $RPM_BUILD_ROOT/bin $RPM_BUILD_ROOT/sbin \ + -type f -exec file {} \; 2>/dev/null | \ + sed -n -e 's/^\(.*\):[[:space:]]*ELF.*/\1/p'` ; do + case ${f##$RPM_BUILD_ROOT} in + /bin/rpm|/sbin/install-info) + continue + ;; + esac + + ldd $f | grep -qE '/opt' && { + echo "binary ${f##$RPM_BUILD_ROOT} is linked against libraries in /opt" + ldd $f | grep -E '/opt' + OUT_OF_FS=1 + } +done + +for f in `find $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib64 \ + -type f -exec file {} \; 2>/dev/null | \ + grep "shared object" | \ + grep -v "/security/" | + grep -v "/evms/" | + grep -v "/libnss_" | + sed -n -e 's/^\(.*\):[[:space:]]*ELF.*/\1/p'` ; do + ldd $f 2>/dev/null | grep -q '/opt' && { + echo "library ${f##$RPM_BUILD_ROOT} is linked against libraries in /opt" + ldd $f | grep -E '/opt' + OUT_OF_FS=1 + } +done + +if [ $OUT_OF_FS -eq 1 ]; then + echo "" + echo "Please adjust the paths in your package" + echo + exit 1 +fi + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-45-tcl new/brp-check-suse-1.0/brp-45-tcl --- old/brp-check-suse-1.0/brp-45-tcl 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-45-tcl 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,24 @@ +#!/bin/bash + +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +if [ "$NO_BRP_TCL_INDEX_CHECK" = "true" ] ; then + echo "NO_BRP_TCL_INDEX_CHECK is set: skipping brp tcl index check" + exit 0 +fi + +# Check for files named tclIndex and pkgIndex.tcl +# under /usr/lib and /usr/lib64. + +DIRS="$RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/lib64" +FILES=$(find $DIRS -maxdepth 2 -name pkgIndex.tcl 2>/dev/null) +if test -n "$FILES"; then + echo "Script libraries for Tcl extensions should be in" + echo "a package-specific subdir of /usr/share/tcl but" + echo "was/were found in:" + echo "$FILES" + echo "Please contact [email protected] if you need help with this." + exit 1 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-50-check-python new/brp-check-suse-1.0/brp-50-check-python --- old/brp-check-suse-1.0/brp-50-check-python 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-50-check-python 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,29 @@ +#!/bin/bash + +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +if [ ! -e /usr/include/python/Python.h ]; then + exit 0 +fi + +TMPDIR=`mktemp -d /tmp/ssizecheck-XXXXXX` + +find /usr/src/packages/BUILD/ -iname '**.c' -print0 | \ +xargs -r0 python /usr/lib/rpm/brp-check-python.data/ssizecheck.py > $TMPDIR/$$ + +test -f /.buildenv && . /.buildenv + +cat $TMPDIR/$$ + +if [ "${BUILD_BASENAME:0:4}" = "beta" ]; then + #echo "this is now an error in BETA (and will very soon be in STABLE)" + test -s $TMPDIR/$$ && echo "please see http://www.python.org/dev/peps/pep-0353/ for hints" + #test -s $TMPDIR/$$ && exit 1 +fi + +rm -rf $TMPDIR + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-55-boot-scripts new/brp-check-suse-1.0/brp-55-boot-scripts --- old/brp-check-suse-1.0/brp-55-boot-scripts 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-55-boot-scripts 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,205 @@ +#!/bin/bash +# +# brp-boot-scripts: Simply check the init and boot scripts +# for LSB compliance, on errors throw out messages. +# +# Author: Werner Fink <[email protected]> + +# Allow empty stop tags but warn about +nonfatalnull=no + +test -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" && exit 0 +typeset -r INTIDIR=$RPM_BUILD_ROOT/etc/init.d/ +test -d "$INTIDIR" || exit 0 + +shopt -s extglob +typeset -i ret=0 +scripts="" + +for p in ${INTIDIR}* ; do + test -d "$p" && continue + test -e "$p" || continue + s=${p##*/} + if test ! -s "$p" ; then + echo "E: File \`$s' with zero size found in ${INTIDIR}!" + let ret++ + continue + fi + if test ! -x "$p" ; then + test "$RPM_PACKAGE_NAME" = "aaa_base" -a "$s" = "README" && continue + echo "E: File \`$s' in ${INTIDIR} is not executable!" + let ret++ + continue + fi + case "$s" in + .*) + echo "E: Hidden file \`$s' found in ${INTIDIR}!" + let ret++ + continue + ;; + *~*) + echo "E: Backup file \`$s' found in ${INTIDIR}!" + let ret++ + continue + ;; + *.@(rpm|ba@(k|ck|ckup)|old|new|org|orig|save|swp|core)) + echo "E: Invalid file \`$s' found in ${INTIDIR}!" + let ret++ + continue + ;; + *.local) + case "${s%.*}" in + halt|boot|after|before) + echo "E: Reserved file \`$s' found in ${INTIDIR}!" + ;; + *) + echo "E: Invalid file \`$s' found in ${INTIDIR}!" + ;; + esac + let ret++ + continue + ;; + boot|rc|skeleton*|powerfail|halt|reboot|single) + test "$RPM_PACKAGE_NAME" = "aaa_base" && continue + echo "E: Reserved file \`$s' found in ${INTIDIR}!" + let ret++ + continue + ;; + rx) + test "$RPM_PACKAGE_NAME" = "xdmsc" && continue + echo "E: Reserved file \`$s' found in ${INTIDIR}!" + let ret++ + continue + ;; + esac + scripts="${scripts:+${scripts} }$s" +done + +test -n "$scripts" || exit 0 + +# +# Uses global variables $head for the LSB header +# and $s the name of the script using this. +# +checkhead () +{ + local IFS=$'\n' + local -i flags=0 + local line tag val + + for line in $head; do + case "$line" in + \#\#\#*) + continue + ;; + \#*:*) + tag=${line%%:*} + tag=${tag#\# } + val=${line#*:} + val=${val## } + ;; + *) + continue + ;; + esac + case "$tag" in + X-*Should-@(Start|Stop)) + echo "E: File \`$s' uses obsolete keyword \`$tag', should use \`Should${tag#*Should}'!" + let ret++ + ;; + Provides) + test -n "$val" || continue + let 'flags|=0x0001' + ;; + Required-Start) + let 'flags|=0x0002' + test -n "$val" && let 'flags|=0x0004' + ;; + Required-Stop) + let 'flags|=0x0008' + test -n "$val" && let 'flags|=0x0010' + ;; + Should-Start) + let 'flags|=0x0020' + test -n "$val" && let 'flags|=0x0040' + ;; + Should-Stop) + let 'flags|=0x0080' + test -n "$val" && let 'flags|=0x0100' + ;; + Default-Start) + let 'flags|=0x0200' + test -n "$val" && let 'flags|=0x0400' + ;; + esac + done + if (((flags & 0x0001) == 0)) ; then + echo "E: File \`$s' does not provide anything, please use a non-empty \`Provide'!" + let ret++ + fi + if (((flags & 0x0002) == 0)) ; then + echo "E: File \`$s' is missing \`Required-Start', please add even if empty!" + let ret++ + fi + if (((flags & 0x0008) == 0)) ; then + if (((flags & 0x0006) == 0x0006)) ; then + echo "W: File \`$s' is missing \`Required-Stop', please add and specify services!" + else + echo "W: File \`$s' is missing \`Required-Stop', please add even if empty!" + fi + fi + if (((flags & 0x0006) == 0x0006 && (flags & 0x0018) == 0x0008)) ; then + if test "$nonfatalnull" = "yes" ; then + echo "W: File \`$s' does require services for start but nothing for stop, if intended use \`\$null' please!" + else + echo "E: File \`$s' does require services for start but nothing for stop, if intended use \`\$null'!" + let ret++ + fi + fi + if (((flags & 0x0020) == 0x0020 && (flags & 0x0080) == 0)) ; then + if (((flags & 0x0060) == 0x0060)) ; then + echo "W: File \`$s' has \`Should-Start' but no \`Should-Stop', please add and specify services!" + else + echo "W: File \`$s' has \`Should-Start' but no \`Should-Stop', please add!" + fi + fi + if (((flags & 0x0060) == 0x0060 && (flags & 0x0180) == 0x0080)) ; then + if test "$nonfatalnull" = "yes" ; then + echo "W: File \`$s' may require services for start but nothing for stop, if intended use \`\$null' please!" + else + echo "E: File \`$s' may require services for start but nothing for stop, if intended use \`\$null'!" + let ret++ + fi + fi + if (((flags & 0x0200) == 0)) ; then + echo "E: File \`$s' is missing \`Default-Start', please add and specify default runlevel(s)!" + let ret++ + fi + if (((flags & 0x0400) == 0)) ; then + echo "E: File \`$s' has empty \`Default-Start', please specify default runlevel(s)!" + let ret++ + fi +} + +for s in $scripts ; do + p=${INTIDIR}/$s + head=$(sed -rn '/^###[[:blank:]]BEGIN INIT INFO/,/^### END INIT INFO/{s/[[:blank:]]+/ /g; p;}' < $p) + if test -z "$head" -a -s "${RPM_BUILD_ROOT}/usr/share/insserv/overrides/$s" ; then + head=$(sed -rn '/^###[[:blank:]]BEGIN INIT INFO/,/^### END INIT INFO/{s/[[:blank:]]+/ /g; p;}' < $p) + fi + if test -z "$head" ; then + echo "E: File \`$s' without LSB header found in ${INTIDIR}" + let ret++ + continue + fi + checkhead +done +unset head p s + +if ((ret != 0)) ; then + echo "ERROR: found one or more broken init or boot scripts, please fix them." + echo " For more information about LSB headers please read the manual" + echo " page of of insserv by executing the command \`man 8 insserv'." + echo " If you don't understand this, [email protected]" +fi +exit $ret diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-60-hook new/brp-check-suse-1.0/brp-60-hook --- old/brp-check-suse-1.0/brp-60-hook 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-60-hook 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,11 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +if [ -e $RPM_SOURCE_DIR/brp-hook ] ; then + sh $RPM_SOURCE_DIR/brp-hook || exit 1 +fi + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-65-lib64-linux new/brp-check-suse-1.0/brp-65-lib64-linux --- old/brp-check-suse-1.0/brp-65-lib64-linux 1970-01-01 01:00:00.000000000 +0100 +++ new/brp-check-suse-1.0/brp-65-lib64-linux 2011-12-11 09:48:56.000000000 +0100 @@ -0,0 +1,42 @@ +#!/bin/bash +# script checks wether package is 64-bit clean +# and also for a linker bug. (linker allows 64bit libs to link 32bit libs) +echo "[email protected]: if you find problems with this script, drop me a note" +# If using normal root, avoid changing anything: +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi +files= +tfiles= +LC_ALL= +LANG= +# check for 64-bit libs in */lib +for p in `grep -v 'lib64' /etc/ld.so.conf` +do + if test -d $RPM_BUILD_ROOT$p ; then + for f in `find $RPM_BUILD_ROOT$p \ + -maxdepth 1 -type f -name \*.so\* -o -name \*.a -follow 2>/dev/null` + do + [ $HOSTTYPE = s390x ] && case $f in */lib/ld64.so.1) continue; esac + objdump -f $f 2>/dev/null | grep 'format elf64' \ + && { echo "$f: should be in */lib64"; exit 1; } + + done + fi +done + +# check for 64 bit libs that have an rpath to a 32 bit Library + +for p in `grep 'lib64' /etc/ld.so.conf` +do + if test -d $RPM_BUILD_ROOT$p ; then + for f in `find $RPM_BUILD_ROOT$p \ + -maxdepth 1 -type f -name \*.so\* -o -name \*.a -follow 2>/dev/null` + do + # check for rpath to 32bit libs + objdump -x $f 2>/dev/null | grep -v "lib64" | grep -i 'rpath.*lib$' \ + && { echo "$f: rpath to 32bit lib"; exit 1; } + done + fi +done +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-boot-scripts new/brp-check-suse-1.0/brp-boot-scripts --- old/brp-check-suse-1.0/brp-boot-scripts 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-boot-scripts 1970-01-01 01:00:00.000000000 +0100 @@ -1,205 +0,0 @@ -#!/bin/bash -# -# brp-boot-scripts: Simply check the init and boot scripts -# for LSB compliance, on errors throw out messages. -# -# Author: Werner Fink <[email protected]> - -# Allow empty stop tags but warn about -nonfatalnull=no - -test -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" && exit 0 -typeset -r INTIDIR=$RPM_BUILD_ROOT/etc/init.d/ -test -d "$INTIDIR" || exit 0 - -shopt -s extglob -typeset -i ret=0 -scripts="" - -for p in ${INTIDIR}* ; do - test -d "$p" && continue - test -e "$p" || continue - s=${p##*/} - if test ! -s "$p" ; then - echo "E: File \`$s' with zero size found in ${INTIDIR}!" - let ret++ - continue - fi - if test ! -x "$p" ; then - test "$RPM_PACKAGE_NAME" = "aaa_base" -a "$s" = "README" && continue - echo "E: File \`$s' in ${INTIDIR} is not executable!" - let ret++ - continue - fi - case "$s" in - .*) - echo "E: Hidden file \`$s' found in ${INTIDIR}!" - let ret++ - continue - ;; - *~*) - echo "E: Backup file \`$s' found in ${INTIDIR}!" - let ret++ - continue - ;; - *.@(rpm|ba@(k|ck|ckup)|old|new|org|orig|save|swp|core)) - echo "E: Invalid file \`$s' found in ${INTIDIR}!" - let ret++ - continue - ;; - *.local) - case "${s%.*}" in - halt|boot|after|before) - echo "E: Reserved file \`$s' found in ${INTIDIR}!" - ;; - *) - echo "E: Invalid file \`$s' found in ${INTIDIR}!" - ;; - esac - let ret++ - continue - ;; - boot|rc|skeleton*|powerfail|halt|reboot|single) - test "$RPM_PACKAGE_NAME" = "aaa_base" && continue - echo "E: Reserved file \`$s' found in ${INTIDIR}!" - let ret++ - continue - ;; - rx) - test "$RPM_PACKAGE_NAME" = "xdmsc" && continue - echo "E: Reserved file \`$s' found in ${INTIDIR}!" - let ret++ - continue - ;; - esac - scripts="${scripts:+${scripts} }$s" -done - -test -n "$scripts" || exit 0 - -# -# Uses global variables $head for the LSB header -# and $s the name of the script using this. -# -checkhead () -{ - local IFS=$'\n' - local -i flags=0 - local line tag val - - for line in $head; do - case "$line" in - \#\#\#*) - continue - ;; - \#*:*) - tag=${line%%:*} - tag=${tag#\# } - val=${line#*:} - val=${val## } - ;; - *) - continue - ;; - esac - case "$tag" in - X-*Should-@(Start|Stop)) - echo "E: File \`$s' uses obsolete keyword \`$tag', should use \`Should${tag#*Should}'!" - let ret++ - ;; - Provides) - test -n "$val" || continue - let 'flags|=0x0001' - ;; - Required-Start) - let 'flags|=0x0002' - test -n "$val" && let 'flags|=0x0004' - ;; - Required-Stop) - let 'flags|=0x0008' - test -n "$val" && let 'flags|=0x0010' - ;; - Should-Start) - let 'flags|=0x0020' - test -n "$val" && let 'flags|=0x0040' - ;; - Should-Stop) - let 'flags|=0x0080' - test -n "$val" && let 'flags|=0x0100' - ;; - Default-Start) - let 'flags|=0x0200' - test -n "$val" && let 'flags|=0x0400' - ;; - esac - done - if (((flags & 0x0001) == 0)) ; then - echo "E: File \`$s' does not provide anything, please use a non-empty \`Provide'!" - let ret++ - fi - if (((flags & 0x0002) == 0)) ; then - echo "E: File \`$s' is missing \`Required-Start', please add even if empty!" - let ret++ - fi - if (((flags & 0x0008) == 0)) ; then - if (((flags & 0x0006) == 0x0006)) ; then - echo "W: File \`$s' is missing \`Required-Stop', please add and specify services!" - else - echo "W: File \`$s' is missing \`Required-Stop', please add even if empty!" - fi - fi - if (((flags & 0x0006) == 0x0006 && (flags & 0x0018) == 0x0008)) ; then - if test "$nonfatalnull" = "yes" ; then - echo "W: File \`$s' does require services for start but nothing for stop, if intended use \`\$null' please!" - else - echo "E: File \`$s' does require services for start but nothing for stop, if intended use \`\$null'!" - let ret++ - fi - fi - if (((flags & 0x0020) == 0x0020 && (flags & 0x0080) == 0)) ; then - if (((flags & 0x0060) == 0x0060)) ; then - echo "W: File \`$s' has \`Should-Start' but no \`Should-Stop', please add and specify services!" - else - echo "W: File \`$s' has \`Should-Start' but no \`Should-Stop', please add!" - fi - fi - if (((flags & 0x0060) == 0x0060 && (flags & 0x0180) == 0x0080)) ; then - if test "$nonfatalnull" = "yes" ; then - echo "W: File \`$s' may require services for start but nothing for stop, if intended use \`\$null' please!" - else - echo "E: File \`$s' may require services for start but nothing for stop, if intended use \`\$null'!" - let ret++ - fi - fi - if (((flags & 0x0200) == 0)) ; then - echo "E: File \`$s' is missing \`Default-Start', please add and specify default runlevel(s)!" - let ret++ - fi - if (((flags & 0x0400) == 0)) ; then - echo "E: File \`$s' has empty \`Default-Start', please specify default runlevel(s)!" - let ret++ - fi -} - -for s in $scripts ; do - p=${INTIDIR}/$s - head=$(sed -rn '/^###[[:blank:]]BEGIN INIT INFO/,/^### END INIT INFO/{s/[[:blank:]]+/ /g; p;}' < $p) - if test -z "$head" -a -s "${RPM_BUILD_ROOT}/usr/share/insserv/overrides/$s" ; then - head=$(sed -rn '/^###[[:blank:]]BEGIN INIT INFO/,/^### END INIT INFO/{s/[[:blank:]]+/ /g; p;}' < $p) - fi - if test -z "$head" ; then - echo "E: File \`$s' without LSB header found in ${INTIDIR}" - let ret++ - continue - fi - checkhead -done -unset head p s - -if ((ret != 0)) ; then - echo "ERROR: found one or more broken init or boot scripts, please fix them." - echo " For more information about LSB headers please read the manual" - echo " page of of insserv by executing the command \`man 8 insserv'." - echo " If you don't understand this, [email protected]" -fi -exit $ret diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-check-la new/brp-check-suse-1.0/brp-check-la --- old/brp-check-suse-1.0/brp-check-la 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-check-la 1970-01-01 01:00:00.000000000 +0100 @@ -1,70 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -MASTER_ERROR_CODE=0 -for f in `find $RPM_BUILD_ROOT -type f -name "*.la" ` ; do - # first try to see if this really looks like a libtool file - grep -q "libdir=" $f || continue - grep -q "library_names=" $f || continue - ERROR_CODE=0 - grep -q "libdir=.*$RPM_BUILD_ROOT" $f && ERROR_CODE=1 - grep -q "libdir=.*/usr/src/packages/BUILD/" $f && ERROR_CODE=2 - grep -q "dependency_libs=.*$RPM_BUILD_ROOT" $f && ERROR_CODE=3 - grep -q "dependency_libs=.*/usr/src/packages/BUILD/" $f && ERROR_CODE=4 - chmod -x -- "$f" 2>/dev/null - if [ "$ERROR_CODE" != "0" ] ; then - MASTER_ERROR_CODE=$ERROR_CODE - echo "found trace of \$RPM_BUILD_ROOT or \$RPM_BUILD_DIR" - echo "in installed .la file $f" - fi - - . $f - NON_TRIVIAL_DEP=0 - if test -z "$dependency_libs" -a "$shouldnotlink" = "no"; then - echo "WARNING: found empty dependency_libs variable. please remove" - echo " the pointless libtool .la file $f" - echo " If you don't understand this, [email protected]" - # make this an error after 10.2 - #MASTER_ERROR_CODE=$ERROR_CODE - NON_TRIVIAL_DEP=1 - fi - - for dep in $dependency_libs; do - case $dep in - -l*) - NON_TRIVIAL_DEP=1 - break - ;; - *.la) - NON_TRIVIAL_DEP=1 - break - ;; - -L/usr/lib) - ;; - -L/lib) - ;; - -L/usr/lib64) - ;; - -L/lib64) - break - ;; - -L*) - NON_TRIVIAL_DEP=1 - break - ;; - *) - ;; - esac - done - - if test "$shouldnotlink" != "yes" -a $NON_TRIVIAL_DEP = 0; then - echo "WARNING: found only trivial dependencies. consider removing" - echo " the pointless libtool .la file $f" - echo " If you don't understand this, [email protected]" - fi -done - -exit $MASTER_ERROR_CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-check-python new/brp-check-suse-1.0/brp-check-python --- old/brp-check-suse-1.0/brp-check-python 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-check-python 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -if [ ! -e /usr/include/python/Python.h ]; then - exit 0 -fi - -TMPDIR=`mktemp -d /tmp/ssizecheck-XXXXXX` - -find /usr/src/packages/BUILD/ -iname '**.c' -print0 | \ -xargs -r0 python /usr/lib/rpm/brp-check-python.data/ssizecheck.py > $TMPDIR/$$ - -test -f /.buildenv && . /.buildenv - -cat $TMPDIR/$$ - -if [ "${BUILD_BASENAME:0:4}" = "beta" ]; then - #echo "this is now an error in BETA (and will very soon be in STABLE)" - test -s $TMPDIR/$$ && echo "please see http://www.python.org/dev/peps/pep-0353/ for hints" - #test -s $TMPDIR/$$ && exit 1 -fi - -rm -rf $TMPDIR - -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-desktop new/brp-check-suse-1.0/brp-desktop --- old/brp-check-suse-1.0/brp-desktop 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -#!/bin/sh - -perl -I/usr/lib/rpm/brp-desktop.data -MXML::Parser /usr/lib/rpm/brp-desktop.data/xdg_menu --root-menu /usr/lib/rpm/brp-desktop.data/applications.menu --format validate - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-hook new/brp-check-suse-1.0/brp-hook --- old/brp-check-suse-1.0/brp-hook 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-hook 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -if [ -e $RPM_SOURCE_DIR/brp-hook ] ; then - sh $RPM_SOURCE_DIR/brp-hook || exit 1 -fi - -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-permissions new/brp-check-suse-1.0/brp-permissions --- old/brp-check-suse-1.0/brp-permissions 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-permissions 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -# used to also run on / if uid == 0 but that's really broken -if [ -e /etc/permissions -a -x /usr/bin/chkstat ]; then - /usr/bin/chkstat \ - --root "$RPM_BUILD_ROOT" \ - --noheader \ - --set \ - --system \ - --no-fscaps \ - --level secure -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-rootfs new/brp-check-suse-1.0/brp-rootfs --- old/brp-check-suse-1.0/brp-rootfs 2011-07-11 16:53:26.000000000 +0200 +++ new/brp-check-suse-1.0/brp-rootfs 1970-01-01 01:00:00.000000000 +0100 @@ -1,46 +0,0 @@ -#!/bin/sh - -# If using normal root, avoid check. Will give too much false positive -if [ -z "$RPM_BUILD_ROOT" ]; then - exit 0 -fi - -OUT_OF_FS=0 -for f in `find $RPM_BUILD_ROOT/bin $RPM_BUILD_ROOT/sbin \ - -type f -exec file {} \; 2>/dev/null | \ - sed -n -e 's/^\(.*\):[[:space:]]*ELF.*/\1/p'` ; do - case ${f##$RPM_BUILD_ROOT} in - /bin/rpm|/sbin/install-info) - continue - ;; - esac - - ldd $f | grep -qE '/opt' && { - echo "binary ${f##$RPM_BUILD_ROOT} is linked against libraries in /opt" - ldd $f | grep -E '/opt' - OUT_OF_FS=1 - } -done - -for f in `find $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib64 \ - -type f -exec file {} \; 2>/dev/null | \ - grep "shared object" | \ - grep -v "/security/" | - grep -v "/evms/" | - grep -v "/libnss_" | - sed -n -e 's/^\(.*\):[[:space:]]*ELF.*/\1/p'` ; do - ldd $f 2>/dev/null | grep -q '/opt' && { - echo "library ${f##$RPM_BUILD_ROOT} is linked against libraries in /opt" - ldd $f | grep -E '/opt' - OUT_OF_FS=1 - } -done - -if [ $OUT_OF_FS -eq 1 ]; then - echo "" - echo "Please adjust the paths in your package" - echo - exit 1 -fi - -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-rpath new/brp-check-suse-1.0/brp-rpath --- old/brp-check-suse-1.0/brp-rpath 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-rpath 1970-01-01 01:00:00.000000000 +0100 @@ -1,47 +0,0 @@ -#!/bin/bash -# author: Dirk Mueller <[email protected]> -# based on script by Thomas Biege <[email protected]> - -# last update: 2005-12-16 - -unset CDPATH - -# if using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi -if [ "$NO_BRP_CHECK_RPATH" = "true" ] ; then - echo "NO_BRP_CHECK_RPATH is set: skipping check" - exit 0 -fi - -HAD_ERRORS=0 -# check RPATH for bad directories -for FILE in $(find $RPM_BUILD_ROOT -type f \( -perm -0100 -o -perm -0010 -o -perm -0001 \) 2>/dev/null); do - for RPATH_VAL in $(objdump -p "$FILE" 2>/dev/null | egrep -w '(RPATH|RUNPATH)' | awk '{ print $2 ":"}'); do - if [ "${RPATH_VAL:0:7}" = "\$ORIGIN" ]; then continue;fi - - while [ -n "$RPATH_VAL" ]; do - RPATH_VAL_NXT=${RPATH_VAL%%:*} - RPATH_VAL=${RPATH_VAL##$RPATH_VAL_NXT:} - test -d "$RPATH_VAL_NXT" && RPATH_VAL_NXT=$(cd ${RPATH_VAL_NXT//#\/\//\/}; pwd -P) - - case ":$RPATH_VAL_NXT" in - :/usr/lib*) - ;; - :/lib*) - ;; - :/opt/*/lib*) - ;; - :/usr/X11R6/lib*) - ;; - *) - echo "ERROR: RPATH \"$RPATH_VAL_NXT\" on $FILE is not allowed" - HAD_ERRORS=1 - esac - done - done -done - -exit $HAD_ERRORS -#exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-strip-debug new/brp-check-suse-1.0/brp-strip-debug --- old/brp-check-suse-1.0/brp-strip-debug 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-strip-debug 1970-01-01 01:00:00.000000000 +0100 @@ -1,38 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - echo "RPM_BUILD_ROOT is not set or set to / : skipping strip" - exit 0 -fi -if [ "$NO_BRP_STRIP_DEBUG" = "true" ] ; then - echo "NO_BRP_STRIP_DEBUG is set: skipping strip" - exit 0 -fi - -FIND_IGNORE='\( -path $RPM_BUILD_ROOT/usr/lib/debug -o -path $RPM_BUILD_ROOT/lib/modules -o -path $RPM_BUILD_ROOT/opt/cross -o -path $RPM_BUILD_ROOT/proc \) -prune -o' - -# Strip debuginfo from ELF binaries, but not static libraries or kernel modules -for f in $(find $RPM_BUILD_ROOT $(echo "$(eval "echo $FIND_IGNORE")") \ - \( -name "*.a" -o -name "*.ko" \) -prune -o \ - -type f \( -perm /0111 -o -name "*.so*" \) -exec file {} \; | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'); do - mode=$(stat -c %a $f) - chmod u+w $f || : - strip -p --strip-debug --discard-locals -R .comment -R .note $f || : - chmod $mode $f -done - -# Don't strip debuginfo from static libs, but compiler-generated local symbols -for f in $(find $RPM_BUILD_ROOT $(echo "$(eval "echo $FIND_IGNORE")") \ - -type f -name "*.a" -print) ; do - case $(file $f) in - *"current ar"*|*ELF*", not stripped"*) - chmod u+w $f || : - strip -p --discard-locals -R .comment -R .note $f || : - ;; - *) - echo "WARNING: Strange looking archive $(file $f)" - continue - ;; - esac -done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/brp-tcl new/brp-check-suse-1.0/brp-tcl --- old/brp-check-suse-1.0/brp-tcl 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/brp-tcl 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -#!/bin/bash - -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -if [ "$NO_BRP_TCL_INDEX_CHECK" = "true" ] ; then - echo "NO_BRP_TCL_INDEX_CHECK is set: skipping brp tcl index check" - exit 0 -fi - -# Check for files named tclIndex and pkgIndex.tcl -# under /usr/lib and /usr/lib64. - -DIRS="$RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/lib64" -FILES=$(find $DIRS -maxdepth 2 -name pkgIndex.tcl 2>/dev/null) -if test -n "$FILES"; then - echo "Script libraries for Tcl extensions should be in" - echo "a package-specific subdir of /usr/share/tcl but" - echo "was/were found in:" - echo "$FILES" - echo "Please contact [email protected] if you need help with this." - exit 1 -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/brp-check-suse-1.0/macros.brp new/brp-check-suse-1.0/macros.brp --- old/brp-check-suse-1.0/macros.brp 2011-05-10 13:55:29.000000000 +0200 +++ new/brp-check-suse-1.0/macros.brp 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -%_suse_os_install_post \ - /usr/lib/rpm/brp-permissions \ - /usr/lib/rpm/brp-compress \ - /usr/lib/rpm/brp-strip-debug \ - /usr/lib/rpm/brp-check-la \ - /usr/lib/rpm/brp-symlink \ - /usr/lib/rpm/brp-desktop \ - /usr/lib/rpm/brp-rpath \ - /usr/lib/rpm/brp-rootfs \ - /usr/lib/rpm/brp-tcl \ - /usr/lib/rpm/brp-check-python \ - /usr/lib/rpm/brp-boot-scripts \ - /usr/lib/rpm/brp-hook \ -%{nil} - -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
