aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/autoroot.go
AgeCommit message (Collapse)Author
5 dayscontainer: enter init path earlyOphestra
There is generally no use case where any setup is required before init, and requiring the explicit function call is error-prone and unnecessary. It also causes trouble with packages using a similar trick. This change moves argv0 check early and makes it an import side effect. The stub will be removed in v0.5. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17fhs: move from containerOphestra
This package is not container-specific. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17check: move from containerOphestra
This package is not container specific, and widely used across the project. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-28container: improve documentationOphestra
This change removes inconsistencies collected over time in this package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: call op method right before initial processOphestra
This is at a point considered to be already "within" the container. Daemons internal to the container can be started here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-09message: relocate from containerOphestra
This package is quite useful. This change allows it to be imported without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/fhs: move pathname constantsOphestra
This allows referencing FHS pathnames without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/check: move absolute pathnameOphestra
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-29container: remove global msgOphestra
This frees all container instances of side effects. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-28container/init: reduce verbose noiseOphestra
This makes it possible to optionally omit the identifying verbose message, for when the Op implementation can provide a much more useful message in its case, using information not yet available to the String method. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-29container/init: unwrap path errorsOphestra
These are also now handled by init properly, so wrapping them in self is meaningless and unreachable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-29container: repeat and impossible state typesOphestra
This moves repeated Op errors and impossible internal state errors off of msg. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25container/autoroot: remove prefix fieldOphestra
This field has been a noop for a long time. Remove it to prevent further confusion. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/init: wrap syscall helper functionsOphestra
This allows tests to stub all kernel behaviour, enabling measurement of all function call arguments and error injection. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-21container/init: op interface valid methodOphestra
Check ops early and eliminate duplicate checks. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/init: use absolute compare methodOphestra
More checks are also added. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/autoroot: check host path equivalence by valueOphestra
This will never return true otherwise unless the equivalent paths happen to be interned by the caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/autoroot: filter dentry with empty nameOphestra
This is unreachable, but nice to have just in case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17container: enforce nonrepeatable autoetc and autorootOphestra
These keep track of some internal state, and they don't make sense to have multiple instances of anyway, so instead of dealing with that, just make them nonrepetable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17container: allow additional state between opsOphestra
This is useful for ops that need to be aware of previous instances of themselves. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-11container: use absolute for pathnameOphestra
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/path: fhs path constantsOphestra
This increases readability since this can help disambiguate absolute paths from similarly named path segments. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01container: implement autoroot as setup opOphestra
This code is useful beyond just pd behaviour, and implementing it this way also reduces IPC overhead. Signed-off-by: Ophestra <cat@gensokyo.uk>