tea tap broken #135

Closed
opened 2021-06-23 00:39:05 +00:00 by noerw · 5 comments
Member

Looks like #130 broke the tea build:
grafik

Can someone actually running brew look into this? ?

Report originally sourced from discord

Looks like #130 broke the tea build: ![grafik](/attachments/2226f2ed-cae6-495b-8316-46947e92b1e6) Can someone actually running brew look into this? ? Report originally [sourced from discord](https://discord.com/channels/322538954119184384/322538954119184384/856836775620509696)
147 KiB
Owner

I got another problem with tea

$ brew install tea
==> Installing tea from gitea/tap
==> Downloading https://dl.gitea.io/tea/0.6.0/tea-0.6.0-darwin-amd64
==> Downloading from https://storage.gitea.io/gitea-artifacts/tea/0.6.0/tea-0.6.
######################################################################## 100.0%
Error: SHA256 mismatch
Expected: <a
  Actual: 8d2e61d7f8ef92f9198f903cf99dc889468a710466397244993cb5218be2276c
    File: /Users/lunny/Library/Caches/Homebrew/downloads/3dd566f5f7d6f7be640bf69ff874255def97d55969e46f01939a7a9880977c82--aws4_request&X-Amz-Date=20210623T064554Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=f4a3e78cd2fd83429c493caca910db932efebc162dca1f956ed28a742cb43696
To retry an incomplete download, remove the file above.
~~I got another problem with tea~~ ``` $ brew install tea ==> Installing tea from gitea/tap ==> Downloading https://dl.gitea.io/tea/0.6.0/tea-0.6.0-darwin-amd64 ==> Downloading from https://storage.gitea.io/gitea-artifacts/tea/0.6.0/tea-0.6. ######################################################################## 100.0% Error: SHA256 mismatch Expected: <a Actual: 8d2e61d7f8ef92f9198f903cf99dc889468a710466397244993cb5218be2276c File: /Users/lunny/Library/Caches/Homebrew/downloads/3dd566f5f7d6f7be640bf69ff874255def97d55969e46f01939a7a9880977c82--aws4_request&X-Amz-Date=20210623T064554Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=f4a3e78cd2fd83429c493caca910db932efebc162dca1f956ed28a742cb43696 To retry an incomplete download, remove the file above. ```
Author
Member

@lunny you probably need to update the tap, that issue should've been fixed by #132

@lunny you probably need to update the tap, that issue should've been fixed by #132

I just tried installing the tap and can confirm it fails as reported:

$ brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
==> Tapping gitea/tap
Cloning into '/usr/local/Homebrew/Library/Taps/gitea/homebrew-tap'...
remote: Enumerating objects: 392, done.
remote: Counting objects: 100% (392/392), done.
remote: Compressing objects: 100% (266/266), done.
remote: Total 392 (delta 238), reused 224 (delta 125), pack-reused 0
Receiving objects: 100% (392/392), 74.39 KiB | 165.00 KiB/s, done.
Resolving deltas: 100% (238/238), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/gitea/homebrew-tap/tea.rb
tea: undefined method `downcase' for nil:NilClass
Error: Cannot tap gitea/tap: invalid syntax in tap!
I just tried installing the tap and can confirm it fails as reported: ```bash $ brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea ==> Tapping gitea/tap Cloning into '/usr/local/Homebrew/Library/Taps/gitea/homebrew-tap'... remote: Enumerating objects: 392, done. remote: Counting objects: 100% (392/392), done. remote: Compressing objects: 100% (266/266), done. remote: Total 392 (delta 238), reused 224 (delta 125), pack-reused 0 Receiving objects: 100% (392/392), 74.39 KiB | 165.00 KiB/s, done. Resolving deltas: 100% (238/238), done. Error: Invalid formula: /usr/local/Homebrew/Library/Taps/gitea/homebrew-tap/tea.rb tea: undefined method `downcase' for nil:NilClass Error: Cannot tap gitea/tap: invalid syntax in tap! ```

I've traced one of my problems to https://gitea.com/gitea/homebrew-gitea/src/branch/master/tea.rb#L60

As the downloaded file will be moved to something like /tmp/tea-20210627-323-kegscl/aws4_request\&X-Amz-Date=20210627T201716Z\&X-Amz-Expires=600\&X-Amz-SignedHeaders=host\&X-Amz-Signature=9db43fdbba34a7dcd0f84581d214111fd9b9f5bf4ca3b3a57b8f999209e5152e however "#{buildpath}/#{Tea.bin_filename(version)}" thinks the path will be something like /tmp/tea-22222-22/tea-0.7.0-darwin-amd64`

I suspect this is the same thing that is happening with the Gitea formula too.

So homebrew is doing weird things now that we are redirecting w/ querystrings.

The NilClass issue seems to be related to the variable substitution that we are doing with the dynamic URL.

I've traced one of my problems to https://gitea.com/gitea/homebrew-gitea/src/branch/master/tea.rb#L60 As the downloaded file will be moved to something like `/tmp/tea-20210627-323-kegscl/aws4_request\&X-Amz-Date=20210627T201716Z\&X-Amz-Expires=600\&X-Amz-SignedHeaders=host\&X-Amz-Signature=9db43fdbba34a7dcd0f84581d214111fd9b9f5bf4ca3b3a57b8f999209e5152e` however ` "#{buildpath}/#{Tea.bin_filename(version)}"` thinks the path will be something like /tmp/tea-22222-22/tea-0.7.0-darwin-amd64` I suspect this is the same thing that is happening with the Gitea formula too. So homebrew is doing weird things now that we are redirecting w/ querystrings. The NilClass issue seems to be related to the variable substitution that we are doing with the dynamic URL.
lunny added the
kind/bug
label 2021-06-28 00:17:02 +00:00
Contributor

There is syntax error also:

tea.rb Line 27 in f2d83331f9
sha256 `curl -sL ${url}.sha256`.split(" ").first

and
tea.rb Line 33 in f2d83331f9
sha256 `curl -sL ${url}.sha256`.split(" ").first

Use ${}, should be #{}, fixing that, you can tap the repository, but it won't install, as per @techknowlogick .

I think there are some misconceptions going on here, as stable and head url's are not pointing to source code to be compiled, but rather to pre-built binaries. This repository won't work for building gitea/tea. IMO, if you plan to provide gitea from upstream homebrew, and reuse this formulae, this should be fixed. But if you plan to provide this as a thid-party homebrew repository (tap), you could do it by providing just pre-built binaries (Hashicorp does this and no head, stable sources for compiling (as brew install --build-from-source).

There is syntax error also: https://gitea.com/gitea/homebrew-gitea/src/commit/f2d83331f9541056bd7657a81b697f5264b9d729/tea.rb#L27 and https://gitea.com/gitea/homebrew-gitea/src/commit/f2d83331f9541056bd7657a81b697f5264b9d729/tea.rb#L33 Use `${}`, should be `#{}`, fixing that, you can tap the repository, but it won't install, as per @techknowlogick . I think there are some misconceptions going on here, as stable and head url's are not pointing to source code to be compiled, but rather to pre-built binaries. This repository won't work for building gitea/tea. IMO, if you plan to provide gitea from upstream homebrew, and reuse this formulae, this should be fixed. But if you plan to provide this as a thid-party homebrew repository (tap), you could do it by providing just pre-built binaries ([Hashicorp does this](https://github.com/hashicorp/homebrew-tap/tree/master/Formula) and no head, stable sources for compiling (as `brew install --build-from-source`).
Sign in to join this conversation.
No description provided.