Dear Maintainer,

Here is a minor revision of and replacement to the patchset I submitted
yesterday. After submitting the original patchset I noticed a slight
discrepancy with the git commits I had made to record the changes made
to the packaging by the last few NMUs. I had based my commits on the
patches submitted to the BTS for the #1062906 and #1073699 bugreports
and at least in the case of #1062906 there was a minor difference
between those patches and what was actually uploaded to the archive.
I have now corrected this.


As before, this corrected patchset can be applied to the debian
packaging repository at https://salsa.debian.org/debian/snapper.git
using the git-am(1) command.

For completeness, a corrected patchset summary follows.


This patchset is composed of a few different parts.

The first part, patches v2-0001, v2-0002, and v2-0003, merely brings the
packaging repository's debian/sid branch up-to-date from its current
position at the debian/0.10.6-1 tag to the latest package version in
the Debian package archive. Patch v2-0001 brings the branch up to
version 0.10.6-1.1~exp1, patch v2-0002 up to version 0.10.6-1.1, and
patch v2-0003 up to version 0.10.6-1.2.

The second part, patches v2-1004 and v2-1005, revert two previous
commits that removed the cron scripts from the generated binary
packages. This removal was originally done as a quick fix for #791726.

The third part, patches v2-1006 and v2-1007, make two enhancements to
the cron scripts. v2-1006 adds a check early in the scripts that will
cause them to abort if the snapper binary is not found. This fixes the
original issue that prompted the filing of #791726. v2-1007 adds a
similar early check to the scripts that causes them to abort if systemd
is detected. This prevents the cron scripts running in addition to the
systemd timers on systemd-using systems.

Finally, the last part, patch v2-1008, updates the debian/changelog
file.


Again, please let me know if you have any questions or if you would
like me to make any further modifications and submit a v3 changeset.


Thanks,

-- 
Plasma
>From d3c570b89b27d20fea3b16ef27d1a496b36cfe4e Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <sergi...@debian.org>
Date: Sat, 3 Feb 2024 23:02:57 +0000
Subject: [PATCH v2 1/8] Rename libraries for 64-bit time_t transition

---
 debian/changelog                                       | 7 +++++++
 debian/control                                         | 9 +++++----
 debian/{libsnapper7.install => libsnapper7t64.install} | 0
 debian/libsnapper7t64.lintian-overrides                | 1 +
 4 files changed, 13 insertions(+), 4 deletions(-)
 rename debian/{libsnapper7.install => libsnapper7t64.install} (100%)
 create mode 100644 debian/libsnapper7t64.lintian-overrides

