<?xml version="1.0"?>
<rss version="2.0">

<channel>
	<title>Planet CDOT</title>
	<link>http://zenit.senecac.on.ca/~chris.tyler/planet/</link>
	<language>en</language>
	<description>Planet CDOT - http://zenit.senecac.on.ca/~chris.tyler/planet/</description>

<item>
	<title>Nam Nguyen: Testing BuildRequires with Mock</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-4269293029556667912.post-6918063174733954553</guid>
	<link>http://namsbloging.blogspot.com/2012/02/testing-buildrequires-with-mock.html</link>
	<description>Recently working with spec files I've learned BuildRequires are packages required to build the software. In this post I will give my experience using &lt;i&gt;Mock&lt;/i&gt; which is used to test a packages BuildRequires. This will help us test that the BuildRequires are complete and accurate without anything missing.&lt;br /&gt;&lt;br /&gt;To get started setting up &lt;i&gt;Mock&lt;/i&gt;, I installed the mock package with this command:&lt;br /&gt;&lt;b&gt;yum install mock&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then I had to add my username&lt;b&gt; &lt;/b&gt;to the mock group:&lt;br /&gt;&lt;b&gt;usermod -aG mock namnguyen&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After adding my username to the mock group I ran mock as superuser and received this error message as I did not change to my regular account which I had just added to the mock group.&lt;br /&gt;&lt;br /&gt;[root@timeline ~]# &lt;b&gt;mock -r fedora-16-x86_64 ~/rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;/b&gt;&lt;br /&gt;ERROR: mock will not run from the root account (needs an unprivileged uid so it can drop privs)&lt;br /&gt;&lt;br /&gt;I then changed to the regular user account that I added to the mock group and was then able to run mock on my SRPM.&lt;br /&gt;&lt;br /&gt;[namnguyen@timeline ~]$ &lt;b&gt;mock -r fedora-16-x86_64 ~/rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;/b&gt;&lt;br /&gt;INFO: mock.py version 1.1.19 starting...&lt;br /&gt;State Changed: init plugins&lt;br /&gt;INFO: selinux enabled&lt;br /&gt;State Changed: start&lt;br /&gt;INFO: Start(/home/namnguyen/rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm)  Config(fedora-16-x86_64)&lt;br /&gt;State Changed: lock buildroot&lt;br /&gt;State Changed: clean&lt;br /&gt;INFO: chroot (/var/lib/mock/fedora-16-x86_64) unlocked and deleted&lt;br /&gt;State Changed: unlock buildroot&lt;br /&gt;State Changed: init&lt;br /&gt;State Changed: lock buildroot&lt;br /&gt;Mock Version: 1.1.19&lt;br /&gt;INFO: Mock Version: 1.1.19&lt;br /&gt;INFO: calling preinit hooks&lt;br /&gt;INFO: enabled root cache&lt;br /&gt;INFO: enabled yum cache&lt;br /&gt;State Changed: cleaning yum metadata&lt;br /&gt;INFO: enabled ccache&lt;br /&gt;State Changed: running yum&lt;br /&gt;State Changed: creating cache&lt;br /&gt;State Changed: unlock buildroot&lt;br /&gt;INFO: Installed packages:&lt;br /&gt;State Changed: setup&lt;br /&gt;State Changed: build&lt;br /&gt;INFO: Done(/home/namnguyen/rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm) Config(fedora-16-x86_64) 2 minutes 34 seconds&lt;br /&gt;INFO: Results and/or logs in: /var/lib/mock/fedora-16-x86_64/result&lt;br /&gt;State Changed: end&lt;br /&gt;&lt;br /&gt;The first time I had ran this command it hung on &quot;State Changed: running yum&quot; for 10 minutes before I interrupt and exited. Not really sure why it hung there I checked &lt;i&gt;/var/lib/mock/fedora-16-x86_64/result/build.log&lt;/i&gt; for any info and results. The only info within &lt;i&gt;build.log&lt;/i&gt; was one line that showed Mock Version: 1.1.19. I gave mock another try and this time it continued on past &quot;Stage Changed: running yum&quot; and continued until it was done.&lt;br /&gt;&lt;br /&gt;The second attempt had only taken 2 minutes 34 seconds and right now I'm not really sure why mock was not successful on the first attempt but was successful on the second attempt. My experience using mock in this process had taken an hour and a half of which a lot of time was spent on searching for the reason for my issue that I mentioned above. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/4269293029556667912-6918063174733954553?l=namsbloging.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 07 Feb 2012 05:43:52 +0000</pubDate>
	<author>noreply@blogger.com (namnguyen)</author>
</item>
<item>
	<title>Albert Truong: Building from source</title>
	<guid isPermaLink="false">http://alberttruong.wordpress.com/?p=22</guid>
	<link>http://alberttruong.wordpress.com/2012/02/07/building-from-source/</link>
	<description>&lt;p&gt;After failing in realizing that I could of installed a Virtual Machine on my own computer and worked on this lab at home, I finally got everything setup at home for me to complete my labs.&lt;/p&gt;
&lt;p&gt;In this blog post, I will be talking about how I went on to complete this lab step by step.&lt;/p&gt;
&lt;p&gt;In this lab, we needed to download two packages from GNU Project website. The two packages I downloaded are:&lt;/p&gt;
&lt;p&gt;Hello – http://alpha.gnu.org/gnu/hello/hello-2.6.90.tar.gz&lt;/p&gt;
&lt;p&gt;HTTP Tunnel – ftp://ftp.nocrew.org/pub/nocrew/unix/httptunnel-3.3.tar.gz&lt;/p&gt;
&lt;p&gt;Before I actually downloaded these two packages, I had to install the necessary tools. These tools were Development Tools and Development Libraries.&lt;/p&gt;
&lt;p&gt;yum groupinstall “Development Tools” “Development Libraries”&lt;/p&gt;
&lt;p&gt;Once done, I used this command to download the two packages:&lt;/p&gt;
&lt;p&gt;wget _____________ – where this is where you paste the link.&lt;/p&gt;
&lt;p&gt;After the packages are downloaded, I extracted the files using this command:&lt;/p&gt;
&lt;p&gt;tar xvzf &lt;/p&gt;
&lt;p&gt;Once extracted, a directory will be made under the name. Within the directory, I ran these commands to compile and install the package.&lt;/p&gt;
&lt;p&gt;./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;/p&gt;
&lt;p&gt;Within the lab, we were reading up on the time command. So throughout the compiling and installation of the packages, I used the time command to see how long each process takes.&lt;/p&gt;
&lt;p&gt;Hello Package:&lt;/p&gt;
&lt;p&gt;time ./configure&lt;/p&gt;
&lt;p&gt;real    1m3.390s&lt;br /&gt;
user    0m21.171s&lt;br /&gt;
sys     0m28.988s&lt;/p&gt;
&lt;p&gt;time make&lt;/p&gt;
&lt;p&gt;real    0m3.687s&lt;br /&gt;
user    0m1.491s&lt;br /&gt;
sys     0m1.281s&lt;/p&gt;
&lt;p&gt;time make install&lt;/p&gt;
&lt;p&gt;real    0m12.427s&lt;br /&gt;
user    0m5.367s&lt;br /&gt;
sys     0m5.314s&lt;/p&gt;
&lt;p&gt;HTTP Tunnel Package:&lt;/p&gt;
&lt;p&gt;time ./configure&lt;/p&gt;
&lt;p&gt;real    0m14.738s&lt;br /&gt;
user    0m4.779s&lt;br /&gt;
sys     0m5.883s&lt;/p&gt;
&lt;p&gt;time make&lt;/p&gt;
&lt;p&gt;real    0m3.715s&lt;br /&gt;
user    0m1.761s&lt;br /&gt;
sys     0m1.135s&lt;/p&gt;
&lt;p&gt;time make install&lt;/p&gt;
&lt;p&gt;real    0m1.766s&lt;br /&gt;
user    0m0.619s&lt;br /&gt;
sys     0m0.706s&lt;/p&gt;
&lt;p&gt;These times would of been a bit faster if I was in the school environment since my home computer is only running a Core 2 Duo, 2GB RAM and a lot of programs running on the host computer. Overall it took me less than a minute each to install. Only problem I ran into was before I installed Hello and HTTP Tunnel, I was testing out other packages which needed me to be root inorder for me to install. &lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/alberttruong.wordpress.com/22/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/alberttruong.wordpress.com/22/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=alberttruong.wordpress.com&amp;amp;blog=31585957&amp;amp;post=22&amp;amp;subd=alberttruong&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 07 Feb 2012 04:49:22 +0000</pubDate>
</item>
<item>
	<title>Raymond Hung: Continuing work on open source</title>
	<guid isPermaLink="false">http://raymondhung.wordpress.com/?p=234</guid>
	<link>http://raymondhung.wordpress.com/2012/02/06/continuing-work-on-open-source/</link>
	<description>&lt;p&gt;Since pointer lock is now in review, I’m sure there’ll be stuff to fix when review on the patches and tests are done, I went looking for a couple of bugs to do. The &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=712936&quot;&gt;first bug&lt;/a&gt; relates to an updated macro. I don’t think it’ll take too long, it’s not a simple find and replace procedure as noted on the bug report. I’ve started by using mxr  to find out how many files are affected and how many instances. It shouldn’t be too much work, and I’m with a bit of discussion with Jeff Walden, I’m sure I can have it done by Thursday. (There are 214 instances in 78 files)&lt;/p&gt;
&lt;p&gt;My&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=630495&quot;&gt; second bug&lt;/a&gt; is something a bit more abstract. I’m thinking this bug might take more than a few weeks to complete, but I’m sure I’ll be able to get it done by reading week (crosses fingers). The biggest obstacle for me is that I don’t really have any idea where I should begin (aside from looking at the old patch shown in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=595451&quot;&gt;bug 595451&lt;/a&gt;). I’ve emailed Mounir Lamouri to see where I should begin, this should be an interesting adventure. =)&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/raymondhung.wordpress.com/234/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/raymondhung.wordpress.com/234/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=raymondhung.wordpress.com&amp;amp;blog=27064523&amp;amp;post=234&amp;amp;subd=raymondhung&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 07 Feb 2012 02:08:40 +0000</pubDate>
</item>
<item>
	<title>David Seifried: Firefox bug 680321</title>
	<guid isPermaLink="false">http://dseifried.wordpress.com/?p=261</guid>
	<link>http://dseifried.wordpress.com/2012/02/07/firefox-bug-680321/</link>
	<description>&lt;p&gt;Over the past 2 weeks I have been working primarily on &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=680321&quot;&gt;bug 680321&lt;/a&gt;, which pertains to issue’s with the way Firefox handles the changing of the preload attribute.  I explain in a &lt;a href=&quot;http://dseifried.wordpress.com/2012/01/26/osd700firstrelease/&quot;&gt;prior post&lt;/a&gt; the details surrounding the bug and some of my thinking towards getting my patch up for review.  Since then I have put another patch up for review, gotten some great feedback, and am working towards getting another working version up and running.&lt;/p&gt;
