From owner-freebsd-questions@freebsd.org Sun Sep 25 19:52:23 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D950BE9832 for ; Sun, 25 Sep 2016 19:52:23 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30651C01 for ; Sun, 25 Sep 2016 19:52:22 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by mail-qk0-x22b.google.com with SMTP id g67so87269146qkd.0 for ; Sun, 25 Sep 2016 12:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=sIRGRFER2KpYIZu8CtTRhn187uPdXKk7USC6mBoGhs8=; b=BLApcwqiE6uLLsV/5kTdOYdCYVxEg40UmHYZdegxT1/PD+ZLl05+b/GG47n2RVKa0j mtGFJsfu6lba+UuUXbHUwHmoBfmnzJrOP5RVYvXdjKoaY1OTXS4WxrpF33cvG/ulc5eZ 2BeM7FE3bpjypR2jCnaXGQjentu5u4SZNSUfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=sIRGRFER2KpYIZu8CtTRhn187uPdXKk7USC6mBoGhs8=; b=FUZNmojshXJRwuzTWsLevvbIKFwQh1MJsp2NhmQom2JBIgNwgE8665YEN1UahE7LCU 3xfCR7YVcQEA4u0icj03yxqwRX1B9oAZmW4xBl0+kGhEy5fmDtlUnqQkX1MjL2NFgP5o goiWISm7fBOEcpPW4kQSW13SfGczhRa56RgHV3QFcanInD1Lxg/6QZ9zDXnhrag9q+wP bAGwus8U2EDhGMaq098IevqKmDQnssByaDGMDS2C/RHPkGaVfNm4OKiHtcU1DqP2/M0d +vfg31ZZMdmv8/AkpYXxwhjX+UawZpAfHtfbXfheaTbw3kzZelxbYhxyjBZ5kK/7arIH sUyg== X-Gm-Message-State: AA6/9RlJZW6LfwJi2Va7oGEX3LNy4nrKUOs0dHKJeqLKBRxt/WcRKpVLxbKdiRRgBH6uGw== X-Received: by 10.55.160.199 with SMTP id j190mr17854598qke.274.1474833141787; Sun, 25 Sep 2016 12:52:21 -0700 (PDT) Received: from Papi ([179.180.13.181]) by smtp.gmail.com with ESMTPSA id s23sm9781938qka.10.2016.09.25.12.52.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Sep 2016 12:52:21 -0700 (PDT) Date: Sun, 25 Sep 2016 16:52:43 -0300 From: Mario Lobo To: "Brandon J. Wandersee" Cc: freebsd-questions@freebsd.org Subject: Re: Updating multiple computers Message-ID: <20160925165244.7e6995fd@Papi> In-Reply-To: <86eg4eu0v5.fsf@WorkBox.Home> References: <2e433f07-4dec-a3f3-aa49-7324a704c83e@columbus.rr.com> <867fa86m4s.fsf@WorkBox.Home> <32caf8a7-c40d-7f2a-5d18-72e4c7f42d50@columbus.rr.com> <20160920100946.53558675@Papi> <86eg4eu0v5.fsf@WorkBox.Home> Organization: BSD X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd10.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2016 19:52:23 -0000 On Tue, 20 Sep 2016 09:01:02 -0500 Brandon J. Wandersee wrote: > Mario Lobo writes: > > > On Mon, 19 Sep 2016 19:16:33 -0400 > > Baho Utot wrote: > > > >> On 09/19/16 09:43, Brandon J. Wandersee wrote: > >> > Baho Utot writes: > >> > > >> >> How do I use that release assuming that it is on a network > >> >> server to update/upgrade multiple systems? > >> > Release images are for clean installs. To update machines over > >> > the network, just run `make buildworld` and `make buildkernel` > >> > on the master system, then mount /usr/src and /usr/obj to the > >> > other systems using NFS. > >> Ok I will try that > >> > >> Thanks > >> > > > > I have one question regarding this alternative. > > > > I already have this scenario set up. > > > > Suppose that I want to save compile time on the remote machines > > and that machine #1 that holds /usr/src and the compiled /usr/obj is > > an intel XEON. > > > > Remote machine #2 that will use this compiled code is an I7 and > > machine #3 is an AMD Phenom II. > > > > If leave CPUTYPE alone, will the resulting code run well on all 3 > > machines? > > If you don't touch CPUTYPE, generic binaries are compiled for the > target architecture. As long as you're building for the same > architecture, everything should be fine. That's how "official" > packages and installation images are built. ;) > > I won't bother with any "debate" about CPU-specific optimizing, but > I'll say that if you're compiling code on a machine other than the > one you'll be running it on, or the machines aren't all identical, > just leave compiler/optimization flags alone. I've had code compiled > using one i7 quad-core model fail to run on another i7 quad-core > model from only two years earlier. > > Brandon; As a follow up on my attempt to centralize compilation. I hava a master server (10.3.51.50) where all the compilation is made. On it, I issued make buildworld and make buildkernel (no errors), and shared /usr/src and /usr/obj via nfs. Then, I have a VM server, same version and arch as the master, that sees this: Filesystem Size Used Avail Capacity Mounted on /dev/ada0s1a 4.8G 243M 4.2G 5% / devfs 1.0K 1.0K 0B 100% /dev /dev/ada0s1d 1.9G 346M 1.4G 19% /var /dev/ada0s1e 38G 4.0G 31G 11% /usr /dev/ada1s1 28G 4.9M 26G 0% /www fdescfs 1.0K 1.0K 0B 100% /dev/fd procfs 4.0K 4.0K 0B 100% /proc 10.3.51.50:/usr/src 97G 20G 69G 23% /usr/src 10.3.51.50:/usr/obj 97G 20G 69G 23% /usr/obj After compilation on the master, I go to the slave and issue: cd /usr/src mergemaster -p (goes OK). when I issue make installworld, I get this: [/usr/src]>make installworld mkdir -p /tmp/install.rlVMvcaV export PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin ; progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown date echo egrep find grep id install install-info ln lockf make mkdir mtree nmtree mv pwd_mkdb rm sed sh strip sysctl test true uname wc zic tzsetup makewhatis; do if progpath=`which $prog`; then echo $progpath; else echo "Required tool $prog not found in PATH." >&2; exit 1; fi; done); libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u | while read line; do set -- $line; if [ "$2 2>$3" != "not found" ]; then echo $2; else echo "Required library $1 2>not found." >&2; exit 1; fi; done); cp $libs 2>$progs /tmp/install.rlVMvcaV cp -R 2>${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.rlVMvcaV/locale 2>cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=amd64 2>MACHINE=amd64 CPUTYPE= 2>GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin 2>GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font 2>GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac 2>PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.rlVMvcaV 2>LD_LIBRARY_PATH=/tmp/install.rlVMvcaV 2>PATH_LOCALE=/tmp/install.rlVMvcaV/locale make -f Makefile.inc1 2>COMPILER_TYPE=clang __MAKE_SHELL=/tmp/install.rlVMvcaV/sh reinstall; 2>MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= 2>GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin 2>GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font 2>GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac 2>PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.rlVMvcaV 2>LD_LIBRARY_PATH=/tmp/install.rlVMvcaV 2>PATH_LOCALE=/tmp/install.rlVMvcaV/locale rm -rf /tmp/install.rlVMvcaV 2>Illegal instruction (core dumped) Illegal instruction (core dumped) 2>Illegal instruction (core dumped) 2>-------------------------------------------------------------- >>> Making hierarchy -------------------------------------------------------------- cd /usr/src; make -f Makefile.inc1 LOCAL_MTREE= hierarchy Illegal instruction (core dumped) Illegal instruction (core dumped) Illegal instruction (core dumped) cd /usr/src/etc; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/tmp/install.rlVMvcaV make LOCAL_MTREE= distrib-dirs Illegal instruction (core dumped) mtree -deU -f /usr/src/etc/mtree/BSD.root.dist -p / mtree -deU -f /usr/src/etc/mtree/BSD.var.dist -p /var empty: flags ("schg" is not "none"mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist -p /usr mtree -deU -f /usr/src/etc/mtree/BSD.include.dist -p /usr/include mtree -deU -f /usr/src/etc/mtree/BSD.debug.dist -p /usr/lib mtree -deU -f /usr/src/etc/mtree/BSD.groff.dist -p /usr mtree -deU -f /usr/src/etc/mtree/BSD.sendmail.dist -p / install -l s usr/src/sys /sys *** Signal 4 Stop. make[4]: stopped in /usr/src/etc *** Error code 1 Stop. make[3]: stopped in /usr/src *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src Any clues to what could be wrong? -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since 2.2.8 [not Pro-Audio.... YET!!] "UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."