Skip to content

activation: stub out for plan9 #440

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flokli
Copy link

@flokli flokli commented May 3, 2024

plan9 doesn't have syscall.CloseOnExec, causing anything using activation to fail when building on plan9:

2024/05/03 12:12:51 Failed to run [go build --ldflags -s -X github.com/rclone/rclone/fs.Version=v1.67.0-beta.7911.f8ce568ca.merge -trimpath -o rclone-v1.67.0-beta.7911.f8ce568ca.merge-plan9-386/rclone -tags  ..]: exit status 1
2024/05/03 12:12:51 Command output was:
Error: ../../../../go/pkg/mod/github.com/coreos/go-systemd/[email protected]/activation/files_unix.go:60:11: undefined: syscall.CloseOnExec

Seen on rclone/rclone#7801

@flokli
Copy link
Author

flokli commented May 25, 2024

Another option would be to make this explicitly a linux version, and use the stub everywhere else. Any opinions? @cgwalters @bgilbert

Copy link
Collaborator

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the LISTEN_ env used somehwere else outside of systemd. In general just using linux as build tag seems reasonable to me as long as it is not used on other OS somehow?

@kolyshkin WDYT?

@kolyshkin
Copy link
Collaborator

I'd just add go:build unix and go:build !unix.

plan9 doesn't have syscall.CloseOnExec, causing anything using
`activation` to fail when building on plan9:

```
2024/05/03 12:12:51 Failed to run [go build --ldflags -s -X github.com/rclone/rclone/fs.Version=v1.67.0-beta.7911.f8ce568ca.merge -trimpath -o rclone-v1.67.0-beta.7911.f8ce568ca.merge-plan9-386/rclone -tags  ..]: exit status 1
2024/05/03 12:12:51 Command output was:
Error: ../../../../go/pkg/mod/github.com/coreos/go-systemd/[email protected]/activation/files_unix.go:60:11: undefined: syscall.CloseOnExec
```
@flokli flokli force-pushed the activation-plan9-stub branch from 553c525 to 61f1d85 Compare August 14, 2025 12:28
@flokli
Copy link
Author

flokli commented Aug 14, 2025

I'd just add go:build unix and go:build !unix.

Done! PTAL.

Copy link
Collaborator

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants