File: 0009-no-hard-coded-paths.patch

package info (click to toggle)
drbd-utils 9.22.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,768 kB
  • sloc: ansic: 48,975; xml: 11,553; cpp: 9,843; sh: 4,568; makefile: 1,029; perl: 353; ruby: 43
file content (91 lines) | stat: -rw-r--r-- 4,089 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Description: Do not hard-code paths to install scripts and helper binaries
 Instead use $LIBDIR everywhere consistently.
Author: Michael Biebl <biebl@debian.org>

---
Bug-Debian: https://bugs.debian.org/1073716
Forwarded: https://github.com/LINBIT/drbd-utils/pull/46

Index: drbd-utils-9.22.0/scripts/Makefile.in
===================================================================
--- drbd-utils-9.22.0.orig/scripts/Makefile.in	2024-07-18 11:45:47.161526487 +0200
+++ drbd-utils-9.22.0/scripts/Makefile.in	2024-07-18 11:45:47.161526487 +0200
@@ -88,11 +88,11 @@
 	install -d $(DESTDIR)$(systemdunitdir)
 	install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
 	install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/
-	install -d $(DESTDIR)/lib/drbd/scripts
-	install -m 755 drbd $(DESTDIR)/lib/drbd/scripts
-	install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts
-	install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts
-	install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts
+	install -d $(DESTDIR)$(LIBDIR)/scripts
+	install -m 755 drbd $(DESTDIR)$(LIBDIR)/scripts
+	install -m 755 drbd-service-shim.sh $(DESTDIR)$(LIBDIR)/scripts
+	install -m 755 drbd-wait-promotable.sh $(DESTDIR)$(LIBDIR)/scripts
+	install -m 755 ocf.ra.wrapper.sh $(DESTDIR)$(LIBDIR)/scripts
 	install -d $(DESTDIR)$(tmpfilesdir)/
 	install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
 endif
Index: drbd-utils-9.22.0/user/v83/Makefile.in
===================================================================
--- drbd-utils-9.22.0.orig/user/v83/Makefile.in	2022-01-13 09:54:45.000000000 +0100
+++ drbd-utils-9.22.0/user/v83/Makefile.in	2024-07-18 11:48:08.135369707 +0200
@@ -96,19 +96,19 @@
 ifeq ($(WITH_83_SUPPORT),yes)
 	install -d $(DESTDIR)$(localstatedir)/lib/drbd
 	install -d $(DESTDIR)$(localstatedir)/lock
-	install -d $(DESTDIR)/lib/drbd/
+	install -d $(DESTDIR)$(LIBDIR)/
 	if getent group haclient > /dev/null 2> /dev/null ; then		\
-		install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ;	\
-		install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ;		\
+		install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)$(LIBDIR)/ ;	\
+		install -m 755 drbdadm-83 $(DESTDIR)$(LIBDIR)/ ;		\
 	else									\
-		install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ;		\
-		install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; 		\
+		install -m 755 drbdsetup-83 $(DESTDIR)$(LIBDIR)/ ;		\
+		install -m 755 drbdadm-83 $(DESTDIR)$(LIBDIR)/ ; 		\
 	fi
 endif
 
 uninstall:
-	rm -f $(DESTDIR)/lib/drbd/drbdsetup-83
-	rm -f $(DESTDIR)/lib/drbd/drbdadm-83
+	rm -f $(DESTDIR)$(LIBDIR)/drbdsetup-83
+	rm -f $(DESTDIR)$(LIBDIR)/drbdadm-83
 
 .PHONY: install uninstall clean distclean
 ../../configure:
Index: drbd-utils-9.22.0/user/v84/Makefile.in
===================================================================
--- drbd-utils-9.22.0.orig/user/v84/Makefile.in	2022-01-13 09:54:45.000000000 +0100
+++ drbd-utils-9.22.0/user/v84/Makefile.in	2024-07-18 11:49:41.816554493 +0200
@@ -110,19 +110,19 @@
 	install -d $(DESTDIR)$(localstatedir)/lib/drbd
 	install -d $(DESTDIR)$(localstatedir)/run/drbd
 	install -d $(DESTDIR)$(localstatedir)/lock
-	install -d $(DESTDIR)/lib/drbd/
+	install -d $(DESTDIR)$(LIBDIR)/
 	if getent group haclient > /dev/null 2> /dev/null ; then	\
-		install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/lib/drbd/ ;	\
-		install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ;		\
+		install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)$(LIBDIR)/ ;	\
+		install -m 755 drbdadm-84 $(DESTDIR)$(LIBDIR)/ ;		\
 	else								\
-		install -m 755 drbdsetup-84 $(DESTDIR)/lib/drbd/ ;		\
-		install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; 		\
+		install -m 755 drbdsetup-84 $(DESTDIR)$(LIBDIR)/ ;		\
+		install -m 755 drbdadm-84 $(DESTDIR)$(LIBDIR)/ ; 		\
 	fi
 endif
 
 uninstall:
-	rm -f $(DESTDIR)/lib/drbd/drbdsetup-84
-	rm -f $(DESTDIR)/lib/drbd/drbdadm-84
+	rm -f $(DESTDIR)$(LIBDIR)/drbdsetup-84
+	rm -f $(DESTDIR)$(LIBDIR)/drbdadm-84
 
 spell:
 	for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \