Bug 6632

Summary: [p1022ds] /usr/sbin/run-postinsts: Permission denied
Product: [Build System, Metadata & Runtime] BSPs Reporter: Yi Zhao <yi.zhao>
Component: bsps-meta-fsl-ppcAssignee: Zhenhua Luo <zhenhua.luo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.c.georgescu, b51469, ke.zou, yi.zhao
Version: 1.7   
Target Milestone: 1.7   
Hardware: Other   
OS: ppc   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2014-08-15 08:36:52 UTC
Image location: http://autobuilder.yoctoproject.org/pub/nightly/20140811-2/machines/p1022ds/

When boot up the system, I got the following error:
/etc/rcS.d/S99run-postinsts: line 3: /usr/sbin/run-postinsts: Permission denied

I checked the script /usr/sbin/run-postinsts, it has no execute permission.
root@p1022ds:/var/log# file /usr/sbin/run-postinsts 
/usr/sbin/run-postinsts: POSIX shell script, ASCII text executable
root@p1022ds:/var/log# ls -l /usr/sbin/run-postinsts 
-rw-r--r-- 1 root root 1657 Aug 11 21:02 /usr/sbin/run-postinsts
root@p1022ds:/var/log# 

This issue is very weird. The following line in meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb should make sure the script has right permission:
install -m 0755 ${WORKDIR}/run-postinsts ${D}${sbindir}/

I don't know why it has no effect in p1022ds image rootfs. I checked other arch rootfs (beaglebone, edgerouter and mpc8315e), this script has right permission on all of them.
Comment 1 Benlei Xu 2014-08-19 10:56:59 UTC
Hello,
The attachment is the log of p1022ds board. I had have a test on p1022ds board according to your image location. But I have not got any infomation that your found on p1022ds board. May I could know the deployment of your board ?
Comment 2 Yi Zhao 2014-08-20 06:43:14 UTC
(In reply to comment #1)
> Hello,
> The attachment is the log of p1022ds board. I had have a test on p1022ds
> board according to your image location. But I have not got any infomation
> that your found on p1022ds board. May I could know the deployment of your
> board ?

Hi,
I deployed the rootfs via nfs. Here are the details:
1. Download the image
2. Extract the rootfs to nfs root directory: sudo tar xpf core-image-sato-sdk-p1022ds-20140811201336.rootfs.tar.gz -C /export/rootfs/
You could check the run-postinsts after  extract. There is no execute permission for it:
$ ls -l usr/sbin/run-postinsts 
-rw-r--r-- 1 root root 1657 Aug 12 05:02 usr/sbin/run-postinsts
3. Boot up the system via nfs.
Comment 3 Benlei Xu 2014-08-21 07:45:17 UTC
Hi,
    I have a test on p1022ds board employ your rootfs via nfs and the result is same with you. 
    I get a poky and meta-fsl-ppc on the http://git.yoctoproject.org/ and build a rootfs, however, there is no any problem that you meet.
    In order to further confirmation the problem, I obtain another rootfs core-image-sato-sdk-p1022ds-20140815130938.rootfs.tar.gz and have a test on p1022ds board via nfs, and there is no any problem.
    So I think that problem of core-image-sato-sdk-p1022ds-20140811201336.rootfs.tar.gz maybe a accidental bug. And you can use the latter packges.
Comment 4 Zhenhua Luo 2014-08-25 07:42:54 UTC
The issue can't be reproduced with latest images.