Control: tags 1148315 + patch
Control: tags 1148315 + pending

Dear maintainer,

I've prepared an NMU for clsync (versioned as 0.4.5-2.3) and
uploaded it to DELAYED/10. Please feel free to tell me if I
should cancel it.

Regards,
Nadzeya
diffstat for clsync-0.4.5 clsync-0.4.5

 changelog      |   14 ++++++++++++++
 clsync.NEWS    |   12 ++++++++++++
 clsync.service |   15 +++++++++++++++
 default        |   11 +++++++----
 rules          |   10 ++++++++++
 5 files changed, 58 insertions(+), 4 deletions(-)

diff -Nru clsync-0.4.5/debian/changelog clsync-0.4.5/debian/changelog
--- clsync-0.4.5/debian/changelog	2025-09-20 20:55:06.000000000 +0200
+++ clsync-0.4.5/debian/changelog	2026-09-21 13:10:18.000000000 +0200
@@ -1,3 +1,17 @@
+clsync (0.4.5-2.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add a native systemd service, as systemd-sysv-generator was removed
+    upstream in systemd v260 (Closes: #1148315)
+    - The service is not enabled or started on install, and the init script
+      is no longer started on install either, so that the CLSYNC_ENABLE gate
+      is preserved.
+    - CLSYNC_IONICE_CLASS has no native equivalent, as IOSchedulingClass=
+      does not expand environment variables. The service uses idle, which
+      was the init script's default.
+
+ -- Nadzeya Hutsko <[email protected]>  Mon, 21 Sep 2026 13:10:18 +0200
+
 clsync (0.4.5-2.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru clsync-0.4.5/debian/clsync.NEWS clsync-0.4.5/debian/clsync.NEWS
--- clsync-0.4.5/debian/clsync.NEWS	1970-01-01 01:00:00.000000000 +0100
+++ clsync-0.4.5/debian/clsync.NEWS	2026-09-21 13:05:35.000000000 +0200
@@ -0,0 +1,12 @@
+clsync (0.4.5-2.3) unstable; urgency=medium
+
+  clsync now ships a native systemd service, which replaces
+  /etc/init.d/clsync under systemd. If you had set CLSYNC_ENABLE=true, it no
+  longer has any effect and clsync will not start at boot. Run "systemctl
+  enable --now clsync" instead.
+
+  CLSYNC_ARGS is still used. CLSYNC_IONICE_CLASS is not, because the service
+  always runs with IOSchedulingClass=idle, which was the init script's
+  default.
+
+ -- Nadzeya Hutsko <[email protected]>  Mon, 21 Sep 2026 13:04:38 +0200
diff -Nru clsync-0.4.5/debian/clsync.service clsync-0.4.5/debian/clsync.service
--- clsync-0.4.5/debian/clsync.service	1970-01-01 01:00:00.000000000 +0100
+++ clsync-0.4.5/debian/clsync.service	2026-09-21 13:04:52.000000000 +0200
@@ -0,0 +1,15 @@
+[Unit]
+Description=clsync (live file syncer)
+Documentation=man:clsync(1)
+After=local-fs.target remote-fs.target network.target
+
+[Service]
+Type=exec
+EnvironmentFile=-/etc/default/clsync
+ExecStart=/usr/bin/clsync -b0 -Ystderr $CLSYNC_ARGS
+ExecReload=/bin/kill -HUP $MAINPID
+IOSchedulingClass=idle
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff -Nru clsync-0.4.5/debian/default clsync-0.4.5/debian/default
--- clsync-0.4.5/debian/default	2020-11-13 15:07:09.000000000 +0100
+++ clsync-0.4.5/debian/default	2026-09-21 13:05:56.000000000 +0200
@@ -1,13 +1,16 @@
 
-# === non-systemd ===
+# === clsync.service, and /etc/init.d/clsync under sysvinit ===
 
-# clsync is not enabled by default. To enable it replace "false" with "true":
+# CLSYNC_ENABLE only has an effect under sysvinit. Under systemd, run
+# "systemctl enable clsync" instead.
 CLSYNC_ENABLE=false
+# CLSYNC_IONICE_CLASS only has an effect under sysvinit. clsync.service
+# always runs with IOSchedulingClass=idle.
 CLSYNC_IONICE_CLASS=3
-# Example:
+# Example
 CLSYNC_ARGS='-M rsyncdirect --output=syslog -L /dev/shm/clsync -x 23 -W /var/www -S /usr/bin/rsync -D /mnt/backup'
 
-# === systemd ===
+# === [email protected], one instance per config block ===
 
 CLSYNC_ARGS_SYSTEMD='-b0 -Ystderr'
 # Example:
diff -Nru clsync-0.4.5/debian/rules clsync-0.4.5/debian/rules
--- clsync-0.4.5/debian/rules	2020-11-13 15:07:09.000000000 +0100
+++ clsync-0.4.5/debian/rules	2026-09-21 13:09:57.000000000 +0200
@@ -11,6 +11,16 @@
 override_dh_auto_configure:
 	dh_auto_configure -- --enable-socket --enable-socket-library --enable-highload-locks --disable-seccomp
 
+# clsync has no usable default configuration, so it must not be started on
+# install. The init script gated itself on CLSYNC_ENABLE and exited early.
+# Once a native unit exists, invoke-rc.d resolves to the unit instead of the
+# script and would bypass that gate, so suppress the start here too.
+override_dh_installinit:
+	dh_installinit --no-start
+
+override_dh_installsystemd:
+	dh_installsystemd --no-enable --no-start
+
 execute_after_dh_auto_install:
 	sed --in-place "/dependency_libs/ s/'.*'/''/" $$(find debian/tmp -name '*.la')
 	-rm --verbose debian/tmp/usr/share/doc/clsync/LICENSE

Reply via email to