1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

cleanup ./configure installation directory options

This commit is contained in:
Kay Sievers 2009-06-17 02:25:07 +02:00
parent 29cf5b58be
commit 6133f3432f
31 changed files with 139 additions and 133 deletions

47
INSTALL
View File

@ -1,26 +1,22 @@
Usual options for udev installed in the root filesystem are: Usual options for udev installed in the root filesystem are:
./configure ./configure \
--prefix=/usr --prefix=/usr \
--exec-prefix= --sysconfdir=/etc \
--sysconfdir=/etc --sbindir=/sbin \
For 64bit multilib-installations also: --libdir=/usr/lib64 \
--with-libdir-name=lib64 --with-rootlibdir=/lib64 \
For SELinux support: --libexecdir=/lib/udev \
--with-selinux --with-selinux
All options: All options:
--prefix= --prefix=
Prefix for man pages, include files. Usually /usr, prefix for man pages, include files.
--exec-prefix=
Prefix for libs, binaries, usually the root filesystem.
--with-udev-prefix=
Prefix for internal udev path names, like /dev/, /lib/udev/.
Only useful for testing and development installations. The
value is copied from exec-prefix, if not specified otherwise.
--sysconfdir= --sysconfdir=
Usually /etc. Usually /etc.
--with-libdir-name= --sbindir=
Directory name for libraries. This is not a path name. Usually /sbin, the place for udevd and udevadm.
--libexecdir=
Usually /lib/udev, the udev private directory.
--enable-debug --enable-debug
Compile-in verbose debug messages. Usually not needed, Compile-in verbose debug messages. Usually not needed,
it increases the size of the binaries. it increases the size of the binaries.
@ -29,18 +25,21 @@ All options:
is not recommended, as it makes it almost impossible to debug is not recommended, as it makes it almost impossible to debug
udev in the running system. udev in the running system.
--with-selinux --with-selinux
Link against SELInux libraries to set the expected context Link against SELinux libraries to set the expected context
for created files. for created files.
--disable-extras --disable-extras
Disable the build of extras with larger external dependencies Disable the build of all extras which have larger external
like glib, libacl, libusb, ... dependencies like glib, libacl, libusb, ...
The options used in a RPM spec file usually look like: The options used in a RPM spec file usually look like:
--prefix=%{_prefix} %configure \
--exec-prefix= --prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} --sysconfdir=%{_sysconfdir} \
--with-libdir-name=%{_lib} --sbindir=%{_sbindir} \
--with-selinux --libdir=%{_libdir} \
--with-rootlibdir=/%{_lib} \
--libexecdir=/lib/udev \
--with-selinux
The defined location for scripts and binaries which are called The defined location for scripts and binaries which are called
from rules is /lib/udev/ on all systems and architectures. Any from rules is /lib/udev/ on all systems and architectures. Any

View File

@ -2,9 +2,13 @@ AM_CPPFLAGS = \
-include $(top_builddir)/config.h \ -include $(top_builddir)/config.h \
-I$(top_srcdir)/libudev \ -I$(top_srcdir)/libudev \
-DSYSCONFDIR=\""$(sysconfdir)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \
-DUDEV_PREFIX=\""$(udev_prefix)"\" -DLIBEXECDIR=\""$(libexecdir)"\"
AM_CFLAGS = AM_CFLAGS =
AM_LDFLAGS = \ AM_LDFLAGS = \
-Wl,--as-needed -Wl,--as-needed
udevrulesdir = \
$(libexecdir)/rules.d

5
NEWS
View File

@ -2,6 +2,11 @@ udev 143
======== ========
Bugfixes. Bugfixes.
The configure options have changed because another library needs to be
installed in a different location. Instead of exec_prefix and udev_prefix,
libdir, rootlibdir and libexecdir are used. The Details are explained in
the README file.
Event processes now get re-used after they handled an event. This reduces Event processes now get re-used after they handled an event. This reduces
the number of forks and the pressure on the CPU significantly, because the number of forks and the pressure on the CPU significantly, because
cloned event processes no longer cause page faults in the main daemon. cloned event processes no longer cause page faults in the main daemon.

