Hello community,

here is the log from the commit of package ruby2.1 for openSUSE:Factory checked 
in at 2015-02-20 12:43:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ruby2.1 (Old)
 and      /work/SRC/openSUSE:Factory/.ruby2.1.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ruby2.1"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ruby2.1/ruby2.1.changes  2014-11-24 
11:13:08.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ruby2.1.new/ruby2.1.changes     2015-02-20 
12:43:10.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Feb 11 10:27:07 UTC 2015 - [email protected]
+
+- add make-gem-build-reproducible.patch to make sure the gems created
+  with gem build don't use the time of the build, but the mtime of
+  the Gemfile
+
+-------------------------------------------------------------------

New:
----
  make-gem-build-reproducible.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ruby2.1.spec ++++++
--- /var/tmp/diff_new_pack.rP26eB/_old  2015-02-20 12:43:11.000000000 +0100
+++ /var/tmp/diff_new_pack.rP26eB/_new  2015-02-20 12:43:11.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ruby2.1
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -103,8 +103,8 @@
 Provides:       ruby-macros = %{rpm_macros_version}
 %endif
 Provides:       ruby21  = %{version}-%{release}
-Requires:       %{name}-stdlib = %{version}
 Requires:       %{libname} = %{version}
+Requires:       %{name}-stdlib = %{version}
 Provides:       rubygem-rake = 10.1.0
 PreReq:         update-alternatives
 BuildRequires:  update-alternatives
@@ -133,6 +133,7 @@
 Patch3:         rubygems-testsuite-handle_gem_loaderror.patch
 Patch4:         ruby-1.9.3-mkmf-verbose.patch
 Patch5:         ruby-2.1.3-no_sse2_patch_configure_too.patch
+Patch6:         make-gem-build-reproducible.patch
 #
 Summary:        An Interpreted Object-Oriented Scripting Language
 License:        BSD-2-Clause or Ruby
@@ -315,6 +316,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 find sample -type f -print0 | xargs -r0 chmod a-x
 grep -Erl '^#! */' benchmark bootstraptest ext lib sample test \
   | xargs -r perl -p -i -e 
's|^#!\s*\S+(\s+.*)?$|#!/usr/bin/ruby%{rb_binary_suffix} $1|'

++++++ make-gem-build-reproducible.patch ++++++
Index: ruby-2.1.5/lib/rubygems/package.rb
===================================================================
--- ruby-2.1.5.orig/lib/rubygems/package.rb
+++ ruby-2.1.5/lib/rubygems/package.rb
@@ -105,9 +105,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
@@ -177,6 +180,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.1.5/lib/rubygems/package/tar_writer.rb
===================================================================
--- ruby-2.1.5.orig/lib/rubygems/package/tar_writer.rb
+++ ruby-2.1.5/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
 
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to