Hello community,
here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2017-02-25 00:46:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
and /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2017-02-19 00:57:19.106871234 +0100
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2017-02-25 00:46:58.112845688 +0100
@@ -1,0 +2,7 @@
+Mon Feb 20 10:10:43 CET 2017 - ma@suse.de
+
+- PublicKey: Create tmpdirs inside ZYpp::tmpPath (bsc#926844)
+- Don't create AnonymousUniqueId in chroot (bsc#1024741)
+- version 16.4.3 (0)
+
+-------------------------------------------------------------------
Old:
----
libzypp-16.4.2.tar.bz2
New:
----
libzypp-16.4.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.U60wPB/_old 2017-02-25 00:46:58.848733507 +0100
+++ /var/tmp/diff_new_pack.U60wPB/_new 2017-02-25 00:46:58.848733507 +0100
@@ -19,7 +19,7 @@
%define force_gcc_46 0
Name: libzypp
-Version: 16.4.2
+Version: 16.4.3
Release: 0
Url: git://gitorious.org/opensuse/libzypp.git
Summary: Package, Patch, Pattern, and Product Management
++++++ libzypp-16.4.2.tar.bz2 -> libzypp-16.4.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/VERSION.cmake new/libzypp-16.4.3/VERSION.cmake
--- old/libzypp-16.4.2/VERSION.cmake 2017-02-14 12:11:10.000000000 +0100
+++ new/libzypp-16.4.3/VERSION.cmake 2017-02-20 10:16:09.000000000 +0100
@@ -61,8 +61,8 @@
SET(LIBZYPP_MAJOR "16")
SET(LIBZYPP_COMPATMINOR "0")
SET(LIBZYPP_MINOR "4")
-SET(LIBZYPP_PATCH "2")
+SET(LIBZYPP_PATCH "3")
#
-# LAST RELEASED: 16.4.2 (0)
+# LAST RELEASED: 16.4.3 (0)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/package/libzypp.changes new/libzypp-16.4.3/package/libzypp.changes
--- old/libzypp-16.4.2/package/libzypp.changes 2017-02-14 12:11:10.000000000 +0100
+++ new/libzypp-16.4.3/package/libzypp.changes 2017-02-20 10:16:09.000000000 +0100
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Feb 20 10:10:43 CET 2017 - ma@suse.de
+
+- PublicKey: Create tmpdirs inside ZYpp::tmpPath (bsc#926844)
+- Don't create AnonymousUniqueId in chroot (bsc#1024741)
+- version 16.4.3 (0)
+
+-------------------------------------------------------------------
Tue Feb 14 12:07:14 CET 2017 - ma@suse.de
- dumpAsXmlOnL: xml escape node content (bsc#1024909)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/po/nl.po new/libzypp-16.4.3/po/nl.po
--- old/libzypp-16.4.2/po/nl.po 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/po/nl.po 2017-02-21 11:31:09.000000000 +0100
@@ -16,10 +16,10 @@
"Project-Id-Version: zypp.nl\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-21 15:07+0100\n"
-"PO-Revision-Date: 2016-07-12 14:59+0000\n"
-"Last-Translator: Eva van Rein \n"
-"Language-Team: Dutch <https://l10n.opensuse.org/projects/libzypp/master/nl/"
-">\n"
+"PO-Revision-Date: 2017-02-21 10:27+0000\n"
+"Last-Translator: Freek de Kruijf \n"
+"Language-Team: Dutch https://l10n.opensuse.org/projects/libzypp/master/nl/"
+"\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -4574,6 +4574,8 @@
"Create attach point: Can't find a writable directory to create an attach "
"point"
msgstr ""
+"Aanknooppunt aanmaken: Kan geen beschrijfbare map vinden om een aanknooppunt "
+"aan te maken"
#. !\todo add comma to the message for the next release
#: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1687
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/tests/zypp/Target_test.cc new/libzypp-16.4.3/tests/zypp/Target_test.cc
--- old/libzypp-16.4.2/tests/zypp/Target_test.cc 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/tests/zypp/Target_test.cc 2017-02-16 14:21:10.000000000 +0100
@@ -1,5 +1,5 @@
-
#include <iostream>
+#include <fstream>
#include <list>
#include <string>
@@ -34,9 +34,17 @@
z->initializeTarget( tmp.path() );
- BOOST_CHECK( ! z->target()->anonymousUniqueId().empty() );
+ // bsc#1024741: Omit creating a new uid for chrooted systems (if it already has one, fine)
+ BOOST_CHECK( ! PathInfo( tmp.path() / "/var/lib/zypp/AnonymousUniqueId").isExist() );
+ // create an artificial one
+ {
+ Pathname f( tmp.path() / "/var/lib/zypp" );
+ filesystem::assert_dir( f );
+ std::ofstream o( (f/"AnonymousUniqueId").c_str() );
+ o << "AnonymousUniqueId";
+ }
BOOST_CHECK( PathInfo( tmp.path() / "/var/lib/zypp/AnonymousUniqueId").isExist() );
- BOOST_CHECK( PathInfo( tmp.path() / "/var/lib/zypp/AnonymousUniqueId").size() > 0 );
+ BOOST_CHECK_EQUAL( z->target()->anonymousUniqueId(), "AnonymousUniqueId" );
// now check the base product
BOOST_CHECK_EQUAL( z->target()->targetDistribution(), "sle-10-i586");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/Digest.cc new/libzypp-16.4.3/zypp/Digest.cc
--- old/libzypp-16.4.2/zypp/Digest.cc 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/zypp/Digest.cc 2017-02-21 14:26:06.000000000 +0100
@@ -67,7 +67,7 @@
P();
~P();
- EVP_MD_CTX mdctx;
+ EVP_MD_CTX *mdctx;
const EVP_MD *md;
unsigned char md_value[EVP_MAX_MD_SIZE];
@@ -117,9 +117,13 @@
if(!md)
return false;
- EVP_MD_CTX_init(&mdctx);
-
- if(!EVP_DigestInit_ex(&mdctx, md, NULL))
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ mdctx = (EVP_MD_CTX*) malloc(sizeof(EVP_MD_CTX));
+ EVP_MD_CTX_init(mdctx);
+#else
+ mdctx = EVP_MD_CTX_new();
+#endif
+ if(!EVP_DigestInit_ex(mdctx, md, NULL))
return false;
md_len = 0;
@@ -133,7 +137,11 @@
{
if(initialized)
{
- EVP_MD_CTX_cleanup(&mdctx);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ EVP_MD_CTX_cleanup(mdctx);
+#else
+ EVP_MD_CTX_free(mdctx);
+#endif
initialized = false;
finalized = false;
}
@@ -171,10 +179,10 @@
return false;
if(!_dp->finalized)
{
- (void)EVP_DigestFinal_ex(&_dp->mdctx, _dp->md_value, &_dp->md_len);
+ (void)EVP_DigestFinal_ex(_dp->mdctx, _dp->md_value, &_dp->md_len);
_dp->finalized = true;
}
- if(!EVP_DigestInit_ex(&_dp->mdctx, _dp->md, NULL))
+ if(!EVP_DigestInit_ex(_dp->mdctx, _dp->md, NULL))
return false;
_dp->finalized = false;
return true;
@@ -187,7 +195,7 @@
if(!_dp->finalized)
{
- if(!EVP_DigestFinal_ex(&_dp->mdctx, _dp->md_value, &_dp->md_len))
+ if(!EVP_DigestFinal_ex(_dp->mdctx, _dp->md_value, &_dp->md_len))
return std::string();
_dp->finalized = true;
@@ -212,7 +220,7 @@
if(!_dp->finalized)
{
- if(!EVP_DigestFinal_ex(&_dp->mdctx, _dp->md_value, &_dp->md_len))
+ if(!EVP_DigestFinal_ex(_dp->mdctx, _dp->md_value, &_dp->md_len))
return r;
_dp->finalized = true;
}
@@ -239,7 +247,7 @@
return false;
}
- if(!EVP_DigestUpdate(&_dp->mdctx, reinterpret_cast(bytes), len))
+ if(!EVP_DigestUpdate(_dp->mdctx, reinterpret_cast(bytes), len))
return false;
return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/PublicKey.cc new/libzypp-16.4.3/zypp/PublicKey.cc
--- old/libzypp-16.4.2/zypp/PublicKey.cc 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/zypp/PublicKey.cc 2017-02-20 10:16:09.000000000 +0100
@@ -24,9 +24,6 @@
#include "zypp/base/Exception.h"
#include "zypp/base/LogTools.h"
#include "zypp/Date.h"
-#include "zypp/TmpPath.h"
-
-#include <ctime>
/** \todo Fix duplicate define in PublicKey/KeyRing */
#define GPG_BINARY "/usr/bin/gpg2"
@@ -344,13 +341,15 @@
{ return _hiddenKeys; }
protected:
+ std::string _initHomeDir() ///< readFromFile helper to prepare the 'gpg --homedir'
+ { Pathname ret( zypp::myTmpDir() / "PublicKey" ); filesystem::assert_dir( ret ); return ret.asString(); }
+
void readFromFile()
{
PathInfo info( _dataFile.path() );
MIL << "Reading pubkey from " << info.path() << " of size " << info.size() << " and sha1 " << filesystem::checksum(info.path(), "sha1") << endl;
- static filesystem::TmpDir dir;
- std::string tmppath( dir.path().asString() );
+ static std::string tmppath( _initHomeDir() );
std::string datapath( _dataFile.path().asString() );
const char* argv[] =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/TmpPath.h new/libzypp-16.4.3/zypp/TmpPath.h
--- old/libzypp-16.4.2/zypp/TmpPath.h 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/zypp/TmpPath.h 2017-02-20 10:16:09.000000000 +0100
@@ -196,6 +196,10 @@
///////////////////////////////////////////////////////////////////
} // namespace filesystem
+
+ /** Global access to the zypp.TMPDIR (created on demand, deleted when libzypp is unloaded) */
+ Pathname myTmpDir(); // implemented in ZYppImpl.cc
+
} // namespace zypp
#endif // ZYPP_TMPPATH_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/media/TransferSettings.cc new/libzypp-16.4.3/zypp/media/TransferSettings.cc
--- old/libzypp-16.4.2/zypp/media/TransferSettings.cc 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/zypp/media/TransferSettings.cc 2017-02-16 14:21:10.000000000 +0100
@@ -95,6 +95,7 @@
void TransferSettings::addHeader( const std::string &header )
{
+ if ( ! header.empty() )
_impl->_headers.push_back(header);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/sat/Solvable.cc new/libzypp-16.4.3/zypp/sat/Solvable.cc
--- old/libzypp-16.4.2/zypp/sat/Solvable.cc 2017-01-26 13:07:00.000000000 +0100
+++ new/libzypp-16.4.3/zypp/sat/Solvable.cc 2017-02-16 14:21:10.000000000 +0100
@@ -525,7 +525,7 @@
///////////////////////////////////////////////////////////////////
namespace
{
- /** Expand \ref Capability and call \c fnc_r for each namescpace:language
+ /** Expand \ref Capability and call \c fnc_r for each namespace:language
* dependency. Return #invocations of fnc_r, negative if fnc_r returned
* false to indicate abort.
*/
@@ -566,7 +566,7 @@
return 0;
}
- /** Expand \ref Capability and call \c fnc_r for each namescpace:language
+ /** Expand \ref Capability and call \c fnc_r for each namespace:language
* dependency. Return #invocations of fnc_r, negative if fnc_r returned
* false to indicate abort.
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/target/TargetImpl.cc new/libzypp-16.4.3/zypp/target/TargetImpl.cc
--- old/libzypp-16.4.2/zypp/target/TargetImpl.cc 2017-01-26 13:07:00.000000000 +0100
+++ new/libzypp-16.4.3/zypp/target/TargetImpl.cc 2017-02-16 14:21:10.000000000 +0100
@@ -751,9 +751,11 @@
void TargetImpl::createAnonymousId() const
{
+ // bsc#1024741: Omit creating a new uid for chrooted systems (if it already has one, fine)
+ if ( root() != "/" )
+ return;
- // create the anonymous unique id
- // this value is used for statistics
+ // Create the anonymous unique id, used for download statistics
Pathname idpath( home() / "AnonymousUniqueId");
try
@@ -1709,7 +1711,7 @@
}
return std::string();
}
- } // namescpace
+ } // namespace
///////////////////////////////////////////////////////////////////
Product::constPtr TargetImpl::baseProduct() const
@@ -1830,15 +1832,29 @@
}
///////////////////////////////////////////////////////////////////
+ namespace
+ {
+ std::string guessAnonymousUniqueId( const Pathname & root_r )
+ {
+ // bsc#1024741: Omit creating a new uid for chrooted systems (if it already has one, fine)
+ std::string ret( firstNonEmptyLineIn( root_r / "/var/lib/zypp/AnonymousUniqueId" ) );
+ if ( ret.empty() && root_r != "/" )
+ {
+ // if it has nonoe, use the outer systems one
+ ret = firstNonEmptyLineIn( "/var/lib/zypp/AnonymousUniqueId" );
+ }
+ return ret;
+ }
+ }
std::string TargetImpl::anonymousUniqueId() const
{
- return firstNonEmptyLineIn( home() / "AnonymousUniqueId" );
+ return guessAnonymousUniqueId( root() );
}
// static version:
std::string TargetImpl::anonymousUniqueId( const Pathname & root_r )
{
- return firstNonEmptyLineIn( staticGuessRoot(root_r) / "/var/lib/zypp/AnonymousUniqueId" );
+ return guessAnonymousUniqueId( staticGuessRoot(root_r) );
}
///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.2/zypp/zypp_detail/ZYppImpl.cc new/libzypp-16.4.3/zypp/zypp_detail/ZYppImpl.cc
--- old/libzypp-16.4.2/zypp/zypp_detail/ZYppImpl.cc 2016-11-29 11:31:52.000000000 +0100
+++ new/libzypp-16.4.3/zypp/zypp_detail/ZYppImpl.cc 2017-02-20 10:16:09.000000000 +0100
@@ -204,10 +204,7 @@
{ _home_path = path; }
Pathname ZYppImpl::tmpPath() const
- {
- static TmpDir zypp_tmp_dir( TmpPath::defaultLocation(), "zypp." );
- return zypp_tmp_dir.path();
- }
+ { return zypp::myTmpDir(); }
/******************************************************************
**
@@ -222,6 +219,13 @@
/////////////////////////////////////////////////////////////////
} // namespace zypp_detail
///////////////////////////////////////////////////////////////////
+
+ Pathname myTmpDir() // from TmpPath.h
+ {
+ static filesystem::TmpDir _tmpdir( TmpPath::defaultLocation(), "zypp." );
+ return _tmpdir.path();
+ }
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////