Search Results: "ed"

25 February 2012

David Bremner: First steps with Racket PLoT

I have been in the habit of using R to make e.g. histograms of test scores in my courses. The main problem is that I don't really need (or am too ignorant to know that I need) the vast statistical powers of R, and I use it rarely enough that its always a bit of a struggle to get the plot I want. racket is a programming language in the scheme family, distinguished from some of its more spartan cousins by its "batteries included" attitude. I recently stumbled upon the PLoT graph (information visualization kind, not networks) plotting module and was pretty impressed with the Snazzy 3D Pictures. So this time I decided try using PLoT for my chores. It worked out pretty well; of course I am not very ambitious. Compared to using R, I had to do a bit more work in data preparation, but it was faster to write the Racket than to get R to do the work for me (again, probably a matter of relative familiarity). racket-hist.png
#lang racket/base
(require racket/list)
(require plot)
(define marks (build-list 30 (lambda (n) (random 25))))
(define out-of 25)
(define breaks '((0  9) (10 12) (13 15) (16 18) (19 21) (22 25)))
(define (per-cent n)
  (ceiling (* 100 (/ n out-of))))
(define (label l)
  (format "~a-~a" (per-cent (first l)) (per-cent (second l))))
(define (buckets l)
  (let ((sorted (sort l <)))
    (for/list ([b breaks])
          (vector (label b)
           (count (lambda (x) (and 
                    (<= x ( second b))
                    (>= x ( first b))))
               marks)))))
(plot
 (list
  (discrete-histogram 
  (buckets marks)))
 #:out-file "racket-hist.png")

24 February 2012

Guido G nther: Iodine plugin for network-manager

During FOSDEM I finally got around to hack on a iodine plugin for network manager. Given a suitably prepared server on the other end this allows you to tunnel connections over DNS when all other traffic is firewalled. The basic configuration only needs the domain name set: Network Manager Iodine Configuration You can grab the sources from git.gnome.org, a Debian package is also available. This blog is flattr enabled.

Richard Hartmann: git-annex-push

This might be interesting if you are using git-annex with one default remote and don't modify files once added:
git config [--global] alias.annex-push \
'!git pull && git annex add . && git annex copy . --to $REMOTE --fast --quiet && git commit -a -m "$HOST $(date +%F--%H-%M-%S-%Z)" && git push'

Optional parameters include --global (you will need to name all your remotes the same for this) and --fast (don't use this if you modify files). The timestamp is not-quite-ISO-8601, but it\'s human-readable and trivial to parse for computers.

Richard Hartmann: zsh pound-insert

Ben Hutchings writes:
There is an alternative to using C-c, and that is M-#. This adds a '#' to the start of the line, commenting it out, and then behaves as if you pressed Return. The result is that the command is cancelled but still remains on-screen and in your history. You can then copy the command later using the mouse or keyboard.
Naturally, there is a zsh equivalent for this (there always is...): pound-insert. Quoth the manpage:
pound-insert
If there is no # character at the beginning of the buffer, add one to the beginning of each line. If there is one, remove a # from each line that has one. In either case, accept the current line. The INTERACTIVE_COMMENTS option must be set for this to have any usefulness.
So if you want the same for zsh, a simple
bindkey '^[#' pound-insert

is all you need. Update: Clint Adams noted another way to do (almost) the same.

Richard Hartmann: forcing-remote-git-rebase

Cleaning up a local repo:
git rebase -s ours -i --autosquash HEAD~20

Allowing the remote to be clobbered:
git config receive.denyNonFastForwards false

Pushing from local repo:
git push --force

Safe-guarding the remote once again:
git config receive.denyNonFastForwards true

In case you are rebasing an ikiwiki, you want to clobber the local checkout on your server, as well:
git remote update && git reset --hard @ u 

Done.

Richard Hartmann: apt-get install vcsh

apt-get install vcsh I finally got around to package vcsh and David Bremner was kind enough to sponsor it. vcsh is available in testing, unstable, and squeeze-backports. Also, Ubuntu seems to have copied it over into their repositories automagically. As you probably don't know, vcsh is a tool to manage config files in git. Say you want to maintain one repository for zsh, one for vim, one for ssh, one for mplayer, and one for mr, but obviously there can only be one .git in $HOME. vcsh helps by moving $GIT_DIR into $XDG_CONFIG_HOME/vcsh/repo.d/ but keeping $GIT_WORK_TREE in $HOME. The splitting of configuration sets into separate repositories allows you avoid checking out, say, mplayer's config on your servers, or checking out your ssh config at work. If this sounds complicated, it's not; vcsh hides all of the dirty details from you. vcsh integrates nicely with mr by means of a plugin, making handling your configurations even more trivial. If you do get stuck along the way, simply drop into #vcs-home on irc.oftc.net or send email to the vcs-home mailing list. popcon tells me that there are more users than I know about directly, so pipe up if you're one of them. And if you are one of the people who have it installed but don't use it, I am even more interested. I would love to know why so I can improve it. Long story short, if you care about the integrity and/or history of your configuration, or if you use one or more computers, you should definitely give vcsh a try. Any kind of feedback appreciated :)

Dominique Dumont: Config::Model: new cme command is available

Hello I ve (finally) released a new version of Config::Model. The main change for users is the deprecation of the config-edit program in favor of cme program. Instead of using options, this cme uses command keywords like git, so users will have more possibilities while typing less. bash completion is provided for cme command and options. Following Debian annoucement regarding the recommended format of Debian copyright file (aka DEP-5), I ve also updated the URL in Debian copyright model. If your package is already in a DEP-5 format, you can update the URL with this simple command: cme fix dpkg-copyright Check the wiki on github for more example of cme command. All the best

Julien Danjou: 10 years as a Debian developer

Ten years ago, I joined the Debian project as a developer. At that time, I was 18 and in my first year at university, hanging out with the TuxFamily system administrators, which included 3 french Debian developers (sjg, igenibel and creis). I was learning Debian packaging while working on VHFFS, and decided to package one or two non-yet-packaged software for Debian. My friends pushed me into the NM process, and less than 2 months later I was a Debian developer. One have to admit that back in the days, the NM process was really fast if you were able to reply to the questions quickly. :-) I think I became the youngest developer among Debian's ones. That was my first steps in a Free Software project, and it was really exciting. In 10 years, I've been doing a lot of different things for Debian. Sure, I've been using it all the years long, but let's recap a bit what I did, from what I recall. My first Debian only project was apt-build around 2003, and later rebuildd in 2007. I built the Xen packaging team in 2005, I've been a Stable Release Manager for a year in 2006, and did heavy bug squashing to release Etch that same year. I also was an Application Manager in 2006 and managed the application of 2 Debian developers (Jose Parrella and Dami n Viano). I admit I've been less active in Debian after 2007, mainly because I was busy working on awesome, GNU Emacs and others software. Since 2011, I joined the OpenStack packaging team and I'm working on OpenStack on a (almost) daily basis. I don't know how many packages I touched, managed or updated, but that should be one or two hundreds. I still maintain 53 of them. After all, the adventure has been really pleasant, and I had the chance to work with and meet fabulous and smart people. I always liked this project and what it's trying to do. After all these years, I'm definitively staying! See you in another 10 years, folks! :)

MJ Ray: Signed the PDFreaders Petition

We, the undersigned, hereby state that we expressly and unequivocally oppose the advertising of proprietary software products on government websites. Such advertising breaches impartiality and encourages citizens to employ technologies that unnecessarily restrict their freedom. The role of government is not to support certain market participants and not others, particularly when doing so works to maintain the monopolies of global software companies. In explanations of how to use digital resources that they provide, government agencies should clarify that multiple methods are available, and favour technologies which do not restrict users digital rights; by linking to PDFreaders.org, for example. Free Software guarantees the users right to use (for any purpose), study (without secrets), share (with anyone), and improve the software that they use. Public institutions should publish their documents in formats that can be read with Free Software. Indeed, many Free Software applications exist for reading such documents. Governments should lead citizens to freedom, and encourage them to make use of these applications. Sincerely,
Our co-op and 56 other businesses, 69 organisations and over 2200 individuals so far. How about adding your signature? Surely it s time for our governments to stop giving free adverts to Adobe? It was particularly annoying in the Digital Britain report, I thought.

23 February 2012

Tanguy Ortolo: Who gave my address to spammers?

For hurried readers: do not give your main email address to Moneybookers or to deviantART, since they may give it (unintentionally, I hope) to spammers.Dedicated addresses Since I have set up my own email server, when a company or an unknown individual asks for an address I give it a dedicated one. For instance, to make a payment I had to give an address to Moneybookers: instead of giving them my main address <tanguy@>, I used <tanguy+moneybookers@>. Thanks to Postfix's address extension feature (look for recipient_delimiter in postconf(5) manpage), these <tanguy+whatever@> are all implicit aliases to my main address. This practice has several benefits, since it allows me to: Working around lamers Some systems are coded by lamers that think the + sign is forbidden for email addresses, so I have to work around that. My current solution it to use a static alias <tanguy-2012@>, which I simply drop after a year to replace it by a new one. Two years report After two years collecting spam, the first noticeable thing is that, among 5.5k spams I received, only 78 are the result of an information leak from an organization. I excluded from that count the addresses I use in public mailing-lists, for instance <tanguy+debian@>. So, after some fine exclusion and checking of messages, these are the only two organizations that somehow gave my address to spammers:
  1. Moneybookers: 43 spam messages received;
  2. deviantArt: 35 spam messages received.

Jordi Mallach: alsaconf

Removing alsaconf was one of the very few rewarding moments of these ten years of taking care of ALSA in Debian. Not everyone agreed back then, and we still get some retaliation. :)
Date: Thu, 23 Feb 2012 02:59:31 +0100
From: <CENSORED>
To: jordi@debian.org
Subject: sabotage!
the removing of alsaconf without working(!) alternatives  was (AND IS!)  an
act of sabotage against millions of debian/alsa - users who needs stable
productive systems
you and all those proponents of removing this still needed alsaconf - program
will have to take the responsibility in front of an (us-) court for damages in
millions of dollars - amounts (lost man hours) all over the world
only a short while and we will have enough sponsors and witnesses around the
globe (and a very specialised, international labouring bureau of advocates) to
go to the court for prosecution.
we will not tolerate such an betray ("stable"? - do you believe, we're
fools??!!) against broad sections of the population and against the spirit of
free software!
it will be intresting to investigate, in whoms interests you've done so and
who the beneficiaries are ...
L.B.
conductor, publicist, whistleblower

