SET(LIBZYPP_MAJOR "17")
SET(LIBZYPP_COMPATMINOR "9")
SET(LIBZYPP_MINOR "11")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
#
-# LAST RELEASED: 17.11.0 (9)
+# LAST RELEASED: 17.11.1 (9)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
-------------------------------------------------------------------
+Thu Jan 31 17:41:21 CET 2019 - ma@suse.de
+
+- CheckAccessDeleted: Suppress reporting `/memfd:` pseudo files
+ (bsc#1123843)
+- MediaCurl: improve reporting https->http redirection errors
+- Prevent SEGV if the application sets an empty TextLocale
+- Url: don't force printing an empty authority if the schema does not
+ allow authority at all
+- Try to the missing rpmDB compat symlink in case the rpm package got
+ deleted (bsc#1122471)
+- version 17.11.1 (9)
+
+-------------------------------------------------------------------
Fri Jan 11 10:24:33 CET 2019 - ma@suse.de
- PoolItemBest: Optionally prefer not locked packages (for bsc#1113296)
"Project-Id-Version: zypp.hu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-03 11:09+0200\n"
-"PO-Revision-Date: 2018-04-12 12:07+0000\n"
+"PO-Revision-Date: 2019-01-25 20:07+0000\n"
"Last-Translator: Robert Taisz <robert.taisz@emerald.hu>\n"
"Language-Team: Hungarian <https://l10n.opensuse.org/projects/libzypp/master/"
"hu/>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.18\n"
+"X-Generator: Weblate 3.3\n"
#: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
#: zypp/target/hal/HalException.h:64
#: zypp/RepoInfo.cc:513
#, boost-format
msgid "Looking for gpg key ID %1% in cache %2%."
-msgstr ""
+msgstr "%1% azonosítójú gpg-kulcs keresése a gyorsítótárban (%2%)."
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a repositories name
#: zypp/RepoInfo.cc:541
#, boost-format
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr ""
+msgstr "%1% azonosítójú gpg-kulcs keresése a telepítési forrásban (%2%)."
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:565
#, boost-format
msgid "Repository %1% does not define additional 'gpgkey=' URLs."
-msgstr ""
+msgstr "A(z) %1% telepítési forrás nem definiál további 'gpgkey=' URL-címeket."
#: zypp/RepoManager.cc:314
#, boost-format
#, c-format, boost-format
msgid "Downloaded data exceeded the expected filesize '%s' of '%s'."
msgstr ""
+"A letöltött adatok mérete meghaladta a várt fájlméretet: '%s' (összesen: "
+"'%s')."
#: zypp/media/MediaException.cc:203
#, c-format, boost-format
"Project-Id-Version: zypp.ko\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-03 11:09+0200\n"
-"PO-Revision-Date: 2018-04-17 05:21+0000\n"
+"PO-Revision-Date: 2019-01-24 19:41+0000\n"
"Last-Translator: Hwajin Kim <hwajin.kim@e4net.net>\n"
-"Language-Team: Korean <https://l10n.opensuse.org/projects/libzypp/master/ko/"
-">\n"
+"Language-Team: Korean <https://l10n.opensuse.org/projects/libzypp/master/ko/>"
+"\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 2.18\n"
+"X-Generator: Weblate 3.3\n"
"X-Poedit-SourceCharset: UTF-8\n"
#: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a cache directories path
#: zypp/RepoInfo.cc:513
-#, boost-format
+#, boost-format, fuzzy
msgid "Looking for gpg key ID %1% in cache %2%."
-msgstr ""
+msgstr "%2% 캐시에서 gpg 키 ID %1%을(를) 검색합니다."
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a repositories name
#: zypp/RepoInfo.cc:541
-#, boost-format
+#, boost-format, fuzzy
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr ""
+msgstr "%2% 리포지토리에서 gpg 키 ID %1%을(를) 검색합니다."
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:565
-#, boost-format
+#, boost-format, fuzzy
msgid "Repository %1% does not define additional 'gpgkey=' URLs."
-msgstr ""
+msgstr "%1% 리포지토리에서 추가 'gpgkey=' URL을 정의하지 않습니다."
#: zypp/RepoManager.cc:314
#, boost-format
msgstr "'%s'에 액세스할 때 제한 시간이 초과되었습니다."
#: zypp/media/MediaException.cc:195
-#, c-format, boost-format
+#, boost-format, c-format, fuzzy
msgid "Downloaded data exceeded the expected filesize '%s' of '%s'."
-msgstr ""
+msgstr "다운로드한 데이터가 예상 파일 크기 '%s'/'%s'을(를) 초과했습니다."
#: zypp/media/MediaException.cc:203
#, c-format, boost-format
"Project-Id-Version: zypp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-03 11:09+0200\n"
-"PO-Revision-Date: 2018-04-19 14:22+0000\n"
+"PO-Revision-Date: 2019-01-25 20:07+0000\n"
"Last-Translator: Ewelina Michalowska <ewelina.michalowska@stgambit.com>\n"
-"Language-Team: Polish <https://l10n.opensuse.org/projects/libzypp/master/pl/"
-">\n"
+"Language-Team: Polish <https://l10n.opensuse.org/projects/libzypp/master/pl/>"
+"\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.18\n"
+"X-Generator: Weblate 3.3\n"
#: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
#: zypp/target/hal/HalException.h:64
#: zypp/RepoInfo.cc:513
#, boost-format
msgid "Looking for gpg key ID %1% in cache %2%."
-msgstr ""
+msgstr "Wyszukiwanie identyfikatora %1% klucza gpg w buforze %2%."
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a repositories name
#: zypp/RepoInfo.cc:541
#, boost-format
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr ""
+msgstr "Wyszukiwanie identyfikatora %1% klucza gpg w repozytorium %2%."
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:565
#, boost-format
msgid "Repository %1% does not define additional 'gpgkey=' URLs."
-msgstr ""
+msgstr "Repozytorium %1% nie definiuje dodatkowych adresów URL 'gpgkey='."
#: zypp/RepoManager.cc:314
#, boost-format
#: zypp/media/MediaException.cc:195
#, c-format, boost-format
msgid "Downloaded data exceeded the expected filesize '%s' of '%s'."
-msgstr ""
+msgstr "Pobrane dane przekroczyły oczekiwany rozmiar pliku '%s' z '%s'."
#: zypp/media/MediaException.cc:203
#, c-format, boost-format
# Alexandru Szasz <alexxed@gmail.com>
# strainu <narro@strainu.ro>
#
-# Comunitatea romana openSUSE - www.suseromania.ro\r
+# Comunitatea romana openSUSE - www.suseromania.ro
msgid ""
msgstr ""
"Project-Id-Version: OpenSUSE\n"
"Project-Id-Version: zypp.ru\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-03 11:09+0200\n"
-"PO-Revision-Date: 2018-04-18 13:07+0000\n"
-"Last-Translator: Nikita Maynagashev <maynagashev@palex.ru>\n"
+"PO-Revision-Date: 2019-01-24 22:36+0000\n"
+"Last-Translator: Alex Minton <alex239@gmail.com>\n"
"Language-Team: Russian <https://l10n.opensuse.org/projects/libzypp/master/ru/"
">\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.18\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
+"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Weblate 3.3\n"
#: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
#: zypp/target/hal/HalException.h:64
#: zypp/RepoInfo.cc:513
#, boost-format
msgid "Looking for gpg key ID %1% in cache %2%."
-msgstr ""
+msgstr "Поиск ID gpg-ключа %1% в кэше %2%."
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a repositories name
#: zypp/RepoInfo.cc:541
#, boost-format
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr ""
+msgstr "Поиск ID gpg-ключа %1% в репозитории %2%."
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:565
#, boost-format
msgid "Repository %1% does not define additional 'gpgkey=' URLs."
-msgstr ""
+msgstr "Репозиторий %1% не определяет дополнительных URL вида «gpgkey=»."
#: zypp/RepoManager.cc:314
#, boost-format
#: zypp/media/MediaException.cc:195
#, c-format, boost-format
msgid "Downloaded data exceeded the expected filesize '%s' of '%s'."
-msgstr ""
+msgstr "Размер загруженных данных превысил ожидаемый '%s' из '%s'."
#: zypp/media/MediaException.cc:203
#, c-format, boost-format
#include "zypp/base/Exception.h"
#include "zypp/base/String.h"
+#include "zypp/RepoInfo.h"
+
#include "zypp/Url.h"
#include <stdexcept>
#include <iostream>
BOOST_CHECK_EQUAL( str, url.asString() );
BOOST_CHECK_EQUAL( str, url.asCompleteString() );
- // asString & asCompleteString should add empty authority
- // "dvd://...", except we request to avoid it.
- str = "dvd:/srv/ftp";
- one = "dvd:///srv/ftp";
- two = "dvd:///srv/ftp";
- url = str;
+ // In general, schema without authority allows specifying an empty authority
+ // though it should not be printed (unless explicitly requested).
+ BOOST_CHECK_EQUAL( Url("dvd:/srv/ftp").asCompleteString(), "dvd:/srv/ftp" );
+ BOOST_CHECK_EQUAL( Url("dvd:/srv/ftp").asString(), "dvd:/srv/ftp" );
- BOOST_CHECK_EQUAL( one, url.asString() );
- BOOST_CHECK_EQUAL( two, url.asCompleteString() );
- BOOST_CHECK_EQUAL( str, url.asString(zypp::url::ViewOptions() -
- zypp::url::ViewOption::EMPTY_AUTHORITY));
+ BOOST_CHECK_EQUAL( Url("dvd:///srv/ftp").asCompleteString(), "dvd:/srv/ftp" );
+ BOOST_CHECK_EQUAL( Url("dvd:///srv/ftp").asString(), "dvd:/srv/ftp" );
+
+ BOOST_CHECK_EQUAL( Url("dvd:///srv/ftp").asString(url::ViewOption::DEFAULTS+url::ViewOption::EMPTY_AUTHORITY), "dvd:///srv/ftp" );
+ BOOST_CHECK_EQUAL( Url("dvd:///srv/ftp").asString(url::ViewOption::DEFAULTS-url::ViewOption::EMPTY_AUTHORITY), "dvd:/srv/ftp" );
+
+ BOOST_CHECK_THROW( Url("dvd://authority/srv/ftp"), url::UrlNotAllowedException );
// asString shouldn't print the password, asCompleteString should
// further, the "//" at the begin of the path should become "/%2F"
// OK, valid (no host, path is there)
str = "cd:///some/path";
- BOOST_CHECK_EQUAL( str, zypp::Url(str).asString());
BOOST_CHECK( zypp::Url(str).isValid());
}
BOOST_CHECK_EQUAL( Url(zypp::url::encode( str, URL_SAFE_CHARS )).asString(), str );
}
+BOOST_AUTO_TEST_CASE(plugin_scriptpath)
+{
+ // plugin script path must not be rewritten
+ for ( const std::string & t : { "script", "script/", "/script", "/script/", "./script", "./script/" } )
+ {
+ BOOST_CHECK_EQUAL( Url("plugin:"+t).getPathName(), t );
+ }
+
+ { // more cosmetic issue, but the RepoVarReplacer should
+ // not change the string representation (-> "plugin:/script")
+ Url u( "plugin:script?opt=val" );
+ RepoInfo i;
+ i.setBaseUrl( u );
+ BOOST_CHECK_EQUAL( u.asString(), i.url().asString() );
+ }
+
+}
+
BOOST_AUTO_TEST_CASE(plugin_querystring_args)
{
// url querysting options without value must be possible
// =====================================
ref.reset( new UrlBase());
+ // don't show empty authority
+ ref->setViewOptions( zypp::url::ViewOption::DEFAULTS -
+ zypp::url::ViewOption::EMPTY_AUTHORITY);
+
ref->config("with_authority", "n"); // disallow host,...
ref->config("require_pathname", "m"); // path is mandatory
addUrlByScheme("hd", ref);
addUrlByScheme("dir", ref);
addUrlByScheme("iso", ref);
- // don't show empty authority
- ref->setViewOptions( zypp::url::ViewOption::DEFAULTS -
- zypp::url::ViewOption::EMPTY_AUTHORITY);
addUrlByScheme("mailto", ref);
addUrlByScheme("urn", ref);
addUrlByScheme("plugin", ref); // zypp plugable media handler:
return 0;
}
- static size_t
- log_redirects_curl(
- void *ptr, size_t size, size_t nmemb, void *stream)
+ static size_t log_redirects_curl( char *ptr, size_t size, size_t nmemb, void *userdata)
{
- // INT << "got header: " << string((char *)ptr, ((char*)ptr) + size*nmemb) << endl;
+ // INT << "got header: " << string(ptr, ptr + size*nmemb) << endl;
- char * lstart = (char *)ptr, * lend = (char *)ptr;
+ char * lstart = ptr, * lend = ptr;
size_t pos = 0;
size_t max = size * nmemb;
while (pos + 1 < max)
for (lstart = lend; *lend != '\n' && pos < max; ++lend, ++pos);
// look for "Location"
- string line(lstart, lend);
- if (line.find("Location") != string::npos)
+ if ( lstart[0] == 'L'
+ && lstart[1] == 'o'
+ && lstart[2] == 'c'
+ && lstart[3] == 'a'
+ && lstart[4] == 't'
+ && lstart[5] == 'i'
+ && lstart[6] == 'o'
+ && lstart[7] == 'n'
+ && lstart[8] == ':' )
{
+ std::string line { lstart, *(lend-1)=='\r' ? lend-1 : lend };
DBG << "redirecting to " << line << endl;
+ if ( userdata ) {
+ *reinterpret_cast<std::string *>( userdata ) = line;
+ }
return max;
}
}
curl_easy_setopt(_curl, CURLOPT_HEADERFUNCTION, log_redirects_curl);
+ curl_easy_setopt(_curl, CURLOPT_HEADERDATA, &_lastRedirect);
CURLcode ret = curl_easy_setopt( _curl, CURLOPT_ERRORBUFFER, _curlError );
if ( ret != 0 ) {
ZYPP_THROW(MediaCurlSetOptException(_url, "Error setting error buffer"));
switch ( code )
{
case CURLE_UNSUPPORTED_PROTOCOL:
+ err = " Unsupported protocol";
+ if ( !_lastRedirect.empty() )
+ {
+ err += " or redirect (";
+ err += _lastRedirect;
+ err += ")";
+ }
+ break;
case CURLE_URL_MALFORMAT:
case CURLE_URL_MALFORMAT_USER:
err = " Bad URL";
// encoded slash as %2f) "ftp://user@host/%2ffoo/bar/file"
// contains an absolute path.
//
+ _lastRedirect.clear();
string urlBuffer( curlUrl.asString());
CURLcode ret = curl_easy_setopt( _curl, CURLOPT_URL,
urlBuffer.c_str() );
// encoded slash as %2f) "ftp://user@host/%2ffoo/bar/file"
// contains an absolute path.
//
+ _lastRedirect.clear();
string urlBuffer( curlUrl.asString());
CURLcode ret = curl_easy_setopt( _curl, CURLOPT_URL,
urlBuffer.c_str() );
std::string _currentCookieFile;
static Pathname _cookieFile;
+ mutable std::string _lastRedirect; ///< to log/report redirections
+
protected:
CURL *_curl;
char _curlError[ CURL_ERROR_SIZE ];
, "/dev/"
, "/tmp/"
, "/proc/"
+ , "/memfd:"
};
for_( it, arrayBegin( black ), arrayEnd( black ) )
{
Url RepoVariablesUrlReplacer::operator()( const Url & value ) const
{
- static const Url::ViewOptions toReplace = url::ViewOption::DEFAULTS - url::ViewOption::WITH_USERNAME - url::ViewOption::WITH_PASSWORD;
+ Url::ViewOptions toReplace = value.getViewOptions() - url::ViewOption::WITH_USERNAME - url::ViewOption::WITH_PASSWORD;
const std::string & replaced( RepoVarExpand()( value.asString( toReplace ), RepoVarsMap::lookup ) );
Url newurl;
if ( !replaced.empty() )
newurl = replaced;
newurl.setUsername( value.getUsername( url::E_ENCODED ), url::E_ENCODED );
newurl.setPassword( value.getPassword( url::E_ENCODED ), url::E_ENCODED );
+ newurl.setViewOptions( value.getViewOptions() );
}
return newurl;
}
void PoolImpl::setTextLocale( const Locale & locale_r )
{
+ if ( ! locale_r )
+ {
+ // We need one, so "en" is the last resort
+ const char *needone[] { "en" };
+ ::pool_set_languages( _pool, needone, 1 );
+ }
+
std::vector<std::string> fallbacklist;
for ( Locale l( locale_r ); l; l = l.fallback() )
{
#define WORKAROUNDRPMPWDBUG
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "librpmDb"
+
namespace zypp
{
namespace zypp_readonly_hack
ZYPP_THROW(RpmInvalidRootException(root_r, dbPath_r));
}
+ if ( dbPath_r == "/var/lib/rpm"
+ && ! PathInfo( root_r/"/var/lib/rpm" ).isExist()
+ && PathInfo( root_r/"/usr/lib/sysimage/rpm" ).isDir() )
+ {
+ WAR << "Rpm package was deleted? Injecting missing rpmdb compat symlink." << endl;
+ filesystem::symlink( "../../usr/lib/sysimage/rpm", root_r/"/var/lib/rpm" );
+ }
+
MIL << "Calling initDatabase: " << stringPath( root_r, dbPath_r )
<< ( doRebuild_r ? " (rebuilddb)" : "" )
<< ( quickinit ? " (quickinit)" : "" ) << endl;
#include "zypp/target/rpm/RpmHeader.h"
#include "zypp/target/rpm/RpmException.h"
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "librpmDb"
+
using namespace std;
namespace zypp
//
///////////////////////////////////////////////////////////////////
-Pathname librpmDb::_defaultRoot ( "/" );
-Pathname librpmDb::_defaultDbPath( "/var/lib/rpm" );
+Pathname librpmDb::_defaultRoot; // Remembered arg to last dbAccess call
+Pathname librpmDb::_defaultDbPath; // Remembered arg to last dbAccess call
librpmDb::constPtr librpmDb::_defaultDb;
bool librpmDb::_dbBlocked ( true );