Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370453 - app-misc/screen should not expect hard coded socket-dir /var/run/screen to be present
Summary: app-misc/screen should not expect hard coded socket-dir /var/run/screen to be...
Status: RESOLVED DUPLICATE of bug 333821
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 13:09 UTC by yegle
Modified: 2012-01-16 19:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tmpfiles.d configuration for screen (screen.conf,130 bytes, text/plain)
2011-06-09 09:01 UTC, Henry Gebhardt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yegle 2011-06-07 13:09:23 UTC
app-misc/screen hard coded /var/run/screen in ebuild file, which is not compatible with sys-apps/systemd.

systemd will re-create the whole /var/run directory every reboot, so /var/run/screen need to be manually created and chmod to 777.



Reproducible: Always

Steps to Reproduce:
1.emerge systemd and replace sysvint
2.reboot
3.run screen
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-06-08 17:37:00 UTC
Michał, As the systemd guy, will you please post the optimal solution for this bug here? Then it will be reviewed for inclusion. Thanks.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-08 18:33:45 UTC
AFAICS Fedora still uses the standard socket dir.

How about using /var/lib? That seems quite correct.
Comment 3 Henry Gebhardt 2011-06-09 09:01:09 UTC
Created attachment 276339 [details]
tmpfiles.d configuration for screen

The solution with systemd is to use a configuration file /etc/tmpfiles.d/screen.conf. systemd will take care of creating and cleaning the directories defined in there, see "man tmpfiles.d" if you have systemd installed (screen is in fact the example at the end of that manpage).
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-09 16:53:43 UTC
I guess I shall add systemd_dotmpfilesd() function to the eclass.

Henry, maybe are you aware if screen upstream is interested in integrating that file? I'm not sure if even systemd upstream knows how to handle installing them in packages...
Comment 5 Henry Gebhardt 2011-06-10 21:42:16 UTC
(In reply to comment #4)
> I guess I shall add systemd_dotmpfilesd() function to the eclass.

Yeah, that's a good idea. It should install to /usr/lib/tmpfiles.d/, so they can be overridden in /etc/tmpfiles.d/ by the administrator.

> 
> Henry, maybe are you aware if screen upstream is interested in integrating that
> file? I'm not sure if even systemd upstream knows how to handle installing them
> in packages...

I have no idea about screen upstream. Installing tmpfiles is not a problem. systemd installs two of them itself, so we can just copy... :-) Making a patch won't be entirely trivial, however, because the path can be changed at ./configure time (as is done in the screen ebuild).
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-11 06:06:56 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I guess I shall add systemd_dotmpfilesd() function to the eclass.
> 
> Yeah, that's a good idea. It should install to /usr/lib/tmpfiles.d/, so they
> can be overridden in /etc/tmpfiles.d/ by the administrator.

...and done.

> > 
> > Henry, maybe are you aware if screen upstream is interested in integrating that
> > file? I'm not sure if even systemd upstream knows how to handle installing them
> > in packages...
> 
> I have no idea about screen upstream. Installing tmpfiles is not a problem.
> systemd installs two of them itself, so we can just copy... :-) Making a patch
> won't be entirely trivial, however, because the path can be changed at
> ./configure time (as is done in the screen ebuild).

It's basically using sed like devs need to do for unit files.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-12 17:02:38 UTC
(In reply to comment #1)
> Michał, As the systemd guy, will you please post the optimal solution for this
> bug here? Then it will be reviewed for inclusion. Thanks.

Well, anyway, as we see it, an optimal solution is to use the tmpfiles.d file as described by Henry. If you'd like to install it along with screen, we'd be happy to provide a patch for you.

I'd suggest also considering using /run instead of /var/run; seems like the former directory is slowly replacing the latter one lately.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2012-01-16 19:37:26 UTC

*** This bug has been marked as a duplicate of bug 333821 ***