* Re: Add rulesdir to libudev.pc
2009-01-08 19:49 Add rulesdir to libudev.pc Marcel Holtmann
@ 2009-01-08 21:43 ` Kay Sievers
2009-01-08 22:47 ` Marcel Holtmann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-01-08 21:43 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 8, 2009 at 20:49, Marcel Holtmann <marcel@holtmann.org> wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Add rulesdir to libudev.pc
2009-01-08 19:49 Add rulesdir to libudev.pc Marcel Holtmann
2009-01-08 21:43 ` Kay Sievers
@ 2009-01-08 22:47 ` Marcel Holtmann
2009-01-08 22:54 ` Kay Sievers
2009-01-15 22:59 ` Karel Zak
3 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2009-01-08 22:47 UTC (permalink / raw)
To: linux-hotplug
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.
>
> 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.
> 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.
What about libexecdir since configure has already support for it. Just
base everything of on that one.
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add rulesdir to libudev.pc
2009-01-08 19:49 Add rulesdir to libudev.pc Marcel Holtmann
2009-01-08 21:43 ` Kay Sievers
2009-01-08 22:47 ` Marcel Holtmann
@ 2009-01-08 22:54 ` Kay Sievers
2009-01-15 22:59 ` Karel Zak
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-01-08 22:54 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 8, 2009 at 23:47, Marcel Holtmann <marcel@holtmann.org> wrote:
>> > 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.
>
>> 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.
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Add rulesdir to libudev.pc
2009-01-08 19:49 Add rulesdir to libudev.pc Marcel Holtmann
` (2 preceding siblings ...)
2009-01-08 22:54 ` Kay Sievers
@ 2009-01-15 22:59 ` Karel Zak
3 siblings, 0 replies; 5+ messages in thread
From: Karel Zak @ 2009-01-15 22:59 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 08, 2009 at 10:43:13PM +0100, Kay Sievers wrote:
> 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.
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 ;;
esac
config/include-Makefile.am (included in all Makefiles):
# The original default values of bindir and sbindir:
usrbinexecdir = ${exec_prefix}/bin
usrsbinexecdir = ${exec_prefix}/sbin
Karel
--
Karel Zak <kzak@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread