Install HeaderDoc on Ubuntu

TECH & HOWTO'S

HeaderDoc is a very versatile document generation system by Apple, which can handle a wide variety of languages. The latter was the reason for me to give it a chance, since other generator either work only with a specific language or produce (for me) unusable results. HeaderDoc works fine with PHP, JavaScript etc. which makes it a perfect tool for web projects - otherwise you’ll have to deal with different tools, which can’t produce combined docs.

HeaderDocs comes with Mac OS X (at least when you have Xcode installed). But I wanted to use it on my Ubuntu server where Jenkins does all the integration stuff.

Apple has open-sourced HeaderDoc and you can find it on Apple’s open source website at http://www.opensource.apple.com/

Downlaod & unpack

  • The most recent version is in the Mac OS X 10.7.3 tree; copy this link and download the archive into a directory on your Linux machine: http://www.opensource.apple.com/tarballs/headerdoc/headerdoc-8.8.38.tar.gz

    • wget http://www.opensource.apple.com/tarballs/headerdoc/headerdoc-8.8.38.tar.gz
  • unpack with tar -xvzf headerdoc-8.8.38.tar.gz and cd into the created directory

Requirements

HeaderDocs is basically a PERL script, so you’ll need a recent PERL installation. This should be the case on every ‘normal’ system, so I won’t dive into installing PERL here. Besides that, HeaderDoc needs some other libraries. If they’re not installed, run the following commands:

  • FreezeThaw

    • sudo apt-get install libfreezethaw-perl
  • libxml2-dev

    • sudo apt-get install libxml2-dev
  • xmllint (from the libxml2-utils)

    • sudo apt-get install libxml2-utils
  • checkinstall (not necessary for this installation, but you should alway use checkinstall, when manually installing software, which circumvents the Ubuntu/Debian package system!)

    • sudo apt-get install checkinstall

Build & install

  • make clean
  • make - This will actually compile the software & libraries and performs a lot of tests. Three of them (‘class 3’, ‘header 5’, ‘template 1’) failed during my install, but I didn’t notice any false behaviour using HeaderDoc.
  • sudo checkinstall make realinstall

Ready. You should have now two files in /usr/bin/:

  • headerdoc2html - the processor itself
  • gatherheaderdoc - a utility to combine the docs in an overview

You’ll find the documentaion for HeaderDoc on Apple’s developer site

Mac OS X: WebDAV protocol not supported (solved)

TECH & HOWTO'S

When you see in your console log messages like

11.02.12 17:36:41,009 webdavfs_agent: network_mount: WebDAV protocol not supported; file: /SourceCache/webdavfs/webdavfs-322/ mount.tproj/webdav_network.c; line: 3131

then this doesn’t necessarily mean, that Mac OS X suddenly stopped understanding the WebDAV server it could mount minutes ago. In fact it’s more likely, that the problem lies on the server side and the DAV config is incomplete.

Since the Mac OS web DAV client isn’t really chatty about what’s (wr)on(g) here, you should use e.g. cadaver - a unix WebDAV client for debugging.

The client can properly connect to the DAV server which you can see by the result code (“200”) in the apache log file:

"OPTIONS / HTTP/1.1" 200 250 "-" "cadaver/0.23.3 neon/0.29.0"

But the client tells you, that there’s something wrong anyhow, which you can verify again in the apache log:

"PROPFIND / HTTP/1.1" 405 508 "-" "cadaver/0.23.3 neon/0.29.0"

The result code “405” means “Method not allowed” - does the client try to talk to the DAV server via incorrect command and Mac OS therefore reports the “not supported” message? No, it’s just that the DAV server doesn’t know how to handle the DAV protocol properly.

So go and check your server config. When I upgraded Plesk from version 10.2 to 10.4, the upgrade process didn’t catch all the relevant vhost.conf files and therefore left me with a half configured DAV server. The problem is, that Plesk 10.4 uses a diefferent directory layout under /var/www/vhosts/ and I had to manually copy and configure the vhost.conf files to their new place to be.

OCR speed: DevonThink Pro Office vs. ScanSnap S1300M

TECH & HOWTO'S

