Skip to content

Commit

Permalink
Fedora 37 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
meisenzahl authored Apr 24, 2023
1 parent 5d96fbc commit f0278e0
Show file tree
Hide file tree
Showing 14 changed files with 1,680 additions and 9 deletions.
1,455 changes: 1,455 additions & 0 deletions .github/workflows/fedora:37.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

| Distribution | State |
| ------------ | ----- |
| Fedora 37 | [![fedora:37](https://github.com/meisenzahl/distro-agnostic/actions/workflows/fedora:37.yml/badge.svg)](https://github.com/meisenzahl/distro-agnostic/actions/workflows/fedora:37.yml) |
| Ubuntu latest LTS release | [![ubuntu:latest](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:latest.yml/badge.svg?branch=main)](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:latest.yml) |

| Repository | Version | Recipe |
Expand Down
64 changes: 64 additions & 0 deletions data/.github/workflows/fedora:37.yml.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: fedora:37

concurrency:
group: {% raw %}${{ github.workflow }}-${{ github.ref }}{% endraw %}
cancel-in-progress: true

on:
push:
branches:
- "*"
schedule:
- cron: "0 1 * * *"
workflow_dispatch: {}

jobs:
elementary-desktop:
runs-on: ubuntu-latest
name: elementary/desktop

container:
image: fedora:37
volumes:
- /proc:/proc
options: --privileged

steps:
- name: Pull changes ⬇️
uses: actions/checkout@v3

- name: Install dependencies ⬇️
run: |
dnf install -y git python3-pyyaml

- name: Build elementary/desktop 🔨
run: |
./builder \
--distro fedora:37 \
--package elementary/desktop

{% for package in packages %}
{{ package | replace("/", "-") }}:
runs-on: ubuntu-latest
name: {{ package }}

container:
image: fedora:37
volumes:
- /proc:/proc
options: --privileged

steps:
- name: Pull changes ⬇️
uses: actions/checkout@v3

- name: Install dependencies ⬇️
run: |
dnf install -y git python3-pyyaml

- name: Build {{ package }} 🔨
run: |
./builder \
--distro fedora:37 \
--package {{ package }}
{% endfor -%}
3 changes: 1 addition & 2 deletions data/README.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

| Distribution | State |
| ------------ | ----- |
| Fedora 37 | [![fedora:37](https://github.com/meisenzahl/distro-agnostic/actions/workflows/fedora:37.yml/badge.svg)](https://github.com/meisenzahl/distro-agnostic/actions/workflows/fedora:37.yml) |
| Ubuntu latest LTS release | [![ubuntu:latest](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:latest.yml/badge.svg?branch=main)](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:latest.yml) |
| Ubuntu latest release (regardless of LTS status) | [![ubuntu:rolling](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:rolling.yml/badge.svg?branch=main)](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:rolling.yml) |
| Ubuntu next development release | [![ubuntu:devel](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:devel.yml/badge.svg?branch=main)](https://github.com/meisenzahl/distro-agnostic/actions/workflows/ubuntu:devel.yml) |

| Repository | Version | Recipe |
| ---------- | ------- | ------ |
Expand Down
16 changes: 11 additions & 5 deletions data/update
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,18 @@ def update_workflows(packages):

context["packages"].sort()

template_text = open(os.path.join("data", ".github", "workflows", "ubuntu:22.04.yml.jinja2"), "r").read()
template = jinja2.Template(template_text)
text = template.render(context)
template_dir = os.path.join("data", ".github", "workflows")
for filename in os.listdir(template_dir):
path = os.path.join(template_dir, filename)
if not os.path.isfile(path):
continue

f = open(os.path.join(".github", "workflows", "ubuntu:22.04.yml"), "w")
f.write(text)
template_text = open(path, "r").read()
template = jinja2.Template(template_text)
text = template.render(context)

f = open(path.split("data/")[-1].replace(".jinja2", ""), "w")
f.write(text)


def main(args):
Expand Down
118 changes: 118 additions & 0 deletions distros/fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: fedora
package-manager: dnf
packages:
appstream: appstream
bc: bc
desktop-file-utils: desktop-file-utils
exuberant-ctags: "" # TODO: confirm that this is not needed
gettext: gettext
gnome-common: gnome-common
gnome-keyring: gnome-keyring
gnome-settings-daemon: gnome-settings-daemon
gnome-settings-daemon-dev: gnome-settings-daemon-devel
gobject-introspection: gobject-introspection
gsettings-desktop-schemas-dev: gsettings-desktop-schemas-devel
libaccounts-glib-dev: libaccounts-glib-devel
libaccountsservice-dev: accountsservice-devel
libadwaita-1-dev: libadwaita-devel
libappstream-dev: appstream-devel
libappstream-glib8: libappstream-glib
libbamf3-dev: bamf-devel
libcamel1.2-dev: evolution-data-server-devel
libcanberra-dev: libcanberra-devel
libcanberra-gtk3-dev: libcanberra-gtk3
libchamplain-0.12-dev: libchamplain-devel
libchamplain-gtk-0.12-dev: libchamplain-devel
libcloudproviders-dev: libcloudproviders-devel
libclutter-1.0-dev: clutter-devel
libcups2-dev: cups-devel
libdbus-1-dev: dbus-devel
libdbus-glib-1-dev: dbus-glib-devel
libdistinst-dev: libdistinst-dev
libecal1.2-dev: evolution-data-server-devel
libecal2.0-dev: evolution-data-server-devel
libedataserver1.2-dev: evolution-data-server-devel
libedataserverui1.2-dev: evolution-data-server-devel
libeditorconfig-dev: editorconfig-devel
libexif-dev: libexif-devel
libflatpak-dev: flatpak-devel
libfolks-dev: folks-devel
libfwupd-dev: fwupd-devel
libgail-3-dev: "" # TODO: confirm that this is not needed
libgala-dev: elementary/gala
libgdk-pixbuf2.0-dev: gdk-pixbuf2-devel
libgee-0.8-dev: libgee-devel
libgeoclue-2-dev: geoclue2-devel
libgeocode-glib-dev: geocode-glib-devel
libgexiv2-dev: libgexiv2-devel
libgirepository1.0-dev: gobject-introspection
libgit2-glib-1.0-dev: libgit2-glib-devel
libglib2.0-dev: glib2-devel
libgnome-desktop-3-dev: gnome-desktop3-devel
libgnomekbd-dev: libgnomekbd-devel
libgphoto2-dev: libgphoto2-devel
libgranite-7-dev: elementary/granite
libgranite-dev: elementary/granite-6
libgstreamer-plugins-base1.0-dev: gstreamer1-plugins-base-devel
libgstreamer1.0-dev: gstreamer1-devel
libgtk-3-dev: gtk3-devel
libgtk-4-dev: gtk4-devel
libgtksourceview-4-dev: gtksourceview4-devel
libgtkspell-3-dev: gtkspell3-devel
libgtkspell3-3-dev: gtkspell3-devel
libgtop2-dev: libgtop2-devel
libgudev-1.0-dev: libgudev-devel
libhandy-1-dev: libhandy-devel
libibus-1.0-dev: ibus-devel
libical-dev: libical-devel
libisocodes-dev: iso-codes-devel
libjson-glib-dev: json-glib-devel
liblightdm-gobject-1-dev: lightdm-gobject-devel
libmalcontent-0-dev: malcontent-devel
libmutter-dev: mutter-devel
libnm-dev: NetworkManager-libnm-devel
libnma-dev: libnma-devel
libnotify-dev: libnotify-devel
libpackagekit-glib2-dev: PackageKit-glib-devel
libpango1.0-dev: pango-devel
libpeas-dev: libpeas-devel
libplank-dev: plank-devel
libpolkit-agent-1-dev: polkit-devel
libpolkit-gobject-1-dev: polkit-devel
libpulse-dev: pulseaudio-libs-devel
libpwquality-dev: libpwquality-devel
libraw-dev: LibRaw-devel
librest-dev: rest0.7-devel
librsvg2-bin: librsvg2-tools
librsvg2-common: librsvg2
libsignon-glib-dev: signon-glib-devel
libsoup2.4-dev: libsoup-devel
libsqlite3-dev: sqlite-devel
libswitchboard-2.0-dev: elementary/switchboard
libudev-dev: systemd-devel
libudisks2-dev: libudisks2-devel
libunity-dev: libunity-devel
libvala-dev: libvala-devel
libvte-2.91-dev: vte291-devel
libwacom-dev: libwacom-devel
libwebkit2gtk-4.0-dev: webkit2gtk4.0-devel
libwebp-dev: libwebp-devel
libwingpanel-dev: elementary/wingpanel
libx11-dev: libX11-devel
libxi-dev: libXi-devel
libxklavier-dev: libxklavier-devel
libxml2: libxml2
libxml2-dev: libxml2-devel
libxml2-utils: libxml2
libzeitgeist-2.0-dev: zeitgeist-devel
meson: meson
onboard: onboard
orca: orca
pkg-config: pkg-config
policykit-1: polkit
sassc: sassc
systemd: systemd
valac: vala
x11-apps: xcursorgen
xkb-data: xkeyboard-config-devel
xvfb: xorg-x11-server-Xvfb
2 changes: 2 additions & 0 deletions distros/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ packages:
libaccountsservice-dev: libaccountsservice-dev
libadwaita-1-dev: libadwaita-1-dev
libappstream-dev: libappstream-dev
libappstream-glib8: libappstream-glib8
libbamf3-dev: libbamf3-dev
libcamel1.2-dev: libcamel1.2-dev
libcanberra-dev: libcanberra-dev
Expand Down Expand Up @@ -64,6 +65,7 @@ packages:
libhandy-1-dev: libhandy-1-dev
libibus-1.0-dev: libibus-1.0-dev
libical-dev: libical-dev
libisocodes-dev: libisocodes-dev
libjson-glib-dev: libjson-glib-dev
liblightdm-gobject-1-dev: liblightdm-gobject-1-dev
libmalcontent-0-dev: libmalcontent-0-dev
Expand Down
2 changes: 1 addition & 1 deletion modules/distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def install_packages(self, packages):

self._run_cmd(cmd)
elif self._package_manager == "dnf":
cmd = "dnf install -y " + " ".join(packages)
cmd = "dnf --setopt=install_weak_deps=False --best install -y " + " ".join(packages)

self._run_cmd(cmd)
else:
Expand Down
3 changes: 2 additions & 1 deletion packages/elementary/code.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: elementary/code
buildsystem: meson
dependencies:
- appstream
- desktop-file-utils
- exuberant-ctags
- gettext
- libappstream-glib8
- libeditorconfig-dev
- libgail-3-dev
- libgee-0.8-dev
Expand All @@ -16,6 +16,7 @@ dependencies:
- libgtkspell3-3-dev
- libhandy-1-dev
- libpeas-dev
- libpolkit-gobject-1-dev
- libsoup2.4-dev
- libvala-dev
- libvte-2.91-dev
Expand Down
2 changes: 2 additions & 0 deletions packages/elementary/initial-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ dependencies:
- libgranite-dev
- libgtk-3-dev
- libhandy-1-dev
- libisocodes-dev
- libjson-glib-dev
- libpolkit-gobject-1-dev
- libpwquality-dev
- libxml2-dev
- libxml2-utils
- meson
- valac
- xkb-data
sources:
- type: git
url: https://github.com/elementary/initial-setup
Expand Down
1 change: 1 addition & 0 deletions packages/elementary/portals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
- libgranite-7-dev
- libgtk-4-dev
- meson
- systemd
- valac
sources:
- type: git
Expand Down
1 change: 1 addition & 0 deletions packages/elementary/sideload.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: elementary/sideload
buildsystem: meson
dependencies:
- desktop-file-utils
- libflatpak-dev
- libgranite-7-dev
- libgtk-4-dev
Expand Down
1 change: 1 addition & 0 deletions packages/elementary/switchboard-plug-keyboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- libxml2-dev
- meson
- valac
- xkb-data
sources:
- type: git
url: https://github.com/elementary/switchboard-plug-keyboard
Expand Down
20 changes: 20 additions & 0 deletions test/fedora:37.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

PACKAGE=$1

docker run \
--pull=always \
--tty \
--interactive \
--rm \
--privileged \
--volume /proc:/proc \
--volume $PWD:/work \
--workdir /work \
fedora:37 \
sh -c "
dnf install -y git python3-pyyaml && \
./builder \
--distro fedora:37 \
--package ${PACKAGE}
"

0 comments on commit f0278e0

Please sign in to comment.