-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FreeBSD process helper to facilitate FreeBSD builds #531
Conversation
Check the Change this: # Test specific dev-dependencies
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
whoami = "1"
procfs = { version = "0.16", default-features = false } To this: # Test specific Linux + BSD specific dev-dependencies
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
whoami = "1"
# Test specific Linux dev-dependencies
[target.'cfg(target_os = "linux")'.dependencies]
procfs = { version = "0.16", default-features = false } In # Unix
[target.'cfg(unix)'.dependencies]
libproc = "0.14.6"
whoami = "1"
# Linux only
[target.'cfg(target_os = "linux")'.dependencies]
procfs = { version = "0.16", default-features = false } Becomes # Unix
[target.'cfg(unix)'.dependencies]
whoami = "1"
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
libproc = "0.14.6"
# Linux only
[target.'cfg(target_os = "linux")'.dependencies]
procfs = { version = "0.16", default-features = false } So. If Pueue is to have proper support for FreeBSD, I want this to be properly tested. Please:
|
Thanks for the tip! I've added an additional commit to break out the procfs support further. While FreeBSD does still have a way to mount procfs, it isn't enabled by default. This adds another step for users and is wonderful to be able to bypass it whenever we have another means. Unfortunately, I don't believe I have time to dedicate to revamping the tests suite or CI Pipeline for FreeBSD support. However, I can tell you that the commits in this PR (or a close variation of them) have been in use in the FreeBSD ports tree since pueue v3.0.0, when it was first added on Dec 25 2022. You can view the history here. Lastly, there is one additional patch that we include (adopted from alpine linux):
I'm happy to add this to my PR, if desired. |
Heyo, sorry for the late response. Had somewhat of a busy week. When I read that patch correctly, it adds The freebsd discussion that ported the fix: |
It's super fascinating to see how pueue is packaged :D In the future, I would be more than happy to release a new patch whenever something breaks due to changes in the build environment/toolchain. Just give me a ping :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good :)
I'll wait for the CI to pass and push a patch release soon afterwards!
Edit: Small format lint 😁
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #531 +/- ##
==========================================
+ Coverage 80.28% 80.30% +0.01%
==========================================
Files 77 77
Lines 5666 5666
==========================================
+ Hits 4549 4550 +1
+ Misses 1117 1116 -1 ☔ View full report in Codecov by Sentry. |
Test Results 3 files 22 suites 2m 53s ⏱️ Results for commit cffb17c. |
This sounds amazing and will certainly make the updating process on the FreeBSD ports tree side of things much easier! Thanks! |
Fixed that lint for you :) Thanks for the contribution! I'll release a patch soon. |
These patches are already part of the FreeBSD port for pueue. Including them here will make port updates a little easier.
You can view existing applied patches here.
To completely fix the build, we also need to remove procfs/libproc from the Cargo files [while building under Freebsd]. I wasn't sure on the best way to achieve this, so I am simply noting it here.
Checklist
Please make sure the PR adheres to this project's standards:
CHANGELOG.md
.cargo clippy
andcargo fmt
. The CI will fail otherwise anyway.