Debian Bug report logs - #284637
wrong location or perms on /usr/bin/gettext.sh

version graph

Package: gettext-base; Maintainer for gettext-base is Santiago Vila <sanvila@debian.org>; Source for gettext-base is src:gettext (PTS, buildd, popcon).

Reported by: martin f krafft <madduck@debian.org>

Date: Tue, 7 Dec 2004 16:48:05 UTC

Severity: minor

Found in version 0.14.1-6

Done: Santiago Vila <sanvila@unex.es>

Bug is archived. No further changes may be made.

Forwarded to bug-gnu-gettext@gnu.org

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#284637; Package gettext-base. (full text, mbox, link).


Message #3 received at submit@bugs.debian.org (full text, mbox, reply):

From: martin f krafft <madduck@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: wrong location or perms on /usr/bin/gettext.sh
Date: Tue, 7 Dec 2004 10:55:33 +0100
[Message part 1 (text/plain, inline)]
Package: gettext-base
Version: 0.14.1-6
Severity: minor

/usr/bin/gettext.sh is non-executable and to be sourced by shell
scripts. However, the FHS says that /usr/bin is "this is the primary
directory of executable commands on the system."

If /usr/bin/gettext.sh can be made executable, then please make it.
Otherwise, it should be moved to /usr/share/gettext.

I am making this bug minor rather than serious since the policy does
not really say that /usr/bin must not contain non-executables.
However, gettext.sh seems to be the only file in /usr/bin that is
not +x.

