Jeffrey Walton on Fri, 01 Jan 2021 07:02:04 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
'make install' builds stuff as root |
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 Making install in Olinux-x86_64 make[1]: Entering directory '/home/jwalton/Build-Scripts/pari-2.13.0/Olinux-x86_64' mkdir -p "/home/jwalton/ok2delete-asan/share/pari"/doc cd ../doc; make doc; for f in *.dvi; do ../config/install -m 644 $f "/home/jwalton/ok2delete-asan/share/pari"/doc; done make[2]: Entering directory '/home/jwalton/Build-Scripts/pari-2.13.0/doc' rm -f develop.std tex develop This is TeX, Version 3.14159265 (TeX Live 2017/Debian) (preloaded format=tex) (./develop.tex (./parimacro.tex (./paricfg.tex) FIRST PASS No aux file.) [1] [2] [3] (./develop.aux) [4] Reference `se:dbgclosure' on page 5 undefined on input line 89 [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] (../examples/pari-mt.c [18]) [19] [20] (./index.tex [21] ) ) Output written on develop.dvi (21 pages, 46344 bytes). Transcript written on develop.log. tex develop This is TeX, Version 3.14159265 (TeX Live 2017/Debian) (preloaded format=tex) (./develop.tex (./parimacro.tex (./paricfg.tex) FIRST PASS (./develop.aux)) [1] [2] (./develop.toc) [3] (./develop.aux) [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] (../examples/pari-mt.c [18]) [19] [20] (./index.tex [21] ) ) Output written on develop.dvi (21 pages, 56908 bytes). Transcript written on develop.log. make develop.std; tex develop; rm -f develop.std make[3]: Entering directory '/home/jwalton/Build-Scripts/pari-2.13.0/doc' ... Please don't be helpful like this. Allow make to fail. Or better, see if there's an artifact in docs that can be installed. If not, just skip it. Skipping it is fine for me. I don't waste time building docs. Most of the time I don't even install tools needed for docs. When I need to RTFM I read them online from the project, like the User Guide at https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.13.0/users.pdf. Also, the stuff built as root cannot be deleted. The end of my recipes do something like this. It runs as the user account. I don't want to perform a 'rm -rf' as root in a script. ARTIFACTS=("$PARI_TAR" "$PARI_DIR") for artifact in "${ARTIFACTS[@]}"; do rm -rf "$artifact" done Jeff