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

Make googleapis work on FreeBSD. #1954

Merged
merged 1 commit into from
Feb 19, 2019
Merged

Conversation

EdSchouten
Copy link
Contributor

The patches that are shipped with googleapis have the intent of removing
files from the input. Though GNU patch does this properly, the copy of
patch shipped with FreeBSD does not do this explicitly. It needs the -E
flag to do so.

This makes it possible to build https://github.com/buildbarn on FreeBSD
11.2-STABLE.

The patches that are shipped with googleapis have the intent of removing
files from the input. Though GNU patch does this properly, the copy of
patch shipped with FreeBSD does not do this explicitly. It needs the -E
flag to do so.

This makes it possible to build https://github.com/buildbarn on FreeBSD
11.2-STABLE.
Copy link
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

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

Thanks!

@jayconrod jayconrod merged commit bb5873b into bazel-contrib:master Feb 19, 2019
jayconrod pushed a commit that referenced this pull request Feb 25, 2019
The patches that are shipped with googleapis have the intent of removing
files from the input. Though GNU patch does this properly, the copy of
patch shipped with FreeBSD does not do this explicitly. It needs the -E
flag to do so.

This makes it possible to build https://github.com/buildbarn on FreeBSD
11.2-STABLE.
jayconrod pushed a commit that referenced this pull request Feb 26, 2019
The patches that are shipped with googleapis have the intent of removing
files from the input. Though GNU patch does this properly, the copy of
patch shipped with FreeBSD does not do this explicitly. It needs the -E
flag to do so.

This makes it possible to build https://github.com/buildbarn on FreeBSD
11.2-STABLE.
@alexeagle
Copy link
Contributor

Wow, after some archeology, I found that this PR causes Bazel to be unable to use its native patch function
https://cs.opensource.google/bazel/bazel/+/refs/tags/6.2.0:tools/build_defs/repo/utils.bzl;l=69
and so now all builds involving rules_go require a patch command to be on the users $PATH where it shouldn't.

I think we should guard this -E flag to be added to patch-args only on a BSD operating system, so that the bug @EdSchouten ran into is fixed in a way that doesn't cause a new system dependency for everyone else.

@fmeum
Copy link
Member

fmeum commented Jul 5, 2023

Great catch, @alexeagle!

Since the decision whether to use -E needs to be made in a WORKSPACE macro, I don't think that there is a way to get the "BSD or not" bit into it automatically.

However, since Bazel now has a native implementation, BSD should be supported just as well without the flag - we should just remove it.

fmeum added a commit that referenced this pull request Jul 5, 2023
@fmeum
Copy link
Member

fmeum commented Jul 5, 2023

As this is only used for googleapis, it will go away with #3603 anyway in the next release.

@alexeagle
Copy link
Contributor

Ah, then I'll just wait on #3603 and locally patch out this -E argument, thanks!

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

Successfully merging this pull request may close these issues.

5 participants