site  contact  subhomenews

Hit roadblock building EasyArch

January 21, 2022 — BarryK

Yes, I am building EasyOS based on Arch Linux binary packages.

I had not attempted this previously, partly because Arch is a rolling release. However, a few days ago I discovered that Arch keeps snapshots of all the packages, going back many years. For example, December 31, 2021:

I knew that peebee in the Puppy Forum had created a 32-bit Arched-based pup, "arch32pup". I also discovered a few days ago that he has created "arch64pup" -- so I downloaded and booted it. Looks good.

Here is the forum thread on arch32pup:

I decided to give it a go in woofQ, using that 2021/12/31 snapshot. Had to fix some scripts in woofQ, such as '0setup', but then ran into a serious problem, the filesystem hierarchy...

I see that peebee has kept the traditional folder hierachy, and I began to see why...

I decided to embrace the Arch folder hierarchy, with, for example, /lib as a symlink to /usr/lib. Unfortunately, this opens a can of worms. It is OK for building EasyOS from Arch binary packages, however, Easy is also constructed with other packages. For example, there is the Linux kernel PET -- when woofQ tries to copy it:

cp: cannot overwrite non-directory 'rootfs-complete/lib' with directory 'linux_kernel-5.10.90-dunfell64/lib'

This is a fundamental problem. The rsync utility has a workaround for this, with the "--keep-dirlinks" option; however, 'cp' doesn't.

It is looking like I will have to keep the traditional folder hierarchy, like peebee has done. That will require a workaround, as non-Arch packages may, for example, have binary executables that expect /lib/ and /lib/, or /lib64/ and /lib64/

Have to think about it a bit more. Another very hot day here in Perth, Western Australia, hovering around 35 - 40°C for several days. A visit to the ocean is in order, then will look at this again in the evening.

Haven't been to the beach yet, the memory has returned; the Arch symlinks are not such a problem after all. Woof* was designed from scratch to build a distro from a variety of packages, and handles that "cannot overwrite non-directory" problem.

The error shown above is when '3buildeasydistro' script in woofQ copies the Linux kernel to rootfs-complete. However, packages are copied with extra code that handles that problem:

 cp -a --remove-destination packages-${DISTRO_FILE_PREFIX}/${ONEPKG}/* sandbox3/rootfs-complete/ 2> /tmp/3builddistro-cp-errlog
if [ -s /tmp/3builddistro-cp-errlog ];then

...the code detects that "cannot overwrite non-directory" in the error file, and copies it correctly.

In the case of copying the kernel, I just did this:

 #20220121 arch-linux, /lib is a symlink...
cp -a --remove-destination $KERNPKGNAMEONLY/* rootfs-complete/ 2> /tmp/3builddistro-cp-errlog
if [ -s /tmp/3builddistro-cp-errlog ];then
cp -a --remove-destination $KERNPKGNAMEONLY/lib/* rootfs-complete/usr/lib/

The PPM (Puppy Package Manager), also known as PETget in EasyOS, also has this special handling when installing packages -- see /usr/local/petget/  

Tags: easy