Imported Upstream version 15.4.0 63/94663/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 01:43:55 +0000 (10:43 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 01:43:56 +0000 (10:43 +0900)
Change-Id: I6c8cdea602927dc922ebd314d9810da3050ed01c
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp.changes
po/zypp-po.tar.bz2
zypp/RepoManager.cc
zypp/media/MediaCurl.cc
zypp/media/MediaManager.h
zypp/media/TransferSettings.cc
zypp/media/TransferSettings.h
zypp/target/TargetImpl.cc

index 1c048ee..ce0c6af 100644 (file)
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "15")
 SET(LIBZYPP_COMPATMINOR "3")
-SET(LIBZYPP_MINOR "3")
+SET(LIBZYPP_MINOR "4")
 SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 15.3.0 (3)
+# LAST RELEASED: 15.4.0 (3)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index 0a65119..571d7a6 100644 (file)
@@ -1,4 +1,17 @@
 -------------------------------------------------------------------
+Wed Jun  3 13:00:59 CEST 2015 - ma@suse.de
+
+- Enhance solv.idx file handling to support zypper bash completion
+- Fix SSL client certificate authentication via URL option 
+  ssl_clientcert/ssl_clientkey (bnc#932393)
+- version 15.4.0 (3)
+
+-------------------------------------------------------------------
+Thu May 28 01:13:23 CEST 2015 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
 Sun May 24 18:17:38 CEST 2015 - ma@suse.de
 
 - Downloader: Accept unsigned repository if pkgGpgCheck is ON.
index 3114917..c3bcd7e 100644 (file)
Binary files a/po/zypp-po.tar.bz2 and b/po/zypp-po.tar.bz2 differ
index ca2e2e9..38f0f18 100644 (file)
@@ -1188,8 +1188,14 @@ namespace zypp
       if ( cache_status == raw_metadata_status )
       {
         MIL << info.alias() << " cache is up to date with metadata." << endl;
-        if ( policy == BuildIfNeeded ) {
-          return;
+        if ( policy == BuildIfNeeded )
+       {
+         // On the fly add missing solv.idx files for bash completion.
+         const Pathname & base = solv_path_for_repoinfo( _options, info);
+         if ( ! PathInfo(base/"solv.idx").isExist() )
+           sat::updateSolvFileIndex( base/"solv" );
+
+         return;
         }
         else {
           MIL << info.alias() << " cache rebuild is forced" << endl;
@@ -1776,6 +1782,14 @@ namespace zypp
             newinfo.dumpAsIniOn(file);
       }
 
+      if ( toedit.enabled() && !newinfo.enabled() )
+      {
+       // On the fly remove solv.idx files for bash completion if a repo gets disabled.
+       const Pathname & solvidx = solv_path_for_repoinfo(_options, newinfo)/"solv.idx";
+       if ( PathInfo(solvidx).isExist() )
+         filesystem::unlink( solvidx );
+      }
+
       newinfo.setFilepath(toedit.filepath());
       reposManip().erase(toedit);
       reposManip().insert(newinfo);
index 871395c..7ed3f50 100644 (file)
@@ -295,6 +295,14 @@ void fillSettingsFromUrl( const Url &url, TransferSettings &s )
         else
             s.setClientCertificatePath(client_cert);
     }
+    Pathname client_key( url.getQueryParam("ssl_clientkey") );
+    if( ! client_key.empty())
+    {
+        if( !PathInfo(client_key).isFile() || !client_key.absolute())
+            ZYPP_THROW(MediaBadUrlException(url, "Invalid ssl_clientkey file"));
+        else
+            s.setClientKeyPath(client_key);
+    }
 
     param = url.getQueryParam( "proxy" );
     if ( ! param.empty() )
@@ -632,6 +640,10 @@ void MediaCurl::setupEasy()
     {
       SET_OPTION(CURLOPT_SSLCERT, _settings.clientCertificatePath().c_str());
     }
+    if( ! _settings.clientKeyPath().empty() )
+    {
+      SET_OPTION(CURLOPT_SSLKEY, _settings.clientKeyPath().c_str());
+    }
 
 #ifdef CURLSSLOPT_ALLOW_BEAST
     // see bnc#779177
index 2e953de..049da47 100644 (file)
@@ -409,7 +409,9 @@ namespace zypp
      *         server is authentic against the chain of digital signatures
      *         found in <tt>ssl_capath</tt>.
      *     - <tt>ssl_clientcert</tt>
-     *       Path to a ssl client certificate for authentication to a repo.
+     *       Path to the ssl client certificate for authentication to a repo (CURLOPT_SSLCERT).
+     *     - <tt>ssl_clientkey</tt>
+     *       Path to the ssl client key for authentication to a repo (CURLOPT_SSLKEY).
      *     - <tt>timeout</tt>:
      *       Transfer timeout in seconds between 0 and 3600, 0 disables
      *       the timeout, default timeout is 180 seconds.
index faf57d7..f5edfb6 100644 (file)
@@ -76,6 +76,7 @@ public:
     bool _verify_peer;
     Pathname _ca_path;
     Pathname _client_cert_path;
+    Pathname _client_key_path;
 
     // workarounds
     bool _head_requests_allowed;
@@ -287,6 +288,16 @@ void TransferSettings::setClientCertificatePath( const zypp::Pathname &path )
     _impl->_client_cert_path = path;
 }
 
+Pathname TransferSettings::clientKeyPath() const
+{
+    return _impl->_client_key_path;
+}
+
+void TransferSettings::setClientKeyPath( const zypp::Pathname &path )
+{
+    _impl->_client_key_path = path;
+}
+
 
 void TransferSettings::setVerifyPeerEnabled( bool enabled )
 {
index 210b586..759bd5b 100644 (file)
@@ -264,6 +264,16 @@ public:
    */
   void setClientCertificatePath( const zypp::Pathname &path );
 
+  /**
+   * SSL client key file
+   */
+  Pathname clientKeyPath() const;
+
+  /**
+   * Sets the SSL client key file
+   */
+  void setClientKeyPath( const zypp::Pathname &path );
+
 protected:
   class Impl;
   RWCOW_pointer<Impl> _impl;
index 126dd5d..9849565 100644 (file)
@@ -1111,6 +1111,12 @@ namespace zypp
            }
        }
       }
+      else
+      {
+       // On the fly add missing solv.idx files for bash completion.
+       if ( ! PathInfo(base/"solv.idx").isExist() )
+         sat::updateSolvFileIndex( rpmsolv );
+      }
       return build_rpm_solv;
     }