diff -Nru orphan-sysvinit-scripts-0.23/debian/changelog orphan-sysvinit-scripts-0.23+nmu1/debian/changelog
--- orphan-sysvinit-scripts-0.23/debian/changelog	2025-10-25 18:18:55.000000000 +0200
+++ orphan-sysvinit-scripts-0.23+nmu1/debian/changelog	2026-08-11 02:39:57.000000000 +0200
@@ -1,3 +1,10 @@
+orphan-sysvinit-scripts (0.23+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add DPKG_ROOT support (Closes: #1142015)
+
+ -- Johannes Schauer Marin Rodrigues <josch@debian.org>  Tue, 11 Aug 2026 02:39:57 +0200
+
 orphan-sysvinit-scripts (0.23) unstable; urgency=medium
 
   * Add haveged init script (Closes: #1118622)
diff -Nru orphan-sysvinit-scripts-0.23/debian/postinst orphan-sysvinit-scripts-0.23+nmu1/debian/postinst
--- orphan-sysvinit-scripts-0.23/debian/postinst	2025-10-25 18:18:55.000000000 +0200
+++ orphan-sysvinit-scripts-0.23+nmu1/debian/postinst	2026-08-11 02:35:35.000000000 +0200
@@ -4,7 +4,7 @@
 
 case "$1" in
     configure|triggered)
-	/usr/lib/orphan-sysvinit-scripts/update_init_d.sh
+	"$DPKG_ROOT/usr/lib/orphan-sysvinit-scripts/update_init_d.sh"
 
 	;;
 esac
diff -Nru orphan-sysvinit-scripts-0.23/.gitignore orphan-sysvinit-scripts-0.23+nmu1/.gitignore
--- orphan-sysvinit-scripts-0.23/.gitignore	2025-10-25 18:18:55.000000000 +0200
+++ orphan-sysvinit-scripts-0.23+nmu1/.gitignore	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-*~
diff -Nru orphan-sysvinit-scripts-0.23/lib/update_init_d.sh orphan-sysvinit-scripts-0.23+nmu1/lib/update_init_d.sh
--- orphan-sysvinit-scripts-0.23/lib/update_init_d.sh	2025-10-25 18:18:55.000000000 +0200
+++ orphan-sysvinit-scripts-0.23+nmu1/lib/update_init_d.sh	2026-08-11 02:35:35.000000000 +0200
@@ -25,7 +25,7 @@
 	echo "Unable to parse line: $systemd $sysv $rcd $rest"
 	exit 1
     fi
-    if [ -e "/lib/systemd/system/$systemd" ] && [ "$action" = "add" ]; then
+    if [ -e "$DPKG_ROOT/lib/systemd/system/$systemd" ] && [ "$action" = "add" ]; then
 	if dpkg-query -S "/etc/init.d/$sysv" >/dev/null 2>&1 ; then
 	    # This file still belongs to an installed package
 	    # so do nothing for now
@@ -34,19 +34,19 @@
 	ucf "/usr/share/orphan-sysvinit-scripts/$sysv" "/etc/init.d/$sysv"
 	ucfr orphan-sysvinit-scripts "/etc/init.d/$sysv"
 	update-rc.d "$sysv" "${rcd:-defaults}" >/dev/null
-    elif [ -e "/etc/init.d/$sysv" ] && [ "$action" = "purge" ]; then
+    elif [ -e "$DPKG_ROOT/etc/init.d/$sysv" ] && [ "$action" = "purge" ]; then
 	#Only remove scripts if we are reasonably sure we have previously
 	#registered them with ucf (to minimise user surprise)
 	if which ucfq >/dev/null; then
 	    if ucfq "/etc/init.d/$sysv" | grep -q orphan-sysvinit-scripts ; then
 		for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
-		    rm -f "/etc/init.d/${sysv}.$ext"
+		    rm -f "$DPKG_ROOT/etc/init.d/${sysv}.$ext"
 		done
-		rm -f "/etc/init.d/$sysv"
+		rm -f "$DPKG_ROOT/etc/init.d/$sysv"
 		ucf --purge "/etc/init.d/$sysv"
 		ucfr --purge orphan-sysvinit-scripts "/etc/init.d/$sysv"
 		update-rc.d "$sysv" remove >/dev/null
 	    fi
 	fi
     fi
-done < /usr/lib/orphan-sysvinit-scripts/mapping
+done < "$DPKG_ROOT/usr/lib/orphan-sysvinit-scripts/mapping"
