Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Solved. Why systemd-utils if I use openrc?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 9:44 am    Post subject: Solved. Why systemd-utils if I use openrc? Reply with quote

I would like to ask why I should be bothered with systemd-utils at all.
What choice is it not permitting me to install_mask systemd directories without breaking my system!
No systemd war please, just the rationale.
_________________
this is a strange strange world.


Last edited by tranquilcool on Thu Jul 18, 2024 5:35 am; edited 1 time in total
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 489

PostPosted: Wed Jul 17, 2024 9:53 am    Post subject: Reply with quote

https://www.gentoo.org/support/news-items/2022-04-19-systemd-utils.html
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2392

PostPosted: Wed Jul 17, 2024 9:54 am    Post subject: Re: Why systemd-utils if I use openrc? Reply with quote

tranquilcool wrote:

No systemd war please, just the rationale.



https://packages.gentoo.org/packages/sys-apps/systemd-utils wrote:
Utilities split out from systemd for OpenRC users


Longer explanation: systemd is udev provider. If you want to get rid of anything systemd related, get rid of udev.

Best Regards,
Georgi
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 10:05 am    Post subject: Reply with quote

sMueggli wrote:
https://www.gentoo.org/support/news-items/2022-04-19-systemd-utils.html


I don't think I understand properly.

Correct me please;
this means I can install systemd-utlis without the udev use flag?
Then my question is, who manages udev and rules? I don't have sys-fs/udev nor eudev in portage.
I broke my system with systemd-utils because files and links were install from/to non existing systemd directories.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 3038

PostPosted: Wed Jul 17, 2024 10:55 am    Post subject: Reply with quote

tranquilcool wrote:

this means I can install systemd-utlis without the udev use flag?

For modern Gentoo, no.
tranquilcool wrote:

I broke my system with systemd-utils because files and links were install from/to non existing systemd directories.

Just don't mask anything, it is not running as init, it will not eat your files unless you misconfigure tmpfilesd.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 11:05 am    Post subject: Reply with quote

kimchi_sg wrote:
tranquilcool wrote:

this means I can install systemd-utlis without the udev use flag?

For modern Gentoo, no.
tranquilcool wrote:

I broke my system with systemd-utils because files and links were install from/to non existing systemd directories.

Just don't mask anything, it is not running as init, it will not eat your files unless you misconfigure tmpfilesd.


Definitely not, but I can’t help but think that if it’s about choice I shouldn’t have links from systemd directories.
But thank you.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9261

PostPosted: Wed Jul 17, 2024 11:23 am    Post subject: Reply with quote

Isn't it really more like that: You feel entitled to someone else giving you that warm feeling of choice by cutting out 'systemd' strings from every tool derived from it?

