История изменений
Исправление leg0las, (текущая версия) :
>>> Preparing source in /var/tmp/portage/sys-fs/eudev-1_beta1-r1/work/eudev-1_beta1 ...
* Applying eudev-1_beta1-include-all-search-paths.patch [ ok ]
* Running elibtoolize in: eudev-1_beta1/
* Applying portage/1.2.0 patch ...
* Applying sed/1.5.6 patch ...
* Applying as-needed/2.2.6 patch ...
>>> Source prepared.
Патчик в дереве:
eudev-1_beta1-include-all-search-paths.patch
--- a/src/udev/Makefile.in 2012-12-08 10:20:52.000000000 -0500
+++ b/src/udev/Makefile.in 2012-12-12 11:19:34.000000000 -0500
@@ -371,6 +371,7 @@
-DROOTPREFIX=\"$(rootprefix)\" \
-DUDEV_HWDB_DIR=\"$(udevhwdbdir)\" \
-DUDEV_HWDB_BIN=\"$(udevhwdbbin)\" \
+ -DUDEV_CONF_DIR=\"$(udevconfdir)\" \
-DUDEV_RULES_DIR=\"$(udevrulesdir)\" \
-DUDEV_LIBEXEC_DIR=\"$(udevlibexecdir)\" \
-I $(top_srcdir)/src/libudev
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -687,10 +687,13 @@ int udev_event_spawn(struct udev_event *event,
}
/* allow programs in /usr/lib/udev/ to be called without the path */
+ /* NOTE - paths need reworking, see note in udev-rules.c */
if (argv[0][0] != '/') {
util_strscpyl(program, sizeof(program), UDEV_LIBEXEC_DIR "/", argv[0], NULL);
#ifdef HAVE_SPLIT_USR
if(access(program, X_OK))
+ util_strscpyl(program, sizeof(program), "/usr/lib/udev/", argv[0], NULL);
+ if(access(program, X_OK))
util_strscpyl(program, sizeof(program), "/lib/udev/", argv[0], NULL);
#endif
argv[0] = program;
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1600,11 +1600,28 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
if (!rules->strbuf)
return udev_rules_unref(rules);
- rules->dirs = strv_new(UDEV_RULES_DIR,
+ /* Note - need a better way to manage these paths:
+ * ie, should have a list of paths we always support, and
+ * do not include the #define vars if they are duplicates
+ *
+ * original - UDEV_RULES_DIR should be /etc/udev/rules.d
+ * ..but we have it set to UDEV_LIBEXEC_DIR "/rules.d" so that
+ * ..the default rules are installed there instead of in /etc
+ *
+ * original2 - UDEV_LIBEXEC_DIR used to be forced to /usr/lib/udev
+ * ..by default, we have it as /lib/udev (or whatever rootlibdir is)
+ * ..therefore we did not include /usr/lib/udev/rules.d.
+ *
+ * Reworked code; there are duplicate paths here but at least
+ * everyting is listed.
+ */
+ rules->dirs = strv_new(UDEV_CONF_DIR "/rules.d",
+ UDEV_RULES_DIR,
"/run/udev/rules.d",
UDEV_LIBEXEC_DIR "/rules.d",
#ifdef HAVE_SPLIT_USR
"/lib/udev/rules.d",
+ "/usr/lib/udev/rules.d",
#endif
NULL);
if (!rules->dirs) {
Пардон за простыню, может кому-то пригодится.
Исходная версия leg0las, :
Нашел патчик в дереве:
eudev-1_beta1-include-all-search-paths.patch
--- a/src/udev/Makefile.in 2012-12-08 10:20:52.000000000 -0500
+++ b/src/udev/Makefile.in 2012-12-12 11:19:34.000000000 -0500
@@ -371,6 +371,7 @@
-DROOTPREFIX=\"$(rootprefix)\" \
-DUDEV_HWDB_DIR=\"$(udevhwdbdir)\" \
-DUDEV_HWDB_BIN=\"$(udevhwdbbin)\" \
+ -DUDEV_CONF_DIR=\"$(udevconfdir)\" \
-DUDEV_RULES_DIR=\"$(udevrulesdir)\" \
-DUDEV_LIBEXEC_DIR=\"$(udevlibexecdir)\" \
-I $(top_srcdir)/src/libudev
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -687,10 +687,13 @@ int udev_event_spawn(struct udev_event *event,
}
/* allow programs in /usr/lib/udev/ to be called without the path */
+ /* NOTE - paths need reworking, see note in udev-rules.c */
if (argv[0][0] != '/') {
util_strscpyl(program, sizeof(program), UDEV_LIBEXEC_DIR "/", argv[0], NULL);
#ifdef HAVE_SPLIT_USR
if(access(program, X_OK))
+ util_strscpyl(program, sizeof(program), "/usr/lib/udev/", argv[0], NULL);
+ if(access(program, X_OK))
util_strscpyl(program, sizeof(program), "/lib/udev/", argv[0], NULL);
#endif
argv[0] = program;
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1600,11 +1600,28 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
if (!rules->strbuf)
return udev_rules_unref(rules);
- rules->dirs = strv_new(UDEV_RULES_DIR,
+ /* Note - need a better way to manage these paths:
+ * ie, should have a list of paths we always support, and
+ * do not include the #define vars if they are duplicates
+ *
+ * original - UDEV_RULES_DIR should be /etc/udev/rules.d
+ * ..but we have it set to UDEV_LIBEXEC_DIR "/rules.d" so that
+ * ..the default rules are installed there instead of in /etc
+ *
+ * original2 - UDEV_LIBEXEC_DIR used to be forced to /usr/lib/udev
+ * ..by default, we have it as /lib/udev (or whatever rootlibdir is)
+ * ..therefore we did not include /usr/lib/udev/rules.d.
+ *
+ * Reworked code; there are duplicate paths here but at least
+ * everyting is listed.
+ */
+ rules->dirs = strv_new(UDEV_CONF_DIR "/rules.d",
+ UDEV_RULES_DIR,
"/run/udev/rules.d",
UDEV_LIBEXEC_DIR "/rules.d",
#ifdef HAVE_SPLIT_USR
"/lib/udev/rules.d",
+ "/usr/lib/udev/rules.d",
#endif
NULL);
if (!rules->dirs) {
Пардон за простыню, может кому-то пригодится.