Thanks,

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (600, 'testing'), (98, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-cirrus
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages gettext-base depends on:
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an

-- no debconf information

-- 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
[signature.asc (application/pgp-signature, inline)]

Reply sent to Santiago Vila <sanvila@unex.es>:
You have marked Bug as forwarded. (full text, mbox, link).


Message #6 received at 284637-forwarded@bugs.debian.org (full text, mbox, reply):

From: Santiago Vila <sanvila@unex.es>
To: bug-gnu-gettext@gnu.org
Cc: 284637-forwarded@bugs.debian.org, martin f krafft <madduck@debian.org>
Subject: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Tue, 7 Dec 2004 18:36:25 +0100 (CET)
Hello.

Received this from the Debian bug system.
[ As usual, please keep the Cc:lines when replying. Thanks ].

---------- Forwarded message ----------
From: martin f krafft <madduck@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Date: Tue, 7 Dec 2004 10:55:33 +0100
Subject: Bug#284637: wrong location or perms on /usr/bin/gettext.sh

Package: gettext-base
Version: 0.14.1-6
Severity: minor

/usr/bin/gettext.sh is non-executable and to be sourced by shell
scripts. However, the FHS says that /usr/bin is "this is the primary
directory of executable commands on the system."

If /usr/bin/gettext.sh can be made executable, then please make it.
Otherwise, it should be moved to /usr/share/gettext.

I am making this bug minor rather than serious since the policy does
not really say that /usr/bin must not contain non-executables.
However, gettext.sh seems to be the only file in /usr/bin that is
not +x.

Thanks,

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (600, 'testing'), (98, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-cirrus
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages gettext-base depends on:
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an

-- no debconf information

-- 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!



Message #7 received at 284637-forwarded@bugs.debian.org (full text, mbox, reply):

From: Bruno Haible <bruno@clisp.org>
To: Santiago Vila <sanvila@unex.es>, bug-gnu-gettext@gnu.org
Cc: 284637-forwarded@bugs.debian.org, martin f krafft <madduck@debian.org>
Subject: Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Fri, 10 Dec 2004 21:58:02 +0100
martin f krafft <madduck@debian.org> wrote:
> Package: gettext-base
> Version: 0.14.1-6
> Severity: minor
>
> /usr/bin/gettext.sh is non-executable and to be sourced by shell
> scripts. However, the FHS says that /usr/bin is "this is the primary
> directory of executable commands on the system."
>
> If /usr/bin/gettext.sh can be made executable, then please make it.

You shouldn't make it executable. It is not meant to be executed.

> Otherwise, it should be moved to /usr/share/gettext.

This would defeat its purpose: gettext.sh is meant to be sourced from
shell scripts, using the "." command. This command looks in $PATH, but
none of the subdirectories of /usr/share/gettext is present in $PATH.

You can also see it this way: POSIX /bin/sh supports the concept of
functions. As in any programming language, functions can be grouped
together in a file called "library". As in any programming language,
such libraries can be loaded. In C it's via dlsym(), in sh it's via ".".

Where does dlsym() look up the libraries? In /usr/lib. So Debian
installs C libraries in /usr/lib/. Fine.

Where does "." look up the libraries? Anywhere in $PATH. In particular in
/usr/bin.

If the Debian project designates a particular directory for shell script
function libraries, and puts this directory in $PATH by default, GNU gettext
will happily install its contents there.

If it doesn't, then - by the analogy with /usr/lib above - there is nothing
wrong with gettext.sh in /usr/lib/.

Bruno




Reply sent to Santiago Vila <sanvila@unex.es>:
You have taken responsibility. (full text, mbox, link).


Notification sent to martin f krafft <madduck@debian.org>:
Bug acknowledged by developer. (full text, mbox, link).


Message #12 received at 284637-done@bugs.debian.org (full text, mbox, reply):

From: Santiago Vila <sanvila@unex.es>
To: 284637-done@bugs.debian.org
Cc: bug-gnu-gettext@gnu.org, martin f krafft <madduck@debian.org>
Subject: Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Fri, 10 Dec 2004 23:01:31 +0100 (CET)
On Fri, 10 Dec 2004, Bruno Haible wrote:

> martin f krafft <madduck@debian.org> wrote:
> > Package: gettext-base
> > Version: 0.14.1-6
> > Severity: minor
> >
> > /usr/bin/gettext.sh is non-executable and to be sourced by shell
> > scripts. However, the FHS says that /usr/bin is "this is the primary
> > directory of executable commands on the system."
> >
> > If /usr/bin/gettext.sh can be made executable, then please make it.
> 
> You shouldn't make it executable. It is not meant to be executed.
> 
> > Otherwise, it should be moved to /usr/share/gettext.
> 
> This would defeat its purpose: gettext.sh is meant to be sourced from
> shell scripts, using the "." command. This command looks in $PATH, but
> none of the subdirectories of /usr/share/gettext is present in $PATH.
> 
> You can also see it this way: POSIX /bin/sh supports the concept of
> functions. As in any programming language, functions can be grouped
> together in a file called "library". As in any programming language,
> such libraries can be loaded. In C it's via dlsym(), in sh it's via ".".
> 
> Where does dlsym() look up the libraries? In /usr/lib. So Debian
> installs C libraries in /usr/lib/. Fine.
> 
> Where does "." look up the libraries? Anywhere in $PATH. In particular in
> /usr/bin.
> 
> If the Debian project designates a particular directory for shell script
> function libraries, and puts this directory in $PATH by default, GNU gettext
> will happily install its contents there.
> 
> If it doesn't, then - by the analogy with /usr/lib above - there is nothing
> wrong with gettext.sh in /usr/lib/.

Thanks a lot for the explanation, Bruno.

As Debian does not have any designated directory in the PATH for shell
script function libraries, it clearly follows that /usr/bin is the
only sensible directory where gettext.sh may be placed.

I'm glad that Debian policy does not say that /usr/bin must not contain
non-executables, because that would be a bug in policy :-)

Closing this report (which is not really a bug).



Message #13 received at 284637-done@bugs.debian.org (full text, mbox, reply):

From: martin f krafft <madduck@debian.org>
To: Santiago Vila <sanvila@unex.es>
Cc: 284637-done@bugs.debian.org, bug-gnu-gettext@gnu.org
Subject: Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Sat, 11 Dec 2004 12:17:16 +0100
[Message part 1 (text/plain, inline)]
also sprach Santiago Vila <sanvila@unex.es> [2004.12.10.2301 +0100]:
> As Debian does not have any designated directory in the PATH for
> shell script function libraries, it clearly follows that /usr/bin
> is the only sensible directory where gettext.sh may be placed.

I disagree. It does not belong in /usr/bin, so Debian should either
adopt a dedicated directory (which makes no sense), or you should
extend $PATH accordingly before using gettext.sh. In any case, the
location will be well-defined on any Debian system, so it would be
even better to just hardcode it.

> I'm glad that Debian policy does not say that /usr/bin must not contain
> non-executables, because that would be a bug in policy :-)
> 
> Closing this report (which is not really a bug).

