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

The android udev rules need to be updated #1478

Closed
mbruzek opened this issue Jul 2, 2024 · 12 comments
Closed

The android udev rules need to be updated #1478

mbruzek opened this issue Jul 2, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@mbruzek
Copy link

mbruzek commented Jul 2, 2024

Describe the bug

I was reviewing the boot logs for my ublue latest image on 07/01 and I saw some errors in the logs:

/usr/lib/udev/rules.d/10-switch.rules:1 Unknown group 'nintendo_switch',>
/usr/lib/udev/rules.d/30-linksys-ae1200.rules:1 The line has no effect, >
/etc/udev/rules.d/51-android.rules:206 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:207 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:517 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:518 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:521 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:157 GOTO="go_adb" has no matching lab>
/etc/udev/rules.d/51-android.rules:157 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:158 GOTO="go_adbrndis" has no matchin>
/etc/udev/rules.d/51-android.rules:158 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:159 GOTO="go_adbmtp" has no matching >
/etc/udev/rules.d/51-android.rules:159 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:160 GOTO="go_adbptp" has no matching >
/etc/udev/rules.d/51-android.rules:160 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:161 GOTO="go_adbmidi" has no matching>
/etc/udev/rules.d/51-android.rules:161 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:162 GOTO="go_adb" has no matching lab>

It seems the file 51-android.rules contains some errors. I inspected this file and all the lines with errors have "inline" comments. I don't think they are supported.

I tried to find the source file in the ublue-os repositories but I was unsuccessful. I did find an issue about this same problem that was fixed back on Nov 3, 2023.

M0Rf30/android-udev-rules#287

Please help me find where we get the 51-android.rules file in this repo and I would be happy to remove the inline comments to fix this issue. If we are pulling it from somewhere else, the latest file here: https://github.com/M0Rf30/android-udev-rules/blob/main/51-android.rules does NOT have any inline comments.

I am happy to submit a fix to resolve this issue, but I can not determine where we get the 51-android.rules udev configuration from. Please point me in the right direction and I will do my best to resolve.

Thank you.

What did you expect to happen?

I expected the udev rules that we are using to not generate errors when getting parsed.

The latest 51-android.rules file here: https://github.com/M0Rf30/android-udev-rules does not contain inline comments.

Output of rpm-ostree status

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:latest
                   Digest: sha256:cbae715dd100fff19b642a60e06d1c261fa7117223afafd53e7c45f35bd94cce
                  Version: 40.20240702.0 (2024-07-02T04:54:50Z)
                     Diff: 9 upgraded

● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:latest
                   Digest: sha256:d8d55f5f27490f47a9e4f1a6b8ada06d4d9dc7cbb497f4baf3f96c7a20fe378d
                  Version: 40.20240701.0 (2024-07-01T21:39:54Z)

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:latest
                   Digest: sha256:e7d4f63d35c1cd1232d831dcba6be611180b50a1fc260471ef5655067c1619af
                  Version: 40.20240617.0 (2024-06-17T20:07:42Z)

Output of groups

mbruzek wheel incus-admin docker lxd libvirt

Extra information or context

No response

@dosubot dosubot bot added the bug Something isn't working label Jul 2, 2024
@fiftydinar
Copy link
Collaborator

Hello, Android udev rules are located here:

https://github.com/ublue-os/android-udev-rules

@fiftydinar
Copy link
Collaborator

It's just 3 commits behind, oppositely of what the version indicates, since maintainers didn't touched that.

But the build in COPR was built 9 months ago, so just a merge of those 3 new commits & build trigger should solve the issue.

@mbruzek
Copy link
Author

mbruzek commented Jul 2, 2024

Thank you @fiftydinar I will take a look at fixing these issues.

@mbruzek
Copy link
Author

mbruzek commented Jul 2, 2024

I created the pull request here: ublue-os/android-udev-rules#5

But as you pointed out the version of the android-udev-rules in the ublue repo was already newer than what I see on the latest ublue image. Please advise how I can initiate a build of COPR after the pull request is accepted by a maintainer.

Thank you!

@fiftydinar
Copy link
Collaborator

@mbruzek Unfortunately, only certain Universal Blue maintainers have access to ublue-os/staging COPR repo, where Android udev rules reside.

So build can be pushed by them only.

@castrojo
Copy link
Member

castrojo commented Jul 5, 2024

This looks good to go?

@castrojo castrojo closed this as completed Jul 5, 2024
@fiftydinar
Copy link
Collaborator

fiftydinar commented Jul 7, 2024

@castrojo just looking at the COPR, package is still not rebuilt.

Meanwhile, I will manually update the rule in my image.

@fiftydinar
Copy link
Collaborator

Now package rebuilt, so this issue is now officially solved

@bsherman
Copy link
Contributor

I shouldn't have reopened this as it was correctly closed back in July.

Since then there were more updates in the upstream android-udev-rules and a PR was opened: ublue-os/android-udev-rules#8

I've merged that and will rebuild the COPR.

@fiftydinar
Copy link
Collaborator

Reopening, because commit needs to be merged, which updates RPM version & then rebuild in COPR needs to be triggered.

When same RPM version is used for multiple builds, it can happen that you don't get the latest build.

@fiftydinar fiftydinar reopened this Oct 27, 2024
@castrojo
Copy link
Member

castrojo commented Nov 2, 2024

We sorted this didn't we?

@fiftydinar
Copy link
Collaborator

Now it's sorted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants