Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-22 Thread Mark Hatle
On 6/21/11 11:51 PM, Mark Hatle wrote: On 6/21/11 5:13 PM, Mark Hatle wrote: ... Any comments. I'm not sure I like this task approach, simply because it's more complicated. But what I am testing now enables umask of 022 in: do_install do_package do_rootfs rootfs_pkg_do_rootfs

[OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
I've had the task to resolve the directory permissions and ownership issues. From the original RFC I sent out, a lot has changed. The way OE, opkg and deb packages are defined, there is no way to define what package owns a directory. There is an expectation that directory permissions, owner and

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Phil Blundell
On Tue, 2011-06-21 at 11:43 -0500, Mark Hatle wrote: Adjust the umask to 022. This resolves the problem of dynamically generated directories (mkdir -p) and specific files (touch foo) having odd permissions.

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
On 6/21/11 1:57 PM, Phil Blundell wrote: On Tue, 2011-06-21 at 11:43 -0500, Mark Hatle wrote: Adjust the umask to 022. This resolves the problem of dynamically generated directories (mkdir -p) and specific files (touch foo) having odd permissions.

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Phil Blundell
On Tue, 2011-06-21 at 14:12 -0500, Mark Hatle wrote: fs-perms.txt is the default name. It was done to work similarly to the 'device_table-minimal.txt' file that already exists. The logic is: Use the variable FILESYSTEM_PERMS_TABLES, the contents of this may be full paths, or partial

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
(Note, I found an additional issue mentioned at the end of this email...) On 6/21/11 4:09 PM, Phil Blundell wrote: On Tue, 2011-06-21 at 14:12 -0500, Mark Hatle wrote: fs-perms.txt is the default name. It was done to work similarly to the 'device_table-minimal.txt' file that already exists.

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Koen Kooi
Op 21 jun 2011, om 21:12 heeft Mark Hatle het volgende geschreven: On 6/21/11 1:57 PM, Phil Blundell wrote: On Tue, 2011-06-21 at 11:43 -0500, Mark Hatle wrote: Adjust the umask to 022. This resolves the problem of dynamically generated directories (mkdir -p) and specific files (touch foo)

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Phil Blundell
On Tue, 2011-06-21 at 16:27 -0500, Mark Hatle wrote: I don't know how to do this within bitbake (easily). The table is currently a static set of paths that exist within the distribution as a whole. They are not recipe specific, but you can have more then one file... the assumption is

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
On 6/21/11 4:32 PM, Koen Kooi wrote: Op 21 jun 2011, om 21:12 heeft Mark Hatle het volgende geschreven: On 6/21/11 1:57 PM, Phil Blundell wrote: On Tue, 2011-06-21 at 11:43 -0500, Mark Hatle wrote: Adjust the umask to 022. This resolves the problem of dynamically generated directories

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Phil Blundell
On Tue, 2011-06-21 at 16:41 -0500, Mark Hatle wrote: Unfortunately it won't work as the umask would only be set in the mytask - task. It needs to be set in all of the do_install and do_package tasks. The only way to do this (from what Chris L told me) is to setup an event handler and set

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Richard Purdie
On Tue, 2011-06-21 at 14:12 -0500, Mark Hatle wrote: On 6/21/11 1:57 PM, Phil Blundell wrote: On Tue, 2011-06-21 at 11:43 -0500, Mark Hatle wrote: Adjust the umask to 022. This resolves the problem of dynamically generated directories (mkdir -p) and specific files (touch foo) having odd

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
I like that better then trying to wrap do_install and such with special code. It should be fairly easy to set the default for do_install and do_package then. I wonder if there would be a way to notice and flag as possible errors tasks running between do_install and do_package (in a single

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
On 6/21/11 4:37 PM, Phil Blundell wrote: On Tue, 2011-06-21 at 16:27 -0500, Mark Hatle wrote: I don't know how to do this within bitbake (easily). The table is currently a static set of paths that exist within the distribution as a whole. They are not recipe specific, but you can have

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Mark Hatle
On 6/21/11 5:13 PM, Mark Hatle wrote: I like that better then trying to wrap do_install and such with special code. It should be fairly easy to set the default for do_install and do_package then. I wonder if there would be a way to notice and flag as possible errors tasks running

Re: [OE-core] Directory permissions and ownership -- RFC

2011-06-21 Thread Anders Darander
On Tue, Jun 21, 2011 at 23:27, Mark Hatle mark.ha...@windriver.com wrote: Note, there is one remaining issue that I haven't resolved.  A few directories are defined in terms of symlinks:  /var/cache root root 120777 volatile/cache +/var/cache root root 40755  /var/log root root 120777