Skip to content
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

[email protected] #3149

Merged
merged 4 commits into from
Nov 12, 2024
Merged

[email protected] #3149

merged 4 commits into from
Nov 12, 2024

Conversation

malt3
Copy link
Contributor

@malt3 malt3 commented Nov 9, 2024

This supersedes #3143 and #3148:

  • Prepare a new version of openssh
  • Fix include of crypt.h (now with a minimally invasive config change)
  • Package for macOS
    • The @openssh//:ssh and @openssh//:sshd targets were tested on Intel and Apple Silicon

@bazel-io
Copy link
Member

bazel-io commented Nov 9, 2024

Hello @mattyclarkson, modules you maintain (openssh) have been updated in this PR. Please review the changes.

meteorcloudy pushed a commit that referenced this pull request Nov 11, 2024
Adds `config.h` for macOS (Intel and Apple Silicon).
This was tested on both Intel and Apple Silicon Macs.

This will allow building `@openssh//:sshd` on macOS after this and #3149
have been merged.
malt3 and others added 4 commits November 11, 2024 15:26
With `#define HAVE_CRYPT_H 1`, the file xcrypt.c would
`#include <crypt.h>` which might not be installed globally
and is not provided by libxcrypt as a system header (`-isystem`).

Co-authored-by: Oers <[email protected]>
@malt3 malt3 force-pushed the openssh-9.9p1.bcr.1 branch from 531bb8e to 75c55cc Compare November 11, 2024 14:32
@malt3 malt3 requested a review from mattyclarkson November 11, 2024 14:35
@meteorcloudy meteorcloudy added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Nov 11, 2024
@mattyclarkson
Copy link
Contributor

LGTM, thanks!

@meteorcloudy meteorcloudy merged commit 3b9d599 into bazelbuild:main Nov 12, 2024
20 checks passed
@malt3 malt3 deleted the openssh-9.9p1.bcr.1 branch November 12, 2024 14:29
@shixiong-jiang
Copy link

shixiong-jiang commented Dec 5, 2024

Hello @malt3,

One simple question plz.

My MODULE.bazel

bazel_dep(name = "openssh", version = "9.9p1")

single_version_override(
    module_name = "openssh",
    patch_strip = 1,
    patches = ["//patches:openssh.patch"],
    version = "9.9p1",
)

openssh.patch

+
+cc_library(
+    name = "ssherr",
+    hdrs = ["ssherr.h"],
+    visibility = ["//visibility:public"],
+)
+

My cc.

It works

#include "ssherr.h"

However, I prefer

#include "openssh/ssherr.h"

Filename ssherr.h (without parent folder) is very easy to conflict with another ssherr.h defined in other libraries.

Thx,

@malt3
Copy link
Contributor Author

malt3 commented Dec 6, 2024

Hi @shixiong-jiang, I think this a question for @mattyclarkson, the maintainer.
This would require you to add include_prefix = "openssh" to cc_library targets in the OpenSSH module. This can probably be added as a configurable setting, but I‘m not the right person to ask about that.

@shixiong-jiang
Copy link

@malt3, Thx.

+
+cc_library(
+    name = "ssherr",
+    hdrs = ["ssherr.h"],
+    include_prefix = ["openssh"],
+    visibility = ["//visibility:public"],
+)
+

did work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants