Search Results: "fourmond"

29 March 2011

Vincent Fourmond: Call for testers: pmount finally supports mounting image files

I've finally come up with a decent way for pmount to support mounting image files using loop devices. This has required a little more work than I thought, since I had to add support for configuration files for pmount, as loopback mounting is by essence insecure, so the support for it had to be user-configurable. I have tried hard to make the loopback mounting as secure as possible, for instance by ensuring that a user cannot bypass file permissions with it, but of course lookback mount still means that a user has read-write access to a mounted FS which can be used to exploit potential weaknesses in the kernel... I have uploaded a new version of pmount to experimental. Comments, bug reports, exploits are welcome !

7 March 2011

Vincent Fourmond: Installing a Canon Pixma MP250

I recently acquired a Pixma MP 250 printer, and as I had some difficulties with setting it up, I wanted to share this here. The printer isn't supported as such by CUPS, so I had to dig a little bit. After quite some time, I found debian packages on the Canon website there. Don't fear the mention of i386, amd64 packages are included too. This link is likely to break when the software is upgraded, you should try your luck in the drivers search page should that happen (or for other models). After installing that, CUPS find the connected printer and proposes the PPD for it. The scanner works out of the box with xsane As a side note, Canon also provides source for the debian packages (the packaged was ITPed ages ago). However, there are some binary-only blobs and I didn't manage to get it to compile from source.

26 February 2011

Vincent Fourmond: A praise for TikZ

I have been using xfig for ages to draw figures, and I appreciate it, especially combined with a small script I wrote based on an original idea by Seb Desreux at H&K, fig2ps, that allows painless integration of LaTeX code inside xfig figures. But recently, it seems that I've hit limitations in xfig. Mainly, if it is great when you want to produce sober figures, whenever you want to do something fancier, including shadings and the like, frustration comes in quickly (since it is purely impossible). I've spent a while looking for a decent alternative, until I had a look again at pgf, which since turned into TikZ. That was amazing. It integrates painlessly within LaTeX and is simply great to work with. Drawing complex diagrams with noes and complex relations between them is trivial. It handles moving the nodes very gracefully, and styling can be done in a CSS-like fashion (though it definitely isn't CSS), which means you can first concentrate on structure and then turn your graph into something nice, while for all the other programs I know, you have to handle both structural and stylistic aspects at the same time. Sure enough, you need to like the command-driven approach, as mice won't come in too useful here... As a side note, I wanted to express my admiration of Till Tantau's (TikZ's author) mastery of (La)TeX: TikZ can be seen as an interpreter of a simple graphical language written in pure TeX, which is, according to my humble experience with dirty trick in TeX, is simply amazing. Many thanks, Till !

6 February 2011

Vincent Fourmond: Doxygen and Ruby...

