diff --git a/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb b/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb new file mode 100644 index 0000000..ed4e436 --- /dev/null +++ b/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb @@ -0,0 +1,73 @@ +# Copyright (C) 2018 Bruce Leidl +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "" +HOMEPAGE = "" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +SECTION = "" +DEPENDS = "" + +SRC_URI = "\ + file://locale.conf \ + file://environment.sh \ + file://fstab \ + file://99-grsec-debootstrap.conf \ + file://90-citadel-sysctl.conf \ + file://citadel-network.rules \ + file://citadel-ifconfig.sh \ + file://00-storage-tmpfiles.conf \ + file://NetworkManager.conf \ + file://zram-swap.service \ + file://share/dot.vimrc \ + file://polkit/citadel.rules \ +" + +# for citadel-ifconfig.sh +RDEPENDS_${PN} = "bash" + +inherit systemd +SYSTEMD_SERVICE_${PN} = "zram-swap.service" + +do_install() { + install -m 0755 -d ${D}/storage + install -m 0755 -d ${D}/realms + install -d ${D}${libdir}/sysctl.d + install -m 0755 -d ${D}${libexecdir} + install -m 0755 -d ${D}${sysconfdir}/profile.d + install -m 0755 -d ${D}${sysconfdir}/skel + install -m 0755 -d ${D}${sysconfdir}/tmpfiles.d + install -m 0755 -d ${D}${sysconfdir}/udev/rules.d + install -m 0755 -d ${D}${sysconfdir}/NetworkManager + install -m 0755 -d ${D}${sysconfdir}/polkit-1/rules.d + install -m 0700 -d ${D}${localstatedir}/lib/NetworkManager + install -m 0700 -d ${D}${localstatedir}/lib/NetworkManager/system-connections + + install -m 0644 ${WORKDIR}/locale.conf ${D}${sysconfdir}/locale.conf + install -m 0644 ${WORKDIR}/environment.sh ${D}${sysconfdir}/profile.d/environment.sh + install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab + install -m 0644 ${WORKDIR}/00-storage-tmpfiles.conf ${D}${sysconfdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/NetworkManager.conf ${D}${sysconfdir}/NetworkManager + + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/zram-swap.service ${D}${systemd_system_unitdir} + + # disable some pax and grsecurity features so that debootstrap will work + # this should be removed later + install -m 0644 ${WORKDIR}/99-grsec-debootstrap.conf ${D}${libdir}/sysctl.d/ + + install -m 0644 ${WORKDIR}/90-citadel-sysctl.conf ${D}${libdir}/sysctl.d/ + + install -m 0644 ${WORKDIR}/citadel-network.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0755 ${WORKDIR}/citadel-ifconfig.sh ${D}${libexecdir} + + install -m 0755 ${WORKDIR}/share/dot.vimrc ${D}${sysconfdir}/skel/.vimrc + + install -m 0755 ${WORKDIR}/polkit/citadel.rules ${D}${sysconfdir}/polkit-1/rules.d/ + + ln -s /storage/citadel-state/resolv.conf ${D}${sysconfdir}/resolv.conf + ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf + ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf +} + +FILES_${PN} = "/" diff --git a/meta-citadel/recipes-core/base-files/files/00-storage-tmpfiles.conf b/meta-citadel/recipes-citadel/citadel-config/files/00-storage-tmpfiles.conf similarity index 100% rename from meta-citadel/recipes-core/base-files/files/00-storage-tmpfiles.conf rename to meta-citadel/recipes-citadel/citadel-config/files/00-storage-tmpfiles.conf diff --git a/meta-citadel/recipes-core/base-files/files/90-citadel-sysctl.conf b/meta-citadel/recipes-citadel/citadel-config/files/90-citadel-sysctl.conf similarity index 100% rename from meta-citadel/recipes-core/base-files/files/90-citadel-sysctl.conf rename to meta-citadel/recipes-citadel/citadel-config/files/90-citadel-sysctl.conf diff --git a/meta-citadel/recipes-core/base-files/files/99-grsec-debootstrap.conf b/meta-citadel/recipes-citadel/citadel-config/files/99-grsec-debootstrap.conf similarity index 100% rename from meta-citadel/recipes-core/base-files/files/99-grsec-debootstrap.conf rename to meta-citadel/recipes-citadel/citadel-config/files/99-grsec-debootstrap.conf diff --git a/meta-citadel/recipes-core/base-files/files/NetworkManager.conf b/meta-citadel/recipes-citadel/citadel-config/files/NetworkManager.conf similarity index 100% rename from meta-citadel/recipes-core/base-files/files/NetworkManager.conf rename to meta-citadel/recipes-citadel/citadel-config/files/NetworkManager.conf diff --git a/meta-citadel/recipes-core/base-files/files/citadel-ifconfig.sh b/meta-citadel/recipes-citadel/citadel-config/files/citadel-ifconfig.sh similarity index 100% rename from meta-citadel/recipes-core/base-files/files/citadel-ifconfig.sh rename to meta-citadel/recipes-citadel/citadel-config/files/citadel-ifconfig.sh diff --git a/meta-citadel/recipes-core/base-files/files/citadel-network.rules b/meta-citadel/recipes-citadel/citadel-config/files/citadel-network.rules similarity index 100% rename from meta-citadel/recipes-core/base-files/files/citadel-network.rules rename to meta-citadel/recipes-citadel/citadel-config/files/citadel-network.rules diff --git a/meta-citadel/recipes-core/base-files/files/environment.sh b/meta-citadel/recipes-citadel/citadel-config/files/environment.sh similarity index 100% rename from meta-citadel/recipes-core/base-files/files/environment.sh rename to meta-citadel/recipes-citadel/citadel-config/files/environment.sh diff --git a/meta-citadel/recipes-core/base-files/files/fstab b/meta-citadel/recipes-citadel/citadel-config/files/fstab similarity index 100% rename from meta-citadel/recipes-core/base-files/files/fstab rename to meta-citadel/recipes-citadel/citadel-config/files/fstab diff --git a/meta-citadel/recipes-core/base-files/files/locale.conf b/meta-citadel/recipes-citadel/citadel-config/files/locale.conf similarity index 100% rename from meta-citadel/recipes-core/base-files/files/locale.conf rename to meta-citadel/recipes-citadel/citadel-config/files/locale.conf diff --git a/meta-citadel/recipes-core/base-files/files/polkit/citadel.rules b/meta-citadel/recipes-citadel/citadel-config/files/polkit/citadel.rules similarity index 100% rename from meta-citadel/recipes-core/base-files/files/polkit/citadel.rules rename to meta-citadel/recipes-citadel/citadel-config/files/polkit/citadel.rules diff --git a/meta-citadel/recipes-core/base-files/files/share/dot.bashrc b/meta-citadel/recipes-citadel/citadel-config/files/share/dot.bashrc similarity index 100% rename from meta-citadel/recipes-core/base-files/files/share/dot.bashrc rename to meta-citadel/recipes-citadel/citadel-config/files/share/dot.bashrc diff --git a/meta-citadel/recipes-core/base-files/files/share/dot.profile b/meta-citadel/recipes-citadel/citadel-config/files/share/dot.profile similarity index 100% rename from meta-citadel/recipes-core/base-files/files/share/dot.profile rename to meta-citadel/recipes-citadel/citadel-config/files/share/dot.profile diff --git a/meta-citadel/recipes-core/base-files/files/share/dot.vimrc b/meta-citadel/recipes-citadel/citadel-config/files/share/dot.vimrc similarity index 100% rename from meta-citadel/recipes-core/base-files/files/share/dot.vimrc rename to meta-citadel/recipes-citadel/citadel-config/files/share/dot.vimrc diff --git a/meta-citadel/recipes-core/base-files/files/zram-swap.service b/meta-citadel/recipes-citadel/citadel-config/files/zram-swap.service similarity index 100% rename from meta-citadel/recipes-core/base-files/files/zram-swap.service rename to meta-citadel/recipes-citadel/citadel-config/files/zram-swap.service diff --git a/meta-citadel/recipes-core/citadel-desktop-gsettings/citadel-desktop-gsettings.bb b/meta-citadel/recipes-citadel/citadel-desktop-gsettings/citadel-desktop-gsettings.bb similarity index 100% rename from meta-citadel/recipes-core/citadel-desktop-gsettings/citadel-desktop-gsettings.bb rename to meta-citadel/recipes-citadel/citadel-desktop-gsettings/citadel-desktop-gsettings.bb diff --git a/meta-citadel/recipes-core/citadel-desktop-gsettings/files/90_citadel.gschema.override b/meta-citadel/recipes-citadel/citadel-desktop-gsettings/files/90_citadel.gschema.override similarity index 100% rename from meta-citadel/recipes-core/citadel-desktop-gsettings/files/90_citadel.gschema.override rename to meta-citadel/recipes-citadel/citadel-desktop-gsettings/files/90_citadel.gschema.override diff --git a/meta-citadel/recipes-core/citadel-user/citadel-user.bb b/meta-citadel/recipes-citadel/citadel-user/citadel-user.bb similarity index 100% rename from meta-citadel/recipes-core/citadel-user/citadel-user.bb rename to meta-citadel/recipes-citadel/citadel-user/citadel-user.bb diff --git a/meta-citadel/recipes-core/images/citadel-image-base.bb b/meta-citadel/recipes-citadel/images/citadel-image-base.bb similarity index 100% rename from meta-citadel/recipes-core/images/citadel-image-base.bb rename to meta-citadel/recipes-citadel/images/citadel-image-base.bb diff --git a/meta-citadel/recipes-core/images/citadel-image-minimal.bb b/meta-citadel/recipes-citadel/images/citadel-image-minimal.bb similarity index 100% rename from meta-citadel/recipes-core/images/citadel-image-minimal.bb rename to meta-citadel/recipes-citadel/images/citadel-image-minimal.bb diff --git a/meta-citadel/recipes-core/images/citadel-image.bb b/meta-citadel/recipes-citadel/images/citadel-image.bb similarity index 100% rename from meta-citadel/recipes-core/images/citadel-image.bb rename to meta-citadel/recipes-citadel/images/citadel-image.bb diff --git a/meta-citadel/recipes-core/launch-default-realm/files/launch-default-realm.path b/meta-citadel/recipes-citadel/launch-default-realm/files/launch-default-realm.path similarity index 100% rename from meta-citadel/recipes-core/launch-default-realm/files/launch-default-realm.path rename to meta-citadel/recipes-citadel/launch-default-realm/files/launch-default-realm.path diff --git a/meta-citadel/recipes-core/launch-default-realm/files/launch-default-realm.service b/meta-citadel/recipes-citadel/launch-default-realm/files/launch-default-realm.service similarity index 100% rename from meta-citadel/recipes-core/launch-default-realm/files/launch-default-realm.service rename to meta-citadel/recipes-citadel/launch-default-realm/files/launch-default-realm.service diff --git a/meta-citadel/recipes-core/launch-default-realm/files/watch-run-user.path b/meta-citadel/recipes-citadel/launch-default-realm/files/watch-run-user.path similarity index 100% rename from meta-citadel/recipes-core/launch-default-realm/files/watch-run-user.path rename to meta-citadel/recipes-citadel/launch-default-realm/files/watch-run-user.path diff --git a/meta-citadel/recipes-core/launch-default-realm/files/watch-run-user.service b/meta-citadel/recipes-citadel/launch-default-realm/files/watch-run-user.service similarity index 100% rename from meta-citadel/recipes-core/launch-default-realm/files/watch-run-user.service rename to meta-citadel/recipes-citadel/launch-default-realm/files/watch-run-user.service diff --git a/meta-citadel/recipes-core/launch-default-realm/launch-default-realm.bb b/meta-citadel/recipes-citadel/launch-default-realm/launch-default-realm.bb similarity index 100% rename from meta-citadel/recipes-core/launch-default-realm/launch-default-realm.bb rename to meta-citadel/recipes-citadel/launch-default-realm/launch-default-realm.bb diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-citadel-base.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb similarity index 98% rename from meta-citadel/recipes-core/packagegroups/packagegroup-citadel-base.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb index 93024b9..64861cd 100644 --- a/meta-citadel/recipes-core/packagegroups/packagegroup-citadel-base.bb +++ b/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb @@ -14,6 +14,7 @@ BASH_COMPLETION = "\ " RDEPENDS_${PN} = "\ + citadel-config \ base-files \ base-passwd \ systemd \ diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-citadel.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel.bb similarity index 100% rename from meta-citadel/recipes-core/packagegroups/packagegroup-citadel.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel.bb diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-desktop.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-desktop.bb similarity index 100% rename from meta-citadel/recipes-core/packagegroups/packagegroup-desktop.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-desktop.bb diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-firmware.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-firmware.bb similarity index 100% rename from meta-citadel/recipes-core/packagegroups/packagegroup-firmware.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-firmware.bb diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-gnome.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-gnome.bb similarity index 100% rename from meta-citadel/recipes-core/packagegroups/packagegroup-gnome.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-gnome.bb diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-sway.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-sway.bb similarity index 100% rename from meta-citadel/recipes-core/packagegroups/packagegroup-sway.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-sway.bb diff --git a/meta-citadel/recipes-core/packagegroups/packagegroup-theme.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-theme.bb similarity index 100% rename from meta-citadel/recipes-core/packagegroups/packagegroup-theme.bb rename to meta-citadel/recipes-citadel/packagegroups/packagegroup-theme.bb diff --git a/meta-citadel/recipes-core/base-files/base-files_%.bbappend b/meta-citadel/recipes-core/base-files/base-files_%.bbappend index 58091bd..f9da04c 100644 --- a/meta-citadel/recipes-core/base-files/base-files_%.bbappend +++ b/meta-citadel/recipes-core/base-files/base-files_%.bbappend @@ -1,68 +1,11 @@ - hostname="subgraph" -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += "\ - file://locale.conf \ - file://environment.sh \ - file://fstab \ - file://99-grsec-debootstrap.conf \ - file://90-citadel-sysctl.conf \ - file://citadel-network.rules \ - file://citadel-ifconfig.sh \ - file://00-storage-tmpfiles.conf \ - file://NetworkManager.conf \ - file://zram-swap.service \ - file://share/dot.vimrc \ - file://polkit/citadel.rules \ -" dirs1777_remove = "${localstatedir}/volatile/tmp" + dirs755="/boot /dev /usr/bin /usr/sbin /usr/lib /etc /etc/default /etc/skel /usr/lib /mnt /proc /home/root /run /usr /usr/bin /usr/share/doc/base-files-3.0.14 /usr/include /usr/lib /usr/sbin /usr/share /usr/share/common-licenses /usr/share/info /usr/share/man /usr/share/misc /var /sys /home /media" volatiles = "" -inherit systemd -SYSTEMD_SERVICE_${PN} = "zram-swap.service" - -# for citadel-ifconfig.sh -RDEPENDS_${PN} = "bash" - do_install_append () { - install -m 0755 -d ${D}/storage - install -m 0755 -d ${D}/realms - install -d ${D}${libdir}/sysctl.d - install -m 0755 -d ${D}${libexecdir} - install -m 0755 -d ${D}${sysconfdir}/profile.d - install -m 0755 -d ${D}${sysconfdir}/tmpfiles.d - install -m 0755 -d ${D}${sysconfdir}/udev/rules.d - install -m 0755 -d ${D}${sysconfdir}/NetworkManager - install -m 0755 -d ${D}${sysconfdir}/polkit-1/rules.d - install -m 0700 -d ${D}${localstatedir}/lib/NetworkManager - install -m 0700 -d ${D}${localstatedir}/lib/NetworkManager/system-connections - - install -m 0644 ${WORKDIR}/locale.conf ${D}${sysconfdir}/locale.conf - install -m 0644 ${WORKDIR}/environment.sh ${D}${sysconfdir}/profile.d/environment.sh - install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab - install -m 0644 ${WORKDIR}/00-storage-tmpfiles.conf ${D}${sysconfdir}/tmpfiles.d - install -m 0644 ${WORKDIR}/NetworkManager.conf ${D}${sysconfdir}/NetworkManager - - install -d ${D}${systemd_system_unitdir} - install -m 644 ${WORKDIR}/zram-swap.service ${D}${systemd_system_unitdir} - - # disable some pax and grsecurity features so that debootstrap will work - # this should be removed later - install -m 0644 ${WORKDIR}/99-grsec-debootstrap.conf ${D}${libdir}/sysctl.d/ - - install -m 0644 ${WORKDIR}/90-citadel-sysctl.conf ${D}${libdir}/sysctl.d/ - - install -m 0644 ${WORKDIR}/citadel-network.rules ${D}${sysconfdir}/udev/rules.d/ - install -m 0755 ${WORKDIR}/citadel-ifconfig.sh ${D}${libexecdir} - - install -m 0755 ${WORKDIR}/share/dot.vimrc ${D}${sysconfdir}/skel/.vimrc - - install -m 0755 ${WORKDIR}/polkit/citadel.rules ${D}${sysconfdir}/polkit-1/rules.d/ - - ln -s /storage/citadel-state/resolv.conf ${D}${sysconfdir}/resolv.conf - ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf - ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf + rm ${D}${sysconfdir}/fstab }