Re: Huh?? sbuild fails and pbuilder succeeds in building a Fortran-containing Python package
On Thu, Feb 11, 2021 at 12:15:38AM +0100, Johannes Schauer Marin Rodrigues wrote:
> Hi,
>
> Quoting Julian Gilbey (2021-02-10 22:51:39)
> > I wonder if anyone has an idea about this thorny problem. I'm trying
> > to create a package and thought I'd got something wrong, but have
> > found the same behaviour happens with the "amp" package (version
> > 0.6.1-1) and the "spherepack" package (version 3.3~a1-4), which
> > suggests to me that the problem lies outside of the package itself.
> > But I have very little idea how to track this bug down.
> >
> > [...]
> >
> > They are so different, yet supposedly using essentially identical
> > build environments. (They are also both using sid repositories.)
> >
> > If you have any idea why I might be seeing this behaviour, and what I
> > might be able to do about it, that would be fantastic!
>
> I would actually not be surprised if we find reproducibility problems between
> packages built on pbuilder versus packages build with sbuild. For example
> sbuild sets HOME=/sbuild-nonexistent which will make packages FTBFS that try to
> put anything in $HOME. This is not the problem here, though. If I wrap the call
> to dh in debian/rules in strace -p I get:
>
> [...]
> [pid 609] openat(AT_FDCWD, "/dev/shm/o5kYxf", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)
> [...]
> [pid 609] write(2, "error: [Errno 13] Permission den"..., 36error: [Errno 13] Permission denied
Hi Josch,
Wow, thanks! I tried putting the strace call around the whole build,
but that didn't work.
> A workaround for this problem is indeed to add
>
> --chroot-setup-commands="chmod 777 /dev/shm"
>
> to your sbuild invocation. A cursory glance into the pbuilder codebase reveals
> that pbuilder will mount a tmpfs into /dev/shm:
>
> https://sources.debian.org/src/pbuilder/0.231/pbuilder-modules/?hl=417#L417
>
> For sbuild, whether this is done, this depends on your chroot backend. The
> package builds fine on the buildds though, so I guess they have a schroot setup
> that sets /dev/shm up correctly?
OK, so I'll submit this as a bug report / feature request to sbuild.
Many thanks for tracking down the cause of this!
Best wishes,
Julian
Reply to: