diff options
Diffstat (limited to 'scripts')
26 files changed, 30 insertions, 12 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index a080991..b24b446 100644..100755 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -25,6 +25,7 @@ EXTRA_DIST = \ rpmconfig_SCRIPTS = \ brp-compress brp-python-bytecompile brp-java-gcjcompile \ brp-strip brp-strip-comment-note brp-python-hardlink \ + brp-tizen \ brp-strip-shared brp-strip-static-archive \ check-files check-prereqs \ check-buildroot check-rpaths check-rpaths-worker \ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index bd91b3a..bd91b3a 100644..100755 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in diff --git a/scripts/brp-compress b/scripts/brp-compress index 1e8772d..247779e 100755 --- a/scripts/brp-compress +++ b/scripts/brp-compress @@ -5,7 +5,7 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi -cd $RPM_BUILD_ROOT +cd "$RPM_BUILD_ROOT" # Compress man pages COMPRESS="gzip -9 -n" diff --git a/scripts/brp-java-gcjcompile b/scripts/brp-java-gcjcompile index 708a649..ec9b93a 100644..100755 --- a/scripts/brp-java-gcjcompile +++ b/scripts/brp-java-gcjcompile @@ -17,12 +17,13 @@ cflags="$RPM_OPT_FLAGS -fPIC -findirect-dispatch" 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 @@ for jar in `find $RPM_BUILD_ROOT -type f -name "*.?ar"`; do [ -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 diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile index 79996ea..333ef94 100644..100755 --- a/scripts/brp-python-bytecompile +++ b/scripts/brp-python-bytecompile @@ -14,7 +14,7 @@ fi # 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 @@ -34,7 +34,7 @@ fi # and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1 shopt -s nullglob -for python_libdir in $RPM_BUILD_ROOT/usr/lib{,64}/python[0-9].[0-9]/ ; +for python_libdir in "$RPM_BUILD_ROOT"/usr/lib{,64}/python[0-9].[0-9]/ ; do python_binary=/usr/bin/$(basename $python_libdir) real_libdir=${python_libdir/$RPM_BUILD_ROOT/} diff --git a/scripts/brp-python-hardlink b/scripts/brp-python-hardlink index 5453866..f887199 100755 --- a/scripts/brp-python-hardlink +++ b/scripts/brp-python-hardlink @@ -10,8 +10,8 @@ fi find "$RPM_BUILD_ROOT" -type f -name "*.pyc" | while read pyc ; do pyo="${pyc%c}o" if [ -f "$pyo" ] ; then - csha="$(sha1sum -b $pyc | cut -d' ' -f 1)" && \ - osha="$(sha1sum -b $pyo | cut -d' ' -f 1)" && \ + csha="$(sha1sum -b "$pyc" | cut -d' ' -f 1)" && \ + osha="$(sha1sum -b "$pyo" | cut -d' ' -f 1)" && \ if [ "$csha" = "$osha" ] ; then ln -f "$pyc" "$pyo" fi diff --git a/scripts/brp-strip b/scripts/brp-strip index 8acc22f..20e7c50 100755 --- a/scripts/brp-strip +++ b/scripts/brp-strip @@ -12,9 +12,10 @@ Darwin*) exit 0 ;; esac # 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,' | \ + grep -v '/lib/modules/' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do $STRIP -g "$f" || : done diff --git a/scripts/brp-strip-comment-note b/scripts/brp-strip-comment-note index 90cd2ae..7116425 100755 --- a/scripts/brp-strip-comment-note +++ b/scripts/brp-strip-comment-note @@ -14,8 +14,10 @@ esac # Strip .comment and .note sections (the latter only if it is not allocated) # for already stripped elf files in the build root -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,' | \ + grep -v '/lib/modules/' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do note="-R .note" if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ diff --git a/scripts/brp-strip-shared b/scripts/brp-strip-shared index da46431..e06ee4b 100644..100755 --- a/scripts/brp-strip-shared +++ b/scripts/brp-strip-shared @@ -17,7 +17,7 @@ esac # Strip ELF shared objects # Please note we don't restrict our search to executable files because # our libraries are not (should not be, at least) +x. -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 ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do diff --git a/scripts/brp-strip-static-archive b/scripts/brp-strip-static-archive index d7bff33..ddd3b24 100755 --- a/scripts/brp-strip-static-archive +++ b/scripts/brp-strip-static-archive @@ -12,7 +12,7 @@ Darwin*) exit 0 ;; esac # 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 diff --git a/scripts/brp-tizen b/scripts/brp-tizen new file mode 100755 index 0000000..bf298d4 --- /dev/null +++ b/scripts/brp-tizen @@ -0,0 +1,13 @@ +#! /bin/sh + +# If using normal root, avoid changing anything: +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +for script in /usr/lib/rpm/brp-tizen.d/brp*; do + if test -x "$script"; then + echo "calling $script" + $script || exit 1 + fi +done diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 505dbde..505dbde 100644..100755 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh diff --git a/scripts/find-php-provides b/scripts/find-php-provides index 02e0c42..02e0c42 100644..100755 --- a/scripts/find-php-provides +++ b/scripts/find-php-provides diff --git a/scripts/find-php-requires b/scripts/find-php-requires index 9d08151..9d08151 100644..100755 --- a/scripts/find-php-requires +++ b/scripts/find-php-requires diff --git a/scripts/gendiff b/scripts/gendiff index d9b0c21..d9b0c21 100644..100755 --- a/scripts/gendiff +++ b/scripts/gendiff diff --git a/scripts/libtooldeps.sh b/scripts/libtooldeps.sh index d8937c8..d8937c8 100644..100755 --- a/scripts/libtooldeps.sh +++ b/scripts/libtooldeps.sh diff --git a/scripts/macros.perl b/scripts/macros.perl index 0370411..0370411 100644..100755 --- a/scripts/macros.perl +++ b/scripts/macros.perl diff --git a/scripts/macros.php b/scripts/macros.php index cf20728..cf20728 100644..100755 --- a/scripts/macros.php +++ b/scripts/macros.php diff --git a/scripts/macros.python b/scripts/macros.python index ea1f200..ea1f200 100644..100755 --- a/scripts/macros.python +++ b/scripts/macros.python diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides index 9348457..9348457 100644..100755 --- a/scripts/mono-find-provides +++ b/scripts/mono-find-provides diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires index ea58cae..ea58cae 100644..100755 --- a/scripts/mono-find-requires +++ b/scripts/mono-find-requires diff --git a/scripts/ocaml-find-provides.sh b/scripts/ocaml-find-provides.sh index a4441cb..a4441cb 100644..100755 --- a/scripts/ocaml-find-provides.sh +++ b/scripts/ocaml-find-provides.sh diff --git a/scripts/ocaml-find-requires.sh b/scripts/ocaml-find-requires.sh index bee3478..bee3478 100644..100755 --- a/scripts/ocaml-find-requires.sh +++ b/scripts/ocaml-find-requires.sh diff --git a/scripts/osgideps.pl b/scripts/osgideps.pl index ab92b65..ab92b65 100644..100755 --- a/scripts/osgideps.pl +++ b/scripts/osgideps.pl diff --git a/scripts/rpm.log b/scripts/rpm.log index 732c301..732c301 100644..100755 --- a/scripts/rpm.log +++ b/scripts/rpm.log diff --git a/scripts/tcl.req b/scripts/tcl.req index 43c5920..43c5920 100644..100755 --- a/scripts/tcl.req +++ b/scripts/tcl.req |