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

View File

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

5
NEWS
View File

@ -2,6 +2,11 @@ udev 143
========
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
the number of forks and the pressure on the CPU significantly, because
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 add tests for kernel provided DEVNAME logic
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
libdirname=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
args="--prefix=/usr --exec-prefix= --sysconfdir=/etc \
--libdir=/usr/$libdirname --with-libdir-name=$libdirname \
--with-selinux --enable-gtk-doc"
libdir() {
echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
}
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"
./configure $args $@

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -113,3 +113,6 @@ EXTRA_DIST += GUdev-1.0.gir
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
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
udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = hid2hci
libexec_PROGRAMS = \
hid2hci
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = 70-hid2hci.rules
dist_udevrules_DATA = \
70-hid2hci.rules
hid2hci_SOURCES = hid2hci.c
hid2hci_LDADD = @LIBUSB_LIBS@
hid2hci_SOURCES = \
hid2hci.c
hid2hci_LDADD = \
@LIBUSB_LIBS@

View File

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

View File

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

View File

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

View File

@ -1,15 +1,19 @@
include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = udev-acl
libexec_PROGRAMS = \
udev-acl
udev_acl_SOURCES = udev-acl.c
udev_acl_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
udev_acl_LDADD = -lacl $(top_builddir)/libudev/libudev.la $(GLIB_LIBS)
udev_acl_SOURCES = \
udev-acl.c
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
install-exec-hook:
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
udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = usb-db pci-db
libexec_PROGRAMS = \
usb-db pci-db
usb_db_SOURCES = usb-db.c
usb_db_CPPFLAGS = $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
usb_db_LDADD = $(top_builddir)/libudev/libudev.la
usb_db_SOURCES = \
usb-db.c
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
usb_db_CPPFLAGS = \
$(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
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
udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = \
libexec_PROGRAMS = \
usb_id
usb_id_SOURCES = \

View File

@ -1,9 +1,10 @@
include $(top_srcdir)/Makefile.am.inc
udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = v4l_id
libexec_PROGRAMS = \
v4l_id
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = 60-persistent-v4l.rules
dist_udevrules_DATA = \
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 = \
libudev.la
rootlibdir = $(exec_prefix)/$(libdir_name)
rootlib_LTLIBRARIES = \
libudev.la
@ -36,25 +35,24 @@ libudev_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-symbols $(top_srcdir)/libudev/exported_symbols
pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
pkgconfig_DATA = libudev.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
libudev.pc
EXTRA_DIST = \
exported_symbols
# move devel files to $(prefix)$(libdir_name) if needed
# move devel files from $(rootlibdir) to $(libdir) if needed
install-data-hook:
rm $(DESTDIR)$(rootlibdir)/libudev.la
if test "$(prefix)" != "$(exec_prefix)"; then \
mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \
mv $(DESTDIR)$(rootlibdir)/libudev.a $(DESTDIR)$(prefix)/$(libdir_name)/; \
rm -f $(DESTDIR)$(rootlibdir)/libudev.la
if test "$(libdir)" != "$(rootlibdir)"; then \
mkdir -p $(DESTDIR)$(rootlibdir); \
so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libudev.so); \
rm $(DESTDIR)$(rootlibdir)/libudev.so; \
so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
ln -sf $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \
$(DESTDIR)$(prefix)/$(libdir_name)/libudev.so; \
so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so; \
fi
uninstall-hook:
rm -f $(DESTDIR)$(prefix)/$(libdir_name)/libudev.a
rm -f $(DESTDIR)$(prefix)/$(libdir_name)/libudev.so*
rm -f $(DESTDIR)$(rootlibdir)/libudev.a
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 */
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;
}

View File

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

View File

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

View File

@ -1,6 +1,5 @@
include $(top_srcdir)/Makefile.am.inc
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = \
rules.d/50-udev-default.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 */
if (value[0] != '/')
util_strscpyl(file, sizeof(file), UDEV_PREFIX "/lib/udev/", value, NULL);
util_strscpyl(file, sizeof(file), LIBEXECDIR "/", value, NULL);
else
util_strscpy(file, sizeof(file), value);
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");
/* 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 */
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 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 *udev;

View File

@ -869,7 +869,7 @@ int main(int argc, char *argv[])
} else {
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);
inotify_add_watch(pfd[FD_INOTIFY].fd, SYSCONFDIR "/udev/rules.d",
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);