[DRE-commits] [SCM] gem2deb.git branch, master, updated. 0.2.7-1-g07e1c91

Antonio Terceiro terceiro at softwarelivre.org
Mon Aug 15 18:31:35 UTC 2011


The following commit has been merged in the master branch:
commit 07e1c9162b8baf32d51741c692244e8f0e1ae1ef
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Mon Aug 15 11:30:03 2011 -0700

    Generate a non-lintian-clean copyright file
    
    This way I will NOT forget to update debian/copyright and upload
    packages with broken copyright files.

diff --git a/debian/control b/debian/control
index 393671a..2565568 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Lucas Nussbaum <lucas at debian.org>,
            Antonio Terceiro <terceiro at debian.org>,
            Vincent Fourmond <fourmond at debian.org>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7.0.50~), rake, ruby-shoulda-context, ruby-mocha, rubygems1.8, ruby1.8, ruby1.8-dev, ruby1.9.1, ruby1.9.1-dev, devscripts, ruby-setup
+Build-Depends: debhelper (>= 7.0.50~), rake, ruby-shoulda-context, ruby-mocha, rubygems1.8, ruby1.8, ruby1.8-dev, ruby1.9.1, ruby1.9.1-dev, devscripts, ruby-setup, lintian
 Standards-Version: 3.9.2
 Vcs-Git: git://git.debian.org/pkg-ruby-extras/gem2deb.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/gem2deb.git;a=summary
diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb
index c190f5a..43239e5 100644
--- a/lib/gem2deb/dh_make_ruby.rb
+++ b/lib/gem2deb/dh_make_ruby.rb
@@ -21,6 +21,7 @@ require 'rubygems'
 require 'yaml'
 require 'fileutils'
 require 'erb'
+require 'date'
 
 module Gem2Deb
 
@@ -428,14 +429,14 @@ Description: <%= short_description ? short_description : 'FIXME' %>
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> debian/compat
 7
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> debian/copyright
-FIXME. fill-in with DEP5 copyright file. http://dep.debian.net/deps/dep5/
-Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=173
+Format: http://dep.debian.net/deps/dep5
 Upstream-Name: <%= gem_name %>
-Source: FIXME (URL where source can be downloaded)
+Source: FIXME <http://example.com/>
 
 Files: *
-Copyright: Copyright 1998 John Doe <jdoe at example.com>
-License: GPL-2+
+Copyright: <years> <put author's name and email here>
+           <years> <likewise for another author>
+License: GPL-2+ (FIXME)
  This program is free software; you can redistribute it
  and/or modify it under the terms of the GNU General Public
  License as published by the Free Software Foundation; either
@@ -458,7 +459,7 @@ License: GPL-2+
  `/usr/share/common-licenses/GPL-2'.
 
 Files: debian/*
-Copyright: Copyright 1998 Jane Smith <jsmith at example.net>
+Copyright: <%= Date.today.year %> <%= maintainer['DEBFULLNAME'] %> <<%= maintainer['DEBEMAIL'] %>>
 License:
  [LICENSE TEXT]
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> debian/watch
diff --git a/test/integration/gem2deb_test.rb b/test/integration/gem2deb_test.rb
index 181f58e..106402a 100644
--- a/test/integration/gem2deb_test.rb
+++ b/test/integration/gem2deb_test.rb
@@ -2,25 +2,29 @@ require 'test_helper'
 
 class Gem2DebTest < Gem2DebTestCase
 
+  def self.build(gem)
+    FileUtils.cp gem, tmpdir
+    gem = File.basename(gem)
+    Dir.chdir(tmpdir) do
+      cmd = "gem2deb -d #{gem}"
+      run_command(cmd)
+    end
+  end
+
   Dir.glob('test/sample/*/pkg/*.gem').each do |gem|
+    puts "Building #{gem} ..."
+    self.build(gem)
     should "build #{gem} correcly" do
-      self.class.build(gem)
       package_name = 'ruby-' + File.basename(File.dirname(File.dirname(gem))).gsub('_', '-')
-      binary_packages = File.join(self.class.tmpdir, "#{package_name}*.deb")
+      binary_packages = File.join(self.class.tmpdir, "#{package_name}_*.deb")
       packages = Dir.glob(binary_packages)
       assert !packages.empty?, "building #{gem} produced no binary packages! (expected to find #{binary_packages})"
     end
   end
 
-  protected
-
-  def self.build(gem)
-    FileUtils.cp gem, tmpdir
-    gem = File.basename(gem)
-    Dir.chdir(tmpdir) do
-      cmd = "gem2deb -d #{gem}"
-      run_command(cmd)
-    end
+  should 'generate a non-lintian-clean copyright file' do
+    changes_file = File.join(self.class.tmpdir, "ruby-simplegem_*.changes")
+    assert_match /E: ruby-simpleextension-in-root: helper-templates-in-copyright/, `lintian #{changes_file}`
   end
 
 end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 4eaa3b5..b051755 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -17,6 +17,7 @@ class Gem2DebTestCase < Test::Unit::TestCase
   class << self
     def tmpdir
       @tmpdir ||= File.join(Gem2DebTestCase::TMP_DIR, name)
+      FileUtils.mkdir_p(@tmpdir)
     end
     def one_time_setup_blocks
       @one_time_setup_blocks ||= []
@@ -29,7 +30,6 @@ class Gem2DebTestCase < Test::Unit::TestCase
     end
     def one_time_setup!
       unless one_time_setup?
-        FileUtils.mkdir_p(tmpdir)
         one_time_setup_blocks.each(&:call)
         @one_time_setup = true
       end

-- 
gem2deb.git



More information about the Pkg-ruby-extras-commits mailing list