I've been using Doxygen for a while now, and, no surprises, I find it fantastic ! The only thing that is really missing there is a decent support for Ruby... Allright, Ruby already has a documentation system, rdoc, but using only one for everything has its charms, and Doxygen is doubtlessly much more evolved than rdoc. Maybe when I have time, I'll have a look at writing it. (but that won't be before a long time...). Update: I finally had some time to write and publish this patch. It is available on github

Vincent Fourmond: Doxygen for Ruby, first working draft !

Quite some time ago, I complained about the lack of support of Ruby in doxygen, the ultimate code documentation generator (at least for me). Time has passed, and I had some time and motivation to look into it and write a patch. The code is now reasonably mature to be used, altough it still lacks many features, and, most importantly, testing. That's why I pushed my git-svn private repository to github today, in order to get enough testing to integrate it into mainstream doxygen. It's current features: You can get an opinion of how it looks on the code of ctioga2. The doxygen configuration file can be found there.

5 February 2011

Vincent Fourmond: ctioga superseded by ctioga2

First, some historical details: some 6 years ago, I discovered Ruby together with Tioga, a great library for producing plots. That immediately resulted in my first Ruby program, ctioga. But as years passed and more features were forced into ctioga, I was compelled to see my initial design mistakes, and think about a complete rewrite. This is where ctioga2 was born, some time at the beginning of 2009. I completely stopped using the old ctioga a few month after starting to work on ctioga2, but it took ages before I finally came up with a decent enough documentation to release and announce publicly. But now, it's done, and the first public release of ctioga2 is out, still fresh ! Here are a few highlights of the differences: In any case, you can make yourself an opinion of ctioga2 by looking at the galleries. Enjoy !

8 February 2010

Vincent Fourmond: The java packaging nightmare...

... or why I mutilated your java package in Debian This post is especially addressed to what we Debian Developers refer to as upstream maintainers, that is the people who write/maintain the software that we package for Debian. It is meant to explain why, in some cases, Debian Developers prefer to mutilate your work rather than upload it to Debian Archives in a state that gives it proper credit. And to apologize. These opinions are my own, but I have a faint feeling that I'm not the only Debian Developer working like that, and that this few words could help soothe the relation betwenn Debian Developers and Upstream Maintainers, which can be quite tense some times... It happens unfortunately quite often (too often!) that I disable (or don't enable) features in programs I package. Exact reasons vary, but they essentially fall into two categories:
  • A feature requires code that does not comply to Debian Free Software Guidelines, which Debian cannot distribute. This is a no-go.
  • A relatively minor feature depends on other software that are not packaged yet, and in which I don't have specific interest, which means I would not be able to maintain them properly (or it would require too much packaging work and so on...).
When a program has features which falls in one of these categories, I have two choices: either I give up packaging the software or I give up some of the features... For packages for which I care, obviously the second option looks better from my point of view as a Debian Developer. Java packages are especially affected by this problem, for a very simple reason. Java is one of the few (I don't say only because I'll probably be flamed to death) programming languages which allows very easy distribution of binary platform-independent libraries, in the form of JAR files. Many projects simply reuse and embed JAR files published for other projects in their own JAR files, often without precise references to where the source code can be found. Packaging a moderately-sized Java application often rely on dozens of embedded JARs, which we need to remove from the packages we build (as Debian does not distribute binaries without sources for many reasons), and for which we need to hunt down the original source code and often packaging the original project, which might pull in yet other dependencies and so on... A true nightmare ! That's why it is so tempting some times to simply drop some of the code, possibly write patches to disable references to removed libraries, and be done with it. Therefore, I would wish to publicly apologize to any upstream developer I've offended by stripping down apparently carelessly their beautiful software before uploading to the Debian Archives; I hope they now understand why I've done that. Note to users: it is not because one of the features of your favorite software has been disabled by its (Debian) maintainer that you need to turn away from Debian ! Rather, file a bug report against the package. You'll get the reasons why the feature was disabled, and you have a chance to convince the maintainer to switch it back on.

5 April 2009

Vincent Fourmond: HADOPI: a great blow to freedom of expression and justice in France

