Search Results: "reg"

9 November 2009

Tim Retout: Greetings

Hello, Planet! (Thanks to lamby for adding me to Planet Debian.) If you don't know me... I'm not surprised. I do some occasional pkg-perl work, but I've really been slacking (and changing jobs, and moving halfway across the UK). Last week I fixed one RC bug, in libgnupg-interface-perl. Better than none, I suppose. It turned out to be quite interesting; the tests failed when the package was built on the buildds, but not locally. Other people had done the hard work, and figured out that this was happening when there was no tty; I just had to debug why the particular perl variable was getting unset. I'm somewhere near the end of the NM process; one of these days, I'll be able to upload my own packages, and those of other people. I'm still working out where best to apply myself within Debian - I do want to share some of the pkg-perl upload burden (because gregoa is an absolute hero, and deserves to be able to take holidays). The status of Debian mentoring in general intrigues me; there seem to be so many places where more minds are needed, and perhaps this makes encouraging and training new developers especially important. More on this later.

Dirk Eddelbuettel: Rcpp 0.6.7

Version 0.6.7 of the Rcpp package---a set of C++ classes making it easier to glue C/C++ code to R---is now on CRAN and Debian. This is a fairly incremental release that contains just a few small changes that arose since the previous release in August. One change is that a new type RcppList was added which allows us to build R 'list' types in C++. In particular, this makes it possible to have data structures of different types and dimensions. We had not previously accomodated this as our data structures where more regularised (i.e. think matrices or vectors of various types). The need for this came out of the work with the recently started RProtoBuf package which interfaces the Google ProtoBuf library. The incredible Romain Fran ois has joined the project and added a number of nice tricks; this will need another blogpost sooner rather than later. In the meantime, check out the RProtoBuf pages at R-Forge. Another small change was the addition of a self-contained example of a function callback from C++ into R which wasn't all that well documented before; this was in response to a user request. Finally, I started RcppList as a first step in reorganising the code a little better and split the class header and body off into separate files. This required changes to the infrastrucure files Makevars, cleanup, ... and I promptly forgot the Makevars.win Windoze variant which will require a 0.6.8 release real soon.

8 November 2009

David Paleino: Finally a DD!

Finally, it happened! I became a Debian Developer! I wish to thank everybody involved in this process: from those who helped me in my initial packaging efforts, to who actually created the account. Many thanks to the pkg-perl team for accepting newbies and helping them: props to Damyan Ivanov, Gregor Herrmann, Gunnar Wolf! Thanks to Debian-Med and Debian CLI: they always believed in me, and I had a great time in these teams. A special thanks goes to Andreas Tille, who advocated my NM candidature. Thanks to my two AMs, Bart Martens and Bernd Zeimetz. Even if my NM was long, difficult and not so flawless, it all went good, at the end Smile. A special thanks to Enrico Zini: he was the first DD signing my GPG key, thus allowing me to have more "rights" (being a DM), and experience some more responsibility than I previously had. Thanks to his "Become a DD. NOW!" right after checking my ID in Palermo -- Enrico, it finally happened! Thanks to Christoph Berg, Ron Lee, and Stephen Gran, which handled the final steps of the overall process. And now, dapal is here to break the world. Be warned! Smile

Stephan Peijnik: Android s roaming detection & its implementation

I know I wrote about Android already today, but there is another thing that concerns me right now. I am owner of an Android-based phone (an HTC Dream) and recently switched my mobile network provider. The problem is that my new provider is a virtual provider and as such there is no real network of that provider. Now Android has a feature to turn off broadband connections when in roaming mode, which itself is a great idea and can save you from paying quite a lot of money when the phone connects to 3G abroad, but this feature also turns off broadband connections when roaming locally. All this is being discussed in bug report #3499. After noticing this problem I became curious on how Android detects that it is roaming and I found the GsmServiceStateTracker.isRoamingBetweenOperators method to be responsible for that magic, but soon noticed that the method is not only inefficient, but also doesn t work as intended. This is hardly related to the bug mentioned above, but let s have a look at the code in question:
/**
* Set roaming state when gsmRoaming is true and, if operator mcc is the
* same as sim mcc, ons is different from spn
* @param gsmRoaming TS 27.007 7.2 CREG registered roaming
* @param s ServiceState hold current ons
* @return true for roaming state set
*/
    private
    boolean isRoamingBetweenOperators(boolean gsmRoaming, ServiceState s)  
        String spn = SystemProperties.get(PROPERTY_ICC_OPERATOR_ALPHA, "empty");
        String onsl = s.getOperatorAlphaLong();
        String onss = s.getOperatorAlphaShort();
        boolean equalsOnsl = onsl != null && spn.equals(onsl);
        boolean equalsOnss = onss != null && spn.equals(onss);
        String simNumeric = SystemProperties.get(PROPERTY_ICC_OPERATOR_NUMERIC, "");
        String operatorNumeric = s.getOperatorNumeric();
        boolean equalsMcc = true;
        try  
            equalsMcc = simNumeric.substring(0, 3).
                    equals(operatorNumeric.substring(0, 3));
          catch (Exception e) 
         
        return gsmRoaming && !(equalsMcc && (equalsOnsl   equalsOnss));
     
Okay, let me summarize what this piece of code does wrong, at least from my understanding: Now in my case my SIM card doesn t seem to provide the phone with a alphanumeric identifier, so the first two comparisons always fail for obvious reasons and, looking at the inline-if in the last line of that method my phone will always indicate that I am in roaming mode, even when I am not. The problem is not only the logic which seems to be wrong, but I rather see the inefficient comparisons used there to be a major problem in embedded systems like mobile phones. This is the first piece of Android code I have had a look at, but if all other code is as ugly and inefficient as these few lines Android really needs some major fixes. Related to this I have reported bug #4590 and forked the git repository in question over at github, to fix this method, should be a matter of 5 minutes.

