RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Pinto Elia
  Root:   /v/rpm/cvs                       Email:  devzero2...@rpm5.org
  Module: rpm                              Date:   06-Sep-2011 14:53:11
  Branch: rpm-5_4                          Handle: 2011090612531001

  Modified files:           (Branch: rpm-5_4)
    rpm                     CHANGES
    rpm/scripts             brp-compress brp-java-gcjcompile
                            brp-python-bytecompile brp-strip
                            brp-strip-static-archive check-files find-lang.sh

  Log:
    merge commit 31d807ffa8cdf91addf7c39fdf9abf6c61d77944
    from @rpm.org master branch
    
    Author: Jeff Tickle <j...@jefftickle.com>
    
    $RPM_BUILD_ROOT breaks brp-* scripts if it contains spaces (ticket #843)
    
    - This patch adds quotes around $RPM_BUILD_ROOT in places that I noticed
      they were missing, and attempts to handle some of the problems that can
      occur when looping over the output of find.

  Summary:
    Revision    Changes     Path
    1.3501.2.165+2  -0      rpm/CHANGES
    1.13.10.1   +1  -1      rpm/scripts/brp-compress
    1.2.12.1    +4  -3      rpm/scripts/brp-java-gcjcompile
    1.1.20.1    +1  -1      rpm/scripts/brp-python-bytecompile
    1.6.10.1    +1  -1      rpm/scripts/brp-strip
    1.3.10.1    +1  -1      rpm/scripts/brp-strip-static-archive
    1.10.6.1    +1  -1      rpm/scripts/check-files
    1.10.8.1    +4  -4      rpm/scripts/find-lang.sh
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3501.2.164 -r1.3501.2.165 CHANGES
  --- rpm/CHANGES       5 Sep 2011 23:08:21 -0000       1.3501.2.164
  +++ rpm/CHANGES       6 Sep 2011 12:53:11 -0000       1.3501.2.165
  @@ -1,4 +1,6 @@
   5.4.2 -> 5.4.3:
  +    - devzero2000: merge commit 31d807ffa8cdf91addf7c39fdf9abf6c61d77944
  +      from @rpm.org master branch
       - jbj: rpmdb: stub-in db-5.2.28 support.
       - jbj: rpmdb: set -I/usr/include/dbXY, remove <dbXY/...>.
       - jbj: rpmtxn: fix: use DB_INIT_TXN (0x800 changes in db-5.2.28).
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/brp-compress
  ============================================================================
  $ cvs diff -u -r1.13 -r1.13.10.1 brp-compress
  --- rpm/scripts/brp-compress  20 Jun 2007 16:56:47 -0000      1.13
  +++ rpm/scripts/brp-compress  6 Sep 2011 12:53:10 -0000       1.13.10.1
  @@ -5,7 +5,7 @@
        exit 0
   fi
   
  -cd $RPM_BUILD_ROOT
  +cd "$RPM_BUILD_ROOT"
   
   # Compress man pages
   COMPRESS="gzip -9 -n"
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/brp-java-gcjcompile
  ============================================================================
  $ cvs diff -u -r1.2 -r1.2.12.1 brp-java-gcjcompile
  --- rpm/scripts/brp-java-gcjcompile   25 May 2007 18:34:16 -0000      1.2
  +++ rpm/scripts/brp-java-gcjcompile   6 Sep 2011 12:53:10 -0000       1.2.12.1
  @@ -17,12 +17,13 @@
   ldflags="-Wl,-Bsymbolic"
   
   # XXX make it so you can override the list, for mx4j et al.
  -for jar in `find $RPM_BUILD_ROOT -type f -name "*.?ar"`; do
  +find "$RPM_BUILD_ROOT" -type f -name "*.?ar" | while read jar ; do
       [ `head -c 2 "$jar"` != "PK" ] && continue
   
       [ -d "$RPM_BUILD_ROOT/$libdir" ] || mkdir -p "$RPM_BUILD_ROOT/$libdir"
   
  -    lib="$libdir/lib`basename $jar`.so"
  +    bnjar=`basename "$jar"`
  +    lib="$libdir/lib$bnjar.so"
       [ -f "$RPM_BUILD_ROOT/$lib" ] && continue
   
       # XXX need splits to handle #158308
  @@ -32,7 +33,7 @@
   
       [ -d "$RPM_BUILD_ROOT/$dbdir" ] || mkdir -p "$RPM_BUILD_ROOT/$dbdir"
   
  -    db="$dbdir/`basename $jar`.db"
  +    db="$dbdir/$bnjar.db"
       [ -f "$RPM_BUILD_ROOT/$db" ] && exit 1
       
       $gcj-dbtool -n "$RPM_BUILD_ROOT/$db" 64
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/brp-python-bytecompile
  ============================================================================
  $ cvs diff -u -r1.1 -r1.1.20.1 brp-python-bytecompile
  --- rpm/scripts/brp-python-bytecompile        20 Jun 2003 19:04:15 -0000      
1.1
  +++ rpm/scripts/brp-python-bytecompile        6 Sep 2011 12:53:10 -0000       
1.1.20.1
  @@ -13,7 +13,7 @@
   
   # Figure out how deep we need to descend.  We could pick an insanely high
   # number and hope it's enough, but somewhere, somebody's sure to run into it.
  -depth=`(find $RPM_BUILD_ROOT -type f -name "*.py" -print0 ; echo /) | \
  +depth=`(find "$RPM_BUILD_ROOT" -type f -name "*.py" -print0 ; echo /) | \
          xargs -0 -n 1 dirname | sed 's,[^/],,g' | sort -u | tail -n 1 | wc -c`
   if [ -z "$depth" -o "$depth" -le "1" ]; then
        exit 0
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/brp-strip
  ============================================================================
  $ cvs diff -u -r1.6 -r1.6.10.1 brp-strip
  --- rpm/scripts/brp-strip     20 Jun 2007 16:56:47 -0000      1.6
  +++ rpm/scripts/brp-strip     6 Sep 2011 12:53:10 -0000       1.6.10.1
  @@ -13,7 +13,7 @@
   [ -z "$STRIP" ] && STRIP=strip
   
   # Strip ELF binaries
  -for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or 
-perm -0001 \) -exec file {} \; | \
  +for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or 
-perm -0001 \) -exec file {} \; | \
           grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
        grep -v ' shared object,' | \
        sed -n -e 's/^\(.*\):[  ]*ELF.*, not stripped/\1/p'`; do
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/brp-strip-static-archive
  ============================================================================
  $ cvs diff -u -r1.3 -r1.3.10.1 brp-strip-static-archive
  --- rpm/scripts/brp-strip-static-archive      20 Jun 2007 16:56:47 -0000      
1.3
  +++ rpm/scripts/brp-strip-static-archive      6 Sep 2011 12:53:10 -0000       
1.3.10.1
  @@ -13,7 +13,7 @@
   [ -z "$STRIP" ] && STRIP=strip
   
   # Strip static libraries.
  -for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
  +for f in `find "$RPM_BUILD_ROOT" -type f -a -exec file {} \; | \
           grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
        grep 'current ar archive' | \
        sed -n -e 's/^\(.*\):[  ]*current ar archive/\1/p'`; do
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/check-files
  ============================================================================
  $ cvs diff -u -r1.10 -r1.10.6.1 check-files
  --- rpm/scripts/check-files   18 Aug 2008 06:05:51 -0000      1.10
  +++ rpm/scripts/check-files   6 Sep 2011 12:53:10 -0000       1.10.6.1
  @@ -7,7 +7,7 @@
   # fi...@pld.org.pl
   # a...@altlinux.org
   
  -RPM_BUILD_ROOT=$1
  +RPM_BUILD_ROOT="$1"
   if ! cd "${RPM_BUILD_ROOT:?}"; then
        cat >/dev/null
        exit 1
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/find-lang.sh
  ============================================================================
  $ cvs diff -u -r1.10 -r1.10.8.1 find-lang.sh
  --- rpm/scripts/find-lang.sh  19 Feb 2008 16:58:15 -0000      1.10
  +++ rpm/scripts/find-lang.sh  6 Sep 2011 12:53:10 -0000       1.10.8.1
  @@ -85,7 +85,7 @@
       esac
   done    
   
  -find $TOP_DIR -type f -or -type l|sed '
  +find "$TOP_DIR" -type f -or -type l|sed '
   s:'"$TOP_DIR"'::
   '"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_][^/_]*\)\(.*\.mo$\):%lang(\2) 
\1\2\3:
   
'"$NO_ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_][^/_]*\)\(.*/'"$NAME"'\.mo$\):%lang(\2)
 \1\2\3:
  @@ -93,7 +93,7 @@
   s:%lang(C) ::
   /^$/d' > $MO_NAME
   
  -find $TOP_DIR -type d|sed '
  +find "$TOP_DIR" -type d|sed '
   s:'"$TOP_DIR"'::
   '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1:
   '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/..*\)::
  @@ -106,7 +106,7 @@
   s:%lang(C) ::
   /^$/d' >> $MO_NAME
   
  -find $TOP_DIR -type f|sed '
  +find "$TOP_DIR" -type f|sed '
   s:'"$TOP_DIR"'::
   
'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\).omf\):%lang(\2)
 \1:
   
'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\).omf\):%lang(\2)
 \1:
  @@ -114,7 +114,7 @@
   s:%lang(C) ::
   /^$/d' >> $MO_NAME
   
  -find $TOP_DIR -type d|sed '
  +find "$TOP_DIR" -type d|sed '
   s:'"$TOP_DIR"'::
   '"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_][^/_]*\)\(.*/'"$NAME"'/\)::
   
'"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_][^/_]*\)\(.*/'"$NAME"'\)$:%lang(\2)
 \1\2\3:
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to