&lt;p&gt;My &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=591687&amp;amp;action=diff&quot;&gt;first patch&lt;/a&gt; failed mainly because it was just wrong.  I created the desired functionality but in doing so I broke features that I shouldn’t have ( this happened due to the fact that I didn’t write any tests before I asked for feedback ).  What I broke was a case where the user changes the preload state, but does not change the media’s source.  If this happens firefox simply ignores the changed preload state as we are requesting to change the buffering algorithm on a video that is already buffering.  My first fix was to simply allow this to happen, which fulfilled my use case but obviously broke what I just outlined.  I quickly got some feedback saying that my approach was wrong and I got a few pointers in the right direction from &lt;a href=&quot;http://dseifried.wordpress.com/category/school/feed/pearce.org.nz&quot;&gt;Chris Pearce&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Chris gave me the following advice:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Can you look a the testcase attached here in the bug and add a similar test to content/media/test/test_preload_actions.html?&lt;/p&gt;
&lt;p&gt;::: content/html/content/src/nsHTMLMediaElement.cpp&lt;br /&gt;
@@ -889,5 @@&lt;br /&gt;
&amp;gt; nextAction = static_cast(preloadDefault);&lt;br /&gt;
&amp;gt; }&lt;br /&gt;
&amp;gt; }&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&amp;gt; – if ((mBegun || mIsRunningSelectResource) &amp;amp;&amp;amp; nextAction &amp;lt; mPreloadAction) {&lt;/p&gt;
&lt;p&gt;So mBegun is true after we’ve chosen a resource and started to download and decode it. We don’t want to support reductions in the amount of buffering after decoding has begun at the current time; that should be the subject of another bug.&lt;/p&gt;
&lt;p&gt;So instead of doing what you’re doing now, create a new boolean flag mHaveQueuedSelectResource, and use that in QueueSelectResourceTask instead of using mIsRunningSelectResource. This will prevent multiple calls to SelectResource being queued concurrently. Then call UpdatePreloadAction() in SelectResource, but set mIsRunningSelectResource to true in SelectResource() *after* calling UpdatePreloadAction().&lt;/p&gt;
&lt;p&gt;Then the preload action will be updated before we start trying to load the resource, so if it’s changed after load() is called on the media element, but before the load’s synchronous section is run, the new load will reflect the changed preload state.&lt;/p&gt;
&lt;p&gt;If that doesn’t make sense (or work!), let me know. &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Seeing as Chris basically outlined a solution for me I would be dumb not to roll with it so that’s what I did.  After about two nights of writing tests and bring the code up to par I submitted it again for review.  The main problems that I got nailed for in review were not adding comments, which I guess I should of known would have been said considering how well commented the Firefox source code is.  I was also asked to write another test in order to prove the results of my fix.  The last thing I got nailed on was changing the use of mIsRunningSelectResource to mHaveQueuedResource.  One of the problems I encountered while writing the fix Chris suggested was that the fix broke the same previous case as my first fix did.  This was due to the fact that although we were loading a new resource and setting the preload state again, we were still running into the same issue as before because the resource selection algorithm still thought we were loading the original source. We ( currently ) had no way of explicitly stating that the source had changed so that it was ok to allow the preload state to change.  I managed to find a hacky workaround to this by leveraging the new variable that we created and I found a unique case where the boolean state of the flag accurately reflected that we were loading a new source.&lt;/p&gt;
&lt;p&gt;Although I &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=593717&amp;amp;action=diff&quot;&gt;had a fix&lt;/a&gt; that satisfied both cases it was still not optimal, which is probably why I got another R-.  Currently I am waiting for Chris to come back to irc in order to have a conversation with him about the problem ( I think he is travelling at the moment ).  In the meantime I am going to be focusing my attention on a new bug I picked up which is working on Firefox’s JavaScript engine, SpiderMonkey.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=722788&quot;&gt;Bug 722788&lt;/a&gt; is a starter bug which explains there is a simple( for them ) optimization to be made when parsing JSON numbers from a string.  Instead of using double’s to do the parsing we can simply use unsigned integers to accomplish what we need.  This code is the most intense looking C code that I have seen to date, so I’m not gonna lie, I’m a bit intimidated.  I think I have what seems like a fix but I’m getting some odd results when I try and run the tests.  The next step here is to go into the #jsapi channel and ask how I am supposed to be running the tests and if there is any known fails I can expect to see.&lt;/p&gt;
&lt;p&gt;I know this bug is a starter bug, but it has been the hardest bug so far for me to wrap my head around, probably because it is on a lower level than I am used to.  One of the thing’s I have been trying to do this semester is to get a working patch up as fast as I can, regardless of how hacky it is.  I’ve been doing this for 2 reasons: 1. It allows me to attempt a lot of bugs and I don’t get hung up on any 1 issue, giving me a chance to think about problems I’m encountering. 2. I get feedback on what I am doing wrong earlier rather than later, allowing me to reduce the possibility of building on an early mistake.  It seems to be working out well so far and the only thing I am concerned with is that I may be putting patches up for review too early, in which case I might be annoying some of the reviewers with an insignificant patch.&lt;/p&gt;
&lt;p&gt;I hope to have a patch up for the new bug I have taken on up for review by tonight as wel as hopefully hear from Chris at some point this week. Until then I am going to keep doing what I’m doing and hope for the best.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/dseifried.wordpress.com/261/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/dseifried.wordpress.com/261/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=dseifried.wordpress.com&amp;amp;blog=19041028&amp;amp;post=261&amp;amp;subd=dseifried&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 07 Feb 2012 00:57:06 +0000</pubDate>
</item>
<item>
	<title>Scott Downe: Quick update on my Firefox bug</title>
	<guid isPermaLink="false">http://scottdowne.wordpress.com/?p=495</guid>
	<link>http://scottdowne.wordpress.com/2012/02/06/quick-update-on-my-firefox-bug/</link>
	<description>&lt;p&gt;So, my “working” fix for Firefox bug &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=677122&quot;&gt;677122&lt;/a&gt; will not actually work.&lt;/p&gt;
&lt;p&gt;It will potentially break any anchor names that look like media fragment code.&lt;/p&gt;
&lt;p&gt;Example “#t=50,100″ is, unfortunately, a valid anchor name. I am going to need to get more specific with my check, which is fine. I figure I would instead of doing a check on the string, do a check to see if the document is a MediaDocument, as MediaDocuments cannot (that I know of) have anchors.&lt;/p&gt;
&lt;p&gt;I took &lt;a href=&quot;http://vocamus.net/dave/&quot;&gt;hump’s&lt;/a&gt; advice, and asked for help in the #introduction channel on IRC.&lt;/p&gt;
&lt;p&gt;I got a reply in less than two minutes from a “jdm”. I never did figure out his real name, but I thanked him as jdm.&lt;/p&gt;
&lt;p&gt;Jdm’s advice was to check for MozSyntheticDocument. This makes sense for me. MozSyntheticDocument is a readonly boolean value attached to the nsIDOMDocument. I was able to get a reference to this document, breakpointed it, and it is confirmed to be what I want, except when I try to compile, I get an error that MozSyntheticDocument does not exist…&lt;/p&gt;
&lt;p&gt;I searched MXR for SyntheticDocument, and found some other interesting bits. A mIsSyntheticDocument which is protected, but exposed via a IsSyntheticDocument function which is attached to the msIDocument.&lt;/p&gt;
&lt;p&gt;I grabbed a reference to msIDocument, same deal, not there. Hmm.&lt;/p&gt;
&lt;p&gt;Also tried a GetMozSyntheticDocument function, attached to nsDocument. Frustratingly enough, also not there…&lt;/p&gt;
&lt;p&gt;Then it hit me what could be wrong… I have been using MXR as a reference, then go in and write my code, without double checking that MY code was up to date, and had the functionality I was seeing on MRX. Currently doing an update. Will post again soon with updates.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/scottdowne.wordpress.com/495/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/scottdowne.wordpress.com/495/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=scottdowne.wordpress.com&amp;amp;blog=14056265&amp;amp;post=495&amp;amp;subd=scottdowne&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Mon, 06 Feb 2012 21:51:40 +0000</pubDate>
</item>
<item>
	<title>Nam Nguyen: RPM Writing continued</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-4269293029556667912.post-5723646360264400529</guid>
	<link>http://namsbloging.blogspot.com/2012/02/rpm-writing-continued.html</link>
	<description>Continuing on from my last post &quot;RPM Writing&quot;, I will be be taking the RPM that was successfully built and testing it with &lt;b&gt;rpmlint&lt;/b&gt; command. This command should check for common errors in the spec file,binary RPM and source RPM.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;rpmlint on the spec file&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;[root@timeline ~]# &lt;b&gt;rpmlint -i rpmbuild/SPECS/gnuchess.spec&lt;/b&gt;&lt;br /&gt;0 packages and 1 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;rpmlint on the binary RPM&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;[root@timeline ~]# &lt;b&gt;rpmlint -i rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;/b&gt;&lt;br /&gt;1 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;rpmlint on the source RPM&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;[root@timeline ~]# &lt;b&gt;rpmlint rpmbuild/RPMS/x86_64/gnuchess-6.0.1-1.fc16.x86_64.rpm&lt;/b&gt;&lt;br /&gt;gnuchess.x86_64: W: incoherent-version-in-changelog Nguyen ['6.0.1-1.fc16', '6.0.1-1']&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postin /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postun /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: W: file-not-utf8 /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: E: info-dir-file /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessu&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchess&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessx&lt;br /&gt;1 packages and 0 specfiles checked; 5 errors, 5 warnings.&lt;br /&gt;&lt;br /&gt;After running rpmlint to check for errors in the spec file, binary rpm and source rpm we are able to see what was checked, errors and warnings. There were no errors for &lt;b&gt;gnuchess.spec&lt;/b&gt; and &lt;b&gt;gnuchess-6.0.1-1.fc16.src.rpm &lt;/b&gt;but there were errors and warnings returned for &lt;b&gt;gnuchess-6.0.1-1.fc16.src.rpm&lt;/b&gt;. Now that we know that which file has errors we will need to address them in order to have the rpm conform to rpm guidelines.&lt;br /&gt;&lt;br /&gt;We can run the same rpmlint command with -i option to show informative message and additional explanations to the reported message&lt;br /&gt;&lt;br /&gt;[root@timeline ~]# &lt;b&gt;rpmlint -i rpmbuild/RPMS/x86_64/gnuchess-6.0.1-1.fc16.x86_64.rpm&lt;/b&gt;&lt;br /&gt;gnuchess.x86_64: W: incoherent-version-in-changelog Nguyen ['6.0.1-1.fc16', '6.0.1-1']&lt;br /&gt;The latest entry in %changelog contains a version identifier that is not&lt;br /&gt;coherent with the epoch:version-release tuple of the package.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postin /usr/share/info/gnuchess.info.gz&lt;br /&gt;This package contains info files and provides no %post scriptlet containing a&lt;br /&gt;call to install-info.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postun /usr/share/info/gnuchess.info.gz&lt;br /&gt;This package contains info files and provides no %postun scriptlet containing&lt;br /&gt;a call to install-info.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: W: file-not-utf8 /usr/share/info/gnuchess.info.gz&lt;br /&gt;The character encoding of this file is not UTF-8.  Consider converting it in&lt;br /&gt;the specfile's %prep section for example using iconv(1).&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: E: info-dir-file /usr/share/info/dir&lt;br /&gt;You have /usr/info/dir or /usr/share/info/dir in your package. It will cause&lt;br /&gt;conflicts with other packages and thus is not allowed. Please remove it and&lt;br /&gt;rebuild your package.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir&lt;br /&gt;This package contains info files and provides no %post scriptlet containing a&lt;br /&gt;call to install-info.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir&lt;br /&gt;This package contains info files and provides no %postun scriptlet containing&lt;br /&gt;a call to install-info.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessu&lt;br /&gt;Each executable in standard binary directories should have a man page.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchess&lt;br /&gt;Each executable in standard binary directories should have a man page.&lt;br /&gt;&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessx&lt;br /&gt;Each executable in standard binary directories should have a man page.&lt;br /&gt;&lt;br /&gt;1 packages and 0 specfiles checked; 5 errors, 5 warnings.&lt;br /&gt;[root@timeline ~]# &lt;br /&gt;&lt;br /&gt;I find that using the -i option with rpmlint is very helpful as it helps make the errors more human readable so that you can know where to look in order to fix the errors. I found that this site list most of the errors I have which are common so I am able to edit my spec file and make the changes.&lt;br /&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/Common_Rpmlint_issues&quot;&gt;common Rpmlint issues - Fedora Project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;[root@timeline ~]# rpmlint rpmbuild/RPMS/x86_64/gnuchess-6.0.1-1.fc16.x86_64.rpm&lt;br /&gt;gnuchess.x86_64: E: standard-dir-owned-by-package /usr/share/info&lt;br /&gt;gnuchess.x86_64: W: file-not-utf8 /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: E: info-dir-file /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessu&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchess&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessx&lt;br /&gt;1 packages and 0 specfiles checked; 2 errors, 4 warnings.&lt;br /&gt;&lt;br /&gt;Currently still working on trying to address the binary RPM errors as its stands at 2 errors and 4 warnings. Will update this post shortly once they are resolved.&lt;br /&gt;&lt;br /&gt;My spec file, RPM and SRPM can be  downloaded from these links I have posted.&lt;br /&gt;&lt;a href=&quot;http://www.filesavr.com/QD8F481H55VFT9R&quot;&gt;gnuchess.spec&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filesavr.com/YP5CDE4RAVRC6WU&quot;&gt;gnuchess-6.0.1-1.fc16.x86_64.rpm&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.filesavr.com/J1HNFI54ASJ7FZJ&quot;&gt;gnuchess-6.0.1-1.fc16.src.rpm&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/4269293029556667912-5723646360264400529?l=namsbloging.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 21:07:21 +0000</pubDate>
	<author>noreply@blogger.com (namnguyen)</author>
</item>
<item>
	<title>Andrew Greene: How to: RPM-Writing</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-1963895767674386914.post-9141460408341653770</guid>
	<link>http://sbr600blog.blogspot.com/2012/02/build-from-source-how-to-rpm-writing.html</link>
	<description>In my other post I showed you how to download and build from source. Now I will be showing you how to creat an RPM Package. In order to create an RPM Package you will need to install these two required packages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Fedora Packager&lt;br /&gt;rpmlint&lt;br /&gt;&lt;br /&gt;Run the following commands to download them:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;yum groupinstall &quot;Fedora Packager&quot;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;yum install rpmlint yum-utils&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;after you install those packages you will need to create a ~/rpmbuild directories and a ~/.rpmmacros run the following commands:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;rpmdev-setuptree&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Next you are going to have to move or copy the package source code aka tarball that you are creating the rpm for into ~/rpmbuild/SOURCES&lt;br /&gt;&lt;br /&gt;Run the following commands:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cp /tmp/z &lt;/b&gt;&lt;b&gt;httptunnel-3.0.5.tar.g&lt;/b&gt;&lt;b&gt;~/rpmbuild/SOURCES&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;cp /tmp/wget-1.13.tar.gz ~/rpmbuild/SOURCES&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;*these are the two packages I am using for the purposes of this post &lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next you are going to have to change to SPECS directory&lt;br /&gt;&lt;br /&gt;Run the following command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cd ~/rpmbuild/SPECS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;then you will need to create fresh spec file for your rpm&lt;br /&gt;&lt;br /&gt;Run the following command:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;rpmdev-newspec httptunnel-3.0.5&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;rpmdev-newspec wget-1.13&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;*this command will create a default spec file for rpm&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After you have made the fresh spec files with the previous commands you will need to enter the appropriate information into it.&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Run the following command:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;vi &lt;/b&gt;&lt;b&gt;~/rpmbuild/SPECS/&lt;/b&gt;&lt;b&gt;httptunnel-3.0.5&lt;/b&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;*Sample Fresh Spec file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ame:           httptunnel&lt;br /&gt;Version:        3.0.5&lt;br /&gt;Release:        1%{?dist}&lt;br /&gt;Summary:        httptunnel creates a bidirectional virtual data path tunnelled in HTTP requests&lt;br /&gt;&lt;br /&gt;License:        GPL+&lt;br /&gt;URL:            http://www.gnu.org/software/httptunnel/&lt;br /&gt;Source0:        http://www.nocrew.org/software/httptunnel/httptunnel-3.0.5.tar.gz&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%description&lt;br /&gt;httptunnel creates a bidirectional virtual data connection tunnelled in HTTP requests. The HTTP requests can be sent via an HTTP proxy if so desired.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%prep&lt;br /&gt;%setup -q&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%build&lt;br /&gt;%configure &lt;/b&gt;&lt;br /&gt;&lt;b&gt;make %{?_smp_mflags}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%install&lt;br /&gt;rm -rf $RPM_BUILD_ROOT&lt;br /&gt;make install DESTDIR=$RPM_BUILD_ROOT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%files&lt;/b&gt;&lt;br /&gt;&lt;b&gt;   /usr/bin/htc&lt;br /&gt;   /usr/bin/hts&lt;br /&gt;   /usr/share/man/man1/htc.1.gz&lt;br /&gt;   /usr/share/man/man1/hts.1.gz&lt;br /&gt;&lt;br /&gt;%doc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%changelog&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;Now that you have created a spec file and filled in the appropriate information you can test your rpm for any errors in the spec file&lt;br /&gt;&lt;br /&gt;Run the following commands:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;rpmbuild -ba &lt;/b&gt;&lt;b&gt;httptunnel-3.0.5.spec&lt;/b&gt;&lt;br /&gt;&lt;b&gt;rpmbuild -ba wget-1.13.spec&lt;/b&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;*fix any errors that it finds and move on&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;**here is a link to the spec files I have made:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/?gsot7r1lfyfcr7r&quot; target=&quot;_blank&quot;&gt;httptunnel-3.0.5.spec - 684 b &lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/?yg8lmp3ka9mndkg&quot; target=&quot;_blank&quot;&gt;wget-1.13.spec - 2 KB&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once build has been completed successfully the binary rpm's are placed in ~/rpmbuild/x86_64/RPMS and the source file will be placed in ~/rpmbuild/SRPMS&lt;br /&gt;&lt;br /&gt;Finally you should run rpmlint to make sure that your rpm's meet the minimum standard requirements for a good rmp.&lt;br /&gt;&lt;br /&gt;Run the following commands:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;rpmlint ~/rpmbuild/SRPMS/httptunnel-3.0.5-1.fc15.x86_64.rpm &lt;/b&gt;&lt;br /&gt;&lt;b&gt;rpmlint ~/rpmbuild/SRPMS/wget-1.13-1.fc15.x86_64.rpm&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and thats basically how you write an rpm file here are some links to the rpms I have created for this post.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;**Link to my rpm files that I made:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;SRPMS &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/?whd92d3933g756d&quot; target=&quot;_blank&quot;&gt;httptunnel-3.0.5-1.fc15.src.rpm - 257 KB &lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/?3u6j6nd40bqtala&quot; target=&quot;_blank&quot;&gt;wget-1.13-1.fc15.src.rpm - 3 MB&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;RPMS&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/?4j1p5jw1k96wc2s&quot; target=&quot;_blank&quot;&gt;httptunnel-3.0.5-1.fc15.x86_64.rpm - 24 KB&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mediafire.com/?99dcfug1996djf0&quot; target=&quot;_blank&quot;&gt;wget-1.13-1.fc15.x86_64.rpm - 454 KB&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/1963895767674386914-9141460408341653770?l=sbr600blog.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 19:56:43 +0000</pubDate>
	<author>noreply@blogger.com (Drew)</author>
</item>
<item>
	<title>Kavishankar Srivamathevan: Mock and Koji Lab</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-3668150565378486510.post-6515142141761182982</guid>
	<link>http://kavisbr.blogspot.com/2012/02/mock-and-koji-lab.html</link>
	<description>&lt;div style=&quot;text-align: left;&quot; dir=&quot;ltr&quot;&gt;Hello everyone,&lt;br /&gt;The purpose of this post is to show my experiences with the mock and koji tools.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Mock: Testing BuildRequires&lt;/strong&gt;&lt;br /&gt;It's often difficult to get the BuildRequires in a spec file exactly right, because it's easy to overlook packages that are coincidentally installed on the machine. Mock is used to test that the BuildRequires for a package are complete and accurate, by creating a bare-bones chroot environment containing only the basic build packages plus any packages indicated by BuildRequires lines in the spec file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Koji: Testing on Multiple Architectures&lt;/strong&gt;&lt;br /&gt;Most developers and packagers have access to only a small number of system architectures (for example, a developer might have access to 64-bit AMD/Intel, but not have access to 32-bit AMD/Intel, s390 mainframe, PowerPC, or ARM systems). The Koji build system provides a mechanism for building a package in mock on one or more remote systems.&lt;br /&gt;&lt;br /&gt;- Description is from &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/Winter_2012_SBR600_Weekly_Schedule#Thursday&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Mock:&lt;/strong&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Install the mock package: &lt;strong&gt;yum install mock&lt;/strong&gt; &lt;/li&gt;&lt;li&gt;Then add myself to the mock group: &lt;strong&gt;usermod -aG mock kavi&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Then Testing BuildRequires using Mock:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;For each of my SRPMs I tested using Mock. You can see my attempts bellow:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;First SRPM:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[kavi@localhost ~]$&lt;strong&gt; mock -r fedora-16-x86_64 rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;/strong&gt; &lt;br /&gt;INFO: mock.py version 1.1.19 starting...&lt;br /&gt;State Changed: init plugins&lt;br /&gt;INFO: selinux enabled&lt;br /&gt;State Changed: start&lt;br /&gt;INFO: Start(rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm)  Config(fedora-16-x86_64)&lt;br /&gt;State Changed: lock buildroot&lt;br /&gt;State Changed: clean&lt;br /&gt;INFO: chroot (/var/lib/mock/fedora-16-x86_64) unlocked and deleted&lt;br /&gt;State Changed: unlock buildroot&lt;br /&gt;State Changed: init&lt;br /&gt;State Changed: lock buildroot&lt;br /&gt;Mock Version: 1.1.19&lt;br /&gt;INFO: Mock Version: 1.1.19&lt;br /&gt;INFO: calling preinit hooks&lt;br /&gt;INFO: enabled root cache&lt;br /&gt;State Changed: unpacking root cache&lt;br /&gt;INFO: enabled yum cache&lt;br /&gt;State Changed: cleaning yum metadata&lt;br /&gt;INFO: enabled ccache&lt;br /&gt;State Changed: running yum&lt;br /&gt;State Changed: unlock buildroot&lt;br /&gt;INFO: Installed packages:&lt;br /&gt;State Changed: setup&lt;br /&gt;State Changed: build&lt;br /&gt;INFO: Done(rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm) Config(fedora-16-x86_64) 1 minutes 4 seconds&lt;br /&gt;INFO: Results and/or logs in: /var/lib/mock/fedora-16-x86_64/result&lt;br /&gt;State Changed: end&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Second SRPM:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[kavi@localhost ~]$ &lt;strong&gt;mock -r fedora-16-x86_64 rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;/strong&gt; &lt;br /&gt;INFO: mock.py version 1.1.19 starting...&lt;br /&gt;State Changed: init plugins&lt;br /&gt;INFO: selinux enabled&lt;br /&gt;State Changed: start&lt;br /&gt;INFO: Start(rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm)  Config(fedora-16-x86_64)&lt;br /&gt;State Changed: lock buildroot&lt;br /&gt;State Changed: clean&lt;br /&gt;INFO: chroot (/var/lib/mock/fedora-16-x86_64) unlocked and deleted&lt;br /&gt;State Changed: unlock buildroot&lt;br /&gt;State Changed: init&lt;br /&gt;State Changed: lock buildroot&lt;br /&gt;Mock Version: 1.1.19&lt;br /&gt;INFO: Mock Version: 1.1.19&lt;br /&gt;INFO: calling preinit hooks&lt;br /&gt;INFO: enabled root cache&lt;br /&gt;State Changed: unpacking root cache&lt;br /&gt;INFO: enabled yum cache&lt;br /&gt;State Changed: cleaning yum metadata&lt;br /&gt;INFO: enabled ccache&lt;br /&gt;State Changed: running yum&lt;br /&gt;State Changed: unlock buildroot&lt;br /&gt;INFO: Installed packages:&lt;br /&gt;State Changed: setup&lt;br /&gt;State Changed: build&lt;br /&gt;INFO: Done(rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm) Config(fedora-16-x86_64) 0 minutes 44 seconds&lt;br /&gt;INFO: Results and/or logs in: /var/lib/mock/fedora-16-x86_64/result&lt;br /&gt;State Changed: end&lt;br /&gt;[kavi@localhost ~]$&lt;br /&gt;&lt;br /&gt;In short, both of my Source RPM tested using the Mock tool was successful, no failures, even after looking at logs too. Therefore, my Mock test was successful and moving on test on other architectures for that I will be using the koji tool.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Koji:&lt;/strong&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Install Koji CLI: &lt;strong&gt;yum install fedora-packager&lt;/strong&gt;, from this install we also get koji package&lt;/li&gt;&lt;li&gt;Then I have setup my Fedora Account System (FAS2) account, so I ran this command: &lt;strong&gt;/usr/bin/fedora-packager-setup&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;After it said that I need the client certificate, so I entered my FAS2 account credentials to proceed.&lt;/li&gt;&lt;li&gt;After getting my certificate, I have to import that browser certificate, &quot;fedora-browser-cert.p12&quot;, to Firefox.&lt;/li&gt;&lt;li&gt;To do that, go to Edit -&amp;gt; Preferences -&amp;gt; Advanced, then Click &quot;View Certificates&quot;&lt;/li&gt;&lt;li&gt;Next, On &quot;Your Certificates&quot; tab, click &quot;Import&quot; and Select ~/fedora-browser-cert.p12&lt;/li&gt;&lt;li&gt;It requested me to enter the export pass-phrase, which I created earlier.&lt;/li&gt;&lt;li&gt;Lastly, once it is imported, I saw a certificate named &quot;Fedora Project&quot;&lt;/li&gt;&lt;li&gt;Now I can login successfully to &lt;a href=&quot;http://koji.fedoraproject.org/koji/&quot;&gt;http://koji.fedoraproject.org/koji/&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;After I have done the above steps, I proceeded for my testing using the koji tool. All of my tests are on the Fedora 16 distribution. Notice that I have a option &quot;--scratch&quot;, this will tell koji to build the package but not push it to target, meaning not to include it in Fedora, or basically we are just testing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Primary architectures tests:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[kavi@localhost ~]$ &lt;strong&gt;koji build f16 --scratch rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;/strong&gt; &lt;br /&gt;Uploading srpm: rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;br /&gt;[====================================] 100% 00:00:02 534.93 KiB 233.30 KiB/sec&lt;br /&gt;Created task: 3757662&lt;br /&gt;Task info: &lt;a href=&quot;http://koji.fedoraproject.org/koji/taskinfo?taskID=3757662&quot;&gt;http://koji.fedoraproject.org/koji/taskinfo?taskID=3757662&lt;/a&gt;&lt;br /&gt;Watching tasks (this may be safely interrupted)...&lt;br /&gt;3757662 build (f16, gnuchess-6.0.1-1.fc16.src.rpm): free&lt;br /&gt;3757662 build (f16, gnuchess-6.0.1-1.fc16.src.rpm): free -&amp;gt; open (x86-07.phx2.fedoraproject.org)&lt;br /&gt;3757664 buildArch (gnuchess-6.0.1-1.fc16.src.rpm, i686): free&lt;br /&gt;3757663 buildArch (gnuchess-6.0.1-1.fc16.src.rpm, x86_64): free&lt;br /&gt;.............&lt;br /&gt;&lt;br /&gt;[kavi@localhost ~]$ &lt;strong&gt;koji build f16 --scratch rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;/strong&gt; &lt;br /&gt;Uploading srpm: rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;br /&gt;[====================================] 100% 00:00:01 257.82 KiB 148.14 KiB/sec&lt;br /&gt;Created task: 3757669&lt;br /&gt;Task info: &lt;a href=&quot;http://koji.fedoraproject.org/koji/taskinfo?taskID=3757669&quot;&gt;http://koji.fedoraproject.org/koji/taskinfo?taskID=3757669&lt;/a&gt;&lt;br /&gt;Watching tasks (this may be safely interrupted)...&lt;br /&gt;3757669 build (f16, units-1.88-1.fc16.src.rpm): free&lt;br /&gt;3757669 build (f16, units-1.88-1.fc16.src.rpm): free -&amp;gt; open (x86-17.phx2.fedoraproject.org)&lt;br /&gt;3757670 buildArch (units-1.88-1.fc16.src.rpm, x86_64): free&lt;br /&gt;3757671 buildArch (units-1.88-1.fc16.src.rpm, i686): free&lt;br /&gt;.............&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ARM architectures test:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[kavi@localhost ~]$ &lt;strong&gt;arm-koji build f16 --scratch rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;/strong&gt; &lt;br /&gt;Uploading srpm: rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;br /&gt;[====================================] 100% 00:00:00 257.82 KiB 369.41 KiB/sec&lt;br /&gt;Created task: 301295&lt;br /&gt;Task info: &lt;a href=&quot;http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=301295&quot;&gt;http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=301295&lt;/a&gt;&lt;br /&gt;Watching tasks (this may be safely interrupted)...&lt;br /&gt;301295 build (f16, units-1.88-1.fc16.src.rpm): free&lt;br /&gt;301295 build (f16, units-1.88-1.fc16.src.rpm): free -&amp;gt; open (cdot-panda-12-2-v7hl)&lt;br /&gt;301298 buildArch (units-1.88-1.fc16.src.rpm, armv5tel): free&lt;br /&gt;301297 buildArch (units-1.88-1.fc16.src.rpm, armv7hl): open (cdot-panda-12-2-v7hl)&lt;br /&gt;...........&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;s390 mainframe architectures tests:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[kavi@localhost ~]$ &lt;strong&gt;s390-koji build f16 --scratch rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;/strong&gt; &lt;br /&gt;Uploading srpm: rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;br /&gt;[====================================] 100% 00:00:01 257.82 KiB 151.44 KiB/sec&lt;br /&gt;Created task: 579714&lt;br /&gt;Task info: &lt;a href=&quot;http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=579714&quot;&gt;http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=579714&lt;/a&gt;&lt;br /&gt;Watching tasks (this may be safely interrupted)...&lt;br /&gt;579714 build (f16, units-1.88-1.fc16.src.rpm): free&lt;br /&gt;579714 build (f16, units-1.88-1.fc16.src.rpm): free -&amp;gt; open (fedora3.s390.bos.redhat.com)&lt;br /&gt;579716 buildArch (units-1.88-1.fc16.src.rpm, s390): free&lt;br /&gt;579717 buildArch (units-1.88-1.fc16.src.rpm, s390x): free&lt;br /&gt;...........&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Overall testing the BuildRequires using both Mock and Koji tools took me less than an hour for my two Source RPMs, which is gnuchess and units. Well for Koji tests the starting or uploading the SRPMs, since you do not have to wait until it finishes, I can say it is less than an hour. Moreover, all of my tests were successful, without any errors or failures, which is wonderful for me. For the koji tests you can visit the task links for each of the test and see the results. Both of the testing tools were fun to use, they were simple and straight forward, I liked the koji tool more, because you can test on different architectures and different Fedora distributions, which is more convenient for the packagers when the archs or the distro is not available with us for testing. Also, I like that how we are actually interacting with Fedora's server and Fedora. Again, the tools easy to use, and the results you get were detailed.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/3668150565378486510-6515142141761182982?l=kavisbr.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 17:43:24 +0000</pubDate>
	<author>noreply@blogger.com (Kavi Sri)</author>
</item>
<item>
	<title>Eugene Torre: Hello there and welcome to my SBR600 blog</title>
	<guid isPermaLink="false">tag:ejtorre.blog.ca,2012-02-06:/2012/02/06/hello-there-12668567/</guid>
	<link>http://rss.feedsportal.com/c/34009/f/617333/p/1/s/575ed9e0/l/0Lejtorre0Bblog0Bca0C20A120C0A20C0A60Chello0Ethere0E126685670C/story01.htm</link>
	<description>&lt;p&gt;Hi there,&lt;/p&gt; &lt;p&gt;I'm Eugene Torre, a sixth semester CTY student at Seneca College. Just so anyone reading my posts knows, I'm not really a fan of blogging, so please don't expect too much from me.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Seneca wiki page:&lt;/strong&gt; &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/User:Ejtorre&quot;&gt;http://zenit.senecac.on.ca/wiki/index.php/User:Ejtorre&lt;/a&gt;&lt;br /&gt; &lt;strong&gt;IRC nick:&lt;/strong&gt; Not currently set&lt;br /&gt; &lt;strong&gt;Learn ID:&lt;/strong&gt; ejtorre&lt;/p&gt; &lt;p&gt;I'm actually pretty interested in the Raspberry Pi project. The idea of having comparable to a home desktop computing anywhere you go in just the palm of your hand and at a fraction of the electrical power...&lt;br /&gt; I can't wait to see where this goes! &lt;/p&gt; &lt;p&gt; &lt;small&gt; &lt;a href=&quot;http://ejtorre.blog.ca/2012/02/06/hello-there-12668567/#comments&quot;&gt;Comments&lt;/a&gt; &lt;/small&gt; &lt;/p&gt; &lt;img src=&quot;http://rss.feedsportal.com/c/34009/f/617333/p/1/s/575ed9e0/mf.gif&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;&lt;div class=&quot;mf-viral&quot;&gt;&lt;table border=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;middle&quot;&gt;&lt;a href=&quot;http://share.feedsportal.com/viral/sendEmail.cfm?lang=en&amp;amp;title=Hello+there+and+welcome+to+my+SBR600+blog&amp;amp;link=http%3A%2F%2Fejtorre.blog.ca%2F2012%2F02%2F06%2Fhello-there-12668567%2F&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://res3.feedsportal.com/images/emailthis2.gif&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td valign=&quot;middle&quot;&gt;&lt;a href=&quot;http://res.feedsportal.com/viral/bookmark.cfm?title=Hello+there+and+welcome+to+my+SBR600+blog&amp;amp;link=http%3A%2F%2Fejtorre.blog.ca%2F2012%2F02%2F06%2Fhello-there-12668567%2F&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://res3.feedsportal.com/images/bookmark.gif&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://da.feedsportal.com/r/1465833952/u/57/f/617333/c/34009/s/1465833952/a2.htm&quot;&gt;&lt;img src=&quot;http://da.feedsportal.com/r/1465833952/u/57/f/617333/c/34009/s/1465833952/a2.img&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</description>
	<pubDate>Mon, 06 Feb 2012 09:51:40 +0000</pubDate>
</item>
<item>
	<title>Kavishankar Srivamathevan: RPM-Writing Lab</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-3668150565378486510.post-2228474423590039040</guid>
	<link>http://kavisbr.blogspot.com/2012/02/rpm-writing-lab.html</link>
	<description>&lt;div style=&quot;text-align: left;&quot; dir=&quot;ltr&quot;&gt;Here I am again, this time I will be creating a RPM. The purpose of this lab is to create a RPM package.&lt;br /&gt;&lt;br /&gt;As a requirement you should have the Fedora Packager and rpmlint utility tools packages installed.&lt;br /&gt;For each you can do this:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;yum groupinstall &quot;Fedora Packager&quot;&lt;/li&gt;&lt;li&gt;yum install rpmlint yum-utils&lt;/li&gt;&lt;/ul&gt;After you installed it, you can now proceed to the first step of building a RPM.&lt;br /&gt;First of all, you have to create rpmbuild directories. We can do this by using the following command:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;rpmdev-setuptree&lt;/li&gt;&lt;/ul&gt;The above command will create RPM build environment, meaning it will setup the directories structure to create the RPM, which is very useful instead of we creating the tree structure our self.&lt;br /&gt;&lt;br /&gt;Next, you would have the source code of the software that you want to create the RPM for, which is in the form of tarball. You should copy those tarballs into the &quot;rpmbuild/SOURCES&quot; directory. &lt;br /&gt;The &quot;rpmbuild&quot; directory will be located where ever you ran &quot;rpmdev-setuptree&quot; command. For instance, if you ran that command on your home directory then that folder will be on your home directory.&lt;br /&gt;&lt;br /&gt;After you moved the tarballs into the &quot;rpmbuild/SOURCES&quot; directory, you have to create the spec file for the rpm you want to build. The spec file is like the instruction for how to build the rpm.&lt;br /&gt;It contains information in the format of metadata and scripting, which is need for building a RPM.&lt;br /&gt;&lt;br /&gt;You can get a sample format of the spec file by using the command &quot;rpmdev-newspec samplePackage&quot;. The command will create a empty skeleton spec file. Then, in that file you can edit it to match your package's preferences. For example, you have to specify the package name, version, requirements for building the package, like need have gcc compiler installed, and so forth.&lt;br /&gt;&lt;br /&gt;Okay, so now you have a empty spec file, so okay go ahead and edit it and fill in all of the required sections.&lt;br /&gt;&lt;br /&gt;I used the &lt;strong&gt;gnuchess&lt;/strong&gt; and &lt;strong&gt;units&lt;/strong&gt; software for practise building RPMs. You can find the source code tarball for them &lt;a href=&quot;http://www.gnu.org/software/software.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here is what I have in my spec file:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size: large;&quot;&gt;For the gnuchess software:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;[kavi@localhost SPECS]$ cat gnuchess.spec&lt;br /&gt;Name:           gnuchess&lt;br /&gt;Version:        6.0.1&lt;br /&gt;Release:        1%{?dist}&lt;br /&gt;Summary:        A full game of chess&lt;br /&gt;&lt;br /&gt;License:        GPLv3&lt;br /&gt;URL:            http://www.gnu.org/software/chess/&lt;br /&gt;Source0:        http://ftp.gnu.org/pub/gnu/chess/gnuchess-6.0.1.tar.gz&lt;br /&gt;&lt;br /&gt;#BuildRequires:  &lt;br /&gt;#Requires:       &lt;br /&gt;&lt;br /&gt;%description&lt;br /&gt;GNU Chess lets most modern computers play a full game of chess&lt;br /&gt;&lt;br /&gt;%prep&lt;br /&gt;%setup -q&lt;br /&gt;&lt;br /&gt;%build&lt;br /&gt;%configure&lt;br /&gt;make %{?_smp_mflags}&lt;br /&gt;&lt;br /&gt;%install&lt;br /&gt;rm -rf $RPM_BUILD_ROOT&lt;br /&gt;make install DESTDIR=$RPM_BUILD_ROOT&lt;br /&gt;&lt;br /&gt;%files&lt;br /&gt;%doc README&lt;br /&gt;%{_bindir}/*&lt;br /&gt;%{_datadir}/*&lt;br /&gt;%{_infodir}/*&lt;br /&gt;&lt;br /&gt;%changelog&lt;br /&gt;* Wed Feb 01 2012 Kavi Sri 6.0.1&lt;br /&gt;- Build a RPM for SBR600 Lab&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size: large;&quot;&gt;For the units software:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;[kavi@localhost SPECS]$ cat units.spec&lt;br /&gt;Name:           units&lt;br /&gt;Version:        1.88&lt;br /&gt;Release:        1%{?dist}&lt;br /&gt;Summary:        Converts scales&lt;br /&gt;&lt;br /&gt;License:        GPLv3&lt;br /&gt;URL:            http://www.gnu.org/software/units/&lt;br /&gt;Source0:        http://ftp.gnu.org/gnu/units/units-1.88.tar.gz&lt;br /&gt;&lt;br /&gt;BuildRequires:   gcc &lt;br /&gt;Requires(post):  info&lt;br /&gt;Requires(preun): info&lt;br /&gt;&lt;br /&gt;%description&lt;br /&gt;Units program converts scales to their equivalents in other scales.&lt;br /&gt;&lt;br /&gt;%prep&lt;br /&gt;%setup -q&lt;br /&gt;&lt;br /&gt;%build&lt;br /&gt;%configure&lt;br /&gt;make %{?_smp_mflags}&lt;br /&gt;&lt;br /&gt;%post&lt;br /&gt;/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :&lt;br /&gt;&lt;br /&gt;%preun&lt;br /&gt;if [ $1 = 0 ] ; then&lt;br /&gt;/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;%install&lt;br /&gt;rm -rf $RPM_BUILD_ROOT&lt;br /&gt;make install DESTDIR=$RPM_BUILD_ROOT&lt;br /&gt;&lt;br /&gt;%files&lt;br /&gt;%doc README&lt;br /&gt;/usr/bin/units&lt;br /&gt;/usr/share/info/units.info.gz&lt;br /&gt;/usr/share/man/man1/units.1.gz&lt;br /&gt;/usr/share/units.dat&lt;br /&gt;&lt;br /&gt;%changelog&lt;br /&gt;* Wed Feb 01 2012 Kavi Sri 1.88-1&lt;br /&gt;- Build a RPM for SBR600 Lab&lt;br /&gt;[kavi@localhost SPECS]$ &lt;br /&gt;&lt;br /&gt;Also here is the links for my spec file, so you can just download it.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://docs.google.com/open?id=0B16_MaSRj_byMjFkYjMyNzYtZTlhYi00YTQ3LWJkOTUtNmUwN2FlMDYwZmU3&quot; target=&quot;_blank&quot;&gt;For the gnuchess software&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://docs.google.com/open?id=0B16_MaSRj_byOGE5ZjY0MzItNjM0OC00NzNiLTkxMjQtMzc0NmYzMWJlOTNj&quot; target=&quot;_blank&quot;&gt;For the units software&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;As you can see my spec files, I did not change some of the contents, from the skeleton spec file.&lt;br /&gt;&lt;br /&gt;After you have done editing the spec file, now you go to the next step, which is building the RPM.&lt;br /&gt;You can do that by running this command:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;rpmbuild -ba nameOf-ThePackage.spec&lt;/li&gt;&lt;/ul&gt;Do not worry if you were not successful at the beginning, I wasn't either.&lt;br /&gt;Well the error for me was that it found files that was unpackaged. For that all I have to is to get that list of files that was outputted and then put it into the spec file of that software. In there, you have to put it under the %files section. Beware, as you can see my spec files that one of them just have the files list and the other one has some thing like environment variables, well these are called macros. For you to implement this on your %files section go to this &lt;a href=&quot;http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo#Macros&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; and find the macros you need and include it in your spec file. When your build is successful, the binary RPMs will be placed in &quot;rpmbuild/RPMS&quot; and the source RPM will be located in &quot;rpmbuild/SRPMS&quot; directory.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hooray!!! &lt;/strong&gt;I successfully build the RPMs, and hope you have successfully created the RPM.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here is some portions of my attempts on building the RPMs:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Requires(rpmlib): rpmlib(CompressedFileNames) &amp;lt;= 3.0.4-1 rpmlib(FileDigests) &amp;lt;= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) &amp;lt;= 4.0-1&lt;br /&gt;Requires: /bin/sh libc.so.6()(64bit) libc.so.6(GLIBC_2.11)(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.15)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.7)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libncurses.so.5()(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.2)(64bit) libreadline.so.6()(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libtinfo.so.5()(64bit) rtld(GNU_HASH)&lt;br /&gt;Processing files: gnuchess-debuginfo-6.0.1-1.fc16.x86_64&lt;br /&gt;Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/kavi/rpmbuild/BUILDROOT/gnuchess-6.0.1-1.fc16.x86_64&lt;br /&gt;Wrote: /home/kavi/rpmbuild/SRPMS/gnuchess-6.0.1-1.fc16.src.rpm&lt;br /&gt;Wrote: /home/kavi/rpmbuild/RPMS/x86_64/gnuchess-6.0.1-1.fc16.x86_64.rpm&lt;br /&gt;Wrote: /home/kavi/rpmbuild/RPMS/x86_64/gnuchess-debuginfo-6.0.1-1.fc16.x86_64.rpm&lt;br /&gt;Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.bJGAcs&lt;br /&gt;+ umask 022&lt;br /&gt;+ cd /home/kavi/rpmbuild/BUILD&lt;br /&gt;+ cd gnuchess-6.0.1&lt;br /&gt;+ /bin/rm -rf /home/kavi/rpmbuild/BUILDROOT/gnuchess-6.0.1-1.fc16.x86_64&lt;br /&gt;+ exit 0&lt;br /&gt;[kavi@localhost SPECS]$&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/kavi/rpmbuild/BUILDROOT/units-1.88-1.fc16.x86_64&lt;br /&gt;Wrote: /home/kavi/rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm&lt;br /&gt;Wrote: /home/kavi/rpmbuild/RPMS/x86_64/units-1.88-1.fc16.x86_64.rpm&lt;br /&gt;Wrote: /home/kavi/rpmbuild/RPMS/x86_64/units-debuginfo-1.88-1.fc16.x86_64.rpm&lt;br /&gt;Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.MpUwA5&lt;br /&gt;+ umask 022&lt;br /&gt;+ cd /home/kavi/rpmbuild/BUILD&lt;br /&gt;+ cd units-1.88&lt;br /&gt;+ /bin/rm -rf /home/kavi/rpmbuild/BUILDROOT/units-1.88-1.fc16.x86_64&lt;br /&gt;+ exit 0&lt;br /&gt;[kavi@localhost SPECS]$&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here you can see I have my successfully build RPMs:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;├── BUILDROOT&lt;br /&gt;&lt;strong&gt;├── RPMS&lt;/strong&gt;&lt;br /&gt;│   └── x86_64&lt;br /&gt;&lt;strong&gt;│       ├── gnuchess-6.0.1-1.fc16.x86_64.rpm&lt;/strong&gt;&lt;br /&gt;│       ├── gnuchess-debuginfo-6.0.1-1.fc16.x86_64.rpm&lt;br /&gt;&lt;strong&gt;│       ├── units-1.88-1.fc16.x86_64.rpm&lt;/strong&gt;&lt;br /&gt;│       └── units-debuginfo-1.88-1.fc16.x86_64.rpm&lt;br /&gt;├── SOURCES&lt;br /&gt;│   ├── gnuchess-6.0.1.tar.gz&lt;br /&gt;│   └── units-1.88.tar.gz&lt;br /&gt;├── SPECS&lt;br /&gt;│   ├── gnuchess.spec&lt;br /&gt;│   ├── gnuchess.spec.bak&lt;br /&gt;│   ├── units.spec&lt;br /&gt;│   └── units.spec~&lt;br /&gt;&lt;strong&gt;└── SRPMS&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;├── gnuchess-6.0.1-1.fc16.src.rpm&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;    └── units-1.88-1.fc16.src.rpm&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Also here is the &lt;/strong&gt;&lt;a href=&quot;https://docs.google.com/open?id=0B16_MaSRj_byNjdjNzQ3NTQtYzUzYS00MDdjLWE3M2EtZTA4YzI3NDcwMjI3&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;link&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; where you can grab my SRPMs and RPMs files.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;After you have done building the RPMs successfully, we have to test them.&lt;br /&gt;For that we can use the rpm lint tool by using the command &quot;rpmlint&quot;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using the rpmlint tool I tested my spec file, the SRPMs, and the RPMs, and you can see the outputs I got below:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[kavi@localhost SPECS]$ rpmlint gnuchess.spec&lt;br /&gt;0 packages and 1 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;&lt;br /&gt;[kavi@localhost SPECS]$ rpmlint ../SRPMS/gnuchess-6.0.1-1.fc16.src.rpm &lt;br /&gt;1 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;&lt;br /&gt;[kavi@localhost SPECS]$ rpmlint ../RPMS/x86_64/gnuchess-6.0.1-1.fc16.x86_64.rpm &lt;br /&gt;gnuchess.x86_64: W: incoherent-version-in-changelog 6.0.1 ['6.0.1-1.fc16', '6.0.1-1']&lt;br /&gt;gnuchess.x86_64: W: invalid-license GNU General Public License&lt;br /&gt;gnuchess.x86_64: E: standard-dir-owned-by-package /usr/share/info&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postin /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postun /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: W: file-not-utf8 /usr/share/info/gnuchess.info.gz&lt;br /&gt;gnuchess.x86_64: E: info-dir-file /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessu&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchess&lt;br /&gt;gnuchess.x86_64: W: no-manual-page-for-binary gnuchessx&lt;br /&gt;1 packages and 0 specfiles checked; 6 errors, 6 warnings.&lt;br /&gt;[kavi@localhost SPECS]$ &lt;br /&gt;&lt;br /&gt;I got the same results for testing the each software's spec file, SRPM, and RPM from testing using the rpmlint tool. One of the package's result you can see above, which is the gnuchess program.&lt;br /&gt;&lt;br /&gt;I found the solution for those errors right on this &lt;a href=&quot;http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Texinfo&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;.&lt;br /&gt;To be clear, the fix I did was just copy that small script and then paste in to my each spec file to the appropriate sections. In this &lt;a href=&quot;http://fedoraproject.org/wiki/Packaging:ScriptletSnippets&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; you can find all other common issues and to fix them.&lt;br /&gt;&lt;br /&gt;After doing the fix I tested again with the rpmlint tool again and you can see below for my results:&lt;br /&gt;&lt;br /&gt;[kavi@localhost SPECS]$ rpmlint ~/rpmbuild/SPECS/units.spec &lt;br /&gt;0 packages and 1 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;&lt;br /&gt;[kavi@localhost SPECS]$ rpmlint ~/rpmbuild/SRPMS/units-1.88-1.fc16.src.rpm &lt;br /&gt;1 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;&lt;br /&gt;[kavi@localhost SPECS]$ rpmlint ~/rpmbuild/RPMS/x86_64/units-1.88-1.fc16.x86_64.rpm &lt;br /&gt;1 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;br /&gt;[kavi@localhost SPECS]$&lt;br /&gt;&lt;br /&gt;As you can see no errors, now I really have proper spec file, SRPMs and binary RPMs for each of my softwares. The whole procedure took me in total more than five hours, but without any errors it should be done faster like in less than an hour for both of my software.&lt;br /&gt;&lt;br /&gt;Again here are some links that really helped me, will also help and guide you through building a RPM, a successful one, as you can see, I have successfully build two using them. The bold ones are good.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/Category:RPM&quot; target=&quot;_blank&quot;&gt;Wiki pages on RPM&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo&quot;&gt;&lt;strong&gt;Creating a Package&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/Packaging:ScriptletSnippets&quot;&gt;&lt;strong&gt;Scriptlet and Snippets for to include in your spec file.&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/Common_Rpmlint_issues&quot;&gt;Common Rpmlint issues&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/SBR600_RPM-Writing_Lab&quot;&gt;SBR600 RPM Writing Lab&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Thank You,&lt;br /&gt;Cheers.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/3668150565378486510-2228474423590039040?l=kavisbr.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 05:43:51 +0000</pubDate>
	<author>noreply@blogger.com (Kavi Sri)</author>
</item>
<item>
	<title>Diogo Golovanevsky Monteiro: Contributing to an open source project</title>
	<guid isPermaLink="false">http://diogogmt.wordpress.com/?p=629</guid>
	<link>http://diogogmt.wordpress.com/2012/02/06/contributing-to-an-open-source-project/</link>
	<description>&lt;p&gt;Today I was able to put in practice all the tools I learned last semester in the &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/DPS909&quot;&gt;DPS 909 – Topics in Open Source Development&lt;/a&gt; class&lt;/p&gt;
&lt;h3&gt;The Problem&lt;/h3&gt;
&lt;p&gt;In a project for a class I’m taking this semester, I was working on writing the validation portion for the mongoose schemas for one of the collections being used&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;  User = new Schema({
    'username': {
      type: String,
      validate: [validateUsername, 'username not valid'],
    },
  });
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It’s defening a validator for username, so when saving a User object:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;var user = new User();
user.save(function(err) {

}
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It will call validateUsername on username and if the validation fails the object won’t be saved and the err will have the information about the error.&lt;br /&gt;
&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;{ message: 'Validation failed',
  name: 'ValidationError',
  errors: 
   { username: 
      { message: 'Validator &quot;username not valid&quot; failed for path username',
        name: 'ValidatorError',
        path: 'username',
        type: 'username not valid' 
      } 
   } 
}
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So my problem was that I wanted to add more than one validator to a single field&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;  User = new Schema({
    'username': {
      type: String,
      validate: [validateUsername, 'username not valid'], [validator2, 'second validator'],
    },
  });
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However that didn’t work.&lt;br /&gt;
I went back to the mongoose documentation but couldn’t find a way to attach two validators to a single field.&lt;/p&gt;
&lt;p&gt;So I was faced with two options, accept the facts and move on, or try to modify the library&lt;br /&gt;
Mongoose is an open source library, so I started reading the source code trying to find a way to accomplish my goal.&lt;/p&gt;
&lt;p&gt;Because the source code is very organized and easy to read it didn’t take me long to find where a shchema field was being created.&lt;/p&gt;
&lt;p&gt;A schema field is defined in the &lt;a href=&quot;https://github.com/LearnBoost/mongoose/blob/master/lib/schematype.js&quot;&gt;schematype.js&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;function SchemaType (path, options, instance) {
  this.path = path;
  this.instance = instance;
  this.validators = [];
  this.setters = [];
  this.getters = [];
  this.options = options;
  this._index = null;

  for (var i in options) if (this[i] &amp;amp;&amp;amp; 'function' == typeof this[i]) {
    var opts = Array.isArray(options[i])
      ? options[i]
      : [options[i]];

    this[i].apply(this, opts);
  }
};
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;path&lt;/strong&gt; is the name of the field&lt;br /&gt;
&lt;strong&gt;options&lt;/strong&gt; is an object cointaining all the options for the field&lt;br /&gt;
&lt;strong&gt;instance&lt;/strong&gt; is the type of the field&lt;br /&gt;
for example:&lt;br /&gt;
&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;path: username
instance: String
options: { 
  type: [Function: String],
  validate: [ [Function: validateUsername], 'username not valid' ],
}
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The for loop iterates through all the options and calls the appropiate function depending on the property&lt;br /&gt;
So using the example above, &lt;em&gt;‘i’&lt;/em&gt; would be equal to &lt;em&gt;‘validate’&lt;/em&gt;.&lt;br /&gt;
So calling this[i].apply(this, opts)&lt;br /&gt;
would be the same as calling&lt;br /&gt;
this.validate([Function: validateUsername], ‘username not valid’)&lt;/p&gt;
&lt;p&gt;Here is the part where the validator gets added to the field&lt;br /&gt;
&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;SchemaType.prototype.validate = function (obj, error) {
  this.validators.push([obj, error]);
  return this;
};
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Pretty straight forward, it pushes the function and the error to the validators array.&lt;br /&gt;
But I wanted to pass more than just one function and error.&lt;/p&gt;
&lt;h3&gt;The Solution&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;SchemaType.prototype.validate = function (obj, error) {
  if ('function' == typeof obj &amp;amp;&amp;amp; 'string' == typeof error) {
    this.validators.push([obj, error]);  
  }
  else {
    for (var i in arguments) {
      this.validators.push([arguments[i].func, arguments[i].error]);
    }
  }
  return this;
};
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So if I defined more than one validator for a single field in the schema, the arguments var for the validate method would look something like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;arguments:  { '0': { func: [Function: trim], error: 'trim error' },
  '1': { func: [Function: validateEmail], error: 'email error' } }
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However I couldn’t just break the existing code, so I added a check to see if there was more than one validator before pushing to the validator array&lt;/p&gt;
&lt;p&gt;In the end, the solution worked.&lt;br /&gt;
So I created a patch and opened a ticket on the mongoose repo to discuss the issue.&lt;br /&gt;
I’m not sure if the change will be accepted in the project, but it was nice to see that I can actually modify the library if nedded&lt;/p&gt;
&lt;p&gt;**After going over one more time through the documentation I found a different way to add multiple validators&lt;br /&gt;
&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;User.path('username').validate(function (v) {
  return false;
  }, 'my error type'); 
  User.path('username').validate(function (v) {
    return true;
  }, 'another error');
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It calls the validate function explicity on the field, allowing multiple validators to be added&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/diogogmt.wordpress.com/629/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/diogogmt.wordpress.com/629/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=diogogmt.wordpress.com&amp;amp;blog=19981611&amp;amp;post=629&amp;amp;subd=diogogmt&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Mon, 06 Feb 2012 05:39:17 +0000</pubDate>
</item>
<item>
	<title>Nam Nguyen: Build from Source Code</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-4269293029556667912.post-3119190902684866421</guid>
	<link>http://namsbloging.blogspot.com/2012/01/build-from-source-code.html</link>
	<description>I regularly install software by downloading a file and then running the installer, In this post I'll share my experience &lt;b&gt;building&lt;/b&gt; two software packages to install on my Fedora system through the build process. When building packages, there are some that are easier and some harder packages to build as I found out.&lt;br /&gt;&lt;br /&gt;First, I downloaded a group of development tools and development libraries using yum.&lt;br /&gt;&lt;b&gt;yum groupinstall &quot;Development Tools&quot; &quot;Development Libraries&quot; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;From there I went to the &lt;a href=&quot;http://www.gnu.org/software/software.html#allgnupkgs&quot;&gt;GNU software collection&lt;/a&gt; where I selected many packages to try and build. Some packages were harder to build as I experienced when configuring the source code. The reason for this was that some of those packages required other packages which I did not have and so caused an error!. One of those errors when configuring was from not having &quot;GTK+&quot; which is the Gimp Tool Kit.&lt;br /&gt;&lt;br /&gt;Two software packages that was fairly easy to build that I installed are: &lt;br /&gt;&lt;b&gt;barcode &lt;/b&gt;&lt;a href=&quot;ftp://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz&quot;&gt;ftp://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;b&gt;gnuchess&lt;/b&gt; &lt;a href=&quot;http://ftp.gnu.org/pub/gnu/chess/gnuchess-6.0.1.tar.gz&quot;&gt;http://ftp.gnu.org/pub/gnu/chess/gnuchess-6.0.1.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The command to download from command line using &quot;&lt;i&gt;wget&lt;/i&gt;&quot;&lt;br /&gt;&lt;b&gt;wget ftp://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz&lt;/b&gt;&lt;br /&gt;&lt;b&gt;wget http://ftp.gnu.org/pub/gnu/chess/gnuchess-6.0.1.tar.gz&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After downloading these two tarball files, I unzipped them using &quot;&lt;i&gt;tar&lt;/i&gt;&quot; with the options &quot;&lt;i&gt;xvzf&lt;/i&gt;&quot;&lt;b&gt; &lt;/b&gt;for extract,verbose,gzip and file.&lt;br /&gt;&lt;b&gt;tar xvzf &lt;/b&gt;&lt;b&gt;barcode-0.98.tar.gz&lt;/b&gt;&lt;br /&gt;&lt;b&gt;tar xvzf gnuchess-6.0.1.tar.gz&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://1.bp.blogspot.com/-j9B_letcUuw/TyDZC6rbeuI/AAAAAAAAAAU/hU8ZRpPxiqA/s1600/Screenshot+at+2012-01-25+23%253A33%253A16.png&quot;&gt;&lt;img src=&quot;http://1.bp.blogspot.com/-j9B_letcUuw/TyDZC6rbeuI/AAAAAAAAAAU/hU8ZRpPxiqA/s320/Screenshot+at+2012-01-25+23%253A33%253A16.png&quot; height=&quot;185&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;This is what the tarball files looks like in red and the blue folder is whats created after using tar. &lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then change to the new directory with the &lt;b&gt;cd&lt;/b&gt; command. Within the new directory there is a script called &lt;b&gt;configure&lt;/b&gt; that will configure the build. I ran the script by entering &lt;b&gt;./configure&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After the script ran with no errors I used the &lt;b&gt;time&lt;/b&gt; command with the &lt;b&gt;make&lt;/b&gt; script to build the software. The result of &lt;b&gt;time make&lt;/b&gt; for both packages&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-GINuDkjCHYE/TyDfdpJsJZI/AAAAAAAAAAc/2aMLqVMou6M/s1600/Screenshot+at+2012-01-26+00%253A06%253A26.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-GINuDkjCHYE/TyDfdpJsJZI/AAAAAAAAAAc/2aMLqVMou6M/s320/Screenshot+at+2012-01-26+00%253A06%253A26.png&quot; height=&quot;185&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;barcode&lt;/b&gt;&lt;br /&gt;real    0m2.316s&lt;br /&gt;user    0m1.353s&lt;br /&gt;sys    0m0.299s&lt;br /&gt;&lt;br /&gt;&lt;b&gt;gnuchess&lt;/b&gt;&lt;br /&gt;real    0m2.806s&lt;br /&gt;user    0m0.387s&lt;br /&gt;sys    0m0.374s&lt;br /&gt;&lt;br /&gt;After make ran successful, I entered &lt;b&gt;make install &lt;/b&gt;to install the software. Finally to test that these builds are successful, I entered &lt;b&gt;gnuchess&lt;/b&gt; and &lt;b&gt;barcode&lt;/b&gt; from the command line to have these packages run.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/4269293029556667912-3119190902684866421?l=namsbloging.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 05:09:17 +0000</pubDate>
	<author>noreply@blogger.com (namnguyen)</author>
</item>
<item>
	<title>Nam Nguyen: RPM Writing</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-4269293029556667912.post-3239748671830736208</guid>
	<link>http://namsbloging.blogspot.com/2012/02/rpm-writing.html</link>
	<description>Writing my first RPM was a rough and interesting process which required some effort put into build and testing. For this post I will explain the steps I took to write and build an rpm successfully. The &lt;b&gt;RPM Package Manager&lt;/b&gt; (RPM) will contain a compiled version of software, which for me was the gnuchess software package.&lt;br /&gt;&lt;br /&gt;There are some preparations we will have to do before we can start building RPM packages.&lt;br /&gt;&lt;br /&gt;packages that we will require and need to install using yum command&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;b&gt;yum groupinstall &quot;Fedora Packager&quot;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;yum install rpmlint yum-utils&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;next we will create the &lt;i&gt;~/rpmbuild&lt;/i&gt; directory which also creates six subdirectories within &lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://4.bp.blogspot.com/-q2Zi0rbqXyM/Ty9ObBYO5JI/AAAAAAAAAAk/kBrNP1kTTeQ/s1600/rpmbuild+chart.png&quot;&gt;&lt;img src=&quot;http://4.bp.blogspot.com/-q2Zi0rbqXyM/Ty9ObBYO5JI/AAAAAAAAAAk/kBrNP1kTTeQ/s400/rpmbuild+chart.png&quot; height=&quot;101&quot; border=&quot;0&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;The command to create ~/rpmbuild will also create ~/.rpmmacros file alongside, entering the one single command will create all this &lt;br /&gt;&lt;b&gt;rpmdev-setuptree &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;note&lt;/i&gt;: To clean out dev directories, we can use command &lt;b&gt;rpmdev-wipetree&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now that we have the required packages installed and directories created we can start building our RPM package!!!&lt;br /&gt;&lt;br /&gt;First we will put the source code in the form of a tarball in &lt;i&gt;~/rpmbuild/SOURCES&lt;/i&gt; directory, my tarball was &lt;b&gt;&lt;/b&gt;&lt;a href=&quot;http://ftp.gnu.org/pub/gnu/chess/gnuchess-6.0.1.tar.gz&quot;&gt;gnuchess-6.0.1.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once this is done, we will change directory to &lt;i&gt;~/rpmbuild/SPECS&lt;/i&gt; to create an empty skeleton spec file. The &lt;b&gt;spec file&lt;/b&gt; is essentially important as it defines the RPM we are building by containing metadata and scripting necessary for the build. We will create the skeleton spec file with the command&lt;br /&gt;&lt;b&gt;rpmdev-newspec nameofPackage &lt;/b&gt;example of name is &lt;i&gt;gnuchess.spec&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;We can attempt to build our package right now with the command&lt;br /&gt;&lt;b&gt;rpmbuild -ba gnuchess.spec &lt;/b&gt;where -ba is for build all. However it's certain to get several errors as there is nothing written in the spec files eight sections.&lt;br /&gt;&lt;br /&gt;I found this part of writing rpm to be the most challenging as using the rpmbuild command countless times had produce errors seen below&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;error: Installed (but unpackaged) file(s) found:&lt;br /&gt;   /usr/bin/gnuchess&lt;br /&gt;   /usr/bin/gnuchessu&lt;br /&gt;   /usr/bin/gnuchessx&lt;br /&gt;   /usr/share/gnuchess/book.bin&lt;br /&gt;   /usr/share/gnuchess/gnuchess.ini&lt;br /&gt;   /usr/share/info/dir&lt;br /&gt;   /usr/share/info/gnuchess.info.gz&lt;br /&gt;&lt;br /&gt;RPM build errors:&lt;br /&gt;    Installed (but unpackaged) file(s) found:&lt;br /&gt;   /usr/bin/gnuchess&lt;br /&gt;   /usr/bin/gnuchessu&lt;br /&gt;   /usr/bin/gnuchessx&lt;br /&gt;   /usr/share/gnuchess/book.bin&lt;br /&gt;   /usr/share/gnuchess/gnuchess.ini&lt;br /&gt;   /usr/share/info/dir&lt;br /&gt;   /usr/share/info/gnuchess.info.gz&lt;br /&gt;  &lt;br /&gt;After a little bit of searching on the web I found the problem to be that I have not included these files in my spec file. The solution I found to this was to include n my &lt;b&gt;%files&lt;/b&gt; section of my spec file which was empty&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-zcIwDykRQiQ/Ty9ZCe8ZvFI/AAAAAAAAAAs/qU4ZXWHRVKI/s1600/Screenshot+at+2012-02-05+23:37:09.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-zcIwDykRQiQ/Ty9ZCe8ZvFI/AAAAAAAAAAs/qU4ZXWHRVKI/s320/Screenshot+at+2012-02-05+23:37:09.png&quot; height=&quot;219&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;%defattr(-,root,root,-)&lt;br /&gt;%{_bindir}/*&lt;br /&gt;%{_infodir}/*&lt;br /&gt;/usr/share/gnuchess&lt;br /&gt;&lt;br /&gt;&lt;i&gt;note&lt;/i&gt;: This line will differ depending on the package that you are trying to build&lt;br /&gt;&lt;br /&gt;After including these lines I re-ran &lt;b&gt;rpmbuild&lt;/b&gt; &lt;b&gt;-ba gnuchess.spec &lt;/b&gt;and finally created my RPM successfully as the command did not produce any errors and last line returned an exit status 0. To confirm I checked the RPMS folder for the binary rpm and the SRPMS for the source RPM to confirm the builds success as shown from the print screen of my terminal above.&lt;br /&gt;&lt;br /&gt;We have now got a RPM created and in my next post I will be testing it with &lt;b&gt;rpmlint&lt;/b&gt; for errors and warnings. This process I would say took me a good couple of hours to get to this stage as it involved some reading on spec file and testing. I have included some links that I found helpful to understand rpm's and also spec files and their sections.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ibm.com/developerworks/library/l-rpm1/&quot;&gt;packaging software with RPM from ibm.com&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/How_to_create_an_RPM_package#Creating_a_spec_file&quot;&gt;how to create Spec file from fedoraproject.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html&quot;&gt;creating spec file from rpm.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/4269293029556667912-3239748671830736208?l=namsbloging.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 04:59:27 +0000</pubDate>
	<author>noreply@blogger.com (namnguyen)</author>
</item>
<item>
	<title>Chris Choo: Mock and Koji</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-3683112655067317571.post-7651447524900236938</guid>
	<link>http://cchoo2.blogspot.com/2012/02/mock-and-koji.html</link>
	<description>Today in this post I will be talking about my experience using Mock and Koji. What these two tools do, Mock test the build requires section of the rpm and does a test install in a chroot environment that only test the basic build packages, while Koji is a client-server system that allows you to build in the Fedora farm, it lets you test your package on different architectures.&lt;br /&gt;&lt;br /&gt;Starting off with my Mock testing I tested my package on Fedora 15+16 x86_64 distributions, here are my test results:&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;mock -r fedora-16-x86_64 m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;INFO: Done(m4-1.4.16-1.fc16.src.rpm) Config(fedora-16-x86_64) 2 minutes 16 seconds&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;INFO: Results and/or logs in: /var/lib/mock/fedora-16-x86_64/result&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;State Changed: end&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;mock -r fedora-15-x86_64 m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;INFO: Done(m4-1.4.16-1.fc16.src.rpm) Config(fedora-15-x86_64) 3 minutes 36 seconds&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;INFO: Results and/or logs in: /var/lib/mock/fedora-15-x86_64/result&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;State Changed: end&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;both test passed without any errors and didn't take too long to complete, overall everything went okay with Mock.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now moving on to Koji I had to do some initial setup before I was able to use it. First I needed to install this&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;yum install fedora-packager&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;then run this script&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;/usr/bin/fedora-packager-setup&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;what this script does is links your FAS account to the system you are using by making certificates on that system, it also makes a SSL certificate so you can login to the web interface of each Fedora testing farm. After running the setup and adding my SSL certificate to my web browser I was now able to start my testing in Koji, below are my testing in different architectures:&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Primary x86_64&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[chris@localhost ~]$ koji build f16 --scratch ~/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Uploading srpm: /home/chris/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[====================================] 100% 00:00:04   1.58 MiB 397.33 KiB/sec&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Created task: 3753781&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=3753781&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Watching tasks (this may be safely interrupted)...&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://koji.fedoraproject.org/koji/taskinfo?taskID=3753781&quot;&gt;http://koji.fedoraproject.org/koji/taskinfo?taskID=3753781&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;S390 Mainframe&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[chris@localhost ~]$ s390-koji build f16 --scratch ~/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Uploading srpm: /home/chris/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[====================================] 100% 00:00:04   1.58 MiB 371.75 KiB/sec&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Created task: 576359&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Task info: http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=576359&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Watching tasks (this may be safely interrupted)...&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=576359&quot;&gt;http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=576359&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;ARM Architectures&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[chris@localhost Downloads]$ arm-koji build f16 --scratch m4-1.4.16-1.fc16.src.rpm &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Uploading srpm: m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[====================================] 100% 00:00:28   1.58 MiB  56.60 KiB/sec&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Created task: 321412&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Task info: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=321412&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Watching tasks (this may be safely interrupted)...&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=321412&quot;&gt;http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=321412&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;PowerPC Architecture &lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[chris@localhost Downloads]$ ppc-koji build f17 --scratch m4-1.4.16-1.fc16.src.rpm &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Uploading srpm: m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[====================================] 100% 00:00:31   1.58 MiB  50.62 KiB/sec&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Created task: 366482&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Task info: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=366482&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Watching tasks (this may be safely interrupted)...&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=366482&quot;&gt;http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=366482&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;all of my test passed and was able to see them using the web interface and the command line, most of the builds took around the same time since I had to wait for each of my task to get into queue to be completed, in the end they all finished.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Going through and using Mock and Koji I found that these are great tools to use for testing your RPM packages to find any errors or compatibility issues on different architectures. The overall process of getting these tools to run was very simple and easy to use. In the end I had a great experience using Mock and Koji, I like the fact that Mock lets us test our RPM in a chroot environment so we don't mess anything up and Koji is great because we get to test on all kinds of architectures if we don't have physical access to those types of systems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/3683112655067317571-7651447524900236938?l=cchoo2.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 04:49:13 +0000</pubDate>
	<author>noreply@blogger.com (Chris Choo)</author>
</item>
<item>
	<title>Chris Choo: RPM Building Part 2</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-3683112655067317571.post-3535898524439197525</guid>
	<link>http://cchoo2.blogspot.com/2012/01/rpm-building-part-2.html</link>
	<description>Okay, leaving my proxyknife rpm build in the back burner for now I am going to jump to my other source program and give it a shot at building an RPM for it.&lt;br /&gt;&lt;br /&gt;Now the second program that I am using it M4, pretty much following the same steps from my previous post on proxykinfe I did the same configuration and steps to start my rpm build. Keeping my spec file for proxykinfe, I rebuilt the setuptree so I have a clean directory to work with. Now issuing these commands as before&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;- cp m4-1.4.16.tar.gz ~/rpmbuild/SOURCE&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;- cd ~/rpmbuild/SPECS&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;- rpmdev-newspec m4&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;- rpmbuild -ba m4.spec&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;After editing the spec file and running the rpmbuild command it started to build, and m4 took a long time compared to proxykinfe, none the less it finished and yet again I got errors again. :( Here are the errors that I got this time around.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;error: Installed (but unpackaged) file(s) found:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/bin/m4&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/dir&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/m4.info-1.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/m4.info-2.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/m4.info.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/man/man1/m4.1.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;RPM build errors:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;    Installed (but unpackaged) file(s) found:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/bin/m4&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/dir&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/m4.info-1.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/m4.info-2.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/info/m4.info.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;   /usr/share/man/man1/m4.1.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So after looking it over and doing some research, I found that the error was telling me that I didn't put any files into the RPM! Knowing that I added these lines to the &lt;b&gt;&lt;i&gt;%file&lt;/i&gt;&lt;/b&gt; section to test and the result...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Wrote: /home/chris/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Wrote: /home/chris/rpmbuild/RPMS/x86_64/m4-1.4.16-1.fc16.x86_64.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Wrote: /home/chris/rpmbuild/RPMS/x86_64/m4-debuginfo-1.4.16-1.fc16.x86_64.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.GfdUJw&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;+ umask 022&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;+ cd /home/chris/rpmbuild/BUILD&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;+ cd m4-1.4.16&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;+ /bin/rm -rf /home/chris/rpmbuild/BUILDROOT/m4-1.4.16-1.fc16.x86_64&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;+ exit 0&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Success!! Finally I got an RPM made, but copying all thoes files all the time when you make a RPM can be time consuming, after doing some more research I found easy to use macros to reduce similar lines&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;%files&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;%doc&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;%{_bindir}/*&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;%{_infodir}/*&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;%{_mandir}/man1/m4.1.gz&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Some rpmlint testing to see if my spec files and rpm has any errors, so far none at the moment&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt; [chris@localhost SPECS]$ rpmlint -i m4.spec&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;0 packages and 1 specfiles checked; 0 errors, 0 warnings.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt; [chris@localhost SRPMS]$ rpmlint -i m4-1.4.16-1.fc16.src.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;1 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;[chris@localhost x86_64]$ rpmlint m4-debuginfo-1.4.16-1.fc16.x86_64.rpm&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;1 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally I have created an RPM!! This will help me with my next project using Mock and Koji, I am still going to work on my proxykinfe build still but for now I will continue on with my m4 RPM for my Mock and Koji testing.&lt;br /&gt;&lt;br /&gt;**RPM, SRPM, and SPEC files here**&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.google.com/open?id=0BxRdD36nj6CTOWMxNDg3NjctMzdlZS00YWQ5LThlMmQtZTk4YTE1YzhkNzUz&quot;&gt;https://docs.google.com/open?id=0BxRdD36nj6CTOWMxNDg3NjctMzdlZS00YWQ5LThlMmQtZTk4YTE1YzhkNzUz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/3683112655067317571-3535898524439197525?l=cchoo2.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 06 Feb 2012 03:23:09 +0000</pubDate>
	<author>noreply@blogger.com (Chris Choo)</author>
</item>
<item>
	<title>Matthew Schranz: More CloneNode Work</title>
	<guid isPermaLink="false">http://mschranz.wordpress.com/?p=156</guid>
	<link>http://mschranz.wordpress.com/2012/02/06/more-clonenode-work/</link>
	<description>&lt;p&gt;At this point I’m a little stumped with the bug only because what one person suggested to be to do doesn’t make sense based on my knowledge. It was suggested to me that I consider writing an overloaded version of the cloneNode method but I’m willing to bet my errors in regards to places in code looking for a 3 argument version rather than 2 are because I’ve missed something somewhere. It just doesn’t seem like the correct fix.&lt;/p&gt;
&lt;p&gt;In the mean time I’ve started the process for getting level one hg account so I can start running some of my patches on the Mozilla Try server. Hopefully I will get this soon so I can finish off &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=718274&quot;&gt;Bug 718274&lt;/a&gt; for good!&lt;/p&gt;
&lt;p&gt;As well I’ve gone an grabbed another bug. This one involves adding more functionality to nsContentUtils. A lot of the upcoming features with Firefox are implementing a method called DispatchToSelf, all of which have common functionality in them. Basically I’m going to change things up to help save some code here. Should be fun!&lt;/p&gt;
&lt;p&gt;Anyway, that’s all for an update this Sunday. Happy Hackin!&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mschranz.wordpress.com/156/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mschranz.wordpress.com/156/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mschranz.wordpress.com&amp;amp;blog=20389101&amp;amp;post=156&amp;amp;subd=mschranz&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Mon, 06 Feb 2012 02:55:15 +0000</pubDate>
</item>
<item>
	<title>Jon Buckley: Cross-origin video</title>
	<guid isPermaLink="false">http://jbuckley.ca/?p=210</guid>
	<link>http://jbuckley.ca/2012/02/cross-origin-video/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=cross-origin-video</link>
	<description>&lt;p&gt;Back in December when we were working on Popcorn Maker v0.1, we were trying to integrate a template by Brian Chirls that implemented chroma-keying. Chroma keying is a process where you film a video with a pure color (usually blue or green) backdrop, and then in post production, replace it with other content. This is used in movies to film dangerous or impossible scenes, and in the weather forecasts to display the weather behind the newscaster. Brian’s template allowed people to do the same live, within their web browser. Then we tried the template with videos other than the default, and found it wouldn’t actually work. This is due to the browser same-origin security restriction, and the lack of cross-origin resource sharing (CORS) support on the &amp;lt;video&amp;gt; element.&lt;/p&gt;
&lt;p&gt;The browser same-origin security restriction is a fundamental part of protecting users from malicious users. What it does is make cross-origin data write-only; it can be written to the display, but scripts cannot read data from it. There are only two exceptions to this rule:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Loading JavaScript&lt;/li&gt;
&lt;li&gt;CORS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CORS is a protocol to selectively enable the reading of cross-origin data on an HTML element. It is a two-part client-server handshake. First, the client adds a crossorigin=”…” attribute to the HTML element. There are 3 valid crossorigin states:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;none, which is the default mode&lt;/li&gt;
&lt;li&gt;anonymous, which does not send cookies data to the server&lt;/li&gt;
&lt;li&gt;use-credentials, which does send cookies to the server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When the browser loads the resource, it sends an additional header (Origin) to the server, which contains the host portion of the HTML page. On the server side, it needs to send back an additional header called “Access-Control-Allow-Origin”, which contains a comma-separated list of hosts that can read cross-origin data, or a * which signifies that anyone can read cross-origin data.&lt;/p&gt;
&lt;p&gt;Browser support for the cross-origin specification varies. They all support it on the XMLHttpRequest object. But support on fonts (for @font-face rules), images, videos, and audio is very limited. In fact, for video and audio, it doesn’t exist. But Firefox is open-source software. We can fix it!&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=682299&quot;&gt;Bug 682299&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This bug was filed back in August 2011 by Benoit Jacob, Mozilla’s WebGL expert. Cross-origin video textures were actually supported in WebGL in Firefox 4. However, a security exploit (https://bugzilla.mozilla.org/show_bug.cgi?id=656277) that performed a timing attack based on the brightness value of each pixel meant that all cross-domain WebGL textures must be disabled.&lt;/p&gt;
&lt;p&gt;My first patch for this bug cargo-culted heavily off the Image elements CORS support (thanks Joe!). The key parts were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding CORS-related attributes and enumerations to the nsHTMLMediaElement&lt;/li&gt;
&lt;li&gt;Adding the crossorigin attribute to the nsHTMLMediaElement IDL&lt;/li&gt;
&lt;li&gt;Changing nsHTMLMediaElement to use nsCORSListenerProxy if crossorigin is set&lt;/li&gt;
&lt;li&gt;Changing nsLayoutUtils::SurfaceFromElement() to look at the nsHTMLMediaElement CORS mode when grabbing a frame from the Video element.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The trickiest part here was figuring out that I needed to add code in SurfaceFromElement() to get this all working. I started by coming up with a failing test case, where I would drawImage(videoElement) into a canvas, then try to getImageData() from it. This causes a NS_ERROR_DOM_SECURITY_ERR to appear in the web console. I searched MXR for the error, and worked my way backwards through the Canvas2DContext code until I found that it was SurfaceFromElement() that set the origin and CORS mode of a frame.&lt;/p&gt;
&lt;p&gt;It was a working patch, but it needed clean-up before landing in mozilla-central. In the end, I had to unify the CORS-related attributes and enumerations in nsGenericHTMLElement, remove old preferences, fix my lack of specification-compliance, fix some logical errors in my code, fix existing tests, and add new ones.&lt;/p&gt;
&lt;p&gt;It was landed on January 25th so this feature will be shipping in Firefox 12. But we’re still not done; after all, we need the server to be CORS-compatible as well.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=703566&quot;&gt;Bug 703566&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This bug here was to enable CORS on Mozilla’s video CDN. Once the feature landed in mozilla-central, I asked the folks in #it where it should go, and they got their part done in 2 days.&lt;/p&gt;
&lt;p&gt;So Firefox has CORS support for pretty much every resource. Now all we need to do is convice the rest of the web to enable CORS where it makes sense.&lt;/p&gt;</description>
	<pubDate>Mon, 06 Feb 2012 01:51:44 +0000</pubDate>
</item>
<item>
	<title>Khosro Taraghi: Designing Firewall, Gateway, and Load Balancer Server for Web Farms with iptables</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-3138395946364435356.post-8377299177191150701</guid>
	<link>http://ktaraghi.blogspot.com/2012/02/designing-firewall-gateway-and-load.html</link>
	<description>&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Hello all,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;  &lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Today, I am going to show you how we can configure a Firewall, Gateway, and Load Balancer Server for your Web Farm Servers with iptables in Linux (part 1). In part 2, I will explain how to configure a Backup/Log Server in order to send apache log files to this server. This will keep the log files for all web servers in one location behind the firewall in a separate machine. Also, &lt;/span&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;it acts as a backup server to keep a copy of web servers in case of disaster recovery for web servers.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://1.bp.blogspot.com/-O6UvbY5xDFk/Ty7OE90bVeI/AAAAAAAAAB8/ib3wuISz9I4/s1600/pic7.png&quot;&gt;&lt;img src=&quot;http://1.bp.blogspot.com/-O6UvbY5xDFk/Ty7OE90bVeI/AAAAAAAAAB8/ib3wuISz9I4/s320/pic7.png&quot; height=&quot;320&quot; border=&quot;0&quot; width=&quot;279&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;                                                          &lt;b&gt;Figure 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;When a single Web Server machine isn’t enough to handle the traffic on your Web site, it’s time to look into building a Web Farm that uses multiple machines on the network acting as a single server. Also, Web Farms are an obvious choice if you’ve hit the limits of your single machine hardware. Although the process of creating a Web Farm isn’t difficult, administration of two or more servers and keeping them properly synchronized is actually a lot more work than administering a single server. Now, to see the functionality of a Web Server Farm, I am going to demonstrate and configure a Web Server Farm with two separated machine, which is running Apache version 2.2.17, behind a firewall. &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;To demonstrate this scenario, I used four &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;virtual machines all with Fedora 13 operation system. Figure 1 shows the details of this scenario.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;  &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;First of all, let's configure the firewall/Gateway machine. The Firewall/Gateway machine has two network interfaces. One network interface has an ip address of 192.168.56.101 for internal network  and another network interface has an ip address of 192.168.2.X ,which X is a number that my router at home gives this number, to connect to Internet. Our gateway machine has to have the ability to forward the packets. In order to achieve this goal, we should enable IP forwarding on this machine with following command: &lt;br /&gt;&lt;br /&gt;       &lt;b&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward &lt;/b&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;You can put this command in &lt;b&gt;/etc/rc.local file&lt;/b&gt;. So, when you restart the computer, it loads and runs automatically and it doesn't need to enter this command manually.&lt;/span&gt;&lt;/div&gt;  &lt;br /&gt;&lt;span&gt;Now, the next step is configuring firewall and load balancing. Before configuring firewall, I loaded the default Fedora Server firewall by clicking&lt;b&gt; System-&amp;gt;Administration-&amp;gt; Firewall&lt;/b&gt; and then &lt;b&gt;Options-&amp;gt;Load Default Configuration-&amp;gt;Server&lt;/b&gt;. Now, in order to balance the loads across the web servers in a round robin fashion, I added these two lines to the PREROUTING table in ip tables.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;table cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border-collapse: collapse; margin-left: 2.25pt; width: 480px;&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot;&gt;&lt;tbody&gt;&lt;tr style=&quot;height: 55.45pt;&quot;&gt;   &lt;td width=&quot;480&quot; style=&quot;border: solid black 1.0pt; height: 55.45pt; padding: 2.75pt 2.75pt 2.75pt 2.75pt; width: 359.7pt;&quot; valign=&quot;top&quot;&gt;   &lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;iptables -I   PREROUTING -i eth0 -p tcp -m tcp --dport 80 -m statistic&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span&gt; &lt;/span&gt;--mode nth --every 2 -j DNAT   --to-destination 192.168.56.102:80&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style=&quot;height: 55.45pt;&quot;&gt;   &lt;td width=&quot;480&quot; style=&quot;border-top: none; border: solid black 1.0pt; height: 55.45pt; padding: 2.75pt 2.75pt 2.75pt 2.75pt; width: 359.7pt;&quot; valign=&quot;top&quot;&gt;   &lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;iptables -A   PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span&gt; &lt;/span&gt;--to-destination 192.168.56.103:80&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span&gt;Let's discuss about these two important lines in iptables. First, because we want to forward the http packets with destination port 80 to web servers, we have to change the destination address for packets to web servers in PREROUTING tables. That's why I added these lines in PREROUTING table. According to man page, statistic module matches packets based on some statistic condition.&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span&gt;It supports two distinct modes settable with the&lt;/span&gt;&lt;b&gt; --mode&lt;/b&gt;&lt;span&gt; option which are &lt;/span&gt;&lt;b&gt;nth&lt;/b&gt;&lt;span&gt; and &lt;/span&gt;&lt;b&gt;random&lt;/b&gt;&lt;span&gt;. The random mode is not in our case since we want to know exactly which packet goes to which server.&lt;b&gt; --every n&lt;/b&gt; match one packet every nth packet and it works only with the nth mode. &lt;/span&gt;&lt;/span&gt;&lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span&gt;In this case, it matches every 2 packets.&lt;b&gt; --packet p&lt;/b&gt; set the initial counter value for the nth mode and because the default value is 0, I didn't mention in the command. Therefore, the first command says match the tcp protocol with destination port 80 that comes from eth0 for every 2 nth packet (even packets) and do DNAT to address of the first web server which is 192.168.56.102. For other packets, just do the regular DNAT to the second web server like the second line (odd packets). So, with these iptables commands, we have a round-robin method. Because the packets are prerouted to web servers, we should accept packets in FORWARD table in firewall server. Also, for returning packets from web servers to firewall server, we should accept packets in FORWARD table as well. So, we should add two more rules to firewall:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;Standard&quot;&gt;&lt;span&gt;&lt;b&gt;iptables -I FORWARD -p tcp -m tcp --sport 80 -j ACCEPT &lt;br /&gt;iptables -A FORWARD -d 192.168.56.0/24 -p tcp -m tcp --dport 80 -j ACCEPT&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-CbYjw8EI1C0/Ty7VBNEEMOI/AAAAAAAAACE/aE-xfzuMfDQ/s1600/pic1.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-CbYjw8EI1C0/Ty7VBNEEMOI/AAAAAAAAACE/aE-xfzuMfDQ/s320/pic1.png&quot; height=&quot;251&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span lang=&quot;EN-US&quot;&gt;                                          &lt;b&gt;          Figure 2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span&gt;Figure 2 shows the output of iptables-save command on Firewall Server. There is one more rule that I should add to iptables when the packets go out from firewall in POSTROUTING table. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Iptables -I POSTROUTING -o eth0 -p tcp -j MASQUERADE &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Here is a screen shot from browser that shows the round-robin method works (Figure 3):&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://1.bp.blogspot.com/-l_Iuf6VkRFI/Ty7XOsrvw4I/AAAAAAAAACM/SYcV7_wsqdU/s1600/pic2.png&quot;&gt;&lt;img src=&quot;http://1.bp.blogspot.com/-l_Iuf6VkRFI/Ty7XOsrvw4I/AAAAAAAAACM/SYcV7_wsqdU/s320/pic2.png&quot; height=&quot;267&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span lang=&quot;EN-US&quot;&gt;                                                          &lt;b&gt; Figure 3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span&gt;Also, the following picture show my log in Log Server to prove that round-robin method works. I will talk about Log Server and its configuration later in part 2. Notice that I added a log prefix for each web server to distinguish the related log easily.&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://1.bp.blogspot.com/-OXofpD6Lq5k/Ty7YRM2ni4I/AAAAAAAAACU/2quuaW31IAU/s1600/pic3.png&quot;&gt;&lt;img src=&quot;http://1.bp.blogspot.com/-OXofpD6Lq5k/Ty7YRM2ni4I/AAAAAAAAACU/2quuaW31IAU/s320/pic3.png&quot; height=&quot;161&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;                                                           &lt;b&gt;          Figure 4&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Here is my bash script that I wrote to use wget command to bombard my web servers: &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;b&gt;#/usr/bin/bash &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;for((i=0;i&amp;lt;=100;i++)) &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;do &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;wget http://192.168.2.7/index.html &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;done &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;rm -f index.html* &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here is the result of running my script. I just captured last 10 lines:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-xuzMzof2KkQ/Ty7Zp28CbHI/AAAAAAAAACc/NUHOCyPz_vQ/s1600/pic4.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-xuzMzof2KkQ/Ty7Zp28CbHI/AAAAAAAAACc/NUHOCyPz_vQ/s320/pic4.png&quot; height=&quot;216&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&lt;b&gt;                                                                  Figure 5&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;line-height: 200%;&quot; class=&quot;Standard&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 200%;&quot;&gt;Web Servers&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The following steps show how I configured the web servers: &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt; 1.                  I added a route to Gateway/Firewall machine with this command: &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;        &lt;b&gt;route add default gw 192.168.56.101          &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;You can add this command to /etc/rc.local file to run it automatically when you restart computer &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt; 2.                  To install apache server, I ran this command: &lt;b&gt;yum install httpd &lt;/b&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt; 3. &lt;b&gt;chkconfig –levels 2345 httpd on&lt;/b&gt;    To turn on the httpd service in run level 2,3,4, and5 &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt; 4.                  I created a simple webpage in the following path: &lt;b&gt; /var/www/html/index.html&lt;/b&gt; which is the default Document Root for apache server. The following shows the content of “index.html” code and as I said, it is a simple html code just for demonstration:&lt;/span&gt;&lt;/div&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;For web server 1: &lt;/span&gt;&lt;br /&gt;&lt;span&gt;[root@f13-ws1 ~]# cat /var/www/html/index.html &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;html&amp;gt; &lt;br /&gt; &amp;lt;head&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;  &amp;lt;title&amp;gt;My Website Number 1&amp;lt;/title&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;/head&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;body&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt; &amp;lt;center&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;  &amp;lt;h2&amp;gt;Welcome to my webpage&amp;lt;/h2&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;/body&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;For web server 2: &lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;[root@f13-ws2 ~]# cat /var/www/html/index.html &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;html&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt; &amp;lt;head&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;  &amp;lt;title&amp;gt;My Website Number 2&amp;lt;/title&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;/head&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;body&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;  &amp;lt;center&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;     &amp;lt;h2&amp;gt;Welcome to my webpage&amp;lt;/h2&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;/body&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;/html&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;4.&lt;b&gt;                  service httpd start&lt;/b&gt;    To start apache server &lt;/span&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;5.                  Next, I added a rule to firewall to accept tcp connection for destination port 80 (http):&lt;/span&gt;&lt;br /&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;b&gt;&lt;span&gt;iptables -I INPUT -p tcp –dport 80 -m state –state NEW -j ACCEPT &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span&gt;The next two screen shot are the output of iptables-save command in both web servers:&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-bUG-QYN_L_w/Ty7dqJVLKhI/AAAAAAAAACk/7USbWwUlUxo/s1600/pic5.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-bUG-QYN_L_w/Ty7dqJVLKhI/AAAAAAAAACk/7USbWwUlUxo/s320/pic5.png&quot; height=&quot;185&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;                                                                   &lt;b&gt; Figure 6&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://3.bp.blogspot.com/-fL1e-0Q4YJo/Ty7d1f3j23I/AAAAAAAAACs/wv8FFx1yqlA/s1600/pic6.png&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/-fL1e-0Q4YJo/Ty7d1f3j23I/AAAAAAAAACs/wv8FFx1yqlA/s320/pic6.png&quot; height=&quot;182&quot; border=&quot;0&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;                                                                   &lt;b&gt;Figure 7&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;In part 2, I will discuss and continue with Log/Backup Server and its configuration.  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;Khosro Taraghi &lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/3138395946364435356-8377299177191150701?l=ktaraghi.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sun, 05 Feb 2012 20:04:22 +0000</pubDate>
	<author>noreply@blogger.com (Khosro Taraghi)</author>
</item>
<item>
	<title>Anatoly Spektor: Polling Module Demo Video – Publish Feature</title>
	<guid isPermaLink="false">http://myprogrammingblog.com/?p=544</guid>
	<link>http://myprogrammingblog.com/2012/02/04/polling-module-demo-video-publish-feature/</link>
	<description>&lt;span style=&quot;text-align: center; display: block;&quot;&gt;&lt;a href=&quot;http://myprogrammingblog.com/2012/02/04/polling-module-demo-video-publish-feature/&quot;&gt;&lt;img src=&quot;http://img.youtube.com/vi/0zE4iYHLySI/2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;
&lt;div style=&quot;background-color: #ffffbf; color: #000000; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; direction: ltr; border-color: initial; border-width: 0; margin: 0; padding: 0;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #ffffbf; color: #000000; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; direction: ltr; border-color: initial; border-width: 0; margin: 0; padding: 0;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #ffffbf; color: #000000; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; direction: ltr; border-color: initial; border-width: 0; margin: 0; padding: 0;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #ffffbf; color: #000000; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; direction: ltr; border-color: initial; border-width: 0; margin: 0; padding: 0;&quot;&gt;&lt;/div&gt;
&lt;br /&gt; Tagged: &lt;a href=&quot;http://myprogrammingblog.com/tag/beta-version/&quot;&gt;beta version&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/big-blue-button/&quot;&gt;Big Blue Button&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/demo/&quot;&gt;demo&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/demo-video/&quot;&gt;demo video&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/myprogrammingblog-com/&quot;&gt;myprogrammingblog.com&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/polling-module/&quot;&gt;polling module&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/publish-video/&quot;&gt;publish video&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/statistics/&quot;&gt;statistics&lt;/a&gt;, &lt;a href=&quot;http://myprogrammingblog.com/tag/video/&quot;&gt;Video&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/myprogrammingblog.wordpress.com/544/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/myprogrammingblog.wordpress.com/544/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=myprogrammingblog.com&amp;amp;blog=17442280&amp;amp;post=544&amp;amp;subd=myprogrammingblog&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Sun, 05 Feb 2012 04:21:00 +0000</pubDate>
</item>
<item>
	<title>Aries Alwi: Testing Build Using Koji Part 1</title>
	<guid isPermaLink="false">http://asalwi123.wordpress.com/?p=38</guid>
	<link>http://asalwi123.wordpress.com/2012/02/03/testing-build-using-koji-part-1/</link>
	<description>&lt;p&gt;In this post I will be using &lt;em&gt;koji&lt;/em&gt; to test my build in Fedora distribution only. I will make another post (part 2) to test my build on other architectures.&lt;/p&gt;
&lt;p&gt;If we don’t have &lt;em&gt;koji&lt;/em&gt; yet in our system, let’s install it first:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;yum install fedora-packager&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then, we have to setup our Fedora Account System (FAS2). If you don’t have any FAS2 account, create one &lt;a href=&quot;https://admin.fedoraproject.org/accounts/&quot; target=&quot;_blank&quot; title=&quot;FAS2 account&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;/usr/bin/fedora-packager-setup&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In this example, I am queuing a build request for my &lt;strong&gt;combine &lt;/strong&gt;package on the main koji server used for primary architecture builds (i386 and x86_64).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;koji build f17 –scratch combine-0.3.3-1.fc16.src.rpm&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://asalwi123.files.wordpress.com/2012/02/koji_combine1.png&quot;&gt;&lt;img src=&quot;http://asalwi123.files.wordpress.com/2012/02/koji_combine1.png?w=500&amp;amp;h=333&quot; title=&quot;koji_combine&quot; height=&quot;333&quot; width=&quot;500&quot; alt=&quot;koji_combine&quot; class=&quot;alignnone size-full wp-image-40&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;We can find more information on how &lt;em&gt;koji&lt;/em&gt; command used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;koji help&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More information how to use &lt;em&gt;koji&lt;/em&gt; can be found &lt;a href=&quot;http://fedoraproject.org/wiki/PackageMaintainers/UsingKoji&quot; target=&quot;_blank&quot; title=&quot;Using koji&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/asalwi123.wordpress.com/38/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/asalwi123.wordpress.com/38/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=asalwi123.wordpress.com&amp;amp;blog=31704068&amp;amp;post=38&amp;amp;subd=asalwi123&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 03 Feb 2012 20:24:10 +0000</pubDate>
</item>
<item>
	<title>Aries Alwi: Using Mock to Test BuildRequires</title>
	<guid isPermaLink="false">http://asalwi123.wordpress.com/?p=31</guid>
	<link>http://asalwi123.wordpress.com/2012/02/03/using-mock-to-test-buildrequires/</link>
	<description>&lt;p&gt;Alright, so this time I have to use Mock to test the buildrequires of package that built earlier (moe).&lt;/p&gt;
&lt;p&gt;First, we have to install mock if we don’t have it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;yum install mock&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: We can’t run mock as root! We have to use our regular user. So let’s add ourself to the mock group:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;usermod -aG mock your_username&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The command to use &lt;em&gt;mock&lt;/em&gt; to test our SRPM is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;mock -r distribution-release-arch your_SRPM&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can check your distribution-release-arch by looking config files in &lt;strong&gt;/etc/mock&lt;/strong&gt;. Use the same format but without the &lt;strong&gt;.cfg &lt;/strong&gt;extension.&lt;/p&gt;
&lt;p&gt;In this example I will be running &lt;em&gt;mock&lt;/em&gt; on my fedora 16 (64 bit) system to test my &lt;em&gt;moe&lt;/em&gt; package:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;mock -r fedora-16-x86_64 moe-1.3-1.fc16.src.rpm&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the result I get:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://asalwi123.files.wordpress.com/2012/02/mock_moe1.png&quot;&gt;&lt;img src=&quot;http://asalwi123.files.wordpress.com/2012/02/mock_moe1.png?w=500&amp;amp;h=332&quot; title=&quot;mock_moe&quot; height=&quot;332&quot; width=&quot;500&quot; alt=&quot;mock_moe_error&quot; class=&quot;alignnone size-full wp-image-33&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see there are some errors. So let’s find out those errors in the &lt;strong&gt;build.log&lt;/strong&gt; file under&lt;strong&gt; /var/lib/mock/fedora-16-x86_64/result&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I am using &lt;strong&gt;vi&lt;/strong&gt; to open the log file so I can easily search for the word error using vi built-in function (&lt;strong&gt;/your_pattern&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://asalwi123.files.wordpress.com/2012/02/mock_moe_error.png&quot;&gt;&lt;img src=&quot;http://asalwi123.files.wordpress.com/2012/02/mock_moe_error.png?w=500&amp;amp;h=332&quot; title=&quot;mock_moe_error&quot; height=&quot;332&quot; width=&quot;500&quot; alt=&quot;moe_build.log&quot; class=&quot;alignnone size-full wp-image-34&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The error specified:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;fatal error: ncurses.h: No such file or directory&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So I figured out by adding ‘&lt;strong&gt;ncurses-devel&lt;/strong&gt;‘ package under my BuildRequires in the spec file (&lt;strong&gt;moe.spec&lt;/strong&gt;) fixes the problem. I was able to figure this out by asking someone from IRC, but I’m not actually sure what packages should I put if I was missing other packages. Please leave a comment for this post if you have some explanations. Thanks &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;After adding the buildrequires, we have to rebuild our package:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rpmbuild -ba moe.spec&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Run &lt;em&gt;mock&lt;/em&gt; again:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;mock -r&lt;strong&gt; fedora-16-x86_64 moe-1.3-1.fc16.src.rpm&lt;/strong&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://asalwi123.files.wordpress.com/2012/02/mock_moe2.png&quot;&gt;&lt;img src=&quot;http://asalwi123.files.wordpress.com/2012/02/mock_moe2.png?w=500&amp;amp;h=331&quot; title=&quot;mock_moe2&quot; height=&quot;331&quot; width=&quot;500&quot; alt=&quot;mock_moe&quot; class=&quot;alignnone size-full wp-image-35&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This time the results doesn’t show any error messages. Yaayy &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif&quot; alt=&quot;:D&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;This whole &lt;em&gt;mock&lt;/em&gt; testing process took me about an hour. I did another &lt;em&gt;mock&lt;/em&gt; testing for another package and everything went smoothly; takes me only about 5 minutes.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/asalwi123.wordpress.com/31/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/asalwi123.wordpress.com/31/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=asalwi123.wordpress.com&amp;amp;blog=31704068&amp;amp;post=31&amp;amp;subd=asalwi123&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 03 Feb 2012 19:28:49 +0000</pubDate>
</item>
<item>
	<title>Jose Rainulf Pineda: Android Development Part 1: Activity</title>
	<guid isPermaLink="true">http://rainulf.ca/Android-Development-Part-1-Activity-211.html</guid>
	<link>http://rainulf.ca/Android-Development-Part-1-Activity-211.html</link>
	<description>&lt;p&gt;
I was inspired by my professor of &lt;a href=&quot;https://cs.senecac.on.ca/~jordan.anastasiade/ECL/Base/DPS914-ECL500.html&quot; target=&quot;_blank&quot;&gt;ECL500&lt;/a&gt; class, &lt;a href=&quot;https://scs.senecac.on.ca/~jordan.anastasiade/&quot; target=&quot;_blank&quot;&gt;Jordan Anastasiade&lt;/a&gt;, to make this blog post about Android Development. As you are aware, Android apps are developed in Java. As long as you know the basics of Java development, you shouldn't have problems developing apps for Android. There are, however, a couple of new conventions you need to learn and get familiar with before you can develop one. First of all, we will be developing apps in &lt;a href=&quot;http://www.eclipse.org/&quot; target=&quot;_blank&quot;&gt;Eclipse&lt;/a&gt;. So I suggest that you download the latest version of Eclipse Classic (Indigo).
&lt;/p&gt;
&lt;p&gt;
After that, you will need to download and install the &lt;a href=&quot;http://developer.android.com/sdk/index.html&quot; target=&quot;_blank&quot;&gt;Android SDK&lt;/a&gt;. Finally, you will need to install the Android ADT plugin in Eclipse. For more information, please follow &lt;a href=&quot;http://developer.android.com/sdk/installing.html&quot; target=&quot;_blank&quot;&gt;this tutorial&lt;/a&gt; starting from Step 3. After you have set everything up, you will need to install a couple of packages from the Android SDK manager. Please install everything under &quot;Tools&quot; and &quot;Android 4.0.3 (API 15)&quot; - we will be developing apps using the latest version of Android. The following packages are essential throughout this tutorial and future ones:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SDK Platform&lt;/li&gt;
&lt;li&gt;Documentation for Android SDK&lt;/li&gt;
&lt;li&gt;ARM EABI v7a System Image - this image is needed for the Android emulator!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The first thing we will tackle on this post is &lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html&quot; target=&quot;_blank&quot;&gt;Activity&lt;/a&gt;. In Android, an Activity is an application component that provides a screen in which users can interact. The following diagram shows the important state paths of an Activity. The square rectangles represent callback methods you can implement to perform operations when the Activity moves between states. The colored ovals are major states the Activity can be in.
&lt;/p&gt;
&lt;img src=&quot;http://rainulf.ca/images/activity_lifecycle.png&quot; alt=&quot;activity_lifecycle&quot; /&gt;
&lt;p&gt;
To create an activity, one must create a subclass of &lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html&quot; target=&quot;_blank&quot;&gt;Activity&lt;/a&gt; class. As you can see in the diagram, an activity has a couple of callback methods that the operating system automatically calls on each cycle. These methods are pretty self-explanatory, but in order to work with them, you must override them in a class you create extending the Activity class.
&lt;/p&gt;
&lt;p&gt;
Create a new project in Eclipse:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &quot;File&quot; then under &quot;New&quot;, click &quot;Project...&quot;&lt;/li&gt;
&lt;li&gt;Expand &quot;Android&quot;, select &quot;Android Project&quot; then click &quot;Next&quot;&lt;/li&gt;
&lt;li&gt;Type a Project Name, then click &quot;Next&quot;&lt;/li&gt;
&lt;li&gt;Check &quot;Android 4.0.3&quot; for the build target then click &quot;Next&quot;. &lt;br /&gt;Note: You may choose whatever you wish, it will still work for this tutorial. But please note that newer versions have newer methods and features&lt;/li&gt;
&lt;li&gt;Type a Package Name (eg. test.part1), then click &quot;Finish&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Eclipse will create a bunch of files. The important ones are under &quot;src&quot; and &quot;res&quot; directories and the &quot;AndroidManifest.xml&quot; file. Open that one Java file in &quot;src&quot; directory under the package name you made up. There, you should see something similar to this:&lt;/p&gt;
&lt;pre&gt;package test.part1;

import android.app.Activity;
import android.os.Bundle;

public class TestActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
&lt;/pre&gt;
&lt;p&gt;As you can see, it already override the onCreate() method for you. The first thing it does is call the onCreate() method of the parent. The next line set its content view or the layout of your activity. On this case, it is saying to use the &quot;main&quot; layout, which also Eclipse have created for you.&lt;/p&gt;
&lt;p&gt;The main layout is located under the &quot;res&quot; directory, expand it. There, you should see some or all of the following directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;drawable-hdpi&lt;/li&gt;
&lt;li&gt;drawable-ldpi&lt;/li&gt;
&lt;li&gt;layout&lt;/li&gt;
&lt;li&gt;values&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything under &quot;res&quot; sets the feel and looks of your app. Starting from the resolution of the phone, to the layout and to the values in a layout. Expand the &quot;layout&quot; directory and you should see &quot;main.xml&quot;, open it. These layouts are defined in an XML format. But if you open it in Eclipse, it should show you the Graphical view of it.&lt;/p&gt;
&lt;img src=&quot;http://rainulf.ca/images/eclipse_android_mainxml.png&quot; alt=&quot;eclipse_android_mainxml&quot; /&gt;
&lt;p&gt;Eclipse makes it easy for you because you can easily drag and drop buttons, widgets, images, etc. into the layout. Click the &quot;main.xml&quot; tab to see the XML version of it.&lt;/p&gt;
&lt;p&gt;Before we can run this app, we need to create our emulator! In Eclipse, click the &quot;Android Virtual Device Manager&quot; icon:&lt;/p&gt;
&lt;img src=&quot;http://rainulf.ca/images/click_emulator_eclipse.png&quot; alt=&quot;click_emulator_eclipse&quot; /&gt;
&lt;p&gt;It should open the &quot;Android Virtual Device Manager&quot; window. On that window, Click &quot;New&quot; and make up a name. The target of course should be &quot;Android 4.0.3 (API 15)&quot;. You may also set the size of the SD Card. After that, click &quot;Create AVD&quot;.&lt;/p&gt;
&lt;p&gt;Now, let's compile and run this app in the emulator! Do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Eclipse, click &quot;Run&quot;, then click &quot;Run Configurations...&quot;&lt;/li&gt;
&lt;li&gt;Double click the &quot;Android Application&quot; at the left-hand side and it should create a new run configuration for you&lt;/li&gt;
&lt;li&gt;Click &quot;Browse&quot; and choose the Test project&lt;/li&gt;
&lt;li&gt;Click the &quot;Target&quot; tab, then choose the AVD you created.&lt;/li&gt;
&lt;li&gt;Click &quot;Apply&quot;, then click &quot;Run&quot;!&lt;br /&gt;NOTE: Please wait for a while to load. The app should be installed to it once it's finished!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now that we've created and run our first app, is it possible to add more activities to it? The answer is yes! Let's go back to your Test project and create a new Activity class:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &quot;File&quot;, then under &quot;New&quot;, click &quot;Class&quot;&lt;/li&gt;
&lt;li&gt;Make up whatever name for your second activity&lt;/li&gt;
&lt;li&gt;In &quot;Superclass:&quot;, click &quot;Browse...&quot; and search for &quot;android.activity&quot; and select the first result&lt;/li&gt;
&lt;li&gt;Make sure that you have &quot;android.app.Activity&quot; as your Superclass, since that's the class we want to extend. Click &quot;Finish&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The new class should roughly contain the following:&lt;/p&gt;
&lt;pre&gt;package test.part1;

import android.app.Activity;

public class SecondActivity extends Activity {

}
&lt;/pre&gt;
&lt;p&gt;The next step is to create a new layout for this new activity. Do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Under res/layout, right click the directory &quot;layout&quot;, then under &quot;New&quot;, click &quot;Other&quot;&lt;/li&gt;
&lt;li&gt;Expand &quot;Android&quot;, choose &quot;Android XML Layout File&quot;, then click &quot;Next&quot;&lt;/li&gt;
&lt;li&gt;Make up a name, then click &quot;Finish&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This should create a new XML file for layout and open the graphical interface. Try to play around with it, make sure you save it after. If you wish to add a string, you must define it in &quot;strings.xml&quot; file under &quot;values&quot; directory, open it. Go to the XML version of &quot;strings.xml&quot; because it is easier. You should roughly see the following:&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;resources&amp;gt;

    &amp;lt;string name=&quot;hello&quot;&amp;gt;Hello World, TestActivity!&amp;lt;/string&amp;gt;
    &amp;lt;string name=&quot;app_name&quot;&amp;gt;Test&amp;lt;/string&amp;gt;

&amp;lt;/resources&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Just add another string element, with a unique name for it. If you want to refer to this string in your newly created layout, first of all, you must drag and drop a TextView from widget to the layout. After that, go to the XML version of the layout. You should see the &quot;TextView&quot; element. It should have an attribute called &quot;android:text&quot;. Erase all everything in it and add the following: @string/whatever_name_of_your_string - this should refer to the string you created in &quot;strings.xml&quot;&lt;/p&gt;
&lt;p&gt;Now that we've customized our newly created layout, we must tell our new activity to use it! We do that by doing the same way as our first activity, we override onCreate() and call the setContentView() method:&lt;/p&gt;
&lt;pre&gt;public class SecondActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.the_name_of_your_second_layout);
    }
}
&lt;/pre&gt;
&lt;p&gt;We set the content view to our new layout. If the name of our new layout is &quot;second.xml&quot;, we pass &quot;R.layout.second&quot; to setContentView() method.&lt;/p&gt;
&lt;p&gt;So how do we run this new activity alongside with the existing one? We have two activities! Which activity runs first? This setting is defined under &quot;AndroidManifest.xml&quot; file. In order to use this new activity we created, we must define it first in the &quot;AndroidManifest.xml&quot; file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &quot;AndroidManifest.xml&quot; file&lt;/li&gt;
&lt;li&gt;Go to &quot;Application&quot; tab&quot;&lt;/li&gt;
&lt;li&gt;Under &quot;Application Nodes&quot;, right click and click &quot;Add...&quot;&lt;/li&gt;
&lt;li&gt;Double click &quot;Activity&quot;, then browse for the new activity you created, choose it&lt;/li&gt;
&lt;li&gt;Save and close the &quot;AndroidManifest.xml&quot; file&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now let's open our very first Activity and add the following method inside it:&lt;/p&gt;
&lt;pre&gt;    public boolean onKeyDown(int keyCode, KeyEvent event) {
       if(keyCode == event.KEYCODE_DPAD_CENTER) {
          Intent newActivity = new Intent(this, SecondActivity.class);
          startActivity(newActivity);
       }
       
       return super.onKeyDown(keyCode, event);
    }
