2017-12-12 20:24:34 +00:00
|
|
|
|
|
|
|
SUMMARY = "Subgraph OS Citadel image builder"
|
|
|
|
LICENSE = "MIT"
|
|
|
|
|
2018-01-18 23:22:23 +00:00
|
|
|
SYSTEMD_DEFAULT_TARGET = "graphical.target"
|
|
|
|
|
2019-01-15 17:13:12 +00:00
|
|
|
ROOTFS_POSTPROCESS_COMMAND += "set_citadel_user_password; symlink_lib64; setup_var; append_os_release;"
|
2018-01-18 23:22:23 +00:00
|
|
|
|
|
|
|
IMAGE_INSTALL += "\
|
2018-12-31 23:37:43 +00:00
|
|
|
packagegroup-citadel-base \
|
2018-03-27 02:52:49 +00:00
|
|
|
packagegroup-citadel \
|
2018-01-18 23:22:23 +00:00
|
|
|
"
|
|
|
|
|
2018-12-31 23:37:43 +00:00
|
|
|
CITADEL_IMAGE_VERSION = "${CITADEL_IMAGE_VERSION_rootfs}"
|
|
|
|
CITADEL_IMAGE_TYPE = "rootfs"
|
|
|
|
|
|
|
|
require citadel-image.inc
|
|
|
|
inherit citadel-image
|
|
|
|
|
2018-01-18 23:22:23 +00: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-13 03:10:54 +00:00
|
|
|
|
2018-02-17 22:44:33 +00: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 22:26:13 +00:00
|
|
|
install -m 0755 -d ${IMAGE_ROOTFS}/home/citadel/.local/share/applications
|
|
|
|
chown -R 1000:1000 ${IMAGE_ROOTFS}/home/citadel/.local
|
2018-02-17 22:44:33 +00:00
|
|
|
|
2018-02-19 16:45:30 +00:00
|
|
|
rmdir ${IMAGE_ROOTFS}/var/log/journal
|
|
|
|
|
2018-02-17 22:44:33 +00: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
|
|
|
|
|
2019-04-02 19:46:54 +00:00
|
|
|
cp -r ${IMAGE_ROOTFS}/usr/share/factory/skel/.??* ${IMAGE_ROOTFS}/home/citadel
|
|
|
|
cp -r ${IMAGE_ROOTFS}/usr/share/factory/skel/.??* ${IMAGE_ROOTFS}/home/root
|
2018-02-17 22:44:33 +00:00
|
|
|
mv ${IMAGE_ROOTFS}/home/citadel ${IMAGE_ROOTFS}/usr/share/factory/home
|
|
|
|
mv ${IMAGE_ROOTFS}/home/root ${IMAGE_ROOTFS}/usr/share/factory/home
|
|
|
|
|
2018-02-21 05:38:35 +00:00
|
|
|
rm ${IMAGE_ROOTFS}/usr/share/gnome-shell/gnome-shell-theme.gresource
|
2019-01-15 17:13:12 +00:00
|
|
|
ln -sf /opt/share/themes/Adapta-Eta/gnome-shell/gnome-shell-theme.gresource ${IMAGE_ROOTFS}/usr/share/gnome-shell/gnome-shell-theme.gresource
|
2018-02-21 05:30:28 +00:00
|
|
|
|
2019-01-02 18:23:45 +00:00
|
|
|
ln -sf /opt/share/themes/Adapta ${IMAGE_ROOTFS}/usr/share/themes/Adapta
|
|
|
|
ln -sf /opt/share/themes/Adapta-Eta ${IMAGE_ROOTFS}/usr/share/themes/Adapta-Eta
|
|
|
|
ln -sf /opt/share/themes/Adapta-Nokto ${IMAGE_ROOTFS}/usr/share/themes/Adapta-Nokto
|
|
|
|
ln -sf /opt/share/themes/Adapta-Nokto-Eta ${IMAGE_ROOTFS}/usr/share/themes/Adapta-Nokto-Eta
|
|
|
|
ln -sf /opt/share/icons/Paper ${IMAGE_ROOTFS}/usr/share/icons/Paper
|
|
|
|
ln -sf /opt/share/icons/Adwaita ${IMAGE_ROOTFS}/usr/share/icons/Adwaita
|
|
|
|
ln -sf /opt/share/backgrounds/gnome ${IMAGE_ROOTFS}/usr/share/backgrounds/gnome
|
|
|
|
ln -sf /opt/share/gnome-background-properties ${IMAGE_ROOTFS}/usr/share/gnome-background-properties
|
|
|
|
|
2018-02-17 22:44:33 +00:00
|
|
|
# do_rootfs() will fail otherwise
|
|
|
|
ln -sf ../usr/share/factory/var/lib ${IMAGE_ROOTFS}/var/lib
|
|
|
|
}
|
|
|
|
|
2019-01-06 03:38:18 +00:00
|
|
|
append_os_release() {
|
|
|
|
echo "CITADEL_CHANNEL=\"${CITADEL_IMAGE_CHANNEL}\"" >> ${IMAGE_ROOTFS}/etc/os-release
|
|
|
|
echo "CITADEL_ROOTFS_VERSION=\"${CITADEL_IMAGE_VERSION_rootfs}\"" >> ${IMAGE_ROOTFS}/etc/os-release
|
|
|
|
}
|
|
|
|
|
2018-02-17 22:44:33 +00:00
|
|
|
do_rm_var_link() {
|
|
|
|
rm ${IMAGE_ROOTFS}/var/lib
|
|
|
|
}
|
|
|
|
|
|
|
|
addtask rm_var_link after do_rootfs before do_image_qa
|
|
|
|
|
2018-02-13 03:10:54 +00:00
|
|
|
symlink_lib64() {
|
|
|
|
ln -s /usr/lib ${IMAGE_ROOTFS}/lib64
|
|
|
|
}
|