Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.64k stars 9.54k forks source link

`gnu-tar` doesn’t execute in the build-bottle state #16284

Open alebcay opened 9 months ago

alebcay commented 9 months ago

brew doctor output

All steps passed!

Verification

brew config output

HOMEBREW_VERSION: 4.1.22-63-ga609182
ORIGIN: https://github.com/Homebrew/brew
HEAD: a609182060d253b2f2e2cdc3aee84505c426e9e9
Last commit: 64 minutes ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 9eb511b25ad32f62d0219a858208683ac1ed43a8
Core tap last commit: 56 minutes ago
Core tap branch: master
Core tap JSON: 02 Dec 03:51 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_BOOTSNAP: set
HOMEBREW_CASK_OPTS: []
HOMEBREW_COLOR: set
HOMEBREW_CURL_PATH: /usr/bin/curl
HOMEBREW_DEVELOPER: set
HOMEBREW_FAIL_LOG_LINES: 150
HOMEBREW_GIT_EMAIL: 1589480+BrewTestBot@users.noreply.github.com
HOMEBREW_GIT_NAME: BrewTestBot
HOMEBREW_GIT_PATH: /usr/bin/git
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_LOGS: /__w/homebrew-core/homebrew-core/logs
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_AUTO_UPDATE: set
HOMEBREW_NO_COLOR: set
HOMEBREW_NO_EMOJI: set
HOMEBREW_NO_ENV_HINTS: set
HOMEBREW_NO_INSTALL_FROM_API: set
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: quad-core 64-bit zen3
Clang: N/A
Git: 2.43.0 => /usr/bin/git
Curl: 7.81.0 => /usr/bin/curl
Kernel: Linux 6.2.0-1016-azure x86_64 GNU/Linux
OS: Ubuntu 22.04.3 LTS
Host glibc: 2.35
/usr/bin/gcc: 11.4.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@11: N/A
gcc: N/A
xorg: N/A

What were you trying to do (and why)?

CI-no-bottles PR modifying gnu-tar in https://github.com/Homebrew/homebrew-core/pull/156184 is failing on Linux. @Bo98 advises that the issue may be caused by placeholder HOMEBREW_PREFIX in the RPATH or something similar.

logs_1298931.zip

What happened (include all command output)?

==> brew bottle --verbose --json gnu-tar --only-json-tab
==> FAILED
Full bottle gnu-tar --only-json-tab output
  ==> Determining gnu-tar bottle rebuild...
  ==> Bottling gnu-tar--1.35.x86_64_linux.bottle.1.tar.gz...
  ==> Installing `gnu-tar` for bottling...
  /home/linuxbrew/.linuxbrew/bin/brew install --formula gnu-tar
  Warning: gnu-tar 1.35 is already installed and up-to-date.
  To reinstall 1.35, run:
    brew reinstall gnu-tar
  /home/linuxbrew/.linuxbrew/opt/gnu-tar/bin/tar --create --numeric-owner --mtime=2023-07-18 06:55:23 --sort=name --owner=0 --group=0 --numeric-owner --format=pax --pax-option=globexthdr.name=/GlobalHead.%n,exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --file /github/home/bottles/gnu-tar--1.35.x86_64_linux.bottle.1.tar gnu-tar/1.35
  Error: Failure while executing; `/home/linuxbrew/.linuxbrew/opt/gnu-tar/bin/tar --create --numeric-owner --mtime=2023-07-18\ 06:55:23 --sort=name --owner=0 --group=0 --numeric-owner --format=pax --pax-option=globexthdr.name=/GlobalHead.\%n,exthdr.name=\%d/PaxHeaders/\%f,delete=atime,delete=ctime --file /github/home/bottles/gnu-tar--1.35.x86_64_linux.bottle.1.tar gnu-tar/1.35` exited with 1.
==> FAILED gnu-tar
Error: bottling failed

What did you expect to happen?

The CI test suite succeeds as it does on macOS.

Step-by-step reproduction instructions (by running brew commands)

See CI run logs for further reproduction steps.
MikeMcQuaid commented 8 months ago

@alebcay easiest fix for now would probably be to just not require the gnu-tar formula when bottling gnu-tar.

github-actions[bot] commented 8 months ago

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

MikeMcQuaid commented 8 months ago

@alebcay Assuming this is still an issue? Any developments here?

alebcay commented 7 months ago

I haven't taken a closer look at this, I opened this more as a means of documenting the issue while I was doing a no-bottles update on the gnu-tar formula. I can try and have a stab at this, though. As far as I understand, this issue still exists.

not require the gnu-tar formula when bottling gnu-tar.

To clarify, this means just using the system tar instead right? Any concern about bottle reproducibility, or are we just willing to forego the reproducibility in this one case?

Another alternative is to fall back on Gem::Package::TarWriter, provided by rubygems/package.

MikeMcQuaid commented 7 months ago

To clarify, this means just using the system tar instead right?

Yes.

Any concern about bottle reproducibility, or are we just willing to forego the reproducibility in this one case?

Seems worthwhile to forego reproducibility in this case until we have a better solution.

github-actions[bot] commented 7 months ago

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