Summary: | [Feature Request] sys-apps/portage: Make env-update execute post-update scripts | ||
---|---|---|---|
Product: | Portage Development | Reporter: | konsolebox <konsolebox> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Simple patch to make it work
Working post-update script that updates secure_path Working post-update script that updates secure_path (V2) Working post-update script that updates secure_path (V3) Working post-update script that updates secure_path (V4) Working post-update script that updates secure_path (V5) Updated to work with 3.0.28 |
Description
konsolebox
2021-03-20 14:56:55 UTC
Created attachment 692598 [details, diff]
Simple patch to make it work
The solutions sounds somewhat complicated for a PATH ordering issue, so I'd like to understand why there's not a simpler way to generate an appropriate PATH setting, if that really is the case. If we'd like to make secure_path follow the generated [ROOT]PATH from env.d, this is the only way to make it consistent. Also I believe this can also help with other things that has to be regenerated everytime something significant in /etc/env.d is modified. Created attachment 692676 [details]
Working post-update script that updates secure_path
Created attachment 692688 [details]
Working post-update script that updates secure_path (V2)
Created attachment 692691 [details]
Working post-update script that updates secure_path (V3)
There's no need to check if ROOTPATH has /usr/sbin since the default already has it, and secure_path should have a conservative value, so avoid including values from PATH. A path should also be in ROOTPATH anyway if it's meant to run as EUID 0.
Created attachment 692721 [details]
Working post-update script that updates secure_path (V4)
Avoid updating secure_path if it's already up-to-date to lessen noise and write IO
Created attachment 692730 [details]
Working post-update script that updates secure_path (V5)
Exclude "\n" in printf assignment and use more EPREFIX
Created attachment 747183 [details, diff]
Updated to work with 3.0.28
I customized the official ebuild so it includes this feature. It can be enabled with the 'unofficial' use flag. https://github.com/konsolebox/overlay/tree/master/sys-apps/portage |