[Bug 256652] freebsd-update in 11.4 i386 jail on amd64 host upgrades jail using amd64 files

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 16 Jun 2021 16:44:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256652

            Bug ID: 256652
           Summary: freebsd-update in 11.4 i386 jail on amd64 host
                    upgrades jail using amd64 files
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: needs-qa
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: portmgr@FreeBSD.org

At least on 11.4 i386 freebsd-update gets confused about architecture, breaking
the jail due to mixed ABI. My 12.2/13.0 i386 jails are NOT affected (14.0 i386
is built from source + freebsd-update doesn't support -CURRENT). Creating
another 11.4 i386 jail still produces mixed ABI because poudriere runs
freebsd-update at the end.

$ poudriere jail -l | fgrep 114i386
114i386      11.4-RELEASE-p7                i386          ftp      2021-01-31
00:10:14 /poudriere/jails/114i386

$ file /poudriere/jails/114i386/libexec/ld-elf.so.1
/poudriere/jails/114i386/libexec/ld-elf.so.1: ELF 32-bit LSB shared object,
Intel 80386, version 1 (FreeBSD), dynamically linked, stripped

$ poudriere jail -uj 114i386
[00:00:00] Upgrading using ftp
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 11.4-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 15 patches.....10.. done.
Applying patches... done.
Fetching 54 files... ....10....20....30....40....50.. done.
The following files will be updated as part of updating to
11.4-RELEASE-p11:
/bin/freebsd-version
/lib/libc.so.7
/lib/libcrypto.so.8
/lib/libgcc_s.so.1
/libexec/ld-elf.so.1
/rescue/[
/rescue/atmconfig
/rescue/badsect
/rescue/bectl
/rescue/bsdlabel
/rescue/bunzip2
/rescue/bzcat
/rescue/bzip2
/rescue/camcontrol
/rescue/cat
/rescue/ccdconfig
/rescue/chflags
/rescue/chgrp
/rescue/chio
/rescue/chmod
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/cp
/rescue/csh
/rescue/date
/rescue/dd
/rescue/devfs
/rescue/df
/rescue/dhclient
/rescue/disklabel
/rescue/dmesg
/rescue/dump
/rescue/dumpfs
/rescue/dumpon
/rescue/echo
/rescue/ed
/rescue/ex
/rescue/expr
/rescue/fastboot
/rescue/fasthalt
/rescue/fdisk
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/fsirand
/rescue/gbde
/rescue/geom
/rescue/getfacl
/rescue/glabel
/rescue/gpart
/rescue/groups
/rescue/gunzip
/rescue/gzcat
/rescue/gzip
/rescue/halt
/rescue/head
/rescue/hostname
/rescue/id
/rescue/ifconfig
/rescue/init
/rescue/ipf
/rescue/iscsictl
/rescue/iscsid
/rescue/kenv
/rescue/kill
/rescue/kldconfig
/rescue/kldload
/rescue/kldstat
/rescue/kldunload
/rescue/ldconfig
/rescue/less
/rescue/link
/rescue/ln
/rescue/ls
/rescue/lzcat
/rescue/lzma
/rescue/md5
/rescue/mdconfig
/rescue/mdmfs
/rescue/mkdir
/rescue/mknod
/rescue/more
/rescue/mount
/rescue/mount_cd9660
/rescue/mount_msdosfs
/rescue/mount_nfs
/rescue/mount_nullfs
/rescue/mount_udf
/rescue/mount_unionfs
/rescue/mt
/rescue/mv
/rescue/nc
/rescue/newfs
/rescue/newfs_msdos
/rescue/nos-tun
/rescue/pgrep
/rescue/ping
/rescue/ping6
/rescue/pkill
/rescue/poweroff
/rescue/ps
/rescue/pwd
/rescue/rcorder
/rescue/rcp
/rescue/rdump
/rescue/realpath
/rescue/reboot
/rescue/red
/rescue/rescue
/rescue/restore
/rescue/rm
/rescue/rmdir
/rescue/route
/rescue/routed
/rescue/rrestore
/rescue/rtquery
/rescue/rtsol
/rescue/savecore
/rescue/sed
/rescue/setfacl
/rescue/sh
/rescue/shutdown
/rescue/sleep
/rescue/spppcontrol
/rescue/stty
/rescue/swapon
/rescue/sync
/rescue/sysctl
/rescue/tail
/rescue/tar
/rescue/tcsh
/rescue/tee
/rescue/test
/rescue/tunefs
/rescue/umount
/rescue/unlink
/rescue/unlzma
/rescue/unxz
/rescue/vi
/rescue/whoami
/rescue/xz
/rescue/xzcat
/rescue/zcat
/rescue/zdb
/rescue/zfs
/rescue/zpool
/sbin/devd
/sbin/dhclient
/sbin/init
/sbin/rtsol
/usr/bin/ar
/usr/bin/as
/usr/bin/c++
/usr/bin/cc
/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang-cpp
/usr/bin/cpp
/usr/bin/ld
/usr/bin/ld.bfd
/usr/bin/ld.lld
/usr/bin/make
/usr/bin/ranlib
/usr/bin/svnlite
/usr/bin/svnliteadmin
/usr/bin/svnlitebench
/usr/bin/svnlitedumpfilter
/usr/bin/svnlitefsfs
/usr/bin/svnlitelook
/usr/bin/svnlitemucc
/usr/bin/svnliterdump
/usr/bin/svnliteserve
/usr/bin/svnlitesync
/usr/bin/svnliteversion
/usr/include/sys/filedesc.h
/usr/include/sys/jail.h
/usr/lib/libc.a
/usr/lib/libc_p.a
/usr/lib/libc_pic.a
/usr/lib/libcompiler_rt.a
/usr/lib/libcompiler_rt_p.a
/usr/lib/libcrypto.a
/usr/lib/libcrypto_p.a
/usr/lib/libhdb.so.11
/usr/lib/libpam.a
/usr/lib/libprivatesqlite3.a
/usr/lib/libprivatesqlite3.so.0
/usr/lib/libprivatesqlite3_p.a
/usr/lib/libprivateunbound.a
/usr/lib/libprivateunbound.so.5
/usr/lib/libprivateunbound_p.a
/usr/lib/libradius.a
/usr/lib/libradius.so.4
/usr/lib/libradius_p.a
/usr/lib/pam_login_access.so.6
/usr/lib/pam_radius.so.6
/usr/libexec/ftpd
/usr/sbin/freebsd-update
/usr/sbin/local-unbound
/usr/sbin/local-unbound-anchor
/usr/sbin/local-unbound-checkconf
/usr/sbin/local-unbound-control
/usr/sbin/nologin
/usr/sbin/ppp
/usr/sbin/rtsold
/usr/share/man/man2/jail.2.gz
/usr/share/man/man2/jail_attach.2.gz
/usr/share/man/man2/jail_get.2.gz
/usr/share/man/man2/jail_remove.2.gz
/usr/share/man/man2/jail_set.2.gz
/usr/src/lib/libc/sys/jail.2
/usr/src/lib/libpam/modules/pam_login_access/login_access.c
/usr/src/lib/libradius/radlib.c
/usr/src/sys/conf/newvers.sh
/usr/src/sys/dev/xen/blkback/blkback.c
/usr/src/sys/kern/kern_descrip.c
/usr/src/sys/kern/kern_fork.c
/usr/src/sys/kern/kern_jail.c
/usr/src/sys/kern/vfs_mount.c
/usr/src/sys/sys/filedesc.h
/usr/src/sys/sys/jail.h
/usr/src/sys/vm/vm_fault.c
/usr/src/usr.sbin/freebsd-update/freebsd-update.sh
Installing updates...Scanning
/poudriere/jails/114i386/usr/share/certs/blacklisted for certificates...
Scanning /poudriere/jails/114i386/usr/share/certs/trusted for certificates...
 done.
11.4-RELEASE-p11
[00:01:20] Recording filesystem state for clean... done

$ file /poudriere/jails/114i386/libexec/ld-elf.so.1
/poudriere/jails/114i386/libexec/ld-elf.so.1: ELF 64-bit LSB shared object,
x86-64, version 1 (FreeBSD), dynamically linked, stripped
$ file /poudriere/jails/114i386/lib/libthr.so.3
/poudriere/jails/114i386/lib/libthr.so.3: ELF 32-bit LSB shared object, Intel
80386, version 1 (FreeBSD), dynamically linked, stripped

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