Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19617 - FEATURE: Run mono binaries using the "misc binaries" feature of Linux
Summary: FEATURE: Run mono binaries using the "misc binaries" feature of Linux
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: foser (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-19 12:23 UTC by Per Wigren
Modified: 2003-05-14 08:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/init.d/mono (mono,589 bytes, text/plain)
2003-04-19 12:23 UTC, Per Wigren
Details
/etc/conf.d/dotnet (conf.d_dotnet,404 bytes, text/plain)
2003-05-10 11:17 UTC, Rainer Größlinger (RETIRED)
Details
/etc/init.d/dotnet (init.d_dotnet,1.04 KB, text/plain)
2003-05-10 11:18 UTC, Rainer Größlinger (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Per Wigren 2003-04-19 12:23:19 UTC
Here is an init-script for mono that will register .NET-binaries with
/usr/bin/mono so you can remove that ugly .exe-extension from the binaries and
install them in /usr/bin just like native programs, instead of running them with
"mono program.exe".
Comment 1 Per Wigren 2003-04-19 12:23:59 UTC
Created attachment 10875 [details]
/etc/init.d/mono
Comment 2 Rainer Größlinger (RETIRED) gentoo-dev 2003-04-29 06:38:29 UTC
reassigned to foser
Comment 3 foser (RETIRED) gentoo-dev 2003-04-30 07:20:46 UTC
it looks good to me. A few questions.

Can you explain exactly how it works, especially the syntax of the echo line used. I suppose MZ is the indentifier for .NET binaries used. Is that tight enough ?

Is it possible to unregister the .NET handler ? in essence, is it possible to implement a stop function ?

Thirdly i would like this script run from a conf.d setting where we can select which runtime to use, so we can (currently) use it for both mono and dotgnu.
Comment 4 Per Wigren 2003-05-01 07:48:21 UTC
If you compiled "MISC binaries" in your kernel you get an empty directory 
/proc/sys/fs/binfmt_misc on which a binfmt_misc filesystem has to be mounted. Then 
you can register handles through the proc-interface. I don't know how to unregister 
though.. 
 
Some info on how binfmt_misc works can be found here: 
http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html 
 
The echo-line I just took from this page: 
http://www.gotmono.com/docs/installation/linux.html#kernel_support 
Comment 5 Rainer Größlinger (RETIRED) gentoo-dev 2003-05-10 11:16:39 UTC
I played around with that script and added the possibility to choose what interpreter to use and added a stop() function.

I think those two files should be added to the mono and pnet ebuild (without a default setting for the runtime so that it doesn't harm anything if you merge both etc. ?).

Comments ? ;)
Comment 6 Rainer Größlinger (RETIRED) gentoo-dev 2003-05-10 11:17:30 UTC
Created attachment 11760 [details]
/etc/conf.d/dotnet
Comment 7 Rainer Größlinger (RETIRED) gentoo-dev 2003-05-10 11:18:00 UTC
Created attachment 11761 [details]
/etc/init.d/dotnet
Comment 8 Rainer Größlinger (RETIRED) gentoo-dev 2003-05-12 13:05:03 UTC
I added the script with some minor enhancements to
pnet-0.5.6-r2,
mono-0.23-r1 (stable) and mono-0.24-r1 (~)
Comment 9 Rainer Größlinger (RETIRED) gentoo-dev 2003-05-14 08:30:21 UTC
resolved / fixed
seems to be fine with everybody :)
Comment 10 foser (RETIRED) gentoo-dev 2003-05-14 08:38:28 UTC
thnx scandium for the good work