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

ucspi-tcp: fix build on Linux #100875

Closed
wants to merge 1 commit into from
Closed

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented May 5, 2022

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@cho-m cho-m added the CI-no-bottles Merge without publishing bottles label May 5, 2022
@BrewTestBot BrewTestBot added missing license Formula has a missing license which should be added no Linux bottle Formula has no Linux bottle labels May 5, 2022
@cho-m cho-m marked this pull request as ready for review May 5, 2022 16:19
@SMillerDev
Copy link
Member

Can we disable the tests?

@cho-m
Copy link
Member Author

cho-m commented May 5, 2022

I think the error happens during basic compilation (make) when generating hasshsgr.h, which is needed as dependency of library: unix.a --> prot.o --> hasshsgr.h

hasshsgr.h: \
choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \
warn-shsgr
	./chkshsgr || ( cat warn-shsgr; exit 1 )
	./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h

Didn't seem possible to avoid

@SMillerDev
Copy link
Member

That's annoying, if we patch this could you at least ask upstream for a way to compile without root? I doubt were the only package manager doing that.

@cho-m
Copy link
Member Author

cho-m commented May 6, 2022

That's annoying, if we patch this could you at least ask upstream for a way to compile without root?

Hard to say if this will get anywhere given how old the current version is (22 years ago):

ucspi-tcp 0.88, beta.
20000318
Copyright 2000
D. J. Bernstein

I doubt were the only package manager doing that.

To preface, in case of macOS, Homebrew's user seems to have sufficient setgroups permissions to avoid root requirement so this is specific to Linux.

I think many Linux repositories are 1st party so would have root or sufficient permissions.

From quick glance, I only saw NixOS hack around this issue at https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/networking/ucspi-tcp/default.nix#L33-L40

  # Also, assume getgroups and setgroups work, instead of doing a build time
  # test that breaks on NixOS (I think because nixbld users lack CAP_SETGID
  # capability).
  preBuild = ''
    echo "$out" > conf-home

    echo "main() { return 0; }" > chkshsgr.c
  '';

@SMillerDev
Copy link
Member

Hard to say if this will get anywhere given how old the current version is (22 years ago):

Ouch, yeah that won't work

@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@cho-m cho-m deleted the ucspi-tcp-linux branch May 6, 2022 08:23
everettraven pushed a commit to everettraven/homebrew-core that referenced this pull request May 10, 2022
Closes Homebrew#100875.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
@github-actions github-actions bot added the outdated PR was locked due to age label Jun 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-no-bottles Merge without publishing bottles missing license Formula has a missing license which should be added no Linux bottle Formula has no Linux bottle outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants