summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-03-16openrc-run: Iterate all scriptdirs in reverse order to load configs.origin/scriptdir_loadAnna (navi) Figueiredo Gomes
Less error prone and more flexible, and allows for better support of multiple script dirs.
2025-03-15openrc-init: use self-pipe to handle signals safelyNRK
the current code uses a bunch of signal unsafe functions inside the signal handlers. this gets those code outside using self-pipe trick so that there's no more issues. also save and restore errno inside signal handlers in order to avoid clobbering errno for the calling code. the SIGCHLD handler is still seperate since we want to reap zombies as soon as possible. Ref: https://github.com/OpenRC/openrc/issues/589
2025-03-15openrc-init: use poll for waiting on the fifoNRK
this sets us up for being able to use "self-pipe trick" to handle signals safely.
2025-03-15man/rc_config.3: fix rc_yesno descriptionNRK
Closes: https://github.com/OpenRC/openrc/issues/706
2025-03-13pipes: use _exit insteadNRK
it's generally advisable to use `_exit` rather than `exit` from forked child to avoid triggering things like `atexit` handlers and whatnot.
2025-03-13pipes: don't leak pipes on fork errorNRK
2025-03-11shared/misc: fix types on close_range wrapper (#789)Doug Freed
The syscall expects unsigned integers.
2025-03-08init.d/*: Quote the argument of ":" commandsUlrich Müller
This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223
2025-03-08openrc-user: set LOGNAME to user->pw_nameAnna (navi) Figueiredo Gomes
2025-03-08shared: allow LOGNAME variable for user-modeAnna (navi) Figueiredo Gomes
2025-03-07meson.build: add pam_libdir build optionAnna (navi) Figueiredo Gomes
distros might set a different directory for pam security modules, this allows them to specify a value, defaults to $prefix/$libdir/security
2025-03-07shared: allow user, shell, and xdg state/cache home vars for usersAnna (navi) Figueiredo Gomes
Closes: https://github.com/OpenRC/openrc/issues/781
2025-03-07shared: only allow XDG and user variables when in user modeAnna (navi) Figueiredo Gomes
2025-03-07openrc-run: remove unused variableAnna (navi) Figueiredo Gomes
2025-03-07openrc: use XDG_STATE_HOME for rc_logger.Anna (navi) Figueiredo Gomes
2025-03-07openrc: chdir to $HOME in user mode.Anna (navi) Figueiredo Gomes
2025-03-05docs: fix spelling errors/typosdoasu
Signed-off-by: doasu <me@doasu.dev>
2025-03-05docs: fix grammar errorsdoasu
the 'a' article should be used before 'usual', as the word starts with a consonant (/ˈjuːʒʊəl/ -> j) Signed-off-by: doasu <me@doasu.dev>
2025-03-05docs: fix typo in user-guide.mddoasu
Signed-off-by: doasu <me@doasu.dev>
2025-02-28pam_openrc: add aditional loggingAnna (navi) Figueiredo Gomes
2025-02-28librc: fix loading rc.confAnna (navi) Figueiredo Gomes
Passing the wrong variable over, we were trying to load /etc, not /etc/rc.conf
2025-02-27version 0.560.60William Hubbs
2025-02-27update news for version 0.60William Hubbs
2025-02-27update newsWilliam Hubbs
2025-02-27docs: Document auto-starting mechanismsAnna (navi) Figueiredo Gomes
2025-02-27docs: Mark user services as experimentalAnna (navi) Figueiredo Gomes
2025-02-27openrc-run: Load user configs when using system-provided user sevices.Anna (navi) Figueiredo Gomes
2025-02-27openrc-user, pam_openrc, init.d/user: Add autostart for user services.Anna (navi) Figueiredo Gomes
2025-02-27openrc-run: Allow symlinks to exist in different directories.Anna (navi) Figueiredo Gomes
This is necessary for services in rc_svcdir() to be executed properly. We then set RC_SVCNAME to applet, taken directly from argv[1], then we call realpath on argv[1]. This allow us to execute `service` even after chdir(), even if argv[1] is a relative path, and allows openrc-run.sh to find conf.d since RC_SERVICE is derived from `service`, not applet.
2025-02-27librc: Add rc_svcdir() to rc_scriptdirs().Anna (navi) Figueiredo Gomes
This allows the instantiation of scripts at runtime, so we can, for example, create user.<username> for user-services without writing anything to /etc (or any permanent storage, for that matter).
2025-02-23*-daemon: Error check initialization of ready fd in child process.Anna (navi) Figueiredo Gomes
2025-02-23start-stop-daemon: Zero initialize ready struct.Anna (navi) Figueiredo Gomes
2025-02-22man: Document ready flag and variable.Anna (navi) Figueiredo Gomes
2025-02-22sh/*-daemon: Add --ready flag support.Anna (navi) Figueiredo Gomes
2025-02-22misc, *-daemon: Implement s6-style readiness notification.Anna (navi) Figueiredo Gomes
Adds two helper functions, and allows scripts to wait until services are ready before proceeding with it's dependees by setting `ready=fd:<num>`, where <num> is the file descriptor the daemon should write a new line to.
2025-02-21librc: Enumate scriptdir entries, and avoid allocating them for user.Anna (navi) Figueiredo Gomes
2025-02-21librc: Remove rc_set_root for now.Anna (navi) Figueiredo Gomes
Not implemented, should not have been commited yet.
2025-02-17openrc-run: Add timeout to svc_execAnna (navi) Figueiredo Gomes
we're timing out when starting dependencies, but not when starting the service itself, which leads to boot stalling if any service directly from a runlevel stalls to start.
2025-01-08build: remove invalid subdirectory from Cflags line in *.pc filesWilliam Hubbs
2025-01-07docs: Add basic user-services documentation.Anna (navi) Figueiredo Gomes
2025-01-07openrc-run: Move argument parsing before env setupAnna (navi) Figueiredo Gomes
We need to handle --user before calling any functions that interact with librc.
2025-01-07misc: Add --user/-U flag to common flags.Anna (navi) Figueiredo Gomes
Some binaries required to have their `atexit(cleanup)` calls moved to after argument parsing, since setting user mode also adds an atexit call, and cleaning up user paths should only happen after the cleanup of the application is done, thus needs to be set first.
2025-01-07openrc-run: Chdir into HOME for user services.Anna (navi) Figueiredo Gomes
Some services might expect to be in home, and may behave unexpectedly for the user, e.g. any program started via dbus, and this matches systemd-user behaviour.
2025-01-07openrc-run: Disable cgroups for user services due to lack of permissions.Anna (navi) Figueiredo Gomes
2025-01-07openrc: Allow user-specific env vars.Anna (navi) Figueiredo Gomes
Those variables are required for user scripts to work properly.
2025-01-07librc: Overlay user configs.Anna (navi) Figueiredo Gomes
Add a new function to librc, `rc_usrconfdir()`, whick returns the location where user-made rc.conf exists. The user-made configuration is loaded first over the global config, so it takes priority when resolving variables, thus "overriding" global configs.
2025-01-07librc: Add support for user paths.Anna (navi) Figueiredo Gomes
Adds two functions to librc, rc_set_user() and rc_is_user(). The latter just queries if the former was called. The former instantiates paths for locations that make sense for user services: Script dirs get set to $XDG_CONFIG_HOME/openrc/{init.d,conf.d}, and variations of the system sysconf dirs with "user.d/" as a suffix. Runlevel dir is set to $XDG_CONFIG_HOME/openrc/runlevels, and the svcdir is set to $XDG_RUNTIME_DIR/openrc. XDG_CONFIG_HOME falls back to $HOME/.config should it be unset. XDG_RUNTIME_DIR has no fallback, and thus required for user services.
2024-12-30version 0.560.56William Hubbs
2024-12-30update newsWilliam Hubbs
2024-11-02ci: use ubuntu-24.04 image for coverity as wellAnna (navi) Figueiredo Gomes
This will be used until the roll-out is completed in the following issue: Bug: https://github.com/actions/runner-images/issues/10636