Upgrading my laptop to Yosemite
We just got new Macs at work - which came with Yosemite preinstalled. There are a few odds and ends that I am not thrilled with, but overall I have found the transition from Lion to be quite smooth. So guess it is time to upgrade my personal laptop - before any more security issues are announced.
I went to the App Store and downloaded the installer and ran it. All seemed to be going well until the point where the installer thought it had “2 minutes left”. Two hours later, I gave up and went to bed, leaving it running. I have no idea when it actually finished but in the morning, my machine was asleep. When I woke it up, I got the odd gray screen overlay, with the blinking gray startup bars near the bottom - like you get when you have run the battery completely out. I was wondering if either the install had failed (probably not, since the screen behind the gray overlay was the new, flat, Yosemite look) or if the machine had overheated and crashed. It got very hot during the install but I had not heard the fan running. I did what I could to leave the bottom of the machine with good airflow so it could cool off but that was all I could do for that issue.
Anyway, despite the odd gray screen, the machine started up OK, let me log in, and then ran some “setting up your new mac” things. Looks OK. I launched the app store and installed the two security updates that have come out since Yosemite launched. I also downloaded the Mac office apps, pages, keynote, numbers….
I downloaded the newest XCode (6.1) and installed it. The first time
it launched, I was asked to allow it to upgrade the device support -
which it did and then promptly crashed. When I tried to launch it
again, it crashed again. But third time is the charm. It again asked
if it could run some (different) updates, but this time, it then gave
me the normal XCcode interface. Until I get around to learning iOS
programming, I don’t really have much use for the XCode GUI - except
for using the iOS simulator as one of the targets for Karma to run
compiler. To get the command line tools installed, I ran
--install and agreed to install the command line tools. Then I ran
xcodebuild --license. This was supposedly to accept the Xcode
license - but just like when I did it for setting up my work machine,
xcodebuild: error: invalid option '--license'. That Chris said
that indicated that I had already accepted the license; not sure about
any of that, but it doesn’t seem to have interfered with compiling
stuff at work, so I am not going to worry about it.
X11 no longer comes with OsX, but when I tried to use the X11 icon in my dock, it helpfully redirected me to this page which allowed my to download XQuartz 2.7.7 The installer ran just fine and at the end told me I had to log out and back in again to make this the default X11 for my machine.
I should have done a little checking and preparation before I did my upgrade. At least with Mac Ports, you generally can’t run any of the port commands after you have upgraded the OS. This means that it is really hard to figure out which packages you had installed (in particular, which were installed explicitly and which were installed because they were dependencies for something else you asked for) unless you ask for a list before doing the upgrade. While I was looking for blog posts about updating my homebrew-installed software, I found this blog post which explains why my Yosemite upgrade took FOREVER once it got to the 2 minutes left stages. Something about moving /usr/local and then moving all the files back… one by one. Oh well, at least now I know what that was about.
Fortunately, it looks like Homebrew will still basically work after
the upgrade. I can run
brew list and get a reasonable list of
installed packages: emacs, docbook, graphviz, imagemagick, mongodb,
mysql, node, postgresql, python, wget, etc. The blog post above
brew doctor which gave me several sets of
- some broken symlinks to remove with
- warnings about unlinked kegs
- a keg-only formula for libxml2 that is linked into /usr/local
- a warning that I should run
brew updateto get the latest formula info
The last one seemed reasonable, so I started there. The output of that
command (and some reading of docs and the install script) explained
why brew survived my upgrade. Homebrew just uses the system ruby -
which is always there and should always run on the installed OS. And
it explains why I don’t see separate ‘upgrade homebrew itself’ and
‘update the package list’ commands. Both are taken care of by running
brew update which checks out the latest software and package
information from Github:
The first piece of advice also seemed reasonable - clean up dangling symlinks:
Then, I ran
brew outdated to see what needs updating:
I think I want to update just about everything. But I am a little concerned about upgrading the databases. Let’s start by pinning them, then upgrading everything else, and then upgrading them one at a time. But first, do they run now?
Looks like mysql is running - I see processes for mysqld_safe and mysqld in ps and I can log in as root and poke around. The postgresql server is not running at the moment and I mostly have not been using it. So I am just going to pin those two packages and upgrade everything else:
Then the updates all ran - some giving messages, mostly about how to
launch daemons or warning you not to link certain libraries because
they would conflict with the OsX versions. To pick up the last few
upgrades, I did as suggested and ran
brew link fontconfig pixman and
brew upgrade. I will save the output of all of these
upgrades in case I need to go back to it.
The MySQL upgrade is only one minor version different, so I think I’ll try to do that upgrade. About the only database I care about in the current one might be the cardsharp_dev database, so I am not too worried about the data even if there is some strange incompatibility.
Logged in and looked around. Seems fine at least at a glance.
Starting and stoping services
Perpahs I should leave it but I would really like to have everything upgraded for the start of the new year. I had trouble getting to old databases after a previous postgres upgrade. So first I want to take a backup. And to do that, I need to start the database server…..
It looks like the [Yosemite upgrade removed a few empty directories] (http://stackoverflow.com/questions/25970132/pg-tblspc-missing-after-installation-of-os-x-yosemite) that we need:
I logged in and looked around. Looks like there are 2 tablespaces (\db) both owned by me - and a single schema (\dn) - also owned by me. What I missed, was how to list the databases: \l. So I missed doing the pg_dump before I upgraded the database. Fortunately there is an upgrade command which I found detailed at https://kkob.us/2014/12/20/homebrew-and-postgresql-9-4/.
There was a lot more output - and eventually the upgrade failed because I had already created the database ‘cnk’. So let’s remove the new stuff and try again:
The end of the initdb output mentioned it was enabling ‘trust
authentication’ for all local connections. I only want my user to be
able to log into postgres. So before starting up the database, I
/usr/local/var/postgres/pg_hba.conf to change the user from
‘all’ to ‘cnk’.
Looks like everything made it.