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

Add a generic --output argument to udevadm hwdb #263

Merged
merged 2 commits into from Sep 30, 2023
Merged

Add a generic --output argument to udevadm hwdb #263

merged 2 commits into from Sep 30, 2023

Conversation

ghost
Copy link

@ghost ghost commented Sep 27, 2023

Dear eudev developers,

In Guix, every package is installed in a separate "/usr" prefix. For instance, eudev is installed in "/usr-a/" and upower in "/usr-b/" (except it’s actually "/gnu/store/xxx-eudev-version" and "/gnu/store/yyy-upower-version", whatever). If I want to compile the hwdb database and write it to "/usr-b/lib/udev/hwdb.bin" (with "--usr"), the "--root" argument is insufficient. If I compile with --root=/usr-b, I will end up with "/usr-b/usr-a/lib/udev/hwdb.bin".

I think it would be better to let udevadm hwdb write to an arbitrary file.

What do you think?

Best regards,

Vivien

src/udev/udevadm-hwdb.c Outdated Show resolved Hide resolved
Vivien Kraus and others added 2 commits September 30, 2023 19:38
Instead of always writing /etc/udev/hwdb.bin or UDEV_LIBEXEC_DIR
/hwdb.bin, let the user specify a full file name.

* src/udev/udevadm-hwdb.c (adm_hwdb): New option "output". Construct
hwdb_bin when processing options, and prepend root after processing
options.
* man/udev.xml: Mention --output.
* man/udevadm.xml: Document --output.
* man/udev.7: Regenerate.
* man/udevadm.8: Same.
@bbonev
Copy link
Member

bbonev commented Sep 30, 2023

I somehow dislike the wording in the man page, e.g. if you want ship the compiled, but that does not come from your commit.

I will merge and fix that afterwards.

@bbonev bbonev merged commit 0c8f002 into eudev-project:master Sep 30, 2023
2 checks passed
@bbonev bbonev mentioned this pull request Oct 3, 2023
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.

1 participant