Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add akmods module #89

Merged
merged 20 commits into from
Jan 14, 2024
Merged

feat: Add akmods module #89

merged 20 commits into from
Jan 14, 2024

Conversation

fiftydinar
Copy link
Collaborator

@fiftydinar fiftydinar commented Dec 25, 2023

Credits: @c0deplayer

This is not ideal as it does not support custom kernels & it involves editing Containerfile.

Custom kernels is something that upstream should solve I believe, so it's not a concern we should direct to.

I believe there is no other way but to make users edit Containerfile for those files to be even pulled of.

I would like this to be through the recipe only, so I will put this as a draft until some better ideas come.

2nd part of this work:
blue-build/legacy-template#212

Credits: @c0deplayer

This is not ideal as it does not support custom kernels & it involves editing Containerfile.

I believe there is no other way but to make users edit Containerfile for those files to be even pulled of.

I would like this to be through the recipe only, so I will put this as a draft until some better ideas come.
@fiftydinar
Copy link
Collaborator Author

Hmm, it fails here with these errors:

Error
=== Launching module of type: kmods-installer ===
Installing kmods

Installing: v4l2loopback winesync openrazer openrgb nct6687d gasket gcadapter_oc ryzen-smu xpadneo xone xpad-noone

Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:kylegospo:rom-properties copr:copr.fedorainfracloud.org:szydell:system76 copr:copr.fedorainfracloud.org:fiftydinar:gnome-shell-openweather-toppk copr:copr.fedorainfracloud.org:kylegospo:hl2linux-selinux copr:copr.fedorainfracloud.org:kylegospo:system76-scheduler copr:copr.fedorainfracloud.org:fiftydinar:gnome-shell-extension-middleclickclose-git copr:copr.fedorainfracloud.org:fiftydinar:gnome-randr-rust rpmfusion-nonfree-updates rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree copr:copr.fedorainfracloud.org:ublue-os:akmods updates fedora-cisco-openh264 fedora updates-archive

Importing rpm-md...done

rpm-md repo 'copr:copr.fedorainfracloud.org:kylegospo:rom-properties' (cached); generated: 2023-12-24T05:12:20Z solvables: 27
rpm-md repo 'copr:copr.fedorainfracloud.org:szydell:system76' (cached); generated: 2023-12-17T04:02:26Z solvables: 24
rpm-md repo 'copr:copr.fedorainfracloud.org:fiftydinar:gnome-shell-openweather-toppk' (cached); generated: 2023-11-10T12:13:13Z solvables: 2
rpm-md repo 'copr:copr.fedorainfracloud.org:kylegospo:hl2linux-selinux' (cached); generated: 2023-08-22T22:04:08Z solvables: 6
rpm-md repo 'copr:copr.fedorainfracloud.org:kylegospo:system76-scheduler' (cached); generated: 2023-12-09T09:07:11Z solvables: 4
rpm-md repo 'copr:copr.fedorainfracloud.org:fiftydinar:gnome-shell-extension-middleclickclose-git' (cached); generated: 2023-11-08T17:30:48Z solvables: 2
rpm-md repo 'copr:copr.fedorainfracloud.org:fiftydinar:gnome-randr-rust' (cached); generated: 2023-10-31T17:44:25Z solvables: 4
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2023-12-22T13:50:27Z solvables: 56
rpm-md repo 'rpmfusion-free' (cached); generated: 2023-11-04T16:49:08Z solvables: 445
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2023-12-22T13:27:08Z solvables: 108
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2023-11-04T17:26:32Z solvables: 208
rpm-md repo 'copr:copr.fedorainfracloud.org:ublue-os:akmods' (cached); generated: 2023-12-09T03:59:38Z solvables: 60
rpm-md repo 'updates' (cached); generated: 2023-12-25T01:17:57Z solvables: 16809
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2023-03-14T10:57:01Z solvables: 4
rpm-md repo 'fedora' (cached); generated: 2023-11-01T00:12:39Z solvables: 70825
rpm-md repo 'updates-archive' (cached); generated: 2023-12-25T01:35:16Z solvables: 18828