That the integrated OCR engine, that ships with DevonThink Pro Office is only the single-core version is known - it’s due to licensing issues and DevonThink would have to charge a lot more if they made available the multi-core version.

I wanted to know, if the Abby FineReader which ships with the Fujitsu ScanSnap S1300M utilizes the multi-core capability. So I ran some tests.

Though I dont’t think, it uses multiple cores, I found the ScanSnap to be 4x faster.

For a 2,5 pages document, the ‘normal’ workflow (use the built-in OCR of DT) takes a lot more time compared to a slightly different workflow, where the OCR is done by the ScanSnap software. The actual result for the OCR job where 48 seconds vs. 12 seconds.

The caveat is, that this approach doesn’t have the queue feature, that DT has, so that it’ll have to finish the OCR process before you can feed it the next document. But since the OCR is 4 times faster, this is a minor one, since it will increase your overall throughput.

If you want to follow this, just check “convert to searchable PDF” in the in the profile settings in ScanSnap. Then uncheck the same in the DevonThink Pro Office preferences.

How to solve slow rrdtool graph creation

TECH & HOWTO'S

After upgrading my cacti server to Mac OS X Lion, the graphs in my Cacti installation needed a very long time to render and the CPU usage of rrdtool spiked – somehow blocking the whole machine.

The rrdtool which is needed by cacti has been installed via Fink, which is a fine project maintaining all the usual *nix tools, that don’t come with Mac OS X. Fink gives you the convenience of a Debian package manager and makes installing additional software a breeze.

Because I didn’t know exactly which program was responsible for the slow rendering, I dumped the whole fink tree which is normally located at /sw and started over with a fresh install. After fink completed all the compiling an installation I had a fast cacti again. Since I didn’t update the fink packages regulary, I was sure, that some bugfixes in the newer versions resolved the slowness problem.

After the recent update of Lion to 10.7.2, I had to realize, that the rendering was totally slow again. So I thought, that an update of rrdtool and the other needed tools should do the trick again. Unfortunately there was no newer version of the tools as those which where already installed.

After trying some things (which didn’t help), I looked for a way to circumvent the dump-everything-and-spend-another-two-hours-reinstalling thing. Since there was no newer version for 10.7.2, there must be a different cause.

I figured out, that one of the following tools had to be the offending one:

  • librrd4-shlibs
  • rrdtool
  • pango1-xft2-ft219 (dev, shlibs & the main one)
  • freetype219 (main & shlibs)
  • fontconfig2

So find their package name and remove them (example for ‘freetype’):

When you delete or remove a package via fink and then reinstall it again, fink makes use of the binary packages it produced during the former installation. (I tried the command-line switches to avoid this behaviour but had no luck.)

What helped, was to delete the packages from the cache directories (on my system this is at /sw/fink/10.7/stable/main/binary-darwin-x86_64/) and starting the fink install command again.

I think it’s safe to delete them all:

fink grabs the source and – since the binary package is no longer available – compiles everything from scratch.

Install the packages. It’s best to start with the main package (the one you were initially interested in), because the package management of fink will install additional ones automatically when needed:

After that, the rrdtool graph rendering was fast again. So my conclusion is, that even during minor updates of Mac OS X, underlying things can change that way, that programs don’t work as expected, if they were compiled on a different version of the system.

So, if your tools behave different after an update or upgrade, try a fresh compile of them first.

Von Äpfeln und Birnen…

DIGITAL LIFE

Das ansonsten recht informative “Chart of the Day” von businessinsider.com beschäftigte sich jüngst mit einem eher merkwürdigen Vergleich und stellt darin die Anzahl verkaufter Windows 7 Lizenzen den “iOS units” gegenüber, die im entsprechenden Zeitraum verkauft wurden:

Wobei mir nicht mal klar ist, was “iOS units” überhaupt sein sollen, da laut Legende Macs mitgezählt wurden, diese jedoch definitiv nicht mit iOS laufen…

Diese kleine Unschärfe mal beiseite gelassen, bleibt die Frage, was der Vergleich überhaupt soll. Die wesentliche (einzige) “Ableitung”, die getroffen wird, lautet:

