View previous topic :: View next topic |
Author |
Message |
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Mar 14, 2018 8:26 am Post subject: |
|
|
Yamakuzure wrote: | Shamus397 wrote: | So here we go, more and more "this is the way SystemD does it, so it should be the default now" like they did with the VirtualBox module configuration (sticking config files into /usr/lib/modules-load.d/). At least the OpenRC devs had the sense to say no to that kind of nonsense. :) | I like the argument, that system administrators can not freely adapt what is in /etc/init.d. It totally blends out what /etc/conf.d is for... :lol:
(Blending out what's already there is some sort of systemd credo, isn't it?) |
It's as if the person reporting the bug has never heard of dispatch-conf or CONFIG_PROTECT. One has to wonder if they use Gentoo at all, or if they just signed up to complain. Seems to be a growing hobby... |
|
Back to top |
|
|
zlg Retired Dev
Joined: 11 Sep 2012 Posts: 49 Location: Earth
|
Posted: Thu Mar 15, 2018 5:50 am Post subject: |
|
|
Ant P. wrote: | Yamakuzure wrote: | Shamus397 wrote: | So here we go, more and more "this is the way SystemD does it, so it should be the default now" like they did with the VirtualBox module configuration (sticking config files into /usr/lib/modules-load.d/). At least the OpenRC devs had the sense to say no to that kind of nonsense. | I like the argument, that system administrators can not freely adapt what is in /etc/init.d. It totally blends out what /etc/conf.d is for...
(Blending out what's already there is some sort of systemd credo, isn't it?) |
It's as if the person reporting the bug has never heard of dispatch-conf or CONFIG_PROTECT. One has to wonder if they use Gentoo at all, or if they just signed up to complain. Seems to be a growing hobby... |
Even further, they didn't outline what mechanism they found to enable the behavior they were after, so it's hard for anyone except OpenRC maintainers to figure out what they're talking about and whether it's a public part of the API. I can understand an argument in favor of documenting whatever it is they used to get their intended outcome, but all they did was ask for it to be changed to follow systemd, ignoring the nearly two decades (or more?) of history and precedence for the decision on /etc/init.d.
I think we're meeting a new generation of GNU/Linux users who think all *nixes are GNU/Linux only, and Red Hat as "THE upstream", so the only thing they've had exposure to is systemd's way of doing things and the echo chamber that comes from being surrounded by rockstars with egos so massive they rival black holes. systemd is what happens when you use the "safety in numbers" or "might makes right" MO to force others to use a certain thing. They worship technical discussion but use social means to enforce compliance in their One True Standard and extend their influence.
I wish I could figure out why people think it's good to go with what everyone else does. What point is there in free will or critical thought if you don't use it? What would you call it? Something like intellectual apathy?
*gets off the soap box* |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Mar 15, 2018 3:08 pm Post subject: |
|
|
zlg wrote: | I wish I could figure out why people think it's good to go with what everyone else does. What point is there in free will or critical thought if you don't use it? What would you call it? Something like intellectual apathy? |
Herd instinct. Man is a pack animal. Think "dog" vs "cat". |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Mar 15, 2018 3:29 pm Post subject: |
|
|
zlg wrote: | I think we're meeting a new generation of GNU/Linux users who think all *nixes are GNU/Linux only, and Red Hat as "THE upstream", so the only thing they've had exposure to is systemd's way of doing things |
I think it's deeper problem, it's not related to been only expose to systemd's way of doing things, it's more related to not question something and assume it is good without proof.
Naib has just resume it with
Naib wrote: | How about /etc is in the root and /etc is for config rather than /usr which might not be mounted .... |
But instead of questioning if systemd was doing good with /usr, he assume systemd is doing good and openrc is not doing it like systemd, so openrc is doing it bad.
For this generation, the good way of doing things is more set by who is the coder with the most followers... |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Thu Mar 15, 2018 3:32 pm Post subject: |
|
|
Honestly, I have always wondered why service/init scripts reside inside /etc. I know it's been like that for ages, and it works. No complainments about that at all. I'm totally ok with it.
Another one is /etc/group. Since it's almost always modified by an external tool and not edited by hand, I'd put it somewhere inside /var, BUT system need to be able to read it as soon as possible, so group file not residing on root partition might cause problems (if /var were a seperate partition).
So can someone explain this to me. It's been "bugging" me for quite a while. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Mar 15, 2018 4:20 pm Post subject: |
|
|
http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s07.html
The rational is given by early nix implementation, that were lacking space badly (using floppy) and use /usr and /var on different media to get more space.
So init script in /etc agree with all that: /etc is always in / and hold no executable but script is ok.
It's when you break this, like putting init script in /usr that you get into trouble, because an init that expect to find its scripts in /usr that is not present when booting should be called "dumb", but i called them myself systemd.
If you go deeper following the logic: if you want use sh scripts... by your init, it should then also be able to run sh... and if you start putting your sh implementation in a directory that is attach to /var or /usr, you're again dumb, but this time, i called that a redhat |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Thu Mar 15, 2018 4:53 pm Post subject: |
|
|
Thanks krinn.
Now it makes even more sense to me.
It's funny how nowdays having /usr on seperate partition usually makes things more complicated. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Mar 15, 2018 5:34 pm Post subject: |
|
|
Zucca wrote: | Honestly, I have always wondered why service/init scripts reside inside /etc. |
I appreciate the history posted above.
My view:
They are system executables that need to be available at boot so they should be somewhere in /sbin. However, the conf.d files are configuration and should be in /etc. NONE should be in /usr.
/sbin/init and /etc/init ? However, that would split the close association between /etc/init.d and /etc/conf.d
Best to leave it as a historical anomaly.
/etc/group is configuration and belongs in /etc, regardless of what tool handles it. I have used nano (I know - brain surgery on self) in the past. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Thu Mar 15, 2018 11:55 pm Post subject: |
|
|
krinn wrote: | http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s07.html
The rational is given by early nix implementation, that were lacking space badly (using floppy) and use /usr and /var on different media to get more space.
So init script in /etc agree with all that: /etc is always in / and hold no executable but script is ok.
It's when you break this, like putting init script in /usr that you get into trouble, because an init that expect to find its scripts in /usr that is not present when booting should be called "dumb", but i called them myself systemd.
If you go deeper following the logic: if you want use sh scripts... by your init, it should then also be able to run sh... and if you start putting your sh implementation in a directory that is attach to /var or /usr, you're again dumb, but this time, i called that a redhat |
Thanks. Couldn't be clearer, could it?:
http://refspecs.linuxfoundation.org wrote: | To be clear, /etc may contain executable scripts, such as the command scripts commonly called by init to start and shut down the system and start daemon processes. "Executable binary" in this context refers to direct machine code or pseudocode not in a human-readable format, such as native ELF executables. |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Mar 16, 2018 1:26 am Post subject: |
|
|
Fitzcarraldo wrote: | http://refspecs.linuxfoundation.org wrote: | To be clear, /etc may contain executable scripts, such as the command scripts commonly called by init to start and shut down the system and start daemon processes. "Executable binary" in this context refers to direct machine code or pseudocode not in a human-readable format, such as native ELF executables. |
|
Thanks, Fitzcarraldo. The rules are the rules but to me the distinction between binary machine-readable code and human-readable (ROTFLMAO) scropts run by a machine interpreter is very artificial and illogical. If it's compiled C, it's a program. If it's python, it's not. VERY artificial and human-chauvinist.
Who wrote this stuff? The same guys who wrote the US Tax Code? (I wouldn't denigrate your Inland Revenue) |
|
Back to top |
|
|
CasperVector Apprentice
Joined: 03 Apr 2012 Posts: 156
|
Posted: Fri Mar 16, 2018 1:33 am Post subject: |
|
|
Tony0945 wrote: | /sbin/init and /etc/init ? However, that would split the close association between /etc/init.d and /etc/conf.d
Best to leave it as a historical anomaly. |
However, when init itself is a script...
/etc/s6-init/bin/rc.boot on my system: | #!/bin/execlineb -P
/bin/emptyenv
/bin/export PATH /usr/sbin:/usr/bin:/sbin:/bin
/bin/cd /
s6-setsid -qb
umask 022
#if { mount -n -t devtmpfs devtmpfs /dev }
redirfd -r 0 /dev/null
if {
ifte
{ mount -n -t tmpfs -o remount,rw,mode=0755,size=10M tmpfs /run }
{ mount -n -t tmpfs -o rw,mode=0755,size=10M tmpfs /run }
mountpoint -q /run
}
if { /etc/s6-init/bin/load_clock.rc }
if { cp -a /etc/s6-init/run / }
if { mkfifo -m 600 /run/service/s6-svscan.log/fifo }
s6-envdir -I /etc/s6-init/env
redirfd -wnb 1 /run/service/s6-svscan.log/fifo
background
{
s6-setsid
redirfd -w 1 /run/service/s6-svscan.log/fifo
fdmove -c 2 1
/etc/s6-init/bin/rc.init
}
unexport !
fdmove -c 2 1
cd /run/service
s6-svscan -st0
|
Technically, it exec()'s into s6-svscan, which would exec() into /etc/s6-init/bin/rc.halt on shutdown on my system, so init is not always a script _________________ My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Mon Mar 19, 2018 1:53 am Post subject: |
|
|
Tony0945 wrote: | to me the distinction between binary machine-readable code and human-readable (ROTFLMAO) scropts run by a machine interpreter is very artificial and illogical. |
Actually, a compiled application is (if linked statically) able to run when the rest of your userland is completely broken. A "human-readable script" which requires a complex interpreter is not. This is probably the most obvious reason to make a clear distinction between those. _________________ I already use the new Genthree. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Mar 19, 2018 8:22 am Post subject: |
|
|
pun_guin wrote: | This is probably the most obvious reason to make a clear distinction between those. |
the clear distinction is one you can look at source code directly with a simple "cat/more/text editor" and see what it will do, and the other you need to disassemble it to figure out if it is really doing what it is suppose to do.
As such anyone asking admin to add a new initscript will be review prior adding it to /etc, while anyone asking a binary to be add in /bin "should" be just directly denied.
If anyone want a new binary in the system, it is admin task to compile it himself and not adding any random binary provide by user.
This make mandatory someone could ask some more "own made" running script in the system but not any binary ; which just tell users "if you need something more in /etc we can discuss it, if you need something more in /bin you will be kick out".
We have plenty facilities in newer init, it is quiet easy to ask admin something more when computer start or stop (local.start/local.stop) a user may have a legit need for, or agree with a user to run another copy of a legit daemon with some special parameters while the genuine one still run "normal" (like adding a new sshd instance with diff parameters...).
While new init script in /etc remain a sensible query and the case should remain pretty rare, still it is doable that a user ask an admin something that would alter the initialization of the computer and get positive answer. While any query for new binary provide by user should be reject, no matter what it is for.
Last edited by krinn on Mon Mar 19, 2018 8:28 am; edited 1 time in total |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Mon Mar 19, 2018 8:24 am Post subject: |
|
|
Is that the reason why so much of Gentoo is written in Python and so little is written in C? _________________ I already use the new Genthree. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Mar 19, 2018 8:31 am Post subject: |
|
|
No, i think it was because e(something, i can't remember its name) ; the thing in bsd that was handling package was in python and drobbins was python dev. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Mar 19, 2018 1:49 pm Post subject: |
|
|
krinn wrote: | the clear distinction is one you can look at source code directly with a simple "cat/more/text editor" and see what it will do, and the other you need to disassemble it to figure out if it is really doing what it is suppose to do. |
That is true for both compiled and interpreted code. IMHO, C is much easier to read that shell.
I think you meant "object code" not "source code"
So systemd is installed in /etc ? |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Mar 19, 2018 1:59 pm Post subject: |
|
|
the rule is simple:
* systemd is a binary -> not in /etc
* is an admin tool -> sbin
* is critical to boot -> /sbin and not /usr/sbin
But redhat are fucked head, and they symlink /sbin with /usr/sbin, which mean if you use /usr mount, and a system with the symlink, you cannot boot without an initram that mount /usr because /usr/sbin doesn't exists.
That's what i called a "redhat"
Quote: | IMHO, C is much easier to read that shell |
Yeah, it's doable that a user ask his own program install, still the admin should take the C source, review that, build the binary, and provide that binary to its users ; in no way the admin should just take the binary provide by the user that wish it.
I think the difference is that per essence init script are simpler (well, no less no more for a simple hello world in sh or C, but if it's really simple, even user would prefer just make it in sh than C). So if you start bugging admin with a binary, he should review the source code and build it... anyway not a simple task like looking at a script for possible harm.
Must be why /etc hold init script and no binary, a bit like, you can bug the admin with something simple, but when you need something binary, you will bug the admin enough to bug him for something that should be worth it.
For the story, look at https://forums.gentoo.org/viewtopic-t-1076204.html where you see udev start getting fucked by redhat politics. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Mar 20, 2018 6:07 am Post subject: |
|
|
Obviously the way to make everyone happy is to follow LinuxBoot's example where everything is Go source code compiled at runtime. /sbin/ only needs init and a compiler, everything else can live in /etc/, and RedHat's /usr/ mishandling is completely sidestepped. (as a side-effect systemd won't exist in this environment, but that's besides the point) |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Mar 20, 2018 1:52 pm Post subject: |
|
|
Ant P. wrote: | (as a side-effect systemd won't exist in this environment, but that's besides the point) |
That's a bonus. |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Tue Mar 20, 2018 2:19 pm Post subject: |
|
|
Ant P. wrote: | ...source code compiled at runtime. |
This is snark, but a kernel of truth underlies what you say. I came to Linux from DOS and OS/2, with a little use of Windows. Their interpreted language was BAT files, and they were UGLY! The syntax was horrid, the capitalization was horrid, it may have been Turing-complete, I'm not sure. But if it was, it got in the back door to Turing-completeness sideways.
I believe that the sheer ugliness of BAT files gave the entire DOS/Windows userbase a disrespect for and aversion to scripting. "The only GOOD code is COMPILED code!" That plus the ubiquitous presence of SVCHOST.exe lays the groundwork for a bunch of Linux newcomers from Windows to want something like systemd. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1816
|
Posted: Tue Mar 20, 2018 5:12 pm Post subject: |
|
|
depontius wrote: | That plus the ubiquitous presence of SVCHOST.exe lays the groundwork for a bunch of Linux newcomers from Windows to want something like systemd. | Oh ffs...yea...you gotta love svchost.exe and having literally NO way to know what process are involved in a given service...painful. Don't get me started on Windows approach to services...like how the only way a running service can see a change to the environment (most notably PATH) is by rebooting the server...because the service manager holds on to the boot-time environment until a reboot, and that's all the services will ever inherit. What a bunch of a-holes. Maybe systemd can figure out how to do that as well .
Tom |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Mar 20, 2018 7:14 pm Post subject: |
|
|
depontius wrote: | I came to Linux from DOS and OS/2, with a little use of Windows. Their interpreted language was BAT files, and they were UGLY! The syntax was horrid, the capitalization was horrid, it may have been Turing-complete, I'm not sure. But if it was, it got in the back door to Turing-completeness sideways. |
Did you know they kept adding to that syntax in Windows NT/2k/XP cmd.exe? I'm pretty sure it's Turing-complete there (and even more unreadable). PHP's got nothing on this stuff. |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Tue Mar 20, 2018 7:37 pm Post subject: |
|
|
tld wrote: | depontius wrote: | That plus the ubiquitous presence of SVCHOST.exe lays the groundwork for a bunch of Linux newcomers from Windows to want something like systemd. | Oh ffs...yea...you gotta love svchost.exe and having literally NO way to know what process are involved in a given service...painful. Don't get me started on Windows approach to services...like how the only way a running service can see a change to the environment (most notably PATH) is by rebooting the server...because the service manager holds on to the boot-time environment until a reboot, and that's all the services will ever inherit. What a bunch of a-holes. Maybe systemd can figure out how to do that as well .
Tom |
I didn't say I approved, I was merely pointing out a possible (probable?) path. So it sounds like systemd might be a bit of an improvement over svchost.exe in some ways, but do you deny the similarity and possible influence? _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Mar 20, 2018 10:37 pm Post subject: |
|
|
Windows the amazing re-booting machine. I remember installing WindowsME. It kept failing on boot. My daughter said to keep on booting. I said "That's crazy". She said, "That's Windows". It stabilized (as stable as it ever got) on the ELEVENTH reboot! |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Tue Mar 20, 2018 10:59 pm Post subject: |
|
|
My main development machine is still on Windows. What am I doing wrong?
Seriously, I liked Windows Me. _________________ I already use the new Genthree. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|