Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
ruby2.2
make-gem-build-reproducible.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File make-gem-build-reproducible.patch of Package ruby2.2
Index: ruby-2.2.0/lib/rubygems/package.rb =================================================================== --- ruby-2.2.0.orig/lib/rubygems/package.rb +++ ruby-2.2.0/lib/rubygems/package.rb @@ -108,9 +108,12 @@ class Gem::Package def self.build spec, skip_validation=false gem_file = spec.file_name + spec_file = spec.loaded_from + spec_file = "Gemfile" if spec_file.nil? || spec_file.empty? package = new gem_file package.spec = spec + package.build_time = File.stat(spec_file).mtime.to_i package.build skip_validation gem_file @@ -187,6 +190,7 @@ class Gem::Package digests = tar.add_file_signed 'data.tar.gz', 0444, @signer do |io| gzip_to io do |gz_io| Gem::Package::TarWriter.new gz_io do |data_tar| + data_tar.mtime = @build_time add_files data_tar end end Index: ruby-2.2.0/lib/rubygems/package/tar_writer.rb =================================================================== --- ruby-2.2.0.orig/lib/rubygems/package/tar_writer.rb +++ ruby-2.2.0/lib/rubygems/package/tar_writer.rb @@ -90,12 +90,15 @@ class Gem::Package::TarWriter nil end + attr_accessor :mtime + ## # Creates a new TarWriter that will write to +io+ def initialize(io) @io = io @closed = false + @mtime = Time.now end ## @@ -124,7 +127,7 @@ class Gem::Package::TarWriter header = Gem::Package::TarHeader.new :name => name, :mode => mode, :size => size, :prefix => prefix, - :mtime => Time.now + :mtime => mtime @io.write header @io.pos = final_pos @@ -217,7 +220,7 @@ class Gem::Package::TarWriter header = Gem::Package::TarHeader.new(:name => name, :mode => mode, :size => size, :prefix => prefix, - :mtime => Time.now).to_s + :mtime => mtime).to_s @io.write header os = BoundedStream.new @io, size @@ -279,7 +282,7 @@ class Gem::Package::TarWriter header = Gem::Package::TarHeader.new :name => name, :mode => mode, :typeflag => "5", :size => 0, :prefix => prefix, - :mtime => Time.now + :mtime => mtime @io.write header
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor