Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2021-09-07 21:13:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Tue Sep 7 21:13:41 2021 rev:448 rq:916749 version:17.28.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2021-09-02 23:20:12.412545408 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new.1899/libzypp.changes 2021-09-07 21:13:48.116750394 +0200 @@ -1,0 +2,9 @@ +Fri Sep 3 14:34:19 CEST 2021 - m...@suse.de + +- CMake/spec: Add option to force SINGLE_RPMTRANS as default for + zypper (fixes #340) +- Make sure singleTrans is zypper-only for now. +- Do not double check signatures and keys (bsc#1190059) +- version 17.28.3 (22) + +------------------------------------------------------------------- Old: ---- libzypp-17.28.2.tar.bz2 New: ---- libzypp-17.28.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.JXpVmk/_old 2021-09-07 21:13:48.636751023 +0200 +++ /var/tmp/diff_new_pack.JXpVmk/_new 2021-09-07 21:13:48.636751023 +0200 @@ -39,8 +39,11 @@ %bcond_with sigc_block_workaround %endif +# Distros using just zypper may want to enable this as default earlier +%bcond_with enable_preview_single_rpmtrans_as_default_for_zypper + Name: libzypp -Version: 17.28.2 +Version: 17.28.3 Release: 0 License: GPL-2.0-or-later URL: https://github.com/openSUSE/libzypp @@ -269,6 +272,7 @@ %{?with_zstd:-DENABLE_ZSTD_COMPRESSION=1} \ %{?with_sigc_block_workaround:-DENABLE_SIGC_BLOCK_WORKAROUND=1} \ %{!?with_mediabackend_tests:-DDISABLE_MEDIABACKEND_TESTS=1} \ + %{?with enable_preview_single_rpmtrans_as_default_for_zypper:-DENABLE_PREVIEW_SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER=1} \ ${EXTRA_CMAKE_OPTIONS} \ .. make %{?_smp_mflags} VERBOSE=1 ++++++ libzypp-17.28.2.tar.bz2 -> libzypp-17.28.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/CMakeLists.txt new/libzypp-17.28.3/CMakeLists.txt --- old/libzypp-17.28.2/CMakeLists.txt 2021-08-30 09:01:19.000000000 +0200 +++ new/libzypp-17.28.3/CMakeLists.txt 2021-09-03 14:31:22.000000000 +0200 @@ -19,6 +19,8 @@ OPTION (EXPORT_NG_API "Export experimental libzypp API" OFF) # This option will reroute all tool binaries to the libzypp build dir instead of taking those installed in the default directories. OPTION (ENABLE_DEVEL_BUILD "Developer build, use zypp tools directly from build dir rather than the default locations" OFF) +# Distros using just zypper may want to enable this as default earlier +OPTION (ENABLE_PREVIEW_SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER "[preview] Force zypper into using a single rpm transaction to install" OFF) #-------------------------------------------------------------------------------- SET (have_system x) @@ -331,6 +333,11 @@ # logrotate config file INSTALL( FILES ${LIBZYPP_SOURCE_DIR}/zypp-history.lr DESTINATION ${SYSCONFDIR}/logrotate.d ) +IF ( ENABLE_PREVIEW_SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER ) + MESSAGE( STATUS "[preview] Force zypper into using a single rpm transaction to install" ) + ADD_DEFINITIONS( -DSINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER ) +ENDIF ( ENABLE_PREVIEW_SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER ) + #################################################################### # SUBDIRECTORIES # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/VERSION.cmake new/libzypp-17.28.3/VERSION.cmake --- old/libzypp-17.28.2/VERSION.cmake 2021-08-31 10:51:19.000000000 +0200 +++ new/libzypp-17.28.3/VERSION.cmake 2021-09-03 14:43:43.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "17") SET(LIBZYPP_COMPATMINOR "22") SET(LIBZYPP_MINOR "28") -SET(LIBZYPP_PATCH "2") +SET(LIBZYPP_PATCH "3") # -# LAST RELEASED: 17.28.2 (22) +# LAST RELEASED: 17.28.3 (22) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/libzypp.spec.cmake new/libzypp-17.28.3/libzypp.spec.cmake --- old/libzypp-17.28.2/libzypp.spec.cmake 2021-08-26 18:56:17.000000000 +0200 +++ new/libzypp-17.28.3/libzypp.spec.cmake 2021-09-03 14:31:22.000000000 +0200 @@ -38,6 +38,9 @@ %bcond_with sigc_block_workaround %endif +# Distros using just zypper may want to enable this as default earlier +%bcond_with enable_preview_single_rpmtrans_as_default_for_zypper + Name: libzypp Version: @VERSION@ Release: 0 @@ -268,6 +271,7 @@ %{?with_zstd:-DENABLE_ZSTD_COMPRESSION=1} \ %{?with_sigc_block_workaround:-DENABLE_SIGC_BLOCK_WORKAROUND=1} \ %{!?with_mediabackend_tests:-DDISABLE_MEDIABACKEND_TESTS=1} \ + %{?with enable_preview_single_rpmtrans_as_default_for_zypper:-DENABLE_PREVIEW_SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER=1} \ ${EXTRA_CMAKE_OPTIONS} \ .. make %{?_smp_mflags} VERBOSE=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/package/libzypp.changes new/libzypp-17.28.3/package/libzypp.changes --- old/libzypp-17.28.2/package/libzypp.changes 2021-08-31 10:51:19.000000000 +0200 +++ new/libzypp-17.28.3/package/libzypp.changes 2021-09-03 14:43:43.000000000 +0200 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Fri Sep 3 14:34:19 CEST 2021 - m...@suse.de + +- CMake/spec: Add option to force SINGLE_RPMTRANS as default for + zypper (fixes #340) +- Make sure singleTrans is zypper-only for now. +- Do not double check signatures and keys (bsc#1190059) +- version 17.28.3 (22) + +------------------------------------------------------------------- Tue Aug 31 10:49:51 CEST 2021 - m...@suse.de - Workaround Bug 1189788: Don't allow ZYPP_SINGLE_RPMTRANS=1 on a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/tools/zypp-rpm/main.cc new/libzypp-17.28.3/tools/zypp-rpm/main.cc --- old/libzypp-17.28.2/tools/zypp-rpm/main.cc 2021-08-26 18:56:18.000000000 +0200 +++ new/libzypp-17.28.3/tools/zypp-rpm/main.cc 2021-09-02 14:51:18.000000000 +0200 @@ -224,21 +224,22 @@ int tsFlags = RPMTRANS_FLAG_NONE; int tsVerifyFlags = RPMVSF_DEFAULT; - if ( msg.flags() & RpmInstFlag::RPMINST_NODIGEST) + const auto &rpmInstFlags = msg.flags(); + if ( rpmInstFlags & RpmInstFlag::RPMINST_NODIGEST) tsVerifyFlags |= _RPMVSF_NODIGESTS; - if ( msg.flags() & RpmInstFlag::RPMINST_NOSIGNATURE) + if ( rpmInstFlags & RpmInstFlag::RPMINST_NOSIGNATURE) tsVerifyFlags |= _RPMVSF_NOSIGNATURES; - if ( msg.flags() & RpmInstFlag::RPMINST_EXCLUDEDOCS) + if ( rpmInstFlags & RpmInstFlag::RPMINST_EXCLUDEDOCS) tsFlags |= RPMTRANS_FLAG_NODOCS; - if ( msg.flags() & RpmInstFlag::RPMINST_NOSCRIPTS) + if ( rpmInstFlags & RpmInstFlag::RPMINST_NOSCRIPTS) tsFlags |= RPMTRANS_FLAG_NOSCRIPTS; - if ( msg.flags() & RpmInstFlag::RPMINST_JUSTDB) + if ( rpmInstFlags & RpmInstFlag::RPMINST_JUSTDB) tsFlags |= RPMTRANS_FLAG_JUSTDB; - if ( msg.flags() & RpmInstFlag::RPMINST_TEST) + if ( rpmInstFlags & RpmInstFlag::RPMINST_TEST) tsFlags |= RPMTRANS_FLAG_TEST; - if ( msg.flags() & RpmInstFlag::RPMINST_NOPOSTTRANS) + if ( rpmInstFlags & RpmInstFlag::RPMINST_NOPOSTTRANS) tsFlags |= RPMTRANS_FLAG_NOPOSTTRANS; - if ( msg.flags() & RpmInstFlag::RPMINST_NOSCRIPTS ) + if ( rpmInstFlags & RpmInstFlag::RPMINST_NOSCRIPTS ) tsFlags |= RPMTRANS_FLAG_NOSCRIPTS; // setup transaction settings @@ -270,6 +271,8 @@ // the transaction data we will get in the callback TransactionData data { msg }; + // do we care about knowing the public key? + const bool allowUntrusted = ( rpmInstFlags & RpmInstFlag::RPMINST_ALLOWUNTRUSTED ); for ( int i = 0; i < msg.steps_size(); i++ ) { const auto &step = msg.steps(i); @@ -278,18 +281,25 @@ const auto &file = step.install().pathname(); auto rpmHeader = readPackage( ts, step.install().pathname() ); + switch(rpmHeader.second) { case RPMRC_OK: break; case RPMRC_NOTTRUSTED: std::cerr << zypp::str::Format( "Failed to verify key for %s" ) % file << std::endl; - return FailedToReadPackage; + if ( !allowUntrusted ) + return FailedToReadPackage; + break; case RPMRC_NOKEY: std::cerr << zypp::str::Format( "Public key unavailable for %s" ) % file << std::endl; - return FailedToReadPackage; + if ( !allowUntrusted ) + return FailedToReadPackage; + break; case RPMRC_NOTFOUND: std::cerr << zypp::str::Format( "Signature not found for %s" ) % file << std::endl; - return FailedToReadPackage; + if ( !allowUntrusted ) + return FailedToReadPackage; + break; case RPMRC_FAIL: std::cerr << zypp::str::Format( "Signature does not verify for %s" ) % file << std::endl; return FailedToReadPackage; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/zypp/ZYppCommitPolicy.cc new/libzypp-17.28.3/zypp/ZYppCommitPolicy.cc --- old/libzypp-17.28.2/zypp/ZYppCommitPolicy.cc 2021-08-26 18:56:18.000000000 +0200 +++ new/libzypp-17.28.3/zypp/ZYppCommitPolicy.cc 2021-09-03 14:31:22.000000000 +0200 @@ -19,25 +19,28 @@ #include <zypp/ZYppCommitPolicy.h> #include <zypp-core/base/LogControl.h> #include <zypp-core/TriBool.h> - -#ifdef NO_SINGLETRANS_USERMERGE #include <zypp/PathInfo.h> #include <zypp/ZYppCallbacks.h> -#endif + /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// + inline bool ImZYPPER() + { return filesystem::readlink( "/proc/self/exe" ).basename() == "zypper"; } bool singleTransInEnv () { - static bool singleTrans = ([]()->bool{ +#ifdef SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER + static bool singleTrans = ImZYPPER(); +#else // SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER + static bool singleTrans = ImZYPPER() && ([]()->bool{ const char *val = ::getenv("ZYPP_SINGLE_RPMTRANS"); + bool ret = ( val && std::string_view( val ) == "1" ); #ifdef NO_SINGLETRANS_USERMERGE // Bug 1189788 - UsrMerge: filesystem package breaks system when upgraded in a single rpm transaction // While the bug is not fixed, we don't allow ZYPP_SINGLE_RPMTRANS=1 on a not UsrMerged system. // I.e. if /lib is a directory and not a symlink. - bool ret = ( val && std::string_view( val ) == "1" ); if ( ret && PathInfo( "/lib", PathInfo::LSTAT ).isDir() ) { WAR << "Ignore $ZYPP_SINGLE_RPMTRANS=1: Bug 1189788 - UsrMerge: filesystem package breaks system when upgraded in a single rpm transaction" << std::endl; JobReport::info( @@ -48,10 +51,18 @@ , JobReport::UserData( "cmdout", "[boo#1189788]" ) ); return false; } - return ret; -#else - return ( val && std::string_view( val ) == "1" ); #endif + if ( ret ) { + JobReport::info( + "[TechPreview] $ZYPP_SINGLE_RPMTRANS=1 : New rpm install backend is enabled\n" + " If you find any bugs or issues please let us know:\n" + " https://bugzilla.opensuse.org/\n" + " Component: libzypp (or zypper)\n" + " And please attach the /var/log/zypper.log to the bug report." + , JobReport::UserData( "cmdout" ) ); + } + return ret; +#endif // SINGLE_RPMTRANS_AS_DEFAULT_FOR_ZYPPER })(); return singleTrans; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/zypp/target/TargetImpl.cc new/libzypp-17.28.3/zypp/target/TargetImpl.cc --- old/libzypp-17.28.2/zypp/target/TargetImpl.cc 2021-08-30 09:26:34.000000000 +0200 +++ new/libzypp-17.28.3/zypp/target/TargetImpl.cc 2021-09-02 14:51:18.000000000 +0200 @@ -1879,7 +1879,13 @@ // // Because zypp builds the transaction and the resolver asserts that // everything is fine, or the user decided to ignore problems. - rpm::RpmInstFlags flags( policy_r.rpmInstFlags() | rpm::RPMINST_NODEPS ); + rpm::RpmInstFlags flags( policy_r.rpmInstFlags() + | rpm::RPMINST_NODEPS + // skip signature checks, we did that already + | rpm::RPMINST_NODIGEST + | rpm::RPMINST_NOSIGNATURE + // ignore untrusted keys since we already checked those earlier + | rpm::RPMINST_ALLOWUNTRUSTED ); zpt::Commit commit; commit.set_flags( flags ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.2/zypp/target/rpm/RpmFlags.h new/libzypp-17.28.3/zypp/target/rpm/RpmFlags.h --- old/libzypp-17.28.2/zypp/target/rpm/RpmFlags.h 2021-08-26 18:56:18.000000000 +0200 +++ new/libzypp-17.28.3/zypp/target/rpm/RpmFlags.h 2021-09-02 14:51:18.000000000 +0200 @@ -36,20 +36,21 @@ */ enum RpmInstFlag { - RPMINST_NONE = 0x0000, - RPMINST_EXCLUDEDOCS = 0x0001, - RPMINST_NOSCRIPTS = 0x0002, - RPMINST_FORCE = 0x0004, - RPMINST_NODEPS = 0x0008, - RPMINST_IGNORESIZE = 0x0010, - RPMINST_JUSTDB = 0x0020, - RPMINST_NODIGEST = 0x0040, - RPMINST_NOSIGNATURE = 0x0080, - RPMINST_NOUPGRADE = 0x0100, - RPMINST_TEST = 0x0200, - RPMINST_NOPOSTTRANS = 0x0400, - RPMINST_ALLOWDOWNGRADE= 0x0800, - RPMINST_REPLACEFILES = 0x1000 + RPMINST_NONE = 0x0000, + RPMINST_EXCLUDEDOCS = 0x0001, + RPMINST_NOSCRIPTS = 0x0002, + RPMINST_FORCE = 0x0004, + RPMINST_NODEPS = 0x0008, + RPMINST_IGNORESIZE = 0x0010, + RPMINST_JUSTDB = 0x0020, + RPMINST_NODIGEST = 0x0040, + RPMINST_NOSIGNATURE = 0x0080, + RPMINST_NOUPGRADE = 0x0100, + RPMINST_TEST = 0x0200, + RPMINST_NOPOSTTRANS = 0x0400, + RPMINST_ALLOWDOWNGRADE = 0x0800, + RPMINST_REPLACEFILES = 0x1000, + RPMINST_ALLOWUNTRUSTED = 0x2000, }; /** \relates RpmInstFlag Type-safe way of storing OR-combinations. */