Here I am, utterly disgusted. Last Thursday, around 11pm, two dozens of members of Assembl e Nationale (one of the two parliament chambers in France) voted the infamous law nicknamed HADOPI. Great... For the record, this chamber in principle counts 577 members. This law is an awful blow to the Internet, the freedom of expression and the legal system in France. The official aim of this law is to put a stop to illegal file-sharing within France. With this law, specially appointed private companies will file accusations saying: this IP downloaded something illegal at this date to a central authority, and this authority will send two warnings before cutting the Internet connection of the alleged illegal downloader for up to a year. You will notice that there is no mention of what the incriminated person allegedly downloaded. There will be no possibility of appeal until the sanction is executed. This scares the hell out of me. This spits upon so many aspects of the French legal system that it is honestly impressive... What about the French principle that says that everyone is innocent until proven guilty ? Here, you are declared guilty based on a rather weak evidence (on IP address !), and you'll have to prove your innocence. What about the principle that there needs to be a fair trial before the execution of the sanction ? You'll have to prove you are innocent after the execution, with the additional fun that it will turn almost impossible to prove it. Not to mention the fact that the companies harvesting IP addresses of alleged offenders will have a great deal of access to data you're exchanging; what about privacy ? For the record, this privilege, violating the way justice works in France, had only ever be granted to anti-terrorist cells. The fun thing is that this law is useless, at least in terms of the its official goal: the day it comes into application, illegal file sharers will encrypt their exchanges or fake their IP addresses, or do whatever else they might want to do to guarantee their anonymity, and no company will ever be able to find out what it is they exchange. I won't even mention the number of false positive of these automatic accusations: many innocent French web surfers will have their connection cut without ever knowing why and without any possibility to fight back. So, what is the real goal ? Or what will be the use ? I can only speculate, of course, but it is tempting to think that this law could be used to regulate what is being expressed from France on the web. Someone is saying disturbing things ? Well, easy to shut him/her up: either fake downloads from his/her IP address or bribe a company into filing false accusations, and you'll effectively remove his/her connection while having the opportunity to further discredit the person by publicly disclosing that he/she is such a pirate that their connection was cut... Sounds neat, doesn't it ? In my childhood, teachers kept on saying that France is the country of human rights, but I can't help thinking this is less and less the case[1]. Well. That was a long rant. But I can't keep it inside: this is touching me too much. I'll add that I'm not downloading anything, and I don't have anything a priori against laws which would tend to regulate illegal file sharing. I just don't think that the (small) profits of a few justify spitting upon the freedom and the elementary rights of all people living in France. Further information, in French, can be found there. The full text of the project can be found on the website of Assembl e Nationale. [1] Please don't get me wrong. There are many countries where life is definitely more difficult than here, and where human rights are constantly scorned upon, which is fortunately not the case here yet.

25 March 2009

Vincent Fourmond: pdfinfo in centimeters

pdfinfo is one of the utility programs bundled with xpdf that gives useful information about PDF files, including its size. However, the size is written in Postscript points, and I can't say I'm that fluent in this unit to actually know how big that is. So here is a shell function that converts the output of pdfinfo into centimeters. Enjoy !
pdfinfom ()  
    pdfinfo "$@"   perl -p -e \
 's#(\d+)\s*x\s*(\d+)\s*pts#(sprintf "%.2f", ($1*2.54/72))." x ".(sprintf "%.2f", ($2*2.54/72))." cm"#e'
 

3 March 2009

Vincent Fourmond: Weird crash with linux 2.6.26

I've had a rather funny crash for the second time now. It goes like this: the interface is freezing (processing event extremely slowly), it is nearly impossible to do anything (but apparently, everything works, just extremely slowly !). Kernel keep on saying this:
Mar  3 18:56:50 tanyaivinco kernel: [ 2385.443069] hdd: status timeout: status=0xd0   Busy  
Mar  3 18:56:50 tanyaivinco kernel: [ 2385.443069] ide: failed opcode was: unknown
Mar  3 18:56:56 tanyaivinco kernel: [ 2393.777714] hdd: status timeout: status=0xd0   Busy  
Mar  3 18:56:56 tanyaivinco kernel: [ 2393.777714] ide: failed opcode was: unknown
Mar  3 18:57:01 tanyaivinco kernel: [ 2398.982260] hdd: status timeout: status=0xd0   Busy  
Mar  3 18:57:01 tanyaivinco kernel: [ 2398.982260] ide: failed opcode was: unknown
One of the funny things is that this time like the previous one, at the beginning of the problem, there is always this kernel message, for which I could find no documentation:
Mar  3 18:56:35 tanyaivinco kernel: [ 2367.012218] Clocksource tsc unstable (delta = 4686267423 ns)
If anyone ever came across this, or has clue, I'm interested !

10 February 2009

Vincent Fourmond: A makefile snippet for generaring ray-traced images from pymol

