Summary: | sys-apps/openrc: tmpfiles.d support | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Casper Ti. Vector <CasperVector> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, CasperVector, Martin.Jansa, maxposedon, mgorny, mk, nikoli, slyfox, steven, tetromino, ziga.boehm |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 361349 | ||
Bug Blocks: | 333821, 446948 | ||
Attachments: | emerge --info |
Description
Casper Ti. Vector
2011-12-25 16:47:03 UTC
this has already been mentioned in Bug 361349 (comment 41) it's only an issue when /run exists because /var/run is just a symlink to it (In reply to comment #1) Yes, my previous description is inaccurate... (In reply to comment #1) > it's only an issue when /run exists because /var/run is just a symlink to it Hit this problem; however, on my system (with openrc-0.9.7), /var/run is not a symlink to /run, and in fact the contents of /run and /var/run are different. if you're manually mounting /var/run as tmpfs or otherwise clearing it, that is currently "your" problem if you have /run and your /var/run isn't a symlink to it, then your system needs updating. we'll be adding checks to openrc to handle/force the migration. (In reply to comment #4) > if you're manually mounting /var/run as tmpfs or otherwise clearing it, that is > currently "your" problem > > if you have /run and your /var/run isn't a symlink to it, then your system > needs updating. we'll be adding checks to openrc to handle/force the > migration. My /var/run is symlink to /run and /run is tmpfs, using sys-apps/openrc-0.9.7. I have the same problem /var/run/screen is missing after each reboot. (In reply to comment #4) Thanks for your explanation, but 1. Though /run is mounted as tmpfs according to the output of mount(1), this is not done manually by me. 2. /var/run on my system is a symlink to /run, and /var/lock is a link to /run/lock, therefore I think I can confirm that I have already completed the migration. (In reply to comment #6) thus your setup has no relevance to my comment #4 I can confirm this bug. After each reboot, directory /var/run/screen is missing. Since /var/run symlinks to /run and /run is mounted as tmpfs, /run is empty after each reboot and /var/run/screen does not exist. /var/run/screen needs to be created after /run is mounted as tmpfs. This could be done by openrc (since sys-apps/openrc-0.9.7 mounts /run in /lib/rc/sh/init.sh at line 103), by a script supplied by app-misc/screen, by /etc/init.d/local, or maybe something else. What would be the right place to create /var/run/screen? $ screen Cannot make directory '/var/run/screen': Permission denied $ ls -ld /var/run/screen ls: cannot access /var/run/screen: No such file or directory $ ls -l /var/run lrwxrwxrwx 1 root root 4 Dec 11 14:29 /var/run -> /run $ mount | fgrep /run tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755) # mkdir /var/run/screen # chmod 4775 /var/run/screen # chgrp utmp /var/run/screen # ls -ld /var/run/screen drwsrwxr-x 2 root utmp 40 Jan 1 13:33 /var/run/screen $ screen (starts a new screen session) Created attachment 297517 [details]
emerge --info
emerge --info
I am re-titling this bug, because we are going to create tmpfiles.d support for openrc [1]. This will solve this issue. [1] http://0pointer.de/public/systemd-man/tmpfiles.d.html (In reply to comment #10) > I am re-titling this bug, because we are going to create tmpfiles.d > support for openrc [1]. This will solve this issue. > > [1] http://0pointer.de/public/systemd-man/tmpfiles.d.html Please consider moving /run/lock creation to that method as well then [1]. [1]:http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=blob;f=sys-apps/systemd/files/gentoo-run.conf Ok, the base of this is in the tree. http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=c75352af3d787377c4aa62baa1331f37db3d1d97 It needs LOTS of testing still, and some clarifications from upstream. Then we need to figure out where to install the tmpfiles.d/*.conf files so that systemd & openrc don't conflict. This will be going out in OpenRC 0.10 after more user testing. Please test it! You're going to have to write your own tests as well. Another user who needs tmpfiles.d is proftpd in inetd mode (/var/rn -> /run/).
It does not start anything from /etc/init.d thus you get problems when try to connect to it:
> Jul 12 00:25:03 sf xinetd[7742]: START: ftp pid=26896 from=127.0.0.1
> Jul 12 00:25:03 sf proftpd[26896]: notice: unable to bind to Unix domain socket at '/var/run/proftpd/test.sock': No such file or directory
Manually creating /var/run/proftpd/ helps.
Would it make sense to have {do,new}tmpfilesd (similar to {do,new}confd) in eutils and/or next EAPI? This bug can be closed, no? tmpfiles.d works fine for me in stable openrc-0.11.8. @robbat2: I am closing this for now. If it should be re-opened, feel free to do so. Hello. I now have problems starting zabbix and nrpe because the directorys /var/run/nrpe and /var/run/zabbix are gone after reboot. Is this supposed to work? best regards Thomas |