Hello community,
here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2017-12-01 15:53:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
and /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp"
Fri Dec 1 15:53:01 2017 rev:391 rq:546364 version:17.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2017-10-21 20:20:39.234152571 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2017-12-01 15:53:04.257261691 +0100
@@ -1,0 +2,32 @@
+Tue Nov 28 18:21:51 CET 2017 - ma@suse.de
+
+- When importing multiple keys, export the individual keys
+ ascii armored for import into the rpmdb (bsc#1069381)
+- version 17.0.3 (0)
+
+-------------------------------------------------------------------
+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)
+- version 17.0.1 (0)
+
+-------------------------------------------------------------------
+Tue Nov 7 16:14:31 CET 2017 - ma@suse.de
+
+- Locale: Fix possible segfault (bsc#1064999)
+- RpmDb: Remove excess keys in the zypp keyring when exporting keys only
+ (bsc#1064380)
+- KeyRing: Fix deleted keys not removed from rpmdb too (bsc#1064380)
+- Flag gpg keycache dirty when adding/removing keys (bsc#1064380)
+- Version 17.x for CODE-15, 16.x. is continued on SuSE-SLE-12-SP2-Branch
+- version 17.0.0 (0)
+
+-------------------------------------------------------------------
Old:
----
libzypp-16.17.3.tar.bz2
New:
----
libzypp-17.0.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.CWuFIn/_old 2017-12-01 15:53:13.664923152 +0100
+++ /var/tmp/diff_new_pack.CWuFIn/_new 2017-12-01 15:53:13.672922864 +0100
@@ -19,7 +19,7 @@
%define force_gcc_46 0
Name: libzypp
-Version: 16.17.3
+Version: 17.0.3
Release: 0
Url: git://gitorious.org/opensuse/libzypp.git
Summary: Package, Patch, Pattern, and Product Management
@@ -38,7 +38,7 @@
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
++++++ libzypp-16.17.3.tar.bz2 -> libzypp-17.0.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/VERSION.cmake new/libzypp-17.0.3/VERSION.cmake
--- old/libzypp-16.17.3/VERSION.cmake 2017-10-12 18:16:06.000000000 +0200
+++ new/libzypp-17.0.3/VERSION.cmake 2017-11-28 18:26:07.000000000 +0100
@@ -58,11 +58,11 @@
# - Consider calling ./mkChangelog to assist you.
# See './mkChangelog -h' for help.
#
-SET(LIBZYPP_MAJOR "16")
+SET(LIBZYPP_MAJOR "17")
SET(LIBZYPP_COMPATMINOR "0")
-SET(LIBZYPP_MINOR "17")
+SET(LIBZYPP_MINOR "0")
SET(LIBZYPP_PATCH "3")
#
-# LAST RELEASED: 16.17.3 (0)
+# LAST RELEASED: 17.0.3 (0)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/doc/autoinclude/FeatureTest.doc new/libzypp-17.0.3/doc/autoinclude/FeatureTest.doc
--- old/libzypp-16.17.3/doc/autoinclude/FeatureTest.doc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/doc/autoinclude/FeatureTest.doc 2017-11-22 10:41:04.000000000 +0100
@@ -68,6 +68,8 @@
<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>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/doc/autoinclude/RepoVariables.doc new/libzypp-17.0.3/doc/autoinclude/RepoVariables.doc
--- old/libzypp-16.17.3/doc/autoinclude/RepoVariables.doc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/doc/autoinclude/RepoVariables.doc 2017-11-22 11:16:06.000000000 +0100
@@ -33,6 +33,8 @@
\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.
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/libzypp.spec.cmake new/libzypp-17.0.3/libzypp.spec.cmake
--- old/libzypp-16.17.3/libzypp.spec.cmake 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/libzypp.spec.cmake 2017-11-22 10:41:04.000000000 +0100
@@ -38,7 +38,7 @@
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/package/libzypp.changes new/libzypp-17.0.3/package/libzypp.changes
--- old/libzypp-16.17.3/package/libzypp.changes 2017-10-12 18:16:06.000000000 +0200
+++ new/libzypp-17.0.3/package/libzypp.changes 2017-11-28 18:26:07.000000000 +0100
@@ -1,4 +1,36 @@
-------------------------------------------------------------------
+Tue Nov 28 18:21:51 CET 2017 - ma@suse.de
+
+- When importing multiple keys, export the individual keys
+ ascii armored for import into the rpmdb (bsc#1069381)
+- version 17.0.3 (0)
+
+-------------------------------------------------------------------
+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)
+- version 17.0.1 (0)
+
+-------------------------------------------------------------------
+Tue Nov 7 16:14:31 CET 2017 - ma@suse.de
+
+- Locale: Fix possible segfault (bsc#1064999)
+- RpmDb: Remove excess keys in the zypp keyring when exporting keys only
+ (bsc#1064380)
+- KeyRing: Fix deleted keys not removed from rpmdb too (bsc#1064380)
+- Flag gpg keycache dirty when adding/removing keys (bsc#1064380)
+- Version 17.x for CODE-15, 16.x. is continued on SuSE-SLE-12-SP2-Branch
+- version 17.0.0 (0)
+
+-------------------------------------------------------------------
Thu Oct 12 18:04:38 CEST 2017 - ma@suse.de
- Fix media handling in presence of a repo path prefix (bsc#1062561)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/po/PotfileDiff.sh new/libzypp-17.0.3/po/PotfileDiff.sh
--- old/libzypp-16.17.3/po/PotfileDiff.sh 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/po/PotfileDiff.sh 2017-10-26 17:01:06.000000000 +0200
@@ -3,11 +3,10 @@
function extract() { grep '^\(msgid\|"\)' "$1" | grep -v "POT-Creation-Date" | sort -u; }
OLDTMP=$(mktemp)
-trap " [ -f \"$OLDTMP\" ] && /bin/rm -f -- \"$OLDTMP\" " 0 1 2 3 13 15
-extract "$1" >"$OLDTMP"
-
NEWTMP=$(mktemp)
-trap " [ -f \"$NEWTMP\" ] && /bin/rm -f -- \"$NEWTMP\" " 0 1 2 3 13 15
+trap "/bin/rm -f -- \"$OLDTMP\" \"$NEWTMP\"" 0 1 2 3 13 15
+
+extract "$1" >"$OLDTMP"
extract "$2" >"$NEWTMP"
shift 2 # additional args for diff
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/po/bg.po new/libzypp-17.0.3/po/bg.po
--- old/libzypp-16.17.3/po/bg.po 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/po/bg.po 2017-10-23 16:01:05.000000000 +0200
@@ -13,15 +13,16 @@
"Project-Id-Version: zypp.bg\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 12:25+0200\n"
-"PO-Revision-Date: 2006-11-09 18:05+0200\n"
-"Last-Translator: Borislav Mitev \n"
-"Language-Team: Bulgarian \n"
+"PO-Revision-Date: 2017-10-23 11:43+0000\n"
+"Last-Translator: Dimitar Zahariev \n"
+"Language-Team: Bulgarian "
+"https://l10n.opensuse.org/projects/libzypp/master/bg/\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: KBabel 1.10.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\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
@@ -33,7 +34,7 @@
#: zypp/CheckSum.cc:136
#, c-format, boost-format
msgid "Dubious type '%s' for %u byte checksum '%s'"
-msgstr ""
+msgstr "Съмнителен тип '%s' за %u, код за проверка '%s'"
#: zypp/CountryCode.cc:50
msgid "Unknown country: "
@@ -42,9 +43,8 @@
#. Defined CountryCode constants
#. Defined LanguageCode constants
#: zypp/CountryCode.cc:149 zypp/LanguageCode.cc:148
-#, fuzzy
msgid "No Code"
-msgstr "без код"
+msgstr "Без код"
# AD
#: zypp/CountryCode.cc:158
@@ -479,9 +479,8 @@
#. :GUF:254:
#: zypp/CountryCode.cc:237
-#, fuzzy
msgid "Guernsey"
-msgstr "Германия"
+msgstr "Гърнзи"
# GH
#: zypp/CountryCode.cc:238
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/po/de.po new/libzypp-17.0.3/po/de.po
--- old/libzypp-16.17.3/po/de.po 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/po/de.po 2017-11-09 16:31:07.000000000 +0100
@@ -18,16 +18,16 @@
"Project-Id-Version: zypp.de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 12:25+0200\n"
-"PO-Revision-Date: 2016-12-07 15:59+0000\n"
+"PO-Revision-Date: 2017-11-09 15:28+0000\n"
"Last-Translator: Sarah Kriesch \n"
-"Language-Team: German <https://l10n.opensuse.org/projects/libzypp/master/de/"
-">\n"
+"Language-Team: German https://l10n.opensuse.org/projects/libzypp/master/de/"
+"\n"
"Language: de\n"
"MIME-Version: 1.0\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.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
@@ -3734,21 +3734,20 @@
#. translators: an annotation to a gpg keys expiry date
#: zypp/PublicKey.cc:60
-#, fuzzy
msgid "does not expire"
-msgstr "(läuft nicht ab)"
+msgstr "läuft nicht ab"
#. translators: an annotation to a gpg keys expiry date: "expired: 1999-04-12"
#: zypp/PublicKey.cc:65
#, boost-format
msgid "expired: %1%"
-msgstr ""
+msgstr "abgelaufen: %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 "läuft ab: %1%"
#. translators: an annotation to a gpg keys expiry date
#: zypp/PublicKey.cc:79
@@ -4729,7 +4728,7 @@
#: zypp/target/rpm/RpmDb.cc:1568
msgid "Package is not signed!"
-msgstr ""
+msgstr "Paket ist nicht signiert!"
#. Translator: %s = name of an rpm package. A list of diffs follows
#. this message.
@@ -4818,7 +4817,7 @@
#. translators: possible rpm package signature check result [brief]
#: zypp/target/rpm/RpmDb.cc:2397
msgid "File is unsigned"
-msgstr ""
+msgstr "Datei ist unsigniert"
#: zypp/thread/Mutex.cc:33
msgid "Can't initialize mutex attributes"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/po/fr.po new/libzypp-17.0.3/po/fr.po
--- old/libzypp-16.17.3/po/fr.po 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/po/fr.po 2017-11-07 16:18:51.000000000 +0100
@@ -20,16 +20,16 @@
"Project-Id-Version: zypp.fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 12:25+0200\n"
-"PO-Revision-Date: 2017-04-19 11:10+0000\n"
-"Last-Translator: SLE Merge Robot \n"
-"Language-Team: French <https://l10n.opensuse.org/projects/libzypp/master/fr/"
-">\n"
+"PO-Revision-Date: 2017-11-05 16:06+0000\n"
+"Last-Translator: Antoine Belvire \n"
+"Language-Team: French https://l10n.opensuse.org/projects/libzypp/master/fr/"
+"\n"
"Language: fr\n"
"MIME-Version: 1.0\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.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
@@ -3741,21 +3741,20 @@
#. translators: an annotation to a gpg keys expiry date
#: zypp/PublicKey.cc:60
-#, fuzzy
msgid "does not expire"
-msgstr "(n'expire pas)"
+msgstr "n'expire pas"
#. translators: an annotation to a gpg keys expiry date: "expired: 1999-04-12"
#: zypp/PublicKey.cc:65
#, boost-format
msgid "expired: %1%"
-msgstr ""
+msgstr "a expiré le : %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 "expire le : %1%"
#. translators: an annotation to a gpg keys expiry date
#: zypp/PublicKey.cc:79
@@ -4740,7 +4739,7 @@
#: zypp/target/rpm/RpmDb.cc:1568
msgid "Package is not signed!"
-msgstr ""
+msgstr "Le paquet n'est pas signé !"
# TLABEL sw_single_2002_01_04_0147__11
#. Translator: %s = name of an rpm package. A list of diffs follows
@@ -4832,7 +4831,7 @@
#. translators: possible rpm package signature check result [brief]
#: zypp/target/rpm/RpmDb.cc:2397
msgid "File is unsigned"
-msgstr ""
+msgstr "Le fichier n'est pas signé"
#: zypp/thread/Mutex.cc:33
msgid "Can't initialize mutex attributes"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/po/gl.po new/libzypp-17.0.3/po/gl.po
--- old/libzypp-16.17.3/po/gl.po 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/po/gl.po 2017-11-07 16:18:51.000000000 +0100
@@ -15,10 +15,10 @@
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-07 12:25+0200\n"
-"PO-Revision-Date: 2017-07-01 14:53+0000\n"
+"PO-Revision-Date: 2017-11-05 10:46+0000\n"
"Last-Translator: Manuel Vazquez \n"
-"Language-Team: Galician <https://l10n.opensuse.org/projects/libzypp/master/"
-"gl/>\n"
+"Language-Team: Galician "
+"https://l10n.opensuse.org/projects/libzypp/master/gl/\n"
"Language: gl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1481,7 +1481,7 @@
#: zypp/Dep.cc:104
msgid "Supplements"
-msgstr "Suple"
+msgstr "Suplementos"
#: zypp/ExternalProgram.cc:258
#, c-format, boost-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/po/pl.po new/libzypp-17.0.3/po/pl.po
--- old/libzypp-16.17.3/po/pl.po 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/po/pl.po 2017-11-16 23:36:06.000000000 +0100
@@ -8,17 +8,17 @@
"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 \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 \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
@@ -3726,21 +3726,20 @@
#. 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
@@ -4715,7 +4714,7 @@
#: 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.
@@ -4800,7 +4799,7 @@
#. 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"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/tests/repo/RepoVariables_test.cc new/libzypp-17.0.3/tests/repo/RepoVariables_test.cc
--- old/libzypp-16.17.3/tests/repo/RepoVariables_test.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/tests/repo/RepoVariables_test.cc 2017-11-22 10:41:04.000000000 +0100
@@ -175,6 +175,16 @@
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 */
@@ -207,7 +217,7 @@
/* 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}") );
@@ -223,6 +233,16 @@
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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/tests/zypp/KeyRing_test.cc new/libzypp-17.0.3/tests/zypp/KeyRing_test.cc
--- old/libzypp-16.17.3/tests/zypp/KeyRing_test.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/tests/zypp/KeyRing_test.cc 2017-11-28 18:26:07.000000000 +0100
@@ -208,4 +208,31 @@
}
}
+BOOST_AUTO_TEST_CASE(keyring_import)
+{
+ // base sandbox for playing
+ TmpDir tmp_dir;
+ KeyRing keyring( tmp_dir.path() );
+ struct Receiver: public callback::ReceiveReport<KeyRingSignals>
+ {
+ Receiver()
+ { connect(); }
+
+ virtual void trustedKeyAdded( const PublicKey & key_r )
+ { ++_cbcnt; }
+
+ unsigned _cbcnt = 0;
+ } receiver;
+
+ ///////////////////////////////////////////////////////////////////
+ // Make sure we get a proper callback notification if multiple
+ // keys are imported at once.
+ ///////////////////////////////////////////////////////////////////
+ PublicKey key( DATADIR + "installkey.gpg" );
+ BOOST_CHECK_EQUAL( key.hiddenKeys().size(), 2 );
+ BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), 0 );
+ keyring.importKey( key, true );
+ BOOST_CHECK_EQUAL( keyring.trustedPublicKeys().size(), 3 );
+ BOOST_CHECK_EQUAL( receiver._cbcnt, keyring.trustedPublicKeys().size() );
+}
Binary files old/libzypp-16.17.3/tests/zypp/data/KeyRing/installkey.gpg and new/libzypp-17.0.3/tests/zypp/data/KeyRing/installkey.gpg differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/tools/zypp-NameReqPrv.cc new/libzypp-17.0.3/tools/zypp-NameReqPrv.cc
--- old/libzypp-16.17.3/tools/zypp-NameReqPrv.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/tools/zypp-NameReqPrv.cc 2017-11-22 10:41:04.000000000 +0100
@@ -314,21 +314,21 @@
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) );
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/ExternalProgram.cc new/libzypp-17.0.3/zypp/ExternalProgram.cc
--- old/libzypp-16.17.3/zypp/ExternalProgram.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/ExternalProgram.cc 2017-11-07 16:18:51.000000000 +0100
@@ -30,6 +30,9 @@
using namespace std;
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "zypp::exec"
+
namespace zypp {
ExternalProgram::ExternalProgram()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/KeyRing.cc new/libzypp-17.0.3/zypp/KeyRing.cc
--- old/libzypp-16.17.3/zypp/KeyRing.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/KeyRing.cc 2017-11-28 18:26:07.000000000 +0100
@@ -90,18 +90,24 @@
/// const std::list<PublicKeyData> & cachedPublicKeyData( const Pathname & keyring );
/// \endcode
///////////////////////////////////////////////////////////////////
- struct CachedPublicKeyData // : private base::NonCopyable - but KeyRing uses RWCOW though also NonCopyable :(
+ struct CachedPublicKeyData : private base::NonCopyable
{
const std::list<PublicKeyData> & operator()( const Pathname & keyring_r ) const
{ return getData( keyring_r ); }
+ void setDirty( const Pathname & keyring_r )
+ { _cacheMap[keyring_r].setDirty(); }
+
private:
struct Cache
{
- // Empty copy ctor to allow insert into std::map as
- // scoped_ptr is noncopyable.
Cache() {}
- Cache( const Cache & rhs ) {}
+
+ void setDirty()
+ {
+ _keyringK.reset();
+ _keyringP.reset();
+ }
void assertCache( const Pathname & keyring_r )
{
@@ -234,6 +240,8 @@
PublicKey exportKey( const std::string & id, const Pathname & keyring );
PublicKey exportKey( const PublicKeyData & keyData, const Pathname & keyring );
+ PublicKey exportKey( const PublicKey & key, const Pathname & keyring )
+ { return exportKey( key.keyData(), keyring ); }
void dumpPublicKey( const std::string & id, const Pathname & keyring, std::ostream & stream );
filesystem::TmpFile dumpPublicKeyToTmp( const std::string & id, const Pathname & keyring );
@@ -267,24 +275,51 @@
};
///////////////////////////////////////////////////////////////////
+ namespace
+ {
+ /// Handle signal emission from within KeyRing::Impl::importKey
+ struct ImportKeyCBHelper
+ {
+ void operator()( const PublicKey & key_r )
+ {
+ try {
+ _rpmdbEmitSignal->trustedKeyAdded( key_r );
+ _emitSignal->trustedKeyAdded( key_r );
+ }
+ catch ( const Exception & excp )
+ {
+ ERR << "Could not import key into rpmdb: " << excp << endl;
+ // TODO: JobReport as hotfix for bsc#1057188; should bubble up and go through some callback
+ JobReport::error( excp.asUserHistory() );
+ }
+ }
+
+ private:
+ callback::SendReporttarget::rpm::KeyRingSignals _rpmdbEmitSignal;
+ callback::SendReport<KeyRingSignals> _emitSignal;
+ };
+ } // namespace
+
void KeyRing::Impl::importKey( const PublicKey & key, bool trusted )
{
importKey( key.path(), trusted ? trustedKeyRing() : generalKeyRing() );
+ MIL << "Imported key " << key << " to " << (trusted ? "trustedKeyRing" : "generalKeyRing" ) << endl;
if ( trusted )
- try {
- callback::SendReporttarget::rpm::KeyRingSignals rpmdbEmitSignal;
- rpmdbEmitSignal->trustedKeyAdded( key );
-
- callback::SendReport<KeyRingSignals> emitSignal;
- emitSignal->trustedKeyAdded( key );
- }
- catch ( const Exception & excp )
{
- ERR << "Could not import key " << excp << endl;
- // TODO: JobReport as hotfix for bsc#1057188; should bubble up and go through some callback
- JobReport::error( excp.asUserHistory() );
+ ImportKeyCBHelper emitSignal;
+ if ( key.hiddenKeys().empty() )
+ {
+ emitSignal( key );
+ }
+ else
+ {
+ // multiple keys: Export individual keys ascii armored to import in rpmdb
+ emitSignal( exportKey( key, trustedKeyRing() ) );
+ for ( const PublicKeyData & hkey : key.hiddenKeys() )
+ emitSignal( exportKey( hkey, trustedKeyRing() ) );
+ }
}
}
@@ -295,11 +330,18 @@
void KeyRing::Impl::deleteKey( const std::string & id, bool trusted )
{
+ PublicKeyData keyDataToDel( publicKeyExists( id, trusted ? trustedKeyRing() : generalKeyRing() ) );
+ if ( ! keyDataToDel )
+ {
+ WAR << "Key to delete [" << id << "] is not in " << (trusted ? "trustedKeyRing" : "generalKeyRing" ) << endl;
+ return;
+ }
deleteKey( id, trusted ? trustedKeyRing() : generalKeyRing() );
+ MIL << "Deleted key [" << id << "] from " << (trusted ? "trustedKeyRing" : "generalKeyRing" ) << endl;
if ( trusted )
try {
- PublicKey key( exportKey( id, trustedKeyRing() ) );
+ PublicKey key( keyDataToDel );
callback::SendReporttarget::rpm::KeyRingSignals rpmdbEmitSignal;
rpmdbEmitSignal->trustedKeyRemoved( key );
@@ -309,7 +351,7 @@
}
catch ( const Exception & excp )
{
- ERR << "Could not delete key " << excp << endl;
+ ERR << "Could not delete key from rpmmdb: " << excp << endl;
// TODO: JobReport as hotfix for bsc#1057188; should bubble up and go through some callback
JobReport::error( excp.asUserHistory() );
}
@@ -317,7 +359,6 @@
PublicKeyData KeyRing::Impl::publicKeyExists( const std::string & id, const Pathname & keyring )
{
- MIL << "Searching key [" << id << "] in keyring " << keyring << endl;
PublicKeyData ret;
for ( const PublicKeyData & key : publicKeyData( keyring ) )
{
@@ -327,6 +368,7 @@
break;
}
}
+ MIL << (ret ? "Found" : "No") << " key [" << id << "] in keyring " << keyring << endl;
return ret;
}
@@ -342,7 +384,7 @@
return PublicKey( dumpPublicKeyToTmp( keyData.id(), keyring ), keyData );
// Here: key not found
- WAR << "No key " << id << " to export from " << keyring << endl;
+ WAR << "No key [" << id << "] to export from " << keyring << endl;
return PublicKey();
}
@@ -375,7 +417,7 @@
filesystem::TmpFile KeyRing::Impl::dumpPublicKeyToTmp( const std::string & id, const Pathname & keyring )
{
filesystem::TmpFile tmpFile( _base_dir, "pubkey-"+id+"-" );
- MIL << "Going to export key " << id << " from " << keyring << " to " << tmpFile.path() << endl;
+ MIL << "Going to export key [" << id << "] from " << keyring << " to " << tmpFile.path() << endl;
std::ofstream os( tmpFile.path().c_str() );
dumpPublicKey( id, keyring, os );
@@ -448,20 +490,19 @@
if ( generalKeyData )
{
PublicKey key( exportKey( generalKeyData, generalKeyRing() ) );
- MIL << "Exported key " << id << " to " << key.path() << endl;
- MIL << "Key " << id << " " << key.name() << " is not trusted" << endl;
+ MIL << "Key [" << id << "] " << key.name() << " is not trusted" << endl;
// ok the key is not trusted, ask the user to trust it or not
KeyRingReport::KeyTrust reply = report->askUserToAcceptKey( key, context );
if ( reply == KeyRingReport::KEY_TRUST_TEMPORARILY ||
reply == KeyRingReport::KEY_TRUST_AND_IMPORT )
{
- MIL << "User wants to trust key " << id << " " << key.name() << endl;
+ MIL << "User wants to trust key [" << id << "] " << key.name() << endl;
Pathname whichKeyring;
if ( reply == KeyRingReport::KEY_TRUST_AND_IMPORT )
{
- MIL << "User wants to import key " << id << " " << key.name() << endl;
+ MIL << "User wants to import key [" << id << "] " << key.name() << endl;
importKey( key, true );
whichKeyring = trustedKeyRing();
}
@@ -483,7 +524,7 @@
}
else
{
- MIL << "User does not want to trust key " << id << " " << key.name() << endl;
+ MIL << "User does not want to trust key [" << id << "] " << key.name() << endl;
return false;
}
}
@@ -536,8 +577,10 @@
NULL
};
+ cachedPublicKeyData.setDirty( keyring );
ExternalProgram prog( argv,ExternalProgram::Discard_Stderr, false, -1, true );
- prog.close();
+ if ( prog.close() )
+ ZYPP_THROW(KeyRingException(_("Failed to import key.")));
}
void KeyRing::Impl::deleteKey( const std::string & id, const Pathname & keyring )
@@ -557,19 +600,16 @@
NULL
};
+ cachedPublicKeyData.setDirty( keyring );
ExternalProgram prog( argv,ExternalProgram::Discard_Stderr, false, -1, true );
-
- int code = prog.close();
- if ( code )
- ZYPP_THROW(Exception(_("Failed to delete key.")));
- else
- MIL << "Deleted key " << id << " from keyring " << keyring << endl;
+ if ( prog.close() )
+ ZYPP_THROW(KeyRingException(_("Failed to delete key.")));
}
std::string KeyRing::Impl::readSignatureKeyId( const Pathname & signature )
{
if ( ! PathInfo( signature ).isFile() )
- ZYPP_THROW(Exception( str::Format(_("Signature file %s not found")) % signature.asString() ));
+ ZYPP_THROW(KeyRingException( str::Format(_("Signature file %s not found")) % signature.asString() ));
MIL << "Determining key id of signature " << signature << endl;
const char* argv[] =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/Locale.cc new/libzypp-17.0.3/zypp/Locale.cc
--- old/libzypp-16.17.3/zypp/Locale.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/Locale.cc 2017-11-07 16:18:51.000000000 +0100
@@ -147,9 +147,12 @@
boost::string_ref str( index_r.c_str() );
boost::string_ref::size_type sep = str.find( '_' );
if ( sep == boost::string_ref::npos )
- newval.second._l = LanguageCode( IdString(index_r) );
+ newval.second._l = LanguageCode( index_r );
else
{
+ // bsc#1064999: dup! Creating a new IdString may invalidate the IdString.c_str() stored in str.
+ std::string dup( str );
+ str = dup;
newval.second._l = LanguageCode( IdString(str.substr( 0, sep )) );
newval.second._c = CountryCode( IdString(str.substr( sep+1 )) );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/PathInfo.cc new/libzypp-17.0.3/zypp/PathInfo.cc
--- old/libzypp-16.17.3/zypp/PathInfo.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/PathInfo.cc 2017-10-17 13:36:06.000000000 +0200
@@ -841,6 +841,7 @@
if ( pi.isLink() )
{
// dont hardlink symlinks!
+ MIL << " => copy" << endl;
return copy( oldpath, newpath );
}
@@ -859,6 +860,7 @@
{
case EPERM: // /proc/sys/fs/protected_hardlink in proc(5)
case EXDEV: // oldpath and newpath are not on the same mounted file system
+ MIL << " => copy" << endl;
return copy( oldpath, newpath );
break;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/PublicKey.cc new/libzypp-17.0.3/zypp/PublicKey.cc
--- old/libzypp-16.17.3/zypp/PublicKey.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/PublicKey.cc 2017-11-07 16:18:51.000000000 +0100
@@ -430,6 +430,7 @@
{}
Impl( const Pathname & keyFile_r )
+ : _dontUseThisPtrDirectly( new filesystem::TmpFile )
{
PathInfo info( keyFile_r );
MIL << "Taking pubkey from " << keyFile_r << " of size " << info.size() << " and sha1 " << filesystem::checksum(keyFile_r, "sha1") << endl;
@@ -437,18 +438,18 @@
if ( !info.isExist() )
ZYPP_THROW(Exception("Can't read public key from " + keyFile_r.asString() + ", file not found"));
- if ( filesystem::hardlinkCopy( keyFile_r, _dataFile.path() ) != 0 )
- ZYPP_THROW(Exception("Can't copy public key data from " + keyFile_r.asString() + " to " + _dataFile.path().asString() ));
+ if ( filesystem::hardlinkCopy( keyFile_r, path() ) != 0 )
+ ZYPP_THROW(Exception("Can't copy public key data from " + keyFile_r.asString() + " to " + path().asString() ));
readFromFile();
}
Impl( const filesystem::TmpFile & sharedFile_r )
- : _dataFile( sharedFile_r )
+ : _dontUseThisPtrDirectly( new filesystem::TmpFile( sharedFile_r ) )
{ readFromFile(); }
Impl( const filesystem::TmpFile & sharedFile_r, const PublicKeyData & keyData_r )
- : _dataFile( sharedFile_r )
+ : _dontUseThisPtrDirectly( new filesystem::TmpFile( sharedFile_r ) )
, _keyData( keyData_r )
{
if ( ! keyData_r )
@@ -458,12 +459,16 @@
}
}
+ Impl( const PublicKeyData & keyData_r )
+ : _keyData( keyData_r )
+ {}
+
public:
const PublicKeyData & keyData() const
{ return _keyData; }
Pathname path() const
- { return _dataFile.path(); }
+ { return( /*the one and only intended use*/_dontUseThisPtrDirectly ? _dontUseThisPtrDirectly->path() : Pathname() ); }
const std::list<PublicKeyData> & hiddenKeys() const
{ return _hiddenKeys; }
@@ -474,11 +479,11 @@
void readFromFile()
{
- PathInfo info( _dataFile.path() );
+ PathInfo info( path() );
MIL << "Reading pubkey from " << info.path() << " of size " << info.size() << " and sha1 " << filesystem::checksum(info.path(), "sha1") << endl;
static std::string tmppath( _initHomeDir() );
- std::string datapath( _dataFile.path().asString() );
+ std::string datapath( path().asString() );
const char* argv[] =
{
@@ -513,7 +518,7 @@
if ( ret == 129 )
ZYPP_THROW( Exception( std::string("Can't read public key data: ") + GPG_BINARY + " is not installed!" ) );
else
- ZYPP_THROW( BadKeyException( "File " + _dataFile.path().asString() + " doesn't contain public key data" , _dataFile.path() ) );
+ ZYPP_THROW( BadKeyException( "File " + path().asString() + " doesn't contain public key data" , path() ) );
break;
case 1:
@@ -523,7 +528,7 @@
break;
default:
- WAR << "File " << _dataFile.path().asString() << " contains multiple keys: " << scanner._keys << endl;
+ WAR << "File " << path().asString() << " contains multiple keys: " << scanner._keys << endl;
_keyData = scanner._keys.back();
scanner._keys.pop_back();
_hiddenKeys.swap( scanner._keys );
@@ -534,7 +539,7 @@
}
private:
- filesystem::TmpFile _dataFile;
+ shared_ptrfilesystem::TmpFile _dontUseThisPtrDirectly; // shared_ptr ok because TmpFile itself is a refernce type (no COW)
PublicKeyData _keyData;
std::list<PublicKeyData> _hiddenKeys;
@@ -569,8 +574,12 @@
: _pimpl( new Impl( sharedfile ) )
{}
- PublicKey::PublicKey( const filesystem::TmpFile & sharedfile, const PublicKeyData & keydata )
- : _pimpl( new Impl( sharedfile, keydata ) )
+ PublicKey::PublicKey( const filesystem::TmpFile & sharedfile, const PublicKeyData & keyData_r )
+ : _pimpl( new Impl( sharedfile, keyData_r ) )
+ {}
+
+ PublicKey::PublicKey( const PublicKeyData & keyData_r )
+ : _pimpl( new Impl( keyData_r ) )
{}
PublicKey::~PublicKey()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/PublicKey.h new/libzypp-17.0.3/zypp/PublicKey.h
--- old/libzypp-16.17.3/zypp/PublicKey.h 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/PublicKey.h 2017-11-07 16:18:51.000000000 +0100
@@ -22,6 +22,7 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/base/Exception.h"
#include "zypp/Pathname.h"
+#include "zypp/Edition.h"
#include "zypp/Date.h"
///////////////////////////////////////////////////////////////////
@@ -186,6 +187,10 @@
/** Gpg-pubkey release as computed by rpm (hexencoded \ref created) */
std::string gpgPubkeyRelease() const;
+ /** Gpg-pubkey \ref Edition built from version and release.*/
+ Edition gpgPubkeyEdition() const
+ { return Edition( gpgPubkeyVersion(), gpgPubkeyRelease() ); }
+
/** Simple string representation.
* Encodes \ref id, \ref gpgPubkeyRelease, \ref name and \ref fingerprint.
* \code
@@ -325,6 +330,9 @@
std::string gpgPubkeyRelease() const; //!< \see \ref PublicKeyData
std::string asString() const; //!< \see \ref PublicKeyData
+ Edition gpgPubkeyEdition() const ///!< \see \ref PublicKeyData
+ { return keyData().gpgPubkeyEdition(); }
+
bool hasSubkeys() const ///!< \see \ref PublicKeyData
{ return keyData().hasSubkeys(); }
@@ -349,6 +357,8 @@
friend class KeyRing;
/** KeyRing ctor: No need to parse file if KeyRing already had valid KeyData. */
PublicKey( const filesystem::TmpFile & sharedFile_r, const PublicKeyData & keyData_r );
+ /** KeyRing ctor: Legacy callback APIs take PublicKey, but just need the PublicKeyData No need to export to file. */
+ explicit PublicKey( const PublicKeyData & keyData_r );
private:
/** Pointer to implementation */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/RepoInfo.cc new/libzypp-17.0.3/zypp/RepoInfo.cc
--- old/libzypp-16.17.3/zypp/RepoInfo.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/RepoInfo.cc 2017-11-22 10:41:04.000000000 +0100
@@ -313,7 +313,6 @@
DefaultIntegral priority;
mutable bool emptybaseurls;
- repo::RepoVariablesUrlReplacer replacer;
private:
Pathname _metadataPath;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/base/WatchFile.h new/libzypp-17.0.3/zypp/base/WatchFile.h
--- old/libzypp-16.17.3/zypp/base/WatchFile.h 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/base/WatchFile.h 2017-11-07 16:18:51.000000000 +0100
@@ -65,6 +65,18 @@
const Pathname & path() const
{ return _path; }
+ off_t lastSize() const
+ { return _size;}
+
+ time_t lastMtime() const
+ { return _mtime; }
+
+ bool isDirty() const
+ {
+ PathInfo pi( _path );
+ return( _size != pi.size() || _mtime != pi.mtime() );
+ }
+
bool hasChanged()
{
PathInfo pi( _path );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/misc/CheckAccessDeleted.cc new/libzypp-17.0.3/zypp/misc/CheckAccessDeleted.cc
--- old/libzypp-16.17.3/zypp/misc/CheckAccessDeleted.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/misc/CheckAccessDeleted.cc 2017-11-23 12:36:07.000000000 +0100
@@ -179,16 +179,15 @@
/// \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 )
@@ -198,7 +197,6 @@
{ return nsIno( asString(pid_r), ns_r ); }
ino_t pidNS;
- ino_t mntNS;
};
#if 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/repo/RepoVariables.cc new/libzypp-17.0.3/zypp/repo/RepoVariables.cc
--- old/libzypp-16.17.3/zypp/repo/RepoVariables.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/repo/RepoVariables.cc 2017-11-22 10:41:04.000000000 +0100
@@ -151,7 +151,7 @@
/** 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()
@@ -548,10 +548,15 @@
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/repo/RepoVariables.h new/libzypp-17.0.3/zypp/repo/RepoVariables.h
--- old/libzypp-16.17.3/zypp/repo/RepoVariables.h 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/repo/RepoVariables.h 2017-11-22 10:41:04.000000000 +0100
@@ -115,7 +115,7 @@
/**
* \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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/sat/Solvable.cc new/libzypp-17.0.3/zypp/sat/Solvable.cc
--- old/libzypp-16.17.3/zypp/sat/Solvable.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/sat/Solvable.cc 2017-11-13 15:26:07.000000000 +0100
@@ -638,7 +638,14 @@
unsigned Solvable::mediaNr() const
{
NO_SOLVABLE_RETURN( 0U );
- return lookupNumAttribute( SolvAttr::medianr );
+ // medianumber and path
+ unsigned medianr = 0U;
+ const char * file = ::solvable_lookup_location( _solvable, &medianr );
+ if ( ! file )
+ medianr = 0U;
+ else if ( ! medianr )
+ medianr = 1U;
+ return medianr;
}
ByteCount Solvable::installSize() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.17.3/zypp/target/rpm/RpmDb.cc new/libzypp-17.0.3/zypp/target/rpm/RpmDb.cc
--- old/libzypp-16.17.3/zypp/target/rpm/RpmDb.cc 2017-10-10 12:48:09.000000000 +0200
+++ new/libzypp-17.0.3/zypp/target/rpm/RpmDb.cc 2017-11-07 16:18:51.000000000 +0100
@@ -865,7 +865,7 @@
_inRpmKeys = &rpmKey_r;
_inZyppKeys = nullptr;
if ( !keyRelease.empty() )
- DBG << "Old key in R: gpg-pubkey-" << rpmKey_r.version() << "-" << keyRelease << endl;
+ DBG << "Old key in Z: gpg-pubkey-" << rpmKey_r.version() << "-" << keyRelease << endl;
}
else if ( comp == 0 )
{
@@ -889,7 +889,7 @@
_inRpmKeys = nullptr;
_inZyppKeys = &zyppKey_r;
if ( !keyRelease.empty() )
- DBG << "Old key in Z: gpg-pubkey-" << zyppKey_r.gpgPubkeyVersion() << "-" << keyRelease << endl;
+ DBG << "Old key in R: gpg-pubkey-" << zyppKey_r.gpgPubkeyVersion() << "-" << keyRelease << endl;
}
else if ( comp == 0 )
{
@@ -949,6 +949,34 @@
MIL << "Going to sync trusted keys..." << endl;
std::set<Edition> rpmKeys( pubkeyEditions() );
std::list<PublicKeyData> zyppKeys( getZYpp()->keyRing()->trustedPublicKeyData() );
+
+ if ( ! ( mode_r & SYNC_FROM_KEYRING ) )
+ {
+ // bsc#1064380: We relief PK from removing excess keys in the zypp keyring
+ // when re-acquiring the zyppp lock. For now we remove all excess keys.
+ // TODO: Once we can safely assume that all PK versions are updated we
+ // can think about re-importing newer key versions found in the zypp keyring and
+ // removing only excess ones (but case is not very likely). Unfixed PK versions
+ // however will remove the newer version found in the zypp keyring and by doing
+ // this, the key here will be removed via callback as well (keys are deleted
+ // via gpg id, regardless of the edition).
+ MIL << "Removing excess keys in zypp trusted keyring" << std::endl;
+ // Temporarily disconnect to prevent the attempt to pass back the delete request.
+ callback::TempConnect<KeyRingSignals> tempDisconnect;
+ bool dirty = false;
+ for ( const PublicKeyData & keyData : zyppKeys )
+ {
+ if ( ! rpmKeys.count( keyData.gpgPubkeyEdition() ) )
+ {
+ DBG << "Excess key in Z to delete: gpg-pubkey-" << keyData.gpgPubkeyEdition() << endl;
+ getZYpp()->keyRing()->deleteKey( keyData.id(), /*trusted*/true );
+ if ( !dirty ) dirty = true;
+ }
+ }
+ if ( dirty )
+ zyppKeys = getZYpp()->keyRing()->trustedPublicKeyData();
+ }
+
computeKeyRingSync( rpmKeys, zyppKeys );
MIL << (mode_r & SYNC_TO_KEYRING ? "" : "(skip) ") << "Rpm keys to export into zypp trusted keyring: " << rpmKeys.size() << endl;
MIL << (mode_r & SYNC_FROM_KEYRING ? "" : "(skip) ") << "Zypp trusted keys to import into rpm database: " << zyppKeys.size() << endl;
@@ -958,7 +986,7 @@
{
// export to zypp keyring
MIL << "Exporting rpm keyring into zypp trusted keyring" <