From 310ac97c56a40c760dacfbcfcc19cce1938bbdb5 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Fri, 3 May 2024 17:11:18 +0200 Subject: [PATCH] feat: add all packages and files --- Containerfile | 17 +++++- build.sh | 22 +++++--- cosign.pub | 4 ++ files/etc/yum.repos.d/docker-ce.repo | 6 ++ files/etc/yum.repos.d/tailscale.repo | 8 +++ packages | 84 ++++++++++++++++++++++++++++ 6 files changed, 130 insertions(+), 11 deletions(-) create mode 100644 cosign.pub create mode 100644 files/etc/yum.repos.d/docker-ce.repo create mode 100644 files/etc/yum.repos.d/tailscale.repo create mode 100644 packages diff --git a/Containerfile b/Containerfile index 5d08ad5..86eecee 100644 --- a/Containerfile +++ b/Containerfile @@ -2,7 +2,7 @@ # These allow changing the produced image by passing different build args to adjust # the source from which your image is built. # Build args can be provided on the commandline when building locally with: -# podman build -f Containerfile --build-arg FEDORA_VERSION=40 -t local-image +# podman build -f Containerfile --build-arg FEDORA_MAJOR_VERSION=40 -t local-image # SOURCE_IMAGE arg can be anything from ublue upstream which matches your desired version: # See list here: https://github.com/orgs/ublue-os/packages?repo_name=main @@ -15,7 +15,7 @@ # - "base" # # "aurora", "bazzite", "bluefin" or "ucore" may also be used but have different suffixes. -ARG SOURCE_IMAGE="silverblue" +ARG SOURCE_IMAGE="base" ## SOURCE_SUFFIX arg should include a hyphen and the appropriate suffix name # These examples all work for silverblue/kinoite/sericea/onyx/lazurite/vauxite/base @@ -33,25 +33,36 @@ ARG SOURCE_IMAGE="silverblue" # - stable-zfs # - stable-nvidia-zfs # - (and the above with testing rather than stable) -ARG SOURCE_SUFFIX="-main" +ARG SOURCE_SUFFIX="-nvidia" ## SOURCE_TAG arg must be a version built for the specific image: eg, 39, 40, gts, latest ARG SOURCE_TAG="latest" +ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ### 2. SOURCE IMAGE ## this is a standard Containerfile FROM using the build ARGs above to select the right upstream image FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${SOURCE_TAG} +ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ### 3. MODIFICATIONS ## make modifications desired in your image and install packages by modifying the build.sh script ## the following RUN directive does all the things required to run "build.sh" as recommended. +COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-just / +COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-udev-rules / +COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-update-services / +COPY --from=ghcr.io/ublue-os/bluefin:latest /usr/share/fish /usr/share/fish +COPY files / COPY build.sh /tmp/build.sh +COPY packages /tmp/packages RUN mkdir -p /var/lib/alternatives && \ /tmp/build.sh && \ + fc-cache --system-only --really-force --verbose && \ + mkdir -p /var/tmp && \ + chmod -R 1777 /var/tmp && \ ostree container commit ## NOTES: # - /var/lib/alternatives is required to prevent failure with some RPM installs diff --git a/build.sh b/build.sh index 0ca1678..05c61cf 100755 --- a/build.sh +++ b/build.sh @@ -4,20 +4,26 @@ set -ouex pipefail RELEASE="$(rpm -E %fedora)" +### Add repos + +# Add Staging repo +curl -Lo /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo + +# Add Bling repo +curl -Lo /etc/yum.repos.d/ublue-os-bling-fedora-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/ublue-os/bling/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-bling-fedora-"${FEDORA_MAJOR_VERSION}".repo + +curl -Lo /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo + +curl -Lo /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/che/nerd-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/che-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo ### Install packages -# Packages can be installed from any enabled yum repo on the image. -# RPMfusion repos are available by default in ublue main images -# List of rpmfusion packages can be found here: -# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1 - -# this installs a package from fedora repos -rpm-ostree install screen +grep -v '^#' /tmp/packages | xargs rpm-ostree install # this would install a package from rpmfusion # rpm-ostree install vlc -#### Example for enabling a System Unit File +#### Services systemctl enable podman.socket +systemctl enable tailscaled.service diff --git a/cosign.pub b/cosign.pub new file mode 100644 index 0000000..85622bc --- /dev/null +++ b/cosign.pub @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEG8A6iUv3QkDjv8o9Bjq1xhsWr/fo +JXdGPebPTfZQpX/zMdP32WenP6s8kSdlfGI3c2nqM3EWOTebfjrH4O3NbQ== +-----END PUBLIC KEY----- diff --git a/files/etc/yum.repos.d/docker-ce.repo b/files/etc/yum.repos.d/docker-ce.repo new file mode 100644 index 0000000..44c7e71 --- /dev/null +++ b/files/etc/yum.repos.d/docker-ce.repo @@ -0,0 +1,6 @@ +[docker-ce-stable] +name=Docker CE Stable - $basearch +baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable +enabled=1 +gpgcheck=1 +gpgkey=https://download.docker.com/linux/fedora/gpg \ No newline at end of file diff --git a/files/etc/yum.repos.d/tailscale.repo b/files/etc/yum.repos.d/tailscale.repo new file mode 100644 index 0000000..9af9b49 --- /dev/null +++ b/files/etc/yum.repos.d/tailscale.repo @@ -0,0 +1,8 @@ +[tailscale-stable] +name=Tailscale stable +baseurl=https://pkgs.tailscale.com/stable/fedora/$basearch +enabled=1 +type=rpm +repo_gpgcheck=0 +gpgcheck=0 +gpgkey=https://pkgs.tailscale.com/stable/fedora/repo.gpg \ No newline at end of file diff --git a/packages b/packages new file mode 100644 index 0000000..ff18eb4 --- /dev/null +++ b/packages @@ -0,0 +1,84 @@ +# Compositor +xorg-x11-server-Xwayland +river + +# apps +foot +mako +waybar +kanshi +fuzzel + +# fonts +nerd-fonts +fontawesome-fonts-all + +# lock +swayidle +swaylock + +# utility +slurp +grimshot +wev +wl-clipboard +brightnessctl +wlr-randr + +# portal +xdg-desktop-portal-wlr +xdg-desktop-portal-gtk + +# containers +docker-ce +docker-ce-cli +docker-buildx-plugin +docker-compose-plugin +incus +incus-agent +podman +podman-compose +podman-tui +podmansh + +# emulation +libvirt +qemu-char-spice +qemu-device-display-virtio-gpu +qemu-device-display-virtio-vga +qemu-device-usb-redirect +qemu-img +qemu-system-x86-core +qemu-user-binfmt +qemu-user-static +qemu +virt-manager +virt-viewer + +# env +polkit +xdg-user-dirs +dbus-tools +dbus-daemon +vulkan-tools + +# networking +network-manager-applet +bluez +bluez-tools +blueman +tailscale +wireguard-tools + +# sound +pipewire +wireplumber +pamixer + +# shell +fish +zsh + +# classic dev tools +gcc +make