Hi ! I just made my first AUR package, which was really fun, and I was wondering what your own experience was like. Why did you decide to make your first packages ? What was fun, what was annoying ? What problems did you have ? Had you been using Arch for long ?
Mine was nothing complicated, just packaging a bash game with no dependencies made by someone else… because I wanted to try it and I was too lazy to install it from source 😅 Just the thought of having to manually check for updates and reinstall exhausts me and my adhd calculated that learning how to make a package would be less effort (never try to argue with adhd maths).
I did have some trouble because the game wanted its config and other files in $HOME and didn’t create them directly (it was done by an install script run when installing it manually from source), but obviously I couldn’t make the package create them there, which really confused the hell outta me. In the end the creator of the game kindly send me links to AUR packages that other people had done for his other projects so I could see what they had done and I did and did the same, which was to put the files in the locations recommended by the specs like /etc and /usr, and to added a post-install message telling the user to copy/paste some commands to copy the files in $HOME. It’s a bit clunky but I guess it works 🥳
The fun part for me was learning more about how packages were installed, and the reason behind the specs. It’s fine reading that packages shouldn’t create files in $HOME but it doesn’t tell me WHY. Also it’s a lot more fun to try anyway even knowing it’s a bad idea, just to see what kind of mess happens (turns out it couldn’t install because /root/.config was missing 😂 )
If you had told me a year and a half ago when I switched to linux that I’d end up making a package, I’d probably have thought that you were crazy 😁
I’ve never made an arch package, but i did make a few void linux templates and nix derivations. I’ve never actually officially submitted them, just kept them in my own repo cause i wasn’t sure if i was up for maintaining them. The void templates were pretty easy to learn, they have good documentation on their github. The packages that i made templates of were pretty simple so it didn’t require too much skill or knowledge. It’s basically a bunch of bash scripts/variables/funtions that automate the build process and builds the package inside of a fake chroot. Nix derivations were a bit more tricky, eventhough the packages i built were pretty simple, just like void, but nix is… well… nix lol. often times things are more complicated in nix, but i do like using it. The main reason i wanted to make my own packages is because i hate manually compiling stuff, and littering my system with build dependencies, so i felt like it was worth learning how to automate it. At the moment i’m also busy with setting up dwl (dwm, but for wayland), which is something i never thought i would do, since i try to avoid having to compile things, but nix actually makes it super easy to add patches and my own config.h through overlays and overrides, so it’s been pretty straightforward so far.
In the end the creator of the game kindly send me links to AUR packages that other people had done for his other projects so I could see what they had done and I did and did the same, which was to put the files in the locations recommended by the specs like /etc and /usr, and to added a post-install message telling the user to copy/paste some commands to copy the files in $HOME. It’s a bit clunky but I guess it works 🥳
Curious, if it was the tui-mines and tui-sudoku packages you took inspiration from? If that’s the case, then those are packages I maintain.
I chose to do some AUR packages, because I wanted to learn how to package for Arch, packaging guidelines and get a routine going.
I believe the reason to not mess with $HOME in packaging, is because of security. $HOME is the users private stash. To put stuff in there, from packaging, means you invade their private space and users should be able to decide what they want “dumped” in there. So just installing a package, should not put stuff in a users home folder.
Wow yes it was ! Those two, magic-tape and radion. Before the creator send me the links I had tried looking at random packages from the AUR but I didn’t have much luck finding some with the same issue, it was looking at those that really helped !
I thought the guidelines recommending not to create files in $HOME was due to technical issues with the package not managing to find the right $HOME dir, and even if it did it would make use weird permissions, I had no idea it was also for security thanks for the explanation 🙂
Congratulations!
I also created a little AUR package or two or manually fixed some broken PKGBUILDs sporadically, and yeah it’s something you can figure out in a day when you have a little bit of understanding of the command line overall.
Arch AUR is really a nice sweet spot between power and convenience.
My boss at work is using Gentoo. I guess that’s why he’s my boss. No, but seriously, the Gentoo build system sounds much more complex. Yes, you can control compilation flags and tweak every package up to absurd details, but I’m willing to sacrifice the few percent of performance.
Whereas, AUR is simple enough to be used by ADHD folks like us :D If it’s more work than a weekend project, I don’t care about it. I know I will most likely give up on it if I don’t need it to survive.
Thanks ! I was really surprised to see that the whole process wasn’t really that complicated to understand –at least for a very simple bash program, I haven’t tried yet with something that needs compiling. I too really like how convenient and ADHD friendly Arch and the AUR are, coming from Windows it’s like heaven 😭 I can’t even imagine what it must be like to use Gentoo. Or LFS, because at that point why not !