File: 0001-rt-tests-install-hwlatdetect-directly-into-sbindir.patch

package info (click to toggle)
rt-tests 2.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ansic: 13,273; python: 495; makefile: 237; sh: 158
file content (37 lines) | stat: -rw-r--r-- 1,340 bytes parent folder | download
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
From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
Date: Thu, 9 Sep 2021 13:51:50 +0900
Subject: rt-tests: install hwlatdetect directly into $sbindir

The python_lib directory is only for importable modules. As
hwlatdetect needs root privileges install it into $sbindir.
---
 Makefile | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index e3d02cd..37f4fa0 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ EXTRA_LIBS ?= -ldl	# for get_cpu
 RTTESTNUMA = -lrttestnuma -lnuma
 DESTDIR	?=
 prefix  ?= /usr/local
+sbindir ?= $(prefix)/sbin
 bindir  ?= $(prefix)/bin
 mandir	?= $(prefix)/share/man
 
@@ -231,12 +232,8 @@ install: all install_manpages install_hwlatdetect install_get_cyclictest_snapsho
 
 .PHONY: install_hwlatdetect
 install_hwlatdetect: hwlatdetect
-	if test -n "$(PYLIB)" ; then \
-		mkdir -p "$(DESTDIR)$(bindir)" ; \
-		install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
-		rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
-		ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
-	fi
+	mkdir -p "$(DESTDIR)$(sbindir)"
+	install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(sbindir)/hwlatdetect
 
 .PHONY: install_get_cyclictest_snapshot
 install_get_cyclictest_snapshot: get_cyclictest_snapshot