Search Results: "tim"

26 February 2008

Russell Coker: Chilled Memory Attacks

In 1996 Peter Gutmann wrote a paper titled “Secure Deletion of Data from Magnetic and Solid-State Memory” [1]. In that paper he mentions the fact that the contents of RAM last longer at lower temperatures and suggests that data could be retained for weeks at a temperature of -60C or lower (while 140C causes rapid data loss). The paper also addresses issues of data recovery from hard drives, but given that adequate CPU power for encryption is available recovering data from a disk shouldn’t be an issue unless thee attacker can get the key to decrypt it or crack the algorithm - so disk recovery is not a hot issue at the moment. Recently some researchers at Princeton University have published a paper describing in detail how to chill RAM to make it keep its data after a power cycle and even after being installed in a different computer [2]. This attracted a lot of attention, while Peter’s paper described the theoretical concept (in great detail) the Princeton group showed how to implement the attack using materials that are commonly available. Most of the analysis of this misses some fundamental points. Any suggestion that you can wipe the RAM on power failure or on boot misses the point entirely. If an attacker can chill a DIMM and then remove it from the system then there is no chance for it to be wiped. Maybe if you had security on the PC case to detect case opening (some servers have a basic version of this) such things would do a little good, but it shouldn’t be difficult to bypass in most cases. Another common flawed analysis is to suggest that this is no big deal because sniffing the memory bus has been possible for years. While it has always been possible for government agencies and companies who design motherboards to sniff the bus, for most potential attackers it has been overly difficult. When considering the effectiveness of a security system you should first consider what your threat model is. Who is going to attack you and what resources will they be willing and able to devote to the attack? An organisation that is prepared to use expensive equipment and highly trained people to break your encryption probably has other methods of gaining access to your secret data that are easier and cheaper. The research from Princeton suggests that I could perform such attacks with my spare time and with equipment that is very cheap. I’ve been idly considering doing this to an old PC just for fun! Therefore I have to assume that everyone who has the same amount of skill and money as me can potentially compromise my data if they capture one of my machines. It is still most likely that if anyone steals my laptop they will want to sell it and use the money to buy drugs. I don’t think that I have any data that is anywhere near valuable enough to justify a targeted mugging. But my procedures (in terms of changing passwords etc) in the case of my laptop being stolen now need to be scaled up due to the ease in which data might be compromised. The best way of dealing with this would be to have the decryption keys locked inside the CPU (stored in registers or memory that’s locked in the CPU cache). The possibility of getting a modern CPU to operate at any temperature approaching -60C is laughable, and the CPU is a well contained package that can operate on its own and is difficult to attack. This would make things significantly more difficult for an attacker while requiring little effort (in fact it might be possible to lock data in the CPU cache already in which case a software change is all that is required). Update: A comment by Mike made a good point about CPU cooling. Toms Hardware performed an overclocking experiment (from 3.2GHz to 5.25GHz) and used liquid nitrogen cooling [3]. It might be possible to cool a CPU core to -60C in a reasonably small amount of time. But I still believe that it would raise the bar enough to make it worth doing. Update2: Thanks Jaime for the spelling advice.

MJ Ray: Work Trip Goes Wrong

Yesterday really didn't go to plan. The plan was to clear a few work tasks and then travel to London for an early afternoon Koha-related meeting, then fix some other problems on site before travelling home this evening. Unusually, this trip involved bike, train, tube coach and bus. Everything but the car, indeed, so a pretty good example of using greener transport for TTLLP. Got about 80% of the work tasks done (not bad), biked to Worle station and caught the train, then changed to a high-speed train at Bristol. So far, so good. I spotted our Member of Parliament changing trains in Bristol too. I did a double-take, which I think he noticed - he's in the local papers every week or two, but he's not that visually distinctive and looks superficially similar to my last MP. Didn't harangue him this time - he was queuing for coffee, while I wanted to visit the buffet. Anyway, about 10 minutes before arrival in London, someone walked onto the tracks near Southall. We reversed into Slough and were eventually told to travel via Windsor into Waterloo (I think if they'd been a bit quicker, I could have saved 30 minutes). I planned to arrive in London 75 minutes before my meeting, but this happened at about the most delaying point, so I was actually 70 minutes late and missed the whole thing. Damn. Of the three on-site problems, I fixed one and made progress on one, but that fixed one means that we can continue working remotely on the others, so not a total failure. The coach back to Bristol was fine - once it stops weaving around London, it's as comfortable as an unrefurbished HST (not quite as much leg or arm room as a current one). The bus to Worle was awful, bouncy as hell and badly-driven, stopping ahead of the lines at red lights. It's also expensive (thanks to First's route monopoly?) - in future, I'd walk 15 minutes and pay 30p more for the train. The above was written on the return journey, then bluetoothed here. Now it's time to catch up with the stack of emails and back to work.

