i must say i am impressed. i guess pentax and linux/opensource must have something deep-down in common, i am talking attitude, philosophy, maybe that's why there's so many black sheep around here
as others have explained, you should be able to use both pef and dng, i myself use dng, as i have a samsung gx10, and have used pef with my former k100d, with no issues. just get a newer version of ufraw/dcraw. ufraw afair does not inculde dcraw as such, dcraw also comes as a c library, and this is what ufraw includes, this is why you can have ufraw installed and working, and no dcraw binary (same goes for digikam), most "serious" dcraw frontends will prefer this approach, as it is faster, i guess, than calling dcraw externally, and also cleaner, easier to integrate. the first thing i suggest would be to go to a more recent version (or branch) of your distro, use source packages and local building of packages from source only as a last resort, unless you find the building itself fun.
for panorama, as mentioned, try hugin. windows users should try it too, as far as i know it is one of the most impressive packages for panorama and co. around (comrecial or not), it can also do perspective corrections (like any panorama software should), CA corrections to some extent (shortly, it can handle lateral CA, but not "purple fringing"), distorsion corrections, and, iirc, even vignetting (need to try it with my 50-200 soon). there is also a project for an open database for optical-related corrections for various lenses, for hugin, don't know the current status, but, more importantly, there are howto's on how to test and determine these parametters, which gets me thinking: how about starting to populate our excellent lens database not only with reviews, but also with such parameters to be inported in hugin?
i myself use ufraw, digikam, gimp a litle, imagemagick and dcraw for batch-stuff. i like ufraw, it is well designed (you can see the hand of the photographer, i guess
), almost bug-free, quick and comprehensive, digikam is nicer, but it is damn huge, and incredibly slow (especially compared to ufraw). i was just thinking about rawtherapee, i need to try it, it sounds really good, i am only sad it is not opensource (i avoid such things usually, mainly because of lack of future-proofness), gabor has done a brilliant job, i think, judging by a first glance, and has a great comunity, it would be a shame to throw that all away just by keeping the source closed -- but i digress, and it is his code (mostly) anyway.
the thing i dislike most about gimp are lack of live histograms (??) and lack of auto-crop for free-rotation, or even of a more automatic leveling function, alltogether ("show me the vertical, and i will set it straight"-type). overall, though, it is a brilliant achievment, especialy knwing it since it was in it's infancy; the best thing about it, funny enough, might be the documentation, tutorials and so on available on the web, which are usually excelent (i even recommend them to photoshop users, as they can be easily "translated", and sometimes are easier to find for gimp)
maybe it would be good to have a subcategory for linux-related talk? (not sure if there's likely to be enough of it to be worth it though, so it's just a thought).
looking forward to the opensource pentax firmware (i know _that_ would shake the industry)