autodeps/linux.prov.in
This commit is contained in:
parent
f23e5939c6
commit
e398f2cbd4
@ -29,6 +29,9 @@ if [ -z "$(echo "$RPM_BUILD_ROOT" |tr -d ' /.')" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Normalize buildroot.
|
||||||
|
RPM_BUILD_ROOT=$(readlink -fv "$RPM_BUILD_ROOT") || exit 1
|
||||||
|
|
||||||
FIND_LIBS=
|
FIND_LIBS=
|
||||||
FIND_PAM=
|
FIND_PAM=
|
||||||
FIND_PERL=
|
FIND_PERL=
|
||||||
@ -157,10 +160,12 @@ FindLibProvs()
|
|||||||
{
|
{
|
||||||
[ -n "$FIND_LIBS" ] || return 0
|
[ -n "$FIND_LIBS" ] || return 0
|
||||||
|
|
||||||
local f dir found d
|
local f dir name found d
|
||||||
f="$1"
|
f="$1"
|
||||||
dir="${fname%/*}"
|
dir="${fname%/*}"
|
||||||
[ -n "$dir" ] || return 0
|
[ -n "$dir" ] || return 0
|
||||||
|
name="${fname##*/}"
|
||||||
|
[ -n "$name" ] || return 0
|
||||||
|
|
||||||
found=
|
found=
|
||||||
for d in $(echo "$RPM_FINDPROV_LIB_PATH" |tr : ' '); do
|
for d in $(echo "$RPM_FINDPROV_LIB_PATH" |tr : ' '); do
|
||||||
@ -174,20 +179,35 @@ FindLibProvs()
|
|||||||
local soname
|
local soname
|
||||||
soname="$(echo -E "$d" |awk '/SONAME/ {print $2}')" || return 1
|
soname="$(echo -E "$d" |awk '/SONAME/ {print $2}')" || return 1
|
||||||
if [ -n "$soname" ]; then
|
if [ -n "$soname" ]; then
|
||||||
if [ ! -L "$f" ]; then
|
while :; do
|
||||||
# name
|
# For libraries with soname, ignore all but files named as soname.
|
||||||
|
[ "$soname" = "$name" ] || break
|
||||||
|
|
||||||
|
# Treat symlinks specially.
|
||||||
|
if [ -L "$f" ]; then
|
||||||
|
local real realpath
|
||||||
|
realpath=$(readlink -fv "$f") || break
|
||||||
|
real="${realpath#$RPM_BUILD_ROOT}"
|
||||||
|
# Ignore symlinks leading out of buildroot.
|
||||||
|
[ "$real" != "$realpath" ] || break
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Output soname.
|
||||||
echo "$soname"
|
echo "$soname"
|
||||||
|
|
||||||
# version definitions
|
# Output version definitions.
|
||||||
echo -E "$d" | awk "-vsoname=$soname" '
|
echo -E "$d" | awk "-vsoname=$soname" '
|
||||||
BEGIN {START=0;}
|
BEGIN {START=0;}
|
||||||
/^Version definitions:$/ {START=1;}
|
/^Version definitions:$/ {START=1;}
|
||||||
/^[0-9]/ && (START==1) && ($4!="") && ($4!=soname) {printf("%s(%s)\n",soname,$4);}
|
/^[0-9]/ && (START==1) && ($4!="") && ($4!=soname) {printf("%s(%s)\n",soname,$4);}
|
||||||
/^$/ { START=0; }
|
/^$/ { START=0; }
|
||||||
' || return 1
|
' || return 1
|
||||||
fi
|
|
||||||
|
break
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "${f##*/}"
|
# Ignore symlinks for libraries without soname.
|
||||||
|
[ -L "$f" ] || echo "${f##*/}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -209,9 +229,11 @@ while IFS= read -r f; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
# Find out file type (dereference symlinks).
|
||||||
if t="$(file -bL "$f")"; then
|
if t="$(file -bL "$f")"; then
|
||||||
if [ -z "${t##* text*}" ]; then
|
if [ -z "${t##* text*}" ]; then
|
||||||
ListScriptProvs "$f" "$t"
|
# Ignore symlinks for scripts.
|
||||||
|
[ -L "$f" ] || ListScriptProvs "$f" "$t"
|
||||||
elif [ -z "${t##* shared object*}" ]; then
|
elif [ -z "${t##* shared object*}" ]; then
|
||||||
r="$(FindLibProvs "$f")"
|
r="$(FindLibProvs "$f")"
|
||||||
[ -z "$FOUND_PROVS" ] && FOUND_PROVS="$r" || FOUND_PROVS="$FOUND_PROVS
|
[ -z "$FOUND_PROVS" ] && FOUND_PROVS="$r" || FOUND_PROVS="$FOUND_PROVS
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: %rpm_name
|
Name: %rpm_name
|
||||||
Version: %rpm_version
|
Version: %rpm_version
|
||||||
Release: alt19
|
Release: alt20
|
||||||
|
|
||||||
%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')
|
||||||
@ -472,6 +472,10 @@ fi
|
|||||||
%endif #with contrib
|
%endif #with contrib
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 26 2003 Dmitry V. Levin <ldv@altlinux.org> 4.0.4-alt20
|
||||||
|
- pam.req: implemented include control directive support.
|
||||||
|
- brp-cleanup: PAM configuration policy enforcement.
|
||||||
|
|
||||||
* Fri May 09 2003 Dmitry V. Levin <ldv@altlinux.org> 4.0.4-alt19
|
* Fri May 09 2003 Dmitry V. Levin <ldv@altlinux.org> 4.0.4-alt19
|
||||||
- Reduced amount of rpm subpackage dependencies.
|
- Reduced amount of rpm subpackage dependencies.
|
||||||
- Moved update-alternatives to separate package.
|
- Moved update-alternatives to separate package.
|
||||||
|
Loading…
Reference in New Issue
Block a user