<?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>LittleQ &#187; fedora</title>
	<atom:link href="http://littleq.net/tag/fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://littleq.net</link>
	<description>The Pursuit of Value</description>
	<lastBuildDate>Tue, 15 Mar 2011 17:49:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Compare permissions script</title>
		<link>http://littleq.net/2011/03/compare-permissions-script/</link>
		<comments>http://littleq.net/2011/03/compare-permissions-script/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 17:49:56 +0000</pubDate>
		<dc:creator>pablo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://littleq.net/?p=73</guid>
		<description><![CDATA[Recently I needed to compare some permissions between two directories, I wrote this script that could be useful for someone else: #!/bin/bash # This script will go through a list of files and directories and match their # permissions against another directory, it can also copy the permissions from # the first directory. # # [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to compare some permissions between two directories, I wrote this script that could be useful for someone else:</p>
<pre>#!/bin/bash
# This script will go through a list of files and directories and match their
# permissions against another directory, it can also copy the permissions from
# the first directory.
#
# Written by Pablo Fernandez
#

function showusage()
{
        echo "USAGE: $0 OPTS DIR1 DIR2"
        echo
        echo "OPTIONS:"
        echo "-a Apply changes (update permissions of DIR2"
        echo "-w Warning on missing files"
        echo "-q Quiet mode"
        echo "-h Show this help"
        echo "The directory DIR1 will be matched against DIR2. The directory DIR2 will"
        echo "be corrected with all permission differences."
}

apply_changes=""

while [ ! -z "$1" ]; do
        case "$1" in
                -a)
                        apply_changes=1
                        ;;
                -w)
                        warn_on_missing=1
                        ;;
                -q)
                        quiet=1
                        ;;
                -h)
                        showusage
                        exit 0
                        ;;
                *)
                        if [ -z "$orig" ]; then
                                orig=$1
                        elif [ -z "$targ" ]; then
                                targ=$1
                        else
                                echo "Unknown flag $1"
                                showusage
                                exit 1
                        fi
        esac
        shift
done

if [ -z "$orig" -o -z "$targ" ]; then
        showusage
        exit 1
fi

# Change into the directory and get a list of files and dirs
pushd . &gt;/dev/null
cd $orig
list=`find .`
popd &gt;/dev/null

# Go through the list
for i in $list; do
        # Get the permissions of the orig file and targ file
        p=`stat -c %a $orig/$i`
        p1=`stat -c %a $targ/$i 2&gt;/dev/null`

        [ "$quiet" = "" ] &amp;&amp; echo -n "$i: "

        if [ "$p1" = "" ]; then
                # No permissions for targ file, targ file doesn't exist
                [ "$quiet" = "" ] &amp;&amp; echo "not present"

                if [ "$warn_on_missing" != "" -a "$quiet" != "" ]; then
                        echo "$targ/$i not present"
                fi
        else
                # Permission for targ file, compare
                if [ "$p" != "$p1" ]; then
                        # Permissions are different going to try to set permissions
                        if [ "$apply_changes" != "" ]; then
                                # Set permissions
                                e=`chmod $p $targ/$i 2&gt;&amp;1 &gt;/dev/null`

                                if [ "$?" != "0" ]; then
                                        [ "$quiet" = "" ] &amp;&amp; echo "different permission, change to $p failed, $e"
                                        [ "$quiet" != "" ] &amp;&amp; echo "$e"
                                else
                                        [ "$quiet" = "" ] &amp;&amp; echo "set to $p"
                                fi
                        else
                                # Running just for report
                                [ "$quiet" = "" ] &amp;&amp; echo "different, orig is $p targ is $p1"
                                [ "$quiet" != "" ] &amp;&amp; echo "Permission of $targ/$i is different than $orig/$i"
                        fi
                else
                        [ "$quiet" = "" ] &amp;&amp; echo "Ok"
                fi
        fi
