SET(LIBZYPP_MAJOR "17")
SET(LIBZYPP_COMPATMINOR "0")
SET(LIBZYPP_MINOR "0")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
#
-# LAST RELEASED: 17.0.1 (0)
+# LAST RELEASED: 17.0.2 (0)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
<DD>Also support braced variables, shell like default and alternate values.</DD>
<DT>version 1</DT>
<DD>Also support user defined repo variables in /etc/zypp/vars.d.</DD>
+ <DT>version 1.1</DT>
+ <DD>Support repo variables in an URIs \c host and \c port component.</DD>
</DL></DD>
</DL>
\subsection zypp-repoars-userdefined User defined repository variables [requires 'libzypp(repovarexpand) >= 1']
-A custom repository variable is defined by creating a file in \c /etc/zypp/vars.d. The variable name equals the file name. The files first line (up to but not including the newline character) defines the variables value.
+A custom repository variable is defined by creating a file in \c /etc/zypp/vars.d. The variable name equals the file name. The files first line (up to but not including the newline character) defines the variables value. Valid variable(file) names consist of alphanumeric chars and '_' only.
+
+Variable substitution within an URIs authority [requires 'libzypp(repovarexpand) >= 1.1'] is limited to \c host and \c port. Bash style definition of default and alternate values is not supported. No variables can be used in an URIs \c scheme, \c user and \c password.
*/
Provides: libzypp(plugin:services) = 1
Provides: libzypp(plugin:system) = 1
Provides: libzypp(plugin:urlresolver) = 0
-Provides: libzypp(repovarexpand) = 1
+Provides: libzypp(repovarexpand) = 1.1
%if 0%{?suse_version}
Recommends: logrotate
-------------------------------------------------------------------
+Thu Nov 23 12:33:51 CET 2017 - ma@suse.de
+
+- Don't filter procs with a different mnt namespace (bsc#1068708)
+- Support repo variables in an URIs host:port component
+ (bsc#1057640, bsc#1067605)
+- version 17.0.2 (0)
+
+-------------------------------------------------------------------
Fri Nov 10 15:25:20 CET 2017 - ma@suse.de
- Solvable: fix inconsistent retrieval of mediaNr (bsc#1065677)
"Project-Id-Version: zypp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 12:25+0200\n"
-"PO-Revision-Date: 2017-04-18 10:42+0000\n"
-"Last-Translator: Ewelina Michalowska <ewelina.michalowska@stgambit.com>\n"
-"Language-Team: Polish <https://l10n.opensuse.org/projects/libzypp/master/pl/"
-">\n"
+"PO-Revision-Date: 2017-11-16 22:31+0000\n"
+"Last-Translator: Mariusz Fik <fisiu@opensuse.org>\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.6\n"
+"X-Generator: Weblate 2.13.1\n"
#: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
#: zypp/target/hal/HalException.h:64
#. translators: an annotation to a gpg keys expiry date
#: zypp/PublicKey.cc:60
-#, fuzzy
msgid "does not expire"
-msgstr "(nie wygasa)"
+msgstr "nie wygasa"
#. translators: an annotation to a gpg keys expiry date: "expired: 1999-04-12"
#: zypp/PublicKey.cc:65
#, boost-format
msgid "expired: %1%"
-msgstr ""
+msgstr "wygasł: %1%"
#. translators: an annotation to a gpg keys expiry date: "expires: 2111-04-12"
#: zypp/PublicKey.cc:70
#, boost-format
msgid "expires: %1%"
-msgstr ""
+msgstr "wygasa: %1%"
#. translators: an annotation to a gpg keys expiry date
#: zypp/PublicKey.cc:79
#: zypp/target/rpm/RpmDb.cc:1568
msgid "Package is not signed!"
-msgstr ""
+msgstr "Pakiet nie jest podpisany!"
#. Translator: %s = name of an rpm package. A list of diffs follows
#. this message.
#. translators: possible rpm package signature check result [brief]
#: zypp/target/rpm/RpmDb.cc:2397
msgid "File is unsigned"
-msgstr ""
+msgstr "Plik jest niepodpisany"
#: zypp/thread/Mutex.cc:33
msgid "Can't initialize mutex attributes"
RepVarExpandTest( "__${D:+\\$X--{${E:-==\\$X{o\\}==}\\}--}__\\${B}${}__", "____\\${B}${}__" , "__$X--{[E]}--__\\[B]${}__" );
}
+void varInAuthExpect( const Url & url_r, const std::string & expHost_r, const std::string & expPort_r, const std::string & expPath_r,
+ const std::string & user_r = std::string(), const std::string & pass_r = std::string() )
+{
+ BOOST_CHECK_EQUAL( url_r.getHost(), expHost_r );
+ BOOST_CHECK_EQUAL( url_r.getPort(), expPort_r );
+ BOOST_CHECK_EQUAL( url_r.getPathName(), expPath_r );
+ BOOST_CHECK_EQUAL( url_r.getUsername(), user_r );
+ BOOST_CHECK_EQUAL( url_r.getPassword(), pass_r );
+}
+
BOOST_AUTO_TEST_CASE(replace_text)
{
/* check RepoVariablesStringReplacer */
/* check RepoVariablesUrlReplacer */
repo::RepoVariablesUrlReplacer replacer2;
-// // first of all url with {} must be accepted:
+ // first of all url with {} must be accepted:
BOOST_CHECK_NO_THROW( Url("ftp://site.org/${arch}/?arch=${arch}") );
BOOST_CHECK_NO_THROW( Url("ftp://site.org/${arch:-noarch}/?arch=${arch:-noarch}") );
BOOST_CHECK_NO_THROW( Url("ftp://site.org/${arch:+somearch}/?arch=${arch:+somearch}") );
BOOST_CHECK_EQUAL(replacer2(Url("http://site.org/update/$releasever/?arch=$arch")).asCompleteString(),
"http://site.org/update/13.2/?arch=i686");
+
+ // - bsc#1067605: Allow VAR in Url authority
+ // fake some host name via $arch
+ varInAuthExpect( replacer2(Url("ftp://$arch/path")), "i686", "", "/path" );
+ varInAuthExpect( replacer2(Url("ftp://$arch:1234/path")), "i686", "1234", "/path" );
+ // don't expand in user/pass!
+ varInAuthExpect( replacer2(Url("ftp://$arch:$arch@$arch:1234/path")), "i686", "1234", "/path", "$arch", "$arch" );
+ // No support for complex vars:
+ // BOOST_CHECK_NO_THROW( Url("ftp://${arch:-nosite}/path") );
+ // BOOST_CHECK_NO_THROW( Url("ftp://${arch:+somesite}/path") );
}
BOOST_AUTO_TEST_CASE(uncached)
if ( names )
q.addAttribute( sat::SolvAttr::name );
if ( provides )
- q.addDependency( sat::SolvAttr::provides );
+ q.addDependency( sat::SolvAttr::provides, Capability(qstr) );
if ( requires )
- q.addDependency( sat::SolvAttr::requires );
+ q.addDependency( sat::SolvAttr::requires, Capability(qstr) );
if ( conflicts )
- q.addDependency( sat::SolvAttr::conflicts );
+ q.addDependency( sat::SolvAttr::conflicts, Capability(qstr) );
if ( obsoletes )
- q.addDependency( sat::SolvAttr::obsoletes );
+ q.addDependency( sat::SolvAttr::obsoletes, Capability(qstr) );
if ( recommends )
- q.addDependency( sat::SolvAttr::recommends );
+ q.addDependency( sat::SolvAttr::recommends, Capability(qstr) );
if ( supplements )
- q.addDependency( sat::SolvAttr::supplements );
+ q.addDependency( sat::SolvAttr::supplements, Capability(qstr) );
if ( enhacements )
{
- q.addDependency( sat::SolvAttr::enhances );
- q.addDependency( sat::SolvAttr::suggests );
+ q.addDependency( sat::SolvAttr::enhances, Capability(qstr) );
+ q.addDependency( sat::SolvAttr::suggests, Capability(qstr) );
}
}
DefaultIntegral<unsigned,defaultPriority> priority;
mutable bool emptybaseurls;
- repo::RepoVariablesUrlReplacer replacer;
private:
Pathname _metadataPath;
/// \class FilterRunsInLXC
/// \brief Functor guessing whether \a PID is running in a container.
///
- /// Asumme a using different \c pid/mnt namespace than \c self.
+ /// Assumme using different \c pid namespace than \c self.
/////////////////////////////////////////////////////////////////
struct FilterRunsInLXC
{
bool operator()( pid_t pid_r ) const
- { return( nsIno( pid_r, "pid" ) != pidNS || nsIno( pid_r, "mnt" ) != mntNS ); }
+ { return( nsIno( pid_r, "pid" ) != pidNS ); }
FilterRunsInLXC()
: pidNS( nsIno( "self", "pid" ) )
- , mntNS( nsIno( "self", "mnt" ) )
{}
static inline ino_t nsIno( const std::string & pid_r, const std::string & ns_r )
{ return nsIno( asString(pid_r), ns_r ); }
ino_t pidNS;
- ino_t mntNS;
};
#if 0
/** Valid var name char */
bool isnamech( int ch ) const
- { return ch == '_' || isalpha( ch ); }
+ { return ch == '_' || isalnum( ch ); }
/** Scan for a valid variable starting at _vbeg (storing the values) */
bool findVarEnd()
Url RepoVariablesUrlReplacer::operator()( const Url & value ) const
{
- RepoVarExpand expand;
- Url newurl( value );
- newurl.setPathData( expand( value.getPathData(), RepoVarsMap::lookup ) );
- newurl.setQueryString( expand( value.getQueryString(), RepoVarsMap::lookup ) );
+ static const Url::ViewOptions toReplace = url::ViewOption::DEFAULTS - 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 );
+ }
return newurl;
}
} // namespace repo
/**
* \short Functor replacing repository variables
*
- * Replaces repository variables in the path and query part of the URL.
+ * Replaces repository variables in the URL (except for user/pass inside authority)
* \see RepoVariablesStringReplacer
*/
struct RepoVariablesUrlReplacer : public std::unary_function<const Url &, Url>
#define RX_VALID_PORT "^[0-9]{1,5}$"
-#define RX_VALID_HOSTNAME "^[[:alnum:]]+([\\.-][[:alnum:]]+)*$"
+#define RX_VALID_HOSTNAME "^[[:alnum:]${_}]+([\\.-][[:alnum:]${_}]+)*$"
#define RX_VALID_HOSTIPV4 \
"^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$"
config("safe_username", "~!$&'()*+=,;");
config("safe_password", "~!$&'()*+=,:;");
- config("safe_hostname", "[:]");
+ config("safe_hostname", "[:]${_}");
config("safe_pathname", "~!$&'()*+=,:@/");
config("safe_pathparams", "~!$&'()*+=,:;@/");
config("safe_querystr", "~!$&'()*+=,:;@/?");