Need help building system76-io akmods

Hi folks!

I’ve been using Bluefin on a spare laptop for a while and love it, so I recently decided to move my main machine, a System76 Thelio Mira, to Bluefin as well.

Overall things are working well, but they use a custom I/O board to control the cooling fans and that requires the system76-io driver along with system76-power to prevent the fans going full blast constantly.

I was able to build the modules locally and layer the system76-power package (from szydell/system76 Copr) to verify that things work, but I wanted to Do It Right :tm:, so I set about making my own image with these changes.

I was able to repackage the driver in my own Copr (source) using what I think is the right magic for akmods, and used the Blue Build template to make my own image based on bluefin-dx.

Now where I’ve gotten stuck is in my recipe I use a script based on what I found in the ublue-akmods repo to build and install my module package but the script fails deep in the bowels of akmods when it tries to call dnf to actually install the module package.

The output is

 error: unexpected argument '--nogpgcheck' found

My understanding is that this option changed to --no-gpgcheck in dnf5, but there should be an alias set up for compatibility and that seems to be what’s not working.

I’ve confirmed via script hackery that the /usr/share/dnf5/aliases.d/compatibility.conf file exists in this environment and that the --nogpgcheck alias is in there, so I’m pretty stumped on how to proceed.

I’d be very grateful for any advice! Thanks in advance!

could also be something not escaped. can u give the whole line(s)

Thanks for the reply! I’m not sure which lines in particular you mean, so:

akmods is invoked by my script with:

akmods --force --kernels "${KERNEL}" --kmod system76-io

where ${KERNEL} is set by

KERNEL="$(rpm -q "${KERNEL_NAME:-kernel}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"

Looking at the akmods source you can see where it invokes dnf:

dnf -y ${pkg_install:-install} --nogpgcheck --disablerepo='*' $(find "${tmpdir}results" -type f -name '*.rpm' | grep -v debuginfo) >> "${kmodlogfile}" 2>&1

The entire output of the error message is:

[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435 error: unexpected argument '--nogpgcheck' found
[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435 
[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435   tip: to pass '--nogpgcheck' as a value, use '-- --nogpgcheck'
[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435 
[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435 Usage: yum install [OPTIONS] [PACKAGES]...
[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435 
[19:18:51 g.i/s/bluefin-dx-ssweeny:latest] => 7.435 For more information, try '--help'.

I was looking for the line where you have that:

in the error log it gives you the hint how to fix the issue, looks still like an escaping error. the error would be without ‘–’ if the option was not recognized.

That’s the thing! That was my first thought was well, but I don’t pass that option anywhere in my code. It happens in the akmods package itself which I don’t modify.

If this was a bug in how akmods calls dnf5 I would think it’d come up constantly since F41 was released, but I don’t see other folks having this problem.

sorry for the misunderstanding… but here I am maybe not super helpful after all, since I don’t work with github actions. but I guess you already tried to hardcode values as a debug step?

I had the same problem with facetimehd akmods.

However, once this is fixed then the --disablerepo command line option causes the build to fail…

I fixed these both with editing the /usr/sbin/akmods file using sed in the install script:

sed -i "s/dnf -y \${pkg_install:-install} --nogpgcheck --disablerepo='\*'/dnf -y \${pkg_install:-install}/" /usr/sbin/akmods

Hope that helps!