3
TODO
View File

@ -1,6 +1,3 @@
o cleanup old extras which link libudev source directly
o fix configure options and libdir-name, exec-prefix, udev-prefix, libdir, ...
o enumerate: sort control* after pcm* o enumerate: sort control* after pcm*
o add tests for kernel provided DEVNAME logic o add tests for kernel provided DEVNAME logic
o drop modprobe floppy alias (SUSE), it will be in the module (2.6.30) o drop modprobe floppy alias (SUSE), it will be in the module (2.6.30)

View File

@ -18,10 +18,18 @@ case "$CFLAGS" in
;; ;;
esac esac
libdirname=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd)) libdir() {
args="--prefix=/usr --exec-prefix= --sysconfdir=/etc \ echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
--libdir=/usr/$libdirname --with-libdir-name=$libdirname \ }
--with-selinux --enable-gtk-doc"
args="--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/sbin \
--libdir=$(libdir /usr/lib) \
--with-rootlibdir=$(libdir /lib) \
--libexecdir=/lib/udev \
--with-selinux \
--enable-gtk-doc"
export CFLAGS="$CFLAGS $MYCFLAGS" export CFLAGS="$CFLAGS $MYCFLAGS"
./configure $args $@ ./configure $args $@

View File

@ -1,6 +1,4 @@
AC_INIT([udev], AC_INIT([udev], [143], [linux-hotplug@vger.kernel.org])
[143],
[linux-hotplug@vger.kernel.org])
AC_PREREQ(2.60) AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2]) AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2])
AC_DISABLE_STATIC AC_DISABLE_STATIC
@ -10,28 +8,17 @@ AC_SYS_LARGEFILE
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
GTK_DOC_CHECK(1.10) GTK_DOC_CHECK(1.10)
dnl /* prefix is /usr, exec_prefix is /, if overridden exec_prefix follows prefix */
AC_PREFIX_DEFAULT([/usr]) AC_PREFIX_DEFAULT([/usr])
test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix=
AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_ARG_WITH(udev-prefix, AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-udev-prefix=DIR], [add prefix to internal udev path names]), AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]),
[], [with_udev_prefix='${exec_prefix}']) [], [with_rootlibdir=$libdir])
udev_prefix=$with_udev_prefix AC_SUBST([rootlibdir], [$with_rootlibdir])
AC_SUBST(udev_prefix)
AC_ARG_WITH(libdir-name, AC_ARG_WITH([selinux],
AS_HELP_STRING([--with-libdir-name=DIR], [name of the arch lib directory]),
[], [with_libdir_name=lib])
libdir_name=$with_libdir_name
AC_SUBST(libdir_name)
AC_ARG_WITH(selinux,
AS_HELP_STRING([--with-selinux], [enable SELinux support]), AS_HELP_STRING([--with-selinux], [enable SELinux support]),
[], with_selinux=no) [], [with_selinux=no])
if test "x$with_selinux" = xyes; then if test "x$with_selinux" = xyes; then
LIBS_save=$LIBS LIBS_save=$LIBS
AC_CHECK_LIB(selinux, getprevcon, AC_CHECK_LIB(selinux, getprevcon,
@ -44,14 +31,14 @@ fi
AC_SUBST([SELINUX_LIBS]) AC_SUBST([SELINUX_LIBS])
AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes]) AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = xyes])
AC_ARG_ENABLE(debug, AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debug messages]), AS_HELP_STRING([--enable-debug], [enable debug messages]),
[], enable_debug=no) [], [enable_debug=no])
if test "x$enable_debug" = "xyes"; then if test "x$enable_debug" = "xyes"; then
AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
fi fi
AC_ARG_ENABLE(logging, AC_ARG_ENABLE([logging],
AS_HELP_STRING([--disable-logging], [disable system logging]), AS_HELP_STRING([--disable-logging], [disable system logging]),
[], enable_logging=yes) [], enable_logging=yes)
if test "x$enable_logging" = "xyes"; then if test "x$enable_logging" = "xyes"; then
@ -142,10 +129,12 @@ AC_MSG_RESULT([
======== ========
prefix: ${prefix} prefix: ${prefix}
exec_prefix: ${exec_prefix} sysconfdir: ${sysconfdir}
udev_prefix: ${udev_prefix} sbindir: ${sbindir}
libdir: ${libdir} libdir: ${libdir}
libdir_name: ${libdir_name} rootlibdir: ${rootlibdir}
libexecdir: ${libexecdir}
datarootdir: ${datarootdir} datarootdir: ${datarootdir}
mandir: ${mandir} mandir: ${mandir}
includedir: ${includedir} includedir: ${includedir}

View File

@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
ata_id ata_id
ata_id_SOURCES = \ ata_id_SOURCES = \

View File

@ -1,10 +1,8 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
cdrom_id cdrom_id
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
60-cdrom_id.rules 60-cdrom_id.rules

View File

@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
collect collect
collect_SOURCES = \ collect_SOURCES = \

View File

@ -34,7 +34,7 @@
#include "libudev.h" #include "libudev.h"
#include "libudev-private.h" #include "libudev-private.h"
#define TMPFILE UDEV_PREFIX "/dev/.udev/collect" #define TMPFILE "/dev/.udev/collect"
#define BUFSIZE 16 #define BUFSIZE 16
#define UDEV_ALARM_TIMEOUT 180 #define UDEV_ALARM_TIMEOUT 180

View File

@ -1,10 +1,8 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
edd_id edd_id
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
61-persistent-storage-edd.rules 61-persistent-storage-edd.rules

View File

@ -1,9 +1,7 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev dist_libexec_SCRIPTS = \
dist_udevhome_SCRIPTS = \
firmware.sh firmware.sh
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
50-firmware.rules 50-firmware.rules

View File

@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
create_floppy_devices create_floppy_devices
create_floppy_devices_SOURCES = \ create_floppy_devices_SOURCES = \

View File

@ -1,10 +1,8 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
fstab_import fstab_import
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
79-fstab_import.rules 79-fstab_import.rules

View File

@ -113,3 +113,6 @@ EXTRA_DIST += GUdev-1.0.gir
CLEANFILES += $(gir_DATA) $(typelibs_DATA) CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif # ENABLE_INTROSPECTION endif # ENABLE_INTROSPECTION
install-data-hook:
rm -f $(DESTDIR)$(libdir)/libgudev-1.0.la

View File

@ -1,10 +1,13 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = hid2hci hid2hci
udevrulesdir = $(udev_prefix)/lib/udev/rules.d dist_udevrules_DATA = \
dist_udevrules_DATA = 70-hid2hci.rules 70-hid2hci.rules
hid2hci_SOURCES = hid2hci.c hid2hci_SOURCES = \
hid2hci_LDADD = @LIBUSB_LIBS@ hid2hci.c
hid2hci_LDADD = \
@LIBUSB_LIBS@

View File

@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
path_id path_id
path_id_SOURCES = \ path_id_SOURCES = \

View File

@ -1,14 +1,13 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev dist_libexec_SCRIPTS = \
dist_udevhome_SCRIPTS = \
write_cd_rules \ write_cd_rules \
write_net_rules write_net_rules
udevhomedir = $(libexecdir)
dist_udevhome_DATA = \ dist_udevhome_DATA = \
rule_generator.functions rule_generator.functions
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
75-cd-aliases-generator.rules \ 75-cd-aliases-generator.rules \
75-persistent-net-generator.rules 75-persistent-net-generator.rules

View File

@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
scsi_id scsi_id
scsi_id_SOURCES = \ scsi_id_SOURCES = \

View File

@ -1,15 +1,19 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = udev-acl udev-acl
udev_acl_SOURCES = udev-acl.c udev_acl_SOURCES = \
udev_acl_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) udev-acl.c
udev_acl_LDADD = -lacl $(top_builddir)/libudev/libudev.la $(GLIB_LIBS)
udev_acl_CPPFLAGS = \
$(AM_CPPFLAGS) $(GLIB_CFLAGS)
udev_acl_LDADD = \
-lacl $(top_builddir)/libudev/libudev.la $(GLIB_LIBS)
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = 70-acl.rules dist_udevrules_DATA = 70-acl.rules
install-exec-hook: install-exec-hook:
mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d
ln -sf $(udevhomedir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d/udev-acl.ck

View File

@ -1,12 +1,23 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = usb-db pci-db usb-db pci-db
usb_db_SOURCES = usb-db.c usb_db_SOURCES = \
usb_db_CPPFLAGS = $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB usb-db.c
usb_db_LDADD = $(top_builddir)/libudev/libudev.la
pci_db_SOURCES = $(usb_db_SOURCES) usb_db_CPPFLAGS = \
pci_db_CPPFLAGS = $(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
pci_db_LDADD = $(top_builddir)/libudev/libudev.la
usb_db_LDADD = \
$(top_builddir)/libudev/libudev.la
pci_db_SOURCES = \
$(usb_db_SOURCES)
pci_db_CPPFLAGS = \
$(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI
pci_db_LDADD = \
$(top_builddir)/libudev/libudev.la

View File

@ -1,7 +1,6 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = \
usb_id usb_id
usb_id_SOURCES = \ usb_id_SOURCES = \

View File

@ -1,9 +1,10 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev libexec_PROGRAMS = \
udevhome_PROGRAMS = v4l_id v4l_id
udevrulesdir = $(udev_prefix)/lib/udev/rules.d dist_udevrules_DATA = \
dist_udevrules_DATA = 60-persistent-v4l.rules 60-persistent-v4l.rules
v4l_id_SOURCES = v4l_id.c v4l_id_SOURCES = \
v4l_id.c

View File

@ -12,7 +12,6 @@ test_libudev_SOURCES = \
test_libudev_LDADD = \ test_libudev_LDADD = \
libudev.la libudev.la
rootlibdir = $(exec_prefix)/$(libdir_name)
rootlib_LTLIBRARIES = \ rootlib_LTLIBRARIES = \
libudev.la libudev.la
@ -36,25 +35,24 @@ libudev_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-symbols $(top_srcdir)/libudev/exported_symbols -export-symbols $(top_srcdir)/libudev/exported_symbols
pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libudev.pc pkgconfig_DATA = \
libudev.pc
EXTRA_DIST = \ EXTRA_DIST = \
exported_symbols exported_symbols
# move devel files to $(prefix)$(libdir_name) if needed # move devel files from $(rootlibdir) to $(libdir) if needed
install-data-hook: install-data-hook:
rm $(DESTDIR)$(rootlibdir)/libudev.la rm -f $(DESTDIR)$(rootlibdir)/libudev.la
if test "$(prefix)" != "$(exec_prefix)"; then \ if test "$(libdir)" != "$(rootlibdir)"; then \
mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \ mkdir -p $(DESTDIR)$(rootlibdir); \
mv $(DESTDIR)$(rootlibdir)/libudev.a $(DESTDIR)$(prefix)/$(libdir_name)/; \
so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libudev.so); \ so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libudev.so); \
rm $(DESTDIR)$(rootlibdir)/libudev.so; \ rm $(DESTDIR)$(rootlibdir)/libudev.so; \
so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
ln -sf $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \ ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so; \
$(DESTDIR)$(prefix)/$(libdir_name)/libudev.so; \
fi fi
uninstall-hook: uninstall-hook:
rm -f $(DESTDIR)$(prefix)/$(libdir_name)/libudev.a rm -f $(DESTDIR)$(rootlibdir)/libudev.a
rm -f $(DESTDIR)$(prefix)/$(libdir_name)/libudev.so* rm -f $(DESTDIR)$(rootlibdir)/libudev.so*

View File

@ -290,7 +290,7 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
/* allow programs in /lib/udev/ to be called without the path */ /* allow programs in /lib/udev/ to be called without the path */
if (argv[0][0] != '/') { if (argv[0][0] != '/') {
util_strscpyl(program, sizeof(program), UDEV_PREFIX "/lib/udev/", argv[0], NULL); util_strscpyl(program, sizeof(program), LIBEXECDIR "/", argv[0], NULL);
argv[0] = program; argv[0] = program;
} }

View File

@ -123,7 +123,7 @@ struct udev *udev_new(void)
udev->log_priority = LOG_ERR; udev->log_priority = LOG_ERR;
udev_list_init(&udev->properties_list); udev_list_init(&udev->properties_list);
udev->run = 1; udev->run = 1;
udev->dev_path = strdup(UDEV_PREFIX "/dev"); udev->dev_path = strdup("/dev");
udev->sys_path = strdup("/sys"); udev->sys_path = strdup("/sys");
config_file = strdup(SYSCONFDIR "/udev/udev.conf"); config_file = strdup(SYSCONFDIR "/udev/udev.conf");
if (udev->dev_path == NULL || if (udev->dev_path == NULL ||

View File

@ -1,6 +1,6 @@
prefix=@prefix@ prefix=@prefix@
exec_prefix=@prefix@ exec_prefix=@prefix@
libdir=@prefix@/@libdir_name@ libdir=@libdir@
includedir=@prefix@/include includedir=@prefix@/include
Name: libudev Name: libudev

View File

@ -1,6 +1,5 @@
include $(top_srcdir)/Makefile.am.inc include $(top_srcdir)/Makefile.am.inc
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \ dist_udevrules_DATA = \
rules.d/50-udev-default.rules \ rules.d/50-udev-default.rules \
rules.d/60-persistent-storage.rules \ rules.d/60-persistent-storage.rules \

View File

@ -1338,7 +1338,7 @@ static int add_rule(struct udev_rules *rules, char *line,
/* allow programs in /lib/udev called without the path */ /* allow programs in /lib/udev called without the path */
if (value[0] != '/') if (value[0] != '/')
util_strscpyl(file, sizeof(file), UDEV_PREFIX "/lib/udev/", value, NULL); util_strscpyl(file, sizeof(file), LIBEXECDIR "/", value, NULL);
else else
util_strscpy(file, sizeof(file), value); util_strscpy(file, sizeof(file), value);
pos = strchr(file, ' '); pos = strchr(file, ' ');
@ -1734,7 +1734,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
add_matching_files(udev, &sort_list, filename, ".rules"); add_matching_files(udev, &sort_list, filename, ".rules");
/* read default rules */ /* read default rules */
add_matching_files(udev, &sort_list, UDEV_PREFIX "/lib/udev/rules.d", ".rules"); add_matching_files(udev, &sort_list, LIBEXECDIR "/rules.d", ".rules");
/* sort all rules files by basename into list of files */ /* sort all rules files by basename into list of files */
udev_list_entry_foreach_safe(sort_loop, sort_tmp, udev_list_get_entry(&sort_list)) { udev_list_entry_foreach_safe(sort_loop, sort_tmp, udev_list_get_entry(&sort_list)) {

View File

@ -28,7 +28,7 @@
#define DEFAULT_FAKE_PARTITIONS_COUNT 15 #define DEFAULT_FAKE_PARTITIONS_COUNT 15
#define UDEV_EVENT_TIMEOUT 180 #define UDEV_EVENT_TIMEOUT 180
#define UDEV_CTRL_SOCK_PATH "@" UDEV_PREFIX "/org/kernel/udev/udevd" #define UDEV_CTRL_SOCK_PATH "@/org/kernel/udev/udevd"
struct udev_event { struct udev_event {
struct udev *udev; struct udev *udev;

View File

@ -869,7 +869,7 @@ int main(int argc, char *argv[])
} else { } else {
char filename[UTIL_PATH_SIZE]; char filename[UTIL_PATH_SIZE];
inotify_add_watch(pfd[FD_INOTIFY].fd, UDEV_PREFIX "/lib/udev/rules.d", inotify_add_watch(pfd[FD_INOTIFY].fd, LIBEXECDIR "/rules.d",
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
inotify_add_watch(pfd[FD_INOTIFY].fd, SYSCONFDIR "/udev/rules.d", inotify_add_watch(pfd[FD_INOTIFY].fd, SYSCONFDIR "/udev/rules.d",
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);