Chromium easy update

Posted in Uncategorized on September 28th, 2010 by Rugmonster – Be the first to comment

Update: The URL’s no longer work, so this is busted. I’ve gone back to Firefox since 4.0 came out. It is heavier than Chrom(e|ium), but I was finding that there were some features I was really missing. As such, this still can serve as the basis for an update if given the correct URL’s.

I’m a bleeding edge kind of guy. No, I’m not. When it comes to software, I’m generally a bleeding edge kind of guy. I really like Chromium. I hate going to the Chromium build site, downloading it, closing my browser, then moving it in place. I’m a lazy admin.

Here’s a couple quick-n-dirty bash script that retrieves the latest Chromium build.

Mac Version

Special Notes:

  • Ensure Chromium is not running when you run this or it will not work out as planned (open files)
  • Assumes that Chromium is installed in /Applications, not /Users/user/Applications

  • #!/bin/bash
    echo -n "Retrieving latest build: "
    VER=$( curl -s http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac/LATEST )
    echo "$VER"  
     
    TMPDIR=$( mktemp -d /tmp/chromium.XXXXX )  
     
    echo "Downloading Chromium: "
    curl -o ${TMPDIR}/chromium.zip http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac/${VER}/chrome-mac.zip  
     
    echo -n "Decompressing archive: "  
    unzip -qqx ${TMPDIR}/chromium -d ${TMPDIR}  
    echo "done"  
     
    rm -rf /Applications/Chromium.app  
    mv ${TMPDIR}/chrome-mac/Chromium.app /Applications/  
     
    rm -rf ${TMPDIR}  
    echo "New Chromium installed!"

    Linux Version

    Special Notes:

  • Requires 7zip to be installed
  • Assumes that Chromium is installed in /opt
  • I have a group named “opt”, to which my user belongs, that has write access to /opt
  • I have /opt/bin, which is in my $PATH, that has a symlink for “chrome” pointed to /opt/chrome-linux/chrome

  • #!/bin/bash
    echo -n "Retrieving latest build: "
    VER=$( curl -s http://build.chromium.org/f/chromium/snapshots/chromium-rel-linux-64/LATEST )
    echo "$VER"  
     
    TMPDIR=$( mktemp -d /tmp/chromium.XXXXX )  
     
    echo "Downloading Chromium: "
    curl -o ${TMPDIR}/chrome-linux.zip http://build.chromium.org/f/chromium/snapshots/chromium-rel-linux-64/${VER}/chrome-linux.zip  
     
    echo -n "Decompressing archive: "  
    7z x -tzip -o${TMPDIR} ${TMPDIR}/chrome-linux.zip > /dev/null
    echo "done"  
     
    if [ -d /opt/chrome-linux.1 ]
    then
            rm -rf /opt/chrome-linux.1
    fi
     
    if [ -d /opt/chrome-linux ]
    then
            mv /opt/chrome-linux /opt/chrome-linux.1 
    fi
     
    mv ${TMPDIR}/chrome-linux /opt/ 
    find /opt/chrome-linux -type d -exec chmod 2775 {} \;
    find /opt/chrome-linux -type f -perm /100 -exec chmod 775 {} \;
    find /opt/chrome-linux -type f ! -perm /100 -exec chmod 664 {} \;
    chgrp -R opt /opt/chrome-linux
     
    rm -rf ${TMPDIR}  
    echo "New Chromium installed!"

    Enjoy!

    8 Nov 2010: Updated to match new URLs being used

    MacPorts “PortIndex file may be corrupt” Resolution

    Posted in Uncategorized on May 29th, 2010 by Rugmonster – Be the first to comment

    In the past few months, I moved to a Mac, which has been great. Shortly after switching, I found MacPorts, which has also been great. The other day, however, when doing an upgrade, I got the following warning over and over and my upgrade wouldn’t complete:

    Warning: It looks like your PortIndex file for rsync://rsync.macports.org/release/ports/ may be corrupt.

    I couldn’t find a clear answer on what was going on, until I found a bug report on the MacPorts site. The fix for this will be put into MacPorts 1.9.0, but I’m on 1.8.2 now, so that doesn’t help much.

    The issue sounds like it has to do with a cache of the PortIndex can build up stale information. My brute force resolution was to remove that cache. I wasn’t terribly sure where that was, but I did find it.

    $ locate PortIndex.quick
    /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex.quick
    $ sudo rm /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex.quick

    Alternatively, you could move the file out of the way if that makes you more comfortable.

    Once that was done, I went ahead and gave it try.

    $ sudo port sync
    Warning: No quick index file found, attempting to generate one for source: rsync://rsync.macports.org/release/ports/
    $ sudo port upgrade outdated
    ...

    All worked as it should! So until we see MacPorts 1.9.0, this will be my solution should I see this come up again.

    My address IS valid, Facebook!

    Posted in Mail, Postfix on May 4th, 2010 by Rugmonster – 1 Comment

    If you happened to have seen my previous post, Blocking spammers with Postfix alone, you saw that I use SpamCop for one of my RBLs. It’s worked great for years. My whole setup has worked great for over a year now with very minimal changes. Imagine my confusion when Facebook told me to that my email address was detected as no longer valid.

    Facebook Fail

    What?!

    So I dug in my mail server’s logs and found that SpamCop had listed some of the Facebook mail servers on their DNS Blacklist.

    read more »

    iPhone’s mail.app and IMAP folders

    Posted in Apple, iPhone, Mail, Postfix on March 11th, 2010 by Rugmonster – 1 Comment
    IMAP Folders Example

    My IMAP Folders

    I use IMAP folders combined with fairly extensive Sieve rules to sort my incoming mail into the appropriate folders. This works great for me, because my Facebook notifications go to “Websites”, bill notifications go into “Bills”. It makes it easy for me to find what I’m looking for without having to sort through a single, massive Inbox.

    When I got my iPhone, I was very disappointed in its handling of folders. It simply lacks the ability to check all folders for new mail. I didn’t want to have to click through each folder to see if I got new mail in one of them. I wanted to be able to see my little mail badge with the number of new messages I had, when I got a new message, no matter what folder it happened to reside in. I thought of various solutions, such as writing a server-side IMAP proxy that would do the checking for me and present a virtual mailbox of only new messages. While it may have been a fun project, a friend pointed out a more obvious solution: setup a second mailbox and have all of my mail forwarded to it. Here are the details of what I setup.
    read more »

    Simple activity report from FTP xferlog

    Posted in Linux on January 27th, 2010 by Rugmonster – Be the first to comment

    UPDATE: I found that what I originally posted was wrong and didn’t work at all. I don’t know how I managed to do that, but I’ve fixed it and it’s verified as working now.

    I was asked if there was a way to extract the FTP activity to be emailed to someone. The server had a typical xferlog, but the box was being used for shared hosting and the reports didn’t need to include results for all of the other sites.

    I put together the following script to extract the activity and transpose it to a more friendlier output. read more »