Russell Coker: I m an Aspie

I ve recently been diagnosed with Asperger Syndrome (AS) [1]. Among other things this means that I am genetically predisposed to have an interest in solving technical problems and give lectures about how I solved them, but that I tend not to be a people-person . AS is generally regarded as an Autism Spectrum Disorder (ASD), but there is a lot of debate among the experts about the exact relationship. Some people (such as the psychologist who assessed me) believe that AS is a synonym for High Functioning Autism (HFA), however one theory I ve heard is that HFA people are more sensory oriented and Aspies differ by being information oriented in that case I would not be regarded as HFA. I m not bothered by this issue, I m sure that in a few years time the experts will have some consistent definitions for such things that most people can agree on. There is no Boolean assessment for AS, the assessment is based on a sliding scale of number of criteria. People who are almost Aspies but don t quite pass the test (or more commonly don t get assessed because they don t think they would pass) are sometimes referred to as Asperger Cousins (AC), this is a slang term that is not formally recognised but is often used in online discussions. I m sure that a significant portion of the readers of my blog would regard themselves as being at least ACs if they investigated the issue. The test at Glenn Rowe s web site [2] can give you an idea of how you rate by some criteria but note that this is not at all conclusive and it s based on the theories of Professor Simon Baron-Cohen [3], not all of which have general agreement. Leif Ekblad is running a project to analyse long-term changes to the Aspie score of adults [4]. The main quiz for that project seems quite popular for self-diagnosis, but again it s not conclusive. I think that diagnosing oneself for an ASD is not nearly as crazy as most things which might fall in the category of being one s own psychologist, but I still strongly recommend getting a formal assessment if you believe that you are an Aspie. In Australia it costs about $600 and there s a waiting list of about 3 months. Chaotic Idealism has an insightful post about the pros and cons of self-diagnosis [5], if you suspect that you may be an Aspie then I recommend that you read it before doing the tests.

6 November 2009

Matt Brubeck: Android 2.0 ships with V8 JavaScript engine

Google has not yet released most of the Android 2.0 source code, but they did publish source for a very small number of components, including a WebKit snapshot. I was very excited to see that the snapshot includes Google's V8 virtual machine! (Previous Android releases used Safari's JavaScriptCore/"SquirrelFish Extreme" VM.) But without the rest of the source tree, there was no way to build and run this on a real Android phone. The SDK includes a binary image that runs only in the qemu-based emulator. Today I got to try out a Motorola Droid. Here is how its browser compares to Android 1.6 on my HTC Dream (Android Dev Phone / T-Mobile G1) in the V8 Benchmark Suite (version 5):
Test Dream Droid Change
Richards 13.5 15.6 16%
DeltaBlue 5.23 12.9 147%
Crypto 13.2 10.9 -17%
RayTrace 10.9 80.1 635%
EarleyBoyer 23.5 74.7 218%
RegExp did not complete 16.5
Splay did not complete did not complete
Some tests (Richards, Crypto) see little or no improvement, while others (DeltaBlue, RayTrace, EarleyBoyer) are dramatically faster. Just for comparison, let's run the same benchmark on Safari 4 (JavaScriptCore) and a Chromium 4 nightly build (V8) on a Mac Pro:
Test Safari Chromium Change
Richards 4103 4640 13%
DeltaBlue 3171 4418 39%
Crypto 3331 3643 9%
RayTrace 3509 6662 90%
EarleyBoyer 4737 7643 61%
RegExp 1268 1187 -6%
Splay 1198 7290 509%
The precise ratios are different, but the same tests that showed the most improvement from Android 1.6 to 2.0 also show the most improvement from Safari to Chrome. Based on this plus the source code snapshot, I'm pretty sure that Android 2.0 is indeed using V8. This is exciting news. It makes Droid the first shipping product I know that uses V8 on an ARM processor, although V8 has included an ARM JIT compiler for some time now. For mobile web developers (like me), it means we're one step closer to having desktop-quality rich web applications on low-power handheld devices. Final thought: Although the Motorola Droid is still 100 times slower than Chromium on a Mac Pro, it's actually faster at some benchmarks than IE8 on a low-end Windows machine, or Firefox 2 on hardware from just a few years ago.

Stefano Zacchiroli: DPKG source v3 stats

graphing DPKG source v3 adoption Given that now we can upload DPKG source v3 packages to the archive, prodded by Lucas and Martin, I've added yet another page to my Debian graph/stats collection: namely stats about DPKG source v3 usage in the archive. This time, I've done even less work than the other pages: Lucas was already providing the actual data via a UDD CGI. So thank him, I'm basically just aggregating/mirroring the graphs for bandwidth reasons. Of course, I've also added the new page to the stats index on wiki.d.o.

Jaldhar Vyas: The Road to Wigan Dpen

3.0 format source packages can now be uploaded to the Debian archive. (Note: despite the title of this post, this is not the "Wig and Pen" format which is 2.0. See dpkg-source(1) for a detailed description of all the source package formats.) I tried converting my libcgi-application-basic-plugin-bundle-perl package with mostly good results. l-a-b-p-b-p is an aggregation of perl modules (in .tar.gz format) from CPAN. There is no upstream, this is a Debian only package. Currently the source looks something like this:
   