Michal &#268;iha&#345;: Yet another project...

Okay, I'm probably really incorrigible. Not long ago, I've publicly complained that I have too many projects to work on and now I just got commit access to another one (after bothering Richard too much with my patches). Anyway I don't expect to contribute much to colorhug client, but somehow it happened that I needed to fix few bits and that lead to finding another bits to fix. Also I hope I won't have to touch much of other software in color management stack. Playing with Little CMS was nice experience, though I'd still prefer to be user in this area :-).

Filed under: English Life 0 comments Flattr this!

Niels Thykier: Some sponsors are evil and pedantic

If you want to enable all Lintian tags, just remember the phrase:
Some sponsors are evil and pedantic
Or on the command-line:
 $ lintian -EvIL +pedantic ...
It works for Lintian 2.5.5 (and newer), which handles pedantic like other severities. If you need help understanding the tags, you can add an extra i (-i) to evil . That being said, remember that experimental (-E) and pedantic (-L +pedantic) tags are what they are for a reason. Also quite a few people will probably find verbose (-v) too noisy. However, leaving any of them out would have ruined the mnemonic. :) Of course, you can also ask Lintian to enable all tags via your lintianrc file. Here is a quick-start:
display-info = yes # or no
display-experimental = yes # or no
pedantic = yes # or no
verbose = yes # or no

