Re: Advice needed: updating whowatch 1.4 → 1.8.6 on FreeBSD (wtmp/utmpx issues)
Miroslav Lachman <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ports |
|---|---|
| Message-ID | <[email protected]> |
On 09/01/2026 12:05, Jishan Alam wrote: > Thank you for preparing and sharing the port patch. I’ve reviewed it > locally and can confirm that it builds and runs as expected. However, > since the upstream code is still unstable, I’d prefer to hold off on > committing it for now. Yes, I agree, I did it just to be able to build it on our build machine. It is not meant to be pushed to the ports tree now. > > Your fixed version of whowatch runs, but it has different UI from the > > old version 1.4, and the older version had colors for characters used > > for tree branches. As I understand, it has nothing to do with your utmpx > > fix, it was probably made by original author. > > That matches my understanding as well. I haven’t used whowatch prior to > working on this update, so I don’t have historical context for the UI > changes beyond what’s present in the upstream code. If you are interested I have access to one old machine with working whowatch 1.4 so I can make a few screenshots with the old UI and send it to you privately. I think there are a few details which were nicer in the old version. > > One issue I found is that on one machine it does not display process > > [o]wner info, it shows -1 instead. I don't know why. On the other > > machine it shows the correct owner info. Botch machines are 14.3 amd64. > > On botch machines I tried to run it as normal user and as root. > > Thanks for pointing this out. I’ll take a closer look at how the owner > information is parsed and will follow up once I have a better > understanding of what’s causing the discrepancy. Do you think you will be able to make [d]etails also working on FreeBSD? [d]etails and [s]ysinfo is new to this version, they were not there in the version 1.4. But there was [c]md which turns On / Off showing long command line options of the running processes or process name only. So for shell scripts you see just "sh" or "/home/user/bin/myscript.sh -t -b my-arg" > In parallel, I’ve been making progress on the sysinfo issue. It turns > out the existing implementation is largely Linux-specific, relying on / > proc/*, which doesn’t translate well to FreeBSD. To address this, I’m > redesigning the sysinfo layer to be more OS-neutral by introducing > abstract interfaces with OS-specific implementations. On Linux this will > continue to use /proc, while on FreeBSD it will rely on the sysctl API. > > I’ve pushed the latest changes to my branch and will continue working > through the remaining sysinfo components. It’s a fairly broad change, > but now that the structure is in place, the rest should be straightforward. I really appreciate your work on this! Best regards Miroslav Lachman