build-area/
    libcgi-application-basic-plugin-bundle-perl-0.5/
        debian/
            [all the standard stuff: control, rules, etc.]
        tarballs/
            CGI-Application-Dispatch-2.16.tar.gz
            CGI-Application-Plugin-AutoRunmode-0.16.tar.gz
            CGI-Application-Plugin-ConfigAuto-1.31.tar.gz
            ...
            [rest of modules]
The files in the tarballs directory are unpacked at build time to create the binary package. This works but has all the disadvantages of "tarballs in tarballs." By adding a file called debian/source format with the single line:
   
3.0 (quilt)
...dpkg-source is directed to use that format. Now I can rename each upstream tarball to
   
<package name>_<package version>.orig-<upstream tarball name with .'s replaced by -'s>.tar.gz
...and organize the source like this:
   
build-area/
    libcgi-application-basic-plugin-bundle-perl-0.5/
        debian/
            [all the standard stuff: control, rules, etc.]
    libcgi-application-basic-plugin-bundle-perl_0.5.orig-CGI-Application-Dispatch-2-16.tar.gz
    libcgi-application-basic-plugin-bundle-perl_0.5.orig-CGI-Application-Plugin-AutoRunmode-0-16.tar.gz
    libcgi-application-basic-plugin-bundle-perl_0.5.orig-CGI-Application-Plugin-ConfigAuto-1-31.tar.gz
    ...
    [rest of modules]
    libcgi-application-basic-plugin-bundle-perl.orig.tar.gz
Each module is now a seperate file in the debianized source with MD5sum etc. The only problem I am having is with the last file. libcgi-application-basic-plugin-bundle-perl.orig.tar.gz makes no sense for me because there is no upstream yet dpkg-source insists on it. I can make a dummy easily enough but this is an unnecessary annoyance so I filed bug #554488. Raphael Hertzog responded quickly. He is considering adding a --create-empty-orig option to dpkg-source which would solve the problem nicely.

5 November 2009

Eddy Petri&#537;or: Know your rights!

It is only a few days since my last post about the referendum which is due to happen on the same day as the Presidential elections, but I am forced to make another post because there are lots of incorrect views on the subject.

So let's try take the issues one by one and see what is the problem with every one of them, using reason and the information we have available from more mature democracies than Romania's.

What's the referendum about

The referendum, in this case, is about two issues:

Information on the subject

For an election such as the referendum (basically asking the population on a subject of national importance) every citizen has the right to be correctly informed about the options of the referendum, what each implies, what are the pros and cons for every option, what problems does the referendum tries to resolve.

There is no information on the subject, no videos, no spots, no fliers, nothing, just biased posters (I'll explain later).

Debate on the subject

In order to have a correct information, a clear public debate which should happen, without the pressure of a presidential campaign at the same time as the debate.


Well, we have no debate, so I guess there is no problem of overlapping (sad, but true), but on the other hand, there is no information on the subject.

Analysis of the options

Now let's analyse the two proposed measures in opposition to the current situation.

  1. reducing the number of representatives
    • pros
      • reducing costs
      • minorities have a bigger influence (they can defend their rights - see comments for explanations)
    • cons
      • easier to corrupt (obtaining a corrupt 5% in a 300 seats parliament is easier than in a 500 seats parliament)
      • minorities have a bigger influence (they are disproportionally powerful, in regard to the population they represent - see comments)
      • absence of a representative with a big vote power could allow passing an abusive law (to pass a regular law there is a need of a majority relative to the number of present representatives, not the total number), but, in a numerous parliament, the absence of a person isn't that risky (other colleagues would be present to stop the abusive initiative)
  2. one chamber instead of two
    • pros
      • faster processing of decisions
      • less bureaucratic
    • cons
      • in the current system there can be a passive vote (law passes silently if not discussed) which has just one occasion to be caught, while in the current system silent passing is allowed only in one of the chambers, but needs to be discussed in the other
      • there is a chance that one chamber might amend/catch abusive initiatives with "two chambers", but with "one chamber" there is one chance only
      • more prone to power abuse

So, there are pros and cons for all solutions, but now we can make an informed decision and know the risks for each option.

This shouldn't have been taken in haste without any public debate.


I don't want to influence anyone's vote, so I'll abstain from telling my options.

The president has the right to associate his image with one of the options.

OK, let's analyse that.

The law doesn't explicitly forbids this, but there are some recommendations from Venice on fair elections (sorry, I couldn't find the link) which say that in a vote such as the presidential elections there shouldn't be an unfair advantage for one of the candidates. Why is that relevant? Because the current president actually uses the referendum as his campaign and he's speculating people's innate hatred for political figures.

His election material is only comprised of virulent attacks at the representatives or calls to the population to vote in favour of both questions.


Why is that unfair? Because the current president is using his current position (president) as launch ramp for his campaign as a candidate.

OTOH, if the seal of the presidency was used instead his face, the problem wouldn't have been that bad.


Organisational issues

There were various rumours about how the voting will take place. Here is a list of things I heard:
  1. there will be a single list for both presidential elections and referendum and there will be a single column for signature to confirm your presence at vote
  2. there will be one paper, but two columns for signatures
  3. no matter what the list looks like, you'll be given both sets of ballots, but you can annul the one you don't want to vote on
All the variants above are incorrect from a democratic pov, but to different degrees:

  1. a single signature covering for either of the vaiants "presidential vote only", "refrendum only", "both" asks for trouble because unused ballots in "only" variants might be added later to the valid votes as if they were expressed by voters; since there is no distinct count for each of the ballots to confront that with signatures, before the counting period one could use unused ballots and vote for you on the issue you didn't want to express an opinion on
  2. informing on what to do in some cases such as "only" vote is essential to prevent fraud; e.g.: strike through the cell corresponding to the the election you don't want to express a vote on, instead of signing
  3. giving the ballot unconditionally to everybody, leaving you to decide to annul it or not is abusive, because vote is not compulsory in Romania; more than that, this artificial presence burst (even with void votes) could end up validating the referendum since a 50%+1 presence is needed to pass Constitution modification, as we have here
