2014Christoph Berg's Bloghttps://www.df7cb.de/blog/2014.htmlChristoph Berg's Blogikiwiki2014-11-28T09:29:06Zmounttreehttps://www.df7cb.de/blog/2014/mounttree.html2014-11-28T09:29:06Z2014-11-28T09:29:06Z
<p>If you think this is confusing ...</p>
<pre>
$ mount
</pre>
<p><font size="-2"></p>
<pre>
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1008105,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=1616484k,mode=755)
/dev/mapper/benz-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,relatime)
/dev/mapper/benz-home on /home type ext4 (rw,relatime,data=ordered)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/124 type tmpfs (rw,nosuid,nodev,relatime,size=808244k,mode=700,uid=124,gid=131)
/dev/mapper/benz-home on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26 type ext4 (rw,relatime,data=ordered)
proc on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1008105,mode=755)
devpts on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mapper/benz-home on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/home type ext4 (rw,relatime,data=ordered)
/dev/mapper/benz-root on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/tmp type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mapper/benz-home on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/srv type ext4 (rw,relatime,data=ordered)
/dev/mapper/benz-root on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/media type ext4 (rw,relatime,errors=remount-ro,data=ordered)
//newton/credativ on /credativ/credativ type cifs (rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,username=cbe,domain=CREDATIV,uid=0,noforceuid,gid=0,noforcegid,addr=172.26.14.2,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1,user)
//newton/cbe on /credativ/cbe type cifs (rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,username=cbe,domain=CREDATIV,uid=0,noforceuid,gid=0,noforcegid,addr=172.26.14.2,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1,user)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run/user/2062 type tmpfs (rw,nosuid,nodev,relatime,size=808244k,mode=700,uid=2062,gid=2062)
gvfsd-fuse on /run/user/2062/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=2062,group_id=2062)
/dev/mapper/benz-home on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2 type ext4 (rw,relatime,data=ordered)
proc on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1008105,mode=755)
devpts on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mapper/benz-home on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/home type ext4 (rw,relatime,data=ordered)
/dev/mapper/benz-root on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/tmp type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mapper/benz-home on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/srv type ext4 (rw,relatime,data=ordered)
/dev/mapper/benz-root on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/media type ext4 (rw,relatime,errors=remount-ro,data=ordered)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
</pre>
<p></font></p>
<p>... try <a href="http://svn.df7cb.de/dotfiles/cb/bin/mounttree">mounttree</a>:</p>
<pre>
$ mounttree
</pre>
<p><font size="-3"></p>
<pre>
/ rootfs rw
/ /dev/mapper/benz-root (ext4) rw,relatime,errors=remount-ro,data=ordered
boot /dev/sda1 (ext2) rw,relatime
credativ/cbe //newton/cbe (cifs) rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,username=cbe,domain=CREDATIV,uid=0,noforceuid,gid=0,noforcegid,addr=172.26.14.2,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1
credativ/credativ //newton/credativ (cifs) rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,username=cbe,domain=CREDATIV,uid=0,noforceuid,gid=0,noforcegid,addr=172.26.14.2,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1
dev udev (devtmpfs) rw,relatime,size=10240k,nr_inodes=1008105,mode=755
hugepages hugetlbfs rw,relatime
mqueue mqueue rw,relatime
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
shm tmpfs rw,nosuid,nodev
home /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
proc proc rw,nosuid,nodev,noexec,relatime
sys/fs/binfmt_misc systemd-1 (autofs) rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
sys/fs/binfmt_misc binfmt_misc rw,relatime
run tmpfs rw,nosuid,relatime,size=1616484k,mode=755
lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k
user/124 tmpfs rw,nosuid,nodev,relatime,size=808244k,mode=700,uid=124,gid=131
user/2062 tmpfs rw,nosuid,nodev,relatime,size=808244k,mode=700,uid=2062,gid=2062
gvfs gvfsd-fuse (fuse.gvfsd-fuse) rw,nosuid,nodev,relatime,user_id=2062,group_id=2062
sys sysfs rw,nosuid,nodev,noexec,relatime
fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755
blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio
cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct
cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset
devices cgroup rw,nosuid,nodev,noexec,relatime,devices
freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer
net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio
perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event
systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
fs/fuse/connections fusectl rw,relatime
fs/pstore pstore rw,nosuid,nodev,noexec,relatime
kernel/debug debugfs rw,relatime
kernel/security securityfs rw,nosuid,nodev,noexec,relatime
var/lib/schroot/mount/sid-amd64-ed5e5176-2c0f-4708-b259-663d20011b26 /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
dev udev (devtmpfs) rw,relatime,size=10240k,nr_inodes=1008105,mode=755
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
home /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
media /dev/mapper/benz-root (ext4) rw,relatime,errors=remount-ro,data=ordered
proc proc rw,nosuid,nodev,noexec,relatime
srv /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
sys sysfs rw,nosuid,nodev,noexec,relatime
tmp /dev/mapper/benz-root (ext4) rw,relatime,errors=remount-ro,data=ordered
var/lib/schroot/mount/wheezy-i386-a6e9e772-1061-4587-8321-c1615f21ebb2 /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
dev udev (devtmpfs) rw,relatime,size=10240k,nr_inodes=1008105,mode=755
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
home /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
media /dev/mapper/benz-root (ext4) rw,relatime,errors=remount-ro,data=ordered
proc proc rw,nosuid,nodev,noexec,relatime
srv /dev/mapper/benz-home (ext4) rw,relatime,data=ordered
sys sysfs rw,nosuid,nodev,noexec,relatime
tmp /dev/mapper/benz-root (ext4) rw,relatime,errors=remount-ro,data=ordered
</pre>
<p></font></p>
New urxvt tab in current directoryhttps://www.df7cb.de/blog/2014/New_urxvt_tab_in_current_directory.html2014-07-09T17:14:03Z2014-07-09T17:13:32Z
<p>Following Enrico's
<a href="http://www.enricozini.org/2014/debian/terminal-emulators/">terminal-emulators</a>
comparison, I wanted to implement "start a new terminal tab in my current
working directory" for rxvt-unicode aka urxvt. As Enrico notes, this
functionality is something between "rather fragile" and non-existing, so I went
to implement it myself. Martin Pohlack had the
<a href="http://permalink.gmane.org/gmane.comp.terminal-emulators.rxvt-unicode.general/1175">
right hint</a>, so here's the patch:</p>
<pre>
--- /usr/lib/urxvt/perl/tabbed 2014-05-03 21:37:37.000000000 +0200
+++ ./tabbed 2014-07-09 18:50:26.000000000 +0200
@@ -97,6 +97,16 @@
$term->resource (perl_ext_2 => $term->resource ("perl_ext_2") . ",-tabbed");
};
+ if (@{ $self->{tabs} }) {
+ # Get the working directory of the current tab and append a -cd to the command line
+ my $pid = $self->{cur}{pid};
+ my $pwd = readlink "/proc/$pid/cwd";
+ #print "pid $pid pwd $pwd\n";
+ if ($pwd) {
+ push @argv, "-cd", $pwd;
+ }
+ }
+
push @urxvt::TERM_EXT, urxvt::ext::tabbed::tab::;
my $term = new urxvt::term
@@ -312,6 +322,12 @@
1
}
+sub tab_child_start {
+ my ($self, $term, $pid) = @_;
+ $term->{pid} = $pid;
+ 1;
+}
+
sub tab_start {
my ($self, $tab) = @_;
@@ -402,7 +418,7 @@
# simply proxies all interesting calls back to the tabbed class.
{
- for my $hook (qw(start destroy key_press property_notify)) {
+ for my $hook (qw(start destroy key_press property_notify child_start)) {
eval qq{
sub on_$hook {
my \$parent = \$_[0]{term}{parent}
</pre>
Comparing Version Numbers in Shellhttps://www.df7cb.de/blog/2014/Comparing_Version_Numbers_in_Shell.html2014-06-25T07:56:50Z2014-06-25T07:56:50Z
<p>On RedHat/CentOS/rpm systems, there's no <i>dpkg --compare-versions</i>
available - <i>sort -V</i> can help to compare version numbers:</p>
<pre><code>version_lt () {
newest=$( ( echo "$1"; echo "$2" ) | sort -V | tail -n1)
[ "$1" != "$newest" ]
}
$ version_lt 1.5 1.1 && echo yes
$ version_lt 1.5 1.10 && echo yes
yes
</code></pre>
PostgreSQL 9.4 on Debianhttps://www.df7cb.de/blog/2014/PostgreSQL_9.4_on_Debian.html2014-05-16T05:54:27Z2014-05-16T05:54:27Z
<p>Yesterday saw the first beta release of the new PostgreSQL version 9.4. Along
with the sources, we uploaded binary packages to Debian experimental and
apt.postgresql.org, so there's now packages ready to be tested on Debian
wheezy, squeeze, testing/unstable, and Ubuntu trusty, saucy, precise, and
lucid.</p>
<p>If you are using one of the release distributions of Debian or Ubuntu, add this
to your /etc/apt/sources.list.d/pgdg.list to have 9.4 available:</p>
<p>deb http://apt.postgresql.org/pub/repos/apt/ codename-pgdg main 9.4</p>
<p>On Debian jessie and sid, install the packages from experimental.</p>
<p>Happy testing!</p>
Trusty and Saucy on apt.postgresql.orghttps://www.df7cb.de/blog/2014/Trusty_and_Saucy_on_apt.postgresql.org.html2014-02-25T08:32:01Z2014-02-25T08:32:01Z
<p>Over the past few weeks, new distributions have been added on
<a href="http://apt.postgresql.org/">apt.postgresql.org</a>:
Ubuntu 13.10 codenamed "saucy" and the upcoming Ubuntu LTS release 14.04
codenamed "trusty".</p>
<p>Adding non-LTS releases for the benefit of developers using PostgreSQL on their
notebooks and desktop machines has been a frequently requested item since we
created the repository. I had some qualms about targeting a new Ubuntu release
every 6 months, but with having automated more and more parts of the repository
infrastructure, and the bootstrapping process now being painless, the
distributions are now available for use. Technically, trusty started as empty,
so it hasn't all packages yet, but of course all the PostgreSQL server packages
are there, along with pgAdmin. Saucy started as a copy of precise (12.04) so it
has all packages. Not all packages have been rebuilt for saucy, but the precise
packages included (you can tell by the version number ending in .pgdg12.4+12 or
.pgdg13.10+1) will work, unless apt complains about dependency problems. I have
rebuilt the packages needing it I was aware about (most notably the
postgresql-plperl packages) - if you spot problems, please let us know on the
mailing list.</p>
<p>Needless to say, last week's PostgreSQL server updates are already included in
the repository.</p>
ci.debian.net on DDPOhttps://www.df7cb.de/blog/2014/ci.debian.net_on_DDPO.html2014-02-12T16:12:49Z2014-02-12T16:12:49Z
<p>More and more packages are getting
<a href="http://packages.qa.debian.org/a/autopkgtest.html">autopkgtest</a> aka
<a href="http://dep.debian.net/deps/dep8/">DEP-8</a> testsuites these days.
Thanks to Antonio Terceiro, there is <a href="http://ci.debian.net/">ci.debian.net"</a>
running the tests.</p>
<p>Last weekend, I've added a "CI" column on <a href="http://qa.debian.org/developer.php">DDPO</a>
that shows the current test results for your packages. Enjoy, and add tests to your packages!</p>