diff options
author | Ben Hutchings <benh@debian.org> | 2022-07-16 15:07:32 +0200 |
---|---|---|
committer | Ben Hutchings <benh@debian.org> | 2022-07-16 16:01:38 +0200 |
commit | 04d4869fd16e0c1be9d6c8a9778176a491670227 (patch) | |
tree | 2a1aa3f606d0d31a072136061d8e7842132204d1 /debian/patches | |
parent | 0efe6e5c1f30ddba91b6c6863fd102a55b2aa202 (diff) | |
download | linux-debian-04d4869fd16e0c1be9d6c8a9778176a491670227.tar.gz |
[x86,arm64,armhf] Add rtla package for Real-Time Linux Analysis tools
- Patch the upstream Makefile to allow appending to CFLAGS and LDFLAGS
- Patch the upstream Makefile to fix command symlinks
- Add control file template
- Add the necessary glue in rules.real and rules.d
- Add manual page symlinks mirroring the command symlinks
I'm only adding this for architectures that we build an RT kernel for.
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch | 24 | ||||
-rw-r--r-- | debian/patches/bugfix/all/tools-rtla-fix-command-symlinks.patch | 26 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 52 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch b/debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch new file mode 100644 index 000000000..f64205079 --- /dev/null +++ b/debian/patches/bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch @@ -0,0 +1,24 @@ +From: Ben Hutchings <benh@debian.org> +Date: Sat, 16 Jul 2022 15:00:01 +0200 +Subject: tools/rtla: Build with EXTRA_{C,LD}FLAGS +Forwarded: https://lore.kernel.org/linux-trace-devel/YtLBshz0nMQ7530H@decadent.org.uk/T/ + +To allow for distributions and other builders to apply hardening +policy and other customisation, append EXTRA_CFLAGS and EXTRA_LDFLAGS +to the corresponding variables. + +Signed-off-by: Ben Hutchings <benh@debian.org> +--- +--- a/tools/tracing/rtla/Makefile ++++ b/tools/tracing/rtla/Makefile +@@ -30,8 +30,8 @@ WOPTS := -Wall -Werror=format-security + + TRACEFS_HEADERS := $$($(PKG_CONFIG) --cflags libtracefs) + +-CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) +-LDFLAGS := -ggdb ++CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS) ++LDFLAGS := -ggdb $(EXTRA_LDFLAGS) + LIBS := $$($(PKG_CONFIG) --libs libtracefs) + + SRC := $(wildcard src/*.c) diff --git a/debian/patches/bugfix/all/tools-rtla-fix-command-symlinks.patch b/debian/patches/bugfix/all/tools-rtla-fix-command-symlinks.patch new file mode 100644 index 000000000..5a6fdee1a --- /dev/null +++ b/debian/patches/bugfix/all/tools-rtla-fix-command-symlinks.patch @@ -0,0 +1,26 @@ +From: Ben Hutchings <benh@debian.org> +Date: Sat, 16 Jul 2022 15:20:27 +0200 +Subject: tools/rtla: Fix command symlinks +Forwarded: https://lore.kernel.org/linux-trace-devel/YtLBXMI6Ui4HLIF1@decadent.org.uk/T/ + +"ln -s" stores the next argument directly as the symlink target, so +it needs to be a relative path. In this case, just "rtla". + +Fixes: 0605bf009f18 ("rtla: Add osnoise tool") +Fixes: a828cd18bc4a ("rtla: Add timerlat tool and timelart top mode") +Signed-off-by: Ben Hutchings <benh@debian.org> +--- +--- a/tools/tracing/rtla/Makefile ++++ b/tools/tracing/rtla/Makefile +@@ -108,9 +108,9 @@ install: doc_install + $(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR) + $(STRIP) $(DESTDIR)$(BINDIR)/rtla + @test ! -f $(DESTDIR)$(BINDIR)/osnoise || rm $(DESTDIR)$(BINDIR)/osnoise +- ln -s $(DESTDIR)$(BINDIR)/rtla $(DESTDIR)$(BINDIR)/osnoise ++ ln -s rtla $(DESTDIR)$(BINDIR)/osnoise + @test ! -f $(DESTDIR)$(BINDIR)/timerlat || rm $(DESTDIR)$(BINDIR)/timerlat +- ln -s $(DESTDIR)$(BINDIR)/rtla $(DESTDIR)$(BINDIR)/timerlat ++ ln -s rtla $(DESTDIR)$(BINDIR)/timerlat + + .PHONY: clean tarball + clean: doc_clean diff --git a/debian/patches/series b/debian/patches/series index 2a2f2fb61..a3f73d5d4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -178,5 +178,7 @@ bugfix/all/tools-perf-fix-compilation-error-with-new-binutils.patch bugfix/all/tools-bpf_jit_disasm-fix-compilation-error-with-new-binutils.patch bugfix/all/tools-bpftool-fix-compilation-error-with-new-binutils.patch bugfix/all/tools-perf-fix-build-without-libbfd.patch +bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch +bugfix/all/tools-rtla-fix-command-symlinks.patch # ABI maintenance |