For all of its mind-blowing success, sales of Apple’s computing products are still just a fraction of Microsoft’s Windows 7 licenses.

Und? Hier wird doch nicht etwa der Verkauf einer neuen Software für eine installierte Basis von über 1 Milliarde PCs mit Verkäufen von iPhones, iPads und iPod touch Geräten verglichen? Mit einer Plattform, die vor drei Jahren bei Null gestartet ist? Kann ich mir nicht vorstellen – das wäre ja so, als würde man verkaufte Liter Heizöl mit der Anzahl errichteter Windkraftanlagen vergleichen. Würde ja niemand machen. Genauso wenig, wie niemand die Frage stellen würde, warum nach 1,5 Jahren gerade mal ein Drittel der Nutzer auf die angeblich so ersehnte neue Version gewechselt ist. Zur Erinnerung: lässt man das komplett gescheiterte Vista mal ausser Acht, wurde das letzte (halbwegs) brauchbare Microsoft System – Windows XP – vor gut zehn Jahren (!) auf den Markt gebracht. Da braucht es schon schräge Vergleiche, um das als Erfolg werten zu können…

Kopfschüttel…

Das Playstation-Desaster

DIGITAL LIFE

Es ist ein Drama. Vor sechs Tagen wurde in die Server ‘eingebrochen’, die das Playstation-Network (PSN) hosten. Über das PSN werden Updates und Spiele-Demos verteilt, Spielstände verwaltet und Nachrichten ausgetauscht. Ausserdem beherbergt das PSN den Playstation-Store, in dem man Spiele, Musik und Filme kaufen kann. Seitdem ist das PSN offline und Sony geht davon aus, dass “in einer Woche” (!) der Betrieb wieder aufgenommen werden kann. Heute meldete sich Sony mit einem Update.

Valued PlayStation Network/Qriocity Customer: We have discovered that between April 17 and April 19, 2011, certain PlayStation Network and Qriocity service user account information was compromised in connection with an illegal and unauthorized intrusion into our network.

Eine Woche nachdem die Sony-Experten den Einbruch festgestellt haben, informieren sie nun die über 75 Millionen Nutzer des PSN, dass manglaube, dass sämtliche Daten geklaut wurden:

[…] we believe that an unauthorized person has obtained the following information that you provided: name, address (city, state, zip), country, email address, birthdate, PlayStation Network/Qriocity password and login, and handle/PSN online ID. It is also possible that your profile data, including purchase history and billing address (city, state, zip), and your PlayStation Network/Qriocity password security answers […]

Nahezu niedlich ist die Umschreibung unauthorized person – klingt hier irgendwie nach Strauchdieb oder Tunichtgut, der eine Cola-Dose in die falsche Recyclingtonne geworfen hat. Es geht aber um den Verlust von Passwörtern, Online-Identitäten, Mail-Adressen, Kauf-Historien… Damit nicht genug; weiter unten kommt dann noch eine nicht unwesentliche Ergänzung:

If you have provided your credit card data through PlayStation Network or Qriocity, out of an abundance of caution we are advising you that your credit card number (excluding security code) and expiration date may have been obtained.

Das ist der Super-GAU. Einer der größten Diebstähle überhaupt – es geht um Millionen, wahrscheinlich zig Millionen Kreditkartendaten. Katastrophal ist, dass Sony erst eine Woche nach der Attacke mit dieser Information rausrückt und damit selbst zu verantworten hat, wenn diese Daten nun missbraucht werden.

Sony takes information protection very seriously and [blafasel]

Eine Aussage, die PR-mäßig natürlich nicht fehlen darf, aber angesichts der Tragweite und des inkompetenten Verhaltens von Sony nichts als blanker Hohn.

Allein die Tatsache, dass Sony schon am Tag nach dem Vorfall verkündet hat, das bisherige System komplett stillzulegen und durch ein neues zu ersetzen, spricht Bände. Offensichtlich war den Betreibern bewusst, dass das PSN nicht sicher war:

[…] strengthen our network infrastructure by re-building our system to provide you with greater protection of your personal information […]