Resolving dependencies...done
error: Could not depsolve transaction; 3 problems detected:
 Problem 1: conflicting requests
  - nothing provides xpadneo-kmod-common >= 0.9.5 needed by kmod-xpadneo-6.6.7-200.fc39.x86_64-0.9.5-3.20230617git5970c4c.fc39.x86_64 from @commandline
 Problem 2: conflicting requests
  - nothing provides xone-kmod-common >= 0.3 needed by kmod-xone-6.6.7-200.fc39.x86_64-0.3-3.20230517gitbbf0dcc.fc39.x86_64 from @commandline
 Problem 3: conflicting requests
  - package kernel-devel-matched-6.6.7-200.fc39.x86_64 from updates-archive requires kernel-devel = 6.6.7-200.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.6.8-200.fc39.x86_64 from updates requires kernel-core = 6.6.8-200.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.6.8-200.fc39.x86_64 from updates-archive requires kernel-core = 6.6.8-200.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.5.6-300.fc39.x86_64 from fedora requires kernel-core = 6.5.6-300.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.5.10-300.fc39.x86_64 from updates-archive requires kernel-core = 6.5.10-300.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.5.11-300.fc39.x86_64 from updates-archive requires kernel-core = 6.5.11-300.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.5.12-300.fc39.x86_64 from updates-archive requires kernel-core = 6.5.12-300.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.5.9-300.fc39.x86_64 from updates-archive requires kernel-core = 6.5.9-300.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.6.2-201.fc39.x86_64 from updates-archive requires kernel-core = 6.6.2-201.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.6.3-200.fc39.x86_64 from updates-archive requires kernel-core = 6.6.3-200.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.6.4-200.fc39.x86_64 from updates-archive requires kernel-core = 6.6.4-200.fc39, but none of the providers can be installed
  - package kernel-devel-matched-6.6.6-200.fc39.x86_64 from updates-archive requires kernel-core = 6.6.6-200.fc39, but none of the providers can be installed
  - cannot install both kernel-devel-6.6.7-200.fc39.x86_64 from updates-archive and kernel-devel-6.6.8-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.6.8-200.fc39.x86_64 from updates and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.5.6-300.fc39.x86_64 from fedora and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.5.10-300.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.5.11-300.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.5.12-300.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.5.9-300.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.6.2-201.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.6.3-200.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.6.4-200.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.6.6-200.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
  - cannot install both kernel-core-6.6.8-200.fc39.x86_64 from updates-archive and kernel-core-6.6.7-200.fc39.x86_64 from @System
error building at STEP "RUN chmod +x /tmp/build.sh && /tmp/build.sh &&     rm -rf /tmp/* /var/* && ostree container commit": error while running runtime: exit status 1
time="2023-12-25T20:44:24Z" level=error msg="exit status 1"

@fiftydinar fiftydinar changed the title feat: Add kmods installer module feat: Add kmods-installer module Dec 25, 2023
@xynydev
Copy link
Member

xynydev commented Dec 27, 2023

Hmm, it fails here with these errors

The akmods repo example installs the akmods with the commands below. Maybe the wildcard is required?

RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-akmods*.rpm
RUN rpm-ostree install /tmp/rpms/kmods/kmod-v4l2loopback*.rpm

@xynydev
Copy link
Member

xynydev commented Dec 27, 2023

I was just looking at if there'd be a way to install the akmods directly using the module without Containerfile changes, and there is a COPR but it doesn't have everything and I'm not sure if it'd just work.

With a compiler-based approach this would be easier. I guess I should work on that sometime...

@fiftydinar fiftydinar changed the title feat: Add kmods-installer module feat: Add akmods module Dec 27, 2023
@fiftydinar
Copy link
Collaborator Author

fiftydinar commented Jan 10, 2024

@xynydev I have great news.

Module actually works!
Those errors I had before seems to be a typical upstream error (from akmods repo).

Here's proof it works:
https://github.com/fiftydinar/gidro-os/actions/runs/7473504118/job/20337794147#step:15:647

I think this is good to merge, I don't see what more of a changes is needed.

If you catch something that needs update, please let me know.

Edit: I remembered. We need to solve ${IMAGE_MAJOR_VERSION} tag in Containerfile for pulling akmods files instead of fixed Fedora version.

However, adding IMAGE_MAJOR_VERSION as an argument only works when building an image offline. Github Action fails.

So I think it's good as it is (not yet, see below).

It's a shame that akmods repo doesn't have latest tag available though. So you need to edit this manually whenever new Fedora gets a release.
I filled an issue on this: ublue-os/akmods#109

@fiftydinar fiftydinar marked this pull request as ready for review January 10, 2024 11:33
@fiftydinar
Copy link
Collaborator Author

fiftydinar commented Jan 11, 2024

I added support for Surface & Asus images as I noticed they don't install kernel-devel-matched package.

It auto-detects if the base image is right before installing kmods.

However, it seems that BASE_IMAGE variable is not recognized in cloud for some reason, hence builds failing.
I'll have to investigate this further. Help is also appreciated.

@fiftydinar
Copy link
Collaborator Author

fiftydinar commented Jan 12, 2024

Here's proof that BASE_IMAGE variable works in terminal (but still not working in cloud):
Screenshot from 2024-01-12 14-00-35

When I put something simple in module like
echo "${BASE_IMAGE}"

it echoes base image normally

@fiftydinar
Copy link
Collaborator Author

Installing kernel-devel-matched actually works for all images & it's the more proper way of installing akmods.
I tested surface, asus & main image as a base & module works wonderfully.

This time, it's really ready to merge.

fiftydinar and others added 2 commits January 13, 2024 11:29
This would avoid editing README if some other compatible image gets announced or discontinued.
#!/usr/bin/env bash
set -oue pipefail

BASED_IMAGE=$(echo "${BASE_IMAGE}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of this? The BASE_IMAGEand BASED_IMAGE variable are identical, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, there is no need for this.

I can correct this in another PR.

@xynydev xynydev merged commit e8272a4 into blue-build:main Jan 14, 2024
1 check passed
@fiftydinar fiftydinar deleted the kmods-installer branch January 14, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants