Source: bridge-utils
Version: 1.7.1-1
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

Hi!

Your package installs files directly into /. For the ongoing Debian
UsrMerge effort [1] these files should move to /usr in the trixie
cycle.

I'm attaching a patch to implement such a move.

However, please still read the wiki page on moving files, especially
if you intend to backport to bookworm or earlier. The patch has
already been checked by a local dumat copy.

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 bridge-utils-1.7.1/debian/bridge-network-interface.sh bridge-utils-1.7.1/debian/bridge-network-interface.sh
--- bridge-utils-1.7.1/debian/bridge-network-interface.sh	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/bridge-network-interface.sh	2023-12-23 21:31:44.000000000 +0100
@@ -19,7 +19,7 @@
 
 [ "$BRIDGE_HOTPLUG" = "no" ] && exit 0
 
-. /lib/bridge-utils/bridge-utils.sh
+. /usr/lib/bridge-utils/bridge-utils.sh
 
 if [ -d /run/network ]; then
    for i in $(ifquery --list --allow auto); do
diff -Nru bridge-utils-1.7.1/debian/changelog bridge-utils-1.7.1/debian/changelog
--- bridge-utils-1.7.1/debian/changelog	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/changelog	2023-12-23 21:31:44.000000000 +0100
@@ -1,3 +1,10 @@
+bridge-utils (1.7.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Install files into /usr instead of /. (Closes: #-1)
+
+ -- Chris Hofstaedtler <z...@debian.org>  Sat, 23 Dec 2023 21:31:44 +0100
+
 bridge-utils (1.7.1-1) unstable; urgency=low
 
   * New upstream version.
diff -Nru bridge-utils-1.7.1/debian/dirs bridge-utils-1.7.1/debian/dirs
--- bridge-utils-1.7.1/debian/dirs	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/dirs	2023-12-23 21:31:44.000000000 +0100
@@ -1,6 +1,6 @@
 etc/network/if-pre-up.d
 etc/network/if-down.d
 etc/network/if-post-down.d
-sbin
-lib/bridge-utils
-lib/udev
+usr/sbin
+usr/lib/bridge-utils
+usr/lib/udev
diff -Nru bridge-utils-1.7.1/debian/examples/hibernate bridge-utils-1.7.1/debian/examples/hibernate
--- bridge-utils-1.7.1/debian/examples/hibernate	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/examples/hibernate	2023-12-23 21:31:44.000000000 +0100
@@ -6,7 +6,7 @@
 AddConfigHandler BridgeOptions
 
 BridgeSuspend() {
-    for i in `/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
+    for i in `/usr/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
     do
       ip link set dev $i down
     done
@@ -14,7 +14,7 @@
 }
 
 BridgeResume() {
-    for i in `/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
+    for i in `/usr/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
     do
       ip link set dev $i up
     done
diff -Nru bridge-utils-1.7.1/debian/examples/pm-utils bridge-utils-1.7.1/debian/examples/pm-utils
--- bridge-utils-1.7.1/debian/examples/pm-utils	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/examples/pm-utils	2023-12-23 21:31:44.000000000 +0100
@@ -4,7 +4,7 @@
 # as /etc/pm/sleep.d/bridge
 
 BridgeSuspend() {
-    for i in `/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
+    for i in `/usr/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
     do
       ip link set dev $i down
     done
@@ -12,7 +12,7 @@
 }
 
 BridgeResume() {
-    for i in `/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
+    for i in `/usr/sbin/brctl show|sed -n "s/^[^ ]*\t\([^\t]*\)/\1/p"`
     do
       ip link set dev $i up
     done
diff -Nru bridge-utils-1.7.1/debian/ifupdown.sh bridge-utils-1.7.1/debian/ifupdown.sh
--- bridge-utils-1.7.1/debian/ifupdown.sh	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/ifupdown.sh	2023-12-23 21:31:44.000000000 +0100
@@ -6,7 +6,7 @@
 # Have a look at /usr/share/doc/bridge-utils/README.Debian if you want
 # more info about the way on wich a bridge is set up on Debian.
 
-if [ ! -x /sbin/brctl ]
+if [ ! -x /usr/sbin/brctl ]
 then
   exit 0
 fi
@@ -14,7 +14,7 @@
 #default configuration
 [ -f /etc/default/bridge-utils ] && . /etc/default/bridge-utils
 
-. /lib/bridge-utils/bridge-utils.sh
+. /usr/lib/bridge-utils/bridge-utils.sh
 
 case "$IF_BRIDGE_PORTS" in
     "")
diff -Nru bridge-utils-1.7.1/debian/rules bridge-utils-1.7.1/debian/rules
--- bridge-utils-1.7.1/debian/rules	2023-01-25 22:11:52.000000000 +0100
+++ bridge-utils-1.7.1/debian/rules	2023-12-23 21:31:44.000000000 +0100
@@ -64,13 +64,13 @@
 
 	# Add here commands to install the package into debian/tmp.
 	#$(MAKE) install prefix=$(CURDIR)/debian/bridge-utils/usr
-	$(INSTALL_PROGRAM) -m 755 brctl/brctl $(IDIR)/sbin
-	$(INSTALL_SCRIPT) -m 755 debian/ifupdown.sh $(IDIR)/lib/bridge-utils/
-	ln -s /lib/bridge-utils/ifupdown.sh $(IDIR)/etc/network/if-pre-up.d/bridge
-	ln -s /lib/bridge-utils/ifupdown.sh $(IDIR)/etc/network/if-down.d/bridge
-	ln -s /lib/bridge-utils/ifupdown.sh $(IDIR)/etc/network/if-post-down.d/bridge
-	$(INSTALL_SCRIPT) -m 755 debian/bridge-utils.sh $(IDIR)/lib/bridge-utils/
-	$(INSTALL_SCRIPT) -m 755 debian/bridge-network-interface.sh $(IDIR)/lib/udev/bridge-network-interface
+	$(INSTALL_PROGRAM) -m 755 brctl/brctl $(IDIR)/usr/sbin
+	$(INSTALL_SCRIPT) -m 755 debian/ifupdown.sh $(IDIR)/usr/lib/bridge-utils/
+	ln -s /usr/lib/bridge-utils/ifupdown.sh $(IDIR)/etc/network/if-pre-up.d/bridge
+	ln -s /usr/lib/bridge-utils/ifupdown.sh $(IDIR)/etc/network/if-down.d/bridge
+	ln -s /usr/lib/bridge-utils/ifupdown.sh $(IDIR)/etc/network/if-post-down.d/bridge
+	$(INSTALL_SCRIPT) -m 755 debian/bridge-utils.sh $(IDIR)/usr/lib/bridge-utils/
+	$(INSTALL_SCRIPT) -m 755 debian/bridge-network-interface.sh $(IDIR)/usr/lib/udev/bridge-network-interface
 	
 #	dh_movefiles
 

Reply via email to