Граф коммитов

907 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 28611be6ee Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026 2022-11-11 17:24:08 +09:00
Josef Šimánek de159c5a85 [rubygems/rubygems] Store last check even when upgrade is not available and fix test.
https://github.com/rubygems/rubygems/commit/bcffc2b0a5
2022-11-11 17:24:08 +09:00
Josef Šimánek 7ce0f81fbb [rubygems/rubygems] Use file in XDG_STATE_HOME directory to store last update check timestamp.
https://github.com/rubygems/rubygems/commit/0fbc4ace8a
2022-11-11 17:24:08 +09:00
Josef Šimánek c7d043065c [rubygems/rubygems] Add 'call for update' to RubyGems install command.
https://github.com/rubygems/rubygems/commit/05811f8248
2022-11-11 17:24:08 +09:00
Jason Karns ceeefb5870 [rubygems/rubygems] github source should default to secure protocol
Bundler 2 switched to secure https here c2e81f8ff6

Insecure protocols should be avoided to prevent MITM attacks.

https://github.com/rubygems/rubygems/commit/758413364a
2022-11-11 17:24:08 +09:00
Peter Zhu 1e53ebae57 [rubygems/rubygems] Drop support for bitrig
The bitrig OS is no longer maintained with the last release being 7
years ago.

https://github.com/rubygems/rubygems/commit/85ed90ddd0
2022-11-07 10:52:14 +00:00
Peter Zhu 0fb7a1c77c [rubygems/rubygems] Drop support for HP-UX
Support for HP-UX was dropped in Ruby in ruby/ruby#5457.

https://github.com/rubygems/rubygems/commit/a3a8df3582
2022-11-07 10:52:13 +00:00
Thomas E. Enebo 420bdba139 [rubygems/rubygems] Allow upcoming JRuby to pass keywords for Kernel#warn
jruby-head (which will be JRuby 9.4.0.0) can now properly process
the keywords to Kernel#warn.  I cannot think of any capability based
test for this so I constrained it using a version guard.  Only JRuby
will ever hit the version guard.

https://github.com/rubygems/rubygems/commit/cd468c7e0f
2022-10-22 08:01:24 +00:00
David Rodríguez a44040c9e4 [rubygems/rubygems] Add notes to make sure we don't forget to backport changes to Bundler
https://github.com/rubygems/rubygems/commit/1ac5b14c78

Co-authored-by: André Arko <andre@arko.net>
2022-10-01 05:46:41 +09:00
David Rodríguez f04d249e83 [rubygems/rubygems] Fix matching of eabihf platforms
https://github.com/rubygems/rubygems/commit/a03d30cd58
2022-10-01 05:46:40 +09:00
David Rodríguez 8252ea2140 [rubygems/rubygems] Fix matching of linux platforms with eabi modifiers
https://github.com/rubygems/rubygems/commit/89362c18ef

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2022-10-01 05:46:40 +09:00
David Rodríguez 4d58ee3de0 [rubygems/rubygems] Refactor platform matching on Linux
I think this highlights better how musl is special.

https://github.com/rubygems/rubygems/commit/4075771697
2022-10-01 05:46:39 +09:00
Jenny Shen 28840d74c2 [rubygems/rubygems] Refine error message to check the push URL instead of just the host
https://github.com/rubygems/rubygems/commit/46990f3292
2022-09-29 17:56:36 +09:00
Jenny Shen 17b783ad9e [rubygems/rubygems] Surface entire redirect uri in permanent redirections
https://github.com/rubygems/rubygems/commit/da7837630b
2022-09-29 17:56:35 +09:00
Jenny Shen 1cbf0fd863 [rubygems/rubygems] Add error message when api response is a permanent redirect
https://github.com/rubygems/rubygems/commit/ccca30c77a

Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
2022-09-29 17:56:34 +09:00
Mike Dalessio 8f7f12ad64 [rubygems/rubygems] fix: Gem::Platform.match handles String argument properly
Previously 9eead86 introduced non-commutativity of platforms, and
later commit 1b9f7f50 changed the behavior of `Gem::Platform.match` to
ensure the callee of `#=~` was the gem platform.

However, when the platform argument is a String, then the callee and
argument of `#=~` are flipped (see docs for `String#=~`), which works
against the fix from 1b9f7f50.

Closes #5938

https://github.com/rubygems/rubygems/commit/3b1fb562e8
2022-09-28 05:55:28 +09:00
Kevin Newton 68a5b0f086 [rubygems/rubygems] Mask the file mode when extracting files
When extracting files from the tarball, a mode is retrieved from
the header. Occasionally you'll encounter a gem that was packaged
on a system whose permission bits result in a value that is larger
than the value that File.chmod will allow (anything >= 2^16). In
that case the extraction fails with a RangeError, which is pretty
esoteric.

If you extract the tarball with the tar and gunzip utilities, the
file permissions end up being just the bottom 16 bits masked off
from the original value. I've mirrored that behavior here. Per the
tar spec:

