From a46b354aef5a8c917136a3bcd9a1f4f1a6e9212c Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Mon, 23 Apr 2018 18:41:56 +0200 Subject: [PATCH] [zypp] Update to 17.3.1. Fixes JB#36070 Include a couple of patches that were missed in the earlier update. Reexport patches from earlier commits. --- ...01-Set-downloadusedeltarpmalwaystrue.patch | 19 ++++++ ...ey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch | 64 ------------------- rpm/0002-Diffs-14.35.0-10.patch | 40 ------------ ...nstallexcludedocs--yes-Save-space-on.patch | 19 ++++++ ...that-the-destination-path-for-applyi.patch | 19 ++++++ ...04-Set-unrestricted-auth-curl-option.patch | 23 +++++++ rpm/0005-disable-doc.patch | 19 ++++++ rpm/libzypp.spec | 22 ++++--- upstream | 2 +- 9 files changed, 112 insertions(+), 115 deletions(-) create mode 100644 rpm/0001-Set-downloadusedeltarpmalwaystrue.patch delete mode 100644 rpm/0001-zypp-PublicKey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch delete mode 100644 rpm/0002-Diffs-14.35.0-10.patch create mode 100644 rpm/0002-Set-rpminstallexcludedocs--yes-Save-space-on.patch create mode 100644 rpm/0003-Ensure-that-the-destination-path-for-applyi.patch create mode 100644 rpm/0004-Set-unrestricted-auth-curl-option.patch create mode 100644 rpm/0005-disable-doc.patch diff --git a/rpm/0001-Set-downloadusedeltarpmalwaystrue.patch b/rpm/0001-Set-downloadusedeltarpmalwaystrue.patch new file mode 100644 index 0000000..cfb8958 --- /dev/null +++ b/rpm/0001-Set-downloadusedeltarpmalwaystrue.patch @@ -0,0 +1,19 @@ +From 4f7310065d16cf6e777b8e25c5fba4673d00169b Wed, 27 Jun 2018 18:17:24 +0200 +From: Niels Breet +Date: Wed, 2 Sep 2015 18:51:28 +0300 +Subject: [PATCH] [libzypp] Set download.use_deltarpm.always=true . Fixes JB#31671 + + +diff --git a/zypp.conf b/zypp.conf +index 4abb5f2..93cfa03 100644 +--- a/zypp.conf ++++ b/zypp.conf +@@ -215,7 +215,7 @@ + ## + ## This option has no effect unless download.use_deltarpm is set true. + ## +-# download.use_deltarpm.always = false ++download.use_deltarpm.always = true + + ## + ## Hint which media to prefer when installing packages (download vs. CD). diff --git a/rpm/0001-zypp-PublicKey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch b/rpm/0001-zypp-PublicKey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch deleted file mode 100644 index c3d37d0..0000000 --- a/rpm/0001-zypp-PublicKey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 50ed977e1b166ba23a029f3a5194121ea4d45dd7 Mon Sep 17 00:00:00 2001 -From: Thomas Perl -Date: Fri, 6 Feb 2015 16:28:43 +0100 -Subject: [PATCH] zypp/PublicKey.cc: Use GPG_BINARY from KeyRing.cc - -On systems where "gpg" is not available, checking the public key -would fail. Use GPG_BINARY in both PublicKey.cc and KeyRing.cc, -and define it in a single place only (ExternalProgram.h). - -The original patch was partially integrated in upstream -commit 092cded378742fcbb0761cc470da863cb32ed537, but only as a duplicated -define in KeyRing and PublicKey. This patch now just moves the define to -ExternalProgram.h ---- - zypp/ExternalProgram.h | 2 ++ - zypp/KeyRing.cc | 3 --- - zypp/PublicKey.cc | 3 --- - 3 files changed, 2 insertions(+), 6 deletions(-) - -diff --git a/zypp/ExternalProgram.h b/zypp/ExternalProgram.h -index f3fc850..99a3143 100644 ---- a/zypp/ExternalProgram.h -+++ b/zypp/ExternalProgram.h -@@ -22,6 +22,8 @@ - #include "zypp/base/ExternalDataSource.h" - #include "zypp/Pathname.h" - -+#define GPG_BINARY "/usr/bin/gpg2" -+ - namespace zypp { - - /** -diff --git a/zypp/KeyRing.cc b/zypp/KeyRing.cc -index d6b8246..826ce4c 100644 ---- a/zypp/KeyRing.cc -+++ b/zypp/KeyRing.cc -@@ -35,9 +35,6 @@ using std::endl; - #undef ZYPP_BASE_LOGGER_LOGGROUP - #define ZYPP_BASE_LOGGER_LOGGROUP "zypp::KeyRing" - --/** \todo Fix duplicate define in PublicKey/KeyRing */ --#define GPG_BINARY "/usr/bin/gpg2" -- - /////////////////////////////////////////////////////////////////// - namespace zypp - { ///////////////////////////////////////////////////////////////// -diff --git a/zypp/PublicKey.cc b/zypp/PublicKey.cc -index fa17b79..fdbc95e 100644 ---- a/zypp/PublicKey.cc -+++ b/zypp/PublicKey.cc -@@ -28,9 +28,6 @@ - - #include - --/** \todo Fix duplicate define in PublicKey/KeyRing */ --#define GPG_BINARY "/usr/bin/gpg2" -- - using std::endl; - - /////////////////////////////////////////////////////////////////// --- -1.8.3-rc3 - - diff --git a/rpm/0002-Diffs-14.35.0-10.patch b/rpm/0002-Diffs-14.35.0-10.patch deleted file mode 100644 index 95c951b..0000000 --- a/rpm/0002-Diffs-14.35.0-10.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/zypp.conf b/zypp.conf -index dfe7f64..5292843 100644 ---- a/zypp.conf -+++ b/zypp.conf -@@ -199,7 +199,7 @@ - ## - ## This option has no effect unless download.use_deltarpm is set true. - ## --# download.use_deltarpm.always = false -+download.use_deltarpm.always = true - - ## - ## Hint which media to prefer when installing packages (download vs. CD). -@@ -427,6 +427,16 @@ - # solver.checkSystemFile = /etc/zypp/systemCheck - - ## -+## This directory can contain files that contain requirements/conflicts -+## which fulfill the needs of a running system (see checkSystemFile). -+## -+## Files are read in alphabetical order. -+## -+## Default value: {configdir}/systemCheck.d -+## -+# solver.checkSystemFileDir = /etc/zypp/systemCheck.d -+ -+## - ## When committing a dist upgrade (e.g. 'zypper dup') a solver testcase - ## is written to /var/log/updateTestcase-. It is needed in bugreports. - ## This option returns the number of testcases to keep on the system. Old -@@ -595,7 +505,7 @@ multiversion.kernels = latest,latest-1,running - ## Valid values: boolean - ## Default value: no - ## --# rpm.install.excludedocs = no -+rpm.install.excludedocs = yes - - ## - ## Location of history log file. - diff --git a/rpm/0002-Set-rpminstallexcludedocs--yes-Save-space-on.patch b/rpm/0002-Set-rpminstallexcludedocs--yes-Save-space-on.patch new file mode 100644 index 0000000..51c426b --- /dev/null +++ b/rpm/0002-Set-rpminstallexcludedocs--yes-Save-space-on.patch @@ -0,0 +1,19 @@ +From 069567431fc23802f07b5167aa4bd169210bd521 Wed, 27 Jun 2018 18:17:27 +0200 +From: Niels Breet +Date: Wed, 2 Sep 2015 18:51:53 +0300 +Subject: [PATCH] [libzypp] Set rpm.install.excludedocs = yes. Save space on mobile devices. Fixes JB#31669 + + +diff --git a/zypp.conf b/zypp.conf +index 93cfa03..1cd12a6 100644 +--- a/zypp.conf ++++ b/zypp.conf +@@ -640,7 +640,7 @@ + ## Valid values: boolean + ## Default value: no + ## +-# rpm.install.excludedocs = no ++rpm.install.excludedocs = yes + + ## + ## Location of history log file. diff --git a/rpm/0003-Ensure-that-the-destination-path-for-applyi.patch b/rpm/0003-Ensure-that-the-destination-path-for-applyi.patch new file mode 100644 index 0000000..e4c73b7 --- /dev/null +++ b/rpm/0003-Ensure-that-the-destination-path-for-applyi.patch @@ -0,0 +1,19 @@ +From bd03b2e565ec0196cb9ad437f4220a8e12e352b5 Wed, 27 Jun 2018 18:16:17 +0200 +From: Martin Grimme +Date: Wed, 21 Oct 2015 13:01:32 +0200 +Subject: [PATCH] [deltarpm] Ensure that the destination path for applying the delta rpm exists. Fixes JB#31668 + + +diff --git a/zypp/repo/PackageProvider.cc b/zypp/repo/PackageProvider.cc +index 0557284..251160b 100644 +--- a/zypp/repo/PackageProvider.cc ++++ b/zypp/repo/PackageProvider.cc +@@ -552,6 +552,8 @@ + + // build the package and put it into the cache + Pathname destination( _package->repoInfo().packagesPath() / _package->repoInfo().path() / _package->location().filename() ); ++ // ensure that the destination directory exists ++ filesystem::assert_dir( destination.dirname() ); + + if ( ! applydeltarpm::provide( delta, destination, + bind( &RpmPackageProvider::progressDeltaApply, this, _1 ) ) ) diff --git a/rpm/0004-Set-unrestricted-auth-curl-option.patch b/rpm/0004-Set-unrestricted-auth-curl-option.patch new file mode 100644 index 0000000..00120e3 --- /dev/null +++ b/rpm/0004-Set-unrestricted-auth-curl-option.patch @@ -0,0 +1,23 @@ +From 5b889d27aee80bf69a48e135ed525729d15c30d7 Thu, 28 Jun 2018 10:45:18 +0200 +From: Juha Kallioinen +Date: Wed, 6 Nov 2013 14:07:52 +0000 +Subject: [PATCH] [libzypp] Set unrestricted auth curl option + + +Signed-off-by: Juha Kallioinen + +diff --git a/zypp/media/MediaCurl.cc b/zypp/media/MediaCurl.cc +index 115e06f..cefc299 100644 +--- a/zypp/media/MediaCurl.cc ++++ b/zypp/media/MediaCurl.cc +@@ -724,6 +724,10 @@ + // follow any Location: header that the server sends as part of + // an HTTP header (#113275) + SET_OPTION(CURLOPT_FOLLOWLOCATION, 1L); ++ // send user credentials to all hosts the site may redirect to. ++ // see "man curl" and acknowledge the potential security breach when ++ // using --location-trusted ++ SET_OPTION(CURLOPT_UNRESTRICTED_AUTH, 1L); + // 3 redirects seem to be too few in some cases (bnc #465532) + SET_OPTION(CURLOPT_MAXREDIRS, 6L); + diff --git a/rpm/0005-disable-doc.patch b/rpm/0005-disable-doc.patch new file mode 100644 index 0000000..6e08563 --- /dev/null +++ b/rpm/0005-disable-doc.patch @@ -0,0 +1,19 @@ +From f00ae6e324b5af266ba3bf714c0eb66c1795a9bd Mon, 23 Apr 2018 18:39:03 +0200 +From: Andrew Branson +Date: Mon, 23 Apr 2018 18:38:51 +0200 +Subject: [PATCH] Disable doc generation + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 43c762c..fb2f031 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -251,7 +251,7 @@ + # do not build devel by default + ADD_SUBDIRECTORY( devel EXCLUDE_FROM_ALL ) + ADD_SUBDIRECTORY( tools ) +-ADD_SUBDIRECTORY( doc ) ++#ADD_SUBDIRECTORY( doc ) + ADD_SUBDIRECTORY( vendor ) + + IF ( ENABLE_BUILD_TRANS ) + diff --git a/rpm/libzypp.spec b/rpm/libzypp.spec index 1aae8cb..cc3e6a3 100644 --- a/rpm/libzypp.spec +++ b/rpm/libzypp.spec @@ -2,12 +2,15 @@ Name: libzypp License: GPLv2+ Group: System/Packages Summary: Package, Patch, Pattern, and Product Management -Version: 16.2.2 +Version: 17.3.1 Release: 1 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc -Patch0: 0001-zypp-PublicKey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch -Patch1: 0002-Diffs-14.35.0-10.patch +Patch1: 0001-Set-downloadusedeltarpmalwaystrue.patch +Patch2: 0002-Set-rpminstallexcludedocs--yes-Save-space-on.patch +Patch3: 0003-Ensure-that-the-destination-path-for-applyi.patch +Patch4: 0004-Set-unrestricted-auth-curl-option.patch +Patch5: 0005-disable-doc.patch BuildRequires: cmake BuildRequires: openssl-devel BuildRequires: libudev-devel @@ -26,7 +29,8 @@ BuildRequires: expat-devel BuildRequires: glib2-devel BuildRequires: popt-devel BuildRequires: rpm-devel -Requires: gnupg2 +BuildRequires: gpgme-devel +Requires: gpgme BuildRequires: curl-devel %description @@ -76,8 +80,11 @@ Authors: %prep %setup -q -n %{name}-%{version}/upstream -%patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build mkdir -p build @@ -88,14 +95,12 @@ export CFLAGS="$CFLAGS -gdwarf-2" export CXXFLAGS="$CXXFLAGS -gdwarf-2" cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DDOC_INSTALL_DIR=%{_docdir} \ -DLIB=%{_lib} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=1 \ -DUSE_TRANSLATION_SET=${TRANSLATION_SET:-zypp} \ .. make %{?_smp_mflags} VERBOSE=1 -make -C doc/autodoc %{?_smp_mflags} make -C po %{?_smp_mflags} translations %if 0%{?run_testsuite} @@ -109,7 +114,6 @@ make -C po %{?_smp_mflags} translations rm -rf "$RPM_BUILD_ROOT" cd build make install DESTDIR=$RPM_BUILD_ROOT -make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/services.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vendors.d @@ -218,8 +222,6 @@ fi %files devel %defattr(-,root,root,-) %{_libdir}/libzypp.so -%{_docdir}/%{name} %{_includedir}/zypp %{_datadir}/cmake/Modules/* %{_libdir}/pkgconfig/libzypp.pc -%doc %{_mandir}/man?/*.?.gz diff --git a/upstream b/upstream index 832bd4b..02d707d 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 832bd4b4c19274c44c9ea5e0fd8cb7330604a936 +Subproject commit 02d707dd8acb2fa773f6e066c4e19580a7121e0d