#958647 live-build: becoming root requires 'su -'

#958647#5
Date:
2020-04-23 23:39:08 UTC
From:
To:
Dear Maintainer,

If "lb build" runs in a shell where it cannot access the commands it
needs, it terminates with a non-useful error message. In my case, the
message said I needed to install debootstrap, when the real problem was a
much broader issue with the shell environment.
Specifically, I use live-build to build a system with somewhat different
choice of packages than the official Debian Live releases. Meanwhile, on
the system where I host live-build, I have been going back and forth
between stretch and buster (or later releases of Debian) trying to isolate
an unrelated bug. I was able to build the target live image I wanted with
the host running stretch, and I expected to be able to do the same thing
under buster or later. However, after upgrading to buster (or newer) "lb
build" would exit prematurely with messages:
   [2020-04-22 13:51:36] lb bootstrap_debootstrap
   E: debootstrap - command not found
   I: debootstrap can be obtained from
http://ftp.debian.org/debian/pool/main/d/debootstrap/
   I: On Debian based systems, debootstrap can be installed with 'apt-get
install debootstrap'.
These messages are not helpful, since debootstrap is correctly installed.
I eventually figured out this was a problem with the host's $PATH
environment variable. I was configuring the live system as normal user and
then using su to run "lb build". Unfortunately, su sets $PATH differently
between stretch and later releases of Debian. If I instead use "su -" with
buster or later, then "lb build" results in a live image just like it did
with stretch. Either "su" or "su -" works under stretch.

#958647#10
Date:
2021-02-18 07:35:51 UTC
From:
To:
retitle 958647 live-build: becoming root requires 'su -'
tags 958647 wontfix confirmed
thanks

Hello farrier,

This is neither a bug in live-build, nor in util-linux, it has become
the intended behaviour of 'su'.

The documentation for util-linux 2.32-0.4 [1] explains that 'su -' is
the recommended way to become root since 2018-08-03.

With kind regards,
Roland Clobus

[1] /usr/share/doc/util-linux/NEWS.Debian.gz