&lt;/pre&gt;
&lt;p&gt;Let me explain what this do line by line. The first line checks for the key that is being pressed. If the center pad is pressed, if statement should be true and therefore run whatever's under it. The next line creates an &lt;a href=&quot;http://developer.android.com/reference/android/content/Intent.html&quot; target=&quot;_blank&quot;&gt;Intent&lt;/a&gt; object. We need to create an Intent object to tell the Android OS that we &lt;i&gt;intend&lt;/i&gt; to do something. On this case, we intend to start a new activity when the center key pad is pressed. We use the startActivity() method to run the intent that we have created. This should open the new activity that we have created!&lt;/p&gt;
&lt;p&gt;All in all, this is a pretty straight forward tutorial with Android Activity. There are a couple of things I haven't touched such as saving instance state (how to keep the state of your current activity if you decided to open a new one) or creating fragments and use them alongside with Activities. But I leave it up to you if you want to learn more about those two.&lt;/p&gt;</description>
	<pubDate>Fri, 03 Feb 2012 15:11:05 +0000</pubDate>
</item>
<item>
	<title>Diogo Golovanevsky Monteiro: Firefox Bug 714071</title>
	<guid isPermaLink="false">http://diogogmt.wordpress.com/?p=611</guid>
	<link>http://diogogmt.wordpress.com/2012/02/03/firefox-bug-714071/</link>
	<description>&lt;p&gt;Working on &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=714071&quot;&gt;Bug 714071&lt;/a&gt; introduced me to another layer of Firefox.&lt;br /&gt;