done</pre>
]]></content:encoded>
			<wfw:commentRss>http://littleq.net/2011/03/compare-permissions-script/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Media Center revisited</title>
		<link>http://littleq.net/2010/03/media-center-revisited/</link>
		<comments>http://littleq.net/2010/03/media-center-revisited/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 14:16:12 +0000</pubDate>
		<dc:creator>pablo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[d510]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[xbmc]]></category>

		<guid isPermaLink="false">http://littleq.net/?p=43</guid>
		<description><![CDATA[I recently wrote a post about my new media center, running off my laptop, well, while that setup was sweet and all, there was some sort of hole in it, that is, my laptop went belly up&#8230; That was quite unfortunate, but it gave me the possibility to play with some new stuff, namely ITX [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wrote a post about my new media center, running off my laptop, well, while that setup was sweet and all, there was some sort of hole in it, that is, my laptop went belly up&#8230;</p>
<p>That was quite unfortunate, but it gave me the possibility to play with some new stuff, namely ITX setups.</p>
<p><span id="more-43"></span>I have finished yesterday building my ITX box, an Intel D510mo with an Atom D510 processor (dual with hyperthreading so 4 threads), 2 GB of RAM at 800 Mhz, WiFi PCI card on a Vitsuba Blackbox case, with a generic DVD-RW.</p>
<p>The setup is very sweet, I had lots of troubles building the system, at one point I thought my motherboard was faulty and I had to take it back to the store, but it seems the motherboard was ok, it was simply a matter of the mother producing a short while sitting in the case because of a mislocated screw in the case.</p>
<p>After the case was done I proceeded to install Ubuntu Karmic 9.10, to my surprise I had lots of troubles installing it, I had to perform the installation booting the netinstall through PXE (since I was out of CDs and all stores were closed). Once I was able to install Ubuntu I found that Ubuntu didn&#8217;t support the video card in the motherboard, and during the boot sequence the screen would go blank and there was pretty much nothing I could do about it.</p>
<p>Googling around I found other users with the same problem and determined to go with the same solution others had used&#8230; saying goodbye to Ubuntu and the beautiful Debian and APT world and totally selling out to the Fedora and Red Hat town (notice my strong bias :p).</p>
<p>I went through the horrible Fedora installation experience which is like getting hit on the ballsack while driving on a bike with no seat, configured GDM to autostart (which amazingly is not supported through gdm-config) and then I proceeded to build XBMC (since there is no XBMC build for non debian distributions (well done, and no, I&#8217;m not being ironic)).</p>
<p>It turns out building something like XBMC with support for many different codecs is not as straightforward as imaginable, who would have thought?! (now I am being ironic).</p>
<p>Here are some tips for others:</p>
<p><strong>* Add extra repositories</strong> (Fedora sucks)<br />
<code>su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'<br />
su -c "rpm -ivh http://rpm.livna.org/livna-release.rpm"</code></p>
<p><strong>* Install extra packages</strong> (Fedora blows)<br />
<code>yum -y install ccache subversion git gcc-c++ boost-devel mesa-libGL-devel glew-devel libmad-devel libjpeg-devel libsamplerate-devel libogg-devel libvorbis-devel freetype-devel fontconfig-devel bzip2-devel fribidi-devel sqlite-devel mysql-devel libpng-devel pcre-devel lzo-devel libcdio-devel libsmbclient-devel SDL-devel SDL_image-devel SDL_mixer-devel enca-devel jasper-devel libmms-devel libXt-devel libXtst-devel libXmu-devel libXinerama-devel libcurl-devel dbus-devel hal-devel pulseaudio-libs-devel pulseaudio-libs-zeroconf faac-devel avahi-devel ffmpeg-devel a52dec-devel libdca-devel faad2-devel mpeg2dec-devel libass-devel libmpcdec-devel flac-devel wavpack-devel python-devel cmake gperf unzip make libtool flex bison libtiff-devel avbin-devel libmicrohttpd-devel libdvdcss-devel faad2-devel</code></p>
<p><strong>* Fix paths</strong> (Fedora reeks)<br />
<code>ln -s /usr/lib/mysql/libmysqlclient.so.16.*.* /usr/lib/libmysqlclient.so</code></p>
<p><strong>* Get XBMC</strong><br />
<code>svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/</code></p>
<p><strong>* Build XBMC</strong><br />
<code>./bootstrap<br />
./configure --disable-debug --enable-external-libfaad --enable-external-libdts --enable-mid --enable-profiling --enable-external-libmad --enable-external-liba52 --enable-external-libmpeg2 --enable-external-libass --enable-external-libvorbis --enable-external-libogg --enable-external-libmpcdec --enable-external-libflac --enable-external-libwavpack --enable-external-python<br />
make -j 4<br />
make install</code></p>
<p>Note that the make -j 4 command might succeed but not finish, I have found a few times that when using make in parallel even with multiple cores it will skip files, you want to use make -j 4 a few times to accelerate the process but do make sure its actually finished running make.</p>
]]></content:encoded>
			<wfw:commentRss>http://littleq.net/2010/03/media-center-revisited/feed/</wfw:commentRss>
		<slash:comments>178</slash:comments>
		</item>
	</channel>
</rss>

