Source: openafs
Version: 1.8.10-2
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

Hi!

openafs-client installs afsd into /sbin. For the ongoing Debian
UsrMerge effort [1] it should move (back?) into /usr/sbin in the trixie
cycle.

I'm attaching a possible patch for your convenience. It looks good
to me, but since I do not have an AFS setup, I have not tested it.

Please still read the wiki page on moving files, especially if you
intend to backport to bookworm or earlier.

If during the trixie cycle your package will undergo structural
changes or any other file moves, please also see the wiki and upload
to experimental first when these changes are done.

Chris

[1] https://wiki.debian.org/UsrMerge
diff -Nru openafs-1.8.10/debian/changelog openafs-1.8.10/debian/changelog
--- openafs-1.8.10/debian/changelog	2023-12-24 06:56:47.000000000 +0100
+++ openafs-1.8.10/debian/changelog	2023-12-25 11:39:19.000000000 +0100
@@ -1,3 +1,11 @@
+openafs (1.8.10-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move afsd (back) into /usr/sbin (Closes: #-1).
+    Update path in init script and systemd service unit.
+
+ -- Chris Hofstaedtler <z...@debian.org>  Mon, 25 Dec 2023 11:39:19 +0100
+
 openafs (1.8.10-2) unstable; urgency=medium
 
   * Update lintian overrides to use appropriate context.
diff -Nru openafs-1.8.10/debian/openafs-client.init openafs-1.8.10/debian/openafs-client.init
--- openafs-1.8.10/debian/openafs-client.init	2023-12-22 23:47:52.000000000 +0100
+++ openafs-1.8.10/debian/openafs-client.init	2023-12-25 11:38:25.000000000 +0100
@@ -34,7 +34,7 @@
 DKMSDIR=${DKMSDIR:-$MODULEROOT/updates/dkms}
 
 # Exit if the package is not installed.
-[ -x /sbin/afsd ] || exit 0
+[ -x /usr/sbin/afsd ] || exit 0
 
 # Define LSB log_* functions and get other support infrastructure.
 . /lib/lsb/init-functions
@@ -137,14 +137,14 @@
 
 # Start afsd.  Be careful not to start it if another one is already running,
 # as that has a bad tendency to hang the system.  Earlier versions of the
-# openafs-client package put afsd in /usr/sbin.
+# openafs-client package put afsd in /sbin.
 start_client() {
     if pidof /sbin/afsd >/dev/null || pidof /usr/sbin/afsd >/dev/null ; then
         echo "."
     else
         choose_afsd_options
         echo " afsd."
-        start-stop-daemon --start --quiet --exec /sbin/afsd -- $AFSD_OPTIONS
+        start-stop-daemon --start --quiet --exec /usr/sbin/afsd -- $AFSD_OPTIONS
     fi
 
     # From /etc/openafs/afs.conf.client, whether to enable fcrypt encryption.
@@ -196,7 +196,7 @@
 
 case "$1" in 
 start)
-    if is_on $AFS_CLIENT && test -x /sbin/afsd ; then
+    if is_on $AFS_CLIENT && test -x /usr/sbin/afsd ; then
         echo -n "Starting AFS services:"
         if load_client ; then
             start_client
@@ -210,7 +210,7 @@
     ;;
 
 force-start)
-    if test -x /sbin/afsd ; then
+    if test -x /usr/sbin/afsd ; then
         echo -n "Starting AFS services:"
         if load_client ; then
             start_client
diff -Nru openafs-1.8.10/debian/openafs-client.install openafs-1.8.10/debian/openafs-client.install
--- openafs-1.8.10/debian/openafs-client.install	2023-12-22 23:47:52.000000000 +0100
+++ openafs-1.8.10/debian/openafs-client.install	2023-12-25 11:36:29.000000000 +0100
@@ -28,7 +28,7 @@
 debian/tmp/usr/sbin/fstrace             usr/sbin
 debian/tmp/usr/sbin/rmtsysd             usr/sbin
 
-debian/tmp/usr/sbin/afsd                sbin
+debian/tmp/usr/sbin/afsd                usr/sbin
 
 debian/openafs-client-precheck                        usr/share/openafs
 debian/openafs-client-postcheck                        usr/share/openafs
diff -Nru openafs-1.8.10/debian/openafs-client-precheck openafs-1.8.10/debian/openafs-client-precheck
--- openafs-1.8.10/debian/openafs-client-precheck	2023-12-22 23:47:52.000000000 +0100
+++ openafs-1.8.10/debian/openafs-client-precheck	2023-12-25 11:39:08.000000000 +0100
@@ -46,7 +46,7 @@
 }
 
 # Exit if the package is not installed.
-[ -x /sbin/afsd ] || exit 1
+[ -x /usr/sbin/afsd ] || exit 1
 
 # Do some other checks for prerequisites
 if ! [ -f "${CACHEINFO}" ]; then
diff -Nru openafs-1.8.10/debian/openafs-client.service openafs-1.8.10/debian/openafs-client.service
--- openafs-1.8.10/debian/openafs-client.service	2023-12-22 23:47:52.000000000 +0100
+++ openafs-1.8.10/debian/openafs-client.service	2023-12-25 11:36:47.000000000 +0100
@@ -9,7 +9,7 @@
 Type=forking
 RemainAfterExit=true
 ExecStartPre=/usr/share/openafs/openafs-client-precheck
-ExecStart=/sbin/afsd $AFSD_ARGS
+ExecStart=/usr/sbin/afsd $AFSD_ARGS
 ExecStartPost=/usr/bin/fs setcrypt $AFS_SETCRYPT
 ExecStartPost=/usr/bin/fs sysname $AFS_SYSNAME
 ExecStop=/bin/grep -qv ^1$ /proc/sys/kernel/modules_disabled

Reply via email to