On Wed, Feb 03, 2016 at 09:44:21AM -0500, Stephen Gallagher wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02/03/2016 09:35 AM, Petr Pisar wrote: > > On 2016-02-02, Florian Weimer <fweimer@xxxxxxxxxx> wrote: > >> May packages assume that /usr/sbin is on PATH when they are built? > >> > >> If you need a program which is currently only in /usr/sbin, should a > >> package use an absolute path, or reset PATH to include /usr/sbin? > >> > > When I was small, I was tought that sbin is for programs executed by > > superuser, therefore only root user's login shell adds sbin into PATH. > > > > Thus the question boils down to: What user does build the package? > > > > But I can forsee the answer for `Does Fedora support building packages as > > non-root?' The answer is `defined by koji^Wimplementation'. So does not > > have answer. > > > > I would call the programs by absolute path. > > > > Koji/mock will only build as a non-root user. > That said, we have a specific RPM macro for this: %{_sbindir}, which should be > used for calling sbin binaries. (Ditto %{_bindir} for /usr/bin binaries). Please don't. /usr/bin and /usr/sbin have been in both root's and normal users' path for ages now. Path setting is decentralized, at least util-linux [1], systemd, and gdm set it, and they all include both /usr/sbin and /usr/bin in path for users. Mock shells have it. If /usr/sbin was removed from users' path, too many things would break, and it's never going to happen. The only reason that /usr/bin and /usr/sbin are still separate is consolehelper. Using %{_sbindir} is just busywork. It is safe it too asume that is $PATH. Zbyszek [1] c.f. https://bugzilla.redhat.com/show_bug.cgi?id=1251320 -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx