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

pkg-config: pour bottle only in default prefixes #85032

Merged
merged 1 commit into from
Oct 3, 2021

Conversation

carlocab
Copy link
Member

  • 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>?

Fixes Homebrew/linuxbrew-core#23659.

Fixes Homebrew/linuxbrew-core#23659.
@carlocab carlocab added the CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. label Sep 11, 2021
@Bo98
Copy link
Member

Bo98 commented Sep 11, 2021

We fixed this on macOS. Or at least it was supposed to have been fixed. Why is it different on Linux? Seems like a brew bug.

@carlocab
Copy link
Member Author

It is fixed on macOS. Not sure why it's not fixed on Linux. I'll look at the bottle.

@Bo98
Copy link
Member

Bo98 commented Sep 11, 2021

A quick build here will show brew bottle output in CI logs.

@carlocab
Copy link
Member Author

carlocab commented Sep 11, 2021

It would, but wouldn't it just show that the bottle is relocatable?

There is verbose output only when the bottle is detected to not be relocatable.

Edit: I guess we can see if this problem still exists in the current state of brew...

@carlocab carlocab added CI-no-bottles Merge without publishing bottles CI-skip-dependents Pass --skip-dependents to brew test-bot. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. and removed CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. labels Sep 11, 2021
@carlocab
Copy link
Member Author

Yep, still an issue:

==> Determining pkg-config bottle rebuild...
==> Bottling pkg-config--0.29.2_3.x86_64_linux.bottle.1.tar.gz...
tar --create --numeric-owner --format pax --owner 0 --group 0 --sort name --pax-option globexthdr.name=/GlobalHead.%n,exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --file /tmp/bottles/pkg-config--0.29.2_3.x86_64_linux.bottle.1.tar pkg-config/0.29.2_3
./pkg-config--0.29.2_3.x86_64_linux.bottle.1.tar.gz
  bottle do
    rebuild 1
    sha256 cellar: :any_skip_relocation, x86_64_linux: "ef94e6c362bc37dcba83a4def6d28223380bf9c886ac64c5a53fc558e0e0976c"
  end
Writing pkg-config--0.29.2_3.x86_64_linux.bottle.json

@Bo98
Copy link
Member

Bo98 commented Sep 11, 2021

/home/linuxbrew/.linuxbrew/lib/pkgconfig:/home/linuxbrew/.linuxbrew/share/pkgconfig:/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/pkgconfig
  • /home/linuxbrew/.linuxbrew/lib/pkgconfig
    • /home/linuxbrew/.linuxbrew/lib is not checked (etc, var, share/vim and opt are however)
    • It would however be checked if it was a non-default prefix. Maybe a relic of when /usr/local was the only default?
  • /home/linuxbrew/.linuxbrew/share/pkgconfig
    • Not checked (same reason as above)
  • /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/pkgconfig
    • Checked, but does not actually exist so will not fail relocatability.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Oct 3, 2021
@carlocab carlocab removed the stale No recent activity label Oct 3, 2021
@carlocab
Copy link
Member Author

carlocab commented Oct 3, 2021

Merging this for now. Ideally this should be fixed in brew, but until we have one, we should at least stop users from installing broken bottles.

@Bo98
Copy link
Member

Bo98 commented Oct 3, 2021

A possibility is to change this:

https://github.com/Homebrew/brew/blob/1909d89d003bdf1f34775faf81b8c0529729013f/Library/Homebrew/dev-cmd/bottle.rb#L434

to be limited to /usr/local rather than any default prefix.

@carlocab carlocab merged commit 26c60c1 into Homebrew:master Oct 3, 2021
@carlocab carlocab deleted the pkg-config-bottle branch October 3, 2021 00:15
@carlocab
Copy link
Member Author

carlocab commented Oct 3, 2021

A possibility is to change this:

https://github.com/Homebrew/brew/blob/1909d89d003bdf1f34775faf81b8c0529729013f/Library/Homebrew/dev-cmd/bottle.rb#L434

to be limited to /usr/local rather than any default prefix.

Thanks for the tip. I'll have a look.

@github-actions github-actions bot added the outdated PR was locked due to age label Nov 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2021
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 CI-skip-dependents Pass --skip-dependents to brew test-bot. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants