Add support for NetBSD.#275
Conversation
|
How are you running NetBSD? On bare metal, or in a VM? I'm going to set up a VM to verify compilation, and am curious if you have anything I can crib from for the automation. |
I am running it in a vm (hence also the lack of temperature sensors implementation). In the vm, standard |
For automation in GHA, if you are using something like vmactions you can do something like this build-netbsd-latest-gcc:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Compile
uses: vmactions/netbsd-vm@v1
with:
release: '10.1'
usesh: true
prepare: |
PATH="/usr/pkg/sbin:/usr/pkg/bin:$PATH"
PKG_PATH="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.1/All/"
export PATH PKG_PATH
/usr/sbin/pkg_add pkgin
pkgin -y install go125
git config --global --add safe.directory /home/runner/work/gotop/gotop
run: |
set -e
go125 build -o cmd/gotop/gotop ./cmd/gotop/For exact implementation and prerequisites you can check how it is setup for |
This is the follow up to #274 introducing NetBSD support.
This pull request adds NetBSD support to the project by updating build constraints and introducing a new implementation for process listing on NetBSD. The most significant changes are:
NetBSD Support
widgets/proc_netbsd.gothat implements thegetProcs()function using NetBSD-specificpscommand syntax and output parsing to retrieve process information. This includes careful handling of column widths and conversion of process data.Build Constraints
logging/logging_dup2.goto includenetbsd, ensuring the file is included in NetBSD builds.Screenshot
Running in NetBSD 10.1.