YosysHQ / oss-cad-suite-build

Multi-platform nightly builds of open source digital design and verification tools
ISC License
774 stars 70 forks source link

reconsider 'environment' and 'activate' naming, rework darwin script #52

Open vvuk opened 1 year ago

vvuk commented 1 year ago

I was briefly confused by the activate script in the darwin distributions just removing the quarantine flag and not actually setting up the environment. pyenv etc. have for better or worse trained folks (well, some folks) to use an activate script to enter environments, and the cad suite seems like such an environment. The activate script in this distro is somewhat dangerous, because if someone does source it, it will remove quarantine recursively from whatever directory they're in and not the directory of the script.

Perhaps consider adding an activate script to all distributions, that just does the equivalent of a source environment on unix-like machines to keep compat? The quarantine removal can be done on first run, and a .quarantine-removed or something created to it doesn't get re-run.

Also, quarantine removal doesn't need sudo/find; it can just be (non-sudo) xattr -r -d com.apple.quarantine [dir].

mmicko commented 1 year ago

Hi Vladimir,

Thanks for suggestions. How about adding dequarantine as bash function (same as deactivate is available now) ? That way we can be sure that only oss-cad-suite files are modified can store flag file on proper location. Agree about point that activate script can be dangerous. In current script find is used since one of test machines is using classic HDD, so using just xattr made it very very slow, but will experiment again.