Proposal : Installing linuxcnc in /opt/ directory

More
17 Mar 2021 07:24 #202566 by Grotius
Hi,

Currently working on a debian 11 distro.
Linuxcnc compiled without many problems.

My proposal is to pre-install linuxcnc in the /opt/ directory of the distro with a .deb package.

Normally when the linuxcnc .deb packages are installed on the system, the linuxcnc files are spread around over the system
directory's. For new linuxcnc users this might be very confusing if they are looking for a file.

And they might get a feeling like searching for a needle in a haystack.

What would be the downside of installing a program in the /opt/ directory ?

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 01:02 #202690 by 85422776
thank you a lot
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 02:07 #202703 by andypugh
I think that the files are put in the "usual" Debian locations.

Looking at my own machine, the only package that has put itself in /opt is Google Chrome.

I don't think it is a bad idea, but I do see it being quite a bit or work for a benefit of dubious magnitude.
Would docs and manpages go in opt? would man find them there?
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 08:03 #202713 by Grotius
Hi,

Following en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard linuxcnc should be in the /opt/ folder.
When i read acros several fora, the advise is to store program's into the /opt/ folder.

Most of the linux program's don't follow this rule, and i think window's does it correctly with the "program files" folder.

The linuxcnc top folder of the deb package is then unpacked in : /opt/linuxcnc
The rest of the linuxcnc files are in /opt/linuxcnc/ ..
The sub-hierarchy of the linuxcnc file system can stay the same to avoid useless work.

I already made and installed a .deb package this way. It goes well.

If you look at the current linuxcnc/debian directory, this is at the moment a cruel place to look.
I think 3 files over there is enough to build a package.

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 09:02 #202715 by andypugh

Hi,

Following en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard linuxcnc should be in the /opt/ folder.
When i read acros several fora, the advise is to store program's into the /opt/ folder.


I think that this proposal belongs on the developers mailing list. Are you subscribed?
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 09:15 #202717 by arvidb
As I understand it /opt is for packages that

1) Does not otherwise conform to the File Hierarchy Standard
and
2) Is not managed by the distro package management system (e.g. apt).

Manually built packages that otherwise follow the FHS, but that doesn't use the distribution's package managing system, should be installed under /usr/local (typically these kinds of packages are installed using 'make install').

Packages that are part of the distro, i.e. that's installed and managed with 'apt' on debian systems, should use the standard directories (/usr).

In my view, /opt is more for packages that are delivered as proprietary blobs. E.g. development environments that's been ported from Windows to Linux and thus doesn't conform at all to the Linux ecosystem.

---

I'm not sure I understand the problem described in the original post. Can you give a specific example of a situation when a file is difficult to find for a new user, and would be more easily found if installed under /opt?
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 18:13 - 18 Mar 2021 18:26 #202751 by Grotius
Would docs and manpages go in opt? would man find them there?
Yes, they can be there, with a launcher into the system menu as it is already.


I think that this proposal belongs on the developers mailing list. Are you subscribed?

No not subscribed.
But i will take care of the code. Will make a tiny script to get it that way.

1) Does not otherwise conform to the File Hierarchy Standard
/etc is referred to as the etcetera directory,[4] as this directory historically held everything that did not belong elsewhere

2) Is not managed by the distro package management system (e.g. apt).
I think that is not really the case. The /opt/ folder is as all system folders involved for apt.

In my view, /opt is more for packages that are delivered as proprietary blobs. E.g. development environments that's been ported from Windows to Linux and thus doesn't conform at all to the Linux ecosystem.

Yes, ported windows program's are in a good place at /opt/

Can you give a specific example of a situation when a file is difficult to find for a new user, and would be more easily found if installed under /opt?
Linuxcnc is spread around in 15 folders over your filesystem. If you are a developper, it's a different story, then you already work
from one dir. It is almost impossible to work with pleasure with a program that is spread around over 15 system folders. And after a stepconfig wizzard, you get more folders for free in your home dir.

In linux you are free to add system folders. But my proposal is to let linuxcnc join the /opt/ folder.
On sourceforce i provided 2 other linux programs.
One of them works with a python coded youtube-dl, that is stored in the bin folder between
all imporant system bash scripts. I think that's not really clever.
In /opt/ making a export path to the /bin/ is oke for me. It results in a cleaner software environment.

I am in the mood for a positive feedback and conversation. Just escaped from a system bug in the live-build software.
Ahh men, these bash scripts are cruel freubalized fragments of code.
Last edit: 18 Mar 2021 18:26 by Grotius.

Please Log in or Create an account to join the conversation.

More
18 Mar 2021 20:02 - 18 Mar 2021 20:06 #202758 by arvidb
Yep, bash scripts are... not pleasant! I have spent a fair share of time with them as well and I feel your pain!

I'm sorry I cannot give positive feedback to your proposal, but conversation we can have! :)

I realise that the File Hierarchy Standard can seem weird, especially if you come from a Windows environment, but looking deeper it's actually quite clever: Looking for a binary? Then look under /usr/bin! Looking for some architecture-independent data file, like a man page or font file? Then look under /usr/share ("share" since these files are shared between different cpu architectures). Looking for a configuration file? Then look under /etc ("etc" for, as you said, etcetera - this was apparently named before device files were split to /dev, variable files to /var and so on, and the name stuck, perhaps unfortunate).

It seems to me that it is easier to look in a standardized place for a file, rather than having to learn a completely custom folder tree for each and every application?

The one thing that I find weird about linuxcnc's install paths is the config files located in ~/linuxcnc! Typically these would be under /etc/linuxcnc/, or possibly, if linuxcnc ran as its own user, under /home/linuxcnc/configs/ or something like that.

BTW, looking at the FHS standard , even packages installed under /opt are supposed to have their configuration files under /etc/opt/. And I guess kernel modules would have to be installed under /lib/modules/?

One of them works with a python coded youtube-dl, that is stored in the bin folder between
all imporant system bash scripts. I think that's not really clever.

This should probably be installed into /usr/local/bin/? Or possibly /usr/bin/ (" Most user commands "), if installed using the package manager. It most likely should not go into /bin/ (" Essential user command binaries ").
Last edit: 18 Mar 2021 20:06 by arvidb. Reason: Spelling
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
19 Mar 2021 01:08 #202798 by andypugh

The one thing that I find weird about linuxcnc's install paths is the config files located in ~/linuxcnc! Typically these would be under /etc/linuxcnc/, or possibly, if linuxcnc ran as its own user, under /home/linuxcnc/configs/ or something like that.

This _might_ be because the config files are intended to be edited by the user, without having administrator privileges?
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
19 Mar 2021 06:12 #202806 by newbynobi
I have two questions:
- do normal user need to edit linuxcnc files, or look into them? (not the machine config files)
IMHO: not, so he will not care about the location of the file. The only files he will need to edit are in his home directory under linuxcnc, so he will find them quick and he will be able to edit them.

- How does a developer work?
I am working exclusively from a rip environment and I have my linuxcnc-dev in my home dir, so I find any file I am looking for.

So the last question would be:
- Do we / the user will have a real benefit of implementing a new file herachy?
As I do interpret the Linux file system, we are mostly fine and the reason not having the config files in the "correct" place is well known. IMHO the effort we need to put in to replace every Dokumentation and the questions from users to be answered "I do not have that file mentioned in the WIKI" etc. is too hight compared to the benefit. We have just in relation to python 3 a lot of work to do, so let us check this side.

Norbert
The following user(s) said Thank You: phillc54, Grotius, anfänger

Please Log in or Create an account to join the conversation.

Time to create page: 0.245 seconds
Powered by Kunena Forum