Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package transactional-update for openSUSE:Factory checked in at 2021-10-22 10:45:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/transactional-update (Old) and /work/SRC/openSUSE:Factory/.transactional-update.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "transactional-update" Fri Oct 22 10:45:27 2021 rev:81 rq: version:3.5.6 Changes: -------- --- /work/SRC/openSUSE:Factory/transactional-update/transactional-update.changes 2021-10-20 20:23:04.773333454 +0200 +++ /work/SRC/openSUSE:Factory/.transactional-update.new.1890/transactional-update.changes 2021-10-22 10:45:28.432234401 +0200 @@ -2,12 +1,0 @@ -Tue Oct 12 09:42:57 UTC 2021 - Ignaz Forster <ifors...@suse.com> - -- Version 3.5.7 - Various fixes affecting Salt support: - - t-u: Don't squash stderr messages into stdout - - t-u: Correctly handle case when the snapshot has been deleted due to - using --drop-if-no-change: Don't show reboot messages and avoid an awk - error message [bsc#1191475] - - tukit: Make inotify handler less sensitive / ignore more directories - [bsc#1191475] - -------------------------------------------------------------------- Old: ---- transactional-update-3.5.7.tar.gz New: ---- transactional-update-3.5.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ transactional-update.spec ++++++ --- /var/tmp/diff_new_pack.CjxIPr/_old 2021-10-22 10:45:28.848234558 +0200 +++ /var/tmp/diff_new_pack.CjxIPr/_new 2021-10-22 10:45:28.848234558 +0200 @@ -26,7 +26,7 @@ %{!?_distconfdir: %global _distconfdir %{_prefix}%{_sysconfdir}} Name: transactional-update -Version: 3.5.7 +Version: 3.5.6 Release: 0 Summary: Transactional Updates with btrfs and snapshots License: GPL-2.0-or-later AND LGPL-2.1-or-later ++++++ transactional-update-3.5.7.tar.gz -> transactional-update-3.5.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-3.5.7/NEWS new/transactional-update-3.5.6/NEWS --- old/transactional-update-3.5.7/NEWS 2021-10-12 10:31:34.000000000 +0200 +++ new/transactional-update-3.5.6/NEWS 2021-09-24 01:10:02.000000000 +0200 @@ -2,17 +2,8 @@ Copyright (C) 2016-2021 Thorsten Kukuk, Ignaz Forster et al. -Version 3.5.7 -Various fixes affecting Salt support: -* t-u: Don't squash stderr messages into stdout -* t-u: Correctly handle case when the snapshot has been deleted due to - using --drop-if-no-change: Don't show reboot messages and avoid an awk - error message [bsc#1191475] -* tukit: Make inotify handler less sensitive / ignore more directories - [bsc#1191475] - Version 3.5.6 -* tukit: Add S/390 bootloader support [bsc#1189807] +* tukit: Add S/390 bootloader support [bsc#852640] * t-u: support purge-kernels with t-u patch [bsc#1190788] Version 3.5.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-3.5.7/configure.ac new/transactional-update-3.5.6/configure.ac --- old/transactional-update-3.5.7/configure.ac 2021-10-12 10:31:34.000000000 +0200 +++ new/transactional-update-3.5.6/configure.ac 2021-09-24 01:10:02.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(transactional-update, 3.5.7) +AC_INIT(transactional-update, 3.5.6) # Increase on any interface change and reset revision LIBTOOL_CURRENT=3 # Increase or reset on any VERSION update diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-3.5.7/lib/Mount.cpp new/transactional-update-3.5.6/lib/Mount.cpp --- old/transactional-update-3.5.7/lib/Mount.cpp 2021-10-12 10:31:34.000000000 +0200 +++ new/transactional-update-3.5.6/lib/Mount.cpp 2021-09-24 01:10:02.000000000 +0200 @@ -279,45 +279,10 @@ Mount::mount(prefix); } + PropagatedBindMount::PropagatedBindMount(std::string mountpoint, unsigned long flags) : BindMount(mountpoint, flags | MS_REC | MS_SLAVE) { } -std::vector<std::filesystem::path> MountList::getList(std::filesystem::path prefix) { - int rc = 0; - std::string err; - - std::vector<std::filesystem::path> list; - struct libmnt_table* mount_table = mnt_new_table(); - struct libmnt_iter* mount_iter = mnt_new_iter(MNT_ITER_FORWARD); - struct libmnt_fs* mount_fs; - - if ((rc = mnt_table_parse_mtab(mount_table, NULL)) != 0) - err = "Couldn't read fstab for reading mount points: " + std::to_string(rc); - while (rc == 0) { - if ((rc = mnt_table_next_fs(mount_table, mount_iter, &mount_fs)) == 0) { - std::filesystem::path target; - if ((target = mnt_fs_get_target(mount_fs)) == "") { - err = "Could't read target for mount point list."; - break; - } - if (target == "/") - continue; - list.push_back(prefix / target.relative_path()); - } else if (rc < 0) { - err = "Error iterating fstab: " + std::to_string(rc); - break; - } - } - - mnt_free_iter(mount_iter); - mnt_free_table(mount_table); - - if (!err.empty()) { - throw std::runtime_error{err}; - } - return list; -} - } // namespace TransactionalUpdate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-3.5.7/lib/Mount.hpp new/transactional-update-3.5.6/lib/Mount.hpp --- old/transactional-update-3.5.7/lib/Mount.hpp 2021-10-12 10:31:34.000000000 +0200 +++ new/transactional-update-3.5.6/lib/Mount.hpp 2021-09-24 01:10:02.000000000 +0200 @@ -11,7 +11,6 @@ #include <filesystem> #include <libmount/libmount.h> #include <string> -#include <vector> namespace TransactionalUpdate { @@ -58,13 +57,6 @@ PropagatedBindMount(std::string mountpoint, unsigned long flags = 0); }; -class MountList -{ -public: - MountList() = delete; - static std::vector<std::filesystem::path> getList(std::filesystem::path prefix = "/"); -}; - } // namespace TransactionalUpdate #endif // T_U_MOUNT_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-3.5.7/lib/Transaction.cpp new/transactional-update-3.5.6/lib/Transaction.cpp --- old/transactional-update-3.5.7/lib/Transaction.cpp 2021-10-12 10:31:34.000000000 +0200 +++ new/transactional-update-3.5.6/lib/Transaction.cpp 2021-09-24 01:10:02.000000000 +0200 @@ -32,7 +32,6 @@ namespace fs = std::filesystem; static int inotifyFd; -std::vector<std::filesystem::path> inotifyExcludes; class Transaction::impl { public: @@ -104,6 +103,7 @@ Mount mntVar{"/var"}; if (mntVar.isMount()) { + dirsToMount.push_back(std::make_unique<BindMount>("/var/cache")); if (fs::is_directory("/var/lib/zypp")) dirsToMount.push_back(std::make_unique<BindMount>("/var/lib/zypp")); dirsToMount.push_back(std::make_unique<BindMount>("/var/lib/ca-certificates")); @@ -119,21 +119,6 @@ dirsToMount.push_back(std::move(mntEtc)); } - // Set up temporary directories, so changes will be discarded automatically - dirsToMount.push_back(std::make_unique<BindMount>("/var/cache")); - std::unique_ptr<Mount> mntTmp{new Mount{"/tmp"}}; - mntTmp->setType("tmpfs"); - mntTmp->setSource("tmpfs"); - dirsToMount.push_back(std::move(mntTmp)); - std::unique_ptr<Mount> mntRun{new Mount{"/run"}}; - mntRun->setType("tmpfs"); - mntRun->setSource("tmpfs"); - dirsToMount.push_back(std::move(mntRun)); - std::unique_ptr<Mount> mntVarTmp{new Mount{"/var/tmp"}}; - mntVarTmp->setType("tmpfs"); - mntVarTmp->setSource("tmpfs"); - dirsToMount.push_back(std::move(mntVarTmp)); - // Mount platform specific GRUB directories for GRUB updates for (auto& path: fs::directory_iterator("/boot/grub2")) { if (fs::is_directory(path)) { @@ -184,6 +169,14 @@ supplements.addFile(fs::path{"/run/netconfig"}); supplements.addFile(fs::path{"/run/systemd/resolve/resolv.conf"}); supplements.addFile(fs::path{"/run/systemd/resolve/stub-resolv.conf"}); + if (fs::is_directory("/var/cache/dnf")) + supplements.addDir(fs::path{"/var/cache/dnf"}); + if (fs::is_directory("/var/cache/yum")) + supplements.addDir(fs::path{"/var/cache/yum"}); + if (fs::is_directory("/var/cache/PackageKit")) + supplements.addDir(fs::path{"/var/cache/PackageKit"}); + if (fs::is_directory("/var/cache/zypp")) + supplements.addDir(fs::path{"/var/cache/zypp"}); supplements.addDir(fs::path{"/var/spool"}); } @@ -191,16 +184,10 @@ int Transaction::impl::inotifyAdd(const char *pathname, const struct stat *sbuf, int type, struct FTW *ftwb) { if (!(type == FTW_D)) return 0; - std::vector<std::filesystem::path>::iterator it; - for (it = inotifyExcludes.begin(); it != inotifyExcludes.end(); it++) { - if (std::string(pathname).find(*it) == 0) - return 0; - } - int num; - if ((num = inotify_add_watch(inotifyFd, pathname, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE | IN_ATTRIB | IN_ONESHOT | IN_ONLYDIR | IN_DONT_FOLLOW)) == -1) + if (inotify_add_watch(inotifyFd, pathname, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE | IN_ATTRIB | IN_ONESHOT | IN_ONLYDIR | IN_DONT_FOLLOW) == -1) tulog.info("WARNING: Cannot register inotify watch for ", pathname); else - tulog.debug("Watching ", pathname, " with descriptor number ", num); + tulog.debug("Watching ", pathname); return 0; } @@ -276,7 +263,7 @@ throw std::runtime_error{"Read() from inotify fd returned 0!"}; if (numRead == -1) throw std::runtime_error{"Reading from inotify fd failed: " + std::string(strerror(errno))}; - tulog.debug("inotify: Exiting after event on descriptor number ", ((struct inotify_event *)buf)->wd, " in ", ((struct inotify_event *)buf)->name); + tulog.debug("inotify: Exiting after event on ", ((struct inotify_event *)buf)->name); } return ret; } @@ -288,7 +275,6 @@ throw std::runtime_error{"Couldn't initialize inotify."}; // Recursively register all directories of the root file system - inotifyExcludes = MountList::getList(snapshot->getRoot()); nftw(snapshot->getRoot().c_str(), inotifyAdd, 20, FTW_MOUNT | FTW_PHYS); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-3.5.7/sbin/transactional-update.in new/transactional-update-3.5.6/sbin/transactional-update.in --- old/transactional-update-3.5.7/sbin/transactional-update.in 2021-10-12 10:31:34.000000000 +0200 +++ new/transactional-update-3.5.6/sbin/transactional-update.in 2021-09-24 01:10:02.000000000 +0200 @@ -95,7 +95,7 @@ exec 4>&2 fi # Log stderr to log file -exec 2> >(exec tee -a "${LOGFILE}" >&2) +exec 2> >(exec tee -a "${LOGFILE}") self_update() { if [ ${DO_SELF_UPDATE} == 0 ]; then @@ -1479,13 +1479,6 @@ tukit ${TUKIT_OPTS} close "${SNAPSHOT_ID}" fi - # If --drop-if-no-change is used, then the snapshot may not exist any more; - # the remaining code is not applicable in this case. - if [ ! -e "${SNAPSHOT_DIR}/etc/fstab" -a ${EXITCODE} -eq 0 ]; then - SNAPSHOT_ID= - quit 0 - fi - # Check for installation artefacts: Packages may have created files in # directories outside of the root file system; these files will not be # visible in the actual system as they are shadowed by the real mount