Re: [ptxdist] [PATCH 17/17] [udev] Updated to version 150 and updated targetinstall

2010-01-19 Thread Remy Bohmer
Hi,

2010/1/19 Carsten Schlote :
> From: Carsten Schlote 
>
> Updated to 150 as proposed on ptxdist mailinglist. Compiles
> and works (tested with upstart initmethod).
>
> Added new config options for all files installed in package
> dir.
>
> Added 'install_copy' lines for all files found in package dir
> and as well some more obscure ones not installed by default.
>
> Added comments and reviews
>
> Crosscompile Patches:
> - commented out checks for pci.ids and provide link to file directly.
>
> Signed-off-by: Carsten Schlote 
> ---
>  patches/udev-150/autogen.sh             |    1 +
>  patches/udev-150/fix-crosscompile.patch |   29 +
>  patches/udev-150/series                 |    1 +
>  rules/udev.in                           |  203 
> +++
>  rules/udev.make                         |  160 ++---
>  5 files changed, 329 insertions(+), 65 deletions(-)
>  create mode 12 patches/udev-150/autogen.sh
>  create mode 100644 patches/udev-150/fix-crosscompile.patch
>  create mode 100644 patches/udev-150/series
>
> diff --git a/patches/udev-150/autogen.sh b/patches/udev-150/autogen.sh
> new file mode 12
> index 000..9f8a4cb
> --- /dev/null
> +++ b/patches/udev-150/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/udev-150/fix-crosscompile.patch 
> b/patches/udev-150/fix-crosscompile.patch
> new file mode 100644
> index 000..5a811eb
> --- /dev/null
> +++ b/patches/udev-150/fix-crosscompile.patch
> @@ -0,0 +1,29 @@
> +From: Carsten Schlote 
> +Subject: Remove checks for pci.ids to allow cross-compilation.
> +
> +These checks for pci.ids seem to fail. So commented out and
> +path to pci.ids is provided with by commandline option on
> +configure.
> +
> +Signed-off-by: Carsten Schlote 
> +---
> + configure.ac |    6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +Index: udev-146/configure.ac
> +===
> +--- udev-146.orig/configure.ac 2009-08-10 03:37:42.0 +0200
>  udev-146/configure.ac      2009-12-09 10:11:53.0 +0100
> +@@ -69,9 +69,9 @@
> +       PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
> +       AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
> +
> +-      AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
> +-      AC_CHECK_FILES([/usr/share/hwdata/pci.ids], 
> [pciids=/usr/share/hwdata/pci.ids])
> +-      AC_CHECK_FILES([/usr/share/misc/pci.ids], 
> [pciids=/usr/share/misc/pci.ids])
> ++#     AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
> ++#     AC_CHECK_FILES([/usr/share/hwdata/pci.ids], 
> [pciids=/usr/share/hwdata/pci.ids])
> ++#     AC_CHECK_FILES([/usr/share/misc/pci.ids], 
> [pciids=/usr/share/misc/pci.ids])
> +       AC_ARG_WITH(pci-ids-path,
> +               AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
> +               [PCI_DATABASE=${withval}],
> diff --git a/patches/udev-150/series b/patches/udev-150/series
> new file mode 100644
> index 000..1752ae8
> --- /dev/null
> +++ b/patches/udev-150/series
> @@ -0,0 +1 @@
> +fix-crosscompile.patch
> diff --git a/rules/udev.in b/rules/udev.in
> index 58db642..5e56a29 100644
> --- a/rules/udev.in
> +++ b/rules/udev.in
> @@ -2,7 +2,13 @@
>  menuconfig UDEV
>        tristate
>        prompt "udev                          "
> +       select HOST_GPERF
>        select ROOTFS_DEV
> +       select GLIB           if UDEV__EXTRAS
> +       select ACL            if UDEV__EXTRAS
> +       select USBUTILS       if UDEV__EXTRAS
> +       select LIBUSB_COMPAT  if UDEV__EXTRAS
> +       select PCIUTILS       if UDEV__EXTRAS

Much better than previous patch, but can it be even more fine grained?
Something like 'select PCIUTILS if UDEV__EXTRA_PCI_DB' ?
I can imagine that someone wants usbutils on ARM for example, but not
want to have PCIUTILS...

Kind regards,

Remy

--
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 17/17] [udev] Updated to version 150 and updated targetinstall

2010-01-19 Thread Carsten Schlote
Hi,

Am Dienstag, den 19.01.2010, 21:00 +0100 schrieb Remy Bohmer:

> Much better than previous patch, but can it be even more fine grained?

You can either enable the extras or not. Enabling causes all those
dependancies.

