On 11/06/2017 18:11, Bruce Dubbs wrote:
> Pierre Labastie wrote:
>> On 11/06/2017 17:13, Ken Moffat wrote:
>>> On Sat, Jun 10, 2017 at 10:48:16PM -0400, Sync Ak Belore wrote:
>>>> Hi people
>>>>
>>>> A minor issue that I found is with texlive; the link pdflatex -> pdftex are
>>>> not created by the installation instruction,
>>>>
>>>> If this is normal, I wanted to suggest to create this link, I think most of
>>>> texlive users expect this link. But I am not sure if there is a difference
>>>> between a simple link pointing to pdftex and other (for me unknown)
>>>> procedure to have pdflatex.
>>>>
>>>> So what do you think about ?
>>>>
>>>> Regards
>>>>
>>>> Diego
>>>
>>> I think you are mistaken, and something went wrong :-(
>>>
>>> ken@plexi ~ $ls -l $(which pdflatex)
>>> lrwxrwxrwx 1 root root 6 Jun  5 02:52
>>> /opt/texlive/2017/bin/x86_64-linux/pdflatex -> pdftex
>>>
>>> Perhaps soemthing went wrong when you ran make texlinks (or maybe it
>>> did not run because of an earlier error).  Please note that you
>>> should NOT run it twice (on the same install), as the book says, it
>>> WILL trash the symlinks.
>>>
>>> And yes, I agree that most texlive users (certainly, everyone who
>>> uses latex) expect that link to exist.  Using pdflatex is one of the
>>> things I test on a new version / new install / new binary.
>>>
>>> ĸen
>>>
>> I think the same thing happened to me, and the reason is the following:
>> Unless you build as root, PATH is set for TeX Live only for the user account.
>> When you become root, especially using sudo, there is no way to keep the user
>> PATH (I guess "su -" would run exptrapaths.sh again, and that would do OK).
>>
>> So, it may be a good idea to source /etc/profile after becoming root.
>> Otherwise, make texlinks does not work, because it uses programs in the
>> TexLive PATH, and PATH is not set.
> 
> If you use 'sudo -E' it retains the user environment.
> 

It is slightly more complicated, and I should have checked before my first 
answer:
If there is no security policy about "secure_path", PATH is passed unchanged
to the program that is run by sudo (no need for sudo -E). But...

In BLFS, the user PATH does not have /sbin nor /usr/sbin. And those are needed
when running commands as root. The security policy may be used to set
"secure_path" to /bin:/usr/bin:/sbin:/usr/sbin. More than that, it is a good
security practice, which prevent users from adding directories writable by
themselves to the PATH and run commands with root privileges...

But if secure_path is set, then, it is always used as the PATH, whether or not
you pass -E. That's why /etc/profile needs to be sourced as root.

Pierre

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to