So far all I’ve been doing was working with c++ code, specifically related to the MouseLock API.&lt;br /&gt;
Bug 714071 on the other hand was focused on the js layer.&lt;/p&gt;
&lt;h3&gt;A brief summary of the bug:&lt;/h3&gt;
&lt;p&gt;Fix a problem with the Statistics video control&lt;br /&gt;
&lt;a href=&quot;http://diogogmt.files.wordpress.com/2012/02/ff_showstatistics.png&quot;&gt;&lt;img src=&quot;http://diogogmt.files.wordpress.com/2012/02/ff_showstatistics.png?w=1024&amp;amp;h=396&quot; title=&quot;ff_ShowStatistics&quot; height=&quot;396&quot; width=&quot;1024&quot; alt=&quot;&quot; class=&quot;alignnone size-large wp-image-617&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://diogogmt.files.wordpress.com/2012/02/ff_fullscreenstatisticsbug.png&quot;&gt;&lt;img src=&quot;http://diogogmt.files.wordpress.com/2012/02/ff_fullscreenstatisticsbug.png?w=1024&amp;amp;h=396&quot; title=&quot;ff_FullScreenStatisticsBUG&quot; height=&quot;396&quot; width=&quot;1024&quot; alt=&quot;&quot; class=&quot;alignnone size-large wp-image-618&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
When the showing statistics option of a video was on, and the fullscreen was toggled the video would stop displaying the statistics but the menu would not be updated.&lt;br /&gt;
The goal for the bug was to keep showing the statistics when toggling between fullscreen.&lt;br /&gt;
&lt;br /&gt;
The code that displays the statistics on a video is the following:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;                showStatistics : function(shouldShow) {
                    if (this.statsInterval) {
                        clearInterval(this.statsInterval);
                        this.statsInterval = null;
                    }

                    if (shouldShow) {
                        this.video.mozMediaStatisticsShowing = true;

                        this.statsOverlay.hidden = false;
                        this.statsInterval = setInterval(this.updateStats.bind(this), this.STATS_INTERVAL_MS);
                        this.updateStats();
                    } else {
                        delete this.video.mozMediaStatisticsShowing;
                        this.statsOverlay.hidden = true;
                    }
                },

&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Everytime the video was loaded on the page, or toggled in fullscreen, the init method would be called and an event listener would be attached to listen for the “Show Statistics” option click. However, the init method would initialize the video with a fresh config, so if the statistics were being displayed it would be hidden after switching between fullscreen mode.&lt;/p&gt;
&lt;h3&gt;Solution&lt;/h3&gt;
&lt;p&gt;The solution was to add a check on the setUpInitialState method to activate the statistics on the video if they were being displayed before toggling the fullscreen.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: jscript;&quot;&gt;if (this.video.mozMediaStatisticsShowing) {
  this.showStatistics(true);
}
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That apparently solved the problem and the statistics are preserved even when toggling fullscreen.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://diogogmt.files.wordpress.com/2012/02/ff_fullscreenstatisticsfixed.png&quot;&gt;&lt;img src=&quot;http://diogogmt.files.wordpress.com/2012/02/ff_fullscreenstatisticsfixed.png?w=1024&amp;amp;h=396&quot; title=&quot;ff_FullScreenStatisticsFixed&quot; height=&quot;396&quot; width=&quot;1024&quot; alt=&quot;&quot; class=&quot;alignnone size-large wp-image-616&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Working on this bug made me very curious. How could some javascript code interact with c++ at run time.&lt;br /&gt;
I knew about the XPCOM object model used in Firefox and lately I’ve started to read more about XUL and the Gecko engine . This was the perfect time to start digging more deep and learn more about the Firefox foundations.&lt;br /&gt;
Using the videocontrols as a starting point I went to mxr and started searching some code.&lt;br /&gt;
From my initial search I think I found where the controls were loaded in c++. Now I just need to figure it out how all that happens &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/videocontrols.xml#1079&quot;&gt;videoscontrols.xml&lt;/a&gt; – define the video controls&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsVideoFrame.h#145&quot;&gt;nsCOMPtr mVideoControls;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsVideoFrame.cpp#94&quot;&gt;nsVideoFrame::CreateAnonymousContent&lt;/a&gt; – where the menu gets attached to the video element&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsNodeInfoManager.h#63&quot;&gt;nsNodeInfoManager&lt;/a&gt; – apparently used to load the video controls as well the poster image&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsNodeInfoManager.cpp#231&quot;&gt;nsNodeInfoMangager::GetNodeInfo&lt;/a&gt; – looks like the loading happens here&lt;/p&gt;
&lt;p&gt;Manage XPCOM objects?&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/nsprpub/lib/ds/plhash.c#359&quot;&gt;PL_HasTableLookup&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/nsprpub/lib/ds/plhash.h#73&quot;&gt;PLHasEntry&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/nsprpub/lib/ds/plhash.c#278&quot;&gt;PL_HasTableAdd&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NS_TrustedNewXULElement – where the XUL element gets created and casted to an nsIContent&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/base/public/nsContentCreatorFunctions.h#123&quot;&gt;NS_TrustedNewXULElement declaration&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/xul/content/src/nsXULElement.cpp#363&quot;&gt;NS_TrustedNewXULElement definition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TODO:&lt;/strong&gt;&lt;br /&gt;
Keep digging and find how the pieces fit together!&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/diogogmt.wordpress.com/611/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/diogogmt.wordpress.com/611/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=diogogmt.wordpress.com&amp;amp;blog=19981611&amp;amp;post=611&amp;amp;subd=diogogmt&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 03 Feb 2012 07:10:54 +0000</pubDate>
</item>
<item>
	<title>Diogo Golovanevsky Monteiro: DPS911 Update</title>
	<guid isPermaLink="false">http://diogogmt.wordpress.com/?p=602</guid>
	<link>http://diogogmt.wordpress.com/2012/02/02/dps911-update/</link>
	<description>&lt;p&gt;After being introduced to Firefox development last semester in the &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/DPS909&quot;&gt;DPS909 – Topics in Open Source Development&lt;/a&gt; and now being enrolled in the &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/DPS911&quot;&gt;DPS911 – Open Source Project&lt;/a&gt; it’s time to get some bugs fixed&lt;br /&gt;
Besides continuing the work started last semester in the implemention of the MouseLock Spec on Firefox, I picked a few other bugs to work on.&lt;/p&gt;
&lt;p&gt;My first Firefox patch originated from &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=715141&quot;&gt;Bug 715141&lt;/a&gt;. The bug was to add a keyboard shorcut to resize the zoom level of an image to a 1:1 scale. When Firefox serves an image file and the image is bigger than the boundaries of the browser, the image gets resize to fully fit in the browser window. A magnifying glass with a +/- sign appears when the mouse hover overs an image if the  image can be resized.&lt;br /&gt;
So the goal of the bug was to add support to manipulate the zoom level with only the keyboard.&lt;br /&gt;
In one of the comments of the bug, Jared suggested that the changes would probably happen on the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/html/document/src/ImageDocument.cpp&quot;&gt;ImageDocument.cpp&lt;/a&gt; file&lt;br /&gt;
At first I thought to look for the code that changed the browser zoom level, the Ctrl +/- shortcut. I found what I thought was the code for switching zoom levels in the HandleEvent method. However, it turned out to be the code that was resizing an mage to a 1:1 scale! The shortcut already existed, was Shift +/- I then spoke with Jared and he talked to gavin and in the end was decided that since noboby ever used, or even knew about the shortcut, it would be better to remove it due code maintance in the future, so &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=715141&quot;&gt;Bug 715141&lt;/a&gt; was closed and a new bug to remove the code was created,&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=718133&quot;&gt; Bug 718133&lt;/a&gt;.&lt;br /&gt;
On &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=718133&quot;&gt;Bug 718133&lt;/a&gt;, knowing where the code for the shortcut was located, all I had to do was remove it, and that was my first contribution to Firefox &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;My second contribution was &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=713383&quot;&gt;Bug 713383&lt;/a&gt;. On &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=376997&quot;&gt;Bug 376997&lt;/a&gt;, when the browser serves an image file instead of the image being displayed on the top left corner in a white background it began being displayed in the center of the page with a greyish background. However, if somedoy wanted to print an image, most likely they don’t want the greyish background or the image to be centered on the page. After some suggestions, was agreeded that the best solution would be to wrap all the new styles introduced in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=376997&quot;&gt;Bug 376997&lt;/a&gt; on a &lt;/p&gt;&lt;pre class=&quot;brush: plain;&quot;&gt;@media not print&lt;/pre&gt; rule and preserving the new styles for displaying an image but not applying them when the image is being printed.&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;Quick Summary:&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=633602&quot;&gt;Bug 633602 – Implement Pointer Lock (Mouse Lock) API&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=715141&quot;&gt;&lt;s&gt;Bug 715141 – Using keyboard to switch zoom level when viewing images directly&lt;/s&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=718133&quot;&gt;&lt;s&gt;Bug 718133 – Remove keyboard shortcuts for zooming to 1:1 scale when viewing standalone images&lt;/s&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=713383&quot;&gt;&lt;s&gt;Bug 713383 – Directly viewed images should be printed with a transparent background on the body&lt;/s&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=714071&quot;&gt;Bug 714071 – The Show Statistics setting is not preserved when toggling the full screen mode&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=712225&quot;&gt;Bug 712225 – When element is in fullscreen mode, window.innerHeight is bigger than window.outerHeight&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=581866&quot;&gt;Bug 581866 – outerWidth / outerHeight features in window.openDialog do not include window manager decorations&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=581863&quot;&gt;Bug 581863 – gtk2/nsWindow::GetScreenBounds returns client window size instead of outer (frame) size&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/diogogmt.wordpress.com/602/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/diogogmt.wordpress.com/602/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=diogogmt.wordpress.com&amp;amp;blog=19981611&amp;amp;post=602&amp;amp;subd=diogogmt&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 02 Feb 2012 23:03:26 +0000</pubDate>
</item>
<item>
	<title>Chad Pilkey: First Post</title>
	<guid isPermaLink="false">http://chadpilkey.wordpress.com/?p=5</guid>
	<link>http://chadpilkey.wordpress.com/2012/02/02/first-post/</link>
	<description>&lt;p&gt;I was just added to the team working on the Big Blue Button project this week. It’s exciting to finally be working on a “real world” project that is surprisingly large.&lt;/p&gt;
&lt;p&gt;I’m looking forward to working with Justin, Anatoly and Fardad this semester.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/chadpilkey.wordpress.com/5/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/chadpilkey.wordpress.com/5/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=chadpilkey.wordpress.com&amp;amp;blog=32325309&amp;amp;post=5&amp;amp;subd=chadpilkey&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 02 Feb 2012 21:14:20 +0000</pubDate>
</item>
<item>
	<title>Justin Robinson: Cast your ballots, folks!</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=370</guid>
	<link>http://justintrobinson.wordpress.com/2012/02/02/cast-your-ballots-folks/</link>
	<description>&lt;p&gt;The polling module is coming along nicely, the voting results save properly to Redis now, the checkboxes are registering properly, all is right with the world. I think the next thing we need to take care of is the results window for the presenter, and then we’ll have something we can actually demonstrate to Blindside without having to go into Redis through the command line (don’t hold me to that, though) There’s still a lot to do, though.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/370/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/370/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=370&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 02 Feb 2012 19:29:21 +0000</pubDate>
</item>
<item>
	<title>Aries Alwi: RPM Writing</title>
	<guid isPermaLink="false">http://asalwi123.wordpress.com/?p=23</guid>
	<link>http://asalwi123.wordpress.com/2012/02/02/rpm-writing/</link>
	<description>&lt;p&gt;There are some packages we need to install before we can create an RPM package. We can install them using &lt;strong&gt;yum&lt;/strong&gt; command.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;yum groupinstall “Fedora Packager”&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;yum install rpmlint yum-utils&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We need to have &lt;strong&gt;‘~/rpmbuild/’&lt;/strong&gt; directory and &lt;strong&gt;‘~/.rpmmacros’&lt;/strong&gt; file by running this command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rpmdev-setuptree&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Under the&lt;strong&gt; ‘~/rpmbuild’&lt;/strong&gt; directory, there are some directories automatically created: &lt;strong&gt;BUILD, BUILDROOT, RPMS, SOURCES, SPECS, SRPMS&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If later on we need to clears out these directories, run this command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rpmdev-wipetree&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First step to create an RPM package is move the package source code (tarball) in&lt;strong&gt; ‘~/rpmbuild/SOURCES’&lt;/strong&gt; directory. In this example I will be using &lt;strong&gt;moe&lt;/strong&gt; package.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;mv moe-1.3.tar.gz ~/rpmbuild/SOURCE&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Change directory to ‘&lt;strong&gt;~/rpmbuild/SPECS&lt;/strong&gt;‘, then create an empty skeleton spec file there.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;cd ~/rpmbuild/SPECS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rpmdev-newspec moe&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The file will automatically has &lt;strong&gt;.spec&lt;/strong&gt; extension (e.g. &lt;strong&gt;moe.spec&lt;/strong&gt;). Edit the the specfile (using &lt;strong&gt;vi&lt;/strong&gt;) and add all the required fields.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;vi moe.spec&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After finish editing, try to build the package.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rpmbuild -ba moe.spec&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the error message that I encountered:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;error: line 10: Empty tag: BuildRequires:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I simply commented (by adding #) these two lines for now:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#BuildRequires&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#Requires&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Then, I tried to rebuild the package.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rpmbuild -ba moe.spec&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything seemed to go fine until I saw these error messages in the end:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RPM build errors:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;    Installed (but unpackaged) file(s) found:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /etc/moerc&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/bin/moe&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/share/info/dir&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/share/info/moe.info.gz&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/share/man/man1/moe.1.gz&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We can resolve these errors by adding those specified files under &lt;strong&gt;‘%files&lt;/strong&gt;‘ tag in the spec file (&lt;strong&gt;moe.spec&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;%files&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /etc/moerc&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/bin/moe&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/share/info/dir&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/share/info/moe.info.gz&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;   /usr/share/man/man1/moe.1.gz&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try to rebuild the RPM package.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rpmbuild -ba moe.spec&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There isn’t any error messages! Yaaayy &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif&quot; alt=&quot;:D&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;If the build is successful, you should see the binary RPM under &lt;strong&gt;‘~/rpmbuild/RPMS/’&lt;/strong&gt; directory and the source RPM under &lt;strong&gt;‘~/rpmbuild/SRPMS/’&lt;/strong&gt; directory.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://asalwi123.files.wordpress.com/2012/02/moe1.png&quot;&gt;&lt;img src=&quot;http://asalwi123.files.wordpress.com/2012/02/moe1.png?w=500&amp;amp;h=166&quot; title=&quot;moe&quot; height=&quot;166&quot; width=&quot;500&quot; alt=&quot;moe_result&quot; class=&quot;alignnone size-full wp-image-29&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/asalwi123.wordpress.com/23/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/asalwi123.wordpress.com/23/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=asalwi123.wordpress.com&amp;amp;blog=31704068&amp;amp;post=23&amp;amp;subd=asalwi123&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 02 Feb 2012 06:46:45 +0000</pubDate>
</item>
<item>
	<title>Raymond Hung: Pointer Lock – Developing on Windows</title>
	<guid isPermaLink="false">http://raymondhung.wordpress.com/?p=220</guid>
	<link>http://raymondhung.wordpress.com/2012/02/02/pointer-lock-developing-on-windows/</link>
	<description>&lt;p&gt;There’s been a lack of posts I must admit, much of it due to the lack of any real significant breakthroughs. Much of the progress has been minor ones which didn’t feel like they merited a post in itself. So now that a week has essentially come, a round up post is in order. As the title of the post suggests, much of this post will detail my experience while working on Windows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Work Done&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There were three main things that were necessary to get the tests done (assuming that the tests from last semester were all pretty much perfect). The first was that the tests needed to be updated to use the proper syntax. This meant that lines that said &lt;code&gt;var pointer = navigator.pointer&lt;/code&gt; got changed to &lt;code&gt;var pointer = navigator.mozPointer&lt;/code&gt;. The second thing that needed to be done was to trim unnecessary tests. Several tests from last semester had tests that overlapped with each other, and in general, if it’s tested once and it works, don’t bother testing it again, it’s a waste of time. Lastly, one thing that was noticed by a few of the test developers from last semester were that there were leaks that were being caught by mochitest.&lt;/p&gt;
&lt;p&gt;This last task was the most time consuming of them all and it ended up also being mostly a wasted effort. Much of the leaks actually occurred in the now defunct file_MouseEvents.html. As mentioned in my &lt;a href=&quot;http://raymondhung.wordpress.com/2012/01/26/mouse-lock-tests-status/&quot;&gt;previous post&lt;/a&gt;, when I first found this, I was extremely exciting. It took ages to find this out. I had to cut files from the test harness one by one to find which file did it. Afterwards I had to lob of entire sections of the test to finally find the culprit, and then promptly learned that it was a &lt;strong&gt;Windows&lt;/strong&gt; specific issue. Luckily, it turns out that we didn’t need to be that specific, which meant we could avoid the leak totally. By specific I mean that for Firefox, the route a mousedown event takes is for the most part is the same regardless of which button is pressed. So instead of sending a mousedown event for left, middle, and right mouse button, you can send a generic one and know that it will cover all three.&lt;/p&gt;
&lt;p&gt;The next major work was to integrate into file_movementXY.html a test to check to make sure the mouse can theoretically move beyond the element in point lock. In other words, once in pointer lock, the mouse should be able to continue to move in any direction and not worry about hitting the “edge” of the browser which would, in normal circumstances, cause the mouse to stop reporting events to the browser. Original attempts were fairly straight forward. The test would move the mouse, store the mozMovementX and mozMovementY move it almost half the screen 3 times, and then check to make sure the values added up to be larger than the screen width or height (depending on if we’re comparing X or Y). On linux it flat out failed. Instead of getting a positive number, it seemed that we were getting the negative equivalent to what we were expecting. On &lt;strong&gt;Windows&lt;/strong&gt;, it was worse. For the most part, running it would give the tests a pass (which was why I pushed to my repository for peer review), but if you were to move your mouse outside of the browser when the test started, the tests would fail and something similar to the linux error occurs… a negative number. It turns out, the test could be simplified and after a chat with &lt;a href=&quot;http://diogogmt.wordpress.com/&quot;&gt;Diogo&lt;/a&gt; the current method was developed. The idea was that by moving the mouse to the center and initializing pointer lock, we know that after each move we go back to the center of the screen. We would move a quarter of the screen each time, and when the moves are finished we can declare that it works. The reason is because if we try to use synthesizeMouse and send the mouse to a location beyond the browser, the test would hang and thus the test would fail.&lt;/p&gt;
&lt;p&gt;More recently, work was being done on file_cursorPosEvents.html. This really highlighted a lack of understanding on my part regarding asynchronous calls and events. I’m too used to coding in C and C++ with synchronous calls and often times I make the incorrect assumption that certain things are synchronous when they’re not. In such cases, we’re looking at possible random fails. Another poor habit includes not using a bool when all I use a variable for is to track if something happened or not. With this test, I’ve also found that working running pointer lock tests on Windows is wonky at best…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Rant&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I’m sure we need to test these on Windows, however, so far it seems that whatever runs on Linux works on Windows. More interestingly is that, whatever &lt;span style=&quot;text-decoration: underline;&quot;&gt;doesn’t&lt;/span&gt; work Linux, still has a chance to work “as expected” on Windows. As I showed Diogo on Tuesday, while movementXY would fail on linux, and it would succeed with no problems on Windows. This has caused me and my colleagues a lot of headaches (namely because I push it up to my repo for review because it works for me… just not for them). However, to really highlight the “what the heck”-ness of developing on Windows, take a look below. The following screenshots were taken right after a pull and compile. No files were changed that could alter the behaviour.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://raymondhung.files.wordpress.com/2012/02/specific.png&quot;&gt;&lt;img src=&quot;http://raymondhung.files.wordpress.com/2012/02/specific.png?w=300&amp;amp;h=187&quot; title=&quot;specific&quot; height=&quot;187&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;alignnone size-medium wp-image-218&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The image above shows that for the most part, everything is A-OKAY! We have 1 todo left and this bunch of tests are good. It should be noted that there should actually be one fail. This failure is consistent with macs and linux computers when they run the same set of tests. So there seems to be a missing error… but that’s not all. Right now we’re in a specific test, however, if I were to go up one level …&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://raymondhung.files.wordpress.com/2012/02/nowafail1.png&quot;&gt;&lt;img src=&quot;http://raymondhung.files.wordpress.com/2012/02/nowafail1.png?w=300&amp;amp;h=247&quot; title=&quot;nowafail&quot; height=&quot;247&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;alignnone size-medium wp-image-219&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, test_FullScreenHarness actually DOES have a fail. To clarify, the order in which this occurred, I actually started out in the folder view and then went into run test_FullScreenHarness to see what was actually failing. The important thing to note is by running test_FullScreenHarness, we actually LOST a test. It didn’t all of a sudden succeed, it just skipped it. Another reason for concern is that the number of tests total up to 76. The actual number of tests that are supposed to be there is 80. The number of tests for mozPointerLock is correct, which means in the tests are missing in test_FullScreenHarness.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Next up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We’re very close to finishing up the tests, the last one is to fix file_cursorPosEvents.html. The purpose is to make sure that once in pointer lock, mouseover, mouseenter, mouseout, mouseleave events are no longer triggered. After a lot of iterations of the &lt;a href=&quot;https://github.com/rhung/mozilla-central/blob/mouselock-tests/dom/tests/mochitest/pointerlock/file_cursorPosEvents.html&quot;&gt;file &lt;/a&gt;and consulting with &lt;a href=&quot;http://steventseng.wordpress.com/&quot;&gt;Steven&lt;/a&gt;, we’re still somewhat stumped as to how to do this properly. At the moment, if you were to run this test, the set of tests will occur twice. This is because the mousemove that is directed to the child is redirected to the parent, which is why the tests happen twice. A solution was proposed to directly send to the child mouseover, mouseenter, mouseout, and mouseleave events to the child. In this case because those events are essentially eliminated, there’s nothing to signify to us that it’s “okay to check if the events occurred now.” The idea to circumvent that was to use setInterval or setTimeout… which probably won’t fly which means we’re still at the drawing board.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/raymondhung.wordpress.com/220/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/raymondhung.wordpress.com/220/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=raymondhung.wordpress.com&amp;amp;blog=27064523&amp;amp;post=220&amp;amp;subd=raymondhung&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 02 Feb 2012 06:07:05 +0000</pubDate>
</item>
<item>
	<title>Aries Alwi: Building from source code</title>
	<guid isPermaLink="false">http://asalwi123.wordpress.com/?p=20</guid>
	<link>http://asalwi123.wordpress.com/2012/02/02/building-from-source-code/</link>
	<description>&lt;p&gt;Before we start building from source, we have to install the &lt;strong&gt;development tools&lt;/strong&gt; and &lt;strong&gt;development libraries&lt;/strong&gt; installed in our system. Let’s install them using yum command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;yum groupinstall “Development Tools” “Development Libraries”&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We can choose various packages to be installed from &lt;a href=&quot;http://www.gnu.org/software/software.html#allgnupkgs&quot; target=&quot;_blank&quot; title=&quot;GNU Software Collection&quot;&gt;GNU Software Collection&lt;/a&gt;. I chose &lt;strong&gt;combine&lt;/strong&gt; and &lt;strong&gt;moe&lt;/strong&gt; for this example. You can download the package simply by copying the link of the packages and download them using &lt;strong&gt;wget&lt;/strong&gt; command.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;wget http://gnu.mirror.iweb.com/gnu/moe/moe-1.3.tar.gz&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After you downloaded the package, let’s unpack the tarball:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;tar xvzf moe-1.3.tar.gz&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then there should be a directory of the package that we just unpacked. Let use &lt;strong&gt;cd&lt;/strong&gt; command to change to that directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;cd moe-1.3&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Let’s read the build instructions in a file called INSTALL or README.&lt;/p&gt;
&lt;p&gt;Typically, we have to run the script that configures the build for our particular system first.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;./configure&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then, run a script to build the software.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;make&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Last, install the program.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;make install&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The installed program usually located in &lt;strong&gt;‘/usr/local/bin/’&lt;/strong&gt; directory. If the program installed properly, then you should be able to run it without any error messages.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This whole process of building from source code took me around twenty minutes. Good luck! &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/asalwi123.wordpress.com/20/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/asalwi123.wordpress.com/20/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=asalwi123.wordpress.com&amp;amp;blog=31704068&amp;amp;post=20&amp;amp;subd=asalwi123&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 02 Feb 2012 06:04:09 +0000</pubDate>
</item>
<item>
	<title>Justin Robinson: Check one-two, check one-two</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=367</guid>
	<link>http://justintrobinson.wordpress.com/2012/02/01/check-one-two-check-one-two/</link>
	<description>&lt;p&gt;Anatoly and I were having a problem with CheckBoxes yesterday and today, where we couldn’t get the Polling Module to actually recognize which boxes were and weren’t checked when a user votes on a poll that allows multiple selections. We were tearing our hair out trying to figure out how to find which boxes were selected, since the boxes were all being created dynamically and for some reason could not be accessed by their IDs.&lt;/p&gt;
&lt;p&gt;Well, it took a lot of searching to figure it out, but Anatoly finally found &lt;a href=&quot;http://forums.adobe.com/thread/482472&quot;&gt;this forum post &lt;/a&gt;where a user named Zolotoj demonstrated his homemade CheckBoxGroup class (you may have to scroll down a bit). We saw that he was using the CheckBox addEventListener method to assign a function to the Check Box’s click event, which we had been discussing but weren’t sure how to do. In Zolotoj’s code, the line looks like this: &lt;code&gt;chkBox.addEventListener(change, onClick)&lt;/code&gt;  and we changed ours to &lt;code&gt;addEventListener(MouseEvent.CLICK, checkButtonClick)&lt;/code&gt;.  We didn’t bother using the DataProvider class, instead our checkButtonClick() keeps track of which boxes are checked in an array, adding new elements and deleting duplicate ones as necessary.&lt;/p&gt;
&lt;p&gt;So I think we’re in the home stretch! The method to send the vote information back to the server is already in place, we just need to actually link it up to everything else.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/367/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/367/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=367&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Wed, 01 Feb 2012 18:39:31 +0000</pubDate>
</item>
<item>
	<title>Diogo Golovanevsky Monteiro: Synthesizing mouse events in a mochitest</title>
	<guid isPermaLink="false">http://diogogmt.wordpress.com/?p=585</guid>
	<link>http://diogogmt.wordpress.com/2012/01/31/synthesizing-mouse-events-in-a-mochitest/</link>
	<description>&lt;p&gt;Writing mochitests for firefox is a tricky task sometimes since you need to recreate use cases of browser usage withouth human interaction.&lt;br /&gt;
I was faced with the task of writing some tests to check the mouselock API. One test specifically, needed to check if mouse events were being retartgeted from the child to the parent locked element, for example:&lt;br /&gt;
&lt;/p&gt;&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;div id=&quot;parent&quot;&amp;gt;
&amp;lt;div id=&quot;child&quot;&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If parent is locked and child receives a mouseevent, the event should be retargeted to the parent and not be dispatched to the child.&lt;/p&gt;
&lt;p&gt;To write the test I had to use the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js&quot;&gt;EventUtils&lt;/a&gt; library&lt;br /&gt;
EventUtils has several different functions to deal with synthesizing mouse and key events, the one I was interested for  dispatching mouse events was: &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#186&quot;&gt;&lt;b&gt;synthesizeMouseAtCenter&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since the element is in fullscreen mode, and it doesn’t matter which specific position the mouse event occurs, synthesizeMouseAtCenter was perfect for the task.&lt;/p&gt;
&lt;p&gt;Dispatching a mouse event with sythesizeMouseAtCenter involves the work of three functions:&lt;/p&gt;
&lt;h3&gt;1. &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#187&quot;&gt;synthesizeMouseAtCenter&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The center of the element receiving the event is calculated by getting its the dimensions with &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsGenericElement.cpp#2122&quot;&gt;getBoundingClientRect&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;2. &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#149&quot;&gt;synthesizeMouse&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Here the center of the element is calculated in a browser perspective.&lt;br /&gt;
Again getBoundClientRect is called, but this time the distance between the left and top border from the browser window is added to the center point of the element calculated in synthesizeMouseAtCenter&lt;/p&gt;
&lt;h3&gt;3. &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#167&quot;&gt;synthesizeMouseAtPoint&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the end synthesizeMouseAtPoint is called with the x,y coordinates of where the event should take place in the browser window, the type of event it should be dispatched and the window that will receive the event.&lt;/p&gt;
&lt;p&gt;To dispatch the event the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/dom/base/nsDOMWindowUtils.cpp#392&quot;&gt;nsDOMWindowUtils::SendMouseEvent&lt;/a&gt; method gets called.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/diogogmt.wordpress.com/585/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/diogogmt.wordpress.com/585/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=diogogmt.wordpress.com&amp;amp;blog=19981611&amp;amp;post=585&amp;amp;subd=diogogmt&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 19:24:17 +0000</pubDate>
</item>
<item>
	<title>Catherine Leung: Setting up Thunderbird with Seneca’s new staff email system</title>
	<guid isPermaLink="false">http://cleung.wordpress.com/?p=386</guid>
	<link>http://cleung.wordpress.com/2012/01/31/setting-up-thunderbird-with-senecas-new-staff-email-system/</link>
	<description>&lt;p&gt;I’m writing this blog because I think that there may be other fellow Senecan’s out there that might be in the same boat as me and I want to help them out.  Recently we changed over our email system to Microsoft Exchange Sever.  Now, while I had no great love for our old mail server, the new server meant that we had to update our email clients.   Helpdesk is supporting only outlook for mail clients and that just isn’t going to work for me.  They did however provide information on how to connect to the email server using IMAP.  This information is for the most part correct.  However, there are some things that don’t match up exactly with options available for Thunderbird.  So here is what you can do…&lt;/p&gt;
&lt;p&gt;1) Thunderbird will auto detect your settings… this is probably the easiest way to do it and if I had let it do that I wouldn’t have been unable to sent email for a whole day &lt;img src=&quot;http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif&quot; alt=&quot;:P&quot; class=&quot;wp-smiley&quot; /&gt; .    Just go to the bottom of the account window, click on the account action button and choose add account and fill in the info in the dialog box and let Thunderbird do the rest.&lt;/p&gt;
&lt;p&gt;2) If you want to manually set it up, the info supplied by ITS is correct however, there was a bit of confusion for me on the labelling.  For incoming server, choose SSL/TLS for outgoing choose STARTTLS&lt;/p&gt;
&lt;p&gt;Anyhow hope this helps!&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/cleung.wordpress.com/386/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/cleung.wordpress.com/386/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=cleung.wordpress.com&amp;amp;blog=1697954&amp;amp;post=386&amp;amp;subd=cleung&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 18:19:16 +0000</pubDate>
</item>
<item>
	<title>Kezhong Liang: [Solved]Could not allocate requested partitions: requested size exceeds maximum allowed</title>
	<guid isPermaLink="false">http://kezhong.wordpress.com/?p=741</guid>
	<link>http://kezhong.wordpress.com/2012/01/31/solvedcould-not-allocate-requested-partitions-requested-size-exceeds-maximum-allowed/</link>
	<description>&lt;p&gt;We had a server which had 4 hard drivers made RAID10 using LSI hardware RAID card. The total size of hard driver was 4TB. I wanted to install Fedora 16 on it via graphical mode. I choose “Create Custom Layout” to assign partitions. After I assigned BIOS Boot, /boot, and swap partition, and I wanted to assigned the rest size to / partion, it prompted “Could not allocate requested partitions: requested size exceeds maximum allowed”.&lt;br /&gt;