You could improve to autoconf framework to be more fine-grained.

> Something like 'select PCIUTILS if UDEV__EXTRA_PCI_DB' ?
> I can imagine that someone wants usbutils on ARM for example, but not
> want to have PCIUTILS...

You could add a config option to install the pciutilstools and the
pci.ids file independantly to the target. Then you can choose to install
the one or other or both.

But udev with extras would compile. Obviously all udev plugins needing
the pci.ids won't work correctly.

Enabling the pci udev plugin could be used to install just the pci.ids.

Same is true for usb.ids file. 


Carsten


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
--
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 17/17] [udev] Updated to version 150 and updated targetinstall

2010-01-24 Thread Ladislav Michl
On Tue, Jan 19, 2010 at 05:08:43PM +0100, Carsten Schlote wrote:
> From: Carsten Schlote 
> 
> Updated to 150 as proposed on ptxdist mailinglist. Compiles
> and works (tested with upstart initmethod).

Very nice! You can read it as:
Tested-by: Ladislav Michl 
However to hit "Reviewed-by" there is one minor improvement to be done.

> Added new config options for all files installed in package
> dir.
> 
> Added 'install_copy' lines for all files found in package dir
> and as well some more obscure ones not installed by default.
> 
> Added comments and reviews
> 
> Crosscompile Patches:
> - commented out checks for pci.ids and provide link to file directly.
> 
> Signed-off-by: Carsten Schlote 
> ---
>  patches/udev-150/autogen.sh |1 +
>  patches/udev-150/fix-crosscompile.patch |   29 +
>  patches/udev-150/series |1 +

All above could be probably dropped, see bellow.

>  rules/udev.in   |  203 
> +++
>  rules/udev.make |  160 ++---
>  5 files changed, 329 insertions(+), 65 deletions(-)
>  create mode 12 patches/udev-150/autogen.sh
>  create mode 100644 patches/udev-150/fix-crosscompile.patch
>  create mode 100644 patches/udev-150/series
> 
> diff --git a/patches/udev-150/autogen.sh b/patches/udev-150/autogen.sh
> new file mode 12
> index 000..9f8a4cb
> --- /dev/null
> +++ b/patches/udev-150/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/udev-150/fix-crosscompile.patch 
> b/patches/udev-150/fix-crosscompile.patch
> new file mode 100644
> index 000..5a811eb
> --- /dev/null
> +++ b/patches/udev-150/fix-crosscompile.patch
> @@ -0,0 +1,29 @@
> +From: Carsten Schlote 
> +Subject: Remove checks for pci.ids to allow cross-compilation.
> +
> +These checks for pci.ids seem to fail. So commented out and
> +path to pci.ids is provided with by commandline option on
> +configure.
> +
> +Signed-off-by: Carsten Schlote 
> +---
> + configure.ac |6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +Index: udev-146/configure.ac
> +===
> +--- udev-146.orig/configure.ac   2009-08-10 03:37:42.0 +0200
>  udev-146/configure.ac2009-12-09 10:11:53.0 +0100
> +@@ -69,9 +69,9 @@
> + PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
> + AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
> + 
> +-AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
> +-AC_CHECK_FILES([/usr/share/hwdata/pci.ids], 
> [pciids=/usr/share/hwdata/pci.ids])
> +-AC_CHECK_FILES([/usr/share/misc/pci.ids], 
> [pciids=/usr/share/misc/pci.ids])
> ++#   AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
> ++#   AC_CHECK_FILES([/usr/share/hwdata/pci.ids], 
> [pciids=/usr/share/hwdata/pci.ids])
> ++#   AC_CHECK_FILES([/usr/share/misc/pci.ids], 
> [pciids=/usr/share/misc/pci.ids])
> + AC_ARG_WITH(pci-ids-path,
> + AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
> + [PCI_DATABASE=${withval}],

Since corresponding defines (HAVE__USR_SHARE_PCI_IDS,
HAVE__USR_SHARE_HWDATA_PCI_IDS, HAVE__USR_SHARE_MISC_PCI_IDS) for commented out
tests do not appear to be used anywhere, it is safe to do something like this:
UDEV_ENV:= \
$(CROSS_ENV) \
ac_cv_file__usr_share_pci_ids=no \
ac_cv_file__usr_share_hwdata_pci_ids=no \
ac_cv_file__usr_share_misc_pci_ids=no
to make configure happy (untested). I have to admit, that checking for
pci-ids-path _after_ failing to find this file because of crosscompilation
is a bit dumb and should be fixed upstream.

ladis

--
ptxdist mailing list
ptxdist@pengutronix.de