View previous topic :: View next topic |
Author |
Message |
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 4:24 pm Post subject: |
|
|
Leonardo.b wrote: | stefan11111 wrote: | I added virtual/dev-manager-0-r2 to package.provided.
That still didn't fully stop it from complaining, as it gets pulled in by system. |
Alernatively, I think you can remove this package from @system. |
How do you remove a package from system?
You mean to use /etc/portage/profile/packages? _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1685
|
Posted: Sun Mar 05, 2023 4:25 pm Post subject: |
|
|
stefan11111 wrote: | sam_ wrote: | I don't understand why those trying to remove tmpfiles also then try to use an ancient openrc, given that version of openrc contains opentmpfiles before it became a separate project anyway.
Just use the last version opentmpfiles, modified if you wish, if you want to avoid systemd-tmpfiles, or package.provided it entirely. I don't see what purpose an old OpenRC serves in addition, especially if it already contains a tmpfiles implementation. |
i installed opentmpfiles and rebooted.
eix-update only works as root and in the file /var/cache/eix/portage.eix does not exist or has correct permissions.
It stil doesn't work if the eix folder is removed. |
I'm asking why you're using old openrc. Are you saying that old openrc works for eix but new openrc doesn't with external opentmpfiles? |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 4:27 pm Post subject: |
|
|
Old openrc didn't work at all for me.
I have posted a link to all the errors it gave me. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Sun Mar 05, 2023 4:35 pm Post subject: |
|
|
stefan11111,
I'm on openrc-0.17 because later versions embodied some design decisions that at the time, I didn't like.
I always intended to look at future versions but I've never gotten around to it.
If its not broken, don't fix it.
Its coincidence that I stopped with an openrc version that includes a tmpfiles implementation.
I do have systemd-utils masked. Not because I don't want a tmpfiles implementation. I already have one, so I don't need another one.
You will need tmpfiles from somewhere, or you will need to learn what every package needs tmpfiles to do then do it by hand.
Life is too short for that.
I have never tried to exclude tmpfiles. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 4:58 pm Post subject: |
|
|
Just installed systemd-utils with USE="tmpfiles" for the sake of testing.
It appears the the behavior of eix-update is the same with no tmpfiles, opentmpfiles or systemd-tmpfiles.
Does anyone know of a better test? _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1549 Location: South America
|
Posted: Sun Mar 05, 2023 5:23 pm Post subject: |
|
|
With any tmpfiles implementation, you'll only get /var/cache/eix (taking app-portage/eix as an example of a tmpfiles user) reconstructed by rebooting, or by manually running the relevant program as root (e. g. systemd-tmpfiles --create) _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 5:38 pm Post subject: |
|
|
GDH-gentoo wrote: | With any tmpfiles implementation, you'll only get /var/cache/eix (taking app-portage/eix as an example of a tmpfiles user) reconstructed by rebooting, or by manually running the relevant program as root (e. g. systemd-tmpfiles --create) |
This test worked. Opentmpfiles creates /var/cache/eix on boot.
It is not creatied without a tmpfiles implementation.
Opentmpfiles seems more minimal than systemd-tmpfiles.
From what was said so far, it appears that tmpfiles are only needed if something goes wrong, like files/directories missing or having wrong permissions.
This seems hard to do accidentally and easy to fix manually if needed.
So when are tmpfiles actually needed? It's not like we have apps to fix deleting /etc/portage or the entire /etc.
Also, why does opentmpfiles not satisfy virtual/tmpfiles? _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Sun Mar 05, 2023 5:50 pm Post subject: |
|
|
stefan11111,
tmpfiles does its thing when a package that needs them is installed.
A long time ago, packages add did their own thing with varying degrees of quality.
Some packages still can.
More and more, things relay on one common tmpfiles.
opentmpfiles has been removed. If you look at old versions of the virtual/tmpfiles ebuild, it was the default on openrc. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1549 Location: South America
|
Posted: Sun Mar 05, 2023 6:13 pm Post subject: |
|
|
NeddySeagoon wrote: | opentmpfiles has been removed. If you look at old versions of the virtual/tmpfiles ebuild, it was the default on openrc. |
For completeness, I'll add (even though it has already been said here): it has been removed because it has a difficult to fix vulnerability, and its authors felt that, given this, maintaining the project was not worth it.
And yes, it's not different for OpenRC-0.17's internal tmpfiles. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
Leonardo.b Apprentice
Joined: 10 Oct 2020 Posts: 299
|
Posted: Sun Mar 05, 2023 6:18 pm Post subject: |
|
|
stefan11111 wrote: | How do you remove a package from system?
You mean to use /etc/portage/profile/packages? |
Yess. |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 6:26 pm Post subject: |
|
|
So there appears to be no reason to use openrc 0.17.
The best configuration seems to be a modern openrc and opentmpfiles if needed.
Kind of a shame there is no officially supported way to not use anything that has something to do with systemd or Lennart. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
ukky Tux's lil' helper
Joined: 26 Feb 2023 Posts: 109 Location: Montreal, Canada
|
Posted: Sun Mar 05, 2023 6:40 pm Post subject: |
|
|
stefan11111 wrote: | Kind of a shame there is no officially supported way to not use anything that has something to do with systemd or Lennart. |
I guess everyone has own way to do that.
I just use Wikipedia to find related projects, and then find those project's names in Portage, then add them to package.mask. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1549 Location: South America
|
Posted: Sun Mar 05, 2023 7:10 pm Post subject: |
|
|
stefan11111 wrote: | Kind of a shame there is no officially supported way to not use anything that has something to do with systemd or Lennart. |
In the case of systemd-tmpfiles, the problem is that writing a processor of tmpfiles.d *.conf files in a secure way has proven to be technically hard. To which what I have to say is, if it is so hard, then, in retrospective, the tmpfiles.d concept wasn't a great idea in the first place.
What I get in response seems to be this idea that, suddenly, performing any filesystem operations, like creating a file or directory, changing ownership or permissions, etc., is somehow inherently insecure, in any context, because of unspecified "races". That, I don't buy without further elaboration. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
Last edited by GDH-gentoo on Mon Mar 06, 2023 12:24 am; edited 2 times in total |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 7:16 pm Post subject: |
|
|
What does tmpfiles even do?
What need is there to check and create /var/cache/* at boot time?
We don't have such tools for /etc/*, so why is /var/cache/* so special?
From this thread, tmpfiles seems like a solution looking for a problem, much like systemd. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1549 Location: South America
|
Posted: Sun Mar 05, 2023 7:19 pm Post subject: |
|
|
stefan11111 wrote: | What does tmpfiles even do? |
Sorry, too long, I'll have to point you to the documentation. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
ukky Tux's lil' helper
Joined: 26 Feb 2023 Posts: 109 Location: Montreal, Canada
|
Posted: Sun Mar 05, 2023 7:26 pm Post subject: |
|
|
systemd-tmpfiles is the only item (as far as I know) from systemd or Lennart installed on my system.
I think I will unmask opentmpfiles just to get rid of systemd-tmpfiles.
The best solution would be to rewrite opentmpfiles in C as independent standalone tool. |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 7:47 pm Post subject: |
|
|
Title of the link:
Quote: | systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile and temporary files and directories |
Why do we need a package to manage this?
Creating required files and directories and setting permissions can be done when the package is installed, no need for tmpfiles.
What files and directories actually need to be created at boot?
Deleting and cleaning up can be implemented by each application.
Imagine portage relying on such features to unmerge packages.
I've been trying to see what breaks without this, and found that a simple mkdir, chown and chmod is all that is needed to fix any issues that arise.
This seems like something to save lazy devs some time and another example of systemd spreading into all aspects of linux. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 7:53 pm Post subject: |
|
|
ukky wrote: | systemd-tmpfiles is the only item (as far as I know) from systemd or Lennart installed on my system.
I think I will unmask opentmpfiles just to get rid of systemd-tmpfiles.
The best solution would be to rewrite opentmpfiles in C as independent standalone tool. |
Do you also use a static /dev? _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21724
|
Posted: Sun Mar 05, 2023 7:57 pm Post subject: |
|
|
stefan11111 wrote: | What does tmpfiles even do? | If you don't understand what it does, how do you know when a dependency on it is unnecessary? stefan11111 wrote: | What need is there to check and create /var/cache/* at boot time? | Some people make /var/cache a tmpfs, causing its contents to be lost at shutdown. stefan11111 wrote: | We don't have such tools for /etc/*, so why is /var/cache/* so special? | Anyone who deletes /etc is asking for trouble. By its very name, /var/cache looks disposable. stefan11111 wrote: | From this thread, tmpfiles seems like a solution looking for a problem, much like systemd. | From your remarks, it seems like you're looking for an argument. Fortunately for you, you didn't manage to wander into room 12 (abuse). |
|
Back to top |
|
|
ukky Tux's lil' helper
Joined: 26 Feb 2023 Posts: 109 Location: Montreal, Canada
|
Posted: Sun Mar 05, 2023 8:15 pm Post subject: |
|
|
stefan11111,
When you have trimmed down Linux installation, with a few packages installed, having no SELinux (or similar), creating a few directories upon each reboot manually, or via system-specific (usable only on your system), is not a big deal.
But how can program create a directory in SELinux environment (enforced mode) if it has no permission to do so? In enforced SELinux mode a program, even running as root, may not be able to create directories at will.
What if system has plenty of packages installed and every package requires some directories and files in volatile storage, like tmpfs? Should a script with series of mkdir+chown+chmod be written for each system individually? |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 8:16 pm Post subject: |
|
|
Hu wrote: | stefan11111 wrote: | What does tmpfiles even do? | If you don't understand what it does, how do you know when a dependency on it is unnecessary? |
I started this thread because everything seemed fine without tmpfiles.
I even looked for trouble with tmpfiles and barely found anything.
Hu wrote: | stefan11111 wrote: | What need is there to check and create /var/cache/* at boot time? | Some people make /var/cache a tmpfs, causing its contents to be lost at shutdown. |
Understandable, didn't think of that. Still don't think this had to be required on almost all systems, but now I get why someone might need it.
Hu wrote: | stefan11111 wrote: | We don't have such tools for /etc/*, so why is /var/cache/* so special? | Anyone who deletes /etc is asking for trouble. By its very name, /var/cache looks disposable. |
Such assumptions can be fatal.
https://forums.gentoo.org/viewtopic-t-573767-highlight-unmerged+glibc.html
stefan11111 wrote: | From this thread, tmpfiles seems like a solution looking for a problem, much like systemd. | From your remarks, it seems like you're looking for an argument. Fortunately for you, you didn't manage to wander into room 12 (abuse).[/quote]
Where does "room 12" come from?
How does this border on abuse?
You mean my comments on systemd and Lennart?
From my first few posts, I made it clear(hopefully) that I don't like systemd and everything related.
I am looking on ways to avoid Lennart's software.
Move the thread to gentoo chat if it fits there better. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Last edited by stefan11111 on Sun Mar 05, 2023 8:24 pm; edited 2 times in total |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1549 Location: South America
|
Posted: Sun Mar 05, 2023 8:17 pm Post subject: |
|
|
stefan11111 wrote: | Why do we need a package to manage this? | Because some upstream packages are relying on it. Like eix.
stefan11111 wrote: | Creating required files and directories and setting permissions can be done when the package is installed, no need for tmpfiles. | If nonvolatile filesystem places are involved, I agree with you. I made that point once in Gentoo's bugzilla. Developers disagreed.
stefan11111 wrote: | What files and directories actually need to be created at boot? | Those in volatile filesystem places, like /run (a tmpfs on Gentoo by policy).
stefan11111 wrote: | Deleting and cleaning up can be implemented by each application. | I agree, but I get the "races" argument in response. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
ukky Tux's lil' helper
Joined: 26 Feb 2023 Posts: 109 Location: Montreal, Canada
|
Posted: Sun Mar 05, 2023 8:27 pm Post subject: |
|
|
stefan11111 wrote: | Do you also use a static /dev? |
Yes, system now runs with static /dev, i.e. devtmpfs is not mounted at /dev.
I still keep DEVTMPFS enabled in my kernel and in time I plan to disable it, if system behaves good.
System is used as primary workstation. |
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 922 Location: Romania
|
Posted: Sun Mar 05, 2023 8:29 pm Post subject: |
|
|
GDH-gentoo,
This is in my /usr/lib/tmpfiles.d, It appears to have been recreated.
Code: | $ ls /usr/lib/tmpfiles.d
eix.conf portage-ccache.conf portage-tmpdir.conf revdep-rebuild.conf
|
Code: | $ cat /usr/lib/tmpfiles.d/*
d /var/cache/eix 0775 portage portage -
# Prevent ccache files from being cleaned
x /var/tmp/ccache
d /var/tmp/portage 0775 portage portage
d /tmp/portage 0775 portage portage
d /var/cache/revdep-rebuild 0700 0 0
|
Nothing seems to be created in volatile places, so where is the need for tmpfiles? _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 932 Location: Richmond Hill, Canada
|
Posted: Sun Mar 05, 2023 8:47 pm Post subject: |
|
|
stefan11111,
I am curious what is your concern of tmpfiles.d? I understand you object about the "who" part of tmpfiles.d (as in who created). But do you also object the function of tmpfiles.d? Are you believe the system should not having a function that will manage things that are temporary in natural and all temporary object used by program should only be handled by the program?
I found this thread conversation fascinating but somewhat confuse. Sometime the talk seem to gear to very specific of a package than sometime change to so general that is seems lost in the translation. |
|
Back to top |
|
|
|