Bug 290766 - x11/xfce4-screensaver: Needs a patch for replacing pidof with pgrep
Summary: x11/xfce4-screensaver: Needs a patch for replacing pidof with pgrep
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-xfce (Nobody)
URL: https://gitlab.xfce.org/apps/xfce4-sc...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-03 07:02 UTC by p5B2EA84B3
Modified: 2025-11-16 23:55 UTC (History)
1 user (show)

See Also:
madpilot: maintainer-feedback+


Attachments
patch v1 (1.49 KB, patch)
2025-11-04 12:47 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description p5B2EA84B3 2025-11-03 07:02:06 UTC
The activated xfce4-screensaver throws this error on wakening input events:
sh: pidof: not found

Mar 23, 2020 an upstream issue has been filed but has been ignored since: 
replace ugly pidof | wc -l by pgrep
https://gitlab.xfce.org/apps/xfce4-screensaver/-/issues/38

Just replace pidof there with a patch:
https://gitlab.xfce.org/apps/xfce4-screensaver/-/blob/master/src/gs-lock-plug.c#L183

FYI: https://mywiki.wooledge.org/BadUtils#pidof
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2025-11-03 07:52:28 UTC
Hi,

Thanks for reporting this issue; I'll be taking a look.

In the while, could you please provide an indication how to reproduce the issue? I never encountered it, I think I can find a way by looking into the issue but it would be easier with some indication.

Also, please avoid unkind words in bug reports toward anyone. Upstream XFCE developers are also usually very collaborative, many of them do use FreeBSD and most often things work out of the box. Calling them unkind terms will not be helpful for future collaboration.

I also notice that this pidof utility is present in the ports tree, so maybe we could add it as a dependency.

Patching software diverging from upstream is something I try to avoid.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2025-11-04 12:47:15 UTC
Created attachment 265149 [details]
patch v1

Hi,

I have created a simple patch to use pgrep.

It compiles, but I have had no chance to try to actually run test this part of the code.

Can you test this and report if it works?

My plan is to submit this upstream once it is confirmed working, and get feedback there before committing to the ports tree.

Thanks in advance.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2025-11-15 17:59:15 UTC
I performed some testing and my patch looks fine to me, so I submitted it upstream [1].



[1] https://gitlab.xfce.org/apps/xfce4-screensaver/-/merge_requests/58
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-11-16 23:53:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=011b1ad03840f50758ec654a7b6077eb80cfc7e9

commit 011b1ad03840f50758ec654a7b6077eb80cfc7e9
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2025-11-16 23:50:44 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2025-11-16 23:50:44 +0000

    x11/xfce4-screensaver: Use pgrep instead of pidof

    Import patch accepted upstream to use pgrep, instead of pidof, which
    is not a dependency of this port.

    Use switching from the screen saver should be fixed by this change.

    PR:             290766
    Obtained from:  https://gitlab.xfce.org/apps/xfce4-screensaver/-/merge_requests/58

 x11/xfce4-screensaver/Makefile                     |  1 +
 .../files/patch-src_gs-lock-plug.c (new)           | 51 ++++++++++++++++++++++
 2 files changed, 52 insertions(+)
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2025-11-16 23:55:25 UTC
My proposed patch was accepted upstream.

Patch also imported in our tree.

Thanks.