On Sat, 14 Aug 2010 13:51:30 +1000, Allan McRae <allan@archlinux.org>
wrote:
> Hi,
>
> I have been tracking down a python3 bug and it turns out to be caused
> by our chroot building. Essentially the permissions of /dev/shm are
> different in the chroot than on the system:
>
> allan@mugen /home/arch/chroot/stable-i686/copy/dev
>> ls -ld shm
> drwxr-xr-x 2 root root 40 Jul 12 15:16 shm
>
> allan@mugen /dev
>> ls -ld shm
> drwxrwxrwt 2 root root 40 Aug 14 10:23 shm
>
> So when configure scripts try to test for POSIX semaphores by writing
> in that directory, they fail.
>
> Looking at the relevant line in mkarchroot:
> mount -o bind /dev "${working_dir}/dev"
>
> Doing that manually show the same issue. Should we add
>
> chmod 1777 "${working_dir}/dev/shm"
>
> after the mount? It fixes my issue but feels hackish. Any other
> suggestions?
>
> Allan
Did you try this patch:
http://projects.archlinux.org/devtools.git/commit/?id=f7b67c25ff4a3f1f290c29a70500292344c59a1e
--
Pierre Schmitz, https://users.archlinux.de/~pierre
08-14-2010, 05:54 AM
Allan McRae
/dev/shm permissions and building in chroot
On 14/08/10 15:28, Pierre Schmitz wrote:
On Sat, 14 Aug 2010 13:51:30 +1000, Allan McRae<allan@archlinux.org>
wrote:
Hi,
I have been tracking down a python3 bug and it turns out to be caused
by our chroot building. Essentially the permissions of /dev/shm are
different in the chroot than on the system:
On Sat, 14 Aug 2010 15:54:13 +1000, Allan McRae <allan@archlinux.org>
wrote:
> Umm.. has anyone? I am fairly certain that the mount command is wrong.
>
> + [ -e "${working_dir}/dev/shm" ] || mkdir "${working_dir}/dev/shm"
> + mount -t tmpfs shm /dev/shm "${working_dir}/dev/shm"
>
> Should be:
> mount -t tmpfs shm "${working_dir}/dev/shm"
>
>
> + [ -e "${working_dir}/dev/pts" ] || mkdir "${working_dir}/dev/pts"
> + mount -t devpts devpts /dev/pts "${working_dir}/dev/pts"
>
> Delete /dev/pts here too.
You are right. I had never a chance to test this as my build system is
nuked. I'll correct that hopefully soon. (Unfortunately I also lost some
code which I somehow missed to backup)
--
Pierre Schmitz, https://users.archlinux.de/~pierre