Sunday, February 24, 2013

Packaging protobuf-c for EL5

How boring a title that is!  Okay, we're RPMing up Protobuf-c - a c binding for the protobuf kit from Google - for EL5.  We need it to do something far more interesting later -- so these are the giants whose shoulders we stand upon.

I cheated;  let's be honest about that, and just how much I cheat to make my life easier.  It's a lot!  In this case, I stole the protobuf-c RPM as built in RHbz593559 for EL6, and which is supposed to be started for EL5 but hasn't dropped yet.  So we'll just finish that port.

  1. Go get it:
    wget http://download.fedoraproject.org/pub/epel/6/SRPMS/protobuf-c-0.15-2.el6.src.rpm
  2. Unpacking it is harder because of a strange change to the package format, where they seem to ignore compatibility.  So we need to do an rpm2cpio|cpio instead of a trivial rpm-i .  It's no big deal, but watch for it:
    rpm2cpio protobuf-c-0.15-2.el6.src.rpm | cpio -idumv
  3. Because the EL6 one has problems, we need to patch around those, but they're trivial;  it's surprising that we see this in what should be a quality product.  I worry about just how many people have this kind of blinders on.
    @@ -10,6 +10,7 @@
     Source1:        http://protobuf-c.googlecode.com/svn/tags/%{version}/LICENSE
    
     BuildRequires:  protobuf-devel
    +BuildRoot:     %{_tmppath}/%{name}-root
    
     %description
     Protocol Buffers are a way of encoding structured data in an efficient yet@@ -41,9 +41,13 @@
     make check
    
     %install
    +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
     make install DESTDIR=$RPM_BUILD_ROOT
     rm -f $RPM_BUILD_ROOT/%{_libdir}/libprotobuf-c.la
    
    +%clean
    +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    +
     %post -p /sbin/ldconfig
     %postun -p /sbin/ldconfig
  4. now build:
    rpmbuild -ba protobuf-c.spec
And that's kinda it.  Can you see how simple a package-port this is?

Can you see how simple code-compatibility things we learned in first-year CompSci are being ignored here to our detriment?  This is so disappointing, and it wouldn't be a problem if I haven't had this very same conversation with someone in a position to fix it.

Labels: , , , , ,

Sunday, October 30, 2011

Snarling little Upstart

The ubuntification of RedHat continues.  Upstart comes to RHEL6 and derivatives (including derivatives of derivatives, like OEL).

While perusing the net and stalling for clue on upstart, I ran across one brochure piece:  Why Upstart Is Good For Your Distro, in which the author says:
  • Helen is an experienced UNIX user, with multiple years of experience. She does not wish to have to relearn that which she has learned already, and would rather continue using the tools that she is used to and only learn the newer ones when necessary.
  • Matthieu is a distribution developer who maintains several packages that provide services or perform tasks. He does not want to have to update his packages until he is ready to take advantage of new features or abilities, his existing scripts should continue to work unmodified in their original locations.
The thing is, he says it in his brochure piece as if Upstart provides those features.  Did he see /etc/inittab?
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
Apparently retaining compatibility with the industry standard is the first casualty of the Shiny Things Gold Rush infection that has now spread to RedHat.  Leave that half-baked new-is-instantly-better crap for the Fedora derivatives that don't make it to the enterprise product, if you want to preserve compatibility.

Labels: , , , , ,

Emacs goes Too Far

I like emacs.  I will learn to like the latest release.  Given my thoughts on the source of it all, I should expect some surprise in every release, and so far I've been lucky.  Colour me surprised at the emacs 23.1 which we get with RHEL6 and Centos6.  Its new features and updated lisp parts falls flat on its face the first time I load two files at invocation (or hit'o' in a dired):
It splits the window horizontally.
I don't know who thought that was a great idea, but it's got two problems:  First, it's going to turn off emacs noobs who wonder what the hell happened to their editor and how to make it stop, which is something the anti-emacs crowd has been pushing as a theme the whole time.  The second part, much like the first, is that is makes the editor look like ass and work like crap.  So we're also looking to make it fucking stop.

The popular fix is to tune the criteria for auto-splitting windows out of whack.

--- .emacs~     2011-09-11 16:15:56.000000000 -0700
+++ .emacs      2011-10-30 05:01:43.000000000 -0700
@@ -367,3 +367,7 @@
  '(font-lock-builtin-face ((((type tty) (class color)) (:foreground "light blue" :weight light))))
  '(nxml-attribute-value-face ((t (:inherit nxml-delimited-data-face))))
  '(nxml-delimited-data-face ((((class color) (background light)) (:foreground "LightBlue")))))
+
+;; witty and biting comment about sudden feature changes that look like
+;; broken parts that frighten noobs here.  I probably said Fuck again.
+(setq split-height-threshold 0)
+(setq split-width-threshold nil)

Instead of saying "don't ever split the window horizontally, you whackjob app," we just say "sorry you can't split the window horizontally because our criteria is now impossible to match."  That's the fix.  Now, your fancy old Emacs does exactly what it used to, and you don't have to worry about it looking bad and scaring the officemates back into the 1960s with vi.

I should roll a fix for it on the system level, so that it avoids it for all users of a particular system.  Stay tuned and, if it doesn't appear soon, beat me.

Labels: , , , ,

Wednesday, October 06, 2010

That and a Few Bucks Will Get You a Bus Ride

[Phoronix] A Gaming Mouse Vendor That Has Linux Drivers:
Stefan Achatz has been working with a vendor known as Roccat to improve their Linux support. Roccat manufactures [...]
  1. keyboards with the broken key layouts that move the [\] key around so it's non-standard
  2. mice with two equal-sized buttons and a bunch of mini-buttons and rollies and scrollies, and ...
.. but sadly, nothing I can use.  Nothing my peer group uses, if I can drag in the people I work with.

We use the third button, for gaming and for work.  We use the backspace or pipe key at times.  We use a regularly-sized backspace key.  We rather expect the key layout will not be arbitrarily fucked with, lest we become unable to use the corrupted layout or - worse - become accustomed to the corrupted layout and can no longer use regular gear.

Mice:
  • three equal buttons.  No?  Fail.
Keyboards:
  • regular backspace, pipe, enter, shift, space bar keys, and a regular wasd-layout arrow-key matrix.  No?  Fail.
Why is it so hard to find a working - as in can use to do work - mouse and keyboard set?  Right now, this very earnest and well-intentioned company cannot sell me a single thing, for my was-$15-in-1998 three-button first-gen Logitech First Mouse beats their pretty cadillac.  A lenovo thinkstation keyboard offers me speed, accuracy and keys where I need them;  the Roccat gear does not.

I could consider pretty, broken gear for gaming, or for fun pursuits, but I think I covered that in the "become accustomed to broken layout" comment above.  And I'm so disappointed that this company has no value for me, today, since it seems to be making a great effort to get its unusable gear out to everyone who wants to buy it.  A great company, potentially, that can't offer me something even if I waved a big bag o' money at it.

Labels: , ,