Re: [gentoo-portage-dev] [PATCH v2] env-update: create systemd env configuration if required

2020-09-03 Thread Florian Schmaus
On 03.09.20 14:43, Ulrich Mueller wrote:
>> On Thu, 03 Sep 2020, Florian Schmaus wrote:
> 
>> It's not really maintaining the information twice. The information is
>> maintained at a single point: /etc/env.d
>> And from there is is transformed by env-update already into two
>> different formats:
>> - /etc/profile.env
>> - /etc/csh.env
> 
>> And with that change additionally into
>> - /usr/lib/environment.d/gentoo-profile-env.conf
> 
> Sorry for another nitpick, but it's changing a file in /usr at runtime> Also, 
> does the file belong to any package, or is it an orphan?

It's an orphan.

> Maybe it would be cleaner to generate the file in /etc like the others,
> if necessary with a symlink in /usr/lib/environment.d?

Good point. A symlink wont be necessary. We could also generate the file
in /etc/environment.d

I guess /etc/environment.d is preferred over /usr/lib/environment.d?
I'll make the according changes to the patch.

- Florian





signature.asc
Description: OpenPGP digital signature


Re: [gentoo-portage-dev] [PATCH v2] env-update: create systemd env configuration if required

2020-09-03 Thread Ulrich Mueller
> On Thu, 03 Sep 2020, Florian Schmaus wrote:

> It's not really maintaining the information twice. The information is
> maintained at a single point: /etc/env.d
> And from there is is transformed by env-update already into two
> different formats:
> - /etc/profile.env
> - /etc/csh.env

> And with that change additionally into
> - /usr/lib/environment.d/gentoo-profile-env.conf

Sorry for another nitpick, but it's changing a file in /usr at runtime?
Also, does the file belong to any package, or is it an orphan?

Maybe it would be cleaner to generate the file in /etc like the others,
if necessary with a symlink in /usr/lib/environment.d? The symlink could
belong to some package, maybe even sys-apps/systemd itself.

Ulrich


signature.asc
Description: PGP signature


Re: [gentoo-portage-dev] [PATCH v2] env-update: create systemd env configuration if required

2020-09-03 Thread Florian Schmaus
On 03.09.20 13:30, Ulrich Mueller wrote:
>> On Thu, 03 Sep 2020, Florian Schmaus wrote:
> 
>> This commit changes env-update so that, after profile.env has was
>> generated, a systemd user session environment configuration file named
> 
>> /usr/lib/environment.d/gentoo-profile-env.conf
> 
>> is created, if the directory /usr/lib/environment.d exists.
> 
> Maybe a stupid question, but can't this file just source /etc/profile?

Akin to what 96e0294f0892 ("Add env gen to inject full Gentoo PATH to
services") in gentoo-systemd-integration does?

Unfortunately the answer is 'no', because gentoo-profile-env.conf is not
an interactive script, it is just a systemd configuration file.

> Maintaining the same information twice doesn't look like the right thing
> to do.

It's not really maintaining the information twice. The information is
maintained at a single point: /etc/env.d
And from there is is transformed by env-update already into two
different formats:
- /etc/profile.env
- /etc/csh.env

And with that change additionally into
- /usr/lib/environment.d/gentoo-profile-env.conf

- Florian



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-portage-dev] [PATCH v2] env-update: create systemd env configuration if required

2020-09-03 Thread Ulrich Mueller
> On Thu, 03 Sep 2020, Florian Schmaus wrote:

> This commit changes env-update so that, after profile.env has was
> generated, a systemd user session environment configuration file named

> /usr/lib/environment.d/gentoo-profile-env.conf

> is created, if the directory /usr/lib/environment.d exists.

Maybe a stupid question, but can't this file just source /etc/profile?
Maintaining the same information twice doesn't look like the right thing
to do.

Ulrich


signature.asc
Description: PGP signature