| Summary: | meta-security: bastille fails at do_install | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Other YP Layers | Reporter: | Stoicescu Cornel <corneliux.stoicescu> |
| Component: | layers | Assignee: | mulhern <mulhern> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | jessica.zhang, poky.bs.watcher, poky.watcher, sgw |
| Version: | 1.5 | ||
| Target Milestone: | 1.6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Stoicescu Cornel
2013-09-13 07:53:01 UTC
More information: Using Ubuntu 13.04 with "Python 2.7.4 (default, Apr 19 2013, 18:28:01)[GCC 4.7.3] on linux2" the error does not appear. -rw------- 1 cornel cornel 45559 sep 13 18:04 tmp/work/emenlow-poky-linux/bastille/3.2.1-r0/Bastille/Questions/AccountSecurity.txt Using Fedora 18 with "Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2" the issue is present -r--r--r--. 1 cornel cornel 45529 Sep 15 2008 tmp/work/qemux86_64-poky-linux/bastille/3.2.1-r0/Bastille/Questions/AccountSecurity.txt Using Ubuntu 12.04(LTS) with "Python 2.7.3 (default, Apr 20 2012, 22:39:59) [GCC 4.6.3] on linux2" the issue is present. -r--r--r-- 1 cornel cornel 45529 Sep 15 2008 tmp/work/qemux86_64-poky-linux/bastille/3.2.1-r0/Bastille/Questions/AccountSecurity.txt I can not reproduce on my systems, but I do have an hypothesis. 1) When unpacked the Questions files retain their permissions, -r--r--r--. 2) Opening the file for reading is no problem, so that's a bit of a red herring. 3) Moving the temporary file containing the new version of the file to the Questions file causes a Permission Denied error because the file is not writeable. Unfortunately, this behavior is system dependent. If the file is overwritten it gets the permissions of the temporary file: -rw-------. I've made some changes: 1) I've added a debug flag that can be used to make output more informative for the developer. 2) I've made the overwriting of the original file with the contents of the tempfile more principled in the set_required_questions.py file more principled. 3) I've changed the way set_required_questions.py is called so that it operates on the Questions files in the image subdirectory immediately after they are copied. These are guaranteed of have 644 permissions. I've posted them at: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=mulhern/bug5177. Could you verify that changes (2) and (3) have eliminated the bug? If not, could you edit the bastille bitbake file to pass the --debug flag to set_required_questions.py and send me the output? I did a bastille build with the latest commit on your branch on Ubuntu 12.04 having Python 2.7.3 and it worked. Installing Bastille works with latest master. |