Hello community,
here is the log from the commit of package libzypp for openSUSE:11.4:Update:Test checked in at 2012-03-22 16:13:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:11.4:Update:Test/libzypp (Old)
and /work/SRC/openSUSE:11.4:Update:Test/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp", Maintainer is "ma@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:11.4:Update:Test/libzypp/libzypp.changes 2012-03-19 17:45:50.000000000 +0100
+++ /work/SRC/openSUSE:11.4:Update:Test/.libzypp.new/libzypp.changes 2012-03-22 16:13:27.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Mar 13 12:23:28 CET 2012 - ma@suse.de
+
+- Force libproxy into using "/etc/sysconfig/proxy" if it exists (bnc#679322)
+- Correctly use user:pass directly embedded in a proxy url (bnc#740764)
+- version 8.13.4 (10)
+
+-------------------------------------------------------------------
Old:
----
libzypp-8.13.3.tar.bz2
New:
----
libzypp-8.13.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.FSL3AZ/_old 2012-03-22 16:13:28.000000000 +0100
+++ /var/tmp/diff_new_pack.FSL3AZ/_new 2012-03-22 16:13:28.000000000 +0100
@@ -1,30 +1,22 @@
#
# spec file for package libzypp
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
#
-# All modifications and additions to the file contributed by third parties
-# remain the property of their copyright owners, unless otherwise agreed
-# upon. The license for this file, and modifications and additions to the
-# file, is the same license as for the pristine package itself (unless the
-# license for the pristine package is not an Open Source License, in which
-# case the license is the MIT License). An "Open Source License" is a
-# license that conforms to the Open Source Definition (Version 1.9)
-# published by the Open Source Initiative.
-
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
-
Name: libzypp
License: GPLv2
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Package, Patch, Pattern, and Product Management
-Version: 8.13.3
-Release: 0.<RELEASE2>
+Version: 8.13.4
+Release: 0
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Provides: yast2-packagemanager
@@ -136,7 +128,6 @@
Ladislav Slezak
%package devel
-
Requires: libzypp = %{version}
Requires: libxml2-devel
Requires: openssl-devel
@@ -224,6 +215,7 @@
cd ..
%{find_lang} zypp
+
%post
/sbin/ldconfig
if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
@@ -288,6 +280,7 @@
done
fi
+
%postun -p /sbin/ldconfig
%clean
++++++ libzypp-8.13.3.tar.bz2 -> libzypp-8.13.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/VERSION.cmake new/libzypp-8.13.4/VERSION.cmake
--- old/libzypp-8.13.3/VERSION.cmake 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/VERSION.cmake 2012-03-13 12:20:09.000000000 +0100
@@ -61,8 +61,8 @@
SET(LIBZYPP_MAJOR "8")
SET(LIBZYPP_COMPATMINOR "10")
SET(LIBZYPP_MINOR "13")
-SET(LIBZYPP_PATCH "3")
+SET(LIBZYPP_PATCH "4")
#
-# LAST RELEASED: 8.13.3 (10)
+# LAST RELEASED: 8.13.4 (10)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/package/libzypp.changes new/libzypp-8.13.4/package/libzypp.changes
--- old/libzypp-8.13.3/package/libzypp.changes 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/package/libzypp.changes 2012-03-13 12:20:09.000000000 +0100
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Mar 13 12:23:28 CET 2012 - ma@suse.de
+
+- Force libproxy into using "/etc/sysconfig/proxy" if it exists (bnc#679322)
+- Correctly use user:pass directly embedded in a proxy url (bnc#740764)
+- version 8.13.4 (10)
+
+-------------------------------------------------------------------
Thu Mar 1 18:31:03 CET 2012 - ma@suse.de
- Apply soft locks by name and not per package (bnc#749418)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/zypp/media/MediaCurl.cc new/libzypp-8.13.4/zypp/media/MediaCurl.cc
--- old/libzypp-8.13.3/zypp/media/MediaCurl.cc 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/zypp/media/MediaCurl.cc 2012-03-13 12:20:09.000000000 +0100
@@ -21,7 +21,6 @@
#include "zypp/base/Gettext.h"
#include "zypp/media/MediaCurl.h"
-#include "zypp/media/proxyinfo/ProxyInfos.h"
#include "zypp/media/ProxyInfo.h"
#include "zypp/media/MediaUserAuth.h"
#include "zypp/media/CredentialManager.h"
@@ -328,14 +327,20 @@
*/
void fillSettingsSystemProxy( const Url&url, TransferSettings &s )
{
-#ifdef _WITH_LIBPROXY_SUPPORT_
- ProxyInfo proxy_info (ProxyInfo::ImplPtr(new ProxyInfoLibproxy()));
-#else
- ProxyInfo proxy_info (ProxyInfo::ImplPtr(new ProxyInfoSysconfig("proxy")));
-#endif
- s.setProxyEnabled( proxy_info.useProxyFor( url ) );
- if ( s.proxyEnabled() )
- s.setProxy(proxy_info.proxy(url));
+ ProxyInfo proxy_info;
+ if ( proxy_info.useProxyFor( url ) )
+ {
+ // We must extract any 'user:pass' from the proxy url
+ // otherwise they won't make it into curl (.curlrc wins).
+ try {
+ Url u( proxy_info.proxy( url ) );
+ s.setProxy( u.asString( url::ViewOption::WITH_SCHEME + url::ViewOption::WITH_HOST + url::ViewOption::WITH_PORT ) );
+ s.setProxyUsername( u.getUsername( url::E_ENCODED ) );
+ s.setProxyPassword( u.getPassword( url::E_ENCODED ) );
+ s.setProxyEnabled( true );
+ }
+ catch (...) {} // no proxy if URL is malformed
+ }
}
Pathname MediaCurl::_cookieFile = "/var/lib/YaST2/cookies";
@@ -641,10 +646,15 @@
DBG << "using proxy-user from ~/.curlrc" << endl;
}
}
+ else
+ {
+ DBG << "using provided proxy-user" << endl;
+ }
- proxyuserpwd = unEscape( proxyuserpwd );
if ( ! proxyuserpwd.empty() )
- SET_OPTION(CURLOPT_PROXYUSERPWD, proxyuserpwd.c_str());
+ {
+ SET_OPTION(CURLOPT_PROXYUSERPWD, unEscape( proxyuserpwd ).c_str());
+ }
}
}
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/zypp/media/ProxyInfo.cc new/libzypp-8.13.4/zypp/media/ProxyInfo.cc
--- old/libzypp-8.13.3/zypp/media/ProxyInfo.cc 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/zypp/media/ProxyInfo.cc 2012-03-13 12:20:09.000000000 +0100
@@ -16,6 +16,7 @@
#include "zypp/media/ProxyInfo.h"
#include "zypp/media/proxyinfo/ProxyInfoImpl.h"
+#include "zypp/media/proxyinfo/ProxyInfos.h"
using namespace std;
using namespace zypp::base;
@@ -26,8 +27,13 @@
shared_ptrProxyInfo::Impl ProxyInfo::Impl::_nullimpl;
ProxyInfo::ProxyInfo()
- : _pimpl( Impl::_nullimpl )
+#ifdef _WITH_LIBPROXY_SUPPORT_
+ : _pimpl( new ProxyInfoLibproxy() )
+#else
+ : _pimpl( new ProxyInfoSysconfig("proxy") )
+#endif
{}
+
ProxyInfo::ProxyInfo(ProxyInfo::ImplPtr pimpl_r)
: _pimpl(pimpl_r)
{}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/zypp/media/ProxyInfo.h new/libzypp-8.13.4/zypp/media/ProxyInfo.h
--- old/libzypp-8.13.3/zypp/media/ProxyInfo.h 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/zypp/media/ProxyInfo.h 2012-03-13 12:20:09.000000000 +0100
@@ -37,10 +37,12 @@
/** Implementation */
struct Impl;
typedef shared_ptr<Impl> ImplPtr;
- /** Ctor */
+
+ /** Default Ctor: guess the best available implementation. */
ProxyInfo();
- /** Ctor */
- ProxyInfo(ProxyInfo::ImplPtr pimpl_r);
+ /** Ctor taking a specific implementation. */
+ ProxyInfo( ProxyInfo::ImplPtr pimpl_r );
+
bool enabled() const;
std::string proxy(const Url & url) const;
NoProxyList noProxy() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/zypp/media/proxyinfo/ProxyInfoLibproxy.cc new/libzypp-8.13.4/zypp/media/proxyinfo/ProxyInfoLibproxy.cc
--- old/libzypp-8.13.3/zypp/media/proxyinfo/ProxyInfoLibproxy.cc 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/zypp/media/proxyinfo/ProxyInfoLibproxy.cc 2012-03-13 12:20:09.000000000 +0100
@@ -15,6 +15,7 @@
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
+#include "zypp/base/WatchFile.h"
#include "zypp/Pathname.h"
#include "zypp/media/proxyinfo/ProxyInfoLibproxy.h"
@@ -25,21 +26,68 @@
namespace zypp {
namespace media {
+ struct TmpUnsetEnv
+ {
+ TmpUnsetEnv( const char * var_r )
+ : _set( false )
+ , _var( var_r )
+ {
+ const char * val = getenv( _var.c_str() );
+ if ( val )
+ {
+ _set = true;
+ _val = val;
+ ::unsetenv( _var.c_str() );
+ }
+ }
+
+ ~TmpUnsetEnv()
+ {
+ if ( _set )
+ {
+ setenv( _var.c_str(), _val.c_str(), 1 );
+ }
+ }
+
+ bool _set;
+ std::string _var;
+ std::string _val;
+ };
+
+ static pxProxyFactory * getProxyFactory()
+ {
+ static pxProxyFactory * proxyFactory = 0;
+
+ // Force libproxy into using "/etc/sysconfig/proxy"
+ // if it exists.
+ static WatchFile sysconfigProxy( "/etc/sysconfig/proxy", WatchFile::NO_INIT );
+ if ( sysconfigProxy.hasChanged() )
+ {
+ MIL << "Build Libproxy Factory from /etc/sysconfig/proxy" << endl;
+ if ( proxyFactory )
+ ::px_proxy_factory_free( proxyFactory );
+
+ TmpUnsetEnv env[] = { "KDE_FULL_SESSION", "GNOME_DESKTOP_SESSION_ID", "DESKTOP_SESSION" };
+ proxyFactory = ::px_proxy_factory_new();
+ }
+ else if ( ! proxyFactory )
+ {
+ MIL << "Build Libproxy Factory" << endl;
+ proxyFactory = ::px_proxy_factory_new();
+ }
+
+ return proxyFactory;
+ }
+
ProxyInfoLibproxy::ProxyInfoLibproxy()
: ProxyInfo::Impl()
{
- _factory = px_proxy_factory_new();
+ _factory = getProxyFactory();
_enabled = !(_factory == NULL);
}
ProxyInfoLibproxy::~ProxyInfoLibproxy()
- {
- if (_enabled) {
- px_proxy_factory_free(_factory);
- _factory = NULL;
- _enabled = false;
- }
- }
+ {}
std::string ProxyInfoLibproxy::proxy(const Url & url_r) const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.13.3/zypp/media/proxyinfo/ProxyInfoSysconfig.cc new/libzypp-8.13.4/zypp/media/proxyinfo/ProxyInfoSysconfig.cc
--- old/libzypp-8.13.3/zypp/media/proxyinfo/ProxyInfoSysconfig.cc 2012-03-02 09:26:25.000000000 +0100
+++ new/libzypp-8.13.4/zypp/media/proxyinfo/ProxyInfoSysconfig.cc 2012-03-13 12:20:09.000000000 +0100
@@ -50,7 +50,7 @@
}
std::string ProxyInfoSysconfig::proxy(const Url & url_r) const
- {
+ {
map::const_iterator it = _proxies.find(url_r.getScheme());
if (it != _proxies.end())
return it->second;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org