Subject: tmux: minor packaging fixes (bash completion, postinst safeguarding) Package: tmux Version: 1.5-1 Severity: minor
Howdy! I have a pair of minor packaging fixes for tmux that I'd like to get into Ubuntu by way of Debian. 1) We have some backports of tmux to older Ubuntu releases that are throwing some postinst warnings. These can be avoided with a couple of simple tests (testing for the existence of the conffile in question, and the utility used to remove it) 2) tmux ships a bash completion function, but it's not being installed into /etc/bash_completion.d/tmux; I've tested it and it works pretty well; it would be very nice if Debian installed it I have a patch that fixes both of these. You may or may not want to take it as is. The postinst part should be pretty simple/clean. The bash completion bit I solved with a symlink from /etc/bash_completion.d/tmux to the completion script in the docs location. It looks like most of the other bash completion scripts are technically conffiles (which seems silly to me), so perhaps you want to handle this differently. Thanks! -- :-Dustin Dustin Kirkland Ubuntu Core Developer
diff -Nru tmux-1.5/debian/changelog tmux-1.5/debian/changelog --- tmux-1.5/debian/changelog 2011-09-17 07:58:54.000000000 -0500 +++ tmux-1.5/debian/changelog 2011-11-15 12:27:44.000000000 -0600 @@ -1,3 +1,15 @@ +tmux (1.5-3) unstable; urgency=low + + * debian/postinst: + - avoid a couple of situations where this postinst fails (mostly in + backports of this package to older releases of Debian/Ubuntu) by + testing for existence of the file in question, and the availability + of the helper tool + * debian/links: + - install the shipped bash completion functionality + + -- Dustin Kirkland <kirkl...@ubuntu.com> Tue, 15 Nov 2011 12:16:58 -0600 + tmux (1.5-2) unstable; urgency=low * Disable the tmux-cleanup init script on upgrade (the file was removed diff -Nru tmux-1.5/debian/links tmux-1.5/debian/links --- tmux-1.5/debian/links 1969-12-31 18:00:00.000000000 -0600 +++ tmux-1.5/debian/links 2011-11-15 12:27:32.000000000 -0600 @@ -0,0 +1 @@ +/usr/share/doc/tmux/examples/bash_completion_tmux.sh /etc/bash_completion.d/tmux diff -Nru tmux-1.5/debian/postinst tmux-1.5/debian/postinst --- tmux-1.5/debian/postinst 2011-09-16 13:43:28.000000000 -0500 +++ tmux-1.5/debian/postinst 2011-11-15 12:16:55.000000000 -0600 @@ -2,8 +2,10 @@ set -e -if dpkg-maintscript-helper supports rm_conffile; then - dpkg-maintscript-helper rm_conffile /etc/init.d/tmux-cleanup 1.4-6 -- "$@" +if [ -e /etc/init.d/tmux-cleanup ] && command -v dpkg-maintscript-helper >/dev/null; then + if dpkg-maintscript-helper supports rm_conffile; then + dpkg-maintscript-helper rm_conffile /etc/init.d/tmux-cleanup 1.4-6 -- "$@" + fi fi #DEBHELPER#