Mike Hommey: Fun with weak symbols

Consider the following foo.c source file:
extern int bar() __attribute__((weak));
int foo()
return bar();
And the following bar.c source file:
int bar()
return 42;
Compile both sources:
$ gcc -o foo.o -c foo.c -fPIC
$ gcc -o bar.o -c bar.c -fPIC
In the resulting object for foo.c, we have an undefined symbol reference to bar. That symbol is marked weak. In the resulting object for bar.c, the bar symbol is defined and not weak. What we expect from linking both objects is that the weak reference is fulfilled by the existence of the bar symbol in the second object, and that in the resulting binary, the foo function calls bar.
$ ld -shared -o test1.so foo.o bar.o
And indeed, this is what happens.
$ objdump -T test1.so grep "\(foo\ bar\)"
0000000000000260 g DF .text 0000000000000007 foo
0000000000000270 g DF .text 0000000000000006 bar
What do you think happens if the bar.o object file is embedded in a static library?
$ ar cr libbar.a bar.o
$ ld -shared -o test2.so foo.o libbar.a
$ objdump -T test2.so grep "\(foo\ bar\)"
0000000000000260 g DF .text 0000000000000007 foo
0000000000000000 w D *UND* 0000000000000000 bar
The bar function is now undefined and there is a weak reference for the symbol. Calling foo will crash at runtime. This is apparently a feature of the linker. If anyone knows why, I would be interested to hear about it. Good to know, though.

Russ Allbery: Debian Policy 3.9.3.0

