Package suggestions
Just wanted to say once again this is a great tool.
I'm looking to use this in a server environment, and I had some thoughts / suggestions regarding packaging and usage.
I'm happy to contribute pull requests for any of these if you feel they are a good idea.
-
Split arkdep-build and arkdep into separate packages. (Split package build) Currently, /etc/arkdep, and /usr/bin/arkdep-build and the man page are not needed for the deployment side Could be good to separate these two out. I'm currently getting around this with NoExtract rules in pacman.conf.
-
Choose either curl, or wget. I think it would be fairly simple to replace the wget calls in the arkdep script with curl commands, and then the wget dependency could be dropped.
-
For the core arkdep package, it would be nice to make arch-install-scripts an optional dependency. I've looked at where this is used, and it seems to be used when
$arkdep_dir/layerexists and is non-empty, and it's also used for building the initramfs.
For the layering option, a check could be done early on and the deployment could be aborted, or perhaps a warning is printed that arch-install-scripts needs to be installed to use layers? If the people packaging or creating images want to include the tools they can, but it would be nice if it was not required.
For the initramfs build, I've been using ARKDEP_LEGACY_INITRAMFS=1, but I was also curious about dracut's --sysroot option which might be worth looking into.
For point 3, I've been experimenting, and I've found the following script in place of arch-chroot can be used instead at least for the initramfs build. I've not tested it with layer commands.
#!/bin/bash
root="$1"
shift
bind="/boot:/boot"
if [[ "$root" == /mnt* ]]; then
bind="/mnt/boot:/boot"
fi
/usr/bin/systemd-nspawn --bind "$bind" -D "$root" "$@"