Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616544 - sys-apps/systemd - meson - how to handle rootprefix/udevlibexecdir?
Summary: sys-apps/systemd - meson - how to handle rootprefix/udevlibexecdir?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-25 06:53 UTC by Mike Gilbert
Modified: 2017-07-27 17:01 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2017-04-25 06:53:39 UTC
I would like to solicit some feedback from the rest of the Gentoo systemd team on an issue that is coming our way.

It looks like systemd upstream is going to migrate from autotools to meson.

https://github.com/systemd/systemd/pull/5704

This means that a few autoconf/make hacks we use will stop working. One of these hacks is our handling of rootprefx and udevlibexecdir.

Normally, udevlibexecdir is derived from rootprefix. Therefore, upstream only really supports two configs:

Config 1 (merged /usr):
rootprefix=/usr
udevlibexecdir=/usr/lib/udev

or 

Config 2 (separate /usr):
rootprefix=/
udevlibexecdir=/lib/udev

Through the use of some make variable hackery, Gentoo currently does this:

rootprefix=/usr
udevlibexecdir=/lib/udev

I do not see an obvious way to make this work with the new meson build system without patching.


Possible solutions:


Solution 1: Migrate to either of upstream's supported configs

Config 1 would break udev rules, and upstream does not recommend using it unless the /usr merge has taken place.

Config 2 is the more natural fit for Gentoo, but it will require users to update their boot loader configs since the systemd[1] binary would move.


Solution 2: Ask upstream to add an independent "udevlibexecdir" meson option

This would be the simplest option, but I'm not sure I like asking for it and I'm not sure upstream wants to support it.


Solution 3: Patch meson.build at the distro level perpetually
Comment 1 William Hubbs gentoo-dev 2017-04-26 00:12:37 UTC
IMO Solution 1, config 2.
Yes, this will cause people to have to change their boot loader configs, but once it is done, even if the /usr merge takes place, they won't have to change them again unless they want to.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-04-26 06:36:13 UTC
(In reply to William Hubbs from comment #1)
> IMO Solution 1, config 2.
> Yes, this will cause people to have to change their boot loader configs, but
> once it is done, even if the /usr merge takes place [...]

...which is never.
Comment 3 Mike Gilbert gentoo-dev 2017-04-27 17:19:22 UTC
I have implemented the rootprefix change (solution 1, config 2) in systemd-9999.

I also added compatibility symlinks for /usr/lib/systemd/systemd and /usr/lib/systemd/systemd-shutdown so systems do not break.