qSnapper 1.2.3
Updated to version 1.2.3
The "System Rollback" button in the snapshot detail dialog previously called Snapshot::setDefault() directly on the selected snapshot,
which is only correct for transactional-update systems (read-only root).
On a standard openSUSE system with a writable root subvolume, this caused the read-only target snapshot itself to become the default subvolume,
leaving the system unable to boot into a writable state.
Reimplement SnapshotOperations::RollbackSnapshot() to mirror the logic of snapper rollback N
(client/snapper/cmd-rollback.cc):
-
Detect the ambit by inspecting whether the previous default snapshot is read-only.
-
CLASSIC ambit (writable previous default):
- Create a read-only backup snapshot of the current state
with description "rollback backup of #",
cleanup="number", userdata["important"]="yes". - Create a writable copy of the target snapshot with
description "writable copy of #". - If the previous default had an empty cleanup algorithm,
set it to "number" via modifySnapshot(). - Call setDefault() on the newly created writable copy.
- Create a read-only backup snapshot of the current state
-
TRANSACTIONAL ambit (read-only previous default):
Call setDefault() on the target snapshot directly, matching
the previous behavior for this case.
Both libsnapper >= 7.4 (with Plugins::Report) and older versions are supported via the existing LIBSNAPPER_VERSION_AT_LEAST macro,
and logPluginReport() is invoked after each plugin-aware call.
The GUI side (SnapshotListModel, SnapperService, QML) and the D-Bus interface signature (RollbackSnapshot(int)) are unchanged,
so no client-side changes or polkit action updates are required.
SELinux policy updates (selinux/qsnapper.te):
-
Allow qsnapper_dbus_t to execute snapper_grub_plugin_exec_t, required by libsnapper to invoke /usr/lib/snapper/plugins/grub
during setDefault()/rollback for bootloader entry updates. -
Allow qsnapper_t to read passwd_file_t and access systemd_userdbd_runtime_t for user name resolution during GUI
startup (pre-existing denials surfaced during rollback testing).
Full Changelog: v1.2.2...v1.2.3