diff --git a/brp-compress b/brp-compress deleted file mode 100755 index 3f76fe5..0000000 --- a/brp-compress +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -cd $RPM_BUILD_ROOT - -# Compress man pages -COMPRESS="gzip -9 -n" -COMPRESS_EXT=.gz - -for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ - ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ - ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ - ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* -do - [ -d $d ] || continue - for f in `find $d -type f` - do - [ -f "$f" ] || continue - [ "`basename $f`" = "dir" ] && continue - - case "$f" in - *.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.Z$//'`;; - *.gz) gunzip -f $f; b=`echo $f | sed -e 's/\.gz$//'`;; - *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;; - *) b=$f;; - esac - - $COMPRESS $b /dev/null || { - inode=`ls -i $b | awk '{ print $1 }'` - others=`find $d -type f -inum $inode` - if [ -n "$others" ]; then - for afile in $others ; do - [ "$afile" != "$b" ] && rm -f $afile - done - $COMPRESS -f $b - for afile in $others ; do - [ "$afile" != "$b" ] && ln $b$COMPRESS_EXT $afile$COMPRESS_EXT - done - else - $COMPRESS -f $b - fi - } - done - - for f in `find $d -type l` - do - l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` - rm -f $f - b=`echo $f | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` - ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT - done -done diff --git a/brp-python-hardlink b/brp-python-hardlink deleted file mode 100755 index 210d69c..0000000 --- a/brp-python-hardlink +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -# Hardlink identical *.pyc and *.pyo, originally from PLD's rpm-build-macros -# Modified to use sha1sum instead of cmp to avoid a diffutils dependency. -find "$RPM_BUILD_ROOT" -type f -name "*.pyc" | while read pyc ; do - pyo="$(echo $pyc | sed -e 's/.pyc$/.pyo/')" - if [ -f "$pyo" ] ; then - 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 - fi -done diff --git a/brp-strip b/brp-strip deleted file mode 100755 index 4882f5f..0000000 --- a/brp-strip +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi -[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" -[ -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 {} \; | \ - grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ - grep -v ' shared object,' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - $STRIP -g "$f" || : -done diff --git a/brp-strip-comment-note b/brp-strip-comment-note deleted file mode 100755 index 0b63efe..0000000 --- a/brp-strip-comment-note +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# If using normal root, avoid changing anything. -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" -[ -z "$OBJDUMP" -a -n "$2" ] && OBJDUMP="$2" -[ -z "$STRIP" ] && STRIP=strip -[ -z "$OBJDUMP" ] && OBJDUMP=objdump - -# 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 {} \; | \ - grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ - 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 diff --git a/brp-strip-shared b/brp-strip-shared deleted file mode 100755 index 9b78d5e..0000000 --- a/brp-strip-shared +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip. -# Thu Apr 20 - Guilherme Manika -# Created file - -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" -[ -z "$STRIP" ] && STRIP=strip -# 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 {} \; | \ - grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ - grep ' shared object,' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - $STRIP --strip-unneeded "$f" -done diff --git a/brp-strip-static-archive b/brp-strip-static-archive deleted file mode 100755 index 150e700..0000000 --- a/brp-strip-static-archive +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then - exit 0 -fi - -[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" -[ -z "$STRIP" ] && STRIP=strip - -# Strip static libraries. -for f in `find $RPM_BUILD_ROOT -name \*.a -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 - $STRIP -g "$f" -done diff --git a/macros b/macros index 0b8c05f..6d855fa 100644 --- a/macros +++ b/macros @@ -85,14 +85,14 @@ %__arch_install_post /usr/lib/rpm/check-buildroot %__os_install_post \ - /usr/lib/rpm/redhat/brp-compress \ + /usr/lib/rpm/brp-compress \ %{!?__debug_package:\ - /usr/lib/rpm/redhat/brp-strip %{__strip} \ - /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ + /usr/lib/rpm/brp-strip %{__strip} \ + /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \ } \ - /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ + /usr/lib/rpm/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \ - /usr/lib/rpm/redhat/brp-python-hardlink \ + /usr/lib/rpm/brp-python-hardlink \ %{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \ %{nil} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 6cfeed4..f1f764e 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 18 +Version: 19 Release: 1%{?dist} # No version specified. License: GPL+ @@ -36,14 +36,8 @@ Source150: macros.dwz Source151: macros.kmp # Build policy scripts -Source200: brp-compress Source201: brp-implant-ident-static Source202: brp-java-repack-jars -Source203: brp-python-hardlink -Source204: brp-strip -Source205: brp-strip-comment-note -Source206: brp-strip-shared -Source207: brp-strip-static-archive # Dependency generator scripts (deprecated) Source300: find-provides @@ -142,8 +136,8 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog -* Sun Apr 27 2014 Ville Skyttä -- Drop bunch of macro definitions needlessly duplicated with rpm +* Sun Apr 27 2014 Ville Skyttä - 19-1 +- Drop bunch of duplicated-with-rpm macro definitions and brp-* scripts * Tue Apr 15 2014 Panu Matilainen - 18-1 - Temporarily bring back find-requires and -provides scripts to rrc-side