Re: rpm and mono
On Jul 15, 2007, at 2:58 PM, Jakub Bogusz wrote: > > Here is some ugly update to mono-find-requires script (from mono > package), which tries to generate soname deps. Poke a final mono patch onto <[EMAIL PROTECTED]> (or send to arekm ;-) please. 73 de Jeff ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Sun, Jul 15, 2007 at 01:08:51PM -0400, Jeff Johnson wrote: [...] > >>> Actually: > >>> 1. We can safely generate (arch-dependent) soname dependencies for > >>> arch-dependent dotnet* packages (those with glue ELF libraries, like > >>> gtk-sharp, or gnome-sharp, which started this discussion). > >>> mono-find-requires script can detect mono version basing on monodis > >>> (or libmono.so) ELF type. > >>> > >>> 2. if we decide to generate soname dependencies for some noarch > >>> dotnet* package, it won't by noarch any longer. > >>> > >> > >> If there are soname dependencies, the package is not "noarch", is it? > > > > In case of mono/dotnet assemblies (*.dll) without native glue code > > library sonames are specified in text/xml file (*.dll.config), and > > libraries themselves are dlopened by mono - so assembly packages don't > > contain anything arch-dependent. Or even sonames can be hardcoded directly in *.dll, still dlopened by mono. Here is some ugly update to mono-find-requires script (from mono package), which tries to generate soname deps. But: 1. not all entries from `monodis --moduleref` are always required, see: $ monodis --moduleref /usr/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ModuleRef Table (1..21) 1: librsvg-2.so.2 2: libgdk_pixbuf-2.0.so.0 3: libglib-2.0.so.0 4: libgdk-x11-2.0.so.0 5: libgobject-2.0.so.0 6: libgnomeui-2.so.0 7: libgtk-x11-2.0.so.0 8: user32 9: gdi32 10: libgdk-x11-2.0.so 11: libgtk-x11-2.0.so 12: ole32.dll 13: shell32.dll 14: libX11 15: /System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon 16: kernel32.dll 17: user32.dll 18: gdi32.dll 19: winmm.dll 20: uxtheme 21: X11 I suppose libgnomeui is only optional, Carbon.framework used on OSX only etc. 2. sometimes .dll refers to soname directly, sometimes without ".so" suffix... (when module doesn't refer to dll entry in config file) 3. not all dll .config entries end with ".dll", so this is messy; and I don't know what "i:" prefix means. Global file (/etc/mono/config) looks like this: And per-dll config files: $ cat /usr/lib/mono/gac/gtk-sharp/2.10.0.0__35e10195dab3c99f/gtk-sharp.dll.config -- Jakub Boguszhttp://qboosh.pl/ --- /usr/lib/rpm/mono-find-requires 2007-05-16 19:17:33.0 +0200 +++ /home/qboosh/mono-find-requires 2007-07-15 20:46:36.387271119 +0200 @@ -57,6 +57,35 @@ done ) +if file $bindir/monodis 2>/dev/null | grep 64-bit ; then + ELFTYPE="()(64bit)" +else + ELFTYPE= +fi +SOREQUIRES=$( + for i in "[EMAIL PROTECTED]"; do + DLLCONF= + if [ -f ${i}.config ]; then + DLLCONF="${i}.config" + fi + for r in `($bindir/monodis --moduleref $i | awk ' + /^[0-9]+: / { print $2 }' ) 2>/dev/null` ; do + if echo "$r" | grep 'lib.*\.so\.' ; then + echo "$r" + else + r=$(echo "$r" | sed -e 's,[./],\\&,g') + awk " + /___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Jul 15, 2007, at 1:11 PM, Radoslaw Zielinski wrote: > Jeff Johnson <[EMAIL PROTECTED]> [15-07-2007 18:53]: [...] [...] > [...] >> and whether rpmbuild invokes external helpers per-file or per-package >> that are intimately tied to > [...] > > Would be nice if RPM could invoke perl.prov / perl.req per-package, > instead of per-file, as it currently does. > Can't be done without a massively complicated scripting effort changing all external dependency helpers used by rpmbuild. Well, it *could* be handled by massively rewriting rpmfc.c, but there as yet no reason to undertake the added complexity. See the functionality at rpm -qp --filerequire foo*.rpm The constraints on the storage in Headers are quite annoying because rpm does not vave a variable length array data type. Dependencies and file lists are also sorted within headers. I thought about doing throug scripts, but decided on "reliable" C instead. ;-) 73 de Jeff > -- > Radosław Zieliński <[EMAIL PROTECTED]> > ___ > pld-devel-en mailing list > pld-devel-en@lists.pld-linux.org > http://lists.pld-linux.org/mailman/listinfo/pld-devel-en ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
Jeff Johnson <[EMAIL PROTECTED]> [15-07-2007 18:53]: [...] [...] [...] > and whether rpmbuild invokes external helpers per-file or per-package > that are intimately tied to [...] Would be nice if RPM could invoke perl.prov / perl.req per-package, instead of per-file, as it currently does. -- Radosław Zieliński <[EMAIL PROTECTED]> pgpMny5yVCTHN.pgp Description: PGP signature ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Jul 15, 2007, at 12:59 PM, Jakub Bogusz wrote: >> >> Well, I'll remove the mono scripts (added 2 days ago) from rpm >> sources. ;-) > > Oops, I didn't know that :) > ;-) Actually external per-interpreter rpm helpers is preferred, PLD just got there first, as always ;-) >>> Actually: >>> 1. We can safely generate (arch-dependent) soname dependencies for >>> arch-dependent dotnet* packages (those with glue ELF libraries, like >>> gtk-sharp, or gnome-sharp, which started this discussion). >>> mono-find-requires script can detect mono version basing on monodis >>> (or libmono.so) ELF type. >>> >>> 2. if we decide to generate soname dependencies for some noarch >>> dotnet* package, it won't by noarch any longer. >>> >> >> If there are soname dependencies, the package is not "noarch", is it? > > In case of mono/dotnet assemblies (*.dll) without native glue code > library sonames are specified in text/xml file (*.dll.config), and > libraries themselves are dlopened by mono - so assembly packages don't > contain anything arch-dependent. Oops, I dinna know that. Lots I don't know about mono, I've never knowingly needed or used. Ah, so two-level linkage through some dlopen() mechanism to maintain a "noarch" fiction. The offer to send a patch if you send me a test case remains. It sounds like the dependencies can be handled externally to rpm, the "soname" is what I reacted to. Note that the mono-helpers are invoked per-file, necessary iff the traditional model is continued: cat monofileslist | mono-helper > monodepslist 73 de Jeff ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Sun, Jul 15, 2007 at 12:53:17PM -0400, Jeff Johnson wrote: > On Jul 15, 2007, at 12:39 PM, Jakub Bogusz wrote: > > On Sun, Jul 15, 2007 at 11:24:19AM -0400, Jeff Johnson wrote: > >> On Jul 15, 2007, at 7:45 AM, Jakub Bogusz wrote: > >>> On Sun, Jul 15, 2007 at 10:44:59AM +0200, Łukasz Jernaś wrote: > Hello. > > I just want to drop a note here that current mono-find-requires > doesn't find > libraries p-invoked from mono assemblies. They can be partially > get from > monodis --moduleref but some sort of mechanism for > pulling the > complete soname would be needed, because just the name of the lib > is included > in the output from the previous command. Any hints? > >>> > >>> We can read ${dllname}.config and determine dll->soname aliases. > >>> But there is a problem with translating sonames to rpm Requires - > >>> they > >>> are arch-dependent (because of "()(64-bit)" suffix on most 64-bit > >>> systems with 64-bit mono). > >>> > >> > >> If you send me a test case, I'll get you a patch to rpm. > > > > Well, it's not (directly) rpm problem. > > It is an rpm problem: find-provides and find-requires for ELF > dependencies > are being phased out. There is rpm functionality with attaching > dependencies to files, classifying files using libmagic, determining > sonames at install, not build, time, and whether rpmbuild invokes > external > helpers per-file or per-package that are intimately tied to how mono > soname > dependencies are implemented (if at all). > > > And mono dependency generators are part of mono, not rpm. > > > > Well, I'll remove the mono scripts (added 2 days ago) from rpm > sources. ;-) Oops, I didn't know that :) > > Actually: > > 1. We can safely generate (arch-dependent) soname dependencies for > > arch-dependent dotnet* packages (those with glue ELF libraries, like > > gtk-sharp, or gnome-sharp, which started this discussion). > > mono-find-requires script can detect mono version basing on monodis > > (or libmono.so) ELF type. > > > > 2. if we decide to generate soname dependencies for some noarch > > dotnet* package, it won't by noarch any longer. > > > > If there are soname dependencies, the package is not "noarch", is it? In case of mono/dotnet assemblies (*.dll) without native glue code library sonames are specified in text/xml file (*.dll.config), and libraries themselves are dlopened by mono - so assembly packages don't contain anything arch-dependent. -- Jakub Boguszhttp://qboosh.pl/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Jul 15, 2007, at 12:39 PM, Jakub Bogusz wrote: > On Sun, Jul 15, 2007 at 11:24:19AM -0400, Jeff Johnson wrote: >> On Jul 15, 2007, at 7:45 AM, Jakub Bogusz wrote: >>> On Sun, Jul 15, 2007 at 10:44:59AM +0200, Łukasz Jernaś wrote: Hello. I just want to drop a note here that current mono-find-requires doesn't find libraries p-invoked from mono assemblies. They can be partially get from monodis --moduleref but some sort of mechanism for pulling the complete soname would be needed, because just the name of the lib is included in the output from the previous command. Any hints? >>> >>> We can read ${dllname}.config and determine dll->soname aliases. >>> But there is a problem with translating sonames to rpm Requires - >>> they >>> are arch-dependent (because of "()(64-bit)" suffix on most 64-bit >>> systems with 64-bit mono). >>> >> >> If you send me a test case, I'll get you a patch to rpm. > > Well, it's not (directly) rpm problem. It is an rpm problem: find-provides and find-requires for ELF dependencies are being phased out. There is rpm functionality with attaching dependencies to files, classifying files using libmagic, determining sonames at install, not build, time, and whether rpmbuild invokes external helpers per-file or per-package that are intimately tied to how mono soname dependencies are implemented (if at all). > And mono dependency generators are part of mono, not rpm. > Well, I'll remove the mono scripts (added 2 days ago) from rpm sources. ;-) > Actually: > 1. We can safely generate (arch-dependent) soname dependencies for > arch-dependent dotnet* packages (those with glue ELF libraries, like > gtk-sharp, or gnome-sharp, which started this discussion). > mono-find-requires script can detect mono version basing on monodis > (or libmono.so) ELF type. > > 2. if we decide to generate soname dependencies for some noarch > dotnet* package, it won't by noarch any longer. > If there are soname dependencies, the package is not "noarch", is it? 73 de Jeff ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Sun, Jul 15, 2007 at 11:24:19AM -0400, Jeff Johnson wrote: > On Jul 15, 2007, at 7:45 AM, Jakub Bogusz wrote: > > On Sun, Jul 15, 2007 at 10:44:59AM +0200, Łukasz Jernaś wrote: > >> Hello. > >> > >> I just want to drop a note here that current mono-find-requires > >> doesn't find > >> libraries p-invoked from mono assemblies. They can be partially > >> get from > >> monodis --moduleref but some sort of mechanism for > >> pulling the > >> complete soname would be needed, because just the name of the lib > >> is included > >> in the output from the previous command. Any hints? > > > > We can read ${dllname}.config and determine dll->soname aliases. > > But there is a problem with translating sonames to rpm Requires - they > > are arch-dependent (because of "()(64-bit)" suffix on most 64-bit > > systems with 64-bit mono). > > > > If you send me a test case, I'll get you a patch to rpm. Well, it's not (directly) rpm problem. And mono dependency generators are part of mono, not rpm. Actually: 1. We can safely generate (arch-dependent) soname dependencies for arch-dependent dotnet* packages (those with glue ELF libraries, like gtk-sharp, or gnome-sharp, which started this discussion). mono-find-requires script can detect mono version basing on monodis (or libmono.so) ELF type. 2. if we decide to generate soname dependencies for some noarch dotnet* package, it won't by noarch any longer. -- Jakub Boguszhttp://qboosh.pl/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Jul 15, 2007, at 7:45 AM, Jakub Bogusz wrote: > On Sun, Jul 15, 2007 at 10:44:59AM +0200, Łukasz Jernaś wrote: >> Hello. >> >> I just want to drop a note here that current mono-find-requires >> doesn't find >> libraries p-invoked from mono assemblies. They can be partially >> get from >> monodis --moduleref but some sort of mechanism for >> pulling the >> complete soname would be needed, because just the name of the lib >> is included >> in the output from the previous command. Any hints? > > We can read ${dllname}.config and determine dll->soname aliases. > But there is a problem with translating sonames to rpm Requires - they > are arch-dependent (because of "()(64-bit)" suffix on most 64-bit > systems with 64-bit mono). > If you send me a test case, I'll get you a patch to rpm. 73 de Jeff ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Sun, Jul 15, 2007 at 10:44:59AM +0200, Łukasz Jernaś wrote: > I just want to drop a note here that current mono-find-requires doesn't find > libraries p-invoked from mono assemblies. They can be partially get from > monodis --moduleref but some sort of mechanism for pulling the > complete soname would be needed, because just the name of the lib is included > in the output from the previous command. Any hints? In proper cross platform apps p-invokes should use windows dlls and unix libraries should be specified in dllmap. What about that? wolf -- Bartek . Taudul : .: w o l f @ p l d - l i n u x . o r g.:. http://wolf.valkyrie.one.pl/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: rpm and mono
On Sun, Jul 15, 2007 at 10:44:59AM +0200, Łukasz Jernaś wrote: > Hello. > > I just want to drop a note here that current mono-find-requires doesn't find > libraries p-invoked from mono assemblies. They can be partially get from > monodis --moduleref but some sort of mechanism for pulling the > complete soname would be needed, because just the name of the lib is included > in the output from the previous command. Any hints? We can read ${dllname}.config and determine dll->soname aliases. But there is a problem with translating sonames to rpm Requires - they are arch-dependent (because of "()(64-bit)" suffix on most 64-bit systems with 64-bit mono). -- Jakub Boguszhttp://qboosh.pl/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en