<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linsec.ca blog</title>
	<atom:link href="http://linsec.ca/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://linsec.ca/blog</link>
	<description>You can have it right, or you can have it now.  But you can&#039;t have it right now.</description>
	<lastBuildDate>Sat, 27 Apr 2013 23:22:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Converting subversion to git redux</title>
		<link>http://linsec.ca/blog/2013/04/27/converting-subversion-to-git-redux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=converting-subversion-to-git-redux</link>
		<comments>http://linsec.ca/blog/2013/04/27/converting-subversion-to-git-redux/#comments</comments>
		<pubDate>Sat, 27 Apr 2013 23:22:04 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1148</guid>
		<description><![CDATA[I know I&#8217;ve written about this in the past (here and here), but I needed to do another conversion the other day that was similar, yet different. Previous posts talked about pulling parts of a subversion repository into a git repo &#8212; effectively taking one svn repo apart into multiple git repos. This time I(...)]]></description>
				<content:encoded><![CDATA[<p>I know I&#8217;ve written about this in the past (<a href="http://linsec.ca/blog/2011/10/29/figuring-this-git-thing-out/">here</a> and <a href="http://linsec.ca/blog/2011/10/29/dissecting-part-of-a-subversion-repo-to-git/">here</a>), but I needed to do another conversion the other day that was similar, yet different.  Previous posts talked about pulling parts of a subversion repository into a git repo &#8212; effectively taking one svn repo apart into multiple git repos.  This time I just needed to do a straight conversion, however I needed to exclude one single directory from ever being a part of the history of the repo.</p>
<p>Since this was a fairly important repo to convert, I did a few trial runs first and ended up scripting it since there isn&#8217;t just a single command to do what I needed.  Essentially, we are doing a git clone from a subversion repository (a standard one with trunk/, tags/, branches/ this time), but excluding one directory (we&#8217;ll call it private).  I also wanted to convert the svn branches to tags since that&#8217;s effectively what they were.  Also, since the git repository was not local, and for the sake of expediency I didn&#8217;t want to tar something up and email it, we&#8217;re taking our converted-and-cleaned-up new git repo, changing the upstream, and then pushing the whole thing to a remote bare repository.</p>
<p>Ready?  (Note: a few lines are manually wrapped with &#8216;\&#8217; below)</p>
<p><code><br />
#!/bin/sh<br />
WORKDIR="/srv/svn2git/git"<br />
REMOTE="git+ssh://remote.git.host/myrepo.git"<br />
mkdir -p ${WORKDIR}</p>
<p>pushd ${WORKDIR}<br />
git svn clone https://remote.svn.host/repos/myrepo --no-metadata \<br />
  -A /srv/svn2git/authors-transform.txt --stdlayout \<br />
  --ignore-paths="^trunk/private" ${WORKDIR}/from-svn<br />
cd from-svn<br />
git init --bare ../bare.git<br />
cd ../bare.git<br />
git symbolic-ref HEAD refs/heads/trunk<br />
cd ../from-svn<br />
git remote add bare ../bare.git<br />
git config remote.bare.push 'refs/remotes/*:refs/heads/*'<br />
git push bare<br />
cd ../bare.git<br />
git branch -m trunk master<br />
for x in branch_one branch_two branch_three; do<br />
    git tag "${x}" refs/heads/${x}<br />
    git branch -D ${x}<br />
done</p>
<p>cd ..<br />
git clone bare.git myrepo<br />
cd myrepo<br />
git remote rm origin<br />
git remote add origin ${REMOTE}<br />
git config remote.origin.push 'refs/remotes/*:refs/heads/*'<br />
git config master.remote origin<br />
git config master.merge refs/head/master<br />
git push --set-upstream origin master<br />
</code></p>
<p>And that is all there was too it.  The svn authors file was created ny using:</p>
<p><code><br />
$ svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); \<br />
print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt<br />
</code></p>
<p>in the existing copy of the subversion repository that I had (and then mangling it to suit my needs, particularly changing it to add the committers&#8217; real names and email addresses as well).</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/04/27/converting-subversion-to-git-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bye bye Google Reader</title>
		<link>http://linsec.ca/blog/2013/03/13/bye-bye-google-reader/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bye-bye-google-reader</link>
		<comments>http://linsec.ca/blog/2013/03/13/bye-bye-google-reader/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 02:26:17 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rss reader]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1143</guid>
		<description><![CDATA[This really makes me sad: http://googlereader.blogspot.com.au/2013/03/powering-down-google-reader.html. Does anyone know of a similar service? I&#8217;ve gotten so used to using Google Reader (not the web interface, but the actual syncing and being able to connect to the account with all my various RSS readers whether I&#8217;m on my phone or the desktop or the laptop and(...)]]></description>
				<content:encoded><![CDATA[<p>This really makes me sad: <a href="http://googlereader.blogspot.com.au/2013/03/powering-down-google-reader.html">http://googlereader.blogspot.com.au/2013/03/powering-down-google-reader.html</a>.</p>
<p>Does anyone know of a similar service?  I&#8217;ve gotten so used to using Google Reader (not the web interface, but the actual syncing and being able to connect to the account with all my various RSS readers whether I&#8217;m on my phone or the desktop or the laptop and be able to just pick up where I left off).</p>
<p>I get that Google needs to sunset things that don&#8217;t make sense, but it would be nice if they could maybe let the code go so others can setup their own implementations that&#8217;s basically compatible with all the Google Reader-friendly RSS readers out there.</p>
<p>Or they could just get rid of Orkut&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/03/13/bye-bye-google-reader/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>More work on the right sleeve</title>
		<link>http://linsec.ca/blog/2013/02/08/more-work-on-the-right-sleeve/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-work-on-the-right-sleeve</link>
		<comments>http://linsec.ca/blog/2013/02/08/more-work-on-the-right-sleeve/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 17:42:30 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[tattoo]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1135</guid>
		<description><![CDATA[Spent a few hours last night laying some of the groundwork for getting more of the second sleeve done. This is was re-lining and darkening of my existing cross, and I think the flames look pretty darn sweet. This is re-lining and darkening of my tribal Jesus, and fixing the J (the ticks it used(...)]]></description>
				<content:encoded><![CDATA[<p>Spent a few hours last night laying some of the groundwork for getting more of the second sleeve done.</p>
<p>This is was re-lining and darkening of my existing cross, and I think the flames look pretty darn sweet.</p>
<p><a href="http://www.flickr.com/photos/wulfheart/8455501893/" title="Flaming cross by Wulfheart, on Flickr"><img src="http://farm9.staticflickr.com/8251/8455501893_63b37359db.jpg" width="375" height="500" alt="Flaming cross"></a></p>
<p>This is re-lining and darkening of my tribal Jesus, and fixing the J (the ticks it used to have were too thick, making it look odd):</p>
<p><a href="http://www.flickr.com/photos/wulfheart/8455511809/" title="Re-lined tribal Jesus by Wulfheart, on Flickr"><img src="http://farm9.staticflickr.com/8231/8455511809_aee5a0571f.jpg" width="268" height="500" alt="Re-lined tribal Jesus"></a></p>
<p>And as I looked at my Flickr album, I realized I never took any pics of the work done last year.  =(  Since I can&#8217;t take those pics on my own, I&#8217;ll have to get Ang to take some tonight.</p>
<p>The next step will be finishing filling in the forearm, and then need to get the concept for the top done, which will include re-working the flaming skull I got 19 years ago.  Looking forward to getting the sleeve finished this year!</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/02/08/more-work-on-the-right-sleeve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m FedUp with Fedora!</title>
		<link>http://linsec.ca/blog/2013/02/03/im-fedup-with-fedora/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=im-fedup-with-fedora</link>
		<comments>http://linsec.ca/blog/2013/02/03/im-fedup-with-fedora/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 07:19:50 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fedup]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1126</guid>
		<description><![CDATA[Sorry, couldn&#8217;t resist. =) So normally I do my updates from one version of Fedora to the next using yum, in particular the Upgrading Fedora using yum guide. Usually it works pretty good. I didn&#8217;t really have much good experience with PreUpgrade the few times I tried it, so I wanted to give FedUp a(...)]]></description>
				<content:encoded><![CDATA[<p>Sorry, couldn&#8217;t resist.  =)</p>
<p>So normally I do my updates from one version of Fedora to the next using yum, in particular the <a href="https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum">Upgrading Fedora using yum</a> guide.  Usually it works pretty good.  I didn&#8217;t really have much good experience with PreUpgrade the few times I tried it, so I wanted to give <a href="https://fedoraproject.org/wiki/FedUp">FedUp</a> a try.</p>
<p>In my Parallels Fedora 17 VM it worked amazingly well.  So decided to try it on my laptop, which is also running Fedora 17.  I think it makes sense to do a little bit of house-keeping before running it though, and the FedUp page doesn&#8217;t mention any of this (perhaps it&#8217;s no longer needed?).  Anyways, a few steps:</p>
<p>* <code>yum install rpmconf; rpmconf -a</code> (review any .rpmnew/.rpmsave files, merge changes as required)<br />
* <code>find /etc /var -name '*?.rpm?*'</code> (find any other old .rpmnew/.rpmsave files)<br />
* <code>yum install yum-utils; package-cleanup --leaves</code> (review and remove any unused packages, not all will be removable)<br />
* <code>package-cleanup --orphans</code> (find and remove any orphan packages no longer in the repositories)</p>
<p>Now you can run FedUp:</p>
<p>* <code>yum install fedup</code><br />
* <code>fedup-cli --network 18 --debuglog /root/fedupdebug.log</code></p>
<p>If this completes without error (check the log), you can reboot.  At grub you&#8217;ll see a &#8220;System Upgrade&#8221; entry.  When that&#8217;s done, it&#8217;ll reboot into Fedora 18.</p>
<p>The wiki page talks about upgrading GRUB2 since you&#8217;ll be booting from Fedora 17&#8242;s GRUB2.  If you&#8217;ve got a BIOS-based system, you can use the <a href="https://fedoraproject.org/wiki/GRUB_2#Updating_GRUB_2_configuration_on_BIOS_systems">Updating GRUB2 configuration on BIOS systems</a> instructions.  For those using UEFI, instructions are on the same page.</p>
<p>You may also want to run <code>package-cleanup --orphans</code> after you do the upgrade as well, just to get rid of any other leftovers.  The only issue I discovered so far with the upgrade is that Google Chrome didn&#8217;t work out-of-the-box.  However, doing a <code>yum remove google-chrome-stable; yum install google-chrome</code> got that sorted out (although it did install the unstable version; the stable version had issues with missing libraries and wouldn&#8217;t load).</p>
<p>All in all, upgrading from Fedora 17 to 18 went a heck of a lot smoother than a fresh install did.  I also got to see what the new GDM/GNOME looks like (quite nice, actually, although I think I&#8217;ll give MATE a try on the laptop as well because, while GNOME3 is pretty, I definitely preferred GNOME2).</p>
<p>Good job, Fedora-folks!  Now I just have to upgrade my main workstation, but I think I&#8217;m going to play on the laptop for a bit before taking that step.  Just in case I find any other gotchya&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/02/03/im-fedup-with-fedora/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Systemd article on wiki</title>
		<link>http://linsec.ca/blog/2013/02/02/systemd-article-on-wiki/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=systemd-article-on-wiki</link>
		<comments>http://linsec.ca/blog/2013/02/02/systemd-article-on-wiki/#comments</comments>
		<pubDate>Sat, 02 Feb 2013 17:05:35 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[systemd]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1124</guid>
		<description><![CDATA[In light of my recent (mis-)adventures with Fedora 18 installation in VMware Fusion and the need to figure out some systemd stuff, I&#8217;ve started writing a hints/tip sheet type entry on my wiki: Systemd. Far from complete yet, but I&#8217;m going to use it to document some hints, tricks, light-bulb-moments, and comparisons to SysV-init tools(...)]]></description>
				<content:encoded><![CDATA[<p>In light of my recent (mis-)adventures with Fedora 18 installation in VMware Fusion and the need to figure out some systemd stuff, I&#8217;ve started writing a hints/tip sheet type entry on my wiki: <a href="http://linsec.ca/Systemd">Systemd</a>.  Far from complete yet, but I&#8217;m going to use it to document some hints, tricks, light-bulb-moments, and comparisons to SysV-init tools (chkconfig, service).  I&#8217;m no stranger to alternative boot/service management systems but it indeed makes me chuckle when people were complaining about Annvix using runit to manage the init system.  I definitely appreciate the work gone into Systemd (having done a similar thing myself for Annvix although obviously not anywhere near the scale/scope of Systemd!), so do want to learn it as opposed to using old scripts as a crutch-interface to the new stuff.  So as I likely stumble across various bits of useful info, I&#8217;ll be adding it to that wiki article if anyone else is interested in checking it out (or perhaps giving me tips&#8230; like how the heck do I actually get gettys to run in graphical.target!!  I want a working CTRL-ALT-F2/F3 to login at the console please!!).</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/02/02/systemd-article-on-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading and Installing Fedora 18 in VMware Fusion</title>
		<link>http://linsec.ca/blog/2013/02/02/upgrading-and-installing-fedora-18-in-vmware-fusion/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=upgrading-and-installing-fedora-18-in-vmware-fusion</link>
		<comments>http://linsec.ca/blog/2013/02/02/upgrading-and-installing-fedora-18-in-vmware-fusion/#comments</comments>
		<pubDate>Sat, 02 Feb 2013 17:00:33 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[3D Graphics]]></category>
		<category><![CDATA[Anaconda]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[FreeIPA]]></category>
		<category><![CDATA[IPA]]></category>
		<category><![CDATA[SSSD]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1111</guid>
		<description><![CDATA[I was thoroughly excited about Fedora 18 until I actually went to install it. I use Fedora 17 on a laptop and a desktop, but I also have copies in virtual machines that I use for testing &#8212; these virtual machines run in VMware Fusion on my Mac Pro. So never having used Fedora 18(...)]]></description>
				<content:encoded><![CDATA[<p>I was thoroughly excited about Fedora 18 until I actually went to install it.  I use Fedora 17 on a laptop and a desktop, but I also have copies in virtual machines that I use for testing &#8212; these virtual machines run in VMware Fusion on my Mac Pro.  So never having used Fedora 18 during any of the betas or anything, first thing I did was try to install it in VMware.</p>
<p>A few times.</p>
<p>First I have to say that I&#8217;m not a big fan of the new Anaconda UI.  One of the things I appreciated about Anaconda in the past is that it was easy to use, but didn&#8217;t prevent me from doing &#8220;power things&#8221;, like partitioning disks the way I wanted to partition them.  This seems to no longer be the case, and Anaconda does a lot of hand-holding.  It has been a habit to go through the list of packages to be installed (select a group, then go through and weed out the stuff I don&#8217;t want), so things I don&#8217;t want don&#8217;t even touch the disk.  Doesn&#8217;t seem like I can do this anymore either.  I don&#8217;t agree with some reviewers who seem to think the UI change is to make it look/feel more mobile or &#8220;touchscreen-like&#8221;, but I do feel it&#8217;s dumbed down quite a bit which makes me unhappy.  I lived with it, until trying to change the partition layout killed Anaconda.  Twice.  After that I decided to let it do what it wanted since it was just a VM and I didn&#8217;t care enough to fight it.</p>
<p>So Fedora gets installed and lo!  A nice blue screen where I can do absolutely <i>nothing</i>.  No icons, no text, no login box, nothing.  Afterwards I read this has to do with having 3D graphics enabled in VMware (but at that point I had already reinstalled to use LXDE rather than GNOME, so I&#8217;ve not tried anything regarding that, however I did find <a href="http://www.greebo.net/2013/01/18/installing-fedora-18-rtm-to-vmware-fusion-5-or-vmware-workstation-9/">this blog posting about Fedora 18 in VMware Fusion 5/VMware Workstation 9</a> which explains things a bit).</p>
<p>On my home network I run IPA on Red Hat Enterprise Linux 6 to handle my Kerberos/LDAP auth duties.  This means when I install an operating system, no matter what it is, I don&#8217;t create local users.  So when I installed Fedora 18, I only have the root user and the rest come from IPA.  A few problems with that:</p>
<ul>
<li> Setting up IPA in Anaconda does not work
<li> Post-install, logging in as root at the GUI is not permitted
<li> I have a grub error on tty2, not a login (and nothing on tty3 for that matter)
<li> I have to reboot and edit grub to add <b>systemd.unit=multi-user.target</b> to boot into the console to get a tty (see <a href="http://fedoraproject.org/wiki/Systemd#Boot_Kernel_Command_Line">Systemd: Boot Kernel Command Line</a>)
<li> After I install freeipa-client, I can enroll in the domain
<li> SSSD is not enabled when you install it!  Once again I have to reboot to the console
<li> Enable SSSD and reboot, only to find that once again I cannot login as a user in the GUI (that I could login as on the console)
<li> Head-scratching moment when I realize I know next to nothing about systemd and can only conclude that perhaps NetworkManager starts upon login in the graphical boot and not at system start, which prevents SSSD from talking to IPA to confirm my login
<li> Looking at <i>/etc/sysconfig/network-scripts/ifup-eth0</i> tells me that perhaps that is not the case
<li> Big WTF moment and go to bed
</ul>
<p>Currently I am unhappy with Fedora 18.  I suppose that on bare metal it probably works better.  I also suppose that with a real user account it works better.  At this point I don&#8217;t want to do yet another reinstall because then I have to remove the host from IPA and re-enroll, which is annoying (and I really don&#8217;t want to revisit Anaconda either &#8212; I&#8217;ll get to do that when I create the 64bit Fedora 18 VM later).</p>
<p>Ok, after a few days I tried a few other things.  The first was getting rid of NetworkManager thinking that perhaps it would only start when I login (which I can&#8217;t, if there is no network, because my login is IPA-based).  So I had to do:</p>
<pre>
# systemctl disable NetworkManager.service
# systemctl enable network.service
</pre>
<p>The most annoying thing, however, is that when I boot into graphical mode, I get no gettys.  I&#8217;m pretty sure I told systemd that I want three of them (I have three symlinks in /etc/systemd/system/getty.target.wants: getty@tty1.service through getty@tty3.service; sadly when I boot into graphical mode and switch to TTY2, I get a grub error message and nothing on TTY3&#8230; what the heck?)</p>
<p>Another thing I did was disable SELinux.  In multi-user.target, I can login as my IPA-user no problem.  With LXDM, however, I never could (assuming, perhaps incorrectly, that network initialization was delayed).  But upon further inspection I see a lot of:</p>
<pre>
lxdm-binary: pam_selinux(lxdm:session): Setting key creation contect guest_u:guest_r:oddjob_mkhomedir_t:s0 failed: Permission denied
</pre>
<p>I have zero interest and zero time in making SELinux work with LXDM and since this is a virtual machine, I don&#8217;t care if SELinux is disabled.</p>
<p>Lo and behold, I can now log into LXDM.  In light of the SELinux thing, I&#8217;m thinking that NetworkManager is not to blame (silly me, I made two changes then rebooted &#8212; it could be either one, but I strongly suspect SELinux).  Maybe it would have worked better with GNOME (will try that on the next VM I install).</p>
<p>On another side note, since I use VMWare Fusion for the VM, for the tools install (probably the same for the latest VMware Workstation as well, etc.), you may want to check out <a href="http://communities.vmware.com/message/2178685">this thread</a>.  In particular, seems like linux/version.h is missing and makes the tools angry.  The fix is easy though:</p>
<pre>
# cd /usr/src/kernels/[current_version]/include
# cp generated/uapi/linux/version.h linux/
</pre>
<p>Then you can compile the tools.  IIRC, you&#8217;ll also <i>not</i> want to use the i686 PAE kernel (doesn&#8217;t seem to work on older versions, I suspect the same may be true with F18).  Easy enough to yum remove the PAE kernels and install the regular kernel.  YMMV.</p>
<p>Finally, the next day I installed Fedora 18 64-bit in VMWare Fusion.  With the lessons learned above, it was a lot less painful.  I still am not a big fan of Anaconda&#8230; I like the look of it, but the practical &#8220;working&#8221; bits of it definitely need some work.  I don&#8217;t like that you can pick only one group of packages.  What if I want both GNOME desktop and a working web server?  Doesn&#8217;t seem like it can be done.  I also like picking through individual packages and sorely miss that &#8212; makes for having to install a bunch of stuff later.  Also not sure why vim isn&#8217;t installed by default&#8230; I think this is the first time ever I&#8217;ve seen &#8220;vim: command not found&#8221;.</p>
<p>Also, despite getting the VMware tools installed, if you want GDM to present you with anything, you need to disable 3D graphics.  I have it enabled on my 32-bit VM (which is using LXDM, works fine), but on the 64-bit VM (using GDM), even with vmware-tools compiled and running, I needed to disable 3D graphic acceleration.  I suppose there is a bug in the driver and/or X there.  Not a big deal to disable since I&#8217;ve done &#8220;yum groupinstall &#8216;MATE Desktop&#8217;&#8221; (what need do I have for 3D graphics?  BTW, MATE is <i>sweet</i>!) and now GDM loads.</p>
<p>IPA still would not work to configure from Anaconda.  Definitely a bug to be filed there.</p>
<p>Anyways, time to end this.  This entry has been in the works for about two weeks (sadly, I&#8217;ve not had time to finish it or get my Fedora VM&#8217;s running until yesterday, and finished up the 64-bit install this morning).  So far the install of Fedora 18, in VMware, has been a bit of a PITA.  Next order of business is to see how the upgrade works&#8230; I&#8217;ve got a Fedora 17 install in Parallels to upgrade to make sure all my work-related bits work, before attempting to upgrade on bare metal.  I&#8217;m quite certain that a lot of this can be attributed to the virtual machines and it&#8217;ll work better on bare metal.  I&#8217;m also happy that those won&#8217;t be fresh installs, so I don&#8217;t have to deal with Anaconda.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/02/02/upgrading-and-installing-fedora-18-in-vmware-fusion/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Converting a VMware Fusion virtual machine to KVM</title>
		<link>http://linsec.ca/blog/2013/01/27/converting-a-vmware-fusion-virtual-machine-to-kvm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=converting-a-vmware-fusion-virtual-machine-to-kvm</link>
		<comments>http://linsec.ca/blog/2013/01/27/converting-a-vmware-fusion-virtual-machine-to-kvm/#comments</comments>
		<pubDate>Sun, 27 Jan 2013 22:11:47 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1114</guid>
		<description><![CDATA[I&#8217;ve been running an instance of my Nagios XI monitor in a VMware Fusion virtual machine on my (aging) Mac Pro. The other day I found a blog post on How I converted a VMware VM to KVM and since my new LAN server is a beefy 8-core AMD FX-8120 with 32GB RAM (as opposed(...)]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been running an instance of my Nagios XI monitor in a VMware Fusion virtual machine on my (aging) Mac Pro.  The other day I found a blog post on <a href="http://www.held.org.il/blog/2012/04/how-i-converted-vmware-vm-to-kvm/">How I converted a VMware VM to KVM</a> and since my new LAN server is a beefy 8-core AMD FX-8120 with 32GB RAM (as opposed to the 2 x 2.66GHz dual-core Xeon with 16GB RAM that is my 5(?) year old Mac Pro), I decided to try moving the VMware Fusion VM to running on my Linux server (Red Hat Enterprise Linux 6 with KVM).</p>
<p>Not to be redundant on the steps noted in the other blog post, but to be a bit more explicit, we&#8217;ll just go through the steps as I did notice a few errors (I&#8217;m assuming that blog post was written on some version of Ubuntu; I&#8217;m of course using a Red Hat Enterprise Linux 6 host).</p>
<p>The blog notes to run the <i>qemu-img convert</i> command on the non-wildcard vmdk file; however, I found that I needed to convert the multi-file image into a single disk image first, before it could be converted.  This may be the case for VMware Workstation disk images as well, however keep in mind we&#8217;re using VMware Fusion 5 on OS X, so the tool we want is inside the VMware Fusion application bundle (specifically, we want the <i>vmware-vdiskmanager</i> program).</p>
<p>Before converting, however, I strongly recommend removing any existing snapshots of the virtual machine.  The first time I did this, I got the original snapshot which had the guest running CentOS 5.6 (and I updated it to 5.9 this morning before starting this).  So before converting anything, you probably need to remove any existing snapshots first.  Then, on the mac, convert this multi-file image into a single image:</p>
<pre>
$ cd /Applications/VMware\ Fusion.app/Contents/Library
$ ./vmware-vdiskmanager -r ~/Documents/nagiosxi.vmwarevm/nagiosxi.vmdk \
    -t 0 ~/Desktop/nagiosxi.vmdk

</pre>
<p>This also gets rid of all of the extra VMware stuff like snapshots, etc.  Copy this new vmdk file, as well as the vmx file in the container, to the Linux box.</p>
<p>Next, convert the new image file to QCOW2 format (the original blog post didn&#8217;t specify the output format; qemu-img defaults to a raw file which we don&#8217;t want, we want QCOW2).</p>
<pre>
#  qemu-img convert nagiosxi.vmdk -O qcow2 /srv/virt/images/nagiosxi.img
# ls /srv/virt/images/nagiosxi.img -l
-rw-r--r--. 1 root root 10737418240 Jan 27 08:33 /srv/virt/images/nagiosxi.img

</pre>
<p>Seems more reasonable.  But we need to change permissions so that libvirt can read it:</p>
<pre>
# chown qemu:qemu /srv/virt/images/nagiosxi.img
# chmod 600 /srv/virt/images/nagiosxi.img

</pre>
<p>The next step is to use the <i>vmware2libvirt</i> script to convert the vmx file to an XML file for libvirt.  Unfortunately, this only seems to ship with Ubuntu.  Fortunately, we can grab the script from <a href="http://bazaar.launchpad.net/~ubuntu-virt/virt-goodies/trunk/view/head:/vmware2libvirt">here</a>.  It&#8217;s just a python script with no dependencies, so run:</p>
<pre>
# python vmware2libvirt -f nagiosxi.vmwarevm/nagiosxi.vmx >~/nagiosxi.xml

</pre>
<p>Then we use virsh to import it.  Unfortunately, in this step, virsh is looking for <i>/usr/bin/kvm</i> and the binary is actually installed as <i>/usr/libexec/qemu-kvm</i>, so we need to make a symlink first:</p>
<pre>
#  ln -s /usr/libexec/qemu-kvm /usr/bin/kvm
# virsh -c qemu:///system define ~/nagiosxi.xml

</pre>
<p>This will import the <i>nagiosxi.xml</i> file to <i>/etc/libvirt/qemu/nagiosxi.xml</i>.</p>
<p>The original blog post talked about using the virt-manager GUI to finalize things, and since I&#8217;m lazy and don&#8217;t know libvirt well enough to do all this on the commandline, we&#8217;ll do the same thing.  Since that machine runs headless without a GUI, I need to ssh in as root with X forwarding and run virt-manager.</p>
<p>In the GUI, I can see my nagiosxi VM defined, so I select it and edit the virtual machine details.  I need to remove the existing IDE Disk 1 (which points to the vmdk file) and add my converted image file.  Essentially:</p>
<ul>
<li> &#8220;Add Hardware&#8221; -> &#8220;Storage&#8221; -> &#8220;Managed or other existing storage&#8221; -> Pick your new file
<li> Select &#8220;Storage Format&#8221; -> Pick qcow2
<li> Click &#8220;Finish&#8221;
</ul>
<p>You will also want to add a few more bits of hardware:</p>
<ul>
<li> <b>Serial</b>: Device type: pty
<li> <b>Network</b>: Host device: br0, Device model: virtio
</ul>
<p>In my case, there was no network device, and the serial console is useful for using commands like &#8220;virsh console&#8221; (but you have to setup the serial getty inside the VM for this to work).</p>
<p>Now you should be able to startup the new virtual machine.  Once you have gotten it up and running, you&#8217;ll want to remove the vmware-tools that were installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2013/01/27/converting-a-vmware-fusion-virtual-machine-to-kvm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replaced my Kerberos+LDAP setup with FreeIPA</title>
		<link>http://linsec.ca/blog/2012/12/12/replaced-my-kerberosldap-setup-with-freeipa/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=replaced-my-kerberosldap-setup-with-freeipa</link>
		<comments>http://linsec.ca/blog/2012/12/12/replaced-my-kerberosldap-setup-with-freeipa/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 03:52:16 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[FreeIPA]]></category>
		<category><![CDATA[IPA]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[ldap]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1104</guid>
		<description><![CDATA[So I&#8217;ve been having to deal with some IPA-related bugs in the past little bit, which of course got me thinking that I had no idea what IPA did or how to use it (thankfully I wasn&#8217;t responsible for fixing the bugs!). But as I had to deal with this issues to some degree, I(...)]]></description>
				<content:encoded><![CDATA[<p>So I&#8217;ve been having to deal with some IPA-related bugs in the past little bit, which of course got me thinking that I had no idea what IPA did or how to use it (thankfully I wasn&#8217;t responsible for fixing the bugs!).  But as I had to deal with this issues to some degree, I got to figure out what FreeIPA was and what it did.  In short, FreeIPA <b>rocks</b>.  As many of you know, I&#8217;ve written quite a few articles and blog posts about using Kerberos or OpenLDAP for authentication.  It&#8217;s no secret that I make heavy use of Linux at home, but also of the Mac, so for me any solution needs to deal with both in a semi-reasonable way.  I could do Kerberos auth on OS X easily enough, but never did have luck with LDAP.  On Linux, it&#8217;s a piece of cake.</p>
<p>I&#8217;ve been using Kerberos and LDAP at home for years, largely because I have to do a lot of testing of things in virtual machines, so when a new version of something comes out (new Fedora, new major version of RHEL, etc.), I spin up a new VM and install it.  Using Kerberos and LDAP make the setup a breeze, and if I change my password, I&#8217;m not changing it on 20-odd systems/virtual machines.</p>
<p>I&#8217;m happy to say that FreeIPA exceeded my expectations, despite a bit of a rocky start (due to my not reading enough of the docs, annoyingly enough).  I&#8217;ve now got it in place, it&#8217;s doing Kerberos+LDAP on the Linux clients and <b>also</b> on the Macs!  I have, for the first time ever (not counting OS X server 10.4 or something, and using OpenDirectory), gotten to login to an OS X system with network credentials.  I&#8217;ve also made use of the DogTag CA and had my internal mediawiki instance (which used mod_auth_kerb for SSO authentication) also use HTTPS now with mod_nss and my shiny new IPA CA.</p>
<p>There&#8217;s a bunch more about FreeIPA than what I&#8217;ve done so far.  I&#8217;ve just scratched the surface (and even that, not entirely as I&#8217;ve still got a dozen or so systems/vms to switch from the old Kerberos+LDAP setup to using FreeIPA), but I&#8217;m looking forward to playing with the other things like a hopefully much easier kerberized NFSv4, storing sudo configs in the directory, auto-mounted home directories (don&#8217;t care too much about that for the workstations but that will be <i>sweet</i> for the virtual machines), and so on.  FreeIPA has a really really nice package that takes care of all this stuff and I&#8217;m kinda kicking myself that I didn&#8217;t play with it sooner.</p>
<p>And, because of my really odd love for this sort of thing, I&#8217;ve written an article on my wiki: <a href="http://linsec.ca/Using_FreeIPA_for_User_Authentication">Using FreeIPA for User Authentication</a> which goes into the whole setup and enrolment.  A lot of it is covered in the upstream docs, but the upstream docs only got to OS X 10.4, so my 10.7/10.8 setup required a bit more futzing and research.  While I&#8217;m &#8220;officially&#8221; calling this article done, as I spend time over the Christmas holidays playing around with it, I will no doubt be adding more info as I discover it.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/12/12/replaced-my-kerberosldap-setup-with-freeipa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git commit hook to bugzilla using git-notifier</title>
		<link>http://linsec.ca/blog/2012/09/21/git-commit-hook-to-bugzilla-using-git-notifier/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=git-commit-hook-to-bugzilla-using-git-notifier</link>
		<comments>http://linsec.ca/blog/2012/09/21/git-commit-hook-to-bugzilla-using-git-notifier/#comments</comments>
		<pubDate>Sat, 22 Sep 2012 00:49:15 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-notifier]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1096</guid>
		<description><![CDATA[I&#8217;m a big fan of the git-notifier script, which acts as a hook in git to send you nice emails about things that have changed in your git repos. I&#8217;m also a bugzilla user, so I wanted to be able to put git commit notifications, automatically, in bugzilla if &#8220;bug #X&#8221; is in the commit(...)]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m a big fan of the <a href="http://www.icir.org/robin/git-notifier/">git-notifier</a> script, which acts as a hook in git to send you nice emails about things that have changed in your git repos.  I&#8217;m also a bugzilla user, so I wanted to be able to put git commit notifications, automatically, in bugzilla if &#8220;bug #X&#8221; is in the commit log.  Initially I was intending to use <a href="http://www.theoldmonk.net/gitzilla/">gitzilla</a> for this, but I didn&#8217;t feel like attempting to make it work with the latest release of <a href="https://github.com/williamh/pybugz">pybugz</a> (says it is tested with version 0.8.0 but the current version is 0.10.1.  In retrospect, that might have actually been easier.  =)</p>
<p>Anyways, I decided to use git-notifier to send an email to bugzilla (while gitzilla uses XMLRPC, which would have been preferable, I also have incoming email support enabled in bugzilla).  It took some trial and error, but I got it working (although I suspect there are easier ways to do it).</p>
<p>The first thing I had to do was patch git-notifier to accept a bug id, because bugzilla needs to know what bug to route the incoming email to.  This was very easy to do (I&#8217;ll be sending this upstream to see if they want to include it, but I may also change it to pull more info from the git config so that the post-receive hook doesn&#8217;t have to be so obscene:</p>
<pre>
--- git-notifier.orig	2012-09-21 10:04:21.283442085 -0600
+++ git-notifier	2012-09-21 10:25:04.811307023 -0600
@@ -37,6 +37,7 @@
     ("link", True, None, "Link to insert into mail, %s will be replaced with revision"),
     ("updateonly", False, False, "update state file only, no mails"),
     ("users", True, None, "location of a user-to-email mapping file"),
+    ("bug_id", True, False, "bug ID (for sending email to bugzilla)"),
     ]
 
 class State:
@@ -250,6 +251,11 @@
 
     repo = Config.repouri
 
+    if Config.bug_id:
+        bzid = "@bug_id = %s\n\n" % Config.bug_id
+    else:
+        bzid = ""
+
     if not repo:
 
         if gitolite:
@@ -269,10 +275,10 @@
 X-Git-Repository: %s
 X-Mailer: %s %s
 
-%s
+%s%s
 
 """ % (Config.sender, Config.mailinglist, Config.emailprefix, subject, repo,
-       Name, Version, mailTag("Repository", repo)),
+       Name, Version, bzid, mailTag("Repository", repo)),
 
     return (out, fname)
</pre>
<p>This works, and works well, but the post-receive hook is messy.  What used to just be:</p>
<pre>
#!/bin/sh
/srv/git/hooks/git-notifier $@ --link="http://[url];a=commitdiff;h=%s" \
  --emailprefix="[git: [repo]]"
</pre>
<p>Has now turned into this monstrosity:</p>
<pre>
#!/bin/sh
while read oldrev newrev refname
do
    commit=$(git rev-parse $newrev)
done

bzemail="bugzilla-daemon@bugzilla.me.com"

/srv/git/hooks/git-notifier $@ --link="http://[url];a=commitdiff;h=%s" \
  --emailprefix="[git: [repo]]"

for BUG in $(git log ${commit} -n 1 | sed 's/bug #/bug#/g' | \
  egrep -i -o 'bug#[0-9]*'); do
    BUGID=$(echo "${BUG}" | sed 's/bug#//i')
    EMAIL=$(git log ${commit} -n 1 --pretty=format:"%ae")
    test=$(echo "$BUGID" | sed 's/[0-9]*//g')
    if [ "${test}x" = "x" ]; then
    # make sure it is a digit
        /srv/git/hooks/git-notifier $@ --link="http://[url];a=commitdiff;h=%s" \
  --emailprefix="[git: [repo]]" --bug_id=${BUGID} --mailinglist=${bzemail} \
  --sender=${EMAIL} --manual=${commit}
    fi
done
</pre>
<p>(lines wrapped for readability)</p>
<p>So while it&#8217;s fugly, there&#8217;s quite a bit of magic to it.  Seems that when you call git-notifier again, it won&#8217;t send an email because it knows it&#8217;s already been sent, which is why we need the commit hash, and feed it to it with the &#8211;manual option.  The &#8211;mailinglist option is used to point to bugzilla (again, the git-notifier config is pointing to another email address to receive the commits already, so we need to override it).  The &#8211;sender option takes the committer&#8217;s email address as the value (the $EMAIL variable), which also overrides the default git-notifier sender (which is the local user on the system unless you&#8217;re using gitolite (which I&#8217;m not)).  The &#8211;bug_id is a digit to reference the bug in the commit (this should also send multiple mails if more than one bug is referenced in the commit, but I&#8217;ve not tested that yet).  The end result is you get a copy of the git commit directly into bugzilla, in the same format that you would get it via email.</p>
<p>I may spend some time later on trying to make gitzilla play nicely with the newer version of pybugz, but for now this scratches my itch.  Like I said, not the prettiest solution, but it works as a quick-n-dirty hack.  The inspiration for using email to send this to bugzilla was from Gentoo&#8217;s <a href="http://en.gentoo-wiki.com/wiki/Bugzilla_Email#Subversion_Integration">Bugzilla Email</a> wiki entry (the subversion integration part in particular).</p>
<p>Note that since the email is being sent as the committer, the committer needs to have an account with that email address in your bugzilla.  If not, bugzilla&#8217;s email_in.pl will bounce it back.  So you may want to have a bugzilla &#8220;commits&#8221; account as a dummy account from which you can email these things if not all of your committers have bugzilla access or use the same email address in bugzilla that they do in git.</p>
<p>If anyone has any suggestions on a better way to do this (particularly via XMLRPC which I think would be a nicer way to go), I&#8217;m all ears.  (Short of writing my own &#8212; I could do this, having worked with bugzilla and lately with XMLRPC access, quite a bit &#8212; I&#8217;m too lazy to write something from scratch)</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/09/21/git-commit-hook-to-bugzilla-using-git-notifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Update Service on OS X Lion Server</title>
		<link>http://linsec.ca/blog/2012/08/23/software-update-service-on-os-x-lion-serve/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=software-update-service-on-os-x-lion-serve</link>
		<comments>http://linsec.ca/blog/2012/08/23/software-update-service-on-os-x-lion-serve/#comments</comments>
		<pubDate>Thu, 23 Aug 2012 23:44:29 +0000</pubDate>
		<dc:creator>Vincent</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[os x server]]></category>
		<category><![CDATA[software update]]></category>
		<category><![CDATA[SUS]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1085</guid>
		<description><![CDATA[Software Update Service is part of OS X Lion server (and Mountain Lion server) that allows you to download OS updates and serve them to multiple clients on a local network (similar to Red Hat&#8217;s Satellite server, for Red Hat Enterprise Linux). I&#8217;ve had to play with this because we&#8217;re bandwidth-restricted at the church, and(...)]]></description>
				<content:encoded><![CDATA[<p>Software Update Service is part of OS X Lion server (and Mountain Lion server) that allows you to download OS updates and serve them to multiple clients on a local network (similar to Red Hat&#8217;s Satellite server, for Red Hat Enterprise Linux).  I&#8217;ve had to play with this because we&#8217;re bandwidth-restricted at the church, and there are a lot of macs there, all of which need security and bugfix updates.  Attempting to download each of these updates, online, is a painful experience, so Lion Server was a logical route to take.  Except that it&#8217;s annoying as all get out, and was painful to get up and running.  So this is just some notes on how I managed to get it to work.</p>
<p>First, you need (Mountain) Lion Server, and you need the Server Admin application, from where you can enable SUS (Software Update Server).  I attempted to do it transparently because I control DNS on the local network, but while this seemed to work with Lion, it doesn&#8217;t seem to work with Mountain Lion&#8230; not quite sure why yet.</p>
<p>I followed this tutorial: <a href="https://sites.google.com/site/stupidmactricks/home/transparentsoftwareupdateserverusingmacosxlionserver107">Transparent Software Update Server using Mac OS X Lion Server 10.7</a> to get me up and running.  I did notice, however, that I was not getting any updates downloaded that had been posted after May 2012, and eventually tracked it down to the IP address it recommends putting in /etc/hosts.  Do <b>NOT</b> use 17.250.248.95 for swscan.apple.com!  The line to add to the SUS server&#8217;s /etc/hosts file is this:</p>
<p><code><br />
17.164.1.22 swscan.apple.com<br />
</code></p>
<p>That will get you all current updates, including Mountain Lion updates.  A few other things to note (since I need SUS to handle OS X 10.6, 10.7, and 10.8).  The mod_rewrite section on /etc/swupd/swupd.conf should look like this:</p>
<pre>
&lt;IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} Darwin/9
    RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-leopard.merged-1.sucatalog
    RewriteCond %{HTTP_USER_AGENT} Darwin/10
    RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-leopard-snowleopard.merged-1.sucatalog
    RewriteCond %{HTTP_USER_AGENT} Darwin/11
    RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-lion-snowleopard-leopard.merged-1.sucatalog
    RewriteCond %{HTTP_USER_AGENT} Darwin/12
    RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
&lt;/IfModule>
</pre>
<p>(Sorry, the above looks a bit messed up, but you should be able to copy-n-paste it).  And my /etc/swupd/swupd.plist looks like:</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
&lt;plist version="1.0">
&lt;dict>
    &lt;key>PurgeUnused&lt;/key>
    &lt;true/>
    &lt;key>autoEnable&lt;/key>
    &lt;true/>
    &lt;key>autoMirror&lt;/key>
    &lt;true/>
    &lt;key>autoMirrorOnlyNew&lt;/key>
    &lt;false/>
    &lt;key>limitBandwidth&lt;/key>
    &lt;false/>
    &lt;key>otherCatalogs&lt;/key>
    &lt;array>
        &lt;string>index-leopard.merged-1.sucatalog&lt;/string>
        &lt;string>index-leopard-snowleopard.merged-1.sucatalog&lt;/string>
        &lt;string>index-lion-snowleopard-leopard.merged-1.sucatalog&lt;/string>
        &lt;string>index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog&lt;/string>
    &lt;/array>
    &lt;key>portToUse&lt;/key>
    &lt;integer>8088&lt;/integer>
    &lt;key>syncBandwidth&lt;/key>
    &lt;integer>0&lt;/integer>
    &lt;key>updatesDocRoot&lt;/key>
    &lt;string>/var/db/swupd/&lt;/string>
    &lt;key>valueBandwidth&lt;/key>
    &lt;integer>0&lt;/integer>
&lt;/dict>
&lt;/plist>
</pre>
<p>With those changes, I can serve the updates to my mac clients, but not on Mountain Lion.  On Mountain Lion clients you need to run this command to explicitly point to the SUS server:</p>
<p><code><br />
$ sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL http://[SUS_SERVER]:8088/index.sucatalog<br />
</code></p>
<p>Now when you launch the App Store and check for updates, it will find any new Mountain Lion updates.</p>
<p>For transparent updates on earlier versions of OS X, I added the following to my DNS server&#8217;s named.conf:</p>
<pre>
zone "swscan.apple.com" {
	type master;
	file "master/swscan.apple.com.zone";
};
</pre>
<p>and the swscan.apple.com.zone file contains:</p>
<pre>
$TTL	86400
@		IN SOA	swscan.apple.com. root.mydomain.com. (
					2012060201      ; serial (d. adams)
					12H		; refresh
					15M		; retry
					1W		; expiry
					1D )		; minimum
	        IN NS		dns.mydomain.com.
		IN MX		10 smtp.mydomain.com.

localhost	IN A		127.0.0.1
swscan.apple.com. IN A		192.168.0.10
</pre>
<p>I suspect there is another domain name that needs to be resolved somewhere in addition to swscan.apple.com, but I&#8217;ve not had the time to track it down as of yet.  An easy way to check is on Lion and earlier if you run &#8220;sudo softwareupdate -l&#8221; and watch the logs on your SUS, you&#8217;ll see the connections from that client.  The same does not happen with Mountain Lion clients unless you do the &#8220;defaults write&#8221; command noted earlier.</p>
<p>If anyone knows how to make Mountain Lion clients connect to the SUS transparently, I would love to hear about how you got it to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/08/23/software-update-service-on-os-x-lion-serve/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
