2017-12-12 15:24:34 -05:00
|
|
|
|
|
|
|
SUMMARY = "Subgraph OS Citadel image builder"
|
|
|
|
LICENSE = "MIT"
|
|
|
|
|
2018-01-18 18:22:23 -05:00
|
|
|
SYSTEMD_DEFAULT_TARGET = "graphical.target"
|
|
|
|
|
2017-12-12 15:24:34 -05:00
|
|
|
require citadel-image-base.bb
|
2018-01-18 18:22:23 -05:00
|
|
|
|
2018-02-17 17:44:33 -05:00
|
|
|
ROOTFS_POSTPROCESS_COMMAND += "set_citadel_user_password; symlink_lib64; setup_var; "
|
2018-01-18 18:22:23 -05:00
|
|
|
|
|
|
|
#IMAGE_FSTYPES += "ext2"
|
|
|
|
IMAGE_FSTYPES = "ext2"
|
|
|
|
|
|
|
|
IMAGE_INSTALL += "\
|
2018-03-26 22:52:49 -04:00
|
|
|
packagegroup-citadel \
|
2018-01-18 18:22:23 -05:00
|
|
|
"
|
|
|
|
|
|
|
|
set_blank_user_password() {
|
|
|
|
sed -i 's%^citadel:!:%citadel::%' ${IMAGE_ROOTFS}/etc/shadow
|
|
|
|
}
|
|
|
|
|
|
|
|
set_citadel_user_password() {
|
|
|
|
# crypt("citadel", "aa")
|
|
|
|
sed -i 's%^citadel:!:%citadel:aadg8rGtZzOY6:%' ${IMAGE_ROOTFS}/etc/shadow
|
|
|
|
}
|
2018-02-12 22:10:54 -05:00
|
|
|
|
2018-02-17 17:44:33 -05:00
|
|
|
setup_var() {
|
|
|
|
install -m 0755 -d ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
install -m 0755 -d ${IMAGE_ROOTFS}/usr/share/factory/home
|
|
|
|
|
2018-02-20 17:26:13 -05:00
|
|
|
install -m 0755 -d ${IMAGE_ROOTFS}/home/citadel/.local/share/applications
|
|
|
|
chown -R 1000:1000 ${IMAGE_ROOTFS}/home/citadel/.local
|
2018-02-17 17:44:33 -05:00
|
|
|
|
2018-02-19 11:45:30 -05:00
|
|
|
rmdir ${IMAGE_ROOTFS}/var/log/journal
|
|
|
|
|
2018-02-17 17:44:33 -05:00
|
|
|
mv ${IMAGE_ROOTFS}/var/lib ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
mv ${IMAGE_ROOTFS}/var/log ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
mv ${IMAGE_ROOTFS}/var/cache ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
mv ${IMAGE_ROOTFS}/var/spool ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
mv ${IMAGE_ROOTFS}/var/run ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
mv ${IMAGE_ROOTFS}/var/lock ${IMAGE_ROOTFS}/usr/share/factory/var
|
|
|
|
|
|
|
|
mv ${IMAGE_ROOTFS}/home/citadel ${IMAGE_ROOTFS}/usr/share/factory/home
|
2018-03-26 22:55:25 -04:00
|
|
|
cp ${IMAGE_ROOTFS}/etc/skel/.bashrc ${IMAGE_ROOTFS}/home/root
|
|
|
|
cp ${IMAGE_ROOTFS}/etc/skel/.profile ${IMAGE_ROOTFS}/home/root
|
|
|
|
cp ${IMAGE_ROOTFS}/etc/skel/.vimrc ${IMAGE_ROOTFS}/home/root
|
2018-02-17 17:44:33 -05:00
|
|
|
mv ${IMAGE_ROOTFS}/home/root ${IMAGE_ROOTFS}/usr/share/factory/home
|
|
|
|
|
2018-02-21 00:38:35 -05:00
|
|
|
rm ${IMAGE_ROOTFS}/usr/share/gnome-shell/gnome-shell-theme.gresource
|
|
|
|
ln -sf ../themes/Adapta-Nokto/gnome-shell/gnome-shell-theme.gresource ${IMAGE_ROOTFS}/usr/share/gnome-shell/gnome-shell-theme.gresource
|
2018-02-21 00:30:28 -05:00
|
|
|
|
2018-02-17 17:44:33 -05:00
|
|
|
# do_rootfs() will fail otherwise
|
|
|
|
ln -sf ../usr/share/factory/var/lib ${IMAGE_ROOTFS}/var/lib
|
|
|
|
}
|
|
|
|
|
|
|
|
do_rm_var_link() {
|
|
|
|
rm ${IMAGE_ROOTFS}/var/lib
|
|
|
|
}
|
|
|
|
|
|
|
|
addtask rm_var_link after do_rootfs before do_image_qa
|
|
|
|
|
2018-02-12 22:10:54 -05:00
|
|
|
symlink_lib64() {
|
|
|
|
ln -s /usr/lib ${IMAGE_ROOTFS}/lib64
|
|
|
|
}
|