For my research, to create neat images of the molecules I study, I use Pymol. It's free, part of Debian, command-driven, very powerful and it produces really good-looking pictures. Although, admittedly, if you don't buy a subscription, the documentation is rather sparse. I'm using scripts to generate ray-traced pictures, but I can't include the ray command directly in the scripts, as Pymol would not give me the opportunity to change anything before tracing (and things I trace take loads of time...). So I write a ray command, but I comment it out, such as in the following example, cytochrome.pml:
load http://www.rcsb.org/pdb/files/1c6s.pdb
hide everything
show sticks, (resname HEC)
color orange, (resname HEC)
show cartoon
bg_color white
set_view (\
     0.939850032,    0.167392358,    0.297758341,\
     0.336208642,   -0.299271941,   -0.892972171,\
    -0.060366094,    0.939367712,   -0.337551534,\
     0.000000000,    0.000000000, -106.161231995,\
    33.668910980,   -4.749122620,  -24.822664261,\
    -9.742469788,  222.064941406,    0.000000000 )
# ray 800,800
So, to easily generate PNG images from such a file, I wrote the following makefile snippet, that does the job (as demonstrated by the figure on the right, produced by this very snippet ran on the cytochrome.pml file above):
%.png: %.pml
 cd $(dir $<); \
 ray_trace_args= grep -o 'ray.*' $(notdir $<)  tail -n1   egrep -o '([0-9, ]+)'   sed 's/ //g'  ; \
 pymol -c -d "@$(notdir $<)" -d "cmd.ray($$ray_trace_args)" -g $@
I hope this snippet will prove useful for others. At any rate, it will prove useful for me ! Just for the record, this protein, represented in cartoon view, is called cytochrome c6 and is one of the proteins implied in the photosynthesis of some organisms.

8 February 2009

Vincent Fourmond: Emacs mode for machine-readable copyright files !

Quite a fair amount of time has flown since my decision to implement an emacs mode for the proposed machine-readable format for debian/copyright files. A have to admit that I had left that sleeping for quite a long while. But I took my courage, and rewrote nearly everything I had done so far. I'm quite happy with the results, to be truthful. The debian-mr-copyright-mode features: The aim of this mode is to provide a quick check for uncovered files in a package, and also means to verify if the license of a file is not misrepresented. The code can be downloaded from the git repository, accessible using
git clone git://git.debian.org/git/users/fourmond/debian-mr-copyright-mode.git
No debian package is available for the time being, although that could definitely change after lenny is out. I hope this emacs mode will help the new format to be widely adopted.

6 January 2009

Vincent Fourmond: Switching to mpd

I was until recently using xmms2 as a music daemon. I was finding it neat, providing a good command-line (thus scriptable) control over how the music was playing, and I was using xmms2 info to automatically write signature files for my mails. However, I got annoyed by one quite painful thing: on my computer, it can take up to 40% of the processor to play a MP3 file (AMD64 x2 4200+ @2.2GHz)! That is mad. One of the consequences was that the music was jaggy whenever aptitude was upgrading packages... Annoying. So, I've switched to mpd. It provides a decent command-line client, with possibly a bit less features than xmms2, but it takes only a few percent of the processor's usage... Thanks !

5 January 2009

Vincent Fourmond: Process substitution is cool !

I've finally found some time to work on ctioga again ! My main problem there is that I keep adding new features without ever bothering to document them... One of my main concerns is therefore to find out about the list of command-line switches that are not documented in the manual page. I've just written a neat shell one-liner that precisely does that:
diff <(man -a -l $HOME/SciYAG/ctioga/doc/ctioga.1   \
  egrep -o -- '--[a-z0-9-]+'   sort   uniq) \
  <(ctioga --help   egrep -o -- '--[][a-z0-9-]+'   \
  sort   uniq)   colordiff   less -R
(of course, I broke it into lines for clarity). It is based on process substitution, a shell trick that lets you use the output/input of a shell command exactly as a file on command line. Neat ! The trouble is, replacing the colordiff... part by egrep '^>' wc tells me there are 65 undocumented features... Lots of work in perspective, and I'm not sure I'll do it all before the 1.9 release...

14 October 2008

Vincent Fourmond: Another bzr2git example

