Introducing ‘rhcpdl’ project

I’ve been a Red Hat customer for over a decade now.  One of the things that has been a common work flow for me is the download of the ISOs from Red Hat’s web site (Previously through RHN, now Customer Portal). Because I usually store these on a central machine that is not my desktop, I often just copy the download URL, and wget it from my storage server’s cli. With the changes introduced by the new Customer Portal the URLs have changed in such a way that this process is much more difficult, although still do able. I complained through the support channel, and after >6m of waiting finally got back a response stating that this is not something they are interested in fixing. I have a hard time believing myself and a few others I know are the only ones affected by this so I have begun a protest of the process.  I’m also pretty sure that the only people this affects are the paying customers.

But in the nature of our community and open source my protest is not just a bunch of whining (although one could consider the explanation of the background for my protest whining, but take it as you will), but an actually attempt to “fix” the issue.

Step 1: I wrote and published a utility (rhcpdl) that effectively restores this functionality
Step 2: Attempt to get people to use/back that project so that maybe RH will realize they need to fix the issue

You can get more information from the project page at There is also RPMs for RHEL5 and 6, and a SRPM available for download.

Remember, the goal of this project is obsolescence :)

Global Variables and Namespaces in python

Recently I had someone come ask me for a bit more information about working with global variables. For those new to python, this might be something helpful, so I figured I’d share.   Personally, for ease of reference, I specify my global variables names in ALLUPPERCASE. This helps distinguish them since I use that naming standard nowhere else in my code.

In a python application you have multiple namespaces. Each namespace is intended to be completely isolated, so you can use the same name in multiple namespaces without conflict. The global namespace is the only one where this does not hold strictly true.  If the below is not enough, a good and more in depth explanation is available here: A guide to Python Namespaces.

A global variable can be called from inside any namespace, but without a special call any changes stay inside that local namespace. If you state inside your function/class/whatever that you are using the global variable as a global, then you changes take place in the global name space.

Here is some sample code that show this in action:

call to software vendors… package it right

One of the tasks that I have been responsible for performing over the last several years is packaging software into RPM Package Manager (RPM) packages.  All of our internal RPMs are fairly simple, the tricky part is the 3rd party software.  There are several problems with the distribution of commercial off the shelf (COTS) software in the Linux ecosystem.

  • They are rarely RPMs
  • Sometimes they use InstallAnywhere installers (more on that later)
  • When they are RPMs they either think they know better than RPM (can be explained as a lack of understanding as well) or they try too hard to make a single RPM that works on all RPM-based distributions.

Before I go further I would like to say, if you are packaging your software as a real RPM (or any other native Linux packaging system), even if it is not perfect, THANK YOU. We appreciate it.  Please take my commentary as constructive criticism.  I am not angry with you, and will gladly help you with packaging issues if I can.  I am not the best either, but I have a fair bit of practice.  I am sure others would gladly assist as well.

Moving on… So today I got stuck attempting to automate the installation and configuration of some of unnamed vendor’s system management RPMs via puppet.  I made the mistake of looking into the scriptlets and was frustrated by some of their practices.  I started to write a package by package evaluation of the scriptlets, but one package in particular would have taken forever (it attempted to cover every possible RPM-based Linux distribution via the scriptlets).  I recalled a conversation I had a year or two ago with the individual who heads up this company’s Linux packaging group, and they had expressed interest in feedback.  At the time I had a few points to provide, but I did not have time for a more in depth analysis.  So I decided to finally write up a general set of bullet points to pass their way, if I am not trying to help then I am part of the problem, right?.  I figured it would not hurt to put it out here as well.  So I am re-wording a touch to make it less specific to just them, and more of a general call to all software vendors.  Also, I would imaging most of what is stated directly translates to Debian, conary, and other native packaging systems; but it is not intended to be a definitive guide.

