Am 07.05.25 um 14:40 schrieb Simon Josefsson:
Matthias Urlichs <matth...@urlichs.de> writes:

On 07.05.25 12:00, Santiago Vila wrote:
For example, some configure script might look in
the PATH and decide that sh is in /usr/bin and ship shell scripts
as #!/usr/bin/sh.

That's not a problem, because today's default (according to my
/etc/login.defs) is "/usr/local/bin:/usr/bin:/bin" (plus /sbin for
root, plus …/games for non-root), i.e. with the symlinks last.

One problem is that there is no policy on what PATH can or should be
when building a Debian package, or is there?

There isn't and probably it would make sense to have a Debian policy bug about this.

Personally I think it doesn't make sense to keep the aliased paths (i.e. /bin and /sbin) in PATH (in Debian). Aside from a minor astetic pov, it's also two paths less that need to be checked.


So if some package build system (like mine) uses 'setpriv' to drop
privileges they will get /bin before /usr/bin, and in this situation
Santiago's concerns apply.

I think a reasonable conservative system policy is PATH=/usr/bin and
anything beyond that is something the user or system administrator have
to add.  I think we should give up on /usr/games and move those
executables to /usr/bin, renaming any binaries that conflict.


We discussed /usr/games in the #debian-usrmerge IRC channel a couple of months ago. The overall consensus was, that /usr/games is an oddity, probably stemming from FHS which not a lot of distros are following (e.g. Fedora doesn't ship any executable in /usr/games).

Debian itself doesn't follow it it consistently either. We have games packages shipping binaries in /usr/bin and also in /usr/games.

I personally think that games aren't particularly special in any way that would warrant them being shipped in a separate directory so I would welcome if /usr/games became an empty directory (i.e. we move all binaries to /usr/bin).

There are a couple of file conflicts (I think cacin has done an analysis on that), and the numbers aren't that high.

That said, around 750 packages are shipping about 1300 binaries in /usr/games. So that would be quite a bit of churn to update them all to move to /usr/bin. Thankfully, this would be quite an easy change compared to usrmove, as we wouldn't have any dpkg related file losses due to aliasing.

Michael


Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to