Damit dürfte ‘leichte Fahrlässigkeit’ aus’m Spiel sein; bin gespannt, mit welchen Klagen Sony jetzt überzogen wird. Bleibt zu hoffen, dass Sony die ganze Angelegenheit genau so ernst nimmt, wie sie noch vor wenigen Wochen alles unternommen haben, um George Hotz (aka GeoHot) zur Strecke zu bringen. Da hatte der Elektronik-Gigant gerichtlich die Herausgabe der IP-Adressen von Website-Besuchern und Youtube-Nutzern erwirkt.

Eines macht der Fall zudem noch mal klar: Kundendaten sind ein sehr wertvolles Gut – Firmen ermöglichen sie ‘nur’ die Geschäfte, aber für die Kunden sind sie Teil der Existenz, die sie vertrauensvoll in fremde Hände legen. Dieses Vertrauen nicht zu enttäuschen ist sicherlich eine der obersten Aufgaben. Ob es nun der wichtige OS-Patch, das geeignete Passwort oder die nochmal geprüfte Verarbeitung von Formular-Daten ist – täglich und überall gilt es, Kundendaten zu schützen.

Wal gegen Segelboot?

ANALOG LIFE

Siehe: Spiegel Online

M.E. ein Fake. Wenn drei Meter neben mir ein 40 Tonnen Wal angeflogen kommt, dann gucke ich doch nicht teilnahmslos geradeaus. Der Fotograf fährt nicht hin (Abstand zum “Opfer” verändert sich kaum) und wenn er schon nicht hilft, macht er trotzdem keine weiteren Fotos? Quatsch.

“diskussionslos”

ANALOG LIFE

Die Zeitung “Blick” (Schweiz) zum Spiel Argentinien – Deutschland:

Die clevere Löw-Truppe gewinnt diskussionslos gegen Argentinien mit 4:0 und zieht überlegen in das WM-Halbfinale ein.

“clever”, “tempo-reich”, “druckvoll” – trifft alles zu, aber “diskussionslos” gefällt mir am besten und beschreibt das gesamte Auftreten perfekt in einem Wort.

Cloud-Based iTunes and Wireless Device Syncing Coming ‘Soon’?

DIGITAL LIFE

Boy Genius Report claims to have received information from an Apple source noting that the company is finally gearing up to launch its cloud-based iTunes initiative, a program that will also included wireless syncing for devices (Via macrumors.com)

Wäre schön und überfällig; ich fürchte jedoch, dass eine solche Funktionalität so sehr in’s Innere von iPod, iPad, iPhone etc. eingreift, dass dies eine neue Version von iOS erfordert. Da iOS 4 gerade mal drei Wochen jung ist, halte ich es für unwahrscheinlich, dass so kurzfristig ein weiteres Update kommt; schon gar keines, das solch grundlegende Änderungen mit sich bringt.

Damit bleibt realistisch nur der Herbst, wenn mit Version iOS 4.1 die Betriebssysteme von iPhone und iPad zusammengeführt werden. Das würde dann auch einen Versionssprung in der ersten Nachkommastelle rechtfertigen, da der Anspruch an ein .x Release schon auf zusätzliche Features hinweist, als die reine Funktionsangleichung zwischen iPhone und iPad – zumal sich beim iPhone ja sonst gar nichts entscheidendes ändern würde, weil es ja bereits auf iOS 4 ist…

Let’s see.

Es ist so kalt wie nie!

ANALOG LIFE

Die Hinweise, dass das Wetter ‘nicht schlecht’ und eigentlich ‘normal’ ist, gehören mittlerweile zu jeder Wettervorhersage, wie die A7 zu den Verkehrsmeldungen.

~~Dankenswerterweise~~ Natürlich – weil von unseren Steuern bezahlt – stellt der Deutsche Wetterdienst seine Aufzeichnungen online der Öffentlichkeit zur Verfügung.

Ich habe die Mai-Werte von 1991 bis 2010 verglichen:

Fazit: alle Werte dieses Jahres liegen unter den Vergleichswerten der letzten 20 Jahre! Die mittlere Temperatur liegt 4,6°C und fast 7°C unter den Werten des letzten bzw. vorletzten Jahres. 25% Abweichung ist also ‘noch im Rahmen’ und ‘normal’??? Klima-Mafia…