I've just uploaded version 3.9.3.0 of Debian Policy. The really big change in this version is the 1.0 version of the copyright format specification, but that will get a separate announcement once the www team has had a chance to put it in place on the web site. There are a bunch of other fixes, though, including some normative changes. Here's the upgrading checklist (duplicated from my announcement, but formatted a bit prettier):
2.4
New archive sections education, introspection, and metapackages added.
5.6.8
The Architecture field in *.dsc files may now contain the value any all for source packages building both architecture-independent and architecture-dependent packages.
7.1
If a dependency is restricted to particular architectures, the list of architectures must be non-empty.
9.1.1
/run is allowed as an exception to the FHS and replaces /var/run. /run/lock replaces /var/lock. The FHS requirements for the older directories apply to these directories as well. Backward compatibility links will be maintained and packages need not switch to referencing /run directly yet. Files in /run should be stored in a temporary file system.
9.1.4
New section spelling out the requirements for packages that use files in /run, /var/run, or /var/lock. This generalizes information previously only in 9.3.2.
9.5
Cron job file names must not contain "." or "+" or they will be ignored by cron. They should replace those characters with "_". If a package provides multiple cron job files in the same directory, they should each start with the package name (possibly modified as above), "-", and then some suitable suffix.
9.10
Packages using doc-base do not need to call install-docs anymore.
10.7.4
Packages that declare the same conffile may see left-over configuration files from each other even if they conflict.
11.8
The Policy rules around Motif libraries were just a special case of normal rules for non-free dependencies and were largely obsolete, so they have been removed.
12.5
debian/copyright is no longer required to list the Debian maintainers involved in the creation of the package (although note that the requirement to list copyright information is unchanged).
copyright-format
Version 1.0 of the "Machine-readable debian/copyright file" specification is included.
mime
This separate document has been retired and and its (short) contents merged into Policy section 9.7. There are no changes to the requirements.
perl
Packages may declare an interest in the <perl-major-upgrade> trigger to be notified of major upgrades of perl.
virtual
ttf-japanese- mincho,gothic have been renamed to fonts-japanese- mincho,gothic .
Please review and update your packages as necessary the next time you make an upload.

James Bromberger: Hurricane Electric IPv6 tunnel MTU

I ve been running an IPv6 tunnel for a long time, but occasionally I ve been seeing traffic hang on it. It looks like it was the MTU, defaulting at 1500 bytes, causing issues when large amounts of data were being shuffled OUT from my Linux box, back to the net . The fix is easy: /etc/network/interfaces should have an up line for the interface definition saying: up ip link set mtu 1280 dev henet, where henet is the name of your tunnel interface. Easy enough to skip this line if your tunnel appears to be working OK, but interesting to track down.

22 February 2012

Bernd Zeimetz: nagios-plugins-contrib released

Nagios or Icinga users probably know the problem that neither the default plugin packages (nagios-plugins-basic and -standard) nor the few other plugin packages ship all the plugins you need to monitor your hardware and software properly. And unless you have puppet, cfengine or some other automation software, you probably just start searching plugins on Nagios Exchange, MonitoringExchange or some other machines you are monitoring already. Your problem shall be solved! nagios-plugins-contrib passed NEW today. It is a collection of various useful plugins, maintained within the Debian Nagios Maintainer Group. So far it contains only 6 plugins (check_email_delivery, check_ipmi_sensor, check_lm_sensors, check_memcached, check_raid, check_rbl), but more are going to come. check_lm_sensors in action To have your favorite plugins added to the package we would like to encourage you to send pull requests, either using github, alioth or your personal repository. Please keep in mind that you'll be added to the Uploaders of the package automatically to ensure that you keep your plugin updated and in a good shape. See debian/README.source for some instructions on adding new plugins. Unmaintained plugins will be removed! Of course you can also submit bug reports to have a new plugin added, but you have to convince somebody to maintain it for you (or that he wants to use the plugin and needs to maintain it therefore :) ). We might also also have a similar package in contrib as a lot of commonly used plugins require non-free software, so don't hesitate to prepare plugins for inclusion in such a package and let us know! Suggestions and ideas for improvement are always welcome. And so is help to maintain the packages!

Bartosz Fe&#324;ski: [B]ack[U]p and [R]estore [P]rogram

