Package: trace-cmd
Version: 2.9.1-1
Severity: normal
Tags: patch

Dear Maintainer,

trace-cmd installs a bash-completion script to
/usr/share/bash-completion/completions/trace-cmd/trace-cmd.bash
Unfortunately, it will not be used because bash-completion dynamically
loads completion scripts from
/usr/share/bash-completion/completions/$cmd, so completions for
trace-cmd must be installed as
/usr/share/bash-completion/completions/trace-cmd.

I've attached a patch to fix the issue.

Thanks for considering,
Kevin
>From ac5a9a6cef51186da0b498c87534baeec5020640 Mon Sep 17 00:00:00 2001
Message-Id: 
<ac5a9a6cef51186da0b498c87534baeec5020640.1615420512.git.ke...@kevinlocke.name>
From: Kevin Locke <ke...@kevinlocke.name>
Date: Wed, 10 Mar 2021 16:53:26 -0700
Subject: [PATCH] install bash-completion script to correct location

bash-completion scripts for $cmd must be installed as
/usr/share/bash-completion/completions/$cmd to be dynamically loaded.
The script was installed as
/usr/share/bash-completion/completions/trace-cmd/trace-cmd.bash
because dh_install naively installs the named file to the named
directory.  Use dh-exec to rename the file during install, as suggested
in dh_install(1), so that it is installed as
/usr/share/bash-completion/completions/trace-cmd.

Signed-off-by: Kevin Locke <ke...@kevinlocke.name>
---
 debian/control           | 2 +-
 debian/trace-cmd.install | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index df9661f..69e7614 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
 Priority: optional
 Homepage: http://kernelshark.org/
 Maintainer: Sudip Mukherjee <sudipm.mukher...@gmail.com>
-Build-Depends: debhelper-compat (= 13), cmake, libjson-c-dev, freeglut3-dev, 
libxmu-dev, libegl-dev [mipsel], libxi-dev, qtbase5-dev, asciidoc, docbook-xsl, 
xsltproc, policykit-1, libcunit1-dev
+Build-Depends: debhelper-compat (= 13), dh-exec, cmake, libjson-c-dev, 
freeglut3-dev, libxmu-dev, libegl-dev [mipsel], libxi-dev, qtbase5-dev, 
asciidoc, docbook-xsl, xsltproc, policykit-1, libcunit1-dev
 Standards-Version: 4.5.0
 Rules-Requires-Root: no
 Vcs-Browser: https://github.com/sudipm-mukherjee/trace-cmd.git
diff --git a/debian/trace-cmd.install b/debian/trace-cmd.install
index df98a91..eff9aa4 100644
--- a/debian/trace-cmd.install
+++ b/debian/trace-cmd.install
@@ -1,3 +1,4 @@
+#!/usr/bin/dh-exec
 usr/bin/trace-cmd
 usr/lib/trace-cmd/plugins/*
-usr/etc/bash_completion.d/trace-cmd.bash 
/usr/share/bash-completion/completions/trace-cmd
+usr/etc/bash_completion.d/trace-cmd.bash => 
/usr/share/bash-completion/completions/trace-cmd
-- 
2.30.1

Reply via email to