diff --git a/debian/changelog b/debian/changelog
index c312a46..0b89529 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+snapper (0.10.6-1.1~exp1) experimental; urgency=medium
+
+  * Non-maintainer upload.
+  * Rename libraries for 64-bit time_t transition.
+
+ -- Sergio Durigan Junior <sergi...@debian.org>  Sat, 03 Feb 2024 23:02:57 +0000
+
 snapper (0.10.6-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/debian/control b/debian/control
index 0cdaf5c..461888e 100644
--- a/debian/control
+++ b/debian/control
@@ -48,13 +48,14 @@ Description: Linux filesystem snapshot management tool
    * D-Bus interface
    * PAM module to create snapshots during login and logout (libpam-snapper)
 
-Package: libsnapper7
+Package: libsnapper7t64
+Provides: ${t64:Provides}
 Section: libs
 Architecture: linux-any
 Multi-Arch: same
 Depends: ${misc:Depends}, ${shlibs:Depends}
-Breaks: libsnapper6
-Replaces: libsnapper6
+Breaks: libsnapper7 (<< ${source:Version}), libsnapper6
+Replaces: libsnapper7, libsnapper6
 Description: Library for Linux filesystem snapshot management tool
  Snapper is a tool for Linux filesystem snapshot management. Apart from the
  obvious creation and deletion of snapshots, it can compare snapshots and revert
@@ -67,7 +68,7 @@ Description: Library for Linux filesystem snapshot management tool
 Package: libsnapper-dev
 Section: libdevel
 Architecture: linux-any
-Depends: ${misc:Depends}, libsnapper7 (= ${binary:Version})
+Depends: ${misc:Depends}, libsnapper7t64 (= ${binary:Version})
 Description: Library for Linux filesystem snapshot management tool (header files)
  Snapper is a tool for Linux filesystem snapshot management. Apart from the
  obvious creation and deletion of snapshots, it can compare snapshots and revert
diff --git a/debian/libsnapper7.install b/debian/libsnapper7t64.install
similarity index 100%
rename from debian/libsnapper7.install
rename to debian/libsnapper7t64.install
diff --git a/debian/libsnapper7t64.lintian-overrides b/debian/libsnapper7t64.lintian-overrides
new file mode 100644
index 0000000..aa2e9a8
--- /dev/null
+++ b/debian/libsnapper7t64.lintian-overrides
@@ -0,0 +1 @@
+libsnapper7t64: package-name-doesnt-match-sonames libsnapper7
-- 
2.30.2

>From ea7f7ac376a19717a8ba4be422ffce41d7a52af2 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <bdr...@debian.org>
Date: Thu, 29 Feb 2024 16:56:55 +0000
Subject: [PATCH v2 2/8] upload to unstable

Closes: #1062906
---
 debian/changelog | 6 +++---
 debian/control   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0b89529..f7e54f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-snapper (0.10.6-1.1~exp1) experimental; urgency=medium
+snapper (0.10.6-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
-  * Rename libraries for 64-bit time_t transition.
+  * Rename libraries for 64-bit time_t transition.  Closes: #1062906
 
- -- Sergio Durigan Junior <sergi...@debian.org>  Sat, 03 Feb 2024 23:02:57 +0000
+ -- Benjamin Drung <bdr...@debian.org>  Thu, 29 Feb 2024 16:55:43 +0000
 
 snapper (0.10.6-1) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 461888e..96525bc 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: snapper
 Section: utils
 Priority: optional
 Maintainer: Hideki Yamane <henr...@debian.org>
-Build-Depends:
+Build-Depends: dpkg-dev (>= 1.22.5),
  libbtrfs-dev,
  debhelper-compat (= 13),
  docbook-xsl,
-- 
2.30.2

>From c8b71f592b38051a2587d26a9ff0a36791a0e87f Mon Sep 17 00:00:00 2001
From: Michael Biebl <bi...@debian.org>
Date: Tue, 10 Sep 2024 08:56:14 +0200
Subject: [PATCH v2 3/8] move aliased files from / to /usr (DEP17)

Closes: #1073699
---
 debian/changelog       | 7 +++++++
 debian/snapper.install | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f7e54f1..466ce33 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+snapper (0.10.6-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Install systemd units into /usr. (Closes: #1073699)
+
+ -- Michael Biebl <bi...@debian.org>  Tue, 10 Sep 2024 08:48:47 +0200
+
 snapper (0.10.6-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/snapper.install b/debian/snapper.install
index 73b2f02..70ba8ab 100644
--- a/debian/snapper.install
+++ b/debian/snapper.install
@@ -9,7 +9,7 @@ etc/snapper
 /usr/share/snapper
 usr/lib/snapper/installation-helper 
 usr/lib/snapper/systemd-helper 
-usr/lib/systemd/system/*	lib/systemd/system/
+usr/lib/systemd/system
 debian/80snapper		etc/apt/apt.conf.d/
 usr/share/bash-completion/completions/snapper
 usr/share/zsh/site-functions/_snapper
-- 
2.30.2

>From 88fc22c0ce61bb9cecd1fb37bece3769b1104fed Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <davidp...@librem.one>
Date: Thu, 2 Jan 2025 12:40:02 -0600
Subject: [PATCH v2 4/8] Revert "remove cron files"

This reverts commit 6f45e4c0feb388e8b67011be4e7fa25be9046b90.
---
 debian/snapper.postinst | 12 ------------
 debian/snapper.postrm   | 12 ------------
 debian/snapper.preinst  | 12 ------------
 3 files changed, 36 deletions(-)
 delete mode 100644 debian/snapper.postinst
 delete mode 100644 debian/snapper.postrm
 delete mode 100644 debian/snapper.preinst

diff --git a/debian/snapper.postinst b/debian/snapper.postinst
deleted file mode 100644
index 040564e..0000000
--- a/debian/snapper.postinst
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "$1" in
-install|upgrade)
-  if dpkg --compare-versions "$2" lt-nl 0.3.3-0.1; then
-    rm /etc/cron.daily/snapper /etc/cron.hourly/snapper || true
-  fi
-esac
-#DEBHELPER#
-exit 0
diff --git a/debian/snapper.postrm b/debian/snapper.postrm
deleted file mode 100644
index 040564e..0000000
--- a/debian/snapper.postrm
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "$1" in
-install|upgrade)
-  if dpkg --compare-versions "$2" lt-nl 0.3.3-0.1; then
-    rm /etc/cron.daily/snapper /etc/cron.hourly/snapper || true
-  fi
-esac
-#DEBHELPER#
-exit 0
diff --git a/debian/snapper.preinst b/debian/snapper.preinst
deleted file mode 100644
index 040564e..0000000
--- a/debian/snapper.preinst
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "$1" in
-install|upgrade)
-  if dpkg --compare-versions "$2" lt-nl 0.3.3-0.1; then
-    rm /etc/cron.daily/snapper /etc/cron.hourly/snapper || true
-  fi
-esac
-#DEBHELPER#
-exit 0
-- 
2.30.2

>From 7748133baa7dc47d655e86657f2adcb830e07384 Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <davidp...@librem.one>
Date: Thu, 2 Jan 2025 12:58:12 -0600
Subject: [PATCH v2 5/8] Revert "fix #791726"

Closes: #976888

This reverts commit 8723f90fa2998b59d485b6ac1074e08f8aa6484f.
---
 debian/rules           | 8 ++++++--
 debian/snapper.install | 4 +---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index 9285363..49ace7a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,8 +24,12 @@ override_dh_auto_install:
 	mkdir -p $(CURDIR)/debian/tmp/etc/default
 	install -m 0644 $(CURDIR)/data/sysconfig.snapper $(CURDIR)/debian/tmp/etc/default/snapper
 
-	# temporary workaround: remove cronjob
-	rm -rf $(CURDIR)/debian/tmp/etc/cron*
+	# Change the cron names and config paths
+	set -e; for dir in $(CURDIR)/debian/tmp/etc/cron.*/; do \
+		sed -e 's#/etc/sysconfig#/etc/default#g' $$dir/suse.de-snapper > $$dir/snapper; \
+		chmod +x $$dir/snapper; \
+		rm $$dir/suse.de-snapper; \
+	done
 
 	# Purge the la files
 	find $(CURDIR)/debian/tmp -name *.la -delete
diff --git a/debian/snapper.install b/debian/snapper.install
index 70ba8ab..7ecb8a0 100644
--- a/debian/snapper.install
+++ b/debian/snapper.install
@@ -1,6 +1,4 @@
-etc/default/snapper
-etc/logrotate.d/snapper
-etc/snapper
+/etc
 /usr/bin
 /usr/sbin
 /usr/share/dbus-1
-- 
2.30.2

>From 978b343e4a6de1be6b44dc4b4acaa2227b6948d9 Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <davidp...@librem.one>
Date: Sat, 25 Jan 2025 13:58:19 -0600
Subject: [PATCH v2 6/8] Make cronjobs abort if snapper is removed but not
 purged

(Re-)Closes: #791726
---
 debian/patches/cron-purge-fix.patch | 42 +++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 debian/patches/cron-purge-fix.patch

diff --git a/debian/patches/cron-purge-fix.patch b/debian/patches/cron-purge-fix.patch
new file mode 100644
index 0000000..78e3731
--- /dev/null
+++ b/debian/patches/cron-purge-fix.patch
@@ -0,0 +1,42 @@
+Description: Make cronjobs fail gracefully if snapper is removed but not purged
+ This re-fixes Debian bug #791726 without removing the cronjobs entirely.
+Author: Plasma (David Paul) <davidp...@librem.one>
+Bug-Debian: https://bugs.debian.org/791726
+Forwarded: not-needed
+Last-Update: 2025-01-25
+Index: snapper/scripts/snapper-daily
+===================================================================
+--- snapper.orig/scripts/snapper-daily
++++ snapper/scripts/snapper-daily
+@@ -1,5 +1,13 @@
+ #!/bin/sh
+ 
++#
++# skip if snapper is removed but not purged
++#
++if [ ! -x /usr/bin/snapper ] ; then
++    exit 0
++fi
++
++
+ #
+ # paranoia settings
+ #
+Index: snapper/scripts/snapper-hourly
+===================================================================
+--- snapper.orig/scripts/snapper-hourly
++++ snapper/scripts/snapper-hourly
+@@ -1,5 +1,13 @@
+ #!/bin/sh
+ 
++#
++# skip if snapper is removed but not purged
++#
++if [ ! -x /usr/bin/snapper ] ; then
++    exit 0
++fi
++
++
+ #
+ # paranoia settings
+ #
diff --git a/debian/patches/series b/debian/patches/series
index 549c728..48513af 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0004-fix-manpage.patch
 0005-drop-testsuite-real-to-avoid-to-be-installed-into-pa.patch
 0004-Add-some-missing-systemd-unit-directives.patch
+cron-purge-fix.patch
-- 
2.30.2

>From e01d2e60a871aeed6497b13f38b9c6f0eb523088 Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <davidp...@librem.one>
Date: Sat, 25 Jan 2025 14:06:03 -0600
Subject: [PATCH v2 7/8] Make cronjobs defer to systemd timers

---
 .../patches/cron-defer-to-systemd-timer.patch | 40 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 debian/patches/cron-defer-to-systemd-timer.patch

diff --git a/debian/patches/cron-defer-to-systemd-timer.patch b/debian/patches/cron-defer-to-systemd-timer.patch
new file mode 100644
index 0000000..abd53b0
--- /dev/null
+++ b/debian/patches/cron-defer-to-systemd-timer.patch
@@ -0,0 +1,40 @@
+Description: Make cronjobs defer to systemd timers
+Author: Plasma (David Paul) <davidp...@librem.one>
+Forwarded: no
+Last-Update: 2025-01-25
+Index: snapper/scripts/snapper-daily
+===================================================================
+--- snapper.orig/scripts/snapper-daily
++++ snapper/scripts/snapper-daily
+@@ -1,5 +1,13 @@
+ #!/bin/sh
+ 
++#
++# skip in favour of systemd timer
++#
++if [ -d /run/systemd/system ] ; then
++    exit 0
++fi
++
++
+ #
+ # skip if snapper is removed but not purged
+ #
+Index: snapper/scripts/snapper-hourly
+===================================================================
+--- snapper.orig/scripts/snapper-hourly
++++ snapper/scripts/snapper-hourly
+@@ -1,5 +1,13 @@
+ #!/bin/sh
+ 
++#
++# skip in favour of systemd timer
++#
++if [ -d /run/systemd/system ] ; then
++    exit 0
++fi
++
++
+ #
+ # skip if snapper is removed but not purged
+ #
diff --git a/debian/patches/series b/debian/patches/series
index 48513af..8b051f2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0005-drop-testsuite-real-to-avoid-to-be-installed-into-pa.patch
 0004-Add-some-missing-systemd-unit-directives.patch
 cron-purge-fix.patch
+cron-defer-to-systemd-timer.patch
-- 
2.30.2

>From 8711ccf66c34259bc32d4b50e9382e8c218ae3ca Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <davidp...@librem.one>
Date: Mon, 27 Jan 2025 14:10:38 -0600
Subject: [PATCH v2 8/8] Update changelog

---
 debian/changelog | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 466ce33..8c2f5af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+snapper (0.10.6-1.3) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Restore and enhance cron scripts.
+    Closes: #976888
+    Ref: #791726
+
+ -- Plasma (David Paul) <davidp...@librem.one>  Mon, 27 Jan 2025 14:09:41 -0600
+
 snapper (0.10.6-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
-- 
2.30.2

Reply via email to