FreeBSD question

Lynn David Newton plug-discuss@lists.plug.phoenix.az.us
Mon, 6 Jan 2003 11:40:48 -0700


Thanks for the fast turnaround on my FreeBSD questions.
I've done much Unix sysadmin, but little with FreeBSD,
so I have some questions before I do something that
will meltdown the machine, which would not please my
boss.

  JF> 1. You must pkg_delete the old version before "make install"

I ran pkgdb -F and see that the string "mysql" is *NOT*
in the output.

This suggests to me that the existing version of mysql
was not installed through /usr/ports, but probably by
building from a source distribution. If so, this could
mean all bets are off as far as paths and all that. I
might be shooting at the wrong target.

Agreed?

  JF>    to make sure you aren't mixing and matching
  JF>    files between version.

  JF> 2. Update your ports tree with CVSUP.
  JF>    Edit /etc/make.conf to make this easily
  JF>    scriptable.

There is no existing /etc/make.conf on the system.
There is an /etc/defaults/make.conf and also a
/usr/share/examples/etc/defaults/make.conf, which I
assume is irrelevant.

/etc/make.conf is large, but everything in it is
commented out except for a definition for BDECFLAGS. I
wouldn't know what I could safely alter in this file
without studying it for a while. I believe I'll just
ignore it for now. My primary objective is simply to
get mysql updated.

cvsup itself did not exist on the system. Therefore, I
had to build/install cvsup from /usr/ports/net/cvsup.

It surprises me that cvsup is not installed on the
system by default, given that it is so central to the
process of installing/upgrading packages in FreeBSD.

(This is a fairly new system that we are gradually
building to be a special purpose server. The person who
originally created it is no longer with us, and was a
19-year-old kid part-timer, not an experienced
professional sysadmin. Now that some of this work has
been offloaded to me I'm unsure what I'm dealing with.)

I have not yet executed cvsup. Will a single command
with no arguments do what I want it to do, or are there
standard options and arguments?

  JF> 3. *Backup* your database(s)!!!!

Yep, I'll certainly do that. Probably ought to stop the
mysqld, too.

  JF> 4. do a "make" first and check for any needed arguments, switches,
  JF>    or pkg messages with instructions for things
  JF>    you may need to adjust/add/remove.

  JF> A safer way is to install portupgrade and manage
  JF> ports with it.

Okay, I've done that, i.e., I also had to build
portupgrade from /usr/ports/sysutils/portupgrade
because it wasn't installed, but it seems to be raring
to go.

  JF> To fix and check all ports do:
  JF> pkgdb -F

See above.

  JF> portversion -vc > /tmp/PORTS.LIST

  JF> then take a look at the contents of PORTS.LIST for things
  JF> that need to be upgraded.

All that's in it is a script:

  # cat /tmp/PORTS.LIST

  if [ X"$pkgs" != X"" ]; then
    portupgrade $pkgs
  fi

I'm not sure where I'm at here. Can I just run
portupgrade, or do I need to run cvsup and then
portupgrade, or what?

--
Lynn David Newton
Phoenix, AZ