-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Install UDev rules to the proper location by default #4114
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1373,23 +1373,19 @@ if(UNIX AND NOT APPLE) | |
if (INSTALL_USER_UDEV_RULES) | ||
install( | ||
FILES | ||
"${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx-usb-uaccess.rules" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/linux/69-mixxx-usb-uaccess.rules" | ||
DESTINATION | ||
"${MIXXX_INSTALL_DATADIR}/udev/rules.d" | ||
"${CMAKE_INSTALL_LIBDIR}/udev/rules.d" | ||
) | ||
install(CODE " | ||
message(STATUS \"Important Note: Installation of udev rules\n\" | ||
\"The udev rule file for USB HID and Bulk controller permissions will be\n\" | ||
\"installed to:\n\" | ||
\" ${CMAKE_INSTALL_PREFIX}/${MIXXX_INSTALL_DATADIR}/udev/rules.d.\n\" | ||
\" ${CMAKE_INSTALL_LIBDIR}/udev/rules.d.\n\" | ||
\"If you are installing Mixxx from source for your own use, copy\n\" | ||
\"mixxx-usb-uaccess.rules to /etc/udev/rules.d/ and run:\n\" | ||
\"69-mixxx-usb-uaccess.rules to /etc/udev/rules.d/ and run:\n\" | ||
\" udevadm control --reload-rules && udevadm trigger\n\" | ||
\"as root to load the rules.\n\" | ||
\"If you are building a package for a distribution, the correct directory for\n\" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this passage removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the intent of this PR is to install it to the right place in the first place. At that point this comment is unnecessary, it'll already be in the right place. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once we install it at the right place, we need to rewrite this message. Maybe it can be omitted entirely and only be issues as a fatal message if the detection of the correct install directory fails. |
||
\"system rules is either /lib/udev/rules.d (e.g. Debian, Fedora) or\n\" | ||
\"/usr/lib/udev/rules.d (e.g. Arch Linux) with an appropriate priority prefix.\n\" | ||
\"Adjust your package script accordingly and set -DINSTALL_USER_UDEV_RULES=OFF\") | ||
\"as root to load the rules.\n\") | ||
") | ||
endif() | ||
endif() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default this is "/usr/local/lib/udev/rules.d" which is wrong at least for Ubuntu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what is the problem? It did not install to the right place before either if the prefix was /usr/local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before it was installed as data to the standard arch directory under a mixxx folder. I did not consider this as clutter.
Please refer to the original decision process. #3458
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original decision was bad, as packagers have told us. This exists for their convenience. Please listen to them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes no difference whether it is installed to one wrong location or another. Neither has an effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that Ubuntu will install it to the correct place if it's packaging sets
-DCMAKE_INSTALL_PREFIX=/
. If it doesn't right now, that's wrong anyhow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it does not, see:
https://github.com/Debian/debhelper/blob/eb6e510ef52430c6edb96b28879fa4f64fbcafdb/Debian/Debhelper/Buildsystem/autoconf.pm#L34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's autoconf and not relevant for a CMake project. Besides, you should be able to overwrite whatever defaults it sets as a packager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, wrong link:
https://github.com/Debian/debhelper/blob/eb6e510ef52430c6edb96b28879fa4f64fbcafdb/Debian/Debhelper/Buildsystem/cmake.pm#L15
Yes, but the point of the whole PR is to avoid manual steps, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find configuring CMake correctly by adding an argument to the command you're calling any way better than executing an entirely new command 😉
But it seems Ubuntu installs things in places I didn't expect, so I guess the pkg-config method is the way to go. Closing this PR for now.