I tried to update vim to 6.1-r9 but got an access violation. gcc-compiler 2.95.3-r7 portage 2.0.13
Created attachment 2683 [details] vim-access violation log
When I'm in the console I can emerge vim-6.1-r9 successfully. So there's something messed up when people try to emerge vim-6.1-r9 when they've su'ed to root in a xterm. Note: with console I mean the none-graphical environment not some x11-term.
its like bug #4642
4642 is marked as closed, but I still get this error with vim-6.1-r10 I am running emerge from an ssh session (no local console on the pc). I have had this error with all vims r8 to r10. I current have r7 installed, but I have a feeling I installed that from a local console to work around this error, but plugging in a monitor and keyboard. (I normally have this gentoo box on a shelf with no keyboard or monitor). I have managed to emerge vim by disabling the sandbox before installing... export SANDBOX_DISABLED=1 ; emerge -u vim Roy
OK thanx for letting me know whats going on.. I'm very disabled at the moment... no internet connection at home, so I will be slow take a look at this and fix it. What verion of portage are you using? Updating to the newest seems to have helped alot of people with the old sandbox violations, is the error log the same for you? can you send me yours if it is. Naz
portage = 2.0.36 I've unmerged vim and emerged again (now on r11) (this is all still within an ssh session, logged in as root). These are the packages that I would merge, in order. Calculating dependencies ...done! [ebuild N ] app-editors/vim-core-6.1 to / [ebuild N ] app-editors/vim-6.1-r11 to / vim-core-6.1 failed with same error as vim-6.1-r10 did. end of emerge output... gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/vim.1 gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/vimdiff.1 gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/vimtutor.1 gzipping man page: /var/tmp/portage/vim-core-6.1/image//usr/share/man/man1/xxd.1 strip: /var/tmp/portage/vim-core-6.1/image/usr/bin/xxd >>> Completed installing into /var/tmp/portage/vim-core-6.1/image/ --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/tmp/sandbox-vim-core-6.1-18042.log" chmod: /dev/pty/s0 -------------------------------------------------------------------------------- root # cat /tmp/sandbox-vim-core-6.1-18042.log chmod: /dev/pty/s0 root # ls -l /dev/pty/s0 crw--w---- 1 root tty 3, 0 Sep 14 11:12 /dev/pty/s0 enough info? Roy
I've found the problem I think. basically, the ebuild script is doing "addwrite /dev/pty/*", but this does not work, you need to name the specific device file in /dev/pty/ that is being used. In my case this is s0. I tested out this theory by using the sandbox command directly on the command line... (addwrite sets the SANDBOX_WRITE environment variable) fillerbunny vim-core # /usr/lib/portage/bin/sandbox ========================== Gentoo linux path sandbox =========================== Detection of the support files. Verification of the required files. Setting up the required environment variables. The protected environment has been started. -------------------------------------------------------------------------------- Shell being started in forked process. fillerbunny vim-core # echo $SANDBOX_WRITE /dev/zero:/dev/fd/:/dev/null:/dev/pts/:/dev/vc/:/dev/tty:/tmp/: /var/log/scrollkeeper.log:/root/.gconfd/lock:/root/.bash_history: /usr/tmp/conftest:/usr/lib/conftest:/usr/tmp/cf:/usr/lib/cf::/tmp: /var/tmp:/tmp/:/var/tmp/ fillerbunny vim-core # export SANDBOX_WRITE=$SANDBOX_WRITE:/dev/pty/* fillerbunny vim-core # echo $SANDBOX_WRITE /dev/zero:/dev/fd/:/dev/null:/dev/pts/:/dev/vc/:/dev/tty:/tmp/: /var/log/scrollkeeper.log:/root/.gconfd/lock:/root/.bash_history: /usr/tmp/conftest:/usr/lib/conftest:/usr/tmp/cf:/usr/lib/cf::/tmp: /var/tmp:/tmp/:/var/tmp/:/dev/pty/* fillerbunny vim-core # chmod +w /dev/pty/s0 ACCESS DENIED chmod: /dev/pty/s0 chmod: changing permissions of `/dev/pty/s0': Permission denied fillerbunny vim-core # export SANDBOX_WRITE=$SANDBOX_WRITE:/dev/pty/s0 fillerbunny vim-core # chmod +w /dev/pty/s0 fillerbunny vim-core # exit exit Cleaning up sandbox process Cleaning up pids file. ========================== Gentoo linux path sandbox =========================== The protected environment has been shut down. --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/tmp/sandbox-17447.log" chmod: /dev/pty/s0 -------------------------------------------------------------------------------- fillerbunny vim-core # I'm not sure if there is one way to find out which device is going to be chmod'd. In my example, since I'm using ssh, I think it would be safe to do addwrite "${SSH_TTY}", but I don't know about people not using ssh. I've change this line in my copy of the vim ebuild file... addwrite /dev/pty/* to addwrite "${SSH_TTY}" and I can emerge vim without getting the error. (note I've had to do this in the vim-core ebuild file as well as the vim one now it has been split out). actually, I'm thinking addwrite `tty` would be more generic. that seems to work for me too. thoughts anyone? roy
Roy thanx for help.. I'm without a internet connection but I'm trying get on something so I can fix this stuff.. think SSH_TTY is the way to go, I'm on friends powerbook and was going to use is hopefully soon gentoo box or bring over my machine so I can actually do something :o) Naz
Ok commited the fixes to vim so all the sandbox violation should be fixed now Naz