[PATCH input-vmmouse] tools: make install fails when user has no write permission in /lib
Peter Hutterer
peter.hutterer at who-t.net
Mon Sep 30 15:24:48 PDT 2013
On Mon, Sep 30, 2013 at 01:56:53PM -0400, Gaetan Nadon wrote:
> The location of the udevdir is obtained from pkg-config. This is generally
> /lib/udev. Most people run their build scripts as non-root and do not want to
> overwrite or add files on their workstation system.
>
> This was not the behaviour in release 12.8.0. The code in configure.ac set
> udevdir based on common installation prefixes /usr or /usr/local for which
> the user would probably have root permission anyway. Other prefixes would
> be assigned a udevdir value under the given $prefix.
>
> The patch proposes the default location $libdir/udev/rules.d and no longer
> seeking it's value from pkg-config, just like what was done for hal.
is udevdir to be retired? iirc HAL never exported this as a variable
hence the hardcoded path, but I think relying on the udev package to tell
you where to look for data is the correct approach.
your patch has two changes: remove udev pkgconfig bits and change the
default. I agree with the latter, it seems the right thing to do, but not
the former.
Cheers,
Peter
> The expectation is that the xorg source tree can be built from top to bottom
> out of the box without tweaks or workarounds. A developer need to
> manually install a rule under development and run an admin command for it to
> take effect. Unlike binaries or libraries, there is no "path" style
> variable to append a rule in development from a different location.
>
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
> configure.ac | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 52ea460..83a8488 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -91,17 +91,14 @@ AC_ARG_WITH(hal-fdi-dir,
> HAL_FDI_DIR=${halfdidir}
> AC_SUBST(HAL_FDI_DIR)
>
> -
> -PKG_CHECK_MODULES(UDEV, udev,
> - [UDEV_RULES_DIR="`$PKG_CONFIG --variable=udevdir udev`/rules.d"],
> - [UDEV_RULES_DIR=no])
> -
> +# Udev location for rules directory
> AC_ARG_WITH(udev-rules-dir,
> AS_HELP_STRING([--with-udev-rules-dir=DIR],
> - [Default udev rules.d directory
> - [[default=($prefix)/lib/udev/rules.d on Linux, none otherwise]]]),
> - [UDEV_RULES_DIR="$withval"],
> - [])
> + [Directory where udev expects its rules files
> + [[default=$libdir/udev/rules.d]]]),
> + [udevdir="$withval"],
> + [udevdir="$libdir/udev/rules.d"])
> +UDEV_RULES_DIR=${udevdir}
> AC_SUBST(UDEV_RULES_DIR)
> AM_CONDITIONAL(HAS_UDEV_RULES_DIR, [test "x$UDEV_RULES_DIR" != "xno"])
>
> --
> 1.7.9.5
>
More information about the xorg-devel
mailing list