Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
Andrew Branson committed Jul 5, 2018
1 parent 0df8b3a commit a46b354
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 115 deletions.
19 changes: 19 additions & 0 deletions rpm/0001-Set-downloadusedeltarpmalwaystrue.patch
@@ -0,0 +1,19 @@
From 4f7310065d16cf6e777b8e25c5fba4673d00169b Wed, 27 Jun 2018 18:17:24 +0200
From: Niels Breet <niels.breet@jolla.com>
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).
64 changes: 0 additions & 64 deletions rpm/0001-zypp-PublicKey.cc-Use-GPG_BINARY-from-KeyRing.cc.patch

This file was deleted.

40 changes: 0 additions & 40 deletions rpm/0002-Diffs-14.35.0-10.patch

This file was deleted.

19 changes: 19 additions & 0 deletions 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 <niels.breet@jolla.com>
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.
19 changes: 19 additions & 0 deletions 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 <martin.grimme@gmail.com>
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 ) ) )
23 changes: 23 additions & 0 deletions 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 <juha.kallioinen@jolla.com>
Date: Wed, 6 Nov 2013 14:07:52 +0000
Subject: [PATCH] [libzypp] Set unrestricted auth curl option


Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>

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);

19 changes: 19 additions & 0 deletions rpm/0005-disable-doc.patch
@@ -0,0 +1,19 @@
From f00ae6e324b5af266ba3bf714c0eb66c1795a9bd Mon, 23 Apr 2018 18:39:03 +0200
From: Andrew Branson <andrew.branson@jollamobile.com>
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 )

22 changes: 12 additions & 10 deletions rpm/libzypp.spec
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated 277 files

0 comments on commit a46b354

Please sign in to comment.