Today, I tried to switch one of my personal repositories for debian-related scripts from bzr to git, just like I've done for pmount. The trick was that this time, I wanted to only move a part of the repository, not the full repository. I had only been working before with CVS and SVN who have the idea of modules, which is not the case for bzr or git. So I made the mistake of using a single bzr for several projects, which I realize now is not a very good idea... In any case, I managed to drop some parts and here is how I did it; the trick was precisely to use SVN as an intermediate storage medium, using the following configurations files. First, bzr2svn.conf
[DEFAULT]
verbose = True
patch-name-format = ""
[project]
source = bzr:source
target = svn:target
start-revision = INITIAL
state-file = tailor.state
[bzr:source]
repository = /home/vincent/debian-devel/bzr/scripts
[svn:target]
repository = file:///tmp/testtai
module = biniou
and svn2git.conf:
[DEFAULT]
verbose = True
patch-name-format = ""
[project]
source = svn:source
target = git:target
start-revision = INITIAL
root-directory = /home/vincent/tmp/debian-mr-copyright-mode
state-file = tailor.state
[svn:source]
repository = file:///tmp/testtai
module = biniou/debian-mr-copyright-mode
[git:target]
git-command=/usr/bin/git
Then, all that is left to do is to run tailor on the resulting configuration files:
~ tailor -D -c bzr2svn.conf
~ tailor -D -c svn2git.conf

13 October 2008

Vincent Fourmond: Sanitizing bad UTF-8

I've hit a problem recently where statsvn does not manage to generate statistics on one of my repositories. After investigation, it turned out that there are some raw latin1 sequences in the XML log file (from a conversion from latin to UTF-8 long time ago), and that makes logfile parsing fail. To sanitize this, I use the following filter:
iconv -c -f UTF-8 -t UTF-8
This way, obnoxious sequences are dropped and processing can go on. (or, at least, could go on if it was not failing just a little later with a Null pointer exception...).

9 October 2008

Vincent Fourmond: pmount switching to git

I've been neglecting pmount for such a long time I feel ashamed about it. Thanks to tailor and a neat post, I've just switched it to a git repository at git://git.debian.org/git/pmount/pmount.git to get more work done (I don't like bzr too much in the end, don't flame me, it's just a matter of personal taste...). I hope that I'll be able to reduce the amazing number of bugs that have accumulated there...

18 September 2008

Vincent Fourmond: pdfcrop vs pdfnup --trim

I make heavy use of pdfcrop (the version by Heiko Oberdiek included in texlive) for printing, as it allows to remove all the white spaces around the text before nupping and printing. However, with recent ghostscript, the bounding box detection is dreadfully slow, anything from one to ten seconds for a single page ! When you have a 60 pages article to print, it can be quite tedious... Well, I've just discovered that the --trim option of pdfnup can do very similar things too. It removes a given amount of margins on the side, with the syntax 'left bottom right top'. Most of the time, a well-thought pdfnup --trim ... will work as well as pdfcrop while in the meantime being much faster...

19 August 2008

Vincent Fourmond: What ctioga is missing

I haven't posted for a long while about ctioga, but that does not mean that development has stopped. It goes on, and features get added basically every single time I need them. Recent additions make it possible to tune a little more the look of the legends and add pure text lines in them. I've however realized that now, what ctioga is missing the most is real flexibility over the coordinates. For now, all coordinate positions are either relative to the frame (such as for --inset) or to the graph (for --draw). What I really wish is a way to mix all kind of coordinates: real size (1cm), frame position and graph position. That will require quite a fair deal of work, of course, but that shouldn't be too difficult... I'll go on posting about it here.

1 August 2008

Vincent Fourmond: CivCTP does not work with 2.6.25 kernels

Well, yes, I'm still playing old games like Civilization Call to Power, because I like... And I've recently had troubles getting it to play on a Debian/sid machine with a 2.6.25 kernel. I seemed to remember it was working fine before that, so I insisted, to the point that I switched back to a 2.6.18 kernel... And that worked ! I don't know what did change, but that is a weird bug indeed...

Next.

Previous.