background image

Content tagged with: OSX

Eric's picture

When I got my new MacBook Pro, I installed Xcode which comes with subversion (version 1.6.x):

$ which svn
/usr/bin/svn

$ /usr/bin/svn --version | head -1
svn, version 1.6.2 (r37639)

After installing Xcode I checked out some repositories to my local filesystem. Soon afterward, I realized I needed to be running an older subversion client to stay compatible with some 1.5.x repositories, so I decided to install CollabNet's OSX subversion binary (registration is required for older releases).

After downloading and installing the package (which defaults to /opt/subversion/bin/svn), I edited the /etc/profile file to override priority of my $PATH variable (since I now had 2 versions of subversion installed):

# lines added to /etc/profile:
export PATH=/opt/subversion/bin:$PATH

Now, if I ran a "which" command for svn, the appropriate svn executable is returned:

$ which svn
/opt/subversion/bin/svn

Unfortunately, the subversion projects I checked out using Xcode's subversion were inaccessible due to differences in the .svn structure:

$ cd /path/to/my/1.6.x/repo

$ svn stat
svn: This client is too old to work with working copy '.'.  You need
to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change
for details.

Luckily, CollabNet has a downloadable python script which allows you to switch checked out repositories to different versions. I downloaded this file and copied it into /opt/subversion/bin.

I was now able to update/downgrade my repositories using this python script:

$ svn --version | head -1
svn, version 1.5.7 (r36142)

$ cd /path/to/my/1.6.x/repo

$ change-svn-wc-format.py . 1.5
Converted WC at '.' into format 9 for Subversion 1.5

Eric's picture

I do all of my development on a Parallels virtual machine 1) to keep my host operating system stable at all times; and 2) so I can run the same operating system as our production servers (to reduce the differences in configuration & chance of a deployment issue). I'm a fan of RPM based operating systems (vs APT) so I prefer Centos. To improve performance I do not run a GUI (KDE, Gnome, etc) and I install the bare minimum set of packages. My linux server philosophy has always been: if you don't use it or don't know what it does, don't install it; and if you don't know it does, Google it. My preferred IDE is Eclipse, so I install that on my host operating system (OSX). So how do I edit my files on my virtual machine? Samba. Here's how I setup a basic samba configuration:

Install Samba (as necessary)

sudo yum install samba

Create a backup of the original samba configuration file, just in case

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig

Here's a basic smb.conf file I use with a description for each config setting:

[global]
    # workgroup should match your network that your host operating system is on
    workgroup = MYWORKGROUP
    # server string is description of samba server
    server string = MY CENTOS VM
    # default security level
    security = user
    # performance tuning
    socket options - TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[homes]
    # share comment for user's home directories
    comment = Home Directories
    # hides shares to users without permission
    browseable = no
    # allows privileged users to modify files
    writable = yes
[Vhosts]
    # I share my entire vhosts folder
    comment = Vhosts
    # to be more secure, I only allow my primary user from my host operating system access
    valid users = eric
    # allows privileged users to modify files
    writeable = yes
    # this is the path to my Apache vhosts
    path = /var/www/vhosts
    # setting a umask will ensure permissions will be set correctly on files created across a samba share
    directory mask = 775
    create mask = 664

Create a samba user that matches your host operating system

sudo smbpasswd -a eric

Restart Samba

sudo /etc/init.d/smb restart

Now, from your host operating you can connect to your vhosts share and edit your files. From OSX, I use the "connect to server" command in the finder menu and specify the IP address of my virtual machine. The samba share will now be mounted in /Volumes/IPOFYOURVM. When I create a new project in Eclipse, I uncheck the default location and choose to create the project on my virtual machine. tah-dah

Eric's picture

Here's an (incomplete) list of the software and tools I prefer to use:

Internet Browsing
I use Firefox3 as my primary browser. Here are some of the extensions I have installed:
- Colorzilla - allows you to pick a color from a website
- Delicious Bookmarks - allows me to access, create, and search my bookmarks wherever I go
- DownloadHelper - allows you to download embedded flash. movies, objects, etc
- Firebug - the BEST tool for web development. GET IT NOW
- FireFTP - a FTP client that fits nicely into a tab in FireFox
- MeasureIt - allows you to measure distances on a website
- Web Developer - another essential tool for web development
- YSlow - a Yahoo! plugin used to evaluate and analyze page load times
I also use the following browsers for testing web apps: Safari, Flock, Camino, Opera, & ies4osx. IES4OSX allows you to install Internet Explorer on a MAC using Wine for OSX, sweet!

Development
I run OSX as my primary operating system. An operating system is useless to me if it doesn't have a fully functional shell. I use Parallels to install a Centos virtual machine (with no GUI). Centos is used to run LAMP and any other development and application services. I then connect to my linux filesystem using Samba and SSH. I use Eclipse as my primary IDE (with the PDT plugin for PHP). For database management I use Navicat and MySQL Tools. For a Subversion client I use Versions.

Other
- Quicksilver - file/application indexing to increase productivity
- Adobe Photoshop CS3 - image creation and manipulation
- Aquamacs Emacs - text editor
- FFMPEGX - video conversion
- Fugu - secure file copy
- Google Notifier - email and calendar event reminders
- IPSecuritas - VPN Connections
- Skype - Office chats, video conferencing, IMs
- iChat - IMs & video chats
- iTunes - I listen to music all day long off my iPod
- NeoOffice - OpenOffice for OSX (FREE equivalent of M$ Office)