One of the most popular backup solution under Linux is Bacula, but it s quite complicated to setup. The same for Amanda.
Since my last sponsored upload we ve got another alternative in Debian. It s called burp. Let s enumerate its features as of version 1.3.0: Sounds good and this project is only 1 year old! Author claims that setup is much easier than with Bacula. Let s find out is that truth ;) Since we ve got this software in Debian installing it on unstable is as simple as apt-get install burp .
Both client and server came from the same binary package. Now let s configure server side. Well in fact we just have to run it, so just change RUN=no to RUN=yes in /etc/default/burp and launch it using /etc/init.d/burp start . Now the client side. If the client is on the same machine then you re ready. Yes you re ready! Let s do our first backup:
backup ~ # burp -a b
2012-02-22 17:53:03: burp[30584] Listing configured paths:
2012-02-22 17:53:03: burp[30584] include: /home
2012-02-22 17:53:03: burp[30584] Listing starting paths:
2012-02-22 17:53:03: burp[30584] /home
2012-02-22 17:53:03: burp[30584] before client
2012-02-22 17:53:03: burp[30584] begin client
2012-02-22 17:53:03: burp[30584] auth ok
2012-02-22 17:53:03: burp[30584] Compression level: 9
2012-02-22 17:53:03: burp[30584] do backup client
2012-02-22 17:53:03: burp[30584] Phase 1 begin (file system scan)
 
ddwdffffddffdfdfdddfffffdddfffffffdfffdfdfffffdfdfdffdddddfffddff 64
[...a lot of output...]
 
2012-02-22 17:53:03: burp[30584] Phase 1 end (file system scan)
2012-02-22 17:53:03: burp[30584] Phase 2 begin (send file data)
 
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 64
[...a lot of output...]
 
--------------------------------------------------------------------------------
Start time: 2012-02-22 17:53:03
  End time: 2012-02-22 17:53:07
Time taken: 00:04
                             New   Changed Unchanged     Total    Scanned
                       --------------------------------------------------
                Files:       100         0         -       100        100
          Directories:         -         -         -         -         76
           Soft links:         -         -         -         -          1
          Grand total:       100         0         -       100        177
                       --------------------------------------------------
 
             Warnings:             1
 
      Bytes estimated:      17628946 (16.81 MB)
      Bytes in backup:      17628946 (16.81 MB)
       Bytes received:             0
           Bytes sent:      17628946 (16.81 MB)
--------------------------------------------------------------------------------
2012-02-22 17:53:07: burp[30584] Phase 2 end (send file data)
2012-02-22 17:53:07: burp[30584] backup finished ok
2012-02-22 17:53:07: burp[30584] after client
backup ~ #
Yes. By default it is so extremely simple! Of course this way we can make backup of /home (that s default) to /var/spool/burp (also default location) but you can easily change this.
For the simplest scenario (backing up laptop to remote server) all I had to change was server = 127.0.0.1 in /etc/burp/burp.conf on the client side. Burp comes with handy tool called burp_ca and it simplifies setting up encrypted backups. In fact there is step by step howto in documentation.
Other options are quite self explanatory and well documented in both client and server config files that came with the package. Happy backuping!

Christian Perrier: 2012 update 11 for Debian Installer localization

Status for D-I level 1 (core D-I files): Status for D-I level 2 (packages that have localized material that may appear during default installs, such as iso-codes, tasksel, etc.): Status for D-I level 3 (packages that have localized material that may appear during non-default installs, such as win32-loader) Full 100% completeness (hall of fame) for 18 languages: Bulgarian, Czech, German, Esperanto, Spanish, Persian, French, Indonesian, Italian, Japanese, Kazakh, Dutch, Polish, Portuguese, Russian, Slovak, Turkish, Simplified Chinese

Michal &#268;iha&#345;: Secure your phpMyAdmin

phpMyAdmin is quite popular software (to give some numbers let's mention 10000 downloads daily on SourceForge.net or 122685 reports in Debian's popcon) and as such is quite attractive target for various scripted attacks. If you run phpMyAdmin installation somewhere you should really make sure it is enough secured, so that these script kiddies don't get through. In past month I've looked at what kind of attacks are these guys trying and in all cases these are pretty old vulnerabilities, some of them fixed years ago. So the first thing you should do is to update. It is always good to run latest stable version, but in case you can not for whatever reason, try at least taking the most important fixes and using them. In ideal world your distribution would do this job for you, but in case it did not, you can for example take patches from Debian, which is pretty good at taking our patches (surprisingly it is not much related to my involvement there). To check which patches they have applied you can use excellent patch-tracker tool, which exposes patches from all released packages. To give you overview of which issues are mostly being attempted to exploit by script kiddies right now, here is the list: If you have fixed these, you should be pretty safe for now, but follow our security announcements for possible future issues (you can use RSS feed or subscribe to news mailing list, where all security issues are announced as well). However there are more things you can do to keep you safer: So these are the basic steps which will help you against possible compromise, I might return to some of these in more details in future posts.

Filed under: Debian English Phpmyadmin Suse 0 comments Flattr this!

Next.

Previous.