> Modes which are not supported by the operating system restoring
> files from the archive will be ignored.

I think that basically means what I've done here.

---

This commit also changes the behavior very slightly with regard to
when the chmod is called. Previously it was called while the file
descriptor was still open, but after the write call.

When write flushes, the file permissions are changed to the mode
value from the File.open call, undoing the changes made by
FileUtils.chmod. CRuby appears to flush the buffer after the
chmod call, whereas TruffleRuby flushes before the chmod call.
So the file permissions can change depending on implementation.
Both implementations end up getting the correct file permissions
for the bottom 9 bits (user, group, world), but differ with
regard to the sticky bit in the next 3.

To get consistent behavior, this commit changes it to close the
file descriptor before attempting to chmod anything, which makes
it consistent because the write flushes in both cases.

https://github.com/rubygems/rubygems/commit/22ce076e99
2022-09-15 14:49:20 +09:00
David Rodríguez b350053ae4 [rubygems/rubygems] Fix resolution on non-musl platforms
Gems without specific platform were being preferred over matching
platform specific gems.

https://github.com/rubygems/rubygems/commit/37b95b9159
2022-09-09 19:38:52 +09:00
David Rodríguez 24fd2f73d0 Resync Bundler & RubyGems 2022-09-08 11:25:03 +09:00
Antonio Paulino 4c1f6750f2 [rubygems/rubygems] Fix: Gem info bug with version flag
https://github.com/rubygems/rubygems/commit/e4cee1f975
2022-09-07 06:18:58 +09:00
なつき aded6971ad [rubygems/rubygems] Support non gnu libc arm-linux-eabi platforms
https://github.com/rubygems/rubygems/commit/394d7a6fc9
2022-09-01 15:01:40 +09:00
David Rodríguez 59f27445ea [rubygems/rubygems] Implement extra rules for libc versioning
https://github.com/rubygems/rubygems/commit/7e976d790a
2022-08-23 05:50:23 +09:00
David Rodríguez 492e70c7b4 [rubygems/rubygems] Fix `gem install` still choosing musl incorrectly
https://github.com/rubygems/rubygems/commit/1b9f7f50a5
2022-08-23 05:50:22 +09:00
David Rodríguez 9819283044 [rubygems/rubygems] Handle non-gnu libc on linux platforms in RubyGems
Attempting to install a gem published as both *-linux and *-linux-musl
results in the incorrect gem being picked up, causing build failures due
to binary incompatibility. This is caused by the `nil` wildcard
swallowing the libc information upon version comparison.

Handle the linux case by performing only non-wildcard equality on the
version and asserting 'gnu' and nil equivalence, while preserving the
current behaviour for other OSes.

https://github.com/rubygems/rubygems/commit/9eead86abc

Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com>
2022-08-23 05:50:21 +09:00
Loic Nageleisen 615f79be3c [rubygems/rubygems] Test platform's version-ness consistently
The symmetry with the "for command line" case is made more apparent.

https://github.com/rubygems/rubygems/commit/ab85d3558f
2022-08-23 05:50:20 +09:00
Hiroshi SHIBATA 44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +09:00
David Rodríguez f310ac1cb2 [rubygems/rubygems] Include backtrace with crashes by default
https://github.com/rubygems/rubygems/commit/3cc3bfd371
2022-08-05 16:37:03 +09:00
David Rodríguez 542040fb83 [rubygems/rubygems] Warn dangling symlinks
https://github.com/rubygems/rubygems/commit/425b78637f
2022-08-04 13:36:45 +09:00
David Rodríguez 0591780a74 [rubygems/rubygems] Extract entry.full_name to a variable
https://github.com/rubygems/rubygems/commit/3973773005
2022-08-04 13:36:44 +09:00
Hiroshi SHIBATA 71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Ilya Dyakonov 4f00ee8d47 [rubygems/rubygems] fix platform matching for index specs
https://github.com/rubygems/rubygems/commit/f087f1b590
2022-08-03 06:56:36 +09:00
David Rodríguez 20936eb3a9 [rubygems/rubygems] Warn (rather than crash) when setting `nil` specification versions
https://github.com/rubygems/rubygems/commit/a4ba1a4d97
2022-08-03 06:56:18 +09:00
Ashley Ellis Pierce 244bda7efd [rubygems/rubygems] Display mfa warnings on gem signin
https://github.com/rubygems/rubygems/commit/4dc77b7099

Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2022-07-23 03:42:59 +09:00
Nobuyoshi Nakada a4e890b93e [rubygems/rubygems] Use `SystemExit#status` as `exit_code`
No reasons to manage separately.