Michael Prokop: Linux Live-CD grml 1.1 - Codename Skunk

It’s done, we have new releases of grml, the Debian-based Linux Live-CD for sysadmins and texttool users:
  • grml 1.1 (32bit) - Codename Skunk
  • grml64 0.2 (64bit) - Codename Schwammerlklauber
  • grml-medium 0.1 (32bit) / grml64-medium (64bit) - Codename Pfuh
  • Screenshot von grml 1.1 It’s the first stable release being based on our new build-framework grml-live which itself is based on FAI (Fully Automatic Installation). Thanks to grml-live we can provide you a new grml flavour grml-medium which tries to close the gap between grml-small and grml. As usual you’ll get software and kernel updates, many new packages and features plus additional hardware support. We are using LZMA compression for squashfs and provide several additional kernel modules like atl2, iscsitarget, madwifi and (for the first time) loop-aes. Oh and the grml release is known to work fine on the Asus Eee PC - LAN, WLAN and webcam working out-of-the-box! Find all the glory details about the new releases in above mentioned release notes or just visit grml.org. For german readers there’s an article about the new release at pro-linux.de. BTW: On the next weekend (1st and 2nd of march) we - the grml team) - will present the new release on Chemnitzer Linuxdays at the grml booth. grml-CDs, grml-shirts und (new!) “ready to go grml-usb-pens” will be available as well as the chance to talk to us in reallife. 8-) So, we wish you a fast download and hope you enjoy the new release! :-)

    Ondřej Čertík: XFS is 20x slower than ext3 (with default settings)

    Is XFS that bad? Well, at least with default settings, XFS on Debian seems to be blown away by ext3 completely in terms of speed. I don't mind 1.5x slowdown, maybe even 2x, but 20x is a show stopper. I am already using ext3 for any pbuilder builds, because it's a difference to wait for 30s with XFS, compared to 3s with ext3 to extract the base image. And I'll probably switch to ext3 completely, unless someone finds a way how to fix this.

    I recently got burned by this when running Sage on my computer, because it compiles a lot of Python files when started for the first time. Normally it should take roughly 15s, but instead it took 6 minutes on my comp and then it triggered a so far undiscovered bug in Sage, that I reported.

    Michael Abshoff, the release manager of Sage, suggested that something is FUBAR (Fucked Up Beyond Any Recognition) on my shiny Debian amd64 sid system running on Intel Core Quad, so I said no way, because I really care about this machine, as I use it for larger finite elements calculations and other stuff (like compiling huge deb packages in parallel, like paraview).

    So I offered a bet, that I give him an access to this compter, he finds the problem and if it's a problem in my Debian configuration, I'll write to this blog that I am lame, while if it's a problem in Sage, he will write to his blog that he is lame. And I was smiling to myself, how good I am and that I will have some fun too reading planet.sagemath.org with the top post from Michael saying that he is lame.

    But then I remembered my old struggle with cowbuilder and XFS and I stopped smiling. See e.g. this wiki I created half a year ago. Something is FUBAR with XFS and Debian. I also asked on the Czech server Root, that is famous for having a lot of experts willing to share their knowledge, and it was quickly revealed, that the problem is with the "nobarrier" option of XFS (my post is here, but it's in Czech).

    First, on that amd64 machine, the above problem was fixed after issuing this command:

    mount -o remount,rw,nobarrier /dev/sda3 /home/

    (notice the "nobarrier" option). You can read some background behind this on the lkml list. Unfortunately, I also have my laptop, and there I already use this "nobarrier" option, and it doesn't help at all. I just created a new ext3 partition and verified that on my laptop, ext3 is around 10x faster than XFS with nobarrier (that was supposed to fix this). I use the latest 2.6.24 kernel from unstable on both.

    Time to move from XFS to ext3 on my laptop? Seems like that. I'll leave XFS on the other machine, because I know some other peole have good experience with XFS and the "nobarrier" option seems to fix the problem there.

    But as to the bet, yeah, I am lame and I should still learn a lot from Michael. :)

    25 February 2008

    Matthew Palmer: IEEE, Thou Art Clowns

    Ever since I started University, I've been a member of the Institution of Electrical and Electronic Engineers. Although I don't really do what you would call "Engineering" any more, I like to read the IEEE Spectrum magazine and some of the Computer society journals are quite relevant to what I do. However, this year the IEEE have produced what is, without a doubt, one of the most shithouse online ordering systems I have ever had the misfortune of trying to use. To start with, if you happen to go to the account login screen with cookies disabled, you get a page that is utterly blank. I've seen a lot of ways to fail to handle cookies, but I think the completely blank page is a first for me. Once you work out what's going on and log in, you're presented with a long and painful journey through a series of "checkout" pages, mostly alike. I think I got presented with my list of journals about four times. After navigating that pest, it comes up with this little gem when you start the credit card processing step: To Back, or Not
  To Back Then, every time you input practically anything into the form, it does a Javascript submit and does things to the form. For example, when you enter your credit card number, you get a form back that has blanked out all but the last four digits of the card number. OK, a little dumb, but not spectacularly so. Although, when you're a quick typist and have filled in the next three fields while the web browser was playing footsie with the slow-as-molasses web server, only to have that data wiped out when the page refreshes, is a bit of a pest. Far more annoying is when you start entering your address "for verification purposes". Here, you get a form resubmit every time, presumably to update the form based on (for example) your selected country, but not a lot changes. Even though I picked Australia, I still got a pull-down with all of the the US states in it. You could short-circuit all this with the "choose existing address" option, except that (despite me being logged in) my existing addresses aren't in a select box, but in a separate pop-up window (which didn't actually display anything after all). In short, the IEEE's online renewal system is a disgrace, and is an embarrassment to what is purportedly a technical organisation.

    Sergio Talens-Oliag: Still Alive

    Today I've noticed that my last post was on August and I've decided that I'm going to try to keep this blog alive. Since this summer I've left the University and now I only have two jobs... my daily work and my son; I believe that things are going better at a personal level, but the truth is that lately I have near zero time to devote to Debian and Free Software in general. As I don't want to leave the FLOSS world and I'm still able to do some sysadmin related tasks at work and at home I've decided that I'll try to reserve some time for blogging about them. I'm also thinking about starting a blog and a wiki in Spanish, mainly to be able to publish some of the documents I write at work about our installations, the advantage for me is that I can publish them with a little revision and that is much faster than translating them into English. Anyway, before creating new blogs my first task is to finish my home server migration; I'm moving all the services that were running on my old PowerBook (PowerPC @ 400Mhz, 378MB of RAM, 10 GB HD) to my other PowerBook (PowerPC @ 1Ghz, 768MB of RAM, 60GB HD), as I haven't used it for ages and I still use a lot the old machine. On the move I plan to change a lot of things, the machine is going to run multiple vservers and I plan to change a lot of the software I was using, always trying to simplify the maintenance and/or get more performance from the new machine: I'll try to blog about this new installation once it is done.

    Joerg Jaspert: New FTP Assistants

    As you probably know (well, in case you read d-d-a (hello man-di)), we got two new people as FTP Assistants. While I disagree with the way it went, it’s a good thing to not have NEW, removals and override changes a (pretty much) one man show. OTOH I am also pretty reluctant to having others do NEW, as the long time I am now doing it makes me feel about it like - well “it’s my baby”, or something like that. It’s just that I processed a lot of packages, rejected even more and (mostly) had fun doing it. (And I hate to share fun, HA :) ). But I understand the need of having more people doing it, so today I gave an introduction to Thomas and Kalle. Now they at least know where to start. And while that took somewhere around 2 hours - its still only an introduction. I bet there will be many more questions when they do more than just reading the large amounts of text I flooded into the ftp teams IRC channel. :) But that should work fine, I am online most of the day - and then there are the other ftpteam-members and ftpmasters in the channel, someone should be able to respond sooner or later. :) And now some real content. The ultimate way to get a totally bug free Debian:
    for i in $(dak control-overrides -t dsc -l awk ' print $1 '); do
     dak rm -m "Cleanup" -C package $i
    done
    
    Don’t try this at home, kids. (Yes, a nice DELETE FROM $correct_table in projectb also works, but isnt as much fun! The above gets you nice and pretty logs in the removals.txt and also nice and pretty mails to the package address!)

    Sune Vuorela: Fosdem2008

    First time ever I have been at a conference and attending so few talks. Needed to talk to sooo many people. But anyways, it was quite interesting to put some faces of the people I kind of work with. Especially my favourite kde upstream people. So many keys to sign, but I guess I am finally thru it. If you are expecting a signature from me and haven’t got one yet, please check your spam filters and/or try poke me. I guess I will keep my paper notes a couple of days before ditching them. Beer event was bigger this year, but still too crowded. Fosdem is also quite crowded - so crowded that I missed some talks because of it. But anyway, see you next year - probably.

    Sylvain Le Gall: Back from FOSDEM

    I have spent one day and a half this week-end at FOSDEM. This was not as great as expected, but mostly because i don't have the time to stay the whole sunday. Next year, I will stay the whole week-end in order to have time to attend all the speak i should be interested in. The beer event was overcrowded, but all the beer i found there was great (in particular the Floris Pear). It was also a great time to have a demonstration of the XO OLPC laptop. This little thing is funny, but i don't get the way the UI should be used. Another bad point, is that the first console allow to login as root by pressing "Enter" (at least on the one i try). I suppose this kind of device is not intended to be secured. I also have time to talk with some Debian people and some other people -- in particular one who was thinking that Windows 2000 is the best ever OS. At least, it means that there were people from different horizons -- and this is a good thing. During Saturday, i spend half of the day in the big amphitheater (Janson). The talk about Tux with Shades (Linux in Hollywood) was impressive, regarding the trailer they show us... The talk about FreeBSD was interesting -- but not impressive as a trailer. I spend Saturday afternoon in the Debian devroom, following all the different talks. I miss the one from MadCoder about managing packages with git... That's a shame because i really want to see this one. Since my train was at 12am on Sunday, i choose to only pay a visit to the different booths. I have the pleasure to have a demonstration of the EeePC on the Debian booth that really please me. I found the UI more easy to understand than the one from XO. Speaking with the person demonstrating the laptop, she explained me that EeePC is more "standard desktop" and XO more "creative desktop". Conclusion: i am not creative ;-) Also talking about everything around talks and the meeting, i think Bruxelles is a really nice city for this kind of events. ULB is not near the center of Bruxelles but there are enough transportation. There was really a lot of people attending FOSDEM, and this is a good thing. I also have the pleasure to find some people from the OCaml Meeting.

    Julian Andres Klode: pristine-deb - git-buildpackage s pristine-tar support


    Reading about the idea of pristine-deb, I actually noticed that using ar -rc file.deb debian-binary control.tar.gz data.tar.gz does not work, due to timestamps and other differences. I am currently working on a pristine-deb program which will workaround all these issues. It will be able to work with git repositories like pristine-tar and uses pristine-tar for control.tar.gz and data.tar.gz. I may also add a function to decompress all compressed files (like changelog.gz) and uses pristine-gz to compress this file again before adding it to the tarball. This may save some additional space. BTW, git-buildpackage now supports pristine-tar. Simply enable it with “pristine-tar = True” in gbp.conf. Thank you Guido Guenther, for adding these patches.

    Lucas Nussbaum: back from FOSDEM

    I was at FOSDEM last week-end. As usual there, I spent an excellent week-end. It was really nice to see all those friends again (and even meet some friends for the first time, hi gaston/carxwol/atmaniak!) Only problem is, FOSDEM is definitely too short ;-) To make this post a bit more interesting, I did some homework. The opening talk about FreeBSD had those stats about developers’ age, so I made the same ones for Debian (using the birthDate LDAP field, which was filled in by 340 DDs). Here is the graph. It would be interesting to compare that with other communities, which are sometimes perceived as “younger”. DD years of birth

    Benjamin Mako Hill: My Spring

    I'm going to be traveling and giving talks quite a bit this spring. Here's what my schedule looks like now. I don't think much will be added to it: I'll be giving at least one talk at the FSF Members Meeting, the Renaissance Panel, Lugradio Live, Penguicon, and Community One. Matt's wedding is private. To join the FSF members meeting you must become an FSF Associate Member if you are not already. All of the other conferences require some sort of registration. Penguicon, Lugradio Live, and ROFLCon are each cheap and each promises to be a lot of fun. The talk at Hampshire should be free and open to the public. I'll be posting more about each of these as things get closer including details about what is that I'll be talking about. If you'd like me to talk to another group or at another event while I'm town for any of the events above, now would be a good time to ask. If you just want to meet up for a beverage of your choice, that's good too. In either case, get in contact.

    Uwe Hermann: Lest We Remember: Cold Boot Attacks on Encryption Keys

    Just in case you haven't already read about this... Some researchers from Princeton have published a paper about methods which can be used to attack full-disk-encryption (FDE) schemes. They have demonstrated that at least BitLocker (Windows Vista), FileVault (MacOS X) and dm-crypt (Linux) are vulnerable to this type of (partly hardware-based) attack scenarios. Quite likely lots of similar other solutions are vulnerable as well. The main problem is that (contrary to popular belief) RAM does indeed retain its data for a non-trivial amount of time after power is cut (seconds, even minutes or hours if it's cooled down enough), so you can mount some new attacks such as: Yes, all attacks assume that the attacker has physical access to your PC/RAM, in which case you already have several other problems. Still, the new thing about this is that even full-disk-encryption doesn't help much in some cases. You probably shouldn't depend too much on it (but you shouldn't stop using disk encryption either, of course!). Full paper: coldboot.pdf. There are also some demo videos and pictures. More coverage at Boing Boing, Bruce Schneier's weblog, Freedom to Tinker, Slashdot, Heise (German), and many more... Make sure to read the comments of the various articles for more scenarios and possible ideas for how to prevent such attacks. Some ideas include enabling the BIOS RAM checks (which might explicitly erase RAM contents on reboot; that doesn't help in all cases, though) or using coreboot (previously LinuxBIOS) to erase RAM contents at boot-up and/or shutdown. It's a highly non-trivial issue, though, there's no easy and complete fix so far. The only sure way is to not have your laptop or PC stolen and to not give attackers physical access to your computers.

    Michal Čihař: Gammu test version 1.18.91

    New Gammu testing version is out. This time release period is a bit longer than usual, mostly because my moving back to Prague. 1.18.91 again only fixes some bugs: You can download from usual place: http://cihar.com/gammu/. PS: Debian users can get packages from experimental.

    Pierre Habouzit: Dear John

    wrt your issue yes it's true that for short series of patches, it's often asked to rebase it on a clean state if it doesn't merges fully, though if you're doing a complicated work, meaning dozens of patches e.g., it's usually two things: When this happens, upstreams are usually okay with merging from a public repository that you would set-up. Though, it's usually a tiny more work for the upstreams to work with a new remote repository, and those are only used for these cases. Also note that upstream could really fake the same work branching off from the point you branched off, and using git-am from that point instead of git am -3 on the top of the current devel branch (which is similar to a rebase, hence creates new sha's). IOW, it's not really a git deficiency (even if git-format-patch could maybe annotate _more_ where it comes from, and git-am grok that to re-create a topic branch from that) as git has the features, just that it probably doesn't make it easy enough, and that people usually don't care enough for very short series.

    24 February 2008

    Joey Hess: grapefruit

    Today's xkcd reminds me that about 15 pounds of grapefruit into this year, I tried to calculate how many I could eat a day, if I were to do were peel and eat grapefruit, all day. I may have been trying to figure out if it is possible to live on a pure grapefruit diet. I remember arriving at a figure around 70. My actual daily consumption at the height of grapefruit season is 3 to 5. It's become my favorite winter fruit and quite puts one off nasty sweet oranges. There's a trick to both the peeling and the eating of grapefruit which the xkcd guy has apparently never learned, that avoids the healhful skin and leaves only the delicious tart flavour droplets behind. I'm available for lessons, the first 2 or 3 weeks that the Texas ruby reds are in season.
    (Of course as wrong as Randall is about grapefruit, he's 5 million times as wrong about a proper tomato..)

    Russell Coker: EeePC for a Teenager

    I was asked for advice from a non-technical person about buying a laptop for their 15yo daughter. They were looking to spend $200 or $300. I suggested that stretching their budget to $500 for a new EeePC would be a better option than the risks associated with a second-hand laptop (laptops are all different in their hardware). I also suggested that waiting a few months to see what happens with the new EeePCs might be a good idea. There are rumours about the development of new EeePC models with bigger screens, this would be a benefit for those who can afford it, and for those who can’t the current model may drop in price. They took that suggestion very well and I suspect that they weren’t planning to purchase in the near future anyway. I asked for advice on the LUV mailing list [1] for further suggestions that I could offer. One suggestion was that larger laptops of a more traditional design have been driven down in price recently and might be worth considering. I will have to mention it, but suggesting that someone who wants to spend $200 should spend $500 seemed enough of a stretch, suggesting that they spend $700 or more might not be taken well. Of course there is the weight issue that Matt raised in a blog post [2]. The last thing I want to do is to convince people not to buy computers for their children! A complaint was raised about the size of the keyboard in the EeePC (personally I wouldn’t want to use anything smaller than the T series Thinkpad I’m using now). In a quick google search the best information I could find about average finger sizes was the Danforth Diamond blog [3] which says that in the US women average a ring size of 6 while men average 10. According to the ring sizing page on the same site [4] that means ring finger diameter of 16.5 and 19.8mm respectively. So it seems likely that given the same level of typing skill an average woman could happily use a keyboard that’s 83% the size of the keyboard that an average man uses. Of course there’s a lot of variation between individuals, for example my fingers are thinner than average and I prefer a full-sized keyboard. One thing I recommend when considering a keyboard (or a laptop) is to type your name a few times quickly. Typing something about a quick brown fox will take some thought, but typing your own name requires no thought so you can concentrate on the feel of the keyboard. Using this method it is very easy to go to a store and determine whether a laptop is likely to suit you. The screen resolution and size is a significant issue, one EeePC owner described it as “too small to do anything useful“. Rumour has it that the next version will have a screen that’s a significant increase in size and resolution. A final interesting comment was about the social aspect of owning a laptop. The suggestion was made that a teenager who owned the smallest (and possibly cheapest) laptop in class might have other kids tease them about it. I will be interested to see comments on this issue, it had never occurred to me that the laptop use in schools would be high enough for the ownership of any type of laptop to be a cause for harassment. Also I’m not sure which would be considered as being of lower status, an old second-hand laptop or a new low-end laptop. I’m pretty sure that owning either would be considered to have higher status than having no laptop. A quick scan of the GraysOnline.com.au auction site suggests that a second-hand Pentium-M laptop (a few years old) could be purchased for about $550 and a Core 2 Duo based laptop might go for about $700. So it seems unlikely that for less than $500 you could buy something suitable for a novice user (something that will just work with recent software). I’m not planning on offering the full IT support package that I offer to my relatives so I can only recommend things that can be self-supported. Of course as the people doing the buying seem to have no definite plans for the use of the computer then anything they buy will fail in some way to meet the requirements that they discover. :-# Update: fixed a bad link.

    Jaldhar Vyas: The 2008 Things Jaldhar Discovered Last Year That Everyone Else Knew About Already Awards

    And the Golden Sombrero goes to... Another awards show took place today but nobody is paying any attention to that. All of Hollywoods elite can be found at the King Plaza Buffet in Jersey City for the 80th annual Things Jaldhar Discovered Last Year That Every Else Knew About Already Awards. (Known in the industry as "the Golden Sombreros") Here is a list of the winners. Game: Hungry Hungry Hippos This game is awesome! But don't play with three year olds. They cheat. Book: Discworld series by Terry Prachett When The Color Of Magic came out in 1983, I dismissed it as merely "The Hichhikers Guide to Mordor" but last year I read it again and this time it grew on me. Since then I've been steadily reading the whole series since June at an average of one a week. Music: Rammstein Smell the umlauts! I have no idea what they are actually going on about but this is what Metal is supposed to sound like. Mental Condition: Oedipus Complex All of sudden last October or so, my son started screaming and crying whenever I got anywhere near my wife and he would cling to her like the proverbial limpet. Then three months later, just as suddenly, he stopped. Very strange, not to mention creepy. Linux command: grep --color=auto Everyone knows GNU ls can be colorized but did you know the same is true of GNU grep? I didn't. Why wasn't I informed of this earlier? L. Ron Hubbard Lifetime Achievement Award: Coke Zero I used to drink way more Coke than was good for me so I decided to give it up. Diet sodas don't taste very good so I was resigned to not drinking soda at all. Luckily for me Coke Zero has no calories or sodium but does have caffeine and a taste like actual Coca-Cola. Perfect!

    John Goerzen: Git looks really nice, until....

    So I have been learning about Git this weekend. It has some really nice-looking features for sure -- some things Mercurial doesn't have.

    I was getting interested in switching, until I found what I consider a big problem.

    Many projects that use git require you to submit things using git-format-patch instead of pushing/pulling from you. They don't want your merge history.

    git-format-patch, though, doesn't preserve SHA1s, nor does it preserve merges.

    Now, say we started from a common base where line 10 of file X said "hi", I locally changed it to "foo", upstream changed it to "bar", and at merge time I decide that we were both wrong and change it to "baz". I don't want to lose the fact that I once had it at "foo", in case it turns out later that really was the right decision.

    When we track upstream changes, and submit with git format-patch, the canonical way to merge upstream appears to be:

    git fetch; get rebase origin/master

    Now, problem with that is it loses your original pre-conflict code on a case like this.

    There appears to be no clean way around that whatsoever. I tried a separate "submission" branch, that rebases a local development-with-merge branch, but it requires a ton of git rebase --skip during the rebase process.

    Thoughts?

    Mike Hommey: Testing the crazy idea

    So, MadCoder had doubts about the crazy idea, so I took a little time to do a test with a package I maintain, namely, xulrunner. First, take all the deb files in the history of the package (at least, everything that is available on snapshot.debian.net today).
    wget -O - -q http://snapshot.debian.net/archive/pool/x/xulrunner/binary-amd64/Packages.gz gzip -cd > list
    awk '/^Filename:/ print $2 ' list xargs -I wget http://snapshot.debian.net/archive/
    Next, commit all these in a different repo per package name :
    perl -e 'use Dpkg::Version qw(vercmp); sub v my $f = $_[0]; $f =~ s/.*_(.*)_.*/$1/; $f print sort vercmp(v($a), v($b)); map s/^Filename: .*\///; $_ grep /^Filename:/ ;’ list while read f; do
        pkg=$ f%_*_*
        [ ! -d $pkg ] && mkdir $pkg && ( cd $pkg ; git init )
        cd $pkg
        ar -x ../$f
        mkdir data control
        tar -C data -zxf data.tar.gz
        tar -C control -zxf control.tar.gz
        git add data control
        git commit -q -m $f
        rm -rf data control data.tar.gz control.tar.gz debian-binary
        cd ..
    done
    Finally, evaluate sizes for each package, respectively, of all .deb files, their content imported in git (only the .git directory, including the index ; some space could be gained removing it), and the “optimized” git repository (after git gc, without modifying delta depth or window size, which may even improve the result)
    awk '/^Package:/ print $2 ' list sort -u while read p; do
        du -c --si $ p _*.deb tail -1
        du -s --si $p
        cd $p; git gc ; cd ..
        echo
    done
    17M total
    16M libmozjs0d
    4.7M libmozjs0d
    34M total
    31M libmozjs0d-dbg
    14M libmozjs0d-dbg
    4.7M total
    7.1M libnspr4-0d
    1.3M libnspr4-0d
    9.2M total
    12M libnspr4-0d-dbg
    2.8M libnspr4-0d-dbg
    25M total
    28M libnss3-0d
    4.6M libnss3-0d
    81M total
    61M libnss3-0d-dbg
    21M libnss3-0d-dbg
    15M total
    16M libnss3-tools
    3.1M libnss3-tools
    288M total
    265M libxul0d
    146M libxul0d
    2.0G total
    1.8G libxul0d-dbg
    1.1G libxul0d-dbg
    5.1M total
    6.8M python-xpcom
    1.1M python-xpcom
    2.5M total
    5.6M spidermonkey-bin
    861k spidermonkey-bin
    13M total
    14M xulrunner
    2.0M xulrunner
    3.3M total
    5.9M xulrunner-gnome-support
    979k xulrunner-gnome-support
    So these packages, stored in git, take between 15 and roughly 50 percent of the .deb size, which may be a nice improvement. Il would be interesting to know how these numbers evolve with time. Some files, such as the changelog.Debian.gz files, would also benefit from being stored in plain text instead of gzipped form. Note git gc took a while and a lot of memory for libxul0d-dbg. Also note these don’t include delta files that would be necessary to recreate the original .deb file, but this shouldn’t make a huge difference.

    Next.

    Previous.