Install masks can break more than systemd tools (and have done so already, needlessly costing maintainers' time). "systemd" is not an exactly unique string if you think about it.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 11:31 am    Post subject: Reply with quote

asturm wrote:
Isn't it really more like that: You feel entitled to someone else giving you that warm feeling of choice by cutting out 'systemd' strings from every tool derived from it?


No, I don't feel entitled, I am just giving myself an opinion. In my case, it's all about solving a practical problem that I had, nothing to do with systemd wars.
Choice is warm, important, I agree.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 513

PostPosted: Wed Jul 17, 2024 12:20 pm    Post subject: Reply with quote

I confess that I found this situation alarming when I started using Gentoo. The relationship between OpenRC and systemd-utils is actually documented, although it took me a while to understand why this relationship existed.

I don't think it's the job of the Gentoo maintainers to change the names of everything, just so I can get a warm, fuzzy feeling about having nothing with 'systemd' in the name. I don't like it -- but I know who's responsible, and it's not Gentoo.

BR, Lars.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 12:52 pm    Post subject: Reply with quote

lars_the_bear wrote:
I confess that I found this situation alarming when I started using Gentoo. The relationship between OpenRC and systemd-utils is actually documented, although it took me a while to understand why this relationship existed.

I don't think it's the job of the Gentoo maintainers to change the names of everything, just so I can get a warm, fuzzy feeling about having nothing with 'systemd' in the name. I don't like it -- but I know who's responsible, and it's not Gentoo.

BR, Lars.


Well, maybe I have problems expressing myself. I had a practical problem and I needed to solve it. And I found it not very clean to have udev executables linked from directions of an init script I don't use. Maybe I missed the news that talked about
these links from systemd directories. Mea culpa.
But it has nothing to do with choice. Choice is good, it doesn't matter if it's given, taken, received or made. Yes, one could have a choice and don't know what to do about, but it's still good
to have it all the same.
I associate warm and fuzzy feelings to other things in life.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 1:23 pm    Post subject: Reply with quote

tranquilcool wrote:
lars_the_bear wrote:
I confess that I found this situation alarming when I started using Gentoo. The relationship between OpenRC and systemd-utils is actually documented, although it took me a while to understand why this relationship existed.

I don't think it's the job of the Gentoo maintainers to change the names of everything, just so I can get a warm, fuzzy feeling about having nothing with 'systemd' in the name. I don't like it -- but I know who's responsible, and it's not Gentoo.

BR, Lars.


Well, maybe I have problems expressing myself. I had a practical problem and I needed to solve it. And I found it not very clean to have udev executables linked from directories of an init script I don't use. Maybe I missed the news that talked about
these links from systemd directories. Mea culpa.
But it has nothing to do with choice. Choice is good, it doesn't matter if it's given, taken, received or made. Yes, one could have a choice and don't know what to do about, but it's still good
to have it all the same.
I associate warm and fuzzy feelings to other things in life.

_________________
this is a strange strange world.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 513

PostPosted: Wed Jul 17, 2024 1:29 pm    Post subject: Reply with quote

tranquilcool wrote:
I had a practical problem and I needed to solve it.


I'm sorry -- I don't understand the problem you're trying to solve. My bad, I imagine.

BR, Lars.
Back to top
View user's profile Send private message
Koyan
n00b
n00b


Joined: 07 Nov 2014
Posts: 32

PostPosted: Wed Jul 17, 2024 1:40 pm    Post subject: Reply with quote

tranquilcool wrote:
Definitely not, but I can’t help but think that if it’s about choice I shouldn’t have links from systemd directories.
But thank you.


One option is to replace systemd-utils with the unencumbered eudev and hardened-tmpfiles from the without-systemd overlay (https://github.com/KenjiBrown/without-systemd), but I am not sure how up to date it is anymore.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22608

PostPosted: Wed Jul 17, 2024 2:37 pm    Post subject: Reply with quote

I know you are not the first person to ask just in these forums about this situation. The answers given to those prior posters are still applicable.

tranquilcool: what problem are you trying to solve here? Did you set an INSTALL_MASK without understanding its implications, and break something by blocking a critical file? I believe I've seen at least one case of someone using INSTALL_MASK="/lib/systemd/" only to later have the system break because /bin/udevadm was a symlink to /lib/systemd/systemd-udevd, and the latter was missing due to the INSTALL_MASK.

If you don't want to install sys-apps/systemd-utils, then you should use /etc/portage/package.mask to block it, and follow up with emerge --ask --verbose --depclean sys-apps/systemd-utils to remove it. Beware that many modern Linux programs assume use of udev, so you will likely need to make some compromises to get a system that works without udevd. It can be done, though. I encourage you to test such a removal on a non-critical system first, since successfully removing udevd, but not removing all dependencies on it, can easily leave you with a system that cannot boot on its own.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 513

PostPosted: Wed Jul 17, 2024 5:47 pm    Post subject: Reply with quote

Hu wrote:
Beware that many modern Linux programs assume use of udev, so you will likely need to make some compromises to get a system that works without udevd. It can be done, though.


FWIW I don't run udevd at all on my Raspberry Pi systems. This leads to a heap of manual configuration, which is just about acceptable on a system with permanently-attached hardware. I don't run dbus, either. These systems work just fine, given the constraints.

I've never had much success eliminating udevd from a desktop/laptop Linux set-up. It's just too much of a pain.

The ideologically-charged part of my personality says that udevd is tainted by its association with systemd, and shouldn't be used. But I think (hope) that it's essentially the same udevd that we all knew and (?)loved before 2012, just with a new name. Still, if there were an alternative to udevd that had no association with systemd, I would use it, just on principle. I sort-of had the impression that eudev was supposed to play that role, but I'm not sure what happened to it.

BR, Lars.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 6:19 pm    Post subject: Reply with quote

Thanks @Hu, @lars_the_bear, @koyan

I fixed my broken system with eudev, which is what I was using before anyway. It still works for me.
I maybe missed the news item about these system links to systemd directories in case of install_mask systemd, if there was any.
And of course I prefer to go ahead with install_mask. It's okay with me.

As a side note, I was hoping someone could explain to me the bontà of these "strange, but legitimate" udev links when using systemd-utils, and how necessary they are in a linux system, suppose one inadvertently uses install_mask systemd.
It was never about systemd, which I don't use, and don't' hope to use. And I believe there should be no implications if one prefers to use and init system instead of another. The bad, according to me, is the mixing up of two different init systems.
Thanks all.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9261

PostPosted: Wed Jul 17, 2024 6:34 pm    Post subject: Reply with quote

As a consequence, please consider not filing bugs in the future.

tranquilcool wrote:
The bad, according to me, is the mixing up of two different init systems.

They're not mixed. You're obsessing over file names, essentially.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 6:36 pm    Post subject: Reply with quote

asturm wrote:
As a consequence, please consider not filing bugs in the future.


@asturm
Don't try to be fresh on me, and it doesn't matter if you accept my opinion or not.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22608

PostPosted: Wed Jul 17, 2024 6:43 pm    Post subject: Reply with quote

sys-fs/eudev appears not to be available in the tree anymore. Any systems relying on it are therefore on borrowed time. Any bugs that are only reproducible when using an unsupported out-of-tree package are likely to be rejected.

As for the links, I think the way that the systemd project did those links looks weird, but it is retained in Gentoo because it does not break anything, and Gentoo has enough complexity without creating needless deviations from upstream. From what I recall of the links, they are necessary if you want udevd to work correctly.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 7:00 pm    Post subject: Reply with quote

Hu wrote:
sys-fs/eudev appears not to be available in the tree anymore. Any systems relying on it are therefore on borrowed time. Any bugs that are only reproducible when using an unsupported out-of-tree package are likely to be rejected.

As for the links, I think the way that the systemd project did those links looks weird, but it is retained in Gentoo because it does not break anything, and Gentoo has enough complexity without creating needless deviations from upstream. From what I recall of the links, they are necessary if you want udevd to work correctly.


Yes, they are weird, because if I do use_mask systemd on my system, I want to have to deal only with openrc as an init system. Makes it easier to debug and fix breakages. Anything else is a shortcut and a bad one, in my opinion.
Mine was a question, and has been answered in many different ways, even as far as to saying that I am obsessed over file names.
I thank everybody for using their time to say out their opinions.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22608

PostPosted: Wed Jul 17, 2024 7:14 pm    Post subject: Reply with quote

The correct way to avoid installing packages you don't want is to use package.mask to forbid installing them. Using INSTALL_MASK like this will still let Portage try to install systemd if a package dependency requires it, but pieces of it will be missing, with potentially confusing and subtle consequences.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 7:31 pm    Post subject: Reply with quote

Hu wrote:
The correct way to avoid installing packages you don't want is to use package.mask to forbid installing them. Using INSTALL_MASK like this will still let Portage try to install systemd if a package dependency requires it, but pieces of it will be missing, with potentially confusing and subtle consequences.


That's the point, that's the implications; potentially confusing and subtly misleading. If I were a developer I would try to address the problem/implications in a different way. At least as far as openrc is concerned. Unfortunately I am not. But I can't fail to bring it up.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22608

PostPosted: Wed Jul 17, 2024 9:49 pm    Post subject: Reply with quote

I think you are disagreeing with me, but I don't understand what you want done instead. I told you how to do this in a way that fails safely and clearly, with a nice error from Portage telling you that continuing would require violating your local policy of no-systemd. Using INSTALL_MASK fails messily and silently, with files missing and other packages misbehaving due to their absence.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1246

PostPosted: Wed Jul 17, 2024 10:21 pm    Post subject: Reply with quote

Hu wrote:
I think you are disagreeing with me, but I don't understand what you want done instead. I told you how to do this in a way that fails safely and clearly, with a nice error from Portage telling you that continuing would require violating your local policy of no-systemd. Using INSTALL_MASK fails messily and silently, with files missing and other packages misbehaving due to their absence.


Well, I don’t disagree with you. If we were talking on medical terms, something I happen to know better, I would say that you are telling me how to keep at check the symptoms and clinical signs. And I accept that. What I am trying to say is that behind the symptoms and clinical signs there’s a pathology and I would address it if I were a developer. I would throw out systemd-udev and find a different way to do it and don’t have openrc look for anything in systemd directories.
And for me is a better way to tackle the symptoms and clinical signs. Why try to cure a fever if there’s something else that’s causing the fever?

In any case, thank you for espousing your opinions. It’s always nice to exchange views on various.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 214

PostPosted: Wed Jul 17, 2024 10:47 pm    Post subject: Reply with quote

Using INSTALL_MASK without carefully understanding exactly what you are masking and why is dangerous and will lead to broken systems.

The string "systemd" is not inherently problematic and there is no reason to prevent its appearing in an installed system. Moreover, it is incredibly dangerous because, for example, what do you think you are going to do if some program such as sys-apps/portage contains a file in it:

/usr/lib/python3.12/site-packages/portage/util/systemdetails.py

And your INSTALL_MASK goes and deletes that file, and portage cannot collect information about the *details* of your *system*?

If you want to, I dunno, stop packages from installing a 4kb file called git-daemon@.service because you think the presence of a text file that goes unused is going to invite the moral evils of Red Hat's attempt at dominating Linux, then you do not have any right to lecture other people about "No systemd war please". Sorry.

Code:

$ du -sh /etc/init.d/
188K   /etc/init.d/

$ ls /etc/init.d/
avahi-daemon    busybox-ntpd      cupsd          docker      ip6tables          mit-krb5kdc     pciparm        pydoc-3.10  pydoc-3.8  svnserve            udev
avahi-dnsconfd  busybox-watchdog  dbus           fuse        iptables           mit-krb5kpropd  pcscd          pydoc-3.11  pydoc-3.9  switcheroo-control  udev-settle
bluetooth       calibre-server    device-mapper  git-daemon  kmod-static-nodes  munged          postgresql-16  pydoc-3.12  rsyncd     tlp                 udev-trigger
busybox-crond   containerd        dmcrypt        gpm         mit-krb5kadmind    NetworkManager  pydoc-2.7      pydoc-3.13  sshd       twistd              wpa_supplicant


Oh no! What are all these openrc files doing on my systemd system??? I thought Gentoo was about *choice*?

Well, Gentoo is indeed about choice. You have the choice to use the init system you choose. What does that have to do with small text files that don't get used by any software? I am not mixing init systems just because I have openrc files on my systemd system! Because -- openrc isn't running.

Breaking a package because you incorrectly analyzed whether it would work with INSTALL_MASK is just a coding error by the system administrator that wrote a bad INSTALL_MASK. That's all there is to it -- there's nothing to debate.

...

What you can, of course, debate about, is whether the systemd-utils *package* is necessary on an openrc system. It's a valid question.

And it's a question that has an answer. The systemd project also includes some small utilities that are used on systems that don't have systemd as your /sbin/init process. OpenRC needs a tmpfiles.d compatible generator -- run by the openrc service manager, no less -- and it installs one that happens to have been written by the systemd project.

It also provides things such as a udev provider, a bootctl program, a kernel-install... depending on USE flags. If you do not like this, then check which packages depend on systemd-utils and consider building them with whatever combination of USE flags causes those packages to NOT require a dependency on virtual/udev, or systemd-utils, or whatever it is.

Don't be surprised if attempting to delete the "systemd" word from your system by using INSTALL_MASK instead of by choosing your USE flags carefully, causes your system to break. That's what happens when portage installs important files and you secretly delete those files instead of taking the time to fine-tune your USE flags so that those files aren't needed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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