diff --git a/rpm/0004-Set-unrestricted-auth-curl-option.patch b/rpm/0004-Set-unrestricted-auth-curl-option.patch deleted file mode 100644 index 00120e3..0000000 --- a/rpm/0004-Set-unrestricted-auth-curl-option.patch +++ /dev/null @@ -1,23 +0,0 @@ -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/0006-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch b/rpm/0004-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch similarity index 75% rename from rpm/0006-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch rename to rpm/0004-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch index b765535..891f5dc 100644 --- a/rpm/0006-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch +++ b/rpm/0004-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch @@ -1,18 +1,22 @@ -From 6630721a6fdedb2613e234372a079ca942007072 Thu, 9 Aug 2018 11:36:55 +0200 +From ad25aa65aedb488b349218019fd478291af3a7ab Mon Sep 17 00:00:00 2001 From: Juha Kallioinen Date: Wed, 6 Nov 2013 14:05:27 +0000 -Subject: [PATCH] [libzypp] Enable netrc-optional on libcurl to allow for easier image building in SDK - +Subject: [PATCH] Enable netrc-optional on libcurl to allow for easier image + building in SDK Original patch from: Islam Amer Signed-off-by: Juha Kallioinen +--- + zypp/media/MediaCurl.cc | 59 ++++++++++++++++++++++++++++++++++++++----------- + zypp/media/MediaCurl.h | 2 +- + 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/zypp/media/MediaCurl.cc b/zypp/media/MediaCurl.cc -index 599e145..115e06f 100644 +index 2947c31..a647977 100644 --- a/zypp/media/MediaCurl.cc +++ b/zypp/media/MediaCurl.cc -@@ -984,8 +984,8 @@ +@@ -616,8 +616,8 @@ void MediaCurl::getFileCopy( const Pathname & filename , const Pathname & target Url fileurl(getFileUrl(filename)); @@ -23,7 +27,7 @@ index 599e145..115e06f 100644 do { try -@@ -996,7 +996,7 @@ +@@ -628,7 +628,7 @@ void MediaCurl::getFileCopy( const Pathname & filename , const Pathname & target // retry with proper authentication data catch (MediaUnauthorizedException & ex_r) { @@ -32,7 +36,7 @@ index 599e145..115e06f 100644 retry = true; else { -@@ -1026,8 +1026,8 @@ +@@ -658,8 +658,8 @@ void MediaCurl::getFileCopy( const Pathname & filename , const Pathname & target bool MediaCurl::getDoesFileExist( const Pathname & filename ) const { @@ -43,7 +47,7 @@ index 599e145..115e06f 100644 do { try -@@ -1037,7 +1037,7 @@ +@@ -669,7 +669,7 @@ bool MediaCurl::getDoesFileExist( const Pathname & filename ) const // authentication problem, retry with proper authentication data catch (MediaUnauthorizedException & ex_r) { @@ -52,12 +56,12 @@ index 599e145..115e06f 100644 retry = true; else ZYPP_RETHROW(ex_r); -@@ -1693,9 +1693,32 @@ +@@ -1346,9 +1346,32 @@ void MediaCurl::resetExpectedFileSize(void *clientp, const ByteCount &expectedFi } /////////////////////////////////////////////////////////////////// - --bool MediaCurl::authenticate(const string & availAuthTypes, bool firstTry) const +-bool MediaCurl::authenticate(const std::string & availAuthTypes, bool firstTry) const +/* + * The authentication is a challenge-response type transaction. We + * come here after the challenge has been received and need to send a @@ -81,13 +85,13 @@ index 599e145..115e06f 100644 + * the correct response. + * + */ -+bool MediaCurl::authenticate(const string & availAuthTypes, int numTry, bool &netrcUsed) const ++bool MediaCurl::authenticate(const std::string & availAuthTypes, int numTry, bool &netrcUsed) const { + DBG << "numtry: " << numTry << endl; //! \todo need a way to pass different CredManagerOptions here CredentialManager cm(CredManagerOptions(ZConfig::instance().repoManagerRoot())); CurlAuthData_Ptr credentials; -@@ -1703,21 +1726,29 @@ +@@ -1356,21 +1379,29 @@ bool MediaCurl::authenticate(const std::string & availAuthTypes, bool firstTry) // get stored credentials AuthData_Ptr cmcred = cm.getCred(_url); @@ -122,7 +126,7 @@ index 599e145..115e06f 100644 curlcred->setUsername(_url.getUsername()); // if CM has found some credentials, preset the username from there else if (cmcred) -@@ -1754,6 +1785,7 @@ +@@ -1407,6 +1438,7 @@ bool MediaCurl::authenticate(const std::string & availAuthTypes, bool firstTry) } else { @@ -130,7 +134,7 @@ index 599e145..115e06f 100644 DBG << "callback answer: cancel" << endl; } } -@@ -1792,6 +1824,7 @@ +@@ -1445,6 +1477,7 @@ bool MediaCurl::authenticate(const std::string & availAuthTypes, bool firstTry) return true; } @@ -139,10 +143,10 @@ index 599e145..115e06f 100644 } diff --git a/zypp/media/MediaCurl.h b/zypp/media/MediaCurl.h -index 48a8dcf..816a4f1 100644 +index de3ab5c..44b9add 100644 --- a/zypp/media/MediaCurl.h +++ b/zypp/media/MediaCurl.h -@@ -158,7 +158,7 @@ +@@ -160,7 +160,7 @@ class MediaCurl : public MediaHandler */ std::string getAuthHint() const; @@ -151,3 +155,6 @@ index 48a8dcf..816a4f1 100644 bool detectDirIndex() const; +-- +1.9.1 + diff --git a/rpm/0005-Disable-docs-building-with-force.patch b/rpm/0005-Disable-docs-building-with-force.patch new file mode 100644 index 0000000..0f4bd40 --- /dev/null +++ b/rpm/0005-Disable-docs-building-with-force.patch @@ -0,0 +1,25 @@ +From 86e1f702c8348db64c84e6515004729e110e5e31 Mon Sep 17 00:00:00 2001 +From: Niels Breet +Date: Tue, 27 Oct 2020 17:01:42 +0200 +Subject: [PATCH] Disable docs building with force + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d3945f8..c548b77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -319,7 +319,7 @@ ADD_SUBDIRECTORY( zypp ) + # do not build devel by default + ADD_SUBDIRECTORY( devel EXCLUDE_FROM_ALL ) + ADD_SUBDIRECTORY( tools ) +-ADD_SUBDIRECTORY( doc ) ++# ADD_SUBDIRECTORY( doc ) + + IF ( ENABLE_BUILD_TRANS ) + ADD_SUBDIRECTORY( po ) +-- +1.9.1 + diff --git a/rpm/0005-disable-doc.patch b/rpm/0005-disable-doc.patch deleted file mode 100644 index 6e08563..0000000 --- a/rpm/0005-disable-doc.patch +++ /dev/null @@ -1,19 +0,0 @@ -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/0006-Use-rpm-platform-for-architecture-autodetection.patch b/rpm/0006-Use-rpm-platform-for-architecture-autodetection.patch new file mode 100644 index 0000000..2b8d256 --- /dev/null +++ b/rpm/0006-Use-rpm-platform-for-architecture-autodetection.patch @@ -0,0 +1,65 @@ +From d55afcc05982769183c5d78e158157065a12d7db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= + +Date: Wed, 25 Nov 2020 14:03:30 +0200 +Subject: [PATCH] Use rpm platform for architecture autodetection. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If /etc/rpm/platform file exists use the architecture defined. This way +we get correct behavior with for example aarch64 kernel and armv7hl +platform. + +Signed-off-by: Juho Hämäläinen +--- + zypp/ZConfig.cc | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/zypp/ZConfig.cc b/zypp/ZConfig.cc +index 3bf1185af..9ebccea51 100644 +--- a/zypp/ZConfig.cc ++++ b/zypp/ZConfig.cc +@@ -164,6 +164,39 @@ namespace zypp + architecture = Arch_ppc64p7; + } + #endif ++ ++ /* JB#51353 - We need to override architecture when we get certain architectures from uname ++ * which don't match platform. For example aarch64 kernel with armv7hl platform. ++ * This detection mimics what is implemented in kickstart file, writing platform architecture ++ * to /etc/rpm/platform - rpm uses this file to get it right and we use it now as well. ++ * */ ++ std::ifstream rpm_platform( "/etc/rpm/platform" ); ++ ++ if ( rpm_platform ) ++ { ++ std::string rpmArch; ++ ++ for( iostr::EachLine in( rpm_platform ); in; in.next() ) ++ { ++ std::string s = *in; ++ size_t pos = s.find ("-"); ++ ++ if ( pos != std::string::npos ) ++ { ++ rpmArch = s.substr (0, pos); ++ break; ++ } ++ } ++ ++ if ( !rpmArch.empty() && rpmArch != architecture.asString() ) ++ { ++ MIL << "Uname is '" << architecture ++ << "' but /etc/rpm/platform architecture is '" << rpmArch ++ << "' - use what platform says." << endl; ++ architecture = Arch(rpmArch); ++ } ++ } ++ + return architecture; + } + +-- +2.25.1 + diff --git a/rpm/0007-Revert-Cleanup-remove-unneeded-ifndef-SWIG.patch b/rpm/0007-Revert-Cleanup-remove-unneeded-ifndef-SWIG.patch new file mode 100644 index 0000000..29e2c14 --- /dev/null +++ b/rpm/0007-Revert-Cleanup-remove-unneeded-ifndef-SWIG.patch @@ -0,0 +1,198 @@ +From 10ac3c312112d585b1de2ef7fd12e5d4d730e6ad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= +Date: Thu, 26 Nov 2020 00:51:18 +0200 +Subject: [PATCH] Revert "Cleanup: remove unneeded '#ifndef SWIG'" + +This reverts commit 850bbd0fde9075786ca65e46fdfeb7ea01102f16. +--- + zypp/CheckSum.h | 5 ++++- + zypp/Patch.h | 8 ++++---- + zypp/Pathname.h | 5 ++--- + zypp/base/Easy.h | 5 +++++ + zypp/base/String.h | 2 ++ + zypp/repo/RepoVariables.h | 6 ++++-- + zypp/sat/SolvableType.h | 2 ++ + 7 files changed, 23 insertions(+), 10 deletions(-) + +diff --git a/zypp/CheckSum.h b/zypp/CheckSum.h +index f52fdbef2..ffd84b439 100644 +--- a/zypp/CheckSum.h ++++ b/zypp/CheckSum.h +@@ -54,10 +54,12 @@ namespace zypp + */ + CheckSum( const std::string & type, std::istream & input_r ); + ++#ifndef SWIG // Swig treats it as syntax error0 + /** Ctor from temporary istream */ + CheckSum( const std::string & type, std::istream && input_r ) + : CheckSum( type, input_r ) + {} ++#endif + + public: + static const std::string & md5Type(); +@@ -88,7 +90,7 @@ namespace zypp + static CheckSum sha256( std::istream & input_r ) { return CheckSum( sha256Type(), input_r ); } + static CheckSum sha384( std::istream & input_r ) { return CheckSum( sha384Type(), input_r ); } + static CheckSum sha512( std::istream & input_r ) { return CheckSum( sha512Type(), input_r ); } +- ++#ifndef SWIG // Swig treats it as syntax error + static CheckSum md5( std::istream && input_r ) { return CheckSum( md5Type(), input_r ); } + static CheckSum sha( std::istream && input_r ) { return CheckSum( sha1Type(), input_r ); } + static CheckSum sha1( std::istream && input_r ) { return CheckSum( sha1Type(), input_r ); } +@@ -96,6 +98,7 @@ namespace zypp + static CheckSum sha256( std::istream && input_r ) { return CheckSum( sha256Type(), input_r ); } + static CheckSum sha384( std::istream && input_r ) { return CheckSum( sha384Type(), input_r ); } + static CheckSum sha512( std::istream && input_r ) { return CheckSum( sha512Type(), input_r ); } ++#endif + //@} + + /** \name Reads the content of \param input_r and computes the checksum. */ +diff --git a/zypp/Patch.h b/zypp/Patch.h +index 33de43c82..1ba453a8a 100644 +--- a/zypp/Patch.h ++++ b/zypp/Patch.h +@@ -107,7 +107,7 @@ namespace zypp + bool isCategory( const std::string & category_r ) const; + /** \overload taking OR'ed \ref Categories */ + bool isCategory( Categories category_r ) const; +- ++#ifndef SWIG // Swig treats it as syntax error + /** \overload taking container of category strings + * 2nd template arg just to prevent instantiation for Category + */ +@@ -118,7 +118,7 @@ namespace zypp + { if ( isCategory( el ) ) return true; } + return false; + } +- ++#endif + /** Patch category as enum of wellknown categories. + * Unknown values are mapped to \ref CAT_OTHER. + */ +@@ -143,7 +143,7 @@ namespace zypp + bool isSeverity( const std::string & severity_r ) const; + /** \overload taking OR'ed \ref SeverityFlags */ + bool isSeverity( SeverityFlags severity_r ) const; +- ++#ifndef SWIG // Swig treats it as syntax error + /** \overload taking container of severity strings + * 2nd template arg just to prevent instantiation for SeverityFlag + */ +@@ -154,7 +154,7 @@ namespace zypp + { if ( isSeverity( el ) ) return true; } + return false; + } +- ++#endif + /** Severity string mapped to an enum. + * Unknown string values are mapped to \ref SEV_OTHER + */ +diff --git a/zypp/Pathname.h b/zypp/Pathname.h +index d38780744..09d37d030 100644 +--- a/zypp/Pathname.h ++++ b/zypp/Pathname.h +@@ -1,4 +1,3 @@ +- + /*---------------------------------------------------------------------\ + | ____ _ __ __ ___ | + | |__ / \ / / . \ . \ | +@@ -67,12 +66,12 @@ namespace zypp + using std::swap; + swap( lhs._name, rhs._name ); + } +- ++#ifndef SWIG // Swig treats it as syntax error + /** Move Ctor */ + Pathname( Pathname && tmp ) + : _name( std::move( tmp._name ) ) + {} +- ++#endif + /** Assign */ + Pathname & operator=( Pathname rhs ) + { swap( *this, rhs ); return *this; } +diff --git a/zypp/base/Easy.h b/zypp/base/Easy.h +index 0b1898d48..908890125 100644 +--- a/zypp/base/Easy.h ++++ b/zypp/base/Easy.h +@@ -65,6 +65,7 @@ + CLASS( const CLASS & ) = default; \ + CLASS & operator=( const CLASS & ) = default + ++#ifndef SWIG // Swig treats it as syntax error + /** Delete move ctor and move assign */ + #define NON_MOVABLE(CLASS) \ + CLASS( CLASS && ) = delete; \ +@@ -74,6 +75,10 @@ + #define DEFAULT_MOVABLE(CLASS) \ + CLASS( CLASS && ) = default; \ + CLASS & operator=( CLASS && ) = default ++#else ++#define NON_MOVABLE(CLASS) ++#define DEFAULT_MOVABLE(CLASS) ++#endif + + /** Delete copy ctor and copy assign but enable default move */ + #define NON_COPYABLE_BUT_MOVE( CLASS ) \ +diff --git a/zypp/base/String.h b/zypp/base/String.h +index 00c6fd63e..6c117919e 100644 +--- a/zypp/base/String.h ++++ b/zypp/base/String.h +@@ -136,8 +136,10 @@ namespace zypp + inline const std::string & asString( const std::string & t ) + { return t; } + ++#ifndef SWIG // Swig treats it as syntax error + inline std::string && asString( std::string && t ) + { return std::move(t); } ++#endif + + inline std::string asString( const char * t ) + { return t == nullptr ? std::string() : t; } +diff --git a/zypp/repo/RepoVariables.h b/zypp/repo/RepoVariables.h +index 4ca95dfef..1d29f6283 100644 +--- a/zypp/repo/RepoVariables.h ++++ b/zypp/repo/RepoVariables.h +@@ -61,9 +61,10 @@ namespace zypp + + /** Return a copy of \a value_r with embedded variables expanded. */ + std::string operator()( const std::string & value_r, VarRetriever varRetriever_r ) const; +- ++#ifndef SWIG // Swig treats it as syntax error + /** \overload moving */ + std::string operator()( std::string && value_r, VarRetriever varRetriever_r ) const; ++#endif + }; + + /** +@@ -105,9 +106,10 @@ namespace zypp + struct RepoVariablesStringReplacer : public std::unary_function + { + std::string operator()( const std::string & value_r ) const; +- ++#ifndef SWIG // Swig treats it as syntax error + /** \overload moving */ + std::string operator()( std::string && value_r ) const; ++#endif + }; + + /** +diff --git a/zypp/sat/SolvableType.h b/zypp/sat/SolvableType.h +index ac940786a..8564a6123 100644 +--- a/zypp/sat/SolvableType.h ++++ b/zypp/sat/SolvableType.h +@@ -147,8 +147,10 @@ namespace zypp + SolvableType() {} + SolvableType( const SolvableType & ) {} + void operator=( const SolvableType & ) {} ++#ifndef SWIG + SolvableType( SolvableType && ) {} + void operator=( SolvableType && ) {} ++#endif + ~SolvableType() {} + }; + +-- +2.25.1 + diff --git a/rpm/0007-Set-GPG-homedir-when-reading-signatures.patch b/rpm/0007-Set-GPG-homedir-when-reading-signatures.patch deleted file mode 100644 index 6ef77c9..0000000 --- a/rpm/0007-Set-GPG-homedir-when-reading-signatures.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 11d772131cf682b153071ec5a8b6986091c3ab75 Wed, 23 Jan 2019 09:07:33 +0100 -From: Andrew Branson -Date: Wed, 23 Jan 2019 09:06:03 +0100 -Subject: [PATCH] Set GPG homedir when reading signatures. GPG won't start without a valid one. - -Not being able to create ~/.gnupg is a fatal error on startup for GPG - -diff --git a/zypp/KeyRing.cc b/zypp/KeyRing.cc -index d9e0c9a..c39b872 100644 ---- a/zypp/KeyRing.cc -+++ b/zypp/KeyRing.cc -@@ -639,6 +639,10 @@ namespace zypp - return std::string(); - } - -+ if(!ctx->setHomedir(generalKeyRing())) { -+ ZYPP_THROW(KeyRingException(_("General keyring not found"))); -+ } -+ - std::list fprs = ctx->readSignatureFingerprints(signature); - if (fprs.size()) { - std::string &id = fprs.back(); diff --git a/rpm/0008-MediaCurl-Fix-leaking-fd.patch b/rpm/0008-MediaCurl-Fix-leaking-fd.patch deleted file mode 100644 index 032cba1..0000000 --- a/rpm/0008-MediaCurl-Fix-leaking-fd.patch +++ /dev/null @@ -1,89 +0,0 @@ -From d9f3cd3bf9822997819dd54c7212290528944026 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= - -Date: Thu, 11 Jun 2020 10:30:27 +0300 -Subject: [PATCH] MediaCurl: Fix leaking fd. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Juho Hämäläinen ---- - zypp/media/MediaCurl.cc | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/zypp/media/MediaCurl.cc b/zypp/media/MediaCurl.cc -index 1d1682773..049a7003b 100644 ---- a/zypp/media/MediaCurl.cc -+++ b/zypp/media/MediaCurl.cc -@@ -47,6 +47,8 @@ - #undef CURLVERSION_AT_LEAST - #define CURLVERSION_AT_LEAST(M,N,O) LIBCURL_VERSION_NUM >= ((((M)<<8)+(N))<<8)+(O) - -+#define fclose_and_clear(x) do { if (x) ::fclose(x); x = 0; } while (0) -+ - using namespace std; - using namespace zypp::base; - -@@ -1268,7 +1270,7 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const - - ret = curl_easy_setopt( _curl, CURLOPT_WRITEDATA, file ); - if ( ret != 0 ) { -- ::fclose(file); -+ fclose_and_clear(file); - std::string err( _curlError); - curl_easy_setopt( _curl, CURLOPT_RANGE, NULL ); - curl_easy_setopt( _curl, CURLOPT_NOBODY, 0L); -@@ -1292,6 +1294,7 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const - { - curl_easy_setopt( _curl, CURLOPT_NOBODY, 0L); - if ( ret != 0 ) { -+ fclose_and_clear(file); - ZYPP_THROW(MediaCurlSetOptException(url, _curlError)); - } - -@@ -1302,6 +1305,7 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const - */ - curl_easy_setopt( _curl, CURLOPT_HTTPGET, 1L); - if ( ret != 0 ) { -+ fclose_and_clear(file); - ZYPP_THROW(MediaCurlSetOptException(url, _curlError)); - } - -@@ -1311,13 +1315,14 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const - // for FTP we set different options - curl_easy_setopt( _curl, CURLOPT_RANGE, NULL); - if ( ret != 0 ) { -+ fclose_and_clear(file); - ZYPP_THROW(MediaCurlSetOptException(url, _curlError)); - } - } - - // if the code is not zero, close the file - if ( ok != 0 ) -- ::fclose(file); -+ fclose_and_clear(file); - - // as we are not having user interaction, the user can't cancel - // the file existence checking, a callback or timeout return code -@@ -1326,13 +1331,17 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const - evaluateCurlCode( filename, ok, true /* timeout */); - } - catch ( const MediaFileNotFoundException &e ) { -+ fclose_and_clear(file); - // if the file did not exist then we can return false - return false; - } - catch ( const MediaException &e ) { -+ fclose_and_clear(file); - // some error, we are not sure about file existence, rethrw - ZYPP_RETHROW(e); - } -+ -+ fclose_and_clear(file); - // exists - return ( ok == CURLE_OK ); - } --- -2.25.1 - diff --git a/rpm/0008-libzypp-Fix-diff-arguments-for-busybox-diff.patch b/rpm/0008-libzypp-Fix-diff-arguments-for-busybox-diff.patch new file mode 100644 index 0000000..3bb7ad6 --- /dev/null +++ b/rpm/0008-libzypp-Fix-diff-arguments-for-busybox-diff.patch @@ -0,0 +1,27 @@ +From 6593ab4bab379b2c0ef9a73f6da937bebf91b642 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= + +Date: Thu, 26 Nov 2020 09:34:44 +0200 +Subject: [PATCH] [libzypp] Fix diff arguments for busybox-diff. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Juho Hämäläinen +--- + po/PotfileDiff.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/po/PotfileDiff.sh b/po/PotfileDiff.sh +index 04a249c04..ee72c5dfc 100755 +--- a/po/PotfileDiff.sh ++++ b/po/PotfileDiff.sh +@@ -10,4 +10,4 @@ extract "$1" >"$OLDTMP" + extract "$2" >"$NEWTMP" + + shift 2 # additional args for diff +-diff -u0 "$@" "$OLDTMP" "$NEWTMP" ++diff -U 0 "$@" "$OLDTMP" "$NEWTMP" +-- +2.25.1 + diff --git a/rpm/libzypp.spec b/rpm/libzypp.spec index 151da66..909d6de 100644 --- a/rpm/libzypp.spec +++ b/rpm/libzypp.spec @@ -1,37 +1,43 @@ +%bcond_with mediabackend_tests + + Name: libzypp License: GPLv2+ Summary: Package, Patch, Pattern, and Product Management -Version: 17.9.0 +Version: 17.24.2 Release: 1 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc 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 -Patch6: 0006-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch -Patch7: 0007-Set-GPG-homedir-when-reading-signatures.patch -Patch8: 0008-MediaCurl-Fix-leaking-fd.patch +Patch4: 0004-libzypp-Enable-netrcoptional-on-libcurl-to-allow-for.patch +Patch5: 0005-Disable-docs-building-with-force.patch +Patch6: 0006-Use-rpm-platform-for-architecture-autodetection.patch +Patch7: 0007-Revert-Cleanup-remove-unneeded-ifndef-SWIG.patch +Patch8: 0008-libzypp-Fix-diff-arguments-for-busybox-diff.patch BuildRequires: cmake -BuildRequires: openssl-devel +BuildRequires: pkgconfig(openssl) >= 1.1 # Need boost > 1.53 for string_ref utility BuildRequires: boost-devel >= 1.53.0 -BuildRequires: doxygen BuildRequires: gcc-c++ >= 4.6 -BuildRequires: gettext-devel -BuildRequires: libxml2-devel +BuildRequires: gettext +BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libproxy-1.0) -BuildRequires: libsolv-devel >= 0.6.8 -Requires: libsolv-tools >= 0.6.8 -Requires: libsolv0 >= 0.6.8 -Requires: lsof +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(udev) +BuildRequires: libsolv-devel >= 0.7.15 +BuildRequires: libsolv-tools >= 0.7.15 +BuildRequires: pkgconfig(sigc++-2.0) BuildRequires: glib2-devel -BuildRequires: popt-devel -BuildRequires: rpm-devel +BuildRequires: pkgconfig(popt) +BuildRequires: pkgconfig(rpm) BuildRequires: gpgme-devel -Requires: gpgme -BuildRequires: curl-devel +BuildRequires: pkgconfig(libcurl) +BuildRequires: yaml-cpp-devel +Requires: lsof +Requires: libsolv-tools >= 0.7.15 + %description Package, Patch, Pattern, and Product Management @@ -49,18 +55,8 @@ Authors: %package devel Requires: libzypp = %{version} -Requires: libxml2-devel -Requires: openssl-devel -Requires: rpm-devel -Requires: glibc-devel -Requires: zlib-devel -Requires: bzip2 -Requires: popt-devel Requires: boost-devel >= 1.60.0 -Requires: libstdc++-devel -Requires: cmake -Requires: curl-devel -Requires: libsolv-devel +Requires: libsolv-devel >= 0.7.15 Summary: Package, Patch, Pattern, and Product Management - developers files %description -n libzypp-devel @@ -90,16 +86,21 @@ sed -i -r 's/^#(.*)\/var\/cache\/zypp/\1\/home\/.zypp-cache/g' ./zypp.conf mkdir -p build cd build -# There is gcc bug that prevents using gdwarf-4 atm. -export CFLAGS="$CFLAGS -gdwarf-2" -export CXXFLAGS="$CXXFLAGS -gdwarf-2" +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" -cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=1 \ -DUSE_TRANSLATION_SET=${TRANSLATION_SET:-zypp} \ + -DDISABLE_LIBPROXY=TRUE \ + -DENABLE_BUILD_DOCS=FALSE \ + -DENABLE_BUILD_TRANS=FALSE \ + -DENABLE_BUILD_TESTS=FALSE \ + -DDISABLE_AUTODOCS=TRUE \ + %{!?with_mediabackend_tests:-DDISABLE_MEDIABACKEND_TESTS=1} \ .. -make %{?_smp_mflags} VERBOSE=1 +%make_build VERBOSE=1 make -C po %{?_smp_mflags} translations %if 0%{?run_testsuite} diff --git a/upstream b/upstream index 4eda4ec..7043f03 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 4eda4ec1aa46514f24cf7f6c0f0111cc2ab944ba +Subproject commit 7043f03569f0b1abda2050e22f67513f3994326d