So, recap:
  1. favours fraud by allowing inside people to obtain untraceable/unaccounted ballots
  2. preventing fraud isn't of any concern, it seems (and could be achieved)
  3. forced voting might lead to validation of the referendum because the voting presence is sufficient, even if there are many annuled ballots
Vote validation and artificial voter presence

Since validation of a referendum on the changes on the constitution depends on sufficient voter presence (there is some mandatory threshold, but I can't find references now), it is in the interest of people wanting to promote the changes to mobilize people to vote.

By different measures the vote presence at the referendum is artificially increased raising the risk of validation, when people, in fact, wouldn't want to validate it and would, to express neutrality, will be be forced to annul the ballot.

Also, a high presence in the referendum might increase the number of voters for presidency, and the people mobilized this way may have a high chance to be biased in favour of the current president because he associates himself with the violent message against the representatives.

What does it take to implement, if referendum passes

If the referendum passes, the changes aren't immediate. The proposed changes are discussed in the Parliament and a final proposal for the constitution changes is made; after approval of the proposals by the Parliament, the ball goes back to population for final approval.

This means it will take a while to see a changed parliament.

Conclusions

Romania is not a true democracy yet and there are areas where individuals should know what their rights are and not let authorities fool them into buying any argument uncritically.

Romanians must learn their rights so they can't be manipulated whenever somebody wants to trick them into some scheme by knowingly omitting issues and creating insane situations.


Romanians, wake up, learn you have rights, form your own oppinion, as distinct individuals, then we might see a change.

4 November 2009

Rob Bradford: GNOME in Moblin: People panel

Previously i d talked about how we use GNOME technologies in the Moblin Myzone. Now i m going to talk about another component that i m responsible for, the People Panel. An important aspect of the Moblin user experience is about communicating with others and this panel provides quick access to do this. The core of the content is provided by an abstraction, simplification and aggregation library called Anerley. This provides a feed of items (an addressbook of people) that aggregates across the system addressbook, powered by EDS, and your IM roster, powered by Telepathy. You have small set of actions you can do on these people such as start an IM conversation / email / edit them with Contacts. The core of our IM experience is supplied by the awesome Empathy. We ve been working with the upstream maintainers to accomodate some of the needs of Moblin into the upstream source. This included the improvements to the accounts dialog and wizard that landed for GNOME 2.28. One of the biggest problems with the IM experience in Moblin 2.0 was that it was easy to miss when somebody was talking to you. If you were looking away when the notification popped up, whoops, it s gone. With our switch to Mission Control 5 I was able to integrate a Telepathy Observer into Anerley and the People Panel. An Observer will be informed of channels that are requested on the system. This allows us to show ongoing conversations in the panel and by exploiting channel requests and window presentation allow the user to switch between ongoing conversations. This wouldn t have been possible without the assistance of the nice folks in #telepathy and at Collabora: Sjoerd, Will, Jonny and countless others.

3 November 2009

Benjamin Mako Hill: Meta-Microblogging

So I don't tweet because I'm not ready to hand my data and autonomy over to Twitter. Luckily -- or unluckily perhaps -- that hasn't kept me off the microblogging wagon. I "dent" semi-regularly over at freedom-friendly identi.ca. I've found that microblogging is a great public outlet where one can talk about all those otherwise little meaningless things that we all do in our daily lives. High on my list of meaningless little actions, however, is microblogging itself! But can you microblog about your microblogging -- i.e. can you "metamicroblog" (or "metadent", or "metatweet")? I created a new account, metamako that over the last month or so, has been proving that you sure can!

2 November 2009

Axel Beckert: 192.168.noone.org

About a year ago, Eric Poscher invented the IP address blog and installed his one at http://192.168.epe.at/. Every hour his netbook notes down the IP address of the interface which currenntly the default route goes through and if it has an internet connection, it uploads the list of IP adresses it had. Additionally, he filters the list to IP addresses in 192.168.0.0/16. June this year he published the source code behind his IP blog under GPL and Creative Commons. I modified his script slighty to just write down the new IP address if it s different to the previous one, but without any filter. This makes the list much more colorful (and my online times less traceable :-) as you can see at http://192.168.noone.org/. But the biggest disadvantage of Eric s code design is not the fact that it s a (quite nice to read :-) shell script but that it doesn t save the list of IPs separately and is not able to regenerate everything if you want to change the design, but always just adds a line to the HTML page. So I rewrote the whole thing in Perl last Saturday while sitting the dog of my parents. If you change the templates and call the script again, it regenerates the whole list with the new templates. The code is also under GPL, the HTML parts are under Creative Commons, too. And hey, this is one of the very few (if not only) applications which are much more fun with IPv4 than with IPv6. ;-)

Axel Beckert: Still happy with the ASUS EeePC 701

Recently Eric asked on the LUG Vorarlberg mailing list about netbook experience. I wrote a lengthy reply summarizing my experiences with the ASUS EeePC 701. And I thought this is something I probably should share with more people than only one LUG: I ordered an ASUS EeePC 701 (4G) with US keyboard layout at digitec in Spring 2008, got it approximately one month later and posted a first resum after one month in my blog. I m still very happy with the EeePC 701, despite two commonly mentioned drawbacks (the small screen resolution and the small SSD which I both don t see as real problems) and some other minor issues. What mattersNice to haveWhat doesn t matterWhat s not so niceSimilar models Technically, most of this also counts for the EeePC 900SD (not 901) which only differs in screen, resolution and disk size as well as CPU, but not on the the case. So same size, same robustness, same battery, same mainboard, bigger screen, resolution, disk and faster CPU. (The 901 has a different CPU, a different battery, and a different, glossy and partially chromed case.) See Wikipedia for the technical specifications of all EeePC models. ASUS only big FAILure Stopping to sell most EeePCs with Linux and cowardly teaming up with Microsoft after having shown big courage to come out with a Linux only netbook. Well, you probably already know, but it s better without Windows So basically you no more get these really neat netbooks from ASUS anymore and you get nearly no netbooks with Linux from ASUS in the stores anymore. It s a shame. Would I buy it again? Sure. Well, maybe I would also buy the 900SD or 702 (8G) instead of the 701, but basically they re very similar. See Wikipedia for the differences between these EeePC models. And of course I still prefer the versions without Windows. But despite the low price, the EeePC 701 is surprisingly robust and still works as on the first day (ok, except battery, the mouse button bar and the n key ;-), so I recently bought a second power supply (only white ones were available *grrrr*) and ordered a bigger third party battery plus an adapter to load the battery directly from the (second) power supply without EeePC inbetween. What desktop do I use on the EeePC? None. I use ratpoison as window manager, uxterm, urxvt, and yeahconsole as terminal emulators (running zsh with grml based .zshrc even as root s login shell :-), wicd-curses as network manager and xmobar (previously dzen2) with i3status as text-only panel. Installed editors are GNU Emacs 23, GNU Zile and nvi. (No vim. :-) And of course a netbook wouldn t be a netbook if it wouldn t have a lot of network applications installed. For me the most important ones are: ssh, scp, autossh, sshfs, miredo, conkeror, git, hg, and rsync.

1 November 2009

Axel Beckert: /var/cache/apt/ on tmpfs

My ASUS EeePC 701 (4G) nemo running Debian Sid has a 4 GB SSD as main disk, which is on the one hand quite full (mostly with software I use, but also local working copies of software I work on) and on the other hand an SSD, so I always try to reduce the amount of write to disk without losing convenience. Similar issues have systems which run off a CF or SD card or maybe even an USB stick. Since I ordered a 2 GB RAM bar together with the EeePC, I not bound to the 512 MB which it had originally. But on the other hand I seldom needed more than 1 GB of RAM. Usually I needed between 400 MB and 1 GB of RAM. So it s quite obvious to use tmpfs on as many places as possible. Making /tmp, /var/run and /var/lock tmpfs were the most obvious directories to mount as tmpfs. Especially /var/run on tmpfs brought up a few bugs a while ago (mostly init.d scripts relying on /var/run/$PACKAGENAME/ s existence), but it s no hassles to use nowadays. Even in Debian Stable such bugs got fixed. Next target to explore for was /var/cache. According to the FHS, /var/cache is intended for cached data from applications. [ ] The application must be able to regenerate or restore the data. So it should be safe to put anything under /var/cache on tmpfs. One directory in there which gets written quite often and with a lot of data on Debian Unstable is /var/cache/apt and its subdirectories, especially /var/cache/apt/archives. If you update your Sid installation daily, all new or updated .debs will be downloaded to /var/cache/apt first. So I put /var/cache/apt on tmpfs by putting the following line into /etc/fstab:
tmpfs /var/cache/apt tmpfs defaults,noexec,nosuid,nodev,mode=0755 0 0
But despite FHS stating that anything under /var/cache must be reproducible by the application, apt is puking and refusing to work:
!447 Z31 ?0 L1 root@nemo:pts/0 (-zsh) 16:13:10 [~] # apt-get update
E: Archive directory /var/cache/apt/archives/partial is missing.
!448 Z32 ?100 L1 root@nemo:pts/0 (-zsh) 16:13:17 [~] # 
If you create /var/cache/apt/archives/partial, it will also argue about /var/cache/apt/partial. Of course the workaround is simple: Just put mkdir -p /var/cache/apt/partial /var/cache/apt/archives/partial in /etc/rc.local. But nevertheless, this is a bug in apt which already has been reported by madduck earlier this year (#523920). Unfortunately the APT maintainers have not yet even commented on this FHS violation and therefore also a Debian Policy (Section 9.1.1) violation. One more thought about /var/cache/apt vs only /var/cache/apt/archives: apt-file also caches its data under /var/cache/apt. So if you want to use apt-file after a reboot and have /var/cache/apt mounted as tmpfs, you have to run apt-file update first and it will download all Contents files (can be dozens of megabytes) and not only the differences to previously downloaded Contents files. So if you use apt-file a lot, you probably go better with making only /var/cache/apt/archives tmpfs and not whole /var/cache/apt.

Dirk Eddelbuettel: Adventures with Comcast: Part ohnoesnotanotherone in an ongoing series

Regular readers of this blog (yes, both of you!) may remember the computer/broadband/ directory that this post appears in as the collection of my Comcastic (yeah right) experiences with my ISP. But I think this week may top everything. I'll just try to jot down some notes before I forget all the gory details:

John Goerzen: First impressions of the iPod Touch

So far, our household has resisted any piece of the iPhone onslaught. Yes, I carry an iPod Classic, but that s different. Terah s old Palm m100 is becoming a problem. The platform is dead, and the desktop sync drivers for it are decaying rapidly in every operating system. Not only that, but we would really like to be able to share calendars between us. Terah doesn t need a phone or a mobile data plan. After thinking about it a bit and getting some advice, we decided to get her the $200 8GB iPod Touch. And it arrived Friday. I ve used portable devices plenty before. I had my share of PalmOS devices: III, V, Clie; an HP 200LX DOS-based err netbook; a Zaurus; and an N810. The first thing that struck me about the iPod Touch was beauty no surprise there. The interface exuded an air of stability, like it wasn t going to just crash when something went wrong. It felt solid and well-planned. Physically, it s thin. Really thin. That s perhaps the most impressive thing about it of all. Sometimes the GUI masked underlying performance issues. For instance, it may take awhile to draw a web page. On the N810, you get to watch as different bits of the screen appear. On the iPod Touch, you sit there staring at a white screen with a spinning wheel for awhile, and then suddenly poof, the webpage is there. I d have to say the Apple approach feels better. Terah and I decided to sync with Google Calendar, and that setup was easy and well-done on the iPod Touch easier than on the Blackberry with Google s own app, in fact. The only question was that Contacts was a bit counter-intuitive; select the Google account and nothing shows up, but everything is there under the generic Contacts bucket. The Calendar worked very well, even properly handling meetings and invitations. The mail app works well, though it takes a long very long time to scroll through a lengthy email to get to the attachment at the bottom. There s no go to bottom of message feature that I could see, and my idea of pinching the screen to make the text tiny to make scrolling faster didn t work. The mail setup, though, is a complete and utter pain. There is no way anybody that doesn t know a lot of details about SSL certs could have made this work. When you add a mail account, it requires you to have an IMAP and SMTP server defined. It would like to use SSL/TLS with these, which is great. But if it can t validate the cert, it pops up a dialog box asking if you want to continue. You can say yes, but it just sits there for a couple of minutes and then fails with a mysterious error. I had to put my cert up on a webserver, point Safari at it, and install the cert to the device before it would talk to it. That solved IMAP. SMTP was another matter too. Strangely, on the initial account setup, there is no way to put in the port number for SMTP server. Yet it won t save your account until it can connect to one. Of course, most ISPs block the smtp port, so this was bound to fail. Finally I pointed it at a server on my local network temporarily, then went in and edited the account to point it to the real server with the second non-25 port it listens on for just such situations. Safari works really well. It s probably the best mobile browser I ve seen yet (I haven t seen Android or Palm Pre yet.) It is far better than the N810 browser, both in terms of speed and in terms of ability to reformat pages to fit the device. The tabbed browsing is a lot faster switching than the N810 s separate windows, and nicer too. The app store essentially lived up to my expectations. It was very easy to use, and obviously a closed proprietary ecosystem. The free apps that existed there mostly were adware. I looked for a Jabber client, and wasn t happy with any option. Some of them required Apple Push Notifications, with a complex network of two servers between the device and the Jabber server. No thanks to that invasion of privacy. And that brings me to the topic of weird limitations. iPod Touch apps, in general, can t run in the background. You exit Safari, and when you get back in, it s reloading that webpage. Now many apps are good at remembering their state, but this feels very PalmOS to me. You can t use the iPod Touch at all until you first sync it with iTunes. That is incredibly weird. The device has Wifi, people. Plus, why should I have to register it with Apple anyhow? And then there s the lack of a file manager, or anything like it. I can t scp a file from my computer to the iPod Touch like I can my N810, nor the other way round. It is generally unclear how much of the 8GB is in use, and by what. Terah needs a password-keeping program. There are several in the app store. I d really like one that uses Bruce Schneier s standard Password Safe format which is supported on just about any platform you care to name. Couldn t find one. Even if I could, I guess it wouldn t do me any good, since you can t copy the file to a PC anyhow. Sigh. Overall, Terah is very excited with the device, and I must admit to being so too. Its faster web browser means it s probably a good replacement for the N810 especially if you want a calendar, which the N810 completely lacks. It makes an excellent PDA, perhaps the first PDA I ve seen that equals the usability of the old PalmOS. On the other hand, it isn t really a power user s device. There are a lot of surprising limitations and missing features that competing devices have had for years.

30 October 2009

Matt Brubeck: Compleat: Programmable Completion for Everyone

Compleat is an easy, declarative way to add smart tab-completion for any command-line program. For a quick description, see the README. For more explanation and a brief tutorial, keep reading... Background I'm one of those programmers who loves to carefully tailor my development environment. I do nearly all of my work at the shell or in a text editor, and I've spent a dozen years learning and customizing them to work more quickly and easily. Most experienced shell users know about programmable completion, which provides smart tab-completion for for supported programs like ssh and git. (If you are not familiar it, you really should install and enable bash-completion, or the equivalent package for your chosen shell.) You can also add your own completions for programs that aren't supported but in my experience, most users never bother. When I worked at Amazon, everyone used Zsh (which has a very powerful but especially baroque completion system) and shared the completion scripts they wrote for our myriad internal tools. Now that I'm in a startup with few other command line die-hards, I'm on my own when it comes to extending my shell. So I read the fine manual and started writing my own completions. Over on GitHub you can see the script I made for three commands from the Google Android SDK. It's 200 lines of shell code, fairly straightforward if you happen to be familiar with the Bash completion API. But as I cranked out more and more case statements, I felt there must be a better way... The Idea It's not hard to describe the usage of a typical command-line program. There's even a semi-standard format for it, used in man pages and generated by libraries like GNU AutoOpt. Here's one for android, one of the SDK commands supported by my script:
 android [--silent   --verbose]
   ( list [avd target]
     create avd ( --target <target>   --name <name>   --skin <name>
                   --path <file>   --sdcard <file>   --force ) ...
     move avd (--name <avd>   --rename <new>   --path <file>) ...
     (delete update) avd --name <avd>
     create project ( (--package --name --activity --path) <val>
                       --target <target> ) ...
     update project ((--name --path) <val>   --target <target>) ...
     update adb )
My idea: What if you could teach the shell to complete a program's arguments just by writing a usage description like this one? The Solution With Compleat, you can add completion for any command just by writing a usage description and saving it in a configuration folder. The ten-line description of the android command above generates the same results as my 76-line bash function, and it's so much easier to write and understand! The syntax should be familiar to long-time Unix users. Optional arguments are enclosed in square brackets; alternate choices are separated by vertical pipes. An ellipsis following an item means it may be repeated, and parentheses group several items into one. Words in angle brackets are parameters for the user to fill in. Let's look at some more features of the usage format. For programs with complicated arguments, it can be useful to break them down further. You can place alternate usages on their own lines separated by semicolons, like this:
android <opts> list [avd target];
android <opts> move avd (--name <avd> --rename <new> --path <file>)...;
android <opts> (delete update) avd --name <avd>;
...and so on. Rather than repeat the common options on every line, I used a parameter <opts>. I can define that parameter using the same usage syntax.
opts = [ --silent   --verbose ];
For parameters whose values are not fixed but can be computed by another program, we use a ! symbol followed by a shell command to generate completions, like this:
avd = ! android list avd   grep 'Name:'   cut -f2 -d: ;
target = ! android list target   grep '^id:'  cut -f2 -d' ' ;
And any parameter without a definition will just use the shell's built-in completion rules, which suggest matching filenames by default. The README file has more details of the usage syntax, and instructions for installing the software. Give it a try, and please send in any usage files that you want to share! (Questions, bug reports, or patches are also welcome.) Future Work For the next release of Compleat, I would like to make installation easier by providing better packaging and pre-compiled binaries; support zsh and other non-bash shells; and write better documentation. In the long term, I'm thinking about replacing the usage file interpreter with a compiler. The compiler would translate the usage file into shell code, or perhaps another language like C or Haskell. This would potentially improve performance (although speed isn't an issue right now on my development box), and would also make it easy for usage files to include logic written in the target language. Final Thoughts Recently I realized that parts of my work are so specialized that my parents and non-programmer friends will probably never really get them. For example, Compleat is a program to generate programs to help you... run programs? Sigh. Well, maybe someone out there will appreciate it. Compleat was my weekends/evenings/bus-rides project for the last few weeks (as you can see in the GitHub punch card), and my most fun side-project in quite a while. It's the first "real" program I've written in Haskell, though I've been experimenting with the language for a while. Now that I'm comfortable with it, I find that Haskell's particular combination of features works just right to enable quick exploratory programming, while giving a high level of confidence in the behavior of the resulting program. Compleat 1.0 is only 160 lines of Haskell, excluding comments and imports. Every module was completely rewritten at least once as I tried and compared different approaches. This is much less daunting when the code in question is only a couple dozen lines. I don't think this particular program would have been quite as easy to write at least for me in any of the other platforms I know (including Ruby, Python, Scheme, and C). I had the idea for Compleat more than a year ago, but at the time I did not know how to implement it easily. I quickly realized that what I wanted to write was a specialized parser generator, and a domain-specific language to go with it. Unfortunately I never took a compiler-design class in school, and had forgotten most of what I learned in my programming languages course. So I began studying parsing algorithms and language implementation, with Compleat as my ultimate goal. My good friend Josh and his Gazelle parser generator helped inspire me and point me toward other existing work. Compleat actually contains three parsers. The usage file parser and the input line tokenizer are built on the excellent Parsec library. The usage file is then translated into a parser that's built with my own simple set of parser combinators, which were inspired both by Parsec and by the original Monadic Parser Combinators paper by Graham Hutton and Erik Meijer. The simple evaluator for the usage DSL applies what I learned from Jonathan Tang's Write Yourself a Scheme in 48 Hours. And of course Real World Haskell was an essential resource for both the nuts and bolts and the design philosophy of Haskell. So besides producing a tool that will be useful to me and hopefully others, I also filled in a gap in my CS education, learned some great new languages and tools, and kindled an interest in several new (to me) research areas. It has also renewed my belief in the importance of "academic" knowledge to real engineering problems. (I've already come across at least one problem in my day job that I was able to solve faster by implementing a simple parser than I would have a year ago by fumbling with regexes.) And I'll be even happier if this inspires some friends or strangers to take a closer look at Haskell, Parsec, or any problem they've thought about and didn't know enough to solve. Yet.

29 October 2009

Jo Shields: Chicken Little Remix 9.10 Karmic Kraienk ppe

Bok bok booooook bok bok mono bok bok bkaawk bok bok bok Chicken Little Remix 9.10 Karmic Kraienk ppe Braaaaaaaak bok boooooook bok bok bkaaawk bok bok bok bok bok: Bok bok booooook Mininova: 4577800beda226d815f98bc8d79521cd clr-9.10-desktop-amd64.iso
f97179e5b13f3aceb6c9d98d2c7e6ef5 clr-9.10-desktop-i386.iso Bkaaawk bok bok bok boooooook bok braaawk bok bok booooook bok bok bok 10.04? Bok bok boook charity, bok bok videogames, braaaawk money. Bok bok.

28 October 2009

Joerg Jaspert: Debian FTPMaster meeting, we are still alive

So Tuesday was another very productive day seeing lots of things done. And actually today also started (and will end) like this. I am now of the opinion that we need such a kind of meeting of our team every 6 months, if only we could manage to get the time off from our real lifes. Sitting together, discussing, working on the same thing, being able to just call over the table and get a different opinion just gains so much that we are missing otherwise As you already read, Monday was our day to change the database layer while Tuesday left us with adding the v3 source formats. Which was declared finished today, somewhere around noon. The first picture in this blogpost shows our still to fix up/todo list from Monday evening. monday_evening_todo.jpg Besides the v3 format we also worked on other things, like the already mentioned lintian autorejects. This patchset is also fully committed and tested working since today, so we could start on other issues. We had lots of general enhancements of our code committed, from improving our logging to fixing some issues with expiring old files from the pool all the way up to reducing code duplicates all over the place. I must confess that we did not start right away working on dak today. shoe.jpg. We had to start by using hightech to fix a broken shoe first. (Some glue and a heavy laptop. NOT MINE). :) Back to reality - we are currently 6 persons all working on various parts of the dak code. We still have the archive mostly disabled (basically one large dinstall run in the evening always) and are happy with this, as this allows us immediate testing without the risk of accidently destroying someones package upload. And we do test a lot, haven t seen that many python backtraces before in one place :) The third picture shows our todo list status from today. We still have a good number of points open, but as we have 6 persons working it does seem manageable to at least get a very good start on each of them. What we currently work on is ACLs in the archive, which will soon allow us to fix another issue the old DM code has but even more important will allow automated signing of packages built by buildds soon. We basically are able to limit such keys to only be able to upload for the one architecture they are allowed to, as well as forbid them to upload any kind of source. (Together with various other considerations around the setup of the buildds (like, for example, only buildds administrated by DSA can have that, but other points too), the handling of the keys, etc, this will lead to much faster uploads of the build binary packages). And will take a tedious work away from buildd admins (who will still have enough to do to deal with the general administration of it, the build failures, such things). Another thing we work on is the handling of arch all packages, in a source that produces arch all as well as arch any binaries. Currently, as soon as a new source is uploaded for one architecture, every architecture will see the new arch all deb. Which can lead to uninstallability of other packages. Not very nice. And another one of us is also working on our contents generation. Something started long ago, but not yet finished. Recently we did take big steps in this, getting our SQL queries for it down from about 10 minutes to something around 10 seconds. That is for one suite, one architecture, the full contents file contents. While this is SQL only and we still need to write it out to disk, it is a nice improvement. And to my right we have someone working on getting the Packges/Sources files data stored within projectb too, so we can also use our own python scripts to write those files. This will finally enable us to completly ditch apt-ftparchive. And finally, to my left site sits someone who is working on a dak policy wrapper, with which we can allow other groups then ftpmaster to control suites. The initial usage will be to restore the (oldstable-)proposed-updates handling with their own queues in front, as that is no longer part of our NEW handling script. In the future it will also allow easy handling of other situations, like suites for volatile or backports.org. Basically everything where the people running the archive software are different to those people actually setting the policy for the suite. board.jpg Another nice detail is the ability to throw away uploaded binaries and only ever take buildd built binaries into the archive. We will not go to source-only uploads, as that will only lead to lots of untested uploads (sorry people, we are all humans, it WILL happen), but we can have them uploaded, do regular checks (including the lintian ones), then take the files from the buildds. (Of course there is a way to get things bootstrapped, the system behind this is flexible to allow for a bootstrap mode for a new architecture). (I have multiple pictures, will probably put some more up when I am back home).

