brp-fix-perms, fixup-libraries: strip executable bit from non-executable libraries
This commit is contained in:
parent
5ed5b722f5
commit
fb3b612bb9
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: %rpm_name
|
Name: %rpm_name
|
||||||
Version: %rpm_version
|
Version: %rpm_version
|
||||||
Release: alt27.4
|
Release: alt27.5
|
||||||
|
|
||||||
%define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
|
%define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
|
||||||
%define get_dep() %(rpm -q --qf '%%{NAME} >= %%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null || echo '%1 >= unknown')
|
%define get_dep() %(rpm -q --qf '%%{NAME} >= %%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null || echo '%1 >= unknown')
|
||||||
@ -474,7 +474,7 @@ fi
|
|||||||
%endif #with contrib
|
%endif #with contrib
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 24 2003 Dmitry V. Levin <ldv@altlinux.org> 4.0.4-alt27.4
|
* Mon Nov 24 2003 Dmitry V. Levin <ldv@altlinux.org> 4.0.4-alt27.5
|
||||||
- brp-verify_elf:
|
- brp-verify_elf:
|
||||||
"%%set_verify_elf_method relaxed" now affects textrel as well as rpath.
|
"%%set_verify_elf_method relaxed" now affects textrel as well as rpath.
|
||||||
- verify-elf:
|
- verify-elf:
|
||||||
@ -484,6 +484,7 @@ fi
|
|||||||
- Fixed Makefiles to correct librpm*-4.0.4.so dependencies.
|
- Fixed Makefiles to correct librpm*-4.0.4.so dependencies.
|
||||||
- Do not package .la files.
|
- Do not package .la files.
|
||||||
- brp-cleanup: remove lib*.la files from /lib, /usr/lib, and /usr/X11R6/lib.
|
- brp-cleanup: remove lib*.la files from /lib, /usr/lib, and /usr/X11R6/lib.
|
||||||
|
- brp-fix-perms, fixup-libraries: strip executable bit from non-executable libraries.
|
||||||
- rpmbuild --rebuild/--recompile: implemented support for new macros:
|
- rpmbuild --rebuild/--recompile: implemented support for new macros:
|
||||||
%%_rpmbuild_clean and %%_rpmbuild_packagesource.
|
%%_rpmbuild_clean and %%_rpmbuild_packagesource.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ EXTRA_DIST = \
|
|||||||
compress_files check-files convertrpmrc.sh cross-build \
|
compress_files check-files convertrpmrc.sh cross-build \
|
||||||
delayed_rebuilddb find-lang find-package find-prov.pl find-req.pl \
|
delayed_rebuilddb find-lang find-package find-prov.pl find-req.pl \
|
||||||
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
||||||
fixup-binconfig fixup-pkgconfig fixup-libtool \
|
fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
|
||||||
get_magic.pl getpo.sh http.req \
|
get_magic.pl getpo.sh http.req \
|
||||||
functions files.req.list \
|
functions files.req.list \
|
||||||
magic.prov magic.req pam.prov pam.req perl.prov perl.req rpmdiff rpmdiff.cgi \
|
magic.prov magic.req pam.prov pam.req perl.prov perl.req rpmdiff rpmdiff.cgi \
|
||||||
@ -27,7 +27,7 @@ config_SCRIPTS = \
|
|||||||
compress_files check-files convertrpmrc.sh cross-build \
|
compress_files check-files convertrpmrc.sh cross-build \
|
||||||
delayed_rebuilddb find-lang find-package find-prov.pl find-req.pl \
|
delayed_rebuilddb find-lang find-package find-prov.pl find-req.pl \
|
||||||
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
||||||
fixup-binconfig fixup-pkgconfig fixup-libtool \
|
fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
|
||||||
get_magic.pl getpo.sh http.req \
|
get_magic.pl getpo.sh http.req \
|
||||||
functions files.req.list \
|
functions files.req.list \
|
||||||
magic.prov magic.req pam.prov pam.req perl.prov perl.req rpmdiff rpmdiff.cgi \
|
magic.prov magic.req pam.prov pam.req perl.prov perl.req rpmdiff rpmdiff.cgi \
|
||||||
|
@ -39,3 +39,6 @@ done
|
|||||||
# Following files should not be group/world readable.
|
# Following files should not be group/world readable.
|
||||||
find -type f \( -perm -4100 -o -perm -2100 \) -print0 |
|
find -type f \( -perm -4100 -o -perm -2100 \) -print0 |
|
||||||
xargs -r0 chmod -R go-rw --
|
xargs -r0 chmod -R go-rw --
|
||||||
|
|
||||||
|
find -type f -perm +0111 -print0 |
|
||||||
|
xargs -r0 @RPMCONFIGDIR@/fixup-libraries
|
||||||
|
41
scripts/fixup-libraries
Executable file
41
scripts/fixup-libraries
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# fixup-shared - fix permissions of libraries.
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
# Copyright (C) 2003 Dmitry V. Levin <ldv@altlinux.org>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
for file in "$@"; do
|
||||||
|
type=`file -b "$file"` || continue
|
||||||
|
case "$type" in
|
||||||
|
current\ ar\ archive)
|
||||||
|
chmod -v a-x "$file"
|
||||||
|
;;
|
||||||
|
ELF\ *\ shared\ object,\ *)
|
||||||
|
file_header="$(readelf -h "$file")" || continue
|
||||||
|
entry=`printf %s "$file_header" |sed -ne 's/^ \+Entry point address: \+0x0*\([0-9a-f]\+\)$/\1/p'`
|
||||||
|
[ -n "$entry" ] || continue
|
||||||
|
|
||||||
|
section_header="$(readelf -S "$file")" || continue
|
||||||
|
text=`printf %s "$section_header" |sed -ne 's/^ *\[ *[0-9]\+\] \.text \+PROGBITS \+0*\([0-9a-f]\+\) \+.*/\1/p'`
|
||||||
|
[ -n "$text" ] || continue
|
||||||
|
|
||||||
|
[ "$entry" != "$text" ] || chmod -v a-x "$file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user