aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--NEWS1
-rw-r--r--TODO1
-rw-r--r--devel.attr4
-rw-r--r--devel.prov16
-rw-r--r--devel.req39
-rwxr-xr-xfind-provides.in9
-rwxr-xr-xfind-requires.in26
8 files changed, 64 insertions, 35 deletions
diff --git a/Makefile.am b/Makefile.am
index a3766a8..f95b1ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,8 @@ pkg_gconfig = \
pkg_scripts = \
brp-java-repack-jars \
+ devel.prov \
+ devel.req \
drop-ld-no-undefined-for-shared-lib-modules-in-libtool \
filter.sh \
find-lang.pl \
@@ -49,6 +51,7 @@ pkg_gscripts = \
pkg_scripts_in = $(pkg_gscripts:=.in)
pkg_attr_defs = \
+ devel.attr \
perlapi_base.attr \
perlapi.attr \
perl_base.attr
diff --git a/NEWS b/NEWS
index cb71478..e8eb6e9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- convert devel(foo) deps to internal generator
- convert "perlapi" deps to internal generator
- convert perl-base deps to internal generator
- convert PHP deps to internal generator
diff --git a/TODO b/TODO
index 93261a8..1d9fc90 100644
--- a/TODO
+++ b/TODO
@@ -9,3 +9,4 @@
- sync with FC req/prov helpers:
o switch our kmod.prov to FC one
o include firmware.prov
+- devel.req: drop unused ldd path since we use objdump since 2007
diff --git a/devel.attr b/devel.attr
new file mode 100644
index 0000000..6ab4877
--- /dev/null
+++ b/devel.attr
@@ -0,0 +1,4 @@
+# devel(foobar) provides/requires
+%__devel_requires %{_rpmconfigdir}/mageia/devel.req
+%__devel_provides %{_rpmconfigdir}/mageia/devel.prov
+%__devel_path (/usr)?/lib(|64)/[^/]+\.so$
diff --git a/devel.prov b/devel.prov
new file mode 100644
index 0000000..2598585
--- /dev/null
+++ b/devel.prov
@@ -0,0 +1,16 @@
+#/bin/sh
+# --- .so files.
+#
+filelist=
+while read instfile ; do
+ filelist="$filelist $instfile"
+done
+
+for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr)?/lib(|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do
+ objd=`objdump -p ${i} | grep SONAME`
+ [ -h ${i} -a -n "${objd}" ] && \
+ lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \
+ echo ${objd} | perl -p -e "s/.*SONAME\s+(\S+)\.so.*/devel(\1$lib64)/g"
+done | sort -u
+
+
diff --git a/devel.req b/devel.req
new file mode 100644
index 0000000..43863c4
--- /dev/null
+++ b/devel.req
@@ -0,0 +1,39 @@
+#/bin/sh
+# .so files.
+#
+filelist=
+while read instfile ; do
+ filelist="$filelist $instfile"
+done
+
+# for objdump:
+export LC_ALL=C
+
+# --- Set needed to 0 for traditional find-requires behavior.
+needed=1
+
+for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr)?/lib(|64)/[^/]+\.so$"`; do
+ objd=`objdump -p ${i} | grep SONAME`
+ lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \
+ if [ -h ${i} -a -n "${objd}" ]; then
+ if [ "$needed" -eq 0 ]; then
+ ldd ${i} \
+ | grep -v "statically linked" \
+ | grep -v "/\(lib\|lib64\)/\(ld\|ld64\|ld-linux.*\)\.so" \
+ | perl -p -e "s/\s+(\S+)\.so.*/devel(\1$lib64)/g"
+ else
+ objdump -p $i | grep -v "\(ld\|ld64\|ld-linux.*\)\.so" \
+ | awk 'BEGIN { START=0; }
+ /^$/ { START=0; }
+ /^Dynamic Section:$/ { START=1; }
+ (START==1) && /NEEDED/ {
+ sub(/^/, "devel(", $2) ;
+ sub(/\.so.*$/, "'$lib64')", $2) ;
+ print $2 ;
+ }
+ '
+ fi
+ fi
+done | egrep -v 'devel\(linux-gate|linux-vdso32|linux-vdso64|lib(c|pthread|rt)(\(64bit\))?\)' | sort -u
+
+
diff --git a/find-provides.in b/find-provides.in
index 4402573..11d3247 100755
--- a/find-provides.in
+++ b/find-provides.in
@@ -14,13 +14,4 @@ export LC_ALL=C
echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/kmod.prov | sort -u \
&& test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/kmod.prov failed' >&2 && exit 1
-#
-# --- .so files.
-for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do
- objd=`objdump -p ${i} | grep SONAME`
- [ -h ${i} -a -n "${objd}" ] && \
- lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \
- echo ${objd} | perl -p -e "s/.*SONAME\s+(\S+)\.so.*/devel(\1$lib64)/g"
-done | sort -u
-
exit 0
diff --git a/find-requires.in b/find-requires.in
index 5f3335f..d86786e 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -44,32 +44,6 @@ filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
#
-# --- .so files.
-for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr(/X11R6)?)?/lib(|64)/[^/]+\.so$"`; do
- objd=`objdump -p ${i} | grep SONAME`
- lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \
- if [ -h ${i} -a -n "${objd}" ]; then
- if [ "$needed" -eq 0 ]; then
- ldd ${i} \
- | grep -v "statically linked" \
- | grep -v "/\(lib\|lib64\)/\(ld\|ld64\|ld-linux.*\)\.so" \
- | perl -p -e "s/\s+(\S+)\.so.*/devel(\1$lib64)/g"
- else
- objdump -p $i | grep -v "\(ld\|ld64\|ld-linux.*\)\.so" \
- | awk 'BEGIN { START=0; }
- /^$/ { START=0; }
- /^Dynamic Section:$/ { START=1; }
- (START==1) && /NEEDED/ {
- sub(/^/, "devel(", $2) ;
- sub(/\.so.*$/, "'$lib64')", $2) ;
- print $2 ;
- }
- '
- fi
- fi
-done | egrep -v 'devel\(linux-gate|linux-vdso32|linux-vdso64|lib(c|pthread|rt)(\(64bit\))?\)' | sort -u
-
-#
# --- multiarch-utils
echo $filelist | tr '[:blank:]' '\n' | grep -q '/multiarch-.*-linux/' && echo multiarch-utils