221 Commits

Author SHA1 Message Date
Mike McQuaid
29ed4d216a
Revert "Remove HOMEBREW_BOTTLE_DOMAIN" 2021-07-29 21:15:40 +01:00
Mike McQuaid
5d8b5ceb22
Remove HOMEBREW_BOTTLE_DOMAIN
It no longer works under GitHub Packages and `HOMEBREW_ARTIFACT_DOMAIN`
must be used instead.
2021-07-27 14:12:17 +01:00
Dawid Dziurla
793371a348
fetch: add --bottle-tag flag 2021-07-13 18:03:04 +02:00
Mike McQuaid
30a65342e8
Deprecate, disable, delete code for Homebrew 3.2.0
Do the usual deprecation, disable, delete dance for Homebrew 3.2.0.
2021-06-17 11:34:32 +01:00
Bo Anderson
9380729dbf
software_spec: fix wrong tab being fetched when bottle isn't unique 2021-05-31 16:20:10 +01:00
Mike McQuaid
60ab6b86e9
software_spec: improve bad manifest error message.
Let's complain immediately after fetching if there's something wrong
and improve the error message to make it clearer what's going on.

Inspired by #76336.
2021-05-19 13:15:33 +01:00
Mike McQuaid
b914411ac8
Delete Bintray code
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.

Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
2021-05-12 13:37:18 +01:00
Bo Anderson
635e58e9aa
software_spec: fix bottle domain fallback handling 2021-04-15 19:24:25 +01:00
Mike McQuaid
f866bab2a0
software_spec: GitHub Packages/Bintray fixes.
- assign the `version` for the `resource` before the `downloader` is
  created
- fix the reference to `Bintray`
2021-04-12 16:07:19 +01:00
Mike McQuaid
1bdb8c7a33
More Bintray cleanup
Cleanup more files and names related to Bintray to ease their future
deletion (when Bintray is shutdown).
2021-04-12 15:07:46 +01:00
Nanda H Krishna
e574f320fc
software_spec: remove debug statement 2021-04-09 21:34:00 +05:30
Mike McQuaid
bd3f1d28e7
Fix GitHub Packages filenames.
They don't need escaped like the Bintray ones did.

Fixes https://github.com/Homebrew/brew/issues/11090 (but note this may
require the cache entry to be cleared and the package to be
redownloaded).
2021-04-09 16:31:04 +01:00
Mike McQuaid
6f071a06f8
Use JSON.pretty_generate
It's dramatically more human readable for very little difference in
space.
2021-04-09 15:44:37 +01:00
Mike McQuaid
1d34f7f2fa
Merge pull request #11077 from MikeMcQuaid/any_bottles
Support `all: SHA256` bottles.
2021-04-09 10:18:19 +01:00
Mike McQuaid
6b5213286c
Rename "exact" tag match to "no_older_versions"
This is more specific about the behaviour we want to have in future.
2021-04-09 09:36:18 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Bo Anderson
093e6e4f79
Merge pull request #11065 from Bo98/cellar-non-host
software_spec: fix handling of default non-host Cellar
2021-04-08 21:44:11 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Mike McQuaid
598c230e12
Fix Linuxbrew URL handling
After this `HOMEBREW_BOTTLE_DOMAIN=https://ghcr.io/v2/linuxbrew/core`
will work as expected.

While we're here, do a bit of cleanup of constant usage; we don't want
some of these leaking outside the `GitHubPackages` class.

In doing so `docker://` will continue to work for `ghcr.io` but won't
work for arbitrary other Docker hosts; this isn't something we want to
support yet.
2021-04-08 10:54:28 +01:00
Bo Anderson
2ed3339478
software_spec: fix handling of default non-host Cellar 2021-04-08 02:21:31 +01:00
Mike McQuaid
d707c0bbd8
github_packages: remove invalid docker tag characters.
Some versions have `+` in them.
2021-04-07 13:32:31 +01:00
Mike McQuaid
fd251c9109
github_packages: fix versioned bottle names.
`@` cannot be used in Docker image names. Use `/` instead (which we
already use in image names so has some precedent).

Make `mktemp` use `AT` (consistent with `Formula` subclasses), too.
2021-04-06 19:14:08 +01:00
Mike McQuaid
cdaeee03c4
GitHub Packages cleanup
- `download_strategy`: only request image index JSON for downloading
  the manifest for the tab
- use a shared `OS` constant for the version of `glibc` we use in CI
- fix `skoepeo` typo
- ensure that blank hash values are deleted (again) rather than just
  `nil` ones
- use a shared `Hardware::CPU` constant for oldest CPU we're
  supporting/using on Intel 64-bit
