lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 6 Aug 2022 14:45:17 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Daniel Bristot de Oliveira <bristot@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Andreas Schwab <schwab@...e.de>,
        jianchunfu <jianchunfu@...s.chinamobile.com>
Subject: Re: [GIT PULL] rtla: Updates for 5.20/6.0

On Sat, 6 Aug 2022 14:22:03 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> With the below patch, it will show the warnings for both libtraceevent and
> libtracefs if they are not installed:
> 
>  $ make
> ********************************************
> ** NOTICE: libtraceevent version 1.5 or higher not found
> **
> ** Consider installing the latest libtraceevent from your
> ** distribution, e.g., 'dnf install libtraceevent-devel' on Fedora,
> ** or from source:
> **
> **  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
> **
> ********************************************
> ********************************************
> ** NOTICE: libtracefs version 1.3 or higher not found
> **
> ** Consider installing the latest libtracefs from your
> ** distribution, e.g., 'dnf install libtracefs-devel' on Fedora,
> ** or from source:
> **
> **  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
> **
> ********************************************
> Makefile:106: *** Please add the necessary dependencies.  Stop.


Or to even make it less noisy:

 $ make
********************************************
** NOTICE: Failed build dependencies
**
** Required Libraries:
**   libtraceevent version 1.5 or higher
**   libtracefs version 1.3 or higher
**
** Consider installing the latest libtracefs from your
** distribution, e.g., 'dnf install libtraceevent-devel libtracefs-devel' on Fedora,
** or from source:
**
**  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ 
**  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ 
**
********************************************
Makefile:106: *** Please add the necessary dependencies.  Stop.

-- Steve


diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index 1bea2d16d4c1..cc9478dabd8b 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -61,40 +61,50 @@ endif
 LIBTRACEEVENT_MIN_VERSION = 1.5
 LIBTRACEFS_MIN_VERSION = 1.3
 
+.PHONY:	all warnings show_warnings
+all:	warnings rtla
+
 TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEEVENT_MIN_VERSION) libtraceevent > /dev/null 2>&1 || echo n")
 ifeq ("$(TEST_LIBTRACEEVENT)", "n")
-.PHONY: warning_traceevent
-warning_traceevent:
-	@echo "********************************************"
-	@echo "** NOTICE: libtraceevent version $(LIBTRACEEVENT_MIN_VERSION) or higher not found"
-	@echo "**"
-	@echo "** Consider installing the latest libtraceevent from your"
-	@echo "** distribution, e.g., 'dnf install libtraceevent' on Fedora,"
-	@echo "** or from source:"
-	@echo "**"
-	@echo "**  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ "
-	@echo "**"
-	@echo "********************************************"
+WARNINGS = show_warnings
+MISSING_LIBS += echo "**   libtraceevent version $(LIBTRACEEVENT_MIN_VERSION) or higher";
+MISSING_PACKAGES += "libtraceevent-devel"
+MISSING_SOURCE += echo "**  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ ";
 endif
 
 TEST_LIBTRACEFS = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEFS_MIN_VERSION) libtracefs > /dev/null 2>&1 || echo n")
 ifeq ("$(TEST_LIBTRACEFS)", "n")
-.PHONY: warning_tracefs
-warning_tracefs:
-	@echo "********************************************"
-	@echo "** NOTICE: libtracefs version $(LIBTRACEFS_MIN_VERSION) or higher not found"
-	@echo "**"
-	@echo "** Consider installing the latest libtracefs from your"
-	@echo "** distribution, e.g., 'dnf install libtracefs' on Fedora,"
-	@echo "** or from source:"
-	@echo "**"
-	@echo "**  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ "
-	@echo "**"
-	@echo "********************************************"
+WARNINGS = show_warnings
+MISSING_LIBS += echo "**   libtracefs version $(LIBTRACEFS_MIN_VERSION) or higher";
+MISSING_PACKAGES += "libtracefs-devel"
+MISSING_SOURCE += echo "**  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ ";
 endif
 
-.PHONY:	all
-all:	rtla
+define show_dependencies
+	@echo "********************************************";				\
+	echo "** NOTICE: Failed build dependencies";					\
+	echo "**";									\
+	echo "** Required Libraries:";							\
+	$(MISSING_LIBS)									\
+	echo "**";									\
+	echo "** Consider installing the latest libtracefs from your";			\
+	echo "** distribution, e.g., 'dnf install $(MISSING_PACKAGES)' on Fedora,";	\
+	echo "** or from source:";							\
+	echo "**";									\
+	$(MISSING_SOURCE)								\
+	echo "**";									\
+	echo "********************************************"
+endef
+
+show_warnings:
+	$(call show_dependencies);
+
+ifneq ("$(WARNINGS)", "")
+ERROR_OUT = $(error Please add the necessary dependencies)
+
+warnings: $(WARNINGS)
+	$(ERROR_OUT)
+endif
 
 rtla: $(OBJ)
 	$(CC) -o rtla $(LDFLAGS) $(OBJ) $(LIBS)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