python3-cryptography: Compilation error (re Issue #28196)
### Package Name
python-cryptography
### Maintainer
@commodo
### OpenWrt Version
SNAPSHOT
### OpenWrt Target/Subtarget
ath79/generic
### Steps to Reproduce
Use this config to compile openwrt from git
[config_wr650.txt](https://github.com/user-attachments/files/28171479/config_wr650.txt)
### Actual Behaviour
```
Successfully built certifi-2026.2.25-py3-none-any.whl
set -e; HOST_PYTHON3_BIN="/data/openwrt/wr650/staging_dir/hostpkg/bin/python3.14"; if [ ${#HOST_PYTHON3_BIN} -gt 124 ]; then echo >&2 "Path to host python too long; python program install would fail"; exit 1; fi
cd "/data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25" && CC="mips-openwrt-linux-musl-gcc" CCSHARED="mips-openwrt-linux-musl-gcc -DPIC -fpic" CXX="mips-openwrt-linux-musl-g++" LD="mips-openwrt-linux-musl-gcc" LDSHARED="mips-openwrt-linux-musl-gcc -shared" CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25=certifi-2026.2.25 -mips16 -minterlink-mips16 -Wl,-z,max-page-size=4096 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CPPFLAGS="-I/data/openwrt/wr650/staging_dir/toolchain-mips_24kc_gcc-14.3.0_musl/usr/include -I/data/openwrt/wr650/staging_dir/toolchain-mips_24kc_gcc-14.3.0_musl/include -I/data/openwrt/wr650/staging_dir/toolchain-mips_24kc_gcc-14.3.0_musl/include/fortify -I/data/openwrt/wr650/staging_dir/target-mips_24kc_musl/usr/include/python3.14" LDFLAGS="-L/data/openwrt/wr650/staging_dir/toolchain-mips_24kc_gcc-14.3.0_musl/usr/lib -L/data/openwrt/wr650/staging_dir/toolchain-mips_24kc_gcc-14.3.0_musl/lib -fuse-ld=bfd -zmax-page-size=4096 -znow -zrelro -lpython3.14" _PYTHON_HOST_PLATFORM="linux-mips" _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata__linux_mips-linux-muslsf" PYTHONPATH="/data/openwrt/wr650/staging_dir/target-mips_24kc_musl/usr/lib/python3.14:/data/openwrt/wr650/staging_dir/target-mips_24kc_musl//usr/lib/python3.14/site-packages:/data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25/ipkg-install//usr/lib/python3.14/site-packages" PYTHONDONTWRITEBYTECODE=1 _python_sysroot="/data/openwrt/wr650/staging_dir/target-mips_24kc_musl" _python_prefix="/usr" _python_exec_prefix="/usr" CARGO_BUILD_TARGET=mips-unknown-linux-musl CARGO_HOME=/data/openwrt/wr650/dl/cargo CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 CARGO_PROFILE_RELEASE_DEBUG=false CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=false CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_OPT_LEVEL=z CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS=true CARGO_PROFILE_RELEASE_PANIC=unwind CARGO_PROFILE_RELEASE_RPATH=false CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-musl-gcc RUSTFLAGS="-Ctarget-feature=-crt-static -lssp_nonshared -lssp_nonshared -Clink-arg=-fuse-ld=bfd -Ctarget-feature=-crt-static -lssp_nonshared -lssp_nonshared -Clink-arg=-fuse-ld=bfd" TARGET_CC=mips-openwrt-linux-musl-gcc TARGET_CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25=certifi-2026.2.25 -mips16 -minterlink-mips16 -Wl,-z,max-page-size=4096 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " PYO3_CROSS_LIB_DIR="/data/openwrt/wr650/staging_dir/target-mips_24kc_musl/usr/lib/python3.14" SETUPTOOLS_RUST_CARGO_PROFILE="release" /data/openwrt/wr650/staging_dir/hostpkg/bin/python3.14 -m installer --overwrite-existing --destdir "/data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25/ipkg-install" --no-compile-bytecode --prefix /usr "/data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25/"/openwrt-build/certifi-2026.2.25-*.whl
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/data/openwrt/wr650/staging_dir/hostpkg/lib/python3.14/site-packages/installer/__main__.py", line 115, in <module>
_main(sys.argv[1:], "python -m installer")
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/openwrt/wr650/staging_dir/hostpkg/lib/python3.14/site-packages/installer/__main__.py", line 111, in _main
installer.install(source, destination, {})
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/openwrt/wr650/staging_dir/hostpkg/lib/python3.14/site-packages/installer/_core.py", line 124, in install
record = destination.write_file(
scheme=scheme,
...<2 lines>...
is_executable=is_executable,
)
File "/data/openwrt/wr650/staging_dir/hostpkg/lib/python3.14/site-packages/installer/destinations.py", line 212, in write_file
return self.write_to_fs(scheme, path_, stream, is_executable)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/openwrt/wr650/staging_dir/hostpkg/lib/python3.14/site-packages/installer/destinations.py", line 169, in write_to_fs
target_path = self._path_with_destdir(scheme, path)
File "/data/openwrt/wr650/staging_dir/hostpkg/lib/python3.14/site-packages/installer/destinations.py", line 143, in _path_with_destdir
raise ValueError(
f"Attempting to write {path} outside of the target directory"
)
ValueError: Attempting to write certifi/cacert.pem outside of the target directory
make[3]: *** [Makefile:57: /data/openwrt/wr650/build_dir/target-mips_24kc_musl/pypi/certifi-2026.2.25/.built] Error 1
make[3]: Leaving directory '/data/openwrt/wr650/feeds/packages/lang/python/python-certifi'
time: package/feeds/packages/python-certifi/compile#2.47#0.18#2.64
ERROR: package/feeds/packages/python-certifi failed to build.
make[2]: *** [package/Makefile:188: package/feeds/packages/python-certifi/compile] Error 1
make[2]: Leaving directory '/data/openwrt/wr650'
make[1]: *** [package/Makefile:182: /data/openwrt/wr650/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/data/openwrt/wr650'
make: *** [/data/openwrt/wr650/include/toplevel.mk:233: world] Error 2
```
### Confirmation Checklist
- [x] The package is maintained in this repository.
- [x] I understand that issues related to [the base OpenWrt repository](https://github.com/openwrt/openwrt/issues) or [LuCI repository](https://github.com/openwrt/luci/issues) will be closed.
- [x] I am reporting an issue for OpenWrt, not an unsupported fork.
1 条评论