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

Generate rules with Python #5

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Generate rules with Python #5

merged 1 commit into from
Dec 16, 2024

Conversation

robin-nitrokey
Copy link
Member

This patch adds a Python script to generate the udev rules. The required data is defined in a TOML file. This makes the rules easier to maintain and update.

This causes some small changes in the formatting of the rules. Also, the rule for the Nitrokey Storage bootloader is updated to use ATTRS instead of ATTR for consistency with similar rules.

Comment on lines +101 to +102
# Nitrokey Storage dev Entry
KERNEL=="sd?1", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4109", SYMLINK+="nitrospace"
Copy link
Member Author

Choose a reason for hiding this comment

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

I forgot to mention – this rule looks somewhat misplaced. I understand it’s for development? Should we just remove it from the official rules?

Copy link
Member

Choose a reason for hiding this comment

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

@szszszsz Any idea, opinion?

This patch adds a Python script to generate the udev rules.  The
required data is defined in a TOML file.  This makes the rules easier to
maintain and update.

This causes some small changes in the formatting of the rules.  Also,
the rule for the Nitrokey Storage bootloader is updated to use ATTRS
instead of ATTR for consistency with similar rules.
@robin-nitrokey robin-nitrokey merged commit 922e0f9 into main Dec 16, 2024
4 checks passed
@robin-nitrokey robin-nitrokey deleted the generate branch December 16, 2024 10:25
@robin-nitrokey
Copy link
Member Author

Merged with the unclear Nitrokey Storage rule to keep the status quo. We can still remove it in another PR.

@szszszsz
Copy link
Member

szszszsz commented Dec 20, 2024 via email

@robin-nitrokey
Copy link
Member Author

@szszszsz Thanks for the explanation! Let’s remove it from the general rules then. Users can still add a custom rule based on their setup and device.

robin-nitrokey added a commit that referenced this pull request Dec 21, 2024
robin-nitrokey added a commit that referenced this pull request Dec 21, 2024
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.

5 participants