diff options
author | jbj <devnull@localhost> | 2000-01-07 17:32:27 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-01-07 17:32:27 +0000 |
commit | 65e8fdb8f9bf5857e1c4ebf8adbefc566126037c (patch) | |
tree | 74a9aa5d65118dabcce260de323bc283ef0e0cce /scripts/brp-strip-comment-note | |
parent | ba46bbb4feb8c4fab914cfc835e953d8d94485a4 (diff) | |
download | librpm-tizen-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.tar.gz librpm-tizen-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.tar.bz2 librpm-tizen-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.zip |
add several BuildRoot FTW policies.
CVS patchset: 3511
CVS date: 2000/01/07 17:32:27
Diffstat (limited to 'scripts/brp-strip-comment-note')
-rwxr-xr-x | scripts/brp-strip-comment-note | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/brp-strip-comment-note b/scripts/brp-strip-comment-note new file mode 100755 index 000000000..3413f44d9 --- /dev/null +++ b/scripts/brp-strip-comment-note @@ -0,0 +1,17 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# 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 -a -perm +111 -exec file {} \; | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do + note="-R .note" + if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ + grep ALLOC >/dev/null; then + note= + fi + strip -R .comment $note $f +done |