From owner-freebsd-current@FreeBSD.ORG Tue Aug 2 23:29:56 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E20CD16A41F for ; Tue, 2 Aug 2005 23:29:56 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 928EC43D45 for ; Tue, 2 Aug 2005 23:29:56 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 02 Aug 2005 16:29:56 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.11/8.12.9) with ESMTP id j72NTuQg014466; Tue, 2 Aug 2005 16:29:56 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.12.11/8.12.11/Submit) id j72NTu8G014465; Tue, 2 Aug 2005 16:29:56 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200508022329.j72NTu8G014465@ambrisko.com> In-Reply-To: <42D89BAE.2050009@elischer.org> To: Julian Elischer Date: Tue, 2 Aug 2005 16:29:56 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: FreeBSD Current Subject: Re: static binaries, jails and compat x X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2005 23:29:57 -0000 Julian Elischer writes: | Now that we have dynamic binaries everywhere I'm discovering all those | places | where this breaks.. | | FreeBSD 5 or 6 machine. (needed because freeBSD 4 can't run on the new | hardware) | freeBSD 4 jail to run a legacy app. | ps top and netstat (and friends) don't work (not surprisingly) | ps I can get from /rescue | but top and netstat are only available in dynamic form. Hey, it gets harder when you run FreeBSD 4.X on a FreeBSD amd64 machine and have mixed i386/amd64 libs :-( I copy over the amd64 versions of ps etc. and had to copy over some libs that conflict in names. In-order to get around placement issues I binary edit them on the fly via sed: sed -e 's/libkvm/libhvm/g' -e 's/libexec/libhxec/g' -e 's/libsbuf/libhbuf/g' etc. One thing I just found out was: UNAME_s,r,v,m,p and hacked libc's getosreldate & uname to use that stuff. I LD_PRELOAD my lib of these then pkg_add -r, libtool etc. then just work and think the are really running on FreeBSD 4.X. I wish if LD_PRELOAD lib's didn't exist then it would just ignore it versus failing to run. I've made that change locally. That way I can chroot in chroot without needing the shims when not needed. It's a mess. Do you think the libc stuff should have the same type of over-rides as the uname binary. I think so. Doug A.