- re-add comment to `software_spec`
2021-04-05 14:58:17 +01:00
Shaun Jackman
a28b419d9d CurlGitHubPackagesDownloadStrategy: Fix 3rd party
Fix CurlGitHubPackagesDownloadStrategy for third party taps.
2021-04-04 01:49:36 -07:00
Mike McQuaid
262f964f9e
Fix brew fetch --force for GitHub Packages bottle tab download.
Have to implement some custom logic here as there's two resources rather
than one.
2021-04-02 12:44:07 +01:00
Shaun Jackman
3141d493ca
github_packages: Rename sh.brew.bottle.digest
Rename sh.brew.bottle.checksum to sh.brew.bottle.digest
for consistency with the OCI descriptor spec.
2021-04-02 10:13:27 +01:00
Mike McQuaid
d9032ff01a
Download and use tabs from GitHub Packages 2021-04-01 17:37:16 +01:00
Mike McQuaid
8144fdef78
Simplify CurlGitHubPackagesDownloadStrategy usage 2021-04-01 17:37:16 +01:00
Mike McQuaid
7fc52d2065
github_packages: fix HOMEBREW_BOTTLE_DOMAIN usage.
This still worked but ended up always having a `/bottles-*/` part of the
URL that was unnecessary when using `HOMEBREW_BOTTLE_DOMAIN`.
2021-03-16 15:17:42 +00:00
Mike McQuaid
1d32dc9067
Support downloading bottles from GitHub Packages 2021-03-12 14:11:24 +00:00
Bo Anderson
6cd1e5e384
Avoid passing around a massive $LOAD_PATH.
Portable Ruby crashes if the $LOAD_PATH gets too big.
2021-02-26 18:23:48 +00:00
XuehaiPan
d2533ff2a6
software_spec: Add HOMEBREW_BOTTLE_DEFAULT_DOMAIN as a fallback option
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-02-26 11:23:33 +00:00
Bo Anderson
fb8b247db3
dev-cmd/unbottled: various improvements
* Ignore bottles for older macOS versions
* Ignore disabled formulae
* Ignore formulae which can't build on the chosen macOS
* Improve/fix sort description
2021-02-23 16:27:58 +00:00
Mike McQuaid
c13d7e6723
Fix brew style 2021-02-16 09:25:34 +00:00
Rylan Polster
f68a3961c7
Prepare deprecations for the old bottle syntax 2021-02-06 14:27:03 -05:00
Rylan Polster
3dccea251f
bottle: write bottles in correct order 2021-02-04 16:04:13 -05:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
Michka Popoff
de2e309d50
cellars: write tag specific cellars
With #10186 now merged, the tag specific cellar information is being read by brew.
This PR (once merged) will start adding the cellar information for each tag instead
of having a single cellar line on the top of the bottle block.

Each new CI build in homebrew-core will slowly start migrating the cellar lines to
the right place. If keep-old is used, the old "all tag" cellar line is removed and
added to each tag.
2021-01-28 13:19:40 +00:00
Mike McQuaid
fc1c142ebd
software_spec: reverse tag/digest for new bottles.
This new format was agreed in #10377
2021-01-28 13:15:41 +00:00
EricFromCanada
99ad3350ee use single quotes around stanza and parameter names 2021-01-26 16:19:47 -05:00
hyuraku
e6eeb2cbed delete HOMEBREW_REPOSITORY & some variables 2021-01-27 00:29:43 +09:00
Seeker
8693ca4e4d software_spec: change BottleSpecification#checksums to return array 2021-01-21 22:52:26 -08:00
Michka Popoff
3eea1434cc bottle: tag specific cellars 2021-01-19 10:14:25 +01:00
Seeker
7a5a8baac5 patch: delete legacy code
SoftwareSpec#add_legacy_patches and Patch#normalize_legacy_patches
were added almost 6 years ago; let's delete them

See commit 665b14c4a44c272b46b8559836e9fdbeee5d8a46

```
$ grep -r 'normalize_legacy_patches' Library/Homebrew
./software_spec.rb:    list = Patch.normalize_legacy_patches(list)
./patch.rb:  def self.normalize_legacy_patches(list)
```

```
$ grep -r 'add_legacy_patches' Library/Homebrew
./software_spec.rb:  def add_legacy_patches(list)
```
2021-01-13 18:40:46 -08:00
Michka Popoff
5e91802470 checksum: simplify, use only sha256
We use only one sha type right now.

Needed for https://github.com/Homebrew/brew/pull/10186
2021-01-07 20:46:13 +01:00
Mike McQuaid
0bbf965807
More bottling HOMEBREW_LIBRARY changes
- Refuse to create bottles which have non-relocatable references to
  `HOMEBREW_LIBRARY`. This allows us to make all bottles ignore where
  `HOMEBREW_REPOSITORY` is (even those that aren't `cellar :any`).
  I cannot see any circumstances in which any bottle should link to
  anything within `HOMEBREW_REPOSITORY`.
- Remove audit that becomes unnecessary given the above change.
- Relocate references to `@HOMEBREW_LIBRARY@` but don't actually write
  any references yet. This will allow us to move to using
  `@HOMEBREW_LIBRARY` and remove all relocation of `HOMEBREW_REPOSITORY`
  in a future release (2.7.1, most likely).
2020-12-18 13:50:10 +00:00
Mike McQuaid
4067b4d929
Merge pull request #9482 from MikeMcQuaid/deprecate_bottle_prefix
software_spec: deprecate `prefix` for bottles.
2020-12-18 12:16:05 +00:00
Mike McQuaid
831d034303
software_spec: fix cellar any handling.
`cellar :any` actually requires no references to the cellar, prefix or
repository (not just cellar) so we can pour those bottles anywhere
regardless of the cellar, prefix or repository.
2020-12-15 11:32:10 +00:00
Mike McQuaid
0f9bad0052
Fix bottle prefix and repository handling
We were previously only looking at the `cellar` value when pouring
bottles and ignoring the `prefix` and (implicit) `repository`.

Actually look at these values and set the defaults for each platform.

Also, when we're relocating to create or pour bottles when `prefix`
and `repository` are equal then skip relocating the `repository` and
always use references to the `prefix` instead.

Fixes #9453
2020-12-09 13:53:10 +00:00
Mike McQuaid
0f0aa83fa1
software_spec: deprecate prefix for bottles.
Turns out we weren't actually using/checking this value at all (so I'd
be very surprised if anyone is actually using it).
2020-12-09 12:51:00 +00:00