Bill Allombert on Sat, 02 Jan 2021 13:33:33 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: 'make install' builds stuff as root |
On Fri, Jan 01, 2021 at 01:01:49AM -0500, Jeffrey Walton wrote: > Hi Everyone, > > I don't believe this is supposed to happen. 'make install' is not > supposed to build anything. The user is responsible for creating > artifacts before 'make install' is run. 'make install' is also running > as root. We don't want programs doing things as root. > > $ ./Configure ... > ... > $ make gp > ... > $ make test-all > ... > $ sudo make install If you want to avoid that, do "make all" before "make install" like I suggested. In any case, 'sudo make install' is never quite a safe thing to do. If one want to be really cautious, one should do make install DESTDIR=$PWD/rootdir and then move the file from $PWD/rootdir to / as root using a safe update process. Your suggestion would lead to dozen of reports of people complaining that "make install" fails, even when run without sudo. Cheers, Bill