Hello community, here is the log from the commit of package libzypp for openSUSE:12.1:Update:Test checked in at 2012-01-18 18:53:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.1:Update:Test/libzypp (Old) and /work/SRC/openSUSE:12.1:Update:Test/.libzypp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:12.1:Update:Test/libzypp/libzypp.changes 2011-12-12 16:54:18.000000000 +0100 +++ /work/SRC/openSUSE:12.1:Update:Test/.libzypp.new/libzypp.changes 2012-01-18 18:54:01.000000000 +0100 @@ -1,0 +2,14 @@ +Mon Jan 16 16:28:50 CET 2012 - [email protected] + +- CheckAccessDeleted: avoid duplicate entries for the same PID (bnc#716972) +- version 10.3.7 (3) + +------------------------------------------------------------------- +Mon Jan 16 11:44:53 CET 2012 - [email protected] + +- Correctly use user:pass directly embedded in a proxy url (bnc#740764) +- Set min_curl_version 7.19.4 (bnc#735284) +- Doc: add some words about 'Solver - Vendor protection' +- version 10.3.6 (3) + +------------------------------------------------------------------- Old: ---- libzypp-10.3.5.tar.bz2 New: ---- libzypp-10.3.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.uKAZQR/_old 2012-01-18 18:54:01.000000000 +0100 +++ /var/tmp/diff_new_pack.uKAZQR/_new 2012-01-18 18:54:01.000000000 +0100 @@ -23,7 +23,7 @@ Group: System/Packages BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Package, Patch, Pattern, and Product Management -Version: 10.3.5 +Version: 10.3.7 Release: 1 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc @@ -104,20 +104,7 @@ Requires: gnupg2 %endif -# --------------------------------------------------------------- -%if 0%{?suse_version} >= 1110 -# (almost) common codebase, but on SLES11-SP1 (according to Rudi -# suse_version == 1110) we have a patched libcurl-7.19.0-11.22, -# and no aria2. Furthermore SLE may use it's own set of .po files -# from po/sle-zypp-po.tar.bz2. - -# this check should use 7.19.0 if SLE and 7.19.4 if not (backported -# CURLOPT_REDIR_PROTOCOLS) -%define min_curl_version 7.19.0-11.22 -%endif - -# --------------------------------------------------------------- - +%define min_curl_version 7.19.4 %if 0%{?suse_version} %if 0%{?suse_version} >= 1100 # Code11+ ++++++ libzypp-10.3.5.tar.bz2 -> libzypp-10.3.7.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-10.3.5/VERSION.cmake new/libzypp-10.3.7/VERSION.cmake --- old/libzypp-10.3.5/VERSION.cmake 2011-12-06 13:11:17.000000000 +0100 +++ new/libzypp-10.3.7/VERSION.cmake 2012-01-16 17:16:07.000000000 +0100 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "10") SET(LIBZYPP_COMPATMINOR "3") SET(LIBZYPP_MINOR "3") -SET(LIBZYPP_PATCH "5") +SET(LIBZYPP_PATCH "7") # -# LAST RELEASED: 10.3.5 (3) +# LAST RELEASED: 10.3.7 (3) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-10.3.5/libzypp.spec.cmake new/libzypp-10.3.7/libzypp.spec.cmake --- old/libzypp-10.3.5/libzypp.spec.cmake 2011-12-06 13:11:17.000000000 +0100 +++ new/libzypp-10.3.7/libzypp.spec.cmake 2012-01-16 17:16:07.000000000 +0100 @@ -104,20 +104,7 @@ Requires: gnupg2 %endif -# --------------------------------------------------------------- -%if 0%{?suse_version} >= 1110 -# (almost) common codebase, but on SLES11-SP1 (according to Rudi -# suse_version == 1110) we have a patched libcurl-7.19.0-11.22, -# and no aria2. Furthermore SLE may use it's own set of .po files -# from po/sle-zypp-po.tar.bz2. - -# this check should use 7.19.0 if SLE and 7.19.4 if not (backported -# CURLOPT_REDIR_PROTOCOLS) -%define min_curl_version 7.19.0-11.22 -%endif - -# --------------------------------------------------------------- - +%define min_curl_version 7.19.4 %if 0%{?suse_version} %if 0%{?suse_version} >= 1100 # Code11+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-10.3.5/mkChangelog new/libzypp-10.3.7/mkChangelog --- old/libzypp-10.3.5/mkChangelog 2011-12-06 13:11:17.000000000 +0100 +++ new/libzypp-10.3.7/mkChangelog 2012-01-16 17:16:06.000000000 +0100 @@ -107,7 +107,7 @@ echo "" } -git status --porcelain | grep '^[^ ]' | grep -v "$VERSIONFILE\|$CHANGESFILE" && { +git status --porcelain | grep '^[^ ?]' | grep -v "$VERSIONFILE\|$CHANGESFILE" && { Becho "!!! Files other than version and changes are added to the index." Becho "!!! Doing dryrun..." DRYRUN=1 @@ -179,12 +179,18 @@ else Becho "!!! Remember new version $THIS_RELEASE in $VERSIONFILE" sed -i "s/^# LAST RELEASED:.*$/# LAST RELEASED: $THIS_RELEASE ($THIS_COMPAT)/" $VERSIONFILE - git add "$CHANGESFILE" "$VERSIONFILE" \ - && git commit -m "changes $THIS_RELEASE ($THIS_COMPAT)" \ - && git tag -m "tagging $THIS_RELEASE" "$THIS_RELEASE" HEAD - Becho "!!!" - Becho "!!! Do not forget to push the commit and the tag: $(Gecho git push --tags)" - Becho "!!!" + if git add "$CHANGESFILE" "$VERSIONFILE" \ + && git commit -m "changes $THIS_RELEASE ($THIS_COMPAT)" \ + && git tag -m "tagging $THIS_RELEASE" "$THIS_RELEASE" HEAD; then + Becho "!!!" + Becho "!!! Do not forget to push the commit and the tag: $(Gecho git push --tags origin HEAD)" + Becho "!!!" + else + Recho "!!!" + Recho "!!! Commit failed. Check manually. (git reset HEAD~)" + Recho "!!!" + exit 9 + fi fi } ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-10.3.5/package/libzypp.changes new/libzypp-10.3.7/package/libzypp.changes --- old/libzypp-10.3.5/package/libzypp.changes 2011-12-06 13:11:17.000000000 +0100 +++ new/libzypp-10.3.7/package/libzypp.changes 2012-01-16 17:16:07.000000000 +0100 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Mon Jan 16 16:28:50 CET 2012 - [email protected] + +- CheckAccessDeleted: avoid duplicate entries for the same PID (bnc#716972) +- version 10.3.7 (3) + +------------------------------------------------------------------- +Mon Jan 16 11:44:53 CET 2012 - [email protected] + +- Correctly use user:pass directly embedded in a proxy url (bnc#740764) +- Set min_curl_version 7.19.4 (bnc#735284) +- Doc: add some words about 'Solver - Vendor protection' +- version 10.3.6 (3) + +------------------------------------------------------------------- Thu Dec 1 01:13:37 CET 2011 - [email protected] - Update zypp-po.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-10.3.5/zypp/media/MediaCurl.cc new/libzypp-10.3.7/zypp/media/MediaCurl.cc --- old/libzypp-10.3.5/zypp/media/MediaCurl.cc 2011-12-06 13:11:18.000000000 +0100 +++ new/libzypp-10.3.7/zypp/media/MediaCurl.cc 2012-01-16 17:16:06.000000000 +0100 @@ -333,9 +333,19 @@ #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)); + 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"; @@ -642,10 +652,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-10.3.5/zypp/misc/CheckAccessDeleted.cc new/libzypp-10.3.7/zypp/misc/CheckAccessDeleted.cc --- old/libzypp-10.3.5/zypp/misc/CheckAccessDeleted.cc 2011-12-06 13:11:18.000000000 +0100 +++ new/libzypp-10.3.7/zypp/misc/CheckAccessDeleted.cc 2012-01-16 17:16:07.000000000 +0100 @@ -10,6 +10,8 @@ * */ #include <iostream> +#include <unordered_map> +#include <unordered_set> #include "zypp/base/LogTools.h" #include "zypp/base/String.h" #include "zypp/base/Exception.h" @@ -39,23 +41,27 @@ // (ftkn).filedescriptor type linkcount filename // ///////////////////////////////////////////////////////////////// + + /** lsof output line + files extracted so far for this PID */ + typedef std::pair<std::string,std::unordered_set<std::string>> CacheEntry; + /** Add \c cache to \c data if the process is accessing deleted files. * \c pid string in \c cache is the proc line \c (pcuLR), \c iles * are lready in place. Always clear the \c cache.files! */ - inline void addDataIf( std::vector<CheckAccessDeleted::ProcInfo> & data_r, CheckAccessDeleted::ProcInfo & cache_r ) + inline void addDataIf( std::vector<CheckAccessDeleted::ProcInfo> & data_r, const CacheEntry & cache_r ) { - if ( cache_r.files.empty() ) + const auto & filelist( cache_r.second ); + + if ( filelist.empty() ) return; // at least one file access so keep it: data_r.push_back( CheckAccessDeleted::ProcInfo() ); CheckAccessDeleted::ProcInfo & pinfo( data_r.back() ); + pinfo.files.insert( pinfo.files.begin(), filelist.begin(), filelist.end() ); - std::string pline; - cache_r.pid.swap( pline ); - cache_r.files.swap( pinfo.files ); // clears cache.files - + const std::string & pline( cache_r.first ); for_( ch, pline.begin(), pline.end() ) { switch ( *ch ) @@ -87,16 +93,16 @@ if ( ! command.empty() ) pinfo.command = command.basename(); } - //MIL << " Take " << pinfo << endl; } - /** Add line to cache if it refers to a deleted executable or library file: + + /** Add file to cache if it refers to a deleted executable or library file: * - Either the link count \c(k) is \c 0, or no link cout is present. * - The type \c (t) is set to \c REG or \c DEL * - The filedescriptor \c (f) is set to \c txt, \c mem or \c DEL */ - inline void addCacheIf( CheckAccessDeleted::ProcInfo & cache_r, const std::string & line_r, bool verbose_r ) + inline void addCacheIf( CacheEntry & cache_r, const std::string & line_r, bool verbose_r ) { const char * f = 0; const char * t = 0; @@ -159,12 +165,8 @@ return; } } - - if ( std::find( cache_r.files.begin(), cache_r.files.end(), n ) == cache_r.files.end() ) - { - // Add if no duplicate - cache_r.files.push_back( n ); - } + // Add if no duplicate + cache_r.second.insert( n ); } ///////////////////////////////////////////////////////////////// } // namespace @@ -173,7 +175,6 @@ CheckAccessDeleted::size_type CheckAccessDeleted::check( bool verbose_r ) { _data.clear(); - std::vector<ProcInfo> data; static const char* argv[] = { @@ -181,20 +182,22 @@ }; ExternalProgram prog( argv, ExternalProgram::Discard_Stderr ); - CheckAccessDeleted::ProcInfo cache; + // cachemap: PID => (deleted files) + std::map<pid_t,CacheEntry> cachemap; + pid_t cachepid; for( std::string line = prog.receiveLine(); ! line.empty(); line = prog.receiveLine() ) { + // NOTE: line contains '\0' separeated fields! if ( line[0] == 'p' ) { - addDataIf( data, cache ); - cache.pid = line; // + str::strtonum( line.c_str()+1, cachepid ); // line is "p<PID>\0...." + cachemap[cachepid].first.swap( line ); } else { - addCacheIf( cache, line, verbose_r ); + addCacheIf( cachemap[cachepid], line, verbose_r ); } } - addDataIf( data, cache ); int ret = prog.close(); if ( ret != 0 ) @@ -204,6 +207,11 @@ ZYPP_THROW( err ); } + std::vector<ProcInfo> data; + for ( const auto & cached : cachemap ) + { + addDataIf( data, cached.second ); + } _data.swap( data ); return _data.size(); } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