Things to keep in mind when packaging software for native Linux distribution:

  • It helps to build (compile) your software from source using the packaging tools (RPM), instead of just packaging up the binaries.  You do not have to distribute the source (SRPM, tarball, etc), but the build process can potentially be cleaner and more manageable.  Yes, I know you paid all kinds of money for some fancy handle everything build system.  Are your customers (the system administrators) happy with the output?  I know I am not.
  • With the modern build processes and systems available there really is no good reason to build a mangled cluster of scripts that attempt to make one platform independent RPM instead of building distribution specific RPMs.  They can even still come from the same consolidate spec files, thus allowing you to reduce duplicate work.
  • Scriptlets
    • Should be short and concise
    • Almost the entire build and installation of the software should occur in the %build and %install sections, respectively.
    • Any setup or file layout should be handled in %build and %install sections, if its host specific it should be a documented post-install exercise for the admin.
    • User/group creation, symlinking files, chkconfig and service commands are all acceptable.
    • Should never touch a file owned by another package.  If it needs a setting or switch flipped, document it for the administrator. At worst, include a “check” or “setup” script that the administrator can run manually if they want you to do the work for them, cause the majority of us don’t.
  • Files should only be placed on the system via RPM’s built in methods.
    • Symlinks can be a caveat of this, but should not be abused. UPDATE 2014.03.19 – Retracting since I just built a package that managed symlinks right. No excuses. :)
    • File ownership and permissions should be set by the RPM, not in the scriptlets.
    • Do not provide library files that the OS already provides.  Get past the “i need this specific version, and no other will do” or “well we used that one but slightly modified” mentality, and when you can’t, then require the correct compatible library.  Most distributions do provide them already.  If you needed to modify it, are you properly following the licensing? Wouldn’t it be better to just submit a patch and stop having to maintain it and not worry about licensing issues?
  • You should not be adjusting security settings on the system for the administrator, you can provide them (i.e. SELinux policy files, default firewall rules, a file for /etc/sudoers.d/, etc), but implementing them for me is bad security at its worst.
  • If you provide an SELinux policy that does not change any existing policies on the system directly, you can implement that.  But if you change something existing, let us do the work so that we are aware.
  • Do not flip SELinux booleans related to other bits, let the admin or find the right way.
  • Get help… it is out there.  There is selinux mailing lists, and ya know what? Call Red Hat.  They helped get SELinux going, they know what to do.  You are not in charge of my system’s security, I am.  If you need a change to an existing policy, talk to that policy’s maintainer or implement it in your own policy.
  • Users and groups – for the most part this hasn’t looked bad except:
    • Deleting and re-creating a user is a annoying thing to do.  If the admin changed something about the user and everything still functions, don’t touch it.  If I need to fix it I can delete the user myself and then let you create it by re-installing, or just look at your newly clean scriptlets to discover the exact syntax.
    • Technically, you should not be deleting any user you create on the system… another exercise for the admin to avoid stranded files.
  • If your company decides not to supply good RPMs, consider a tarball(s) with an simple install script, we can do the rest.  I was avoiding naming names, and I hate to give this software credit, but IBM’s DB2 has got to be the easiest 3rd Party software I have ever packaged and deserves credit for the fact that there was just a bunch of tarballs and a few commands to install.  Setup was another matter. heh.

To summarize, write the RPMs according to a public packaging guideline, such as the Fedora Packaging Guidelines.  If Fedora would accept it into the EPEL repositories then you have succeeded.  I realize you want your packages to support other distributions, but odds are that if the spec file for the RPMs are cleaned up to meet Fedora’s guidelines, the other distributions should be easy to support, and us administrators would be ecstatic.  Plus the use of tools like mock, koji, OpenSuSE Build Service, etc can greatly ease build and distribution issues.

