Yesterday on my day off I went and had breakfast and coffee. I brought my chromebook with me to do some work or at least some research on getting a working Manjaro build server that ran on another Linux distribution. At first I was a little confused at what was required.
Originally I was advised that all I needed was pacman. Great I thought, pacman is in my repositories, I’ll get pacman installed and this will be done in no time!
I proceed to take a look into manjaroiso thinking I am going to be building this in the native environment, It became apparent quite quickly that it will be a large task in order to get everything installed that I required to do the build. Things were certainly looking bleak, It certainly seemed like I was venturing forth into dependency hell at this time. I was told that if the system has pacman it will work so I kept my head high and continued brainstorming.
Well if I cannot get this stuff going via the host system maybe a chroot is more appropriate! Trying to create a chroot I ended up destroying the host system. Chroot scripts I usually use/create clean up after themselves, This one did not and I rm -rf $CHROOT_DIR without even thinking about it. That was enough with /proc /sys and /dev mounted to kill the install enough that SSH would not allow me in anymore…
I reinstalled the Host and got it up and running yesterday/tonight. Tested the Chroot again and everything ‘almost’ worked. Everything seemed to install but I got errors when trying to install things with pacman saying it did not know where /var/cache/pacman/pkg was located. Usually this means the directory does not exist, I investigated with ls /var/cache/pacman/ and the pkg directory was shown. I also ended up with an error stating that the disk was full directly after the first error. The df -h command said the disk had 23 Gigabytes free.
I scratched my head, Founding this behavior sort of perplexing. I knew something must be missing but I was not sure what. I am still not sure what I am missing but I believe if I use pacstrap to set up the chroot that it may work correctly. The pacstrap command is not within the pacman package. I had to do my research into what Arch package contained pacstrap, Finally I found that it was the arch_install_scripts package that contained pacstrap. This was one of the packages that I had assumed I may have to build while getting overwhelmed by the dependency hell scenario stated above.
Everything required by this package was in the repositories so I decided to toss them onto my system. It appears that rather than having to build 10ish ebuilds that I would only require 1 in order to have pacstrap bootstrap the build directory correctly.
I still need to learn how to create a ebuild for this package, The dependencies are building as I type this and I am gearing up for learning how to create an ebuild!
If I am correct then this process is about 100x easier than I had originally calculated.
BONUS!