Search Results: "tar"

7 March 2009

Lucas Nussbaum: Wysiwyg tool to create simple websites?

Hi, I m looking for a tool to create simple websites (5-10 pages), only static content (no PHP). Think of the typical small business or sports club website: text + pictures about what they did/do, nothing really complex. Requirements:
  • usable by a non-programmer who doesn t want to know about gory technical details (HTML, CSS, etc)
  • doesn t make it too hard to create a website with a few pages (i.e it should do a bit more than just allowing to create one page)
  • built-in support for (S)FTP uploading of the website, usable by a non-programmer after someone computer-litterate will have set it up. (that s not an absolute requirement, but would still be nice to have. also, what are the nice graphical tools to do that, currently?) I m asking for two different persons with different needs. So please don t limit your replies to free software (although it would be nice): cheap proprietary applications might be adequate as well. Regarding platform, Linux, Mac OS X or Windows would all be suitable. I don t think that a CMS is the right tool here: the focus should be put on the content (which won t be often modified anyway) and its presentation, not on the ease of modification. For example, I d like to be able to position pictures in a precise way. However, I might be interested in a CMS that is:
  • easy to setup (for a reasonably computer-literate person)
  • extremely easy to learn (a couple hours at most, for a non-programmer)
  • easy to transform into something that looks good In your comments, it would be great if you could include examples of what you did with those tools (yes, links are welcomed!) Thank you.
  • John Goerzen: My Week

    It s been quite the week. Stomach Flu Last Friday, my stomach was just starting to feel a little odd. I didn t think much off it a little food that didn t go over well or stress, I thought. Saturday I got out of bed and almost immediately felt like throwing up. Ugh. I probably caught some sort of stomach flu. I was nauseous all day and had some terrible diarrhea to boot. I spent parts of Saturday, Saturday night, Sunday, and Sunday night supervising some emergency downloads as the BOFH would say. By Sunday afternoon, I thought I was doing good enough to attend a practice of the Kansas Mennonite Men s Choir. I made it through but it wasn t quite as up to it as I thought. Monday morning I woke up and thought the worst was behind me, so I went to work. By evening, the worst clearly was not behind me. I was extremely cold, and then got very hot a few hours later. Tuesday I left work a little early because of not feeling well. Servers Wednesday a colleague called me at home before I left to say that the ERP database had a major hiccup. That s never good. The database is this creaky old dinosaur thing that has a habit of inventing novel ways to fail (favorite pastime: exceeding some arbitrary limit to the size of files that no OS has cared about for 5 years, then hanging without telling anybody why). My coworkers had been working on it since 5. I went into the office and did what I could to help out, though they had mostly taken care of it. Then we went to reboot the server. It didn t come back. I/O error on sda just after init started, and it hung. Puzzled, as it just used that disk to boot from. Try rebooting again. This time, I/O error as the fibre channel controller driver loads. Again, puzzled as it just used that controller to load grub. Power cycle this time. And now the server doesn t see the fibre channel link at all. Eep. Check our fiber optic cables, and power cycle again. And THIS time, the server doesn t power back up. Fans whir for about a second, then an ominous red light I never knew was there shows up. Eeep! So I call HP. They want me to remove one CPU. Yes, remove one CPU. I tried, and long story short, they dispatch a local guy with a replacement motherboard. Can you send along a FC controller, in case it s dead too? Nope, not until we diagnose a problem with it. Local guy comes out. He s a sharp guy and I really like him. But the motherboard wasn t in stock at the local HP warehouse, so he had to have it driven in from Oklahoma City. He gets here with it by about 4:30. At this point the single most important server to the company s business has been down almost 12 hours. He replaces the motherboard. The server now powers up yay! And it POSTs, and it . doesn t see the disks. !#$!#$ He orders the FC controller, which is so very much not in stock that they can t get it to us until 8:30AM the next morning (keep in mind this thing is on a 4-hour 24/7 contract). Next morning rolls around. Outage now more than 24 hours. He pops the FC controller in, we tweak the SAN settings appropriately, we power up the machine, and . still doesn t see any disks, and the SAN switch still doesn t see any link. EEP! Even the BIOS firmware tool built into the controller doesn t see a link, so we KNOW it s not a software issue. We try plugging and unplugging cables, trying different ports, everything. Nothing makes a difference. At this point, while he ponders what else he can replace while we start migrating the server to a different blade. We get ERP back up on its temporary home an hour later, and he basically orders us every part he can think of while we ve bought him some room. Several additional trips later, he s replaced just about everything at least once, some things 2 or 3 times, and still no FC link. Meanwhile, I ve asked my colleague to submit a new ticket to HP s SAN team so we can try checking of the switch has an issue. They take their sweet time answering until he informs them this morning that it s been *48 HOURS* since we first reported the outage. All of a sudden half a dozen people at HP take a keen interest in our case. As if they could smell this blog post coming So they advise us to upgrade the firmware in the SAN switch, but they also say we really should send this to the blade group; the problem can t be with the SAN and of course the blade people are saying the problem s GOT to be with the SAN . We try to plan the firmware upgrade. In theory, we can lose a switch and nobody ever notices due to multipathing redundancy. In practice, we haven t tested that in 2 years. None of this equipment had even been rebooted in 390 days. While investigating this, we discovered that one of the blade servers could only see one path to its disks, not two. Strange. Fortunately, THAT blade wasn t mission-critical on a Friday, so I power cycled it. And it powered back up. And it promptly lost connection to its disks entirely, causing the SAN switches to display the same mysterious error they did with the first blade the one that nobody at HP had heard of, could find in their documentation, or even on Google. Yes, that s right. Apparently power cycling a server means it loses access to its disks. Faced with the prospect of our network coming to a halt if anything else rebooted (or worse, if the problem started happening without a reboot), we decided we d power cycle one switch now and see what would happen. If it worked out, our problems would be fixed. If not, at least things would go down in our and HP s presence. And that worked? What? Yes. Power cycling the switch fixed every problem over the course of about 2 minutes, without us having to do anything. Meanwhile, HP calls back to say, Uhm, that firmware upgrade we told you to do? DON T DO IT! We power cycle the other switch, and have a normal SAN life again. I let out a WOOHOO! My colleague, however, had the opposite reaction. Now we ll never be able to reproduce this problem to get it fixed! Fair point, I suppose. Then began the fairly quick job of migrating ERP back to its rightful home it s all on Xen already, designed to be nimble for just these circumstances. Full speed restored 4:55PM today. So, to cap it all off, within the space of four hours, we had fail: Murphy, I hate you. The one fun moment out of this was this conversation: Me to HP guy: So yeah, that machine you ve got open wasn t rebooted in 392 days until today. HP guy: WOW! That s INCRED oh wait, are you running Linux on it? Me: Yep. HP: Figures. No WAY you d get that kind of uptime from Windows. And here he was going to be all impressed.

    6 March 2009

    David Watson: Operation DSLR is underway

    After getting back from a holiday where I got quite annoyed by my point-and-shoot camera, I have decided to get back into photography again (yet another expensive hobby). I am planning to buy myself a Canon 450D DSLR, so I'm having a fund raising ebay adventure starting with my nokia N810. So if you are interested in buying one head on over to http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=130291802752 and have a look.

    Daniel Burrows: Help make aptitude faster!

    I'm working on aptitude's dependency resolver at the moment. Mostly I'm working on some changes to support better UI, but while I have all the code in my head I'd like to try to fix some of the nagging speed problems it has. I've already managed to clear up some simple but large problems with aptitude safe-upgrade, because I could get them to happen on my computer. The problem is, most of these problems don't happen on my computer. I have a half dozen or so specific ideas that might speed aptitude up, but I don't want to just randomly apply tweaks without some baseline tests that I can use to make sure that I'm actually making things better and not just perturbing the code for no reason. :-) Plus, seeing why aptitude is actually running slowly might help when it comes to finding ways to improve its performance. So, this is where you come in. If you are using lenny and aptitude takes a long time to resolve dependencies on your computer outside of aptitude safe-upgrade, I would like to hear from you. All you need to do is to run this command when aptitude is slow, before you upgrade any packages:
    $ aptitude-create-state-bundle aptitude-state.tar.bz2
    
    Then, find a way to get the resulting large file to me. Email will work if your outgoing server accepts it; send to dburrows@algebraicthunk.net. That will tar up /etc/apt, /var/lib/apt, /var/cache/apt, and a few other directories: run aptitude-create-state-bundle --print-inputs to see exactly what it will include. Thanks! [UPDATE]: PS: please also include a brief description of the problem that you're seeing so I know what to test. Something like, e.g., when I run aptitude full-upgrade it takes thirty minutes to complete. [UPDATE]: PPS: of course you have to run aptitude-create-state-bundle before you actually upgrade any packages! i.e., you must type n at aptitude's command-line prompt or quit the program if you're using the curses interface. Otherwise, your state snapshot will just tell me what you upgraded to, which is only half the information I need (I also need the state of all packages prior to the upgrade).

    Russell Coker: Case Sensitivity and Published Passwords

    When I first started running a SE Linux Play Machine [1] I used passwords such as 123456 . Then for a while I had selinux but when I created a T-shirt design (see the main Play Machine page for details) I changed the password to SELINUX because that is easier to read on a shirt. Unfortunately the last time I rebuilt the Play Machine I used a password of selinux , some people worked this out and still logged in so I didn t realise that anything was wrong until a comment was placed on my blog yesterday. So for the past three weeks or so some people have been finding themselves unable to login. The password is now SELINUX again, sorry for any inconvenience. It s a pity that I can t make sshd a little less case sensitive for passwords. A PAM module to implement a caps-lock mode where the opposite case is tried would be useful for this case and some others too.

    5 March 2009

    Jordi Mallach: Cal otada in Valls

    It's here! This weekend is again the time to go up to Valls, my friend Frago's town, to meet his friends and enjoy a new edition of their cal otada. Like other years, this will be a crazy event that will cover the whole weekend. I'm looking forward to our traditional cal ot war, and spending tomorrow's night around a big fire in the middle of the country side of Tarragona.


    Frago and I, after last year's cal ot war

    Matt Brubeck: 5 Mar 2009

    Async Map and Fold in JavaScript My latest experiment is an implementation of asynchronous/parallel "map" (and other array functions) in JavaScript and Oni. Oni is a "structured concurrency language" embedded in JavaScript. For my source code and commentary, see oni-map at GitHub. You can leave comments at GitHub too. All this time reading Real World Haskell must really have warped my brain if a simple testing framework for a JavaScript program has got me thinking about higher-order functions and concurrency semantics...

    Romain Francoise: GDB + Python: sign me up

    I meant to blog about this last year but never got around to it. So, better late than never: Tom Tromey has a great blog series about his (and others') ongoing work on integrating Python into GDB. It starts with how to build a Python-enabled GDB, covers defining commands and functions, pretty-printing custom types, and a lot more (or perhaps you just want to jump to the conclusion).

    I hope this will reach mainline GDB in my lifetime, it's very promising. There's no timeline on the wiki but the branch is still being actively worked on, so there's hope. :)

    Sami Haahtinen: Debian Xen dom0 Upgrade woes

    I finally decided that it's time for me to upgrade my Xen installation. It used to run etch with backported Xen, because the etch version was increasingly difficult to work with. I also acknowledge that some of the issues I've been having are simply caused by yours truly, but even still the Debian Xen installation is way too fragile to my taste. I've already considered installing XenServer Express locally and running the hosts on it. The big drawback has been that XenCenter (the tool that is used to manage XenServer) is windows only and it doesn't work with wine. So you can imagine my desperation... Anyway, the latest upgrade from etch to lenny was painful as usual. The first part went smoothly, bit of sed magic on sources.list and a few upgrade commands (carefully picking the Xen packages out of the upgrade set). So in the end I had a working lenny installation with backported Xen. Next I made sure that there was nothing major going on in my network (one of the virtual machines acts as my local firewall) and took a deep breath before upgrading the rest of the packages. I knew to be careful about xendomains -script which has reliably restored my virtual machines after reboot to a broken host so I had always ended up restarting my virtual machines after reboot. I carefully cleared XENDOMAINS_AUTO and set XENDOMAINS_RESTORE to false in /etc/default/xendomains so that the virtual machines would be saved but not restored or restarted on reboot. After the normal pre-boot checks I went for it. Oddly enough everything worked normally and the system came up after a bit of waiting. I checked the bridges and everything appeared normal, so it was time to try and restore a single domain to see that everything actually did work as planned.
    Hydrogen:~# xm restore /var/lib/xen/save/Aluminium
    Error: Device 0 (vif) could not be connected. Hotplug scripts not working.
    
    
    Oof, Googling for the issue revealed that there were others that had suffered from the same problem on various different platforms the problems were caused by different things. One would assume that the problem is in the vif-bridge script that is mentioned in the xend-config.sxp file as the script that brings up the vif, but after many hours of tial and error and pointless googling (over gprs connection), I couldn't find any solution to the problem. It was time to call it a day (it was almost 3 am already...) During the night I had a new idea about the possible cause. What if the problem isn't in xend, but somewhere else. I fired up udevadm monitor to see what udev saw and it wasn't much. I'm not an expert with udev, but from previous encounters I had a vague feeling that there was supposed to be more events flying around. I wasn't able to pinpoint what was wrong so I decided to purge xen-utils, of which I had 2 versions installed: 3.2-1 and 3.0.2. I also removed everything related to xenstore. After reinstalling the current versions and restoring my configuration files the first host came up just fine. I still had problems resuming the virtual machines and I ended up rebooting them again, which was nothing new, but at least they were running again. In the end I don't know what was the actual cause for udev not handling the devices properly, but I'm happy to have them all running again. And I learned a valuable lesson of all this: udev is an important part of Xen, make sure it works properly.

    Decklin Foster: You're talking about things I haven't done yet

    I've been converting all my Mercurial repositories to Git. One of the motivations for this was hg's poor handling of branches and tags: branches are just another metadata field on a commit, and tags are entries in a text file called .hgtags that is tracked in the repository(!). Git has its flaws as well, but I prefer its view that branches and tags are just refs, which are pointers that exist at the repository level and are pushed or pulled around in much the same way as the objects they refer to. The excellent hg-to-git.py script included in contrib created Git tags corresponding to my old Mercurial tags, but of course didn't modify the actual commits. So I still had a .hgtags file in my Git repository, and a boilerplate commit of the form "Add tag foo for changeset bar" each time I added to it (recall that .hgtags is just another file. Thankfully, I never had to deal with two branches where I added different tags...). I wanted to remove these. Git has a 'filter-branch' command that can totally rewrite or expunge commits; this is of course a horrible idea for already published code, but there's no harm in using while initially preparing a repository. While I appreciate git's object model and speed, I must agree with its detractors that the user interface is terrible. It took some tinkering to get git-filter-branch to do what I wanted, so I'm writing this to save my notes for next time (and in case someone else is searching for how to do this). Here's the command I arrived at:
    git filter-branch \
        --tag-name-filter cat \
        --index-filter 'git update-index --remove .hgtags'
        --commit-filter \
            'if [ $# = 3 ] && git diff-tree --quiet $1 $3; then
                 skip_commit "$@"
             else
                 git commit-tree "$@"
             fi' \
        HEAD
    
    The tag name filter is always necessary if you want tags to be updated to point to the corresponding commits on the new, rewritten branch. I consider this a UI failure -- when a branch is rewritten, the ref is modified, and the old one moved to refs/original. Tags, on the other hand, stay where they are, without any indication on the new branch that this is where you might want to move that old tag and sign it again or whatever. IMHO they ought to be handled the same as branches. The index filter is simply an efficient way of removing the unwanted file from all commits. This and the tag filter are both covered in the manual page. Writing a commit filter is a little more obscure. After .hgtags is removed from the index, we may end up at one of those useless "Added tag foo" commits and have no changes to record in the commit. By default, of course, filter-branch still records these -- the commit message might be useful, or something. But I want to suppress them. The commit filter is called with a tree -- you're at the point between write-tree and commit-tree (I recommend Git from the bottom up if you're confused here.) It gets that tree ($1), and then "-p PARENT" for each parent, just like commit-tree. So, if this is a normal commit with one parent, there will be 3 arguments. (If there's only one argument, there is no parent, i.e., the first commit, and if there are more, then it's a merge.) This is the only case we want to mess with. If there are no changes between our tree and the parent's tree, then it's one of those no-op commits, and we can skip it (skip_commit, a shell function defined by filter-tree, uses some deep magic to hand us the original parent again next time). I think diffing the index and the parent would work as well, but this seemed clearer. It still feels like a hack, so I'd love to hear from anyone who can suggest improvements. Since this is a special case, maybe it's better off being implemented in hg-to-git.py itself. There's always more than one way to do it. Update: Teemu Likonen points out that the next version of Git (1.6.2, not yet in unstable) will have a --prune-empty option which makes this particular problem totally trivial. I am starting to get the feeling that the Git developers are all reading our minds... :-)

    Eddy Petrișor: Glest: how upstream can be a real dick

    At some point in the past, when I was still thinking that Glest can be packaged in a sane way, I had a conversation with upstream developer martinho on the Glest forum (they call it board) about them integrating a patch in order to support big endian machines.

    After some messages on their board, it was clear that they don't want to integrate any patches and started to throw out random fake arguments against the integration of my patch and other patches.

    When he figured out that I replied and debunked all of his fake arguments, he went on and actually removed my posts from the forum. It was so weird since I have never seen that kind of behaviour before and some of his posts and other people's posts were replies to my posts and things didn't made any sense after the deletion.

    At that moment I have managed to save one small bit of the conversation via Google's cache, but now I have finally decided to make it public.


    Note: Back then, I kept this post private in the hope that I was maybe too involved in the conversation at that moment to make a rational decision about it, and hoped things would get better in time. They didn't. Meanwhile they migrated to another forum software and they said they lost most/all(?) of the previous content from the old forum.



    Here is the conversation bit I managed to save.
    Original text is in italic font. Regular font is for my current comments for clearing up the context of the discussion. The text retains the BB syntax and [quote]-d text is martinho's own words.



    [quote="martinho"]thebohemian, eddyd,

    I think you guys are missing the point, this is not the place for any [/quote]

    Congrats, you are avoiding to answer the points I have raised.

    [quote]
    - The Glest project is made by a bunch of friends for fun, we ask for nothing, we answer to no one. So I beg you not co complain, because it is out of order.
    [/quote]

    In that case I don't see the point of the "development" forum. care to explain?
    And, from my PoV, these are your users you're arrogantly dismissing.


    The following was a reply to my request to add big endian support through a patch I provided at that time. The patch wasn't complete to actually make glest work on BE machines, but it didn't broke little endian support at all. He was trying to argue that there were no valid big endian machines on which the game would run. Integrating the patch would have made my life a lot easier in continuing the work on the patch.

    [quote]
    - Our target plarforms are PCs running Windows (I'm responsible for this) or Linux (matze is the boss here). We don't care if Glest doesn't run in a big endian dishwasher with Solaris.
    [/quote]

    Linux on PowerPC is a viable platform. So is Mac OS X on PowerPC.



    I made the mistake of saying that some parts of the code where not that clean and could be improved. More on that below.

    [quote]
    - One of the keys of Glest success is how extremely clean our code is. Bringing random people in would break this, and we are not going to do it. [/quote]

    So you are the only keepers of true knowledge of clean code? Hahahaha!

    There were at least 3 patches that provided this through word/double-word swapping. I don't see how embedding the patch can affect the unity of the code.

    BTW, you are aware you can "carve" people into coding in your style before accepting in, aren't you?



    I suggested using int8, uint8, int16, uint16 in order to make sure that the parameters are of the expected fixed size since plain char, int, long, long long have different sizes depending on the architecture. The usage of int and int16 was inconsistent and I also suggested using always the numbered variants.

    I said the approach that was then taken in code was not portable and that was the reason for the proposed change.

    [quote]
    - Glest has been coded with portability in mind, some of your comments about portability are really naive (compilers don't care if you declare function parameters with fixed byte length, they just use whatever is the fastest int in the platform). Fixed length data types are used when needed,
    [/quote]

    What? When did I say anything about that? I said the code uses inconsistently "int" and "int16" and should use the later always because the code assumes the sizes on i386, which are not always applicable - see long on amd64.


    If you mean that I can't enforce the width of the parameter, then you should know better, those types are defined in a platform dependent way to be platform independent. Yes, there are cases where [b]on the stack[/b] the size of the passed data is bigger (they might be padded), but that is transparent to the functions and, in spite of that, the functions will see the proper values for the parameters.

    Also, the packing behaviour is compiler and architecture dependent, and some compilers produce the weirdest packing (if you are allowed access to such docs, look for Green Hills compilers' for V850 and you'll be stunned).


    Please, don't make a fool of yourself by trying to discredit me, just not to loose face.

    Later he just removed my posts not to loose face.




    As a sane programmer, I made my patch to do the swapping only on big endian platforms, and the code was enabled in through the precompiler, so there was no performance hit on the little endian arches.

    Of course, any more-than-newbie programmer would agree that having two data sets for a single game is stupid and is better to do the swapping in the application itself to avoid space wastage and maintaing an alternate big endian data set.

    [quote]
    no more, no less. About endianness, we don't care. If we wanted to fix the problem anyway, the right way is to do the byte swap in the data, this is how it is done in commercial games, since it is more efficient.
    [/quote]

    You just proved how much bullshit you can deliver in one phrase just for the sake of winning an argument. All portable games and all applications that have data files prefer to do swapping on the spot just because swapping the data on the disk (or providing BE and LE data) is plain stupid and inefficient from a disk and bandwidth PoV.

    For Glest, swapping the data after reading from disk is not even affecting performance in a manner that could be significant or noticed, not even for a processor running at 500MHz, since that would be done only on load, once, and just for the bits of data which are relevant; these are mostly headers, since the actual data, in most cases, is just a long byte vector. This translates in not more than 3 or 4 instructions in assembler (an init, an exchange, an increment and/or a loop instruction), and that would happen before starting a game, which is dead time anyway and wouldn't be noticed unless the data would be huge (order of hundreds of MB or GB) and the whole data set would need swapping.

    Even if the data itself (not headers) represents data which needs to be swapped, that is still irrelevant in terms of speed.


    BTW, the reason that in commercial games it might be done like that is because there the games are distributed in a package per platform anyway and having two data sets is not an issue since they are using the same amount of CDs/DVDs, but doing the same for a game like Glest would mean doubling the storage used and it would increase the complexity for a release, not to count the confusion of the users.

    I still doubt commercial games do this, but I might be wrong.

    Russell Coker: SE Linux Lenny Status Update

    I previously described four levels of SE Linux support on the desktop [1]. Last night I updated my APT repository of SE Linux packages for Lenny (as described on my document about installing SE Linux [2]). I included a new policy package that supports logging in to a graphical session via gdm in either unconfined_t or user_t. This covers all the functionality I described as target 2 (some restricted users). I have tested this to a moderate degree. Target 3 was having all users restricted and no unconfined_t domain (the policy module unconfined.pp not being linked into the running policy). I had previously done a large part of the work towards that goal in preparation for running a SE Linux Play Machine (with public root password) [3] on Lenny - but until last night I had not published it. The combination of the policy needed to run with no unconfined_t domain and the policy to allow logging in as user_t via gdm should mean that a desktop system with gdm for graphical login that has no unconfined_t domain will work - but I have not tested this. So target 3 is likely to have been achieved, if testing reveals any problems in this regard then I ll release another policy update. So now the only remaining target is MLS. Also I have been setting up a mail server with a MySQL database for user account data and using Courier-Maildrop for delivery, so I ve written policy for that and also made some other improvements to the policy regarding complex mail servers.

    4 March 2009

    Uwe Hermann: Building an ARM cross-toolchain with binutils, gcc, newlib, and gdb from source

    I've been planning to write about building custom ARM toolchains for a while (I used stuff from gnuarm.com in the past, but I switched to the lastest and greatest upstream versions at some point). Among other things, recent upstream versions now have ARM Cortex support. First you will need a few base utilities and libs:
      $ apt-get install flex bison libgmp3-dev libmpfr-dev autoconf texinfo build-essential
    
    Then you can use my tiny build-arm-toolchain script, which will download, build, and install the whole toolchain:
      $ cat build-arm-toolchain
      #!/bin/sh
      # Written by Uwe Hermann <uwe@hermann-uwe.de>, released as public domain.
      TARGET=arm-elf                         # Or: TARGET=arm-none-eabi
      PREFIX=/tmp/arm-cortex-toolchain       # Install location of your final toolchain
      PARALLEL="-j 2"                        # Or: PARALLEL=""
      BINUTILS=binutils-2.19.1
      GCC=gcc-4.3.3
      NEWLIB=newlib-1.17.0
      GDB=gdb-6.8
      export PATH="$PATH:$PREFIX/bin"
      mkdir build
      wget -c http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2
      tar xfvj $BINUTILS.tar.bz2
      cd build
      ../$BINUTILS/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib \
        --with-gnu-as --with-gnu-ld --disable-nls
      make $PARALLEL
      make install
      cd ..
      rm -rf build/* $BINUTILS $BINUTILS.tar.bz2
      wget -c ftp://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.bz2
      tar xfvj $GCC.tar.bz2
      cd build
      ../$GCC/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib \
        --enable-languages="c" --with-newlib --without-headers --disable-shared --with-gnu-as --with-gnu-ld
      make $PARALLEL all-gcc
      make install-gcc
      cd ..
      rm -rf build/* $GCC.tar.bz2
      wget -c ftp://sources.redhat.com/pub/newlib/$NEWLIB.tar.gz
      tar xfvz $NEWLIB.tar.gz
      cd build
      ../$NEWLIB/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib \
        --with-gnu-as --with-gnu-ld --disable-nls
      make $PARALLEL
      make install
      cd ..
      rm -rf build/* $NEWLIB $NEWLIB.tar.gz
      # Yes, you need to build gcc again!
      cd build
      ../$GCC/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib \
        --enable-languages="c,c++" --with-newlib --disable-shared --with-gnu-as --with-gnu-ld
      make $PARALLEL
      make install
      cd ..
      rm -rf build/* $GCC
      wget -c ftp://ftp.gnu.org/gnu/gdb/$GDB.tar.bz2
      tar xfvj $GDB.tar.bz2
      cd build
      ../$GDB/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib
      make $PARALLEL
      make install
      cd ..
      rm -rf build $GDB $GDB.tar.bz2
    
    The final toolchain is located in /tmp/arm-cortex-toolchain per default, and is ca. 170 MB in size. I explicitly created the build script in such a way that it minimizes the amount of disk space used during the build (ca. 1.2 GB or so, compared to more than 3 GB in the "naive" approach). Using the "-j 2" option for make (see script) you can speed up the build quite a bit on multi-core machines (ca. 30 minutes vs. 60 minutes on an AMD X2 dual-core box). Also, you can change the script to build for other target variants if you want to (arm-elf or arm-none-eabi, for example). Checkout the blog entry How to build arm gnu gcc toolchain for Mac OS X by Piotr Esden-Tempski for similar instructions for Mac OS X users. Oh, and while I'm at it does anybody have any idea why there are no pre-built toolchains for embedded (microcontroller) ARM targets in Debian? There are some toolchains for other microcontroller architectures (avr, m68hc1x, h8300, z80) but not too much other stuff. Is there some specific reason for the missing ARM toolchains (other than "nobody cared enough yet")? I have heard about Emdebian, but from a quick look that seems to be more intended for toolchains with Linux/libc, not for microcontroller firmware (i.e. no MMU, no Linux, no libc etc.), but maybe I'm wrong?

    Jose Carlos Garcia Sogo: Innovation in netbooks

    After the release of Asus Eee PC and the discovery of the market that was eager to buy cheap and wearable computers every laptop manufacturer has jumped into the hype and released their own versions of netbooks, with different success.
    But somehow it was a cloning phase. Vendors were just cloning what Asus did, with more or less changes, but without innovating. Now, it seems that the path has opened again, from the open source and open hardware front, and it has been released AlwaysInnovating s touchbook. It is a netbook with a detachable keyboard (it is even sold separated) and built upon an ARM processor from Texas Instruments, and a 8GB microSD card. Thus they claim the battery last from 10 to 15h with the keyboard, and 3 to 5h in touchscreen mode.
    As is said above, the whole machine is open source based. Software is based upon OpenEmbedded, and hardware schematics of the board are released under GPL on Beagleboard project. They say that you can also install Ubuntu, Android or even Windows CE on it. Update: Just discovered that AlwaysInnovating is a Gr goire Gentil startup. Gr gory is a Civil Engineer from cole des ponts et Chauss es. We know how to build things :-D

    3 March 2009

    Lucas Nussbaum: PhD !

    This blog post is long overdue, but like Lenny, it was finally released. Yes, I defended my PhD thesis on December 4th. So I m officially a Doctor from the Universit Joseph Fourier Grenoble. The general context of my thesis is distributed systems, like peer-to-peer systems and applications running on HPC (High Performance Computing) cluster and grids. More specifically, I worked on methods and tools to study such systems, trying to answer the following questions: take a given application that will run on a distributed system. What can we learn or verify about its performance or its characteristics? Will it scale well, even with 1000 or 10000 nodes? Does this app perform better than this another app? Under which conditions? (that s probably the hardest question, because you need to be able to run both apps under the same conditions if you want a fair comparison!) My work involved studying basic building blocks that can be used to study distributed systems, like network emulators (Dummynet, Linux s traffic control subsystem, NISTNet). I also designed P2PLab, which allows to emulate network-centric peer-to-peer systems using a cluster, targetting experiments with thousands of emulated instances of the application. For example, it allowed to run experiments with ~15000 emulated BitTorrent nodes using 160 real machines. So what s next? Well, my first-priority plan is to make use of my PhD to apply to an academic position (maitre de conf rences, i.e assistant professor). If you know an open position where I would be a good fit, don t hesitate to tell me! Of course, this plan might very well fail (I will know around end of June). In that case, I ll probably be looking for a job, likely Free-Software-related. Again, if you hear of something for me, ping me!

    Uwe Hermann: How to use the full size of your (x)term when connecting to some other box serially with minicom

    minicom terminal size 1 Just as a reminder for myself, as I'll probably need this more often in the future (and maybe it's helpful for others): Per default, if you use a big xterm (232x74 in my case) where you start minicom, the $COLUMNS and $LINES environment variables will be 80x24 nevertheless, and those applications which honor them (vim, for example) will be too small and not use the full xterm size of 232x74.
      $ minicom
      $ echo $COLUMNS; echo $LINES
      80
      24
    
    minicom terminal size 2 You can fix that like this:
      $ eval  resize 
      $ echo $COLUMNS; echo $LINES
      232
      74
    
    After you do eval resize the variables are updated and vim will use the full xterm size. That's all.

    Wouter Verhelst: Schilly vs djb

    I wonder, in a Jerry Springer kind of way, what would happen if J rg Schilling were ever to start a discussion with Daniel Bernstein. Perhaps I should go out and buy some popcorn in preparation.

    Obey Arthur Liu: Google Summer of Code 2009 at Debian needs you

    2009-summer-of-code-logo-final-r3-no-url-011 In case you ve been living under a rock these past years, I shouldn t have to tell you what this is about :). Well, just in case.
    The Google Summer of Code (GSoC) is an international program that offers student developers stipends to write code for various open source software projects. Debian has participated since 2006, mentoring dozens of students on Debian projects. The important part of the 2009 edition of the Google Summer of Code is going to start next week with the Organizations application period (March 9th). By that time, we should have listed a reasonable number of ideas on the dedicated wiki page. We will try this year to improve on the performance of the previous years, starting first with more and more dedicated manpower. If you have some time to spare to help manage our Summer of Code bid this year, we can make it a much better experience for the students and for Debian. Help is immediately needed in many areas. Some examples:

    By mid-March, we will need: Further in the spring: In the summer: As you can see, there is much work ahead. It s time to pitch out your favorite pet project :)
    Remember! The Summer of Code has become a prominent outreach forum for open source organizations. It puts a spotlight on each of them to provide a well-rounded and deep experience of open source development. Right now, you can help with the Wiki, join us on IRC on #debian-soc on OFTC or join the mailing-list at soc-coordination on alioth. The short flyers-friendly URL for the Summer of Code at Debian is : <http://wiki.debian.org/gsoc>. Publicize it! See you this summer!

    2 March 2009

    Ingo Juergensmann: HowTo: Migrate RAID1 to RAID5

    As I wrote last week (German), I had the plan to make a RAID5 out of my existing RAID1 after I received my third 1 TB harddisk. Migrating to RAID5 doesn't work online yet, because mdadm doesn't support the use of --grow and --level together, as you can read in the man page when looking for "-l, --level":


    -l, --level=
    Set raid level. When used with --create, options are: linear, raid0, 0, stripe, raid1, 1, mirror, raid4,
    4, raid5, 5, raid6, 6, raid10, 10, multipath, mp, faulty. Obviously some of these are synonymous.

    When used with --build, only linear, stripe, raid0, 0, raid1, multipath, mp, and faulty are valid.

    Not yet supported with --grow.


    But there's always a way to obtain your goal. If you're brave enough you can find the solution by a quick internet search. Ok, I'm not that brave to try this without a backup, but you shouldn't do that kind of work without having a good backup anyway.

    But before I describe the way how to do it, as usual a strong disclaimer: use this howto on your own risk! There's no warranty that this will work for you and you should take care to have a backup of your data. Whoever is doing this migration without having a backup risks the loss of all the data!

    I'll describe the migration using an example... there are three logical volumes (LVs) with 1 GB in size each. This is enough for testing purposes and demonstrates how the migration works. You can use real partitions like swap partitions if you want. The LVs are r1, r2, and r3 and are within the Volume Group (VG) /dev/vg:


    r1 vg -wi-a- 1.00G
    r2 vg -wi-a- 1.00G
    r3 vg -wi-a- 1.00G


    Two of these LVs are being setup for a RAID1 /dev/md5:

    CODE:
    muaddib:/home/ij# mdadm --create /dev/md5 -l 1 -n 2 /dev/vg/r[12]
    mdadm: /dev/vg/r1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Thu Feb 26 16:16:59 2009
    mdadm: /dev/vg/r2 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Thu Feb 26 16:16:59 2009
    Continue creating array? yes
    mdadm: array /dev/md5 started.


    The warning to be a part of another raid array can be ignored. It's just a testing array. The result should look similar to:


    md5 : active raid1 dm-12[1] dm-11[0]
    1048512 blocks [2/2] [UU]
    [========>............] resync = 40.2% (422900/1048512) finish=0.7min speed=14096K/sec


    Now a filesystem can be created on the raid array and some data can be stored there:

    CODE:
    muaddib:/home/ij# mkfs.xfs -f /dev/md5
    meta-data=/dev/md5 isize=256 agcount=4, agsize=65532 blks
    = sectsz=512 attr=2
    data = bsize=4096 blocks=262128, imaxpct=25
    = sunit=0 swidth=0 blks
    naming =version 2 bsize=4096 ascii-ci=0
    log =internal log bsize=4096 blocks=1200, version=2
    = sectsz=512 sunit=0 blks, lazy-count=0
    realtime =none extsz=4096 blocks=0, rtextents=0
    muaddib:/home/ij# mount /dev/md5 /mnt
    muaddib:/home/ij# cp pics/backdrops/*.jpg /mnt/
    muaddib:/home/ij# dir /mnt/
    amigager_back1.jpg Dansk-Dunes14.jpg Dansk-Nature-2.jpg
    CapeCod_085.jpg Dansk-Dunes15.jpg Dansk-Priel.jpg
    ct-1-p1600.jpg Dansk-Dunes16.jpg Dansk-Woods-1.jpg
    ct-2-p1600.jpg Dansk-Dunes17.jpg earth_lights_lrg.jpg
    Dansk-Beach1.jpg Dansk-Dunes18.jpg HanseSail-AlterStrom2.jpg
    Dansk-Beach2.jpg Dansk-Dunes2.jpg HanseSail-AlterStrom.jpg
    Dansk-Beach3.jpg Dansk-Dunes3.jpg HanseSail-Mast.jpg
    Dansk-Beach4.jpg Dansk-Dunes4.jpg HanseSail-Warnemuende.jpg
    Dansk-Beach5.jpg Dansk-Dunes5.jpg LinuxInside_p1600.jpg
    Dansk-Beachstones.jpg Dansk-Dunes6.jpg prerow.jpg
    Dansk-Cliffs.jpg Dansk-Dunes7.jpg sgi-1440.jpg
    Dansk-Dunes10.jpg Dansk-Dunes8.jpg sgi.jpg
    Dansk-Dunes11.jpg Dansk-Dunes9.jpg Sonnenuntergang-2.jpg
    Dansk-Dunes12.jpg Dansk-Dunes.jpg Sonnenuntergang.jpg
    Dansk-Dunes13.jpg Dansk-Nature-1.jpg
    muaddib:/home/ij# umount /mnt


    After umounting the real challenge arise: creation of a RAID5 label! Normally this is no issue, but I guess you like your data and think twice before proceeding... but hey! You have a backup anyway, don't you?!

    CODE:
    muaddib:/home/ij# mdadm --create /dev/md5 --level=5 --raid-devices=2 /dev/vg/r[12]
    mdadm: /dev/vg/r1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Mon Mar 2 18:18:09 2009
    mdadm: /dev/vg/r2 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Mon Mar 2 18:18:09 2009
    Continue creating array? yes
    mdadm: array /dev/md5 started.
    muaddib:/home/ij# cat /proc/mdstat
    md5 : active (auto-read-only) raid5 dm-12[2](S) dm-11[0]
    1048512 blocks level 5, 64k chunk, algorithm 2 [2/1] [U_]
    muaddib:/home/ij# cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md5 : active raid5 dm-12[2] dm-11[0]
    1048512 blocks level 5, 64k chunk, algorithm 2 [2/1] [U_]
    [>....................] recovery = 3.1% (33152/1048512) finish=0.5min speed=33152K/sec


    After stopping /dev/md5 the new RAID5 label can be written. The data ought to be safe because of the RAID5 algorithm when running with 2 disks. To verify the theory you can mount /dev/md5 again. The next steps can be done with the array online.


    muaddib:/home/ij# mount /dev/md5 /mnt
    muaddib:/home/ij# dir /mnt/
    amigager_back1.jpg Dansk-Dunes14.jpg Dansk-Nature-2.jpg
    CapeCod_085.jpg Dansk-Dunes15.jpg Dansk-Priel.jpg
    ct-1-p1600.jpg Dansk-Dunes16.jpg Dansk-Woods-1.jpg
    ct-2-p1600.jpg Dansk-Dunes17.jpg earth_lights_lrg.jpg
    Dansk-Beach1.jpg Dansk-Dunes18.jpg HanseSail-AlterStrom2.jpg
    Dansk-Beach2.jpg Dansk-Dunes2.jpg HanseSail-AlterStrom.jpg
    Dansk-Beach3.jpg Dansk-Dunes3.jpg HanseSail-Mast.jpg
    Dansk-Beach4.jpg Dansk-Dunes4.jpg HanseSail-Warnemuende.jpg
    Dansk-Beach5.jpg Dansk-Dunes5.jpg LinuxInside_p1600.jpg
    Dansk-Beachstones.jpg Dansk-Dunes6.jpg prerow.jpg
    Dansk-Cliffs.jpg Dansk-Dunes7.jpg sgi-1440.jpg
    Dansk-Dunes10.jpg Dansk-Dunes8.jpg sgi.jpg
    Dansk-Dunes11.jpg Dansk-Dunes9.jpg Sonnenuntergang-2.jpg
    Dansk-Dunes12.jpg Dansk-Dunes.jpg Sonnenuntergang.jpg
    Dansk-Dunes13.jpg Dansk-Nature-1.jpg


    The next step is to add the third "disk":

    CODE:
    muaddib:/home/ij# mdadm --add /dev/md5 /dev/vg/r3
    mdadm: added /dev/vg/r3
    muaddib:/home/ij# cat /proc/mdstat
    md5 : active raid5 dm-13[2](S) dm-12[1] dm-11[0]
    1048512 blocks level 5, 64k chunk, algorithm 2 [2/2] [UU]


    That was the first step. As you can see the third "disk" has been added as a spare device. Because we don't want a spare but a RAID5 we need to expand the number of disks to 3 and tell the RAID to grow it's capacity:

    CODE:
    muaddib:/home/ij# mdadm --grow /dev/md5 --raid-devices=3
    mdadm: Need to backup 128K of critical section..
    mdadm: ... critical section passed.
    muaddib:/home/ij# cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md5 : active raid5 dm-13[2] dm-12[1] dm-11[0]
    1048512 blocks super 0.91 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
    [>....................] reshape = 3.1% (33472/1048512) finish=3.0min speed=5578K/sec


    The last two commands were made with the mounted filesystem that just needs to get enlarged. With XFS you make this happen by invoking xfs_growfs:

    CODE:
    muaddib:/home/ij# df -h /mnt
    Filesystem Size Used Avail Use% Mounted on
    /dev/md5 1020M 21M 1000M 2% /mnt
    muaddib:/home/ij# xfs_growfs /mnt
    meta-data=/dev/md5 isize=256 agcount=4, agsize=65532 blks
    = sectsz=512 attr=2
    data = bsize=4096 blocks=262128, imaxpct=25
    = sunit=0 swidth=0 blks
    naming =version 2 bsize=4096 ascii-ci=0
    log =internal bsize=4096 blocks=1200, version=2
    = sectsz=512 sunit=0 blks, lazy-count=0
    realtime =none extsz=4096 blocks=0, rtextents=0
    data blocks changed from 262128 to 524256
    muaddib:/home/ij# df -h /mnt
    Filesystem Size Used Avail Use% Mounted on
    /dev/md5 2.0G 21M 2.0G 1% /mnt


    Done!

    If you have an LVM on your RAID you'll need to use the appropriate LVM tools to enlarge the PVs and VGs as well. But the hardest work is already done. The reshaping can take a lot of time, as you can see here:


    md4 : active raid5 sda6[0] sdc6[2] sdb6[1]
    969161152 blocks super 0.91 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
    [>....................] reshape = 2.8% (27990592/969161152) finish=1485.0min speed=10562K/sec


    There might be other fallpits if you change your setup from 2-disk arrays to 3-disk arrays. For example you'll need to adopt the changes to your configuration files like /etc/mdadm/mdadm.conf. But this has not much to do with the migration from RAID1 to RAID5 itself.

    Many thanks to Goswin Brederlow for his advice and writing a wishlist bug: #517731

    Julian Andres Klode: debian-cd, dependencies, debimg, comments


    Looking at the amd64 CD images of Lenny, I just saw that there is the package gnome on disk 1, while some of its dependencies are on disk 2. I don t think that this is good. Same also applies to K3B on disk 3, and openoffice.org-kde on KDE-disk 1. In my opinion, all packages which are located on a disk X, should only depend on a disk N (N<X). This means that the package gnome would be moved to disk 2, or its dependencies to disk 1. This is exactly the way debimg works. Debimg uses so-called package groups, which simply represents a set of packages with cyclic dependencies. These package groups are returned in a specific order, so that a group N only requires a group <N. This order is kept when the groups are added to the disk. Furthermore, we treat the groups as one when adding them to the disk, ie. we check whether the whole group fits on the disk (and add it) or not (create a new disk). This way, we ensure that all dependencies can be satisfied. Today, I decided to try it out and therefore wrote a small script reading the debian-cd task files and comparing the file list (of the packages added to the disk) with the file list of the official KDE disk. The results look very good, debimg adds 11 packages and removes 26 which is not that much, and mostly caused by wrong size limits, etc. You can look at the results your self, and regenerate them using: Anyway, debimg still needs real configuration and handling of the debian installer and source packages, but this should give you an idea of how debimg works. And a tarball, for those who don t want to use git all the time. BTW, I have now enabled comment threading here, a new WordPress feature. I hope that it works, as I have not tried it out yet. Posted in Debian, debimg

    Next.

    Previous.