Bug#872174: Please install bash completion as part of the package

2017-09-25 Thread Michael Biebl
Control: tags -1 + patch

On Mon, 14 Aug 2017 22:47:53 +0200 Michael Biebl  wrote:
> Package: restic
> Version: 0.7.1-1
> Severity: wishlist
> 
> Trying to run "restic autocomplete" (as unprivileged user), I get
> $ restic autocomplete
> open /etc/bash_completion.d/restic.sh: permission denied
> 
> It would be much nicer if the restic package shipped the bash completion
> directly (as /usr/share/bash-completion/completions/restic) so it works
> ootb.
The attached patch should do the trick.
Let me know what you think.

Thanks for considering.

Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff -Nru restic-0.7.1/debian/changelog restic-0.7.1/debian/changelog
--- restic-0.7.1/debian/changelog	2017-07-27 08:55:09.0 +0200
+++ restic-0.7.1/debian/changelog	2017-09-26 01:35:00.0 +0200
@@ -1,3 +1,10 @@
+restic (0.7.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Generate and install bash-completion file. (Closes: #872174)
+
+ -- Michael Biebl   Tue, 26 Sep 2017 01:35:00 +0200
+
 restic (0.7.1-1) unstable; urgency=medium
 
   * New upstream version 0.7.1
diff -Nru restic-0.7.1/debian/rules restic-0.7.1/debian/rules
--- restic-0.7.1/debian/rules	2017-07-27 08:55:09.0 +0200
+++ restic-0.7.1/debian/rules	2017-09-26 01:33:49.0 +0200
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 export DH_OPTIONS
 # Install everything, for testdata/ directories:
 export DH_GOLANG_INSTALL_ALL := 1
@@ -21,3 +23,7 @@
 # it is not intended to be used as a library right now.
 override_dh_auto_install:
 	dh_auto_install -- --no-source
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	install -d debian/restic/usr/share/bash-completion/completions
+	debian/restic/usr/bin/restic autocomplete --completionfile debian/restic/usr/share/bash-completion/completions/restic
+endif


signature.asc
Description: OpenPGP digital signature


Bug#872174: Please install bash completion as part of the package

2017-08-14 Thread Michael Biebl
Package: restic
Version: 0.7.1-1
Severity: wishlist

Trying to run "restic autocomplete" (as unprivileged user), I get
$ restic autocomplete
open /etc/bash_completion.d/restic.sh: permission denied

It would be much nicer if the restic package shipped the bash completion
directly (as /usr/share/bash-completion/completions/restic) so it works
ootb.



-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), 
LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages restic depends on:
ii  libc6  2.24-14

restic recommends no packages.

restic suggests no packages.

-- no debconf information