-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move udev rules from /etc/udev to /lib/udev
This change moves the default install location for the zfs udev rules from /etc/udev/ to /lib/udev/. The correct convention is for rules provided by a package to be installed in /lib/udev/. The /etc/udev/ directory is reserved for custom rules or local overrides. Additionally, this patch cleans up some abuse of the bindir install location by adding a udevdir and udevruledir install directories. This allows us to revert to the default bin install location. The udev install directories can be set with the following new options. --with-udevdir=DIR install udev helpers [EPREFIX/lib/udev] --with-udevruledir=DIR install udev rules [UDEVDIR/rules.d] Signed-off-by: Brian Behlendorf <[email protected]> Closes #356
- Loading branch information
1 parent
f3ab88d
commit 12d06ba
Showing
18 changed files
with
45 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dist_bin_SCRIPTS = sas_switch_id | ||
dist_udev_SCRIPTS = sas_switch_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dist_bin_SCRIPTS = zpool_id | ||
dist_udev_SCRIPTS = zpool_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
AC_DEFUN([ZFS_AC_CONFIG_USER_UDEV], [ | ||
AC_ARG_WITH(udevdir, | ||
AC_HELP_STRING([--with-udevdir=DIR], | ||
[install udev helpers [[EPREFIX/lib/udev]]]), | ||
udevdir=$withval, udevdir='${exec_prefix}/lib/udev') | ||
AC_ARG_WITH(udevruledir, | ||
AC_HELP_STRING([--with-udevruledir=DIR], | ||
[install udev rules [[UDEVDIR/rules.d]]]), | ||
udevruledir=$withval, udevruledir='${udevdir}/rules.d') | ||
AC_SUBST(udevdir) | ||
AC_SUBST(udevruledir) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SUBDIRS = init.d udev zfs | ||
SUBDIRS = init.d zfs |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
etc/udev/rules.d/60-zpool.rules.in → udev/rules.d/60-zpool.rules.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
udevrule_DATA = \ | ||
60-zpool.rules \ | ||
60-zvol.rules | ||
|
||
EXTRA_DIST = \ | ||
60-zpool.rules.in \ | ||
60-zvol.rules.in | ||
|
||
$(udevrule_DATA): | ||
-$(SED) -e 's,@udevdir\@,$(udevdir),g' '[email protected]' >'$@' | ||
|
||
distclean-local:: | ||
-$(RM) $(udevrule_DATA) | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12d06ba
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.
Should --with-udevdir default to EPREFIX/lib/udev?
I'm a Fedora packager so EPREFIX may make sense for other distros, but on Fedora the guideline is the packages install to /usr/{bin,lib{,64},share}... etc. But the udev rules do not go into /usr/lib/udev but /lib/udev as you mention.
12d06ba
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 believe this behavior was modeled after what the lvm2 packages do. Now I'm not a packaging guru (for any distro) so I'm not 100% sure if that's right or wrong but that's the history.
12d06ba
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 was easy enough to override manually, just thought I'd mention it.