Drucker mit Mail-Adresse

DIGITAL LIFE

Die erste gute Idee aus dem Hause HP seit Jahren:

H.P.’s engineers hit on the e-mail address as an easy, familiar way for people to send print jobs to the Web-ready printers. You can, for example, take a photo with a phone, e-mail it to your printer’s address and have the printout waiting for you at home. Or, you can share the printer’s e-mail address with family and friends. This means that someone can buy Grandma a Web-ready printer and have it pump out photos of the grandchildren without Grandma having to do much of anything.

Eine sinnvolle Lösung für die ganzen Geräte ohne Druckertreiber, wie iPhones, Blackberry, iPads etc. Auch für so manchen Worklflow hilfreich, wenn man unterwegs ein Dokument bekommt oder erstellt und man es aus der Ferne auf den Drucker schicken kann; guter GTD-Ansatz.

Bleibt abzuwarten, wie die genaue Umsetzung aussehen wird:

  • wie kann man mehrere Kopien drucken?
  • kann man Layout-Einstellungen vornehmen? (bspw. “Zwei-Seiten-auf-einem-Blatt” etc.)
  • welche Dokumente kann der Drucker verarbeiten? PDF wird das mindeste sein. Bei den Office-Formaten kommt es dann schon auf eine originalgetreue Interpretation an, sonst kommen Schriftarten und Farben durcheinander.

Die Gefahr besteht, dass HP eine gute Idee wieder durch eine dumme Umsetzung kaputt macht. Nimmt man folgendes wörtlich…

The new printers — which build on a limited experiment last year — will range in price from $99 to about $400. Every one will come with what H.P. executives billed as a breakthrough feature — its very own e-mail address.

… dann wird der Drucker vom Werk ab mit einer Mail-Adresse ausgestattet. Das hätte zur Folge, dass HP – und nicht der Nutzer – über die Adresse bestimmt und – schlimmer – die Adresse HP gehört bzw. alles über deren Mailserver läuft. Das würde dann bedeuten, dass jedes Dokument, was man Drucken möchte, bei HP landet und dort gespeichert wird. Sicherlich nicht das, was man möchte.

(Via: NYTimes.com)

Apple’s definition of “a bit over break even”

DIGITAL LIFE

During the Q1/2010 earnings call Apple CFO Peter Oppenheimer stated a somewhat surprising remark about the economic performance of the App Store:

Regarding the App Store and iTunes stores, we are running those a bit over break even, and that hasn’t changed.

(Source: AppleInsider)

Last night – during his WWDC 2010 keynote – Steve Jobs revealed that Apple has paid out over $1 bilion to app developers. As we know, Apple maintains 30% of app sales and pays 70% to the developers; hence we can assume, that Apple made at least $428 million from those sales since the introduction of the App Store back in 2008.

Even if there are hords of people working in the App Store area to review the apps, some hundred million dollars earning per year should be far enough to run the business well over break-even; it’s a relevant contributor to the overall earnings of Apple. Probably they include all the marketing cost for apps in their calculation to downplay this fizzy source of income. Not to mention the $99 they get from each developer as the Developer Program fee…

Der Spiegel versucht zu erklären, wie man auf einen neuen Rechner umzieht…

DIGITAL LIFE

Die “Tips & Tricks” füllen schon zwei Seiten und am Ende steht die Erkenntnis, dass es eigentlich nicht wirklich geht. Programme müssen neu installiert, die benutzerdefinierten Einstellungen mühevoll gemerkt und nachgetragen werden. Und wer hat es schon mal geschafft, dass hinterher auch alle Mails da sind, wo sie hingehören?

Beim Mac geht das übrigens so: * alten und neuen Rechner per Firewire, Netzwerk oder WLAN verbinden * auf beiden Rechnern den “Migrationsassistenten” starten * je nach Datenmenge 1-2 Stunden warten * fertig

Alles ist da: Mailaccounts, Bildchirmschoner-Einstellungen, Drucker, Programme (inkl. Registrierungsinfos und Einstellungen!), Passwörter, Lesezeichen, Dokumente etc.

So muss das sein.