Ray Donnelly writes: > On Thu, Aug 13, 2015 at 11:48 AM, Abdó Roig-Maranges > <[email protected]> wrote: >> >> Hi, >> >> I'm attempting to create a new msys2 tree from within msys with >> >> pacman --root /tmp/newmsys/msys64 -Sy base >> >> as it is done in the installer scripts. I just want to add some extra >> packages, >> for internal use on our project. >> >> However, the execution of the ".install" scripts of some packages fail. I've >> straced it, and I think it has to do with msys path translation messing up >> the >> chroot. Here is a filtered version of the huge strace: >> >> $ strace pacman -S grep --root 'D:\msys64\tmp\newmsys\msys64' | grep 'chroot' >> warning: grep-2.21-1 is up to date -- reinstalling >> :: Proceed with installation? [Y/n] >> 101 580580682 [main] pacman 3292 chroot: 0 = chroot(/tmp/newmsys/msys64/) >> 145 420375 [main] bash 4308 mount_info::conv_to_win32_path: attempt to >> access outside of chroot '/tmp/newmsys/msys64 - D:\msys64\tmp\newmsys\msys64' >> error: command (/usr/bin/bash /usr/bin/bash -c . /tmp/alpm_gp8OmG/.INSTALL; >> post_upgrade 2.21-1 2.21-1 ) failed to execute correctly >> >> The problem seems to be that both paths: /tmp/newmsys/msys64, and >> D:\msys64\tmp\newmsys\msys64 point to the same directory, but someone fails >> to >> recognize it. > > I think this might be because I reorder the mount paths so that, > generally speaking, if there's 2 mounts to the same path the shortest > one gets selected always. I think the lookup code in > conv_to_win32_path needs to be taught to ignore paths outside of the > chroot instead of reporting such a lookup as an access error. > > You need to edit MSYS-packages/msys2-runtime/PKGBUILD and enable > options= of '!strip' and 'debug', then rebuild it, install it, exit > your shells, then write a simple test program that calls chroot and > then attempts to do such an access .. that should be enough to get you > started. You can debug using Qt Creator too, if you use the right > debugger / kit.
Hi, It turns out that I misread the strace. The chroot error message was harmless, and the .install scriptlet failure that was bothering me: error: command (/usr/bin/bash /usr/bin/bash -c . /tmp/alpm_gp8OmG/.INSTALL; post_upgrade 2.21-1 2.21-1 ) failed to execute correctly is caused by install-info failing on a chroot. This is a minimal failure case: $ chroot /tmp/newmsys/msys64 install-info --debug /usr/share/info/grep.info.gz /usr/share/info/dirdebug: reading dir file /usr/share/info/dir debug: reading input file /usr/share/info/grep.info.gz install-info: No such file or directory for gzip -d The gzip binary is in the right place on the chroot and everything looks fine. I'm not sure what is going on yet. Do you encounter these errors when building the msys installer for distribution? Anyways, I can live with broken info pages for now... If I get around to fix either the chroot thing or the info error, I'll follow up. Thanks! Abdó Roig. ------------------------------------------------------------------------------ _______________________________________________ Msys2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msys2-users
