techblog @ razal.de


get back | techblog | get rss

Mon, 20 Aug 2007

mac os x and pkgsrc - good and bad news

i recently found out, that pkgsrc is now usable on non case-sensitive partitions. this is good news because now many more people can enjoy pkgsrc on their macs. so people... throw away your fink and darwinports and use pkgsrc instead. ;)
the bad news for me is that if had known this i wouldn't have installed osx on my "new" powerbook on a case-sensitive filesystem in the first place. would have spared me much annoyance.

posted at: 16:34 | path: /mac
tags: , ,

Tue, 10 Jul 2007

thunderbird and spotlight

a friend of mine told me that thunderbird 2 supposedly supports os x spotlight feature. so i did a google search and found a few instructions here (german) on how to get it up and running.

first: you need to get the spotlight importer from this bugreport (download attachment from comment #109) and put it in ~/Library/Spotlight/ or /Library/Spotlight/ (create if necessary).

second: in thunderbird preferences go to config editor (tab advanced) and set mail.spotlight.enable to true. thunderbird needs to be restarted after this. then it begins to index all mails (this will take a while), which effectively means that it generates a .mozeml file for spotlight for each mail in your mailbox. this is because thunderbird saves it's mails internally as mbox files which are unsuitable for spotlight.

third: check with /usr/bin/mdimport -L if the thunderbird importer was found and reindex your spotlight database with sudo /usr/bin/mdutil -E /. (i don't know if a reboot is necessary)

[update]
there was one little drawback with the importer as noted here. messages showed in category Documents rather then Mail messages. but with help from the spotlight-dev mailing list i found a solution.
you need to edit Info.plist located in Thunderbird.mdimporter (ctrl-click -> Show Package Contents). you can use any editor you like but the safest bet is to use the Property List Editor (i killed my Info.plist with TextEdit!).
  <key>UTTypeConformsTo</key>
  <array>
    <string>public.data</string>
    <string>public.content</string>
    <string>public.email-message</string> <-- add this line
  </array>
i don't know how to convince spotlight to reload its plugins so reboot please. reindex your spotlight now.

to check if everything went alright locate a .mozeml file (usually under ~/Library/Thunderbird/Profiles/...) and call mdls with it. you are good to go if anything like this shows up.
kMDItemContentType             = "com.mozilla.thunderbird.mozeml"
kMDItemContentTypeTree         = (
    "com.mozilla.thunderbird.mozeml", 
    "public.data", 
    "public.item", 
    "public.content", 
    "public.email-message", 
    "public.message"
)
screenshot

[update 2]
KAMiKAZOW has build a new version (universal binary) of Thunderbird.mdimporter incorporating the Info.plist change and attached it to the bugreport. so no more Info.plist editing.

[update 3]
from the amount of 19k mails 10k have been converted. 9k to go. took a day so far...

posted at: 16:05 | path: /mac
tags: , ,

Wed, 04 Apr 2007

job interview with apple

somebody posted an interesting article about a job interview as security researcher with apple. it not really comes as a shock to me... but i get a little anxious.

posted at: 13:06 | path: /mac
tags: ,

Wed, 28 Mar 2007

adium and case-sensitivity

last week i got sick of the ancient mac icq client from mirabilis so i installed adium. i have to admit that i despise these efing duck icons and sounds but the program is good nevertheless. and there are a variety of extras to change said icons and sounds. but i almost deleted it after the dock icon wouldn't change to the new set i chose. yes... i'm that shallow ;). but after a while i remembered my little case-sensitivity problem. so i took ktrace and looked for the problem. same old, same old... the icon was named one way... adium tried to access it the other. so i renamed it and it worked like a charm. posted a bug report on the adium site and le voilá... it got fixed already. kudos to evands.

posted at: 19:05 | path: /mac
tags: ,
os x and case-sensitivity

since i changed the fs type on my powerbook to Mac OS Extended (Case-sensitive, Journaled) to get pkgsrc working i experienced many strange problems.

for example:
my scanner stopped working.
most adobe software wouldn't even install. (problem solved on newest version)
games like civ 2 and age of empire 2 wouldn't start
and so forth...

this was mainly because of sloppy naming and accessing files.

there are two possible ways to work your way around these problems.
first: install software in a disk image that utilizes a fs without case-sensitivity. this is the easy way. but only really works with software that doesn't put stuff elsewhere, e.g. /Library/ or /User/$USER/Library/. the games i had problems with usually work with this method.
second: identify and rename the problematic files accordingly. but this is easier said then done. most programs just throw a generic error message at you and close. i usually take ktrace/kdump out of the toolbox and look what happened. a quick search for errno will, in most cases, suffice to find what file the process tries to access. then you rename it and it's done. but sometimes a process tries to access a file with name SomeFile.txt in one place and name someFile.txt in another... then you not only have to correct the name... you have to link the file to the specific names the program requires. and all because of sloppy and lazy programmers. but some programs are exceptionally rude if you try to ktrace them. a certain adobe app throws a "Security Violation: Kernel trace detected" at you and then quits. got it running with a mixture of both methods. but i have to say this is all not very satisfying.

posted at: 18:09 | path: /mac
tags: ,