Wind River Support Network

HomeDefectsLIN5-3475
Fixed

LIN5-3475 : WRL5: In some of the rpms sometimes the gid of the user building is picked up.

Created: Sep 27, 2013    Updated: Dec 19, 2017
Resolved Date: Oct 24, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.9
Severity: Severe
Applicable for: Wind River Linux 5
Component/s: Build & Config

Description

In some of the rpms the gid of the user building is used instead of 0.

From the syslog-ng rpm:

drwxr-xr-x    2 root    gsa                         0 Apr  7  2012
/usr/share/include/scl/pacct
-rw-r--r--    1 root    gsa                      1236 Sep 15  2011
/usr/share/include/scl/pacct/plugin.conf
drwxr-xr-x    2 root    gsa                         0 Apr  7  2012
/usr/share/include/scl/syslogconf
-rw-r--r--    1 root    gsa                       264 Dec 31  2010
/usr/share/include/scl/syslogconf/README
-rwxr-xr-x    1 root    gsa                      3664 Dec 31  2010
/usr/share/include/scl/syslogconf/convert-syslogconf.awk
-rw-r--r--    1 root    gsa                      1181 Sep 15  2011
/usr/share/include/scl/syslogconf/plugin.conf
drwxr-xr-x    2 root    gsa                         0 Apr  7  2012
/usr/share/include/scl/system
-rwxr-xr-x    1 root    gsa                      3355 Sep 15  2011
/usr/share/include/scl/system/generate-system-source.sh
-rw-r--r--    1 root    gsa                      1159 Sep 15  2011
/usr/share/include/scl/system/plugin.conf

Note: gsa is 1000 in our rootfs, and the user building i rootfs primary group is also 1000.

We also see this problem in our own bb files if we use 'cp -a'. We need to use 'cp -a --no-preserve=ownership' to get around this problem.

Example of bb file workaround:

 do_install() {
        install -d -m 0755 ${D}/opt/java
-       cp -a ${S}/usr/java/${JDK_JRE}${PV}_${PV_UPDATE}/ ${D}/opt/java
+       cp -a --no-preserve=ownership
${S}/usr/java/${JDK_JRE}${PV}_${PV_UPDATE}/ ${D}/opt/java
       ln -sf ${JDK_JRE}${PV}_${PV_UPDATE} ${D}/opt/java/latest  }

Syslog-ng is extra interesting as it only afftects some of the files/dirs (the ones under /usr/share/include/scl/ the resta are root:root).

Steps to Reproduce

Observe group ownership on a target or unpacked rpm/filesystem.

Other Downloads


Live chat
Online