Add rulesdir to libudev.pc
Hi Kay,
I think we should add a rulesdir entry like for example PolicKit does for its policy files. Attached patch does this. Please check if this makes sense to you.
Regards
Marcel
From f398d5de42a904830c223a73126d67084db8fd9d Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <[email protected]>
Date: Thu, 8 Jan 2009 20:45:27 +0100
Subject: [PATCH] libudev: libudev.pc add entry for rules directory
--- udev/lib/libudev.pc.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
udev/lib/libudev.pc.in +1 -0
@@ -2,6 +2,7 @@ prefix=@prefix@ exec_prefix=@prefix@ libdir=@prefix@/@libdir_name@ includedir=@prefix@/include +rulesdir=@prefix@/lib/udev/rules.d Name: libudev Description: Library to access udev device information
Signature · 1 line
1.5.6.3
Quoted 3 lines · Marcel Holtmann
I think we should add a rulesdir entry like for example PolicKit does for its policy files. Attached patch does this. Please check if this makes sense to you.
I don't mind, but the rules directory is only interesting for the daemon, not the library, you can even specify the location in the udev config file, or at daemon startup.
The problem is that we can not use prefix, which is /usr. If we use udev_prefix, which would be the right value, we get the non-expanded value in the pkgconfig file, but because we fake exec_prefix here, we are back to the inconsistency Inaky mentioned yesterday. :)
Maybe we should drop that exec_prefix use und invent --slibdir (s like
in --(s)bindir), which other projects think about to introduce, and we
would require: --prefix, --libdir=, --slibdir=, --sbindir--sysconf-dir to be specified at configure time? Maybe that's easier to handle, I was just waiting what the glib guys plan to use, because
they have similar problems with configure specifying the rootfs as
install location.
Thanks,
Kay
Hi Kay,
Quoted 7 lines
Quoted 3 lines
I think we should add a rulesdir entry like for example PolicKit does for its policy files. Attached patch does this. Please check if this makes sense to you.
I don't mind, but the rules directory is only interesting for the daemon, not the library, you can even specify the location in the udev config file, or at daemon startup.
I know, but that is a total different story. For external applications we need to know at least the default udev rules.d location. If then this gets overwritten by a command line option, you can't do much about it anyway.
Quoted 11 lines
The problem is that we can not use prefix, which is /usr. If we use
udev_prefix, which would be the right value, we get the non-expanded value in the pkgconfig file, but because we fakeexec_prefixhere, we are back to the inconsistency Inaky mentioned yesterday. :)Maybe we should drop that
exec_prefixuse und invent --slibdir (s like
in --(s)bindir), which other projects think about to introduce, and we
would require: --prefix, --libdir=, --slibdir=, --sbindir> --sysconf-dir to be specified at configure time? Maybe that's easier to handle, I was just waiting what the glib guys plan to use, because
they have similar problems with configure specifying the rootfs as
install location.
What about libexecdir since configure has already support for it. Just base everything of on that one.
Regards
Marcel
Quoted 25 lines · Marcel Holtmann
Quoted 7 lines
Quoted 3 lines
I think we should add a rulesdir entry like for example PolicKit does for its policy files. Attached patch does this. Please check if this makes sense to you.
I don't mind, but the rules directory is only interesting for the daemon, not the library, you can even specify the location in the udev config file, or at daemon startup.
I know, but that is a total different story. For external applications we need to know at least the default udev rules.d location. If then this gets overwritten by a command line option, you can't do much about it anyway.
Quoted 11 lines
The problem is that we can not use prefix, which is /usr. If we use
udev_prefix, which would be the right value, we get the non-expanded value in the pkgconfig file, but because we fakeexec_prefixhere, we are back to the inconsistency Inaky mentioned yesterday. :)Maybe we should drop that
exec_prefixuse und invent --slibdir (s like
in --(s)bindir), which other projects think about to introduce, and we
would require: --prefix, --libdir=, --slibdir=, --sbindir>> --sysconf-dir to be specified at configure time? Maybe that's easier to handle, I was just waiting what the glib guys plan to use, because
they have similar problems with configure specifying the rootfs as
install location.
Quoted 2 lines
What about libexecdir since configure has already support for it. Just base everything of on that one.
libexecdir could specify /lib/udev/, but not /lib{,64}/. That does not sound right, and I don't think it is covered by configure, when you need to install stuff into the rootfs.
Kay
Quoted 6 lines · Kay Sievers
Maybe we should drop that
exec_prefixuse und invent --slibdir (s like
in --(s)bindir), which other projects think about to introduce, and we
would require: --prefix, --libdir=, --slibdir=, --sbindir> --sysconf-dir to be specified at configure time? Maybe that's easier to handle, I was just waiting what the glib guys plan to use, because
they have similar problems with configure specifying the rootfs as
install location.
My $0.02... util-linux-ng installs files "everywhere" (/sbin, /bin, /usr/bin, /usr/sbin, /etc, ...)
The build system differentiate between $bindir and $usrbinexec, ... etc.
The important is that the default $exec_prefix (/usr) means "default locations" -- so /{bin,sbin,etc} for rootfs stuff and /usr/bin for /usr stuff. I think you can use the same logic for /lib and /usr/lib.
We follow autotools and we don't modify the default $prefix and $exec_prefix (by default both is /usr).
Everything what you need is to check for non-default $exec_prefix in configure script, in such case you have to follow the prefix at all.
configure.ac:
AC_PREFIX_DEFAULT([/usr])
# Check whether exec_prefix=/usr:
case $exec_prefix:$prefix in
NONE:NONE | NONE:/usr | /usr:*)
AC_MSG_NOTICE([Default --exec-prefix detected.])
case $bindir in
'${exec_prefix}/bin') bindir=/bin
AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
esac
case $sbindir in
'${exec_prefix}/sbin') sbindir=/sbin
AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
esac ;;
esacconfig/include-Makefile.am (included in all Makefiles):
# The original default values of bindir and sbindir:
usrbinexecdir = ${exec_prefix}/bin
usrsbinexecdir = ${exec_prefix}/sbin
KarelSignature · 1 line
Karel Zak <[email protected]>