I turned back, and pressed Ctrl+Alt+F2 to switch to text terminal,&lt;br /&gt;
# parted /dev/sda&lt;br /&gt;
(parted) mklabel gpt&lt;br /&gt;
(parted) quit&lt;br /&gt;
pressed Ctrl+Alt+F6 to switch to graphical terminal, choose “Create Custom Layout” to assign partitions again. Everything was ok.&lt;/p&gt;
&lt;br /&gt;Filed under: &lt;a href=&quot;http://kezhong.wordpress.com/category/uncategorized/&quot;&gt;Uncategorized&lt;/a&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/kezhong.wordpress.com/741/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/kezhong.wordpress.com/741/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=kezhong.wordpress.com&amp;amp;blog=4823265&amp;amp;post=741&amp;amp;subd=kezhong&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 17:24:35 +0000</pubDate>
</item>
<item>
	<title>Ching Wei Tseng (Steven): PointerLock [MouseLock] API Test – Part 2: Crashing the Test</title>
	<guid isPermaLink="false">http://steventseng.wordpress.com/?p=313</guid>
	<link>http://steventseng.wordpress.com/2012/01/30/pointerlock-mouselock-api-test-part-2/</link>
	<description>&lt;p&gt;This blog is a continuation of &lt;a href=&quot;http://steventseng.wordpress.com/2012/01/30/mouselock-api-test-update-0-1-release/&quot; title=&quot;MouseLock API Test Update [0.1 Release]&quot;&gt;my previous blog on the PointerLock Tests&lt;/a&gt; and I initially didn’t even planned for a two part blog. This happened due to a failure of the test which caused it to crash.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;The Crash&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Overall, the crash was caused when a HTML element tag have CSS styling for the “display” attribute. In some of our test cases, we had CSS styles that looked like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&amp;lt;div id=”content” style=”display: none”&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The problem with having the “display” attribute set to none is that when trying to lock the mouse, the underlying code tries to get the element “rectangle”. This causes a problem when the “display” attribute is set to “none”, as there is no “rectangle” to be obtained. Thus the crash occurs. If the display is left in it’s default value, that is, the “display” attribute is set to “block” then the rectangle exists and the test does not break.&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-313&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You may ask why I didn’t go through this crash issue before? Well, the crash seem to occur on isolated incidents on both Windows Build and Linux Build (where &lt;a href=&quot;http://raymondhung.wordpress.com/&quot; target=&quot;_blank&quot; title=&quot;Raymond Hung&quot;&gt;Raymond&lt;/a&gt; and I have our build on, respectively). For example, I had only two such occurrence that is is impossible for me to recreate to scenario to find a fix and the same happened to Raymond. However, when &lt;a href=&quot;http://vocamus.net/dave/&quot; target=&quot;_blank&quot; title=&quot;Dave&quot;&gt;Dave&lt;/a&gt; pull the test from me and ran them, he gets the crash EVERYTIME!!! He was practically unable to run any of the test cases even once.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;The Fix&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Why is this crash odd? I do not have the answer and hopefully will get one soon from other developers (Dave is asking people involved with the API for feedback).&lt;/p&gt;
&lt;p&gt;Until we get further feedback, we are working with a fix where when the element being locked have their “display” CSS attribute set to “none”, then the pointer will not lock. A test is also available to check for this, it is the &lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_pointerLockCSSDisplay.html&quot; target=&quot;_blank&quot; title=&quot;file_pointerLockCSSDisplay.html&quot;&gt;file_pointerLockCSSDisplay.html&lt;/a&gt; file.&lt;/p&gt;
&lt;p&gt;For a view on what was changed to incorporate this fix, &lt;a href=&quot;https://github.com/humphd/mozilla-central/commit/b871c13a7e5d29bcad4dd0bed405fdf10b84c255&quot; target=&quot;_blank&quot; title=&quot;Diff for Style Check&quot;&gt;look at the Diff on my Github account&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Outcome?&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;A crash like this brings up many questions. Questions like what other problems would the API run into. If someone didn’t put in the styling tag, we would not have known this problem at all. Another question, which is being discussed with people involved with the API specification, should we allow lock to occur when constraints like the “display: none” are present? Would it open up other problems with security? Who can answer these questions?&lt;/p&gt;
&lt;p&gt;I wish I knew….&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: Dave have &lt;a href=&quot;http://vocamus.net/dave/?p=1442&quot; target=&quot;_blank&quot; title=&quot;How to crash like you mean it&quot;&gt;this blog&lt;/a&gt; that explains the problem further&lt;/strong&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/steventseng.wordpress.com/313/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/steventseng.wordpress.com/313/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=steventseng.wordpress.com&amp;amp;blog=27057459&amp;amp;post=313&amp;amp;subd=steventseng&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 03:29:46 +0000</pubDate>
</item>
<item>
	<title>Ching Wei Tseng (Steven): MouseLock API Test Update [0.1 Release]</title>
	<guid isPermaLink="false">http://steventseng.wordpress.com/?p=286</guid>
	<link>http://steventseng.wordpress.com/2012/01/30/mouselock-api-test-update-0-1-release/</link>
	<description>&lt;p&gt;Over the past week, I had been pushing myself to get the test for the MouseLock API up for review over the weekend or early next week. At the time of writing this blog, almost all the test are good to go. Like I just said, ALMOST!!&lt;/p&gt;
&lt;p&gt;I was working with &lt;strong&gt;&lt;a href=&quot;http://raymondhung.wordpress.com/&quot; target=&quot;_blank&quot; title=&quot;Raymond Hung&quot;&gt;Raymond Hung&lt;/a&gt; &lt;/strong&gt;to get these test completed. I mentioned in &lt;strong&gt;&lt;a href=&quot;http://steventseng.wordpress.com/2012/01/22/mouselock-api-test-fixing-and-reviewing/&quot; target=&quot;_blank&quot; title=&quot;Mouselock API Test – Fixing and Reviewing&quot;&gt;my previous blog&lt;/a&gt;&lt;/strong&gt; about how I was struggling while trying to read other people’s code and make sure they work properly. Well, I am still fighting that war. It will be a war (with numerous battles, of course) that will not end until the day I retire. While reading other people’s code block, it does not just becomes a matter of getting the code to work. I involves a lot more work like making it readable so other people who will review my code will not have to go through what I went and also if they don’t understand, they’ll just throw my code back. It also involved ensuring that all the test follow a consistent format.&lt;/p&gt;
&lt;p&gt;In this blog, I will talk about almost all the test we have worked with.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;**Note: All the test being linked in this blog is on &lt;a href=&quot;https://github.com/Anachid&quot; target=&quot;_blank&quot; title=&quot;Anachid&quot;&gt;my GitHub account&lt;/a&gt; and as such, the files will be updated from time to time and some of them may even be taken down. It is also good to note that the MouseLock API Draft Specification had changed it’s name to PointerLock and I will be referring to PointerLock throughout this blog and any that may follow.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-286&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For those of you who have not been reading and have the time, you may follow up on what have been happening with this test suite through &lt;strong&gt;&lt;a href=&quot;http://steventseng.wordpress.com/category/open-source/mouselock/&quot; target=&quot;_blank&quot; title=&quot;MouseLock API Test&quot;&gt;my blog section on the PointerLock API test&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For the impatient, well the test are to ensure that the PointerLock API does not crash for any possible edge cases we could think of. These test must work on &lt;strong&gt;&lt;a href=&quot;https://developer.mozilla.org/en/Mochitest&quot; target=&quot;_blank&quot; title=&quot;Mochitest&quot;&gt;Mochitest&lt;/a&gt;&lt;/strong&gt;, Mozilla’s automated regression test framework.&lt;/p&gt;
&lt;h1&gt;Tests, the gritty details&lt;/h1&gt;
&lt;p&gt;First in the queue is the &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_DOMtree.html&quot; target=&quot;_blank&quot; title=&quot;file_DOMtree.html&quot;&gt;file_DOMtree.html&lt;/a&gt;&lt;/strong&gt;. This test is used to check that the mouse can be locked only when the target element is in the current DOM tree. It also checks that if the target is “ripped” out of the current DOM tree while the element is in FullScreen and in locked mode, the mouse loses the lock.&lt;/p&gt;
&lt;p&gt;Next up is the &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_nestedFullScreen.html&quot; target=&quot;_blank&quot; title=&quot;file_nestedFullScreen.html&quot;&gt;file_nestedFullScreen.html&lt;/a&gt;&lt;/strong&gt;, where it test to ensure that when there is a nested HTML tag, lock is not allowed to the child element when the parent is in lock. Why would we do this? Well, ask yourself how many cross-hairs do you want to use when playing a first person shooter? The main reason for this is mainly be allowing lock on child element, it may open up security issues which we definitely don’t want.&lt;/p&gt;
&lt;p&gt;Next (on the chopping block) is &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_differentDOM.html&quot; target=&quot;_blank&quot; title=&quot;file_differentDOM.html&quot;&gt;file_differentDOM.html&lt;/a&gt;&lt;/strong&gt;, wherein we had to check that when there is an iframe element (my Nemesis while using Mochitest), any attempt to gain PointerLock from the content inside the iframe is denied as the requesting element belongs to another DOM which is different from the current active DOM (the parent of the iframe). I think if the child element within the iframe is allowed to lock the pointer, it may allow cross-site scripting which is BAD for the good guys and GOOD for the bad guys.&lt;/p&gt;
&lt;div&gt;Now we have the &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_fullscreen.html&quot; target=&quot;_blank&quot; title=&quot;file_fullscreen.html&quot;&gt;file_fullscreen.html&lt;/a&gt;&lt;/strong&gt;. This test validate checks for multiple scenario, such as:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;pointer.isLocked, which is a validation checker, returns true if mouse is locked, false otherwise.&lt;/li&gt;
&lt;li&gt;the pointer.lock() takes in three argument, namely, a DOM element, a success callback and a failure callback. &lt;em&gt;&lt;strong&gt;[this method of operating is currently being debated and the folks are looking at using events instead of callback, which translates to (yup!) &quot;more work&quot;]&lt;/strong&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;When the element is locked, it fires the appropriate callback immediately. This way depending on the result, the user can execute different actions accordingly. In my honest, I think callbacks are decent to work with, once you get the hang of it.&lt;/li&gt;
&lt;li&gt;Finally, the pointer.unlock() method cancels the pointer lock and returns the pointer (known as a mouse now as it is no longer locked) to it original state and position.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next up is &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_doubleLockCallBack.html&quot; target=&quot;_blank&quot; title=&quot;file_doubleLockCallBack.html&quot;&gt;file_doubleLockCallBack.html&lt;/a&gt;&lt;/strong&gt;. This test is to check that when a pointer is locked, another instance of pointer.lock() still fires the success callback as the the element is still in FullScreen and pointer is still locked (DUH~!).&lt;/p&gt;
&lt;p&gt;Now we have &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_unlockOnUnload.html&quot; target=&quot;_blank&quot; title=&quot;file_unlockOnUnload.html&quot;&gt;file_unlockOnUnload.html&lt;/a&gt;&lt;/strong&gt;, where the pointer must lose it’s locked state when the window unloads. In a nut shell, a window is the first thing that gets loaded in a browser before the document gets loaded (this is properly &lt;a href=&quot;http://eligeske.com/jquery/what-is-the-difference-between-document-and-window-objects-2/&quot; target=&quot;_blank&quot; title=&quot;window vs. document&quot;&gt;explained here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;We then have &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_exitMouseLockOnLoseFocus.html&quot; target=&quot;_blank&quot; title=&quot;file_exitMouseLockOnLoseFocus.html&quot;&gt;file_extiMouseLockOnLoseFocus.html&lt;/a&gt;&lt;/strong&gt;. As the name suggest, this test check to ensure that the pointer loses its lock state when the current window/document loses focus. A scenario of losing focus is when the user switches between tabs either through alt+tab or mouse clicks, then the window/document loses focus and pointer gets unlocked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_pointerLockLost.html&quot; target=&quot;_blank&quot; title=&quot;file_pointerLockLost.html&quot;&gt;file_pointerLockLost.html&lt;/a&gt;&lt;/strong&gt; is a test that is used to check that when the mouselocklost event fires, the bubble attributes are set to true, and the target attribute is the element that initiated the lock. (For details on what is an event bubbles, &lt;a href=&quot;http://www.w3schools.com/jsref/event_bubbles.asp&quot; target=&quot;_blank&quot; title=&quot;Event Bubbles&quot;&gt;refer to this page&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_defaultUnlock.html&quot; target=&quot;_blank&quot; title=&quot;file_defaultUnlock.html&quot;&gt;file_defaultUnlock.html&lt;/a&gt;&lt;/strong&gt; file is used to check only when default keys are pressed with the element lose it’s locked state. For example, when a user press the letter “a”, the element should not lose it’s locked state. However, if they press the “ESC” key (which is set as the default), then the element loses its locked state.&lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_userPref.html&quot; target=&quot;_blank&quot; title=&quot;file_userPref.html&quot;&gt;file_userPref.html&lt;/a&gt;&lt;/strong&gt; test, we check that there is a user preference available to allow users to enable the browser to lock the pointer/mouse. It would drive a lot of people mad if this option isn’t available, right?&lt;/p&gt;
&lt;p&gt;Next up is &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_constantXY.html&quot; target=&quot;_blank&quot; title=&quot;file_constantXY.html&quot;&gt;file_constantXY.html&lt;/a&gt;&lt;/strong&gt; (we a nearly done), where we test that when the mouse is unlocked, the movement between a point (X1, Y2) to another (X2, Y2) is different. However, when the pointer is locked, all the values should equal to zero.&lt;/p&gt;
&lt;p&gt;Finally, &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_targetOutOfFocus.html&quot; target=&quot;_blank&quot; title=&quot;file_targetOutOfFocus.html&quot;&gt;file_targetOutOfFocus.html&lt;/a&gt;&lt;/strong&gt;, is used to check that an element can be locked even when it is not in focus. For example, in a page with two div element, and div1 should be able to lock the pointer even though div2 maybe the element in focus. This is not similar to &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_exitMouseLockOnLoseFocus.html&quot; target=&quot;_blank&quot; title=&quot;file_exitMouseLockOnLoseFocus.html&quot;&gt;file_exitMouseLockOnLoseFocus.html&lt;/a&gt;&lt;/strong&gt;, where focus is shifted entirely to another document.&lt;/p&gt;
&lt;p&gt;Whew!!! That was a long test, as of now, I made a pull request to be merged with &lt;a href=&quot;http://vocamus.net/dave/&quot; target=&quot;_blank&quot; title=&quot;Dave&quot;&gt;Dave Humphrey&lt;/a&gt; and he will post a patch on Bugzilla.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[Updated] More tests!!!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_cursorPosEvents.html&quot; target=&quot;_blank&quot; title=&quot;file_cursorPosEvents.html&quot;&gt;file_cursorPosEvents.html&lt;/a&gt;&lt;/strong&gt; is a test to check that the “mouseover”, “mouseout”, “mouseenter” and “mouseleave” events can be executed prior and after pointerlock.&lt;/p&gt;
&lt;div&gt;The &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_movementXY.html&quot; target=&quot;_blank&quot; title=&quot;file_movementXY.html&quot;&gt;file_movementXY.html&lt;/a&gt;&lt;/strong&gt; checks for multiple scenario:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;They check that mozMovementX and mozMovementY are present in a mouse event object.&lt;/li&gt;
&lt;li&gt;It also checks that value of mozMovementXY and it should be equal to the current screenXY minus the last screenXY.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;What’s Left?&lt;/h1&gt;
&lt;p&gt;Well we currently have one test that is commented out as it is throwing a bunch of weird errors. It is the &lt;strong&gt;&lt;a href=&quot;https://github.com/Anachid/mozilla-central/blob/mouselock/dom/tests/mochitest/pointerlock/file_MouseEvents.html&quot; target=&quot;_blank&quot; title=&quot;file_MouseEvents.html&quot;&gt;file_MouseEvents.html&lt;/a&gt;&lt;/strong&gt;. A possible problem that we can think of is that we cannot pin point the exact location of the mouse before the lock to synthesize it properly.&lt;/p&gt;
&lt;h1&gt;What’s Next?&lt;/h1&gt;
&lt;p&gt;What’s next? I will be most likely be making small changes that may have formatting issues from Dave and other such little problem. I will also be waiting for a review on the next patch. Until then, I can return to my attention on the bug that I worked on partially (&lt;strong&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=601535&quot; target=&quot;_blank&quot; title=&quot;Bug 601535&quot;&gt;Bug 601535&lt;/a&gt;&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;**Updated: There is a weird crash that caused the test to fail. &lt;a href=&quot;http://steventseng.wordpress.com/2012/01/30/pointerlock-mouselock-api-test-part-2/&quot; target=&quot;_blank&quot; title=&quot;PointerLock [MouseLock] API Test – Part 2: Crashing the Test&quot;&gt;Read my blog about it here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/steventseng.wordpress.com/286/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/steventseng.wordpress.com/286/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=steventseng.wordpress.com&amp;amp;blog=27057459&amp;amp;post=286&amp;amp;subd=steventseng&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 02:45:06 +0000</pubDate>
</item>
<item>
	<title>Matthew Schranz: Bug 698381 – My Work So Far</title>
	<guid isPermaLink="false">http://mschranz.wordpress.com/?p=154</guid>
	<link>http://mschranz.wordpress.com/2012/01/31/bug-698381-my-work-so-far/</link>
	<description>&lt;p&gt;When compared to bugs 698384 and 698385, this one is very similar. The problems I am finding myself having aren’t to do with how IDL defined optional arguments are handled but following the massive inheritance chain of nsIDOMNode. Compound that with the complexities of a code base like Mozilla and it can be pretty difficult at times really trying to figure out where or what you should be looking for.&lt;/p&gt;
&lt;p&gt;Various helpful mxr searches have helped me find where cloneNode actually has been implemented (at least from what I can tell) however it seems to be more complicated than simply updating those methods to the new definition of cloneNode. Currently when compiling I get these errors:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;
/Users/matthewschranz/Sites/repos/mozilla-central/content/html/content/src/nsHTMLOptionElement.h:70:3: error:
      too many arguments to function call, expected 2, have 3
  NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::) &lt;/strong&gt;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../dist/include/nsIDOMNode.h:225:135: note: instantiated from:
  ...* *_retval NS_OUTPARAM) { return _to CloneNode(deep, _argc, _retval); } \
                                                                 ^~~~~~~
/Users/matthewschranz/Sites/repos/mozilla-central/content/base/src/nsGenericElement.h:437:3: note:
      'CloneNode' declared here
  nsresult CloneNode(bool aDeep, nsIDOMNode **aResult)
  ^
In file included from /Users/matthewschranz/Sites/repos/mozilla-central/js/xpconnect/src/dombindings.cpp:1206:
In file included from ./dombindings_gen.cpp:3:
In file included from /Users/matthewschranz/Sites/repos/mozilla-central/content/html/content/src/nsHTMLSelectElement.h:61:
&lt;strong&gt;
/Users/matthewschranz/Sites/repos/mozilla-central/content/html/content/src/nsHTMLFormElement.h:109:3: error:
      too many arguments to function call, expected 2, have 3
  NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::) &lt;/strong&gt;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../dist/include/nsIDOMNode.h:225:135: note: instantiated from:
  ...* *_retval NS_OUTPARAM) { return _to CloneNode(deep, _argc, _retval); } \
                                                                 ^~~~~~~
/Users/matthewschranz/Sites/repos/mozilla-central/content/base/src/nsGenericElement.h:437:3: note:
      'CloneNode' declared here
  nsresult CloneNode(bool aDeep, nsIDOMNode **aResult)
  ^
In file included from /Users/matthewschranz/Sites/repos/mozilla-central/js/xpconnect/src/dombindings.cpp:1206:
In file included from ./dombindings_gen.cpp:3:

&lt;strong&gt;
/Users/matthewschranz/Sites/repos/mozilla-central/content/html/content/src/nsHTMLSelectElement.h:262:3: error:
      too many arguments to function call, expected 2, have 3
  NS_FORWARD_NSIDOMNODE(nsGenericHTMLFormElement::) &lt;/strong&gt;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../dist/include/nsIDOMNode.h:225:135: note: instantiated from:
  ...* *_retval NS_OUTPARAM) { return _to CloneNode(deep, _argc, _retval); }
&lt;/pre&gt;
&lt;p&gt;The troubles I am having is attempting to figure out what those two forward declarations are calling.&lt;/p&gt;
&lt;p&gt;Honestly this is the only thing that’s leaving me stuck at this point. For now I think I’ll go get myself level 1 Try server access so I can finish another ticket.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mschranz.wordpress.com/154/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mschranz.wordpress.com/154/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mschranz.wordpress.com&amp;amp;blog=20389101&amp;amp;post=154&amp;amp;subd=mschranz&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 02:27:14 +0000</pubDate>
</item>
<item>
	<title>Gang Li: RPM-Writing Lab 2</title>
	<guid isPermaLink="true">http://ligangbory.wordpress.com/2012/01/31/rpm-writing-lab-2/</guid>
	<link>http://ligangbory.wordpress.com/2012/01/31/rpm-writing-lab-2/</link>
	<description>&lt;p&gt;[root@fedora RPMS]# rpmlint x86_64&lt;br /&gt;ocrad-debuginfo.x86_64: E: no-changelogname-tag&lt;br /&gt;ocrad-debuginfo.x86_64: W: invalid-license free&lt;br /&gt;ocrad-debuginfo.x86_64: E: debuginfo-without-sources&lt;br /&gt;ocrad.x86_64: W: summary-not-capitalized C test&lt;br /&gt;ocrad.x86_64: E: no-description-tag&lt;br /&gt;ocrad.x86_64: E: no-changelogname-tag&lt;br /&gt;ocrad.x86_64: W: invalid-license free&lt;br /&gt;ocrad.x86_64: W: devel-file-in-non-devel-package /usr/include/ocradlib.h&lt;br /&gt;ocrad.x86_64: E: info-files-without-install-info-postin /usr/share/info/ocrad.info.gz&lt;br /&gt;ocrad.x86_64: E: info-files-without-install-info-postun /usr/share/info/ocrad.info.gz&lt;br /&gt;ocrad.x86_64: E: info-dir-file /usr/share/info/dir&lt;br /&gt;ocrad.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir&lt;br /&gt;ocrad.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir&lt;br /&gt;ocrad.x86_64: W: devel-file-in-non-devel-package /usr/libexec/libocrad.a&lt;br /&gt;2 packages and 0 specfiles checked; 9 errors, 5 warnings&lt;/p&gt;
&lt;p&gt;There is no %changelog tag in your spec file. To insert it, just insert a&lt;br /&gt;‘%changelog’ in your spec file and rebuild it&lt;br /&gt;%changelog&lt;br /&gt;*Jan 26 renew&lt;/p&gt;
&lt;p&gt; /usr/bin/ocrad&lt;br /&gt;   /usr/include/ocradlib.h&lt;br /&gt;   /usr/libexec/libocrad.a&lt;br /&gt;   /usr/share/info/dir&lt;br /&gt;   /usr/share/info/ocrad.info.gz&lt;br /&gt;   /usr/share/man/man1/ocrad.1.gz&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;[root@fedora SPECS]# rpmlint ocrad.spec&lt;br /&gt;ocrad.spec: W: invalid-url Source0: ocrad-0.20.tar.gz&lt;br /&gt;0 packages and 1 specfiles checked; 0 errors, 1 warnings.&lt;/p&gt;
&lt;p&gt;[root@fedora rpmbuild]# rpmlint -i ocrad-0.20-10.fc16.src.rpm&lt;br /&gt;(none): E: no installed packages by name ocrad-0.20-10.fc16.src.rpm&lt;br /&gt;0 packages and 0 specfiles checked; 0 errors, 0 warnings.&lt;/p&gt;
&lt;p&gt;[root@fedora rpmbuild]# rpmlint x86_64&lt;br /&gt;(none): E: no installed packages by name x86_64&lt;br /&gt;0 packages and 0 specfiles checked; 0 errors, 0 warnings&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/ligangbory.wordpress.com/33/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/ligangbory.wordpress.com/33/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=ligangbory.wordpress.com&amp;amp;blog=31633685&amp;amp;post=33&amp;amp;subd=ligangbory&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 31 Jan 2012 02:02:20 +0000</pubDate>
</item>
<item>
	<title>David Humphrey: How to crash like you mean it</title>
	<guid isPermaLink="true">http://vocamus.net/dave/?p=1442</guid>
	<link>http://vocamus.net/dave/?p=1442</link>
	<description>&lt;p&gt;I lost most of a day today trying to track down a bug in our &lt;a href=&quot;http://vocamus.net/dave/?cat=28&quot;&gt;Pointer Lock&lt;/a&gt; (nee Mouse Lock) implementation.  We’re literally within inches of being done this patch, and to be honest, I need to get it done so I can focus on other projects.  However, as is the case when programming, being close simply means you use smaller units to measure your distance, not that you reduce the number of steps.  I’m hopeful that we’ll have this thing back into review by mid-week.  But first a digression while we fix a newly discovered crash bug.&lt;/p&gt;
&lt;p&gt;Raymond, Steven, Diogo and myself have been collaborating on the final implementation details and the tests.  Today I landed the bulk of the tests in my branch, which Raymond and Steven had written and/or fixed over the past few weeks.  I was keen to see how things stood, since Diogo and I had also rewritten some key parts of our code this week.  I ran the tests and 5 or 6 tests in, my browser crashed.  I hadn’t even had coffee yet (heya, Monday!).&lt;/p&gt;
&lt;p&gt;Steven was online and quickly offered to fix the tests.  But I told him what I’m going to tell you right now: no web page (our tests are just HTML, CSS, and JavaScript–simple web pages) should ever be able to crash the browser.  Never.  Ever.  If you can crash the browser with JavaScript, it’s a browser bug, not (only) your bug.  I talk to lots of good web developers who all seem to think they’ve done something wrong when the browser crashes.  It’s never the web developer’s fault, because nothing in that page should be capable of causing the crash.  That isn’t to say that their code doesn’t do something odd, unique, or incorrect.  Doing something wrong is not the same as crashing.  Remember that.  If you can crash the browser, you should report the bug–it might even be worth something, if it’s an exploitable security issue (not all crashes are).&lt;/p&gt;
&lt;p&gt;Unfortunately reporting this crash just meant swiveling around in my chair, so as to face the reflection in my second monitor.  The first thing you need when you crash is to know where you’re crashing, often called a ’stack trace,’ or just a ’stack’.  There are various ways to accomplish this, depending on the circumstances under which you crash.  Your standard Firefox browser keeps track of these via about:crashes (i.e, type that into your address bar).  Here you can see a list of crashes you’ve had (I have lots, maybe you have none).  If you click any of your crashes, you’ll be taken to Mozilla’s Crash Server, which will, among other things, allow you to see your crash stack.&lt;/p&gt;
&lt;p&gt;This isn’t possible in my case.  I’m running a local debug build that I made, which isn’t hooked up to the crash server.  However, because I’ve made this build, and because it has debug symbols already (you want to make debug builds while you’re working on bugs for this very reason), I can simply attach my debugger to the browser before I crash, trigger the bug, and then look at the crash stack.&lt;/p&gt;
&lt;p&gt;When you’re doing &lt;a href=&quot;https://developer.mozilla.org/en/Mochitest&quot;&gt;Mochitests&lt;/a&gt;, as we are, you can run your tests in a few different ways.  If you want to have time to attach your debugger to the running browser before the tests start, and then crash, you can do this:&lt;/p&gt;
&lt;pre&gt;python ./objdir-debug/_tests/testing/mochitest/runtests.py
  --test-path=dom/tests/mochitest/pointerlock&lt;/pre&gt;