https://github.com/rubygems/rubygems/commit/8ede5c886e
2022-07-22 21:01:31 +09:00
Takuya Noguchi d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
David Rodríguez fa5724cca9 [rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specs
Running a command like that is actually removing any previous default
bundler specs in the default RubyGems installation (outside of destdir).
It should instead only modify destdir.

https://github.com/rubygems/rubygems/commit/5ed275383c
2022-07-20 19:55:34 +09:00
David Rodríguez a74634de10 [rubygems/rubygems] Fix upgrading RubyGems with a customized `Gem.default_dir`
https://github.com/rubygems/rubygems/commit/16d01f9486
2022-07-18 19:07:55 +09:00
Yuta Saito fab8f3bde6 [rubygems/rubygems] Stop using `/dev/null` for silent ui for WASI platform
WASI doesn't guarantee that `/dev/null` is present.
So without this patch, we needed to mount host's `/dev` directory to WASI
guest process to avoid `ENOTCAPABLE` error while `require "bundler/setup"`

https://github.com/rubygems/rubygems/commit/e9187ab61f
2022-07-17 19:44:51 +09:00
Nobuyoshi Nakada 5ae83151b1 [rubygems/rubygems] Drop support for old `Gem::Specification` versions
`specification_version` method was added before RubyGems 1.0, and
`add_runtime_dependency` method was before 1.2.  These seem aged
enough to remove.

https://github.com/rubygems/rubygems/commit/92770c5cd9
2022-07-16 19:33:16 +09:00
Takuya Noguchi 8e451d1083 [rubygems/rubygems] Fix wrong information about default RubyGems source
Also fix regression from rubygems/rubygems PR 3056

https://my.diffend.io/gems/rubygems-update/1.3.5/1.3.6/page/4#d2h-514986
https://my.diffend.io/gems/rubygems-update/2.0.0/2.0.2/page/2#d2h-514986

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

https://github.com/rubygems/rubygems/commit/06b1e9ebc5
2022-07-15 17:32:05 +09:00
David Rodríguez 8c74eaa08d [rubygems/rubygems] Fix `gem update --system` crash while regenerating binstubs
Since a few commits ago, we no longer call `Gem::Specification.reset`
after each invocation of `Gem::Installer#install`. This means we don't
call it when the default Bundler is installed during `gem update
--system`. This causes no issues until the end of the upgrade process
when:

* The previous default Bundler spec is removed from disk.
* All specification stubs are turned into real specifications by loading
  them from disk. But the one for Bundler no longer exists so
  materializes to `nil` and regenerating binstubs crashes like this:

  ```
  Bundler 2.4.0.dev installed
  RubyGems 3.4.0.dev installed
  Regenerating binstubs
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `platform' for nil:NilClass
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `block in execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:981:in `block in each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `map'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `select'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:301:in `invoke'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:604:in `regenerate_binstubs'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:183:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:185:in `process_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:149:in `run'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:51:in `run'
  setup.rb:33:in `<main>'
  ```

We fix it by more carefully managing the removal of the previous default
Bundler gem.

https://github.com/rubygems/rubygems/commit/9989f6d5af
2022-07-14 04:47:58 +09:00
Hiroshi SHIBATA 437a5ae9d6 Merge RubyGems and Bundler master 2022-07-13 14:11:55 +09:00
Brian Le 902d1a5c51 [rubygems/rubygems] add message when gems are requested to be updated but they are not installed
https://github.com/rubygems/rubygems/commit/27953ffe9a
2022-07-06 02:59:14 +09:00
Brian Le 6eab8095fa [rubygems/rubygems] output gems already up-to-date regardless if any gems were updated
https://github.com/rubygems/rubygems/commit/4ec608a573
2022-07-06 02:59:13 +09:00
David Rodríguez a16de43f23 [rubygems/rubygems] Add `gem env user_gemhome` and `gem env user_gemdir`
https://github.com/rubygems/rubygems/commit/14d3f80df6
2022-06-29 03:25:46 +09:00
David Rodríguez 1098fdf890 [rubygems/rubygems] Also document `gem env` argument aliases
https://github.com/rubygems/rubygems/commit/6d841ccbd4
2022-06-29 03:25:45 +09:00
David Rodríguez 7a33d3df6a [rubygems/rubygems] Document better names for `gem env` arguments
I think `gem env home` and `gem env path` read very nice.

https://github.com/rubygems/rubygems/commit/b89da79456
2022-06-29 03:25:45 +09:00
Tomas Volf 56809537a4 [rubygems/rubygems] Clean up temporary directory after generate_index --update
While generate_index did clean up temporary directory, when running with
--update flag, that did not happen and the temporary directory was left
behind.

This commit fixes that and modifies tests in order to make sure this is
not reintroduced later on.

Fixes #5635.

https://github.com/rubygems/rubygems/commit/9fa34dc329
2022-06-26 11:15:43 +09:00
David Rodríguez 12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00
David Rodríguez 1e8bf48fd5 [rubygems/rubygems] Bring TODO message up to date
https://github.com/rubygems/rubygems/commit/e07dba0923
2022-06-17 17:05:21 +09:00