[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Let's discuss big changes in Ruby packaging for squeeze+1

Antonio Terceiro wrote:

> In the meantime, the current version is running on
> http://gemwatch.heroku.com/

Thanks a lot!

I just noticed, that the timestamps of the files in the tarball are set to
 1970-01-01, which would cause lintian errors if such tarball is used as
upstream source.

Unfortunately it seems, gem's don't care about the timestamps. I took a
look at the rubygems source code and it probably might be easy to fix
this, but for now I think the best way would be to touch all files. See
the attached patch.

>From 23915dc23bae2a8627332f7481890b8a4b0cd52e Mon Sep 17 00:00:00 2001
From: etobi <git@e-tobi.net>
Date: Sun, 9 May 2010 22:58:52 +0200
Subject: [PATCH] Update timestamps in extracted tarball

 README.rst  |    1 +
 gemwatch.rb |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/README.rst b/README.rst
index 64a1d8d..b8b3a6b 100644
--- a/README.rst
+++ b/README.rst
@@ -27,6 +27,7 @@ steps::
   wget ...../mygem-0.1.0.gem
   tar xf mygem-0.1.0.gem
   tar xzf data.tar.gz
+  find . -exec touch {} \;
   xcat metadata.gz > metadata.yml
   rm -f mygem-0.1.0.gem data.tar.gz metadata.gz
   cd ..
diff --git a/gemwatch.rb b/gemwatch.rb
index 2c2acfc..24c6c89 100644
--- a/gemwatch.rb
+++ b/gemwatch.rb
@@ -61,6 +61,7 @@ class GemWatch::Gem
         run "wget #{uri}"
         run "tar xf #{gem}"
         run "tar xzf data.tar.gz"
+        FileUtils.touch(Dir.glob('**/*'))
         run "zcat metadata.gz > metadata.yml"
         FileUtils.rm_f([gem, "data.tar.gz", "metadata.gz"])

Reply to: