Cannot install bastille using: poky master:bd76847d867f9f76f76f033439cfb834cf59380f meta-security master:23815f300174ce6cab48356e3fffba9868b626d4 Error as follows: DEBUG: Executing shell function do_install Fatal error reading config file: [Errno 13] Permission denied: '/home/cornel/work/poky/build/tmp/work/qemux86_64-poky-linux/bastille/3.2.1-r0/Bastille/Questions/AccountSecurity.txt' WARNING: /home/cornel/work/poky/build/tmp/work/qemux86_64-poky-linux/bastille/3.2.1-r0/temp/run.do_install.12528:1 exit 1 from /home/cornel/work/poky/meta-security/recipes-security/bastille/files/set_required_questions.py /home/cornel/work/poky/build/tmp/work/qemux86_64-poky-linux/bastille/3.2.1-r0/config Questions ERROR: Function failed: do_install (log file is located at /home/cornel/work/poky/build/tmp/work/qemux86_64-poky-linux/bastille/3.2.1-r0/temp/log.do_install.12528) File permissions as follows: -r--r--r-- 1 cornel cornel 45529 Sep 15 2008 /home/cornel/SSD/2poky/build/tmp/work/qemuarm-poky-linux-gnueabi/bastille/3.2.1-r0/Bastille/Questions/AccountSecurity.txt Tested on Ubuntu 12.04 and Fedora 18 both with Python 2.7 .
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.
Fix at: http://git.yoctoproject.org/cgit/cgit.cgi/meta-security/commit/?id=b2a60ba7ff7eb43446e96fc5048109922d58b45d.
Installing Bastille works with latest master.