Arkdep-build usage
Do you like the technology but do not like the provided images? No problem! You can easily build and deploy custom images should you desire to do so.
File structure
File structure archlinux type
File structure debian type
Building a custom image
First make a copy of one of the existing arkdep-build configurations in to a directory named arkdep-build.d;
Next make your edits to the configuration files in arkdep-build.d/test-arkanelinux-kde
, or another configuration of your choosing. You may also rename the test-arkanelinux-kde
directory after having copied it.
Once all the desired changes have been made you can build a new image by navigating to arkdep-build.d's parant directory and running arkdep-build.
The image will now start build, when it has finished the final image will be placed inside of a directory called target
located in the arkdep-build.d
parent directory. To then install it without using an external repository copy the achive in to the /arkdep/cache
directory and define cache as the image variant when doing a deployment.
Variant configuration
Almost anything may be removed or customized from the stock config according to your own preferences. However the system depends on libnss-extrausers
and the /etc/nsswitch.conf
to load the system user accounts stored in /usr/lib/{passwd,shadow,group}
. An alternative implementation would be nss-altfiles, which is utilized by Fedora Silverblue for this same purpose.
Extensions
Arkdep-build is written in such a way that it maintains compatibility with existing distro software repositories, it request no immutable-aware packages to function.
Build extensions allow you to make changes to the system at various steps during the build process, they can be used to make changes to the operating system as a workaround to the limitations of traditional distros when being forced in to an immutable context. Because Arkdep managed systems are not supposed to install packages using their native package manager after deployment you are free to move, remove or change anything in the system with no fear of breakages.
Build extensions are typically not required, the main Arkdep-build script should have compatibility with most, if not all, distros within a distro family. However odd software configurations not supported by Arkdep-build may require manual intervention to function in an immutable context or during the build stage, for this you can use build extensions.
Extensions are placed in the arkdep-build.d/test-arkanelinux-kde/extensions/
directory, there are three scripts which Arkdep-build will source during the build process if available.
extensions/post_bootstrap.sh
is sourced by Arkdep-build after it finished bootstrapping the base system and overlaying overlay/post_bootstrap.extensions/post_install.sh
is sourced by Arkdep-build after installing all system packages and overlayingoverlay/post_install/
but before it performs generic modifications to the system to make it immutable compatible.extensions/post_build.sh
is sourced by Arkdep-build once the build is fully completed and exported, but before it performs a cleanup.
These scripts will have access to all the same information Arkdep-build utilizes for image creation.
Variable | Usecase |
---|---|
$build_image |
Location of virtual Btrfs disk |
$build_image_mountpoint |
The mountpoint of the build image filesystem |
$build_image_size |
Size of the build image in syntax accepted by fallocate |
$workdir |
Working directory to which the root filesystem is installed, typically set to $build_image_mountpoint/rootfs |
$variant |
Name of the image variant we are building, arkdep-build.d/$variant would resolve the variant configuration location |
$variantdir |
Location of variant |
Update.sh
Update.sh is used to perform minor changes to the system or handle minor breaking updates.
Variable | Explanation |
---|---|
${data[0]} |
The image name, eg. aabbcc123 |
${data[1]} |
The tarball compression method, eg. zst |
${data[2]} |
Image SHA checksum, could be any SHA variant |
$arkdep_dir |
Arkdep's location on the filesystem, eg. /arkdep |
$arkdep_boot |
The boot directory location on the filesystem, eg. /boot |
Dependencies
Using depends.list
Arkdep-build variants can define other variants as dependencies, these dependencies will extend the package lists and overlays of said variant with the contents of the defined variants.
The depends.list
file contains simple file paths pointing at other variants located inside of arkdep-build.d
, multiple dependencies can be defined.
Reference material
The primary Arkane Linux configuration and several testing one can be found on either Github or Codeberg. If you have Arkane Linux already installed these configs can also be found locally in /etc/arkdep
.