fix: make use of packages.json for all images (#457)
This commit is contained in:
parent
1f85c5f9fa
commit
65f9a6f9df
3 changed files with 133 additions and 74 deletions
|
|
@ -5,13 +5,16 @@ ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}"
|
|||
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}"
|
||||
ARG TARGET_BASE="${TARGET_BASE:-bluefin}"
|
||||
|
||||
## bluefin image section
|
||||
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin
|
||||
|
||||
ARG IMAGE_NAME="${IMAGE_NAME}"
|
||||
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
|
||||
ARG PACKAGE_LIST="bluefin"
|
||||
|
||||
COPY usr /usr
|
||||
COPY etc/yum.repos.d/ /etc/yum.repos.d/
|
||||
COPY packages.json /tmp/packages.json
|
||||
COPY build.sh /tmp/build.sh
|
||||
|
||||
# gnome-vrr
|
||||
RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/gnome-vrr/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-gnome-vrr-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo
|
||||
|
|
@ -23,9 +26,6 @@ RUN wget https://copr.fedorainfracloud.org/coprs/rhcontainerbot/bootc/repo/fedor
|
|||
RUN rpm-ostree install bootc
|
||||
RUN rm -f /etc/yum.repos.d/bootc-"${FEDORA_MAJOR_VERSION}".repo
|
||||
|
||||
ADD packages.json /tmp/packages.json
|
||||
ADD build.sh /tmp/build.sh
|
||||
|
||||
RUN /tmp/build.sh && \
|
||||
pip install --prefix=/usr yafti && \
|
||||
systemctl enable rpm-ostree-countme.service && \
|
||||
|
|
@ -46,29 +46,23 @@ RUN /tmp/build.sh && \
|
|||
chmod -R 1777 /var/tmp
|
||||
|
||||
## bluefin-dx developer edition image section
|
||||
# TODO: this should be in packages.json but yolo for now
|
||||
|
||||
FROM bluefin AS bluefin-dx
|
||||
|
||||
ARG IMAGE_NAME="${IMAGE_NAME}"
|
||||
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
|
||||
ARG PACKAGE_LIST="bluefin-dx"
|
||||
|
||||
# dx specific files come from the dx directory in this repo
|
||||
COPY dx/usr /usr
|
||||
COPY dx/etc/yum.repos.d/ /etc/yum.repos.d/
|
||||
COPY workarounds.sh /tmp/workarounds.sh
|
||||
COPY packages.json /tmp/packages.json
|
||||
COPY build.sh /tmp/build.sh
|
||||
|
||||
RUN wget https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo
|
||||
RUN wget https://terra.fyralabs.com/terra.repo -O /etc/yum.repos.d/terra.repo
|
||||
|
||||
RUN rpm-ostree install code
|
||||
RUN rpm-ostree install lxd lxc lxd-agent
|
||||
RUN rpm-ostree install iotop dbus-x11 podman-plugins podman-tui
|
||||
RUN rpm-ostree install adobe-source-code-pro-fonts cascadiacode-nerd-fonts google-droid-sans-mono-fonts google-go-mono-fonts ibm-plex-mono-fonts jetbrains-mono-fonts-all mozilla-fira-mono-fonts powerline-fonts ubuntumono-nerd-fonts ubuntu-nerd-fonts
|
||||
RUN rpm-ostree install qemu qemu-user-static qemu-user-binfmt virt-manager libvirt edk2-ovmf edk2-ovmf genisoimage qemu-img qemu-system-x86-core qemu-char-spice qemu-device-usb-redirect qemu-device-display-virtio-vga qemu-device-display-virtio-gpu
|
||||
RUN rpm-ostree install cockpit-system cockpit-ostree cockpit-networkmanager cockpit-selinux cockpit-storaged cockpit-podman cockpit-machines cockpit-pcp
|
||||
RUN rpm-ostree install p7zip p7zip-plugins powertop
|
||||
RUN rpm-ostree install podmansh
|
||||
# Handle packages via packages.json
|
||||
RUN /tmp/build.sh
|
||||
|
||||
RUN wget https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -O /tmp/docker-compose && \
|
||||
install -c -m 0755 /tmp/docker-compose /usr/bin
|
||||
|
|
@ -114,10 +108,16 @@ RUN ostree container commit
|
|||
# Image for Framework laptops
|
||||
FROM bluefin AS bluefin-framework
|
||||
|
||||
COPY framework/usr /usr
|
||||
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
|
||||
ARG PACKAGE_LIST="bluefin-framework"
|
||||
|
||||
COPY framework/usr /usr
|
||||
COPY packages.json /tmp/packages.json
|
||||
COPY build.sh /tmp/build.sh
|
||||
|
||||
# Handle packages via packages.json
|
||||
RUN /tmp/build.sh
|
||||
|
||||
RUN rpm-ostree install tlp tlp-rdw stress-ng
|
||||
RUN rpm-ostree override remove power-profiles-daemon
|
||||
RUN systemctl enable tlp
|
||||
RUN systemctl enable fprintd.service
|
||||
|
||||
|
|
|
|||
8
build.sh
8
build.sh
|
|
@ -4,11 +4,11 @@ set -ouex pipefail
|
|||
|
||||
RELEASE="$(rpm -E %fedora)"
|
||||
|
||||
INCLUDED_PACKAGES=($(jq -r "[(.all.include | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[]), \
|
||||
(select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".include | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[])] \
|
||||
INCLUDED_PACKAGES=($(jq -r "[(.all.include | (select(.\"$PACKAGE_LIST\" != null).\"$PACKAGE_LIST\")[]), \
|
||||
(select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".include | (select(.\"$PACKAGE_LIST\" != null).\"$PACKAGE_LIST\")[])] \
|
||||
| sort | unique[]" /tmp/packages.json))
|
||||
EXCLUDED_PACKAGES=($(jq -r "[(.all.exclude | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[]), \
|
||||
(select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".exclude | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[])] \
|
||||
EXCLUDED_PACKAGES=($(jq -r "[(.all.exclude | (select(.\"$PACKAGE_LIST\" != null).\"$PACKAGE_LIST\")[]), \
|
||||
(select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".exclude | (select(.\"$PACKAGE_LIST\" != null).\"$PACKAGE_LIST\")[])] \
|
||||
| sort | unique[]" /tmp/packages.json))
|
||||
|
||||
|
||||
|
|
|
|||
163
packages.json
163
packages.json
|
|
@ -1,54 +1,113 @@
|
|||
{
|
||||
"all": {
|
||||
"include": {
|
||||
"all": [
|
||||
"cockpit-bridge",
|
||||
"ddccontrol",
|
||||
"ddccontrol-db",
|
||||
"ddccontrol-gtk",
|
||||
"fish",
|
||||
"gnome-shell-extension-appindicator",
|
||||
"gnome-shell-extension-dash-to-dock",
|
||||
"gnome-shell-extension-blur-my-shell",
|
||||
"gnome-shell-extension-gsconnect",
|
||||
"input-remapper",
|
||||
"libgda",
|
||||
"libgda-sqlite",
|
||||
"libratbag-ratbagd",
|
||||
"nautilus-gsconnect",
|
||||
"pulseaudio-utils",
|
||||
"python3-pip",
|
||||
"samba",
|
||||
"samba-ldb-ldap-modules",
|
||||
"samba-dcerpc",
|
||||
"samba-winbind-clients",
|
||||
"samba-winbind-modules",
|
||||
"solaar",
|
||||
"tailscale",
|
||||
"tmux",
|
||||
"wireguard-tools",
|
||||
"xprop",
|
||||
"yaru-theme",
|
||||
"zsh"
|
||||
]
|
||||
},
|
||||
"exclude": {
|
||||
"all": [
|
||||
"firefox",
|
||||
"firefox-langpacks",
|
||||
"gnome-software-rpm-ostree",
|
||||
"gnome-tour"
|
||||
]
|
||||
}
|
||||
},
|
||||
"38": {
|
||||
"include": {
|
||||
"all": []
|
||||
},
|
||||
"exclude": {
|
||||
"all": [
|
||||
"podman-docker"
|
||||
]
|
||||
}
|
||||
}
|
||||
"all": {
|
||||
"include": {
|
||||
"bluefin": [
|
||||
"cockpit-bridge",
|
||||
"ddccontrol-db",
|
||||
"ddccontrol-gtk",
|
||||
"ddccontrol",
|
||||
"fish",
|
||||
"gnome-shell-extension-appindicator",
|
||||
"gnome-shell-extension-blur-my-shell",
|
||||
"gnome-shell-extension-dash-to-dock",
|
||||
"gnome-shell-extension-gsconnect",
|
||||
"input-remapper",
|
||||
"libgda-sqlite",
|
||||
"libgda",
|
||||
"libratbag-ratbagd",
|
||||
"nautilus-gsconnect",
|
||||
"pulseaudio-utils",
|
||||
"python3-pip",
|
||||
"samba-dcerpc",
|
||||
"samba-ldb-ldap-modules",
|
||||
"samba-winbind-clients",
|
||||
"samba-winbind-modules",
|
||||
"samba",
|
||||
"solaar",
|
||||
"tailscale",
|
||||
"tmux",
|
||||
"wireguard-tools",
|
||||
"xprop",
|
||||
"yaru-theme",
|
||||
"zsh"
|
||||
],
|
||||
"bluefin-dx": [
|
||||
"adobe-source-code-pro-fonts",
|
||||
"cascadiacode-nerd-fonts",
|
||||
"cockpit-machines",
|
||||
"cockpit-networkmanager",
|
||||
"cockpit-ostree",
|
||||
"cockpit-pcp",
|
||||
"cockpit-podman",
|
||||
"cockpit-selinux",
|
||||
"cockpit-storaged",
|
||||
"cockpit-system",
|
||||
"code",
|
||||
"dbus-x11",
|
||||
"edk2-ovmf",
|
||||
"edk2-ovmf",
|
||||
"genisoimage",
|
||||
"google-droid-sans-mono-fonts",
|
||||
"google-go-mono-fonts",
|
||||
"ibm-plex-mono-fonts",
|
||||
"iotop",
|
||||
"jetbrains-mono-fonts-all",
|
||||
"libvirt",
|
||||
"lxc",
|
||||
"lxd-agent",
|
||||
"lxd",
|
||||
"mozilla-fira-mono-fonts",
|
||||
"p7zip-plugins",
|
||||
"p7zip",
|
||||
"podman-plugins",
|
||||
"podman-tui",
|
||||
"podmansh",
|
||||
"powerline-fonts",
|
||||
"powertop",
|
||||
"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",
|
||||
"ubuntu-nerd-fonts",
|
||||
"ubuntumono-nerd-fonts",
|
||||
"virt-manager"
|
||||
],
|
||||
"bluefin-framework": [
|
||||
"stress-ng",
|
||||
"tlp-rdw",
|
||||
"tlp"
|
||||
]
|
||||
},
|
||||
"exclude": {
|
||||
"bluefin": [
|
||||
"firefox-langpacks",
|
||||
"firefox",
|
||||
"gnome-software-rpm-ostree",
|
||||
"gnome-tour"
|
||||
],
|
||||
"bluefin-dx": [],
|
||||
"bluefin-framework": [
|
||||
"power-profiles-daemon"
|
||||
]
|
||||
}
|
||||
},
|
||||
"38": {
|
||||
"include": {
|
||||
"bluefin": [],
|
||||
"bluefin-dx": [],
|
||||
"bluefin-framework": []
|
||||
},
|
||||
"exclude": {
|
||||
"bluefin": [
|
||||
"podman-docker"
|
||||
],
|
||||
"bluefin-dx": [],
|
||||
"bluefin-framework": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue