Skip to content

Commit a7a20d5

Browse files
renatoaguiarJuan RP
authored andcommitted
Fix execution of post install scripts on cross builds
Add missing call to register_binfmt before installing packages on mkrootfs.
1 parent 9b08054 commit a7a20d5

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ register_binfmt() {
242242
# use the static one always and make sure it shows up at the same
243243
# place in the host and the chroot.
244244
if [ ! -x "$ROOTFS/usr/bin/$QEMU_BIN" ] ; then
245-
cp -f "$(which "$QEMU_BIN")" "$ROOTFS/usr/bin" ||
245+
install -m755 -D "$(which "$QEMU_BIN")" "$ROOTFS/usr/bin/$QEMU_BIN" ||
246246
die "Could not install $QEMU_BIN to $ROOTFS/usr/bin/"
247247
fi
248248
}

mkrootfs.sh.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ run_cmd_target "xbps-install -S $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -
136136
# so we set this here.
137137
chmod 755 "$ROOTFS"
138138

139-
# The pseudofs mountpoints are needed for the qemu support in cases
140-
# where we are running things that aren't natively executable.
139+
# The binfmt setup and pseudofs mountpoints are needed for the qemu
140+
# support in cases where we are running things that aren't natively
141+
# executable.
142+
register_binfmt
141143
mount_pseudofs
142144

143145
# With everything setup, we can now run the install to load the

0 commit comments

Comments
 (0)