From da1b3f9ca2cf276f277b9357a4ceaadfa7c3937e Mon Sep 17 00:00:00 2001 From: Tulili Date: Fri, 30 Jun 2023 06:02:23 -0300 Subject: [PATCH] feat: integrate bling repo (#105) includes everything from the bling repository to this repository (COPY) and removes features now ingested from bling --------- Co-authored-by: ER --- Containerfile | 12 ++- usr/bin/.gitkeep | 0 usr/bin/ublue-nix-install | 130 ---------------------------- usr/bin/ublue-nix-uninstall | 86 ------------------ usr/share/ublue-os/just/custom.just | 27 +----- 5 files changed, 15 insertions(+), 240 deletions(-) create mode 100644 usr/bin/.gitkeep delete mode 100644 usr/bin/ublue-nix-install delete mode 100755 usr/bin/ublue-nix-uninstall diff --git a/Containerfile b/Containerfile index 152a4eef66..2789d151ea 100644 --- a/Containerfile +++ b/Containerfile @@ -27,6 +27,15 @@ COPY usr /usr # Copy the recipe that we're building. COPY ${RECIPE} /usr/share/ublue-os/recipe.yml +# Copy nix install script and Universal Blue wallpapers RPM from Bling image +COPY --from=ghcr.io/ublue-os/bling:latest /rpms/ublue-os-wallpapers-0.1-1.fc38.noarch.rpm /tmp/ublue-os-wallpapers-0.1-1.fc38.noarch.rpm + +# Integrate bling justfiles onto image +COPY --from=ghcr.io/ublue-os/bling:latest /files/usr/share/ublue-os/just /usr/share/ublue-os/just + +# Add nix installer if you want to use it +COPY --from=ghcr.io/ublue-os/bling:latest /files/usr/bin/ublue-nix* /usr/bin + # "yq" used in build.sh and the "setup-flatpaks" just-action to read recipe.yml. # Copied from the official container image since it's not available as an RPM. COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq @@ -35,7 +44,8 @@ COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq COPY scripts /tmp/scripts # Run the build script, then clean up temp files and finalize container build. -RUN chmod +x /tmp/scripts/build.sh && \ +RUN rpm-ostree install /tmp/ublue-os-wallpapers-0.1-1.fc38.noarch.rpm && \ + chmod +x /tmp/scripts/build.sh && \ /tmp/scripts/build.sh && \ rm -rf /tmp/* /var/* && \ ostree container commit diff --git a/usr/bin/.gitkeep b/usr/bin/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/usr/bin/ublue-nix-install b/usr/bin/ublue-nix-install deleted file mode 100644 index 28c79fa257..0000000000 --- a/usr/bin/ublue-nix-install +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -# original script here: https://github.com/dnkmmr69420/nix-with-selinux/blob/main/silverblue-installer.sh -# thanks dnkmmr! - -sudo sleep 2 -echo "Adding SELinux content to /nix" -sudo semanage fcontext -a -t etc_t '/nix/store/[^/]+/etc(/.*)?' ; sudo semanage fcontext -a -t lib_t '/nix/store/[^/]+/lib(/.*)?' ; sudo semanage fcontext -a -t systemd_unit_file_t '/nix/store/[^/]+/lib/systemd/system(/.*)?' ; sudo semanage fcontext -a -t man_t '/nix/store/[^/]+/man(/.*)?' ; sudo semanage fcontext -a -t bin_t '/nix/store/[^/]+/s?bin(/.*)?' ; sudo semanage fcontext -a -t usr_t '/nix/store/[^/]+/share(/.*)?' ; sudo semanage fcontext -a -t var_run_t '/nix/var/nix/daemon-socket(/.*)?' ; sudo semanage fcontext -a -t usr_t '/nix/var/nix/profiles(/per-user/[^/]+)?/[^/]+' -sleep 1 -sudo mkdir /var/lib/nix -sleep 1 -echo "Adding SELinux content to /var/lib/nix" -sudo semanage fcontext -a -t etc_t '/var/lib/nix/store/[^/]+/etc(/.*)?' ; sudo semanage fcontext -a -t lib_t '/var/lib/nix/store/[^/]+/lib(/.*)?' ; sudo semanage fcontext -a -t systemd_unit_file_t '/var/lib/nix/store/[^/]+/lib/systemd/system(/.*)?' ; sudo semanage fcontext -a -t man_t '/var/lib/nix/store/[^/]+/man(/.*)?' ; sudo semanage fcontext -a -t bin_t '/var/lib/nix/store/[^/]+/s?bin(/.*)?' ; sudo semanage fcontext -a -t usr_t '/var/lib/nix/store/[^/]+/share(/.*)?' ; sudo semanage fcontext -a -t var_run_t '/var/lib/nix/var/nix/daemon-socket(/.*)?' ; sudo semanage fcontext -a -t usr_t '/var/lib/nix/var/nix/profiles(/per-user/[^/]+)?/[^/]+' -echo "Creating service files" -sleep 1 -sleep 1 -echo "Creating rootfs mkdir service" - -sudo tee /etc/systemd/system/mkdir-rootfs@.service <&2 -} - -if [ "$EUID" = 0 ] ; then - log WARNING "Do not run this command as root, as it won't delete proper files in your system" - exit -fi - -if [ "$USER_WARNING" = 1 ] ; then - cat <