Greenzie / emuccan-b202

A Debian package and systemctl scripts for the EMUC-B202 SocketCAN
GNU General Public License v3.0
4 stars 5 forks source link

Adapt code for dkms and CI build #10

Closed orensbruli closed 2 months ago

orensbruli commented 2 months ago

Closes SC-38654

orensbruli commented 2 months ago

It's working. Can download artifact from thee CI build: https://app.circleci.com/pipelines/github/Greenzie/emuccan-b202/6/workflows/e7c66b9e-4165-43c4-9b8f-26ce9e4ba069/jobs/6/artifacts

Tested to instal package on GZDEV9 and GZDEV4

orensbruli commented 2 months ago

Testing on GZDEV30: https://greenzie.slack.com/archives/CRTTEQ7EE/p1718895358925049

Asciinema recording of the session: https://drive.google.com/file/d/17gf8O7OiPjI3IROyTHDtlwDIrrtqJvjx/view?usp=sharing

Note: We will have problems with the installation if an old module is manually installed in the mower. Not sure if we should do some automatic thing to avoid or just being careful when installing.

edavies64 commented 2 months ago

Note: We will have problems with the installation if an old module is manually installed in the mower. Not sure if we should do some automatic thing to avoid or just being careful when installing.

@orensbruli I believe we manually install the old module during our post install steps, so it would be fair to expect that the majority of our mowers with this module will have it manually installed.

orensbruli commented 2 months ago

Note: We will have problems with the installation if an old module is manually installed in the mower. Not sure if we should do some automatic thing to avoid or just being careful when installing.

@orensbruli I believe we manually install the old module during our post install steps, so it would be fair to expect that the majority of our mowers with this module will have it manually installed.

Ok. Then we need to make some workaround because we need to use the Debian package post install and there's a bug on DKMS that can be overcome adding our own debian folder to the project: https://github.com/dell/dkms/issues/53#issuecomment-1591788158

Not a big deal, just some boilerplate.

Just to clarify, the post-install script should:

orensbruli commented 2 months ago

I have been trying to add a post-install script to this one to test. The current greenzie-dkms need a fix to include subfolders of drivers: https://github.com/Greenzie/greenzie-debianize-tool/pull/4

And the corresponding docker image build to be triggered when this change is merged: https://github.com/Greenzie/greenzie-docker-images/tree/main/debianize#automated-build-and-deployment

Then we can test this again. Our current workflow is a little bit complex. I have tested all this locally but :shrug:

orensbruli commented 2 months ago

@edavies64 @AGummyBear I finally added the post-install and post-remove scripts to this PR, please review.