Ritesh Raj Sarraf: apt-offline - 1.0
Hello World.
I am very pleased to announce apt-offline, version 1.0.
This release adds a Graphical User Interace to apt-offline.



Hello World.
I am very pleased to announce apt-offline, version 1.0.
This release adds a Graphical User Interace to apt-offline.



Wishing everyone a happy, auspicious, and prosperous Gujarati new year. (Vikrama samvata 2067 called "Shubhakrt")
For Diwali I got a smartphone after enduring years of pointing and laughing at my previous decidely dumb phone. It's a T-Mobile G1 with Google or in other words a rebranded HTC Dream. I didn't want an iPhone (evil) or the phone the sales people were trying to push, the G2 (very evil.) As evil is the default in the telecom industry I especially wanted the ability to run CyanogenMod and this phone, though it doesn't have all the latest whiz-bang features, is perfect for that. (Btw, people are working on porting Cyanogen to the G2 but why let your dollars encourage the carriers and their shennanigans?)
Security is more than bug fixing. Security fixing/updating, the thing most people are exposed to, is reactive security . However, a large area of security work is proactive where defensive abilities are put in place to try and catch problems before they happen, or make classes of vulnerabilities unexploitable. This kind of security is what a lot of people don t understand, and I think it s important to point out so the distinction can be clearly seen.
In the Linux kernel, there s yet another distinction: userspace proactive security and kernel proactive security. Most of the effort in kernel code has been protecting userspace from itself (things like Address Space Layout Randomization), but less attention has been given to protecting the kernel from userspace (currently if a serious enough flaw is found in the kernel, it is usually very easy to exploit it).
One project has taken great strides with proactive security for the Linux kernel: PaX and grsecurity. There hasn t been a concerted effort to get its pieces upstream and it s long overdue. People are starting to take proactive kernel security more seriously, though there is still plenty of debate.
While I did my best to push some userspace protections upstream earlier in the year, now it s time for kernel protections. What to help? Here is the initial list of things to do.
Dan Rosenberg has started the information leaks discussion, and I ve started the read-only memory discussion. Hopefully this will go somewhere good.
When doing porter uploads, one must not forget to pass
-m"My Name <my@email.addr>" to dpkg-buildpackage,
e.g. with --debbuildopts for cowbuilder. Thanks Aur lien
and sorry to everyone who got the upload mails.
(How are the rules for sponsored uploads? I get conflicting info
on these, and indeed, the one I sponsored never showed up on my QA
DDPO page )
Debian mailing lists' standard policy is to allow posts from
unsubscribed users. That of course fits our standards for opened
development but has the drawback of allowing a lot of spam to reach
our mailing lists.
This spam also clutters the mailing lists archives.
However, 1.5 years ago, listmasters established a well-working
system to clean out spam from the mailing lists.
It basically works in four steps:
My recent experience with Mozilla ThuderBird, IceDove.
With KDE 4.x, the KDE team took a radical step of ripping apart most of the stuff and rethinking many of the designs. Quite a bold move. Many people appreciated KDE's efforts to start afresh while others moved away from KDE. For some reasons, I decided to stick to KDE. Maybe it was because of the awesome flexibility KDE provided provides to customize the DE to one's personal taste. Or maybe because I was too used to the KDE way of doing things. I stayed with KDE while 4.0 was released and stayed with it up till very recently.
I started to lose my patience with the PIM Suite. I know the PIM team is also going to some very radical changes which will bring very innovative stuff later. But, at the moment, the KDE PIM suite is very broken. Broken not in the first impress, but broken when you regularly use it. It leaks memory like anything and keeps doing lots and lots of I/O. I hope some day the KDE team decides that they do need a core team, a core team that could take care of important tasks, making sure that the imporatant tasks are Continuously Usable. It takes time to earn the reputation but it takes a lot lesser time to lose it.
Anyways, having been a KDE (PIM) user for long, I had been bearing the PIM torments up until, I recently saw a colleague using IceDove. There was a time when the Mozilla suite was in itself terribly slow. But things seem to have changed a lot. Both, the browser and the PIM suite, have improved a lot lot in terms of functionality and performance. Performance is very important. What good is a feature if its performance is terrible and it hinders the usability. Some of the things that really impressed me were:
For some reason, 60G of free space on my notebook suddenly turned into 60G of movies. Bownian motion, perhaps.
Unfortunately, in this particular case, I absolutely don't like to let a movie (or book, for that matter) unfinished, so I watched Fear and Loathing in Las Vegas (directed by Terry Gilliam, starring Johnny Depp; so far, so good) from start to finish. After the first half hour I started wondering if the plot is going to start. The reptile party in the hotel lobby was a short entertaining interlude, but to the end, no plot manifests. I'm left wondering what this was all about.
Quantum of Solace on the other hand is good entertainment. Probably not one of the best, but still worth watching if you like her majesty's secret agent.
Going back to movies I've seen before is something I like to do as well, so having another evening in company with the unforgettable Leon (the professional) was time well spent.
I didn't give up on Terry Gilliam yet and met The Fisher King. While the story is completely different, it does feel a bit similar to 12 Monkeys in terms of set design and atmosphere.
Speaking of Terry Gilliam: I'm curious how his current attempt at The Man Who Killed Don Quixote turns out; so far I've only seen him losing this movie in the documentary about the aborted last attempt: Lost in La Mancha.
On the funny side, Dogma and especially The Wedding Crashers were worth watching. If you have to pick one, it's the latter one. Dogma feels a bit forced in some places.
Returning back to the opening theme: seeing Inland Empire was another evening that left me confused. The main story is interesting enough, but I have to admit that I just couldn't follow where all the other sub plots tie in, or if they even are supposed to. And I'm not only talking about the rabbit family (those felt a bit like the Middle of the Film in The Meaning of Life and were quite in order.)
strace $(pgrep httpd awk ' print "-p " $1 ' tr '\n' ' ')
The Russian l10n team is the first team to reach one of our
translators' Grails: all debconf templates translations are now fully
translated in Russian, in testing.
Russian is the first language to reach this ever (I formerly announced
100% completion for a few languages, but that was in unstable: we
never tracked testing up to now).
It means that, in theory, on can do a full installation of all
packages in squeeze (in case some crazy folks want to do this!) and always be prompted in Russian.
French and German are lagging very close to this, the only missing
bit being the udev package, which had two consecutive urgent uploads
that couldn't include a full translation coordination. For these,
we're indeed waiting for another udev upload, but I already nagged
Marco about this..:-)
Portuguese should make it, though I still have to track 7 packages for
it. Swedish is only missing 2 packages. I'm less sure that Czech and
Spanish (the other two teams working hard on 100% completion) will
make it.
/etc/fstab files tend to be an unreadable mess of unaligned fields.
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/benz-root / ext3 errors=remount-ro 0 1
/dev/sda1 /boot ext3 defaults 0 2
/dev/mapper/benz-home /home ext3 defaults 0 2
/dev/mapper/benz-swap_1 none swap sw 0 0
newton:/home /nfs nfs defaults,soft,intr,users 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Let's remove some whitespace in the third line:
#<filesystem> <mountpoint> <type> <options> <dump> <pass>
And then pipe everything from line 3 to the end through column -t:
# /etc/fstab: static file system information.
#
#<filesystem> <mountpoint> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/benz-root / ext3 errors=remount-ro 0 1
/dev/sda1 /boot ext3 defaults 0 2
/dev/mapper/benz-home /home ext3 defaults 0 2
/dev/mapper/benz-swap_1 none swap sw 0 0
newton:/home /nfs nfs defaults,soft,intr,users 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Thanks to SP8472 for bringing this to my attention.
My fellow Republicans and I got a nice early Diwali present on Tuesday. ~65 seats in the House ~6 in the senate, ~18 governorships and control of ~20 state legislatures. (Some races haven't been formally called yet.) A few disappointments though. no majority in the Senate and Harry Reid and Barney Frank were not defeated. Still overall its an election to celebrate. Here are a few thoughts.
The Election System Is An Embarassment
Once again there are several races where the outcome is in doubt because of technical problems with voting. Whatever politics we have, can we agree that it is damn stupid that we still can't get something as simple as counting ballots right?
Prediction: The 2012 Republican presidential candidate will come from the Tea Party.
While I may be a Republican, I am also a Cosmopolitan East Coast Elitist so the Tea Party didn't move me much. There were a couple of cases (NY and DE atleast) where their candidates were subpar and cost us victory but the best of the new Republicans also came out of this movement. I would rather vote for one of them than Romney, Huckabee, McCain, Gingrich etc. (With the exception of Sarah Palin who is just too polarizing I'm afraid.) The Tea Party itself will subside in a few years as all populist movements do. (Ask the Hope'n'changers.)
Young People Are Dumb
Part of leftist mythology is the idea that one day "the kids" are going to rise up against the mean old corporate overlords. It ain't going to happen. There was a huge upsurge in first time voters in 2008 but that was because Obama was a novelty act not because they had suddenly discovered the merits of Keynesianism. Now Obama is old and busted so they won't vote anymore. (Not until they have kids and a mortgage sometime in the future.) They'll spend time make cool ironic signs for the Rally to Promote Comedy Central but even the prospect of legalizing pot won't get them to the polling booths in sufficient numbers to defeat the oldies. Why? Because young people are dumb.
Prediction: War With Iran
If you're President Obama what do you do now? Bipartisanship? Yeah right. Look at what happened to Rep. Cao of Louisiana, the only Republican to vote for Obamacare and one of only two GOP congressmen to lose on Tuesday. Obama actively campaigned for his challenger. Any of the new Republicans who try and compromise with the President will end up under the bus sooner or later as they well know.
The President could go full retard with the socialism (progressivism, liberalism whatever. It's all the same.) All his initiatives will be shot down but he can claim to be a martyr to the party of No. (Who will be joined in the Senate by Lieberman and whatever centrist Democrats who are up for reelection in 2012.) But this seems to be the path to a one-term presidency to me. Maybe that's what he wants. He could retire comfortably to the deanship of some Ivy League law school and make a lucrative killing on the rubber chicken circuit.
But lets assume he wants to get back in the White House in 2012. One way to get back in touch with the voters is to start getting serious about foreign policy which has either been a joke (Remember the reset button?) a travesty or just copied from the Bush administration. In particular the Obama administration has completely failed in stopping Iran from gaining nuclear technology, sponsoring terrorism in Iraq, Afghanistan and Lebanon, and oppressing its own people. War with Iran would enhance his standing with Conservatives (hey it works for me!) most liberals would go along with it and the extreme Code Pink type loonies can safely be ignored. I say it happens before November 2012.
About a month ago, at the end of August, I finished a 10-day Vipassana meditation course. This was probably one of the more extreme activities I have ever participated in, and it's well worth a blog post.
I found out about the course in a ridiculously trivial way, by following a link in a Reddit comment (I wonder if I could track down that comment...). The website referenced by the comment contained (almost) no new-agey mumbo-jumbo and looked legit in general. I also appreciated the fact that this was a relatively serious and intensive course, which should be enough to form a reasonably founded opinion on meditation in general. When learning sporadically, in small bits, it is hard to say whether the material itself is no good, or you just do not understand it yet and need to study more; I was quite skeptical towards the practice, but wanted to give it fair trial. I was quite impressed that there was a course available in Lithuania, a few hours by train from where I live. Finally, the course was free (by tradition Vipassana is taught without monetary compensation). I went ahead and signed up for a standard introductory 10-day course.
Vipassana (also called insight meditation) is a meditation technique allegedly coming back from Gautama Buddha himself (well, all the traditions like to claim that origin...). It has been experiencing a renaissance, partly due to an organization set up by a meditation teacher S. N. Goenka which has founded meditation centers all over the world.
The essence of Vipassana is a method of teaching your mind to act instead of merely reacting to outside stimuli such as pain, anger of other people or hardships. The technique provided is to monitor your sensations, watch them with equanimity and suspend any reaction, and slowly it sinks in that all things are temporary and you can choose what to react to and how. That's the basic idea; I don't want to go deep into exposition of Vipassana as there is plenty of information about that (also at the same time the information is almost useless because you have to experience it to really understand it). Instead, I will sure some of the more personal remarks and experiences.
The course took place in an cottage near Kretinga, housing around 50 people. The living conditions were absolutely great, and this would have been a true holiday if not for the regime and the rules. The day would start very early, at 4 AM (ending at around 9:30 PM), and we'd do about 12 hours of meditation in total inbetween, with occasional breaks, but the most gruesome part is that no communication at all was allowed with anyone except the manager of the camp (and the teacher during a specified time). That gets to you after a few days, but still, there are people around you, so it's bearable; on the other side, the senses (touch, smell) become very acute. The food was taken care of by volunteers (students who have finished the course), and I could say it was quite good actually. The goal, of course, was to keep the environment from interfering with meditation, and I think it was done very well.
The presentation of the actual technique also did not disappoint. Each day a new step would be introduced, with the whole day to practice before moving on. Looking back, the pacing worked well. Every day in the evening there were lectures on theory. They were somewhat informative, but also sometimes annoyingly primitive and verbose. The little mistakes, holes in logic and slight doses of mumbo-jumbo almost drove me nuts by the middle of the course, until I learned not to react to them. Despite the shortcomings of presentation, the simplicity and lucidity of the practice and lightness of theoretical baggage really appealed to me. The whole organisation in general gave the impression of complete transparency, with no strings attached, no financial interests in play and no agitation for further involvement.
While there are many meditation techniques, I am happy that I've gone with Vipassana in particular for one reason: Vipassana meditation uses no artificial tools to help you concentrate, such as mantras, visualisations, counting, etc. Such methods make concentration much easier, but they also create a dependence on the methods themselves. I appreciate the purity of Vipassana in this regard.
Not everything in the practice is roses though. First, a particular worldview supported by Vipassana is presented as "scientific" and supposedly "the right way to live", and if even if you don't agree, "the truth" of Vipassana will become obvious to you with time. This is a distinctive mark of ideologies. The thing that makes everything break is the reincarnation, which is generally assumed as true, even if it's not shoved down the student's throat. Every rationalization of a world view has a "white lie" (usually related to the concept of eternity somehow) at the core, and in this context reincarnation is it. Given what we know now about the relationship between the mind and the body, reincarnation is absolutely ridiculous and completely untenable, and that breaks all "moral" reasoning for practicing meditation as opposed to doing something else. I'm not the first to bring up this problem, there's plenty of material about it online.
The second slippery idea is that the concept of "negative happiness" is central in Vipassana, that is: happiness is defined as lack of suffering. This point is not that unreasonable actually, from personal experience I could indeed call the state of non-suffering happiness, but there is definitely something missing when compared to the state of mind when I'm truly, positively happy. Whether you consider that something important or not, it's definitely there.
Third, Vipassana suggests that it is only you who is at fault when your inner state is disturbed; the world affects you as much as you let it, and in order to find happiness you should learn to control the "interface" rather than the outside world, which will usually not behave as you want. This may be correct, but sometimes it could just be easier to fix the world rather than change yourself, and I have the suspicion that it this is much more frequently the case in the modern world compared to the pre-modern environment. (This is one of the points which break when reincarnation is rejected, as with reincarnation you have the whole eternity to fix yourself.)
While the complaints are serious, they do not mean complete rejection of Vipassana but rather integration among the various other techniques available. The actual meditation technique is still great for gaining and maintaining mental composure, reducing anxiety and improving well-being. Now, if I could only get used to meditating regularly...
If you have the chance, I highly recommend you try out an introductory 10-day course. There is little to lose and a lot to gain. And if you do go ahead, I have two hints. First, do not even think about leaving the course before it's over. Any hardships are temporary and will be overcome quickly. Second, use the time with the teacher, those interactions were very helpful to me. Also, given the "noble silence", talking to someone once in a while will not hurt.
During my recent trip to Massachusetts for CalConnect XIX I passed back via New York, surfing a few nights on the couch at the Washington Cube Garden1. This was just enough time for my new Davis VantagePro2 to arrive by UPS ground (phew!) causing me much consternation, as the box was about twice as wide as I expected it to be.
On opening it I discovered that the reason for the size was the physical dimensions of the rain gauge, leading me to realise that I had actually bought exactly what I wanted: a high quality weather station. Also leading me to wonder how the hell I was going to get it halfway around the world with me the next day.
Unfortunately that extra wide carrying case was in no way going to fit inside my suitcase. Fortunately it came with a handle. And those wonderful people at Air New Zealand gave me a Koru Gold upgrade for a 50th birthday present, so it was time to put it to the test...
Travelling on the subway out to JFK was it's own little adventure, but I made it out to terminal 5 and wandered around a bit before concluding I needed to be in terminal 7. Once I was in the right place I found the fancy people's check in counter and the nice lady there was only too happy for me to carry it to New Zealand, though she did aver that perhaps the security scanners would be dubious. Not a hitch there though: I guess they're used to letting everything through that's not specifically denied, so weather stations are fine because nobody would be silly enough to even think of doing that...
Being Koru Gold really helped at this point though, because it enabled me to
In our first few years, Ubuntu experienced explosive growth, from zero to millions of users. Because Ubuntu is an open project, these people don t just use Ubuntu, but can see what s happening next and influence it through suggestions and contributions. The volume of suggestions quickly became unmanageable through ad hoc discussion, because the volume of feedback overwhelmed the relatively few people who were actively developing Ubuntu.
In order to better manage user feedback at this scale, Ubuntu Brainstorm was created in 2008. It s a collaborative filtering engine which allows anyone to contribute an idea, and have it voted on by others. Since then, it s been available to Ubuntu developers and leaders as an information source, which has been used in various ways. The top ideas are printed in the Ubuntu Weekly Newsletter each week. We experimented with producing a report each release cycle and sharing it with the developer community. People have been encouraged to take these suggestions to the Ubuntu Developer Summits. We continue to look for new and better ways to process the feedback provided by the user community.
Most recently, I asked my colleagues on the Ubuntu Technical Board in a meeting whether we should take responsibility for responding to the feedback available in Ubuntu Brainstorm. They agreed that this was worth exploring, and I put forward a proposal for how it might work. The proposal was unanimously accepted at a later meeting, and I m working on the first feedback cycle now.
In short, the Technical Board will ensure that, every three months, the highest voted topics on Ubuntu Brainstorm receive an official response from the Ubuntu project. The Technical Board won t respond to all of them personally, but will identify subject matter experts within the project, ask them to write a short response, and compile these responses for publication.
My hope is that this approach will bring more visibility to common user concerns, help users understand what we re doing with their feedback, and generally improve transparency in Ubuntu. We ve already selected the topics for the first iteration based on the most popular items of the past six months, and are organizing responses now. Please visit brainstorm.ubuntu.com and cast your votes for next time!
/var/lib/apt-xapian-index/README, since the index is self-documenting.
As usual in my apt-xapian-index posts, here is a code example:
#!/usr/bin/python # coding: utf-8 # Show packages that were NEW in the last N days # (C) 2010 Enrico Zini <enrico@enricozini.org> # License: WTFPL version 2 (http://sam.zoy.org/wtfpl/) import axi import xapian import time import sys class App: def __init__(self, days): self.db = xapian.Database(axi.XAPIANINDEX) # Read the contents of /var/lib/apt-xapian-index/values self.values, self.descs = axi.readValueDB() # Find the value ID for the catalogedtime timestamps self.cattime_vid = self.values["catalogedtime"] # Filter packages first seen more than than X days ago self.query = xapian.Query(xapian.Query.OP_VALUE_GE, self.cattime_vid, xapian.sortable_serialise(time.time() - 86400*days)) def main(self): # Perform the query self.enquire = xapian.Enquire(self.db) self.enquire.set_query(self.query) # Sort by cataloged time self.enquire.set_sort_by_value(self.cattime_vid, True) # Print the first 200 matches = self.enquire.get_mset(0, 200) for m in matches: name = m.document.get_data() val = m.document.get_value(self.cattime_vid) fval = xapian.sortable_unserialise(val) tm = time.localtime(fval) timestr = time.strftime("%c", tm) print "%s %s" % (timestr, name) if __name__ == "__main__": try: days = int(sys.argv[1]) except: print >>sys.stderr, "Usage: %s days" % sys.argv[0] sys.exit(1) app = App(days) app.main() sys.exit(0)Enjoy!
Last week, I wrote a couple of patches to add support for transparency when
Emacs is displaying GIF images. Until now, it was displaying the color used
to define transparency in the file data. Now it displays the image correctly
by using the frame color as the transparency color, like it's done for other
image formats.
The patches have not been merged yet, but will probably be soon.
I recently added a solid-state drive to my desktop computer to take advantage of the performance boost rumored to come with these drives. For reliability reasons, I've always tried to use software RAID1 to avoid having to reinstall my machine from backups should a hard drive fail. While this strategy is fairly cheap with regular hard drives, it's not really workable with SSD drives which are still an order of magnitude more expensive.nice ionice -c3 rsync -aHx --delete --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/home/* --exclude=/mnt/* --exclude=/lost+found/* --exclude=/data/* /* /mnt//dev/sda1 / ext4 discard,errors=remount-ro,noatime 0 1
echo noop > /sys/block/sda/queue/scheduler
echo 1 > /sys/block/sda/queue/iosched/fifo_batch
echo 0 > /sys/block/sda/queue/add_random
Next.