Hello community,

here is the log from the commit of package dice for openSUSE:Factory checked in 
at 2017-03-12 20:05:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dice (Old)
 and      /work/SRC/openSUSE:Factory/.dice.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dice"

Sun Mar 12 20:05:07 2017 rev:18 rq:478481 version:0.7.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/dice/dice.changes        2016-12-13 
19:34:27.345492183 +0100
+++ /work/SRC/openSUSE:Factory/.dice.new/dice.changes   2017-03-12 
20:05:08.792022746 +0100
@@ -1,0 +2,14 @@
+Tue Feb 28 11:51:31 CET 2017 - [email protected]
+
+- Add support for URI credentials
+  
+  If a repository of the form:
+  
+  <repository type="..." username="user" password="pass">
+  <source path="..."/>
+  </repository>
+  
+  is provided the credentials information was not properly handled
+  for curl and ruby's openURI implementation
+  
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ dice-0.7.10.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/kiwi_config.rb new/lib/kiwi_config.rb
--- old/lib/kiwi_config.rb      2016-12-05 19:56:19.000000000 +0100
+++ new/lib/kiwi_config.rb      2017-03-03 12:07:19.000000000 +0100
@@ -11,10 +11,13 @@
     repo_uri = []
     xml.elements.each("*/repository") do |repo|
       repo_type = repo.attributes["type"]
+      user = repo.attributes["username"]
+      pass = repo.attributes["password"]
       repo.elements.each("source") do |element|
         source_path = element.attributes["path"].gsub(/\?.*/,"")
         repo_uri << KiwiUri.translate(
-          :name => source_path, :repo_type => repo_type
+          :name => source_path, :repo_type => repo_type,
+          :user => user, :pass => pass
         )
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repo_uri.rb new/lib/repo_uri.rb
--- old/lib/repo_uri.rb 2016-12-05 19:56:19.000000000 +0100
+++ new/lib/repo_uri.rb 2017-03-03 12:07:19.000000000 +0100
@@ -1,10 +1,12 @@
 class RepoUri
-  attr_reader :name, :type, :location, :repo_type
+  attr_reader :name, :type, :location, :repo_type, :user, :pass
   attr_reader :allowed_local_types, :allowed_remote_types
   attr_reader :mount_point
 
   def initialize(args)
     @name = args[:name]
+    @user = args[:user]
+    @pass = args[:pass]
     @repo_type = args[:repo_type]
     set_uri_type_and_location
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repository_base.rb new/lib/repository_base.rb
--- old/lib/repository_base.rb  2016-12-05 19:56:19.000000000 +0100
+++ new/lib/repository_base.rb  2017-03-03 12:07:19.000000000 +0100
@@ -27,7 +27,14 @@
       location = uri.name
     end
     begin
-      handle = open(location + "/" + source, "rb")
+      if uri.user
+        handle = open(
+          location + "/" + source, "rb",
+          :http_basic_authentication=>[uri.user, uri.pass]
+        )
+      else
+        handle = open(location + "/" + source, "rb")
+      end
       data = handle.read
       handle.close
     rescue => e
@@ -52,8 +59,15 @@
     elsif !uri.is_remote?
       location = "file://" + uri.location
     end
+    curl_opts = ["-L"]
+    if uri.user
+        curl_opts += ["-u", uri.user + ":" + uri.pass]
+    end
     begin
-      Command.run("curl", "-L", location + "/" + source, :stdout => outfile)
+      Command.run(
+          ["curl"] + curl_opts + [location + "/" + source],
+          :stdout => outfile
+      )
     rescue Cheetah::ExecutionFailed => e
       raise Dice::Errors::CurlFileFailed.new(
         "Downloading file: #{location}/#{source} failed: #{e.stderr}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-12-05 19:56:19.000000000 +0100
+++ new/metadata        2017-03-03 12:07:19.000000000 +0100
@@ -8,7 +8,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-12-05 00:00:00.000000000 Z
+date: 2017-03-03 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: cheetah


Reply via email to