From: Alexey Tourbin <at@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] rpm-build-mono configlist
Date: Sun, 5 Aug 2007 01:29:50 +0400
Message-ID: <20070804212950.GG7938@solemn.turbinal> (raw)
In-Reply-To: <20070803093425.GV7938@solemn.turbinal>
[-- Attachment #1: Type: text/plain, Size: 2260 bytes --]
On Fri, Aug 03, 2007 at 01:34:25PM +0400, Alexey Tourbin wrote:
> Господа, вот этот кусок кода я не понял и собираюсь его убить.
> По-моему, он просто не работает, а добавлять 2>/dev/null дело не хитрое.
Я разобрался, для чего нужны *.dll.config файлы, и реализовал поиск
soname-зависимостей в *.dll байткоде mono. Это, в частности, означает,
что теперь mono пакеты, как правило, не могут быть noarch.
Если кто-то разбирается в том, как работает mono на уровне загрузки
разделяемых библиотек, прошу посмотреть нижеследующее и высказаться.
commit 5c616477a2f2fe314d7e684c0e1b75bb85b8f227
Author: Alexey Tourbin <at@altlinux>
Date: Sun Aug 5 00:40:15 2007 +0400
mono.req: implemented MonoLibReq() to grab sonames from *.dll.config files
The idea is that, since Mono bytecode must be portable, it cannot contain
soname references, only "module references". Module to soname mapping is
done with system-dependent *.dll.config xml file.
I grab module references from dll and try to resolve them into sonames.
See also
http://www.mail-archive.com/pld-devel-en@lists.pld-linux.org/msg03358.html
diff --git a/mono.req b/mono.req
index 1d8e911..eff48d4 100755
--- a/mono.req
+++ b/mono.req
@@ -27,6 +27,32 @@ Monodis()
fi
}
+MonoLibReq()
+{
+ local f="$1" out=; shift
+ out=$(Monodis --moduleref "$f")
+ local refs=
+ refs=$(echo "$out" |sed -n 's/^[1-9][0-9]*: *//p')
+
+ [ -n "${RPM_LIB-}" ] || RPM_LIB=`rpm --eval %_lib`
+ local suffix; [ "$RPM_LIB" = lib64 ] && suffix='()(64bit)' || suffix=
+
+ local ref
+ for ref in $refs; do
+ local target="$(fgrep "dll=\"$ref\"" "$f".config 2>/dev/null |
+ sed -n 's/.*target="\(lib[^"]*[.]so[.][^"]*\)".*/\1/p' |head -1)"
+ if [ -n "$target" ]; then
+ Verbose "$f: $ref -> $target"
+ echo "$target$suffix"
+ elif [ -z "${ref##lib*.so.*}" ]; then
+ Verbose "$f: $ref = $ref"
+ echo "$ref$suffix"
+ else
+ Info "$f: cannot resolve module reference $ref"
+ fi
+ done
+}
+
MonoReq()
{
local f="$1" out=; shift
@@ -50,6 +76,9 @@ MonoReq()
print "mono(" LIBNAME ") " OP " " VERSION
START=0
}'
+ if [ -f "$f".config ]; then
+ MonoLibReq "$f"
+ fi
}
MonoProv()
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-08-04 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 9:34 Alexey Tourbin
2007-08-04 21:29 ` Alexey Tourbin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070804212950.GG7938@solemn.turbinal \
--to=at@altlinux.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git