From 322413b786b0290b3bcddff8360b0976adc00242 Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Tue, 23 Jun 2026 15:25:08 +0200 Subject: [PATCH 01/19] reworked package for managing snapper on siduction --- .gitignore | 1 + 50-siduction.sh | 9 +++-- 60-siduction-btrfs.preset | 2 + 91-siduction-entry-key.install | 2 +- btrfs | 2 + configs/home | 61 +++++++++++++++++++++++++++++ configs/root | 61 +++++++++++++++++++++++++++++ debian/changelog | 24 ++++-------- debian/control | 10 +++-- debian/copyright | 2 +- debian/files | 1 - debian/install | 24 +++++++----- debian/postinst | 37 +++++++++++++++++- debian/postrm | 26 +++++++++++++ debian/preinst | 71 +--------------------------------- debian/prerm | 13 ------- debian/rules | 3 ++ grub-menu-title.sh | 10 ++--- rollback-grub.sh | 10 ++--- rollback-sd-boot.sh | 6 +-- siduction_btrfs.path | 9 ++--- siduction_btrfs.service | 11 +++--- snapshot-description.sh | 24 ++++++------ 23 files changed, 262 insertions(+), 157 deletions(-) create mode 100644 .gitignore create mode 100644 60-siduction-btrfs.preset create mode 100644 btrfs create mode 100644 configs/home create mode 100644 configs/root delete mode 100644 debian/files create mode 100755 debian/postrm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bbe760d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +debian/files diff --git a/50-siduction.sh b/50-siduction.sh index 3e68efb..343ef00 100755 --- a/50-siduction.sh +++ b/50-siduction.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash # # Name: /usr/lib/snapper/plugins/50-siduction.sh # Part of siduction-btrfs @@ -38,7 +38,7 @@ case "$1" in "create-snapshot-post") echo "$(date +%T) Plugin 50-siduction: Inside create-snapshot-post" >> /var/log/snapper.log # If full apt-aktion is done, this script change snappers description. - /usr/share/siduction/snapshot-description.sh "$4" & + /usr/share/siduction-btrfs/snapshot-description.sh "$4" & ;; # This section is for systemd-boot only. @@ -84,7 +84,7 @@ case "$1" in if [ -e /boot/grub/grub.cfg ] && [ -w /boot/grub/grub.cfg ]; then echo "$(date +%T) Plugin 50-siduction: Forwarding to rollback-grub." >> /var/log/snapper.log - /usr/share/siduction/rollback-grub.sh "$new_sn" & + /usr/share/siduction-btrfs/rollback-grub.sh "$new_sn" & wait echo "$(date +%T) Plugin 50-siduction: Return from rollback-grub." >> /var/log/snapper.log true @@ -97,7 +97,7 @@ case "$1" in # Create a menu entry for the rollback target. echo "$(date +%T) Plugin 50-siduction: Forwarding to rollback-sd-boot." >> /var/log/snapper.log - /usr/share/siduction/rollback-sd-boot.sh "$new_sn" "$sd_boot_dir" "$entry_part" & + /usr/share/siduction-btrfs/rollback-sd-boot.sh "$new_sn" "$sd_boot_dir" "$entry_part" & wait echo "$(date +%T) Plugin 50-siduction: Return from rollback-sd-boot." >> /var/log/snapper.log @@ -134,4 +134,5 @@ case "$1" in fi ;; esac +update-grub exit 0 diff --git a/60-siduction-btrfs.preset b/60-siduction-btrfs.preset new file mode 100644 index 0000000..e38885e --- /dev/null +++ b/60-siduction-btrfs.preset @@ -0,0 +1,2 @@ +disable snapper-boot.timer +disable snapper-timeline.timer \ No newline at end of file diff --git a/91-siduction-entry-key.install b/91-siduction-entry-key.install index 62f42ff..4f0784b 100755 --- a/91-siduction-entry-key.install +++ b/91-siduction-entry-key.install @@ -8,7 +8,7 @@ set -e # Only run if / is btrfs -if [ ! -e /usr/share/siduction/btrfs ]; then +if [ ! -e /usr/share/siduction-btrfs/btrfs ]; then exit 0 fi diff --git a/btrfs b/btrfs new file mode 100644 index 0000000..e67124c --- /dev/null +++ b/btrfs @@ -0,0 +1,2 @@ +DO NOT REMOVE THIS FILE! +It is required by the siduction_btrfs systemd units. diff --git a/configs/home b/configs/home new file mode 100644 index 0000000..6d5d0d9 --- /dev/null +++ b/configs/home @@ -0,0 +1,61 @@ +# subvolume to snapshot +SUBVOLUME="/home" + +# filesystem type +FSTYPE="btrfs" + + +# btrfs qgroup for space aware cleanup algorithms +QGROUP="" + + +# fraction or absolute size of the filesystems space the snapshots may use +SPACE_LIMIT="0.5" + +# fraction or absolute size of the filesystems space that should be free +FREE_LIMIT="0.2" + + +# users and groups allowed to work with config +ALLOW_USERS="" +ALLOW_GROUPS="" + +# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots +# directory +SYNC_ACL="yes" + + +# start comparing pre- and post-snapshot in background after creating +# post-snapshot +BACKGROUND_COMPARISON="yes" + + +# run daily number cleanup +NUMBER_CLEANUP="yes" + +# limit for number cleanup +NUMBER_MIN_AGE="1800" +NUMBER_LIMIT="50" +NUMBER_LIMIT_IMPORTANT="10" + + +# create hourly snapshots +TIMELINE_CREATE="no" + +# cleanup hourly snapshots after some time +TIMELINE_CLEANUP="yes" + +# limits for timeline cleanup +TIMELINE_MIN_AGE="1800" +TIMELINE_LIMIT_HOURLY="10" +TIMELINE_LIMIT_DAILY="10" +TIMELINE_LIMIT_WEEKLY="0" +TIMELINE_LIMIT_MONTHLY="10" +TIMELINE_LIMIT_YEARLY="10" + + +# cleanup empty pre-post-pairs +EMPTY_PRE_POST_CLEANUP="yes" + +# limits for empty pre-post-pair cleanup +EMPTY_PRE_POST_MIN_AGE="1800" diff --git a/configs/root b/configs/root new file mode 100644 index 0000000..5cfc14a --- /dev/null +++ b/configs/root @@ -0,0 +1,61 @@ +# subvolume to snapshot +SUBVOLUME="/" + +# filesystem type +FSTYPE="btrfs" + + +# btrfs qgroup for space aware cleanup algorithms +QGROUP="" + + +# fraction or absolute size of the filesystems space the snapshots may use +SPACE_LIMIT="0.5" + +# fraction or absolute size of the filesystems space that should be free +FREE_LIMIT="0.2" + + +# users and groups allowed to work with config +ALLOW_USERS="" +ALLOW_GROUPS="" + +# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots +# directory +SYNC_ACL="yes" + + +# start comparing pre- and post-snapshot in background after creating +# post-snapshot +BACKGROUND_COMPARISON="yes" + + +# run daily number cleanup +NUMBER_CLEANUP="yes" + +# limit for number cleanup +NUMBER_MIN_AGE="1800" +NUMBER_LIMIT="50" +NUMBER_LIMIT_IMPORTANT="10" + + +# create hourly snapshots +TIMELINE_CREATE="no" + +# cleanup hourly snapshots after some time +TIMELINE_CLEANUP="yes" + +# limits for timeline cleanup +TIMELINE_MIN_AGE="1800" +TIMELINE_LIMIT_HOURLY="10" +TIMELINE_LIMIT_DAILY="10" +TIMELINE_LIMIT_WEEKLY="0" +TIMELINE_LIMIT_MONTHLY="10" +TIMELINE_LIMIT_YEARLY="10" + + +# cleanup empty pre-post-pairs +EMPTY_PRE_POST_CLEANUP="yes" + +# limits for empty pre-post-pair cleanup +EMPTY_PRE_POST_MIN_AGE="1800" diff --git a/debian/changelog b/debian/changelog index 883b707..1874aae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,27 +1,17 @@ -siduction-btrfs (0.4.0-3) unstable; urgency=medium +siduction-btrfs (0.4.1-1-tux1) unstable; urgency=medium - [Axel Konrad] - * snapshot-description - - Update the description even if additional snapshots are created - between the pre and post snapshots. - * copyright updated - - -- Axel Konrad Wed, 08 Apr 2026 12:14:39 +0200 - -siduction-btrfs (0.4.0-2) unstable; urgency=medium + * add preconfigs for root and home + * fix paths /usr/share/siduction/ => /usr/share/siduction-btrfs/ + * use debhelper for systemd-units - [Axel Konrad] - * snapshot-description - - Fix space in kernel-rm. + -- Torsten Wohlfarth Mon, 22 Jun 2026 10:20:01 +0200 - -- Axel Konrad Fri, 30 Jan 2026 11:03:44 +0100 - siduction-btrfs (0.4.0-1) unstable; urgency=medium [Axel Konrad] * Using the new APT commands 'history-list' and 'history-info' - - -- Axel Konrad Thu, 16 Oct 2025 19:26:31 +0200 + + -- Torsten Wohlfarth Fri, 17 Oct 2025 13:26:23 +0200 siduction-btrfs (0.3.0-8) unstable; urgency=medium diff --git a/debian/control b/debian/control index c2ebd58..1aff926 100644 --- a/debian/control +++ b/debian/control @@ -1,20 +1,24 @@ Source: siduction-btrfs Section: utils Priority: optional -Maintainer: Axel Konrad +XSBC-Original-Maintainer: Axel Konrad +Maintainer: TUXEDO Computers Build-Depends: debhelper-compat (= 13) Standards-Version: 4.6.2 Homepage: https://github.com/siduction/siduction-btrfs Rules-Requires-Root: no -#Vcs-Git: https://salsa.debian.org/debian/siduction-btrfs.git -#Vcs-Browser: https://salsa.debian.org/debian/siduction-btrfs +Vcs-Git: https://gitlab.com/siductioncomputers/development/packages/siduction-btrfs +Vcs-Browser: https://gitlab.com/siductioncomputers/development/packages/siduction-btrfs Package: siduction-btrfs Architecture: all Depends: btrfs-progs, snapper, + ucf, ${misc:Depends}, ${shlibs:Depends} +Recommends: grub-btrfs, + btrfs-assistant Description: Optimizes the boot menu and the description in Snapper After a rollback with Snapper, siduction-btrfs sets the default boot entry to the rollback target. diff --git a/debian/copyright b/debian/copyright index a1e19c1..ac62ac5 100644 --- a/debian/copyright +++ b/debian/copyright @@ -15,7 +15,7 @@ Files: debian/* siduction_btrfs.timer snapshot-description.sh -Copyright: 2006-2026 Free Software Foundation, Inc. +Copyright: 2006-2025 Free Software Foundation, Inc. License: GPL-3.0+ . On Debian systems, the complete text of the GNU General Public License diff --git a/debian/files b/debian/files deleted file mode 100644 index fbb3a06..0000000 --- a/debian/files +++ /dev/null @@ -1 +0,0 @@ -siduction-btrfs_0.3.0-8_source.buildinfo utils optional diff --git a/debian/install b/debian/install index 4008f7c..1828bc6 100644 --- a/debian/install +++ b/debian/install @@ -1,9 +1,15 @@ -50-siduction.sh /usr/lib/snapper/plugins/ -91-siduction-entry-key.install /usr/lib/kernel/install.d/ -rollback-grub.sh /usr/share/siduction/ -rollback-sd-boot.sh /usr/share/siduction/ -snapshot-description.sh /usr/share/siduction/ -grub-menu-title.sh /usr/share/siduction/ -siduction_btrfs.service /usr/lib/systemd/system/ -siduction_btrfs.path /usr/lib/systemd/system/ -rolling /usr/share/snapper/config-templates/ +50-siduction.sh /usr/lib/snapper/plugins/ +91-siduction-entry-key.install /usr/lib/kernel/install.d/ +btrfs /usr/share/siduction-btrfs/ +rollback-grub.sh /usr/share/siduction-btrfs/ +rollback-sd-boot.sh /usr/share/siduction-btrfs/ +snapshot-description.sh /usr/share/siduction-btrfs/ +grub-menu-title.sh /usr/share/siduction-btrfs/ +siduction_btrfs.service /usr/lib/systemd/system/ +siduction_btrfs.path /usr/lib/systemd/system/ +rolling /usr/share/snapper/config-templates/ +configs /usr/share/siduction-btrfs/ +60-siduction-btrfs.preset /usr/lib/systemd/system-preset/ +Info.md /usr/share/docs/siduction-btrfs/ +LICENSE /usr/share/docs/siduction-btrfs/ +README.md /usr/share/docs/siduction-btrfs/ diff --git a/debian/postinst b/debian/postinst index a22d0a6..2b5e84c 100755 --- a/debian/postinst +++ b/debian/postinst @@ -5,9 +5,42 @@ set -e -exec $(systemctl daemon-reload) +case "$1" in + configure) + if ! snapper list-configs | grep -q "^root " 2>/dev/null; then + echo "Create snapper-configuration for root..." + snapper --no-dbus create-config -f btrfs / || true + rm -f /etc/snapper/configs/root + fi + if ! snapper list-configs | grep -q "^home " 2>/dev/null; then + echo "Create snapper-configuration for home..." + if [ -d /home ]; then + snapper --no-dbus -c home create-config -f btrfs /home || true + rm -f /etc/snapper/configs/home + fi + fi + # registe existing snapper configs with UCF + if [ -x "/usr/bin/ucf" ]; then + echo "check for existing snapper-configurations..." + ucf --three-way /usr/share/siduction-btrfs/configs/root /etc/snapper/configs/root + ucf --three-way /usr/share/siduction-btrfs/configs/home /etc/snapper/configs/home + + ucfr siduction-btrfs /etc/snapper/configs/root + ucfr siduction-btrfs /etc/snapper/configs/home + else + # Fallback force copy default configs + cp -an /usr/share/siduction-btrfs/configs/root /etc/snapper/configs/root + cp -an /usr/share/siduction-btrfs/configs/home /etc/snapper/configs/home + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; -exec $(systemctl enable --now siduction_btrfs.path) + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac #DEBHELPER# diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..5981d44 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +case "$1" in + purge) + # purgeing ucf registered files + if [ -x "/usr/bin/ucf" ]; then + ucf --purge /etc/snapper/configs/root + ucf --purge /etc/snapper/configs/home + ucfr --purge siduction-btrfs /etc/snapper/configs/root + ucfr --purge siduction-btrfs /etc/snapper/configs/home + fi + + # force delete snapper configs + rm -f /etc/snapper/configs/root + rm -f /etc/snapper/configs/home + + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true + fi + ;; +esac + +#DEBHELPER# + +exit 0 \ No newline at end of file diff --git a/debian/preinst b/debian/preinst index 006d10b..1bb3473 100755 --- a/debian/preinst +++ b/debian/preinst @@ -5,53 +5,6 @@ set -e -. /etc/default/distro - - -################################### -### Begin remove obsolet files. ### -# From version 0.3.0, some previously used files must be removed. -# This section will be removed in Q4 2026 at the latest. - -if [ -e /etc/systemd/system/siduction_btrfs.path ]; then - rm /etc/systemd/system/siduction_btrfs.path -fi - -if [ -e /etc/systemd/system/siduction_btrfs.timer ]; then - rm /etc/systemd/system/siduction_btrfs.timer -fi - -if [ -e /etc/systemd/system/multi-user.target.wants/siduction_btrfs.timer ]; then - rm /etc/systemd/system/multi-user.target.wants/siduction_btrfs.timer -fi - -if [ -e /usr/lib/systemd/system/siduction_btrfs.timer ]; then - rm /usr/lib/systemd/system/siduction_btrfs.timer -fi - -if [ -e /usr/share/siduction/test-btrfs-default.sh ]; then - rm /usr/share/siduction/test-btrfs-default.sh -fi - -if [ -e /etc/grub.d/09_siduction-btrfs ]; then - rm /etc/grub.d/09_siduction-btrfs -fi - -if [ -e /etc/grub.d/10_linux ]; then - chmod 755 /etc/grub.d/10_linux -fi - -#### End remove obsolet files. #### -################################### - - -# For the new systemd units we need a file with the name -# of the file system type of the root directory. -fstypename="/usr/share/siduction/$(findmnt -n -o FSTYPE /)" -touch "$fstypename" -echo "DO NOT REMOVE THIS FILE!" >> "$fstypename" -echo "It is required by the siduction_btrfs systemd units." >> "$fstypename" - # Now we use the snapper plugin dir. if [ ! -d /usr/lib/snapper/plugins/ ]; then mkdir /usr/lib/snapper/plugins @@ -88,29 +41,7 @@ fi # The default installation uses GRUB. # The files 'os-release' and 'entry-token' are used by systemd-boot. # We create them to be compatible with systemd. -echo "$FLL_DISTRO_NAME-$FLL_FLAVOUR$token_ext" > /etc/kernel/entry-token - -# Remove symlink. -if [ -h /etc/os-release ]; then - rm /etc/os-release -fi - -name_firstup=$(echo $FLL_DISTRO_CODENAME_SAFE | sed -e 's/\(.\)/\u\1/') -flav_upper=$(echo $FLL_FLAVOUR | tr '[:lower:]' '[:upper:]') - -cat << EOF > /etc/os-release -PRETTY_NAME="$FLL_DISTRO_NAME $name_firstup $flav_upper$name_ext" -NAME="$FLL_DISTRO_NAME" -VERSION_CODENAME=$FLL_DISTRO_CODENAME_SAFE -VERSION="$name_firstup" -VARIANT="$flav_upper" -VARIANT_ID=$FLL_FLAVOUR -ID=$FLL_DISTRO_NAME -ID_LIKE=debian -HOME_URL="https://siduction.org" -SUPPORT_URL="https://forum.siduction.org" -EOF - +echo "TUXEDO OS" > /etc/kernel/entry-token #DEBHELPER# diff --git a/debian/prerm b/debian/prerm index b2c3516..679a571 100755 --- a/debian/prerm +++ b/debian/prerm @@ -5,19 +5,6 @@ set -e -# Remove the systemd condition file. -fstypename="/usr/share/siduction/$(findmnt -n -o FSTYPE /)" -if [ -e "$fstypename" ]; then - rm "$fstypename" -fi - -# Cleanup systemd unit. -if [ -e /etc/systemd/system/siduction_btrfs.path ]; then - rm /etc/systemd/system/siduction_btrfs.path -fi - -exec $(systemctl disable --now siduction_btrfs.path) - #DEBHELPER# exit 0 diff --git a/debian/rules b/debian/rules index 2d33f6a..0d72f34 100755 --- a/debian/rules +++ b/debian/rules @@ -2,3 +2,6 @@ %: dh $@ + +override_dh_installsystemd: + dh_installsystemd --name=siduction_btrfs --no-stop-on-upgrade diff --git a/grub-menu-title.sh b/grub-menu-title.sh index 2102a22..ba70f65 100755 --- a/grub-menu-title.sh +++ b/grub-menu-title.sh @@ -1,14 +1,14 @@ #!/bin/bash # -# Name: /usr/share/siduction/grub-menu-title.sh -# Part of siduction-btrfs -# Called by /usr/lib/systemd/system/siduction_grubmenutitle.service -# or /usr/lib/snapper/plugins/50-siduction.sh +# Name: /usr/share/tuxedo-btrfs/grub-menu-title.sh +# Part of tuxedo-btrfs +# Called by /usr/lib/systemd/system/tuxedo_grubmenutitle.service +# or /usr/lib/snapper/plugins/50-tuxedo.sh # Modifies the title of the default boot entry of grub.cfg. set -e -. /etc/default/grub.d/siduction.cfg +. /etc/default/grub.d/tuxedo.cfg . /etc/os-release # Determine the booted subvolume. diff --git a/rollback-grub.sh b/rollback-grub.sh index c2e4209..c74a8f0 100755 --- a/rollback-grub.sh +++ b/rollback-grub.sh @@ -1,8 +1,8 @@ #!/bin/bash # -# Name: /usr/share/siduction/rollback-grub.sh -# Part of siduction-btrfs -# Called by /usr/lib/snapper/plugins/50-siduction.sh +# Name: /usr/share/tuxedo-btrfs/rollback-grub.sh +# Part of tuxedo-btrfs +# Called by /usr/lib/snapper/plugins/50-tuxedo.sh # # Switch to the rollback target and run the commands # 'update-grub' and 'grub-install'. @@ -11,7 +11,7 @@ set -e -. /etc/default/grub.d/siduction.cfg +. /etc/default/grub.d/tuxedo.cfg # After rollback, subvolume that is set to default in Btrfs. default_nr="$1" @@ -67,7 +67,7 @@ chroot ${tmp_dir} /usr/bin/bash -x << 'EOF' mount /boot &>/dev/null || true mount /boot/efi &>/dev/null || true -. /etc/default/grub.d/siduction.cfg +. /etc/default/grub.d/tuxedo.cfg . /etc/os-release /usr/sbin/update-grub diff --git a/rollback-sd-boot.sh b/rollback-sd-boot.sh index 9efe345..e4adcd6 100755 --- a/rollback-sd-boot.sh +++ b/rollback-sd-boot.sh @@ -1,8 +1,8 @@ #!/bin/bash # -# Name: /usr/share/siduction/rollback-sd-boot.sh -# Part of siduction-btrfs -# Called by /usr/lib/snapper/plugins/50-siduction.sh +# Name: /usr/share/tuxedo-btrfs/rollback-sd-boot.sh +# Part of tuxedo-btrfs +# Called by /usr/lib/snapper/plugins/50-tuxedo.sh # Creates new boot entries after a "snapper rollback" command. # It takes into account all kernels contained in the new snapshot. diff --git a/siduction_btrfs.path b/siduction_btrfs.path index a28048e..836d944 100644 --- a/siduction_btrfs.path +++ b/siduction_btrfs.path @@ -1,11 +1,10 @@ -# /usr/lib/systemd/system/siduction_btrfs.path +# /usr/lib/systemd/system/tuxedo_btrfs.path [Unit] -Description=Part of siduction-btrfs +Description=Part of tuxedo-btrfs Description=Monitors changes of grub.cfg -Documentation=https://github.com/siduction/siduction-btrfs -After=siduction_btrfs.service +Documentation=https://github.com/tuxedo/tuxedo-btrfs ConditionPathExists=/boot/grub/grub.cfg -ConditionPathExists=/usr/share/siduction/btrfs +ConditionPathExists=/usr/share/tuxedo-btrfs/btrfs [Path] PathChanged=/boot/grub/grub.cfg diff --git a/siduction_btrfs.service b/siduction_btrfs.service index 8559645..11a01a3 100644 --- a/siduction_btrfs.service +++ b/siduction_btrfs.service @@ -1,12 +1,11 @@ -# /usr/lib/systemd/system/siduction_btrfs.service +# /usr/lib/systemd/system/tuxedo_btrfs.service [Unit] -Description=Part of siduction-btrfs +Description=TUXEDO BTRFS Service Description=Update GRUB menu title. -Documentation=https://github.com/siduction/siduction-btrfs -Before=siduction_btrfs.path +Documentation=https://github.com/tuxedo/tuxedo-btrfs ConditionPathExists=/boot/grub/grub.cfg -ConditionPathExists=/usr/share/siduction/btrfs +ConditionPathExists=/usr/share/tuxedo-btrfs/btrfs [Service] Type=oneshot -ExecStart=/usr/share/siduction/grub-menu-title.sh +ExecStart=/usr/share/tuxedo-btrfs/grub-menu-title.sh diff --git a/snapshot-description.sh b/snapshot-description.sh index 9dbe911..e191b01 100755 --- a/snapshot-description.sh +++ b/snapshot-description.sh @@ -1,8 +1,8 @@ #!/usr/bin/bash # -# Name: /usr/share/siduction/snapshot-description.sh -# Part of siduction-btrfs -# Called by /usr/lib/snapper/plugins/50-siduction.sh +# Name: /usr/share/tuxedo-btrfs/snapshot-description.sh +# Part of tuxedo-btrfs +# Called by /usr/lib/snapper/plugins/50-tuxedo.sh # # Since apt 3.1.6 command history-list and history-info # @@ -54,15 +54,15 @@ fi # The new snapshot maybe based on an apt action. # We search for post snapshots with apt action in snapper # and the corresponding action in the apt log file. -if snapper_list=$(snapper --csvout list -t pre-post \ - --columns number,post-number,type,description,date,post-date | \ - tail -n1 | grep "^[0-9]\+,$post_num,pre,apt,"); then - # Example: 70,73,pre,apt,2026-04-07 20:31:50,2026-04-07 20:36:20 - +if snapper_last_post=$(snapper --no-headers --machine-readable csv list \ + | tail -n 1 | grep ",$post_num,.*,post,.*,apt,"); then + snapper_last_pre=$(snapper --no-headers --machine-readable csv list \ + | tail -n 2 | grep ",pre,.*,apt,") + # The required variables are filled with the values from snapper. - pre_num=$(echo "$snapper_list" | cut -d "," -f 1) - pre_date=$(echo "$snapper_list" | cut -d "," -f 5 | sed 's![: -]!!g') - post_date=$(echo "$snapper_list" | cut -d "," -f 6 | sed 's![: -]!!g') + post_date=$(echo "$snapper_last_post" | cut -d "," -f 8 | sed 's![: -]!!g') + pre_date=$(echo "$snapper_last_pre" | cut -d "," -f 8 | sed 's![: -]!!g') + pre_num=$(( "$post_num" - 1 )) else # This is not an apt post snapshot. echo "$(date +%T) snapshot-description: No complete apt action." >> /var/log/snapper.log @@ -119,7 +119,7 @@ apt_package="" case "$value" in "apt-get remove --purge --yes linux-") - apt_command="kernel-rm " + apt_command="kernel-rm" apt_package=$( grep -o "image[[:print:]]\+[a-z]" <<< "$apt_full_command" \ | grep -o "[.0-9]\+-[0-9]") ;; From 0f4a194d659b6f411f568a2542e9055a77c74d0d Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Tue, 23 Jun 2026 15:26:22 +0200 Subject: [PATCH 02/19] reworked package for managing snapper on siduction --- debian/control | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 1aff926..c7e60b4 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,13 @@ Source: siduction-btrfs Section: utils Priority: optional -XSBC-Original-Maintainer: Axel Konrad -Maintainer: TUXEDO Computers +Maintainer: Axel Konrad Build-Depends: debhelper-compat (= 13) Standards-Version: 4.6.2 Homepage: https://github.com/siduction/siduction-btrfs Rules-Requires-Root: no -Vcs-Git: https://gitlab.com/siductioncomputers/development/packages/siduction-btrfs -Vcs-Browser: https://gitlab.com/siductioncomputers/development/packages/siduction-btrfs +Vcs-Git: https://github.com/siduction/siduction-btrfs +Vcs-Browser: https://github.com/siduction/siduction-btrfs Package: siduction-btrfs Architecture: all From 688f8bb76e3a21f13279020426f568c32d8168bd Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Tue, 23 Jun 2026 15:49:51 +0200 Subject: [PATCH 03/19] set systemd-presets for snapper timers --- debian/postinst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/postinst b/debian/postinst index 2b5e84c..5f70b42 100755 --- a/debian/postinst +++ b/debian/postinst @@ -32,6 +32,12 @@ case "$1" in cp -an /usr/share/siduction-btrfs/configs/root /etc/snapper/configs/root cp -an /usr/share/siduction-btrfs/configs/home /etc/snapper/configs/home fi + if [ -d /run/systemd/system ]; then + echo "Set siduction systemd-presets for snapper ..." + systemctl --system daemon-reload || true + systemctl --system preset snapper-boot.timer || true + systemctl --system preset snapper-timeline.timer || true + fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; From aae402a12afcf9b39896c3ba41c4e1578f368103 Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Tue, 23 Jun 2026 18:31:15 +0200 Subject: [PATCH 04/19] fix set systemd-presets for snapper timers --- debian/postinst | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/debian/postinst b/debian/postinst index 5f70b42..72acb27 100755 --- a/debian/postinst +++ b/debian/postinst @@ -19,7 +19,7 @@ case "$1" in rm -f /etc/snapper/configs/home fi fi - # registe existing snapper configs with UCF + # register existing snapper configs with UCF if [ -x "/usr/bin/ucf" ]; then echo "check for existing snapper-configurations..." ucf --three-way /usr/share/siduction-btrfs/configs/root /etc/snapper/configs/root @@ -32,11 +32,23 @@ case "$1" in cp -an /usr/share/siduction-btrfs/configs/root /etc/snapper/configs/root cp -an /usr/share/siduction-btrfs/configs/home /etc/snapper/configs/home fi - if [ -d /run/systemd/system ]; then - echo "Set siduction systemd-presets for snapper ..." - systemctl --system daemon-reload || true - systemctl --system preset snapper-boot.timer || true - systemctl --system preset snapper-timeline.timer || true + # checking chroot + if systemd-detect-virt --chroot >/dev/null 2>&1; then + echo "Running in chroot. Force deactivating snapper-timera ..." + rm -f /etc/systemd/system/timers.target.wants/snapper-boot.timer + rm -f /etc/systemd/system/timers.target.wants/snapper-timeline.timer + + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper disable snapper-boot.timer >/dev/null 2>&1 || true + deb-systemd-helper disable snapper-timeline.timer >/dev/null 2>&1 || true + fi + else + if [ -d /run/systemd/system ]; then + echo "Set siduction systemd-presets for snapper ..." + systemctl --system daemon-reload || true + systemctl --system preset snapper-boot.timer || true + systemctl --system preset snapper-timeline.timer || true + fi fi ;; abort-upgrade|abort-remove|abort-deconfigure) From 806313954cbe6c9369627f06df5e9d0ed00d8592 Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Tue, 23 Jun 2026 21:11:39 +0200 Subject: [PATCH 05/19] fix tuxedo => siduction --- grub-menu-title.sh | 10 +++++----- rollback-grub.sh | 10 +++++----- rollback-sd-boot.sh | 6 +++--- siduction_btrfs.path | 8 ++++---- siduction_btrfs.service | 8 ++++---- snapshot-description.sh | 6 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/grub-menu-title.sh b/grub-menu-title.sh index ba70f65..a78fbf4 100755 --- a/grub-menu-title.sh +++ b/grub-menu-title.sh @@ -1,14 +1,14 @@ #!/bin/bash # -# Name: /usr/share/tuxedo-btrfs/grub-menu-title.sh -# Part of tuxedo-btrfs -# Called by /usr/lib/systemd/system/tuxedo_grubmenutitle.service -# or /usr/lib/snapper/plugins/50-tuxedo.sh +# Name: /usr/share/siduction-btrfs/grub-menu-title.sh +# Part of siduction-btrfs +# Called by /usr/lib/systemd/system/siduction_grubmenutitle.service +# or /usr/lib/snapper/plugins/50-siduction.sh # Modifies the title of the default boot entry of grub.cfg. set -e -. /etc/default/grub.d/tuxedo.cfg +. /etc/default/grub.d/siduction.cfg . /etc/os-release # Determine the booted subvolume. diff --git a/rollback-grub.sh b/rollback-grub.sh index c74a8f0..fa4ed59 100755 --- a/rollback-grub.sh +++ b/rollback-grub.sh @@ -1,8 +1,8 @@ #!/bin/bash # -# Name: /usr/share/tuxedo-btrfs/rollback-grub.sh -# Part of tuxedo-btrfs -# Called by /usr/lib/snapper/plugins/50-tuxedo.sh +# Name: /usr/share/siduction-btrfs/rollback-grub.sh +# Part of siduction-btrfs +# Called by /usr/lib/snapper/plugins/50-siduction.sh # # Switch to the rollback target and run the commands # 'update-grub' and 'grub-install'. @@ -11,7 +11,7 @@ set -e -. /etc/default/grub.d/tuxedo.cfg +. /etc/default/grub.d/siduction.cfg # After rollback, subvolume that is set to default in Btrfs. default_nr="$1" @@ -67,7 +67,7 @@ chroot ${tmp_dir} /usr/bin/bash -x << 'EOF' mount /boot &>/dev/null || true mount /boot/efi &>/dev/null || true -. /etc/default/grub.d/tuxedo.cfg +. /etc/default/grub.d/siduction.cfg . /etc/os-release /usr/sbin/update-grub diff --git a/rollback-sd-boot.sh b/rollback-sd-boot.sh index e4adcd6..949a43c 100755 --- a/rollback-sd-boot.sh +++ b/rollback-sd-boot.sh @@ -1,8 +1,8 @@ #!/bin/bash # -# Name: /usr/share/tuxedo-btrfs/rollback-sd-boot.sh -# Part of tuxedo-btrfs -# Called by /usr/lib/snapper/plugins/50-tuxedo.sh +# Name: /usr/share/siduction-btrfs/rollback-sd-boot.sh +# Part of siduction-btrfs +# Called by /usr/lib/snapper/plugins/50-siduction.sh # Creates new boot entries after a "snapper rollback" command. # It takes into account all kernels contained in the new snapshot. diff --git a/siduction_btrfs.path b/siduction_btrfs.path index 836d944..5abe221 100644 --- a/siduction_btrfs.path +++ b/siduction_btrfs.path @@ -1,10 +1,10 @@ -# /usr/lib/systemd/system/tuxedo_btrfs.path +# /usr/lib/systemd/system/siduction_btrfs.path [Unit] -Description=Part of tuxedo-btrfs +Description=Part of siduction-btrfs Description=Monitors changes of grub.cfg -Documentation=https://github.com/tuxedo/tuxedo-btrfs +Documentation=https://github.com/siduction/siduction-btrfs ConditionPathExists=/boot/grub/grub.cfg -ConditionPathExists=/usr/share/tuxedo-btrfs/btrfs +ConditionPathExists=/usr/share/siduction-btrfs/btrfs [Path] PathChanged=/boot/grub/grub.cfg diff --git a/siduction_btrfs.service b/siduction_btrfs.service index 11a01a3..1c179a1 100644 --- a/siduction_btrfs.service +++ b/siduction_btrfs.service @@ -1,11 +1,11 @@ -# /usr/lib/systemd/system/tuxedo_btrfs.service +# /usr/lib/systemd/system/siduction_btrfs.service [Unit] Description=TUXEDO BTRFS Service Description=Update GRUB menu title. -Documentation=https://github.com/tuxedo/tuxedo-btrfs +Documentation=https://github.com/siduction/siduction-btrfs ConditionPathExists=/boot/grub/grub.cfg -ConditionPathExists=/usr/share/tuxedo-btrfs/btrfs +ConditionPathExists=/usr/share/siduction-btrfs/btrfs [Service] Type=oneshot -ExecStart=/usr/share/tuxedo-btrfs/grub-menu-title.sh +ExecStart=/usr/share/siduction-btrfs/grub-menu-title.sh diff --git a/snapshot-description.sh b/snapshot-description.sh index e191b01..c89073b 100755 --- a/snapshot-description.sh +++ b/snapshot-description.sh @@ -1,8 +1,8 @@ #!/usr/bin/bash # -# Name: /usr/share/tuxedo-btrfs/snapshot-description.sh -# Part of tuxedo-btrfs -# Called by /usr/lib/snapper/plugins/50-tuxedo.sh +# Name: /usr/share/siduction-btrfs/snapshot-description.sh +# Part of siduction-btrfs +# Called by /usr/lib/snapper/plugins/50-siduction.sh # # Since apt 3.1.6 command history-list and history-info # From d2db7cd377ead7c508a741f626a46a6169a05fdd Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Wed, 24 Jun 2026 12:44:44 +0200 Subject: [PATCH 06/19] fix changelog, use snapshot-description from last commit --- debian/changelog | 24 +++++++++++++++++++++--- snapshot-description.sh | 20 ++++++++++---------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1874aae..d2a578a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -siduction-btrfs (0.4.1-1-tux1) unstable; urgency=medium +siduction-btrfs (0.4.1-1) unstable; urgency=medium * add preconfigs for root and home * fix paths /usr/share/siduction/ => /usr/share/siduction-btrfs/ @@ -6,12 +6,30 @@ siduction-btrfs (0.4.1-1-tux1) unstable; urgency=medium -- Torsten Wohlfarth Mon, 22 Jun 2026 10:20:01 +0200 +siduction-btrfs (0.4.0-3) unstable; urgency=medium + + [Axel Konrad] + * snapshot-description + - Update the description even if additional snapshots are created + between the pre and post snapshots. + * copyright updated + + -- Axel Konrad Wed, 08 Apr 2026 12:14:39 +0200 + +siduction-btrfs (0.4.0-2) unstable; urgency=medium + + [Axel Konrad] + * snapshot-description + - Fix space in kernel-rm. + + -- Axel Konrad Fri, 30 Jan 2026 11:03:44 +0100 + siduction-btrfs (0.4.0-1) unstable; urgency=medium [Axel Konrad] * Using the new APT commands 'history-list' and 'history-info' - - -- Torsten Wohlfarth Fri, 17 Oct 2025 13:26:23 +0200 + + -- Axel Konrad Thu, 16 Oct 2025 19:26:31 +0200 siduction-btrfs (0.3.0-8) unstable; urgency=medium diff --git a/snapshot-description.sh b/snapshot-description.sh index c89073b..9dbe911 100755 --- a/snapshot-description.sh +++ b/snapshot-description.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash # -# Name: /usr/share/siduction-btrfs/snapshot-description.sh +# Name: /usr/share/siduction/snapshot-description.sh # Part of siduction-btrfs # Called by /usr/lib/snapper/plugins/50-siduction.sh # @@ -54,15 +54,15 @@ fi # The new snapshot maybe based on an apt action. # We search for post snapshots with apt action in snapper # and the corresponding action in the apt log file. -if snapper_last_post=$(snapper --no-headers --machine-readable csv list \ - | tail -n 1 | grep ",$post_num,.*,post,.*,apt,"); then - snapper_last_pre=$(snapper --no-headers --machine-readable csv list \ - | tail -n 2 | grep ",pre,.*,apt,") - +if snapper_list=$(snapper --csvout list -t pre-post \ + --columns number,post-number,type,description,date,post-date | \ + tail -n1 | grep "^[0-9]\+,$post_num,pre,apt,"); then + # Example: 70,73,pre,apt,2026-04-07 20:31:50,2026-04-07 20:36:20 + # The required variables are filled with the values from snapper. - post_date=$(echo "$snapper_last_post" | cut -d "," -f 8 | sed 's![: -]!!g') - pre_date=$(echo "$snapper_last_pre" | cut -d "," -f 8 | sed 's![: -]!!g') - pre_num=$(( "$post_num" - 1 )) + pre_num=$(echo "$snapper_list" | cut -d "," -f 1) + pre_date=$(echo "$snapper_list" | cut -d "," -f 5 | sed 's![: -]!!g') + post_date=$(echo "$snapper_list" | cut -d "," -f 6 | sed 's![: -]!!g') else # This is not an apt post snapshot. echo "$(date +%T) snapshot-description: No complete apt action." >> /var/log/snapper.log @@ -119,7 +119,7 @@ apt_package="" case "$value" in "apt-get remove --purge --yes linux-") - apt_command="kernel-rm" + apt_command="kernel-rm " apt_package=$( grep -o "image[[:print:]]\+[a-z]" <<< "$apt_full_command" \ | grep -o "[.0-9]\+-[0-9]") ;; From f1db876616f1393573c3d8e5ebcd8cab9bc7baae Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Wed, 24 Jun 2026 12:45:48 +0200 Subject: [PATCH 07/19] Update install --- debian/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/debian/install b/debian/install index 1828bc6..1f428e4 100644 --- a/debian/install +++ b/debian/install @@ -1,15 +1,15 @@ -50-siduction.sh /usr/lib/snapper/plugins/ -91-siduction-entry-key.install /usr/lib/kernel/install.d/ -btrfs /usr/share/siduction-btrfs/ -rollback-grub.sh /usr/share/siduction-btrfs/ -rollback-sd-boot.sh /usr/share/siduction-btrfs/ +50-siduction.sh /usr/lib/snapper/plugins/ +91-siduction-entry-key.install /usr/lib/kernel/install.d/ +btrfs /usr/share/siduction-btrfs/ +rollback-grub.sh /usr/share/siduction-btrfs/ +rollback-sd-boot.sh /usr/share/siduction-btrfs/ snapshot-description.sh /usr/share/siduction-btrfs/ -grub-menu-title.sh /usr/share/siduction-btrfs/ +grub-menu-title.sh /usr/share/siduction-btrfs/ +configs /usr/share/siduction-btrfs/ +rolling /usr/share/snapper/config-templates/ siduction_btrfs.service /usr/lib/systemd/system/ siduction_btrfs.path /usr/lib/systemd/system/ -rolling /usr/share/snapper/config-templates/ -configs /usr/share/siduction-btrfs/ 60-siduction-btrfs.preset /usr/lib/systemd/system-preset/ -Info.md /usr/share/docs/siduction-btrfs/ -LICENSE /usr/share/docs/siduction-btrfs/ -README.md /usr/share/docs/siduction-btrfs/ +Info.md /usr/share/docs/siduction-btrfs/ +LICENSE /usr/share/docs/siduction-btrfs/ +README.md /usr/share/docs/siduction-btrfs/ From f810cff9aec8c6f477f488ce5665d3af385ae5d2 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:02:53 +0200 Subject: [PATCH 08/19] Update install --- debian/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/install b/debian/install index 1f428e4..d5c1550 100644 --- a/debian/install +++ b/debian/install @@ -5,7 +5,7 @@ rollback-grub.sh /usr/share/siduction-btrfs/ rollback-sd-boot.sh /usr/share/siduction-btrfs/ snapshot-description.sh /usr/share/siduction-btrfs/ grub-menu-title.sh /usr/share/siduction-btrfs/ -configs /usr/share/siduction-btrfs/ +configs/* /usr/share/snapper/config-templates/ rolling /usr/share/snapper/config-templates/ siduction_btrfs.service /usr/lib/systemd/system/ siduction_btrfs.path /usr/lib/systemd/system/ From cd33866effd0deb7c4649ab3ec82a1eca8ba5c78 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:24:58 +0200 Subject: [PATCH 09/19] Update root --- configs/root | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/root b/configs/root index 5cfc14a..c2faf23 100644 --- a/configs/root +++ b/configs/root @@ -35,8 +35,8 @@ NUMBER_CLEANUP="yes" # limit for number cleanup NUMBER_MIN_AGE="1800" -NUMBER_LIMIT="50" -NUMBER_LIMIT_IMPORTANT="10" +NUMBER_LIMIT="20" +NUMBER_LIMIT_IMPORTANT="5" # create hourly snapshots From f1dab63ff1f3fdd968b2c7f7f37b9017d76d75f1 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:40:48 +0200 Subject: [PATCH 10/19] Update snapshot-description.sh Zeile 3: Name mit dem neuen Verzeichnis. --- snapshot-description.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshot-description.sh b/snapshot-description.sh index 9dbe911..47650ed 100755 --- a/snapshot-description.sh +++ b/snapshot-description.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash # -# Name: /usr/share/siduction/snapshot-description.sh +# Name: /usr/share/siduction-btrfs/snapshot-description.sh # Part of siduction-btrfs # Called by /usr/lib/snapper/plugins/50-siduction.sh # From 595b80751832a6c844c9b8787229a5ec6eb5a2e8 Mon Sep 17 00:00:00 2001 From: Torsten Wohlfarth Date: Wed, 24 Jun 2026 14:58:44 +0200 Subject: [PATCH 11/19] restore debian/preinst to its original version --- debian/preinst | 71 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/debian/preinst b/debian/preinst index 1bb3473..006d10b 100755 --- a/debian/preinst +++ b/debian/preinst @@ -5,6 +5,53 @@ set -e +. /etc/default/distro + + +################################### +### Begin remove obsolet files. ### +# From version 0.3.0, some previously used files must be removed. +# This section will be removed in Q4 2026 at the latest. + +if [ -e /etc/systemd/system/siduction_btrfs.path ]; then + rm /etc/systemd/system/siduction_btrfs.path +fi + +if [ -e /etc/systemd/system/siduction_btrfs.timer ]; then + rm /etc/systemd/system/siduction_btrfs.timer +fi + +if [ -e /etc/systemd/system/multi-user.target.wants/siduction_btrfs.timer ]; then + rm /etc/systemd/system/multi-user.target.wants/siduction_btrfs.timer +fi + +if [ -e /usr/lib/systemd/system/siduction_btrfs.timer ]; then + rm /usr/lib/systemd/system/siduction_btrfs.timer +fi + +if [ -e /usr/share/siduction/test-btrfs-default.sh ]; then + rm /usr/share/siduction/test-btrfs-default.sh +fi + +if [ -e /etc/grub.d/09_siduction-btrfs ]; then + rm /etc/grub.d/09_siduction-btrfs +fi + +if [ -e /etc/grub.d/10_linux ]; then + chmod 755 /etc/grub.d/10_linux +fi + +#### End remove obsolet files. #### +################################### + + +# For the new systemd units we need a file with the name +# of the file system type of the root directory. +fstypename="/usr/share/siduction/$(findmnt -n -o FSTYPE /)" +touch "$fstypename" +echo "DO NOT REMOVE THIS FILE!" >> "$fstypename" +echo "It is required by the siduction_btrfs systemd units." >> "$fstypename" + # Now we use the snapper plugin dir. if [ ! -d /usr/lib/snapper/plugins/ ]; then mkdir /usr/lib/snapper/plugins @@ -41,7 +88,29 @@ fi # The default installation uses GRUB. # The files 'os-release' and 'entry-token' are used by systemd-boot. # We create them to be compatible with systemd. -echo "TUXEDO OS" > /etc/kernel/entry-token +echo "$FLL_DISTRO_NAME-$FLL_FLAVOUR$token_ext" > /etc/kernel/entry-token + +# Remove symlink. +if [ -h /etc/os-release ]; then + rm /etc/os-release +fi + +name_firstup=$(echo $FLL_DISTRO_CODENAME_SAFE | sed -e 's/\(.\)/\u\1/') +flav_upper=$(echo $FLL_FLAVOUR | tr '[:lower:]' '[:upper:]') + +cat << EOF > /etc/os-release +PRETTY_NAME="$FLL_DISTRO_NAME $name_firstup $flav_upper$name_ext" +NAME="$FLL_DISTRO_NAME" +VERSION_CODENAME=$FLL_DISTRO_CODENAME_SAFE +VERSION="$name_firstup" +VARIANT="$flav_upper" +VARIANT_ID=$FLL_FLAVOUR +ID=$FLL_DISTRO_NAME +ID_LIKE=debian +HOME_URL="https://siduction.org" +SUPPORT_URL="https://forum.siduction.org" +EOF + #DEBHELPER# From e72f6dae999589330cc42cb7a595ce0c4562534b Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:18:18 +0200 Subject: [PATCH 12/19] Update home Same as rolling --- configs/home | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/home b/configs/home index 6d5d0d9..ad30f52 100644 --- a/configs/home +++ b/configs/home @@ -35,23 +35,23 @@ NUMBER_CLEANUP="yes" # limit for number cleanup NUMBER_MIN_AGE="1800" -NUMBER_LIMIT="50" -NUMBER_LIMIT_IMPORTANT="10" +NUMBER_LIMIT="20" +NUMBER_LIMIT_IMPORTANT="5" # create hourly snapshots -TIMELINE_CREATE="no" +TIMELINE_CREATE="yes" # cleanup hourly snapshots after some time TIMELINE_CLEANUP="yes" # limits for timeline cleanup TIMELINE_MIN_AGE="1800" -TIMELINE_LIMIT_HOURLY="10" -TIMELINE_LIMIT_DAILY="10" -TIMELINE_LIMIT_WEEKLY="0" -TIMELINE_LIMIT_MONTHLY="10" -TIMELINE_LIMIT_YEARLY="10" +TIMELINE_LIMIT_HOURLY="11" +TIMELINE_LIMIT_DAILY="6" +TIMELINE_LIMIT_WEEKLY="1" +TIMELINE_LIMIT_MONTHLY="" +TIMELINE_LIMIT_YEARLY="" # cleanup empty pre-post-pairs From 891b1e4269add1f27fefe9f0ad22a63636504c3d Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:32:32 +0200 Subject: [PATCH 13/19] Update root meaningful settings --- configs/root | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/root b/configs/root index c2faf23..624c7e0 100644 --- a/configs/root +++ b/configs/root @@ -47,11 +47,11 @@ TIMELINE_CLEANUP="yes" # limits for timeline cleanup TIMELINE_MIN_AGE="1800" -TIMELINE_LIMIT_HOURLY="10" -TIMELINE_LIMIT_DAILY="10" -TIMELINE_LIMIT_WEEKLY="0" -TIMELINE_LIMIT_MONTHLY="10" -TIMELINE_LIMIT_YEARLY="10" +TIMELINE_LIMIT_HOURLY="" +TIMELINE_LIMIT_DAILY="6" +TIMELINE_LIMIT_WEEKLY="2" +TIMELINE_LIMIT_MONTHLY="1" +TIMELINE_LIMIT_YEARLY="" # cleanup empty pre-post-pairs From 8066ca3119c1cfe98b40f2b070ba89ef257143c8 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:04:34 +0200 Subject: [PATCH 14/19] Update metadata --- debian/upstream/metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/upstream/metadata b/debian/upstream/metadata index 10b0a70..619e223 100644 --- a/debian/upstream/metadata +++ b/debian/upstream/metadata @@ -6,7 +6,7 @@ Reference: Author: Axel Konrad Title: siduction-btrfs Journal: - Year: 2024 + Year: 2026 Volume: Number: Pages: From 31b1f816ea8b4d99926ace6efccb8da5c467d46a Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:13:31 +0200 Subject: [PATCH 15/19] Update README.Debian Changes in version 0.4. --- debian/README.Debian | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/README.Debian b/debian/README.Debian index e3289eb..dddd82e 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -4,8 +4,8 @@ Optimizes the boot menu and the description in Snapper After a rollback with Snapper, siduction-btrfs sets the default boot entry to the rollback target. When using Grub: -The default boot entry points to the new default subvolume. -After rebooting into the new default subvolume, grub is installed from there. +After a rollback, the file /boot/grub/grub.cfg is recreated in the rollback +target using chroot and then GRUB is reinstalled from the rollback target. When using systemd-boot: siduction-btrfs generates new menu entries. All kernels present in the rollback target are taken into account. After deleting subvolumes, @@ -19,4 +19,4 @@ based on Debian SID. The functionality of grub-btrfs remains unaffected. - -- Axel Konrad Sun, 26 Jul 2024 19:30:07 +0200 + -- Axel Konrad Thu, 25 Jun 2026 14:12:32 +0200 From a8f5c99198856376b49f223a37a2736164253105 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:17:13 +0200 Subject: [PATCH 16/19] Update copyright --- debian/copyright | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/copyright b/debian/copyright index ac62ac5..20b13be 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,19 +3,20 @@ Upstream-Name: siduction-btrfs Upstream-Contact: ak-li@siduction.org Source: https://github.com/siduction/siduction-btrfs -Files: debian/* +Files: configs/* + debian/* 50-siduction.sh + 60-siduction-btrfs.preset 91-siduction-entry-key.install grub-menu-title.sh rollback-grub.sh rollback-sd-boot.sh - rolling siduction_btrfs.path siduction_btrfs.service siduction_btrfs.timer snapshot-description.sh -Copyright: 2006-2025 Free Software Foundation, Inc. +Copyright: 2006-2026 Free Software Foundation, Inc. License: GPL-3.0+ . On Debian systems, the complete text of the GNU General Public License From f1fb4d1361ab3372374b306bc7041175617e83c3 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:18:06 +0200 Subject: [PATCH 17/19] Update install --- debian/install | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/install b/debian/install index d5c1550..5b919cd 100644 --- a/debian/install +++ b/debian/install @@ -6,7 +6,6 @@ rollback-sd-boot.sh /usr/share/siduction-btrfs/ snapshot-description.sh /usr/share/siduction-btrfs/ grub-menu-title.sh /usr/share/siduction-btrfs/ configs/* /usr/share/snapper/config-templates/ -rolling /usr/share/snapper/config-templates/ siduction_btrfs.service /usr/lib/systemd/system/ siduction_btrfs.path /usr/lib/systemd/system/ 60-siduction-btrfs.preset /usr/lib/systemd/system-preset/ From acf8f3dfad26a83edb482d9b83f989631492ebec Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:57:45 +0200 Subject: [PATCH 18/19] Update Info.md --- Info.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Info.md b/Info.md index 298f15c..b89af12 100644 --- a/Info.md +++ b/Info.md @@ -31,16 +31,17 @@ The ESP is mounted under */efi*, or in the absence of the XBOOTLDR under */boot* and the scripts */usr/lib/snapper/plugins/50-siduction.sh* */usr/share/siduction/rollback-grub.sh* -*/usr/share/siduction/grub-menu-title.sh +*/usr/share/siduction/grub-menu-title.sh* */usr/share/siduction/rollback-sd-boot.sh* */usr/share/siduction/snapshot-description.sh* +*/usr/lib/systemd/system-preset/60-siduction-btrfs.preset* */usr/lib/kernel/install.d/91-siduction-entry-key.install* ### How the package works As of version 0.3.0, siduction-btrfs uses the Snapper plugin directory. There the script *50-siduction* listens to the Snapper actions in the root subvolume and executes the scripts *snapshot-description*, *rollback-grub*, *grub-menu-title*, or *rollback-sd-boot* if required. -To manage snapshots, snapper-gui is quite useful. However, a rollback requires a terminal with root rights. +The graphical program *btrfs-assistant* is very useful for managing snapshots. However, a rollback requires a terminal with root rights. **When using the boot manager GRUB** After a rollback, the file */boot/grub/grub.cfg* is recreated in the rollback target using chroot and GRUB is then reinstalled from the rollback target. This allows the user to access the rollback target directly with a simple reboot. All other subvolumes, including the previously used one, can be accessed via the *siduction snapshots* submenu. @@ -88,16 +89,17 @@ Die ESP hängt man unter */efi*, oder bei Abwesenheit der XBOOTLDR unter */boot* und die Skripte */usr/lib/snapper/plugins/50-siduction.sh* */usr/share/siduction/rollback-grub.sh* -*/usr/share/siduction/grub-menu-title.sh +*/usr/share/siduction/grub-menu-title.sh* */usr/share/siduction/rollback-sd-boot.sh* */usr/share/siduction/snapshot-description.sh* +*/usr/lib/systemd/system-preset/60-siduction-btrfs.preset* */usr/lib/kernel/install.d/91-siduction-entry-key.install* ### Wie das Paket arbeitet Ab Version 0.3.0 verwendet siduction-btrfs das Snapper Plugin Verzeichnis. Dort lauscht das Skript *50-siduction* auf die Snapper Aktionen im root Subvolumen und führt bei Bedarf die Skripte *snapshot-description*, *rollback-grub*, *grub-menu-title* oder *rollback-sd-boot* aus. -Um Schnappschüsse zu verwalten, ist snapper-gui ganz nützlich. Ein Rollback jedoch erfordert ein Terminal mit root Rechten. +Zur Verwaltung von Snapshots ist das graphische Programm *btrfs-assistant* sehr nützlich. Ein Rollback jedoch erfordert ein Terminal mit root Rechten. **Bei Verwendung des Bootmanagers GRUB** Nach einem Rollback wird im Rollbackziel mittels chroot die Datei */boot/grub/grub.cfg* neu erstellt und anschließend aus dem Rollbackziel heraus GRUB neu installiert. Dadurch gelangt der User mit einem einfachen Reboot direkt in das Rollbackziel. Alle anderen Subvolumen, auch das zuvor verwendete, sind über das Untermenü *siduction snapshots* erreichbar. From a195e0f405192eaf420f0cd76088d4cb49de0fc2 Mon Sep 17 00:00:00 2001 From: ak-li <66441836+ak-li@users.noreply.github.com> Date: Fri, 26 Jun 2026 14:35:55 +0200 Subject: [PATCH 19/19] Update preinst Lines removed because a file named `btrfs` is being used. --- debian/preinst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/debian/preinst b/debian/preinst index 006d10b..57fbe1b 100755 --- a/debian/preinst +++ b/debian/preinst @@ -45,13 +45,6 @@ fi ################################### -# For the new systemd units we need a file with the name -# of the file system type of the root directory. -fstypename="/usr/share/siduction/$(findmnt -n -o FSTYPE /)" -touch "$fstypename" -echo "DO NOT REMOVE THIS FILE!" >> "$fstypename" -echo "It is required by the siduction_btrfs systemd units." >> "$fstypename" - # Now we use the snapper plugin dir. if [ ! -d /usr/lib/snapper/plugins/ ]; then mkdir /usr/lib/snapper/plugins