Re: 'make install' builds stuff as root
Bill Allombert <[email protected]>
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <20210102123330.GC28334@yellowpig> |
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