Patchwork [1/4] alsa-utils: Pass udev-rules-dir as parameter

login
register
mail settings
Submitter Constantin Musca
Date Dec. 11, 2012, 3:29 p.m.
Message ID <5078335c2652b28a2613b3395cd95665675c1626.1355236839.git.constantinx.musca@intel.com>
Download mbox | patch
Permalink /patch/40763/
State New
Headers show

Comments

Constantin Musca - Dec. 11, 2012, 3:29 p.m.
Fix the following warning:
WARNING: QA Issue: alsa-utils: Files/directories were installed but not shipped
  /lib
  /lib/udev
  /lib/udev/rules.d
  /lib/udev/rules.d/90-alsa-restore.rules

[YOCTO #3440]

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
 meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Saul Wold - Dec. 11, 2012, 4:58 p.m.
On 12/11/2012 07:29 AM, Constantin Musca wrote:
> Fix the following warning:
> WARNING: QA Issue: alsa-utils: Files/directories were installed but not shipped
>    /lib
>    /lib/udev
>    /lib/udev/rules.d
>    /lib/udev/rules.d/90-alsa-restore.rules
>
> [YOCTO #3440]
>
> Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
> ---
>   meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
> index 597e8b6..8f28a48 100644
> --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
> +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
>                       file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
>   DEPENDS = "alsa-lib ncurses libsamplerate0"
> -PR = "r2"
> +PR = "r3"
>
>   SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
>              file://ncursesfix.patch \
> @@ -21,7 +21,7 @@ SRC_URI[sha256sum] = "2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb61570
>   # http://bugs.openembedded.org/show_bug.cgi?id=2348
>   # please close bug and remove this comment when properly fixed
>   #
> -EXTRA_OECONF = "--disable-xmlto"
> +EXTRA_OECONF = "--disable-xmlto --with-udev-rules-dir=${base_libdir}/udev/rules.d"

Here you have udev rules going into $base_libdir/udev and in the next 
patch its put into $sysconfdir, can you verify the correct location.

Sau!

>   EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
>
>   inherit autotools gettext
>
Qi.Chen@windriver.com - Dec. 12, 2012, 2:07 a.m.
On 12/11/2012 11:29 PM, Constantin Musca wrote:
> Fix the following warning:
> WARNING: QA Issue: alsa-utils: Files/directories were installed but not shipped
>    /lib
>    /lib/udev
>    /lib/udev/rules.d
>    /lib/udev/rules.d/90-alsa-restore.rules
>
> [YOCTO #3440]
>
> Signed-off-by: Constantin Musca<constantinx.musca@intel.com>
> ---
>   meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
> index 597e8b6..8f28a48 100644
> --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
> +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
>                       file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
>   DEPENDS = "alsa-lib ncurses libsamplerate0"
> -PR = "r2"
> +PR = "r3"
>
>   SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
>              file://ncursesfix.patch \
> @@ -21,7 +21,7 @@ SRC_URI[sha256sum] = "2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb61570
>   # http://bugs.openembedded.org/show_bug.cgi?id=2348
>   # please close bug and remove this comment when properly fixed
>   #
> -EXTRA_OECONF = "--disable-xmlto"
> +EXTRA_OECONF = "--disable-xmlto --with-udev-rules-dir=${base_libdir}/udev/rules.d"
>   EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
>
>   inherit autotools gettext
Hi Musca,
Another bug is related to the udev rules directory. It's similar to this 
one.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2804
(You could also use 'udev' to filter the message in oe-core list to see 
the previous discussions on this topic.)
It seems alsa-utils does not seem to be the only package that hardcodes 
its udev-rules-dir.
Besides, udev cannot start properly if installed under /lib64.

#!/bin/sh

### BEGIN INIT INFO
# Provides:          udev
# Required-Start:    mountvirtfs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Start udevd, populate /dev and load drivers.
### END INIT INFO

export TZ=/etc/localtime

[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x /lib/udev/udevd ] || exit 1
[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf

The question here is:
Whether we should always install udev under /lib or patch all packages 
that hardcodes udev-rules-dir to be under '/lib'. Maybe there are other 
better approaches?

Please have a look at these and let me know your opinions.

Thanks a lot,
Chen Qi
Constantin Musca - Dec. 12, 2012, 7:56 a.m.
On 12/12/2012 04:07 AM, ChenQi wrote:
> On 12/11/2012 11:29 PM, Constantin Musca wrote:
>> Fix the following warning:
>> WARNING: QA Issue: alsa-utils: Files/directories were installed but 
>> not shipped
>>    /lib
>>    /lib/udev
>>    /lib/udev/rules.d
>>    /lib/udev/rules.d/90-alsa-restore.rules
>>
>> [YOCTO #3440]
>>
>> Signed-off-by: Constantin Musca<constantinx.musca@intel.com>
>> ---
>>   meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb 
>> b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
>> index 597e8b6..8f28a48 100644
>> --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
>> +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
>> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
>>   LIC_FILES_CHKSUM = 
>> "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
>> file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
>>   DEPENDS = "alsa-lib ncurses libsamplerate0"
>> -PR = "r2"
>> +PR = "r3"
>>
>>   SRC_URI = 
>> "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
>>              file://ncursesfix.patch \
>> @@ -21,7 +21,7 @@ SRC_URI[sha256sum] = 
>> "2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb61570
>>   # http://bugs.openembedded.org/show_bug.cgi?id=2348
>>   # please close bug and remove this comment when properly fixed
>>   #
>> -EXTRA_OECONF = "--disable-xmlto"
>> +EXTRA_OECONF = "--disable-xmlto 
>> --with-udev-rules-dir=${base_libdir}/udev/rules.d"
>>   EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
>>
>>   inherit autotools gettext
> Hi Musca,
> Another bug is related to the udev rules directory. It's similar to 
> this one.
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2804
> (You could also use 'udev' to filter the message in oe-core list to 
> see the previous discussions on this topic.)
> It seems alsa-utils does not seem to be the only package that 
> hardcodes its udev-rules-dir.
> Besides, udev cannot start properly if installed under /lib64.
>
> #!/bin/sh
>
> ### BEGIN INIT INFO
> # Provides:          udev
> # Required-Start:    mountvirtfs
> # Required-Stop:
> # Default-Start:     S
> # Default-Stop:
> # Short-Description: Start udevd, populate /dev and load drivers.
> ### END INIT INFO
>
> export TZ=/etc/localtime
>
> [ -d /sys/class ] || exit 1
> [ -r /proc/mounts ] || exit 1
> [ -x /lib/udev/udevd ] || exit 1
> [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
> [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
>
> The question here is:
> Whether we should always install udev under /lib or patch all packages 
> that hardcodes udev-rules-dir to be under '/lib'. Maybe there are 
> other better approaches?
>
> Please have a look at these and let me know your opinions.
>
> Thanks a lot,
> Chen Qi

I think the best solution is to patch all packages that hardcode the 
udev-rules-dir path to use ${base_libdir}/udev/rules.d (this is the 
standard path). udev doesn't start properly if installed under /lib64 
because the init script hardcodes the udevd path (/lib/udev/udevd). If 
everybody is ok with this, I will send another patch for pcmciautils 
which sets udevdir to ${base_libdir}/udev/.


Cheers,
Constantin
Qi.Chen@windriver.com - Dec. 13, 2012, 5:47 a.m.
On 12/12/2012 03:56 PM, Constantin Musca wrote:
> On 12/12/2012 04:07 AM, ChenQi wrote:
>> On 12/11/2012 11:29 PM, Constantin Musca wrote:
>>> Fix the following warning:
>>> WARNING: QA Issue: alsa-utils: Files/directories were installed but 
>>> not shipped
>>>    /lib
>>>    /lib/udev
>>>    /lib/udev/rules.d
>>>    /lib/udev/rules.d/90-alsa-restore.rules
>>>
>>> [YOCTO #3440]
>>>
>>> Signed-off-by: Constantin Musca<constantinx.musca@intel.com>
>>> ---
>>>   meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb 
>>> b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
>>> index 597e8b6..8f28a48 100644
>>> --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
>>> +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
>>> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
>>>   LIC_FILES_CHKSUM = 
>>> "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
>>> file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" 
>>>
>>>   DEPENDS = "alsa-lib ncurses libsamplerate0"
>>> -PR = "r2"
>>> +PR = "r3"
>>>
>>>   SRC_URI = 
>>> "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
>>>              file://ncursesfix.patch \
>>> @@ -21,7 +21,7 @@ SRC_URI[sha256sum] = 
>>> "2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb61570
>>>   # http://bugs.openembedded.org/show_bug.cgi?id=2348
>>>   # please close bug and remove this comment when properly fixed
>>>   #
>>> -EXTRA_OECONF = "--disable-xmlto"
>>> +EXTRA_OECONF = "--disable-xmlto 
>>> --with-udev-rules-dir=${base_libdir}/udev/rules.d"
>>>   EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
>>>
>>>   inherit autotools gettext
>> Hi Musca,
>> Another bug is related to the udev rules directory. It's similar to 
>> this one.
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2804
>> (You could also use 'udev' to filter the message in oe-core list to 
>> see the previous discussions on this topic.)
>> It seems alsa-utils does not seem to be the only package that 
>> hardcodes its udev-rules-dir.
>> Besides, udev cannot start properly if installed under /lib64.
>>
>> #!/bin/sh
>>
>> ### BEGIN INIT INFO
>> # Provides:          udev
>> # Required-Start:    mountvirtfs
>> # Required-Stop:
>> # Default-Start:     S
>> # Default-Stop:
>> # Short-Description: Start udevd, populate /dev and load drivers.
>> ### END INIT INFO
>>
>> export TZ=/etc/localtime
>>
>> [ -d /sys/class ] || exit 1
>> [ -r /proc/mounts ] || exit 1
>> [ -x /lib/udev/udevd ] || exit 1
>> [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
>> [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
>>
>> The question here is:
>> Whether we should always install udev under /lib or patch all 
>> packages that hardcodes udev-rules-dir to be under '/lib'. Maybe 
>> there are other better approaches?
>>
>> Please have a look at these and let me know your opinions.
>>
>> Thanks a lot,
>> Chen Qi
>
> I think the best solution is to patch all packages that hardcode the 
> udev-rules-dir path to use ${base_libdir}/udev/rules.d (this is the 
> standard path). udev doesn't start properly if installed under /lib64 
> because the init script hardcodes the udevd path (/lib/udev/udevd). If 
> everybody is ok with this, I will send another patch for pcmciautils 
> which sets udevdir to ${base_libdir}/udev/.
>
>
> Cheers,
> Constantin
>
>

Hi Richard,
Could you please have a look at this?

You gave me some suggestions on a similar problem before (mdadm 
udev-rules-dir problem, bug#2804).
As the same problem is encountered in other packages, I have to ask:
Are we going to take the approach of fixing every package that hardcodes 
udev-rules-dir, as suggested by Constantin?

Thanks,
Chen Qi

Patch

diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
index 597e8b6..8f28a48 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.25.bb
@@ -6,7 +6,7 @@  LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                     file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
 DEPENDS = "alsa-lib ncurses libsamplerate0"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
            file://ncursesfix.patch \
@@ -21,7 +21,7 @@  SRC_URI[sha256sum] = "2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb61570
 # http://bugs.openembedded.org/show_bug.cgi?id=2348
 # please close bug and remove this comment when properly fixed
 #
-EXTRA_OECONF = "--disable-xmlto"
+EXTRA_OECONF = "--disable-xmlto --with-udev-rules-dir=${base_libdir}/udev/rules.d"
 EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
 
 inherit autotools gettext