You are not logged in.

#1 2014-09-03 20:09:05

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

[SOLVED] Standard directory to place Mono binaries in

I'm planning to publish a PKGBUILD for a Mono program. Unlike Java, there are no package guidelines for Mono applications.

Where should I install a Mono binary? In /usr/share/mono/PROGRAMNAME/?

Last edited by Marcel- (2014-09-06 11:29:36)

Offline

#2 2014-09-03 20:22:57

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: [SOLVED] Standard directory to place Mono binaries in

Follow-up question: if I install the binary file in /usr/bin and give it mode 755, I can just start it using PROGRAMNAME, like described on the Mono wiki page. However, I have to restart systemd-binfmt. Is it okay to do this in an install file, like:

post_install() {
  systemctl restart systemd-binfmt
}

Offline

#3 2014-09-04 10:37:59

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,396

Re: [SOLVED] Standard directory to place Mono binaries in

bad idea imo.

arch wiki on java wrote:

If the program is meant to be run by the user, write a custom shell script that runs the main jar file. This script should be placed in /usr/bin.

Why don't you use that method , by having  a script execute "mono programname" ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2014-09-04 13:28:16

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: [SOLVED] Standard directory to place Mono binaries in

Ok, I think that is a better approach, but then the question in my first post remains: where should I place Mono binaries?

Offline

#5 2014-09-05 11:20:15

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,396

Re: [SOLVED] Standard directory to place Mono binaries in

Marcel-,

answering that question requires an understanding of the directory structure AL uses.
I (and many others) could do that for you, but i feel you'd learn very little that way.

Study https://wiki.archlinux.org/index.php/Ar … _standards  thoroughly .
We already stated /usr/bin is not suitable for your package , ask yourself where it would fit best.




edit

Do you live in utrecht or in maarssen ?
(I know a marcel that lives in maarssen).

Last edited by Lone_Wolf (2014-09-05 11:24:54)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2014-09-05 13:08:10

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Standard directory to place Mono binaries in

The mono package provides /usr/lib/binfmt.d/mono.conf. That makes it possible to put the binary in /usr/bin with the executable bit set. I don't see why that would be such a bad idea.

You would then need to restart systemd-binfmt once after installing the mono package before you can use this. So the only sensible place for that post_install() would be in the install script for the mono package -- you could open a bug report with this suggestion -- it should not be duplicated in every single package that uses mono.

Last edited by Raynman (2014-09-05 13:08:34)

Offline

#7 2014-09-05 18:50:27

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: [SOLVED] Standard directory to place Mono binaries in

Lone_Wolf wrote:

Study https://wiki.archlinux.org/index.php/Ar … _standards  thoroughly .
We already stated /usr/bin is not suitable for your package , ask yourself where it would fit best.

That page says nothing about Mono binaries, it has a link to the Java Package Guidelines that says one should use /usr/share/java/PROGRAMNAME as a main directory (e.g., for .jar files). Extrapolating from this tells me that Mono binaries should be installed in /usr/share/mono/PROGRAMNAME, with a shell script starting the binary in /usr/bin. Or would using /usr/share/PROGRAMNAME be a better (more general) approach?

On the other hand, that page seems a bit outdated: it says that the AUR cannot not 'read' custom variables, but currently mkaurball uses the builder's instance of Bash to create an .AURINFO file. Moreover, it states that one should build a source tarball using makepkg --source, but that is also deprecated, as the Bash interpreter has been taken away from the AUR.

Lone_Wolf wrote:

Do you live in utrecht or in maarssen ?
(I know a marcel that lives in maarssen).

In Utrecht (City), so I don't think we already know eachother. I don't know many Linux users, anyway, especially no Arch Linux users (it's not that I don't want to, it's just that my evangelizing didn't convince Linux users to switch to Arch).

Offline

#8 2014-09-05 22:38:44

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] Standard directory to place Mono binaries in

Why don't you look at the mono package, look for packages depending on mono and see how it is solved in those PKGBUILDS? Have a look at keepass, boo and log4net.

Offline

#9 2014-09-06 11:23:08

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: [SOLVED] Standard directory to place Mono binaries in

I already thought of that, but didn't know how to find packages that depend on Mono. Of course it's on the right of the screen. Stupid me.

Thanks anyway.

Offline

#10 2014-09-06 13:14:56

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,396

Re: [SOLVED] Standard directory to place Mono binaries in

Raynman wrote:

The mono package provides /usr/lib/binfmt.d/mono.conf. That makes it possible to put the binary in /usr/bin with the executable bit set. I don't see why that would be such a bad idea.
<snip>

replied here : https://bbs.archlinux.org/viewtopic.php?id=186693

@ Marcel- :
you read the wiki correctly, the solution i prefer is putting the mono binary in /usr/share/progname .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB