[Bug 242896] poudriere testport broken with Python ports in cross-building jail

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 26 18:44:39 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242896

            Bug ID: 242896
           Summary: poudriere testport broken with Python ports in
                    cross-building jail
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: chris at chrullrich.net

[This is difficult to explain, and I'm not sure I've entirely understood it
myself. Bear with me, please.]

"poudriere testport" (as well as bulk -t) of Python ports (not the
lang/python*, but the py-* ports) fails during stage when using a cross-build
jail with native-xtools (/nxb-bin):

=>> Error: Filesystem touched during stage (files must install to ${STAGEDIR}):
usr/local/lib/python3.7/__pycache__/_sysconfigdata_m_freebsd12_.cpython-37.pyc:
        size (18800, 18752)

Bug 208282 introduced a fix for incorrect contents of _sysconfigdata_etc_.py in
the cross-build situation by SUB_FILESing away the /nxb-bin prefix, which has
apparently worked well since, and *does* work (albeit by accident, see below)
with "poudriere bulk".

It looks like there was an oversight in this fix, in that the .py file is
rewritten *after* it has been byte-compiled. Hence, the .pyc files still
contain the /nxb-bin prefix in the various variables:

# tar -xvf
/usr/local/poudriere/data/packages/aarch64-default-raspi3/All/python37-3.7.6.txz
&> /dev/null
# fgrep nxb usr/local/lib/python3.7/_sysconfigdata_m_freebsd12_.py
# strings
usr/local/lib/python3.7/__pycache__/_sysconfigdata_m_freebsd12_.cpython-37.pyc
| fgrep nxb-bin/usr/bin/cc | head -n 1
-L. -lpython3.7mzO/nxb-bin/usr/bin/cc -pthread -shared -L/usr/local/lib 
-fstack-protector-strongZ


This inconsistency does not affect poudriere bulk because poudriere only looks
for staging violations in testport, and in bulk with -t. However, the .pyc is
updated during the build once something imports sysconfig, leading to the
staging violation.

I have no clue how to correctly fix this. Perhaps by recompiling
_sysconfigdata_etc_.py after removing the prefixes, so that a) the files are
consistent and b) the .pyc files' mtime is updated avoiding the automatic
recompilation?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list