[pacman-dev] tmp permissions problem is back?

Xavier shiningxc at gmail.com
Mon Aug 20 18:52:10 EDT 2007


On Mon, Aug 20, 2007 at 06:35:23PM +0200, Xavier wrote:
> On Mon, Aug 20, 2007 at 12:17:32PM -0400, Mister Dobalina wrote:
> > 
> > See below. Sorry for any split command lines, should
> > be obvious where they are...
> > 
> 
> Well, it's never really gone :
> http://bugs.archlinux.org/task/7484#comment17619
> 
> What I can't explain and needs to be investigated is why
> the workaround in post_install doesn't work :
>   # workaround for bug #7194
>   chmod 1777 var/spool/mail tmp var/tmp

It looks like scriptlets aren't run when using a different root.
scriptlets are called by chrooting first, and then running :
execl("/bin/sh", "sh", "-c", cmdline, (char *)NULL);

Maybe this requires a proper chroot to work?


There is an additional issue in pacman git :

553     snprintf(scriptfn, PATH_MAX, "%s/.INSTALL", tmpdir);
554     /* chop off the root so we can find the tmpdir in the chroot */
555     scriptpath = scriptfn + strlen(root) - 1;
556   } else {
557     strncpy(scriptfn, installfn, PATH_MAX);
558     /* chop off the root so we can find the tmpdir in the chroot */
559     scriptpath = scriptfn + strlen(root) - 1;
560   }

If I understood correctly, root isn't a prefix anymore, so I believe that
this part is wrong now.




More information about the pacman-dev mailing list