Since I already named one name, might as well point out a negative one.  Flexera’s InstallAnywhere… So InstallAnywhere is a universal installer with an interesting feature.  Their site claims: “Install native packages, such as RPM, on Linux, Solaris, and HP-UX“.  This is inaccurate, at least towards RPM.  What they produce is a Java-based installer that injects RPM metadata into your system’s RPM database.  This is not an RPM.  We can not distribute this software via Yum or Spacewalk or Red Hat Network Satellite.  They should be ashamed. :(

So some useful reading:

UPDATE: Some basic grammar fixes. 2011.10.19

cobbler webUI cleanup

Related threads:

I’ve been pushing get get cobbler implemented as part of our build infrastructure at work, and there have been very small little bits about the web interface that I’d like to see improved.  After a few conversations with James Cammarata and throwing together a few mockups I decided to site down start working on the change.

I’ve thrown up a github repo for the changes so people can follow along.   At some point I’m going to write up a bit detailing the thoughts behind some of the changes.

getting func-y

So it happened.  What you ask?  A very long anticipated release.  Gnome 3! Wait, no… well, yes, Gnome 3 was released, and is kinda kewl and you can try it.  I’m not totally sold on it yet though, maybe I’ll review it sometime or another. Oh wait, what was I talking about? Yes! The much anticipated release! It was not Gnome 3… it was Func and Certmaster!  They have officially reached 0.28.  Ya.. not as fancy of a version number as 3, but.. hey it gives us something to aspire to.  The releases will be making their way into EPEL-testing soon, but can currently be downloaded in tarball form or from koji.[1]

What are Func and Certmaster? Hrm.. well… so basically they are a set of programs that work together to let a administrator tell N number of servers what to do at the same time, and it will give back a report of what happened.  That is the 30,000 ft view.  Up close and personal, well… its a programmatic systems management tool that allows you to perform actions across large numbers of systems in an orderly fashion that allows great extensibility and control; which also exposes the basic functionality via a cli so that you can run quick one liners without to much effort.  Loose anyone there?  Don’t worry, I loose my self trying to follow the code in these programs some times, that’s all part of the learning process.

Why do I suddenly care?  Well, its not suddenly really.  I’ve been following func for a very long time.  I’m not sure if I heard about it before the 2008 Red Hat Summit or not, but it was sometime around there.  Its a very useful and wonderful tool, and due to my semi-regular use of it I had started sending bug requests reports and patches to the mailing list.  Recently, I was asked if I was willing to channel some of that energy into helping develop func and certmaster directly.  I was very happy to accept, if a bit trepidatious.  After several weeks of learning git and my way around some of the code, I was happy to help Seth Vidal (the primary maintainer) get func and certmaster ready for a new release.

We’ve still got lots of work on our plate, but its been a very useful experience for me, and i’m glad to contribute back to an open source project so directly for once.

[1] Certmaster on RHEL 5 does require a patched, non-supported pyOpenSSL package until RHEL 5.7 is released.  See the release announce thread for more information.


Several years ago I was introduced to an acronym at work, not because I performed one, but because the concept came up in conversation.  A CLE is a Career Limiting Event, and there are quite a few things that one could classify as such.  Things such as shutting down a primary server or network device in the middle of the day without verifying that your change works, calling an executive of your company drunk and bitching them out, or deleting a very important file or database table (payroll?).  Most of these are more specifically going to limit your career at a specific company.  You clean up and move on.  Now consider you are a the new CEO of a very public world wide company, and you decide throw away billions of dollars of work and planning (all be it very slowly implemented planning) away and partner with a company to utilize their lackluster OS[1].  What happens if you destroy that company?  We’ve all heard about the lovely golden parachutes, but, if you were a Board of Directors for a corporation, would you hire someone that took a stumbling, but still massive company, and single handedly turned it away from possible success and ground it dust? Sadly, someone probably will.  However, one has to wonder how the current board of Nokia is taking the fact that so far their stock has dropped over 15%[2] since they announced the plan this morning.

This entry was brought to you by the bi-line of an InfoWorld article:

In turning to Windows Phone 7, Nokia’s new Microsoft-derived CEO has made what is sure to be a company-killing move

[1] I made a point of playing with WP7 this morning at the AT&T store.  Its not bad as far as an interface goes, however I could definitely see myself becoming frustrated with its responsiveness (which I’d assume is programmed in, so you can see the fancy effects). Couple that with the missing IPSEC VPN support, lack of multitasking, lack of copy&paste, and it doesn’t appear to have good Notes integration yet.  While the last is a show stopper for me and possible even just a select few others, the rest are things that are likely a show stopper for many.  The key thing to remember is also that Symbian already has all of those features!

[2] UPDATE: just about 30 hours after the announcement their stock is on its way to becoming their 1 year low.  Wednesday they were selling just over 15 points a share, today is in the 9s.

the begining of the end for meego and nokia?

So the rumors have come to a climax this morning as over in merry ole England  ex-MS-exec/CEO of Nokia has announced that Nokia will be moving their smartphone focus to Windows Phone 7 (WP7).  QT is no longer the development platform, the one that “cuts development time by nearly 50%” or that “94% report..meets or exceeds their development expectations” and was intended to allow you to “write code once to target multiple platforms” (all quotes from the pages).

I’ve commented on this blog before about what I wanted to see from Nokia, even specifically this weekend, obviously I did not hear what I wanted to.  My first several phones were Nokias, the good old original 5xxx and 6xxx series, which were great workhorses and where the phones of choice at the time.  I have drooled after Communicators since Val Kilmer used one in The Saint when I was in high school.  My lust for the Communicators was never fulfilled as they were out of my price range and hard to find State-side, and so for the sake of my wallet and acquiring a flip phone I moved over to Motorola with their StarTAC and v6x series devices.  As the years progressed I saw the rise of the HTC WinMo 5 phones (specifically the HTC Wizard in its form of the Cingular 8125), and in it saw a phone that could meet my mobile access needs in a professional sense (internet access with a mobile ssh terminal).  I made the switch, and thoroughly enjoyed having the internet more truly at my fingertips, at least as far as 2005 was concerned.   Two years later I left the job that supplied this phone and went back to my strictly feature phone personal device. Or should I say I went to several feature phones… Sony Ericsson, Samsung, Motorola, LG, they were all meh, although my Samsung SLM lasted me the longest.  I was not overly impressed by any of the devices, but they met the basic need of calls and texting.  I’m not sure if you’ve noticed yet, but I’m a bit of a dork, and gadget freak, so I will gladly tell you that over the years I never stopped watching Nokia and Sony Ericsson’s high end Symbian phones, wishing and hoping that there would be a readily available Cingular/AT&T compatible device that I could get my hands on.  Then in late 2007 I heard about an announcement from Nokia, they would be shipping a sleek and sexy followup device the the Nokia N800.  No, it wasn’t a phone, but it was so much more!  It was my beloved Linux platform in the palm of my hands, it was high resolution (for its size) real web browsing, with a hardware keyboard! (I’ve mentioned before my distaste for touchscreen keyboards haven’t I?).  I was excited to say the least, and bought one within the first few months after it’s release.  I lugged it around for 2 years along side first my Samsung SLM, then a Nokia N75 I bought used off a friend.  But then, my Nokia N75 died, and under AT&T’s insurance program it was replaced by the Nokia E71x, which I use to this day.

But I get ahead of myself.  I just glossed over the acquisition of a Nokia N75.  Ah, the N75.  My first quasi-high-end Nokia phone.  Was it perfect? Not really, but oh how it enlightened me to the true wonder of Symbian.  It actually did things I as a user had been wanting my phones to do for years.  Very good contact management being towards the top of the list, and it allowed me to begin utilizing Google’s exchange services to sync my contacts and calendar.  Finally, no need to have MS-Windows to have good device syncronization, which was a problem as I rarely have a running Windows machine.  It was a great experience, and along with the N810 drew my attention back to be focused very tightly on Nokia’s product portfolio.

When AT&T replace the N75 with an E71x, sadly my N810 lost some relevance.  I was no longer using my N810 to access my e-mail with a QWERTY keyboard, nor did I have much that I needed to SSH on the go anymore as my job duties had adjusted.  Sadly, the device started to collect dust on my nightstand.  One of my close friends had purchased an N810 after utilizing mine, and had it die on him about a almost a year ago, so I gifted the device to a better home.  All this time I’ve been waiting and hoping for new devices to come out that fit my requirements (see my 2011 CES wishlist).

So… back to Nokia’s announcements today:

Honestly, I’m disappointed.  I’m running out of time so I’ll leave you with this:

Nokia was still the smartphone market leader world wide according to Gartner.  Which means that if they could fix themselves now, they have a jump start.  Nokia’s problem (in Elop’s own view) was being to slow to execute.  Instead of re-organizing and cleaning up their internal processes and pushing quality products to market sooner, they are effectively abandoning all of that work (saying you are going to sell more of things you aren’t going to keep producing is not exactly going to instill confidence in buyers), and jumping ship to let another company control their destiny, or at the very least steal their hard work (which we all know Microsoft is not above doing).  Its a sad day for Nokia’s user base.  One can only hope that someone takes up where Nokia left off and brings forth MeeGo to the masses.

So yes, for the sake of this discussion I was a Nokia fanboy.  I still hold that if anyone can meet my phone needs I will go to them, and I hope someone else does, because Nokia has decided not to.  I may, and I am still not sure how I feel about this, buy a Nokia E7 anyways, or possibly even the E6 that was leaked earlier this week.  The screen is a bit small, but its not a necessarily far off of what I want.  Its not like AT&T ever let my Nokia phones get software updates anyways, so I guess it doesn’t matter if Nokia stops supporting the software.  And at the very least by buying a Nokia device that isn’t a WP7 device, I can contribute to the numbers against WP7.  Petty I guess, but its not like Elop reading this post would change anything.

Ahh well.. off to work for me.

CES fail

I was right, this did turn out to be a much more interesting CES than the year I went.  However, from the posts I’ve read I fear I was also right in that it was only more interesting because I don’t stay up on all the latest hype anymore.  Most of the kewl products I heard about appear to have been leaked months ago.  Ahh well, c’est la vie.

I do have to give Motorola credit, their Atrix 4G with laptop dock for at&t’s network.  I’m not in the school of thought that accepts HSPA+ as 4G, but otherwise this is the most enticing Android phone I’ve personally seen on the market.  I haven’t been a fan of Motorola’ mobile space in a while, and their first series of Android phones for at&t were just.. depressing. Never one to be fully satisfied, I still want a hardware keyboard and MeeGo.

Speaking of Meego, where was it?  From all I can tell there was a tablet and a netbook at Intel’s booth showing it off.  Where was Nokia? Apparently they turned into a news media organization rather than show their wares.  They did have Dolby showing off the N8.  NAVTEQ (the navigation company they purchased) and Qt (the graphical development environment for Symbian^3+ and MeeGo) both had booths.  Nokia was also part of the AT&T Developer summit.  But alas.  No new phones…

But wait?  What’s this?  Apparently there are some rumors about the fabled N9 device. With fingers crossed they will supposedly be announcing the N9, X7, and the unknown to me E6-00 device.  That’s 6 weeks away… and then who knows how long till release.  Hopefully my battered and bruised e71x can last.

my 2011 CES wishlist

Here goes, my first real entry to this failed experiment of a blog.  Wish me luck.

Back in 2007 I was fortunate enough to attend CES and was a heck of a trip. It was awesome to get to visit all of those manufacturer’s booths, and the most awesome thing I witnessed was a transparently cased homagé to Zero Cool’s present from The Plague in the movie Hackers. They had a rare lab prototype of the Toshiba Protégé R400.

However, I am left feeling as if I picked a very anti-climatic year to go. Maybe I was staying current on all of the kewl new toys back then, who knows. This year however, I’m holding out luck that Nokia (preferably) or some other MID/tablet/UMPC/whatever manufacturer is going to make my day.  For several months now there has been minimal actual news about Nokia’s next Linux powered device.  The much anticipated MeeGo device was due out last quarter 2010, but like many Nokia products these days, was delayed until 2011.  The MeeGo conference came and went, so that leave CES and CTIA Wireless as the best bets for news on possible MeeGo devices.

I’ll try not to go off track too much, but this is one of the annoying things about the current tablet craze.  Nokia has been doing this for years, and has been very popular in the geek market for it.  They had a large, touch screen tablet on the market 2 years before Apple, the Nokia N770.  But over the last year have been off and on about making a non-phone tablet device.  I get that some people want their internet access integrated.  Personally, I want to pay for it once, not per device.  Bluetooth pairing with a cellphone should be the standard, not the carrier-profiting-bill-per-device-cellular-data-plans.

But I digress, back to the wish list.  I have two items I would like Nokia to make, but the first I would accept from almost any quality manufacturer.  First, I would like to see a non-cellular device running MeeGo with hardware similar to the Samsung Epic 4G.  Slide out hardware keyboards for the win!  This does bring me to a side-request, please Nokia!, don’t settle for a 360×640 pixel resolution on this high end N-Series device like the E7 and the N8.  If you make my dream device or just the N9, either way please do the screen some justice.  The N8xx and N900 both had 800×480 resolutions.  Unfortunately, I am a part of supposed minority of people that do not want the N9 to be a phone.  One of my favorite devices of all time was the Nokia N810, which when paired with a 3G capable feature phone was a brilliant combination.  I’m comfortable with carrying two devices, and felt that the size of the N810 was very comfortable in my pocket.  Interestingly enough the Nokia N810, Nokia’s 3rd Internet tablet, was released only 6 months after the original iPhone, but its sister device the N800 was released 6 months before the iPhone/iTouch.

The next item I would like would be a lower end Nokia E-Series device running Symbian^3.  What I’m thinking of would likely fit as a great E3-xx device,  effectively positioned as the E-Series version of Nokia’s Touch and Type devices, the X3-02 and C3-01.  What I like about this device concept is the simplicity of a T9 based business class Nokia phone, similar to the Nokia E52; with the idea of having a touch screen instead of traditional navigation buttons increasing the appeal.  You would be amazed at how often people try to navigate on my Nokia E71x as if it was a touch screen.  The benefit of running Symbian^3 over the other Touch and Type devices’ Series 40 is that it would integrate more effectively with my work systems, but the T9 aspect prevents it from falling into the cellular carrier classification of ‘smartphone’.   Why do I want to avoid that?  Because with smartphones I currently pay so much more for my internet access than I do for my home access.   Maybe my plan is not right in AT&T’s eyes, but I have some sever philosophical differences of opinion related to how cellular carrier should be run than the US mobile carriers do, so we’ll just have to agree to disagree.

So that is it, that is what I would like to see at CES or sometime within 2011.

For those of you think I’m a Nokia fan boy… maybe your right.  Personally, I prefer to look at it as that I don’t like iOS or Android, because I’ll leave Nokia for anyone else providing me what I’m asking for.  Unfortunately, Nokia, being the largest cellular manufacturer in the world, and the only one not embracing those other two OSes, is currently my primary choice.