214 Commits

Author SHA1 Message Date
Mike McQuaid
521d6b51a6
dev-cmd/{bottle,pr-upload}: generate, upload all: $SHA256 bottles.
Generate `all: $SHA256` bottles if:
- all generated bottles have the same cellar
- all generated bottles have the same checksum

In this case, on `brew bottle --merge --write`: delete all the non-`all`
bottles (and their JSON) and upload only the single one that's
necessary.
2021-04-21 17:10:05 +01:00
Mike McQuaid
965dbaa172
dev-cmd/bottle: fix libarchive installed check.
Used now-removed old method name.
2021-04-21 11:39:19 +01:00
Mike McQuaid
4a3fc2a8fc
dev-cmd/bottle: set uid/gid, use libarchive on macOS.
Take 2 on #11165 but use newish `libarchive` consistently on macOS.
2021-04-21 10:09:35 +01:00
Mike McQuaid
08b848044e
Revert "dev-cmd/bottle: set uid/gid." 2021-04-16 16:58:21 +01:00
Mike McQuaid
7a23bd3ecd
dev-cmd/bottle: set uid/gid.
This is a more complete version of `--numeric-owner`.
2021-04-16 15:26:24 +01:00
Mike McQuaid
2b34ecfe18
Merge pull request #11163 from Bo98/bottle-filename
dev-cmd/bottle: revert filename in JSON to use single dash always
2021-04-16 14:30:46 +01:00
Mike McQuaid
4a0b860973
dev-cmd/bottle: improve reproducibility, comment.
Setting a consistent owner/group results in more consistent bottles.
2021-04-16 14:05:06 +01:00
Mike McQuaid
96cd1c058e
utils/bottles: tweak/improve some of the API. 2021-04-16 14:05:05 +01:00
Mike McQuaid
a28dda5062
bottle: remove GitHub Packages bulk upload logic. 2021-04-16 14:05:05 +01:00
Bo Anderson
b5ccad093d
dev-cmd/bottle: revert filename in JSON to single dash
Fixes #11136.
2021-04-16 13:04:34 +01:00
Bo Anderson
6c687fd8ba
dev-cmd/bottle: fix INSTALL_RECEIPT appearing in changed_files 2021-04-14 21:43:37 +01:00
Mike McQuaid
bc9b98aa0b
Merge pull request #11131 from MikeMcQuaid/only_json_tab_handling
Better handle `brew bottle --only-json-tab` bottles
2021-04-14 14:27:38 +01:00
Bo Anderson
1feed79e69
Use File.read over IO.read 2021-04-14 12:42:26 +01:00
Mike McQuaid
75592cbebc
Better handle brew bottle --only-json-tab bottles
- test them in `brew test-bot` (before we do so in homebrew/core)
- don't fail if we cannot find the tab/install receipt in a bottle
- cache listing the files in a bottle so we don't do it more times than
  necessary
- fix resolution of version and formula names from a bottle if we're
  getting them from a bottle without a tab/install receipt

This will need to be in a tagged release before we can ship tab-less
bottles to users.
2021-04-13 14:26:31 +01:00
Mike McQuaid
17da648c1b
dev-cmd/bottle: don't assume desc present.
Fixes https://github.com/Homebrew/brew/pull/11057#issuecomment-817846023
2021-04-12 15:54:13 +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
Kevin Abel
b8d60c7fd6
bottle: Restore old filename for non-GitHub package URLs
The fix for #11090 in bd3f1d28e78bbc3e632b5439f001c6a2b3032fd9 changed the bottle json content but the downloader still expects bottles at the old location.
2021-04-11 14:24:21 -05:00
Bo Anderson
0f90267bd0
dev-cmd/bottle: fix incorrect Cellar value in JSON 2021-04-11 05:07:42 +01:00
Michka Popoff
850df21216
bottle: no need to set cellar anymore
Fixes:
Calling `cellar` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument instead.
2021-04-10 09:52:15 +02:00
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
1d34f7f2fa
Merge pull request #11077 from MikeMcQuaid/any_bottles
Support `all: SHA256` bottles.
2021-04-09 10:18:19 +01:00
Mike McQuaid
271474820f
Merge pull request #11075 from MikeMcQuaid/deprecate_disable_delete
Deprecate, disable, delete code for next major/minor version.
2021-04-09 10:09:51 +01:00
Mike McQuaid
0cb1645d25
bottles: support :all tag.
This allows the creation of bottles which will be used by any macOS
version, architecture or OS (i.e. macOS or Linux).

Add `TODO` stubs for where the bottle generation logic should be
implemented.
2021-04-09 09:50:16 +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
Mike McQuaid
bed11e5c42
bottle: use newly generated bottle file for mtime. 2021-04-09 09:06:31 +01:00
Shaun Jackman
ec3c9b9d7f
bottle: Set date to the mtime of the bottle file 2021-04-09 09:06:31 +01:00
Bo Anderson
2f041abf2b
dev-cmd/bottle: don't take uniq of arguments 2021-04-08 22:07:47 +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
Mike McQuaid
1980a6a5a5
dev-cmd/bottle: avoid outputting new default bottle domain. 2021-04-08 17:58:24 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Bo Anderson
1bb651469f
dev-cmd/bottle: don't fail on --keep-old with unchanged values 2021-04-07 20:26:36 +01:00
Mike McQuaid
8800b85f64
More GitHub Packages bulk upload fixes
- replace invalid non-ASCII characters from the descriptions
- handle invalid macOS versions on attempting to load old formulae from
  old bottles
- let `rubocop` auto-remove a no-longer needed `rubocop:disable`
- fix `skopeo` credentials argument
2021-04-07 17:03:44 +01:00
Mike McQuaid
5cae3f4096
dev-cmd/bottle: fix license output.
Don't output the complex license object but instead use the same format
we use for `Formula#to_hash`.
2021-04-06 14:41:27 +01:00
Mike McQuaid
ab0d9f18a5
Merge pull request #10977 from MikeMcQuaid/github_packages_tab_download
GitHub Packages Tab download
2021-04-02 09:43:27 +01:00
nandahkrishna
53a7065bcc
Allow specifying committer for some dev-cmds 2021-04-01 22:22:31 +05:30
Mike McQuaid
4f57adf42f
github_packages: fix org.opencontainers.image.created. 2021-04-01 17:37:16 +01:00
Mike McQuaid
d8a2cf9efc
Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
Bo Anderson
e49a338896
Implement caching for dependency expansion 2021-03-20 16:56:00 +00:00
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
Rylan Polster
727ac9b47f
bottle: write bottles with new syntax 2021-02-03 20:46:20 -05:00
Mike McQuaid
4afebd2872
Fixup brew bottle (and tests) for #10447. 2021-01-28 13:19:41 +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
EricFromCanada
2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
Seeker
8693ca4e4d software_spec: change BottleSpecification#checksums to return array 2021-01-21 22:52:26 -08:00
Rylan Polster
e172f0704e
Merge pull request #10360 from Rylan12/bash-completions-files
completions: complete files where appropriate in bash
2021-01-20 09:19:25 -05:00
Michka Popoff
3eea1434cc bottle: tag specific cellars 2021-01-19 10:14:25 +01:00
Rylan Polster
4ef8c8279f
completions: complete files where appropriate in bash 2021-01-19 01:03:05 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
cf654da251
dev-cmd: indicate multiple named args in usage banner 2021-01-15 13:04:07 +01:00