Greetings!
With the recent malware in the AUR, I’ve tried my best to increase my (lack of) knowledge on PKGBUILDs, install scripts, etc. I’ve adjusted some options for yay. For those curious here is the yay manual, btw.
"answerdiff": "All", ##Set a predetermined answer for the edit diff menu question.
"editmenu": true, ##This menu gives you the option to edit or view PKGBUILDs before building.
"editor": "nano", ##Editor to use when editing PKGBUILDs
"removemake": "yes", ##Remove makedepends after installing packages.
"cleanAfter": true, ##Remove untracked files after installation.
"maxconcurrentdownloads": 5, ##Allows up to X concurrent downloads
"sudoloop": true, ##Loop sudo calls in the background to prevent sudo from timing out during long builds
editmenu, from my understanding, should really only be used if you know what you’re doing. I can’t confidently say I know everything about PKGBUILDs yet, but I’m learning, and I want the ability to inspect/view the PKGBUILD, which this option allows.
Warning: Yay resolves dependencies ahead of time via the RPC. It is not recommended to edit pkgbuild variables unless you know what you are doing. ( Source )
These options encourage me to review changes instead of blindly accepting updates. I’m still learning what to look for, but this helps me inspect PKGBUILDs and related file changes before building AUR packages. One thing I noticed is that my config didn’t have an editor listed. You may want to make sure the editor field points to something you actually use like nano, vim, micro, etc.
Let me know if I need to consider changing/reverting any options, I’m always open to editing something if it’s more practical a certain way.
If you’re a bit curious like me, I wanted to compare the yay defaults to my own edited config. Luckily there’s some nice commands for that!
yay -Pd ##Prints yay default config
yay -Pg ##Prints current config
yay -Pd This command helped me figure out which settings I actually changed versus what yay already defaults to.
Hopefully we can get a little discussion going about how you configure, review, or change yay to your liking. Are there any yay options you’ve enabled or disabled over the years that you think are worth considering?
And lastly, yay v13.0.0 added Lua support and I’m wondering if anyone has already written or found any useful Lua config that could help to compliment yay? Or if we just have to wait for the community to come up with some useful configs? The yay manual also has a Lua configuration page: https://jguer.github.io/yay/lua.html
Below is my config located at /home/scott/.config/yay/config.json
Summary
{
"aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/home/scott/.cache/yay",
"editor": "nano",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"answerclean": "",
"answerdiff": "All",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "",
"searchby": "name-desc",
"gitflags": "",
"removemake": "yes",
"sudobin": "sudo",
"sudoflags": "",
"version": "12.6.0",
"requestsplitn": 150,
"completionrefreshtime": 7,
"maxconcurrentdownloads": 5,
"bottomup": true,
"sudoloop": false,
"devel": false,
"cleanAfter": true,
"keepSrc": false,
"provides": true,
"pgpfetch": true,
"cleanmenu": true,
"diffmenu": true,
"editmenu": true,
"combinedupgrade": true,
"useask": false,
"batchinstall": false,
"singlelineresults": false,
"separatesources": true,
"debug": false,
"rpc": true,
"doubleconfirm": true,
"rebuild": "no"
}