[Libre-soc-dev] Running "make" as root

Cesar Strauss cestrauss at gmail.com
Sat Aug 8 14:19:40 BST 2020


Greetings,

In the dev-env-setup repository, the hdl-tool-yosys script insists on
running "git" and "make" as root.

https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-tools-yosys;h=23cbd93304876fa421e537ac7f7d674827c625e5;hb=HEAD

But root is only really needed for "apt-get" and "make install".

I believe it is generally good practice to run software as root as
little as possible.

I suggest removing the root detection guard at the top of the script,
inserting "sudo" at appropriate places, instead. As a bonus, the "chown"
and "chgrp" calls at the end are not longer needed and can be removed.

Does it make sense?

By the way, I happen to be running the dev-env-setup scripts again from
scratch, while preparing locally a new container environment for
libre-soc development.

Regards,

Cesar



More information about the Libre-soc-dev mailing list