Russell Coker: New Play Machine

Update:
Thanks to Sven Joachim and Andrew Pollock for informing me about /etc/init.d/mountoverflowtmp which exists to mount a tmpfs named overflow if /tmp is full at boot time. It appears that the system was not compromised. But regular reinstalls are always a good thing. On the 24th of August this year I noticed the following on my SE Linux Play Machine [1]:
root@play:/root# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda 1032088 938648 41012 96% /
tmpfs 51296 0 51296 0% /lib/init/rw
udev 10240 24 10216 1% /dev
tmpfs 51296 4 51292 1% /dev/shm
/dev/hdb 516040 17128 472700 4% /root
/dev/hdc 1024 8 1016 1% /tmp
overflow 1024 8 1016 1% /tmp The kernel message log had the following:
[210511.546152] su[769]: segfault at 0 ip b7e324e3 sp bfa4b064
error 4 in libc-2.7.so[b7dbb000+158000]
[210561.527839] su[778]: segfault at 0 ip b7eb14e3 sp bfec84d4 error 4 in
libc-2.7.so[b7e3a000+158000]
[210585.270372] su[784]: segfault at 0 ip b7e044e3 sp bff1b534 error 4 in
libc-2.7.so[b7d8d000+158000]
[210595.855278] su[789]: segfault at 0 ip b7e014e3 sp bfd18324 error 4 in
libc-2.7.so[b7d8a000+158000]
[210639.496847] su[796]: segfault at 0 ip b7e874e3 sp bf99e7b4 error 4 in
libc-2.7.so[b7e10000+158000] Naturally this doesn t look good, the filesystem known as overflow indicates a real problem. It appears that the machine was compromised. So I ve made archival copies of all the data and reinstalled it. As the weather here is becoming warmer I ve used new hardware for my new Play Machine. The old system was a 1.8GHz Celeron with 1280M of RAM and two IDE disks in a RAID-1 array. The new system is a P3-800 with 256M of RAM and a single IDE disk. It s a Compaq Evo which runs from a laptop PSU and is particularly energy efficient and quiet. The down-side is that there is no space for a second disk and only one RAM socket so I m limited to 256M that s just enough to run a Xen server with a single DomU. I put the new play machine online on Friday the 23rd of October after almost two months of down-time.

Next.

Previous.