<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/rubygems/package.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Merge RubyGems-3.4.19 and Bundler-2.4.19</title>
<updated>2023-08-29T14:25:18+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-08-18T03:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ab1eacc8bc32a5604219878911ab1b3a92c320f6'/>
<id>ab1eacc8bc32a5604219878911ab1b3a92c320f6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge RubyGems-3.4.18 and Bundler-2.4.18</title>
<updated>2023-08-29T14:25:18+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-08-18T03:10:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1434059ab5006e32ad872a62e7f0ecca190194fb'/>
<id>1434059ab5006e32ad872a62e7f0ecca190194fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Mask the file mode when extracting files</title>
<updated>2022-09-15T05:49:20+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2022-09-06T16:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68a5b0f086c9d54f271cdff231a1a2c2a40b0aa6'/>
<id>68a5b0f086c9d54f271cdff231a1a2c2a40b0aa6</id>
<content type='text'>
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 &gt;= 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:

&gt; Modes which are not supported by the operating system restoring
&gt; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &gt;= 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:

&gt; Modes which are not supported by the operating system restoring
&gt; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge rubygems/bundler HEAD.</title>
<updated>2022-08-09T03:05:19+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-08-09T02:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=44264b4fee1e208e759710c39271186ff9856b40'/>
<id>44264b4fee1e208e759710c39271186ff9856b40</id>
<content type='text'>
  Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Warn dangling symlinks</title>
<updated>2022-08-04T04:36:45+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-08-02T08:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=542040fb8375ffd74096ae0615a33bbc90524cb3'/>
<id>542040fb8375ffd74096ae0615a33bbc90524cb3</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/425b78637f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/425b78637f
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Extract entry.full_name to a variable</title>
<updated>2022-08-04T04:36:44+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-08-02T09:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0591780a74f9893038d5d794a958621189953e8a'/>
<id>0591780a74f9893038d5d794a958621189953e8a</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/3973773005
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/3973773005
</pre>
</div>
</content>
</entry>
<entry>
<title>RubyGems: Enable Style/StringLiterals cop</title>
<updated>2022-07-22T03:07:23+00:00</updated>
<author>
<name>Takuya Noguchi</name>
<email>takninnovationresearch@gmail.com</email>
</author>
<published>2022-07-17T08:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d7ffd3fea402239b16833cc434404a7af82d44f3'/>
<id>d7ffd3fea402239b16833cc434404a7af82d44f3</id>
<content type='text'>
Signed-off-by: Takuya Noguchi &lt;takninnovationresearch@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Takuya Noguchi &lt;takninnovationresearch@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] [DOC] Enable Gem::Package example</title>
<updated>2022-03-14T23:40:35+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-03-14T15:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b85457c710d597281c936d0ac062e542563798cd'/>
<id>b85457c710d597281c936d0ac062e542563798cd</id>
<content type='text'>
Other code must not be between the doc and class definition.

https://github.com/rubygems/rubygems/commit/366784aae5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Other code must not be between the doc and class definition.

https://github.com/rubygems/rubygems/commit/366784aae5
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge rubygems/rubygems HEAD.</title>
<updated>2022-01-19T06:01:44+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-01-19T04:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d22511fd7595ef1819baa42851d598d95b8f4d00'/>
<id>d22511fd7595ef1819baa42851d598d95b8f4d00</id>
<content type='text'>
  Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Normalize end alignment style with Bundler</title>
<updated>2022-01-19T02:20:36+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-01-17T14:16:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f04954d95c8a729d70be1c883617534a2e7cc239'/>
<id>f04954d95c8a729d70be1c883617534a2e7cc239</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/f7f504b24c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/f7f504b24c
</pre>
</div>
</content>
</entry>
</feed>