I do not want to get into the close-reopen-close-reopen game, so
I will not reopen it right now. However, I think this issue is not
resolved. Please do as you see appropriate.

-- 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#284637; Package gettext-base. (full text, mbox, link).


Acknowledgement sent to Santiago Vila <sanvila@unex.es>:
Extra info received and forwarded to list. Copy sent to Santiago Vila <sanvila@debian.org>. (full text, mbox, link).


Message #18 received at 284637@bugs.debian.org (full text, mbox, reply):

From: Santiago Vila <sanvila@unex.es>
To: martin f krafft <madduck@debian.org>
Cc: 284637@bugs.debian.org, bug-gnu-gettext@gnu.org
Subject: Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Sat, 11 Dec 2004 14:47:32 +0100 (CET)
On Sat, 11 Dec 2004, martin f krafft wrote:

> also sprach Santiago Vila <sanvila@unex.es> [2004.12.10.2301 +0100]:
> > As Debian does not have any designated directory in the PATH for
> > shell script function libraries, it clearly follows that /usr/bin
> > is the only sensible directory where gettext.sh may be placed.
> 
> I disagree. It does not belong in /usr/bin,

It does, as Debian policy does not forbid gettext.sh to be in /usr/bin.
You have even said this yourself in your initial report:

"policy does not really say that /usr/bin must not contain non-executables."

> so Debian should either adopt a dedicated directory (which makes no
> sense),

It would not make sense, I agree.

> or you should extend $PATH accordingly before using gettext.sh.

which makes no sense either, as /usr/bin already exists, it's already
in the PATH, and does the work.

> In any case, the location will be well-defined on any Debian system,
> so it would be even better to just hardcode it.

No, paths should not be hardcoded, it would defeat the purpose of
having a PATH variable at all.

By hardcoding the location of gettext.sh, people would not have the
freedom to put another version in /usr/local/bin to override it.
That would be gratuitously harmful.

> > I'm glad that Debian policy does not say that /usr/bin must not contain
> > non-executables, because that would be a bug in policy :-)
> > 
> > Closing this report (which is not really a bug).
> 
> I do not want to get into the close-reopen-close-reopen game, so
> I will not reopen it right now. However, I think this issue is not
> resolved. Please do as you see appropriate.

This issue is resolved: The Debian gettext package does not violate
Debian policy by placing gettext.sh in /usr/bin.

It has been already explained why /usr/bin is the logical place to put
gettext.sh, and we agree that policy does not forbid such thing.

If you still think "this issue is not resolved", then you should
propose a policy change, instead of complaining to me.



Message #19 received at 284637-done@bugs.debian.org (full text, mbox, reply):

From: Bruno Haible <bruno@clisp.org>
To: martin f krafft <madduck@debian.org>, Santiago Vila <sanvila@unex.es>
Cc: 284637-done@bugs.debian.org, bug-gnu-gettext@gnu.org
Subject: Re: Bug#284637: wrong location or perms on /usr/bin/gettext.sh (fwd)
Date: Sat, 11 Dec 2004 14:55:37 +0100
martin f krafft wrote:
> In any case, the location will be well-defined on any Debian system, so
> it would be even better to just hardcode it.

You are mistaken here. Hardcoding paths is evil: It would not allow people
to install and use packages that make use of gettext.sh, without having write
access to system directories (which usually implies root permissions).

The only alternative to hardcoded paths is to use the search mechanism
built into /bin/sh. And it relies on $PATH.

Bruno




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 15 19:43:29 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.