Bug 720 - postinst script lacks executable permission
Summary: postinst script lacks executable permission
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.0 M4
Assignee: Dongxiao Xu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-02-14 16:56 UTC by Matt Roper
Modified: 2011-02-24 16:58 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Roper 2011-02-14 16:56:53 UTC
Recipe meta/recipes-devtools/dpkg/run-postinsts_1.0.bb fails with the output below.  It appears the postinst script inside the .deb does not have the execute permissions it needs?


NOTE: package run-postinsts-1.0-r6: task do_package_write_deb: Started
ERROR: Function 'dpkg-deb execution failed' failed
ERROR: Logfile of failure stored in: /home/mattrope/work/yocto/poky-5.0-build/tmp/work/i586-poky-linux/run-postinsts-1.0-r6/temp/log.do_package_write_deb.15584
Log data follows:
| dpkg-deb: building package `run-postinsts-dbg' in `/home/mattrope/work/yocto/poky-5.0-build/tmp/work/i586-poky-linux/run-postinsts-1.0-r6/deploy-debs/i586/run-postinsts-dbg_1.0-r6_i386.deb'.
| dpkg-deb: maintainer script `postinst' has bad permissions 644 (must be >=0555 and <=0775)
| dpkg-deb: building package `run-postinsts' in `/home/mattrope/work/yocto/poky-5.0-build/tmp/work/i586-poky-linux/run-postinsts-1.0-r6/deploy-debs/i586/run-postinsts_1.0-r6_i386.deb'.
| ERROR: Function 'dpkg-deb execution failed' failed
NOTE: package run-postinsts-1.0-r6: task dpkg-deb execution failed: Failed
ERROR: Task 222 (/home/mattrope/work/yocto/poky-bernard-5.0-alpha/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb, do_package_write_deb) failed with exit code '1'
Comment 1 Nitin Kamble 2011-02-14 17:07:28 UTC
assign to the recipe maintainer.
Comment 2 Dongxiao Xu 2011-02-15 19:08:14 UTC
I could not reproduce the bug on my ubuntu 10.04 machine.

Matt, what's your host OS? And what's the dpkg-deb version?

Thanks,
Dongxiao
Comment 3 Matt Roper 2011-02-16 08:30:59 UTC
(In reply to comment #2)
> I could not reproduce the bug on my ubuntu 10.04 machine.
> 
> Matt, what's your host OS? And what's the dpkg-deb version?
> 
> Thanks,
> Dongxiao

Host machine is Ubuntu 10.10 (dpkg-deb version 1.15.8.10).  I also probably should have mentioned that this is for the bernard 5.0 alpha.
Comment 4 Matt Roper 2011-02-18 15:49:38 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I could not reproduce the bug on my ubuntu 10.04 machine.
> > 
> > Matt, what's your host OS? And what's the dpkg-deb version?
> > 
> > Thanks,
> > Dongxiao
> 
> Host machine is Ubuntu 10.10 (dpkg-deb version 1.15.8.10).  I also probably
> should have mentioned that this is for the bernard 5.0 alpha.

Actually I misspoke; my host machine is actually Debian, but the dpkg-deb version is still the 1.15.8.10 I reported.  However I don't think it's the host that matters here, but rather the version inside the yocto toolchain here:  poky-5.0-build/tmp/sysroots/x86_64-linux/usr/bin/dpkg-deb .  That version appears to be 1.15.8.7.

If I'm understanding properly which files it is operating upon (poky-5.0-build/tmp/work/i586-poky-linux/run-postinsts-1.0-r6/packages-split/run-postinsts/DEBIAN), then it appears the postinst script does indeed have the executable bit and the error being generated is incorrect.  I tried replacing the toolchain dpkg-deb with the newer version from the host OS, but that didn't solve the problem.  For now I've worked around this by temporarily hacking the package_deb.bbclass to make failures during dpkg-deb creation non-fatal for the run-postinsts package just so that I can continue testing the rest of the build.  I'm still very puzzled as to why it is reporting postinst has permissions 644 when I clearly see 755 during manual inspection.
Comment 5 Dongxiao Xu 2011-02-23 17:25:58 UTC
Hi Matt

I saw there was a related fix by Richard in master.

http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=9a28ad6b0291e0d4c4aae6ba25a9f7752d5c2e11

Since I could not reproduce this bug in my side. Could you help to try to see if it fixed your problem?

Thanks!
Dongxiao
Comment 6 Dongxiao Xu 2011-02-24 16:58:11 UTC
We didn't see it in autobuilder now, mark it as fixed.