-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add specific openbsd feature to disable use of utmpx #5613
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
Conversation
Signed-off-by: Laurent Cheylus <foxy@free.fr>
- add target_os cfg for pline function - add target_os cfg for auditd function (void on OpenBSD) Signed-off-by: Laurent Cheylus <foxy@free.fr>
Signed-off-by: Laurent Cheylus <foxy@free.fr>
- build.rs: add openbsd in krate list - Cargo.toml: add feature openbsd => no utmpx support - Fixes uutils#5596 Signed-off-by: Laurent Cheylus <foxy@free.fr>
Signed-off-by: Laurent Cheylus <foxy@free.fr>
@@ -110,6 +110,8 @@ cargo build --release --features macos | |||
cargo build --release --features windows | |||
# or ... | |||
cargo build --release --features unix | |||
# or ... | |||
cargo build --release --features openbsd |
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.
sorry but why do you want a new category ?
openbsd should be in unix
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.
No, openbsd cannot be in "unix" because it includes feat_require_unix_utmpx
, unsupported on OpenBSD.
@@ -25,6 +25,7 @@ build = "build.rs" | |||
default = ["feat_common_core"] | |||
## OS feature shortcodes | |||
macos = ["feat_os_macos"] | |||
openbsd = ["feat_os_openbsd"] |
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.
sorry but i am not a fan of creating an exception for openbsd
I guess it is for utmpx?
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.
To disable support of utmpx
(not supported on OpenBSD), I created a new specific feature "openbsd" not including feat_require_unix_utmpx
, see #5596 for detailed explanations. @tertsdiepraam agreed my proposal.
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.
still, i don't think we want exceptions for every distro or unix :(
what about creating a "fake" utmpx for openbsd ? and the command would return "unsupported"
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.
OK, I could try another solution:
- close this PR and remove my work to add a specific feature "openbsd" => include openbsd in "unix" as others Unixes OS
- create a fake utmpx support => unsupported for tools where it's required :
pinky
,uptime
,users
andwho
- in a second time, implement an "alternative utmpx" support for OpenBSD for
pinky
,uptime
,users
andwho
binaries.
Do you agree ?
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.
sounds good, thanks :)
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.
Proposal submited in PR#5620
PR canceled after discussion with @sylvestre |
openbsd
feature