&lt;p&gt;This runs the test runner, starting a simple web server and the browser, and points it at just the tests specified in the &lt;code&gt;dom/tests/mochitest/pointerlock&lt;/code&gt; directory.  NOTE: before you do this, make sure your tests are copied into the object directory (i.e., &lt;code&gt;make -C objdir-debug/dom/tests/mochitest&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Now you can attach your debugger (get your browser’s PID using ps or the like, then run gdb and type: attach &amp;lt;pid&amp;gt;).  Once connected to your running process, and all symbols loaded, you can tell the debugger to let your browser continue (in gdb, type ‘continue’).  Run your tests, and if all goes well, you’ll crash.&lt;/p&gt;
&lt;p&gt;When I crashed this time, my debugger instantly came to life, and I was able to ask for a stack trace (e.g., a ‘backtrace’ in gdb, using the ‘bt’ command).  The full stack is &lt;a href=&quot;http://pastebin.mozilla.org/1468710&quot;&gt;here&lt;/a&gt;, but the top few frames (e.g., function calls) tell the story:&lt;/p&gt;
&lt;pre&gt;#0  ... in nsIFrame::GetStyleContext (this=0x0) at nsIFrame.h:716
#1  ... in nsIFrame::PresContext (this=0x0) at nsIFrame.h:546
#2  ... in nsIFrame::GetScreenRect (this=0x0) at /Users/dave/repos/mozilla-central/layout/generic/nsFrame.cpp:4197
#3  ... in nsEventStateManager::GetMouseCoords (this=0x10033ff20) at /Users/dave/repos/mozilla-central/content/events/src/nsEventStateManager.cpp:4136
#4  ... in nsEventStateManager::SetPointerLock (this=0x10033ff20, aWidget=0x127d2f240, aElement=0x119c70f80) at /Users/dave/repos/mozilla-central/content/events/src/nsEventStateManager.cpp:4111
#5  ... in nsDOMMozPointerLock::Lock (this=0x119adc190, aTarget=0x119c71000, aSuccessCallback=0x11b81a680, aFailureCallback=0x11b81a6a0) at /Users/dave/repos/mozilla-central/dom/base/nsDOMMozPointerLock.cpp:293
&lt;/pre&gt;
&lt;p&gt;Here’s what this says.  At some point &lt;code&gt;nsDOMMozPointerLock::Lock()&lt;/code&gt; was called, which is what happens when the user calls &lt;code&gt;navigator.mozPointer.lock()&lt;/code&gt; in JavaScript.  This in turn called &lt;code&gt;nsEventStateManager::SetPointerLock()&lt;/code&gt;, which stores a reference to the locked element on the &lt;code&gt;nsEventStateManager&lt;/code&gt;.  Part of that process involves figuring out where the mouse pointer is at the time of lock, since the spec says we need to keep track of this position so that we can return the mouse there when we unlock.  The call to &lt;code&gt;nsEventStateManager::GetMouseCoords()&lt;/code&gt; is where things go off the rails, as it tries to get dimensions for the element’s frame in the page–notice &lt;code&gt;nsIFrame::GetScreenRect (this=0x0)&lt;/code&gt;.  The “this=0×0″ shows us we are calling a method on a null pointer; in other words, we have no frame for this element.&lt;/p&gt;
&lt;p&gt;It’s definitely our code that’s causing the crash (our C++ code, that is).  Now we have to figure out why.  For the next little while we tried to isolate the specific test that was causing the issue.  That turned out to be a losing battle, since we have so many tests, and since it seemed (initially) like it might be related to the interaction of multiple tests run in a particular order.  Was it an OS X only bug?  We didn’t seem to hit it very often on Linux.  The fact that it didn’t crash every time was also frustrating.&lt;/p&gt;
&lt;p&gt;Reducing it down to a particular test wasn’t going to work.  We needed to understand why an element would not have a frame.  I asked on irc, and instantly got the same answer from two people: &lt;code&gt;display:none&lt;/code&gt;.  Why does CSS hate me so?  If you style an element &lt;code&gt;display:none&lt;/code&gt;, it won’t have a frame, since it won’t be visible.  Seems so obvious.  But why were we hitting this in our tests?  Surely no one would use &lt;code&gt;display:none&lt;/code&gt; in…our…tests.  Yet here were two cases of it:&lt;/p&gt;
&lt;pre&gt;&amp;lt;iframe id=&quot;iframe&quot; style=&quot;display: none&quot; ... &amp;gt;

...

&amp;lt;div id=&quot;content&quot; style=&quot;display: none&quot;&amp;gt;
  &amp;lt;canvas id=&quot;canvas&quot; width=&quot;150&quot; height=&quot;150&quot;&amp;gt;&amp;lt;/canvas&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Many, many tests in Firefox hide content that isn’t relevant to the test, and normally it wouldn’t matter.  But in this case, it made a lot of difference.  So first, we need to remove those &lt;code&gt;display:none&lt;/code&gt; styles.  But we also need to protect against an element not having a frame when lock is called, and losing its frame once locked (&lt;code&gt;display:none&lt;/code&gt; style added after being locked).  By doing these simple checks, we won’t crash in the future, no matter what the web developer does with the display style.&lt;/p&gt;
&lt;p&gt;I wanted to write about this for my students who are doing work like this all semester, and will inevitably hit an issue like this in their own code.  Crashes can be really useful when you have a strategy for using them to your advantage.&lt;/p&gt;</description>
	<pubDate>Mon, 30 Jan 2012 21:48:05 +0000</pubDate>
</item>
<item>
	<title>Chris Choo: RPM Bulding Part 1</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-3683112655067317571.post-2599445294464258235</guid>
	<link>http://cchoo2.blogspot.com/2012/01/rpm-bulding-part-1.html</link>
	<description>&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Alright folks, I am going to attempt to build a RPM package from one of my source packages. The first one I am going to attempt is proxyknife. So first we need to install these packages:&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;i&gt;- yum groupinstall &quot;Fedora Packager&quot;&lt;/i&gt;&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;i style=&quot;font-family: inherit;&quot;&gt;- yum install rpmlint yum-utils&lt;/i&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now after that we can create the rpm directories where we can work in by typing this command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- &lt;i&gt;rpmdev-setuptree&lt;/i&gt; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After that is finished we can now start to work on our RPM, first we need to copy our source tarball to &lt;b&gt;~/rpmbuild/SOURCES&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;- cp proxykinfe-1.7.tar.gz ~/rpmbuild/SOURCES&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now go into the SPECS directory so we can create the spec file to build the RPM:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- &lt;i&gt;cd ~/rpmbuild/SPECS&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the SPECS directory we can now make the skeleton spec file for us to modify:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- &lt;i&gt;rpmdev-newspec proxyknife&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So with the skeleton spec file, I did some small configuration to the file to get it up and running then issued the command to build the RPM:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;- rpmbuild -ba proxyknife.spec&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;In the beginning&lt;/span&gt; everything was going okay until the end where I got these bunch of errors:  &lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Customize-Request.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Index.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Sort-the-Result.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/index.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Command_002dline-Exclusive-Options.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Output.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Invoking.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Examples-of-startup-file.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Via-Proxy.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Startup-Options.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/General-Usage.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Introduction.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/GNU-Free-Documentation-License.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Copying-Source-Code.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Startup-File.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Contact.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Advanced.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Download-Proxylist.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Proxylist.html': Permission denied&lt;br /&gt;cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Copying-This-Manual.html': Permission denied&lt;br /&gt;make[2]: *** [install-data-local] Error 1&lt;br /&gt;make[2]: Leaving directory `/home/chris/rpmbuild/BUILD/proxyknife-1.7/doc'&lt;br /&gt;make[1]: *** [install-am] Error 2&lt;br /&gt;make[1]: Leaving directory `/home/chris/rpmbuild/BUILD/proxyknife-1.7/doc'&lt;br /&gt;make: *** [install-recursive] Error 1&lt;br /&gt;error: Bad exit status from /var/tmp/rpm-tmp.ef2HEI (%install)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RPM build errors:&lt;br /&gt;    Bad exit status from /var/tmp/rpm-tmp.ef2HEI (%install)&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;My overall thoughts on why this is happening is maybe because I needed to be root to install this source program last time? This could be the issue why it keeps failing.&lt;br /&gt;&lt;br /&gt;After doing some editing to my spec file I still was getting that error. After looking at the errors logs it looks like it keeps erasing the documents during the end of the make part and it is getting permission denied, that is the reason why my RPM is not building. Maybe a little more research on the issue might help so I am going to leave it as it is for now until I get some solid answers to tackle my issue.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/3683112655067317571-2599445294464258235?l=cchoo2.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 30 Jan 2012 17:41:40 +0000</pubDate>
	<author>noreply@blogger.com (Chris Choo)</author>
</item>
<item>
	<title>Gary Kwong (nth10sd): New to Mozilla development? Here’s some advice..</title>
	<guid isPermaLink="false">http://garykwong.wordpress.com/?p=86</guid>
	<link>http://garykwong.wordpress.com/2012/01/29/new-to-mozilla-development-heres-some-advice/</link>
	<description>&lt;p&gt;Jason and Duy are &lt;a href=&quot;http://www.comp.nus.edu.sg/~mozilla/&quot;&gt;CP3108 Mozilla&lt;/a&gt; course alumni at the National University of Singapore. Here’s what they share with others who are new to Mozilla:&lt;/p&gt;
&lt;p&gt;Jason:&lt;br /&gt;
&lt;a href=&quot;http://technotroph.wordpress.com/2012/01/21/how-to-look-for-suitable-mozilla-bugs-to-work-on/&quot;&gt;How to look for suitable mozilla bugs to work on&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://technotroph.wordpress.com/2012/01/28/huh-javascript-xul-what-are-they/&quot;&gt;Huh? Javascript? Xul? What are they?&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://technotroph.wordpress.com/2012/01/28/why-you-should-be-fixing-bugs/&quot;&gt;Why You Should Be Fixing Bugs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Duy:&lt;br /&gt;
&lt;a href=&quot;https://duyduyduy.wordpress.com/2011/08/28/what-you-might-want-to-know-before-doing-your-first-extension/&quot;&gt;What you might want to know before doing your first extension&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/garykwong.wordpress.com/86/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/garykwong.wordpress.com/86/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=garykwong.wordpress.com&amp;amp;blog=6408997&amp;amp;post=86&amp;amp;subd=garykwong&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Sun, 29 Jan 2012 11:15:16 +0000</pubDate>
</item>
<item>
	<title>Kezhong Liang: Install and configure Zabbix on Fedora 16</title>
	<guid isPermaLink="false">http://kezhong.wordpress.com/?p=721</guid>
	<link>http://kezhong.wordpress.com/2012/01/28/install-and-configure-zabbix-on-fedora-16/</link>
	<description>&lt;p&gt;&lt;strong&gt;Install packages&lt;/strong&gt;&lt;br /&gt;
# yum install zabbix zabbix-agent zabbix-docs zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql&lt;br /&gt;
# yum install mysql-server httpd curl-devel net-snmp net-snmp-devel iksemel iksemel-devel&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enable mysqld, httpd, zabbix-agent and zabbix-server boot up automatically&lt;/strong&gt;&lt;br /&gt;
# systemctl enable mysqld.service&lt;br /&gt;
# systemctl enable httpd.service&lt;br /&gt;
# chkconfig zabbix-agent on&lt;br /&gt;
# chkconfig zabbix-server on&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Start mysqld and httpd service&lt;/strong&gt;&lt;br /&gt;
# service mysqld start&lt;br /&gt;
# service httpd start&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Set MySQL root password and import database&lt;/strong&gt;&lt;br /&gt;
# mysqladmin -u root password [whateverpasswd]&lt;br /&gt;
# mysql -uroot -p&lt;br /&gt;
mysql&amp;gt; create database zabbix;&lt;br /&gt;
mysql&amp;gt; quit&lt;br /&gt;
# cd /usr/share/doc/zabbix-server-mysql-1.8.10/create/schema&lt;br /&gt;
# mysql -u root -p[whateverpasswd] zabbix &amp;lt; mysql.sql&lt;br /&gt;
# cd ../data&lt;br /&gt;
# mysql -u root -p[whateverpasswd] zabbix &amp;lt; data.sql&lt;br /&gt;
# mysql -u root -p[whateverpasswd] zabbix &amp;lt; images_mysql.sql&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change items in configuration files&lt;/strong&gt;&lt;br /&gt;
# vi /etc/zabbix/zabbix_agent.conf&lt;br /&gt;
# vi /etc/zabbix/zabbix_agentd.conf&lt;br /&gt;
    change from “LogFileSize=0″ to “LogFileSize=1024″&lt;br /&gt;
    change from “# DebugLevel=3″ to “DebugLevel=4″&lt;br /&gt;
# vi /etc/zabbix/zabbix_server.conf&lt;br /&gt;
    change from “LogFileSize=0″ to “LogFileSize=1024″&lt;br /&gt;
    change from “# DebugLevel=3″ to “DebugLevel=4″&lt;br /&gt;
    change from “# DBPassword=” to “DBPassword=[whateverdbpasswd]“&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create zabbix user and grant its privileges&lt;/strong&gt;&lt;br /&gt;
# mysql -uroot -p&lt;br /&gt;
mysql&amp;gt; create user ‘zabbix’@'localhost’ identified by ‘[whateverdbpasswd]‘;&lt;br /&gt;
mysql&amp;gt; grant all privileges on zabbix.* to ‘zabbix’@'localhost’ with grant option;&lt;br /&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; The websites I read did not mention this step. If you ignore it, you will see the following errors in the log file.&lt;br /&gt;
3548:20120127:115321.384 Database is down. Reconnecting in 10 seconds.&lt;br /&gt;
3548:20120127:115331.384 [Z3001] connection to database ‘zabbix’ failed: [1045] Access denied for user ‘zabbix’@'localhost’ (using password: YES)&lt;/p&gt;
&lt;p&gt;The errors will occur on Fedora 14:&lt;br /&gt;
1830:20120111:202637.548 In DBconnect() flag:1&lt;br /&gt;
1830:20120111:202637.549 [Z3001] connection to database ‘zabbix’ failed: [1044] Access denied for user ”@’localhost’ to database ‘zabbix’&lt;br /&gt;
1830:20120111:202637.549 Cannot connect to the database. Exiting…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Start zabbix-agent and zabbix-server services&lt;/strong&gt;&lt;br /&gt;
# service zabbix-agent start&lt;br /&gt;
# service zabbix-server start&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configure PHP&lt;/strong&gt;&lt;br /&gt;
# vi /etc/php.ini&lt;br /&gt;
    change from “;date.timezone =” to “date.timezone = “America/Toronto”&quot;&lt;br /&gt;
    change from “memory_limit = 128M” to “memory_limit = 256M”&lt;br /&gt;
    change from “post_max_size = 8M” to “post_max_size = 32M”&lt;br /&gt;
    change from “upload_max_filesize = 2M” to “upload_max_filesize = 16M”&lt;br /&gt;
    change from “max_execution_time = 30″ to “max_execution_time = 600″&lt;br /&gt;
    change from “max_input_time = 60″ to “max_input_time = 600″&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Restart httpd service&lt;/strong&gt;&lt;br /&gt;
# service httpd restart&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Installation from browser&lt;/strong&gt;&lt;br /&gt;
Open Firefox browser and input “http://[serverIP]/zabbix”.&lt;br /&gt;
If you can connect to the server, close the firewall&lt;br /&gt;
# iptables -F&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix1.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix1.jpg?w=300&amp;amp;h=226&quot; title=&quot;zabbix1&quot; height=&quot;226&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-725&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix2.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix2.jpg?w=300&amp;amp;h=213&quot; title=&quot;zabbix2&quot; height=&quot;213&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-726&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Click “I agree” and click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix3.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix3.jpg?w=300&amp;amp;h=218&quot; title=&quot;zabbix3&quot; height=&quot;218&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-728&quot; /&gt;&lt;/a&gt;Click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix4.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix4.jpg?w=300&amp;amp;h=226&quot; title=&quot;zabbix4&quot; height=&quot;226&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-729&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Input password, click “Test connection” and click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix5.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix5.jpg?w=300&amp;amp;h=226&quot; title=&quot;zabbix5&quot; height=&quot;226&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-730&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix6.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix6.jpg?w=300&amp;amp;h=225&quot; title=&quot;zabbix6&quot; height=&quot;225&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-731&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix7.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix7.jpg?w=300&amp;amp;h=225&quot; title=&quot;zabbix7&quot; height=&quot;225&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-732&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Click “Next”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix8.jpg&quot;&gt;&lt;img src=&quot;http://kezhong.files.wordpress.com/2012/01/zabbix8.jpg?w=300&amp;amp;h=225&quot; title=&quot;zabbix8&quot; height=&quot;225&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;aligncenter size-medium wp-image-733&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Click “Finish” and you can see the login page&lt;/p&gt;
&lt;p&gt;Input “Admin”, and its default password “zabbix”, and then you can enter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change default Admin password&lt;/strong&gt;&lt;br /&gt;
# mysql -uroot -p&lt;br /&gt;
mysql&amp;gt; use zabbix;&lt;br /&gt;
mysql&amp;gt; update users set passwd=md5(‘[wahteverpasswd]‘) where alias=”Admin”;&lt;br /&gt;
mysql&amp;gt; quit&lt;/p&gt;
&lt;p&gt;After everything is ok, you can adjust DebugLevel back&lt;br /&gt;
# vi /etc/zabbix/zabbix_agentd.conf&lt;br /&gt;
    change from “DebugLevel=4″ to “DebugLevel=3″&lt;/p&gt;
&lt;p&gt;# vi /etc/zabbix/zabbix_server.conf&lt;br /&gt;
    change from “DebugLevel=4″ to “DebugLevel=3″&lt;/p&gt;
&lt;p&gt;# service zabbix-server restart&lt;br /&gt;
# service zabbix-agent restart&lt;/p&gt;
&lt;p&gt;Disable SELinux, when you use zabbix&lt;br /&gt;
When I used Fedora 14 as server before, I found it occurred the below measages&lt;br /&gt;
fclose() expects parameter 1 to be resource, boolean given [api/classes/class.cscript.php:626]&lt;br /&gt;
Error Description: Permission denied&lt;/p&gt;
&lt;p&gt;After I set SELinux, the problem was solved&lt;br /&gt;
# setsebool -P httpd_can_network_connect 1&lt;br /&gt;
But on Fedora 16, it didn’t work, so I did “setenforce=0″ temporarily.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reference&lt;/strong&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.zabbix.com/&quot;&gt;http://www.zabbix.com/&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;br /&gt;Filed under: &lt;a href=&quot;http://kezhong.wordpress.com/category/uncategorized/&quot;&gt;Uncategorized&lt;/a&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/kezhong.wordpress.com/721/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/kezhong.wordpress.com/721/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=kezhong.wordpress.com&amp;amp;blog=4823265&amp;amp;post=721&amp;amp;subd=kezhong&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Sat, 28 Jan 2012 19:21:17 +0000</pubDate>
</item>
<item>
	<title>Scott Downe: OSD 700 project release 0.4</title>
	<guid isPermaLink="false">http://scottdowne.wordpress.com/?p=491</guid>
	<link>http://scottdowne.wordpress.com/2012/01/28/osd-700-project-release-0-4/</link>
	<description>&lt;p&gt;For school, I am doing project releases in courses OSD600 and OSD700.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/OSD700-DPS911-Winter2012&quot;&gt;OSD600&lt;/a&gt; I completed three iterations, 0.1-0.3. Now in OSD700, I need to do 0.4-1.0.&lt;/p&gt;
&lt;p&gt;This post will outline what I did for 0.4.&lt;/p&gt;
&lt;p&gt;I’ve started by taking Firefox bug &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=677122&quot;&gt;677122&lt;/a&gt; which was labeled as &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/OSD700-DPS911-Winter2012&quot;&gt;“not quite as easy”&lt;/a&gt;. I am always up for a challenge. For the tl;dr check my &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=592407&amp;amp;action=diff&quot;&gt;diff&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I will talk about what I did right, what I did wrong, and what I learned.&lt;/p&gt;
&lt;p&gt;Three main things I did in this release are:&lt;/p&gt;
&lt;p&gt;Created a working Firefox build on Windows. Which was not quite as easy because of bug &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=718541&quot;&gt;718541&lt;/a&gt;. I ended up narrowing what was needed to get a working build, and adding my findings to the ticket. Now being able to reproduce this problem, in hopes that it can be used to track down the exact cause. The ticket is now fixed.&lt;/p&gt;
&lt;p&gt;Got a working developer environment working on Windows with Visual Studio 2010. This took more time than I wanted, as I am so used to web development where things like firebug work right out of the box. In other courses and projects, the code base is small enough that I don’t need any real developer tools, except my mind.&lt;/p&gt;
&lt;p&gt;The real work was done in bug 677122. I had three attempts on this, and will describe each one, and why the first two failed and last succeeded.&lt;/p&gt;
&lt;p&gt;First attempt was to wire the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#3058&quot;&gt;go to anchor code&lt;/a&gt; to &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLMediaElement.cpp#2166&quot;&gt;process media fragment code&lt;/a&gt;. This failed because process media fragment should not be called out of context. It was originally a protected function, so that there should of been a red flag that this was going to fail. I moved it to public, then in the anchor code I would get a reference to the media element, and call ProcessMediaFragment, which would crash when trying to grab the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLMediaElement.cpp#2898&quot;&gt;mLoadingSrc&lt;/a&gt;. I suspect this is due to the way the media element lives in the media document. I loaded up firebug and actually looked at it, and it did not even have a src attribute attached to it. Probably why it failed, as it was not completely what I wanted. I did manage to parse the fragment code so I knew the difference between a fragment and an anchor, which would be crucial in the third attempt.&lt;/p&gt;
&lt;p&gt;Second attempt was to try to get around the loading src, by doing this at a different time, or by calling a different function. Both attempts failed for similar reasons. I don’t think the timing was even the problem, but the reference to the element itself. A media document’s video element is not complete, and should not be used as such. It is a different beast. I tried things like, &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLMediaElement.cpp#1052&quot;&gt;LoadWithChannel&lt;/a&gt; and &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/base/public/nsIDocument.h#872&quot;&gt;resetToURI&lt;/a&gt; which both failed because they would access an element that was not what they expected it to be. Again, it doesn’t have a src attribute like most media elements. I also tried to do the work in the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp#7940&quot;&gt;InternalLoad&lt;/a&gt; function, before the anchor code. This failed for the same reasons, but did get me choking off the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#3058&quot;&gt;GoToAnchor&lt;/a&gt; code, which helped me find the next part.&lt;/p&gt;
&lt;p&gt;Third attempt was actually putting together two elements from the failed attempts. I moved the check for anchor or fragment to the InternalLoad, where I choked off the anchor code. It was as simple as that. Check for fragment and choke of the anchor. Once done, let the rest of the code to continue on its way. I have created a &lt;a href=&quot;https://bugzilla.mozilla.org/attachment.cgi?id=592407&amp;amp;action=diff&quot;&gt;patch&lt;/a&gt; for this and submitted it for feedback in the &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=677122&quot;&gt;ticket&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The biggest lesson I learned was a soft lesson. I should of probably asked for help between &lt;a href=&quot;http://scottdowne.wordpress.com/2012/01/23/firefox-bug-677122-so-far/&quot;&gt;Monday’s post&lt;/a&gt; and &lt;a href=&quot;http://scottdowne.wordpress.com/2012/01/25/update-on-firefox-bug-677122/&quot;&gt;Wednesday’s post&lt;/a&gt;. In retrospect, reading those posts now, I can see the naivety in my attempts. I was so positive about some of my solutions, and I can see it in my words. This will get better when I get more comfortable in the community, as I have been here before.&lt;/p&gt;
&lt;p&gt;Some smaller lessons were more technical things about Firefox code. Like how to get a reference, cast it, string management, etc. These are things specific to Firefox code, and not really C++.&lt;/p&gt;
&lt;p&gt;Warning, some of the links to Firefox source code will bitrot as the code changes and the lines where things live changes. Not sure of a better way to link to the source code.&lt;/p&gt;
&lt;p&gt;Thanks for reading &lt;img src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/scottdowne.wordpress.com/491/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/scottdowne.wordpress.com/491/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=scottdowne.wordpress.com&amp;amp;blog=14056265&amp;amp;post=491&amp;amp;subd=scottdowne&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Sat, 28 Jan 2012 18:50:50 +0000</pubDate>
</item>
<item>
	<title>Chris Tyler (ctyler): Seriously, CBC?</title>
	<guid isPermaLink="false">http://blog.chris.tylers.info/index.php?/archives/258-guid.html</guid>
	<link>http://blog.chris.tylers.info/index.php?/archives/258-Seriously,-CBC.html</link>
	<description>&lt;br /&gt;
&lt;p&gt;Going to the CBC this morning, I found this:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://blog.chris.tylers.info/uploads/cbc-ie.png&quot; class=&quot;serendipity_image_link&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://blog.chris.tylers.info/uploads/cbc-ie1.png&quot; class=&quot;serendipity_image_link&quot;&gt;&lt;img src=&quot;http://blog.chris.tylers.info/uploads/cbc-ie1.serendipityThumb.png&quot; alt=&quot;&quot; height=&quot;176&quot; style=&quot;border: 0px none; padding-left: 5px; padding-right: 5px;&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I have three problems with this:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The CBC is our public broadcaster, funded in large part by tax money. It should support wide access.&lt;/li&gt;&lt;li&gt;I'm not running IE, I'm running Firefox. The ad is lying to me. If they're able to detect I'm not running the latest version of IE, they should also detect that I'm not running IE at all. My browser is not old, either -- I'm running the latest release of Firefox, which contains several features not yet supported by IE.&lt;/li&gt;&lt;li&gt;IE does not run on my platform (Linux). The ad is a waste of time for me and a waste of money for the advertiser. The pages to which the ad links are all specific to Windows, with no consideration for those running Mac OS/X, Linux, or any other platform.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The ad text seems to imply endorsement. Does the CBC actually endorse the position that the only acceptable end-user computing platform is Windows on an x86 computer? Is increasing the monopoly of a foreign corporation a suitable goal for a taxpayer-funded public broadcaster? I trust not.&lt;/p&gt;</description>
	<pubDate>Sat, 28 Jan 2012 17:51:44 +0000</pubDate>
	<author>nospam@example.com (Chris Tyler)</author>
</item>
<item>
	<title>Justin Robinson: Total eclipse of the heart</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=354</guid>
	<link>http://justintrobinson.wordpress.com/2012/01/27/total-eclipse-of-the-heart/</link>
	<description>&lt;p&gt;Great. My Eclipse is broken now after I tried to put in an MXML highlighter. This could prove problematic.&lt;/p&gt;
&lt;p&gt;UPDATE: I thought I fixed it by uninstalling the highlighter. Nope. The FDT plugin for Eclipse keeps shutting down the entire application, claiming that I’m missing Flex 3.6 SDK and the Flex 4.5 SDK, even though installing 4.5 was one of the steps for getting the Dev env working in the first place. Even uninstalling Eclipse doesn’t work, because then I try to reinstall it and it still has the same plugins somehow.&lt;/p&gt;
&lt;p&gt;UPDATE: Either it’s impossible to uninstall Eclipse, or sudo apt-get purge eclipse doesn’t do what I think it does.&lt;/p&gt;
&lt;p&gt;UPDATE: Alright, the version of Eclipse I was using is completely gone, and I downloaded a different one more tailored to Java development. Why I wasn’t using it in the first place, I don’t remember. Anyway, now I have to pull what I committed to the repo back out, since apparently some of my local copies are corrupted, and put everything back where it’s supposed to go. And figure out why Eclipse now wants to open Actionscript in a gedit window rather than, y’know, ECLIPSE.&lt;/p&gt;
&lt;p&gt;Oh, it’s Monday alright.&lt;/p&gt;
&lt;p&gt;UPDATE: Fixed the Editor problem. From the top menu, go into Window -&amp;gt; Preferences, then choose General -&amp;gt; Editors -&amp;gt; File Associations. Add *.as to the File Types pane, highlight it, and add Java Editor as an associated editor. Easy peasy. Now to fix the missing files.&lt;/p&gt;
&lt;p&gt;UPDATE: And now I have to reinstall parts of BigBlueButton, because hey why not? I think the moral of this story is clear: don’t download the FDT plugin for Eclipse! Jeez, what a headache. It’s nearly noon and all I’ve been able to work on is repairing the damage from that plugin.&lt;/p&gt;
&lt;p&gt;UPDATE: Okay, this stopped being funny two and a half hours ago. After being forced to reinstall parts of BigBlueButton, I try to run commands like bbb-conf and get the message “# BigBlueButton does not appear to be installed … exiting” What in the sam hill is going on?&lt;/p&gt;
&lt;p&gt;UPDATE: Finally, everything compiles again and BigBlueButton has remembered that it does, in fact, exist. I had to re-do the step from the DE instructions that would make the red5 folder writeable (sudo chmod -R o+w /usr/share/red5/webapps)&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/354/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/354/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=354&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 27 Jan 2012 21:10:52 +0000</pubDate>
</item>
<item>
	<title>Justin Robinson: Hip to be Square</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=352</guid>
	<link>http://justintrobinson.wordpress.com/2012/01/27/hip-to-be-square/</link>
	<description>&lt;p&gt;Do you like Huey Lewis and the News? The voting window works now, it appears in the client window for all users but not the presenter, just like it’s supposed to. My next task is to figure out how to get the radio buttons to look like ordinary radio buttons; at the moment, they are (somehow) rectangles with rounded corners.&lt;/p&gt;
&lt;p&gt;The weird thing is, I can’t find anywhere in the code that tells the radio buttons to come out as square instead of round, and all the examples I’ve found of AS radio buttons show them as round by default. This may be the only application in the world that uses square radio buttons. Weird.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/352/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/352/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=352&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 27 Jan 2012 20:36:40 +0000</pubDate>
</item>
<item>
	<title>Justin Robinson: The main() Event</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=346</guid>
	<link>http://justintrobinson.wordpress.com/2012/01/27/the-main-event/</link>
	<description>&lt;p&gt;Alright, so we figured out last night just before quittin’ time how to deal with what I’ve been calling our Las Vegas problem (that being, whatever happens in nc.call STAYS in nc.call). We just need to make sure the entire chain of events that needs to happen once the client-side getPoll() starts occurs within nc.call until it gets to a point where it sends data back to the server. Once it’s in Java’s hands, we don’t have to care if Actionscript develops amnesia or not.&lt;/p&gt;
&lt;p&gt;(Unrelated to Big Blue Button, I keep seeing the Money Mart pig out of the corner of my eye and thinking it’s someone approaching my cubicle. Weird.)&lt;/p&gt;
&lt;p&gt;UPDATE: Alright, I’ve made a pretty big breakthrough here. Moving the pig to a different part of the divider prevents – okay, seriously, I’ve just been experimenting with Event handling in Actionscript to get the voting window to appear. I’m not sure how we’re going to test this efficiently, though, considering we’ll need to log in as a presenter, make a poll, and log in again to the same room as a user without the presenter logging out; that would destroy the poll. Maybe Anatoly knows how we could make the voting window appear to the presenter as well as everyone else, and then we can just switch that feature off when we’re done testing. I’ll have to talk to him about that when he gets in.&lt;/p&gt;
&lt;p&gt;But yeah, moving the pig was a good idea too.&lt;/p&gt;
&lt;p&gt;UPDATE: Well, that was an easy solution. I log in as a presenter through Firefox, and as a student through Chrome with a different name. Bam, lecture room.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/346/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/346/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=346&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 27 Jan 2012 14:06:31 +0000</pubDate>
</item>
<item>
	<title>Lukas Blakk (lsblakk): Growing the company, structuring volunteerism: My response to David Eave's community lifecyle audit</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6439561539898172827.post-5216567059875125515</guid>
	<link>http://crashopensource.blogspot.com/2012/01/growing-company-structuring.html</link>
	<description>Last Wednesday David Eaves presented the results of the multi-tiered contributor lifecycle audit (&lt;a href=&quot;http://vid.ly/0m8t5k&quot;&gt;watch the video&lt;/a&gt;).  A few points really grabbed my attention and as someone with a background in arts &amp;amp; education non-profits I feel the need to share my experiences alongside my reactions to this talk. &lt;br /&gt;&lt;br /&gt;David pointed out that as we are growing, we can hire people to solve problems, so what exactly do we need volunteers for? Survey results showed that contributors often don't feel their contributions had much impact on the project and that as our paid staff pool grows in size, there is less clarity about what exactly a volunteer's importance is to the critical path of Mozilla's mission.  I wish we had this data prior to the 1+ year push to releasing Firefox 4.  My hand-waving hypothesis would be that as we were cramming to get a product out the door we forgot to be leaders of volunteers and instead unconsciously pushed them aside so that things could get done on a schedule.  It was a stressful time, but now that we've moved on to regular, rapid releases perhaps we paid staff can all take a step back and really assess how we incorporate the work of volunteers into our individual areas.&lt;br /&gt;&lt;br /&gt;For many Augusts I have worked at a women's music festival in the woods of Michigan and at that festival there is a kitchen that has pumped out 3 vegetarian meals a day for 5 days to 4000-8000 attendees depending on the year.  This festival relies on a core group of 'workers' who are in fact volunteers but let's pretend that group of 500-600 people is like the paid staff of Mozilla.  The main kitchen work crew gets about 30 workers to run the kitchen.  You might think to yourself &quot;but 30 people cannot produce enough food for 4000-8000 women&quot; and you'd be very right.  The way it works is that all attendees of the festival are asked to do two 4 hour workshifts during the week they attend the festival.  The majority of workshifts center around the main kitchen and creating the meals which range from burrito night to pasta putanesca to nutloaf (a vegetarian version of meatloaf). All these meals involve preparation of pounds upon pounds of vegetables as well as cooking of pasta, beans, sauce.  Did I mention this was all in the woods, over a massive firepit?  Yup, so 30 women are in charge of making that entire process work and they do so by wrangling hundreds of volunteers per day into shifts around each meal and constantly leading and dividing up the work so it can be done by many hands yet results in one huge meal - 3 times a day!&lt;br /&gt;&lt;br /&gt;So let's go back to people who are volunteering not feeling clear about how Mozilla works and whether their time and effort has impact.  How can we make sure that the smallest task makes that person feel like they've contributed?  Some areas of Mozilla do this very well to name a few; AMO, SUMO, QA, and Personas. These teams manage tons of volunteers and have tasks with measurable outcomes (tests run, filing bugs, approving an add-on, answering a question in the knowledge base, shrinking the queue of pending Persona submissions) and sometimes they can use scoreboards or themed days to get volunteers mildly competitive for the respect of their peers and accomplish larger goals in a short burst. I'd encourage people interested in having volunteers participate in their team's work think about how to make sure their volunteers have tools to measure their impact from the get-go.  In Release Engineering I would measure the number of bugs that we have yet to fix, many of them labelled &quot;simple&quot; or &quot;old&quot;.  If I had volunteers doing RelEng work I could keep track of their progress and post reports (as blog posts) of who fixed what when and how as the number of bugs shrank.&lt;br /&gt;&lt;br /&gt;Another interesting result from the survey: older folks (34-55!) aren't on-ramping as much as younger ones. At first I wondered how much of this was about access to the muscle memory of being a student.  I think it's fair to assume that many students/youth can have a lot more time to contribute to projects like Mozilla as certain adult responsibilities may not be required of them yet. Over the past week though, I have started to visualize another take on this. In the arts &amp;amp; social justice organizations I have been involved with there have been plenty of adult volunteers but those organizations have a different need for volunteers. The music festival I mentioned would not happen if it wasn't for volunteers.  The fact that the volunteers want the community of the festival to exist for them every year becomes the carrot drawing women of all ages to come to the woods of Michigan and build a music festival every year.  People quit jobs, take unpaid leave, and make plenty of other sacrifices of their time to participate in creating this community. The thanks for this 2-4 weeks of donated work is an amazing live/work experience camping with 5000 women on private land, having workshops, parties, and dances all in a very natural, safe, and ad-free environment and watching incredible performances all day and night for 5 days.  &lt;br /&gt;&lt;br /&gt;In a different example, let's look at a the Toronto International Film Festival.  Volunteers have to make it through the rigorous screening and application process in order to 'get' to volunteer for the festival. They are rewarded with behind-the-scenes access to the festival, sometimes a quick run in with a movie star, and free tickets to festival screenings.  The festival shows entirely world-premiere films so this is a huge deal for a volunteer.  Several films will see theatrical releases after the festival but seeing the premiere, often with the star in attendance and with a director Q&amp;amp;A post-screening really sweetens the experience. The volunteers also get thanked before every screening with a cute trailer from the sponsor for the volunteer program and there's always a fantastic party post-festival as the final thank you. &lt;br /&gt;&lt;br /&gt;At Mozilla we do thank our volunteers with tshirts and sometimes bringing them to summits, MozCamps, or other parties. For older volunteers though, I wonder if that's enough.  What does it take to get someone in the 34-55 range to donate their time?  I'm really interested in this one since I fall in that demographic as well.  For me, I need the time donated to do at least one of the following things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;be social, meeting new people in the community I chose to volunteer in is a big part of why I'd do it in the first place&lt;/li&gt;&lt;li&gt;provide a networking opportunity (similar to above, but might apply to folks on the job market a bit more accurately)&lt;/li&gt;&lt;li&gt;get me free access to an event I wouldn't attend if it wasn't&lt;/li&gt;&lt;li&gt;be something my friends are also doing so we are visiting with each other while doing something interesting &lt;/li&gt;&lt;li&gt;be for a very good cause so I feel good just helping that cause regardless of the tasks I perform&lt;/li&gt;&lt;/ul&gt;Let's look at that last one.  The good cause is certainly in the eye of the beholder but I can honestly say that sometimes I have no idea why I would want to encourage a friend who volunteers for hospice care, homeless shelters, AIDS awareness, or other non-profits where the staff is small and the operating budget miniscule to come and contribute to Mozilla.  In the circles I travel in outside of my job Mozilla seems right up there with Google, Apple, and of course Microsoft.  Sure, a lot of people don't know we're a non-profit. I tell people that all the time and while it's of interest to them, it doesn't generate an &quot;Oh! Can I volunteer there then?&quot; kind of response.  We compare ourselves sometimes to the Red Cross or Boy Scouts - large organizations with volunteer bases - but I think we should start to re-think ourselves more like the film festival or the music festival.  We pay competitive salaries to our employees, we throw amazing events, and we don't have to write grant applications every year to the government (like in Canada) or to private funds (like in the US) to ensure we can keep operating on a shoestring budget.  So even though Mozilla is a GREAT cause, I don't think that's the bait for the on-ramping of volunteers - especially non-students and people in the 34-55 age range.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;What's going to encourage 34-55 year olds to engage with Mozilla?  In my opinion it's going to happen with targeted events where they can do something in a few hours that leaves them feeling connected and fulfilled and even better if it makes something in their life easier.  A while back, in Toronto, we did a day of service and set up an info table at the local library so people could come and ask anything about Firefox and even though by some ironic twist the library's internet died we still had an amazing day just conversing with people and answering questions about Firefox, the web, security, and even general computing questions.  According to David &quot;having good experiences in the project helps one to want to find others and pull them in&quot; and &quot;age and gender have no impact on the willingness to on-ramp, but the longer you volunteer with Mozilla, the less you on-ramp&quot;.  My approach with trying to on-ramp then, in light of this, would be to look at getting a lot out of that short interaction. Help someone help themselves on their computer. Teach them a few keyboard shortcuts or how to install an add-on that helps them do what they already do faster and with more confidence.  Then encourage them to come back and teach someone else what they learned.  This can spread like a pyramid scheme and it's no longer about getting a single volunteer to stick around for a long time, it's just about having a good experience and carrying that forward. Potential volunteers can be motivated by the mission and/or by practical considerations it's important to remember both have tremendous value to the Mozilla project.  I think it's important to encourage 34-55 year olds by believing it's OK for a contributor to do a one-off in a few hours as long as they walk away happy.&lt;br /&gt;&lt;br /&gt;In conclusion of this very long post, I want to circle back to measuring. If we are going to make community a core part of what we do then we need to measure it we currently do not have an institution-wide measurement of contributions, volunteer performance cannot be evaluated, there is no structure for including volunteer engagement during strategic or operational planning.  Until we require Directors to create annual and quarterly goals that include measurable goals around volunteer growth, retention, participation, and effectiveness we will only see people (like myself) trying to do this &quot;off the corner of their desks&quot; which means it's not a part of your paid work and thus less likely to be sustainable and effective. The Toronto International Film Festival is a great example of what we could do here.  They have paid staff who organize the volunteers each year. They have a clear path for volunteers to follow to be accepted - training sessions are mandatory.  Each year returning volunteers are given roles depending on performance from previous years.  The record kept of each volunteer's performance allows paid staff to request certain volunteers for specific tasks based on that information and a volunteer's history with the organization.  Teams of volunteers will sometimes have &quot;Captains&quot; who are also volunteers but with more experience and they are thus given more responsibility.  Each area of Mozilla that can accommodate volunteers should keep an eye out for their current or potential &quot;Captains&quot;. David also suggested that, while we avoid it, we should really look head on at guidelines for when to rely on volunteers and when to not - this seems to fly in the face of open source &quot;free for all&quot; mentality but if we compare ourselves to other non-profits like TIFF there is proof that having some structure for volunteers allows staff and teams to develop stronger relationships and the work gets done smoothly, which was really the point all along.&lt;br /&gt;&lt;br /&gt;Don't forget to throw them fabulous parties, share with the world the importance and impact of their contributions, and remember you can never thank a volunteer too much.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6439561539898172827-5216567059875125515?l=crashopensource.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 27 Jan 2012 02:00:04 +0000</pubDate>
	<author>noreply@blogger.com (Lukas Blakk)</author>
</item>
<item>
	<title>Jayaditya Mulwani: Installing from Source</title>
	<guid isPermaLink="false">http://jmulwani.wordpress.com/?p=6</guid>
	<link>http://jmulwani.wordpress.com/2012/01/27/installing-from-source/</link>
	<description>&lt;pre&gt;Hi Guys,
So the source code that I picked was &lt;span style=&quot;color: #ff0000;&quot;&gt;&lt;strong&gt;Units&lt;/strong&gt;&lt;/span&gt;. Which pretty much
calculates the value and changes it to a unit that the user has specified.
For example if I wanted to calculate 100km/h to m/h this is the tool to use.

Anyways long story short: Here are the steps that I went through
in order to install the package to my machine.
1. Go to the Website &lt;a href=&quot;http://gnu.org/software&quot;&gt;gnu.org/software&lt;/a&gt; as per Chris's Instructions
2. I copied the link of the source code and ran &lt;span style=&quot;color: #ff0000;&quot;&gt;wget &amp;lt;link&amp;gt;&lt;/span&gt; command on
Terminal.
3. After downloading the package, I ran the
command &lt;span style=&quot;color: #ff0000;&quot;&gt;time tar -xvf &amp;lt;filename.tar.gz&amp;gt;&lt;/span&gt;.Here are the results
&lt;span style=&quot;color: #ff0000;&quot;&gt;[jmulwani@fedora ~]$ time tar -xvf units-1.88.tar.gz
units-1.88/
units-1.88/Makefile.in
units-1.88/COPYING
units-1.88/units.dat
units-1.88/strfunc.c
units-1.88/units.info
units-1.88/parse.y
units-1.88/Makefile.dos
units-1.88/parse.tab.c
units-1.88/configure
units-1.88/units.h
units-1.88/units.texinfo
units-1.88/texi2man
units-1.88/NEWS
units-1.88/INSTALL
units-1.88/getopt.h
units-1.88/units.dvi
units-1.88/ChangeLog
units-1.88/install-sh
units-1.88/units.man
units-1.88/README.OS2
units-1.88/configure.ac
units-1.88/getopt1.c
units-1.88/units.c
units-1.88/makeobjs.cmd
units-1.88/getopt.c
units-1.88/README
units-1.88/mkinstalldirs
units-1.88/Makefile.OS2
units-1.88/units.doc
real    0m0.026s
user    0m0.018s
sys     0m0.013s&lt;/span&gt;
4. After I ran this command I had successfully unpacked the tarball.&lt;strong&gt;
NOTE:&lt;/strong&gt; The highlighted Directory in green after unpacking.
If you do not get the above results, you may be typing the wrong filename or
maybe in the wrong directory
[jmulwani@fedora ~]$ ls
dead.letter  Documents  Music     Public    Templates   units-1.88.tar.gz
Desktop      Downloads  Pictures  rpmbuild  &lt;span style=&quot;color: #00ff00;&quot;&gt;units-1.88&lt;/span&gt;  Videos
5. I then changed directory to the &lt;span style=&quot;color: #00ff00;&quot;&gt;units-1.88&lt;/span&gt; using the cd command.
6. Finally in order to install the program I first read the read me. But if you don't
want to read the documentation,simply issue the command &lt;span style=&quot;color: #ff0000;&quot;&gt;./configure&lt;/span&gt;
or &lt;span style=&quot;color: #ff0000;&quot;&gt;time ./configure&lt;/span&gt; if you want to know how long this took.
&lt;span style=&quot;color: #ff0000;&quot;&gt;Here are the results
[jmulwani@fedora units-1.88]$ time ./configure checking
for gcc...
gcc checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none
needed checking for an ANSI C-conforming const... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for sin... no
checking for tparm in -lncurses... yes
checking how to run the C preprocessor...
gcc -E checking for grep that handles long lines and -e...
/bin/grep checking for egrep... /bin/grep -E checking
for ANSI C header files... yes checking for sys/types.h... yes
checking for sys/stat.h... yes checking for stdlib.h...
yes checking for string.h... yes checking for memory.h... yes
checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h...
yes checking for unistd.h... yes checking for readline in -lreadline... yes
checking readline/readline.h usability... yes checking readline/readline.h presence... yes
checking for readline/readline.h... yes checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes checking for strchr... yes
checking for strspn... yes checking for strtok... yes configure:
creating ./config.status config.status: creating Makefile
real    0m1.622s
user    0m0.602s
sys    0m0.428s&lt;/span&gt;
7. I then issued the command &lt;span style=&quot;color: #ff0000;&quot;&gt;time make&lt;/span&gt; to compile the program. Here are the results

&lt;span style=&quot;color: #ff0000;&quot;&gt;[jmulwani@fedora units-1.88]$ time make gcc
-DUNITSFILE=\&quot;/usr/local/share/units.dat\&quot;
-DREADLINE -DPACKAGE_NAME=\&quot;GNU\ units\&quot; -DPACKAGE_TARNAME=\&quot;units\&quot; &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_VERSION=\&quot;1.88\&quot; -DPACKAGE_STRING=\&quot;GNU\ units\ 1.88\&quot;
-DPACKAGE_BUGREPORT=\&quot;adrian@cam.cornell.edu\&quot; &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_URL=\&quot;http://www.gnu.org/software/units/\&quot; -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -g -O2 -I. -c units.cgcc
-DUNITSFILE=\&quot;/usr/local/share/units.dat\&quot;  -DREADLINE
-DPACKAGE_NAME=\&quot;GNU\ units\&quot; -DPACKAGE_TARNAME=\&quot;units\&quot; &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_VERSION=\&quot;1.88\&quot; -DPACKAGE_STRING=\&quot;GNU\ units\ 1.88\&quot;
-DPACKAGE_BUGREPORT=\&quot;adrian@cam.cornell.edu\&quot; &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_URL=\&quot;http://www.gnu.org/software/units/\&quot; -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DHAVE_UNISTD_H=1 -g -O2 -I. -c parse.tab.c gcc
-DUNITSFILE=\&quot;/usr/local/share/units.dat\&quot;  -DREADLINE -DPACKAGE_NAME=\&quot;GNU\ units\&quot;
-DPACKAGE_TARNAME=\&quot;units\&quot; &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_VERSION=\&quot;1.88\&quot; -DPACKAGE_STRING=\&quot;GNU\ units\ 1.88\&quot;
-DPACKAGE_BUGREPORT=\&quot;adrian@cam.cornell.edu\&quot; &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_URL=\&quot;http://www.gnu.org/software/units/\&quot; -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 &lt;/span&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -g -O2 -I. -c getopt.cgcc
-DUNITSFILE=\&quot;/usr/local/share/units.dat\&quot;  -DREADLINE -DPACKAGE_NAME=\&quot;GNU\ units\&quot;
-DPACKAGE_TARNAME=\&quot;units\&quot; &lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_VERSION=\&quot;1.88\&quot;
-DPACKAGE_STRING=\&quot;GNU\ units\ 1.88\&quot; -DPACKAGE_BUGREPORT=\&quot;adrian@cam.cornell.edu\&quot;
&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;-DPACKAGE_URL=\&quot;http://www.gnu.org/software/units/\&quot; -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 &lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -g -O2 -I. -c getopt1.c gcc  -o units
units.o parse.tab.o getopt.o getopt1.o  -lm -lreadline
-lncurses sed s!@DATAFILE@!/usr/local/share/units.dat! ./units.man &amp;gt; units.1
real    0m1.362s
user    0m0.755s
sys    0m0.057s&lt;/span&gt;

8. &lt;span style=&quot;color: #00ff00;&quot;&gt;(Optional)&lt;/span&gt; I then ran the command &lt;span style=&quot;color: #ff0000;&quot;&gt;time make check&lt;/span&gt; to ensure that the program
compiled properly. Here are the results:
&lt;span style=&quot;color: #ff0000;&quot;&gt;[jmulwani@fedora units-1.88]$ time make check
Checking units Units seems to work
real    0m0.014s
user    0m0.005s
sys    0m0.005s
&lt;span style=&quot;color: #000000;&quot;&gt;9. Step number 8 is not required but it ensures that the software is working properly.
Usually takes longer depending on size of package.
10. Finally I ran the command &lt;span style=&quot;color: #ff0000;&quot;&gt;time make install&lt;/span&gt; in order to install the
software to my machine. Here are the results:&lt;/span&gt;
[jmulwani@fedora units-1.88]$ time make install
./mkinstalldirs /usr/local/share/man/man1 /usr/bin/install -c -m 644 units.1
/usr/local/share/man/man1/`echo units|sed 's,x,x,'`.1 /usr/bin/install:
cannot remove `/usr/local/share/man/man1/units.1': Permission denied make: ***
[install-man] Error 1
real    0m0.105s
user    0m0.003s
sys    0m0.002s &lt;span style=&quot;color: #000000;&quot;&gt;
11. NOTE: This command did not work because I was a regular user so I was
denied access. I just ran the command &lt;span style=&quot;color: #ff0000;&quot;&gt;su -&lt;/span&gt; to become root and ran the above command again.
Here are the results: &lt;span style=&quot;color: #ff0000;&quot;&gt;
[root@fedora units-1.88]# time make install&lt;/span&gt;&lt;/span&gt;
./mkinstalldirs /usr/local/share/man/man1 /usr/bin/install -c -m 644 units.1
/usr/local/share/man/man1/`echo units|sed 's,x,x,'`.1
./mkinstalldirs /usr/local/bin /usr/local/share /usr/bin/install -c
units /usr/local/bin/`echo units|sed 's,x,x,'`
/usr/bin/install -c -m 644 ./units.dat /usr/local/share/units.dat
real    0m0.499s
user    0m0.131s
sys    0m0.027s&lt;/span&gt;

12. FINISHED. Let me show you the program I installed:
&lt;span style=&quot;color: #00ff00;&quot;&gt;[jmulwani@fedora ~]$ units
2526 units, 72 prefixes, 56 nonlinear units
You have: 100km
You want: miles     
* 62.137119     
/ 0.01609344
You have: 100 CAD
You want: USD     
* 94.44     
/ 0.010588734&lt;/span&gt;
A VERY USEFUL TOOL IF YOU ARE AN INVESTOR&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif?m=1308237711g&quot; alt=&quot;;)&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;My next step is to figure out how to repackage the software by making my custom spec file. UNTIL THEN

Cheers&lt;/pre&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/jmulwani.wordpress.com/6/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/jmulwani.wordpress.com/6/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=jmulwani.wordpress.com&amp;amp;blog=31658781&amp;amp;post=6&amp;amp;subd=jmulwani&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 27 Jan 2012 01:27:48 +0000</pubDate>
</item>
<item>
	<title>Mohammed Buttu: DPS911 Release 1</title>
	<guid isPermaLink="false">https://mbuttu.wordpress.com/?p=458</guid>
	<link>http://mbuttu.wordpress.com/2012/01/26/dps911-release-1/</link>
	<description>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This is my first release for David Humphrey’s &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/OSD700&quot; target=&quot;_blank&quot;&gt;DPS911&lt;/a&gt; open source class. I am currently working on three projects: &lt;a href=&quot;http://mozillapopcorn.org/popcorn-maker/&quot; target=&quot;_blank&quot;&gt;Popcorn Maker&lt;/a&gt;, Popcorn Maker FCP (the Mac version of the web-based Popcorn Maker), and &lt;a href=&quot;http://dseifried.wordpress.com/2012/01/11/setting-up-test-swarm/&quot; target=&quot;_blank&quot;&gt;TestSwarm for Popcorn&lt;/a&gt;. Below is a description of the bugs I am working on for each project. Although the patches submitted for Popcorn Maker are small, it took time to find the right area in the code to actually make the fix.&lt;/p&gt;
&lt;p&gt;Here is a table quickly summarizing the work done for the first release. The blog posts for bug 67 and 157 explain the problem and the solution; this blog post talks about how I went about solving them, and what issues I ran into. This post also talks about the progress of the work being done for Popcorn Maker FCP and TestSwarm for iOS.&lt;/p&gt;
&lt;p&gt;		&lt;/p&gt;&lt;p&gt;		&lt;/p&gt;&lt;p&gt;		&lt;/p&gt;&lt;table&gt;
&lt;caption&gt;Summary of First Release for DPS911&lt;/caption&gt;

&lt;tbody&gt;&lt;tr&gt;
&lt;th colspan=&quot;3&quot; align=&quot;center&quot;&gt;Popcorn Maker&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Bug&lt;/th&gt;
&lt;th&gt;Blog Post&lt;/th&gt;
&lt;th&gt;Tweet&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://webmademovies.lighthouseapp.com/projects/80723-popcorn-maker/tickets/67-dont-let-a-user-commit-a-blank-field-for-timeline-media-change#ticket-67-9&quot; target=&quot;_blank&quot;&gt;Bug 67&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://mbuttu.wordpress.com/2012/01/25/popcorn-maker-bug-67/&quot;&gt;Popcorn Maker – Bug 67&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://twitter.com/#!/mbuttu/status/162550517560643586&quot; target=&quot;_blank&quot;&gt;Tweet&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://webmademovies.lighthouseapp.com/projects/80723/tickets/157-layer-numbering-issue-on-import&quot; target=&quot;_blank&quot;&gt;Bug 157&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://mbuttu.wordpress.com/2012/01/20/popcorn-maker-bug-157/&quot;&gt;Popcorn Maker – Bug 157&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://twitter.com/#!/mbuttu/status/160831230865182721&quot; target=&quot;_blank&quot;&gt;Tweet&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th colspan=&quot;3&quot; align=&quot;center&quot;&gt;Popcorn Maker FCP&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Bug&lt;/th&gt;
&lt;th&gt;Blog Post&lt;/th&gt;
&lt;th&gt;Tweet&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom DMGs for release builds&lt;/td&gt;
&lt;td colspan=&quot;2&quot;&gt;Still working on it&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th colspan=&quot;3&quot; align=&quot;center&quot;&gt;TestSwarm for iOS&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Play videos automatically&lt;/td&gt;
&lt;td colspan=&quot;2&quot;&gt;Still working on it&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Popcorn Maker&lt;/h2&gt;
&lt;h3&gt;Bug 67&lt;/h3&gt;
&lt;p&gt;
	&lt;a href=&quot;https://webmademovies.lighthouseapp.com/projects/80723-popcorn-maker/tickets/67-dont-let-a-user-commit-a-blank-field-for-timeline-media-change#ticket-67-9&quot; target=&quot;_blank&quot;&gt;Bug 67 is on Lighthouse&lt;/a&gt;; the issue is that users are able to change a media source to nothing, which leaves the application in a broken state. The fix to this problem is explained in my blog post titled &lt;a href=&quot;http://mbuttu.wordpress.com/2012/01/25/popcorn-maker-bug-67/&quot;&gt;“Popcorn Maker – Bug 67.”&lt;/a&gt; That, however, was not my first solution before posting the patch up for review. My first solution involved editing two files, &lt;em&gt;butter/src/core/media.js&lt;/em&gt;, and &lt;em&gt;js/menu.js&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;butter/src/core/media.js&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;  Object.defineProperty( this, &quot;url&quot;, {
	get: function() {
	  return url;
	},
	set: function( val ) {
	  if ( val &amp;amp;&amp;amp; val.length &amp;gt; 0 &amp;amp;&amp;amp; !/^\s*$/.test( val ) &amp;amp;&amp;amp; val !== url ) {
		url = val;
		em.dispatch( &quot;mediacontentchanged&quot;, that );
	  }
	}
  });
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;js/menu.js&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;  buttonManager.add( &quot;change-url&quot;, $( &quot;.change-url-btn&quot; ), {
	click: function() {
	  var newUrl = $('#url').val();
	  popupManager.hidePopups();
	  if ( !newUrl || newUrl.length === 0 || /^\s*$/.test( newUrl ) ) {
		popupManager.showPopup( &quot;load-failed&quot; );
		return;
	  }
	  if ( newUrl !== butter.currentMedia.url ) {
		butter.currentMedia.url = newUrl;
		$(&quot;.media-title-div&quot;).html( newUrl );
		pm.toggleLoadingScreen( true );
		function changeComplete( media ) {
		  pm.toggleLoadingScreen( false );
		  butter.unlisten( &quot;mediacontentchangecomplete&quot;, changeComplete );
		}
		butter.listen( &quot;mediacontentchangecomplete&quot;, changeComplete );
	  } //if
	} //click
  }); //change-url-btn
&lt;/pre&gt;
&lt;p&gt;This code is also up on &lt;a href=&quot;http://pastebin.com/j1WkFmyp&quot; target=&quot;_blank&quot;&gt;pastebin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There is the same check going on here in two different places:&lt;/p&gt;
&lt;pre&gt;if ( !newUrl || newUrl.length === 0 || /^\s*$/.test( newUrl )
&lt;/pre&gt;
&lt;p&gt;This is checking to make sure that the new URL is defined, is not empty, and is not a string full of spaces. Based on the title of the ticket, which reads, “Don’t let a user commit a blank field for timeline media change,” it sounds like changing the URL source to nothing should be handled in the core of Butter. That’s why there is a check in the &lt;em&gt;butter/src/core/media.js&lt;/em&gt;: if it is not allowed to be blank, then having this check will protect any function that sets the currentMedia.url property of an instance of Butter to an empty string. If it’s handled there, then why do the same check again in &lt;em&gt;js/menu.js&lt;/em&gt;? The reason for the check on the UI side is to give an appropriate error message, and to stop from making a call that we know will not work. It’s similar to a client application calling a web service: the web service has its own checks that it does server side. Often, however, these checks are also done on the client side to avoid making round trips and putting a greater load on the server if it’s known ahead of time that what’s being entered is invalid. For example, submitting a blank field when asked to enter your credit card number will not be accepted on the server side. So to save the server some work, and for quicker feedback to the user, a check is made client side and the user is presented with an appropriate error message saying that the credit card field is blank. The same type of logic applies to this first solution: why make Butter do work trying to change the media’s source when it’s known what’s being sent as the new media source is invalid?&lt;/p&gt;
&lt;p&gt;After completing this, I decided to talk to &lt;a href=&quot;http://blog.robothaus.org/&quot; target=&quot;_blank&quot;&gt;Bobby&lt;/a&gt;–secretrobotron–on IRC to get his thoughts on having the checks in both places, and perhaps turning this check into a utility method in &lt;em&gt;js/utils.js&lt;/em&gt;. He told me that the URL may need to be blank for the base player to work. This is exactly what &lt;a href=&quot;http://mbuttu.wordpress.com/category/Open-Source/feed/dseifried.wordpress.com/&quot; target=&quot;_blank&quot;&gt;David Seifried&lt;/a&gt; told me when I discussed the patch with him. Bobby also said that Butter should throw the error, and Popcorn Maker should react to it. I then started looking for a way to dispatch this specific error so that when Popcorn Maker reacts to it, it will know that the exact reason changing the media failed was because what was entered was either nothing, an empty string, or a string full of spaces. But then I remembered that I read an error dispatched in the code, &lt;em&gt;previewerfail&lt;/em&gt;, when working on bug 157. That’s when I added in the listener for “previewerfail” in &lt;em&gt;js/menu.js&lt;/em&gt;, which lead to the patch that is currently in review.&lt;/p&gt;
&lt;h3&gt;Bug 157&lt;/h3&gt;
&lt;p&gt;The fix for &lt;a href=&quot;https://webmademovies.lighthouseapp.com/projects/80723/tickets/157-layer-numbering-issue-on-import&quot; target=&quot;_blank&quot;&gt;bug 157&lt;/a&gt; is explained &lt;a href=&quot;http://mbuttu.wordpress.com/2012/01/20/popcorn-maker-bug-157/&quot;&gt;here&lt;/a&gt;. Although this fix is even smaller than bug 67, it actually took longer. I ended up spending many hours looking at the wrong areas of the code (which was not a waste of time, it helped me understand the code base better, and made finding the area to fix bug 67 easier). At first I was looking for all areas that could possibly manipulate some sort of id property for a track. After some digging, I finally found a line of code in &lt;em&gt;js/timeline.js&lt;/em&gt; that may have been causing the issue:&lt;/p&gt;
&lt;pre&gt;  layerDiv.id = &quot;layer-&quot; + track.id;
&lt;/pre&gt;
&lt;p&gt;So then I put a breakpoint there, examined the call stack, stepped through the code, and started digging around. After some time, I eventually wound up in &lt;em&gt;butter/external/trackLiner/trackLiner.js&lt;/em&gt;. I found a &lt;em&gt;clear&lt;/em&gt; function, and noticed that it never said &lt;em&gt;track.id&lt;/em&gt; to 0. So I added that in, but when I tested the code it still didn’t work. I found it a bit odd; maybe a track is being passed around to different functions, and one of those is somehow manipulating the id in the wrong way. So I added more breakpoints and spent quite a bit of time pursuing this idea. Once I realized that wasn’t working, I thought maybe something was being done to the JSON blob that represents the project when it’s either imported or exported. I had watch expressions set up for a few variables that I thought could be the issue as I was stepping through the code.&lt;/p&gt;
&lt;p&gt;I eventually noticed that this issue doesn’t actually occur when first loading Popcorn Maker. If Popcorn Maker is loaded for the first time in the browser, and a previous project is opened, everything works just fine. This issue only happens if a project is saved first, and the loaded again. So there was a variable somewhere that was sticking around and not being reset back to 0. I finally found &lt;em&gt;butter/src/core/track.js&lt;/em&gt;. The id of the track is set by incrementing a static variable, &lt;em&gt;Track.guid&lt;/em&gt;. I used &lt;em&gt;grep&lt;/em&gt; to find other areas in Popcorn Maker where this was used. It wasn’t used any other place other than when first initialized to 0, and when being using to set the id of the track. I finally found the problem. While looking through the code I knew that Butter had a &lt;em&gt;clearProject&lt;/em&gt; function in &lt;em&gt;butter/src/butter-main.js&lt;/em&gt;. I set &lt;em&gt;Track.guid&lt;/em&gt; to 0 in that function, and everything worked as expected.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;Popcorn Maker FCP&lt;/h2&gt;
&lt;p&gt;For Popcorn Maker FCP, I have been working on creating a custom DMG file that people will be able to download. I want to create a drag-and-drop installation, which is common with Mac programs. The DMG will have two icons: one for Popcorn Maker FCP, and one for the Applications folder on the Mac. Once the DMG is opened, the user can drag Popcorn Maker FCP’s icon into the icon representing the Applications folder, which is a symbolic link to &lt;em&gt;/Applications&lt;/em&gt;. I also need this to work with the updating mechanism in place for Popcorn Maker FCP, which uses the popular &lt;a href=&quot;http://sparkle.andymatuschak.org/&quot; target=&quot;_blank&quot;&gt;Sparkle&lt;/a&gt; framework.&lt;/p&gt;
&lt;p&gt;It turns out creating DMGs with custom images is not straightforward. There are commercial applications out there that allow the developers to use a native Mac application that makes creating these DMGs manually really easy. But that method is too slow; I want to add in a build script for the release builds so that these DMGs are creating automatically. Therefore, I needed a way to create a custom DMG using the command line. I found some information &lt;a href=&quot;http://stackoverflow.com/questions/1237951/create-dmg-file&quot; target=&quot;_blank&quot;&gt;on StackOverflow&lt;/a&gt;, which gave me a start. Now I know &lt;em&gt;hdiutil&lt;/em&gt; is responsible for creating DMGs, but it seems as though there are many quirks. I then started looking for a tool that wraps &lt;em&gt;hdiutil&lt;/em&gt; and simplifies the interface. After searching around, I stumbled on the &lt;a href=&quot;https://github.com/andreyvit/yoursway-create-dmg/&quot; target=&quot;_blank&quot;&gt;create-dmg&lt;/a&gt; project. I set this up and started playing with the settings, following the example posted &lt;a href=&quot;https://github.com/andreyvit/yoursway-create-dmg/blob/master/sample&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. But I couldn’t get it to work. No matter what image I told it to use as a custom background, it always created a plain DMG. So I started to search again, and found another project, &lt;a href=&quot;http://drnic.github.com/choctop/&quot; target=&quot;_blank&quot;&gt;ChocTop&lt;/a&gt; (which also supports the Sparkle framework!). I have spent quite a bit of time actually trying to get the tool to work without throwing an error. I have been installing the ruby gems it needs, but I keep getting this error when I try to use the &lt;em&gt;install_choctop&lt;/em&gt; command:&lt;/p&gt;
&lt;pre&gt;/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rubigen-1.5.7/lib/rubigen/options.rb:31:in `default_options': undefined method `write_inheritable_attribute' for RubiGen::Base:Class (NoMethodError)
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rubigen-1.5.7/lib/rubigen/base.rb:84:in `'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rubigen-1.5.7/lib/rubigen/base.rb:79:in `'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rubigen-1.5.7/lib/rubigen/base.rb:42:in `'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rubigen-1.5.7/lib/rubigen.rb:10:in `'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
	from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/choctop-0.14.1/bin/install_choctop:4:in `'
	from /usr/local/Cellar/ruby/1.9.3-p0/bin/install_choctop:19:in `load'
	from /usr/local/Cellar/ruby/1.9.3-p0/bin/install_choctop:19:in `'
&lt;/pre&gt;
&lt;p&gt;I hope to get this working as it would make releasing the application much easier, and the resulting custom DMG will look much more professional.&lt;/p&gt;
&lt;h2&gt;TestSwarm for Popcorn&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://dseifried.wordpress.com/2012/01/11/setting-up-test-swarm/&quot; target=&quot;_blank&quot;&gt;David Seifried&lt;/a&gt; is working on TestSwarm for &lt;a href=&quot;http://www.popcornjs.org&quot; target=&quot;_blank&quot;&gt;Popcorn&lt;/a&gt;. I am going to work on getting this to work on iOS: we need a way to let the videos needed for Popcorn’s test cases to play automatically, without someone having to sit there and hit the play button. I haven’t been able to do too much on actually figuring that issue out, we are still working on me actually being able to see the web page on the iOS simulator. I keep getting this error:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://mbuttu.files.wordpress.com/2012/01/testswarm-ioserror1.jpg?w=316&amp;amp;h=96&quot; title=&quot;TestSwarm-iOSError.jpg&quot; height=&quot;96&quot; width=&quot;316&quot; alt=&quot;TestSwarm iOSError&quot; border=&quot;0&quot; /&gt;
&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I have learned really interesting things while working on my first release. It’s nice to work on different projects so that I can keep up to date with more than one technology. Working on multiple projects has also come in really useful when I am unable to work on a particular bug. For example, when I was not able to work on TestSwarm for iOS, I went back to trying to get ChocTop to work for Popcorn Maker FCP.&lt;/p&gt;
&lt;h3&gt;What I Learned for Future Releases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;I learned that I need to blog about my process and the problems I run into when working on the bugs assigned to me. It helps others know my current progress, and someone who reads it may end up helping me solve the issue. Having these blog posts will also help make my release blog post more organized and concise; it will avoid having to talk about the process of fixing the bugs in a release post. Additionally, it’s better to blog about the process while I am actually in the middle of it, because that’s when it is fresh in my mind; some of it forgotten when I blog about it after the fact.&lt;/li&gt;
&lt;li&gt;I need to use IRC more. I did make use of IRC, but I may have been able to solve my bugs faster if I asked questions earlier on. There are others who have worked with the code and already understand it; they can help me focus in on the area I need to be looking at.&lt;/li&gt;
&lt;li&gt;Get more involved with Twitter. I tweet about my blog post once I publish it, but I can tweet about my progress as I am working on the bugs. Sometimes progress is small and isn’t enough for a blog post, that’s when tweeting will come in useful.&lt;/li&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mbuttu.wordpress.com/458/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mbuttu.wordpress.com/458/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mbuttu.wordpress.com&amp;amp;blog=22767246&amp;amp;post=458&amp;amp;subd=mbuttu&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;&lt;/ul&gt;</description>
	<pubDate>Thu, 26 Jan 2012 22:29:11 +0000</pubDate>
</item>
<item>
	<title>Justin Robinson: Viva Las Vegas!</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=340</guid>
	<link>http://justintrobinson.wordpress.com/2012/01/26/viva-las-vegas/</link>
	<description>&lt;p&gt;NetConnection.call is a very strange place. I have a global PollObject called pollGlobal, declared and instantiated far outside of nc.call. Nc.call’s success method calls another method named extractPoll, and extractPoll assigns values to pollGlobal. Still with me? Good.&lt;/p&gt;
&lt;p&gt;Now, the weird thing is that in the very next line after nc.call, the changes I’ve made to pollGlobal disappear. Gone. Vanished. Woosh! What happens in nc.call, STAYS in nc.call. But there’s no reason for it! Here, have a diagram.&lt;/p&gt;
&lt;p&gt;public var pollGlobal:PollObject;&lt;/p&gt;
&lt;p&gt;public function getPoll(){&lt;br /&gt;
““`pollGlobal = new PollObject();&lt;br /&gt;
““`nc.call(){&lt;br /&gt;
“““““extractPoll(){&lt;br /&gt;
“““““““` pollGlobal.title = “TITLE”;&lt;br /&gt;
“““““} –&amp;gt; end of extractPoll&lt;br /&gt;
“““““printf(pollGlobal.title); —–&amp;gt; “TITLE”&lt;br /&gt;
““` } –&amp;gt; end of nc.call&lt;br /&gt;
““`prinf(pollGlobal.title); –&amp;gt; “null”&lt;br /&gt;
} –&amp;gt; end of getPoll&lt;/p&gt;
&lt;p&gt;That isn’t how the code actually looks, but that’s the flow the logic takes. What is going on?!&lt;/p&gt;
&lt;p&gt;(Incidentally, there’s a chance I could be going to Vegas for my brother’s bachelor party this summer)&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/340/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/340/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=340&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 19:40:32 +0000</pubDate>
</item>
<item>
	<title>Christopher DeCairos: OSD700 Release post 1</title>
	<guid isPermaLink="false">https://chrisdecairos.ca/?p=149</guid>
	<link>https://chrisdecairos.ca/osd700-release-post-1.html</link>
	<description>&lt;p&gt;Before I get started here's some formalities for the course:&lt;/p&gt;
&lt;p&gt;My work on this release can be found here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137&quot;&gt;bug 686137 - Setting audio.mozFrameBufferLength has no effect on MozAudioAvailable.frameBuffer.length&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/cadecairos/mozilla-central/tree/bugs/686137&quot;&gt;https://github.com/cadecairos/mozilla-central/tree/bugs/686137&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And now, the story:&lt;/p&gt;
&lt;p&gt;As I described in &lt;a href=&quot;https://chrisdecairos.ca/diving-into-firefox-media-code.html&quot;&gt;my previous post&lt;/a&gt;, I've been hacking on Firefox media code for my &lt;a href=&quot;http://zenit.senecac.on.ca/wiki/index.php/OSD700&quot;&gt;OSD700&lt;/a&gt; class.  This post is going to detail more about the bug I was working on and how things went with it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137&quot;&gt;Bug 686137&lt;/a&gt; was an audio API related issue where the MozAudioAvailable event on an audio element would report an incorrect frameBufferLength value. This happened after it had been manually changed through the mozFrameBufferLength attribute on the &amp;lt;audio&amp;gt; element. The first thing I did was create a test case using code that &lt;a href=&quot;http://vocamus.net/dave/&quot;&gt;David Humphrey&lt;/a&gt; included in his bug report. Using this test I &lt;a href=&quot;http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=09b605eb3e0d&amp;amp;tochange=a174b86200d6&quot;&gt;narrowed down the list of possible bugs&lt;/a&gt; that caused this regression and eventually discovered the bug that created it. From there I zeroed in on the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/media/&quot;&gt;content/media&lt;/a&gt; folder within mozilla-central, where all the media code lives. Using the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central&quot;&gt;Mozilla Cross-Reference website&lt;/a&gt;, I searched for a couple of keywords: &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/search?string=mozFrameBufferLength&quot;&gt;mozFrameBufferLength&lt;/a&gt; and &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/search?string=MozAudioAvailable&quot;&gt;MozAudioAvailable&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This search led me to more files than I'd have liked to have seen. I spent the majority of my time last week reading through these files trying to familiarize myself with what was going on in them, but this ultimately got me no closer to a fix. I spoke with Jon Buckley, who told me that in his experience, using &lt;a href=&quot;http://www.gnu.org/software/gdb/&quot;&gt;GDB&lt;/a&gt; was the best way to trace the execution of the bug down. I hadn't used GDB since OOP344 with &lt;a href=&quot;https://cs.senecac.on.ca/~fardad.soleimanloo/&quot;&gt;Fardad&lt;/a&gt;, where I and two other team members created a simple text editor in C/C++ called Bite. After a simple search, I found a wiki detailing techniques for debugging Firefox with GDB.&lt;/p&gt;
&lt;p&gt;The obvious thing for me to do here was find all the places in the code where the frameBufferLength was being handled in some manner. My plan was to set break points at parts where I thought it was being set and do some checking of the data from within GDB. For your information, the test case I was using used a default buffer length of 2048 Bytes, which was set in JavaScript to 4096 Bytes. When debugging against this test case, I found it very curious that at all the break points I had set, the frame buffer length was always 2048. There was no trace of the 4096 value in the test case.&lt;/p&gt;
&lt;p&gt;What this told me is that I needed to follow the path that the value 4096 was taking. Using MXR I located the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLMediaElement.cpp#1281&quot;&gt;setter method for the mozFrameBufferLength attribute&lt;/a&gt; and using GDB, set a break point within the function. Stepping through the code, it looked as if everything was being set properly.  At this point in my investigation, I found myself completely stumped.  I spent many hours stepping through the code trying to find the difference in the initial setting of the buffer length on the&lt;/p&gt;
&lt;p&gt;Then I noticed it. The key to the puzzle was a class called nsBuiltinDecoder. This class inherited from a base class named nsMediaDecoder. Each one contains a RequestFrameBufferLength() method that accepts a 32 bit integer for the new buffer size and handle it in slightly different ways. Why is this important? Well, When the &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/media/nsBuiltinDecoder.cpp#232&quot;&gt;nsBuiltinDecoder::RequestFrameBufferLength()&lt;/a&gt;. On the other hand, when setting the buffer length from the element, it passes the argument into &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/media/nsBuiltinDecoder.cpp#234&quot;&gt;nsMediaDecoder::RequestFrameBufferLength&lt;/a&gt;! I opened the header file for nsMediaDecoder and found the function definition, and lo and behold, there was no &quot;virtual&quot; keyword! By this point I'd spent over 6 hours that day tracing this thing down, and I was quite fatigued. I made the addition and using a tool called &quot;&lt;a href=&quot;http://www.joshmatthews.net/blog/2011/05/build-smarter-not-harder/&quot;&gt;smartmake&lt;/a&gt;&quot; suggested to me by a Mozillian in #introduction on Moznet, began an incremental build. I was 100% sure it would work. I opened up Nightly and navigated to my test page and.... nothing changed. What. The. Fudge.&lt;/p&gt;
&lt;p&gt;It was a huge let down. But I wasn't let down for long. After posting about where I was, a developer named Yuri posted&lt;a href=&quot;https://chrisdecairos.ca/diving-into-firefox-media-code.html#comment-166&quot;&gt; a comment&lt;/a&gt;, indicating that the virtual keyword was the problem. After discussions with him and Dave Humphrey on IRC, it became clear that I should perform a top-level build. I'm not gonna lie, I was pretty excited. After my top-level build completed, the test case finally passed! Vindication at last.&lt;/p&gt;
&lt;p&gt;Now that I had a fix I needed to create a patch for it. Matthew Schranz posted&lt;a href=&quot;http://mschranz.wordpress.com/2012/01/12/mozilla-bug-process-using-git/&quot;&gt; a guide on developing for Firefox using GIT&lt;/a&gt; (which is what I was doing) and he had included a command that would create a properly formatted patch. Using that, I created &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137#c5&quot;&gt;this attachment&lt;/a&gt; on the bug. I then set out to write a test for it so that it would never break unknowingly again.  Using existing tests as a base, and after reading several guides on writing tests for Firefox, I produced &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137#c6&quot;&gt;this attachment&lt;/a&gt; to the bug.&lt;/p&gt;
&lt;p&gt;From there, my navigation through the review process was a little rocky. I found that upon setting an attachment for review, I should set a person responsible for it (something I did not do). Luckily it got picked up by &lt;a href=&quot;http://blog.mjg.im/&quot;&gt;Matthew Gregan AKA kinetik&lt;/a&gt; who r+ the first patch. He also gave me some pointers for the future. In my patch I didn't follow the regular commit message conventions, something I won't do again. The second patch needed some work done before it could be approved. They were just minor issues relating to comments I'd forgotten to remove and unneeded listeners I'd used. I also took his advice and added a second assertion for a case I had not considered. After wrestling with git for an hour trying to get the patch right I posted a &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137#c11&quot;&gt;new attachment&lt;/a&gt; with the fixes, and a commit message that met the expectation I mentioned above.&lt;/p&gt;
&lt;p&gt;This new attachment got a positive review from &lt;a href=&quot;http://blog.mjg.im/&quot;&gt;Kinetik&lt;/a&gt;. The next day, after discussion about the bug I was advised to set the bug to have the checkin-needed flag. I also uploaded &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137#c11&quot;&gt;a new attachment&lt;/a&gt; with a conforming commit message, obsoleting the first attachment I posted. Later that evening the patches were merged into &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137#c15&quot;&gt;mozilla-inbound&lt;/a&gt;. I learned that this is a sort of staging area, where new patches have the tests run on multiple platforms to make sure that they don't break the entire program. While driving to work the next morning I got an email notification that my patches were now &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=686137#c16&quot;&gt;merged into mozilla-central&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hacking on this bug taught me a lot. I got a great introduction to some of the media code and its inner workings. I got a nice refresh on using GDB. I now have a deeper understanding of building Firefox from the source (when in doubt, do a top-level build). I learned more about the firefox review process (what NOT to do). And I personally learned that even the simplest of fixes can take a ridiculous amount of time to track down. Especially when you're not familiar with the code like I was. Coming out of this thing I feel I'm in a better position to take on more bugs.&lt;/p&gt;
&lt;p&gt;My plan for the next two weeks is to get on a couple other bugs I've been looking at ( &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=715323&quot;&gt;bug 715323&lt;/a&gt; and &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=711742&quot;&gt;bug 711742&lt;/a&gt; ). I'm also going to find more bugs to work on related to the media code.&lt;/p&gt;</description>
	<pubDate>Thu, 26 Jan 2012 17:54:42 +0000</pubDate>
</item>
<item>
	<title>Matthew Schranz: OSD700 Release 1 – Updating the DOM</title>
	<guid isPermaLink="false">http://mschranz.wordpress.com/?p=150</guid>
	<link>http://mschranz.wordpress.com/2012/01/26/osd700-release-1-updating-the-dom/</link>
	<description>&lt;p&gt;First release! Already? Hate to sound not enthused but other courses are bringing down my mood right now &lt;img src=&quot;http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif&quot; alt=&quot;:P&quot; class=&quot;wp-smiley&quot; /&gt;  Not this one though!&lt;/p&gt;
&lt;p&gt;During these first two and a half weeks I have been able to get three tickets done with two of them landed and the third’s patch review+ and just needed to be run on the try server to finalize if it’s acceptable or not.&lt;/p&gt;
&lt;p&gt;Said three bugs are:&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=698384&quot;&gt;Bug 698384&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=698385&quot;&gt;Bug 698385&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=718274&quot;&gt;Bug 718274&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may notice that there is not actual patch for 698385. That is because the changes to that one and 698384 affect the same area of code so in order to properly fix one the other has to be done at the same time. Hence why the patch for both is located in 698384.&lt;/p&gt;
&lt;p&gt;The first two were simply updates to the DOM specifications. Both document.createTreeWalker and document.createNodeIterator now had optional arguments according to the &lt;a href=&quot;http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html&quot;&gt;DOM Spec&lt;/a&gt; and obviously Mozilla wants to adhere to this spec as much as possible. The actual coding changes for these were pretty simple in the end once I knew what to do but getting there was another story. I can’t make the claim that I am an experienced C++ developer so coming in I had no idea how to deal with optional arguments. In the end I figured it out which can be read &lt;a href=&quot;http://mschranz.wordpress.com/2012/01/20/handling-optional-method-parameters-and-mozilla/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=698381&quot;&gt;Bug 698381&lt;/a&gt; is still a work in progress. The types of changes are the same but with this one the update is to a class that has a &lt;strong&gt;VERY&lt;/strong&gt; long and big inheritance chain. It literally is the basis for almost anything web related so finding all the various implementations of that method proved difficult at first but thanks to the help of some &lt;a href=&quot;http://mschranz.wordpress.com/category/open_source/feed/dxr.mozilla.org&quot;&gt;DXR&lt;/a&gt; searches I should have it finished shortly.&lt;/p&gt;
&lt;p&gt;With 718274 I have to admit I thought the fixes needed might actually be more difficult when I first read over it. Not to say it wasn’t interesting but the changes were pretty quick. To sum it up, there was a desire to add a method to nsContentUtils called DispatchUntrustedEvent. The name pretty much tells you what it’s intent is, to send untrusted events. What is an untrusted event? That’s another story entirely. &lt;/p&gt;
&lt;p&gt;However at the same time they wanted to introduce another private method called DispatchEvent that both DispatchUntrustedEvent and DispatchTrustedEvent would call as they both would be written the same way other than what they would set a boolean variable aTrusted too. I won’t bother showing the .h files additions but here is the transformation in the .cpp:&lt;/p&gt;
&lt;p&gt;From…&lt;/p&gt;
&lt;pre&gt;static
nsresult GetEventAndTarget(nsIDocument* aDoc, nsISupports* aTarget,
                           const nsAString&amp;amp; aEventName,
                           bool aCanBubble, bool aCancelable,
                           nsIDOMEvent** aEvent,
                           nsIDOMEventTarget** aTargetOut)
{
  nsCOMPtr domDoc = do_QueryInterface(aDoc);
  nsCOMPtr target(do_QueryInterface(aTarget));
  NS_ENSURE_TRUE(domDoc &amp;amp;&amp;amp; target, NS_ERROR_INVALID_ARG);

  nsCOMPtr event;
  nsresult rv =
    domDoc-&amp;gt;CreateEvent(NS_LITERAL_STRING(&quot;Events&quot;), getter_AddRefs(event));
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr privateEvent(do_QueryInterface(event));
  NS_ENSURE_TRUE(privateEvent, NS_ERROR_FAILURE);

  rv = event-&amp;gt;InitEvent(aEventName, aCanBubble, aCancelable);
  NS_ENSURE_SUCCESS(rv, rv);

  rv = privateEvent-&amp;gt;SetTrusted(true);
  NS_ENSURE_SUCCESS(rv, rv);

  rv = privateEvent-&amp;gt;SetTarget(target);
  NS_ENSURE_SUCCESS(rv, rv);

  event.forget(aEvent);
  target.forget(aTargetOut);
  return NS_OK;
}

// static
nsresult
nsContentUtils::DispatchTrustedEvent(nsIDocument* aDoc, nsISupports* aTarget,
                                     const nsAString&amp;amp; aEventName,
                                     bool aCanBubble, bool aCancelable,
                                     bool *aDefaultAction)
{
  nsCOMPtr event;
  nsCOMPtr target;
  nsresult rv = GetEventAndTarget(aDoc, aTarget, aEventName, aCanBubble,
                                  aCancelable, getter_AddRefs(event),
                                  getter_AddRefs(target));
  NS_ENSURE_SUCCESS(rv, rv);

  bool dummy;
  return target-&amp;gt;DispatchEvent(event, aDefaultAction ? aDefaultAction : &amp;amp;dummy);
}
&lt;/pre&gt;
&lt;p&gt;To…&lt;/p&gt;
&lt;pre&gt;static
nsresult GetEventAndTarget(nsIDocument* aDoc, nsISupports* aTarget,
                           const nsAString&amp;amp; aEventName,
                           bool aCanBubble, bool aCancelable,
                           bool aTrusted, nsIDOMEvent** aEvent,
                           nsIDOMEventTarget** aTargetOut)
{
  nsCOMPtr domDoc = do_QueryInterface(aDoc);
  nsCOMPtr target(do_QueryInterface(aTarget));
  NS_ENSURE_TRUE(domDoc &amp;amp;&amp;amp; target, NS_ERROR_INVALID_ARG);

  nsCOMPtr event;
  nsresult rv =
    domDoc-&amp;gt;CreateEvent(NS_LITERAL_STRING(&quot;Events&quot;), getter_AddRefs(event));
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr privateEvent(do_QueryInterface(event));
  NS_ENSURE_TRUE(privateEvent, NS_ERROR_FAILURE);

  rv = event-&amp;gt;InitEvent(aEventName, aCanBubble, aCancelable);
  NS_ENSURE_SUCCESS(rv, rv);

  rv = privateEvent-&amp;gt;SetTrusted(aTrusted);
  NS_ENSURE_SUCCESS(rv, rv);

  rv = privateEvent-&amp;gt;SetTarget(target);
  NS_ENSURE_SUCCESS(rv, rv);

  event.forget(aEvent);
  target.forget(aTargetOut);
  return NS_OK;
}

// static
nsresult
nsContentUtils::DispatchTrustedEvent(nsIDocument* aDoc, nsISupports* aTarget,
                                     const nsAString&amp;amp; aEventName,
                                     bool aCanBubble, bool aCancelable,
                                     bool *aDefaultAction)
{
  return DispatchEvent(aDoc, aTarget, aEventName, aCanBubble, aCancelable,
                       true, aDefaultAction);
}

// static
nsresult
nsContentUtils::DispatchUntrustedEvent(nsIDocument* aDoc, nsISupports* aTarget,
                                       const nsAString&amp;amp; aEventName,
                                       bool aCanBubble, bool aCancelable,
                                       bool *aDefaultAction)
{
  return DispatchEvent(aDoc, aTarget, aEventName, aCanBubble, aCancelable,
                       false, aDefaultAction);
}

// static
nsresult
nsContentUtils::DispatchEvent(nsIDocument* aDoc, nsISupports* aTarget,
                              const nsAString&amp;amp; aEventName,
                              bool aCanBubble, bool aCancelable,
                              bool aTrusted, bool *aDefaultAction)
{
  nsCOMPtr event;
  nsCOMPtr target;
  nsresult rv = GetEventAndTarget(aDoc, aTarget, aEventName, aCanBubble,
                                  aCancelable, aTrusted, getter_AddRefs(event),
                                  getter_AddRefs(target));
  NS_ENSURE_SUCCESS(rv, rv);

  bool dummy;
  return target-&amp;gt;DispatchEvent(event, aDefaultAction ? aDefaultAction : &amp;amp;dummy);
}
&lt;/pre&gt;
&lt;p&gt;Hoping to finish 698381 soon. Once I’m done with that I hope to find something a little bit more in-depth to help me learn more as a developer!&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mschranz.wordpress.com/150/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mschranz.wordpress.com/150/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mschranz.wordpress.com&amp;amp;blog=20389101&amp;amp;post=150&amp;amp;subd=mschranz&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 15:55:38 +0000</pubDate>
</item>
<item>
	<title>David Seifried: OSD700 – First release!</title>
	<guid isPermaLink="false">http://dseifried.wordpress.com/?p=256</guid>
	<link>http://dseifried.wordpress.com/2012/01/26/osd700firstrelease/</link>
	<description>&lt;p&gt;For the last two weeks I have been working on various Firefox bugs for my first release in OSD700.  My bugs have been centered around various parts of the media implementation, ranging from issues with the controls to problems with how preload states are handled.  As it stands, I’ve  managed to get a patch up for 3 of my tickets which is pretty cool if I do say so myself. The tickets that I’ve worked on so far are &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=702161&quot;&gt;702161&lt;/a&gt;, &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=708814&quot;&gt;708814&lt;/a&gt;, and &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=680321&quot;&gt;680321&lt;/a&gt;.  I’m going to touch briefly on each ticket and the changes that I made.&lt;/p&gt;
&lt;p&gt;The first ticket I started on for the course was 702161 and was focused around removing anonymous functions that were set up for event listeners but were never removed because we had no reference to them.  Fixing these was a matter of storing a reference to each of these functions and removing them at the proper time.  You can read up on my earlier work for this ticket in &lt;a href=&quot;http://dseifried.wordpress.com/2012/01/16/firefox-bug-702161/&quot;&gt;my other&lt;/a&gt; &lt;a href=&quot;http://dseifried.wordpress.com/2012/01/19/firefox-bug-702161-part-ii/&quot;&gt;blog posts&lt;/a&gt;. My first patch for this ticket was rejected because I attached each function to the video object instead of attaching an object to the video and attaching the event listeners to it. I forget my reasoning for not doing this in the first place, but thats beside point. I learned a lot about Firefox’s review process with this bug and how it differs from the review process in other open source projects I work on ( &lt;a href=&quot;http://popcornjs.org/&quot;&gt;Popcorn.js&lt;/a&gt; and &lt;a href=&quot;http://mozillapopcorn.org/popcorn-maker/&quot;&gt;Popcorn Maker&lt;/a&gt; ).  In Popcorn projects we typically wait until both a fix and tests have been written before review is requested.  The review process in Firefox is a bit different.  It seems to the norm to submit patches more frequently in order to get early feedback on what you’ve been working on.  I like this because it allows you to find any glaring mistakes you are making early and ensures that you are on the right track for later patches.  It also allows reviewers to handle your code in smaller doses.  I &lt;a href=&quot;https://github.com/dseif/popcorn-js/commit/d8123b91e1a1cce0623b21e8372bab80a648afeb&quot;&gt;remember one ticket&lt;/a&gt; that I submitted in Popcorn that touched ever file of every plugin ( ~100 files ).  I remember dumping that ticket on &lt;a href=&quot;https://twitter.com/#!/ChrisDeCairos&quot;&gt;Chris De Cairos&lt;/a&gt; for review and seeing the look on his face.  I can just imagine how much more manageable my patch would have been if we did something similar to Firefox.  All in all this ticket taught me a lot about Firefox’s review process, how patches should look, and was a good way to get my foot in the door of Firefox development.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;My second ticket was 708814 and had to do with fixing an issue where mousing over a full-screened video would not hide the controls.  It was cool that this ticket was centered around code that I just finished working with in 7021661, so I felt pretty confident about getting started.  The first thing I did was to make sure that I could reproduce the bug.  &lt;a href=&quot;http://dseifried.wordpress.com/category/school/feed/pearce.org.nz&quot;&gt;Chris Pearce&lt;/a&gt; posted a &lt;a href=&quot;http://pearce.org.nz/full-screen/&quot;&gt;test case&lt;/a&gt; and some guidelines about how to reproduce the bug.  I fired up the test and followed his instructions and what do you know there was the bug.  The problem was that when using a hotkey to trigger a video to go full-screen that the controls would not disappear.  This was because prior to my patch, a timeOut for removing the controls was initially fired on mouse move when the video was fullscreen.  My fix consisted of checking to see if the mouse was over the video element when it was fullscreen.  If it was, we would start the timeOut then.  The interesting part about this ticket was that my fix spawned another ticket for me to work on.  The bug that I found ( that already existed in bugzilla )was &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=708553&quot;&gt;708553&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Bug 708553 is about the video element not properly handling hover states when in full-screen mode.  This relates to 708814 because my fix essentially says that if the video is full-screen and if the mouse is hovered over the video, then start the timeOut.  I picked up this bug because from what I can tell, it is blocking my fix for 708814, so I figured why not speed up the process and fix it myself.&lt;/p&gt;
&lt;p&gt;My final bug for this release is 680321.  This bug is centered around the preload attribute on video elements and how it handles being changed in the resource selection algorithm.  The initial issue with this ticket was that the resource selection algorithm would ignore preload states that buffered less agressively if changed programatically.  This means that if we start video A with preload auto and set a timeOut for one second later to switch preload to auto and change the videos source, that the new preload state is now ignored.  This means that video B will begin loading assuming preload auto when it should use preload none.  This ticket was interesting because it was my first ticket involving C++.  Now I’m not gonna lie my C++ skills are pretty lacking, and I had to do a bit of refreshing to ever begin to understand what was going on in this code.  The file that I was working in, &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLMediaElement.cpp&quot;&gt;nsHTMLMediaElement.cpp&lt;/a&gt;, was also pretty huge ( ~4k lines ).  I spent pretty much the entirety of a whole night just reading this file and trying to understand how all of the pieces fit together. After finding an area of the code that I thought the bug was in, I began hacking.  After a few incremental builds and I found that I was pretty lost without a debugger.  I remember Chris and Jon talking about a good C++ debugger for the command line so I went to irc to ask for some help. I was given a quick rundown about &lt;a href=&quot;http://www.gnu.org/software/gdb/&quot;&gt;GDB &lt;/a&gt;and how to use it, tho I found a way to screw it up so I opted out and chose to wait until David Humphrey explained it in class.  I was going to have to go with the ole trial and error approach if I wanted to make progress before Thursdays class.  The odd thing that I noticed was the no matter how many changes I made to the file I was not seeing and changes actually happen to the browser ( I even commented out huge blocks of seemingly important code, and nothing happened ) so I figured my build process was screwed up somewhere. My guess was that I was attempting to build too far into the tree and my changes were not actually being seen further up the tree where they needed to.  I said screw it and waited the few minutes and did a fresh new build and I finally saw my changes!  I was lucky in the fact that I was pretty close to a solution on my first try.  It took a few more small tweaks to make the change elegant and following the rest of the codes style and I was ready to submit for some feedback.  The fix involved removing a chunk of code that prevented the functionality that we now wanted and added in another conditional check for our preload state.&lt;/p&gt;
&lt;p&gt;My experience so far hacking on Firefox has been awesome. I’ve had a chance to talk with some cool dev’s on irc, make changes to Firefox that will help Popcorn.js, and learn a ton along the way.  As it stands two of my tickets still need tests to be written for them before they get officially reviewed, but I’m optimistic about finishing them and can hopefully get that done by mid next week.  I managed to get 3 tickets somewhat finished so far and hope that I can continue this pace until the end of the semester.  I know the tickets are only going to get harder the deeper I go into Firefox but that also means the satisfaction I get out of finishing them will be even greater. I have no idea what other crazy bugs I will get to work on this semester but I can’t wait.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/dseifried.wordpress.com/256/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/dseifried.wordpress.com/256/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=dseifried.wordpress.com&amp;amp;blog=19041028&amp;amp;post=256&amp;amp;subd=dseifried&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 15:42:51 +0000</pubDate>
</item>
<item>
	<title>Justin Robinson: Copycat!</title>
	<guid isPermaLink="false">http://justintrobinson.wordpress.com/?p=335</guid>
	<link>http://justintrobinson.wordpress.com/2012/01/26/copycat/</link>
	<description>&lt;p&gt;I had a bit of a brainwave in regards to yesterday’s problem of passing the Java Poll to an ActionScript PollObject. Neither class has a copy constructor, maybe that little technicality is the problem. I’m compiling now with a copy-con in the Poll class, if that doesn’t work I’ll add one to the AS class and recompile with both together, and if THAT doesn’t work I’ll try it with just the AS copy-con. Hopefully there’s a result for me in here somewhere.&lt;/p&gt;
&lt;p&gt;UPDATE: Well, fist of all, ActionScript doesn’t seem to use copy constructors. I’m still thinking in terms of C++, I guess. Anyway, the Java copy-con was sound, but never got called even though the NetConnection.call successfully calls up a PollObject (which is, unfortunately, empty). Earlier, I changed the server-side getPoll() method being addressed in the NC.call() to return all the properties of a Poll as an ArrayList, which the client-side AS could translate to an ArrayCollection and use to populate a PollObject, but it didn’t work. Maybe I have to return to that.&lt;/p&gt;
&lt;p&gt;UPDATE: SUCCESS! The information is passed cleanly from Java to AS! Here’s how it happens:&lt;br /&gt;
1) The client calls for server-side getPoll()&lt;br /&gt;
2) getPoll() returns a Java ArrayList with all the properties of a Poll (5 Strings and 2 ArrayLists) to client&lt;br /&gt;
3) Client creates an ordinary Array, not an ArrayCollection like I originally thought, of the data coming back.&lt;/p&gt;
&lt;p&gt;The Array holds everything! Ta-da!&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/justintrobinson.wordpress.com/335/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/justintrobinson.wordpress.com/335/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=justintrobinson.wordpress.com&amp;amp;blog=27111850&amp;amp;post=335&amp;amp;subd=justintrobinson&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 15:41:20 +0000</pubDate>
</item>
<item>
	<title>Nikita Kuznetsov: so far...</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6173403786506536842.post-8360551845798096622</guid>
	<link>http://kuznetsovnikita.blogspot.com/2012/01/so-far.html</link>
	<description>Busy semester. Web dev, as always, carrying on with the real estate CMS. Now implementing the major functionality and designing a nice-looking website (done). Introducing JQuery snippets into usual environment... We'll see what that results in shortly :)&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6173403786506536842-8360551845798096622?l=kuznetsovnikita.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 26 Jan 2012 06:38:00 +0000</pubDate>
	<author>noreply@blogger.com (Nikita Kuznetsov)</author>
</item>
<item>
	<title>Maria Bustos-Roman: Building my first RPM package</title>
	<guid isPermaLink="false">http://mariabustoss.wordpress.com/?p=52</guid>
	<link>http://mariabustoss.wordpress.com/2012/01/26/building-my-first-rpm-package/</link>
	<description>&lt;p&gt;This is my attempt at building an RPM package for ed.&lt;/p&gt;
&lt;p&gt;At first I followed the simple instructions from lab:&lt;/p&gt;
&lt;p&gt;Move the tarball to ~/rpmbuild/SOURCES/:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;mv ed-1.6.tar.gz ~/rpmbuild/SOURCES&lt;/em&gt;/&lt;/p&gt;
&lt;p&gt;Create an empty skeleton spec file:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;rpmdev-newspec ed-1.6&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;&lt;/code&gt;&lt;/em&gt;Then I edited the spec file using vi:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;vi ed-1.6.spec&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;After filling in all the required sections of the spec file I attempted to build the package by running:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;rpmbuild -ba ed-1.6.spec&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I got the following errors:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;error: Installed (but unpackaged) file(s) found:&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;   /usr/share/info/dir&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;   /usr/share/info/ed.info.gz&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;RPM build errors:&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;    Installed (but unpackaged) file(s) found:&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;   /usr/share/info/dir&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;   /usr/share/info/ed.info.gz&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I proceeded to browse on google for a solution and it didn’t take long before I came across a &lt;a href=&quot;http://www.cyberciti.biz/faq/rhel-centos-linuxrpmbuild-error-installed-but-unpackaged-files-found/&quot; target=&quot;_blank&quot; title=&quot;solution&quot;&gt;solution&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To fix this error I needed to specify the list of files that would be installed.&lt;/p&gt;
&lt;p&gt;I added this to the %files section of the spec file:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;%files&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;%doc README&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;%defattr(-,root,root,-)&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;%{_bindir}/*&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;%{_mandir}/man1/*&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;/usr/share/info/&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And finally! I got it to work.&lt;/p&gt;
&lt;p&gt;Run te rmplint command to check the spec file RPM and SRPM for Errors or warnings:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;em&gt;[root@mbustosroman SPECS]# rpmlint ed-1.6.spec&lt;br /&gt;
ed-1.6.spec:21: W: configure-without-libdir-spec&lt;br /&gt;
ed-1.6.spec:23: W: macro-in-comment %configure&lt;br /&gt;
ed-1.6.spec:7: W: mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 7)&lt;br /&gt;
0 packages and 1 specfiles checked; 0 errors, 3 warnings.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[root@mbustosroman SRPMS]# rpmlint ed-1.6-1.src.rpm&lt;br /&gt;
ed.src: I: enchant-dictionary-not-found en_US&lt;br /&gt;
ed.src: W: summary-not-capitalized C text-editor&lt;br /&gt;
ed.src: E: no-changelogname-tag&lt;br /&gt;
ed.src: W: invalid-license GNU&lt;br /&gt;
ed.src: E: invalid-spec-name&lt;br /&gt;
ed.src:21: W: configure-without-libdir-spec&lt;br /&gt;
ed.src:23: W: macro-in-comment %configure&lt;br /&gt;
ed.src:7: W: mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 7)&lt;br /&gt;
1 packages and 0 specfiles checked; 2 errors, 5 warnings.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[root@mbustosroman x86_64]# rpmlint ed-debuginfo-1.6-1.x86_64.rpm&lt;br /&gt;
ed-debuginfo.x86_64: I: enchant-dictionary-not-found en_US&lt;br /&gt;
ed-debuginfo.x86_64: E: no-changelogname-tag&lt;br /&gt;
ed-debuginfo.x86_64: W: invalid-license GNU&lt;br /&gt;
ed-debuginfo.x86_64: E: debuginfo-without-sources&lt;br /&gt;
1 packages and 0 specfiles checked; 2 errors, 1 warnings.&lt;/em&gt;&lt;/p&gt;&lt;em&gt;
&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;Even though I got the the rpm to build there are still some errors I have to fix. I found it extremely useful the rpmlint command tells you exactly what the error is, it is very straight forward. I think I’ve got a pretty good idea on how to fix the errors and will post one I am done. It is somehow 2am now! Will update this tomorrow.&lt;em&gt;&lt;br /&gt;
&lt;/em&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mariabustoss.wordpress.com/52/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mariabustoss.wordpress.com/52/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mariabustoss.wordpress.com&amp;amp;blog=31705256&amp;amp;post=52&amp;amp;subd=mariabustoss&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 06:35:40 +0000</pubDate>
</item>
<item>
	<title>Raymond Hung: Mouse Lock Tests Status</title>
	<guid isPermaLink="false">http://raymondhung.wordpress.com/?p=209</guid>
	<link>http://raymondhung.wordpress.com/2012/01/26/mouse-lock-tests-status/</link>
	<description>&lt;p&gt;It’s funny, if you were ask me 5 years ago, if I would associate legacy with something good or something bad, I would’ve definitely said good. Legacy… it SOUNDS good, prior to entering the world of programming much of my exposure to the word legacy were in the form of “so-and-so hero left a legacy” again, a good thing. So I was rudely introduced to the fact that often times in the programming world legacy can be equated to outdated and not-maintained.&lt;/p&gt;
&lt;p&gt;For all the great teaching and experience I get while studying at Seneca, most of the time, code is created from scratch. Due to this, our projects are almost always small scale assignments, even group projects are relatively small (until professional options anyway). The amount of exposure students get with regards to large code bases, or dealing with existing-but-buggy code is almost nil. Even for projects where the professor suggests sources for code we can use, much of the code is either in copy-and-paste condition or better code can be obtained through a web search where we can THEN copy and paste. Rarely do we have a chance to touch code where there’s not necessarily a “better” alternative and where we just have to buckle down and decode the program in front of us. So reworking some of these mouse lock tests became just that, of course much of it was my fault to begin with…&lt;/p&gt;
&lt;p&gt;I’ve done group work in programming classes and I’m tutoring at Seneca’s Learning Centre, so I’ve seen my fair share of coding differences. However, when I started to look over the tests again, wow. There’s a lot to be learned from reading other people’s code, and learn I did. Unfortunately the flip side was that there were a few tests that either tried to do the impossible or tried to do something but was unsuccessful. The problem was the amount of time it took to decode some of the tests that were written in order to determine if the tests needed to be changed, updated, or even removed. Luckily &lt;a href=&quot;http://steventseng.wordpress.com/&quot;&gt;Steven &lt;/a&gt;was there to help me and took a little over half of the tests that were peer reviewed to look over.&lt;/p&gt;
&lt;p&gt;In the end, I dealt with file_MouseEvents, file_defaultUnlock, test_mousePos, file_movementXY, file_targetOutOfFocus, test_MozPointerLock, file_limitlessScroll, and file_userPref.&lt;/p&gt;
&lt;p&gt;There’s no point talking about what changes happened to each individual file since most of the files were actually fairly simple fixes, they just needed minor updates to make sure that the tests worked with the new patch. However, because some of the original authors of the code are no longer working on this project, it’s important for us to understand what it does so when review comes (and we’ve been told to expect the worst), we can get it fixed ASAP.&lt;/p&gt;
&lt;p&gt;Looking back the past week at what I said, I underestimated both the amount of free time I would have, as well as how long it would take to fix these tests. The one test that gave me the most trouble was honestly my own, haha. file_MouseEvents.&lt;/p&gt;
&lt;p&gt;The main issue was that it was hanging for some, but not for others. As well, some people were having random success and failures. It took me three days and two full rewrites to figure out all the things I did wrong.&lt;/p&gt;
&lt;p&gt;During some of the edits I had made, I left some old pieces of code which in turn, caused the test to sometimes stall there until mochitests finally closed it for being open too long. That was problem one taken care off. As for the random success and failures, it took a while for to figure out, but in the end it wasn’t anything I could really do about it. When the test is run, the mouse cursor MUST be in the browser, otherwise, it won’t be able to do the proper synthesis, at least not on Windows. When I launch the test with the cursor hovering anywhere over the browser, the test will work as expected. Take it away and run it? A bunch of failed tests. That’s not really something I can control and fix, when running mochitests, ideally you’re not doing anything that can affect the browser doing its thing anyway.&lt;/p&gt;
&lt;p&gt;Finally I noticed a processleak. It was because of this that I had to do the two full rewrites, but every time I got the same thing.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://raymondhung.files.wordpress.com/2012/01/whatiget1.png&quot;&gt;&lt;img src=&quot;http://raymondhung.files.wordpress.com/2012/01/whatiget1.png?w=300&amp;amp;h=186&quot; title=&quot;whatiget&quot; height=&quot;186&quot; width=&quot;300&quot; alt=&quot;&quot; class=&quot;alignnone size-medium wp-image-210&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you see above, that’s a lot of leaking. I always thought it was my code, that something I coded caused this. After a bit of sleuthing, I found that by calling synthesizeMouse and passing in an event of type “mousedown” and with a button of “1″ (middle mouse button), mochitest would leak like this. I found another test_bug549170.html, I ran it, and got the similar results. It leaked like mine. This leak seems to only affect Windows machines because Steven, using linux, did not have the same leak issues. And really, I never heard anyone who was peer reviewing this test mentioning the leak (many of them used a linux box to do the builds and testing).&lt;/p&gt;
&lt;p&gt;In any case, the majority of the tests ARE done. Steven mentioned two tests that need to be taken care of. The first is one that will be merged with movementXY, and it deals with testing to make sure that the mouse can move more than 1 screen’s length and height once in mouse lock (it’s easy enough to test it out in real life though, just look at the demo pages haha). The next is do something similar to what I’ve done in file_MouseEvents. In file_MouseEvents, I have one outer div that holds a child div. Once mouse lock is set on the outer div, the child div should not get many of the mouse events. The case that is being sought is to have multiple children inside the outer/parent div. It should be fairly straightforward to rig up. =)&lt;/p&gt;
&lt;p&gt;I really need to get into the habit of blogging more often, or else I get these REALLY long pages of text.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/raymondhung.wordpress.com/209/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/raymondhung.wordpress.com/209/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=raymondhung.wordpress.com&amp;amp;blog=27064523&amp;amp;post=209&amp;amp;subd=raymondhung&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 06:34:46 +0000</pubDate>
</item>
<item>
	<title>Maria Bustos-Roman: Installing gzip – A data compression program</title>
	<guid isPermaLink="false">http://mariabustoss.wordpress.com/?p=36</guid>
	<link>http://mariabustoss.wordpress.com/2012/01/26/installing-gzip-a-data-compression-program/</link>
	<description>&lt;p&gt;This blog-post will be a guideline of my experience installing gzip. The original link for this software is &lt;a href=&quot;http://www.gnu.org/software/gzip/&quot; target=&quot;_blank&quot; title=&quot;gzip&quot;&gt;http://www.gnu.org/software/gzip/&lt;/a&gt; . This is a very popular compression program, its installation is also easy and does not take too long to install.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download and Extract&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;To Download the program go to the following link:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://ftp.gnu.org/gnu/gzip/&quot; target=&quot;_blank&quot; title=&quot;gnu/gzip&quot;&gt;Download http://ftp.gnu.org/gnu/gzip/&lt;/a&gt; and click on one of the latest modified tar balls.&lt;/p&gt;
&lt;p&gt;Extract the file with the following command:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;tar xzvf gzip-1.4.tar.gz&lt;br /&gt;
&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Move into the newly created directory ed-1.6:&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;cd gzip-1.4/&lt;br /&gt;
&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now you need to find a script that runs the build of the program, more often then not it will be this:&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;./configure&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When successful, run:&lt;br /&gt;
&lt;em&gt;make&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;followed by :&lt;br /&gt;
&lt;em&gt;make install&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To check the time it took the command to execute we type:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;time make&lt;br /&gt;
&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;real    0m2.213s&lt;br /&gt;
user    0m0.316s&lt;br /&gt;
sys    0m0.955s&lt;/p&gt;
&lt;p&gt;If done correctly the software should have now been succesfully installed and ready to run.&lt;/p&gt;
&lt;p&gt;Here is a quick example that might be useful…&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://mariabustoss.files.wordpress.com/2012/01/screenshot-at-2012-01-25-1932122.png&quot;&gt;&lt;img src=&quot;http://mariabustoss.files.wordpress.com/2012/01/screenshot-at-2012-01-25-1932122.png?w=575&amp;amp;h=175&quot; title=&quot;Example&quot; height=&quot;175&quot; width=&quot;575&quot; alt=&quot;&quot; class=&quot;alignleft size-full wp-image-42&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use the command &lt;em&gt;gzip &lt;/em&gt;followed by the file(s) name to compress. Notice the decrease in size of the file after compression.&lt;/p&gt;
&lt;p&gt;To decompress just use gunzip instead. Go to the gzip man page for more information on additional options.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mariabustoss.wordpress.com/36/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mariabustoss.wordpress.com/36/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mariabustoss.wordpress.com&amp;amp;blog=31705256&amp;amp;post=36&amp;amp;subd=mariabustoss&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 26 Jan 2012 00:59:57 +0000</pubDate>
</item>
<item>
	<title>Maria Bustos-Roman: Install Ed – A line oriented text editor</title>
	<guid isPermaLink="false">http://mariabustoss.wordpress.com/?p=29</guid>
	<link>http://mariabustoss.wordpress.com/2012/01/25/install-ed-a-line-oriented-text-editor/</link>
	<description>&lt;p&gt;This blog-post will be a guideline with my experience in installing ed. The original link for this software is &lt;a href=&quot;http://www.gnu.org/software/ed/&quot; target=&quot;_blank&quot; title=&quot;software/ed&quot;&gt;http://www.gnu.org/software/ed/ &lt;/a&gt;. The installation didn’t take very long and is fairly easy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download and Extract&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To download the program go to the following link:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://ftpmirror.gnu.org/ed/&quot;&gt;Download http://ftpmirror.gnu.org/ed/&lt;/a&gt; and click on one of the latest modified tar balls.&lt;/p&gt;
&lt;p&gt;Extract the file with the following command:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;tar xzvf ed-1.6.tar.gz&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Move into the newly created directory ed-1.6:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;cd ed-1.6/&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now you need to find a script that runs the build of the program, more often then not it will be this:&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;./configure&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When successful, run:&lt;br /&gt;
&lt;em&gt;make&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;followed by :&lt;br /&gt;
&lt;em&gt;make install&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To check the time it took to execute we use:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;time make&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;real    0m4.223s&lt;br /&gt;
user    0m3.422s&lt;br /&gt;
sys    0m0.523s&lt;/p&gt;
&lt;p&gt;If done correctly the software should have now been succesfully installed and ready to run. Go to the ed man page for more information on how to use!&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/mariabustoss.wordpress.com/29/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/mariabustoss.wordpress.com/29/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=mariabustoss.wordpress.com&amp;amp;blog=31705256&amp;amp;post=29&amp;amp;subd=mariabustoss&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Wed, 25 Jan 2012 23:25:03 +0000</pubDate>
</item>
<item>
	<title>Andor Salga (asalga): No Comply Game Prototype with Processing</title>
	<guid isPermaLink="false">http://asalga.wordpress.com/?p=2655</guid>
	<link>http://asalga.wordpress.com/2012/01/25/no-comply-game-prototype-with-processing/</link>
	<description>&lt;p&gt;Last week I met with &lt;a href=&quot;http://vocamus.net/dave/&quot;&gt;Dave Humphrey&lt;/a&gt; and &lt;a href=&quot;http://jbuckley.ca/&quot;&gt;Jon Buckley&lt;/a&gt; to discuss creating a game for the &lt;a href=&quot;https://wiki.mozilla.org/HTML5_Games/Work_Week&quot;&gt;HTML5 games week&lt;/a&gt; which will take place at Mozilla’s Toronto office in mid-February. The main purpose of this is to drive the development and showcase the &lt;a href=&quot;https://github.com/alankligman/gladius&quot;&gt;Gladius&lt;/a&gt; game engine.&lt;/p&gt;
&lt;p&gt;At the end of the meeting we decided it would make the most sense to upgrade the &lt;a href=&quot;https://developer.mozilla.org/en-US/demos/detail/no-comply/launch&quot;&gt;No Comply demo&lt;/a&gt; by adding interaction—making a small game. Since we only have a few weeks, we decided to keep it simple. Keeping that in mind I created a game &lt;a href=&quot;http://etherpad.mozilla.org/CjTStOjUgj&quot;&gt;specification&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Play Analysis&lt;/h2&gt;
&lt;p&gt;After putting together the spec, I started on a prototype. I began the prototype by playing and analyzing the game mechanics of Mortal Kombat I. The game is simple enough to emulate given the time frame. I took some notes and concluded characters always appear to be in discrete states. If characters are in a particular state, they may or may not be able to transition into another state. Initially a player is idle. From there, they can transition into a jumping. Once jumping they cannot block, but are allowed to punch an kick. Having understood the basic rules, I drew a diagram to visually represent some states.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://asalga.files.wordpress.com/2012/01/fighting-game-states4.png&quot;&gt;&lt;img src=&quot;http://asalga.files.wordpress.com/2012/01/fighting-game-states4.png?w=460&amp;amp;h=313&quot; title=&quot;fighting game states&quot; height=&quot;313&quot; width=&quot;460&quot; alt=&quot;&quot; class=&quot;alignnone size-full wp-image-2663&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The diagram led me to believe I could use the &lt;a href=&quot;http://en.wikipedia.org/wiki/State_pattern&quot;&gt;state pattern&lt;/a&gt; to keep the game extensible. We can get a basic game working and the design should lend itself to later (painless) modification. &lt;/p&gt;
&lt;h2&gt;Prototyping the Prototype&lt;/h2&gt;
&lt;p&gt;Having worked with &lt;a href=&quot;http://processing.org&quot;&gt;Processing&lt;/a&gt; for some time I knew it would be an ideal tool to construct a prototype of the game. Processing enables developers to get graphical interactive software up and running quickly and easily. The structure is elegant and the language inherits Java’s simple object-oriented syntax.&lt;/p&gt;
&lt;p&gt;I began creating a Processing sketch by adding the necessary classes for player states such as moving, jumping and punching. I hooked in keyboard input to allow changing states and rendered text to indicate the current state. I was able to fix most of the bugs by playing around with different key combinations and just looking at the text output.&lt;/p&gt;
&lt;p&gt;I eventually added graphical content, but intentionally kept it crappy. I resisted the urge to create attractive assets since they would be replaced with the No Comply sprites anyway. Neglecting the aesthetics was a challenge—if you cringe at the graphics, I succeeded.&lt;/p&gt;
&lt;p&gt;Okay, still &lt;a href=&quot;http://142.204.133.22/~asalga/NoComplyProto/&quot;&gt;want to play it&lt;/a&gt;?&lt;br /&gt;
&lt;a href=&quot;http://142.204.133.22/~asalga/NoComplyProto/&quot;&gt;&lt;img src=&quot;http://asalga.files.wordpress.com/2012/01/processing-game-prototype.jpg?w=460&quot; alt=&quot;&quot; class=&quot;alignnone size-full wp-image-2671&quot; title=&quot;Processing game prototype&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Next Steps&lt;/h2&gt;
&lt;p&gt;I omitted collision detection and some simple game logic from the prototype, but I believe it demonstrates we can create a structure good enough for a fighting game for Gladius. Today I’ll be switching gears and starting to hack on Gladius to get COLLADA importing working which we’ll discuss in a Paladin meeting early next week.&lt;/p&gt;
&lt;br /&gt;Filed under: &lt;a href=&quot;http://asalga.wordpress.com/category/game-development/&quot;&gt;Game Development&lt;/a&gt;, &lt;a href=&quot;http://asalga.wordpress.com/category/gladius/&quot;&gt;Gladius&lt;/a&gt;, &lt;a href=&quot;http://asalga.wordpress.com/category/open-source/&quot;&gt;Open Source&lt;/a&gt;, &lt;a href=&quot;http://asalga.wordpress.com/category/programming/processing/&quot;&gt;Processing&lt;/a&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/asalga.wordpress.com/2655/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/asalga.wordpress.com/2655/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=asalga.wordpress.com&amp;amp;blog=9424798&amp;amp;post=2655&amp;amp;subd=asalga&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Wed, 25 Jan 2012 21:10:37 +0000</pubDate>
</item>

</channel>
</rss>

