[Libre-soc-bugs] [Bug 452] New: Avoid running "make" as root

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Aug 8 15:15:33 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=452

            Bug ID: 452
           Summary: Avoid running "make" as root
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl at lkcl.net
          Reporter: cestrauss at gmail.com
                CC: libre-soc-bugs at lists.libre-soc.org
   NLnet milestone: ---

Created attachment 96
  --> https://bugs.libre-soc.org/attachment.cgi?id=96&action=edit
proposed fix

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.

Relevant mailing list discussion:

http://lists.libre-riscv.org/pipermail/libre-soc-dev/2020-August/000071.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list