Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2016 16:52:43 -0300
From:      Mario Lobo <lobo@bsd.com.br>
To:        "Brandon J. Wandersee" <brandon.wandersee@gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Sep 2016 09:01:02 -0500
Brandon J. Wandersee <brandon.wandersee@gmail.com> wrote:

> Mario Lobo writes:
> 
> > On Mon, 19 Sep 2016 19:16:33 -0400
> > Baho Utot <baho-utot@columbus.rr.com> 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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160925165244.7e6995fd>