因为一些原因,今天简单看了一下 makepkg 源码。
算是深深理解了「 AUR packages are user-produced content. These PKGBUILDs are completely unofficial and have not been thoroughly vetted. Any use of the provided files is at your own risk.」中的 at your own risk。
PKGBUILD 想干坏事实在是太方便了。
直接在 PKGBUILD 中写一些恶意命令,编译都没有开始,就已经 source PKGBUILD 执行完成了。
编译 AUR 的包,一定一定要在沙箱环境里进行。
AUR helper 真的要慎用,相当多的 AUR helper 没有 clean chroot ,即使有 clean chroot 功能的 AUR helpers,也都默认未启用。
Manjaro 默认的包管理工具是带有图形界面的 AUR helper Pamac,这种做法实在是有一些不负责任。
https://wiki.manjaro.org/index.php/Pamac