bash-completion has hard coded lines for Postfix completion which assumes Postfix is installed PREFIX=/usr Fix paths for FreeBSD PREFIX=/usr/local Fix: Add files/patch-ab
State Changed From-To: open->feedback To which port does this apply? shells/bash2?
shells/bash-completion -- Toni Viemerö http://selfdestruct.net/
State Changed From-To: feedback->open Feedback received, synopsis updated.
Hi, On Tue, Feb 24, 2004 at 08:52:12PM +0200, Toni Viemero wrote: > > >Number: 63314 > >Category: ports > >Synopsis: fix bash-completion hard coded paths for postfix completion > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-ports-bugs > >State: open Could you please review this PR ? http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/63314 -Kirill
State Changed From-To: open->feedback Asked for maintainer's feedback.
At 2004-02-28T21:24:07Z, Kirill Ponomarew <krion@FreeBSD.org> writes: > Hi, > > On Tue, Feb 24, 2004 at 08:52:12PM +0200, Toni Viemero wrote: >> >> >Number: 63314 >> >Category: ports >> >Synopsis: fix bash-completion hard coded paths for postfix completion >> >Confidential: no >> >Severity: serious >> >Priority: medium >> >Responsible: freebsd-ports-bugs >> >State: open > > Could you please review this PR ? > > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/63314 > > -Kirill The patch assumes (not unreasonably) that the user has installed the mail/postfix port with $PREFIX==/usr/local . While it would correct the hardcoded paths for the majority of users, it would break the config for installations directly into /usr. Also, it adds new hardcoded paths to /usr/local/bin/mailq. I use Sendmail From the base installation, so I don't have experience with /usr/sbin/mailwrapper, but wasn't it designed to avoid having to call each mailer's binaries directly? -- Kirk Strauser
Here's the updated files/patch-aa with hard coded paths removed, since bash_completion uses $PATH nicely. User needs to have /whatever/sbin in his/her $PATH, but usually sysadmins do, as the Postfix completions used by bash-completion are (usually) admin-only. Also mailq is indeed link to mailwrapper, which uses Postfix mailq when Postfix is configured as default MTA in /etc/mail/mailer.conf. --- bash_completion.org Sun Feb 15 05:45:21 2004 +++ bash_completion Sun Mar 7 01:13:59 2004 @@ -31,14 +31,14 @@ if [ -n "${FUNCNAME:-}" ]; then # we're being sourced from within a function, so we can't use # 'declare', as this will create local variables within a function - BASH_COMPLETION=${BASH_COMPLETION:-/etc/bash_completion} 2>/dev/null - BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/etc/bash_completion.d} \ + BASH_COMPLETION=${BASH_COMPLETION:-/usr/local/etc/bash_completion} 2>/dev/null + BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/usr/local/etc/bash_completion.d} \ 2>/dev/null else - declare -r BASH_COMPLETION=${BASH_COMPLETION:-/etc/bash_completion} \ + declare -r BASH_COMPLETION=${BASH_COMPLETION:-/usr/local/etc/bash_completion} \ 2>/dev/null declare -r \ - BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/etc/bash_completion.d} \ + BASH_COMPLETION_DIR=${BASH_COMPLETION_DIR:=/usr/local/etc/bash_completion.d} \ 2>/dev/null fi @@ -1050,7 +1050,7 @@ else len=${#cur} idx=0 - for pval in $( /usr/sbin/postconf -m ); do + for pval in $( postconf -m ); do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]="$pval:" idx=$(($idx+1)) @@ -1126,7 +1126,7 @@ fi len=${#cur} idx=0 - for pval in $( /usr/sbin/postconf | cut -d ' ' -f 1 ); do + for pval in $( postconf | cut -d ' ' -f 1 ); do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]="$pval$eqext" idx=$(($idx+1))
Kirk, do you agree with the updated patch-aa as seen at http://www.freebsd.org/cgi/query-pr.cgi?q=63314 dated Sun 7 Mar 2004 01:29:16 ? -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Cats happen.
State Changed From-To: feedback->closed Committed, thanks!