-*- org -*-

#+TAGS: nextrelease bugfix

* DONE env vars for 'make-forkexec-constructor'
  - State "DONE"       from ""           [2015-01-30 Fri 09:45]
* DONE other process types [[http://www.hep.by/gnu/pies/Component-Statement.html#SEC8][à la GNU PIES]]
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]
* DONE REPL server started on a root-owned Unix-domain socket
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]
* DONE 'deco status' equivalent to 'deco status dmd'			:dmd:
  - State "DONE"       from "TODO"       [2016-01-08 Fri 22:30]
* DONE 'deco status' has output similar to 'sysctl status'		:dmd:
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]
* DONE [#A] 'deco status XYZ' gracefully handles errors
  - State "DONE"       from "TODO"       [2016-01-18 Mon 23:14]
* DONE [#A] regression fixed
  - State "DONE"       from "TODO"       [2016-01-12 Tue 23:01]

shepherd.scm:242:22: warning: possibly unbound variable `dmd-status'

* DONE "Internals" made less personal
  - State "DONE"       from "TODO"       [2016-01-25 Mon 23:42]
* DONE copyright year in --help
  - State "DONE"       from "TODO"       [2016-01-12 Tue 23:01]
* DONE i18n
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]
* DONE select in main loop (can remove SIGALRM hack?)
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]
* DONE XDG for config file
  - State "DONE"       from "TODO"       [2016-01-20 Wed 11:20]
* DONE XDG for log file
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]
* DONE make-dmd-output-port uses syslog
- State "DONE"       from "MAYBE"      [2023-05-11 Thu 16:13]
* DONE copy stuff to monitor PID files from Guix
  - State "DONE"       from "TODO"       [2016-01-25 Mon 00:07]
* DONE default conf file renamed from /etc/dmd*
- State "DONE"       from "DELEGATED"  [2023-05-11 Thu 16:13]
* DONE command modules moved to (shepherd command xyz)
  - State "DONE"       from "TODO"       [2016-01-27 Wed 11:10]
* DONE &unknown-action-error
  - State "DONE"       from "TODO"       [2016-01-20 Wed 21:26]
* DONE action record type (instead of lists)
  - State "DONE"       from "TODO"       [2016-01-26 Tue 23:22]
* DONE 'herd help'
  - State "DONE"       from "TODO"       [2016-01-24 Sun 22:54]
* TODO [#C] Texinfo in service docstrings
* DONE with-directory-excursion in 'process-command'
  - State "DONE"       from "TODO"       [2016-01-25 Mon 23:23]
* DONE 'conflicts-with' added in status sexp
  - State "DONE"       from "TODO"       [2016-01-27 Wed 10:31]
* DONE [#A] SIGCHLD received over signalfd(2) or via [[https://lwn.net/Articles/773459/][pidfd]]
- State "DONE"       from "TODO"       [2023-05-11 Thu 16:13]

* DONE REPL enters debugger only if `suspendable-continuation?'
- State "DONE"       from "TODO"       [2024-04-01 Mon 22:58]
[[gnus:nnimap+fdn-new:guix#87cyu82pbs.fsf@igalia.com][Email from Andy Wingo: Re: using shepherd's (shepherd service repl) in guix system]]

* DONE Service agent memorizes last exit status of its process

- State "DONE"       from "TODO"       [2024-04-01 Mon 22:58]
* DONE GOOPS interface removed

- State "DONE"       from "TODO"       [2024-05-07 Tue 00:03]
* DONE Guile 2.x support removed
- State "DONE"       from "TODO"       [2024-04-27 Sat 20:37]

* DONE 'at' service/timers added

- State "DONE"       from "TODO"       [2024-04-01 Mon 22:58]
https://linuxconfig.org/how-to-schedule-tasks-with-systemd-timers-in-linux
see =systemctl list-timers=

;; herd list timer -> shows current timers like 'systemctl list-timers'
;; herd at timer TIME COMMAND -> like 'at'
;; herd stop timer -> stop all the timers
;; herd stop foo-timer -> stop specific timed service

;; Vixie:
;; "minute hour day-of-month month day-of-week"

* DONE Built-in log rotation (needs timers) ([[info:rottlog#Configuration parameters][see logrotate method]])

- State "DONE"       from "TODO"       [2024-05-18 Sat 23:12]
* DONE 'syslogd' service added
- State "DONE"       from "TODO"       [2024-08-11 Sun 15:55]

 - [X] /dev/kmsg read
 - [X] can log to multiple files
 - [X] --MARK-- after 20mn of silence
 - [ ] repeated line detection
 - +[ ] call-with-syslog-port produces well-formatted syslog lines+
 - [X] integrated with log-rotation

* DONE 'herd' suggests 'herd doc SVC list-actions' upon unknown actions
- State "DONE"       from "TODO"       [2024-10-06 Sun 16:06]
* DONE 'herd status foo' shows whether there's a pending replacement
- State "DONE"       from "TODO"       [2024-04-17 Wed 10:43]
* MAYBE 'discard' service added (like [[info:inetutils#Built-in services][inetd discard]])

* CANCELED =proc_make_task_namespace= used instead of PR_SET_CHILD_SUBREAPER on GNU/Hurd

* DONE calendar-even-days-of-week takes symbols instead of numbers

- State "DONE"       from "TODO"       [2024-05-08 Wed 15:55]
* DONE after =(sleep (seconds-to-wait ...))=, find out whether we've slept
- State "DONE"       from "TODO"       [2024-04-21 Sun 22:43]

* MAYBE grab ideas from [[https://github.com/F1bonacc1/process-compose][process-compose]]

* TODO =default-environment-variables= is made stricter

* TODO LUKS lock upon suspend (elogind can invoke =herd suspend=)

  - see =dmsetup suspend= and =crypsetup luksSuspend=
  - examples: https://github.com/guns/go-luks-suspend and
    https://github.com/vianney/arch-luks-suspend

* DONE =herd start foo= displays error when =foo= is disabled
- State "DONE"       from "TODO"       [2024-09-01 Sun 22:47]

* DONE =root= service has a logger
- State "DONE"       from "TODO"       [2024-07-17 Wed 23:44]

* TODO support for reconfigurable services via key/value options

  - =make-forkexec-constructor= & co. accept a one-argument procedure that
    takes the service
  - service has key/value dictionary
  - services can define a key/value option interface

* TODO =herd start -D foo= starts =foo= and all its dependents

* DONE =herd status= shows available actions
- State "DONE"       from "TODO"       [2024-09-08 Sun 19:09]

* DONE =shepherd= prints its version string when booting
- State "DONE"       from "TODO"       [2024-09-08 Sun 22:46]

* DONE =herd doc= actions improved
- State "DONE"       from "TODO"       [2024-10-06 Sun 16:06]

* DONE =make-timer-constructor= has =#:repeat?=
- State "DONE"       from "TODO"       [2024-10-12 Sat 14:25]

* TODO Fibers bugs fixed [1/2]

  - [X] [[https://github.com/wingo/fibers/issues/109][memory leak on =get-channel*=]]
  - [ ] [[https://github.com/wingo/fibers/issues/89][timer wheel spinning on time change]]

* DONE =--silent= works (patch on guix-devel)
- State "DONE"       from "TODO"       [2024-09-08 Sun 22:32]

* DONE =call-with-input-file= etc. replaced for O_CLOEXEC (see Guix)
- State "DONE"       from "TODO"       [2024-11-03 Sun 17:50]

* DONE date format passed to =log-line= in system-log.scm
- State "DONE"       from "TODO"       [2024-11-09 Sat 17:04]
* DONE "Jump Start" rewritten
- State "DONE"       from "TODO"       [2024-11-03 Sun 15:51]
* DONE =make dist= is reproducible
- State "DONE"       from "TODO"       [2024-11-03 Sun 22:38]

* DONE =herd run process= added, like =systemd-run=
- State "DONE"       from "TODO"       [2024-12-09 Mon 11:57]

submit spool
submit task
submit job
spawn transient

* TODO auto-restart inetd and not-connected-systemd service replacements

* TODO =close_range= used

* TODO Guile < 3.0.9 code removed                               :nextrelease:

* DONE =spawn-command= documented
- State "DONE"       from "TODO"       [2025-02-20 Thu 23:56]

* TODO anacron-style catch-up for timers                        :nextrelease:

more generally, serialize service state

* TODO =herd restart --batch x y z=                             :nextrelease:

* TODO #:wait-for-termination? changed to #t                    :nextrelease:

* TODO log-rotation improvements                                :nextrelease:
[[mu4e:msgid:87bjsp8kfv.fsf@wolfsden.cz][Re: Regarding removal of the rottlog-service-type]]

  - [ ] #:expiry accepts a procedure (per-file)
  - [ ] #:external-log-file can be a pattern or dynamic

* TODO 'herd queue transient ...'
[[mu4e:msgid:87ecxl78gf.fsf@gnu.org][Re: [shepherd] Setting up a queue for tasks]]

* TODO domain name registered

  - shepherd.ooo
  - shepherd.software
  - shepherd.xyz

* TODO test suite helpers factorized: =eventually=, =within_seconds=, etc.

* TODO =whatis= command for =root= service

  =herd whatis root 123= => 'PID 123 belongs to service XYZ'

* TODO =SIGUSR1= reopens socket (useful for when it has been deleted)

* TODO Dynamic UID/GID allocation for user namespaces

  https://www.man7.org/linux/man-pages/man8/systemd-nsresourced.8.html
  https://systemd.io/UIDS-GIDS/
  
