Summary: | emulators/qemu-user-static: Can't run shell scripts with chroot | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | dornergd <gerhard.dorner> |
Component: | Individual Port(s) | Assignee: | freebsd-emulation (Nobody) <emulation> |
Status: | New --- | ||
Severity: | Affects Some People | CC: | emulation, jlduran, mikael |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(emulation) |
Version: | Latest | ||
Hardware: | arm64 | ||
OS: | Any |
Description
dornergd
2018-08-16 14:50:25 UTC
I have the same setup here and everything works as expected (on 12-current) How do you set up your chroot? (In reply to mikael.urankar from comment #1) First I copied /usr/local/bin/qemu-aarch64-static to /tmp/qemu_static in the chroot-environment (world_dir) After this is run: chroot world_dir /tmp/qemu_static /bin/sh --- But I found a function "is_target_shell_script" in bsd-user/freebsd/os-proc.c, which only used in FreeBSD-versions smaller than 11: #if defined(__FreeBSD_version) && __FreeBSD_version < 1100000 After made a simple patch which deletes this lines around the function-declaration and function-calls the shell-scripts works correctly. (In reply to dornergd from comment #2) I don't know why is_target_shell_script is needed on __FreeBSD_version < 1100000 Usually I do the following: cp /usr/local/bin/qemu-aarch64-static /data/jails/12aarch64/usr/local/bin service qemu_user_static start chroot /data/jails/12aarch64 ^Triage: assign to current maintainer. |