Subject: bug#78718: Calling rdiff-backup in timers fail

From: Simon Streit <[email-masked]>
Date: Sun, 08 Jun 2025 11:48:22 +0200

Hello,

the package rdiff-backup can't find ps if it is used in timers:

--8<---------------cut here---------------start------------->8---
2025-06-08 11:15:09 localhost shepherd[1]: Timer 'backup' spawned process 11779.
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup] Traceback (most recent call last):
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/bin/.rdiff-backup-real", line>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     sys.exit(load_entry_point('rdiff-backup==2.2.6', 'console_scripts', 'rdiff-backup')())
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     sys.exit(main_run(sys.argv[1:]))
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]              ^^^^^^^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     ret_val |= conn_act.setup()
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]                ^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     ret_code = self.repo.setup(self.dir, owners_map=owners_map,
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     lock_result = self.lock()
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]                   ^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     return self._shadow.lock(self.lockfile, self.must_be_writable)
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     'cmd': simpleps.get_pid_name(pid),
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]            ^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/fhzcy6lq1kgz3l40xmn493jjs1nl04f7-rdiff-backup-2.2.6/lib/python3.11/site-packages/>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     output = subprocess.run(
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]              ^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/xk9rvp232a2kdjmm20c0bks3x3wjpi4n-python-3.11.11/lib/python3.11/subprocess.py", li>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     with Popen(*popenargs, **kwargs) as process:
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/xk9rvp232a2kdjmm20c0bks3x3wjpi4n-python-3.11.11/lib/python3.11/subprocess.py", li>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     self._execute_child(args, executable, preexec_fn, close_fds,
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]   File "/gnu/store/xk9rvp232a2kdjmm20c0bks3x3wjpi4n-python-3.11.11/lib/python3.11/subprocess.py", li>
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup]     raise child_exception_type(errno_num, err_msg, err_filename)
2025-06-08 11:15:10 localhost shepherd[1]: [rdiff-backup] FileNotFoundError: [Errno 2] No such file or directory: 'ps'
--8<---------------cut here---------------end--------------->8---

I confirmed this with a clean container in Guix Home that is only
prepared with a timer calling it.

Adding python-psutil solves this.  Therefor I recommend adding it to
the input list.

Kind regards

-- 
Simon